Skip to content

Commit

Permalink
Merge branch 'bugfixes' of github.com:Warzone2100/warzone2100 into bu…
Browse files Browse the repository at this point in the history
…gfixes
  • Loading branch information
perim committed Aug 1, 2012
2 parents 44947ad + 93f54a4 commit 2c28226
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ tools/qwzm/ui_qwzm.h
macosx/Warzone.xcodeproj/xcuserdata/*
macosx/Warzone.xcodeproj/project.xcworkspace/xcuserdata/*
macosx/Warzone.xcworkspace/xcuserdata/*
macosx/configs/codeident
macosx/configs/CS-ID.xcconfig

# build folders
/macosx/build/
Expand Down
88 changes: 88 additions & 0 deletions macosx/Warzone.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
438B0C101377317F008184FC /* Gettext - Fetch source */,
);
dependencies = (
43D670EA15C8506A000AD02A /* PBXTargetDependency */,
);
name = "Fetch Third Party Sources";
productName = "Fetch Third Party Sources";
Expand All @@ -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" */;
Expand Down Expand Up @@ -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 */;
Expand Down Expand Up @@ -1600,6 +1626,7 @@
4333612111A07FB900380F5E /* QtOpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QtOpenGL.framework; path = external/QT/QtOpenGL.framework; sourceTree = SOURCE_ROOT; };
4336D8A8111DDF0F0012E8E4 /* random.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = random.cpp; path = ../src/random.cpp; sourceTree = SOURCE_ROOT; };
4336D8A9111DDF0F0012E8E4 /* random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = random.h; path = ../src/random.h; sourceTree = SOURCE_ROOT; };
433A44F715C6CA4000D1856A /* CS-ID.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "CS-ID.xcconfig"; path = "configs/CS-ID.xcconfig"; sourceTree = SOURCE_ROOT; };
434117201495024C003F06FF /* wzconfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wzconfig.cpp; path = ../lib/framework/wzconfig.cpp; sourceTree = SOURCE_ROOT; };
434117211495024C003F06FF /* wzconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wzconfig.h; path = ../lib/framework/wzconfig.h; sourceTree = SOURCE_ROOT; };
4343651C149EA04800527137 /* template.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = template.cpp; path = ../src/template.cpp; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -2765,6 +2792,7 @@
43025DEC1120A4B6006C49B1 /* Configurations */ = {
isa = PBXGroup;
children = (
433A44F715C6CA4000D1856A /* CS-ID.xcconfig */,
43CCDD9414BA502600B21363 /* Fribidi-All.xcconfig */,
43CCDD9514BA502600B21363 /* Fribidi-Debug.xcconfig */,
43CCDD9614BA502600B21363 /* Fribidi-Release.xcconfig */,
Expand Down Expand Up @@ -3791,6 +3819,7 @@
buildRules = (
);
dependencies = (
43D670EC15C85072000AD02A /* PBXTargetDependency */,
);
name = MiniUPnPc;
productName = MiniUPnPc;
Expand Down Expand Up @@ -3941,6 +3970,7 @@
targets = (
02356D740BD3BB3400E9A019 /* Warzone */,
43D180771336B6BF001906EB /* Autorevision */,
43D670E515C85038000AD02A /* CS-ID */,
43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */,
438B0C05137730FE008184FC /* Fetch Third Party Sources */,
4318434A1363942200BA2BC5 /* MiniUPnPc */,
Expand Down Expand Up @@ -4445,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;
Expand Down Expand Up @@ -5055,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 */;
Expand Down Expand Up @@ -5386,6 +5440,7 @@
};
4389DBE5111B0A0700B98DEF /* StaticAnalyzer */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 433A44F715C6CA4000D1856A /* CS-ID.xcconfig */;
buildSettings = {
PRODUCT_NAME = "Make DMGs for Release";
};
Expand Down Expand Up @@ -5454,15 +5509,38 @@
};
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 */;
buildSettings = {
PRODUCT_NAME = "Make DMGs for Release";
};
name = Debug;
};
43F77C8210F0125F00E04615 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 433A44F715C6CA4000D1856A /* CS-ID.xcconfig */;
buildSettings = {
PRODUCT_NAME = "Make DMGs for Release";
};
Expand Down Expand Up @@ -5639,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 = (
Expand Down
2 changes: 2 additions & 0 deletions macosx/configs/Base-Framework.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Global settings for all Framework configurations

#include "CS-ID.xcconfig"


INSTALL_PATH = @rpath
DYLIB_COMPATIBILITY_VERSION = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>rules</key>
<dict>
<key>^Frameworks/</key>
<false/>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
Expand Down Expand Up @@ -32,15 +34,27 @@
<key>weight</key>
<real>10</real>
</dict>
<key>^Resources/data/sequences.wz$</key>
<key>^Resources/data/sequences\.wz$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>30</real>
</dict>
<key>^Resources/WarzoneHelp/</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>30</real>
</dict>
<key>^Resources/data/music/music\.wpl$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>30</real>
</dict>
<key>^info.plist$</key>
<true/>
</dict>
</dict>
</plist>
</plist>
2 changes: 2 additions & 0 deletions macosx/configs/Warzone-All.xcconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Warzone settings for all configurations


// CODE_SIGN_RESOURCE_RULES_PATH = "$(SRCROOT)/configs/ResourceRules.plist"

INSTALL_PATH = $(HOME)/Applications
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
PREBINDING = NO
Expand Down
10 changes: 10 additions & 0 deletions macosx/configs/fetchscripts/SetupPrebuiltComponents-CS-ID.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

if [ ! -f configs/CS-ID.xcconfig ]; then
cat <<EOF > configs/CS-ID.xcconfig
// Global settings for Code Signing
CODE_SIGN_IDENTITY =
EOF
fi
18 changes: 10 additions & 8 deletions macosx/configs/mkdmgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ sequencelonme="sequences-lo.wz"
sequencelomd5="ab2bbc28cef2a3f2ea3c186e18158acd"
relbuild="${CONFIGURATION_BUILD_DIR}/"
dmgout="build/dmgout"
coident="${SRCROOT}/configs/codeident"

# Fail if not release
if [ ! "${CONFIGURATION}" = "Release" ]; then
Expand All @@ -22,24 +21,27 @@ fi

# codesign setup
signd () {
if [ -f "${coident}" ]; then
if [ ! -z "${CODE_SIGN_IDENTITY}" ]; then
# Local Config
local idetd=`cat ${coident}`
local resrul="${SRCROOT}/configs/codesignrules.plist"
local idetd="${CODE_SIGN_IDENTITY}"
local resrul="${SRCROOT}/configs/ResourceRules.plist"
local appth="/Volumes/Warzone 2100/Warzone.app"

# Sign app
codesign -vfs "${idetd}" --keychain "CodeSign" --verify --resource-rules="${resrul}" "${appth}"
cp -a "${resrul}" "${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
# 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
codesign -vfs "${idetd}" --keychain "CodeSign" --verify "${appth}/Contents/Frameworks/${fsignd}/Versions/A"
/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
}

Expand Down

0 comments on commit 2c28226

Please sign in to comment.