2005-08-19 02:53:24 +02:00
|
|
|
:: This bat sets the environment values
|
2005-02-08 15:59:13 +01:00
|
|
|
:: ROOT_PATH dos format path of the main directory
|
|
|
|
:: DB_PATH unix format path of the main directory
|
2006-07-21 03:35:17 +02:00
|
|
|
:: VS_VER VisualStudio version (msvc6|msvc7|msvc8)
|
2003-10-19 15:35:32 +02:00
|
|
|
:: SERVER_NAME server needed to connect to firebird (could include port)
|
|
|
|
:: Example : localhost/3051
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2006-07-20 10:04:02 +02:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
@echo off
|
|
|
|
::=================
|
|
|
|
:SET_DB_DIR
|
|
|
|
|
2003-10-19 15:35:32 +02:00
|
|
|
@SET SERVER_NAME=localhost
|
|
|
|
|
2006-10-31 11:12:02 +01:00
|
|
|
@set PLATFORM=win32
|
|
|
|
@if %PROCESSOR_ARCHITECTURE%==x86 (set PLATFORM=win32)
|
|
|
|
@if %PROCESSOR_ARCHITECTURE%==AMD64 (set PLATFORM=x64)
|
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
@cd ..\..
|
|
|
|
@for /f "delims=" %%a in ('@cd') do (set ROOT_PATH=%%a)
|
|
|
|
@cd %~dp0
|
2006-07-20 10:04:02 +02:00
|
|
|
@for /f "tokens=*" %%a in ('@echo %ROOT_PATH:\=/%') do (set DB_PATH=%%a)
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2006-11-19 15:24:09 +01:00
|
|
|
@vcexpress /? >nul 2>nul
|
|
|
|
@if not errorlevel 9009 ((set MSVC_VERSION=8) & (set VS_VER=msvc8) & (set VS_VER_EXPRESS=1) & (goto :END))
|
|
|
|
|
|
|
|
@set VS_VER_EXPRESS=
|
|
|
|
|
2006-07-20 10:04:02 +02:00
|
|
|
@for /f "delims=." %%a in ('@devenv /?') do (
|
|
|
|
@for /f "tokens=6" %%b in ("%%a") do ((set MSVC_VERSION=%%b) & (set VS_VER=msvc%%b) & (goto :END))
|
|
|
|
)
|
2003-07-05 03:10:56 +02:00
|
|
|
|
2005-09-30 12:34:46 +02:00
|
|
|
@msdev /? >nul 2>nul
|
|
|
|
@if not errorlevel 9009 ((set MSVC_VERSION=6) & (set VS_VER=msvc6) & (goto :END))
|
|
|
|
|
2006-10-31 11:12:02 +01:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
::===========
|
|
|
|
:HELP
|
|
|
|
@echo.
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo ERROR: A working version of visual studio cannot be found on your current path.
|
|
|
|
@echo You need MS Visual Studio 6 or 7 to build Firebird from these batch files.
|
|
|
|
@echo.
|
2003-07-05 03:10:56 +02:00
|
|
|
:: set errorlevel
|
|
|
|
@exit /B 1
|
|
|
|
|
|
|
|
:END
|
|
|
|
@echo.
|
|
|
|
@echo vs_ver=%VS_VER%
|
2006-11-19 15:24:09 +01:00
|
|
|
@echo vs_ver_express=%VS_VER_EXPRESS%
|
2006-10-31 11:12:02 +01:00
|
|
|
@echo platform=%PLATFORM%
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo msvc_version=%MSVC_VERSION%
|
2003-07-05 03:10:56 +02:00
|
|
|
@echo db_path=%DB_PATH%
|
|
|
|
@echo root_path=%ROOT_PATH%
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo server_name=%SERVER_NAME%
|
2003-08-08 09:52:21 +02:00
|
|
|
@echo.
|
2006-11-19 15:24:09 +01:00
|
|
|
|
|
|
|
@exit /B 0
|