Initial implementation of wxWidgets build scripts for Mac and Unix. To run tests, just run dobuilds in mac and unix dirs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1646ae2229
commit
3d23c9b7d9
63
distrib/scripts/includes/configure_build.inc
Normal file
63
distrib/scripts/includes/configure_build.inc
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
if [ "$INSTALLDIR" = "" ]; then
|
||||
INSTALLDIR=$BUILDDIR/install
|
||||
mkdir -p $INSTALLDIR
|
||||
fi
|
||||
|
||||
# wxPython needs this option so that it can build extensions that store the
|
||||
# right install_name (e.g. /usr/local/lib) even if the files aren't actually
|
||||
# in /usr/local/lib at the time they're being linked against
|
||||
# we do this by setting the "official" prefix at build time, and later
|
||||
if [ "$BUILDPREFIX" = "" ]; then
|
||||
BUILDPREFIX=$INSTALLDIR
|
||||
fi
|
||||
|
||||
|
||||
DEBUG_OPTS="--enable-debug"
|
||||
|
||||
UNICODE_OPTS="--enable-unicode"
|
||||
|
||||
ANSI_OPTS="--enable-ansi"
|
||||
|
||||
WXPYTHON_OPTS="--enable-monolithic \
|
||||
--with-opengl \
|
||||
--enable-sound \
|
||||
--enable-display \
|
||||
--enable-geometry \
|
||||
--enable-debug_flag \
|
||||
--enable-optimise \
|
||||
--disable-debugreport "
|
||||
|
||||
|
||||
do_build(){
|
||||
OPTS=""
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
OPTS="$WXPYTHON_OPTS"
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" == "1" ]; then
|
||||
OPTS="$OPTS $DEBUG_OPTS "
|
||||
fi
|
||||
|
||||
if [ "$UNICODE" == "1" ]; then
|
||||
OPTS="$OPTS $UNICODE_OPTS "
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$STATIC" == "1" ]; then
|
||||
OPTS="$OPTS --enable-static"
|
||||
fi
|
||||
|
||||
OPTS="$OPTS $OTHER_OPTS"
|
||||
|
||||
$WXROOT/configure --prefix=$BUILDPREFIX $OPTS
|
||||
make
|
||||
|
||||
# build the libs wxPython needs
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate
|
||||
make -C contrib/src/gizmos
|
||||
make -C contrib/src/stc
|
||||
fi
|
||||
}
|
44
distrib/scripts/mac/dobuilds
Executable file
44
distrib/scripts/mac/dobuilds
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
HOMEDIR="$PWD"
|
||||
|
||||
BUILDDIR_ROOT="$PWD/builds"
|
||||
|
||||
BUILDDIR_CARBON="$BUILDDIR_ROOT/carbon"
|
||||
BUILDDIR_COCOA="$BUILDDIR_ROOT/cocoa"
|
||||
|
||||
mkdir -p $BUILDDIR_CARBON
|
||||
mkdir -p $BUILDDIR_COCOA
|
||||
|
||||
cd $BUILDDIR_CARBON
|
||||
BUILDDIR=$BUILDDIR_CARBON
|
||||
|
||||
export WXROOT="$HOMEDIR/../../.."
|
||||
export INSTALLDIR="$BUILDDIR/install-ansi"
|
||||
$HOMEDIR/macbuild
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-unicode"
|
||||
$HOMEDIR/macbuild unicode
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-ansi"
|
||||
$HOMEDIR/macbuild static
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-unicode"
|
||||
$HOMEDIR/macbuild static unicode
|
||||
|
||||
cd $BUILDDIR_COCOA
|
||||
BUILDDIR=$BUILDDIR_COCOA
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-ansi"
|
||||
$HOMEDIR/macbuild cocoa
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-unicode"
|
||||
$HOMEDIR/macbuild cocoa unicode
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-ansi"
|
||||
$HOMEDIR/macbuild cocoa static
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-unicode"
|
||||
$HOMEDIR/macbuild cocoa static unicode
|
||||
|
||||
cd $HOMEDIR
|
30
distrib/scripts/mac/mac_options.inc
Normal file
30
distrib/scripts/mac/mac_options.inc
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
UNIVERSAL=0
|
||||
WXPYTHON=0
|
||||
UNICODE=0
|
||||
DEBUG=0
|
||||
CARBON=1
|
||||
COCOA=0
|
||||
STATIC=0
|
||||
|
||||
# Process command line options.
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
unicode) UNICODE=1 ;;
|
||||
ansi) UNICODE=0 ;;
|
||||
debug) DEBUG=1 ;;
|
||||
wxpython) WXPYTHON=1 ;;
|
||||
universal) UNIVERSAL=1 ;;
|
||||
carbon) CARBON=1 ;;
|
||||
cocoa) COCOA=1 ;;
|
||||
static) STATIC=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$COCOA" = "1" ]; then
|
||||
OTHER_OPTS="--with-cocoa "
|
||||
fi
|
29
distrib/scripts/mac/macbuild
Executable file
29
distrib/scripts/mac/macbuild
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# you need to change this if you run from outside this dir.
|
||||
if [ "$WXROOT" = "" ]; then
|
||||
WXROOT=../../..
|
||||
fi
|
||||
|
||||
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
||||
|
||||
. $WXROOT/distrib/scripts/mac/mac_options.inc
|
||||
|
||||
# most of this script is shared with other Mac-based and other
|
||||
# configure-based build scripts, which is why this looks a little empty.
|
||||
|
||||
if [ "$UNIVERSAL" = "1" ]; then
|
||||
OTHER_OPTS="--enable-universal_binary "
|
||||
fi
|
||||
|
||||
do_build
|
||||
|
||||
make prefix=$INSTALLDIR install
|
||||
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate prefix=$INSTALLDIR install
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
fi
|
||||
|
||||
cd $OLDDIR
|
66
distrib/scripts/mac/macbuild-lipo
Executable file
66
distrib/scripts/mac/macbuild-lipo
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
|
||||
# you need to change this if you run from outside this dir.
|
||||
if [ "$WXROOT" = "" ]; then
|
||||
WXROOT=../../..
|
||||
fi
|
||||
|
||||
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
||||
|
||||
. $WXROOT/distrib/scripts/mac/mac_options.inc
|
||||
|
||||
DIR="bld-ppc"
|
||||
|
||||
export CXX="g++-3.3 -arch ppc"
|
||||
export CC="gcc-3.3 -arch ppc"
|
||||
mkdir -p $DIR
|
||||
cd $DIR
|
||||
do_build
|
||||
cd ..
|
||||
|
||||
# Do another build, but with i386 this time
|
||||
DIR="bld-i386"
|
||||
|
||||
export CXX="g++-4.0 -arch i386"
|
||||
export CC="gcc-4.0 -arch i386"
|
||||
mkdir -p $DIR
|
||||
cd $DIR
|
||||
do_build
|
||||
cd ..
|
||||
|
||||
# Copy over everything, then remove files we need to replace with lipo'd versions
|
||||
mkdir -p bld
|
||||
cp -R bld-i386/* bld
|
||||
cp -R bld-i386/.pch bld/.pch
|
||||
rm bld/lib/*.dylib
|
||||
|
||||
# lipo the files, but make sure not to run it on symbolic links
|
||||
for item in `cd bld-i386/lib; ls *.dylib`
|
||||
do
|
||||
if [ -f bld-i386/lib/$item -a ! -L bld-i386/lib/$item ]; then
|
||||
lipo -create bld-i386/lib/$item bld-ppc/lib/$item -output bld/lib/$item
|
||||
else
|
||||
cp -R bld-i386/lib/$item bld/lib
|
||||
fi
|
||||
done
|
||||
|
||||
# make install hacks - the copy operations mess up the timestamps and thus
|
||||
# cause make to erroneously think that the libraries need rebuilt
|
||||
touch bld/.pch/wxprec_monodll/wx/*.gch
|
||||
touch bld/.pch/wxprec_gldll/wx/*.gch
|
||||
touch bld/*.o
|
||||
touch bld/lib/*
|
||||
|
||||
# one more hack - inplace wx-config has a hardcoded path in it - we need to
|
||||
# change that path from bld-i386 to just bld in case someone wants to build things
|
||||
# in tree. (wxPython does this, for example)
|
||||
python -c "import os; fname = os.path.abspath('bld/wx-config'); data = open(fname).read(); data = data.replace('bld-i386', 'bld'); open(fname, 'w').write(data)"
|
||||
|
||||
cd bld
|
||||
make prefix=$INSTALLDIR install
|
||||
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate prefix=$INSTALLDIR install
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
fi
|
44
distrib/scripts/unix/dobuilds
Executable file
44
distrib/scripts/unix/dobuilds
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
HOMEDIR="$PWD"
|
||||
|
||||
BUILDDIR_ROOT="$PWD/builds"
|
||||
|
||||
BUILDDIR_CARBON="$BUILDDIR_ROOT/carbon"
|
||||
BUILDDIR_COCOA="$BUILDDIR_ROOT/cocoa"
|
||||
|
||||
mkdir -p $BUILDDIR_CARBON
|
||||
mkdir -p $BUILDDIR_COCOA
|
||||
|
||||
cd $BUILDDIR_CARBON
|
||||
BUILDDIR=$BUILDDIR_CARBON
|
||||
|
||||
export WXROOT="$HOMEDIR/../../.."
|
||||
export INSTALLDIR="$BUILDDIR/install-ansi"
|
||||
$HOMEDIR/macbuild
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-unicode"
|
||||
$HOMEDIR/macbuild unicode
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-ansi"
|
||||
$HOMEDIR/macbuild static
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-unicode"
|
||||
$HOMEDIR/macbuild static unicode
|
||||
|
||||
cd $BUILDDIR_COCOA
|
||||
BUILDDIR=$BUILDDIR_COCOA
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-ansi"
|
||||
$HOMEDIR/macbuild cocoa
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-unicode"
|
||||
$HOMEDIR/macbuild cocoa unicode
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-ansi"
|
||||
$HOMEDIR/macbuild cocoa static
|
||||
|
||||
export INSTALLDIR="$BUILDDIR/install-static-unicode"
|
||||
$HOMEDIR/macbuild cocoa static unicode
|
||||
|
||||
cd $HOMEDIR
|
47
distrib/scripts/unix/unixbuild
Executable file
47
distrib/scripts/unix/unixbuild
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
# you need to change this if you run from outside this dir.
|
||||
if [ "$WXROOT" = "" ]; then
|
||||
WXROOT=../../..
|
||||
fi
|
||||
|
||||
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
||||
|
||||
WXPYTHON=0
|
||||
UNICODE=0
|
||||
DEBUG=0
|
||||
STATIC=0
|
||||
PORT=""
|
||||
|
||||
# Process command line options.
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
unicode) UNICODE=1 ;;
|
||||
ansi) UNICODE=0 ;;
|
||||
debug) DEBUG=1 ;;
|
||||
wxpython) WXPYTHON=1 ;;
|
||||
gtk2) PORT="gtk2" ;;
|
||||
gtk) PORT="gtk" ;;
|
||||
x11) PORT="x11" ;;
|
||||
motif) PORT="motif" ;;
|
||||
static) STATIC=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
OTHER_OPTS="--with-$PORT "
|
||||
|
||||
do_build
|
||||
|
||||
make prefix=$INSTALLDIR install
|
||||
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate prefix=$INSTALLDIR install
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
fi
|
||||
|
||||
cd $OLDDIR
|
Loading…
Reference in New Issue
Block a user