RODL output folder define

I´m migrating from RO7 to RO8. My goal is compile server under codetyphon to get a linux server.

As i use HydraAutoupdate im manually generating interface,invoke and async files for windows and touch for linux version on a second folder.

Theres any way to define WHERE will be that autogenerated files?

Best regards.

this feature isn’t supported in lazarus/codetyphon because it has no such rich API as in Delphi IDE

Actually i only need it for delphi side. How can i setup in which folder RODL must generate output files?

just put files into folders you want. files will be regenerated in their locations.

And change the define on the dpr file… ok.

you don’t need to change .dpr - at compling _intf, _invk and _async will put into subfolders if they were put into them …

I mean, you must change this:

{#ROGEN: ../LibsWindows/NewLibrary.RODL} // RemObjects: Careful, do not remove!

Work as expected, thanks you!

P.S. Any idea to fake HydraAutoUpdate units inside FPC? In tat way i will not need to manually remove references when compile on lazarus.

///{Used RODLs:} HydraAutoUpdate_Intf;

we didn’t adapt Hydra for Lazarus/CodeTyphon at all because it doesn’t allow to have packages

Any chance the generated interfaces have a FPC define? That will avoid having to edit by hand.

Example:

Actual

    uses
  {$IFDEF DELPHIXE2UP}
    System.SysUtils, System.Classes, System.TypInfo,
  {$ELSE}
    SysUtils, Classes, TypInfo,
  {$ENDIF}
  {RemObjects:} uROUri, uROProxy, uROExceptions, uROXMLIntf, uROClasses, uROTypes, uROClientIntf,
  {Used RODLs:} DataAbstract4_Intf, PetroBox_Basic_Services_Intf,
  {Used RODLs:} HydraAutoUpdate_Intf;

Proposed

uses
  {$IFDEF DELPHIXE2UP}
    System.SysUtils, System.Classes, System.TypInfo,
  {$ELSE}
    SysUtils, Classes, TypInfo,
  {$ENDIF}
  {RemObjects:} uROUri, uROProxy, uROExceptions, uROXMLIntf, uROClasses, uROTypes, uROClientIntf,
  {$IFNDEF FPC}
  {Used RODLs:} HydraAutoUpdate_Intf;
  {$ENDIF}
  {Used RODLs:} DataAbstract4_Intf, PetroBox_Basic_Services_Intf,

And the same thing for the implementation.

Thanks

no, this is impossible.
HydraAutoUpdate_Intf.pas should be compiled without any problem in Lazarus because it doesn’t use any internal hydra types.

I can suggest to split your .RODL to two versions:
*) one includes all stuff except hydra
*) second - uses 1st rodl and includes hydra stuff.
so you can use 2nd rodl in delphi and 1st one - in lazarus.

Really? :grimacing:
Is the generator source code available?

But the definitions fails.

I will try this approach

RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascalIntf.pas
HydraAutoUpdate.RODL is an usual RODL.
how codegen can distinguish that this one should be excluded for FPC and included for Delphi?

can you show errors?

Trying to reproduce find my mistake (mixed paths). You are right it compile on linux/fpc.
Best regards

Evgeny, after a full test, yes, it compile on Lazarus/FPC for Linux but DONT compile for Linux/ARM because HYAutoUpdateService_Impl uses uHYAutoUpdateClient an later unit is a lot linked to windows…

How can i then fix that problem? Im just need a server running on linux. And i need to share my code wth windows RO implementation. I don’t want to have Hydra on Linux, this is clear. I just need to remove all the hydra stuff when it is compiled for linux.

Any idea?

Hydra was designed only for Windows and it never was ported to other platforms.
I can suggest to create your own autoupdate stuff if you needed this for Linux/ARM.
of course, you can use HYAutoUpdateService_Impl as an example

@EvgenyK i don’t need to have working hydra on linux. What i mean is, i believe must be some internal mechanism to avoid calling window stuff on there and allowing to disable hydra references on linux. Remember: i suggest you why don’t make the generator to producing all int, ink and impl files without hydra reference if linux is active (with a simple {$ifndef linux} line) and you say me it haven’t sense because, even with that reference it will compiles ok. The problem is, that hydra references, don’t compile on linux.

I hope be clear, please let me know if don’t.

Best regards.

Autoregenerated codegen files (_intf, _invk and _async) aren’t require Hydra.
You are trying to compile specific implementation of Hydra service (_impl) on linux.

as a workaround, you can implement your own uHYAutoUpdateClient that won’t contain references to hydra and windows or generate empty HYAutoUpdateService_Impl.pas in ServiceBuilder from HydraAutoUpdate.RODL and implement your own logic.

Seems not the best solution form me, but if theres not a better option… :frowning:

Im really stuck with this… Im have a autoupdatetestervice_impl file, same of the example for hydra. It cannot load because it expects PROPERTIES only on HYDRA!

Please Evgeny, give me a better solution to share code between delphi and fps projects. If not hydra on fpc, how can i have this autoupdateservice there? I have no solution and don’t have any clue where too continue with this. :frowning:

El componente THYAutoUpdateService don’t exist on fps, so how can i even include a a service implementation of kind TAutoUpdateService using it?