Improvements to build.bat scripts used to build Windows builds. Remove CRT Secure warnings.
This commit is contained in:
committed by
Pasi Kallinen
parent
056ac5fe64
commit
70ac8a12af
@@ -1,4 +1,44 @@
|
||||
@echo off
|
||||
|
||||
if "%VisualStudioVersion%"=="" (
|
||||
echo MSBuild environment not set ... attempting to setup build environment.
|
||||
call :setup_environment
|
||||
)
|
||||
|
||||
if "%VisualStudioVersion%"=="" (
|
||||
echo Unable to setup build environment. Exiting.
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=Win32
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=x64
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=Win32
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
|
||||
|
||||
goto :EOF
|
||||
|
||||
:setup_environment
|
||||
|
||||
|
||||
if "%VS140COMNTOOLS%"=="" (
|
||||
call :set_vs14comntools
|
||||
)
|
||||
|
||||
if "%VS140COMNTOOLS%"=="" (
|
||||
echo Can not find Visual Studio 2015 Common Tools path.
|
||||
echo Set VS140COMNTOOLS appropriately.
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
call "%VS140COMNTOOLS%VsMSBuildCmd.bat"
|
||||
cd %~dp0
|
||||
|
||||
goto :EOF
|
||||
|
||||
:set_vs14comntools
|
||||
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Tools" (
|
||||
set "VS140COMNTOOLS=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Tools\"
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
||||
@@ -1,4 +1,44 @@
|
||||
@echo off
|
||||
|
||||
if "%VSCMD_VER%"=="" (
|
||||
echo MSBuild environment not set ... attempting to setup build environment.
|
||||
call :setup_environment
|
||||
)
|
||||
|
||||
if "%VSCMD_VER%"=="" (
|
||||
echo Unable to setup build environment. Exiting.
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=Win32
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=x64
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=Win32
|
||||
msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
|
||||
|
||||
goto :EOF
|
||||
|
||||
:setup_environment
|
||||
|
||||
|
||||
if "%VS150COMNTOOLS%"=="" (
|
||||
call :set_vs15comntools
|
||||
)
|
||||
|
||||
if "%VS150COMNTOOLS%"=="" (
|
||||
echo Can not find Visual Studio 2017 Common Tools path.
|
||||
echo Set VS150COMNTOOLS appropriately.
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
call "%VS150COMNTOOLS%VsMSBuildCmd.bat"
|
||||
cd %~dp0
|
||||
|
||||
goto :EOF
|
||||
|
||||
:set_vs15comntools
|
||||
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools" (
|
||||
set "VS150COMNTOOLS=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools\"
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
||||
Reference in New Issue
Block a user