Sign in Join
FPDoc Onlineexperiment

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

ECollectionErrorclassException class for collection errors
EDictionaryErrorclassException class for dictionary errors
EInstallerErrorclassException class for installer errors
TBasicDefaultsclassBasic default configuration class
TBasicInstallerclassBasic installer implementation
TBuildEngineclassMain build engine for compiling and installing packages
TCommandclassRepresents a command to be executed during build
TCommandEnumeratorclassEnumerator for iterating through commands
TCommandsclassCollection of commands to execute during build
TCompileTargetrecordRecord type representing a compilation target
TCompileWorkerThreadclassWorker thread for compilation operations
TConditionalDestStringclassConditional string with destination path
TConditionalDestStringsclassCollection of conditional destination strings
TConditionalStringclassString value with CPU and OS conditions
TConditionalStringsclassCollection of conditional string values
TCustomDefaultsclassBase class for build system default configurations
TCustomInstallerclassBase class for package installers
TDependenciesclassCollection of build dependencies
TDependencyclassRepresents a build dependency in the fpmake system
TDependencyEnumeratorclassEnumerator for iterating through dependency collections
TDictionaryclassString substitution dictionary for variables and functions
TFPCDefaultsclassFPC-specific default configuration class
TFPCInstallerclassFree Pascal Compiler specific installer implementation
TfpmPluginclassBase class for FPMake plugins
TfpmPluginManagerclassManager for FPMake plugin system
TfpmResolvePackagePathsPluginclassPlugin for resolving package file paths
TFPVersionclassRepresents a Free Pascal version number
TFunctionItemclassDictionary item containing a function callback
TNamedCollectionclassCollection class for managing named items
TNamedItemclassBase class for items with a name property
TNamedItemListclassList class for managing named items
TNotifyEventCollectionclassCollection of notification event handlers
TNotifyEventEnumeratorclassEnumerator for iterating through notification events
TNotifyEventItemclassIndividual notification event item with callback handlers
TPackageclassCentral class for package management and building
TPackageDictionaryclassPackage-specific dictionary with master dictionary support
TPackageEnumeratorclassEnumerator for iterating through package collections
TPackagesclassCollection of packages
TPackageVariantclassPackage variant with specific build options
TPackageVariantEnumeratorclassEnumerator for iterating through package variants
TPackageVariantsclassCollection of package variants
TResourceFileclassRepresents a resource file in the build system
TResourceFilesclassCollection of resource files for the build system
TSourceclassRepresents a source file in the build system
TSourceEnumeratorclassEnumerator for iterating through source collections
TSourcesclassCollection of source files
TTargetclassBuild target representation in the fpmake system
TTargetEnumeratorclassEnumerator for iterating through build targets
TTargetsclassCollection class for managing build targets
TValueItemclassDictionary item containing a value

Procedures and functions

AddCustomFpmakeCommandlineOptionprocedureAdds custom command line option to FPMake
AddLibraryExtensionfunctionAdds appropriate extension to library name
AddProgramExtensionfunctionAdds appropriate extension to program name
ChangeDirprocedureChanges current working directory
CPUSToStringfunctionConverts set of CPU architectures to string
CPUToStringfunctionConverts CPU architecture identifier to string
CurrentCPUfunctionGets the current CPU architecture
CurrentOSfunctionGets the current operating system
FixPathfunctionNormalizes and fixes file path format
GetCustomFpmakeCommandlineOptionValuefunctionGets value of custom command line option
GetDefaultLibGCCDirfunctionGets default GCC library directory
GetImportLibraryFilenamefunctionGets filename for import library
GetPluginManagerfunctionGets the global plugin manager instance
InstallerfunctionGets the current installer instance
IsDifferentFromBuildfunctionChecks if target differs from build platform
IsRelativePathfunctionChecks if a path is relative
MakeTargetStringfunctionCreates target string from parameters
ModeToStringfunctionConverts build mode to string representation
OSesToStringfunctionConverts set of operating systems to string
OSToStringfunctionConverts operating system identifier to string
SearchFilesprocedureSearches for files in specified paths
SplitCommandprocedureSplits command line into executable and options
StringToCPUfunctionConverts string to CPU architecture identifier
StringToCPUOSprocedureParses string to extract CPU and OS information
StringToCPUSfunctionConverts string to CPU architecture set
StringToModefunctionConverts string to build mode identifier
StringToOSfunctionConverts string to operating system identifier

Types

