]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/scripts/maketarball.sh
Applied patched for combo box SELECTED events (no
[wxWidgets.git] / utils / configtool / scripts / maketarball.sh
CommitLineData
d7463f75
JS
1#!/bin/sh
2
3# Make a distribution of ConfigTool for Linux
4# Usage: maketarball.sh wxconfigtool-dir bin-dir deliver-dir version [ options ]
5# For example: maketarball.sh ~/wxconfigtool /tmp/build-wxconfigtool /tmp/wxconfigtool-deliver 1.40
6
7APPDIR=$1
8SRC=$APPDIR/src
9BINARYSRC=$2
10DEST=$3
11BUILD=0
12UPX=0
13PROGNAME=$0
14
15# Set this to the required version
16VERSION=$4
17
18dotar()
19{
20 rm -f -r $DEST/wxconfigtool*
21 rm -f $DEST/wxconfigtool-*.*
22
23 mkdir -p $DEST/wxconfigtool-$VERSION
24 mkdir -p $DEST/wxconfigtool-$VERSION/resources
25 mkdir -p $DEST/wxconfigtool-$VERSION/Sample
26 cd $DEST/wxconfigtool-$VERSION
27
28 # Copy readme files
29 cp $APPDIR/docs/readme.txt readme.txt
30 cp $APPDIR/docs/license.txt .
31
32 # Copy the application binary
33 cp $BINARYSRC/wxconfigtool .
34
35 # Copy the wxHTML Help manual file
36 cp $APPDIR/manual/configtool.htb .
37
38 # Copy the sample
39 cp -r $APPDIR/sample Sample
40 cp $APPDIR/resources/* resources
41
42 echo Removing junk from the samples folder...
43 rm -f -r Sample/CVS
44
45 # Copy the resources file
46 rm -f configtool.bin
47 zip configtool.bin -j resources/*
48
49 rm -f -r resources
50
51 # Remove any debug info from wxconfigtool
52 strip wxconfigtool
53
54 # Maybe compress the binary
55 if [ "$UPX" != "0" ]; then
56 upx wxconfigtool
57 fi
58
59 cd ..
60
61 # Make .tar.gz and .tar.bz2 archives
62 tar cvf $DEST/wxconfigtool-$VERSION-i386.tar wxconfigtool-$VERSION/*
63 gzip -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.gz
64 bzip2 -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.bz2
65}
66
67dobuild()
68{
69 makeapp release full
70}
71
72usage()
73{
74 echo Usage: $PROGNAME "cvs-dir bin-dir deliver-dir version-number [ options ]"
75 echo Options:
76 echo " --help Display this help message"
77 echo " --upx Compress executable with UPX"
78 echo " --build Invoke 'maketarball.sh release full' first"
79 echo For example: maketarball.sh ~/wxconfigtool /tmp/build-app /tmp/wxconfigtool-deliver 1.20
80 exit 1
81}
82
83# Process command line options.
84shift 4
85for i in "$@"; do
86 case "$i" in
87 --build) BUILD=1 ;;
88 --upx) UPX=1 ;;
89 *)
90 usage
91 exit
92 ;;
93 esac
94done
95
96if [ ! -d "$DEST" ]; then
97 mkdir -p $DEST
98fi
99
100if [ ! -d "$SRC" ]; then
101 echo Source directory $SRC not found.
102 usage
103 exit 1
104fi
105
106if [ ! -d "$BINARYSRC" ]; then
107 echo Location of wxconfigtool binary $BINARYSRC not found.
108 usage
109 exit 1
110fi
111
112if [ "$VERSION" = "" ]; then
113 echo Pass the version number as the fourth argument.
114 usage
115 exit 1
116fi
117
118echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and wxconfigtool binary in $BINARYSRC.
119#echo Press return to continue.
120#read dummy
121
122# Remove all existing files
123if [ ! -d "$DEST/wxconfigtool" ]; then
124 rm -f -r $DEST/wxconfigtool
125fi
126
127# Skip INNO setup if INNO is 0.
128if [ "$BUILD" = "1" ]; then
129 dobuild
130fi
131
132dotar
133
134echo ConfigTool archived.
135