Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c48fe5f38 | |||
| 61ef94b474 | |||
| aba5e21271 | |||
| 76a63b29c2 | |||
| 37840dfdb1 | |||
| 9ff378d5e0 | |||
| 317b7097f6 | |||
| 64658a7778 | |||
| 447f33bf94 | |||
| 6200504627 |
@ -1,10 +1,12 @@
|
||||
#include "audio_support.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QSound>
|
||||
|
||||
extern void play_audio(const app_settings::selected_audio& item)
|
||||
{
|
||||
// Play audio
|
||||
|
||||
if (item.name != Audio_Empty && item.name != Audio_Custom)
|
||||
{
|
||||
// Find bundled audio
|
||||
@ -16,4 +18,7 @@ extern void play_audio(const app_settings::selected_audio& item)
|
||||
if (item.name == Audio_Custom && !item.path.isEmpty())
|
||||
QSound::play(item.path);
|
||||
}
|
||||
|
||||
#else
|
||||
extern void play_audio(const app_settings::selected_audio& item)
|
||||
{}
|
||||
#endif
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
// App version
|
||||
#define QBREAK_VERSION_MAJOR 0
|
||||
#define QBREAK_VERSION_MINOR 1
|
||||
#define QBREAK_VERSION_SUFFIX 11
|
||||
#define QBREAK_VERSION_SUFFIX 17
|
||||
|
||||
// How often UI is updated - interval in seconds
|
||||
#define INTERVAL_UPDATE_UI (60)
|
||||
#define INTERVAL_UPDATE_UI (10)
|
||||
|
||||
// How often progress bar is updated - interval in milliseconds
|
||||
#define INTERVAL_UPDATE_PROGRESS (1000)
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
#if defined(TARGET_LINUX)
|
||||
|
||||
#include <QObject>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusReply>
|
||||
#include <QDBusInterface>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusReply>
|
||||
#include <QtDBus/QDBusInterface>
|
||||
|
||||
// Thanks to https://stackoverflow.com/questions/222606/detecting-keyboard-mouse-activity-in-linux
|
||||
|
||||
@ -210,6 +210,7 @@ int get_idle_time_kde_wayland()
|
||||
|
||||
#endif
|
||||
|
||||
static bool Warning_X11InWayland = false;
|
||||
int get_idle_time_dynamically()
|
||||
{
|
||||
const char* wl_display = std::getenv("WAYLAND_DISPLAY");
|
||||
@ -235,8 +236,14 @@ int get_idle_time_dynamically()
|
||||
#else
|
||||
// Restrict to X11
|
||||
if (wl_display)
|
||||
{
|
||||
// One time error message
|
||||
if (!Warning_X11InWayland) {
|
||||
qDebug() << "Wayland is found, but app built for X11 only. Idle tracking is not supported.";
|
||||
Warning_X11InWayland = true;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
return get_idle_time_x11();
|
||||
#endif
|
||||
}
|
||||
|
||||
54
app/main.cpp
54
app/main.cpp
@ -6,13 +6,63 @@
|
||||
#include <QCommandLineParser>
|
||||
#include <QTranslator>
|
||||
#include <QFileInfo>
|
||||
#include <QDateTime>
|
||||
|
||||
#if defined(TARGET_LINUX)
|
||||
# include <syslog.h>
|
||||
#endif
|
||||
|
||||
// Handler for Qt log messages that sends output to syslog as well as standard error.
|
||||
void SyslogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||
{
|
||||
Q_UNUSED(context)
|
||||
std::string timePrefix = QDateTime::currentDateTime().toString().toStdString();
|
||||
|
||||
QByteArray localMsg = msg.toLocal8Bit();
|
||||
switch (type) {
|
||||
case QtDebugMsg:
|
||||
fprintf(stderr, "debug: %s %s\n", timePrefix.c_str(), localMsg.constData());
|
||||
#if defined(TARGET_LINUX)
|
||||
syslog(LOG_DEBUG, "debug: %s", localMsg.constData());
|
||||
#endif
|
||||
break;
|
||||
case QtInfoMsg:
|
||||
fprintf(stderr, "info: %s %s\n", timePrefix.c_str(), localMsg.constData());
|
||||
#if defined(TARGET_LINUX)
|
||||
syslog(LOG_INFO, "info: %s", localMsg.constData());
|
||||
#endif
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
fprintf(stderr, "warning: %s %s\n", timePrefix.c_str(), localMsg.constData());
|
||||
#if defined(TARGET_LINUX)
|
||||
syslog(LOG_WARNING, "warning: %s", localMsg.constData());
|
||||
#endif
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
fprintf(stderr, "critical: %s %s\n", timePrefix.c_str(), localMsg.constData());
|
||||
#if defined(TARGET_LINUX)
|
||||
syslog(LOG_CRIT, "critical: %s", localMsg.constData());
|
||||
#endif
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
fprintf(stderr, "fatal: %s %s\n", timePrefix.c_str(), localMsg.constData());
|
||||
#if defined(TARGET_LINUX)
|
||||
syslog(LOG_ALERT, "fatal: %s", localMsg.constData());
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
RunGuard guard("adjfaifaif");
|
||||
RunGuard guard("QBreak app - runguard");
|
||||
if ( !guard.tryToRun() )
|
||||
return 0;
|
||||
|
||||
// Needed to enable logging to syslog or journald.
|
||||
qInstallMessageHandler(SyslogMessageHandler);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QCoreApplication::setOrganizationName("voipobjects.com");
|
||||
@ -29,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Put itself into app menu
|
||||
auto exe_path = QCoreApplication::applicationFilePath();//QFileInfo(QCoreApplication::arguments().front()).absoluteFilePath();
|
||||
auto exe_path = QCoreApplication::applicationFilePath();
|
||||
const char* appimage = std::getenv("APPIMAGE");
|
||||
if (appimage != nullptr)
|
||||
exe_path = appimage;
|
||||
|
||||
@ -12,25 +12,46 @@
|
||||
#include <QAction>
|
||||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <QDesktopWidget>
|
||||
#include <QSvgGenerator>
|
||||
#include <QPalette>
|
||||
#include <QScreen>
|
||||
#include <QWindow>
|
||||
#include <QFileInfo>
|
||||
#include <QSound>
|
||||
#include <QCommandLineOption>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDateTime>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
# include <QDesktopWidget>
|
||||
# include <QSound>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
static void dispatchToMainThread(std::function<void()> callback, std::chrono::milliseconds delay = std::chrono::milliseconds(0))
|
||||
{
|
||||
// any thread
|
||||
QTimer* timer = new QTimer();
|
||||
timer->moveToThread(qApp->thread());
|
||||
timer->setSingleShot(true);
|
||||
timer->setInterval(delay);
|
||||
QObject::connect(timer, &QTimer::timeout, [=]()
|
||||
{
|
||||
// main thread
|
||||
callback();
|
||||
timer->deleteLater();
|
||||
});
|
||||
QMetaObject::invokeMethod(timer, "start", Qt::QueuedConnection, Q_ARG(int, 0));
|
||||
}
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
init();
|
||||
|
||||
// Defer init call for 100 ms - attempt to resolve the problem with non working setTooltip()
|
||||
dispatchToMainThread([this](){init();}, std::chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -122,27 +143,17 @@ void MainWindow::init()
|
||||
shiftTo(AppState::Counting);
|
||||
}
|
||||
|
||||
static QString get_time()
|
||||
{
|
||||
return QDateTime::currentDateTime().toString();
|
||||
}
|
||||
|
||||
static QString get_log_prefix()
|
||||
{
|
||||
return get_time();
|
||||
}
|
||||
|
||||
static int str_to_seconds(const QString& s)
|
||||
{
|
||||
if (s.isEmpty())
|
||||
throw std::runtime_error("Bad parameter value.");
|
||||
|
||||
if (s.back() == 'h')
|
||||
return s.leftRef(s.size()-1).toInt() * 3600;
|
||||
return s.left(s.size()-1).toInt() * 3600;
|
||||
if (s.back() == 'm')
|
||||
return s.leftRef(s.size()-1).toInt() * 60;
|
||||
return s.left(s.size()-1).toInt() * 60;
|
||||
if (s.back() == 's')
|
||||
return s.leftRef(s.size()-1).toInt();
|
||||
return s.left(s.size()-1).toInt();
|
||||
|
||||
if (s.back().isDigit())
|
||||
return s.toInt();
|
||||
@ -225,10 +236,11 @@ void MainWindow::showMe()
|
||||
}
|
||||
}
|
||||
// else
|
||||
// qDebug() << get_log_prefix() << "Screen not found!";
|
||||
// qDebug() << "Screen not found!";
|
||||
|
||||
#if defined(DEBUG)
|
||||
showMaximized();
|
||||
showFullScreen();
|
||||
//showMaximized();
|
||||
#else
|
||||
showFullScreen();
|
||||
#endif
|
||||
@ -274,10 +286,11 @@ void MainWindow::createTrayIcon()
|
||||
|
||||
mTrayIcon->setContextMenu(menu);
|
||||
mTrayIcon->setIcon(getTrayIcon());
|
||||
mTrayIcon->setToolTip(AppName);
|
||||
mTrayIcon->show();
|
||||
// mTrayIcon->setToolTip(AppName);
|
||||
connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||
this, SLOT(onTrayIconActivated(QSystemTrayIcon::ActivationReason)));
|
||||
|
||||
mTrayIcon->show();
|
||||
}
|
||||
|
||||
static int msec2min(int msec)
|
||||
@ -302,13 +315,12 @@ QString state2str(AppState state)
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::shiftTo(AppState newState)
|
||||
{
|
||||
if (newState == mState)
|
||||
return;
|
||||
#if defined(DEBUG)
|
||||
qDebug() << get_log_prefix() << state2str(mState) << " -> " << state2str(newState);
|
||||
#endif
|
||||
qDebug() << state2str(mState) << " -> " << state2str(newState);
|
||||
|
||||
switch (newState)
|
||||
{
|
||||
@ -336,10 +348,17 @@ void MainWindow::shiftTo(AppState newState)
|
||||
}
|
||||
|
||||
mState = newState;
|
||||
onUpdateUI();
|
||||
|
||||
// Run deferred in main UI thread
|
||||
dispatchToMainThread([this](){
|
||||
onUpdateUI();
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::onUpdateUI() {
|
||||
void MainWindow::onUpdateUI()
|
||||
{
|
||||
qDebug() << "UI timer fired.";
|
||||
|
||||
int idle_milliseconds = 0;
|
||||
switch (mState) {
|
||||
case AppState::None:
|
||||
@ -350,7 +369,7 @@ void MainWindow::onUpdateUI() {
|
||||
// Detected idle, don't count this time as working
|
||||
// But check - maybe idle is over
|
||||
idle_milliseconds = get_idle_time_dynamically();
|
||||
qDebug() << get_log_prefix() << "Idle found: " << idle_milliseconds / 1000 << "s";
|
||||
qDebug() << "Idle found: " << idle_milliseconds / 1000 << "s";
|
||||
|
||||
if (idle_milliseconds < mAppConfig.idle_timeout * 1000)
|
||||
{
|
||||
@ -371,6 +390,8 @@ void MainWindow::onUpdateUI() {
|
||||
if (!mIdleStart && mAppConfig.idle_timeout)
|
||||
{
|
||||
idle_milliseconds = get_idle_time_dynamically();
|
||||
qDebug() << "Idle found: " << idle_milliseconds / 1000 << "s";
|
||||
|
||||
if (idle_milliseconds >= mAppConfig.idle_timeout * 1000)
|
||||
{
|
||||
shiftTo(AppState::Idle);
|
||||
@ -389,6 +410,8 @@ void MainWindow::onUpdateUI() {
|
||||
tr("There are %1 minutes left until the next break.")
|
||||
.arg(msec2min(remaining_milliseconds)));
|
||||
}
|
||||
else
|
||||
qDebug() << "No tray icon available.";
|
||||
|
||||
break;
|
||||
}
|
||||
@ -408,7 +431,7 @@ void MainWindow::onLongBreakStart()
|
||||
{
|
||||
mBreakStartTimer->stop();
|
||||
mBreakNotifyTimer->stop();
|
||||
qDebug() << get_log_prefix() << "Stop main and notify timers.";
|
||||
qDebug() << "Stop main and notify timers.";
|
||||
|
||||
// Reset idle counter
|
||||
mIdleStart.reset();
|
||||
@ -445,16 +468,16 @@ void MainWindow::onLongBreakEnd()
|
||||
if (!mBreakStartTimer->isActive())
|
||||
{
|
||||
mBreakStartTimer->start(std::chrono::seconds(mAppConfig.longbreak_interval));
|
||||
qDebug() << get_log_prefix() << "Start main timer for " << mAppConfig.longbreak_interval << " seconds.";
|
||||
qDebug() << "Start main timer for " << mAppConfig.longbreak_interval << " seconds.";
|
||||
}
|
||||
if (!mBreakNotifyTimer->isActive())
|
||||
{
|
||||
mBreakNotifyTimer->start(std::chrono::seconds(mAppConfig.longbreak_interval - 30));
|
||||
qDebug() << get_log_prefix() << "Start notify timer for " << mAppConfig.longbreak_interval - 30 << " seconds.";
|
||||
qDebug() << "Start notify timer for " << mAppConfig.longbreak_interval - 30 << " seconds.";
|
||||
}
|
||||
|
||||
// Play selected audio. When break is postponed - audio is not played
|
||||
if (!mPostponeCount)
|
||||
if (0 == mPostponeCount)
|
||||
play_audio(mAppConfig.play_audio);
|
||||
|
||||
// Run script
|
||||
@ -462,7 +485,7 @@ void MainWindow::onLongBreakEnd()
|
||||
{
|
||||
int retcode = system(mAppConfig.script_on_break_finish.toStdString().c_str());
|
||||
if (retcode != 0)
|
||||
qDebug() << get_log_prefix() << "User script exited with error code " << retcode;
|
||||
qDebug() << "User script exited with error code " << retcode;
|
||||
}
|
||||
}
|
||||
|
||||
@ -531,7 +554,7 @@ void MainWindow::onIdleStart()
|
||||
// Stop main & notify timers
|
||||
mBreakStartTimer->stop();
|
||||
mBreakNotifyTimer->stop();
|
||||
qDebug() << get_log_prefix() << "Stop main and notify timers. Remaining time is " << mRemainingWorkInterval.value() << "s";
|
||||
qDebug() << "Stop main and notify timers. Remaining time is " << mRemainingWorkInterval.value() << "s";
|
||||
}
|
||||
|
||||
void MainWindow::onIdleEnd()
|
||||
@ -544,13 +567,13 @@ void MainWindow::onIdleEnd()
|
||||
// Update timer(s) duration
|
||||
if (mRemainingWorkInterval)
|
||||
{
|
||||
qDebug() << get_log_prefix() << "Reset main timer to " << *mRemainingWorkInterval << "s";
|
||||
qDebug() << "Reset main timer to " << *mRemainingWorkInterval << "s";
|
||||
mBreakStartTimer->setInterval(std::chrono::seconds(*mRemainingWorkInterval));
|
||||
|
||||
if (mRemainingWorkInterval > INTERVAL_NOTIFICATION)
|
||||
{
|
||||
mBreakNotifyTimer->setInterval(std::chrono::seconds(*mRemainingWorkInterval - INTERVAL_NOTIFICATION));
|
||||
qDebug() << get_log_prefix() << "Reset notify timer to " << *mRemainingWorkInterval - INTERVAL_NOTIFICATION << "s";
|
||||
qDebug() << "Reset notify timer to " << *mRemainingWorkInterval - INTERVAL_NOTIFICATION << "s";
|
||||
}
|
||||
mRemainingWorkInterval.reset();
|
||||
}
|
||||
|
||||
@ -53,12 +53,12 @@ private:
|
||||
std::optional<int> mRemainingWorkInterval;
|
||||
|
||||
app_settings::config mAppConfig;
|
||||
int mPostponeCount;
|
||||
int mPostponeCount = 0;
|
||||
|
||||
// Time when idle was started
|
||||
std::optional<std::chrono::steady_clock::time_point> mIdleStart;
|
||||
|
||||
int mLastIdleMilliseconds;
|
||||
int mLastIdleMilliseconds = 0;
|
||||
|
||||
AppState mState = AppState::None;
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
QT += core gui svg multimedia
|
||||
QT += core gui svg multimedia widgets dbus
|
||||
|
||||
CONFIG += debug_and_release
|
||||
CONFIG += debug_and_release console
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus
|
||||
|
||||
CONFIG += c++17 lrelease embed_translations
|
||||
|
||||
@ -55,9 +54,8 @@ unix:LIBS += -L/usr/X11R6/lib/ \
|
||||
-lX11 -lXext -lXss -ldl
|
||||
|
||||
Debug: DEFINES += DEBUG
|
||||
Release: DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
|
||||
# When using wayland:
|
||||
# unix:LIBS += -L/usr/local/lib \
|
||||
# -lwayland-client-unstable++ -lwayland-client-extra++ -lwayland-client++
|
||||
|
||||
|
||||
|
||||
@ -27,8 +27,8 @@ const QString Primary_Monitor = "[Primary]";
|
||||
|
||||
// Default behavior is not play any audio on break end.
|
||||
const QString Audio_Empty = "None";
|
||||
const QString Audio_Default_1 = "Default 1";
|
||||
const QString Audio_Default_2 = "Default 2";
|
||||
const QString Audio_Retro = "Retro";
|
||||
const QString Audio_Gagarin = "Gagarin";
|
||||
const QString Audio_Custom = "Custom...";
|
||||
|
||||
struct audio_item
|
||||
@ -38,8 +38,8 @@ struct audio_item
|
||||
};
|
||||
|
||||
const std::map<QString, QString> AudioMap {
|
||||
{Audio_Default_1, ":/assets/sound/alarm-retro.wav"},
|
||||
{Audio_Default_2, ":/assets/sound/alarm-poehali.wav"},
|
||||
{Audio_Retro, ":/assets/sound/alarm-retro.wav"},
|
||||
{Audio_Gagarin, ":/assets/sound/alarm-poehali.wav"},
|
||||
};
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ public:
|
||||
selected_audio play_audio;
|
||||
QString script_on_break_finish;
|
||||
|
||||
// Zero means "idle is not tracked"
|
||||
// Zero means "idle is not tracked". Value in seconds.
|
||||
int idle_timeout = Default_Idle_Timeout;
|
||||
};
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ void SettingsDialog::init()
|
||||
ui->mPreferredMonitorCombobox->setCurrentIndex(found_idx);
|
||||
|
||||
// Fill audio combo box
|
||||
auto audios = {Audio_Empty, Audio_Default_1, Audio_Default_2, Audio_Custom};
|
||||
auto audios = {Audio_Empty, Audio_Retro, Audio_Gagarin, Audio_Custom};
|
||||
ui->mAudioComboBox->addItems(audios);
|
||||
mCustomAudioIdx = audios.size() - 1;
|
||||
|
||||
@ -70,7 +70,7 @@ void SettingsDialog::init()
|
||||
connect(ui->mAudioComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onAudioIndexChanged(int)));
|
||||
|
||||
// Idle timeout
|
||||
ui->mIdleTimeoutSpinbox->setValue(c.idle_timeout);
|
||||
ui->mIdleTimeoutSpinbox->setValue(c.idle_timeout / 60);
|
||||
|
||||
mSkipAudioChangeEvent = false;
|
||||
}
|
||||
@ -90,7 +90,7 @@ void SettingsDialog::accept()
|
||||
if (c.play_audio.name == Audio_Custom)
|
||||
c.play_audio.path = mCustomAudioPath;
|
||||
|
||||
c.idle_timeout = ui->mIdleTimeoutSpinbox->value();
|
||||
c.idle_timeout = ui->mIdleTimeoutSpinbox->value() * 60;
|
||||
app_settings::save(c);
|
||||
|
||||
emit accepted();
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Command to run when break finish</string>
|
||||
<string>Shell command to run when break finish</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
12
scripts/build_linux_qt6.sh
Executable file
12
scripts/build_linux_qt6.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# I use this script on two different hosts so there are logic to find proper Qt installation
|
||||
|
||||
export QT_HOME=/home/$USER/tools/qt/6.8.0/gcc_64
|
||||
if [ ! -d "$QT_HOME" ] ; then
|
||||
export QT_HOME=/home/$USER/tools/qt/6.8.0/gcc_64
|
||||
fi
|
||||
|
||||
# Build .appimage
|
||||
/usr/bin/python3 build_qbreak.py release
|
||||
|
||||
12
scripts/build_linux_qt6_debug.sh
Executable file
12
scripts/build_linux_qt6_debug.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# I use this script on two different hosts so there are logic to find proper Qt installation
|
||||
|
||||
export QT_HOME=/home/$USER/tools/qt/6.8.0/gcc_64
|
||||
if [ ! -d "$QT_HOME" ] ; then
|
||||
export QT_HOME=/home/$USER/tools/qt/6.8.0/gcc_64
|
||||
fi
|
||||
|
||||
# Build .appimage
|
||||
/usr/bin/python3 build_qbreak.py debug
|
||||
|
||||
@ -84,7 +84,7 @@ if platform.system() == 'Linux':
|
||||
'-qmake=' + os.environ['QT_HOME'] + '/bin/qmake',
|
||||
'-unsupported-allow-new-glibc',
|
||||
#'-no-translations',
|
||||
'-extra-plugins=iconengines,platformthemes/libqgtk3.so'
|
||||
'-extra-plugins=iconengines,platformthemes/libqgtk3.so,platforms/libqxcb.so'
|
||||
]
|
||||
|
||||
desktop_path = 'appimage_dir/usr/share/applications/qbreak.desktop'
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user