Recent

Author Topic: [SOLVED] Convert Delphi package  (Read 6529 times)

julkas

  • Guest
[SOLVED] Convert Delphi package
« on: October 26, 2019, 11:15:54 am »
How convert Delphi package to Lazarus? Any step by step mini How To.
Thanks.
« Last Edit: October 27, 2019, 01:22:58 pm by julkas »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4695
  • I like bugs.
Re: Convert Delphi package
« Reply #1 on: October 26, 2019, 11:37:50 am »
How convert Delphi package to Lazarus? Any step by step mini How To.
Please try the Delphi converter in Lazarus Tools menu. Package conversion is not tested as much as the unit and project conversion. Success also depends on the complexity of your code and usage of system API and dependencies etc.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

tr_escape

  • Sr. Member
  • ****
  • Posts: 437
  • sector name toys | respect to spectre
    • Github:
Re: Convert Delphi package
« Reply #2 on: October 26, 2019, 11:38:42 am »

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: Convert Delphi package
« Reply #3 on: October 26, 2019, 11:44:09 am »
It also helps if you tell us WHICH package. This is necessary to solve any incompatibilities.
E.g. almost anything that supports Delphi 7 is OK with the above answers, anything from Delphi XE  may have issues and need manual intervention.
(Currently the major issues are the use of anonymous methods - language wise, solvable - and anything FireMonkey - package wise - forget about that! )
« Last Edit: October 26, 2019, 11:53:27 am by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

julkas

  • Guest
Re: Convert Delphi package
« Reply #4 on: October 26, 2019, 12:02:07 pm »
How convert Delphi package to Lazarus? Any step by step mini How To.
Please try the Delphi converter in Lazarus Tools menu. Package conversion is not tested as much as the unit and project conversion. Success also depends on the complexity of your code and usage of system API and dependencies etc.
After Tools -> Felphi Conversion -> Convert Delhi Package to Lazarus Package
Screenshot - s1.JPG.
After pressing Start conversion button - s2.JPG.
And now ? Next steps ? May be it's very overcomplicated and difficult ?
FastDBd7.dpk -
Code: Pascal  [Select][+][-]
  1. package FastDBd6;
  2.  
  3. {$R *.res}
  4. {$ALIGN 8}
  5. {$ASSERTIONS ON}
  6. {$BOOLEVAL OFF}
  7. {$DEBUGINFO ON}
  8. {$EXTENDEDSYNTAX ON}
  9. {$IMPORTEDDATA ON}
  10. {$IOCHECKS ON}
  11. {$LOCALSYMBOLS ON}
  12. {$LONGSTRINGS ON}
  13. {$OPENSTRINGS ON}
  14. {$OPTIMIZATION ON}
  15. {$OVERFLOWCHECKS OFF}
  16. {$RANGECHECKS OFF}
  17. {$REFERENCEINFO ON}
  18. {$SAFEDIVIDE OFF}
  19. {$STACKFRAMES OFF}
  20. {$TYPEDADDRESS OFF}
  21. {$VARSTRINGCHECKS ON}
  22. {$WRITEABLECONST OFF}
  23. {$MINENUMSIZE 1}
  24. {$IMAGEBASE $400000}
  25. {$DESCRIPTION 'FastDB Components'}
  26. {$IMPLICITBUILD OFF}
  27.  
  28. requires
  29.   rtl,
  30.   vcl,
  31.   dbrtl;
  32.  
  33. contains
  34.   FastDbReg in 'FastDbReg.pas',
  35.   FastDbVar in 'FastDbVar.pas',
  36.   FastDbQuery in 'FastDbQuery.pas',
  37.   FastDbDataSet in 'FastDbDataSet.pas',
  38.   FastDbSession in 'FastDbSession.pas',
  39.   FastDbCLI in 'FastDbCLI.pas';
  40.  
  41. end.


« Last Edit: October 26, 2019, 12:15:46 pm by julkas »

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: Convert Delphi package
« Reply #5 on: October 26, 2019, 12:22:57 pm »
So you are trying to convert a Kylix 3 package?
Although Kylix 3 is somewhat supported with legacy and deprecated, (in fpc) I don't even know if the Lazarus converter is able to handle that.
Worse: Linux has evolved so much that real Kylix applications often do not work anymore. (some do).

I expect you need to examine ALL code and find modern day alternatives. Kylix was really short-lived. Good idea, bad execution by focus on GUI instead of server and lack of funding and interest.
The code can be valuable, though. It just may take some real effort to make it work again. The code is well written and most of the rtl/clx is GPL'd which is a problem with commercial applications. Since it is well written, it is also easy to re-use the code with sufficient knowledge.

Note clx can be compiled in FPC, but the Lazarus ide does not support it. Everything needs to be done from code and in {$mode delphi}, no nice component tabs....
« Last Edit: October 26, 2019, 12:29:39 pm by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

julkas

  • Guest
