Repository navigation
App version / build number for all project types - #670
Merged
Merged
Conversation
…d fields; config.make, CMake, Xcode target + Project.xcconfig, Android build.gradle; read back on update
…v7l; detect arm64 hosts as linuxaarch64 and 32-bit ARMv7 as linuxarmv7l
…latform shows macOS (Apple) (arm64 / x86_64)
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.
App version / build number for every project type PG generates, for the names the OF build systems read (openframeworks/openFrameworks#8592 make, openframeworks/openFrameworks#8586 CMake).
CLI
--app-version 1.2.3(digits and dots) and--app-build 42(positive integer). Leaving them out keeps the project's current values; new projects get 1.0 / 1.GUI
Version and Build fields under the project settings, with validation. Opening an existing project fills them from the project. If the project files disagree, a note says which file differs and that config.make's value is used. New projects reset to empty (placeholders 1.0 / 1).
Written to
APP_VERSION/APP_BUILDin the template's APP VERSION section; left commented for the defaults; appended for templates without the sectionset(APP_VERSION …)/set(APP_BUILD …)(or inserts beforeof_add_app()); commented for the defaultsMARKETING_VERSION/CURRENT_PROJECT_VERSIONon every app target configuration (Debug + Release) andProject.xcconfig, so they agreeofApp/build.gradleversionName '<v>'/versionCode <b>Visual Studio is left alone (no version setting there yet).
Read back on update
config.make → CMakeLists
set()→ pbxproj → build.gradle; the first found wins, with a warning naming any file that differs.Tested (macOS, OF master + #8592 + #8586)
bin/verApp.appInfo.plistCFBundleShortVersionString2.3.4,CFBundleVersion42bin/verCMake.appshows the samebuild.gradlegetsversionCode 42/versionName '2.3.4'. No APK built: this OF tree has no Android libraries, soaapt dump badgingwasn't run.1.xis rejected with a tooltipProject.xcconfigand both Xcode target configs# APP_VERSION = 1.0/# APP_BUILD = 1, CMake keeps the commentedset()lines, and Xcode gets 1.0 / 1.