Now we can build all tarballs on one (Unix shell) box using pre-flight.sh.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d328538750
commit
2dfa1180b0
255
distrib/scripts/create_archives.sh
Executable file
255
distrib/scripts/create_archives.sh
Executable file
@ -0,0 +1,255 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make a distribution of an application on MSW.
|
||||
# Example:
|
||||
# ../distrib/msw/makesetup.sh --wxmsw --verbose &> log
|
||||
|
||||
# If your zip accepts Cygwin-style paths, then
|
||||
# use cygpath, else substitute echo
|
||||
CYGPATHPROG=cygpath
|
||||
#CYGPATHPROG=echo
|
||||
|
||||
SPINMSW=0
|
||||
SPINOS2=0
|
||||
SPINDOCS=0
|
||||
SPINALL=0
|
||||
SPINWXALL=0
|
||||
SPINBASE=0
|
||||
GETMAKEFILES=0
|
||||
VERBOSE=0
|
||||
ZIPFLAGS=
|
||||
|
||||
PROGNAME=$0
|
||||
SCRIPTDIR=$WXWIN/distrib/scripts
|
||||
. $SCRIPTDIR/utils.inc
|
||||
|
||||
MANIFESTDIR=$SCRIPTDIR/manifests
|
||||
WEBFILES=$WXWIN/../wxWebSite
|
||||
if [ ! "$CYGPATH" = "" ]; then
|
||||
WEBFILES=`$CYGPATH "$WEBFILES"`
|
||||
fi
|
||||
|
||||
# Set this to the required version
|
||||
if [ "$VERSION" = "" ]; then
|
||||
VERSION=2.7.0
|
||||
fi
|
||||
|
||||
getfilelist(){
|
||||
port=$1
|
||||
outfile=$2
|
||||
|
||||
filelist="base.rsp"
|
||||
contribfiles="stc.rsp contrib.rsp ogl.rsp"
|
||||
utilsfiles="tex2rtf.rsp utils.rsp utilmake.rsp"
|
||||
commonfiles="generic.rsp jpeg.rsp tiff.rsp xml.rsp deprecated.rsp makefile.rsp $utilsfiles $contribfiles"
|
||||
|
||||
if [ ! $port = "base" ]; then
|
||||
filelist="$filelist $commonfiles"
|
||||
fi
|
||||
|
||||
if [ $port = "msw" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist msw.rsp univ.rsp vc.rsp mmedia.rsp wince.rsp dmc.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "os2" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist os2.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "x11" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist x11.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "mgl" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist mgl.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "gtk" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist gtk.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "motif" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist motif.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "mac" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist mac.rsp cocoa.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "all" ]; then
|
||||
filelist="$filelist palmos.rsp"
|
||||
fi
|
||||
|
||||
tempfile="/tmp/wx$port.files.in"
|
||||
rm -f $outfile
|
||||
|
||||
olddir=$PWD
|
||||
cd $MANIFESTDIR
|
||||
|
||||
cat $filelist > $outfile
|
||||
|
||||
cd $olddir
|
||||
}
|
||||
|
||||
copyfilelist(){
|
||||
FILELIST=$1
|
||||
APPDIR=$2
|
||||
DESTDIR=$3
|
||||
|
||||
for line in `cat $FILELIST` ; do
|
||||
if [ "$line" != "" ]; then
|
||||
subdir=`dirname $line`
|
||||
mkdir -p $DESTDIR/$subdir
|
||||
cp -rf $APPDIR/$line $DESTDIR/$subdir
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
doinit()
|
||||
{
|
||||
if [ "$VERBOSE" != "1" ]; then
|
||||
ZIPFLAGS=-q
|
||||
fi
|
||||
}
|
||||
|
||||
dospinport(){
|
||||
port=$1
|
||||
|
||||
if [ $port != "all" ]; then
|
||||
portname="`echo $port|tr '[a-z]' '[A-Z]'`"
|
||||
else
|
||||
portname="Widgets"
|
||||
fi
|
||||
|
||||
echo "Creating wx$portname distribution..."
|
||||
|
||||
cd $APPDIR
|
||||
portfiles="/tmp/wx$port.files"
|
||||
getfilelist "$port" "$portfiles"
|
||||
|
||||
TMPFILESDIR=/tmp/wx$port/wxWidgets-$VERSION
|
||||
rm -rf $TMPFILESDIR
|
||||
mkdir -p $TMPFILESDIR
|
||||
|
||||
copyfilelist $portfiles $APPDIR $TMPFILESDIR
|
||||
|
||||
if [ $port = "msw" ] || [ $port = "all" ]; then
|
||||
cp -f README-MSW.txt INSTALL-MSW.txt $TMPFILESDIR
|
||||
fi
|
||||
|
||||
if [ $port = "os2" ] || [ $port = "all" ]; then
|
||||
cp -f INSTALL-OS2.txt $TMPFILESDIR
|
||||
fi
|
||||
|
||||
pushd /tmp/wx$port
|
||||
echo "Creating wx$portname-$VERSION.zip..."
|
||||
zip $ZIPFLAGS -r -9 $APPDIR/deliver/wx$portname-$VERSION.zip .
|
||||
echo "Creating wx$portname-$VERSION.tar.gz..."
|
||||
tar czvf $APPDIR/deliver/wx$portname-$VERSION.tar.gz wxWidgets-$VERSION
|
||||
echo "Creating wx$portname-$VERSION.tar.bz2..."
|
||||
tar ch wxWidgets-$VERSION | bzip2 -f9 > $APPDIR/deliver/wx$portname-$VERSION.tar.bz2
|
||||
popd
|
||||
rm -rf /tmp/wx$port
|
||||
}
|
||||
|
||||
prepareforrelease()
|
||||
{
|
||||
pushd $APPDIR
|
||||
echo Copying FAQ and other files from $WEBFILES
|
||||
cp $WEBFILES/site/faq*.htm $APPDIR/docs/html
|
||||
cp $WEBFILES/site/platform.htm $APPDIR/docs/html
|
||||
cp $WEBFILES/site/i18n.htm $APPDIR/docs/html
|
||||
|
||||
echo Copying readme files...
|
||||
cp $APPDIR/docs/msw/readme.txt README-MSW.txt
|
||||
cp $APPDIR/docs/msw/install.txt INSTALL-MSW.txt
|
||||
cp $APPDIR/docs/os2/install.txt INSTALL-OS2.txt
|
||||
cp $APPDIR/docs/licence.txt LICENCE.txt
|
||||
cp $APPDIR/docs/lgpl.txt COPYING.LIB
|
||||
cp $APPDIR/docs/changes.txt CHANGES.txt
|
||||
cp $APPDIR/docs/readme.txt README.txt
|
||||
|
||||
# Now delete a few files that are unnecessary
|
||||
rm -f BuildCVS.txt descrip.mms
|
||||
rm -f setup.h_vms
|
||||
rm -f docs/html/wxbook.htm docs/html/roadmap.htm
|
||||
rm -f -r contrib/docs/latex/ogl
|
||||
rm -f src/mingegcs.bat
|
||||
rm -f *.spec
|
||||
rm -f src/gtk/descrip.mms src/motif/descrip.mms
|
||||
|
||||
# Copy setup0.h files to setup.h
|
||||
# OS/2 always built with configure now
|
||||
# cp $APPDIR/include/wx/os2/setup0.h $APPDIR/include/wx/os2/setup.h
|
||||
cp $APPDIR/include/wx/msw/setup0.h $APPDIR/include/wx/msw/setup.h
|
||||
cp $APPDIR/include/wx/univ/setup0.h $APPDIR/include/wx/univ/setup.h
|
||||
popd
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $PROGNAME [ options ]" 1>&2
|
||||
echo Options:
|
||||
echo " --help Display this help message"
|
||||
echo " --wxmac Build wxMac distribution"
|
||||
echo " --wxmsw Build wxMSW distribution"
|
||||
echo " --wxos2 Build wxOS2 distribution"
|
||||
echo " --wxall Build wxAll zip distribution"
|
||||
echo " --wxbase Build wxBase zip distribution"
|
||||
echo " --all Build all distributions (the default)"
|
||||
echo " --verbose Verbose zip operation"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Process command line options.
|
||||
|
||||
for i in "$@"; do
|
||||
|
||||
case "$i" in
|
||||
--wxmac) SPINMAC=1; SPINALL=0 ;;
|
||||
--wxmsw) SPINMSW=1; SPINALL=0 ;;
|
||||
--wxos2) SPINOS2=1; SPINALL=0 ;;
|
||||
--wxall) SPINWXALL=1; SPINALL=0 ;;
|
||||
--wxbase) SPINBASE=1; SPINALL=0 ;;
|
||||
--getmakefiles) GETMAKEFILES=1; SPINALL=0 ;;
|
||||
--docs) SPINDOCS=1; SPINALL=0 ;;
|
||||
--all) SPINALL=1 ;;
|
||||
--verbose) VERBOSE=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
doinit
|
||||
prepareforrelease
|
||||
|
||||
# Do OS/2 spin
|
||||
if [ "$SPINOS2" = "1" ] || [ "$SPINALL" = "1" ]; then
|
||||
dospinport "os2"
|
||||
fi
|
||||
|
||||
# Do MSW spin
|
||||
if [ "$SPINMSW" = "1" ] || [ "$SPINALL" = "1" ]; then
|
||||
dospinport "msw"
|
||||
fi
|
||||
|
||||
# Do wxBase spin
|
||||
if [ "$SPINBASE" = "1" ] || [ "$SPINALL" = "1" ]; then
|
||||
dospinport "base"
|
||||
fi
|
||||
|
||||
# Do wxAll spin
|
||||
if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
|
||||
dospinport "all"
|
||||
fi
|
||||
|
||||
if [ "$SPINALL" = "1" ]; then
|
||||
dospinport "mgl"
|
||||
dospinport "gtk"
|
||||
dospinport "x11"
|
||||
dospinport "motif"
|
||||
dospinport "mac"
|
||||
fi
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# cleanup after old build files
|
||||
#if [ -d $WX_TEMP_DIR ]; then
|
||||
# rm -rf $WX_TEMP_DIR
|
||||
#fi
|
||||
if [ "$VERSION" = "" ]; then
|
||||
echo "Including build-environ.cfg"
|
||||
. scripts/build-environ.cfg
|
||||
fi
|
||||
|
||||
echo "$WX_TEMP_DIR"
|
||||
|
||||
START_DIR="$PWD"
|
||||
WX_WEB_DIR=$WX_TEMP_DIR/wxWebSite
|
||||
@ -44,8 +46,6 @@ fi
|
||||
if [ $rebake = "yes" ]; then
|
||||
cd $WX_SRC_DIR/build/bakefiles
|
||||
bakefile_gen -d ../../distrib/scripts/Bakefiles.release.bkgen
|
||||
bakefile_gen -f watcom -d ../mgl/Bakefiles.mgl.bkgen -b wx.bkl
|
||||
bakefile_gen -f watcom -d ../os2/Bakefiles.os2.bkgen -b wx.bkl
|
||||
fi
|
||||
|
||||
cd $WX_SRC_DIR
|
||||
@ -56,8 +56,22 @@ fi
|
||||
# Now generate the mega tarball with everything. We will push this to our build machines.
|
||||
|
||||
cd $WX_TEMP_DIR
|
||||
WX_TARBALL=$WX_TEMP_DIR/wxWidgets-$BUILD_VERSION.tar.gz
|
||||
tar cvzf $WX_TARBALL wxWidgets
|
||||
export APPDIR=$WX_TEMP_DIR/wxWidgets
|
||||
export WXWIN=$WX_TEMP_DIR/wxWidgets
|
||||
export VERSION=$BUILD_VERSION
|
||||
rm -rf $APPDIR/deliver/*
|
||||
|
||||
tar czvf $START_DIR/$DIST_DIR/wxWidgets-$BUILD_VERSION-snapshot.tar.gz $APPDIR
|
||||
|
||||
#export DESTDIR=$STAGING_DIR
|
||||
cp $START_DIR/scripts/create_archives.sh $APPDIR/distrib/scripts
|
||||
chmod +x $APPDIR/distrib/scripts/create_archives.sh
|
||||
$APPDIR/distrib/scripts/create_archives.sh --all
|
||||
|
||||
# copy all the archives we created to the master machine's deliver directory
|
||||
cp $APPDIR/deliver/*.zip $START_DIR/$DIST_DIR
|
||||
cp $APPDIR/deliver/*.tar.gz $START_DIR/$DIST_DIR
|
||||
cp $APPDIR/deliver/*.tar.bz2 $START_DIR/$DIST_DIR
|
||||
|
||||
echo "Tarball located at: $WX_TARBALL"
|
||||
|
||||
@ -66,8 +80,8 @@ if [ ! -f $WX_TARBALL ]; then
|
||||
exit 1
|
||||
else
|
||||
cd $START_DIR
|
||||
cp $WX_TARBALL $STAGING_DIR
|
||||
cp -r $WX_WEB_DIR $STAGING_DIR
|
||||
#cp $WX_TARBALL $STAGING_DIR
|
||||
#cp -r $WX_WEB_DIR $STAGING_DIR
|
||||
|
||||
echo "Pre-flight complete. Ready for takeoff."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user