From 244a11e0a1ba235705e2efbbc6f059dda5fefd33 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sat, 8 Aug 2015 00:32:35 -0500 Subject: [PATCH] Adding "build_wxwidgets" script for OSX --- mac/build_wxwidgets | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 mac/build_wxwidgets diff --git a/mac/build_wxwidgets b/mac/build_wxwidgets new file mode 100755 index 000000000..e83d6d997 --- /dev/null +++ b/mac/build_wxwidgets @@ -0,0 +1,63 @@ +#!/bin/sh +# +# This will build and install the debug and release flavors of wxWidgets 3.0.2 for +# use with Audacity. Just extract the wxWidgets source whereever you like, change +# to that directory and then run this script. +# +arch='-arch i386' +sdk="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/" + +if [ ! -d "${sdk}" ] +then + echo "You must install the 10.6 SDK at this location:" + echo "${sdk}" + exit 1 +fi + +# Audacity supports Tiger and newer, so limit API usage 10.6 +export CPPFLAGS="-DMAC_OS_X_VERSION_MAX_ALLOWED=1060 -mmacosx-version-min=10.6" +export CFLAGS1="$arch -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 -isysroot $sdk -mmacosx-version-min=10.6" +export CXXFLAGS1="$arch -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 -isysroot $sdk -mmacosx-version-min=10.6" +export LDFLAGS1="$arch -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 -syslibroot,$sdk" + +# Make sure our flags are included +export CC="gcc $CFLAGS1" +export CXX="g++ $CXXFLAGS1" +export LD="g++ $LDFLAGS1" + +# Build a specific configuration +function bld +{ + rm -rf "${1}" + mkdir -p "${1}" + pushd "${1}" + shift + ../configure --disable-accessibility \ + --disable-compat26 \ + --disable-compat28 \ + --with-expat=builtin \ + --with-zlib=builtin \ + --with-regex=builtin \ + --enable-universal_binary=no \ + --enable-unicode=yes \ + --enable-webkit=no \ + ${@} + xcrun make -j 4 + popd +} + +# Install a specific configuration +function inst +{ + pushd "${1}" + sudo xcrun make install + popd +} + +# Build all configurations +bld bld_debug --enable-debug=yes --enable-static=no --enable-shared=yes --with-flavour=debug +bld bld_release --enable-debug=no --enable-static=no --enable-shared=yes --with-flavour=release + +# Install all configurations +inst bld_debug +inst bld_release