Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
586 changes: 311 additions & 275 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
temp/
/gen/
output_Win32/
output_x64/
output_Win32_*/
output_x64_*/
examples/prebuilt/
.vs/
m4/
Expand Down
4 changes: 2 additions & 2 deletions builds/docker/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN `
refreshenv && `
setx PATH "%PATH%;C:\Program Files\Git\usr\bin"

ENV SEVENZIP='"C:\Program Files\7-Zip"'
ENV INNO6_SETUP_PATH='"C:\Program Files (x86)\Inno Setup 6"'
ENV SEVENZIP='C:\Program Files\7-Zip'
ENV INNO6_SETUP_PATH='C:\Program Files (x86)\Inno Setup 6'

COPY scripts\* C:\fbscripts\
2 changes: 1 addition & 1 deletion builds/docker/windows/run.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
docker run --rm -v %cd%\..\..\..:C:\firebird -v %cd%\..\..\..\output:C:\firebird-out asfernandes/firebird-builder:5 %1
docker run --rm -v %cd%\..\..\..:C:\firebird asfernandes/firebird-builder:5 %1
7 changes: 3 additions & 4 deletions builds/docker/windows/scripts/build-x64.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REM FIXME @echo off
@echo off

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64

Expand All @@ -8,9 +8,8 @@ set FB_OUTPUT_SUFFIX=x64
xcopy /h /e /i /q C:\firebird C:\firebird-build
cd /d C:\firebird-build\builds\win32

REM call run_all.bat
call run_all.bat JUSTBUILD
call run_all.bat

call run_tests.bat

xcopy /h /e /i /q C:\firebird-build\output_%FB_OUTPUT_SUFFIX%\* C:\firebird-out
copy C:\firebird-build\builds\install_images\* C:\firebird\builds\install_images
5 changes: 2 additions & 3 deletions builds/docker/windows/scripts/build-x86.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ set FB_OUTPUT_SUFFIX=win32
xcopy /h /e /i /q C:\firebird C:\firebird-build
cd /d C:\firebird-build\builds\win32

REM call run_all.bat
call run_all.bat JUSTBUILD
call run_all.bat

call run_tests.bat