RTLStringtypeRuntime library string type
TArchiveEventprocedure typeEvent type for archive operations
TArchiveProcprocedure typeProcedure type for archive operations
TBuildModeenumerationBuild execution modes for package compilation
TBuildModessetSet of build execution modes
TCheckDependencyResultenumerationResult codes for dependency availability checking
TCommandAtenumerationCommand execution timing specification
TCompilerModeenumerationFree Pascal Compiler language compatibility modes
TCompilerModessetSet of compiler modes
TConditionalDestStringClasstypeClass reference for conditional destination strings
TConditionalStringClasstypeClass reference type for conditional string classes
TCopyFileProcprocedure typeProcedural type for file copying operations
TCpuenumerationSupported CPU architectures for compilation
TCPUSsetSet of CPU architectures
TDependencyTypeenumerationTypes of dependencies supported by the build system
TDependencyTypessetSet of dependency types
TDictionaryClasstypeClass reference type for dictionary classes
TFileTypeenumerationFile type classification for build targets
TFileTypessetSet of file type flags for source files
TFPDocFormatenumerationFPDoc documentation output formats
TFPDocFormatssetSet of FPDoc formats
TfpmPluginClasstypeClass reference type for FPMake plugins
TInstallerClasstypeClass reference type for installer classes
TInstallModeenumerationInstallation operation mode
TLogEventprocedure typeEvent procedure for logging messages
TNotifyEventActionenumerationEnumeration of build process event trigger points
TNotifyEventActionSetsetSet of notification event actions
TNotifyProcEventprocedure typeProcedure type for notification events
TOSenumerationSupported operating systems for compilation
TOSessetSet of operating systems
TPackageDictionaryClasstypeClass reference type for package dictionary classes
TProcessPackageResultenumerationResult codes for package processing operations
TReplaceFunctionprocedure typeFunction type for dynamic string replacement callbacks
TRunModeenumerationBuild system execution modes
TSourceTypeenumerationSource file type classification
TSourceTypessetSet of source types
TTargetStateenumerationBuild target state during compilation
TTargetStatessetSet of target states
TTargetTypeenumerationClassification of build target types
TTargetTypessetSet of target types
TVerboseLevelenumerationVerbosity level for build output
TVerboseLevelssetSet of verbose levels

Constants

AIXSharedLibExtconstantAIX shared library file extension
AllAmigaLikeOSesconstantSet containing all Amiga-like operating systems
AllBSDOSesconstantSet containing all BSD operating systems
AllCPUsconstantSet containing all supported CPU architectures
AllImportLibraryOSesconstantSet containing OSes requiring import libraries
AllLimit83fsOsesconstantSet containing OSes with 8.3 filename limitations
AllMessagesconstantAll message verbosity levels
AllOSesconstantSet containing all supported operating systems
AllSmartLinkLibraryOSesconstantSet containing OSes supporting smart-linked libraries
AllUnixOSesconstantSet containing all Unix-like operating systems
AllWebAssemblyOSesconstant
AllWindowsOSesconstantSet containing all Windows operating systems
Amd64constantAMD64/x86_64 CPU architecture identifier
DbgExtconstantDebug information file extension
DefaultMessagesconstantDefault message verbosity levels
DirNotFoundconstantDirectory not found error constant
DLLExtconstantDynamic link library file extension
DocProjectFileExtconstantDocumentation project file extension
DOSconstantDOS operating system identifier
DyLibExtconstantDynamic library file extension (macOS)
ExeExtconstantExecutable file extension
FPMakePPFileconstantFPMake Pascal program filename
FpmkExtconstantFPMake script file extension
IncExtconstantPascal include file extension
LibExtconstantStatic library file extension
LTOExtconstantLink Time Optimization file extension
MacOSXconstantmacOS operating system identifier
ManifestFileconstantPackage manifest filename
ObjExtconstantObject file extension
OSCPUSupportedconstantMatrix of supported OS/CPU combinations
PasExtconstantPascal source file extension
PkgListFileBaseconstantPackage list filename base
PkgListFileExtconstantPackage list file extension
PPCconstantPowerPC 32-bit CPU architecture identifier
PPC64constantPowerPC 64-bit CPU architecture identifier
PPExtconstantPascal program file extension
PPUExtconstantPascal compiled unit file extension
ProgramTargetsconstantSet of program target types
RsjExtconstantResource string JSON file extension
RstExtconstantResource string file extension
SharedLibExtconstantShared library file extension
UnitExtconstantPascal unit file extension
UnitTargetsconstantSet of unit target types
WasiExeExtconstantWASI executable file extension
WasiSharedLibExtconstantWASI shared library file extension
ZipExtconstantZIP archive file extension

Variables

ArchiveFilesProcvariableGlobal archive procedure variable
DefaultsvariableGlobal defaults instance
DictionaryClassvariableGlobal dictionary class variable
GlobalDictionaryvariableGlobal dictionary instance
OnArchiveFilesvariableGlobal archive event handler
PackageDictionaryClassvariableGlobal package dictionary class variable

Topics

CommandLineOptionstopicCommandline options
DependenciestopicHandling dependencies
UsagetopicUsage description

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.