diff --git a/macosx/Warzone.xcodeproj/project.pbxproj b/macosx/Warzone.xcodeproj/project.pbxproj index 6b6f1e8f8..5ea53d83e 100644 --- a/macosx/Warzone.xcodeproj/project.pbxproj +++ b/macosx/Warzone.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ 438B0C101377317F008184FC /* Gettext - Fetch source */, ); dependencies = ( + 43D670EA15C8506A000AD02A /* PBXTargetDependency */, ); name = "Fetch Third Party Sources"; productName = "Fetch Third Party Sources"; @@ -38,6 +39,17 @@ name = Autorevision; productName = Autorevision; }; + 43D670E515C85038000AD02A /* CS-ID */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 43D670ED15C85090000AD02A /* Build configuration list for PBXAggregateTarget "CS-ID" */; + buildPhases = ( + 43D670E415C85038000AD02A /* Make CS-ID */, + ); + dependencies = ( + ); + name = "CS-ID"; + productName = "CS-ID"; + }; 43F77C7710F0125E00E04615 /* Make DMGs for Release */ = { isa = PBXAggregateTarget; buildConfigurationList = 43F77C8A10F0126F00E04615 /* Build configuration list for PBXAggregateTarget "Make DMGs for Release" */; @@ -939,6 +951,20 @@ remoteGlobalIDString = 43D180771336B6BF001906EB; remoteInfo = Autorevision; }; + 43D670E915C8506A000AD02A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 02356D660BD3BB2600E9A019 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 43D670E515C85038000AD02A; + remoteInfo = "CS-ID"; + }; + 43D670EB15C85072000AD02A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 02356D660BD3BB2600E9A019 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 43D670E515C85038000AD02A; + remoteInfo = "CS-ID"; + }; 43FA571210FF8EE90074E914 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 02356D660BD3BB2600E9A019 /* Project object */; @@ -3793,6 +3819,7 @@ buildRules = ( ); dependencies = ( + 43D670EC15C85072000AD02A /* PBXTargetDependency */, ); name = MiniUPnPc; productName = MiniUPnPc; @@ -3943,6 +3970,7 @@ targets = ( 02356D740BD3BB3400E9A019 /* Warzone */, 43D180771336B6BF001906EB /* Autorevision */, + 43D670E515C85038000AD02A /* CS-ID */, 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */, 438B0C05137730FE008184FC /* Fetch Third Party Sources */, 4318434A1363942200BA2BC5 /* MiniUPnPc */, @@ -4447,6 +4475,20 @@ shellPath = /bin/sh; shellScript = "# Config\nexport PATH=$PATH:/sw/bin:/opt/local/bin\nsauto=\"src/autorevision.h\"\ntauto=\"${OBJROOT}/autorev/autorevision.h\"\nfunction hfilter {\n\trm -f \"${OBJROOT}/autorevision.h\"\n\tsed -e 's:refs/heads/:branch/:' -e 's:refs/remotes/:remote/:' -e 's:branch/master:Master:' -e 's:\tv:\t:' -e 's:v/::' \"${sauto}\" | sed -e 's:_beta: Beta :' -e 's:_rc: RC :' > \"${OBJROOT}/autorevision.h\"\n}\nfunction bauto {\n\tif ! ./build_tools/autorevision.sh \"${tauto}\"; then\n\t\techo \"error: Could not run Autorevision\"\n\t\texit 1\n\tfi\n}\n\ncd ..\n\nif [[ ! -d \".git\" ]] && [[ ! -d \".hg\" ]] && [[ -f \"${sauto}\" ]]; then\n\t# Do not run if we will not get useful information\n\techo \"Not a repo.\"\n\thfilter\n\texit 0\nelif [ -d \"${OBJROOT}/autorev/\" ]; then\n\t# Only update src/autorevision.h if something has changed\n\tbauto\n\tmdck1=`md5 -q \"${sauto}\"`\n\tmdck2=`md5 -q \"${tauto}\"`\n\tif [ \"${mdck1}\" = \"${mdck2}\" ]; then\n\t\texit 0\n\tfi\nelse\n\tmkdir \"${OBJROOT}/autorev/\"\n\tbauto\nfi\n\ncp -a \"${tauto}\" \"${sauto}\"\nhfilter\nexit 0\n"; }; + 43D670E415C85038000AD02A /* Make CS-ID */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Make CS-ID"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". configs/fetchscripts/SetupPrebuiltComponents-CS-ID.sh"; + }; 43F77C7610F0125E00E04615 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -5057,6 +5099,16 @@ target = 43D180771336B6BF001906EB /* Autorevision */; targetProxy = 43D1808A1336B74E001906EB /* PBXContainerItemProxy */; }; + 43D670EA15C8506A000AD02A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 43D670E515C85038000AD02A /* CS-ID */; + targetProxy = 43D670E915C8506A000AD02A /* PBXContainerItemProxy */; + }; + 43D670EC15C85072000AD02A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 43D670E515C85038000AD02A /* CS-ID */; + targetProxy = 43D670EB15C85072000AD02A /* PBXContainerItemProxy */; + }; 43FA571310FF8EE90074E914 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; @@ -5457,6 +5509,27 @@ }; name = Release; }; + 43D670E615C85039000AD02A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "CS-ID"; + }; + name = Debug; + }; + 43D670E715C85039000AD02A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "CS-ID"; + }; + name = StaticAnalyzer; + }; + 43D670E815C85039000AD02A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "CS-ID"; + }; + name = Release; + }; 43F77C8110F0125F00E04615 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 433A44F715C6CA4000D1856A /* CS-ID.xcconfig */; @@ -5644,6 +5717,16 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + 43D670ED15C85090000AD02A /* Build configuration list for PBXAggregateTarget "CS-ID" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 43D670E615C85039000AD02A /* Debug */, + 43D670E715C85039000AD02A /* StaticAnalyzer */, + 43D670E815C85039000AD02A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; 43F77C8A10F0126F00E04615 /* Build configuration list for PBXAggregateTarget "Make DMGs for Release" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/macosx/configs/fetchscripts/SetupPrebuiltComponents-CS-ID.sh b/macosx/configs/fetchscripts/SetupPrebuiltComponents-CS-ID.sh new file mode 100755 index 000000000..71d899ba8 --- /dev/null +++ b/macosx/configs/fetchscripts/SetupPrebuiltComponents-CS-ID.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ ! -f configs/CS-ID.xcconfig ]; then + cat < configs/CS-ID.xcconfig +// Global settings for Code Signing + +CODE_SIGN_IDENTITY = + +EOF +fi diff --git a/macosx/configs/mkdmgs.sh b/macosx/configs/mkdmgs.sh index 5a39fa122..7db2be71a 100755 --- a/macosx/configs/mkdmgs.sh +++ b/macosx/configs/mkdmgs.sh @@ -12,7 +12,6 @@ sequencelonme="sequences-lo.wz" sequencelomd5="ab2bbc28cef2a3f2ea3c186e18158acd" relbuild="${CONFIGURATION_BUILD_DIR}/" dmgout="build/dmgout" -coident="${SRCROOT}/configs/ResourceRules.plist" # Fail if not release if [ ! "${CONFIGURATION}" = "Release" ]; then @@ -22,27 +21,27 @@ fi # codesign setup signd () { - if [ -f "${coident}" ]; then + if [ ! -z "${CODE_SIGN_IDENTITY}" ]; then # Local Config local idetd="${CODE_SIGN_IDENTITY}" - local resrul="${coident}" + local resrul="${SRCROOT}/configs/ResourceRules.plist" local appth="/Volumes/Warzone 2100/Warzone.app" # Sign app cp -a "${resrul}" "${appth}/" - /usr/bin/codesign -f -s "${idetd}" --resource-rules="${appth}/ResourceRules.plist" "${appth}" + /usr/bin/codesign -f -s "${idetd}" --resource-rules="${appth}/ResourceRules.plist" -vvv "${appth}" rm "${appth}/ResourceRules.plist" /usr/bin/codesign -vvv --verify "${appth}" - # Sign the frameworks -# local framelst=`\ls -1 "${appth}/Contents/Frameworks" | sed -n 's:.framework$:&:p'` -# for fsignd in ${framelst}; do -# if [ -d "${appth}/Contents/Frameworks/${fsignd}/Versions/A" ]; then -# /usr/bin/codesign -f -s "${idetd}" -vvv --verify "${appth}/Contents/Frameworks/${fsignd}/Versions/A" -# fi -# done + # Verify the frameworks + local framelst=`\ls -1 "${appth}/Contents/Frameworks" | sed -n 's:.framework$:&:p'` + for fsignd in ${framelst}; do + if [ -d "${appth}/Contents/Frameworks/${fsignd}/Versions/A" ]; then + /usr/bin/codesign -vvv --verify "${appth}/Contents/Frameworks/${fsignd}/Versions/A" + fi + done else - echo "warning: No codeident file found; code will not be signed." + echo "warning: No code signing identity configured; code will not be signed." fi }