mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-19 06:30:07 +08:00
Check and generate correct autostart entry for AppImage package
This commit is contained in:
parent
3e0762e0b2
commit
7f664b1c48
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user