- create ~/.config/autostart if not exists + adopt for new build environment
This commit is contained in:
parent
447f33bf94
commit
64658a7778
@ -64,6 +64,17 @@ static fs::path autostart_path()
|
|||||||
|
|
||||||
void autostart::enable(const std::string& path_to_me)
|
void autostart::enable(const std::string& path_to_me)
|
||||||
{
|
{
|
||||||
|
// Ensure autostart directory exists at all
|
||||||
|
if (!fs::exists(autostart_dir()))
|
||||||
|
{
|
||||||
|
std::error_code ec;
|
||||||
|
if (!fs::create_directory(autostart_dir(), ec))
|
||||||
|
{
|
||||||
|
qDebug() << "Failed to create autostart directory. Error: " << QString::fromStdString(ec.message());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Put .desktop file to ~/.config/autostart
|
// Put .desktop file to ~/.config/autostart
|
||||||
std::ofstream ofs(autostart_path());
|
std::ofstream ofs(autostart_path());
|
||||||
if (ofs.is_open())
|
if (ofs.is_open())
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
// App version
|
// App version
|
||||||
#define QBREAK_VERSION_MAJOR 0
|
#define QBREAK_VERSION_MAJOR 0
|
||||||
#define QBREAK_VERSION_MINOR 1
|
#define QBREAK_VERSION_MINOR 1
|
||||||
#define QBREAK_VERSION_SUFFIX 13
|
#define QBREAK_VERSION_SUFFIX 14
|
||||||
|
|
||||||
// How often UI is updated - interval in seconds
|
// How often UI is updated - interval in seconds
|
||||||
#define INTERVAL_UPDATE_UI (15)
|
#define INTERVAL_UPDATE_UI (15)
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
#if defined(TARGET_LINUX)
|
#if defined(TARGET_LINUX)
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDBusConnection>
|
#include <QtDBus/QDBusConnection>
|
||||||
#include <QDBusReply>
|
#include <QtDBus/QDBusReply>
|
||||||
#include <QDBusInterface>
|
#include <QtDBus/QDBusInterface>
|
||||||
|
|
||||||
// Thanks to https://stackoverflow.com/questions/222606/detecting-keyboard-mouse-activity-in-linux
|
// Thanks to https://stackoverflow.com/questions/222606/detecting-keyboard-mouse-activity-in-linux
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
QT += core gui svg multimedia
|
QT += core gui svg multimedia widgets dbus
|
||||||
|
|
||||||
CONFIG += debug_and_release
|
CONFIG += debug_and_release
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus
|
|
||||||
|
|
||||||
CONFIG += c++17 lrelease embed_translations
|
CONFIG += c++17 lrelease embed_translations
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
# I use this script on two different hosts so there are logic to find proper Qt installation
|
# I use this script on two different hosts so there are logic to find proper Qt installation
|
||||||
|
|
||||||
export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64
|
export QT_HOME=/home/$USER/tools/qt/5.15.2/gcc_64
|
||||||
if [ ! -d "$QT_HOME" ] ; then
|
if [ ! -d "$QT_HOME" ] ; then
|
||||||
export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64
|
export QT_HOME=/home/$USER/tools/qt/5.15.2/gcc_64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build .appimage
|
# Build .appimage
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
# I use this script on two different hosts so there are logic to find proper Qt installation
|
# I use this script on two different hosts so there are logic to find proper Qt installation
|
||||||
|
|
||||||
export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64
|
export QT_HOME=/home/$USER/tools/qt/5.15.2/gcc_64
|
||||||
if [ ! -d "$QT_HOME" ] ; then
|
if [ ! -d "$QT_HOME" ] ; then
|
||||||
export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64
|
export QT_HOME=/home/$USER/qt/5.15.2/gcc_64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build .appimage
|
# Build .appimage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user