diff options
Diffstat (limited to 'make-msvc.bat')
-rw-r--r-- | make-msvc.bat | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/make-msvc.bat b/make-msvc.bat index de634fa..946274e 100644 --- a/make-msvc.bat +++ b/make-msvc.bat @@ -14,7 +14,7 @@ if exist "%ProgramFiles%" set PROGRAM_FILES_DIR=%ProgramFiles% if exist "%ProgramFiles(x86)%" set PROGRAM_FILES_DIR=%ProgramFiles(x86)% :: Determine the installed version of Visual Studio (Enterprise > 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 |