2007-02-26 16:18:41 +01:00
|
|
|
:: This batch file sets the environment values
|
|
|
|
:: FB_ROOT_PATH dos format path of the main directory
|
2019-04-25 17:20:02 +02:00
|
|
|
:: FB_LONG_ROOT_PATH long format path of the main directory
|
2007-02-26 16:18:41 +01:00
|
|
|
:: FB_DB_PATH unix format path of the main directory
|
2007-09-06 15:25:04 +02:00
|
|
|
:: (This is used by gpre and preprocess.bat)
|
2016-05-31 19:30:54 +02:00
|
|
|
:: VS_VER VisualStudio version (msvc10|msvc12|msvc14)
|
2003-10-19 15:35:32 +02:00
|
|
|
:: SERVER_NAME server needed to connect to firebird (could include port)
|
|
|
|
:: Example : localhost/3051
|
2007-01-04 14:26:02 +01:00
|
|
|
:: (Note - SERVER_NAME is almost deprecated - it is only used by
|
|
|
|
:: make_examples.bat
|
2007-02-26 16:18:41 +01:00
|
|
|
::
|
2006-07-20 10:04:02 +02:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
@echo off
|
2007-02-26 16:18:41 +01:00
|
|
|
|
2009-03-04 03:48:18 +01:00
|
|
|
::set FB_PROCESSOR_ARCHITECTURE=AMD64
|
|
|
|
|
2008-03-19 19:53:48 +01:00
|
|
|
:: Default target CPU architecture is the native environment
|
|
|
|
if NOT DEFINED FB_PROCESSOR_ARCHITECTURE (
|
|
|
|
set FB_PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITECTURE%
|
|
|
|
)
|
|
|
|
|
2019-04-25 17:20:02 +02:00
|
|
|
::=================
|
|
|
|
:SET_MSVC_VER
|
2009-03-04 03:48:18 +01:00
|
|
|
|
2018-09-02 15:02:58 +02:00
|
|
|
if DEFINED VS150COMNTOOLS (
|
2019-04-25 17:20:02 +02:00
|
|
|
@set MSVC_VERSION=15
|
2018-09-02 15:02:58 +02:00
|
|
|
) else (
|
2016-03-17 11:01:59 +01:00
|
|
|
if DEFINED VS140COMNTOOLS (
|
2019-04-25 17:20:02 +02:00
|
|
|
@set MSVC_VERSION=14
|
2016-03-17 11:01:59 +01:00
|
|
|
) else (
|
2014-11-14 12:04:48 +01:00
|
|
|
if DEFINED VS120COMNTOOLS (
|
2019-04-25 17:20:02 +02:00
|
|
|
@set MSVC_VERSION=12
|
2014-11-14 12:04:48 +01:00
|
|
|
) else (
|
2010-06-27 05:47:40 +02:00
|
|
|
if DEFINED VS100COMNTOOLS (
|
2019-04-25 17:20:02 +02:00
|
|
|
@set MSVC_VERSION=10
|
2010-06-27 05:47:40 +02:00
|
|
|
) else (
|
2008-09-02 10:52:09 +02:00
|
|
|
@goto :HELP
|
|
|
|
)
|
2007-02-26 16:18:41 +01:00
|
|
|
)
|
|
|
|
)
|
2018-09-02 15:02:58 +02:00
|
|
|
)
|
2019-04-25 17:20:02 +02:00
|
|
|
|
|
|
|
set VS_VER=msvc%MSVC_VERSION%
|
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo.
|
|
|
|
|
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
::=================
|
|
|
|
:SET_DB_DIR
|
|
|
|
|
2003-10-19 15:35:32 +02:00
|
|
|
@SET SERVER_NAME=localhost
|
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
@cd ..\..
|
2019-04-25 17:20:02 +02:00
|
|
|
@for /f "delims=" %%a in ('@cd') do (set FB_LONG_ROOT_PATH=%%a)
|
2015-11-06 17:58:06 +01:00
|
|
|
@for /f "delims=" %%a in ('@cd') do (set FB_ROOT_PATH=%%~sa)
|
2003-07-05 03:10:56 +02:00
|
|
|
@cd %~dp0
|
2007-02-26 16:18:41 +01:00
|
|
|
@for /f "tokens=*" %%a in ('@echo %FB_ROOT_PATH:\=/%') do (set FB_DB_PATH=%%a)
|
|
|
|
|
2008-09-02 10:52:09 +02:00
|
|
|
|
2019-04-25 17:20:02 +02:00
|
|
|
::=================
|
2007-02-26 16:18:41 +01:00
|
|
|
:SET_FB_TARGET_PLATFORM
|
2007-09-06 15:25:04 +02:00
|
|
|
@set FB_TARGET_PLATFORM=Win32
|
2008-03-19 19:53:48 +01:00
|
|
|
@if "%FB_PROCESSOR_ARCHITECTURE%"=="x86" (set FB_TARGET_PLATFORM=Win32)
|
|
|
|
@if "%FB_PROCESSOR_ARCHITECTURE%"=="AMD64" (set FB_TARGET_PLATFORM=x64)
|
2007-02-26 16:18:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%
|
|
|
|
@set FB_TEMP_DIR=%FB_ROOT_PATH%\temp\%FB_TARGET_PLATFORM%
|
|
|
|
@set FB_INSTALL_SCRIPTS=%FB_ROOT_PATH%\builds\install\arch-specific\win32
|
2010-10-21 00:15:48 +02:00
|
|
|
@set FB_GEN_DIR=%FB_ROOT_PATH%\gen
|
|
|
|
@set FB_GEN_DB_DIR=%FB_DB_PATH%/gen
|
2007-09-17 10:14:06 +02:00
|
|
|
@set FB_ICU_SOURCE_BIN=%FB_ROOT_PATH%\extern\icu\%FB_TARGET_PLATFORM%\release\bin\
|
2016-09-07 12:21:56 +02:00
|
|
|
@set FIREBIRD_BOOT_BUILD=1
|
2007-09-06 15:25:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 16:18:41 +01:00
|
|
|
goto :END
|
2005-09-30 12:34:46 +02:00
|
|
|
|
2006-10-31 11:12:02 +01:00
|
|
|
|
2003-07-05 03:10:56 +02:00
|
|
|
::===========
|
|
|
|
:HELP
|
|
|
|
@echo.
|
2007-01-04 14:26:02 +01:00
|
|
|
@echo ERROR:
|
|
|
|
@echo A working version of Visual Studio cannot be found
|
|
|
|
@echo on your current path.
|
|
|
|
@echo.
|
2016-03-25 07:45:21 +01:00
|
|
|
@echo You need MS Visual Studio 8 or newer to build Firebird
|
2007-01-04 14:26:02 +01:00
|
|
|
@echo from these batch files.
|
|
|
|
@echo.
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo A properly installed version of Visual Studio will set
|
2016-03-25 07:45:21 +01:00
|
|
|
@echo an environment variable such as %%VS80COMNTOOLS%%.
|
|
|
|
@echo We use that variable to run the appropriate batch file
|
|
|
|
@echo to set up the build environment.
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo.
|
2003-07-05 03:10:56 +02:00
|
|
|
:: set errorlevel
|
|
|
|
@exit /B 1
|
|
|
|
|
|
|
|
:END
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo.
|
2007-01-04 14:26:02 +01:00
|
|
|
@echo Setting Environment Variables thus...
|
2003-07-05 03:10:56 +02:00
|
|
|
@echo.
|
|
|
|
@echo vs_ver=%VS_VER%
|
2007-02-26 16:18:41 +01:00
|
|
|
if defined VS_VER_EXPRESS (
|
2006-11-19 15:24:09 +01:00
|
|
|
@echo vs_ver_express=%VS_VER_EXPRESS%
|
2007-02-26 16:18:41 +01:00
|
|
|
)
|
|
|
|
@echo platform=%FB_TARGET_PLATFORM%
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo msvc_version=%MSVC_VERSION%
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo db_path=%FB_DB_PATH%
|
|
|
|
@echo root_path=%FB_ROOT_PATH%
|
2005-02-08 15:59:13 +01:00
|
|
|
@echo server_name=%SERVER_NAME%
|
2003-08-08 09:52:21 +02:00
|
|
|
@echo.
|
2007-01-04 14:26:02 +01:00
|
|
|
@echo (End of %0)
|
2007-02-26 16:18:41 +01:00
|
|
|
@echo.
|
2006-11-19 15:24:09 +01:00
|
|
|
|
|
|
|
@exit /B 0
|