diff options
author | Oliver Schneider <oliver@assarbad.net> | 2017-11-24 00:18:15 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2017-11-24 00:18:15 +0300 |
commit | 76ed1ebfcd5ddc6c40bce6e193c4d8d49a35a61c (patch) | |
tree | 8ee7da777703095a7cc8b97acbb46d599b5be7ae /common | |
parent | ea449d28c1582161a3007e8c168dd56b7ce867d3 (diff) |
Rearranged some build flags in premake4.lua
Fixed up produce_vsprojects.cmd to heed the command line arguments
Reverted to original RGB_GET_?VALUE macros to prevent an exception in debug builds
Removing more parts referring to the CHM help file
Removing WEAK_ASSERT
Using --full to produce the checked in solutions
Fixed constant length to account for terminating zero
Diffstat (limited to 'common')
-rw-r--r-- | common/produce_vsprojects.cmd | 45 | ||||
-rw-r--r-- | common/wds_constants.h | 4 |
2 files changed, 41 insertions, 8 deletions
diff --git a/common/produce_vsprojects.cmd b/common/produce_vsprojects.cmd index 574a480..ab00d6d 100644 --- a/common/produce_vsprojects.cmd +++ b/common/produce_vsprojects.cmd @@ -12,15 +12,20 @@ set REPOROOT=%~dp0.. :: Directory in which this script resides ($REPOROOT/common)
set COMMON=%~dp0
:: Change into the repository root
-setlocal & pushd "%REPOROOT%"
+setlocal enableextensions & pushd "%REPOROOT%"
set OPTIONS=--resources
-if "%~1" == "--full" (set OPTIONS=--resources --sdk71)
-if "%~1" == "--sdk71" (set OPTIONS=--sdk71)
-if "%~1" == "--resources" (set OPTIONS=--resources)
-if "%~1" == "--dev" (set OPTIONS=--dev --sdk71)
+set VSVERSIONS=
+for %%i in (%*) do @(
+ if "%%~i" == "--full" call :SetVar OPTIONS "--resources --sdk71"
+ if "%%~i" == "--sdk" call :SetVar OPTIONS "--sdk71"
+ if "%%~i" == "--res" call :SetVar OPTIONS "--resources"
+ if "%%~i" == "--dev" call :SetVar OPTIONS "--dev --sdk71"
+ call :AppendVSVer VSVERSIONS "%%~i"
+)
set DEFAULT_VSVERSIONS=2005 2017
-set VSVERSIONS=%*
+echo %VSVERSIONS%
if "%VSVERSIONS%" == "" set VSVERSIONS=%DEFAULT_VSVERSIONS%
+echo Generating for %VSVERSIONS%, options: %OPTIONS%
for %%i in (%VSVERSIONS%) do @(
for %%j in (%DEFAULT_VSVERSIONS%) do @(
if "%%i" == "%%j" "%COMMON%premake4.exe" %OPTIONS% vs%%i
@@ -28,3 +33,31 @@ for %%i in (%VSVERSIONS%) do @( )
:: Back to normal
popd & endlocal
+goto :EOF
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: / SetVar subroutine
+::: Param1 == name of the variable, Param2 == value to be set for the variable
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:SetVar
+:: Get the name of the variable we are working with
+setlocal enableextensions&set VAR_NAME=%1
+endlocal & set %VAR_NAME%=%~2
+goto :EOF
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: \ SetVar subroutine
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: / AppendVSVer subroutine
+::: Param1 == value to be appended to the variable
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:AppendVSVer
+:: Get the name of the variable we are working with
+setlocal enableextensions&set ADDVAL= %~1
+if not "%ADDVAL:~1,3%" == "vs" set ADDVAL=
+endlocal & set VSVERSIONS=%VSVERSIONS%%ADDVAL%
+goto :EOF
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: \ AppendVSVer subroutine
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/common/wds_constants.h b/common/wds_constants.h index 96e0066..6a3e7f6 100644 --- a/common/wds_constants.h +++ b/common/wds_constants.h @@ -20,7 +20,7 @@ // #ifndef __WDS_CONSTANTS_H_VER__ -#define __WDS_CONSTANTS_H_VER__ 2017112218 +#define __WDS_CONSTANTS_H_VER__ 2017112319 #if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP) #pragma once #endif // Check for "#pragma once" support @@ -83,7 +83,7 @@ namespace wds /* don't need FILE_ATTRIBUTE_NO_SCRUB_DATA */ const LPCTSTR strAttributeEA = _T("+"); /*FILE_ATTRIBUTE_EA*/ - const int iLangCodeLength = _countof(STR_RESOURCE_PREFIX); + const int iLangCodeLength = _countof(STR_RESOURCE_PREFIX) - 1; const int iNumDriveLetters = (chrCapZ - chrCapA) + 1; } |