From 044a22bec85120c3516110c381e7c4279517cacf Mon Sep 17 00:00:00 2001 From: "Dario P." <83188092+donishki@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:56:48 +0200 Subject: [PATCH] Add 32-bit portable and installer build support --- README.md | 10 +++++++--- README.txt | 5 +++-- installer/Build-Installer.ps1 | 8 ++++---- installer/Orbit.iss | 30 +++++++++++++++++++++++------- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8a1b5d2..e54b0de 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,13 @@ A portable C# / WPF website launcher for Windows. ## Run -Choose a Windows x64 download from [Releases](https://github.com/donishki/orbit/releases/latest): +Choose a Windows x64 (64-bit) or x86 (32-bit) download from [Releases](https://github.com/donishki/orbit/releases/latest): - **Orbit-Setup-win-x64.exe**: installs Orbit for your Windows account, adds a Start menu shortcut, and offers an optional desktop shortcut. Remove it through Windows Settings > Apps. - **Orbit-Portable-win-x64.zip**: extract and run `Orbit.exe`, without installing. +- **Orbit-Setup-win-x86.exe** / **Orbit-Portable-win-x86.zip**: the equivalent 32-bit versions. -Both include .NET and support 64-bit Windows 10 or Windows 11. The installer defaults to `%LOCALAPPDATA%\Programs\Orbit`, requires no administrator password, and preserves links and settings during upgrades and uninstall. Installed and portable copies share the same settings for your account. +All packages include .NET. Use x64 for 64-bit Windows 10/11, or x86 for 32-bit Windows 10 (also runnable on 64-bit Windows). The installer defaults to `%LOCALAPPDATA%\Programs\Orbit`, requires no administrator password, and preserves links and settings during upgrades and uninstall. The x86 installer uses `%LOCALAPPDATA%\Programs\Orbit-x86` and labels shortcuts “Orbit (32-bit)” so both architectures can coexist. Installed and portable copies share the same settings for your account. ## Settings @@ -50,16 +51,19 @@ Requires Windows and the .NET 8 SDK. dotnet publish Orbit.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -o release ``` +For the 32-bit portable build, replace `win-x64` with `win-x86` and use a separate output directory. + ### Build the installer Install Inno Setup 7, then run: ```powershell ./installer/Build-Installer.ps1 +./installer/Build-Installer.ps1 -Architecture x86 ``` Use `-IsccPath` for a compiler installed elsewhere. The output is -`release/Orbit-Setup-win-x64.exe`. The installer bundles the runtime as normal +`release/Orbit-Setup-win-x64.exe` or `release/Orbit-Setup-win-x86.exe`. The installer bundles the runtime as normal files so the installed app does not need to extract it on launch. ## Checks diff --git a/README.txt b/README.txt index b616f2b..17341bd 100644 --- a/README.txt +++ b/README.txt @@ -1,9 +1,10 @@ ORBIT 1.1.3 - WEBSITE SHORTCUTS Created by Dario P. -Run Orbit.exe on 64-bit Windows 10 or Windows 11. +Run Orbit.exe. Choose x64 for 64-bit Windows 10/11, or x86 for 32-bit +Windows 10. The x86 version also runs on 64-bit Windows. The portable version needs no installer or separate .NET installation. -Alternatively, run Orbit-Setup-win-x64.exe to install Orbit for your Windows +Alternatively, run Orbit-Setup-win-x64.exe or Orbit-Setup-win-x86.exe to install Orbit for your Windows account with a Start menu shortcut and optional desktop shortcut. Uninstall through Windows Settings > Apps. Saved links and settings are preserved. diff --git a/installer/Build-Installer.ps1 b/installer/Build-Installer.ps1 index dbee1a2..6b2f0af 100644 --- a/installer/Build-Installer.ps1 +++ b/installer/Build-Installer.ps1 @@ -1,12 +1,12 @@ -param([string]$IsccPath = "${env:ProgramFiles(x86)}\Inno Setup 7\ISCC.exe") +param([ValidateSet("x64", "x86")][string]$Architecture = "x64", [string]$IsccPath = "${env:ProgramFiles(x86)}\Inno Setup 7\ISCC.exe") $ErrorActionPreference = 'Stop' $projectRoot = Split-Path $PSScriptRoot -Parent if (!(Test-Path -LiteralPath $IsccPath)) { throw "Inno Setup compiler not found. Supply -IsccPath with the path to ISCC.exe." } Push-Location $projectRoot try { - dotnet publish Orbit.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=false -p:DebugType=None -p:DebugSymbols=false -o release/installer-payload + dotnet publish Orbit.csproj -c Release -r "win-$Architecture" --self-contained true -p:PublishSingleFile=false -p:DebugType=None -p:DebugSymbols=false -o "release/installer-payload-$Architecture" if ($LASTEXITCODE -ne 0) { throw 'Publish failed.' } - Copy-Item README.txt release/installer-payload/README.txt - & $IsccPath installer/Orbit.iss + Copy-Item README.txt "release/installer-payload-$Architecture/README.txt" + & $IsccPath "/DArch=$Architecture" installer/Orbit.iss if ($LASTEXITCODE -ne 0) { throw 'Installer compilation failed.' } } finally { Pop-Location } diff --git a/installer/Orbit.iss b/installer/Orbit.iss index 41d1615..e06f4c4 100644 --- a/installer/Orbit.iss +++ b/installer/Orbit.iss @@ -1,24 +1,40 @@ -#define AppVersion GetVersionNumbersString("..\release\installer-payload\Orbit.exe") +#ifndef Arch + #define Arch "x64" +#endif +#define Payload "..\release\installer-payload-" + Arch +#define AppVersion GetVersionNumbersString(Payload + "\Orbit.exe") [Setup] +#if Arch == "x86" +AppId={{A2A7C189-843C-4D5F-B2F3-05A80A936C95} +DefaultDirName={localappdata}\Programs\Orbit-x86 +#define ShortcutName "Orbit (32-bit)" +#else AppId={{60E686D4-296A-41D2-B445-5DDC79FD2A2C} +DefaultDirName={localappdata}\Programs\Orbit +#define ShortcutName "Orbit" +#endif AppName=Orbit AppVersion={#AppVersion} AppPublisher=Dario P. AppPublisherURL=https://github.com/donishki/orbit AppSupportURL=https://github.com/donishki/orbit/issues AppUpdatesURL=https://github.com/donishki/orbit/releases/latest -DefaultDirName={localappdata}\Programs\Orbit DefaultGroupName=Orbit DisableProgramGroupPage=yes PrivilegesRequired=lowest +SetupArchitecture=x86 +#if Arch == "x64" ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible +#else +ArchitecturesAllowed=x86compatible +#endif MinVersion=10.0 OutputDir=..\release -OutputBaseFilename=Orbit-Setup-win-x64 +OutputBaseFilename=Orbit-Setup-win-{#Arch} SetupIconFile=..\app.ico UninstallDisplayIcon={app}\Orbit.exe -UninstallDisplayName=Orbit +UninstallDisplayName={#ShortcutName} WizardStyle=modern Compression=lzma2 SolidCompression=yes @@ -29,11 +45,11 @@ RestartApplications=no Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Shortcuts:"; Flags: unchecked [Files] -Source: "..\release\installer-payload\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#Payload}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] -Name: "{autoprograms}\Orbit"; Filename: "{app}\Orbit.exe"; WorkingDir: "{app}" -Name: "{autodesktop}\Orbit"; Filename: "{app}\Orbit.exe"; WorkingDir: "{app}"; Tasks: desktopicon +Name: "{autoprograms}\{#ShortcutName}"; Filename: "{app}\Orbit.exe"; WorkingDir: "{app}" +Name: "{autodesktop}\{#ShortcutName}"; Filename: "{app}\Orbit.exe"; WorkingDir: "{app}"; Tasks: desktopicon [Run] Filename: "{app}\Orbit.exe"; Description: "Launch Orbit"; Flags: nowait postinstall skipifsilent