diff --git a/app/autostart.cpp b/app/autostart.cpp index 602ad87..1863e75 100644 --- a/app/autostart.cpp +++ b/app/autostart.cpp @@ -64,6 +64,17 @@ static fs::path autostart_path() 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 std::ofstream ofs(autostart_path()); if (ofs.is_open()) diff --git a/app/config.h b/app/config.h index 07ab108..34bdbd8 100644 --- a/app/config.h +++ b/app/config.h @@ -4,7 +4,7 @@ // App version #define QBREAK_VERSION_MAJOR 0 #define QBREAK_VERSION_MINOR 1 -#define QBREAK_VERSION_SUFFIX 13 +#define QBREAK_VERSION_SUFFIX 14 // How often UI is updated - interval in seconds #define INTERVAL_UPDATE_UI (15) diff --git a/app/idle_tracking.cpp b/app/idle_tracking.cpp index acb45dd..4d91ba3 100644 --- a/app/idle_tracking.cpp +++ b/app/idle_tracking.cpp @@ -6,9 +6,9 @@ #if defined(TARGET_LINUX) #include -#include -#include -#include +#include +#include +#include // Thanks to https://stackoverflow.com/questions/222606/detecting-keyboard-mouse-activity-in-linux diff --git a/app/qbreak.pro b/app/qbreak.pro index 425f415..964a958 100644 --- a/app/qbreak.pro +++ b/app/qbreak.pro @@ -1,8 +1,7 @@ -QT += core gui svg multimedia +QT += core gui svg multimedia widgets dbus CONFIG += debug_and_release -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus CONFIG += c++17 lrelease embed_translations diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh index 9ad872c..76ac361 100755 --- a/scripts/build_linux.sh +++ b/scripts/build_linux.sh @@ -2,9 +2,9 @@ # 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 - 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 # Build .appimage diff --git a/scripts/build_linux_debug.sh b/scripts/build_linux_debug.sh index 4951b6c..c49c930 100755 --- a/scripts/build_linux_debug.sh +++ b/scripts/build_linux_debug.sh @@ -2,9 +2,9 @@ # 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 - export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64 + export QT_HOME=/home/$USER/qt/5.15.2/gcc_64 fi # Build .appimage