[fpc-devel] (Re)compiling FPC or is there something like fpc.bpg?
Graeme Geldenhuys
graemeg.lists at gmail.com
Sat Jul 24 12:28:55 CEST 2010
2010/7/23 Adem <listmember at letterboxes.org>:
>
> What I am aiming is to, first, get the information in each 'fpmake.pp' file
> into one single 'Installer' object.
This is easy to do with a few IFDEF lines...
{$IFDEF APROGRAM}
> program fpmake;
> uses fpmkunit;
> Var
> P: TPackage;
> T: TTarget;
> begin
{$ENDIF}
> With Installerdo
> begin
> P := AddPackage('my-nice-program');
> P.OSes :=[win32,openbsd,netbsd,freebsd,darwin,linux];
> T := P.Targets.AddUnit('myunit');
> T.ResourceStrings :=True;
> T := P.Targets.AddUnit('myprogram');
> T.Dependencies.Add('myunit');
> Run;
> end;
>
{$IFDEF APROGRAM}
> end.
{$ENDIF}
Now if APROGRAM is defined, they act as self-contained programs. If
not, they act as include files and can be combined.
> in a file called, say, 'fpmake.pp.inc'.
FPC doesn't care about the file extension, so you can name them all
*.pas (even if they are include files - no APROGRAM define exists).
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list