Re: Convert Delphi package
« Reply #6 on: October 26, 2019, 12:29:21 pm »
So you are trying to convert a Kylix 3 package?
Although Kylix 3 is somewhat supported with legacy and deprecated, (in fpc) I don't even know if the Lazarus converter is able to handle that.
Worse: Linux has evolved so much that real Kylix applications often do not work anymore. (some do).

I expect you need to examine ALL code and find modern day alternatives. Kylix was really short-lived. Good idea, bad execution by focus on GUI instead of server and lack of funding and interest.
The code can be valuable, though. It just may take some real effort to make it work again. The code is well written and most of the rtl/clx is GPL'd which is a problem with commercial applications. Since it is well written, it is also easy to re-use the code with sufficient knowledge.
My question is about Delphi package.

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: Convert Delphi package
« Reply #7 on: October 26, 2019, 12:30:37 pm »
No. See your own screenshots! < very grumpy now!!  >:D >:D >:D >:D >

I am on the verge of calling you an idiot - which many who saw the screenshots will agree with - but I won't. Just... O:-)

Show us all code. Or at least a link to an archive. <sigh, you are quite impossible to help, the only reason I am trying is for others, not you >
« Last Edit: October 26, 2019, 12:36:30 pm by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

julkas

  • Guest
Re: Convert Delphi package
« Reply #8 on: October 26, 2019, 12:38:48 pm »
No. See your own screenshots! < very grumpy now!!  >:D >:D >:D >:D >

Original project - Delphi 6/7 and Kylix.
Leave your "philosophy" for others.
And If you can't help, don't sell bullshit
« Last Edit: October 26, 2019, 12:54:09 pm by julkas »

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: [CLOSED] Convert Delphi package
« Reply #9 on: October 26, 2019, 01:13:55 pm »
It is a clx project. Let's see what others think. Facts can not be opinions.
Your reaction just shows an extreme amount of lack of knowledge. That is also a fact and not an opinion.

CLX is a limited cross-platform VCL, based on a very old Linux and a very old KDE, just in case.'
Just point to the code, stubborn.

I am not insulting you, you are just plain stubborn.

Changed my signature because of you....

I leave it up to the moderators if your postings and mine belong to a forum...
I think factual information will prevail over baseless opinions.
« Last Edit: October 26, 2019, 01:52:47 pm by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4695
  • I like bugs.
Re: Convert Delphi package
« Reply #10 on: October 26, 2019, 03:15:58 pm »
After pressing Start conversion button - s2.JPG.
And now ? Next steps ? May be it's very overcomplicated and difficult ?
FastDBd7.dpk -
Ok, it produced an empty package. There was some fatal error during the conversion. The message window may show details.
Now your only option is to convert unit by unit, either with the same Delphi converter or manually, and then add those units to a new Lazarus package.
Good luck.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

julkas

  • Guest
Re: Convert Delphi package
« Reply #11 on: October 26, 2019, 03:29:00 pm »
After pressing Start conversion button - s2.JPG.
And now ? Next steps ? May be it's very overcomplicated and difficult ?
FastDBd7.dpk -
Ok, it produced an empty package. There was some fatal error during the conversion. The message window may show details.
Now your only option is to convert unit by unit, either with the same Delphi converter or manually, and then add those units to a new Lazarus package.
Good luck.
Thank you for clear reply.
Is it general problem or @Aleynikov ?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4695
  • I like bugs.
Re: Convert Delphi package
« Reply #12 on: October 26, 2019, 04:18:20 pm »
Is it general problem or @Aleynikov ?
I tried to figure out what that means. I found an unjust legal case with name Aleynikov but I don't see any connection to Delphi converter. Hmmm...
Anyway, the Delphi converter fails quite often unfortunately. A dependency to a Delphi unit which is not ported for Lazarus is a common problem.
By converting unit by unit you can do the job gradually, mixing automatic and manual conversion sometimes.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: [CLOSED] Convert Delphi package
« Reply #13 on: October 26, 2019, 04:27:58 pm »
Still no code and I am patient. Without knowing the Delphi clx package this is impossible to solve.
I am not as politically correct as others are, but I always help. period.
« Last Edit: October 26, 2019, 04:31:57 pm by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

julkas

  • Guest
Re: Convert Delphi package
« Reply #14 on: October 26, 2019, 05:26:00 pm »
Is it general problem or @Aleynikov ?
I tried to figure out what that means. I found an unjust legal case with name Aleynikov but I don't see any connection to Delphi converter. Hmmm...
Anyway, the Delphi converter fails quite often unfortunately. A dependency to a Delphi unit which is not ported for Lazarus is a common problem.
By converting unit by unit you can do the job gradually, mixing automatic and manual conversion sometimes.
Ok I can do it converting unit by unit or from underground. My question was about converting existing Delphi code.
I want keep original old spirit.
« Last Edit: October 26, 2019, 05:47:48 pm by julkas »

 

TinyPortal © 2005-2018