Hi,
Thank you for Alcinoe and for maintaining the Embarcadero source patches.
I ran into a problem with Embarcadero/Florence/Update.bat and Florence.patch on a Delphi installation that has Android support only (no iOS / macOS).
Update.bat copies %RootDir%\source\fmx and then applies a single patch:
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.patch -v
If iOS/macOS are not installed, some platform-specific files (for example FMX.Platform.iOS.pas, FMX.Context.GLES.iOS.pas, FMX.Platform.Mac.pas, and related units) are missing from the Delphi source tree. git apply then fails because those paths do not exist, and the whole patch is aborted — including the common and Android hunks that would otherwise apply correctly.
Could you please split Florence.patch into separate patches, for example:
Florence.patch | Cross-platform / always-present FMX units (FMX.Controls.pas, FMX.Forms.pas, FMX.Platform.pas, FMX.Filter.pas, FMX.Types3D.pas, etc.)
Florence.Android.patch | Android-only units (FMX.Platform.UI.Android.pas, FMX.Presentation.Android.pas, FMX.VirtualKeyboard.Android.pas, …)
Florence.iOS.patch | iOS-only units
Florence.Mac.patch | macOS-only units
(iOS and macOS can also be a single Florence.Apple.patch if you prefer.)
Then, in Update.bat, apply the global patch always, and apply each platform patch only if the corresponding Delphi source files/folders exist. That way a Windows + Android-only install can still patch successfully, and users with iOS/macOS get those patches as well.
Suggested detection (against the copied/original Embarcadero source):
REM Always apply the common / cross-platform patch
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.patch -v
IF ERRORLEVEL 1 goto ERROR
REM Android
if exist "%EmbSourceDir%\fmx\FMX.Platform.Android.pas" (
echo Applying Android patch...
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.Android.patch -v
IF ERRORLEVEL 1 goto ERROR
) else (
echo Skipping Android patch: FMX Android sources not found.
)
REM iOS
if exist "%EmbSourceDir%\fmx\FMX.Platform.iOS.pas" (
echo Applying iOS patch...
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.iOS.patch -v
IF ERRORLEVEL 1 goto ERROR
) else (
echo Skipping iOS patch: FMX iOS sources not found.
)
REM macOS
if exist "%EmbSourceDir%\fmx\FMX.Platform.Mac.pas" (
echo Applying macOS patch...
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.Mac.patch -v
IF ERRORLEVEL 1 goto ERROR
) else (
echo Skipping macOS patch: FMX macOS sources not found.
)
Alternatively, you can key off Delphi platform folders under RootDir (same idea: skip if the folder is absent):
for /f "tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\WOW6432Node\Embarcadero\BDS\%ALDelphiVersion%" /v "RootDir"') do set EmbRootDir=%%B
set EmbRootDir=%EmbRootDir:~0,-1%
if exist "%EmbRootDir%\lib\android" ... apply Florence.Android.patch
if exist "%EmbRootDir%\lib\iosDevice64" ... apply Florence.iOS.patch
if exist "%EmbRootDir%\lib\osx64" ... apply Florence.Mac.patch
Checking the source files (source\fmx\FMX.Platform.*.pas) is more reliable for git apply, because that is what the patch actually needs.
This would make the Florence update robust for partial Delphi installs (Android-only, no iOS/macOS, etc.). Happy to test a PR if that helps.
Thanks!
Hi,
Thank you for Alcinoe and for maintaining the Embarcadero source patches.
I ran into a problem with Embarcadero/Florence/Update.bat and Florence.patch on a Delphi installation that has Android support only (no iOS / macOS).
Update.bat copies %RootDir%\source\fmx and then applies a single patch:
git -C "%ALBaseDir%" apply --ignore-space-change --ignore-whitespace --whitespace=nowarn .\Embarcadero\Florence\Florence.patch -vIf iOS/macOS are not installed, some platform-specific files (for example FMX.Platform.iOS.pas, FMX.Context.GLES.iOS.pas, FMX.Platform.Mac.pas, and related units) are missing from the Delphi source tree. git apply then fails because those paths do not exist, and the whole patch is aborted — including the common and Android hunks that would otherwise apply correctly.
Could you please split Florence.patch into separate patches, for example:
(iOS and macOS can also be a single Florence.Apple.patch if you prefer.)
Then, in Update.bat, apply the global patch always, and apply each platform patch only if the corresponding Delphi source files/folders exist. That way a Windows + Android-only install can still patch successfully, and users with iOS/macOS get those patches as well.
Suggested detection (against the copied/original Embarcadero source):
Alternatively, you can key off Delphi platform folders under RootDir (same idea: skip if the folder is absent):
Checking the source files (source\fmx\FMX.Platform.*.pas) is more reliable for git apply, because that is what the patch actually needs.
This would make the Florence update robust for partial Delphi installs (Android-only, no iOS/macOS, etc.). Happy to test a PR if that helps.
Thanks!