From e10150c8c389e6cd2ce41f88a3c0331ed499fb81 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 19 Nov 2024 09:04:36 +0100 Subject: Updated build settings --- StormLib.vcxproj | 4 ++-- StormLib_dll.vcxproj | 2 ++ StormLib_vs08_dll.vcproj | 2 ++ make-msvc.bat | 41 ++++++++++++++++++++++------------------- make.bat | 17 ++++++++++++----- 5 files changed, 40 insertions(+), 26 deletions(-) diff --git a/StormLib.vcxproj b/StormLib.vcxproj index 57cea24..1f206c3 100644 --- a/StormLib.vcxproj +++ b/StormLib.vcxproj @@ -71,9 +71,9 @@ {78424708-1F6E-4D4B-920C-FB6D26847055} StormLib false - 10.0.17134.0 + 10.0 StaticLibrary - v141_xp + v143 false diff --git a/StormLib_dll.vcxproj b/StormLib_dll.vcxproj index 67899f5..2acebd0 100644 --- a/StormLib_dll.vcxproj +++ b/StormLib_dll.vcxproj @@ -155,6 +155,7 @@ false MachineX86 + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -179,6 +180,7 @@ false MachineX64 + /PDBALTPATH:%_PDB% %(AdditionalOptions) diff --git a/StormLib_vs08_dll.vcproj b/StormLib_vs08_dll.vcproj index b51db31..8379700 100644 --- a/StormLib_vs08_dll.vcproj +++ b/StormLib_vs08_dll.vcproj @@ -214,6 +214,7 @@ /> Professional > Community) -::if exist "%PROGRAM_FILES_DIR%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" set VCVARS_2008=%PROGRAM_FILES_DIR%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat +if exist "%PROGRAM_FILES_DIR%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" set VCVARS_2008=%PROGRAM_FILES_DIR%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat if exist "%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat if exist "%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat if exist "%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_DIR%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat @@ -26,8 +26,8 @@ if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Professional\VC\Auxil if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat :: Build all libraries using Visual Studio 2008 and 202x -if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x86 %LIB_NAME%_vs08.sln \vs2008 -if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x64 %LIB_NAME%_vs08.sln \vs2008 +if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x86 %LIB_NAME%_vs08.sln vs2008 +if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x64 %LIB_NAME%_vs08.sln vs2008 if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x86 %LIB_NAME%.sln if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x64 %LIB_NAME%.sln goto:eof @@ -47,18 +47,18 @@ goto:eof if not exist %1 goto:eof call %1 %2 if "%2" == "x86" set SLN_TRG=Win32 -if "%2" == "x86" set LIB_TRG=lib32%4 +if "%2" == "x86" set LIB_TRG=lib32\%4 if "%2" == "x64" set SLN_TRG=x64 -if "%2" == "x64" set LIB_TRG=lib64%4 +if "%2" == "x64" set LIB_TRG=lib64\%4 -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% DebugAD -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% DebugAS -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% DebugUD -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% DebugUS -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% ReleaseAD -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% ReleaseAS -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% ReleaseUD -call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% ReleaseUS +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%DAD DebugAD +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%DAS DebugAS +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%DUD DebugUD +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%DUS DebugUS +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%RAD ReleaseAD +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%RAS ReleaseAS +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%RUD ReleaseUD +call :BuildAndCopyLib %3 %SLN_TRG% %LIB_TRG% %LIB_NAME%RUS ReleaseUS :: Restore environment variables to the old values set INCLUDE=%SAVE_INCLUDE% @@ -82,14 +82,17 @@ goto:eof :: %1 Plain name of the .sln solution file :: %2 Target build platform ("Win32" or "x64") :: %3 Target directory for the library ("lib32", "lib32\vs2008", "lib64" or "lib64\vs2008") -:: %4 Subvariant of the library ("DebugAD", "ReleaseUS", ...) +:: %4 Base name of the target, such as CascLibDAD +:: %5 Subvariant of the library ("DebugAD", "ReleaseUS", ...) :: :BuildAndCopyLib if not exist %1 goto:eof -devenv.com %1 /project "%LIB_NAME%" /rebuild "%4|%2" +devenv.com %1 /project "%LIB_NAME%" /rebuild "%5|%2" if not exist ..\aaa goto:eof -xcopy.exe /Y /D .\src\StormLib.h ..\aaa\inc >nul -xcopy.exe /Y /D .\src\StormPort.h ..\aaa\inc >nul -xcopy.exe /Y /D .\bin\StormLib\%2\%4\*.lib ..\aaa\%3 >nul - +if not exist ..\aaa\inc md ..\aaa\inc +if not exist ..\aaa\%3 md ..\aaa\%3 +copy /Y /D .\src\StormLib.h ..\aaa\inc >nul +copy /Y /D .\src\StormPort.h ..\aaa\inc >nul +copy /Y /D .\bin\StormLib\%2\%5\%4.lib ..\aaa\%3\%4.lib >nul +copy /Y /D .\bin\StormLib\%2\%5\%4.pdb ..\aaa\%3\%4.pdb >nul diff --git a/make.bat b/make.bat index 7b29207..1ec3d52 100644 --- a/make.bat +++ b/make.bat @@ -9,6 +9,7 @@ goto:eof :SELECT_LIB set PROJECT_DIR=%~dp0 set LIBRARY_NAME=StormLibWDK +set SAVE_PATH=%PATH% :PREPARE_SOURCES echo Preparing sources ... @@ -34,13 +35,19 @@ build.exe -czgw del buildfre_wlh_amd64.log echo. -:COPY_LIBS -xcopy /Y /D .\src\StormLib.h ..\aaa\inc >nul -xcopy /Y /D .\src\StormPort.h ..\aaa\inc >nul -xcopy /Y /D .\objfre_w2k_x86\i386\%LIBRARY_NAME%.lib ..\aaa\lib32\%LIBRARY_NAME%.lib >nul -xcopy /Y /D .\objfre_wlh_amd64\amd64\%LIBRARY_NAME%.lib ..\aaa\lib64\%LIBRARY_NAME%.lib >nul +:COPY_OUTPUT +if not exist ..\aaa goto CLEANUP +if not exist ..\aaa\inc md ..\aaa\inc +if not exist ..\aaa\lib32 md ..\aaa\lib32 +if not exist ..\aaa\lib64 md ..\aaa\lib64 +copy /Y .\src\StormLib.h ..\aaa\inc >nul +copy /Y .\src\StormPort.h ..\aaa\inc >nul +copy /Y .\objfre_wlh_amd64\amd64\%LIBRARY_NAME%.lib ..\aaa\lib64\%LIBRARY_NAME%.lib >nul +copy /Y .\objfre_w2k_x86\i386\%LIBRARY_NAME%.lib ..\aaa\lib32\%LIBRARY_NAME%.lib >nul :CLEANUP if exist sources-cpp.cpp del sources-cpp.cpp if exist sources-wdk-* del sources-wdk-* if exist build.bat del build.bat +set PATH=%SAVE_PATH% +set SAVE_PATH= -- cgit v1.2.3