mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
Check and generate correct autostart entry for AppImage package
This commit is contained in:
@@ -146,6 +146,7 @@ bool AutoRun_IsEnabled() {
|
|||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
|
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
#include <QProcessEnvironment>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
#define NEWLINE "\r\n"
|
#define NEWLINE "\r\n"
|
||||||
@@ -174,7 +175,11 @@ void AutoRun_SetEnabled(bool enable) {
|
|||||||
appCmdList << QApplication::applicationDirPath() + "/launcher"
|
appCmdList << QApplication::applicationDirPath() + "/launcher"
|
||||||
<< "--";
|
<< "--";
|
||||||
} else {
|
} else {
|
||||||
appCmdList << QApplication::applicationFilePath();
|
if (QProcessEnvironment::systemEnvironment().contains("APPIMAGE")) {
|
||||||
|
appCmdList << QProcessEnvironment::systemEnvironment().value("APPIMAGE");
|
||||||
|
} else {
|
||||||
|
appCmdList << QApplication::applicationFilePath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appCmdList << "-tray";
|
appCmdList << "-tray";
|
||||||
|
|||||||
Reference in New Issue
Block a user