forked from NHERI-SimCenter/R2DTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
124 lines (85 loc) · 2.8 KB
/
make.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
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
@ECHO OFF
:: How to use this file:
:: 1. Create a folder where you want to build R2D
:: 2. Copy this batch file into the folder.
:: 3. Copy your R2DUserPass.h file into the same folder as this batch file, only if you have one.
:: 4. Check the paths below to ensure they match the locations of Qt, Python, MSVC, etc., on your system
:: 5. Run the batch file. The R2D executable will be in the release folder.
ECHO "Starting Build of R2D for Windows"
SET BATCHPATH=%~dp0
ECHO %BATCHPATH%
:: Set the system variables below
set PYTHON=C:\PYTHON38-x64
set PYTHONNET_PYDLL=%PYTHON%\python3.8.dll
set QT=C:\Qt\5.15.2\msvc2019_64\bin
set PATH=%PYTHON%;%PYTHON%\Scripts;%QT%;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
pip.exe install conan
conan user
conan profile new default --detect
conan profile show default
conan profile update settings.compiler="Visual Studio" default
conan profile update settings.compiler.version="16" default
conan remote add simcenter https://nherisimcenter.jfrog.io/artifactory/api/conan/simcenter
echo %PATH%
:: Check if python exists
python -V || exit /b
:: Clone the repos
cd %BATCHPATH%
git clone https://github.com/NHERI-SimCenter/SimCenterBackendApplications.git
git clone https://github.com/NHERI-SimCenter/SimCenterCommon.git
git clone https://github.com/NHERI-SimCenter/R2DTool.git
git clone https://github.com/NHERI-SimCenter/R2DExamples.git
git clone https://github.com/sgavrilovic/QGISPlugin.git
:: Update the repos if they already exist
cd QGISPlugin
git pull
cd ..
cd R2DExamples
git pull
cd ..
cd R2DTool
git pull
cd ..
cd SimCenterBackendApplications
git pull
cd ..
cd SimCenterCommon
git pull
cd ..
dir
:: Build the backend
cd SimCenterBackendApplications
mkdir build
cd build
conan install .. --build missing
cmake .. -G "Visual Studio 16 2019"
cmake --build . --config Release
cmake --install .
cd ..
cd ..
:: Build R2D
:: Copy over the R2D User pass file
copy R2DUserPass.h %CD%\R2DTool\
mkdir build
cd build
conan install ..\R2DTool --build missing
qmake ..\R2DTool\R2D.pro
:: set CL=/MP
:: nmake
C:\Qt\Tools\QtCreator\bin\jom\jom.exe
cd ..
:: Run windeployqt to copy over the qt dlls
%QT%\windeployqt.exe %BATCHPATH%\build
:: Copy over the QGIS files
>NUL xcopy /s /y %BATCHPATH%\QGISPlugin\win\DLLs %BATCHPATH%build\
:: Copy over the QGIS plugins
>NUL xcopy /s /y %BATCHPATH%QGISPlugin\mac\Install\share\qgis %BATCHPATH%build\
:: Copy over the example file
mkdir %BATCHPATH%build\Examples
>NUL copy %BATCHPATH%R2DExamples\Examples.json %CD%\build\Examples\
:: Copy over the applications folder
mkdir %BATCHPATH%R2DTool\applications
>NUL xcopy /s /y %BATCHPATH%SimCenterBackendApplications\applications %BATCHPATH%build\applications\
ECHO "Done Building R2D for Windows"
ECHO "You can find R2D.exe in "%BATCHPATH%build