forked from SanderMertens/bake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bat
54 lines (45 loc) · 1.31 KB
/
setup.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
@echo off
rem Store PATH before importing visual studio environment
if "%BAKE_USERPATH%"=="" (
set "BAKE_USERPATH=%PATH%"
)
rem If started from visual studio prompt, use current installation
set VSDIR=%VSINSTALLDIR%
rem If not in visual studio prompt, find visual studio installation
if "%VSDIR%"=="" (
for /l %%v in (2050, -1, 2015) do (
if "%VSDIR%"=="" (
if exist "C:\Program Files\Microsoft Visual Studio\%%v\Community\" (
set VSDIR=C:\Program Files\Microsoft Visual Studio\%%v\Community
)
)
)
)
rem If not found, try in x86 program files
if "%VSDIR%"=="" (
for /l %%v in (2050, -1, 2015) do (
if "%VSDIR%"=="" (
if exist "C:\Program Files (x86^)\Microsoft Visual Studio\%%v\Community\" (
set VSDIR=C:\Program Files (x86^)\Microsoft Visual Studio\%%v\Community
)
)
)
)
if "%VSDIR%"=="" (
echo No visual studio installation found! Try running again in visual studio prompt.
goto :eof
)
echo Visual studio installation: %VSDIR%
rem Setup visual studio command line environment
call "%VSDIR%\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64
rem Build & install bake
cd build-Windows
nmake clean all /NOLOGO
cd ..
bake.exe setup
rem Cleanup env
set "PATH=%BAKE_USERPATH%"
set VSDIR=
set LIB=
set LIBPATH=
set INCLUDE=