From 9911c41a35e6d4949f6fcd2f39b8cb46b99867a4 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Thu, 28 May 2026 16:36:06 +0200 Subject: [PATCH] Split advanced-scene-switcher-*-windows-x64.zip One zip archive for the ProgramData path. Another zip archive for the legacy Program Files path. Requested in: https://github.com/WarmUpTill/SceneSwitcher/discussions/1628 --- .github/scripts/Package-Windows.ps1 | 71 +++++++++++++++----------- build-aux/CI/windows/README-legacy.txt | 23 +++++++++ build-aux/CI/windows/README.txt | 28 +++------- 3 files changed, 69 insertions(+), 53 deletions(-) create mode 100644 build-aux/CI/windows/README-legacy.txt diff --git a/.github/scripts/Package-Windows.ps1 b/.github/scripts/Package-Windows.ps1 index 55ae3688..792e5a52 100644 --- a/.github/scripts/Package-Windows.ps1 +++ b/.github/scripts/Package-Windows.ps1 @@ -68,44 +68,53 @@ function Package { Remove-Item @RemoveArgs - # Build a staging directory with two subfolders: - # recommended/ - new layout, extract to %ProgramData%\obs-studio\ - # legacy/ - old layout, extract to the OBS install directory - $ReleasePath = "${ProjectRoot}/release/${Configuration}" - $StagingPath = "${ProjectRoot}/release/zip-staging" - $NewBinPath = "${ReleasePath}/${ProductName}/bin/64bit" - $NewDataPath = "${ReleasePath}/${ProductName}/data" - - Remove-Item -Path $StagingPath -Recurse -Force -ErrorAction SilentlyContinue - New-Item -ItemType Directory -Force -Path $StagingPath | Out-Null - Copy-Item -Path "${ProjectRoot}/build-aux/CI/windows/README.txt" -Destination "${StagingPath}/README.txt" + $ReleasePath = "${ProjectRoot}/release/${Configuration}" + $NewBinPath = "${ReleasePath}/${ProductName}/bin/64bit" + $NewDataPath = "${ReleasePath}/${ProductName}/data" + $CIWindowsDir = "${ProjectRoot}/build-aux/CI/windows" + # --- Recommended zip (new layout, extract to %ProgramData%\obs-studio\) --- + Log-Group "Archiving ${ProductName} (recommended)..." + $RecStaging = "${ProjectRoot}/release/zip-staging-rec" + Remove-Item -Path $RecStaging -Recurse -Force -ErrorAction SilentlyContinue + New-Item -ItemType Directory -Force -Path $RecStaging | Out-Null + Copy-Item -Path "${CIWindowsDir}/README.txt" -Destination "${RecStaging}/README.txt" if ( Test-Path -Path $NewBinPath ) { - $RecBinPath = "${StagingPath}/recommended/${ProductName}/bin/64bit" - $LegacyBinPath = "${StagingPath}/legacy/obs-plugins/64bit" - New-Item -ItemType Directory -Force -Path $RecBinPath | Out-Null - New-Item -ItemType Directory -Force -Path $LegacyBinPath | Out-Null - Copy-Item -Path "${NewBinPath}/*" -Destination $RecBinPath -Recurse -Force - Copy-Item -Path "${NewBinPath}/*" -Destination $LegacyBinPath -Recurse -Force + $RecBinPath = "${RecStaging}/${ProductName}/bin/64bit" + New-Item -ItemType Directory -Force -Path $RecBinPath | Out-Null + Copy-Item -Path "${NewBinPath}/*" -Destination $RecBinPath -Recurse -Force } if ( Test-Path -Path $NewDataPath ) { - $RecDataPath = "${StagingPath}/recommended/${ProductName}/data" - $LegacyDataPath = "${StagingPath}/legacy/data/obs-plugins/${ProductName}" - New-Item -ItemType Directory -Force -Path $RecDataPath | Out-Null - New-Item -ItemType Directory -Force -Path $LegacyDataPath | Out-Null - Copy-Item -Path "${NewDataPath}/*" -Destination $RecDataPath -Recurse -Force - Copy-Item -Path "${NewDataPath}/*" -Destination $LegacyDataPath -Recurse -Force + $RecDataPath = "${RecStaging}/${ProductName}/data" + New-Item -ItemType Directory -Force -Path $RecDataPath | Out-Null + Copy-Item -Path "${NewDataPath}/*" -Destination $RecDataPath -Recurse -Force } + Compress-Archive -Force -Path (Get-ChildItem -Path $RecStaging) ` + -CompressionLevel Optimal ` + -DestinationPath "${ProjectRoot}/release/${OutputName}.zip" + Remove-Item -Path $RecStaging -Recurse -Force + Log-Group - Log-Group "Archiving ${ProductName}..." - $CompressArgs = @{ - Path = (Get-ChildItem -Path $StagingPath) - CompressionLevel = 'Optimal' - DestinationPath = "${ProjectRoot}/release/${OutputName}.zip" - Verbose = ($null -ne $Env:CI) + # --- Legacy zip (old layout, extract to OBS install directory) --- + Log-Group "Archiving ${ProductName} (legacy)..." + $LegStaging = "${ProjectRoot}/release/zip-staging-leg" + Remove-Item -Path $LegStaging -Recurse -Force -ErrorAction SilentlyContinue + New-Item -ItemType Directory -Force -Path $LegStaging | Out-Null + Copy-Item -Path "${CIWindowsDir}/README-legacy.txt" -Destination "${LegStaging}/README.txt" + if ( Test-Path -Path $NewBinPath ) { + $LegBinPath = "${LegStaging}/obs-plugins/64bit" + New-Item -ItemType Directory -Force -Path $LegBinPath | Out-Null + Copy-Item -Path "${NewBinPath}/*" -Destination $LegBinPath -Recurse -Force } - Compress-Archive -Force @CompressArgs - Remove-Item -Path $StagingPath -Recurse -Force + if ( Test-Path -Path $NewDataPath ) { + $LegDataPath = "${LegStaging}/data/obs-plugins/${ProductName}" + New-Item -ItemType Directory -Force -Path $LegDataPath | Out-Null + Copy-Item -Path "${NewDataPath}/*" -Destination $LegDataPath -Recurse -Force + } + Compress-Archive -Force -Path (Get-ChildItem -Path $LegStaging) ` + -CompressionLevel Optimal ` + -DestinationPath "${ProjectRoot}/release/${OutputName}-legacy.zip" + Remove-Item -Path $LegStaging -Recurse -Force Log-Group if ( ( $BuildInstaller ) ) { diff --git a/build-aux/CI/windows/README-legacy.txt b/build-aux/CI/windows/README-legacy.txt new file mode 100644 index 00000000..9c27953f --- /dev/null +++ b/build-aux/CI/windows/README-legacy.txt @@ -0,0 +1,23 @@ +Advanced Scene Switcher - Windows Installation (Legacy) +======================================================== + +For full installation instructions visit: +https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation + + +This archive uses the legacy plugin layout for older OBS versions, +portable OBS installs, and Steam. + +Extract the CONTENTS of this archive into your OBS installation directory, +typically: + + C:\Program Files\obs-studio\ + +Merge the data\ and obs-plugins\ folders with the existing ones when prompted. + +Steam users: right-click OBS in your library -> Manage -> Browse local files, +then extract the contents of this archive into that directory. + + +For OBS 28 and newer the recommended archive is preferred: + advanced-scene-switcher--windows-x64.zip diff --git a/build-aux/CI/windows/README.txt b/build-aux/CI/windows/README.txt index 4a6a859f..a0f5fdaa 100644 --- a/build-aux/CI/windows/README.txt +++ b/build-aux/CI/windows/README.txt @@ -1,22 +1,15 @@ Advanced Scene Switcher - Windows Installation -============================================== +=============================================== For full installation instructions visit: https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation -Quick guide ------------ +This archive uses the recommended plugin layout for OBS 28 and newer. -This archive contains two installation methods. -Choose ONE depending on your OBS version. +Extract the CONTENTS of this archive into: - -recommended\ (preferred) ---------------------------------------------- -Extract the CONTENTS of this folder into: - - C:\ProgramData\obs-studio\ + C:\ProgramData\obs-studio\plugins\ Tip: press Win+R and type %ProgramData%\obs-studio\plugins to open that folder. @@ -24,14 +17,5 @@ After extracting, the path should look like: C:\ProgramData\obs-studio\plugins\advanced-scene-switcher\bin\64bit\advanced-scene-switcher.dll -legacy\ (older OBS versions, portable OBS installs, or if the recommended method does not work) ---------------------------------------------------------------------------- -Extract the CONTENTS of this folder into your OBS installation directory, -typically: - - C:\Program Files\obs-studio\ - -Merge the data\ and obs-plugins\ folders with the existing ones when prompted. - -Steam users: right-click OBS in your library -> Manage -> Browse local files, -then extract the contents of legacy\ into that directory. \ No newline at end of file +If the plugin does not appear in OBS, try the legacy archive instead: + advanced-scene-switcher--windows-x64-legacy.zip