Skip to content

feat: migrate Windows build scripts from client-building to PowerShell in admin/win#9871

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/convert-batch-scripts-to-powershell
Draft

feat: migrate Windows build scripts from client-building to PowerShell in admin/win#9871
Copilot wants to merge 3 commits intomasterfrom
copilot/convert-batch-scripts-to-powershell

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

Ports the Windows build pipeline from the external nextcloud/client-building batch scripts into this repository as PowerShell, living in admin/win/build/. Also converts admin/win/msi/make-msi.bat.in to PowerShell.

Changes

admin/win/build/ — new PowerShell build pipeline

File Replaces Role
common.ps1 common.inc.bat / datetime.inc.bat Dot-sourced library: env helpers, Invoke-NativeCommand, Invoke-VsDevShell, Invoke-Sign, Invoke-Upload, Write-BuildStep
defaults.ps1 defaults.inc.bat Dot-sourced defaults; each variable is a no-op if already set in the environment
init.ps1 init.bat One-time workspace clone + directory creation
build.ps1 build.bat Orchestrator: desktop → collect → MSI
build-desktop.ps1 build-desktop.bat + single-build-desktop.bat CMake configure/build/install + windeployqt, iterates over BUILD_TARGETS
build-installer-collect.ps1 build-installer-collect.bat + single variant File staging, Qt/OpenSSL/VC Redist copy, optional binary signing
build-installer-msi.ps1 build-installer-msi.bat + single variant Calls make-msi.ps1, signs + moves + uploads the MSI
sign.ps1 sign.bat Standalone entry point for Invoke-Sign
upload.ps1 upload.bat Standalone entry point for Invoke-Upload
task-build-log.ps1 task-build-log.bat Task Scheduler wrapper using Start-Transcript; exits with build exit code
README.md (new) Prerequisites, env-var reference, signing/upload setup, scheduled-build guide, migration table

NSIS installer workflow is intentionally not carried forward; MSI is the sole Windows installer format.

admin/win/msi/make-msi.ps1.in — new

Direct PowerShell port of make-msi.bat.in. Replaces !LF! / setlocal EnableDelayedExpansion tricks with clean loops and [System.Guid]::NewGuid() instead of uuidgen.

admin/win/msi/CMakeLists.txt — updated

Switches configure_file target from make-msi.bat.inmake-msi.ps1.in and updates the install(FILES …) list accordingly.

Notes

  • All environment variable names are unchanged — no CI variable config changes needed.
  • TEST_RUN=1 dry-run mode is preserved across all scripts.
  • No GitHub workflow files are modified; this is a local/scheduled-build change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants