Build Zeos DCUs from the command line?
Posted: 01.05.2020, 21:33
Hello,
I am using Zeos 7.3 by DCUs. As the source of 7.3 is changing quickly (Thanks to the devs!!!) It's getting a bit slow to manually build each package for Win32 Debug, Win32 Release, Win64 Debug, Win64 Release so I decided to write a script for it.
I can compile / build the first package (ZCore.dpk) for all 4 targets, .DCUs are going to the right places. But when attempting to build the second package (ZPlain.dpk) it fails with the error:
Embarcadero Delphi for Win32 compiler version 33.0
Copyright (c) 1983,2018 Embarcadero Technologies, Inc.
C:\LocalWork\_DelphiComponents\Zeos\src\plain\ZOleDB.pas(71) Fatal: E2213 Bad packaged unit format: ZCore.dcp.ZCompatibility - Expected version: 33.0, Windows Unicode(x86) Found version: 33.0, Windows Unicode(x64)
This tells me that the previous build (ZCore Win64 Release) is putting something to the wrong place OOOOOR the Win32 build is not looking for it's files at the right places.
The command lines I'm using:
%DCC32% %DEBUGPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win32\Debug -U"%DELPHIPATH%\lib\Win32\debug" -I%ZEOSPATH%\Win32\Debug -E.\Win32\Debug -NU%ZEOSPATH%\Win32\Debug --description:%1 -NO%ZEOSPATH%\Win32\Debug %2 > %TMPFILE% 2>&1
%DCC32% %RELEASEPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win32\Release -U"%DELPHIPATH%\lib\Win32\release" -I%ZEOSPATH%\Win32\Release -E.\Win32\Release -NU%ZEOSPATH%\Win32\Release --description:%1 -NO%ZEOSPATH%\Win32\Release %2 > %TMPFILE% 2>&1
%DCC64% %DEBUGPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win64\Debug -U"%DELPHIPATH%\lib\Win64\debug" -I%ZEOSPATH%\Win64\Debug -E.\Win64\Debug -NU%ZEOSPATH%\Win64\Debug --description:%1 -NO%ZEOSPATH%\Win64\Debug %2 > %TMPFILE% 2>&1
%DCC64% %RELEASEPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win64\Release -U"%DELPHIPATH%\lib\Win64\Release" -I%ZEOSPATH%\Win64\Release -E.\Win32\Release -NU%ZEOSPATH%\Win64\Release --description:%1 -NO%ZEOSPATH%\Win64\Release %2 > %TMPFILE% 2>&1
Where variables are:
SET DELPHIPATH=C:\Program Files (x86)\Embarcadero\Studio\20.0
SET DELPHIUSERPATH=C:\Users\Public\Documents\Embarcadero\Studio\20.0
SET DCC32="%DELPHIPATH%\Bin\dcc32.exe"
SET DCC64="%DELPHIPATH%\Bin\dcc64.exe"
SET ZEOSPATH=C:\LocalWork\_DelphiComponents\Zeos\DCU
SET DEBUGPARAM=-$O- -$W+ -$R+ -Q+ -DDEBUG -V -VN -VR
SET RELEASEPARAM=-$D0 -$L- -$Y- -DRELEASE
SET WIN32PARAM=-LE%DELPHIUSERPATH%\Bpl -LN%DELPHIUSERPATH%\Dcp -NH%DELPHIUSERPATH%\hpp\Win32 -NB%DELPHIUSERPATH%\Dcp -O%DELPHIUSERPATH%\Dcp
SET WIN64PARAM=-LE%DELPHIUSERPATH%\Bpl\Win64 -LN%DELPHIUSERPATH%\Dcp\Win64 -NH%DELPHIUSERPATH%\hpp\Win64 -NB%DELPHIUSERPATH%\Dcp\Win64 -O%DELPHIUSERPATH%\Dcp\Win64
SET COMMONPARAM=--no-config --legacy-ifend -B -Q -TX.bpl -NSWinapi;System;Data
What am I missing? I already made sure no rogue versions of the .DCUs are located on the drive anywhere. Also worth to note that I don't have much experience with command line building, so please be gentle
I am using Zeos 7.3 by DCUs. As the source of 7.3 is changing quickly (Thanks to the devs!!!) It's getting a bit slow to manually build each package for Win32 Debug, Win32 Release, Win64 Debug, Win64 Release so I decided to write a script for it.
I can compile / build the first package (ZCore.dpk) for all 4 targets, .DCUs are going to the right places. But when attempting to build the second package (ZPlain.dpk) it fails with the error:
Embarcadero Delphi for Win32 compiler version 33.0
Copyright (c) 1983,2018 Embarcadero Technologies, Inc.
C:\LocalWork\_DelphiComponents\Zeos\src\plain\ZOleDB.pas(71) Fatal: E2213 Bad packaged unit format: ZCore.dcp.ZCompatibility - Expected version: 33.0, Windows Unicode(x86) Found version: 33.0, Windows Unicode(x64)
This tells me that the previous build (ZCore Win64 Release) is putting something to the wrong place OOOOOR the Win32 build is not looking for it's files at the right places.
The command lines I'm using:
%DCC32% %DEBUGPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win32\Debug -U"%DELPHIPATH%\lib\Win32\debug" -I%ZEOSPATH%\Win32\Debug -E.\Win32\Debug -NU%ZEOSPATH%\Win32\Debug --description:%1 -NO%ZEOSPATH%\Win32\Debug %2 > %TMPFILE% 2>&1
%DCC32% %RELEASEPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win32\Release -U"%DELPHIPATH%\lib\Win32\release" -I%ZEOSPATH%\Win32\Release -E.\Win32\Release -NU%ZEOSPATH%\Win32\Release --description:%1 -NO%ZEOSPATH%\Win32\Release %2 > %TMPFILE% 2>&1
%DCC64% %DEBUGPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win64\Debug -U"%DELPHIPATH%\lib\Win64\debug" -I%ZEOSPATH%\Win64\Debug -E.\Win64\Debug -NU%ZEOSPATH%\Win64\Debug --description:%1 -NO%ZEOSPATH%\Win64\Debug %2 > %TMPFILE% 2>&1
%DCC64% %RELEASEPARAM% %COMMONPARAM% -R%ZEOSPATH%\Win64\Release -U"%DELPHIPATH%\lib\Win64\Release" -I%ZEOSPATH%\Win64\Release -E.\Win32\Release -NU%ZEOSPATH%\Win64\Release --description:%1 -NO%ZEOSPATH%\Win64\Release %2 > %TMPFILE% 2>&1
Where variables are:
SET DELPHIPATH=C:\Program Files (x86)\Embarcadero\Studio\20.0
SET DELPHIUSERPATH=C:\Users\Public\Documents\Embarcadero\Studio\20.0
SET DCC32="%DELPHIPATH%\Bin\dcc32.exe"
SET DCC64="%DELPHIPATH%\Bin\dcc64.exe"
SET ZEOSPATH=C:\LocalWork\_DelphiComponents\Zeos\DCU
SET DEBUGPARAM=-$O- -$W+ -$R+ -Q+ -DDEBUG -V -VN -VR
SET RELEASEPARAM=-$D0 -$L- -$Y- -DRELEASE
SET WIN32PARAM=-LE%DELPHIUSERPATH%\Bpl -LN%DELPHIUSERPATH%\Dcp -NH%DELPHIUSERPATH%\hpp\Win32 -NB%DELPHIUSERPATH%\Dcp -O%DELPHIUSERPATH%\Dcp
SET WIN64PARAM=-LE%DELPHIUSERPATH%\Bpl\Win64 -LN%DELPHIUSERPATH%\Dcp\Win64 -NH%DELPHIUSERPATH%\hpp\Win64 -NB%DELPHIUSERPATH%\Dcp\Win64 -O%DELPHIUSERPATH%\Dcp\Win64
SET COMMONPARAM=--no-config --legacy-ifend -B -Q -TX.bpl -NSWinapi;System;Data
What am I missing? I already made sure no rogue versions of the .DCUs are located on the drive anywhere. Also worth to note that I don't have much experience with command line building, so please be gentle