Repository navigation
Conversation
The oF osx / macos templates ship an APPSTORE block that's commented out
by default:
//OF_CODESIGN = 1
//OF_BUNDLE_DATA_FOLDER = 1
//OF_BUNDLE_DYLIBS = 1
Uncommenting OF_BUNDLE_DATA_FOLDER = 1 makes xcode_project.sh rsync
bin/data/ into the built .app on macOS — required for App Store builds
and generally nicer for shipping a single bundle. Users were having to
hand-edit Project.xcconfig every regen because .xcodeproj/ (and the
xcconfig sitting next to it) is typically gitignored, so the toggle
got lost on every update.
Add an explicit toggle:
- CLI: --bundle-data=1 uncomments the line; --bundle-data=0 re-comments
it; no flag leaves the file alone. Applied after saveAppleSettings so
the merge can't carry the previous project state past an explicit
flag; if the merge happened to leave both commented and uncommented
copies (a known quirk when the user had hand-enabled it), the toggle
also collapses the duplicate. osx / macos targets only; a no-op for
every other target.
- GUI: a Semantic UI checkbox under Bundle ID in advanced mode, shown
only when the selected platform includes osx or macos. The current
state is read back from the project's Project.xcconfig on load (via
readProjectSettings), so re-generating preserves what's on disk,
and the user's own toggle is the last word.
GUI 0.126.0, CLI 0.131.0.
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
Adds a macOS-only toggle for the APPSTORE block that bundles `bin/data/` into the built `.app`. Previously users had to hand-edit `Project.xcconfig` to uncomment `OF_BUNDLE_DATA_FOLDER = 1`, and the edit got lost every regen because `.xcodeproj/` (and the xcconfig sitting next to it) is typically gitignored.
CLI verification (scratch macos projects inside the oF tree)
Also tested `-pmacos` (not just `-posx`) and the duplicate-line collapse (the merge can leave both a template-commented and user-uncommented `OF_BUNDLE_DATA_FOLDER` line; the toggle collapses them to a single one in the requested state).
GUI verification
The checkbox round-trips through `setProjectSettings` → `bundleDataFolder` in `gen` → `--bundle-data=1|0` on the CLI, and the Semantic UI `.ui.checkbox.checked` class is kept in sync for proper visual state.
Scope
Only `OF_BUNDLE_DATA_FOLDER` for now, matching the specific issue. The sibling `OF_CODESIGN` and `OF_BUNDLE_DYLIBS` lines in the same APPSTORE block could get the same treatment in a follow-up if wanted.
Versions
Test plan