Mattias Gaertner wrote 13 lines
On Tue, 25 May 2010 05:40:40 +0200
Marc Santhoff wrote:
> Hi,
>
> having not made any visual components since Delphi2 I have to ask:
>
> 1.
> When I want to install a visual component to lazarus, does it need to
> have a package file (.lpk) or is the classic way of installing from the
> components source file(s) still available?
You need a lpk file.
OK.
Show quoted text 8 lines
> 2.
> When I make a package file for an ancient Delphi component to port to
> lazarus and it compiles and installs but doesnt show up in the IDE
> although it is found in the package list, what has gone wrong there?
Possible reasons:
- The register procedure was not called, because you didn't check the
'Has Register procedure' for this unit in the package editor.
Do you mean the checkbox "Register Unit" in the lower third of the package management window? Well, that one is actually checked.
- You didn't start the new IDE, but the old. Start the IDE in the
terminal. You will see where the new lazarus executable is created.
?I think it is the right one. lazarus at my site is a symlink in my home dirs bin directory, this symlink is pointing to the file named lazarus in the source dir, the right file should be used whether I start from a terminal (which I do normally) or via the 'run ...' menu of the window manager. There is no global installation. But I'll test startlazarus.
No, no change. The package is listed and in the package tree is flagged as "install on next start".
Hint: When you select the unit in the package editor you can see the
registered components of this unit.
I don't see anything like that, maybe I have to flip another switch? I dared to attach another screen shot ...
Show quoted text 10 lines
> The long story for question 2:
>
> I made a package for the component, converted the dfm to lfm, fixed some
> code and commented things for later until it compiles okay. ? A resource
> file is included directly without converting to .lrs because I read in
> the wiki this is possible and I don't know how to extract what is in
> the .res-file.
Yes, you can use res files. I don't know if all formats work the same
as under Delphi.
I wish I already were there ... ;)
Show quoted text 16 lines
> Then I klicked "install" at the package management window. When asked if
> I want lazarus to be built now I clicked yes and compilation ran through
> until lazarus ended.
>
> When trying to start the freshly compiled ide his error happens:
>
> $ lazarus
> Fatal error 'Spinlock called when not threaded.' at line 78 in
> file /usr/src7/src/lib/libthr/thread/thr_spinlock.c (errno = 2)
> Abbruch(core dumped)
Maybe your package needs threading support.
See here
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Multithreading_in_packages
From looking through the sources it doesn't, there is no TThread or
similar used.
But I fear this may be a FreeBSD issue, there has been some switching in threading libraries - IIRC there are at least two or three of them. I'll try to fix this by talking to FreeBSD experts ...
Show quoted text 11 lines
> Aftwerwards I did a "gmake bigide" in lazarus source dir to get a
> working thingy again, which worked and ran fine.
> With one exception: the new package does not show up, it's state is
> still set to "install on next start", but nothing happens when started
> over.
make bigide compiles an IDE with a standard set of packages.
You can use the command line tool lazbuild to compile an IDE with your
packages:
http://wiki.lazarus.freepascal.org/lazbuildPretty cool, I asked myself lately how I can build projects from the command line or from a script. :)
But I have used "make bigide" because I needed to recompile lazarus itself after the threading error which was thrown repeatedly and lazarus didn't learned on this mailing list that by using this target all packages installed manually are pulled in - which works very nice.
Show quoted text 5 lines
> All that occured with:
>
> Lazarus svn 25285 and 25631
> fpc 2.4.0
> FreeBSD 7.2