Build.exe
can build the Spring4D framework and update the Delphi Library path for each selected Delphi/Platform combination.
Build.exe
uses two configuration files:
Build.Settings.ini
Build.Settings.Compilers.ini
They are documented in reverse order, as the first one depends on the second one.
This file contains sections like this:
[DelphiXE5.OSX32]
DisplayName=RAD Studio XE5 (OSX32)
Platform=OSX32
Keys.BDS=Software\Embarcadero\BDS\12.0
Keys.Library=Library\OSX32
Build.exe
reads these sections in the order if this file.
Names that can be used per section:
DisplayName
(default''
)
descriptive name of theDelphi Version
/(Platform)
combinationPlatform
(defaultWin32
)
valid platform from the list in possible platforms.Keys.BDS
(default''
)
base key inHKEY_CURRENT_USER
pointing to theBDS
configuration of your Delphi installation like mentioned in https://bitbucket.org/jeroenp/besharp.net/src/tip/Native/Delphi/Scripts/List-Delphi-Installed-Packages.ps1Keys.Library
(defaultLibrary
, for Delphi 2010 compatibility)
specific key withinKeys.BDS
pointing to the Library configuration of the specific platform containing information like theSearch Path
for that plaform.Keys.Globals
(default'Globals'
)
specific key withinKeys.BDS
pointing to the Global Delphi configuration that contains the value forForceEnvOptionsUpdate
.Keys.EnvironmentVariables
(default'Environment Variables'
)
specific key withinKeys.BDS
pointing to the environment variables in the Delphi configuration in case they need to be adapted.Names.LibraryPath
(default'Search Path'
)
specific name withinKeys.Library
pointing to the Library Path (usually the value namedSearch Path
) for that plaform.Names.BrowsingPath
(default'Browsing Path'
)
specific name withinKeys.Library
pointing to the Browsing Path (usually the value namedBrowsing Path
) for that plaform.Names.RootDir
(default'RootDir'
)
specific name withinKeys.BDS
pointing to the Delphi root directory (usually the value namedRootDir
) to determine the location of'bin\rsvars.bat'
This contains one section with global settings:
[Globals]
Name=Spring Framework for Delphi
Homepage=http://www.spring4d.org
BaseDir=.
Config=Release
SourceBaseDir=Source
SourcePaths=Base;Base\Collections;Base\Reflection;Core\Services;Core\Container;Extensions\Utils;Extensions\Cryptography
SelectedTasks=DelphiXE5.Win32;DelphiXE5.Win64;DelphiXE5.OSX32
RunTests=1
ModifyDelphiRegistrySettings=0
and multiple sections like:
[DelphiXE5.OSX32]
Projects=Packages\DelphiXE5\Spring4D.groupproj
UnitOutputPaths=Library\DelphiXE5\$(Platform)\$(Config)
if set to 1
, after building Spring4D
it will modify the Delphi registry settings in the sub key HKCU\Software\[Company]\BDS\[Version].0\Library\[Platform]\
.
Where
Company
can be (depending on the Delphi version) any of:Codegear
(Delphi 2010)Embarcadero
(Delphi XE and higher)
Platform
are from the list in possible platforms.Version
is the BDS version (or Galileo version)
In the registry sub key, these string values are updated:
Browsing Path
(updated with the source directory paths of Spring4D)Search Path
(updated with the unit output paths of Spring4D)
If those values already contain the right paths, they are not updated again.
to force Delphi to update EnvOptions.proj
at the next start so the msbuild
process stays in sync with the registry settings.
You can find the platforms that your Delphi version supports by looking at a key like this:
HKEY_CURRENT_USER\Software\[Company]\BDS\[Version].0\Library
This particular key is for Delphi XE5. You can find more keys in https://bitbucket.org/jeroenp/besharp.net/src/tip/Native/Delphi/Scripts/List-Delphi-Installed-Packages.ps1, which supports these platform subkeys:
Android32
iOSDevice
iOSSimulator
OSX32
Win32
Win64
Note that Android32
and iOSDevice
are for Arm
support, but iOSSimulator
is for x86
support.
In this example, we add OSX32
support for DelphiXE5
. Replace these according to your Delphi version.
Add this section:
[DelphiXE5.OSX32]
Projects=Packages\DelphiXE5\Spring4D.groupproj
UnitOutputPaths=Library\DelphiXE5\$(Platform)\$(Config)
- Replace
DelphiXE5
with your Delphi version. - Replace
OSX32
with a supported platform in your Delphi version from the list in possible platforms.
Add this section:
[DelphiXE5.OSX32]
DisplayName=RAD Studio XE5 (OSX32)
Platform=OSX32
Keys.BDS=Software\Embarcadero\BDS\12.0
Keys.Library=Library\OSX32
Then in this section:
- Replace the value of
DisplayName
with a description similar to the pattern used by otherDisplayName
values. - Replace
DelphiXE5
with your Delphi version. - Replace
OSX32
with a supported platform in your Delphi version from the list in possible platforms.