fpMkUnit unit
Free Pascal package building and installation engine
The fpmkunit unit implements the core building and installation engine for Free Pascal packages.
It provides a complete set of classes and functions for managing package compilation, dependency resolution,
file installation, and archive creation.
This unit forms the foundation of the fpmake build system, offering classes like TPackage for package management, TTarget for build targets, TDependency for dependency tracking, and various installer classes for deployment.
The building engine supports cross-platform compilation with CPU and OS-specific conditional compilation, package variants, custom commands, and flexible installation schemes.
Classes and records
ECollectionError | class | Exception class for collection errors |
EDictionaryError | class | Exception class for dictionary errors |
EInstallerError | class | Exception class for installer errors |
TBasicDefaults | class | Basic default configuration class |
TBasicInstaller | class | Basic installer implementation |
TBuildEngine | class | Main build engine for compiling and installing packages |
TCommand | class | Represents a command to be executed during build |
TCommandEnumerator | class | Enumerator for iterating through commands |
TCommands | class | Collection of commands to execute during build |
TCompileTarget | record | Record type representing a compilation target |
TCompileWorkerThread | class | Worker thread for compilation operations |
TConditionalDestString | class | Conditional string with destination path |
TConditionalDestStrings | class | Collection of conditional destination strings |
TConditionalString | class | String value with CPU and OS conditions |
TConditionalStrings | class | Collection of conditional string values |
TCustomDefaults | class | Base class for build system default configurations |
TCustomInstaller | class | Base class for package installers |
TDependencies | class | Collection of build dependencies |
TDependency | class | Represents a build dependency in the fpmake system |
TDependencyEnumerator | class | Enumerator for iterating through dependency collections |
TDictionary | class | String substitution dictionary for variables and functions |
TFPCDefaults | class | FPC-specific default configuration class |
TFPCInstaller | class | Free Pascal Compiler specific installer implementation |
TfpmPlugin | class | Base class for FPMake plugins |
TfpmPluginManager | class | Manager for FPMake plugin system |
TfpmResolvePackagePathsPlugin | class | Plugin for resolving package file paths |
TFPVersion | class | Represents a Free Pascal version number |
TFunctionItem | class | Dictionary item containing a function callback |
TNamedCollection | class | Collection class for managing named items |
TNamedItem | class | Base class for items with a name property |
TNamedItemList | class | List class for managing named items |
TNotifyEventCollection | class | Collection of notification event handlers |
TNotifyEventEnumerator | class | Enumerator for iterating through notification events |
TNotifyEventItem | class | Individual notification event item with callback handlers |
TPackage | class | Central class for package management and building |
TPackageDictionary | class | Package-specific dictionary with master dictionary support |
TPackageEnumerator | class | Enumerator for iterating through package collections |
TPackages | class | Collection of packages |
TPackageVariant | class | Package variant with specific build options |
TPackageVariantEnumerator | class | Enumerator for iterating through package variants |
TPackageVariants | class | Collection of package variants |
TResourceFile | class | Represents a resource file in the build system |
TResourceFiles | class | Collection of resource files for the build system |
TSource | class | Represents a source file in the build system |
TSourceEnumerator | class | Enumerator for iterating through source collections |
TSources | class | Collection of source files |
TTarget | class | Build target representation in the fpmake system |
TTargetEnumerator | class | Enumerator for iterating through build targets |
TTargets | class | Collection class for managing build targets |
TValueItem | class | Dictionary item containing a value |
Procedures and functions
AddCustomFpmakeCommandlineOption | procedure | Adds custom command line option to FPMake |
AddLibraryExtension | function | Adds appropriate extension to library name |
AddProgramExtension | function | Adds appropriate extension to program name |
ChangeDir | procedure | Changes current working directory |
CPUSToString | function | Converts set of CPU architectures to string |
CPUToString | function | Converts CPU architecture identifier to string |
CurrentCPU | function | Gets the current CPU architecture |
CurrentOS | function | Gets the current operating system |
FixPath | function | Normalizes and fixes file path format |
GetCustomFpmakeCommandlineOptionValue | function | Gets value of custom command line option |
GetDefaultLibGCCDir | function | Gets default GCC library directory |
GetImportLibraryFilename | function | Gets filename for import library |
GetPluginManager | function | Gets the global plugin manager instance |
Installer | function | Gets the current installer instance |
IsDifferentFromBuild | function | Checks if target differs from build platform |
IsRelativePath | function | Checks if a path is relative |
MakeTargetString | function | Creates target string from parameters |
ModeToString | function | Converts build mode to string representation |
OSesToString | function | Converts set of operating systems to string |
OSToString | function | Converts operating system identifier to string |
SearchFiles | procedure | Searches for files in specified paths |
SplitCommand | procedure | Splits command line into executable and options |
StringToCPU | function | Converts string to CPU architecture identifier |
StringToCPUOS | procedure | Parses string to extract CPU and OS information |
StringToCPUS | function | Converts string to CPU architecture set |
StringToMode | function | Converts string to build mode identifier |
StringToOS | function | Converts string to operating system identifier |
Types
RTLString | type | Runtime library string type |
TArchiveEvent | procedure type | Event type for archive operations |
TArchiveProc | procedure type | Procedure type for archive operations |
TBuildMode | enumeration | Build execution modes for package compilation |
TBuildModes | set | Set of build execution modes |
TCheckDependencyResult | enumeration | Result codes for dependency availability checking |
TCommandAt | enumeration | Command execution timing specification |
TCompilerMode | enumeration | Free Pascal Compiler language compatibility modes |
TCompilerModes | set | Set of compiler modes |
TConditionalDestStringClass | type | Class reference for conditional destination strings |
TConditionalStringClass | type | Class reference type for conditional string classes |
TCopyFileProc | procedure type | Procedural type for file copying operations |
TCpu | enumeration | Supported CPU architectures for compilation |
TCPUS | set | Set of CPU architectures |
TDependencyType | enumeration | Types of dependencies supported by the build system |
TDependencyTypes | set | Set of dependency types |
TDictionaryClass | type | Class reference type for dictionary classes |
TFileType | enumeration | File type classification for build targets |
TFileTypes | set | Set of file type flags for source files |
TFPDocFormat | enumeration | FPDoc documentation output formats |
TFPDocFormats | set | Set of FPDoc formats |
TfpmPluginClass | type | Class reference type for FPMake plugins |
TInstallerClass | type | Class reference type for installer classes |
TInstallMode | enumeration | Installation operation mode |
TLogEvent | procedure type | Event procedure for logging messages |
TNotifyEventAction | enumeration | Enumeration of build process event trigger points |
TNotifyEventActionSet | set | Set of notification event actions |
TNotifyProcEvent | procedure type | Procedure type for notification events |
TOS | enumeration | Supported operating systems for compilation |
TOSes | set | Set of operating systems |
TPackageDictionaryClass | type | Class reference type for package dictionary classes |
TProcessPackageResult | enumeration | Result codes for package processing operations |
TReplaceFunction | procedure type | Function type for dynamic string replacement callbacks |
TRunMode | enumeration | Build system execution modes |
TSourceType | enumeration | Source file type classification |
TSourceTypes | set | Set of source types |
TTargetState | enumeration | Build target state during compilation |
TTargetStates | set | Set of target states |
TTargetType | enumeration | Classification of build target types |
TTargetTypes | set | Set of target types |
TVerboseLevel | enumeration | Verbosity level for build output |
TVerboseLevels | set | Set of verbose levels |
Constants
AIXSharedLibExt | constant | AIX shared library file extension |
AllAmigaLikeOSes | constant | Set containing all Amiga-like operating systems |
AllBSDOSes | constant | Set containing all BSD operating systems |
AllCPUs | constant | Set containing all supported CPU architectures |
AllImportLibraryOSes | constant | Set containing OSes requiring import libraries |
AllLimit83fsOses | constant | Set containing OSes with 8.3 filename limitations |
AllMessages | constant | All message verbosity levels |
AllOSes | constant | Set containing all supported operating systems |
AllSmartLinkLibraryOSes | constant | Set containing OSes supporting smart-linked libraries |
AllUnixOSes | constant | Set containing all Unix-like operating systems |
AllWebAssemblyOSes | constant | |
AllWindowsOSes | constant | Set containing all Windows operating systems |
Amd64 | constant | AMD64/x86_64 CPU architecture identifier |
DbgExt | constant | Debug information file extension |
DefaultMessages | constant | Default message verbosity levels |
DirNotFound | constant | Directory not found error constant |
DLLExt | constant | Dynamic link library file extension |
DocProjectFileExt | constant | Documentation project file extension |
DOS | constant | DOS operating system identifier |
DyLibExt | constant | Dynamic library file extension (macOS) |
ExeExt | constant | Executable file extension |
FPMakePPFile | constant | FPMake Pascal program filename |
FpmkExt | constant | FPMake script file extension |
IncExt | constant | Pascal include file extension |
LibExt | constant | Static library file extension |
LTOExt | constant | Link Time Optimization file extension |
MacOSX | constant | macOS operating system identifier |
ManifestFile | constant | Package manifest filename |
ObjExt | constant | Object file extension |
OSCPUSupported | constant | Matrix of supported OS/CPU combinations |
PasExt | constant | Pascal source file extension |
PkgListFileBase | constant | Package list filename base |
PkgListFileExt | constant | Package list file extension |
PPC | constant | PowerPC 32-bit CPU architecture identifier |
PPC64 | constant | PowerPC 64-bit CPU architecture identifier |
PPExt | constant | Pascal program file extension |
PPUExt | constant | Pascal compiled unit file extension |
ProgramTargets | constant | Set of program target types |
RsjExt | constant | Resource string JSON file extension |
RstExt | constant | Resource string file extension |
SharedLibExt | constant | Shared library file extension |
UnitExt | constant | Pascal unit file extension |
UnitTargets | constant | Set of unit target types |
WasiExeExt | constant | WASI executable file extension |
WasiSharedLibExt | constant | WASI shared library file extension |
ZipExt | constant | ZIP archive file extension |
Variables
ArchiveFilesProc | variable | Global archive procedure variable |
Defaults | variable | Global defaults instance |
DictionaryClass | variable | Global dictionary class variable |
GlobalDictionary | variable | Global dictionary instance |
OnArchiveFiles | variable | Global archive event handler |
PackageDictionaryClass | variable | Global package dictionary class variable |
Topics
CommandLineOptions | topic | Commandline options |
Dependencies | topic | Handling dependencies |
Usage | topic | Usage description |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
