Commandline building using msbuild does not seem to perform the remobjects steps

I am creating releases using commandline builds but remobjects does not seem to get performed correctly

after call rsvars.bat I perform
msbuild /t:rebuild OffServer.dproj

but this gives me compiler errors about unknown RO types
In another instance I get an error about a RO file in c:\program files (x86) which is perfectly fine
You can find some logs attacheddelphimsbuildremobjectszerrors.txt (40.8 KB) delphimsbuildremobjectszerrors2.txt (1.6 KB)

Hi,

we don’t update rsvars.bat & dcc*.cfg (like dcc32.cfg, etc) inside Delphi bin folder.

if you want to use command line compiler, you should specify units and include folders manually like

dcc32 “-IC:\Program Files (x86)\RemObjects Software\RemObjects SDK for Delphi\Source” “-uC:\Program Files (x86)\RemObjects Software\RemObjects SDK for Delphi\Source” myproject.dpr

Hi,

1.I don’t think (know if) rsvars.bat needs to update
2.I cannot specify the commandline dcc32 because it is too long for cmd.exe
3.When I compare the msbuild output and the dcc32 from the IDE I see the commandline is very similar. The commandline version has some more include search paths. You can see this in the attached file. I don’t expect these extra paths on the commandline be the cause of the issue. What do you think & how can it be solved?
4. Note: On 1 of the 3 development machines I tested I do not have an issue (but not sure if the build is performed or he just uses some intermediate files from the IDE)comparesomemsbuildcommandlines.txt (29.3 KB)

you can:

  • update dcc32.cfg and specify extra -U"path" and -I"path" in that file.
  • use train system. it is set of javascript files. see examples of .train in C:\Program Files (x86)\RemObjects Software\Build folder
  • create batch file like
delphi21_win32.cmd
@setlocal
@set RO_ROOT=%ProgramFiles(x86)%\RemObjects Software
@set RO_SDK=%RO_ROOT%\RemObjects SDK for Delphi\source
@set DA_SDK=%RO_ROOT%\Data Abstract for Delphi\source
@set RO_SDK_ALL=%RO_SDK%;%RO_SDK%\Codegen;%RO_SDK%\IDE;%RO_SDK%\DataSnap;%RO_SDK%\Synapse;%RO_SDK%\Zlib;%RO_SDK%\RODEC
@set DA_SDK_ALL=%DA_SDK%;%DA_SDK%\Server;%DA_SDK%\Drivers;%DA_SDK%\Legacy;%DA_SDK%\IDE
@set NS_VCL=-NS"VCL;System;Data;Winapi;Data.Win;Vcl.Imaging;Vcl.Samples;System.Win;XML"
@set DCC_OPTIONS=-B -Q -W-SYMBOL_DEPRECATED -W-UNIT_DEPRECATED
@set dcc_root=C:\Program Files (x86)\Embarcadero\Studio\21.0
"%dcc_root%\bin\dcc32.exe" -Q -I"%RO_SDK%;%DA_SDK%" "-U%dcc_root%\lib\win32\release;%RO_SDK_ALL%;%DA_SDK_ALL%"  -R"%RO_SDK%" %NS_VCL% %DCC_OPTIONS% %1 %2 %3 %4 %5 %6 %7 %8 %9
@endlocal
  1. As mentioned before: looking at my msbuild output I don’t need extra paths, I need less
  2. Your delphi21_win32.cmd sample does not contain train, am I missing something?
  3. I thought msbuild was the advised way of building projects. It looks clean and very usefull to me.
    It saves me from the tedious job of creating a commandline of 15000 characters.
  4. Does train.exe replace msbuild? I don’t see any .train scripts in the path you specified and the commandline help is too cryptic

I provided possible workarounds (one per line)


train scripts in that folder are

  • c_DA.train
  • c_EW.train
  • c_HY.train
  • c_RO.train

simplified example:

  • a.cmd
train a.train

a.train

function build(_version) {
	idelphi.build("a.dpr", {delphi : _version});
}

build('27');	//Delphi 10.4

others api is descibed at http://remobjects.github.io/train/API/index.html