mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-26 09:28:07 +02:00
Since we're not using a specific SDK any longer, I cleaned up the script but still left the ability to specify an SDK if we need to in the future.
72 lines
2.2 KiB
Bash
Executable File
72 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# You can use this to build wxWidgets. Just run it from within the root of the
|
|
# wxWidgets source tree like so:
|
|
#
|
|
# sudo <path to this script>/build_wxwidgets
|
|
#
|
|
|
|
# The minimum OS X version supported by Audacity is 10.7.
|
|
minver=10.7
|
|
|
|
# If you want to use a specific SDK, specify the full path here
|
|
sdkdir=""
|
|
|
|
# Build a specific configuration
|
|
function bld
|
|
{
|
|
flavour="${1}"
|
|
shift
|
|
|
|
# Create and change to our build directory
|
|
rm -rf "bld_${flavour}_${arch}"
|
|
mkdir -p "bld_${flavour}_${arch}"
|
|
pushd "bld_${flavour}_${arch}"
|
|
|
|
# Force Audacity specific options
|
|
export CXX="g++ -std=c++1z -stdlib=libc++"
|
|
export LD="g++ -std=c++1z -stdlib=libc++"
|
|
|
|
# Ensure configure uses the proper SDK while performing its tests
|
|
run="xcrun ${sdkdir:+-sdk ${asdf}}"
|
|
|
|
# NOTES: liblzma isn't available on MacOS 10.8 or older and Audacity doesn't
|
|
# need it. So, build wxWidgets without the support to allow Audacity
|
|
# to run on MacOS 10.7 or newer.
|
|
${run} ../configure --prefix="/usr/local/${arch}" \
|
|
--enable-macosx-arch="${arch}" \
|
|
--enable-shared=yes \
|
|
--enable-unicode=yes \
|
|
--enable-universal_binary=no \
|
|
--enable-webkit=no \
|
|
--with-expat=builtin \
|
|
--with-flavour="${flavour}" \
|
|
--with-libjpeg=builtin \
|
|
--with-libpng=builtin \
|
|
--with-libtiff=builtin \
|
|
--with-macosx-sdk="${sdkdir}" \
|
|
--with-macosx-version-min="${minver}" \
|
|
--with-regex=builtin \
|
|
--with-zlib=builtin \
|
|
--without-liblzma \
|
|
${@}
|
|
${run} make -j $(sysctl -n hw.ncpu) install
|
|
popd
|
|
}
|
|
|
|
# If building on 10.15 (Catalina) or newer, 32-bit versions can't be
|
|
# created without forcing "configure" to cross compile.
|
|
arches="x86_64"
|
|
osver=$(sw_vers -productVersion)
|
|
if [ "${osver}" \< "10.15" ]
|
|
then
|
|
arches="${arches} i386"
|
|
fi
|
|
|
|
for arch in ${arches}
|
|
do
|
|
bld "debug" --enable-debug=yes
|
|
bld "release" --enable-debug=no
|
|
done
|
|
|