]> git.saurik.com Git - wxWidgets.git/blob - distrib/scripts/pre-flight.sh
Stop crash when wxVSCROLL is specified for native OS X wxListCtrl.
[wxWidgets.git] / distrib / scripts / pre-flight.sh
1 #!/bin/sh
2
3 if [ "$VERSION" = "" ]; then
4 echo "Including build-environ.cfg"
5 . scripts/build-environ.cfg
6 fi
7
8 echo "temp dir is $WX_TEMP_DIR"
9
10 START_DIR="$PWD"
11 SCRIPTDIR=${START_DIR}/scripts
12 WX_WEB_DIR=$WX_TEMP_DIR/wxWebSite
13 WX_SRC_DIR=$WX_TEMP_DIR/wxWidgets
14
15 CURDATE=`date -I`
16
17 # first, grab the latest revision with specified tag
18 if [ ! -d $WX_TEMP_DIR ]; then
19 mkdir $WX_TEMP_DIR
20 fi
21
22 cd $WX_TEMP_DIR
23
24 # just do an update if we started a build but it failed somewhere
25 if [ ! -d $WX_WEB_DIR ]; then
26 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
27 echo "Grabbing wxWebSite sources..."
28 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxWebSite
29 else
30 cd $WX_WEB_DIR
31 cvs update -d -P
32 fi
33
34 if [ ! -d $WX_SRC_DIR ]; then
35 cd $WX_TEMP_DIR
36 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
37 echo "Grabbing wx CVS with tag $BUILD_TAG"
38 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout -r $BUILD_TAG wxWidgets
39 cd $WX_SRC_DIR
40 else
41 cd $WX_SRC_DIR
42 cvs update -d -P
43 fi
44 #copy setup0.h setup.h for msw
45 find . -name setup.h | xargs rm -rf
46 cp include/wx/msw/setup0.h include/wx/msw/setup.h
47
48 # this is where we will store the wxAll tarball we create
49 if [ ! -d $START_DIR/$DISTDIR ]; then
50 mkdir -p $START_DIR/$DISTDIR
51 fi
52
53 #re-bake the bakefiles
54 if [ $rebake = "yes" ]; then
55 if [ ! -d $WX_SRC_DIR/build/bakefiles ]; then
56 mkdir $WX_SRC_DIR/build/bakefiles
57 fi
58
59 cd $WX_SRC_DIR/build/bakefiles
60 # always rebuild the bakefiles to avoid conflicts with cvs
61 ## better to not use unix2dos on the wxWidgets tree so we don't get the conflicts
62 ##fix this -B gave an option not recognised error (sf bug 1537221)...
63 rm .ba*
64 bakefile_gen -d ../../distrib/scripts/Bakefiles.release.bkgen
65 fi
66
67 cd $WX_SRC_DIR
68 if [ ! -d $WX_SRC_DIR/deliver ]; then
69 mkdir $WX_SRC_DIR/deliver
70 fi
71
72 # Now generate the mega tarball with everything. We will push this to our build machines.
73
74 cd $WX_TEMP_DIR
75 export APPDIR=$WX_TEMP_DIR/wxWidgets
76 export WXWIN=$WX_TEMP_DIR/wxWidgets
77 export VERSION=$BUILD_VERSION
78 export SCRIPTDIR=${SCRIPTDIR}
79
80 #remove old files
81 rm -rf $APPDIR/deliver/*
82 rm -rf $START_DIR/$DIST_DIR/*
83
84
85 tar czf $START_DIR/$DIST_DIR/wxWidgets-snapshot-$BUILD_VERSION.tar.gz $WX_TEMP_DIR
86
87 #export DESTDIR=$STAGING_DIR
88 cp $SCRIPTDIR/create_archives.sh $APPDIR/distrib/scripts
89 chmod +x $APPDIR/distrib/scripts/create_archives.sh
90 $APPDIR/distrib/scripts/create_archives.sh --all
91
92 # copy all the archives we created to the master machine's deliver directory
93 cp $APPDIR/deliver/*.zip $START_DIR/$DIST_DIR
94 cp $APPDIR/deliver/*.tar.gz $START_DIR/$DIST_DIR
95 cp $APPDIR/deliver/*.tar.bz2 $START_DIR/$DIST_DIR
96
97 echo "Tarballs located at: $START_DIR/$DIST_DIR"
98
99 if [ ! -f $WX_TARBALL ]; then
100 echo "ERROR: wxAll tarball was not created by pre-flight.sh. Build cannot continue."
101 exit 1
102 else
103 cd $START_DIR
104 #cp $WX_TARBALL $STAGING_DIR
105 #cp -r $WX_WEB_DIR $STAGING_DIR
106
107 echo "Pre-flight complete. Ready for takeoff."
108 fi
109
110 if [ "$KIND" = "daily" ]; then
111 ##delete old files and then copy new ones, add a symlink
112 find ${FTPDIR}/files -type f -name wx\* -mtime +6 | xargs rm -rf
113 cp $START_DIR/$DIST_DIR/wx* ${FTPDIR}/files
114
115 rm -f ${FTPDIR}/wx* ${FTPDIR}/MD5SUM
116 for f in `find ${FTPDIR}/files -type f -name wx\* -mmin -601` ; do
117 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
118 done
119 else
120 ## not a daily build
121 ##get install.txt files etc
122 ##.../docs/plat/install.txt goes to install-plat-2.7.0.txt
123 ## wince has a file down one dir
124 cp ${DOCDIR}/changes.txt $START_DIR/$DIST_DIR/changes-${BUILD_VERSION}.txt
125
126 for f in `find ${DOCDIR} -name install.txt` ; do
127 cp $f $START_DIR/$DIST_DIR/install-`echo $f | sed -e "s|${DOCDIR}||g" | sed -e "s|/install.txt||g"`-${BUILD_VERSION}.txt
128 done
129
130 for g in `find ${DOCDIR} -name readme.txt` ; do
131 cp $g $START_DIR/$DIST_DIR/readme-`echo $g | sed -e "s|${DOCDIR}||g" | sed -e "s|msw/wince|wince|g" | sed -e "s|/readme.txt||g"`-${BUILD_VERSION}.txt
132 done
133 # Rename double readme
134 mv $START_DIR/$DIST_DIR/readme-readme.txt-${BUILD_VERSION}.txt $START_DIR/$DIST_DIR/readme-${BUILD_VERSION}.txt
135 ## copy files ...
136 mkdir ${FTPDIR}/
137 cp $START_DIR/$DIST_DIR/* ${FTPDIR}/
138
139 fi
140
141 md5sum ${FTPDIR}/wx* > ${FTPDIR}/MD5SUM
142
143 ## make sure updated at is really last
144 sleep 10
145 echo cvs checkout done at `date -u` > ${FTPDIR}/updated_at.txt
146
147 echo "Delivery complete. Flying."