-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.bat
102 lines (65 loc) · 2.05 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
@ECHO OFF
:: How to use this file:
:: 1. Create a folder where you want to build OpenSRA
:: 2. Copy this batch file into the folder.
:: 3. Check the paths below to ensure they match the locations of Qt, Python, MSVC, etc., on your system
:: 4. Run the batch file. The OpenSRA executable will be in the build folder.
:: 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
ECHO "Starting Build of OpenSRA 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"
echo %PATH%
:: Check if python exists
python -V || exit /b
:: Clone the repos
cd %BATCHPATH%
git clone https://github.com/bzheng10/OpenSRA_dev.git
git clone https://github.com/sgavrilovic/SimCenterCommon.git
git clone https://github.com/sgavrilovic/R2DTool.git
git clone https://github.com/sgavrilovic/OpenSRAFrontEnd
git clone https://github.com/sgavrilovic/QGISPlugin.git
cd QGISPlugin
git pull
cd ..
cd R2DTool
git pull
cd ..
cd SimCenterCommon
git pull
cd ..
cd OpenSRAFrontEnd
git pull
cd ..
cd OpenSRA_dev
git pull
cd ..
dir
:: Build OpenSRA
mkdir build
cd build
::qmake ..\OpenSRAFrontEnd\OpenSRA.pro
:: set CL=/MP
::nmake
C:\Qt\Tools\QtCreator\bin\jom\jom.exe
cd ..
:: Copy over the exe into the build folder
>NUL xcopy /s /y %BATCHPATH%build\release\OpenSRA.exe %BATCHPATH%build\
:: Run windeployqt to copy over the qt dlls
%QT%\windeployqt.exe %BATCHPATH%build
:: Copy over and run the QGIS script into the build folder
>NUL xcopy /s /y %BATCHPATH%QGISPlugin\InstallReleaseLibs.cmd %BATCHPATH%build\
cd build
InstallReleaseLibs
cd ..
::mkdir %BATCHPATH%build\OpenSRABackEnd
::>NUL xcopy /s /y %BATCHPATH%OpenSRA_dev %BATCHPATH%build\OpenSRABackEnd\
:: Copy over the backend
>NUL xcopy /s /y %BATCHPATH%OpenSRA_dev %BATCHPATH%build\
ECHO "Done Building OpenSRA for Windows"
ECHO "You can find OpenSRA.exe in "%BATCHPATH%build