]> git.saurik.com Git - wxWidgets.git/blame - build/tools/git-make-release
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / build / tools / git-make-release
CommitLineData
d8f1676e
VZ
1#!/bin/sh
2#
3# This is the script used by VZ to make wxWidgets releases. It is unofficial
4# because it must be ran from git-svn repository and not the official svn one
5# and relies on having a recent Perl installation. But it has the advantage of
6# being very simple because git knows which files should be included in the
7# distribution and we don't need to maintain the list of them ourselves but we
8# also don't run the risk of including anything unwanted.
9#
10# Another prerequisite for using it is to create the list of files to be
11# converted to DOS EOLs for Windows distribution, it must exist in the parent
12# directory and be called eol-native. This can be done using the companion
13# svn-find-native-eols.pl script. And will only need to be redone when
14# svn:eol-style property changes for any files (most likely because it will be
15# set for a newly added file).
16#
17# To summarize, here are the steps to create the release:
18#
19# % cd $svn
20# % $git/build/tools/svn-find-native-eols.pl > $git/../eol-native
21# % cd $git
22# % git svn tag WX_x_y_z
23# % ./build/tools/git-make-release x.y.z
24# % ... upload ../wxWidgets-x.y.z.{7z,tar.bz2,zip} ...
25#
26# If anything is wrong and some minor fixes are required, only the last two
27# steps (tagging and git-make-release) must be repeated.
28
29version=$1
30if [ -z "$version" ]; then
7e1fbe69 31 echo "Must specify the distribution version." >&2
d8f1676e
VZ
32 exit 1
33fi
34
e86aa7a6
VZ
35EOL_FILE=../eol-native
36if [ ! -r "$EOL_FILE" ]; then
37 echo "Use build/tools/svn-find-native-eols.pl to generate $EOL_FILE." >&2
38 exit 1
39fi
40
d8f1676e
VZ
41set -e
42set -x
43
44prefix=wxWidgets-$version
45destdir=$(dirname $(readlink -f $0))/../../../$prefix
46
47cleanup() {
48 rm -rf $destdir
49}
50
51trap cleanup INT TERM EXIT
52
53cleanup
54
55git archive --prefix=$prefix/ HEAD | (cd ..; tar x)
56cd ..
e6bd7695
VZ
57# All setup0.h files are supposed to be renamed to just setup.h when checked
58# out and in the distribution.
59find $prefix/include/wx -type f -name setup0.h | while read f; do
60 mv $f ${f%0.h}.h
61done
d8f1676e 62
ee915a64
VS
63# Compile gettext catalogs.
64make -C $prefix/locale allmo
65
d8f1676e
VZ
66tar cjf $prefix.tar.bz2 $prefix
67
68cd $prefix
69set +x
e86aa7a6 70for f in `cat $EOL_FILE`; do
e6bd7695
VZ
71 case $f in
72 */setup0.h)
73 # we renamed this file above so adjust
74 f=${f%0.h}.h
75 ;;
76 esac
798e3fb3 77 unix2dos -q $f
d8f1676e
VZ
78done
79set -x
80
81zip -q -r ../$prefix.zip .
82
837z a ../$prefix.7z . >/dev/null
eca734c4 847z a ../${prefix}_Headers.7z include >/dev/null