xcode: add xcodepostbuildinputs/xcodepostbuildoutputs API for Postbuild script phase - #595
Open
mrpuzzler wants to merge 2 commits into
Open
Conversation
…NFIGURATION_BUILD_DIR bug Made-with: Cursor
…ld script phase
Adds two new Lua API fields:
xcodepostbuildinputs { ... } -- inputPaths for the Postbuild script phase
xcodepostbuildoutputs { ... } -- outputPaths for the Postbuild script phase
When outputPaths is non-empty, alwaysOutOfDate is omitted and Xcode uses proper
dependency analysis (stamp-file pattern). When no outputs are declared the
previous alwaysOutOfDate=1 behaviour is preserved for backward compatibility.
Example: postbuildcommands { '"scripts/copy.sh"' }
xcodepostbuildinputs { '"$(SRCROOT)/../../runtime/"' }
xcodepostbuildoutputs { '"$(DERIVED_FILE_DIR)/copy.stamp"' }
Made-with: Cursor
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.
Problem
GENie's
postbuildcommandsgenerates aPBXShellScriptBuildPhasewith emptyinputPathsandoutputPaths. Xcode 15+ warns on every build:The workaround in the previous PR (#594) was
alwaysOutOfDate = 1, which silences the warning but means the script always runs even when nothing changed.Solution
Add two new Xcode-specific Lua API fields, mirroring the pattern of
xcodescriptphases:When
xcodepostbuildoutputsis non-empty,alwaysOutOfDateis omitted and Xcode uses its dependency analysis (stamp-file pattern). When no outputs are declared the previousalwaysOutOfDate = 1behaviour is preserved for full backward compatibility.Usage — stamp-file pattern
The copy script creates the stamp at the end:
touch "${DERIVED_FILE_DIR}/game_data.stamp"Changes
src/base/api.lua— registerxcodepostbuildinputs(list) andxcodepostbuildoutputs(list)src/actions/xcode/xcode_common.lua:doblockgains anoutputfilesparameter, populatesoutputPaths, and only emitsalwaysOutOfDatewhen no outputs are declareddobuildblockgainsinputswhich/outputswhichparameters and reads those config fields"xcodepostbuildinputs"/"xcodepostbuildoutputs"Made with Cursor