[Lazarus] Fwd: How to change default editor font *before* primary config ~/.lazarus is created?
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Oct 17 12:46:07 CEST 2012
Bernd <prof7bit at gmail.com> hat am 17. Oktober 2012 um 12:15 geschrieben:
> 2012/10/17 Mattias Gaertner <nc-gaertnma at netcologne.de>:
>
> > True. But Lazarus and fpc easily need one or two GB, so 45MB is not that
> > much.
> > And it is some kind of show stopper if the IDE recompiles everything to
> > install
> > one package.
> > Of course the binary will be smaller and some users have slow internet.
> > So it has pros and cons. I can live with it.
>
> Yesterday after doing more rigorous attempts to remove *all* binaries
> from the install directory (so that contents of /usr/share/ becomes
> truly architecture independent which is a *must* and the very
> definition and purpose of /usr/share/) I noticed that this gives some
> more subtle problems, when restarting the IDE after successful rebuild
> of the IDE it will look for startlazarus in the lazarus folder (and
> not on the search path). Therefore I have for now decided to install
> the entire lazarus into /usr/lib/lazarus and leave the executables it
> is looking for where they are.
Looking for startlazarus in the search path might find one of a different
version. Then you can get very strange errors. So if possible I would avoid
searching in path.
> This would make it possible to leave also the compiled units in the
> lazarus folder again (but of course only makes sense if I don't
> compile them with custom options). In the end this is only a change of
> one line in the rues file and does not break other things and it is
> nice to know that it is at least possible to make such a stripped down
> installer that still provides a fully functional Lazarus.
>
> > I'm not sure I can follow you here. How can I reproduce the bug?
>
> It is because of the typical directory layout when building a .deb
> package. I will try to explain. Consider this simple hello world
> directory layout after unzipping and preparing the source for package
> building immediately before the actual build is started:
>
> hello-world-1.0/debian/changelog
> hello-world-1.0/debian/control
> hello-world-1.0/debian/rules
> hello-world-1.0/Makefile
> hello-world-1.0/hello.lpi
> hello-world-1.0/hello.lpr
>
> after "make all" it might look like this:
>
> hello-world-1.0/debian/changelog
> hello-world-1.0/debian/control
> hello-world-1.0/debian/rules
> hello-world-1.0/Makefile
> hello-world-1.0/hello.lpi
> hello-world-1.0/hello.lpr
> hello-world-1.0/hello.ppu
> hello-world-1.0/hello.o
> hello-world-1.0/hello
>
> now it will call "make install" with PREFIX set to a special path that
> it will later use to zip the installation contents. This PREFIX folder
> is a subdirectory of the debian folder!
>
> Our example makefile (just for illustration purpose) would for example
> install into $(PREFIX)/lib/hello and also a symlink into $(PREFIX)/bin
> so after make install it should look like this:
>
> hello-world-1.0/debian/hello-world/usr/lib/hello/hello
> hello-world-1.0/debian/hello-world/usr/bin/hello -> ../lib/hello/hello
> hello-world-1.0/debian/changelog
> hello-world-1.0/debian/control
> hello-world-1.0/debian/rules
> hello-world-1.0/Makefile
> hello-world-1.0/hello.lpi
> hello-world-1.0/hello.lpr
> hello-world-1.0/hello.ppu
> hello-world-1.0/hello.o
> hello-world-1.0/hello
>
> then after make install has completed debhelper tools will zip
> everything below debian/hello-world/ and make it the data.tar.gz
> member of the .deb
>
> the reason why "make install" of lazarus fails is that at one point it does a
>
> cp -r . $(PREFIX)/share/lazarus/
>
> and with prefix set to ./debian/lazarus/usr this will expand like that:
>
> cp -r . ./debian/lazarus/usr/share/lazarus/
>
> which would attempt to copy the entire folder (*including* the debian
> folder!) into a subdirectory of itself (into the debian folder) and
> this will fail with error, cp will refuse to do this, it will start
> copying a few files but then when it comes to copying the ./debian
> folder into ./debian/lazarus/usr/share/lazarus/ it will abort with
> error.
>
> this can be avoided by either copying only the needed files
> explicitly. I worked around this by installing into a temp dir
> *outside* the current directory and then in a separate step moving it
> back into ./debian/lazarus/usr where debhelper tools will expect it to
> be and removing the debian directory (and other unwanted stuff) from
> the final install directory again.
I did the explicit approach.
Mattias
More information about the Lazarus
mailing list