-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add batch script to automatically generate visual studio solution
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@ECHO OFF | ||
SETLOCAL | ||
|
||
REM ensure the script is always running inside the core's root directory | ||
CD %~DP0.. | ||
|
||
CALL "%~DP0install-lua.bat" | ||
CALL "%~DP0install-premake5.bat" | ||
|
||
:SELECT | ||
CLS | ||
ECHO Select installed visual studio version | ||
ECHO 1.vs2017 | ||
ECHO 2.vs2017 (Windows XP, requires toolset v141_xp to be installed) | ||
ECHO 3.vs2019 | ||
ECHO 4.vs2022 | ||
|
||
ECHO. | ||
|
||
SET /P OP="Enter your choice: " | ||
|
||
IF %OP% == 4 GOTO VS2022 | ||
IF %OP% == 3 GOTO VS2019 | ||
IF %OP% == 2 GOTO VS2017_XP | ||
IF %OP% == 1 GOTO VS2017 | ||
|
||
ECHO Invalid Option | ||
GOTO SELECT | ||
|
||
:CONFIGURE | ||
premake5 %VISUAL_STUDIO_VERSION% %PREMAKE_EXTRA_FLAGS% | ||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | ||
START build/ocgcore.sln | ||
|
||
EXIT /B | ||
|
||
|
||
:VS2017_XP | ||
SET PREMAKE_EXTRA_FLAGS="--oldwindows=true" | ||
:VS2017 | ||
SET VISUAL_STUDIO_VERSION=vs2017 | ||
GOTO CONFIGURE | ||
|
||
:VS2019 | ||
SET VISUAL_STUDIO_VERSION=vs2019 | ||
GOTO CONFIGURE | ||
|
||
:VS2022 | ||
SET VISUAL_STUDIO_VERSION=vs2022 | ||
GOTO CONFIGURE |