forked from libmapper/libmapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows_build.bat
More file actions
43 lines (41 loc) · 1.6 KB
/
windows_build.bat
File metadata and controls
43 lines (41 loc) · 1.6 KB
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
@echo off
:: Create build directory
if not exist build\ mkdir build
cd build\
:: Download zlib and extract zip
if not exist zlib\ (
echo Downloading and extracting zlib into build/ folder...
powershell -Command "Invoke-WebRequest https://www.bruot.org/hp/media/files/libraries/zlib_1_2_11_msvc2017_64.zip -OutFile zlib.zip"
powershell -Command "Expand-Archive zlib.zip zlib"
del zlib.zip
)
:: Download liblo and build
if not exist liblo\ (
echo Downloading and building liblo in build/ folder...
powershell -Command "Invoke-WebRequest https://github.com/radarsat1/liblo/archive/refs/heads/master.zip -OutFile liblo.zip"
powershell -Command "Expand-Archive liblo.zip liblo"
del liblo.zip
cd liblo\liblo-master\cmake\
powershell -Command "(gc config-msvc.h.in) -replace '#define HAVE_UNISTD_H', '//#define HAVE_UNISTD_H' | Out-File -encoding ASCII config-msvc.h.in"
mkdir build
cd build\
powershell -Command "cmake .."
powershell -Command "cmake --build . --target all_build
)
:: Build libmapper
echo "Building libmapper..."
:: Reset active directory
cd /D "%~dp0"
cd build\
powershell -Command "cmake .."
powershell -Command "cmake --build . --target all_build"
:: Rename .py.in files to .py for Windows
:: Reset active directory
cd /D "%~dp0"
powershell -Command "cp ./bindings/python/setup.py.in ./bindings/python/setup.py"
powershell -Command "cp ./bindings/python/libmapper/mapper.py.in ./bindings/python/libmapper/mapper.py"
cd bindings\python\
powershell -Command "./get_version.ps1"
echo Done! dll's for liblo and zlib are located in the build/ folder
echo build/Debug/ contains the libmapper dll
pause