From c623d5ac8e3814bdd21ccb86c4419c4611c69342 Mon Sep 17 00:00:00 2001 From: Kaede Date: Tue, 28 Nov 2023 02:19:30 +0200 Subject: [PATCH] moment --- .github/workflows/publish-release.yml | 3 +++ Marsey/FileHandler.cs | 4 ++-- SS14.Launcher/Models/Connector.cs | 5 +++-- publish_linux.sh | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index d352561..dd52d71 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '7.0.x' ] steps: - name: Checkout code diff --git a/Marsey/FileHandler.cs b/Marsey/FileHandler.cs index 686a148..14ce85e 100644 --- a/Marsey/FileHandler.cs +++ b/Marsey/FileHandler.cs @@ -61,9 +61,9 @@ public static void LoadExactAssembly(string file, bool subverter) Assembly assembly = Assembly.LoadFrom(file); PatchAssemblyManager.InitAssembly(assembly, subverter); } - catch (FileNotFoundException ex) + catch (FileNotFoundException) { - if (file.EndsWith("Subverter.dll")) return; + if (file.EndsWith("Subverter.dll") && subverter) return; Utility.Log(Utility.LogType.DEBG, $"{file} could not be found"); } catch (PatchAssemblyException ex) diff --git a/SS14.Launcher/Models/Connector.cs b/SS14.Launcher/Models/Connector.cs index d108563..62e4d30 100644 --- a/SS14.Launcher/Models/Connector.cs +++ b/SS14.Launcher/Models/Connector.cs @@ -664,7 +664,7 @@ private static async Task GetLoaderStartInfo() // Fucking stupid since we can clearly just work around it like this... // Thank you, Blaisorblade on Ask Different // https://apple.stackexchange.com/questions/105155/denied-file-read-access-on-file-i-own-and-have-full-r-w-permissions-on - var xattr = Process.Start(new ProcessStartInfo + Process? xattr = Process.Start(new ProcessStartInfo { FileName = "xattr", ArgumentList = {"-d", "com.apple.quarantine", appPath}, @@ -672,6 +672,7 @@ private static async Task GetLoaderStartInfo() RedirectStandardOutput = true }); + if (xattr == null) throw new NotSupportedException("Unsupported platform."); PipeLogOutput(xattr); await xattr.WaitForExitAsync(); @@ -679,7 +680,7 @@ private static async Task GetLoaderStartInfo() return new ProcessStartInfo { FileName = "open", - ArgumentList = {appPath, "--args"}, + ArgumentList = { appPath, "--args" }, }; } else diff --git a/publish_linux.sh b/publish_linux.sh index 8af9a7a..e39ad09 100755 --- a/publish_linux.sh +++ b/publish_linux.sh @@ -8,7 +8,7 @@ cd "$(dirname "$0")" rm -r **/bin bin/publish/Linux rm SS14.Launcher_Linux.zip -dotnet publish SS14.Launcher/SS14.Launcher.csproj /p:FullRelease=True -c Release --no-self-contained -r linux-x64 --framework net7.0 /nologo /p:RobustILLink=true +dotnet publish SS14.Launcher/SS14.Launcher.csproj /p:FullRelease=True -c Release --no-self-contained -r linux-x64 /nologo /p:RobustILLink=true dotnet publish SS14.Loader/SS14.Loader.csproj -c Release --no-self-contained -r linux-x64 /nologo # Create intermediate directories.