[Lazarus] Installing packages using lazbuild - am I on the right path?
reinierolislagers at gmail.com
Mon May 21 09:58:36 CEST 2012
I'm trying to figure out how to set packages for
installation/compilation in Lazbuild.
Goal: add packages to user IDE from command line using lazbuild.
I've looked around the code and started a rough hack to try and install
the rx component when rebuilding the IDE.
I added this in TLazBuildApplication.BuildLazarusIDE:
// try loading install packages
// my modifications start
//rao: testing: add rx
// adapted from addtoinstall
//todo: replace 'rx' with package name
if not raotestpackage.StringToID(PkgName) then
debugln('Invalid ID: ', PkgName);
if APackage<>nil then begin
// check if package is loaded and has some attributes that prevents
// installation in the IDE
if APackage.PackageType in [lptRunTime,lptRunTimeOnly] then begin
if ConflictDep<>nil then begin
// Mark package for installation - is this the right way?
// Add our new package to the packages we've currently loaded
// I thought this would save the list of user-defined packages, is
// Do I need something like this to save the list of packages?:
// save target directory //existing code resumes
While the code runs, nothing happens... and I'm sure just copy/pasting
code from other parts without understanding what's going on isn't the
fastest/surest way of getting things working.
1. Am I on the right track?
2. Is packagegraph a representation of all packages present in the IDE?
3. What do the package .AutoInstall types mean? None: not installed,
dynamic: needed as a dependency for other packages, static: always
installed in IDE (e.g. because it is selected by the user)? Am I right
in manipulating this property?
More information about the Lazarus