2006-11-19 15:24:09 +01:00
|
|
|
@echo off
|
|
|
|
::==============
|
|
|
|
:: compile.bat solution, output, [projects...]
|
|
|
|
:: Note: MSVC7/8 don't accept more than one project
|
2007-02-26 16:18:41 +01:00
|
|
|
::
|
|
|
|
:: Note2: Our MSVC8 projects create object files in temp/$platform/$config
|
|
|
|
:: but we call devenv with $config|$platform (note variable in reverse order
|
|
|
|
:: and odd syntax.) This extended syntax for devenv does not seem to be
|
|
|
|
:: supported in MSVC7 (despite documentation to the contrary.)
|
2006-11-19 15:24:09 +01:00
|
|
|
|
|
|
|
setlocal
|
|
|
|
set solution=%1
|
|
|
|
set output=%2
|
2007-02-26 16:18:41 +01:00
|
|
|
set projects=
|
2006-11-19 15:24:09 +01:00
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
@if "%FB_DBG%"=="" (
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
2006-11-19 15:24:09 +01:00
|
|
|
set config=Release
|
|
|
|
) else (
|
|
|
|
set config=release
|
|
|
|
)
|
|
|
|
) else (
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
|
|
|
set config=Debug
|
|
|
|
) else (
|
|
|
|
set config=debug
|
|
|
|
)
|
|
|
|
)
|
2007-02-26 16:18:41 +01:00
|
|
|
if %MSVC_VERSION% GEQ 8 (
|
|
|
|
set config="%config%|%FB_TARGET_PLATFORM%"
|
|
|
|
)
|
2006-11-19 15:24:09 +01:00
|
|
|
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
|
|
|
set exec=msdev
|
|
|
|
) else (
|
|
|
|
if "%VS_VER_EXPRESS%"=="1" (
|
|
|
|
set exec=vcexpress
|
|
|
|
) else (
|
2007-02-26 16:18:41 +01:00
|
|
|
set exec=devenv /USEENV
|
2006-11-19 15:24:09 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
|
2006-11-24 11:14:26 +01:00
|
|
|
set all_proj=1
|
2006-11-19 15:24:09 +01:00
|
|
|
:loop_start
|
|
|
|
|
|
|
|
if "%1" == "" goto loop_end
|
2006-11-24 11:14:26 +01:00
|
|
|
set all_proj=0
|
2006-11-19 15:24:09 +01:00
|
|
|
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
|
|
|
set projects=%projects% /MAKE "%1 - Win32 %config%"
|
|
|
|
) else (
|
|
|
|
set projects=%projects% /project %1
|
|
|
|
)
|
|
|
|
|
|
|
|
shift
|
|
|
|
goto loop_start
|
|
|
|
|
|
|
|
:loop_end
|
|
|
|
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
2006-11-24 11:14:26 +01:00
|
|
|
if "%all_proj%"=="1" (
|
2006-11-19 15:24:09 +01:00
|
|
|
set projects=/MAKE "all - Win32 %config%"
|
|
|
|
)
|
2006-11-24 11:14:26 +01:00
|
|
|
)
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
2007-02-26 16:18:41 +01:00
|
|
|
%exec% %solution%.dsw %projects% %FB_CLEAN% /OUT %output%
|
2006-11-19 15:24:09 +01:00
|
|
|
) else (
|
2007-02-26 16:18:41 +01:00
|
|
|
%exec% %solution%.sln %projects% %FB_CLEAN% %config% /OUT %output%
|
2006-11-19 15:24:09 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
endlocal
|
|
|
|
|
|
|
|
goto :EOF
|