-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
bootstrap-audacity.sh
executable file
·86 lines (66 loc) · 2.47 KB
/
bootstrap-audacity.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
set -e
cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"
# ---------------------------------------------------------------------------------------------------------------------
# check target
target="${1}"
if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi
using_qt=0
# ---------------------------------------------------------------------------------------------------------------------
# run bootstrap dependencies
./bootstrap-common.sh "${target}"
# ./bootstrap-plugins.sh "${target}"
if [ ${using_qt} -eq 1 ]; then
./bootstrap-qt.sh "${target}"
fi
# ---------------------------------------------------------------------------------------------------------------------
# source setup code
source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh
# ---------------------------------------------------------------------------------------------------------------------
# wxwidgets
# override PawPaw default
wxwidgets_args="-DBUILD_SHARED_LIBS=ON"
# common flags
wxwidgets_args+=" -DwxBUILD_CXX_STANDARD=14"
wxwidgets_args+=" -DwxBUILD_MONOLITHIC=ON"
wxwidgets_args+=" -DwxBUILD_OPTIMISE=ON"
wxwidgets_args+=" -DwxBUILD_SHARED=ON"
wxwidgets_args+=" -DwxUSE_EXPAT=builtin"
wxwidgets_args+=" -DwxUSE_LIBJPEG=builtin"
wxwidgets_args+=" -DwxUSE_LIBPNG=builtin"
wxwidgets_args+=" -DwxUSE_LIBTIFF=builtin"
wxwidgets_args+=" -DwxUSE_REGEX=builtin"
wxwidgets_args+=" -DwxUSE_ZLIB=builtin"
if [ ${using_qt} -eq 1 ]; then
wxwidgets_args+=" -DwxBUILD_TOOLKIT=qt"
fi
# these match upstream cmake setup
if [ "${MACOS}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=NO"
elif [ "${WIN32}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
else
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=NO"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
fi
# needed for mingw
if [ "${WIN32}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_WINSOCK2=yes"
win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"
fi
# needed?
# set(wxVERSION 3.1.3)
# set(wxCOPYRIGHT "1992-2019 wxWidgets")
download wxWidgets "audacity-fixes-3.1.3" "https://github.com/audacity/wxWidgets.git" "" "git"
build_cmake wxWidgets "audacity-fixes-3.1.3" "${wxwidgets_args}"
# ---------------------------------------------------------------------------------------------------------------------