From c87cf81aa9b72ee67dafe2eeda0f5c4a13fb5c1e Mon Sep 17 00:00:00 2001 From: Nils <34674720+nils-kt@users.noreply.github.com> Date: Mon, 4 May 2026 21:45:03 +0200 Subject: [PATCH] Add Windows installer (Inno Setup) --- .github/workflows/release.yml | 21 +++++++++-- installer/installer.iss | 65 +++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 installer/installer.iss diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4558366..ecc50bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,7 +120,7 @@ jobs: -DPLUGIN_VERSION_OVERRIDE="${{ steps.version.outputs.version }}" cmake --build build --config RelWithDebInfo - - name: Package + - name: Package ZIP shell: powershell run: | $ver = "${{ steps.version.outputs.version }}" @@ -130,11 +130,21 @@ jobs: Copy-Item "build/st-pluginmanager.dll" "$dir/obs-plugins/64bit/" Compress-Archive -Path "$dir/*" -DestinationPath "release/st-pluginmanager-$ver-windows-x64.zip" + - name: Build installer + shell: powershell + run: | + choco install innosetup -y --no-progress | Out-Null + $ver = "${{ steps.version.outputs.version }}" + & "C:\Program Files (x86)\Inno Setup 6\iscc.exe" ` + /DMyAppVersion=$ver installer/installer.iss + - name: Upload artifacts uses: actions/upload-artifact@v6 with: name: windows-release - path: release/* + path: | + release/* + installer/release/* build-linux: runs-on: ubuntu-24.04 @@ -240,7 +250,12 @@ jobs: body: | ## Installation - ### Windows + ### Windows (Installer — recommended) + 1. Download **`st-pluginmanager-${{ steps.version.outputs.version }}-windows-installer.exe`** + 2. Run the installer — it auto-detects your OBS installation + 3. Restart OBS + + ### Windows (Manual) 1. Download **`st-pluginmanager-${{ steps.version.outputs.version }}-windows-x64.zip`** 2. Extract into your OBS Studio folder (e.g. `C:\Program Files\obs-studio\`) 3. Restart OBS diff --git a/installer/installer.iss b/installer/installer.iss new file mode 100644 index 0000000..82432b2 --- /dev/null +++ b/installer/installer.iss @@ -0,0 +1,65 @@ +#ifndef MyAppVersion + #define MyAppVersion "dev" +#endif + +#define MyAppName "stools Plugin Manager" +#define MyAppPublisher "stools.cc" +#define MyAppURL "https://stools.cc" + +[Setup] +AppId={{F7A2C8E1-9B34-4D56-A1E3-7C8F5D2B0A91} +AppName={#MyAppName} (OBS Plugin) +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +DefaultDirName={code:GetOBSDir} +DirExistsWarning=no +DisableProgramGroupPage=yes +OutputDir=release +OutputBaseFilename=st-pluginmanager-{#MyAppVersion}-windows-installer +Compression=lzma2 +SolidCompression=yes +WizardStyle=modern +ArchitecturesAllowed=x64os +ArchitecturesInstallIn64BitMode=x64os +PrivilegesRequired=admin +UninstallDisplayName={#MyAppName} (OBS Plugin) +SourceDir=.. + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "german"; MessagesFile: "compiler:Languages\German.isl" + +[Files] +Source: "build\st-pluginmanager.dll"; DestDir: "{app}\obs-plugins\64bit"; Flags: ignoreversion + +[UninstallDelete] +Type: files; Name: "{app}\obs-plugins\64bit\st-pluginmanager.dll" +Type: files; Name: "{app}\obs-plugins\64bit\.st-pluginmanager.version" + +[Messages] +english.WelcomeLabel2=This will install the {#MyAppName} plugin for OBS Studio.%n%nPlease close OBS Studio before continuing. +german.WelcomeLabel2=Dies installiert das {#MyAppName} Plugin f%C3%BCr OBS Studio.%n%nBitte schlie%C3%9Fe OBS Studio vor der Installation. + +[Code] +function GetOBSDir(Param: String): String; +var + Path: String; +begin + if RegQueryStringValue(HKLM, 'SOFTWARE\OBS Studio', '', Path) then + Result := Path + else + Result := ExpandConstant('{autopf}\obs-studio'); +end; + +procedure CurStepChanged(CurStep: TSetupStep); +begin + if CurStep = ssInstall then + begin + if FindWindowByClassName('OBSMainWindow') <> 0 then + begin + MsgBox('OBS Studio is currently running. Please close it before continuing.', mbError, MB_OK); + Abort; + end; + end; +end;