release: AppImage build (#547)

This commit is contained in:
TDJ is not adj(Tina)
2023-05-01 14:29:14 +08:00
committed by GitHub
parent ab48df4256
commit 7212c6a64c
6 changed files with 67 additions and 5 deletions

View File

@@ -642,7 +642,9 @@ void MainWindow::on_menu_exit_triggered() {
QDir::setCurrent(QApplication::applicationDirPath());
auto arguments = NekoRay::dataStore->argv;
if (arguments.length() > 0) arguments.removeFirst();
QProcess::startDetached(qEnvironmentVariable("NKR_FROM_LAUNCHER") == "1" ? "./launcher" : QApplication::applicationFilePath(), arguments);
auto isLauncher = qEnvironmentVariable("NKR_FROM_LAUNCHER") == "1";
if (isLauncher) arguments.prepend("--");
QProcess::startDetached(isLauncher ? "./launcher" : QApplication::applicationFilePath(), arguments);
}
tray->hide();
QCoreApplication::quit();