3 # all these shall be defined in a .brand file passed as first argument
10 icon_icns=Darkplaces.app/Contents/Resources/Darkplaces.icns
11 icon_ico=darkplaces.ico
12 icon_xpm=darkplaces.xpm
17 t=`mktemp -d -t darkplaces-rebrand.XXXXXX`
19 flags="$flags -customgamename \"$name\" -customgamedirname1 \"$dirname1\" -customgamedirname2 \"$dirname2\" -customgamescreenshotname \"$screenshotname\" -customgameuserdirname \"$userdirname\""
20 echo "$flags" > "$t/darkplaces.opt"
23 zip -9r darkplaces.zip darkplaces.opt
27 for EXECUTABLE in "$@"; do
32 # detect what the executable is
33 case "`file -b "$EXECUTABLE"`" in
59 cp "$t/darkplaces.zip" "$t/darkplaces-this.zip"
62 cp "$icon_xpm" "$t/darkplaces-icon.xpm"
64 zip -9r darkplaces-this.zip darkplaces-icon.xpm
69 cp "$icon_ico" "$t/darkplaces-icon.ico"
70 cp "$EXECUTABLE" "$t/darkplaces.exe"
71 cat >"$t/darkplaces.rc" <<EOF
72 #include <windows.h> // include for version info constants
74 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "darkplaces-icon.ico"
78 PRODUCTVERSION 1,0,0,0
81 BLOCK "StringFileInfo"
85 VALUE "CompanyName", "Forest Hale Digital Services"
86 VALUE "FileVersion", "1.0"
87 VALUE "FileDescription", "$name"
88 VALUE "InternalName", "${EXECUTABLE##*/}"
89 VALUE "LegalCopyright", "id Software, Forest Hale, and contributors"
90 VALUE "LegalTrademarks", ""
91 VALUE "OriginalFilename", "${EXECUTABLE##*/}"
92 VALUE "ProductName", "$name"
93 VALUE "ProductVersion", "1.0"
99 wine "c:/Program Files/ResEdit/ResEdit.exe" -convert darkplaces.rc darkplaces.exe
101 mv "$t/darkplaces.exe" "$EXECUTABLE"
105 # OS X is special here
106 case "$EXECUTABLE" in
108 pkgdir="${EXECUTABLE%/*}/.."
114 if [ -d "$pkgdir/Resources" ]; then
115 cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
116 cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
117 /* Localized versions of Info.plist keys */
119 CFBundleName = "$name";
120 CFBundleShortVersionString = "$name";
121 CFBundleGetInfoString = "Darkplaces by Forest 'LordHavoc' Hale";
122 NSHumanReadableCopyright = "Copyright `date +%Y`";
127 cat "$t/darkplaces-this.zip" >> "$EXECUTABLE"