]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/change-icon-of-exe.sh
support s2tc for texture compression
[xonotic/xonotic.git] / misc / tools / change-icon-of-exe.sh
1 #!/bin/sh
2
3 d=`pwd`
4 t=`mktemp -d -t change-icon-of-exe.XXXXXX`
5 cp "$1" "$t/darkplaces-icon.ico"
6 cp "$2" "$t/darkplaces.exe"
7 cat >"$t/darkplaces.rc" <<EOF
8 #include <windows.h> // include for version info constants
9
10 A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "darkplaces-icon.ico"
11
12 1 VERSIONINFO
13 FILEVERSION 1,0,0,0
14 PRODUCTVERSION 1,0,0,0
15 FILETYPE VFT_APP
16 {
17   BLOCK "StringFileInfo"
18          {
19                  BLOCK "040904E4"
20                  {
21                          VALUE "CompanyName", "Forest Hale Digital Services"
22                          VALUE "FileVersion", "1.0"
23                          VALUE "FileDescription", "DarkPlaces Game Engine"
24                          VALUE "InternalName", "darkplaces.exe"
25                          VALUE "LegalCopyright", "id Software, Forest Hale, and contributors"
26                          VALUE "LegalTrademarks", ""
27                          VALUE "OriginalFilename", "darkplaces.exe"
28                          VALUE "ProductName", "DarkPlaces"
29                          VALUE "ProductVersion", "1.0"
30                  }
31          }
32 }
33 EOF
34 cd "$t"
35 wine "c:/Program Files/ResEdit/ResEdit.exe" -convert darkplaces.rc darkplaces.exe
36 cd "$d"
37 mv "$t/darkplaces.exe" "$2"
38 rm -rf "$t"