Configure Delphi compiler by version-bitness apart from by listed index
After some search I found the way to change Delphi compiler version in BOSS when I have multiple Delphi installations on the same machine
One needs to do
boss config delphi list
to see a numbered list of Delphi intallations and bitness (can also choose 32-bit and 64-bit) and then
boss config delphi use X -g
where -g is to set it globally and X is the index from the shown list
Which is obviously not reproducible (to have permanently in a .bat file or action config in one's repo) on different machines with say more Delphi versions installed (resulting in different list being shown).
Copilot was suggesting using a BOSS_DELPHI_VERSION environment variable (which I was setting locally before running boss install/update), but trying "37.0" value there wasn't working (was ignored and kept on compiling with Delphi 12 instead of 13). Wonder if that is indeed supported but needed to use the list index from the "boss config delphi list" command
Would be nice to have the list also show compiler version (with a -32bit and -64bit suffix) and have a "useCompiler" apart from the "use", to do for example
boss config delphi useCompiler 37.0
(this would default to 32-bit)
and
boss config delphi useCompiler 37.0-32bit boss config delphi useCompiler 37.0-64bit
btw, would be nice if the
boss config delphi list
output was showing some marking for what the locally and the globally (if different) configured compilers are from that list
being able to set the highest (and optional bitness) and lowest (with optional bitness) compiler versions from those installed would also be useful. Highest to compile with the best Delphi on that machine and lowest to be able to check that dependencies build ok in lowest delphi version installed on that (build) machine
@birbilis
the desired function was implemented in the refactor branch.
You can also specify the compiler version and platform:
boss install --compiler=37.0 --platform=Win64
> Project Toolchain
You can also specify the required compiler version and platform in your project's boss.json file. This ensures that everyone working on the project uses the correct toolchain.
Add a toolchain section to your boss.json:
{
"name": "my-project",
"version": "1.0.0",
"toolchain": {
"delphi": "37.0",
"platform": "Win64"
}
}
Supported fields in toolchain:
delphi: The Delphi version (e.g., "37.0").compiler: The compiler version (e.g., "37.0").platform: The target platform ("Win32" or "Win64").path: Explicit path to the compiler (optional).strict: If true, fails if the exact version is not found (optional).
btw, is there any way to make Boss compile dependencies for multiple platforms into different subfolders? (but not fail if user doesn’t have some of my package’s supported platforms installed).
Currently I have to use .bat files to remove .dcp folder after they do boss install or update respectively. Haven’t tried yet to specify platforms in boss.json, did notice some new documentation on that