]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/maketarballs
Added maketarballs script
[wxWidgets.git] / distrib / msw / maketarballs
CommitLineData
4c4cba25
JS
1#!/bin/sh
2# Makes the wxWindows tarballs with 'make dist'
3
4doupdatecvs()
5{
6 cd $WXSRC
7 echo Updating from CVS...
8 cvswx update -d -P
9}
10
11dospinwxgtk()
12{
13 echo Making wxGTK tarballs...
14
15 if [ ! -d $WXDEST ]; then
16 mkdir $WXDEST
17 fi
18
19 rm -f -r $WXDEST/wxgtk
20 mkdir $WXDEST/wxgtk
21 mkdir $WXDEST/wxgtk/release
22
23 cd $WXSRC
24 cd locale
25 make allmo
26 cd $WXDEST/wxgtk/release
27 echo Configuring...
28 $WXSRC/configure --no-recursion
29 echo Making...
30 make -j1 dist
31 mv $WXDEST/wxgtk/release/*.gz $WXDEST/wxgtk/release/*.bz2 $WXDEST
32}
33
34dospinwxx11()
35{
36 echo Making wxX11 tarballs...
37
38 if [ ! -d $WXDEST ]; then
39 mkdir $WXDEST
40 fi
41
42 rm -f -r $WXDEST/wxx11
43 mkdir $WXDEST/wxx11
44 mkdir $WXDEST/wxx11/release
45
46 cd $WXSRC
47 cd locale
48 make allmo
49 cd $WXDEST/wxx11/release
50 echo Configuring...
51 $WXSRC/configure --with-x11 --no-recursion
52 echo Making...
53 make -j1 dist
54
55 cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
56 cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
57}
58
59dospinwxmotif()
60{
61 echo Making wxMotif tarballs...
62
63 if [ ! -d $WXDEST ]; then
64 mkdir $WXDEST
65 fi
66
67 rm -f -r $WXDEST/wxmotif
68 mkdir $WXDEST/wxmotif
69 mkdir $WXDEST/wxmotif/release
70
71 cd $WXSRC
72 cd locale
73 make allmo
74 cd $WXDEST/wxmotif/release
75 echo Configuring...
76 $WXSRC/configure --with-motif --no-recursion
77 echo Making...
78 make -j1 dist
79
80 cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST
81 cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST
82}
83
84dospinwxmac()
85{
86 echo Making wxMac tarballs...
87
88 if [ ! -d $WXDEST ]; then
89 mkdir $WXDEST
90 fi
91
92 rm -f -r $WXDEST/wxmac
93 mkdir $WXDEST/wxmac
94 mkdir $WXDEST/wxmac/release
95
96 cd $WXSRC
97 cd locale
98 make allmo
99 cd $WXDEST/wxmac/release
100 echo Configuring...
101 $WXSRC/configure --with-mac --no-recursion
102 echo Making...
103 make -j1 dist
104
105 cp $WXDEST/wxmac/release/*.tar.gz $WXDEST
106 cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST
107}
108
109PROGNAME=$0
110WXSRC=$1
111WXDEST=$2
112WXVER=$3
113
114SPINWXX11=0
115SPINWXGTK=0
116SPINWXMOTIF=0
117SPINWXMAC=0
118SPINWXBASE=0
119SPINEVERYTHING=0
120UPDATECVS=0
121
122usage()
123{
124 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
125 echo Options:
126 echo " --help Display this help message"
127 echo " --wxgtk Spin wxGTK"
128 echo " --wxbase Spin wxBase"
129 echo " --wxx11 Spin wxX11"
130 echo " --wxmotif Spin wxMotif"
131 echo " --wxmac Spin wxMac"
132 echo " --all Spin EVERYTHING"
133 echo " --updatecvs Update from CVS"
134
135 exit 1
136}
137
138init=""
139if [ "$1" = "" ]
140then
141 usage
142 exit
143fi
144
145if [ "$2" = "" ]
146then
147 usage
148 exit
149fi
150
151if [ "$3" = "" ]
152then
153 usage
154 exit
155fi
156
157# Process command line options.
158shift 3
159for i in "$@"; do
160 case "$i" in
161 --wxx11) SPINWXX11=1 ;;
162 --wxgtk) SPINWXGTK=1 ;;
163 --wxmac) SPINWXMAC=1 ;;
164 --wxmotif) SPINWXMOTIF=1 ;;
165 --all) SPINEVERYTHING=1 ;;
166 --updatecvs) UPDATECVS=1 ;;
167 *)
168 usage
169 exit
170 ;;
171 esac
172done
173
174echo About to make wxWindows RPMs:
175echo From $WXSRC
176echo To $WXDEST
177echo Version $WXVER
178echo CTRL-C if this is not correct.
179read dummy
180
181if [ "$UPDATECVS" = "1" ]; then
182 doupdatecvs
183fi
184
185if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
186 dospinwxx11
187fi
188
189if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
190 dospinwxgtk
191fi
192
193if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
194 dospinwxmotif
195fi
196
197if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
198 dospinwxmac
199fi
200