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

Bernd prof7bit at gmail.com
Tue Oct 16 14:16:48 CEST 2012


Sorry, again the message went only to Mattias while I thought we were
still talking on the mailinglist, It must be the gmail web interface
that sometimes makes it easy to accidentally press the wrong reply
button or the reply on the wrong copy of the message while gmail still
makes it appear as if it were part of the original thread. Here again
a copy (sorry for eventual duplicate)

---------- Forwarded message ----------
From: Bernd <prof7bit at gmail.com>
Date: 2012/10/16
Subject: Re: [Lazarus] How to change default editor font *before*
primary config ~/.lazarus is created?
To: Mattias Gaertner <nc-gaertnma at netcologne.de>


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.

>> 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)


>> # 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.

>> # 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. 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.

>> # 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.




More information about the Lazarus mailing list