feat: add PowerShell build script for Windows - #169
Closed
SebZar wants to merge 2 commits into
Closed
Conversation
Replace blanket build/ ignore with specific subdirs (output/, php/, sap/, workspace/) so build-windows.ps1 and build-windows.md can be tracked. Add Windows nmake output dirs (x64/, x86/), generated batch files (configure.bat, config.nice.bat, configure.js), and *.log. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collect built DLLs into build/output/<variant>/ instead of leaving them in the nmake-generated x64/Release_TS/ subfolder inside the source tree. Add -OutputDir parameter (default: build/output/) to allow overriding the destination. Re-runs skip already-extracted workspace content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Superseded by #172 (cleaner branch, improved PR description). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build/build-windows.ps1— a self-contained PowerShell 5.1+ script that builds the extension for every PHP variant (TS/NTS, x64/x86) found in a localbuild/php/directory, no internet access requiredbuild/build-windows.md— setup and usage documentation.gitignoreto cover Windows nmake output dirs (x64/,x86/), generated batch files (configure.bat,config.nice.bat,configure.js), and*.log; replaces the blanketbuild/ignore with specific subdirs so the script and docs can be trackedHow it works
Place the following in
build/:Then run:
.\build\build-windows.ps1The script:
build/workspace/(skips already-extracted content on re-runs)vswhere; handles cross-toolset builds automatically (e.g.vs17PHP zips on a VS 2026 host via-vcvars_ver)phpize→configure→nmakefor each variantbuild/output/<variant>/php_sapnwrfc.dllParameters:
-WorkspaceDir,-OutputDir,-Toolset(override),-RunTestsTest plan
vs17) on VS 2022 and VS 2026 with NW RFC SDK 7.50🤖 Generated with Claude Code