Declaration¶
Source position: fpmkunit.pp line 1165
type
TCustomDefaults = class(TPersistent)
public
constructor Create;
destructor Destroy;
procedure InitDefaults;
function HaveOptions : Boolean;
procedure AddOption;
function IsBuildDifferentFromTarget : Boolean;
procedure CompilerDefaults;
procedure LocalInit;
procedure LoadFromFile;
procedure SaveToFile;
procedure SaveToStream;
procedure LoadFromStream;
property CompileTarget: TCompileTarget; {rw}
property Target: string; {rw}
property OS: TOS; {rw}
property CPU: TCpu; {rw}
property SubTarget: string; {rw}
property SourceOS: TOS; {r}
property SourceCPU: TCpu; {r}
property CompilerVersion: string; {r}
property CompilerDate: string; {r}
property FullCompilerVersion: string; {r}
property ExplicitOSNone: Boolean; {rw}
property BuildString: string; {r}
property BuildTarget: TCompileTarget; {r}
property BuildOS: TOS; {r}
property BuildCPU: TCpu; {r}
property Mode: TCompilerMode; {rw}
property UnixPaths: Boolean; {rw}
property Options: TStrings; {rw}
property NoFPCCfg: Boolean; {rw}
property ThreadsAmount: Integer; {rw}
property LocalUnitDir: string; {rw}
property GlobalUnitDir: string; {rw}
property UnitOutputDirectory: string; {rw}
property SearchPath: TStrings; {rw}
property Prefix: string; {rw}
property ZipPrefix: string; {rw}
property BaseInstallDir: string; {rw}
property UnitInstallDir: string; {rw}
property UnitConfigFilesInstallDir: string; {rw}
property BinInstallDir: string; {rw}
property LibInstallDir: string; {rw}
property DocInstallDir: string; {rw}
property ExamplesInstallDir: string; {rw}
property FPDocOutputDir: string; {rw}
property FPDocOptions: string; {rw}
property FPUnitSourcePath: string; {rw}
property Compiler: string; {rw}
property Copy: string; {rw}
property Move: string; {rw}
property Remove: string; {rw}
property RemoveDir: string; {rw}
property RemoveTree: string; {rw}
property MkDir: string; {rw}
property Archive: string; {rw}
property UseEnvironment: Boolean; {rw}
property IgnoreInvalidOptions: Boolean; {rw}
property BuildMode: TBuildMode; {rw}
property SingleFPDocFile: Boolean; {rw}
property Namespaces: Boolean; {rw}
property BuildExamples: Boolean; {rw}
property InstallExamples: Boolean; {rw}
property SkipCrossPrograms: Boolean; {rw}
property SkipAllPrograms: Boolean; {rw}
end;
Inheritance¶
Description¶
TCustomDefaults serves as the base class for managing default configuration settings in the fpmake build system. This abstract class provides a foundation for storing and accessing system-wide defaults and build preferences.
Derived classes extend this base to provide specific configuration management for different aspects of the build system such as compiler settings, paths, and installation options.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Archive | public | Archive creation command and options |
| BaseInstallDir | public | Base directory for installations |
| BinInstallDir | public | Directory for installing binary files |
| BuildCPU read only | public | CPU architecture for the build environment |
| BuildExamples | public | |
| BuildMode | public | Build mode configuration setting |
| BuildOS read only | public | Operating system for the build environment |
| BuildString read only | public | Build configuration string |
| BuildTarget read only | public | Build target specification |
| Compiler | public | Compiler executable path and options |
| CompilerDate read only | public | Build date of the compiler |
| CompilerVersion read only | public | Version of the compiler being used |
| CompileTarget | public | Target configuration for compilation |
| Copy | public | File copy command and options |
| CPU | public | Target CPU architecture |
| DocInstallDir | public | Directory for installing documentation files |
| ExamplesInstallDir | public | Directory for installing example files |
| ExplicitOSNone | public | Whether to explicitly specify no target OS |
| FPDocOptions | public | Command line options for FPDoc |
| FPDocOutputDir | public | Output directory for FPDoc documentation |
| FPUnitSourcePath | public | Source path for FPUnit testing framework |
| FullCompilerVersion read only | public | Full version string of the compiler |
| GlobalUnitDir | public | Global directory for compiled units |
| IgnoreInvalidOptions | public | Whether to ignore invalid configuration options |
| InstallExamples | public | Whether to install example files |
| LibInstallDir | public | Directory for installing library files |
| LocalUnitDir | public | Local directory for compiled units |
| MkDir | public | Directory creation command and options |
| Mode | public | Build mode configuration |
| Move | public | File move command and options |
| Namespaces | public | Whether to use unit namespaces |
| NoFPCCfg | public | Whether to ignore FPC configuration files |
| Options | public | Configuration options for the build |
| OS | public | Target operating system |
| Prefix | public | Installation prefix directory |
| Remove | public | File removal command and options |
| RemoveDir | public | Directory removal command and options |
| RemoveTree | public | Directory tree removal command and options |
| SearchPath | public | Search paths for finding files |
| SingleFPDocFile | public | Whether to generate single FPDoc output file |
| SkipAllPrograms | public | Whether to skip building all programs |
| SkipCrossPrograms | public | Whether to skip cross-compilation programs |
| SourceCPU read only | public | Source CPU architecture for cross-compilation |
| SourceOS read only | public | Source operating system for cross-compilation |
| SubTarget | public | Subtarget configuration name |
| Target | public | Build target specification |
| ThreadsAmount | public | Number of threads to use during compilation |
| UnitConfigFilesInstallDir | public | Directory for installing unit configuration files |
| UnitInstallDir | public | Directory for installing unit files |
| UnitOutputDirectory | public | |
| UnixPaths | public | Whether to use Unix-style path conventions |
| UseEnvironment | public | Whether to use environment variables |
| ZipPrefix | public | Prefix for archive file operations |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| AddOption | public | Adds a configuration option to the defaults |
| CompilerDefaults | public | Sets up compiler default configuration |
| Create | public | Creates a new defaults configuration object |
| Destroy | public | Destroys the defaults object and releases resources |
| HaveOptions | public | Checks if configuration options are available |
| InitDefaults | public | Initializes default configuration values |
| IsBuildDifferentFromTarget | public | Checks if build configuration differs from target |
| LoadFromFile | public | Loads configuration settings from a file |
| LoadFromStream | public | Loads configuration settings from a stream |
| LocalInit | public | Initializes configuration from local file |
| SaveToFile | public | Saves configuration settings to a file |
| SaveToStream | public | Saves configuration settings to a stream |