root/trunk/scripts/pkg_win

Revision 809, 2.0 kB (checked in by takkaria, 4 months ago)

Merge in changes from the 3.0.9b branch, including (erk!) the 32x32 BMPs. The sooner the Windows port handles PNG, the happer I'll be...

  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 if [ $# -ne 1 ] && [ $# -ne 2 ]; then
4         echo "Simple packaging file for the Windows port.  Only really useful when"
5         echo "cross-compiling, or using Cygwin.  Originally by Robert Ruehlmann."
6         echo ""
7         echo "Requires you have UPX (http://upx.sf.net/) installed."
8         echo ""
9         echo "Use in the root directory of the game, like so:"
10         echo "   scripts/pkg_win <name of of release, e.g. angband-4.0.1> [<output filename>]"
11         echo ""
12
13         exit 1
14 fi
15
16 DIR=$1
17 if [ $# -eq 1 ]; then
18         OUT=$1.zip
19 else
20         OUT=$2
21 fi
22
23            
24 function cp_unix2dos {
25   # Just in case they're already DOS_format, we strip them to UNIX first. :)
26   awk '{ sub("\r$", ""); sub("$", "\r"); print }' $1 > $2
27 }
28
29
30 mkdir -p $DIR
31 cd $DIR
32
33 mkdir lib
34 mkdir lib/apex
35 mkdir lib/bone
36 mkdir lib/data
37 mkdir lib/edit
38 mkdir lib/file
39 mkdir lib/help
40 mkdir lib/info
41 mkdir lib/pref
42 mkdir lib/save
43 mkdir lib/script
44 mkdir lib/user
45 mkdir lib/xtra
46 mkdir lib/xtra/font
47 mkdir lib/xtra/graf
48 mkdir lib/xtra/sound
49
50 touch lib/apex/delete.me lib/bone/delete.me lib/data/delete.me \
51       lib/info/delete.me lib/user/delete.me lib/save/delete.me
52
53 cp ../*.exe .
54
55 # Copy the readmes and suchlike, converting to DOS line endings on the way
56 cp_unix2dos ../changes.txt ./changes.txt
57 cp_unix2dos ../thanks.txt ./thanks.txt
58 cp_unix2dos ../copying.txt ./copying.txt
59 cp_unix2dos ../readme.txt ./readme.txt
60 cp_unix2dos ../faq.txt ./faq.txt
61
62 cp ../lib/edit/*.txt lib/edit
63 cp ../lib/file/*.txt lib/file
64
65 cp ../lib/help/*.txt lib/help
66 cp ../lib/help/*.hlp lib/help
67
68 cp ../lib/pref/*.prf lib/pref
69
70 cp ../lib/xtra/font/*.fon lib/xtra/font
71 cp_unix2dos ../lib/xtra/font/copying.txt lib/xtra/font/copying.txt
72
73 cp ../lib/xtra/graf/8x8.bmp lib/xtra/graf
74 cp ../lib/xtra/graf/16x16.bmp lib/xtra/graf
75 cp ../lib/xtra/graf/32x32.bmp lib/xtra/graf
76 cp ../lib/xtra/graf/mask.bmp lib/xtra/graf
77 cp ../lib/xtra/graf/mask32.bmp lib/xtra/graf
78
79 cp ../lib/xtra/sound/sound.cfg lib/xtra/sound
80 cp ../lib/xtra/sound/*.wav lib/xtra/sound
81
82 upx -9 angband.exe
83
84 cd ..
85 zip -9 -r $OUT $DIR
86 rm -rf $DIR
Note: See TracBrowser for help on using the browser.