-
Notifications
You must be signed in to change notification settings - Fork 1
/
prerequisites.bat
66 lines (54 loc) · 1.92 KB
/
prerequisites.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
:: Updating submodules
git submodule init
git submodule update --recursive
:: Check if an error occurred
if %errorlevel% neq 0 (
echo An error occurred. Press any key to exit...
pause >nul
exit /b %errorlevel%
)
:: Installing IbInputSimulator dependencies
:: Installing vcpkg
git clone https://github.com/microsoft/vcpkg
call .\vcpkg\bootstrap-vcpkg.bat
set "InputSimulatorBuildDir=IbInputSimulator\build"
:: Building x86
.\vcpkg\vcpkg.exe install detours rapidjson --triplet=x86-windows-static
:: Check if an error occurred
if %errorlevel% neq 0 (
echo An error occurred. Press any key to exit...
pause >nul
exit /b %errorlevel%
)
rmdir /s /q "%InputSimulatorBuildDir%"
mkdir %InputSimulatorBuildDir%
pushd %InputSimulatorBuildDir%
cmake .. -DCMAKE_TOOLCHAIN_FILE="..\..\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_GENERATOR_PLATFORM=WIN32
cmake --build . --config Debug
cmake --build . --config Release
popd
:: Check if an error occurred
if %errorlevel% neq 0 (
echo An error occurred. Press any key to exit...
pause >nul
exit /b %errorlevel%
)
xcopy "%InputSimulatorBuildDir%\Simulator\Debug" "Debug" /s /e /i /Y
xcopy "%InputSimulatorBuildDir%\Simulator\Release" "Release" /s /e /i /Y
:: Building x64
.\vcpkg\vcpkg.exe install detours rapidjson --triplet=x64-windows-static
rmdir /s /q "%InputSimulatorBuildDir%"
mkdir %InputSimulatorBuildDir%
pushd %InputSimulatorBuildDir%
cmake .. -DCMAKE_TOOLCHAIN_FILE="..\..\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build . --config Debug
cmake --build . --config Release
popd
:: Check if an error occurred
if %errorlevel% neq 0 (
echo An error occurred. Press any key to exit...
pause >nul
exit /b %errorlevel%
)
xcopy "%InputSimulatorBuildDir%\Simulator\Debug" "x64\Debug" /s /e /i /Y
xcopy "%InputSimulatorBuildDir%\Simulator\Release" "x64\Release" /s /e /i /Y