TPackage class
Central class for package management and building
Declaration
TPackage = class(TNamedItem)Inheritance
Description
TPackage is the central class in the fpmake build system that represents a complete package.
A package contains build targets, dependencies, installation files, and all configuration needed for
compilation and deployment.
Each package can contain multiple targets such as units, programs, and libraries. The package manages compilation options, search paths, dependencies on other packages, and installation procedures. It supports cross-platform compilation with CPU and OS-specific settings.
It handles the following aspects:
- Management of TTarget build targets
- Dependency tracking through TDependency objects
- Cross-platform compilation support
- Package variants for different build configurations
- Custom installation and archiving procedures
See also
Properties
Dictionary | protected | |
PackageVariantsList | protected | |
Version | public | Version string of the package |
FileName | public | Filename of the package definition file |
ShortName | public | Short name identifier for the package |
HomepageURL | public | URL of the package homepage |
DownloadURL | public | URL for downloading the package |
Email | public | Contact email address for the package |
Author | public | Author or maintainer of the package |
License | public | License terms for the package |
Directory | public | Base directory path of the package |
Description | public | Descriptive text about the package |
DescriptionFile | public | File containing package description text |
InstalledChecksum | public | Checksum of installed package files |
IsFPMakeAddIn | public | Whether this package is an FPMake add-in |
SupportBuildModes | public | Whether package supports different build modes |
BuildMode | public | Default build mode configuration for the package |
Flags | public | Package flags and behavior settings |
PackageVersion | public | Version information for the package |
TransmitOptions | public | Options transmitted to dependent packages |
OSes | public | Supported operating systems for the package |
CPUs | public | Supported CPU architectures for the package |
SubTargets | public | Subtarget configurations for the package |
NeedLibC | public | Whether package requires C library linkage |
Options | public | Compiler options for the package |
UnitPath | public | Search paths for unit files |
ObjectPath | public | Search paths for object files |
IncludePath | public | Search paths for include files |
SourcePath | public | Search paths for source files |
ExamplePath | public | Search paths for example files |
TestPath | public | Search paths for test files |
FPDocFormat | public | Output format for FPDoc documentation |
InstallFiles | public | Collection of files to be installed |
CleanFiles | public | Collection of files to be cleaned |
Dependencies | public | Collection of package dependencies |
Commands | public | Collection of custom build commands |
State | public | Current build state of the package |
Targets | public | Collection of build targets |
Sources | public | Collection of source files |
UnitDir | public | Directory for compiled unit files |
UnitConfigFileName | public | Filename for unit configuration file |
NamespaceMap | public | Mapping of unit names to namespaces |
BeforeCompile | public | Event handler executed before package compilation |
BeforeCompileProc | public | Procedural event handler before compilation |
AfterCompile | public | Event handler executed after package compilation |
AfterCompileProc | public | Procedural event handler after compilation |
BeforeInstall | public | Event handler executed before package installation |
BeforeInstallProc | public | Procedural event handler before installation |
AfterInstall | public | Event handler executed after package installation |
AfterInstallProc | public | Procedural event handler after installation |
BeforeClean | public | Event handler executed before package cleanup |
BeforeCleanProc | public | Procedural event handler before cleanup |
AfterClean | public | Event handler executed after package cleanup |
AfterCleanProc | public | Procedural event handler after cleanup |
BeforeArchive | public | Event handler executed before package archiving |
BeforeArchiveProc | public | Procedural event handler before archiving |
AfterArchive | public | Event handler executed after package archiving |
AfterArchiveProc | public | Procedural event handler after archiving |
BeforeManifest | public | Event handler executed before manifest creation |
BeforeManifestProc | public | Procedural event handler before manifest creation |
AfterManifest | public | Event handler executed after manifest creation |
AfterManifestProc | public | Procedural event handler after manifest creation |
BeforePkgList | public | Event handler executed before package listing |
BeforePkgListProc | public | Procedural event handler before package listing |
AfterPkgList | public | Event handler executed after package listing |
AfterPkgListProc | public | Procedural event handler after package listing |
Methods
SetName | protected | |
SaveUnitConfigToStringList | protected | |
Create | public | Creates a new package instance |
destroy | public | Destroys the package instance and frees resources |
HaveOptions | public | Checks if package has global compilation options |
GetUnitsOutputDir | public | Returns the output directory for compiled units |
GetUnitConfigOutputFilename | public | Gets output filename for unit configuration file |
GetBinOutputDir | public | Returns the output directory for binary files |
GetCleanFiles | public | Gets list of files to be cleaned for the package |
GetArchiveFiles | public | Gets list of files to include in package archive |
InheritPackageVariantsFromDependency | public | Inherits package variants from a dependency package |
GetPackageVariantsByName | public | Gets package variants collection by name |
SetUnitsOutputDir | public | Sets the output directory for compiled units |
GetPackageUnitInstallDir | public | Gets installation directory for package units |
SetPackageUnitInstallDir | public | Sets installation directory for package units |
GetInstallFiles | public | Gets list of files to be installed for the package |
GetInstallSourceFiles | public | Gets list of source files to be installed |
GetArchiveSourceFiles | public | Gets list of source files for package archive |
GetManifest | public | Gets package manifest information |
ListPackage | public | Lists package information to a string list |
AddPackageVariant | public | Adds a package variant to the package |
ApplyPackageVariantToCompilerOptions | public | Applies package variant settings to compiler options |
SetDefaultPackageVariant | public | Sets the default package variant for the package |
LoadUnitConfigFromFile | public | Loads unit configuration from a file |
SaveUnitConfigToFile | public | Saves unit configuration to a file |
EnterResolveDirsCS | public | Enters critical section for directory resolution |
LeaveResolveDirsCS | public | Leaves critical section for directory resolution |
AddTargetsFromDir | public | |
ApplyNameSpaces | public | Applies namespace settings to a filename |
SubTargetAllowed | public | Checks if a subtarget is allowed for the package |
Inherited
From TNamedItem (1)
From TCollectionItem (11)
Changed Collection DisplayName GetDisplayName GetNamePath GetOwner ID Index SetCollection SetDisplayName SetIndex
From TPersistent (6)
Assign AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
