Tools -> Delphi Conversion
lazarus / 13-General
----------------------------------------------------------------------
Paul Breneman · 2019-01-03 21:38
I'm trying Lazarus 2 RC3 on Win10 and hoping to keep learning more!
I'm trying to convert this old program: http://ctrlterm.com/CtrlTerm-
Delphi-122513.zip but having problems.
After selecting Delphi Conversion on the Tools Menu, I select Convert
Delphi Project to Lazarus Project and select the CtrlTerm.dpr file,
then I uncheck all of the options and click Start Conversion then get:
AutomaticConversion.log
Progress: Found all unit files
Progress: Conversion took: 00:00:01
Fatal: Conversion Aborted.
Why the Fatal?
After adding the unit Interfaces to the LPR file uses, the program
compiles and runs okay.
----------------------------------------------------------------------
Bart · 2019-01-03 21:53
Same here (trunk).
The logfile is of no help.
Please file a bugreport and attach the zip to the bugreport.
Bart
----------------------------------------------------------------------
Paul Breneman · 2019-01-03 22:38
I'll file a bug report ASAP. This page
https://bugs.freepascal.org/login_page.php says:
Do you already have a login at Free Pascal Community? You can use that
login here (use your e-mail address as username).
Free Pascal Community links here (doesn't work):
http://community.freepascal.org:10000/
What is the Free Pascal Community? Is that the same as this Lazarus
forum?
----------------------------------------------------------------------
Bart · 2019-01-03 23:00
AFAIK the community does not exist anymore.
Bart
----------------------------------------------------------------------
wp · 2019-01-03 23:13
Quote from: Paul Breneman on January 03, 2019, 11:38:40 pmWhat is the
Free Pascal Community? Is that the same as this Lazarus forum?
I can't remember how I created that account. But I have the same
password for the bugtracker as for the forum.
----------------------------------------------------------------------
Paul Breneman · 2019-01-03 23:14
Quote from: Bart on January 04, 2019, 12:00:26 amAFAIK the community
does not exist anymore.
I'll try to file a bug report on the bugs page.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 11:06
As I wrote earlier, the program compiles and runs okay. I'll try to
file two bug reports soon.
When I open the CtrlTerm.lpr file, why is Product -> Forms (View
Project Forms) empty? Isn't the LPR file enough (similar to the DPR
file in Delphi)?
----------------------------------------------------------------------
lucamar · 2019-01-04 11:52
Quote from: Paul Breneman on January 04, 2019, 12:06:31 pmIsn't the
LPR file enough (similar to the DPR file in Delphi)?
AFAIK, in Lazarus all that information is stored in the LPI; the LPR
is just the main program source.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 13:48
Quote from: lucamar on January 04, 2019, 12:52:27 pmQuote from: Paul
Breneman on January 04, 2019, 12:06:31 pmIsn't the LPR file enough
(similar to the DPR file in Delphi)?
AFAIK, in Lazarus all that information is stored in the LPI; the LPR
is just the main program source.
I guess that the LPI stores additional information, but why is it
necessary? The LPR has enough to list the project forms.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 13:55
Quote from: Paul Breneman on January 04, 2019, 12:06:31 pmI'll try to
file two bug reports soon.
Here they are (2 of 5 reports):
https://bugs.freepascal.org/view.php?id=34814 - bugs web page fixed
https://bugs.freepascal.org/view.php?id=34810 - Conversion fault
----------------------------------------------------------------------
lucamar · 2019-01-04 14:16
Quote from: Paul Breneman on January 04, 2019, 02:48:18 pmI guess that
the LPI stores additional information, but why is it necessary? The
LPR has enough to list the project forms.
Normally yes, from the uses clause, but not neccesarily: you can make
a LPR file which "uses" only the strictly needed units--p.e. just the
main form--for the main program to compile, so all the information
needed to build the project is stored in the LPI. For example, part of
the LPI from one of my (console) projects:
Code: XML [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
And a snip from a GUI one (a form unit):
Code: XML [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
The LPR is just pascal source; the extension is mostly a convenient
way to find quickly where the "program Whatever;" statement resides.
----------------------------------------------------------------------
wp · 2019-01-04 14:28
Quote from: Paul Breneman on January 04, 2019, 12:06:31 pmWhen I open
the CtrlTerm.lpr file, why is Product -> Forms (View Project Forms)
empty?
Maybe, because the conversion aborted due to the error that you
report, the lpi file was not written? Simply you could add the main
form unit to the project manually, as well as all required packages
(if they are missing, too).
----------------------------------------------------------------------
lucamar · 2019-01-04 14:51
Quote from: wp on January 04, 2019, 03:28:15 pmQuote from: Paul
Breneman on January 04, 2019, 12:06:31 pmWhen I open the CtrlTerm.lpr
file, why is Product -> Forms (View Project Forms) empty?
Maybe, because the conversion aborted due to the error that you
report, the lpi file was not written? Simply you could add the main
form unit to the project manually, as well as all required packages
(if they are missing, too).
Do note that opening an LPR is like opening any other Pascal source,
wheter .PP, .PAS, .P or whatever except it first shows the warning
shown in the atttached image (ETA: if the corresponding LPI exists).
To open the project one has to open the .LPI file.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 16:19
Quote from: wp on January 04, 2019, 03:28:15 pmQuote from: Paul
Breneman on January 04, 2019, 12:06:31 pmWhen I open the CtrlTerm.lpr
file, why is Product -> Forms (View Project Forms) empty?
Maybe, because the conversion aborted due to the error that you
report, the lpi file was not written? Simply you could add the main
form unit to the project manually, as well as all required packages
(if they are missing, too).
The conversion only takes one to four seconds (please try it, the zip
is only 137KB). There are LPI and LPS files created, but apparently
something is missing in them. Those files look much more complex than
the LPR file, so I'll probably hold off on trying to figure things out
for myself.
Thanks for all of the feedback in this message thread!
----------------------------------------------------------------------
wp · 2019-01-04 17:53
Quote from: Paul Breneman on January 03, 2019, 10:38:39 pm[...] I
uncheck all of the options and click Start Conversion [...]
I keep all options untouched, start the conversion, and the lpi file
is created correctly with the mainform is included. There are a few
problems, though:
As you already noted, the unit "Interfaces" is not added - but this is
a single click.The coordinate offsets are not applied to the
ConnectGroupbox although this was activated in the conversion form;
this means the controls contained in the groupbox have a too large Top
value.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 18:21
Quote from: wp on January 04, 2019, 06:53:44 pmQuote from: Paul
Breneman on January 03, 2019, 10:38:39 pm[...] I uncheck all of the
options and click Start Conversion [...]
I keep all options untouched, start the conversion, and the lpi file
is created correctly with the mainform is included.
Thanks wp for your help!
Is there a way to restore (more simple than reinstalling Lazarus) the
default options on the conversion dialog?
----------------------------------------------------------------------
Handoko · 2019-01-04 18:28
Copy/paste delphiconverter.xml from the installation source.
On my linux, the file is located at [home]/.lazarus
----------------------------------------------------------------------
wp · 2019-01-04 18:40
Quote from: Paul Breneman on January 04, 2019, 07:21:45 pmIs there a
way to restore (more simple than reinstalling Lazarus) the default
options on the conversion dialog?
This is what I used:
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 18:52
Quote from: Handoko on January 04, 2019, 07:28:40 pmCopy/paste
delphiconverter.xml from the installation source.
On Win10 I installed from exe. Any simple way on Win10?
----------------------------------------------------------------------
Handoko · 2019-01-04 18:54
Maybe you can use mine. But you should make backup first.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 18:54
Quote from: wp on January 04, 2019, 07:40:28 pmQuote from: Paul
Breneman on January 04, 2019, 07:21:45 pmIs there a way to restore
(more simple than reinstalling Lazarus) the default options on the
conversion dialog?
This is what I used:
That picture is worth a lot! Thanks!
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 18:59
Quote from: Handoko on January 04, 2019, 07:54:14 pmMaybe you can use
mine. But you should make backup first.
First I'd need to figure out on Win10 where I need to put that file.
Does that file exist already?
Sorry, I've been using Xubuntu for many years and recently switched
back to windows and I'm still trying to find my way.
----------------------------------------------------------------------
wp · 2019-01-04 19:33
Quote from: Paul Breneman on January 04, 2019, 07:59:58 pmFirst I'd
need to figure out on Win10 where I need to put that file. Does that
file exist already?
In Lazarus, go to "View" > "IDE Internals" > "About IDE". Find the
line "Primary configuration directory" - this is where all your config
files are stored.
----------------------------------------------------------------------
Paul Breneman · 2019-01-04 20:45
Quote from: wp on January 04, 2019, 08:33:12 pmIn Lazarus, go to
"View" > "IDE Internals" > "About IDE". Find the line "Primary
configuration directory" - this is where all your config files are
stored.
Thanks for that info!
I see a debug.log in that folder which I'll have to study more. Is
there a wiki page about that? Without a timestamp on each line it is
a little difficult for me to figure out.