Skip to content

App version / build number for all project types - #670

Merged
danoli3 merged 7 commits into
openframeworks:masterfrom
danoli3:app-version
Oct 17, 2026
Merged

danoli3 merged 7 commits into
openframeworks:masterfrom
danoli3:app-version

Conversation

@danoli3

@danoli3 danoli3 commented Oct 17, 2026

Copy link
Copy Markdown
Member

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

config.make (all platforms) APP_VERSION / APP_BUILD in the template's APP VERSION section; left commented for the defaults; appended for templates without the section
CMakeLists.txt replaces the commented set(APP_VERSION …) / set(APP_BUILD …) (or inserts before of_add_app()); commented for the defaults
Xcode (macOS / iOS / tvOS) MARKETING_VERSION / CURRENT_PROJECT_VERSION on every app target configuration (Debug + Release) and Project.xcconfig, so they agree
Android ofApp/build.gradle versionName '<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)

  • 2.3.4 / 42 builds:
    • make: bin/verApp.app Info.plist CFBundleShortVersionString 2.3.4, CFBundleVersion 42
    • Xcode macOS: the built app's Info.plist shows the same
    • CMake macOS: bin/verCMake.app shows the same
    • Xcode iOS (simulator): the built app shows the same
  • Android: build.gradle gets versionCode 42 / versionName '2.3.4'. No APK built: this OF tree has no Android libraries, so aapt dump badging wasn't run.
  • Regenerating without options keeps 2.3.4 / 42.
  • GUI:
    • opening the project shows 2.3.4 / 42
    • a mismatched config.make shows the "differs" note
    • 1.x is rejected with a tooltip
    • generating with 3.0.0 / 7 updates config.make, Project.xcconfig and both Xcode target configs
  • Defaults: config.make keeps # APP_VERSION = 1.0 / # APP_BUILD = 1, CMake keeps the commented set() lines, and Xcode gets 1.0 / 1.

@danoli3
danoli3 merged commit 7b217c5 into openframeworks:master Oct 17, 2026
5 checks passed
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.

1 participant