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
15 echo "Usage: $0 brandfile binaries..."
21 t=`mktemp -d -t darkplaces-rebrand.XXXXXX`
23 flags="$flags -customgamename \"$name\" -customgamedirname1 \"$dirname1\" -customgamedirname2 \"$dirname2\" -customgamescreenshotname \"$screenshotname\" -customgameuserdirname \"$userdirname\""
24 echo "$flags" > "$t/darkplaces.opt"
27 zip -9r darkplaces.zip darkplaces.opt
31 for EXECUTABLE in "$@"; do
36 # detect what the executable is
37 case "`file -b "$EXECUTABLE"`" in
63 cp "$t/darkplaces.zip" "$t/darkplaces-this.zip"
66 cp "$icon_xpm" "$t/darkplaces-icon.xpm"
68 zip -9r darkplaces-this.zip darkplaces-icon.xpm
73 cp "$icon_ico" "$t/darkplaces-icon.ico"
74 cp "$EXECUTABLE" "$t/darkplaces.exe"
75 cat >"$t/darkplaces.rc" <<EOF
76 #include <windows.h> // include for version info constants
78 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "darkplaces-icon.ico"
82 PRODUCTVERSION 1,0,0,0
85 BLOCK "StringFileInfo"
89 VALUE "CompanyName", "Forest Hale Digital Services"
90 VALUE "FileVersion", "1.0"
91 VALUE "FileDescription", "$name"
92 VALUE "InternalName", "${EXECUTABLE##*/}"
93 VALUE "LegalCopyright", "id Software, Forest Hale, and contributors"
94 VALUE "LegalTrademarks", ""
95 VALUE "OriginalFilename", "${EXECUTABLE##*/}"
96 VALUE "ProductName", "$name"
97 VALUE "ProductVersion", "1.0"
103 wine "c:/Program Files/ResEdit/ResEdit.exe" -convert darkplaces.rc darkplaces.exe
105 mv "$t/darkplaces.exe" "$EXECUTABLE"
109 # OS X is special here
110 case "$EXECUTABLE" in
112 pkgdir="${EXECUTABLE%/*}/.."
118 if [ -d "$pkgdir/Resources" ]; then
119 cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
120 cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
121 /* Localized versions of Info.plist keys */
123 CFBundleName = "$name";
124 CFBundleShortVersionString = "$name";
125 CFBundleGetInfoString = "Darkplaces by Forest 'LordHavoc' Hale";
126 NSHumanReadableCopyright = "Copyright `date +%Y`";
131 cat "$t/darkplaces-this.zip" >> "$EXECUTABLE"