Skip to content

Commit 3e99850

Browse files
authored
macOS: updates to version and custom app icon handling (#431)
1 parent fbbc0e7 commit 3e99850

2 files changed

Lines changed: 29 additions & 8 deletions

File tree

commandLine/Project.xcconfig

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,40 @@ PRODUCT_NAME = $(TARGET_NAME)
1414
PRODUCT_NAME[config=Debug] = $(TARGET_NAME)Debug
1515
PRODUCT_BUNDLE_IDENTIFIER = cc.openFrameworks.$(TARGET_NAME)
1616
//PRODUCT_BUNDLE_IDENTIFIER[config=Debug] = cc.openFrameworks.$(TARGET_NAME)Debug
17-
VERSION = 1.0
1817
DEVELOPMENT_LANGUAGE = English
1918
CODE_SIGN_IDENTITY = -
2019
INFOPLIST_FILE = openFrameworks-Info.plist
2120

22-
//ICONS - NEW IN 0072
23-
//ICON_NAME = icon.icns
24-
//ICON_NAME[config=Debug] = icon-debug.icns
21+
// VERSIONING - overridden if changed in Xcode UI
22+
23+
// this is "Version" in the Xcode target Identity UI
24+
// suggested to use semantic versioning format ala #.#.#
25+
MARKETING_VERSION = 0.1.0
26+
27+
// this is "Build" in the Xcode target Identity UI, an incremental build number
28+
// important for the App Store as new build submissions need a diff number even
29+
// if MARKETING_VERSION is the same
30+
CURRENT_PROJECT_VERSION = 1
31+
32+
// ICONS
33+
34+
// default oF app icon
2535
ICON_NAME = of.icns
2636
ICON_NAME[config=Debug] = of_debug.icns
2737
ICON_FILE = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/$(ICON_NAME)
28-
//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
29-
//ICON_FILE_PATH = bin/data/
38+
39+
// custom app icon, placed in main project folder
40+
//ICON_NAME = MyApp.icns
41+
//ICON_FILE = $(ICON_NAME)
42+
43+
// custom app icon with separate Release and Debug versions placed in bin/data
44+
//ICON_NAME = icon.icns
45+
//ICON_NAME[config=Debug] = icon-debug.icns
46+
//ICON_FILE = bin/data/$(ICON_NAME)
47+
48+
// note: oF 0.7.2 - 0.11 used ICON_FILE_PATH which is no longer used in oF 0.12+
49+
// ex. change ICON_FILE_PATH = bin/data/ -> ICON_FILE = bin/data/$(ICON_NAME) &
50+
// in a custom openFrameworks-Info.plist, set CFBundleIconFile to ICON_NAME
3051

3152
//FOR AV ENGINE SOUND PLAYER UNCOMMENT TWO LINES BELOW
3253
//OF_NO_FMOD=1

commandLine/openFrameworks-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>$(VERSION)</string>
22+
<string>$(MARKETING_VERSION)</string>
2323
<key>CFBundleVersion</key>
24-
<string>$(VERSION)</string>
24+
<string>$(CURRENT_PROJECT_VERSION)</string>
2525
<key>LSApplicationCategoryType</key>
2626
<string>public.app-category.graphics-design</string>
2727
<key>NSCameraUsageDescription</key>

0 commit comments

Comments
 (0)