2010-07-17 12:17:37 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# This is the script used by VZ to make wxWidgets releases. It is unofficial
|
|
|
|
# because it must be ran from git-svn repository and not the official svn one
|
|
|
|
# and relies on having a recent Perl installation. But it has the advantage of
|
|
|
|
# being very simple because git knows which files should be included in the
|
|
|
|
# distribution and we don't need to maintain the list of them ourselves but we
|
|
|
|
# also don't run the risk of including anything unwanted.
|
|
|
|
#
|
|
|
|
# Another prerequisite for using it is to create the list of files to be
|
|
|
|
# converted to DOS EOLs for Windows distribution, it must exist in the parent
|
|
|
|
# directory and be called eol-native. This can be done using the companion
|
|
|
|
# svn-find-native-eols.pl script. And will only need to be redone when
|
|
|
|
# svn:eol-style property changes for any files (most likely because it will be
|
|
|
|
# set for a newly added file).
|
|
|
|
#
|
|
|
|
# To summarize, here are the steps to create the release:
|
|
|
|
#
|
|
|
|
# % cd $svn
|
|
|
|
# % $git/build/tools/svn-find-native-eols.pl > $git/../eol-native
|
|
|
|
# % cd $git
|
|
|
|
# % git svn tag WX_x_y_z
|
|
|
|
# % ./build/tools/git-make-release x.y.z
|
|
|
|
# % ... upload ../wxWidgets-x.y.z.{7z,tar.bz2,zip} ...
|
|
|
|
#
|
|
|
|
# If anything is wrong and some minor fixes are required, only the last two
|
|
|
|
# steps (tagging and git-make-release) must be repeated.
|
|
|
|
|
|
|
|
version=$1
|
|
|
|
if [ -z "$version" ]; then
|
2011-06-29 13:50:02 -04:00
|
|
|
echo "Must specify the distribution version." >&2
|
2010-07-17 12:17:37 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
prefix=wxWidgets-$version
|
|
|
|
destdir=$(dirname $(readlink -f $0))/../../../$prefix
|
|
|
|
|
|
|
|
cleanup() {
|
|
|
|
rm -rf $destdir
|
|
|
|
}
|
|
|
|
|
|
|
|
trap cleanup INT TERM EXIT
|
|
|
|
|
|
|
|
cleanup
|
|
|
|
|
|
|
|
git archive --prefix=$prefix/ HEAD | (cd ..; tar x)
|
|
|
|
cd ..
|
2012-07-04 07:45:35 -04:00
|
|
|
# All setup0.h files are supposed to be renamed to just setup.h when checked
|
|
|
|
# out and in the distribution.
|
|
|
|
find $prefix/include/wx -type f -name setup0.h | while read f; do
|
|
|
|
mv $f ${f%0.h}.h
|
|
|
|
done
|
2010-07-17 12:17:37 -04:00
|
|
|
|
|
|
|
tar cjf $prefix.tar.bz2 $prefix
|
|
|
|
|
|
|
|
cd $prefix
|
|
|
|
set +x
|
|
|
|
for f in `cat ../eol-native`; do
|
2012-07-04 07:45:35 -04:00
|
|
|
case $f in
|
|
|
|
*/setup0.h)
|
|
|
|
# we renamed this file above so adjust
|
|
|
|
f=${f%0.h}.h
|
|
|
|
;;
|
|
|
|
esac
|
2012-07-04 07:45:27 -04:00
|
|
|
unix2dos -q $f
|
2010-07-17 12:17:37 -04:00
|
|
|
done
|
|
|
|
set -x
|
|
|
|
|
|
|
|
zip -q -r ../$prefix.zip .
|
|
|
|
|
|
|
|
7z a ../$prefix.7z . >/dev/null
|
2012-07-09 16:35:10 -04:00
|
|
|
7z a ../${prefix}_Headers.7z include >/dev/null
|