Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

识别安装的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
chexiongsheng merged 1 commit into Tencent:master from oOtroyOo:bats
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions build/luac/make_win32.bat
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@

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 -G "Visual Studio 16 2019" -A Win32 ..
cmake -G "%__VS%" -A Win32 ..
popd
cmake --build build32 --config Release
md plugin_lua53\Plugins\x86
Expand Down
21 changes: 20 additions & 1 deletion build/make_win64_lua53.bat
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@

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 -G "Visual Studio 16 2019" -A x64 ..
cmake -G "%__VS%" -A x64 ..
popd
cmake --build build64 --config Release
md plugin_lua53\Plugins\x86_64
Expand Down
25 changes: 23 additions & 2 deletions build/make_win_lua54.bat
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@

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_54 & pushd build64_54
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A x64 ..
cmake -DLUA_VERSION=5.4.1 -G "%__VS%" -A x64 ..
popd
cmake --build build64_54 --config Release
md plugin_lua54\Plugins\x86_64
copy /Y build64_54\Release\xlua.dll plugin_lua54\Plugins\x86_64\xlua.dll

mkdir build32_54 & pushd build32_54
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A Win32 ..
cmake -DLUA_VERSION=5.4.1 -G "%__VS%" -A Win32 ..
popd
cmake --build build32_54 --config Release
md plugin_lua54\Plugins\x86
Expand Down

AltStyle によって変換されたページ (->オリジナル) /