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 # Suffix to append to each demo tarball, e.g. SuSE92 for widgets-SuSE92
16 if [ ! -d "$WXSRCDIR" ] ; then
17 echo Cannot
find wxWidgets
source directory. Use
--wxdir option.
20 if [ ! -d "$WXDESTDIR" ] ; then
21 echo Cannot
find wxWidgets destination directory. Use
--deliver option.
24 if [ ! -d samples
] ; then
25 echo Cannot
find samples directory. Invoke this
script from the root of the build folder.
29 echo Do not invoke this from the
source directory
- invoke from the build directory.
33 echo wxWidgets build directory is
`pwd`
34 echo wxWidgets
source directory is
$WXSRCDIR
35 echo wxWidgets deliver directory is
$WXDESTDIR
36 echo Suffix is
$SUFFIX
38 rm -f $WXDESTDIR/*.
tar.gz
44 if [ -f dialogs
] ; then
45 cp $WXSRCDIR/samples
/dialogs
/*.cpp
$WXSRCDIR/samples
/dialogs
/*.h .
46 tar cfz
$WXDESTDIR/wxWidgets
-DialogsDemo-$SUFFIX.
tar.gz dialogs
*.cpp
*.h
49 echo "*** Warning: dialogs sample did not build"
55 pushd samples
/html
/test
59 cp $WXSRCDIR/samples
/html
/test
/*.cpp
$WXSRCDIR/samples
/html
/test
/*.htm
* $WXSRCDIR/samples
/html
/test
/*.png
$WXSRCDIR/samples
/html
/test
/*.gif .
60 tar cfz
$WXDESTDIR/wxWidgets
-HtmlDemo-$SUFFIX.
tar.gz htmldemo
*.cpp
*.h
63 echo "*** Warning: HTML sample did not build"
71 if [ -f widgets
] ; then
72 cp $WXSRCDIR/samples
/widgets
/*.cpp
$WXSRCDIR/samples
/widgets
/*.h .
73 tar cfz
$WXDESTDIR/wxWidgets
-WidgetsDemo-$SUFFIX.
tar.gz widgets
*.cpp
*.h
76 echo "*** Warning: widgets sample did not build"
85 cp $WXSRCDIR/demos
/life
/*.cpp
$WXSRCDIR/demos
/life
/*.h
$WXSRCDIR/demos
/life
/*.xpm
$WXSRCDIR/demos
/life
/*.inc
$WXSRCDIR/demos
/life
/*.lif .
87 cp $WXSRCDIR/demos
/life
/bitmaps
/*.
* bitmaps
88 tar cfz
$WXDESTDIR/wxWidgets
-LifeDemo-$SUFFIX.
tar.gz life
*.cpp
*.h
*.xpm
*.inc
*.lif bitmaps
/*.
*
89 rm -f *.cpp
*.h
*.xpm
*.inc
*.lif
92 echo "*** Warning: life demo did not build"
99 echo "Usage: $PROGNAME [ options ]" 1>&2
101 echo " --help Display this help message"
102 echo " --suffix Append suffix to each tarball"
103 echo " --wxdir wxWidgets source dir"
104 echo " --deliver Tarball destination dir"
106 echo Note that options only override settings
in $SCRIPTDIR/setup.var.
110 # Process command line options.
115 --suffix) SUFFIX
=$2; shift;;
116 --wxdir) WXSRCDIR
=$2; WXDESTDIR
=$WXSRCDIR/deliver
; shift;;
117 --deliver) WXDESTDIR
=$2; shift;;