]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tarwxmac
include wrapwin.h to get HMONITOR and friends declarations
[wxWidgets.git] / distrib / msw / tarwxmac
CommitLineData
332b8edb
JS
1#!/bin/sh
2# tarwxmac: make up a tar.gz distribution of wxMac
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
332b8edb
JS
7# because there's not enough space on the command line, plus we need to ignore the
8# blank lines.
9
10TAR=tar
11ARCH=`arch`
12if [ "$ARCH" = "ppc" ]; then
13 TAR=gnutar
14fi
15
16expandlines()
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
33init=""
34if [ "$1" = "" ]
35then
36 echo Usage: tardist wx-dir output-dir version
37 exit
38fi
39
40if [ "$2" = "" ]
41then
42 echo Usage: tardist wx-dir output-dir version
43 exit
44fi
45
46if [ "$3" = "" ]
47then
48 echo Usage: tardist wx-dir output-dir version
49 exit
50fi
51
52WXVER=$3
53
54echo About to archive wxMac:
55echo From $1
56echo To $2
57echo CTRL-C if this is not correct.
58read dummy
59
60cd $1
61
62echo Removing backup files...
63rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~
64
65rm -f $2/wxMac-${WXVER}*.tar.gz
2b5f62a0 66rm -f -r $2/wxMac-${WXVER}
332b8edb 67
c9b3918a
JS
68cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h
69
332b8edb
JS
70echo Tarring...
71
72### wxMac
c4839ccf 73cat $1/distrib/msw/mac.rsp $1/distrib/msw/cocoa.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
332b8edb
JS
74expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
75$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
76
2bd0a4dd
JS
77cat $1/distrib/msw/cw_mac.rsp > /tmp/wxmac_in.txt
78expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
43adccf8 79$TAR cf $2/wxWidgets-${WXVER}-CW-Mac.tar -T /tmp/wxmac.txt
2bd0a4dd 80
c9b3918a
JS
81rm -f $1/include/wx/setup.h
82
332b8edb
JS
83echo Re-tarring in a subdirectory...
84cd $2
2b5f62a0
VZ
85mkdir wxMac-${WXVER}
86cd wxMac-${WXVER}
332b8edb 87$TAR xf ../wxMac-${WXVER}.tar
06bb3c60
JS
88
89# Remove mmedia
90rm -f -r contrib/src/mmedia contrib/samples/mmedia
332b8edb
JS
91cd ..
92rm -f wxMac-${WXVER}.tar
93
2b5f62a0
VZ
94$TAR cf $2/wxMac-${WXVER}.tar wxMac-${WXVER}/*
95rm -f -r wxMac-${WXVER}
332b8edb
JS
96gzip $2/wxMac-${WXVER}.tar
97
2bd0a4dd
JS
98echo Re-tarring CW project files...
99cd $2
100mkdir wxWidgets-${WXVER}
101cd wxWidgets-${WXVER}
43adccf8 102$TAR xf $2/wxWidgets-${WXVER}-CW-Mac.tar
2bd0a4dd 103cd ..
43adccf8
JS
104rm -f wxWidgets-${WXVER}-CW-Mac.tar
105$TAR zcf wxWidgets-${WXVER}-CW-Mac.tar.gz wxWidgets-${WXVER}/*
2bd0a4dd 106
332b8edb
JS
107# Copy readme and other files
108cp $1/docs/readme.txt $2/readme-${WXVER}.txt
109cp $1/docs/changes.txt $2/changes-${WXVER}.txt
110cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt
111cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt
2bd0a4dd
JS
112cp $1/docs/cocoa/readme.txt $2/readme-cocoa-${WXVER}.txt
113cp $1/docs/cocoa/install.txt $2/install-cocoa-${WXVER}.txt
332b8edb
JS
114
115echo Done!