]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/rebrand-darkplaces-engine.sh
allow the path to xonotic.brand to come from XONOTIC_BRANDFILE
[xonotic/xonotic.git] / misc / tools / rebrand-darkplaces-engine.sh
index f26c5ea5bdb60b07d5d55a0d6ab233cf58983653..6f6a76921336aa9b810ee8cde9b0ec8c88f36992 100755 (executable)
@@ -11,6 +11,10 @@ icon_icns=Darkplaces.app/Contents/Resources/Darkplaces.icns
 icon_ico=darkplaces.ico
 icon_xpm=darkplaces.xpm
 
+if [ -z "$1" ]; then
+       echo "Usage: $0 brandfile binaries..."
+       exit
+fi
 . "$1"; shift
 
 d=`pwd`
@@ -96,7 +100,7 @@ FILETYPE VFT_APP
 }
 EOF
                cd "$t"
-               wine ~/ResEdit/ResEdit.exe -convert darkplaces.rc darkplaces.exe
+               wine "c:/Program Files/ResEdit/ResEdit.exe" -convert darkplaces.rc darkplaces.exe
                cd "$d"
                mv "$t/darkplaces.exe" "$EXECUTABLE"
        fi
@@ -111,8 +115,9 @@ EOF
                                pkgdir=..
                                ;;
                esac
-               cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
-               cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
+               if [ -d "$pkgdir/Resources" ]; then
+                       cp "$icon_icns" "$pkgdir/Resources/Darkplaces.icns"
+                       cat <<EOF >"$pkgdir/Resources/English.lproj/InfoPlist.strings"
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "$name";
@@ -120,9 +125,10 @@ CFBundleShortVersionString = "$name";
 CFBundleGetInfoString = "Darkplaces by Forest 'LordHavoc' Hale";
 NSHumanReadableCopyright = "Copyright `date +%Y`";
 EOF
+               fi
        fi
 
        cat "$t/darkplaces-this.zip" >> "$EXECUTABLE"
 done
 
-rm -f "$t"
+rm -rf "$t"