-
Notifications
You must be signed in to change notification settings - Fork 2.5k
识别安装的VS版本 #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
识别安装的VS版本 #1124
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
23 changes: 21 additions & 2 deletions
build/luac/make_win32.bat
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,25 @@ | ||
|
||
set "__VS=Visual Studio 16 2019" | ||
set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
set "__VSDISPLAY=" | ||
set "__VSVER=" | ||
if exist "%__VSWhere%" ( | ||
for /f "tokens=*" %%p in ( | ||
'"%__VSWhere%" -latest -property catalog_productLineVersion' | ||
) do set __VSDISPLAY=%%p | ||
|
||
for /f "tokens=*" %%p in ( | ||
'"%__VSWhere%" -latest -property catalog_productDisplayVersion' | ||
) do set __VSVER=%%p | ||
|
||
) | ||
if "%__VSVER%" neq "" ( | ||
set __VS=Visual Studio %__VSVER:~0,2% %__VSDisplay% | ||
) | ||
|
||
mkdir build32 & pushd build32 | ||
cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 14 2015" .. | ||
IF %ERRORLEVEL% NEQ 0 cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 15 2017" .. | ||
cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "%__VS%" -A Win32 .. | ||
IF %ERRORLEVEL% NEQ 0 cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 16 2019" -A Win32 .. | ||
popd | ||
cmake --build build32 --config Release | ||
pause |
23 changes: 21 additions & 2 deletions
build/luac/make_win64.bat
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,25 @@ | ||
|
||
set "__VS=Visual Studio 16 2019" | ||
set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
set "__VSDISPLAY=" | ||
set "__VSVER=" | ||
if exist "%__VSWhere%" ( | ||
for /f "tokens=*" %%p in ( | ||
'"%__VSWhere%" -latest -property catalog_productLineVersion' | ||
) do set __VSDISPLAY=%%p | ||
|
||
for /f "tokens=*" %%p in ( | ||
'"%__VSWhere%" -latest -property catalog_productDisplayVersion' | ||
) do set __VSVER=%%p | ||
|
||
) | ||
if "%__VSVER%" neq "" ( | ||
set __VS=Visual Studio %__VSVER:~0,2% %__VSDisplay% | ||
) | ||
|
||
mkdir build64 & pushd build64 | ||
cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 14 2015 Win64" .. | ||
IF %ERRORLEVEL% NEQ 0 cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 15 2017 Win64" .. | ||
cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "%__VS%" -A x64 .. | ||
IF %ERRORLEVEL% NEQ 0 cmake -DLUAC_COMPATIBLE_FORMAT=ON -G "Visual Studio 16 2019" -A x64 .. | ||
popd | ||
cmake --build build64 --config Release | ||
pause |
21 changes: 20 additions & 1 deletion
build/make_win32_lua53.bat
This file contains hidden or 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
21 changes: 20 additions & 1 deletion
build/make_win64_lua53.bat
This file contains hidden or 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
25 changes: 23 additions & 2 deletions
build/make_win_lua54.bat
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.