-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.windows
124 lines (109 loc) · 5.64 KB
/
README.windows
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# A subset of TASCAR can be compiled on Windows with the help of an Msys2
# MinGW installation. First install Msys2 and Jack for Windows (see
# https://www.msys2.org/ and https://jackaudio.org/). If you have older
# versions of these tools installed and an upgrade fails, then uninstall
# the old versions via Windows Add/Remove Software and install the latest
# version.
# Change to the Msys2 home directory for doing installations, store current
# (TASCAR git) directory on directory stack for returning here later.
pushd "$HOME"
# Upgrade the msys2 installation to the latest state if possible: First,
# update the package database and the base system:
pacman -Syu
# In some situations, this command may terminate your current msys2 shell.
# If so, then terminate also all other Msys2 processes and start a new shell
# from the Windows start menu and repeat the command. If the command failed
# for some other reason, backup your personal data, uninstall msys2, reinstall
# from the latest installer, and start this process all over again.
# The previous command may have updated the base software but may have not
# updated all installed software. Fix with:
pacman -Su
# TASCAR requires a similar development environment as openMHA, plus some
# additional packages. Installing all software packages required to build
# openMHA:
pacman -S --needed msys/git mingw64/mingw-w64-x86_64-gcc msys/make tar \
mingw64/mingw-w64-x86_64-boost openbsd-netcat mingw-w64-x86_64-libsndfile \
mingw-w64-x86_64-portaudio mingw64/mingw-w64-x86_64-nsis \
mingw-w64-x86_64-eigen3 msys/wget msys/unzip msys/zip dos2unix \
mingw64/mingw-w64-x86_64-curl mingw64/mingw-w64-x86_64-cppcheck
# openMHA and TASCAR can make use of liblsl, install a MinGW version:
wget https://github.com/HoerTech-gGmbH/liblsl/releases/download/v1.14.0-htch/liblsl-1.14.0-MinGW64.zip
unzip -d /mingw64 liblsl-1.14.0-MinGW64.zip
rm liblsl-1.14.0-MinGW64.zip
# Internally we use arcanist for code reviews.
if ! test -d arcanist; then
git clone https://github.com/phacility/arcanist.git
wget https://windows.php.net/downloads/releases/archives/php-7.3.33-nts-Win32-VC15-x64.zip
mkdir -p /c/php
unzip -d /c/php php-7.3.32-nts-Win32-VC15-x64.zip
rm php-7.3.32-nts-Win32-VC15-x64.zip
sed -e 's.;extension_dir = "ext".extension_dir = "C:/php/ext".' -e \
's/;extension=curl/extension=curl/' /c/php/php.ini-development \
>/c/php/php.ini
unix2dos /c/php/php.ini
fi
if ! grep -q "PATH=.*arcanist/bin" .bashrc
then echo >>.bashrc
echo 'PATH="${PATH}:/c/php:${HOME}/arcanist/bin"' >>.bashrc
PATH="${PATH}:/c/php:${HOME}/arcanist/bin"
fi
# Copy the Jack for Windows developer resources to directories where the
# Msys2 MinGW64 toolchain can find them (renaming import lib in the process).
cp -rv /c/Program*Files/Jack2/include/* /mingw64/include/
cp /c/Program*Files/Jack2/lib/libjack64.dll.a /mingw64/lib/libjack.dll.a
# Finished installing build dependencies of openMHA, now install additional
# build dependencies of TASCAR.
pacman -S --needed mingw64/mingw-w64-x86_64-gtksourceviewmm3 \
mingw64/mingw-w64-x86_64-gtkmm3 mingw64/mingw-w64-x86_64-liblo \
mingw64/mingw-w64-x86_64-gsl mingw64/mingw-w64-x86_64-libxml++2.6 \
mingw64/mingw-w64-x86_64-fftw mingw64/mingw-w64-x86_64-pkgconf \
mingw64/mingw-w64-x86_64-xerces-c mingw64/mingw-w64-x86_64-dlfcn \
mingw64/mingw-w64-x86_64-libsamplerate \
mingw64/mingw-w64-x86_64-libmysofa
echo >/MinGW64/lib/pkgconfig/jack.pc 'prefix=/mingw64'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'exec_prefix=${prefix}'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'libdir=${exec_prefix}/lib'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'includedir=${prefix}/include'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'Name: jack'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'Version: 1.9.21'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'Libs: -L${libdir} -ljack -lws2_32 -liphlpapi'
echo >>/MinGW64/lib/pkgconfig/jack.pc 'Cflags: -I${includedir}'
# Compile tascar for windows
popd # Change back to git directory
git clean -fdx . # remove artifacts from last run
make -j 8 libtascar googletest
make -j 8 -C libtascar unit-tests
make -C apps build/tascar_cli
make -j 8 -C gui build/tascar_spkcalib build/tascar
make -C plugins build/.directory
make -C plugins -j 8 build/tascar_route.dll build/tascar_ap_sndfile.dll \
build/tascar_ap_spksim.dll build/tascar_oscjacktime.dll \
build/tascar_system.dll build/tascarreceiver_hoa2d.dll \
build/tascarreceiver_hrtf.dll build/tascarreceiver_nsp.dll \
build/tascarreceiver_omni.dll build/tascarsource_omni.dll \
build/tascar_hrirconv.dll build/tascarreceiver_foaconv.dll \
build/tascar_ap_pink.dll
# Prepare to create a zip file which can be unpacked on another computer as
# a simple TASCAR installation method on Windows. Collect everything for
# the zip file in subdirectory TASCAR:
mkdir -p TASCAR
# Collect all compiled artifacts
cp -v */build/[lt]*.{dll,exe} TASCAR
# Add all DLLs dependencies provided by Msys2
pushd TASCAR
cp -v $(cygcheck ./* | grep mingw64 | sort -bu) .
popd
# Add GTK GUI resources:
mkdir -p TASCAR/share/{icons,glib-2.0} TASCAR/lib
cp -r /mingw64/share/icons/Adwaita TASCAR/share/icons
cp -r /mingw64/share/glib-2.0/schemas TASCAR/share/glib-2.0
cp -r /mingw64/lib/gdk-pixbuf-2.0 TASCAR/lib
cp /mingw64/bin/gdbus.exe TASCAR
cp /mingw64/bin/broadwayd.exe TASCAR
# Add TASCAR icons
cp artwork/*.png TASCAR
# Now create the zip file in the parent directory
export $(grep ^VERSION= config.mk)
zip -r ../TASCAR-$VERSION-windows.zip TASCAR
git clean -fdx .