[Lazarus] How to compile RTL in Lazarus?

Marco van de Voort marcov at stack.nl
Thu May 15 20:56:31 CEST 2008


On Thu, May 15, 2008 at 05:06:31PM +0800, Paul Ishenin wrote:
> >     I wanted to convert Delphi units to lazarus units.When I used 
> > TReader.DefineBinaryProperty 
> > ( \fpc\2.2.0\souce\rtl\objpas\classes\reder.inc),I found that the size 
> > of "AReadData" is different from Delphis'.I have modified the unit and 
> > want to recompile it.The problem is that I know how to compile LCL or 
> > IDE under command line,but I don't know how to compile RTL files!Does 
> > anyone would do me a favor and tell me how to compile lazarus RTL 
> > files?  Thanks a lot.
> >  
> 
> I dont know how is this correct, but I am using this script:
> 
> PATH=D:\programming\fpc_2_2\bin\i386-win32
> make clean all OPT="-g"
> copy compiler\ppc386.exe bin\i386-win32\
> copy utils\*.exe bin\i386-win32\
> 
> I know that 'make install' should do things but it doesnot work for me.

My script:

@echo off
d:
cd \repo\fpc
make clean all install UPXPROG=echo COPYTREE=echo OPT="-gl -CX -XXs -O-"
INSTALL_PREFIX=d:\pp11  > d:\repo\buildlog.txt

Vista specific mod:

@echo off
d:
cd \repo\fpc
make clean all install UPXPROG=echo COPYTREE=echo OPT="-gl -CX -XXs -O-"
INSTALL_PREFIX=c:\fpc GINSTALL=vistin.exe > d:\repo\buildlog64.txt


Some explanations:

UPXPROG=echo   -> makes upxing a non-op. It is not needed in general with
terabyte HDs on sale. 

COPYTREE=echo  -> during install some example trees are recursively copied.
this fails on SVN dirs. This omits those copies at the expense of no
installed examples (you can still do that once in a while by exporting the
source first, since the problem is in the SVN dirs).

INSTALL_PREFIX=d:\somedir  -> directory where to put snapshot

GINSTALL=vistin.exe  -> vistin is "ginstall.exe" copied to vistin.exe. This
because Vista wants to UAC anything that is named "install" or "setup",
which doesn't work for console apps.

The OPT= stuff is not fixed, but changes depending on my needs.



More information about the Lazarus mailing list