diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml new file mode 100644 index 0000000..3ba8790 --- /dev/null +++ b/.github/workflows/build-installer.yml @@ -0,0 +1,41 @@ +name: Build installer + +on: + workflow_dispatch: + workflow_call: + pull_request: + push: + branches: [main] + +jobs: + installer: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build one-file installer + shell: powershell + run: | + $csc = 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe' + if (-not (Test-Path -LiteralPath $csc -PathType Leaf)) { + throw "Missing $csc" + } + .\Build-OneFileInstaller.ps1 + + - name: Record installer hash + shell: powershell + run: | + $path = 'dist\ScrapMechanicVR-Installer.exe' + $hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $path).Hash + Write-Host "Built $path" + Write-Host "SHA256 $hash" + "INSTALLER_SHA256=$hash" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "INSTALLER_SIZE=$((Get-Item -LiteralPath $path).Length)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + + - name: Upload installer + uses: actions/upload-artifact@v4 + with: + name: ScrapMechanicVR-Installer + path: dist/ScrapMechanicVR-Installer.exe + if-no-files-found: error diff --git a/BUILD.md b/BUILD.md index 87c6d8c..3aecf20 100644 --- a/BUILD.md +++ b/BUILD.md @@ -36,7 +36,7 @@ Only use the payload with the exact executable hash documented in `README.md`. D .\Build-OneFileInstaller.ps1 ``` -The public artifact is `dist/ScrapMechanicVR-Installer.exe`. It validates its embedded patcher, manifest, native add-on, branded UI assets, soundtrack, and all 29 managed payload files before installation. It discovers Steam and the active 64-bit OpenXR runtime, rejects unsupported game builds, backs up original files, and supports verify, repair/restore, and uninstall. +The public artifact is `dist/ScrapMechanicVR-Installer.exe`. Build it only with Windows PowerShell and `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe` (`Build-OneFileInstaller.ps1`). A Linux/Mono `mcs` binary is a different PE layout; Windows Defender has already flagged one of those as `Trojan:Win32/Wacatac.B!ml`. Current version: `1.1.3-chapter2-20260830` diff --git a/README.md b/README.md index a057201..98c74fd 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Native OpenXR VR for the current Scrap Mechanic Chapter 2 / 1.0 release, made by ## Easy installation 1. Close Scrap Mechanic. -2. Download and run **[ScrapMechanicVR-Installer.exe](https://github.com/21Suspect/Scrap-Mechanic-Native-VR/raw/refs/heads/main/dist/ScrapMechanicVR-Installer.exe)**. +2. Download and run **[ScrapMechanicVR-Installer.exe](https://github.com/21Suspect/Scrap-Mechanic-Native-VR/releases/latest)** from the latest GitHub release. 3. Click **Install VR Mod** and approve the administrator prompt. 4. Connect Quest Link, then use the new **Start Scrap Mechanic VR - Chapter 2** shortcut. diff --git a/SHA256SUMS.txt b/SHA256SUMS.txt index 58f1b13..4bed355 100644 --- a/SHA256SUMS.txt +++ b/SHA256SUMS.txt @@ -29,4 +29,4 @@ CB4660ED8682415453F943FC819B5AAA50D18823B19E520452484CFC05709AA5 payload/Surviv 84D53F1D1C178814E374AD1350D6F91F788281AC1D920CB75428732A2F6AF779 payload/Survival/Scripts/game/tools/ScrapPotatoRifle.lua A5556E9F301932868048C0F19DA3330C1BEB1892A8A503B824120BEFE658E627 payload/Survival/Scripts/game/tools/PotatoLauncher.lua 719377C00F5DD91661DB3D53E025ADDDB317D70CFAD449824545A6AF414F7F19 payload/Survival/Scripts/game/tools/ClayRifle.lua -42CD4356B0D5C6CBAFE5101B3B273963CD94715A55DFC8A68EFF191BBDBF0E9B dist/ScrapMechanicVR-Installer.exe +6D85B554F5F4B37B7381D2F5EB5F4A165BC1ABF0854C1C9DE5E5F2D657B76F59 dist/ScrapMechanicVR-Installer.exe diff --git a/dist/ScrapMechanicVR-Installer.exe b/dist/ScrapMechanicVR-Installer.exe index 5533d3b..8eb7e7f 100755 Binary files a/dist/ScrapMechanicVR-Installer.exe and b/dist/ScrapMechanicVR-Installer.exe differ diff --git a/installer/Program.cs b/installer/Program.cs index a57ba39..c1a73a0 100644 --- a/installer/Program.cs +++ b/installer/Program.cs @@ -873,7 +873,7 @@ private void SetBusy(bool busy) private void Append(string text) { - details.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] " + text.TrimEnd() + Environment.NewLine); + details.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] " + text.TrimEnd(new char[0]) + Environment.NewLine); details.SelectionStart = details.TextLength; details.ScrollToCaret(); }