From 346276944a4cbbfb7545574428df4b4d43196c79 Mon Sep 17 00:00:00 2001 From: Gent Semaj Date: Thu, 9 Jul 2026 16:13:38 -0700 Subject: [PATCH 1/2] Add Windows ARM64 build script --- .github/workflows/build-all.yml | 3 +++ build_win-arm64.bat | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 build_win-arm64.bat diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 15b0763..67f6ae7 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -31,6 +31,9 @@ jobs: - flavor: win-x64 os: windows-latest script: build_win-x64.bat + - flavor: win-arm64 + os: windows-latest + script: build_win-arm64.bat steps: - name: Checkout uses: actions/checkout@v6 diff --git a/build_win-arm64.bat b/build_win-arm64.bat new file mode 100644 index 0000000..7f6eb9d --- /dev/null +++ b/build_win-arm64.bat @@ -0,0 +1,19 @@ +@echo off +setlocal enabledelayedexpansion + +if "%~1"=="" ( + echo Version number is required. + echo Usage: build.bat [version] [extra_args...] + exit /b 1 +) + +set "version=%~1" + +echo. +echo Compiling Launcher with dotnet... +echo %~dp0publish +dotnet publish .\src\Launcher.slnx -c Release --no-self-contained -r win-arm64 --property:PublishDir="%~dp0publish" + +echo. +echo Building Velopack Release v%version% +vpk pack --packTitle "OSFR Launcher" --packAuthors "OSFR Team" -u OSFRLauncher -e Launcher.exe -o "%~dp0releases" -p "%~dp0publish" -i "%~dp0publish\App.ico" -f net10-arm64-desktop -v %* \ No newline at end of file From 001d1600362df4906a7ddbffe9725bb530beb4a7 Mon Sep 17 00:00:00 2001 From: Gent Semaj Date: Thu, 9 Jul 2026 16:52:46 -0700 Subject: [PATCH 2/2] Fix bad Dx9 check --- src/Launcher/Helpers/Dx9Helper.cs | 31 ++++++++++++------------------ src/Launcher/Helpers/WineHelper.cs | 5 +++++ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/Launcher/Helpers/Dx9Helper.cs b/src/Launcher/Helpers/Dx9Helper.cs index d70454a..645b41c 100644 --- a/src/Launcher/Helpers/Dx9Helper.cs +++ b/src/Launcher/Helpers/Dx9Helper.cs @@ -12,35 +12,28 @@ public static bool IsInstalled() { try { - string? systemPath = null; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || + RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { - string winDir = Environment.GetFolderPath(Environment.SpecialFolder.Windows); - systemPath = Path.Combine(winDir, "System32"); + // Wine uses wined3d which it ships with, not native DirectX DLLs + return WineHelper.IsInstalled(); } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || - RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - if (string.IsNullOrEmpty(WineHelper.GetPath())) - return false; - - var winePrefix = Environment.GetEnvironmentVariable("WINEPREFIX") ?? - Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".wine"); - systemPath = Path.Combine(winePrefix, "drive_c", "windows", "system32"); - } - else + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { + // Unknown platform return false; } - if (!Directory.Exists(systemPath)) - return false; + string winDir = Environment.GetFolderPath(Environment.SpecialFolder.Windows); + + // The game client is 32-bit, so its DLLs are loaded from SysWOW64 on 64-bit Windows. + // Since the launcher is 64-bit only, this is the dir we need to check; not System32 + string sysWow64Path = Path.Combine(winDir, "SysWOW64"); foreach (var requiredDll in RequiredDlls) { - if (!File.Exists(Path.Combine(systemPath, requiredDll))) + if (!File.Exists(Path.Combine(sysWow64Path, requiredDll))) return false; } } diff --git a/src/Launcher/Helpers/WineHelper.cs b/src/Launcher/Helpers/WineHelper.cs index 708a46a..bef10c0 100644 --- a/src/Launcher/Helpers/WineHelper.cs +++ b/src/Launcher/Helpers/WineHelper.cs @@ -36,4 +36,9 @@ public static string GetPath() return string.Empty; } + + public static bool IsInstalled() + { + return !string.IsNullOrEmpty(GetPath()); + } } \ No newline at end of file