-
Notifications
You must be signed in to change notification settings - Fork 0
/
make2.bat
56 lines (49 loc) · 2.02 KB
/
make2.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
@echo off
setlocal EnableExtensions EnableDelayedExpansion
if defined VisualStudioVersion (
rem vcvarsall has been called already, don't need to do anything ourselves
) else (
set vcvarsall_location_1="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"
set vcvarsall_location_2="%ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"
set vcvarsall_location_3="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
set vcvarsall_location_4="%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
set vcvarsall_location_count=4
for /L %%i in (!vcvarsall_location_count!, -1, 1) do (
set vcvarsall_location_candidate=!vcvarsall_location_%%i!
if exist !vcvarsall_location_candidate! set vcvarsall_location=!vcvarsall_location_candidate!
)
if not defined vcvarsall_location (
echo Failed to find vcvarsall.bat in any of the known places. You have two options:
echo 1^) Preferred: run vcvarsall.bat yourself before running this script. Check out https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line for more information.
echo 2^) Find where vcvarsall.bat file is on your system and add it to the list of locations in this batch file.
pause
exit /b 1
)
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE | find /i "x86" > nul
if !ERRORLEVEL! == 0 (
set vcvarsall_architecture=x86
) else (
set vcvarsall_architecture=amd64
)
set VSCMD_START_DIR=%CD%
call !vcvarsall_location! !vcvarsall_architecture!
)
mkdir obj 2> nul
cl.exe /FeMyBot2.exe /std:c++14 /O2 /MT /EHsc /I . /Fo.\obj\ ^
/D_USE_MATH_DEFINES ^
.\hlt\command.cpp ^
.\hlt\constants.cpp ^
.\hlt\dropoff.cpp ^
.\hlt\game.cpp ^
.\hlt\game_map.cpp ^
.\hlt\collision_resolver.cpp ^
.\hlt\distance_manager.cpp ^
.\hlt\objective_manager.cpp ^
.\hlt\pathfinder.cpp ^
.\hlt\scorer.cpp ^
.\hlt\move_solver.cpp ^
.\hlt\blocker.cpp ^
.\hlt\log.cpp ^
.\hlt\player.cpp ^
.\hlt\ship.cpp ^
.\MyBot2.cpp ^