xcopy /h /e /i /q C:\firebird-build\output_%FB_OUTPUT_SUFFIX%\* C:\firebird-out
copy C:\firebird-build\builds\install_images\* C:\firebird\builds\install_images
14 changes: 7 additions & 7 deletions builds/install/arch-specific/win32/BuildExecutableInstall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ if "%FB2_SNAPSHOT%"=="1" (
:: let's bail out now.

@echo o Checking for sed...
(cmd /c "sed.exe --version 2>&1 | findstr version > nul ") || ( call :ERROR Could not locate sed && @goto :EOF )
(cmd /c "sed.exe --version 2>&1 > nul ") || ( call :ERROR Could not locate sed && @goto :EOF )

@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 > 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 (
Expand All @@ -93,7 +93,7 @@ if %FBBUILD_ZIP_PACK% EQU 1 (
if %FBBUILD_ISX_PACK% NEQ 1 goto :SKIP_INNO

if defined INNO6_SETUP_PATH (
set ISCC_COMMAND=%INNO6_SETUP_PATH%\iscc.exe
set ISCC_COMMAND="%INNO6_SETUP_PATH%\iscc.exe"
)
:: If the environment variable is not set let's search in PATH
if not defined ISCC_COMMAND (
Expand Down Expand Up @@ -445,7 +445,7 @@ copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases
:: that and they all have windows EOL
::===============================================
for /R %FB_OUTPUT_DIR% %%W in ( *.txt *.conf *.sql *.c *.cpp *.hpp *.h *.bat *.pas *.e *.def *.rc *.md *.html ) do (
unix2dos -q --safe %%W || exit /b 1
unix2dos --safe %%W || exit /b 1
)

::End of SET_CRLF
Expand All @@ -458,7 +458,7 @@ for /R %FB_OUTPUT_DIR% %%W in ( *.txt *.conf *.sql *.c *.cpp *.hpp *.h *.bat *.p
:: Forcefully disable delayed expansion because of exclamation marks in 7z switches
setlocal DisableDelayedExpansion

set SKIP_FILES=-x!installation_readme.txt
set SKIP_FILES=-x!*.log -x!*.exp -x!*_test.exe -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
Expand All @@ -476,7 +476,7 @@ if exist %FBBUILD_ZIPFILE% (
@del %FBBUILD_ZIPFILE%
)

%SEVENZIP%\7z.exe a -r -tzip -mx9 %SKIP_FILES% %FBBUILD_ZIPFILE% %FB_OUTPUT_DIR%\*
"%SEVENZIP%\7z.exe" a -r -tzip -mx9 %SKIP_FILES% %FBBUILD_ZIPFILE% %FB_OUTPUT_DIR%\*

endlocal

Expand Down Expand Up @@ -652,7 +652,7 @@ for %%v in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do (

pushd ..\..\..\win32
::This must be called from the directory it resides in.
@call setenvvar.bat
@call setenvvar.bat %*
popd
@if errorlevel 1 (goto :END)

Expand Down
32 changes: 21 additions & 11 deletions builds/install/arch-specific/win32/FirebirdInstall.iss
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@
;We speed up compilation (and hence testing) by not compressing contents.
#undef compression

;Default to x64 for testing
;Default to x64_release for testing
#define PlatformTarget "x64"
#define ConfigurationTarget "release"
#endif
;-------#ifdef iss_debug

Expand Down Expand Up @@ -216,6 +217,15 @@
#endif
#endif

;---- If we haven't already set ConfigurationTarget then pick it up from the environment.
#ifndef ConfigurationTarget
#define ConfigurationTarget GetEnv("FBBUILD_BUILDTYPE")
#endif
#if ConfigurationTarget == ""
;Assume release
#define ConfigurationTarget "release"
#endif

#if FB_BUILD_TYPE == "T"
;If we are still under development we can ignore some missing files.
#define SkipFileIfDevStatus " skipifsourcedoesntexist "
Expand All @@ -224,7 +234,7 @@
#endif

;This location is relative to SourceDir (declared below)
#define FilesDir="output_" + PlatformTarget
#define FilesDir="output_" + PlatformTarget + "_" + ConfigurationTarget
#if PlatformTarget == "x64"
#define WOW64Dir="output_win32"
#endif
Expand Down Expand Up @@ -397,7 +407,7 @@ Filename: {app}\instreg.exe; Parameters: "install "; StatusMsg: {cm:instreg}; Mi
Filename: {app}\instclient.exe; Parameters: "install fbclient"; StatusMsg: {cm:instclientCopyFbClient}; MinVersion: {#MinVer}; Components: ClientComponent; Flags: runminimized; Check: CopyFBClientLib;
Filename: {app}\instclient.exe; Parameters: "install gds32"; StatusMsg: {cm:instclientGenGds32}; MinVersion: {#MinVer}; Components: ClientComponent; Flags: runminimized; Check: CopyGds32
#if PlatformTarget == "x64"
Filename: {app}\WOW64\instclient.exe; Parameters: "install fbclient"; StatusMsg: {cm:instclientCopyFbClient}; MinVersion: {#MinVer}; Components: ClientComponent; Flags: runminimized 32bit; Check: CopyFBClientLib;
Filename: {app}\WOW64\instclient.exe; Parameters: "install fbclient"; StatusMsg: {cm:instclientCopyFbClient}; MinVersion: {#MinVer}; Components: ClientComponent; Flags: runminimized 32bit; Check: CopyFBClientLib
Filename: {app}\WOW64\instclient.exe; Parameters: "install gds32"; StatusMsg: {cm:instclientGenGds32}; MinVersion: {#MinVer}; Components: ClientComponent; Flags: runminimized 32bit; Check: CopyGds32
#endif

Expand Down Expand Up @@ -500,10 +510,10 @@ Source: {#FilesDir}\icuin??.dll; DestDir: {app}; Components: ClientComponent; Fl
Source: {#FilesDir}\icudt??.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#FilesDir}\icudt*.dat; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion
#if PlatformTarget == "x64"
Source: {#WOW64Dir}\icuuc??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#WOW64Dir}\icuin??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#WOW64Dir}\icudt??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#WOW64Dir}\icudt*.dat; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#WOW64Dir}\icuuc??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
Source: {#WOW64Dir}\icuin??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
Source: {#WOW64Dir}\icudt??.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
Source: {#WOW64Dir}\icudt*.dat; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
#endif

#if PlatformTarget =="Win32"
Expand All @@ -512,7 +522,7 @@ Source: {#FilesDir}\fbrmclib.dll; DestDir: {app}; Components: ServerComponent; F

Source: {#FilesDir}\zlib1.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion
#if PlatformTarget == "x64"
Source: {#WOW64Dir}\zlib1.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
Source: {#WOW64Dir}\zlib1.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
#endif

;Rules for installation of MS runtimes are simplified with MSVC10
Expand Down Expand Up @@ -549,7 +559,7 @@ Source: {#FilesDir}\doc\sql.extensions\*.*; DestDir: {app}\doc\sql.extensions; C
Source: {#FilesDir}\include\*.*; DestDir: {app}\include; Components: DevAdminComponent; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: {#FilesDir}\intl\fbintl.dll; DestDir: {app}\intl; Components: ServerComponent; Flags: sharedfile ignoreversion;
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\*.lib; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion;
#if PlatformTarget == "x64"
Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion {#SkipFileIfDevStatus}
#endif
Expand All @@ -566,7 +576,7 @@ Source: {#FilesDir}\plugins\chacha.dll; DestDir: {app}\plugins; Components: Clie
Source: {#FilesDir}\plugins\*.conf; DestDir: {app}\plugins; Components: ServerComponent; Flags: ignoreversion;
Source: {#FilesDir}\plugins\udr\*.*; DestDir: {app}\plugins\udr; Components: ServerComponent; Flags: ignoreversion;
#if PlatformTarget == "x64"
Source: {#WOW64Dir}\plugins\chacha*.dll; DestDir: {app}\WOW64\plugins; Components: ClientComponent; Flags: ignoreversion;
Source: {#WOW64Dir}\plugins\chacha*.dll; DestDir: {app}\WOW64\plugins; Components: ClientComponent; Flags: ignoreversion {#SkipFileIfDevStatus};
#endif

Source: {#FilesDir}\misc\*.*; DestDir: {app}\misc; Components: ServerComponent; Flags: ignoreversion createallsubdirs recursesubdirs ;
Expand All @@ -588,7 +598,7 @@ Source: {#FilesDir}\gfix.pdb; DestDir: {app}; Components: DevAdminComponent;
Source: {#FilesDir}\isql.pdb; DestDir: {app}; Components: ClientComponent;
Source: {#FilesDir}\plugins\*.pdb; DestDir: {app}\plugins; Components: ServerComponent;
#if PlatformTarget == "x64"
Source: {#WOW64Dir}\fbclient.pdb; DestDir: {app}\WOW64; Components: ClientComponent;
Source: {#WOW64Dir}\fbclient.pdb; DestDir: {app}\WOW64; Components: ClientComponent; Flags: {#SkipFileIfDevStatus};
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion builds/win32/clean_all.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off

@call setenvvar.bat
@call setenvvar.bat %*
@if errorlevel 1 (goto :END)

set FB_CLEAN_SHARED=
Expand Down
5 changes: 2 additions & 3 deletions builds/win32/create_msgs.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
@echo off

@call setenvvar.bat
@call setenvvar.bat %*
@if errorlevel 1 (goto :END)
@if not defined FB_BIN_DIR (@call set_build_target.bat %*)

@echo Building build_msg (%FB_OBJ_DIR%)...
@call compile.bat builds\win32\%VS_VER%\FirebirdBoot build_msg_%FB_TARGET_PLATFORM%.log build_msg
@if errorlevel 1 (goto :END)

@echo Building message file...
@%FB_BIN_DIR%\build_msg -f %FB_GEN_DB_DIR%\firebird.msg -c %FB_OUTPUT_DIR%\include\firebird\impl\iberror_c.h
@%FB_BOOT_BIN_DIR%\build_msg -f %FB_GEN_DB_DIR%\firebird.msg -c %FB_OUTPUT_DIR%\include\firebird\impl\iberror_c.h
@copy %FB_GEN_DIR%\firebird.msg %FB_BIN_DIR% > nul

:END
2 changes: 1 addition & 1 deletion builds/win32/gen_helper.nmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $(RPL_GREP): $(RPL_GREP_SRC)

$(FB_GEN_DIR)\iberror.pas: $(ERR_CONSTS_PAS) $(FB_ROOT_PATH)\src\include\firebird\impl\msg\*.h
compile.bat builds\win32\%VS_VER%\FirebirdBoot build_msg_%FB_TARGET_PLATFORM%.log build_msg
%FB_BIN_DIR%\build_msg -p $(FB_GEN_DIR)\iberror_codes.pas
%FB_BOOT_BIN_DIR%\build_msg -p $(FB_GEN_DIR)\iberror_codes.pas
copy $(ERR_CONSTS_PAS) $(FB_GEN_DIR)\iberror.pas
type $(FB_GEN_DIR)\iberror_codes.pas >> $(FB_GEN_DIR)\iberror.pas

Expand Down
31 changes: 3 additions & 28 deletions builds/win32/make_all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
set ERRLEV=0

:: Set env vars
@call setenvvar.bat
@call setenvvar.bat %*

@if errorlevel 1 (call :ERROR Executing setenvvar.bat failed & goto :EOF)

:: verify that boot was run before

@if not exist %FB_GEN_DIR%\firebird.msg (goto :HELP_BOOT & goto :EOF)
@if not exist %FB_BIN_DIR%\firebird.msg (goto :HELP_BOOT & goto :EOF)


@call set_build_target.bat %*

::==========
:: MAIN

Expand All @@ -30,16 +28,6 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log

::===========
:MOVE
@echo Copying files to output
@set FB_OUTPUT_DIR=%FB_ROOT_PATH%\output_%FB_TARGET_PLATFORM%
@del %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\*.exp 2>nul
@del %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\*.lib 2>nul
@rmdir /q /s %FB_OUTPUT_DIR% 2>nul

:: short delay to let OS complete actions by rmdir above
@timeout 1 >nul

@mkdir %FB_OUTPUT_DIR% 2>nul
@mkdir %FB_OUTPUT_DIR%\intl 2>nul
@mkdir %FB_OUTPUT_DIR%\tzdata 2>nul
@mkdir %FB_OUTPUT_DIR%\doc 2>nul
Expand All @@ -51,22 +39,9 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log
@mkdir %FB_OUTPUT_DIR%\plugins 2>nul
@mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul

@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\* %FB_OUTPUT_DIR% >nul
@del %FB_OUTPUT_DIR%\*_test.exe >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata\* %FB_OUTPUT_DIR%\tzdata >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\system32\* %FB_OUTPUT_DIR%\system32 >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\*.dll %FB_OUTPUT_DIR%\plugins >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%\yvalve\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul

for %%v in (gpre_boot build_msg) do (
@del %FB_OUTPUT_DIR%\%%v.* 2>nul
)

:: Firebird.conf, etc
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR%\ > nul
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_OUTPUT_DIR%\firebird.conf >nul
@copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf >nul
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl\ >nul
Expand Down Expand Up @@ -94,7 +69,7 @@ copy %FB_ROOT_PATH%\src\include\ibase.h %FB_OUTPUT_DIR%\include > nul
copy %FB_ROOT_PATH%\src\include\iberror.h %FB_OUTPUT_DIR%\include > nul

:: New API headers
xcopy %FB_ROOT_PATH%\src\include\firebird %FB_OUTPUT_DIR%\include\firebird /e > nul
xcopy /y %FB_ROOT_PATH%\src\include\firebird %FB_OUTPUT_DIR%\include\firebird /e > nul

:: UDR
copy %FB_ROOT_PATH%\src\extlib\*.sql %FB_OUTPUT_DIR%\plugins\udr > nul
Expand Down
Loading