add macos support for shortcuts

Signed-off-by: sshcrack <34072808+sshcrack@users.noreply.github.com>
This commit is contained in:
sshcrack
2024-12-07 19:43:09 +01:00
parent 7c60f375f3
commit 8bb35f5b0b
2 changed files with 13 additions and 10 deletions

View File

@ -931,16 +931,7 @@ bool createShortcut(QString destination, QString target, QStringList args, QStri
return false;
}
#if defined(Q_OS_MACOS)
// Create the Application
QDir applicationDirectory =
QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/" + BuildConfig.LAUNCHER_NAME + " Instances/";
if (!applicationDirectory.mkpath(".")) {
qWarning() << "Couldn't create application directory";
return false;
}
QDir application = applicationDirectory.path() + "/" + name + ".app/";
QDir application = destination + ".app/";
if (application.exists()) {
qWarning() << "Application already exists!";