Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added blah
Empty file.
17 changes: 15 additions & 2 deletions source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ public async Task Update()
_manager.OnApplySelfUpdate += OnApplySelfUpdate;
await _manager.PrepareUpdateAsync(_targetVersion, new Progress<double>(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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<UseWPF>true</UseWPF>
<AssemblyName>Reloaded-II</AssemblyName>
<RootNamespace>Reloaded.Mod.Launcher</RootNamespace>
<Version>1.30.1</Version>
<Version>1.29.99</Version>
<Copyright>Sewer56 ~ $([System.DateTime]::UtcNow.ToString("s")) | $(Version)</Copyright>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<ApplicationIcon>appicon.ico</ApplicationIcon>
Expand Down
2 changes: 1 addition & 1 deletion source/Reloaded.Mod.Loader/Reloaded.Mod.Loader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);NU1605;NU1701</NoWarn>
<Version>1.30.1</Version>
<Version>1.29.99</Version>
<CETCompat>false</CETCompat>
<Platforms>x86;x64</Platforms>
<GenerateDepsJson>false</GenerateDepsJson>
Expand Down
Loading