[Lazarus] Fwd: How to change default editor font *before* primary config ~/.lazarus is created?

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Oct 17 10:57:49 CEST 2012


[...]
> 2012/10/16 Mattias Gaertner <nc-gaertnma at netcologne.de>:
>
> >> OPT="-g- -Xs"
> >
> > Why?
>
> I'm still working on it on my local pc (with rather slow disk) and
> want fast compiles and small files. Also because I do not actually use
> the compiled units I am only interested in a stripped lazarus binary,
> for running on the build farm (which are much more powerful machines)
> I would even add -CX -XX here.

I thought this is a proposal for better standard debian packages. The normal
Lazarus user needs debug.


> >> override_dh_auto_clean:
> >> $(MAKE) -C $(ORIG) cleanbigide distclean
> >> find $(ORIG) -name "*.a" -exec rm {} \;
> >> $(RM) $(ORIG)/lazarus
> >> $(RM) $(ORIG)/startlazarus
> >> $(RM) $(ORIG)/lazbuild
> >> $(RM) -r /tmp/lazarus
> >
> > Better start with an svn export.
>
> This is again a convenience for me doing repeated builds on my local
> machine. On the build server the $(ORIG) folder will contain a freshly
> unzipped upstream tarball or for my nightly fixes on launchpad it will
> contain a fresh snapshot of the fixes branch (this is created newly
> every time by a bzr-builder recipe from a mirror of the lazarus fixes
> branch in the launchpad bzr repository).
>
> This could be created by a separate script when run locally (it may
> *not* happen inside rules because the build servers do not have access
> to anything other than what is contained in the source package when
> the build has started)

ok, so not for the standard debian packages.


> >> # we do not need to install any of the compiled units because
> >> # they are never used, they would be a waste of disk space.
> >> # everything will be compiled on demand into ~/.lazarus/lib/
> >> find $(ORIG) -name "*.ppu" -exec rm {} \;
> >> find $(ORIG) -name "*.o" -exec rm {} \;
> >> find $(ORIG) -name "*.a" -exec rm {} \;
> >
> > Maybe not a good idea: The compile takes a lot of time, on multi user
> > systems
> > (e.g. student pools) you get duplicates, home can be on a network share
> > (slow).
>
> This is a valid point. But is it really significant for most users or
> for typical users nowadays? At one point (when they change lazarus
> build options) it will compiled into ~/.lazarus/ anyways. And its
> really fast, even on my very old laptop and happens only for the very
> first time (and then only after options have changed but this would
> happen anyways). On the other hand all the above brings down my entire
> deb package to only 45MB and reduces installed size in /usr/share
> greatly.

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.


> >> # we cannot directly install into $(ROOT)/usr
> >> # because lazarus make install is broken (copy into itself)
> >> # so we install into a temp dir outside of this tree
> >> # please fix this in lazarus makefile
> >> $(MAKE) -C $(ORIG) install PREFIX=/tmp/lazarus/usr
> >
> > This works here:
> > sudo make install
>
> no, it cannot work.

You lost me here. How can something not work that just worked?


> The typical setup for package building is that
> $(ORIG) and $(CURDIR) are identical (debian folder is in the same
> directory as the top level makefile). Actually I made this distinction
> between $(ORIG) and $(CURDIR) only because I need to workaround it for
> my nightlies because of the existing debian folder (i complained
> about) i cannot merge upstream and my own packaging, so i nest entire
> upstream into a subdirectory but I do this only for the nightlies and
> this is a very ugly hack and I ultimately want to avoid it. Ideally
> and normally $(ORIG) and $(CURDIR) are identical.
>
> And when ./debian/lazarus/usr/ is a subfolder of ./ then the following
> cp -r . ./somewhere/ will fail with error about recurively copying a
> folder into a subdirectory of itself. It should instead copy only what
> it needs explicitly.

I'm not sure I can follow you here. How can I reproduce the bug?


> >> # install forgot to install desktop start menu item
> >> # please fix this in lazarus makefile
> >> mkdir -p $(ROOT)/usr/share/applications
> >> mkdir -p $(ROOT)/usr/share/pixmaps
> >> cp $(ORIG)/install/lazarus.desktop $(ROOT)/usr/share/applications/
> >> convert $(ORIG)/images/icons/aqua.ico[0]
> >> $(ROOT)/usr/share/pixmaps/lazarus.png
> >
> > Do not use 'cp'. Use 'install':
>
> yes, you are right, install would be better.
>
> >> # the following is INCOMPLETE and its only a dirty workaround!
> >> # create most probably needed unit directories for rebuilding ide
> >> # the ide - when building itself - will try to mkdir -p them
> >
> > ok
>
> mkdir -p unit output directory seems to happen though some
> autogenerated (by fpcmake) snippet of makefile code that is
> automatically in all fpcmake Makefiles, it will probably not be easy
> to remove it.

Don't try. Just create the output directories to make mkdir -p happy. They don't
hurt.


Mattias




More information about the Lazarus mailing list