Skip to content

feat: migrate Windows build scripts from nextcloud/client-building into admin/win/scripts#9873

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/move-batch-scripts-to-admin-win
Draft

feat: migrate Windows build scripts from nextcloud/client-building into admin/win/scripts#9873
Copilot wants to merge 2 commits intomasterfrom
copilot/move-batch-scripts-to-admin-win

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Summary

Moves the non-obsolete, non-NSIS Windows batch scripts from the separate
nextcloud/client-building repository into this
repository under admin/win/scripts/, so that all build tooling lives alongside the source it
builds.

Traceability

Source script Decision Reason
build-qtkeychain.bat Dropped Self-declares "obsolete"; dependencies handled by KDE Craft
build-zlib.bat Dropped Self-declares "obsolete"; dependencies handled by KDE Craft
build-installer-exe.bat Dropped Calls makensis.exe/nextcloud.nsi — NSIS EXE installer only
nextcloud.nsi Dropped NSIS installer script
NSIS.InstallOptions.ini Dropped NSIS config
init.bat Dropped Clones qtkeychain/zlib/desktop repos — all obsolete when scripts live inside the desktop repo
zip.bat Dropped Not part of MSI pipeline; contains a syntax error
All remaining 14 scripts Kept Non-obsolete, MSI/build/signing/upload pipeline

Changes

New: admin/win/scripts/ (16 scripts + .gitignore + README.md)

Core includes

  • defaults.inc.bat — all environment variable defaults; auto-derives DESKTOP_REPO_PATH from the script's location (3 levels up = repository root); PROJECT_PATH default changed from c:/Nextcloud/client-buildingc:/Nextcloud; PULL_DESKTOP/CHECKOUT_DESKTOP default to 0 (scripts are already inside the repo)
  • common.inc.bat — per-architecture Craft/Qt paths; adds CRAFT_PATH override guard and a default for EXTRA_DEPLOY_PATH
  • datetime.inc.bat / datetime.inc.callee.sh — locale-independent date helper

Top-level entry points

  • build.bat — main orchestrator; NSIS step removed
  • task-build-log.bat — logging wrapper for Windows Task Scheduler
  • task-build-job.sh — Git Bash entry point for Task Scheduler

Multi-arch loop wrappers

  • build-desktop.bat, build-installer-collect.bat, build-installer-msi.bat

Per-architecture implementation scripts (key path change: MY_REPO now resolves to DESKTOP_REPO_PATH instead of %PROJECT_PATH%/desktop)

  • single-build-desktop.bat
  • single-build-installer-collect.bat
  • single-build-installer-msi.bat

Utilities

  • sign.bat — code signing via signtool.exe
  • upload.bat — SCP upload helper

Housekeeping

  • .gitignore — negates the repo-level build* rule for build*.bat source files in this directory

Documentation

  • README.md — full contributor guide with prerequisites, quick-start, variable reference, script reference, artifact layout, and explicit note that NSIS creation is not included

Behaviour changes relative to client-building

Aspect Before After
DESKTOP_REPO_PATH not set; hard-coded via PROJECT_PATH/desktop auto-derived from script location; override via env
PROJECT_PATH default c:/Nextcloud/client-building c:/Nextcloud
PULL_DESKTOP / CHECKOUT_DESKTOP defaults 1 / 1 (always clone) 0 / 0 (use existing checkout)
CRAFT_PATH always overwritten only set if not already in environment
EXTRA_DEPLOY_PATH must be set externally or fail defaults via common.inc.bat
NSIS EXE installer step present in build.bat removed

No changes to

  • admin/win/msi/ (WiX source files and make-msi.bat.in)
  • admin/win/tools/ (NCMsiHelper, NCMigrationHelper, etc.)
  • admin/win/CMakeLists.txt
  • CI workflows (existing windows-build-and-test.yml uses CraftMaster and is unaffected)
  • src/gui/updater/ NSIS runtime updater code (unrelated to installer creation)

@camilasan
Copy link
Copy Markdown
Member

I would go ahead with this 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.

3 participants