From 6307689cf1851a398149c64fdb3364b2549235a3 Mon Sep 17 00:00:00 2001 From: arthomnix Date: Wed, 20 Jul 2022 17:03:20 +0100 Subject: [PATCH] NOISSUE Use .command extension for shortcut scripts on macOS This means that the script will run when clicked, instead of being opened in a text editor --- launcher/ui/dialogs/CreateShortcutDialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/launcher/ui/dialogs/CreateShortcutDialog.cpp b/launcher/ui/dialogs/CreateShortcutDialog.cpp index 85397fea..2f8c49cf 100644 --- a/launcher/ui/dialogs/CreateShortcutDialog.cpp +++ b/launcher/ui/dialogs/CreateShortcutDialog.cpp @@ -60,9 +60,12 @@ CreateShortcutDialog::~CreateShortcutDialog() void CreateShortcutDialog::on_shortcutPathBrowse_clicked() { QString linkExtension; -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) linkExtension = ui->createScriptCheckBox->isChecked() ? "sh" : "desktop"; #endif +#ifdef Q_OS_MAC + linkExtension = "command"; +#endif #ifdef Q_OS_WIN linkExtension = ui->createScriptCheckBox->isChecked() ? "bat" : "lnk"; #endif