Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Graeme Geldenhuys
2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:

 It compiles but when I run ./fpmake archive it returns a lot of
 Warning: source file * not found for * but they actually exists(!).

I actually have no idea how to add include files. The example Henry
created only sets up the include paths, but not include files for
'archive' functionality.

I browser the sources and noticed there is Sources.Add(), but I'm not
sure if that will do the trick.
eg:
   T := P.Sources.AddSrc('filename_here');


 Can somebody help me to understand it?

Michael?  Any idea how to use the 'archive' feature of fpmake?


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Michael Van Canneyt


On Mon, 27 Apr 2009, Graeme Geldenhuys wrote:

 2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:
 
  It compiles but when I run ./fpmake archive it returns a lot of
  Warning: source file * not found for * but they actually exists(!).
 
 I actually have no idea how to add include files. The example Henry
 created only sets up the include paths, but not include files for
 'archive' functionality.
 
 I browser the sources and noticed there is Sources.Add(), but I'm not
 sure if that will do the trick.
 eg:
T := P.Sources.AddSrc('filename_here');

There is also:

procedure TSources.AddSrcFiles(const AFileMask: string; Recursive: boolean);

It does a search and adds all files.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Henry Vermaak
2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:
 From: Graeme Geldenhuys graemeg.li...@g...
 Subject: Re: [fpc-pascal] How to use fpcmake

 Hi Guillermo,

 I struggled with it as well. Henry Vermaak then created an example for
 me and showed how to use it. The example he did was for the fpGUI
 Toolkit project.

 I did read Vermaak's example and I've found some documentation at the
 wiki (http://wiki.lazarus.freepascal.org/FPMake) but I can't
 understand it. That's the program I wrote:

i'm sorry my example is a bit crap, never got round to do it properly.
 it's best if you work off something in the fpc sources.  for example
in packages/mysql/fpmake.pp there is this:

T:=P.Targets.AddUnit('mysql3_com.pp');
  with T.Dependencies do
begin
  AddInclude('mysql3_comtypes.inc');
  AddUnit('mysql3_version');
end;

henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: How to use fpcmake

2009-04-26 Thread Guillermo Martínez Jiménez
 From: Graeme Geldenhuys graemeg.li...@g...
 Subject: Re: [fpc-pascal] How to use fpcmake

 Hi Guillermo,

 I struggled with it as well. Henry Vermaak then created an example for
 me and showed how to use it. The example he did was for the fpGUI
 Toolkit project.

I did read Vermaak's example and I've found some documentation at the
wiki (http://wiki.lazarus.freepascal.org/FPMake) but I can't
understand it. That's the program I wrote:


PROGRAM fpmake;
USES
  fpmkunit;
VAR
  I: TCustomInstaller;
  P: TPackage;
  T: TTarget;
  UnitsList: ARRAY [0..8] OF STRING = (
'albase', 'alblend', 'alfile', 'alfixed', 'alflic', 'algl', 'allegro',
'alvga', 'alvtable'
  );
  IncList: ARRAY [0..1] OF STRING = (
'alkeyid'. 'alsysdrv'
  );
  Cnt: INTEGER;
BEGIN
  I := Installer;
  P := I.AddPackage ('allegro.pas');
  P.Version := '4.3.0-SVN';
  P.UnitPath.Add ('lib');
  FOR Cnt := 0 TO 8 DO
  BEGIN
T := P.Targets.AddUnit (UnitsList[Cnt]+'.pas');
  END;
{ How do I do to add included files?
  FOR Cnt := 0 TO 1 DO
  BEGIN
T := P.Targets.AddUnit (IncList[Cnt]+'.inc');
  END;
}
  I.Run;
END.


It compiles but when I run ./fpmake archive it returns a lot of
Warning: source file * not found for * but they actually exists(!).

The idea is to install all files from UnitsList and IncList in the
FPC's unit directory so they're accessible to any project. Optionally
there's also documentation (build from sources using pasdoc), some
examples, a complex demonstration (with data) and two tools.

Can somebody help me to understand it?

Guillermo Ñuño Martínez
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: How to use fpcmake

2009-04-16 Thread Guillermo Martínez Jiménez
 From: Graeme Geldenhuys

 Hi Guillermo,

 I struggled with it as well. Henry Vermaak then created an example for
 me and showed how to use it. The example he did was for the fpGUI
 Toolkit project.

Usage:
  - Compile fpmake.pas as follows:
 fpc fpmake.pas

  - To find out more about what fpmake can do and see some help
 fpmake --help

  - Build and install fpGUI
 fpmake install

Note that if you installed FPC in a non-standard location on you
system you need to tell fpmake which compiler and units to use. The
following is all in one line:
 fpmake.exe -r c:\fpc\2.2.3\bin\i386-win32\ppc386.exe
-UG c:\fpc\2.2.3\units\i386-win32
  or
 ./fpmake -v build -UG /opt/fpc/lib/fpc/2.2.3/units/i386-linux/


 To view the actual fpmake.pas file, you can check-out fpGUI from
 SourceForge, or view the specific file via the following url.

 http://fpgui.git.sourceforge.net/git/gitweb.cgi?p=fpgui;a=blob;f=src/fpmake.pas;h=80e0be3d69132ae12b2c4c970fe29e14c500cb14;hb=67f8fcc69fec98c12d2dac11980ed97d12d380c6

 If you have problems with the full URL, you can also use this one:

http://tinyurl.com/ce8s52

 I have not read the documentation of fpmake for some time, but when I
 did, it was not clear as to how to compile and use it. I'll download a
 new copy of the documentation to see if things are improved - and
 contribute some newbie help if nothing has changed.

 Regards,
  - Graeme -

Actually I was asking for fpCmake...

Anyway, I'll test your suggestion.  Thanks.

Guillermo Ñuño Martínez.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal