From 3be72c3aeba3f5f5e118a8279fb885333dc2b5b7 Mon Sep 17 00:00:00 2001 From: Joshua Bodine Date: Sat, 13 Mar 2021 23:38:45 -0700 Subject: [PATCH] It seems the days of auto-detecting the game version in Xcode are at 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. --- .gitignore | 2 -- DEVINFO | 3 ++- Xcode/BZFlag-Info.plist | 34 ++++++++++++++++++++++++++ Xcode/BZFlag.xcodeproj/project.pbxproj | 18 +++++++------- src/date/buildDate.cxx | 2 ++ 5 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 Xcode/BZFlag-Info.plist diff --git a/.gitignore b/.gitignore index ee000a2fcf..fbf52f1d08 100644 --- a/.gitignore +++ b/.gitignore @@ -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 @@ -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 diff --git a/DEVINFO b/DEVINFO index bc1abc32a0..a7b4088423 100644 --- a/DEVINFO +++ b/DEVINFO @@ -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 diff --git a/Xcode/BZFlag-Info.plist b/Xcode/BZFlag-Info.plist new file mode 100644 index 0000000000..604ce01a3a --- /dev/null +++ b/Xcode/BZFlag-Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + BZFlag + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + BZFlag + CFBundleIdentifier + org.bzflag.BZFlag + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + BZFlag + CFBundlePackageType + APPL + CFBundleShortVersionString + 2.4.23 + CFBundleSignature + ???? + CFBundleVersion + 2.4.23 + LSApplicationCategoryType + public.app-category.arcade-games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright (c) 1993-2021 Tim Riker + + diff --git a/Xcode/BZFlag.xcodeproj/project.pbxproj b/Xcode/BZFlag.xcodeproj/project.pbxproj index 21f6b3d022..2df4a6144e 100644 --- a/Xcode/BZFlag.xcodeproj/project.pbxproj +++ b/Xcode/BZFlag.xcodeproj/project.pbxproj @@ -1777,7 +1777,7 @@ 03C338CC1AFB5AFC00E8F655 /* SDL2Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL2Window.h; sourceTree = ""; }; 03C5E79716707857005A26C4 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; 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 = ""; }; 03CC33ED1E3D4A8A00CF55BC /* VotingArbiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VotingArbiter.h; sourceTree = ""; }; 03CDB24516A0BA81001DA037 /* superUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = superUser.cpp; sourceTree = ""; }; @@ -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 */, @@ -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 */, @@ -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 */ = { @@ -4800,7 +4800,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 03C8EE24167ABE2300BB07A5 /* BZFlag */, + 03C8EE24167ABE2300BB07A5 /* BZFlag-2.4.23 */, 0355E7B8174264D7006E2991 /* Pre-Build Script */, 03C5E7BB1670A3DA005A26C4 /* 3D */, 0357A7BB1670AF8E0056C938 /* common */, @@ -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 \"\n\n\n\nCFBundleDevelopmentRegion\nen\nCFBundleExecutable\n\\${EXECUTABLE_NAME}\nCFBundleIconFile\nBZFlag\nCFBundleIdentifier\norg.bzflag.BZFlag\nCFBundleInfoDictionaryVersion\n6.0\nCFBundleName\nBZFlag\nCFBundlePackageType\nAPPL\nCFBundleShortVersionString\n$BZFLAG_VERSION\nCFBundleSignature\n????\nCFBundleVersion\n$BZFLAG_VERSION\nLSApplicationCategoryType\npublic.app-category.arcade-games\nLSMinimumSystemVersion\n\\${MACOSX_DEPLOYMENT_TARGET}\nNSHumanReadableCopyright\nCopyright (c) 1993-2021 Tim Riker\n\n\" > 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; @@ -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 */, diff --git a/src/date/buildDate.cxx b/src/date/buildDate.cxx index 1f25df8277..6c119a4f0a 100644 --- a/src/date/buildDate.cxx +++ b/src/date/buildDate.cxx @@ -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