aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs
diff options
context:
space:
mode:
authorAlex0007 <Alex0007lolpvp@gmail.com>2024-01-23 02:10:25 +0400
committerGitHub <noreply@github.com>2024-01-22 23:10:25 +0100
commit34a9922b57b582fb18a670241f7efe43d4723fe7 (patch)
treed1bb89e235a1678487e73be1b3af0a01421e0788 /src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs
parent4df22eb86707005821a5012421a76b308bcc1989 (diff)
Fix architecture preference for MacOS game shortcuts (#6145)1.1.1122
* Fix architecture preference for MacOS game shortcuts * Detect arch and then pass it to script Co-authored-by: jcm <john.moody@coloradocollege.edu> * Remove old script write call in `CreateShortcutMacos` * Turn launch script into EmbeddedResource * Added final newline --------- Co-authored-by: jcm <john.moody@coloradocollege.edu>
Diffstat (limited to 'src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs')
-rw-r--r--src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs b/src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs
index 97b9853d..60b92898 100644
--- a/src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs
+++ b/src/Ryujinx.Ui.Common/Helper/ShortcutHelper.cs
@@ -54,6 +54,7 @@ namespace Ryujinx.Ui.Common.Helper
{
string basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx");
var plistFile = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-template.plist");
+ var shortcutScript = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-launch-script.sh");
// Macos .App folder
string contentFolderPath = Path.Combine("/Applications", cleanedAppName + ".app", "Contents");
string scriptFolderPath = Path.Combine(contentFolderPath, "MacOS");
@@ -68,8 +69,7 @@ namespace Ryujinx.Ui.Common.Helper
string scriptPath = Path.Combine(scriptFolderPath, ScriptName);
using StreamWriter scriptFile = new(scriptPath);
- scriptFile.WriteLine("#!/bin/sh");
- scriptFile.WriteLine($"{basePath} {GetArgsString(appFilePath)}");
+ scriptFile.Write(shortcutScript, basePath, GetArgsString(appFilePath));
// Set execute permission
FileInfo fileInfo = new(scriptPath);