mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44: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
|
||||
|
||||
#include <QStandardPaths>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QTextStream>
|
||||
|
||||
#define NEWLINE "\r\n"
|
||||
@@ -174,7 +175,11 @@ void AutoRun_SetEnabled(bool enable) {
|
||||
appCmdList << QApplication::applicationDirPath() + "/launcher"
|
||||
<< "--";
|
||||
} else {
|
||||
appCmdList << QApplication::applicationFilePath();
|
||||
if (QProcessEnvironment::systemEnvironment().contains("APPIMAGE")) {
|
||||
appCmdList << QProcessEnvironment::systemEnvironment().value("APPIMAGE");
|
||||
} else {
|
||||
appCmdList << QApplication::applicationFilePath();
|
||||
}
|
||||
}
|
||||
|
||||
appCmdList << "-tray";
|
||||
|
||||
Reference in New Issue
Block a user