diff --git a/blah b/blah new file mode 100644 index 00000000..e69de29b diff --git a/source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs b/source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs index bea51edc..2868f4c6 100644 --- a/source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs +++ b/source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs @@ -149,7 +149,7 @@ private void MakeProtonShortcut(string? userName, string protonTricksSuffix, str """ [Desktop Entry] Name=Reloaded-II ({SUFFIX}) -Exec=bash -ic 'protontricks-launch --appid {APPID} "{NATIVEPATH}"' +Exec=bash -lc 'protontricks-launch --appid {APPID} "{NATIVEPATH}"' Type=Application StartupNotify=true Comment=Reloaded II installation for {SUFFIX} @@ -162,7 +162,20 @@ [Desktop Entry] desktopFile = desktopFile.Replace("{APPID}", Environment.GetEnvironmentVariable("STEAM_APPID")); desktopFile = desktopFile.Replace("{SUFFIX}", protonTricksSuffix); desktopFile = desktopFile.Replace("{RELOADEDFOLDER}", Path.GetDirectoryName(nativeExecutablePath)!); - desktopFile = desktopFile.Replace("{NATIVEPATH}", nativeExecutablePath); + + + var launcherFileName = $"reloaded-launcher-{SanitizeFileName(protonTricksSuffix)}.sh"; + var nativeLauncherPath = Path.Combine(Path.GetDirectoryName(nativeExecutablePath)!, launcherFileName).Replace('\\', '/'); + + var launcherScript = "#!/bin/bash\n" + + "bash -ic 'protontricks-launch --appid {APPID} \"{NATIVEPATH}\"'\n"; + + launcherScript = launcherScript.Replace("{APPID}", Environment.GetEnvironmentVariable("STEAM_APPID")); + launcherScript = launcherScript.Replace("{NATIVEPATH}", nativeExecutablePath); + var shellScriptPath = $@"Z:{nativeLauncherPath}".Replace('\\', '/'); + WriteTextWithDirectory(shellScriptPath, launcherScript); + LinuxTryMarkAsExecutable(shellScriptPath); + desktopFile = desktopFile.Replace("{NATIVEPATH}", nativeLauncherPath); desktopFile = desktopFile.Replace('\\', '/'); shortcutPath = shortcutPath.Replace('\\', '/'); shortcutPath = shortcutPath.Replace(".lnk", ".desktop"); diff --git a/source/Reloaded.Mod.Launcher.Lib/Models/ViewModel/Dialog/ModLoaderUpdateDialogViewModel.cs b/source/Reloaded.Mod.Launcher.Lib/Models/ViewModel/Dialog/ModLoaderUpdateDialogViewModel.cs index 770f95f7..b9b6acee 100644 --- a/source/Reloaded.Mod.Launcher.Lib/Models/ViewModel/Dialog/ModLoaderUpdateDialogViewModel.cs +++ b/source/Reloaded.Mod.Launcher.Lib/Models/ViewModel/Dialog/ModLoaderUpdateDialogViewModel.cs @@ -90,6 +90,10 @@ public async Task Update() _manager.OnApplySelfUpdate += OnApplySelfUpdate; await _manager.PrepareUpdateAsync(_targetVersion, new Progress(d => { Progress = d * 100; })); await _manager.StartUpdateAsync(_targetVersion, new OutOfProcessOptions() { Restart = true }, new UpdateOptions() { CleanupAfterUpdate = true }); + + // 2s wait to handle race issue on low end hardware running on wine + await Task.Delay(2000); + Environment.Exit(0); } } diff --git a/source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj b/source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj index aa073a9f..5b307d31 100644 --- a/source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj +++ b/source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj @@ -7,7 +7,7 @@ true Reloaded-II Reloaded.Mod.Launcher - 1.30.1 + 1.29.99 Sewer56 ~ $([System.DateTime]::UtcNow.ToString("s")) | $(Version) false appicon.ico diff --git a/source/Reloaded.Mod.Loader/Reloaded.Mod.Loader.csproj b/source/Reloaded.Mod.Loader/Reloaded.Mod.Loader.csproj index c7c8971b..edcdbbbb 100644 --- a/source/Reloaded.Mod.Loader/Reloaded.Mod.Loader.csproj +++ b/source/Reloaded.Mod.Loader/Reloaded.Mod.Loader.csproj @@ -14,7 +14,7 @@ true false $(NoWarn);NU1605;NU1701 - 1.30.1 + 1.29.99 false x86;x64 false