8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Refined Windows package creation (#251)

This commit is contained in:
Dimitry Sibiryakov 2020-01-15 14:50:18 +01:00 committed by Dmitry Yemanov
parent 4fb0dfb655
commit 9164797892
12 changed files with 284 additions and 428 deletions

View File

@ -1,2 +1,2 @@
[InternetShortcut] [InternetShortcut]
URL=http://www.firebirdsql.org/afterinstall/$MAJOR$MINOR$RELEASE URL=http://www.firebirdsql.org/afterinstall/{#FB_MAJOR_VER}{#FB_MINOR_VER}{#FB_REV_NO}

View File

@ -22,6 +22,8 @@
::============================================================================ ::============================================================================
:SET_PARAMS :SET_PARAMS
::=========
@echo off @echo off
:: reset ERRLEV to clear error from last run in same cmd shell :: reset ERRLEV to clear error from last run in same cmd shell
set ERRLEV=0 set ERRLEV=0
@ -35,21 +37,6 @@ set FBBUILD_ISX_PACK=0
if not defined FB2_SNAPSHOT (set FB2_SNAPSHOT=0) if not defined FB2_SNAPSHOT (set FB2_SNAPSHOT=0)
:: Set our package number at 0 and increment every
:: time we rebuild in a single session
if not defined FBBUILD_PACKAGE_NUMBER (
set FBBUILD_PACKAGE_NUMBER=0
) else (
set /A FBBUILD_PACKAGE_NUMBER+=1
)
@echo Setting FBBUILD_PACKAGE_NUMBER to %FBBUILD_PACKAGE_NUMBER%
::If a suffix is defined (usually for an RC) ensure it is prefixed correctly.
if defined FBBUILD_FILENAME_SUFFIX (
if not "%FBBUILD_FILENAME_SUFFIX:~0,1%"=="_" (
(set FBBUILD_FILENAME_SUFFIX=_%FBBUILD_FILENAME_SUFFIX%)
)
)
:: See what we have on the command line :: See what we have on the command line
@ -61,39 +48,12 @@ for %%v in ( %* ) do (
( if /I "%%v"=="ALL" ( (set FBBUILD_ZIP_PACK=1) & (set FBBUILD_ISX_PACK=1) ) ) ( if /I "%%v"=="ALL" ( (set FBBUILD_ZIP_PACK=1) & (set FBBUILD_ISX_PACK=1) ) )
) )
:: Now check whether we are debugging the InnoSetup script
@if %FB2_ISS_DEBUG% equ 0 (@set ISS_BUILD_TYPE=iss_release) else (@set ISS_BUILD_TYPE=iss_debug)
@if %FB2_ISS_DEBUG% equ 0 (@set ISS_COMPRESS=compression) else (@set ISS_COMPRESS=nocompression)
(@set ISS_EXAMPLES=examples)
@if %FB2_ISS_DEBUG% equ 1 (
@if %FB2_EXAMPLES% equ 0 (@set ISS_EXAMPLES=noexamples)
)
::Are we doing a snapshot build? If so we always do less work. ::Are we doing a snapshot build? If so we always do less work.
if "%FB2_SNAPSHOT%"=="1" ( if "%FB2_SNAPSHOT%"=="1" (
(set FB_ISS_EXAMPLES=noexamples)
(set FBBUILD_ISX_PACK=0) (set FBBUILD_ISX_PACK=0)
) )
:: Set up our final destination
set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
if not exist %FBBUILD_INSTALL_IMAGES% (mkdir %FBBUILD_INSTALL_IMAGES%)
:: Determine Product Status
set FBBUILD_PROD_STATUS=
@type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I UNSTABLE > nul && (
set FBBUILD_PROD_STATUS=DEV) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I ALPHA > nul && (
set FBBUILD_PROD_STATUS=DEV) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I BETA > nul && (
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I "Release Candidate" > nul && (
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr "RC" > nul && (
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I "Final" > nul && (
set FBBUILD_PROD_STATUS=PROD)
::End of SET_PARAMS ::End of SET_PARAMS
::----------------- ::-----------------
@goto :EOF @goto :EOF
@ -110,6 +70,19 @@ set FBBUILD_PROD_STATUS=PROD)
@echo o Checking for unix2dos... @echo o Checking for unix2dos...
(cmd /c "unix2dos.exe --version 2>&1 | findstr version > nul" ) || ( call :ERROR Could not locate unix2dos && @goto :EOF ) (cmd /c "unix2dos.exe --version 2>&1 | findstr version > nul" ) || ( call :ERROR Could not locate unix2dos && @goto :EOF )
@for /f "usebackq tokens=*" %%c in (`where /f touch 2^>nul`) do set TOUCH_COMMAND=%%c
if defined TOUCH_COMMAND (
@%TOUCH_COMMAND% --version <nul >nul 2>nul
if not errorlevel 1 (
@echo o POSIX touch utility found at %TOUCH_COMMAND%
) else ( @set TOUCH_COMMAND= )
)
@for /f "usebackq tokens=*" %%c in (`where /f md5sum 2^>nul`) do set MD5_COMMAND=%%c
if defined MD5_COMMAND (
@echo o POSIX md5sum utility found at %MD5_COMMAND%
)
if %FBBUILD_ZIP_PACK% EQU 1 ( if %FBBUILD_ZIP_PACK% EQU 1 (
if not defined SEVENZIP ( if not defined SEVENZIP (
call :ERROR SEVENZIP environment variable is not defined. call :ERROR SEVENZIP environment variable is not defined.
@ -117,33 +90,40 @@ if %FBBUILD_ZIP_PACK% EQU 1 (
) else (@echo o Compression utility found.) ) else (@echo o Compression utility found.)
) )
if %FBBUILD_ISX_PACK% NEQ 1 goto :SKIP_INNO
if %FBBUILD_ISX_PACK% EQU 1 ( if defined INNO5_SETUP_PATH (
if NOT DEFINED INNO5_SETUP_PATH ( set ISCC_COMMAND=%INNO5_SETUP_PATH%\iscc.exe
call :ERROR INNO5_SETUP_PATH variable not defined
@goto :EOF
) else (
@echo o Inno Setup found at %INNO5_SETUP_PATH%.
)
) )
:: If the environment variable is not set let's search in PATH
if not defined ISCC_COMMAND (
@for /f "usebackq tokens=*" %%c in (`where /f iscc 2^>nul`) do set ISCC_COMMAND=%%c
)
if not defined ISCC_COMMAND (
@echo Required Inno Setup compiler not found
@exit /b 1
)
@echo o Inno Setup found as %ISCC_COMMAND%.
:SKIP_INNO
if not defined WIX ( if not defined WIX (
call :ERROR WIX not defined. WiX is needed to build the MSI kits of the CRT runtimes. @echo.
@goto :EOF @echo The WIX environment var not defined.
@echo WiX is needed to build the MSI kits of the CRT runtimes.
@echo.
) else ( ) else (
@echo o WiX found at "%WIX%". @echo o WiX found at "%WIX%".
) )
if not DEFINED FB_EXTERNAL_DOCS ( if not defined FB_EXTERNAL_DOCS (
@echo. @echo.
@echo The FB_EXTERNAL_DOCS environment var is not defined @echo The FB_EXTERNAL_DOCS environment var is not defined
@echo It should point to the directory containing the relevant release notes @echo It should point to the directory containing the relevant release notes
@echo in adobe pdf format. @echo in adobe pdf format.
@echo. @echo.
@echo Subsequent script execution will be cancelled. ) else (
@echo. @echo o Package will include documentation from "%FB_EXTERNAL_DOCS%".
cancel_script > nul 2>&1
goto :EOF
) )
@ -152,94 +132,69 @@ if not DEFINED FB_EXTERNAL_DOCS (
@goto :EOF @goto :EOF
:SED_MAGIC :SET_VERSION
:: Do some sed magic to make sure that the final product ::==========
:: includes the version string in the filename.
:: If the Firebird Unix tools for Win32 aren't on
:: the path this will fail! Use of the cygwin tools has not
:: been tested and may produce unexpected results.
::========================================================
find "#define PRODUCT_VER_STRING" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
sed -n -e s/\"//g -e s/"#define PRODUCT_VER_STRING "//w%temp%.\b$2.txt %temp%.\b$1.txt
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FBBUILD_PRODUCT_VER_STRING=%%a
find "#define FB_MAJOR_VER" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt :: Cut off everything that is not #define to let Inno Setup use it
sed -n -e s/\"//g -e s/"#define FB_MAJOR_VER "//w%temp%.\b$2.txt %temp%.\b$1.txt findstr /B /L "#define" "%FB_ROOT_PATH%\src\jrd\build_no.h" >"%FB_ROOT_PATH%\gen\jrd\build_no.h"
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_MAJOR_VER=%%a :: Read version parameters from build_no.h
for /F "tokens=2*" %%a in (%FB_ROOT_PATH%\gen\jrd\build_no.h) do (
@echo Setting %%a to %%~b
SET %%a=%%~b
)
find "#define FB_MINOR_VER" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt :: Set our package number at 0 and increment every
sed -n -e s/\"//g -e s/"#define FB_MINOR_VER "//w%temp%.\b$2.txt %temp%.\b$1.txt :: time we rebuild in a single session
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_MINOR_VER=%%a if not defined FBBUILD_PACKAGE_NUMBER (
set FBBUILD_PACKAGE_NUMBER=0
) else (
set /A FBBUILD_PACKAGE_NUMBER+=1
)
@echo Setting FBBUILD_PACKAGE_NUMBER to %FBBUILD_PACKAGE_NUMBER%
find "#define FB_REV_NO" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt :: If a suffix is defined (usually for an RC) ensure it is prefixed correctly.
sed -n -e s/\"//g -e s/"#define FB_REV_NO "//w%temp%.\b$2.txt %temp%.\b$1.txt if defined FBBUILD_FILENAME_SUFFIX (
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_REV_NO=%%a if not "%FBBUILD_FILENAME_SUFFIX:~0,1%"=="_" (
(set FBBUILD_FILENAME_SUFFIX=_%FBBUILD_FILENAME_SUFFIX%)
)
)
find "#define FB_BUILD_NO" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt :: Set up our final destination
sed -n -e s/\"//g -e s/"#define FB_BUILD_NO "//w%temp%.\b$2.txt %temp%.\b$1.txt set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_BUILD_NO=%%a if not exist "%FBBUILD_INSTALL_IMAGES%" (mkdir "%FBBUILD_INSTALL_IMAGES%")
set FBBUILD_FILE_ID=%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%_%FB_TARGET_PLATFORM% :: Determine Product Status
if %FB_BUILD_TYPE%==V (
set FBBUILD_PROD_STATUS=PROD
) else (
set FBBUILD_PROD_STATUS=DEV
)
::@echo s/-2.0.0-/-%FBBUILD_PRODUCT_VER_STRING%-/ > %temp%.\b$3.txt set FBBUILD_FILE_ID=%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%_%FB_TARGET_PLATFORM%
@echo s/define release/define %FBBUILD_BUILDTYPE%/ > %temp%.\b$3.txt
@echo s/define no_pdb/define %FBBUILD_SHIP_PDB%/ >> %temp%.\b$3.txt
::@echo s/define package_number=\"0\"/define package_number=\"%FBBUILD_PACKAGE_NUMBER%\"/ >> %temp%.\b$3.txt
@echo s/define iss_release/define %ISS_BUILD_TYPE%/ >> %temp%.\b$3.txt
@echo s/define examples/define %ISS_EXAMPLES%/ >> %temp%.\b$3.txt
@echo s/define compression/define %ISS_COMPRESS%/ >> %temp%.\b$3.txt
@echo s/FBBUILD_PRODUCT_VER_STRING/%FBBUILD_PRODUCT_VER_STRING%/ >> %temp%.\b$3.txt
sed -f %temp%.\b$3.txt FirebirdInstall.iss > FirebirdInstall_%FBBUILD_FILE_ID%.iss @setlocal
@echo.
:: This is a better way of achieving what is done in make_all.bat, but we don't
:: test for sed in that script.
@sed /@UDF_COMMENT@/s/@UDF_COMMENT@/#/ < %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_OUTPUT_DIR%\firebird.conf
set FBBUILD_FB40_CUR_VER=%FB_MAJOR_VER%.%FB_MINOR_VER%.%FB_REV_NO%
set FBBUILD_FB_CUR_VER=%FBBUILD_FB40_CUR_VER%
set FBBUILD_FB_LAST_VER=%FBBUILD_FB30_CUR_VER%
:: Now set some version strings of our legacy releases.
:: This helps us copy the correct documentation,
:: as well as set up the correct shortcuts
set FBBUILD_FB15_CUR_VER=1.5.6
set FBBUILD_FB20_CUR_VER=2.0.7
set FBBUILD_FB21_CUR_VER=2.1.7
set FBBUILD_FB25_CUR_VER=2.5.8
set FBBUILD_FB30_CUR_VER=3.0.4
:: Now fix up the major.minor version strings in the readme files.
:: We place output in %FB_GEN_DIR%\readmes
@if not exist %FB_GEN_DIR%\readmes (@mkdir %FB_GEN_DIR%\readmes) @if not exist %FB_GEN_DIR%\readmes (@mkdir %FB_GEN_DIR%\readmes)
@for %%d in (ba cz de es fr hu it pl pt ru si ) do ( set SED_COMMAND=sed -e s/\$MAJOR/%FB_MAJOR_VER%/g ^
@if not exist %FB_GEN_DIR%\readmes\%%d ( -e s/\$MINOR/%FB_MINOR_VER%/g ^
@mkdir %FB_GEN_DIR%\readmes\%%d -e s/\$RELEASE/%FB_REV_NO%/g
) @echo Processing version strings in Readme_%FBBUILD_PROD_STATUS%.txt
) @%SED_COMMAND% Readme_%FBBUILD_PROD_STATUS%.txt > %FB_GEN_DIR%\readmes\Readme.txt
@for %%f in (installation_readme.txt) do (
@echo s/\$MAJOR/%FB_MAJOR_VER%/g > %temp%.\b$4.txt
@echo s/\$MINOR/%FB_MINOR_VER%/g >> %temp%.\b$4.txt
@echo s/\$RELEASE/%FB_REV_NO%/g >> %temp%.\b$4.txt
@echo %FBBUILD_PROD_STATUS% release. Copying Readme_%FBBUILD_PROD_STATUS%.txt Readme.txt
@copy Readme_%FBBUILD_PROD_STATUS%.txt Readme.txt
@for %%f in (Readme.txt installation_readme.txt After_Installation.url) do (
@echo Processing version strings in %%f @echo Processing version strings in %%f
@sed -f %temp%.\b$4.txt %%f > %FB_GEN_DIR%\readmes\%%f @%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
) )
@for %%d in (ba cz de es fr hu it pl pt ru si ) do ( @for %%d in (ba cz de es fr hu it pl pt ru si ) do (
@pushd %%d @if not exist %FB_GEN_DIR%\readmes\%%d (@mkdir %FB_GEN_DIR%\readmes\%%d)
@for /F %%f in ( '@dir /B /A-D *.txt' ) do ( @for %%f in ( %%d\*.txt ) do (
@echo Processing version strings in %%d\%%f @echo Processing version strings in %%f
@sed -f %temp%.\b$4.txt %%f > %FB_GEN_DIR%\readmes\%%d\%%f @%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
) )
@popd
) )
del %temp%.\b$?.txt @endlocal
::End of SET_VERSION
::End of SED_MAGIC
::---------------- ::----------------
@goto :EOF @goto :EOF
@ -268,14 +223,14 @@ if %MSVC_VERSION% EQU 15 (
) )
for %%f in ( msvcp%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll vcruntime%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll ) do ( for %%f in ( msvcp%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll vcruntime%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll ) do (
echo Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" echo Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f"
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" %FB_OUTPUT_DIR%\ copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" %FB_OUTPUT_DIR%\ >nul
if %ERRORLEVEL% GEQ 1 ( if %ERRORLEVEL% GEQ 1 (
call :ERROR Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" failed with error %ERRORLEVEL% ) && (goto :EOF) call :ERROR Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" failed with error %ERRORLEVEL% ) && (goto :EOF)
) )
) )
@implib.exe | findstr "Borland" > nul @where /Q implib.exe
@if errorlevel 0 ( @if not errorlevel 1 (
if "%VSCMD_ARG_TGT_ARCH%"=="x86" ( if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
@echo Generating fbclient_bor.lib @echo Generating fbclient_bor.lib
@implib %FB_OUTPUT_DIR%\lib\fbclient_bor.lib %FB_OUTPUT_DIR%\fbclient.dll > nul @implib %FB_OUTPUT_DIR%\lib\fbclient_bor.lib %FB_OUTPUT_DIR%\fbclient.dll > nul
@ -325,13 +280,8 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
goto :EOF goto :EOF
) )
@echo Copying other documentation... @echo Copying other documentation...
@copy %FB_GEN_DIR%\readmes\installation_readme.txt %FB_OUTPUT_DIR%\doc\installation_readme.txt > nul @copy %FB_GEN_DIR%\readmes\installation_readme.txt %FB_OUTPUT_DIR%\doc\installation_readme.txt > nul
:: WhatsNew doesn't exist at the moment (Alpha1) - perhaps it will turn up later in the release cycle.
:: In any case, if it is not an error if it doesn't exist
@ren %FB_OUTPUT_DIR%\doc\WhatsNew %FB_OUTPUT_DIR%\doc\WhatsNew.txt
:: FIX ME - we now have some .md files and ChangeLog is no longer a monster. :: FIX ME - we now have some .md files and ChangeLog is no longer a monster.
:: Maybe we can just do nothing here. :: Maybe we can just do nothing here.
@ -342,7 +292,6 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
:: @copy %FB_ROOT_PATH%\ChangeLog %FB_OUTPUT_DIR%\doc\ChangeLog.txt > nul :: @copy %FB_ROOT_PATH%\ChangeLog %FB_OUTPUT_DIR%\doc\ChangeLog.txt > nul
::) ::)
@mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul @mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
@if %ERRORLEVEL% GEQ 2 ( (call :ERROR MKDIR for doc\sql.extensions dir failed) & (@goto :EOF)) @if %ERRORLEVEL% GEQ 2 ( (call :ERROR MKDIR for doc\sql.extensions dir failed) & (@goto :EOF))
@copy %FB_ROOT_PATH%\doc\sql.extensions\*.* %FB_OUTPUT_DIR%\doc\sql.extensions\ > nul @copy %FB_ROOT_PATH%\doc\sql.extensions\*.* %FB_OUTPUT_DIR%\doc\sql.extensions\ > nul
@ -353,7 +302,7 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
:: if the docs are available then we can include them. :: if the docs are available then we can include them.
if defined FB_EXTERNAL_DOCS ( if defined FB_EXTERNAL_DOCS (
@echo Copying pdf docs... @echo Copying pdf docs...
@for %%v in ( Firebird-%FB_MAJOR_VER%.%FB_MINOR_VER%-QuickStart.pdf Firebird_v%FBBUILD_FB_CUR_VER%.ReleaseNotes.pdf ) do ( @for %%v in ( Firebird-%FB_MAJOR_VER%.%FB_MINOR_VER%-QuickStart.pdf Firebird_v%FB_MAJOR_VER%.%FB_MINOR_VER%.%FB_REV_NO%.ReleaseNotes.pdf ) do (
@echo ... %%v @echo ... %%v
(@copy /Y %FB_EXTERNAL_DOCS%\%%v %FB_OUTPUT_DIR%\doc\%%v > nul) || (call :WARNING Copying %FB_EXTERNAL_DOCS%\%%v failed.) (@copy /Y %FB_EXTERNAL_DOCS%\%%v %FB_OUTPUT_DIR%\doc\%%v > nul) || (call :WARNING Copying %FB_EXTERNAL_DOCS%\%%v failed.)
) )
@ -361,42 +310,46 @@ if defined FB_EXTERNAL_DOCS (
@echo. @echo.
) )
@echo Cleaning irrelevant files...
:: Clean out text notes that are either not relevant to Windows or :: Clean out text notes that are either not relevant to Windows or
:: are only of use to engine developers. :: are only of use to engine developers.
@for %%v in ( README.makefiles README.user.embedded README.user.troubleshooting README.build.mingw.html README.build.msvc.html fb2-todo.txt cleaning-todo.txt install_win32.txt README.coding.style emacros-cross_ref.html firebird_conf.txt *.*~) do ( @for %%v in ( README.makefiles README.user.embedded README.user.troubleshooting README.build.mingw.html README.build.msvc.html fb2-todo.txt cleaning-todo.txt install_win32.txt README.coding.style emacros-cross_ref.html firebird_conf.txt *.*~) do (
@del %FB_OUTPUT_DIR%\doc\%%v 2>nul @del %FB_OUTPUT_DIR%\doc\%%v 2>nul
) )
@echo Copy license...
:: Add license :: Add license
for %%v in (IPLicense.txt IDPLicense.txt ) do ( for %%v in (IPLicense.txt IDPLicense.txt ) do (
@copy %FB_ROOT_PATH%\builds\install\misc\%%v %FB_OUTPUT_DIR%\%%v > nul @copy %FB_ROOT_PATH%\builds\install\misc\%%v %FB_OUTPUT_DIR%\%%v > nul
) )
:: And readme :: And readme
@copy %FB_GEN_DIR%\readmes\readme.txt %FB_OUTPUT_DIR%\ > nul @copy %FB_GEN_DIR%\readmes\Readme.txt %FB_OUTPUT_DIR%\ > nul
:: Walk through all docs and transform any that are not .txt, .pdf or .html to .txt :: Walk through all docs and transform any that are not .txt, .pdf or .html to .txt
@echo Setting .txt filetype to ascii docs. @echo Setting .txt filetype to ascii docs.
for /R %FB_OUTPUT_DIR%\doc %%v in (.) do ( for /R %FB_OUTPUT_DIR%\doc %%v in ( * ) do (
pushd %%v if /I not "%%~xv" == ".md" (
for /F %%W in ( 'dir /B /A-D' ) do ( if /I not "%%~xv" == ".txt" (
if /I "%%~xW" NEQ ".txt" ( if /I not "%%~xv" == ".pdf" (
if /I "%%~xW" NEQ ".pdf" ( if /I not "%%~xv" == ".htm" (
if /I "%%~xW" NEQ ".htm" ( if /I not "%%~xv" == ".html" (
if /I "%%~xW" NEQ ".html" ( ren %%v %%~nxv.txt
ren %%W %%W.txt
) )
) )
) )
) )
) )
popd
) )
:: Throw away any errorlevel left hanging around if %FB2_SNAPSHOT% EQU 1 (
@set | findstr win > nul @copy %FB_ROOT_PATH%\builds\install\arch-specific\win32\readme_snapshot.txt %FB_OUTPUT_DIR%\readme_snapshot.txt > nul
)
@echo Completed copying docs. @echo Completed copying docs.
:: Examples were already copied by make_examples
::End of COPY_XTRA ::End of COPY_XTRA
::---------------- ::----------------
@goto :EOF @goto :EOF
@ -426,6 +379,7 @@ if %MSVC_VERSION% EQU 15 (
:INCLUDE_DIR :INCLUDE_DIR
::==========
:: Prepare other files needed for deployment to /include dir :: Prepare other files needed for deployment to /include dir
setlocal setlocal
:: grab some missing bits'n'pieces from different parts of the source tree :: grab some missing bits'n'pieces from different parts of the source tree
@ -437,8 +391,8 @@ setlocal
@echo Copying other include files required for development... @echo Copying other include files required for development...
set OUTPATH=%FB_OUTPUT_DIR%\include set OUTPATH=%FB_OUTPUT_DIR%\include
@copy %FB_ROOT_PATH%\src\yvalve\perf.h %OUTPATH%\ > nul @copy %FB_ROOT_PATH%\src\yvalve\perf.h %OUTPATH%\ > nul
@copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ && @goto :EOF ) @copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ )
@xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\impl %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing @xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\* %OUTPATH%\firebird\ && @goto :EOF ) @xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\impl %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing @xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\* %OUTPATH%\firebird\ )
@if %ERRLEV% GEQ 1 goto :END @if %ERRLEV% GEQ 1 goto :END
endlocal endlocal
@ -494,85 +448,40 @@ copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databa
:: Get a list of all files in the tree make sure :: Get a list of all files in the tree make sure
:: that and they all have windows EOL :: that and they all have windows EOL
::=============================================== ::===============================================
for /F %%W in ( 'dir %FB_OUTPUT_DIR% /b /a-d /s' ) do ( for /R %FB_OUTPUT_DIR% %%W in ( *.txt *.conf *.sql *.c *.cpp *.hpp *.h *.bat *.pas *.e *.def *.rc *.md *.html ) do (
for %%X in ( txt conf sql c cpp hpp h bat pas e def rc md ) do ( unix2dos -q --safe %%W || exit /b 1
if /I "%%~xW" EQU ".%%X" ( unix2dos --u2d --safe %%W 2>nul >nul )
)
) )
::End of SET_CRLF ::End of SET_CRLF
::------------- ::-------------
@goto :EOF @goto :EOF
:GEN_ZIP
::======
if %FBBUILD_ZIP_PACK% EQU 0 goto :EOF
@echo - Generate the directory tree to be zipped
set FBBUILD_ZIP_PACK_ROOT=%FB_ROOT_PATH%\builds\zip_pack_%FB_TARGET_PLATFORM%
if not exist %FBBUILD_ZIP_PACK_ROOT% @mkdir %FBBUILD_ZIP_PACK_ROOT% 2>nul
@del /s /q %FBBUILD_ZIP_PACK_ROOT%\ > nul
::@copy /Y %FB_OUTPUT_DIR% %FBBUILD_ZIP_PACK_ROOT% > nul
::for %%v in (doc doc\sql.extensions help include intl lib udf misc misc\upgrade\security plugins system32 ) do (
:: @mkdir %FBBUILD_ZIP_PACK_ROOT%\%%v 2>nul
:: @dir /b /a-d /s %FB_OUTPUT_DIR%\%%v\*.* >nul 2>nul
:: if not ERRORLEVEL 1 @copy /Y %FB_OUTPUT_DIR%\%%v\*.* %FBBUILD_ZIP_PACK_ROOT%\%%v\ > nul
::)
@xcopy /Y /E /S %FB_OUTPUT_DIR% %FBBUILD_ZIP_PACK_ROOT% > nul
@echo - Add examples to zip tree
@xcopy /Y /E /S %FB_OUTPUT_DIR%\examples\*.* %FBBUILD_ZIP_PACK_ROOT%\examples > nul
::@if %FB2_EXAMPLES% equ 1 for %%v in (examples examples\api examples\build_win32 examples\dbcrypt examples\empbuild examples\include examples\interfaces examples\package examples\stat examples\udf examples\udr ) do (
:: @mkdir %FBBUILD_ZIP_PACK_ROOT%\%%v 2>nul
:: dir %FB_OUTPUT_DIR%\%%v\*.* > nul 2>nul
:: if not ERRORLEVEL 1 @copy /Y %FB_OUTPUT_DIR%\%%v\*.* %FBBUILD_ZIP_PACK_ROOT%\%%v\ > nul
::)
@echo - Now remove stuff from zip tree that is not needed...
setlocal
set FB_RM_FILE_LIST=doc\installation_readme.txt system32\vccrt%MSVC_VERSION%_%FB_TARGET_PLATFORM%.wixpdb icudt52l_empty.dat
for %%v in ( %FB_RM_FILE_LIST% ) do (
@del %FBBUILD_ZIP_PACK_ROOT%\%%v > nul 2>&1
)
endlocal
if %FB2_SNAPSHOT% EQU 1 (
@copy %FB_ROOT_PATH%\builds\install\arch-specific\win32\readme_snapshot.txt %FBBUILD_ZIP_PACK_ROOT%\readme_snapshot.txt > nul
)
if not "%FBBUILD_SHIP_PDB%"=="ship_pdb" (
@del /q %FBBUILD_ZIP_PACK_ROOT%\*.pdb > nul 2>&1
)
rmdir /s /q %FBBUILD_ZIP_PACK_ROOT%\examples\build_unix
:: Don't grab old install notes for zip pack - document needs a complete re-write.
::@copy %FB_ROOT_PATH%\doc\install_win32.txt %FBBUILD_ZIP_PACK_ROOT%\doc\README_installation.txt > nul
::End of GEN_ZIP
::--------------
goto :EOF
:ZIP_PACK :ZIP_PACK
::======= ::=======
if %FBBUILD_ZIP_PACK% EQU 0 goto :EOF :: Forcefully disable delayed expansion because of exclamation marks in 7z switches
if "%FBBUILD_SHIP_PDB%" == "ship_pdb" ( setlocal DisableDelayedExpansion
if exist %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip (
@del %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
)
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
set SKIP_FILES=-x!installation_readme.txt
if "%FBBUILD_SHIP_PDB%" == "ship_pdb" (
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
) else ( ) else (
if exist %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip (
@del %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip
)
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip
set SKIP_FILES=%SKIP_FILES% -x!*.pdb
) )
@%SEVENZIP%\7z.exe a -r -tzip -mx9 %FBBUILD_ZIPFILE% %FBBUILD_ZIP_PACK_ROOT%\*.* if "%FB2_EXAMPLES%" == "0" set SKIP_FILES=%SKIP_FILES% -xr-!examples
@echo End of ZIP_PACK
@echo. if exist %FBBUILD_ZIPFILE% (
@del %FBBUILD_ZIPFILE%
)
%SEVENZIP%\7z.exe a -r -tzip -mx9 %SKIP_FILES% %FBBUILD_ZIPFILE% %FB_OUTPUT_DIR%\*.*
endlocal
::End of ZIP_PACK
::---------------- ::----------------
@goto :EOF @goto :EOF
@ -583,12 +492,23 @@ if "%FBBUILD_SHIP_PDB%" == "ship_pdb" (
::While building and testing this feature might be annoying, so we don't do it. ::While building and testing this feature might be annoying, so we don't do it.
::========================================================== ::==========================================================
setlocal setlocal
set TIMESTRING=0%PRODUCT_VER_STRING:~0,1%:0%PRODUCT_VER_STRING:~2,1%:0%PRODUCT_VER_STRING:~4,1%
@if /I "%BUILDTYPE%"=="release" ( if /I not "%FBBUILD_BUILDTYPE%"=="release" goto :EOF
(@echo Touching release build files with %TIMESTRING% timestamp) & (touch -s -D -t%TIMESTRING% %FB_OUTPUT_DIR%\*.*) if not defined TOUCH_COMMAND echo POSIX touch utility not found && exit /b 1
(if %FBBUILD_ZIP_PACK% EQU 1 (@echo Touching release build files with %TIMESTRING% timestamp) & (touch -s -D -t%TIMESTRING% %FB_ROOT_PATH%\zip_pack\*.*) )
set TIMESTRING=0%FB_MAJOR_VER%:0%FB_MINOR_VER%:0%FB_REV_NO%
:: Perhaps here we should touch directories as well
:: Here and there XXX_COMMAND is "call"-ed in case if it is a batch file
@echo Touching release build files with %TIMESTRING% timestamp
@for /R %FB_OUTPUT_DIR% %%F in ( * ) do (
call %TOUCH_COMMAND% -c -d %TIMESTRING% %%F || exit /b 1
) )
endlocal endlocal
::End of TOUCH_ALL ::End of TOUCH_ALL
::---------------- ::----------------
@goto :EOF @goto :EOF
@ -602,14 +522,11 @@ endlocal
:: eg set INNO5_SETUP_PATH="C:\Program Files\Inno Setup 5" :: eg set INNO5_SETUP_PATH="C:\Program Files\Inno Setup 5"
:: ::
::================================================= ::=================================================
if %FBBUILD_ISX_PACK% NEQ 1 goto :EOF
@echo Now let's compile the InnoSetup scripts
@echo. @echo.
%INNO5_SETUP_PATH%\iscc %FB_ROOT_PATH%\builds\install\arch-specific\win32\FirebirdInstall_%FBBUILD_FILE_ID%.iss call %ISCC_COMMAND% %FB_ROOT_PATH%\builds\install\arch-specific\win32\FirebirdInstall.iss
@echo. @echo.
@echo End of ISX_PACK ::End of ISX_PACK
@echo.
::--------------- ::---------------
@goto :EOF @goto :EOF
@ -618,15 +535,25 @@ if %FBBUILD_ISX_PACK% NEQ 1 goto :EOF
::========= ::=========
:: Generate the md5sum checksum file :: Generate the md5sum checksum file
::================================== ::==================================
if NOT DEFINED GNU_TOOLCHAIN ( if not defined MD5_COMMAND (
call :WARNING GNU_TOOLCHAIN variable not defined. Cannot generate md5 sums. call :WARNING md5sum utility not found. Cannot generate md5 sums.
@goto :EOF @goto :EOF
) )
@echo Generating md5sums for Firebird-%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER% @echo Generating md5sums for Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%
%GNU_TOOLCHAIN%\md5sum.exe %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_PRODUCT_VER_STRING%?%FBBUILD_PACKAGE_NUMBER%*.* > %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum :: write sums into temporary file to avoid including it into the process
pushd %FBBUILD_INSTALL_IMAGES%
call %MD5_COMMAND% Firebird-%PRODUCT_VER_STRING%?%FBBUILD_PACKAGE_NUMBER%*.* >md5sum.tmp
::--------------- :: then rename it to the proper name
if not errorlevel 1 (
del Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum >nul 2>nul
ren md5sum.tmp Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum
)
popd
::End of DO_MD5SUMS
::-----------------
@goto :EOF @goto :EOF
@ -654,7 +581,7 @@ if NOT DEFINED GNU_TOOLCHAIN (
@echo. @echo.
@echo HELP This help screen. @echo HELP This help screen.
@echo. @echo.
@echo In addition, the following environment variables are checked: @echo In addition, the following environment variables are checked by ISS script:
@echo. @echo.
@echo FB2_ISS_DEBUG=1 - Prepare an InnoSetup script that is @echo FB2_ISS_DEBUG=1 - Prepare an InnoSetup script that is
@echo easier to debug @echo easier to debug
@ -729,7 +656,6 @@ popd
@if errorlevel 1 (goto :END) @if errorlevel 1 (goto :END)
@if not defined FB2_ISS_DEBUG (set FB2_ISS_DEBUG=0) @if not defined FB2_ISS_DEBUG (set FB2_ISS_DEBUG=0)
@if not defined FB2_EXAMPLES (set FB2_EXAMPLES=1)
@echo. @echo.
@echo Reading command-line parameters... @echo Reading command-line parameters...
@ -742,7 +668,7 @@ popd
@echo. @echo.
@echo Setting version number... @echo Setting version number...
@(@call :SED_MAGIC ) || (@echo Error calling SED_MAGIC && @goto :END) @(@call :SET_VERSION ) || (@echo Error calling SET_VERSION && @goto :END)
@echo. @echo.
@echo Copying additional files needed for installation, documentation etc. @echo Copying additional files needed for installation, documentation etc.
@ -776,13 +702,6 @@ if defined WIX (
@(@call :SET_CRLF ) || (@echo Error calling SET_CRLF && @goto :EOF) @(@call :SET_CRLF ) || (@echo Error calling SET_CRLF && @goto :EOF)
@echo. @echo.
if %FBBUILD_ZIP_PACK% EQU 1 (
@echo Generating image of zipped install
@(@call :GEN_ZIP ) || (@echo Error calling GEN_ZIP && @goto :END)
@echo.
)
::@echo Creating .local files for libraries ::@echo Creating .local files for libraries
::@(@call :TOUCH_LOCAL ) || (@echo Error calling TOUCH_LOCAL & @goto :END) ::@(@call :TOUCH_LOCAL ) || (@echo Error calling TOUCH_LOCAL & @goto :END)
::@echo. ::@echo.
@ -797,6 +716,7 @@ if %FBBUILD_ZIP_PACK% EQU 1 (
) )
if %FBBUILD_ISX_PACK% EQU 1 ( if %FBBUILD_ISX_PACK% EQU 1 (
@echo Now let's compile the InnoSetup scripts
@(@call :ISX_PACK ) || (@echo Error calling ISX_PACK && @goto :END) @(@call :ISX_PACK ) || (@echo Error calling ISX_PACK && @goto :END)
@echo. @echo.
) )
@ -815,7 +735,7 @@ if %FBBUILD_ISX_PACK% EQU 1 (
:END :END
popd
exit /b exit /b

View File

@ -49,30 +49,46 @@
#define FirebirdURL MyAppURL #define FirebirdURL MyAppURL
#define UninstallBinary "{app}\firebird.exe" #define UninstallBinary "{app}\firebird.exe"
#define Root GetEnv("FB_ROOT_PATH")
#if Root == ""
;We are not run from batch file, let's set some sane defaults
#define Root = "..\..\..\.."
;Assume iss debug as well
#define iss_debug
#else
#endif
#if GetEnv("FB2_ISS_DEBUG") == "1"
#define iss_debug
#endif
#if GetEnv("FBBUILD_SHIP_PDB") == "ship_pdb"
#define ship_pdb
#endif
;Get version information from build_no.h
#include Root + "\gen\jrd\build_no.h"
;Hard code some defaults to aid debugging and running script standalone. ;Hard code some defaults to aid debugging and running script standalone.
;In practice, these values are set in the environment and we use the env vars. ;In practice, these values are set in the environment and we use the env vars.
#define MajorVer "4" #define PackageNumber GetEnv("FBBUILD_PACKAGE_NUMBER")
#define MinorVer "0" #if PackageNumber == ""
#define PointRelease "0"
#define BuildNumber "0"
#define PackageNumber "0" #define PackageNumber "0"
#define FilenameSuffix "" #endif
#define FilenameSuffix GetEnv("FBBUILD_FILENAME_SUFFIX")
#if FilenameSuffix != "" && pos('_',FilenameSuffix) == 0
#define FilenameSuffix "_" + FilenameSuffix
#endif
;-------Start of Innosetup script debug flags section ;-------Start of Innosetup script debug flags section
; if iss_release is undefined then iss_debug is set ; if iss_debug is undefined then iss_release is set
; Setting iss_release implies that the defines for files, ; Setting iss_release implies that the defines for files,
; examples and compression are set. If debug is set then this ; examples and compression are set. If debug is set then this
; section controls the settings of files, examples ; section controls the settings of files, examples
; and compression. ; and compression.
; A dynamically generated sed script sets the appropriate define
; See BuildExecutableInstall.bat for more details.
;#define iss_debug
#ifndef iss_debug #ifndef iss_debug
#define iss_release #define iss_release
#endif #endif
@ -80,10 +96,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
#ifdef iss_release #ifdef iss_release
#define files #define files
#if GetEnv("FB2_EXAMPLES") != "0"
#define examples #define examples
#endif
#define compression #define compression
#else #define i18n
#define iss_debug
#endif #endif
;-------------------- ;--------------------
@ -107,72 +124,8 @@
;-------end of Innosetup script debug flags section ;-------end of Innosetup script debug flags section
;-------Start of Innosetup script ;-------Start of Innosetup script
;---- These three defines need a bit of tidying up in the near future,
; but for now they must stay, as the BuildExecutableInstall.bat
; uses them.
#define release
#define no_pdb
#define i18n
;------If necessary we can turn off i18n by uncommenting this undefine
;------In general this is a good idea for alpha and beta releases.
#undef i18n
;----- If we are debugging the script (and not executed from command prompt)
;----- there is no guarantee that the environment variable exists. However an
;----- expression such as #define FB_MAJOR_VER GetEnv("FB_MAJOR_VER") will
;----- 'define' the macro anyway so we need to test for a valid env var before
;----- we define our macro.
#if Len(GetEnv("FB_MAJOR_VER")) > 0
#define FB_MAJOR_VER GetEnv("FB_MAJOR_VER")
#endif
#ifdef FB_MAJOR_VER
#define MajorVer FB_MAJOR_VER
#endif
#if Len(GetEnv("FB_MINOR_VER")) > 0
#define FB_MINOR_VER GetEnv("FB_MINOR_VER")
#endif
#ifdef FB_MINOR_VER
#define MinorVer FB_MINOR_VER
#endif
#if Len(GetEnv("FB_REV_NO")) > 0
#define FB_REV_NO GetEnv("FB_REV_NO")
#endif
#ifdef FB_REV_NO
#define PointRelease FB_REV_NO
#endif
#if Len(GetEnv("FB_BUILD_NO")) > 0
#define FB_BUILD_NO GetEnv("FB_BUILD_NO")
#endif
#ifdef FB_BUILD_NO
#define BuildNumber FB_BUILD_NO
#endif
#if Len(GetEnv("FBBUILD_PACKAGE_NUMBER")) > 0
#define FBBUILD_PACKAGE_NUMBER GetEnv("FBBUILD_PACKAGE_NUMBER")
#endif
#ifdef FBBUILD_PACKAGE_NUMBER
#define PackageNumber FBBUILD_PACKAGE_NUMBER
#endif
#if Len(GetEnv("FBBUILD_FILENAME_SUFFIX")) > 0
#define FBBUILD_FILENAME_SUFFIX GetEnv("FBBUILD_FILENAME_SUFFIX")
#endif
#ifdef FBBUILD_FILENAME_SUFFIX
#define FilenameSuffix FBBUILD_FILENAME_SUFFIX
#if pos('_',FilenameSuffix) == 0
#define FilenameSuffix "_" + FilenameSuffix
#endif
#endif
#if Len(GetEnv("MSVC_VERSION")) > 0 #if Len(GetEnv("MSVC_VERSION")) > 0
#define msvc_version GetEnv("MSVC_VERSION") #define msvc_version GetEnv("MSVC_VERSION")
#else #else
@ -212,10 +165,10 @@
#define msvcr_filename = "vcruntime" #define msvcr_filename = "vcruntime"
#endif #endif
#if BuildNumber == "0" #if FB_BUILD_NO == "0"
#define MyAppVerString MajorVer + "." + MinorVer + "." + PointRelease #define MyAppVerString FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO
#else #else
#define MyAppVerString MajorVer + "." + MinorVer + "." + PointRelease + "." + BuildNumber #define MyAppVerString FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO + "." + FB_BUILD_NO
#endif #endif
#define MyAppVerName MyAppName + " " + MyAppVerString #define MyAppVerName MyAppName + " " + MyAppVerString
@ -224,11 +177,16 @@
#define PlatformTarget GetEnv("FB_TARGET_PLATFORM") #define PlatformTarget GetEnv("FB_TARGET_PLATFORM")
#endif #endif
#if PlatformTarget == "" #if PlatformTarget == ""
;Assume native platform
#if IsWin64
#define PlatformTarget "x64"
#else
#define PlatformTarget "win32" #define PlatformTarget "win32"
#endif #endif
#endif
#if FB_BUILD_TYPE == "T"
;If we are still under development we can ignore some missing files. ;If we are still under development we can ignore some missing files.
#if GetEnv("FBBUILD_PROD_STATUS") == "DEV"
#define SkipFileIfDevStatus " skipifsourcedoesntexist " #define SkipFileIfDevStatus " skipifsourcedoesntexist "
#else #else
#define SkipFileIfDevStatus " " #define SkipFileIfDevStatus " "
@ -240,21 +198,12 @@
#define WOW64Dir="output_win32" #define WOW64Dir="output_win32"
#endif #endif
;BaseVer should be used for all MajorVer.MinorVer installs. ;BaseVer should be used for all FB_MAJOR_VER.FB_MINOR_VER installs.
;This allows us to upgrade silently from MajorVer.MinorVer.m to MajorVer.MinorVer.n ;This allows us to upgrade silently from FB_MAJOR_VER.FB_MINOR_VER.m to FB_MAJOR_VER.FB_MINOR_VER.n
#define BaseVer MajorVer + "_" + MinorVer #define BaseVer FB_MAJOR_VER + "_" + FB_MINOR_VER
#define AppVer MajorVer + "_" + MinorVer #define AppVer FB_MAJOR_VER + "_" + FB_MINOR_VER
#define GroupnameVer MajorVer + "." + MinorVer #define GroupnameVer FB_MAJOR_VER + "." + FB_MINOR_VER
#define FB_cur_ver FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO
;These variables are set in BuildExecutableInstall
#define FB15_cur_ver GetEnv("FBBUILD_FB15_CUR_VER")
#define FB20_cur_ver GetEnv("FBBUILD_FB20_CUR_VER")
#define FB21_cur_ver GetEnv("FBBUILD_FB21_CUR_VER")
#define FB25_cur_ver GetEnv("FBBUILD_FB25_CUR_VER")
#define FB30_cur_ver GetEnv("FBBUILD_FB30_CUR_VER")
#define FB40_cur_ver GetEnv("FBBUILD_FB40_CUR_VER")
#define FB_cur_ver FB40_cur_ver
#define FB_last_ver FB30_cur_ver
; We can save space by shipping a pdb package that just includes ; We can save space by shipping a pdb package that just includes
; the pdb files. It would then upgrade an existing installation, ; the pdb files. It would then upgrade an existing installation,
@ -276,7 +225,7 @@
#else #else
#define pdb_str="" #define pdb_str=""
#endif #endif
#ifdef debug #if GetEnv("FBBUILD_BUILDTYPE") == "debug"
#define debug_str="_debug" #define debug_str="_debug"
#else #else
#define debug_str="" #define debug_str=""
@ -300,7 +249,7 @@ AppUpdatesURL={#MyAppURL}
AppVersion={#MyAppVerString} AppVersion={#MyAppVerString}
VersionInfoVersion={#MyAppVerString} VersionInfoVersion={#MyAppVerString}
SourceDir=..\..\..\..\ SourceDir={#Root}
OutputBaseFilename={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix} OutputBaseFilename={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix}
;OutputManifestFile={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix}_Setup-Manifest.txt ;OutputManifestFile={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix}_Setup-Manifest.txt
OutputDir=builds\install_images OutputDir=builds\install_images
@ -342,7 +291,7 @@ SetupLogging=yes
#endif #endif
[Languages] [Languages]
Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: {#GenDir}\installation_readme.txt; InfoAfterFile: {#GenDir}\readme.txt; Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: {#GenDir}\installation_readme.txt; InfoAfterFile: {#GenDir}\Readme.txt;
#ifdef i18n #ifdef i18n
Name: ba; MessagesFile: compiler:Languages\Bosnian.isl; InfoBeforeFile: {#GenDir}\ba\Instalacija_ProcitajMe.txt; InfoAfterFile: {#GenDir}\ba\ProcitajMe.txt; Name: ba; MessagesFile: compiler:Languages\Bosnian.isl; InfoBeforeFile: {#GenDir}\ba\Instalacija_ProcitajMe.txt; InfoAfterFile: {#GenDir}\ba\ProcitajMe.txt;
Name: cz; MessagesFile: compiler:Languages\Czech.isl; InfoBeforeFile: {#GenDir}\cz\instalace_ctime.txt; InfoAfterFile: {#GenDir}\cz\ctime.txt; Name: cz; MessagesFile: compiler:Languages\Czech.isl; InfoBeforeFile: {#GenDir}\cz\instalace_ctime.txt; InfoAfterFile: {#GenDir}\cz\ctime.txt;
@ -389,21 +338,6 @@ Name: ru; MessagesFile: compiler:Languages\Russian.isl; InfoBeforeFile: {#GenDir
;#include "si\custom_messages_si.inc" ;#include "si\custom_messages_si.inc"
#endif #endif
#ifdef iss_debug
; *** Note - this comment section needs revision or deletion.
; It is only applicable to the ansi installer, which is no longer
; supported for Firebird 3
; By default, the languages available at runtime depend on the user's
; code page. A user with the Western European code page set will not
; even see that we support installation with the czech language
; for example.
; It can be useful when debugging to force the display of all available
; languages by setting LanguageCodePage to 0. Of course, if the langauge
; is not supported by the user's current code page it will be unusable.
[LangOptions]
LanguageCodePage=0
#endif
[Types] [Types]
Name: ServerInstall; Description: {cm:ServerInstall} Name: ServerInstall; Description: {cm:ServerInstall}
Name: DeveloperInstall; Description: {cm:DeveloperInstall} Name: DeveloperInstall; Description: {cm:DeveloperInstall}
@ -478,7 +412,7 @@ Name: {group}\Firebird Server; Filename: {app}\firebird.exe; Parameters: {code:S
Name: {group}\Firebird Guardian; Filename: {app}\fbguard.exe; Parameters: {code:StartAppParams}; Flags: runminimized; MinVersion: 4.0,4.0; Check: InstallGuardianIcon; IconIndex: 1; Components: ServerComponent; Comment: Run Firebird Server (with guardian); Name: {group}\Firebird Guardian; Filename: {app}\fbguard.exe; Parameters: {code:StartAppParams}; Flags: runminimized; MinVersion: 4.0,4.0; Check: InstallGuardianIcon; IconIndex: 1; Components: ServerComponent; Comment: Run Firebird Server (with guardian);
Name: {group}\Firebird ISQL Tool; Filename: {app}\isql.exe; Parameters: -z; WorkingDir: {app}; MinVersion: 4.0,4.0; Comment: {cm:RunISQL} Name: {group}\Firebird ISQL Tool; Filename: {app}\isql.exe; Parameters: -z; WorkingDir: {app}; MinVersion: 4.0,4.0; Comment: {cm:RunISQL}
Name: {group}\Firebird {#FB_cur_ver} Release Notes; Filename: {app}\doc\Firebird_v{#FB_cur_ver}.ReleaseNotes.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {cm:ReleaseNotes} Name: {group}\Firebird {#FB_cur_ver} Release Notes; Filename: {app}\doc\Firebird_v{#FB_cur_ver}.ReleaseNotes.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {cm:ReleaseNotes}
;Name: {group}\Firebird {#GroupnameVer} Quick Start Guide; Filename: {app}\doc\Firebird-{#MajorVer}-QuickStart.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {#FB_cur_ver} ;Name: {group}\Firebird {#GroupnameVer} Quick Start Guide; Filename: {app}\doc\Firebird-{#FB_MAJOR_VER}-QuickStart.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {#FB_cur_ver}
Name: "{group}\After Installation"; Filename: "{app}\doc\After_Installation.url"; Comment: "New User? Here's a quick guide to what you should do next." Name: "{group}\After Installation"; Filename: "{app}\doc\After_Installation.url"; Comment: "New User? Here's a quick guide to what you should do next."
Name: "{group}\Firebird Web-site"; Filename: "{app}\doc\firebirdsql.org.url" Name: "{group}\Firebird Web-site"; Filename: "{app}\doc\firebirdsql.org.url"
;Always install the original english version ;Always install the original english version
@ -493,7 +427,7 @@ Name: {group}\{cm:Uninstall,{#FB_cur_ver}}; Filename: {uninstallexe}; Comment: U
#ifdef files #ifdef files
Source: {#LicensesDir}\IPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion; Source: {#LicensesDir}\IPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion;
Source: {#LicensesDir}\IDPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion Source: {#LicensesDir}\IDPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#ScriptsDir}\After_Installation.url; DestDir: {app}\doc; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion Source: {#file "After_Installation.url"}; DestDir: {app}\doc; DestName: "After_Installation.url"; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion
Source: {#ScriptsDir}\firebirdsql.org.url; DestDir: {app}\doc; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion Source: {#ScriptsDir}\firebirdsql.org.url; DestDir: {app}\doc; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion
;Always install the original english version ;Always install the original english version
Source: {#GenDir}\readme.txt; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion; Source: {#GenDir}\readme.txt; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion;
@ -543,8 +477,8 @@ Source: {#FilesDir}\fbsvcmgr.exe; DestDir: {app}; Components: DevAdminComponent;
Source: {#FilesDir}\fbtracemgr.exe; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion Source: {#FilesDir}\fbtracemgr.exe; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion
Source: {#FilesDir}\fbclient.dll; DestDir: {app}; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder Source: {#FilesDir}\fbclient.dll; DestDir: {app}; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder
#if PlatformTarget == "x64" #if PlatformTarget == "x64"
Source: {#WOW64Dir}\fbclient.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder Source: {#WOW64Dir}\fbclient.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder {#SkipFileIfDevStatus}
Source: {#WOW64Dir}\instclient.exe; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion Source: {#WOW64Dir}\instclient.exe; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
#endif #endif
Source: {#FilesDir}\icuuc??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion Source: {#FilesDir}\icuuc??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion
Source: {#FilesDir}\icuin??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion Source: {#FilesDir}\icuin??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion
@ -563,8 +497,8 @@ Source: {#FilesDir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime
Source: {#FilesDir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile; Source: {#FilesDir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
#if PlatformTarget == "x64" #if PlatformTarget == "x64"
;If we are installing on x64 we need some 32-bit libraries for compatibility with 32-bit applications ;If we are installing on x64 we need some 32-bit libraries for compatibility with 32-bit applications
Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile; Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile {#SkipFileIfDevStatus};
Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile; Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile {#SkipFileIfDevStatus};
#endif #endif
#endif /* #if Int(msvc_runtime_major_version,14) >= 10 */ #endif /* #if Int(msvc_runtime_major_version,14) >= 10 */
@ -572,10 +506,10 @@ Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_versi
#if PlatformTarget == "x64" #if PlatformTarget == "x64"
;MinVersion 0,5.0 means no version of Win9x and at least Win2k if NT O/S ;MinVersion 0,5.0 means no version of Win9x and at least Win2k if NT O/S
;In addition, O/S must have Windows Installer 3.0. ;In addition, O/S must have Windows Installer 3.0.
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_x64.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_x64.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
Source: {#WOW64Dir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Source: {#WOW64Dir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
#else #else
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
#endif #endif
#endif #endif
@ -592,7 +526,7 @@ Source: {#FilesDir}\intl\fbintl.dll; DestDir: {app}\intl; Components: ServerComp
Source: {#FilesDir}\intl\fbintl.conf; DestDir: {app}\intl; Components: ServerComponent; Flags: onlyifdoesntexist Source: {#FilesDir}\intl\fbintl.conf; DestDir: {app}\intl; Components: ServerComponent; Flags: onlyifdoesntexist
Source: {#FilesDir}\lib\*.*; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion; Source: {#FilesDir}\lib\*.*; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion;
#if PlatformTarget == "x64" #if PlatformTarget == "x64"
Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion {#SkipFileIfDevStatus}
#endif #endif
;deprecated in FB4.0 ;deprecated in FB4.0
@ -832,7 +766,7 @@ begin
InstallRootDir := Default; // but the user has changed the default InstallRootDir := Default; // but the user has changed the default
if (( InstallRootDir = '') and if (( InstallRootDir = '') and
( FirebirdVer[0] = {#MajorVer} ) and ( FirebirdVer[1] = {#MinorVer} ) ) then // Firebird 2.n is installed ( FirebirdVer[0] = {#FB_MAJOR_VER} ) and ( FirebirdVer[1] = {#FB_MINOR_VER} ) ) then // Firebird 2.n is installed
InstallRootDir := FirebirdRootDir; // but the user has changed the default InstallRootDir := FirebirdRootDir; // but the user has changed the default
// if we haven't found anything then try the FIREBIRD env var // if we haven't found anything then try the FIREBIRD env var

View File

@ -28,6 +28,8 @@ considered ready for use in production.
o Please make sure you read the installation o Please make sure you read the installation
readme and the release notes. readme and the release notes.
Reporting Bugs Reporting Bugs
============== ==============

View File

@ -9,7 +9,7 @@ documentatation i18n should be available separately. I18n is a
good thing, but bloating the installer with large amounts of translated good thing, but bloating the installer with large amounts of translated
documentation is not desirable. documentation is not desirable.
The current version of InnoSetup used by Firebird $MAJOR.$MINOR - 5.5.8 - provides The current version of InnoSetup used by Firebird - 5.5.8 - provides
generic support for the following languages: generic support for the following languages:
BrazilianPortuguese, Catalan, Corsican, Czech, Danish, Dutch, Finnish, French, BrazilianPortuguese, Catalan, Corsican, Czech, Danish, Dutch, Finnish, French,

View File

@ -180,7 +180,7 @@
# the same restrictions as in previous FB versions. To specify access # the same restrictions as in previous FB versions. To specify access
# to specific trees, enum all required paths (for Windows this may be # to specific trees, enum all required paths (for Windows this may be
# something like 'C:\ExternalFunctions', for unix - '/db/udf;/mnt/udf'). # something like 'C:\ExternalFunctions', for unix - '/db/udf;/mnt/udf').
@UDF_COMMENT@ #
# NOTE: THE EXTERNAL FUNCTION ENGINE FEATURE COULD BE USED TO COMPROMISE # NOTE: THE EXTERNAL FUNCTION ENGINE FEATURE COULD BE USED TO COMPROMISE
# THE SERVER/HOST AS WELL AS DATABASE SECURITY!! # THE SERVER/HOST AS WELL AS DATABASE SECURITY!!
# #

View File

@ -64,8 +64,7 @@ for %%v in (gpre_boot build_msg codes) do (
:: Firebird.conf, etc :: Firebird.conf, etc
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR% > nul @copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR% > nul
:: The line @UDF_COMMENT@ should be deleted from the target file. @copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in %FB_OUTPUT_DIR%\firebird.conf
findstr /V "@UDF_COMMENT@" %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_OUTPUT_DIR%\firebird.conf
@copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databases.conf >nul @copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databases.conf >nul
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl >nul @copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl >nul
@copy %FB_ROOT_PATH%\builds\install\misc\plugins.conf %FB_OUTPUT_DIR% >nul @copy %FB_ROOT_PATH%\builds\install\misc\plugins.conf %FB_OUTPUT_DIR% >nul

View File

@ -75,7 +75,7 @@ if "%ERRLEV%"=="1" goto :END
call :isql call :isql
if "%ERRLEV%"=="1" goto :END if "%ERRLEV%"=="1" goto :END
@findstr /V "@UDF_COMMENT@" %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_BIN_DIR%\firebird.conf @copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in %FB_BIN_DIR%\firebird.conf
:: Copy ICU and zlib both to Debug and Release configurations :: Copy ICU and zlib both to Debug and Release configurations

View File

@ -1,5 +1,4 @@
::@echo off @echo off
:: Set env vars :: Set env vars
@call setenvvar.bat @call setenvvar.bat
@ -38,8 +37,9 @@ if errorlevel 1 (
@call :MOVE2 @call :MOVE2
@goto :EOF @goto :EOF
::===========
:BUILD_EMPBUILD :BUILD_EMPBUILD
::===========
@echo. @echo.
@echo Building empbuild.fdb @echo Building empbuild.fdb
@copy /y %FB_ROOT_PATH%\examples\empbuild\*.sql %FB_GEN_DIR%\examples\ > nul @copy /y %FB_ROOT_PATH%\examples\empbuild\*.sql %FB_GEN_DIR%\examples\ > nul
@ -47,7 +47,7 @@ if errorlevel 1 (
@echo. @echo.
:: Here we must use cd because isql does not have an option to set a base directory :: Here we must use cd because isql does not have an option to set a base directory
@cd "%FB_LONG_ROOT_PATH%\gen\examples" @pushd "%FB_LONG_ROOT_PATH%\gen\examples"
@echo Creating empbuild.fdb... @echo Creating empbuild.fdb...
@echo. @echo.
@del empbuild.fdb 2> nul @del empbuild.fdb 2> nul
@ -62,7 +62,8 @@ if defined FB2_INTLEMP (
@%FB_BIN_DIR%\isql -i intlbld.sql @%FB_BIN_DIR%\isql -i intlbld.sql
) )
@cd "%FB_LONG_ROOT_PATH%\builds\win32" @popd
@echo. @echo.
@echo path = %FB_GEN_DB_DIR%\examples @echo path = %FB_GEN_DB_DIR%\examples
@echo Preprocessing empbuild.e... @echo Preprocessing empbuild.e...
@ -75,17 +76,18 @@ if defined FB2_INTLEMP (
@%FB_BIN_DIR%\gpre.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\intlbld.e %FB_GEN_DIR%\examples\intlbld.c -b %FB_GEN_DB_DIR%/examples/ @%FB_BIN_DIR%\gpre.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\intlbld.e %FB_GEN_DIR%\examples\intlbld.c -b %FB_GEN_DB_DIR%/examples/
) )
::End of BUILD_EMPBUILD
::---------------------
@goto :EOF @goto :EOF
::===========
:MOVE :MOVE
::===========
@echo. @echo.
@rmdir /q /s %FB_OUTPUT_DIR%\examples 2>nul @rmdir /q /s %FB_OUTPUT_DIR%\examples 2>nul
@mkdir %FB_OUTPUT_DIR%\examples @mkdir %FB_OUTPUT_DIR%\examples
@mkdir %FB_OUTPUT_DIR%\examples\api @mkdir %FB_OUTPUT_DIR%\examples\api
@mkdir %FB_OUTPUT_DIR%\examples\dbcrypt @mkdir %FB_OUTPUT_DIR%\examples\dbcrypt
@mkdir %FB_OUTPUT_DIR%\examples\build_unix
@mkdir %FB_OUTPUT_DIR%\examples\build_win32 @mkdir %FB_OUTPUT_DIR%\examples\build_win32
@mkdir %FB_OUTPUT_DIR%\examples\empbuild @mkdir %FB_OUTPUT_DIR%\examples\empbuild
@mkdir %FB_OUTPUT_DIR%\examples\include @mkdir %FB_OUTPUT_DIR%\examples\include
@ -97,23 +99,20 @@ if defined FB2_INTLEMP (
@mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul @mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul
@echo Moving files to output directory @echo Moving files to output directory
@copy %FB_ROOT_PATH%\examples\* %FB_OUTPUT_DIR%\examples > nul copy %FB_ROOT_PATH%\examples\* %FB_OUTPUT_DIR%\examples > nul
@ren %FB_OUTPUT_DIR%\examples\readme readme.txt > nul ren %FB_OUTPUT_DIR%\examples\readme readme.txt > nul
@copy %FB_ROOT_PATH%\examples\api\* %FB_OUTPUT_DIR%\examples\api > nul copy %FB_ROOT_PATH%\examples\api\* %FB_OUTPUT_DIR%\examples\api > nul
@copy %FB_ROOT_PATH%\examples\dbcrypt\* %FB_OUTPUT_DIR%\examples\dbcrypt > nul copy %FB_ROOT_PATH%\examples\dbcrypt\* %FB_OUTPUT_DIR%\examples\dbcrypt > nul
@copy %FB_ROOT_PATH%\examples\build_unix\* %FB_OUTPUT_DIR%\examples\build_unix > nul copy %FB_ROOT_PATH%\examples\build_win32\* %FB_OUTPUT_DIR%\examples\build_win32 > nul
@copy %FB_ROOT_PATH%\examples\build_win32\* %FB_OUTPUT_DIR%\examples\build_win32 > nul
:: @copy %FB_ROOT_PATH%\examples\empbuild\* %FB_OUTPUT_DIR%\examples\empbuild > nul :: @copy %FB_ROOT_PATH%\examples\empbuild\* %FB_OUTPUT_DIR%\examples\empbuild > nul
@copy %FB_ROOT_PATH%\examples\empbuild\employe2.sql %FB_OUTPUT_DIR%\examples\empbuild > nul copy %FB_ROOT_PATH%\examples\empbuild\employe2.sql %FB_OUTPUT_DIR%\examples\empbuild > nul
@copy %FB_ROOT_PATH%\examples\include\* %FB_OUTPUT_DIR%\examples\include > nul copy %FB_ROOT_PATH%\examples\include\* %FB_OUTPUT_DIR%\examples\include > nul
@copy %FB_ROOT_PATH%\examples\interfaces\* %FB_OUTPUT_DIR%\examples\interfaces > nul copy %FB_ROOT_PATH%\examples\interfaces\* %FB_OUTPUT_DIR%\examples\interfaces > nul
@copy %FB_ROOT_PATH%\examples\package\* %FB_OUTPUT_DIR%\examples\package > nul copy %FB_ROOT_PATH%\examples\package\* %FB_OUTPUT_DIR%\examples\package > nul
@copy %FB_ROOT_PATH%\examples\stat\* %FB_OUTPUT_DIR%\examples\stat > nul copy %FB_ROOT_PATH%\examples\stat\* %FB_OUTPUT_DIR%\examples\stat > nul
@copy %FB_ROOT_PATH%\examples\udf\* %FB_OUTPUT_DIR%\examples\udf > nul copy %FB_ROOT_PATH%\examples\udf\* %FB_OUTPUT_DIR%\examples\udf > nul
@copy %FB_ROOT_PATH%\examples\udr\* %FB_OUTPUT_DIR%\examples\udr > nul copy %FB_ROOT_PATH%\examples\udr\* %FB_OUTPUT_DIR%\examples\udr > nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
@copy %FB_ROOT_PATH%\src\extlib\ib_udf* %FB_OUTPUT_DIR%\examples\udf > nul
@copy %FB_ROOT_PATH%\src\extlib\fbudf\* %FB_OUTPUT_DIR%\examples\udf > nul
::@copy %FB_GEN_DIR%\examples\empbuild.c %FB_OUTPUT_DIR%\examples\empbuild\ > nul ::@copy %FB_GEN_DIR%\examples\empbuild.c %FB_OUTPUT_DIR%\examples\empbuild\ > nul
::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\empbuild.exe %FB_GEN_DIR%\examples\empbuild.exe > nul ::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\empbuild.exe %FB_GEN_DIR%\examples\empbuild.exe > nul
@ -124,37 +123,50 @@ if defined FB2_INTLEMP (
::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\intlbuild.exe %FB_GEN_DIR%\examples\intlbuild.exe > nul ::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\intlbuild.exe %FB_GEN_DIR%\examples\intlbuild.exe > nul
::) ::)
::) ::)
::End of MOVE
::-----------
@goto :EOF @goto :EOF
:BUILD_EMPLOYEE
::=========== ::===========
:: only to test if it works :: only to test if it works
:BUILD_EMPLOYEE
@echo. @echo.
@echo Building employee.fdb @echo Building employee.fdb
:: Here we must use cd because isql does not have an option to set a base directory
:: and empbuild.exe uses isql :: Do no mess with global variables
@set FB_SAVE_PATH=%PATH% setlocal
@set PATH=%FB_BIN_DIR%;%PATH%
:: This allows us to use the new engine in embedded mode to build :: This allows us to use the new engine in embedded mode to build
:: the employee database. :: the employee database.
@set FIREBIRD=%FB_BIN_DIR% @set FIREBIRD=%FB_BIN_DIR%
@set PATH=%FB_BIN_DIR%;%PATH%
@cd "%FB_LONG_ROOT_PATH%\gen\examples" :: Here we must use cd because isql does not have an option to set a base directory
@del %FB_GEN_DIR%\examples\employee.fdb 2>nul :: and empbuild.exe uses isql
@%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\empbuild\empbuild.exe %FB_GEN_DB_DIR%/examples/employee.fdb :: BEWARE: It will run without error if you have FB client from previous version
if errorlevel 44 (call :ERROR empbuild.exe failed - see empbuild_%FB_TARGET_PLATFORM%.log for details & goto :EOF) :: installed in System32 and server run but created database will have
:: wrong ODS.
@pushd "%FB_GEN_DIR%\examples"
if exist employee.fdb del employee.fdb
%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\empbuild\empbuild.exe %FB_GEN_DB_DIR%/examples/employee.fdb
if errorlevel 44 (call :ERROR empbuild.exe failed - see empbuild_%FB_TARGET_PLATFORM%.log for details )
@if defined FB2_INTLEMP ( @if defined FB2_INTLEMP (
@echo Building intlemp.fdb @echo Building intlemp.fdb
@del %FB_GEN_DIR%\examples\intlemp.fdb 2>nul @del %FB_GEN_DIR%\examples\intlemp.fdb 2>nul
@del isql.tmp 2>nul @del isql.tmp 2>nul
@echo s;intlemp.fdb;%SERVER_NAME%:%FB_GEN_DIR%\examples\intlemp.fdb;g > isql.tmp @echo s;intlemp.fdb;%FB_GEN_DIR%\examples\intlemp.fdb;g > isql.tmp
@%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\intlbuild\intlbuild.exe %FB_GEN_DB_DIR%/examples/intlemp.fdb @%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\intlbuild\intlbuild.exe %FB_GEN_DB_DIR%/examples/intlemp.fdb
) )
@set FIREBIRD=
@set PATH=%FB_SAVE_PATH%
@cd "%FB_LONG_ROOT_PATH%\builds\win32"
@popd
endlocal
::End of BUILD_EMPLOYEE
::---------------------
@goto :EOF @goto :EOF
::============== ::==============
@ -182,8 +194,8 @@ if defined FB2_INTLEMP (
@echo Error - %* @echo Error - %*
@echo. @echo.
set ERRLEV=1 set ERRLEV=1
cancel_script > nul 2>&1
exit /b 1
::End of ERROR ::End of ERROR
::------------ ::------------
@goto :EOF

View File

@ -4,11 +4,6 @@
:: FB_DB_PATH unix format path of the main directory :: FB_DB_PATH unix format path of the main directory
:: (This is used by gpre and preprocess.bat) :: (This is used by gpre and preprocess.bat)
:: VS_VER VisualStudio version (msvc10|msvc12|msvc14) :: VS_VER VisualStudio version (msvc10|msvc12|msvc14)
:: SERVER_NAME server needed to connect to firebird (could include port)
:: Example : localhost/3051
:: (Note - SERVER_NAME is almost deprecated - it is only used by
:: make_examples.bat
::
@echo off @echo off
@ -48,8 +43,6 @@ set VS_VER=msvc%MSVC_VERSION%
::================= ::=================
:SET_DB_DIR :SET_DB_DIR
@SET SERVER_NAME=localhost
@cd ..\.. @cd ..\..
@for /f "delims=" %%a in ('@cd') do (set FB_LONG_ROOT_PATH=%%a) @for /f "delims=" %%a in ('@cd') do (set FB_LONG_ROOT_PATH=%%a)
@for /f "delims=" %%a in ('@cd') do (set FB_ROOT_PATH=%%~sa) @for /f "delims=" %%a in ('@cd') do (set FB_ROOT_PATH=%%~sa)
@ -108,7 +101,6 @@ if defined VS_VER_EXPRESS (
@echo msvc_version=%MSVC_VERSION% @echo msvc_version=%MSVC_VERSION%
@echo db_path=%FB_DB_PATH% @echo db_path=%FB_DB_PATH%
@echo root_path=%FB_ROOT_PATH% @echo root_path=%FB_ROOT_PATH%
@echo server_name=%SERVER_NAME%
@echo. @echo.
@echo (End of %0) @echo (End of %0)
@echo. @echo.

View File

@ -1371,9 +1371,6 @@ else
fi fi
AC_SUBST(POSTFIX_INCLUDE) AC_SUBST(POSTFIX_INCLUDE)
UDF_COMMENT="#"
AC_SUBST(UDF_COMMENT)
AC_CONFIG_FILES( AC_CONFIG_FILES(
gen/make.rules:${MAKE_SRC_DIR}/make.rules gen/make.rules:${MAKE_SRC_DIR}/make.rules
gen/make.defaults:${MAKE_SRC_DIR}/make.defaults gen/make.defaults:${MAKE_SRC_DIR}/make.defaults

View File

@ -909,7 +909,7 @@ add_custom_target(copy_files
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/security.fdb ${output_dir}/security4.fdb COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/security.fdb ${output_dir}/security4.fdb
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/help.fdb ${output_dir}/help/help.fdb COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/help.fdb ${output_dir}/help/help.fdb
# configs, text files # configs, text files
COMMAND sed "/@UDF_COMMENT@/d" < ${CMAKE_SOURCE_DIR}/builds/install/misc/firebird.conf.in > ${output_dir}/firebird.conf COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/firebird.conf.in ${output_dir}/firebird.conf
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/databases.conf.in ${output_dir}/databases.conf COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/databases.conf.in ${output_dir}/databases.conf
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/fbintl.conf ${output_dir}/intl/fbintl.conf COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/fbintl.conf ${output_dir}/intl/fbintl.conf
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/plugins.conf ${output_dir}/plugins.conf COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/plugins.conf ${output_dir}/plugins.conf