3 # Build a range of Unix demos for uploading to the wxWidgets web site.
5 # builddemos.sh --wxmsw --verbose &> log
9 WXDESTDIR
=$WXSRCDIR/deliver
11 # Default binary subdirectory to copy sample executable from
14 # Suffix to append to each demo tarball, e.g. SuSE92 for widgets-SuSE92
19 if [ ! -d "$WXSRCDIR" ] ; then
20 echo Cannot
find wxWidgets
source directory. Use
--wxdir option.
23 if [ ! -d "$WXDESTDIR" ] ; then
24 echo Cannot
find wxWidgets destination directory. Use
--deliver option.
27 if [ ! -d samples
] ; then
28 echo Cannot
find samples directory. Invoke this
script from the root of the build folder.
32 echo Do not invoke this from the
source directory
- invoke from the build directory.
36 echo wxWidgets build directory is
`pwd`
37 echo wxWidgets
source directory is
$WXSRCDIR
38 echo wxWidgets deliver directory is
$WXDESTDIR
39 echo Suffix is
$SUFFIX
41 rm -f $WXDESTDIR/*.
tar.gz
47 if [ -f dialogs
] ; then
48 cp $WXSRCDIR/samples
/dialogs
/*.cpp
$WXSRCDIR/samples
/dialogs
/*.h .
49 tar cfz
$WXDESTDIR/wxWidgets
-DialogsDemo-$SUFFIX.
tar.gz dialogs
*.cpp
*.h
52 echo "*** Warning: dialogs sample did not build"
58 pushd samples
/html
/test
62 cp $WXSRCDIR/samples
/html
/test
/*.cpp
$WXSRCDIR/samples
/html
/test
/*.htm
* $WXSRCDIR/samples
/html
/test
/*.png
$WXSRCDIR/samples
/html
/test
/*.gif .
63 tar cfz
$WXDESTDIR/wxWidgets
-HtmlDemo-$SUFFIX.
tar.gz htmldemo
*.cpp
*.png
*.gif
*.htm
*
64 rm -f *.cpp
*.gif
*.png
*.htm
*
66 echo "*** Warning: HTML sample did not build"
74 if [ -f widgets
] ; then
75 cp $WXSRCDIR/samples
/widgets
/*.cpp
$WXSRCDIR/samples
/widgets
/*.h .
76 tar cfz
$WXDESTDIR/wxWidgets
-WidgetsDemo-$SUFFIX.
tar.gz widgets
*.cpp
*.h
79 echo "*** Warning: widgets sample did not build"
88 cp $WXSRCDIR/demos
/life
/*.cpp
$WXSRCDIR/demos
/life
/*.h
$WXSRCDIR/demos
/life
/*.xpm
$WXSRCDIR/demos
/life
/*.inc
$WXSRCDIR/demos
/life
/*.lif .
90 cp $WXSRCDIR/demos
/life
/bitmaps
/*.
* bitmaps
91 tar cfz
$WXDESTDIR/wxWidgets
-LifeDemo-$SUFFIX.
tar.gz life
*.cpp
*.h
*.xpm
*.inc
*.lif bitmaps
/*.
*
92 rm -f *.cpp
*.h
*.xpm
*.inc
*.lif
95 echo "*** Warning: life demo did not build"
100 dobuilddemos_windows
()
102 if [ ! -d "$WXSRCDIR" ] ; then
103 echo Cannot
find wxWidgets
source directory. Use
--wxdir option.
106 if [ ! -d "$WXDESTDIR" ] ; then
107 echo Cannot
find wxWidgets destination directory. Use
--deliver option.
110 if [ ! -d samples
] ; then
111 echo Cannot
find samples directory. Invoke this
script from the root of the build folder.
115 echo wxWidgets build directory is
`pwd`
116 echo wxWidgets
source directory is
$WXSRCDIR
117 echo wxWidgets deliver directory is
$WXDESTDIR
118 echo Suffix is
$SUFFIX
120 rm -f $WXDESTDIR/*.
zip
124 pushd samples
/dialogs
125 if [ -f $WINBINDIR/dialogs.exe
] ; then
126 cp $WINBINDIR/dialogs.exe .
127 zip $WXDESTDIR/wxWidgets
-DialogsDemo-$SUFFIX.
zip dialogs.exe
*.cpp
*.h
130 echo "*** Warning: dialogs sample did not build"
136 pushd samples
/html
/test
137 if [ -f $WINBINDIR/test.exe
] ; then
138 cp $WINBINDIR/test.exe htmldemo.exe
139 zip $WXDESTDIR/wxWidgets
-HtmlDemo-$SUFFIX.
zip htmldemo.exe
*.cpp
*.png
*.gif
*.htm
*
142 echo "*** Warning: HTML sample did not build"
148 pushd samples
/widgets
149 if [ -f $WINBINDIR/widgets.exe
] ; then
150 cp $WINBINDIR/widgets.exe .
151 zip $WXDESTDIR/wxWidgets
-WidgetsDemo-$SUFFIX.
zip widgets.exe
*.cpp
*.h
153 echo "*** Warning: widgets sample did not build"
160 if [ -f $WINBINDIR/life.exe
] ; then
161 cp $WINBINDIR/life.exe .
162 zip $WXDESTDIR/wxWidgets
-LifeDemo-$SUFFIX.
zip life.exe
*.cpp
*.h
*.xpm
*.inc
*.lif bitmaps
/*.
*
164 echo "*** Warning: life demo did not build"
171 echo "Usage: $PROGNAME [ options ]" 1>&2
173 echo " --help Display this help message"
174 echo " --suffix Append suffix to each tarball"
175 echo " --wxdir wxWidgets source dir"
176 echo " --deliver Tarball destination dir"
178 echo Note that options only override settings
in $SCRIPTDIR/setup.var.
182 # Process command line options.
187 --suffix) SUFFIX
=$2; shift;;
188 --wxdir) WXSRCDIR
=$2; WXDESTDIR
=$WXSRCDIR/deliver
; shift;;
189 --deliver) WXDESTDIR
=$2; shift;;
198 if [ $OS == "Windows_NT" ] ; then