Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libs/openFrameworksCompiled/project/CMake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ makefiles' `config.make` options.
| `OF_WEBGL_VERSION` | `2` | `1` for a WebGL 1 build |
| `APP_VERSION` | `project()` version, else `1.0` | app version (macOS / iOS / tvOS `CFBundleShortVersionString`), same as the makefiles' `config.make` |
| `APP_BUILD` | `1` | build number (`CFBundleVersion`) |
| `APP_BUNDLE_ID` | `cc.openFrameworks.<name>` | bundle identifier (`CFBundleIdentifier`), same as the makefiles' `config.make` |
| `OF_APPLE_DEVELOPMENT_TEAM` | | signing team for iOS / tvOS devices |

## Addons
Expand All @@ -149,7 +150,7 @@ platform (an existing `CMakeLists.txt` is kept) and writes the addons to `addons
projectGenerator -o"<OF root>" -p"linux64" -t"cmake" apps/myApps/myApp # -p vs, osx, emscripten, ...
```

It also reads `APP_VERSION` / `APP_BUILD` and `PROJECT_EMSCRIPTEN_WASM` back from the
It also reads `APP_VERSION` / `APP_BUILD` / `APP_BUNDLE_ID` and `PROJECT_EMSCRIPTEN_WASM` back from the
`CMakeLists.txt` (projectGenerator#664, #670). The projectGenerator in `apps/projectGenerator`
on master (0.115.0) has it.

Expand Down
11 changes: 8 additions & 3 deletions libs/openFrameworksCompiled/project/CMake/platform/apple.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ function(of_apple_info_plist target project_plist fallback_plist)
else()
set(build 1)
endif()
string(MAKE_C_IDENTIFIER "${name}" bundle_name)
string(REPLACE "_" "-" bundle_name "${bundle_name}")
set(identifier "cc.openFrameworks.${bundle_name}")
# APP_BUNDLE_ID, like the makefiles' config.make
if(APP_BUNDLE_ID)
set(identifier "${APP_BUNDLE_ID}")
else()
string(MAKE_C_IDENTIFIER "${name}" bundle_name)
string(REPLACE "_" "-" bundle_name "${bundle_name}")
set(identifier "cc.openFrameworks.${bundle_name}")
endif()
foreach(pair
"DEVELOPMENT_LANGUAGE=English"
"ICON_NAME=of.icns"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ PLATFORM_FRAMEWORKS_SEARCH_PATHS = /System/Library/Frameworks
# number (CFBundleVersion); set APP_VERSION / APP_BUILD in the project's config.make
APP_VERSION ?= 1.0
APP_BUILD ?= 1
# bundle id (CFBundleIdentifier); set APP_BUNDLE_ID in the project's config.make
APP_BUNDLE_ID ?= cc.openFrameworks.$(BIN_NAME)

afterplatform: $(TARGET_NAME)
@rm -rf bin/$(BIN_NAME).app
Expand All @@ -443,7 +445,7 @@ afterplatform: $(TARGET_NAME)
@sed -i '' 's/\$${DEVELOPMENT_LANGUAGE}/English/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${EXECUTABLE_NAME}/$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${TARGET_NAME}/$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${PRODUCT_BUNDLE_IDENTIFIER}/cc.openFrameworks.$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${PRODUCT_BUNDLE_IDENTIFIER}/$(APP_BUNDLE_ID)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${MARKETING_VERSION}/$(APP_VERSION)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${CURRENT_PROJECT_VERSION}/$(APP_BUILD)/g' bin/$(BIN_NAME).app/Contents/Info.plist

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ PLATFORM_FRAMEWORKS_SEARCH_PATHS = /System/Library/Frameworks
# number (CFBundleVersion); set APP_VERSION / APP_BUILD in the project's config.make
APP_VERSION ?= 1.0
APP_BUILD ?= 1
# bundle id (CFBundleIdentifier); set APP_BUNDLE_ID in the project's config.make
APP_BUNDLE_ID ?= cc.openFrameworks.$(BIN_NAME)

afterplatform: $(TARGET_NAME)
@rm -rf bin/$(BIN_NAME).app
Expand All @@ -445,7 +447,7 @@ afterplatform: $(TARGET_NAME)
@sed -i '' 's/\$${DEVELOPMENT_LANGUAGE}/English/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${EXECUTABLE_NAME}/$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${TARGET_NAME}/$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${PRODUCT_BUNDLE_IDENTIFIER}/cc.openFrameworks.$(BIN_NAME)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${PRODUCT_BUNDLE_IDENTIFIER}/$(APP_BUNDLE_ID)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${MARKETING_VERSION}/$(APP_VERSION)/g' bin/$(BIN_NAME).app/Contents/Info.plist
@sed -i '' 's/\$${CURRENT_PROJECT_VERSION}/$(APP_BUILD)/g' bin/$(BIN_NAME).app/Contents/Info.plist

Expand Down
9 changes: 9 additions & 0 deletions scripts/templates/macos/config.make
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
# APP_VERSION = 1.0
# APP_BUILD = 1

################################################################################
# APP BUNDLE ID
# The app's bundle identifier (CFBundleIdentifier), eg com.example.myApp.
# The projectGenerator also sets it in the Xcode project and keeps it on update.
#
# (default) APP_BUNDLE_ID = cc.openFrameworks.<project folder name>
################################################################################
# APP_BUNDLE_ID = com.example.myApp

################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
Expand Down
9 changes: 9 additions & 0 deletions scripts/templates/osx/config.make
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
# APP_VERSION = 1.0
# APP_BUILD = 1

################################################################################
# APP BUNDLE ID
# The app's bundle identifier (CFBundleIdentifier), eg com.example.myApp.
# The projectGenerator also sets it in the Xcode project and keeps it on update.
#
# (default) APP_BUNDLE_ID = cc.openFrameworks.<project folder name>
################################################################################
# APP_BUNDLE_ID = com.example.myApp

################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
Expand Down
Loading