Build Spyro 2 client
This commit is contained in:
31
files/scripts/build-spyro2-client.sh
Normal file
31
files/scripts/build-spyro2-client.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
apt-get update
|
||||
apt-get -y install git
|
||||
|
||||
dotnet workload update
|
||||
|
||||
mkdir -p /app
|
||||
cd /app
|
||||
|
||||
git clone https://github.com/Uroogla/Archipelago.Core.git
|
||||
|
||||
cd Archipelago.Core
|
||||
|
||||
git checkout 175b5dafb6904332b6cc6e63ba88c3cb98a9924c
|
||||
|
||||
cd ../
|
||||
|
||||
git clone https://github.com/Uroogla/S2AP.git
|
||||
|
||||
cd S2AP
|
||||
|
||||
git checkout 59026d87e2865a1bbe85ff5f1c3f5d6dfa62e1a7
|
||||
|
||||
git apply ../linux-support.patch
|
||||
|
||||
dotnet publish -f net8.0 -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true source/S2AP.Desktop/S2AP.Desktop.csproj
|
||||
|
||||
ls source/S2AP.Desktop/bin/Release/net8.0/linux-x64/publish/
|
||||
26
files/spyro2-client-patch/linux-support.patch
Normal file
26
files/spyro2-client-patch/linux-support.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/source/S2AP/App.axaml.cs b/source/S2AP/App.axaml.cs
|
||||
index 609ebb9..77ba22d 100644
|
||||
--- a/source/S2AP/App.axaml.cs
|
||||
+++ b/source/S2AP/App.axaml.cs
|
||||
@@ -18,6 +18,7 @@ using ReactiveUI;
|
||||
using S2AP.Models;
|
||||
using Serilog;
|
||||
using System;
|
||||
+using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reactive.Concurrency;
|
||||
@@ -52,9 +53,10 @@ public partial class App : Application
|
||||
}
|
||||
private static bool IsRunningAsAdministrator()
|
||||
{
|
||||
- var identity = WindowsIdentity.GetCurrent();
|
||||
- var principal = new WindowsPrincipal(identity);
|
||||
- return principal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
+ return geteuid() == 0;
|
||||
+
|
||||
+ [DllImport("libc")]
|
||||
+ static extern uint geteuid();
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
Reference in New Issue
Block a user