michael cb3043b3a2 * Fixed 19068 14 tahun lalu
..
examples f0c4849f3a * another example 17 tahun lalu
lnet ee598d6f67 * update lNet to 0.6.4 15 tahun lalu
Makefile 547a1b289c * Do not use a buildunit, but build the units directly. To avoid that 14 tahun lalu
Makefile.fpc 547a1b289c * Do not use a buildunit, but build the units directly. To avoid that 14 tahun lalu
README.txt 4bf254bc32 * added .txt extensions to all README, TODO and COPYING files 16 tahun lalu
fpmkunitsrc.inc 819b0a0f0a * Regenerated and added comment how to re-generate 15 tahun lalu
fppkg.lpi 21c81ee3fd * Session-info removed from Lazarus project-file 15 tahun lalu
fppkg.pp fa58935cfe * Added command listsettings to values for all settings 14 tahun lalu
fprepos.pp cb3043b3a2 * Fixed 19068 14 tahun lalu
fpxmlrep.pp e8e9da4047 * replace showall with list command 16 tahun lalu
pkgcommands.pp 04017bd0f3 * Do not show the message that dependencies are being installed in recursive calls 14 tahun lalu
pkgdownload.pp 445dd5fc91 * Show message when downloading package 14 tahun lalu
pkgfpmake.pp 27b6b908f1 * Fixed problem with spaces in path of add-ins (maybequoted was called twice) 14 tahun lalu
pkgglobals.pp 533f01f158 * Use fppkg as application name on Windows and other OS'es. This means that 14 tahun lalu
pkghandler.pp 4d13235ea0 * Store the location of the original source when installing a package 14 tahun lalu
pkglnet.pp ef9177ccc4 * report URL in download failure 17 tahun lalu
pkgmessages.pp 445dd5fc91 * Show message when downloading package 14 tahun lalu
pkgmkconv.pp 85250cca06 * split repository in InstalledRepository and AvailableRepository 17 tahun lalu
pkgoptions.pp 7b613697fa * Fixed AV when files cant be opened 14 tahun lalu
pkgrepos.pp e5b156f29a * When a add-in is installed, add it to the fpmake dependencies list, so that packages 14 tahun lalu
pkgwget.pp ef9177ccc4 * report URL in download failure 17 tahun lalu

README.txt

This is the FPC packager.

The architecture is as follows:

A mirror list is maintained with FPC repositories.
The packager will download the mirror list and store
it somewhere locally

From a mirror, a repository is chosen (using it's name)

From the repository the repository file is downloaded.
It contains all known packages. The fprepos.pp unit contains the
functionality to read and maintain the package file.

The packager maintains a local repository file. when needed
it will download a package and install it. It does so recursively.

Each package contains a fpmake.pp driver. It contains all that
is needed to compile, install and zip a package. It can also
create a manifest file (in XML) to import in a repository.

All packager functionality will be implemented in units so
these units can be used in command-line and GUI package managers.

All packager command handling is implemented in descendents fom
TPackageHandler (pkghandler.pp). All messages emitted by these
handlers are in pkgmessages.

Units:
-----

fprepos:
A unit that describes a repository.
It is mainly a collection of packages.
fpxmlrep
A unit to read/write a repository to XML. It can be used to read a
manifest file as produced by the fpmake driver.
pkgropts
A unit to maintain settings for the packager it reads/writes
options from/to an ini file.
fpmkunit
this is the unit that implements all the functionality a fpmake driver
needs.
fpmktype
types and constants shared by fpmkunit and fprepos
rep2xml
test program for the fprepos unit.
reptest
creates some test packages for use in the rep2xml test program.
fppkg
the package manager application
fpmkconv
Makefile.fpc to fpmake converter.
pkgmessages
the messages used in pkghandler and below.
pkghandler
the base for all fppkg command handlers
pkgdownload
a base implementation for download functionality in fppkg
pkgwget
a downloader based on spawning wget.
pkgsynapse
a downloader based on Synapse. Do not put in makefile, as Synapse is
not distributed by default with FPC.
pkglibcurl
a downloader based on LibCurl (plain C library).
pkgocurl
a downloader based on CurlPas (object version). Do not put in makefile,
as CurlPas is not distributed with FPC.
pkglnet
a downloader based on lNet. The library is distributed in "lnet" subdir
of fppkg root.


Options supported in packager config file:
------------------------------------------

LocalMirrors
Local file with list of mirrors.
RemoteMirrors
URL with location of remote mirrors file.
RemoteRepository
Name of repository as found in LocalMirrors file.
LocalRepository
Location of local repository file.
InstallDir
Directory to install packages/units to
BuildDir
Directory where to unpack and build packages
Compiler
Compiler binary to be used
OS
Default OS
CPU
Default CPU

Defaults can be found in pkgropts


Helpfull commands for building packages:
----------------------------------------

* Generate AddInclude and AddUnit lines from an existing PPU file:

ppudump | awk "/^Source/ { printf(\"AddInclude('%s');\\n\",\$5); } /^Uses unit/ { printf(\"AddUnit('%s');\\n\",tolower(\$3)); }"

* Testing if building a package from archive works:

fpc fpmake && fpmake archive && fppkg build *.zip

* Comparing units directories and generate AddUnit lines for missing .ppu files in :

diff -q | awk "/^Only.*ppu/ { gsub(\".ppu\",\".pp\"); printf(\"T:=P.Targets.AddUnit('%s');\n\",\$NF); }"