Skip to content

Commit

Permalink
FRAMEWORK_FMX and FRAMEWORK_VCL back for 11.1 and above.
Browse files Browse the repository at this point in the history
  • Loading branch information
E Spelt committed Mar 19, 2024
1 parent 3eaf161 commit 5a8938f
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 37 deletions.
5 changes: 3 additions & 2 deletions Lib/Classes/Common/ZXing.Common.BitMatrix.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ interface

uses
SysUtils,
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
FMX.Graphics,
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
VCL.Graphics,
{$ENDIF}
Generics.Collections,
Expand Down
5 changes: 3 additions & 2 deletions Lib/Classes/Filtering/ZXing.BaseLuminanceSource.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ interface
uses
System.SysUtils,
System.UITypes,
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
FMX.Graphics,
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
VCL.Graphics,
{$ENDIF}
ZXing.LuminanceSource,
Expand Down
10 changes: 6 additions & 4 deletions Lib/Classes/Filtering/ZXing.RGBLuminanceSource.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ interface
System.SysUtils,
System.UITypes,
System.TypInfo,
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
FMX.Graphics,
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
Winapi.Windows,
VCL.Graphics,
{$ENDIF}
Expand Down Expand Up @@ -158,7 +159,7 @@ constructor TRGBLuminanceSource.Create(const rgbRawBytes: TArray<Byte>;
CalculateLuminance(rgbRawBytes, bitmapFormat);
end;

{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
// FMX TBitmap implementation
constructor TRGBLuminanceSource.CreateFromBitmap(const sourceBitmap: TBitmap;
const width, height: Integer);
Expand Down Expand Up @@ -195,7 +196,8 @@ constructor TRGBLuminanceSource.CreateFromBitmap(const sourceBitmap: TBitmap;
end;
end;
end;
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
// VCL TBitmap implementation
constructor TRGBLuminanceSource.CreateFromBitmap(const sourceBitmap: TBitmap; const width, height: Integer);
type
Expand Down
5 changes: 3 additions & 2 deletions Lib/Classes/ZXing.ScanManager.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ interface
uses
System.SysUtils,
System.Generics.Collections,
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
FMX.Graphics,
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
VCL.Graphics,
{$ENDIF}
ZXing.LuminanceSource,
Expand Down
11 changes: 5 additions & 6 deletions MemLeakTest/Leaktest.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_Define>FRAMEWORK_FMX;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<Android_LauncherIcon36>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png</Android_LauncherIcon36>
Expand Down Expand Up @@ -256,8 +257,9 @@
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_MapFile>3</DCC_MapFile>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
Expand Down Expand Up @@ -304,11 +306,8 @@
<Source Name="MainSource">Leaktest.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k230.bpl">Embarcadero C++Builder-Package für Office 2000-Server</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp230.bpl">Embarcadero C++Builder-Package für Office XP-Server</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k230.bpl">Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp230.bpl">Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\JvPluginSystemDesign230.bpl">JVCL Plugin Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
Expand Down
12 changes: 7 additions & 5 deletions UnitTest/Test.pas
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface

uses
DUnitX.TestFramework,
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
FMX.Types,
FMX.Graphics,
FMX.Objects,
Expand Down Expand Up @@ -1288,15 +1288,17 @@ function TZXingDelphiTest.GetImage(Filename: string): TBitmap;
img := TImage.Create(nil);
try
fs := ExtractFileDir(ParamStr(0)) + '\..\..\images\' + Filename;
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
img.Bitmap.LoadFromFile(fs);
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
img.Picture.LoadFromFile(fs);
{$ENDIF}
result := TBitmap.Create;
{$IFDEF FMX}
{$IFDEF FRAMEWORK_FMX}
result.Assign(img.Bitmap);
{$ELSE}
{$ENDIF}
{$IFDEF FRAMEWORK_VCL}
result.Assign(img.Picture.Graphic);
{$ENDIF}
finally
Expand Down
20 changes: 16 additions & 4 deletions UnitTest/dUnitXTest.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectVersion>20.1</ProjectVersion>
<MainSource>DUnitXTest.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Console</AppType>
Expand Down Expand Up @@ -81,8 +81,14 @@
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_Define>TESTINSIGHT;$(DCC_Define)</DCC_Define>
<DCC_Define>TESTINSIGHT;FRAMEWORK_FMX;$(DCC_Define)</DCC_Define>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.1.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1043</VerInfo_Locale>
<Icns_MainIcns>$(BDS)\bin\delphi_PROJECTICNS.icns</Icns_MainIcns>
Expand Down Expand Up @@ -259,6 +265,12 @@
<Manifest_File>(None)</Manifest_File>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<Manifest_File>(None)</Manifest_File>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
Expand All @@ -285,8 +297,8 @@
<Source Name="MainSource">DUnitXTest.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
Expand Down
21 changes: 18 additions & 3 deletions demo/aTestApp/FmxTestApp.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSSimARM64' and '$(Cfg_1)'=='true') or '$(Cfg_1_iOSSimARM64)'!=''">
<Cfg_1_iOSSimARM64>true</Cfg_1_iOSSimARM64>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Cfg_1)'=='true') or '$(Cfg_1_OSX64)'!=''">
<Cfg_1_OSX64>true</Cfg_1_OSX64>
<CfgParent>Cfg_1</CfgParent>
Expand Down Expand Up @@ -158,6 +164,7 @@
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_Define>FRAMEWORK_FMX;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<DCC_DcuOutput>.\$(Platform)\$(Config)\Units</DCC_DcuOutput>
Expand Down Expand Up @@ -209,6 +216,9 @@
<Android_NotificationIcon72>$(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png</Android_NotificationIcon72>
<Android_NotificationIcon96>$(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png</Android_NotificationIcon96>
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
<Android_BackgroundColor>#FFFFFF</Android_BackgroundColor>
<Android_DarkBackgroundColor>#000000</Android_DarkBackgroundColor>
<Android_NotificationAccentColor>#000000</Android_NotificationAccentColor>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
<iPhone_AppIcon180>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png</iPhone_AppIcon180>
Expand Down Expand Up @@ -322,6 +332,10 @@
<Cfg_1>true</Cfg_1>
<VerInfo_Build>1</VerInfo_Build>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_iOSSimARM64)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_UIDeviceFamily>iPhoneAndiPad</VerInfo_UIDeviceFamily>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_OSX64)'!=''">
<Cfg_1_OSX32>true</Cfg_1_OSX32>
<CfgParent>Cfg_1</CfgParent>
Expand All @@ -339,9 +353,10 @@
<DCC_MapFile>3</DCC_MapFile>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_MinorVer>1</VerInfo_MinorVer>
<VerInfo_Keys>CompanyName=;FileVersion=1.1.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileVersion=1.1.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
Expand Down Expand Up @@ -410,8 +425,8 @@
<Source Name="MainSource">FmxTestApp.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
Expand Down
11 changes: 6 additions & 5 deletions demo/vclTestApp/vclTestApp.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
<DCC_Define>FRAMEWORK_VCL;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
Expand All @@ -83,7 +84,7 @@
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
Expand Down Expand Up @@ -120,8 +121,8 @@
<Source Name="MainSource">VclTestApp.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
Expand Down
7 changes: 3 additions & 4 deletions demo/webcam/Webcam.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<VerInfo_Locale>3082</VerInfo_Locale>
<DCC_Define>USE_VCL_BITMAP;$(DCC_Define)</DCC_Define>
<DCC_Define>USE_VCL_BITMAP;FRAMEWORK_VCL;$(DCC_Define)</DCC_Define>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<SanitizedProjectName>Webcam</SanitizedProjectName>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
Expand Down Expand Up @@ -88,7 +88,6 @@
<DCC_MapFile>3</DCC_MapFile>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
Expand Down Expand Up @@ -134,8 +133,8 @@
<Source Name="MainSource">Webcam.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
Expand Down

0 comments on commit 5a8938f

Please sign in to comment.