Skip to content

Commit

Permalink
It seems the days of auto-detecting the game version in Xcode are at …
Browse files Browse the repository at this point in the history
…an end, due to changes in Xcode that cause errors when building the first time (before BZFlag-Info.plist is generated) and due to changes we will need to make in our macOS build process in order to sign and notarize the application.
  • Loading branch information
macsforme committed Mar 14, 2021
1 parent 67447f3 commit 3be72c3
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ work
/man/*.gz
/man/*.html
/misc/bzflag.desktop
/src/platform/MacOSX/BZFlag-Info.plist
/MSVC/ipch
/MSVC/bzflag.aps
*.nativecodeanalysis.xml
Expand All @@ -126,7 +125,6 @@ Thumbs.db
/Xcode/BZFlag.xcodeproj/xcuserdata
/Xcode/BZFlag.xcodeproj/project.xcworkspace
/Xcode/buildinfo.h
/Xcode/BZFlag-Info.plist
/tools/TextTool2/TextTool2.xcodeproj/xcuserdata
/tools/TextTool2/TextTool2.xcodeproj/project.xcworkspace
/MSVC/HoldTheFlag_Win32_Debug/*.ib_pdb_index
Expand Down
3 changes: 2 additions & 1 deletion DEVINFO
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ cannot proceed. A checklist of items to be completed follows:

- Version numbers are updated to the next expected release number.
This minimally includes updating README, ChangeLog, configure.ac,
buildDate.cxx, Version.rc, and the title.png image. Version numbers in all
buildDate.cxx, Version.rc, Xcode/BZFlag.xcodeproj/project.pbxproj,
Xcode/BZFlag-Info.plist, and the title.png image. Version numbers in all
other platform-specific README.* files should also be verified.

- Edit updateConfigFile in clientConfig.cxx to update any necessary
Expand Down
34 changes: 34 additions & 0 deletions Xcode/BZFlag-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>BZFlag</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>BZFlag</string>
<key>CFBundleIdentifier</key>
<string>org.bzflag.BZFlag</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BZFlag</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.4.23</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.4.23</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.arcade-games</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) 1993-2021 Tim Riker</string>
</dict>
</plist>
18 changes: 9 additions & 9 deletions Xcode/BZFlag.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@
03C338CC1AFB5AFC00E8F655 /* SDL2Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL2Window.h; sourceTree = "<group>"; };
03C5E79716707857005A26C4 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
03C5E7BC1670A3DA005A26C4 /* lib3D.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = lib3D.a; sourceTree = BUILT_PRODUCTS_DIR; };
03C8EE25167ABE2300BB07A5 /* BZFlag.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BZFlag.app; sourceTree = BUILT_PRODUCTS_DIR; };
03C8EE25167ABE2300BB07A5 /* BZFlag-2.4.23.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BZFlag-2.4.23.app"; sourceTree = BUILT_PRODUCTS_DIR; };
03CC33EC1E3D4A8A00CF55BC /* VotingArbiter.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VotingArbiter.cxx; sourceTree = "<group>"; };
03CC33ED1E3D4A8A00CF55BC /* VotingArbiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VotingArbiter.h; sourceTree = "<group>"; };
03CDB24516A0BA81001DA037 /* superUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = superUser.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3386,7 +3386,7 @@
0394E967167B2D7B007F4035 /* Targets */ = {
isa = PBXGroup;
children = (
03C8EE25167ABE2300BB07A5 /* BZFlag.app */,
03C8EE25167ABE2300BB07A5 /* BZFlag-2.4.23.app */,
03C5E7BC1670A3DA005A26C4 /* lib3D.a */,
0357A7BC1670AF8E0056C938 /* libcommon.a */,
0357A7EB1670B11A0056C938 /* libnet.a */,
Expand Down Expand Up @@ -4654,9 +4654,9 @@
productReference = 03C5E7BC1670A3DA005A26C4 /* lib3D.a */;
productType = "com.apple.product-type.library.static";
};
03C8EE24167ABE2300BB07A5 /* BZFlag */ = {
03C8EE24167ABE2300BB07A5 /* BZFlag-2.4.23 */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03C8EE3E167ABE2300BB07A5 /* Build configuration list for PBXNativeTarget "BZFlag" */;
buildConfigurationList = 03C8EE3E167ABE2300BB07A5 /* Build configuration list for PBXNativeTarget "BZFlag-2.4.23" */;
buildPhases = (
03C8EE21167ABE2300BB07A5 /* Sources */,
03C8EE22167ABE2300BB07A5 /* Frameworks */,
Expand Down Expand Up @@ -4707,9 +4707,9 @@
0394E92C167B29D8007F4035 /* PBXTargetDependency */,
0394E942167B2AA9007F4035 /* PBXTargetDependency */,
);
name = BZFlag;
name = "BZFlag-2.4.23";
productName = BZFlag;
productReference = 03C8EE25167ABE2300BB07A5 /* BZFlag.app */;
productReference = 03C8EE25167ABE2300BB07A5 /* BZFlag-2.4.23.app */;
productType = "com.apple.product-type.application";
};
03FA742D1742601B00573D2D /* serverSidePlayerSample */ = {
Expand Down Expand Up @@ -4800,7 +4800,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
03C8EE24167ABE2300BB07A5 /* BZFlag */,
03C8EE24167ABE2300BB07A5 /* BZFlag-2.4.23 */,
0355E7B8174264D7006E2991 /* Pre-Build Script */,
03C5E7BB1670A3DA005A26C4 /* 3D */,
0357A7BB1670AF8E0056C938 /* common */,
Expand Down Expand Up @@ -4932,7 +4932,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# update buildinfo.h with the build information if necessary\nXCODE_VERSION=`echo $XCODE_VERSION_ACTUAL | awk '{print $1 + 0}'`\n\nif [[ ! -f buildinfo.h || `cat buildinfo.h | grep XCODE_VERSION | grep $XCODE_VERSION` == \"\" ]] ; then\necho \\#define XCODE_VERSION \\\"$XCODE_VERSION\\\" > buildinfo.h\nfi\n\n# re-create the plist with the build version information\nMAJOR_VERSION=`sed -e 's/#.*define.*BZ_MAJOR_VERSION[^0-9]*\\(.*\\)/\\1/' -e t -e d < ../src/date/buildDate.cxx`\nMINOR_VERSION=`sed -e 's/#.*define.*BZ_MINOR_VERSION[^0-9]*\\(.*\\)/\\1/' -e t -e d < ../src/date/buildDate.cxx`\nREV=`sed -e 's/#.*define.*BZ_REV[^0-9]*\\(.*\\)/\\1/' -e t -e d < ../src/date/buildDate.cxx`\n\nBZFLAG_VERSION=\"$MAJOR_VERSION.$MINOR_VERSION.$REV\"\n\necho \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n<!DOCTYPE plist PUBLIC \\\"-//Apple//DTD PLIST 1.0//EN\\\" \\\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\\\">\n<plist version=\\\"1.0\\\">\n<dict>\n<key>CFBundleDevelopmentRegion</key>\n<string>en</string>\n<key>CFBundleExecutable</key>\n<string>\\${EXECUTABLE_NAME}</string>\n<key>CFBundleIconFile</key>\n<string>BZFlag</string>\n<key>CFBundleIdentifier</key>\n<string>org.bzflag.BZFlag</string>\n<key>CFBundleInfoDictionaryVersion</key>\n<string>6.0</string>\n<key>CFBundleName</key>\n<string>BZFlag</string>\n<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n<string>$BZFLAG_VERSION</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n<string>$BZFLAG_VERSION</string>\n<key>LSApplicationCategoryType</key>\n<string>public.app-category.arcade-games</string>\n<key>LSMinimumSystemVersion</key>\n<string>\\${MACOSX_DEPLOYMENT_TARGET}</string>\n<key>NSHumanReadableCopyright</key>\n<string>Copyright (c) 1993-2021 Tim Riker</string>\n</dict>\n</plist>\" > BZFlag-Info.plist\n";
shellScript = "# update buildinfo.h with the build information if necessary\nXCODE_VERSION=`echo $XCODE_VERSION_ACTUAL | awk '{print $1 + 0}'`\n\nif [[ ! -f buildinfo.h || `cat buildinfo.h | grep XCODE_VERSION | grep $XCODE_VERSION` == \"\" ]] ; then\necho \\#define XCODE_VERSION \\\"$XCODE_VERSION\\\" > buildinfo.h\nfi\n";
};
03E42D171B32274A006EE763 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -8060,7 +8060,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
03C8EE3E167ABE2300BB07A5 /* Build configuration list for PBXNativeTarget "BZFlag" */ = {
03C8EE3E167ABE2300BB07A5 /* Build configuration list for PBXNativeTarget "BZFlag-2.4.23" */ = {
isa = XCConfigurationList;
buildConfigurations = (
03C8EE3F167ABE2300BB07A5 /* Debug */,
Expand Down
2 changes: 2 additions & 0 deletions src/date/buildDate.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
// configure.ac
// include/version.h
// package/win32/nsis/BZFlag.nsi
// Xcode/BZFlag.xcodeproj/project.pbxproj
// Xcode/BZFlag-Info.plist
#ifndef BZ_MAJOR_VERSION
# define BZ_MAJOR_VERSION 2
#endif
Expand Down

0 comments on commit 3be72c3

Please sign in to comment.