-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpremake.bat
33 lines (25 loc) · 922 Bytes
/
premake.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
@echo off
setlocal enabledelayedexpansion
set VSVERSION=
for /f "delims=" %%f in ( '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -property catalog_productLineVersion' ) do (
if "!VSVERSION!" equ "" set VSVERSION=%%f
)
set VSINSTALL=
for /f "delims=" %%f in ( '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath' ) do (
if "!VSINSTALL!" equ "" set VSINSTALL=%%f
)
echo:
echo VSVERSION = %VSVERSION%
echo VSINSTALL = %VSINSTALL%
echo:
echo Setting up visual studio environment...
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat"
echo:
echo Checking for existing premake...
pushd %~dp0Dependencies\premake
if not exist bin\release\premake5.exe nmake -f Bootstrap.mak MSDEV=vs%VSVERSION% windows-msbuild
popd
echo:
echo Running premake...
"%~dp0Dependencies\premake\bin\release\premake5.exe" %*
endlocal