]>
Commit | Line | Data |
---|---|---|
af8fe023 JS |
1 | #!/bin/sh |
2 | # tarwxall: make up a tar.gz distribution of wxAll | |
3 | # Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver) | |
4 | ||
5 | # We can't use e.g. this: | |
77ffb593 | 6 | # ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWidgets-$VERSION-gen.zip |
af8fe023 JS |
7 | # because there's not enough space on the command line, plus we need to ignore the |
8 | # blank lines. | |
9 | ||
10 | TAR=tar | |
11 | ARCH=`arch` | |
12 | if [ "$ARCH" = "ppc" ]; then | |
13 | TAR=gnutar | |
14 | fi | |
15 | ||
16 | expandlines() | |
17 | { | |
18 | toexpand=$1 | |
19 | outputfile=$2 | |
20 | ||
21 | rm -f $outputfile | |
22 | touch $outputfile | |
23 | for line in `cat $toexpand` ; do | |
24 | if [ "$line" != "" ]; then | |
25 | ls $line >> $outputfile | |
26 | fi | |
27 | uniq < $outputfile > /tmp/uniqtemp.txt | |
28 | mv /tmp/uniqtemp.txt $outputfile | |
29 | done | |
30 | } | |
31 | ||
32 | ||
33 | init="" | |
34 | if [ "$1" = "" ] | |
35 | then | |
36 | echo Usage: tarwxall wx-dir output-dir version | |
37 | exit | |
38 | fi | |
39 | ||
40 | if [ "$2" = "" ] | |
41 | then | |
42 | echo Usage: tarwxall wx-dir output-dir version | |
43 | exit | |
44 | fi | |
45 | ||
46 | if [ "$3" = "" ] | |
47 | then | |
48 | echo Usage: tarwxall wx-dir output-dir version | |
49 | exit | |
50 | fi | |
51 | ||
52 | WXVER=$3 | |
53 | ||
54 | echo About to archive wxAll: | |
55 | echo From $1 | |
56 | echo To $2 | |
57 | echo CTRL-C if this is not correct. | |
58 | read dummy | |
59 | ||
60 | cd $1 | |
61 | ||
62 | echo Removing backup files... | |
63 | rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ | |
64 | ||
65 | rm -f $2/wxAll-${WXVER}*.tar.gz | |
66 | ||
67 | ### wxAll: all distributions in one giant archive | |
68 | cd $1 | |
1cb14841 | 69 | cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt |
af8fe023 JS |
70 | expandlines /tmp/wxall_in.txt /tmp/wxall.txt |
71 | $TAR cf $2/wxAll-${WXVER}.tar -T /tmp/wxall.txt | |
72 | ||
73 | echo Re-tarring wxAll in a subdirectory... | |
74 | cd $2 | |
77ffb593 JS |
75 | rm -f -r wxWidgets-${WXVER} |
76 | mkdir wxWidgets-${WXVER} | |
c721300b | 77 | |
2c00930d JS |
78 | # If we have the full set of VC++ project files, |
79 | # get them | |
77ffb593 JS |
80 | if [ -f $2/extra/wxWidgets-${WXVER}-VC.zip ]; then |
81 | unzip -o $2/extra/wxWidgets-${WXVER}-VC.zip | |
2c00930d | 82 | else |
77ffb593 | 83 | echo "Warning - did not find $2/deliver/extra/wxWidgets-${WXVER}-VC.zip" |
2c00930d JS |
84 | fi |
85 | ||
77ffb593 | 86 | cd wxWidgets-${WXVER} |
2c00930d | 87 | $TAR xf ../wxAll-${WXVER}.tar |
c721300b JS |
88 | |
89 | # Translate all .dsp and .dsw files to DOS format | |
90 | unix2dos --unix2dos `cat $1/distrib/msw/vc.rsp` | |
91 | ||
2c00930d JS |
92 | # Copy OS/2 specific configure files |
93 | cp $1/distrib/os2/os2-specific.zip docs/os2 | |
94 | ||
c721300b JS |
95 | # Copy the OS/2 files which probably haven't been copied yet |
96 | mkdir include/wx/os2 | |
97 | mkdir src/os2 | |
98 | cp $1/include/wx/os2/*.H include/wx/os2 | |
2c00930d | 99 | cp $1/src/os2/*.CPP $1/src/os2/*.I src/os2 |
c721300b JS |
100 | |
101 | # Make all OS/2 files lower case | |
56409860 JS |
102 | $1/distrib/msw/namedown include/wx/os2/*.H |
103 | $1/distrib/msw/namedown src/os2/*.CPP src/os2/*.I | |
c721300b | 104 | |
af8fe023 | 105 | cd .. |
2b5f62a0 | 106 | |
af8fe023 | 107 | rm -f wxAll-${WXVER}.tar |
77ffb593 JS |
108 | $TAR cf $2/wxAll-${WXVER}.tar wxWidgets-${WXVER}/* |
109 | rm -f -r wxWidgets-${WXVER} | |
af8fe023 | 110 | gzip $2/wxAll-${WXVER}.tar |
c721300b | 111 |