-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathInstall.bat
executable file
·64 lines (56 loc) · 2.06 KB
/
Install.bat
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
:: conda install -c conda-forge git cmake python=3.9 boost -y
set PREFIX=%CONDA_PREFIX%
set SRC_DIR=%cd%
set SP_DIR=%PREFIX%\Lib\site-packages
:: Armadillo
git clone https://gitlab.com/conradsnicta/armadillo-code.git armadillo
cd armadillo
copy /y .\examples\lib_win64\libopenblas.dll %CONDA_PREFIX%\Library\bin\
copy /y .\examples\lib_win64\libopenblas.lib %CONDA_PREFIX%\Library\lib\
cmake -S . -B build -G "Visual Studio 17 2022" -DBLAS_LIBRARY:FILEPATH="%CONDA_PREFIX%\Library\lib\libopenblas.lib" -DLAPACK_LIBRARY:FILEPATH="%CONDA_PREFIX%\Library\lib\libopenblas.lib"
cmake --build build --config RELEASE
cmake --install build --prefix %CONDA_PREFIX%\Library
if errorlevel 1 exit 1
:: Simcoon
cd %SRC_DIR%
cmake -S . -B build ^
-G"Visual Studio 17 2022" ^
-DCMAKE_INSTALL_PREFIX:PATH=%PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-Wno-dev
cmake --build build --target simcoon --config Release
cmake --install build
if errorlevel 1 exit 1
:: Arma2numpy
cd arma2numpy-builder
cmake -S . -B build ^
-G "Visual Studio 17 2022" ^
-DCMAKE_INSTALL_PREFIX=%PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DPython3_ROOT_DIR=%PREFIX% ^
-Wno-dev
cmake --build build --target ALL_BUILD --config Release
cmake --install build
if errorlevel 1 exit 1
:: Python binding
cd %SRC_DIR%\simcoon-python-builder
cmake -S . -B build ^
-G "Visual Studio 17 2022" ^
-DCMAKE_INSTALL_PREFIX=%PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DPython3_ROOT_DIR=%PREFIX% ^
-Wno-dev
cmake --build build --target ALL_BUILD --config Release
cmake --install build
if errorlevel 1 exit 1
cd %SP_DIR%
:: Install simcoon python
mkdir simcoon
cd simcoon
type NUL > __init__.py
xcopy /s /i %SRC_DIR%\simcoon-python-builder\build\lib\Release\simmit.pyd %SP_DIR%\simcoon
if errorlevel 1 exit 1
REM xcopy /s /i %SRC_DIR%\armadillo\examples\lib_win64\libopenblas.dll %PREFIX%\Library\bin
xcopy /s /i %SRC_DIR%\build\lib\Release\simcoon.dll %PREFIX%\Library\bin
xcopy /s /i %SRC_DIR%\arma2numpy-builder\build\bin\Release\arma2numpy.dll %PREFIX%\Library\bin
if errorlevel 1 exit 1