Mac: attempt 2
- create .command files instead of .sh - fix shortcuts not working if path to Prism Launcher contains spaces - fix path to executable in shortcutss - add check for running from extracted folder (prevents creating shortcuts) Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
This commit is contained in:
@ -343,7 +343,7 @@ QString getDesktopDir()
|
||||
bool createShortcut(QString destination, QString target, QStringList args, QString name, QString icon)
|
||||
{
|
||||
#if defined(Q_OS_MACOS)
|
||||
destination += ".sh";
|
||||
destination += ".command";
|
||||
|
||||
QFile f(destination);
|
||||
f.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
@ -355,8 +355,9 @@ bool createShortcut(QString destination, QString target, QStringList args, QStri
|
||||
|
||||
stream << "#!/bin/bash"
|
||||
<< "\n";
|
||||
stream << target
|
||||
<< " "
|
||||
stream << "\""
|
||||
<< target
|
||||
<< "\" "
|
||||
<< argstring
|
||||
<< "\n";
|
||||
|
||||
|
Reference in New Issue
Block a user