diff --git a/samples/CustomRoleAuth/CustomRoleAuthClient.dproj b/samples/CustomRoleAuth/CustomRoleAuthClient.dproj index f34351ba..7bb78ebc 100644 --- a/samples/CustomRoleAuth/CustomRoleAuthClient.dproj +++ b/samples/CustomRoleAuth/CustomRoleAuthClient.dproj @@ -1,7 +1,7 @@  {B42B1969-7408-4E0A-8624-A48DADE46556} - 20.1 + 20.2 VCL CustomRoleAuthClient.dpr True @@ -137,7 +137,7 @@ Internet Explorer Hosting Support Package - + @@ -151,16 +151,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -171,12 +161,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/CustomRoleAuth/CustomRoleAuthGroup.groupproj b/samples/CustomRoleAuth/CustomRoleAuthGroup.groupproj index d42ba818..3841ee91 100644 --- a/samples/CustomRoleAuth/CustomRoleAuthGroup.groupproj +++ b/samples/CustomRoleAuth/CustomRoleAuthGroup.groupproj @@ -12,10 +12,7 @@ - - - - + @@ -53,32 +50,23 @@ - - - - - - - - - - - + + - - + + - - + + - + - + - + diff --git a/samples/CustomRoleAuth/CustomRoleAuthServer.dproj b/samples/CustomRoleAuth/CustomRoleAuthServer.dproj index 37c4bcc0..aa133f36 100644 --- a/samples/CustomRoleAuth/CustomRoleAuthServer.dproj +++ b/samples/CustomRoleAuth/CustomRoleAuthServer.dproj @@ -1,7 +1,7 @@  {0293A1B2-2793-41CE-9099-8B24A46AA8CF} - 20.1 + 20.2 VCL CustomRoleAuthServer.dpr True @@ -124,7 +124,7 @@ Internet Explorer Hosting Support Package - + @@ -134,16 +134,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -154,12 +144,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/apachemodule/Apache24/modules/.env b/samples/apachemodule/Apache24/modules/.env index 4f08f42c..ddb6fc22 100644 --- a/samples/apachemodule/Apache24/modules/.env +++ b/samples/apachemodule/Apache24/modules/.env @@ -1,2 +1,2 @@ ;database.path = C:\DEV\dmvcframework\samples\WineCellarSample\winecellarserver\WINES_FB30.FDB -database.path = ${__home__}..\..\..\WineCellarSample\winecellarserver\WINES_FB30.FDB \ No newline at end of file +database.path = ${__home__}..\..\..\wine_cellar_sample\winecellarserver\WINES_FB30.FDB \ No newline at end of file diff --git a/samples/apachemodule/mod_dmvc.dpr b/samples/apachemodule/mod_dmvc.dpr index d378c85a..6e5389d4 100644 --- a/samples/apachemodule/mod_dmvc.dpr +++ b/samples/apachemodule/mod_dmvc.dpr @@ -13,10 +13,10 @@ uses Web.HTTPDMethods, Winapi.Windows, System.Classes, - MainDataModuleUnit in '..\WineCellarSample\winecellarserver\MainDataModuleUnit.pas' {WineCellarDataModule: TDataModule}, - MainWebModuleUnit in '..\WineCellarSample\winecellarserver\MainWebModuleUnit.pas' {wm: TWebModule}, - WineCellarAppControllerU in '..\WineCellarSample\winecellarserver\WineCellarAppControllerU.pas', - WinesBO in '..\WineCellarSample\winecellarserver\WinesBO.pas'; + MainDataModuleUnit in '..\wine_cellar_sample\winecellarserver\MainDataModuleUnit.pas' {WineCellarDataModule: TDataModule}, + MainWebModuleUnit in '..\wine_cellar_sample\winecellarserver\MainWebModuleUnit.pas' {wm: TWebModule}, + WineCellarAppControllerU in '..\wine_cellar_sample\winecellarserver\WineCellarAppControllerU.pas', + WinesBO in '..\wine_cellar_sample\winecellarserver\WinesBO.pas'; {$R *.res} // httpd.conf entries: diff --git a/samples/apachemodule/mod_dmvc.dproj b/samples/apachemodule/mod_dmvc.dproj index 30e7130a..677d280c 100644 --- a/samples/apachemodule/mod_dmvc.dproj +++ b/samples/apachemodule/mod_dmvc.dproj @@ -1,7 +1,7 @@  {61ADE231-72F2-4E11-8EDD-62C5AFEF0463} - 19.5 + 20.2 VCL mod_dmvc.dpr True @@ -9,6 +9,7 @@ Win32 1 Library + mod_dmvc true @@ -92,16 +93,18 @@ MainSource - +
WineCellarDataModule
+ dfm TDataModule
- +
wm
+ dfm TWebModule
- - + + Base @@ -127,7 +130,7 @@ mod_dmvc.dpr - + mod_dmvc.dll @@ -142,16 +145,6 @@ 0
- - - classes - 64 - - - classes - 64 - - res\xml @@ -162,12 +155,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -220,6 +207,16 @@ 1 + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + res\values @@ -240,6 +237,66 @@ 1 + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + res\values @@ -250,6 +307,16 @@ 1 + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + res\drawable @@ -420,6 +487,56 @@ 1 + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + 1 @@ -597,6 +714,9 @@ 1 + + 1 + @@ -858,6 +978,7 @@ +
True diff --git a/samples/articles_crud_server/CustomLoggerConfigU.pas b/samples/articles_crud_server/CustomLoggerConfigU.pas index 257f46f9..8c8a36e4 100644 --- a/samples/articles_crud_server/CustomLoggerConfigU.pas +++ b/samples/articles_crud_server/CustomLoggerConfigU.pas @@ -55,7 +55,8 @@ function GetLogger: ILogWriter; {$IFDEF MSWINDOWS}, TLoggerProOutputDebugStringAppender.Create{$ENDIF} ], nil, [ TLogType.Debug, - TLogType.Info, {writes on DB only for INFO+} + //TLogType.Info, {writes on DB only for INFO+} + TLogType.Debug, {writes on DB only for DEBUG+} TLogType.Debug {$IFDEF MSWINDOWS}, TLogType.Debug{$ENDIF} ]); diff --git a/samples/articles_crud_server/articles_crud_server.dproj b/samples/articles_crud_server/articles_crud_server.dproj index 2c176fb3..572013ab 100644 --- a/samples/articles_crud_server/articles_crud_server.dproj +++ b/samples/articles_crud_server/articles_crud_server.dproj @@ -1,7 +1,7 @@  {1576AA4D-0623-40AC-97D3-AA4BB4381A0A} - 20.1 + 20.2 VCL articles_crud_server.dpr True @@ -127,13 +127,8 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - articles_crud_server.exe - true - - + + @@ -143,16 +138,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -163,12 +148,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/articles_crud_vcl_client/MainFormU.pas b/samples/articles_crud_vcl_client/MainFormU.pas index 53cddf5d..366fc6f3 100644 --- a/samples/articles_crud_vcl_client/MainFormU.pas +++ b/samples/articles_crud_vcl_client/MainFormU.pas @@ -60,7 +60,7 @@ TMainForm = class(TForm) implementation uses - System.UITypes, MVCFramework.DataSet.Utils; + System.UITypes, MVCFramework.DataSet.Utils, MVCFramework.Commons, JsonDataObjects; {$R *.dfm} @@ -197,17 +197,26 @@ procedure TMainForm.SetFilter(const Value: string); end; procedure TMainForm.ShowError(const AResponse: IMVCRESTResponse); +var + lJSON: TJsonObject; + lMsg: string; begin - if not AResponse.Success then - MessageDlg( - AResponse.StatusCode.ToString + ': ' + AResponse.StatusText + sLineBreak + - '[' + AResponse.Content + ']', - mtError, [mbOK], 0) + if (not AResponse.Success) and + AResponse.ContentType.ToLower.Contains(TMVCMediaType.APPLICATION_JSON) then + begin + lJSON := StrToJSONObject(AResponse.Content); + try + lMsg := lJSON.S['message']; + finally + lJSON.Free + end; + end else - MessageDlg( - AResponse.StatusCode.ToString + ': ' + AResponse.StatusText + sLineBreak + - AResponse.Content, - mtError, [mbOK], 0); + begin + lMsg := AResponse.StatusCode.ToString + ': ' + + AResponse.StatusText + sLineBreak + '[' + AResponse.Content + ']'; + end; + MessageDlg(lMsg, mtError, [mbOK], 0); end; end. diff --git a/samples/articles_crud_vcl_client/articles_crud_vcl_client.dproj b/samples/articles_crud_vcl_client/articles_crud_vcl_client.dproj index 7c8546b1..88494599 100644 --- a/samples/articles_crud_vcl_client/articles_crud_vcl_client.dproj +++ b/samples/articles_crud_vcl_client/articles_crud_vcl_client.dproj @@ -1,7 +1,7 @@  {C3AD62C8-92C8-4742-A585-69B14E177684} - 20.1 + 20.2 VCL articles_crud_vcl_client.dpr True @@ -129,7 +129,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -143,16 +143,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -163,12 +153,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/articles_crud_vcl_client_api_binder/articles_crud_vcl_client_api_binder.dproj b/samples/articles_crud_vcl_client_api_binder/articles_crud_vcl_client_api_binder.dproj index 8efb06f8..ab6efdb9 100644 --- a/samples/articles_crud_vcl_client_api_binder/articles_crud_vcl_client_api_binder.dproj +++ b/samples/articles_crud_vcl_client_api_binder/articles_crud_vcl_client_api_binder.dproj @@ -1,7 +1,7 @@  {B180E3D7-5F42-49CE-84F1-042196300A37} - 20.1 + 20.2 VCL articles_crud_vcl_client_api_binder.dpr True @@ -127,7 +127,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -141,16 +141,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -161,12 +151,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/articles_crud_vcl_client_meta/MainFormU.dfm b/samples/articles_crud_vcl_client_meta/MainFormU.dfm index 98b94676..b8a2c259 100644 --- a/samples/articles_crud_vcl_client_meta/MainFormU.dfm +++ b/samples/articles_crud_vcl_client_meta/MainFormU.dfm @@ -19,7 +19,6 @@ object MainForm: TMainForm Height = 112 Align = alTop TabOrder = 0 - ExplicitWidth = 872 object DBNavigator1: TDBNavigator AlignWithMargins = True Left = 585 @@ -29,7 +28,6 @@ object MainForm: TMainForm DataSource = dsrcArticles Align = alRight TabOrder = 3 - ExplicitLeft = 581 end object btnOpen: TButton AlignWithMargins = True @@ -72,7 +70,6 @@ object MainForm: TMainForm Align = alBottom BevelOuter = bvNone TabOrder = 4 - ExplicitWidth = 870 object Label1: TLabel Left = 3 Top = 11 diff --git a/samples/articles_crud_vcl_client_meta/MainFormU.pas b/samples/articles_crud_vcl_client_meta/MainFormU.pas index c1726ebf..26ebfb02 100644 --- a/samples/articles_crud_vcl_client_meta/MainFormU.pas +++ b/samples/articles_crud_vcl_client_meta/MainFormU.pas @@ -9,7 +9,7 @@ interface FireDAC.DApt.Intf, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client, Vcl.Grids, Vcl.DBGrids, Vcl.ExtCtrls, Vcl.StdCtrls, MVCFramework.RESTClient.Intf, MVCFramework.RESTClient, - Vcl.DBCtrls; + Vcl.DBCtrls, Vcl.Buttons; type TMainForm = class(TForm) @@ -53,8 +53,8 @@ TMainForm = class(TForm) implementation uses - System.UITypes, MVCFramework.DataSet.Utils, MVCFramework.FireDAC.Utils, MVCFramework.Commons, - JsonDataObjects, MVCFramework.Logger; + System.UITypes, MVCFramework.DataSet.Utils, MVCFramework.FireDAC.Utils, + MVCFramework.Commons, JsonDataObjects, MVCFramework.Logger; {$R *.dfm} diff --git a/samples/articles_crud_vcl_client_meta/articles_crud_vcl_client_meta.dproj b/samples/articles_crud_vcl_client_meta/articles_crud_vcl_client_meta.dproj index de737b6a..d676784b 100644 --- a/samples/articles_crud_vcl_client_meta/articles_crud_vcl_client_meta.dproj +++ b/samples/articles_crud_vcl_client_meta/articles_crud_vcl_client_meta.dproj @@ -1,7 +1,7 @@  {24032D46-0747-4390-A3B3-70CF1A3EB327} - 20.1 + 20.2 VCL articles_crud_vcl_client_meta.dpr True @@ -130,7 +130,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -144,16 +144,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -164,12 +154,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/avoid_mid_air_collisions_sample/avoid_mid_air_collisions_sample.dproj b/samples/avoid_mid_air_collisions_sample/avoid_mid_air_collisions_sample.dproj index 95cbca16..0a16cb7b 100644 --- a/samples/avoid_mid_air_collisions_sample/avoid_mid_air_collisions_sample.dproj +++ b/samples/avoid_mid_air_collisions_sample/avoid_mid_air_collisions_sample.dproj @@ -1,7 +1,7 @@  {03D8066E-D767-4E59-8D05-7C3341BECDFC} - 20.1 + 20.2 None True Debug @@ -24,26 +24,6 @@ Base true - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -94,26 +74,6 @@ fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;FireDACCommonDriver;IndyProtocols;Skia.Package.RTL;RadiantShapesFmx_Design;IndyIPClient;dbxcds;FmxTeeUI;bindcompfmx;ibmonitor;FireDACSqliteDriver;DbxClientDriver;soapmidas;fmxFireDAC;dbexpress;Python;inet;DataSnapCommon;dbrtl;FireDACDBXDriver;Skia.Package.FMX;CustomIPTransport;DBXInterBaseDriver;IndySystem;RadiantShapesFmx;ibxbindings;bindcomp;FireDACCommon;IndyCore;RESTBackendComponents;bindcompdbx;rtl;RESTComponents;DBXSqliteDriver;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;DataSnapFireDAC;emsclientfiredac;FireDAC;FireDACDSDriver;xmlrtl;tethering;ibxpress;dsnap;CloudService;FMXTee;DataSnapNativeClient;PythonFmx;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - Debug - $(MSBuildProjectName) - - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - RaizeComponentsVcl;vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;Skia.Package.RTL;RadiantShapesFmx_Design;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;Python;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;PythonVcl;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;Skia.Package.FMX;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;RadiantShapesFmx;FireDACTDataDriver;Skia.Package.VCL;vcldb;ibxbindings;GPNative_d11;SynEditDR;VirtualTreesR;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;SpkToolbarR;DOSCommandDR;dmvcframeworkDT;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RaizeComponentsVclDb;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;dmvcframeworkRT;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;FMXTee;DataSnapNativeClient;PythonFmx;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -187,7 +147,7 @@ Embarcadero C++Builder Office XP Servers Package - + true @@ -203,12 +163,7 @@ true - - - avoid_mid_air_collisions_sample.exe - true - - + 1 @@ -217,16 +172,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -237,12 +182,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1071,11 +1010,7 @@ False False - False - False False - False - False True False diff --git a/samples/commons/RandomUtilsU.pas b/samples/commons/RandomUtilsU.pas index 86729e0f..daeeb65c 100644 --- a/samples/commons/RandomUtilsU.pas +++ b/samples/commons/RandomUtilsU.pas @@ -1,10 +1,10 @@ -// *************************************************************************** +// *************************************************************************** } // -// Delphi MVC Framework +// Delphi Fake Data Utils // -// Copyright (c) 2010-2023 Daniele Teti and the DMVCFramework Team +// Copyright (c) 2010-2024 Daniele Teti and the DMVCFramework Team // -// https://github.com/danieleteti/delphimvcframework +// https://github.com/danieleteti/delphi_fake_data_utils // // *************************************************************************** // @@ -20,71 +20,360 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// *************************************************************************** } +// *************************************************************************** +{$DEFINE GENERATE_DATASETS} unit RandomUtilsU; interface +{$IF Defined(GENERATE_DATASETS)} +uses + Data.DB, FireDAC.Stan.Intf, FireDAC.Stan.Option, + FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, + FireDAC.DApt.Intf, FireDAC.Comp.DataSet, FireDAC.Comp.Client; +{$ENDIF} + const - FirstNames: array [0 .. 9] of string = ( + FirstNames: array [0 .. 29] of string = ( 'Daniele', 'Debora', 'Mattia', - 'Peter', + 'Jack', 'James', - 'Tim', + 'William', 'Joseph', 'David', - 'Aleš', - 'Thomas' + 'Charles', + 'Thomas', + 'Ethan', + 'Liam', + 'Noah', + 'Logan', + 'Lucas', + 'Mason', + 'Benjamin', + 'Alexander', + 'Elijah', + 'Jordan', + 'Alexander', + 'Jamie', + 'Tyler', + 'Caleb', + 'Kieran', + 'Ryan', + 'Colton', + 'Jaxon', + 'Gavin', + 'Ryder' ); - LastNames: array [0 .. 9] of string = ( + LastNames: array [0 .. 13] of string = ( 'Smith', - 'Stark', + 'Johnson', 'Williams', - 'Parker', + 'Brown', + 'Black', + 'Red', + 'Green', + 'Willis', 'Jones', 'Miller', 'Davis', - 'Müller', + 'Wilson', 'Martinez', 'Anderson' ); - Countries: array [0 .. 9] of string = ( - 'Italy', - 'New York', - 'Illinois', - 'Arizona', - 'Nevada', - 'UK', - 'France', - 'Germany', - 'Norway', - 'California' - ); + Countries: array [0 .. 24] of string = ( + 'italy', + 'new york', + 'illinois', + 'arizona', + 'nevada', + 'uk', + 'france', + 'georgia', + 'spain', + 'portugal', + 'germany', + 'norway', + 'california', + 'usa', + 'japan', + 'australia', + 'singapore', + 'hong kong', + 'taiwan', + 'south africa', + 'canada', + 'switzerland', + 'sweden', + 'netherlands', + 'belgium' + ); -function GetRndFirstName: string; -function GetRndLastName: string; -function GetRndCountry: string; +LOREM_IPSUM = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + + 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.' + + 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.' + + 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; + + WORDS: array [0 .. 1000] of string = ('bite', 'mate', 'quill', 'back', 'church', 'pear', 'knit', 'bent', 'wrench', 'crack', 'heavenly', + 'deceive', 'maddening', 'plain', 'writer', 'rapid', 'acidic', 'decide', 'hat', 'paint', 'cow', 'dysfunctional', 'pet', 'giraffe', + 'connection', 'sour', 'voracious', 'cloudy', 'wry', 'curve', 'agree', 'eggnog', 'flaky', 'painstaking', 'warm', 'silk', 'icy', + 'hellish', 'toy', 'milky', 'skirt', 'test', 'daffy', 'questionable', 'gamy', 'aware', 'berry', 'throne', 'oven', 'subtract', 'cool', + 'care', 'charge', 'smash', 'curve', 'comfortable', 'narrow', 'merciful', 'material', 'fear', 'exercise', 'skinny', 'fire', + 'rainstorm', 'tail', 'nondescript', 'calculating', 'pack', 'steel', 'marvelous', 'baseball', 'furtive', 'stitch', 'abiding', 'empty', + 'bushes', 'painful', 'tense', 'verse', 'unwritten', 'reproduce', 'receptive', 'bottle', 'silky', 'alleged', 'stingy', 'irritate', + 'expand', 'cap', 'unsuitable', 'gigantic', 'exist', 'damp', 'scrub', 'disgusted', 'sun', 'ink', 'detailed', 'defeated', 'economic', + 'chunky', 'stop', 'overflow', 'numerous', 'joyous', 'wipe', 'drink', 'error', 'branch', 'male', 'proud', 'soggy', 'ship', 'excite', + 'industry', 'wistful', 'man', 'vacation', 'doctor', 'naughty', 'plane', 'ignore', 'open', 'act', 'earthquake', 'inconclusive', + 'reflect', 'force', 'funny', 'wonder', 'magenta', 'near', 'dam', 'windy', 'maid', 'wacky', 'release', 'birthday', 'statement', + 'psychotic', 'quicksand', 'things', 'planes', 'boundary', 'nod', 'touch', 'argue', 'sin', 'train', 'adhoc', 'needle', 'regret', + 'stroke', 'strengthen', 'bruise', 'mine', 'rod', 'tax', 'twig', 'advise', 'stamp', 'rhyme', 'obnoxious', 'few', 'inform', 'fixed', + 'mailbox', 'bells', 'grade', 'machine', 'yarn', 'lighten', 'tub', 'guiltless', 'hot', 'misty', 'van', 'flap', 'nosy', 'neighborly', + 'crime', 'nifty', 'uninterested', 'noisy', 'oafish', 'squeal', 'page', 'wet', 'embarrassed', 'long-term', 'closed', 'language', + 'argument', 'elite', 'ban', 'trip', 'tour', 'wine', 'profit', 'envious', 'love', 'back', 'bite-sized', 'magical', 'snatch', 'elated', + 'sniff', 'far', 'shy', 'deeply', 'zoom', 'invent', 'downtown', 'heartbreaking', 'angry', 'can', 'bucket', 'important', 'fetch', + 'shoe', 'self', 'x-ray', 'abhorrent', 'lumpy', 'fertile', 'nest', 'pick', 'history', 'offbeat', 'interrupt', 'yell', 'grain', + 'scintillating', 'alluring', 'wren', 'form', 'attack', 'foregoing', 'suspect', 'daughter', 'moldy', 'signal', 'placid', 'quirky', + 'itchy', 'butter', 'ordinary', 'imaginary', 'list', 'known', 'servant', 'slow', 'apparel', 'meeting', 'lovely', 'bat', 'insurance', + 'waste', 'aromatic', 'foot', 'breakable', 'theory', 'stiff', 'cream', 'train', 'ground', 'fuel', 'wary', 'store', 'wonderful', 'corn', + 'zippy', 'dashing', 'risk', 'prose', 'try', 'green', 'bead', 'recess', 'chop', 'stain', 'faded', 'heat', 'camera', 'panicky', + 'depressed', 'wooden', 'clumsy', 'gullible', 'railway', 'guide', 'current', 'giants', 'enter', 'talented', 'bustling', 'square', + 'jewel', 'bee', 'jelly', 'utopian', 'heal', 'anger', 'balance', 'tick', 'turn', 'unique', 'lively', 'wrist', 'fade', 'tender', + 'outgoing', 'own', 'sigh', 'jobless', 'boiling', 'parallel', 'vest', 'leather', 'spark', 'suck', 'knot', 'circle', 'square', 'supply', + 'tank', 'fax', 'spotless', 'habitual', 'feeling', 'watch', 'cattle', 'end', 'true', 'zonked', 'poison', 'man', 'pedal', 'boorish', + 'moaning', 'mindless', 'bone', 'spot', 'chubby', 'numberless', 'eye', 'bright', 'sweet', 'fanatical', 'oranges', 'calm', 'squash', + 'tooth', 'petite', 'design', 'one', 'bump', 'aberrant', 'mine', 'fit', 'rub', 'optimal', 'ugly', 'lyrical', 'borrow', 'queue', + 'alert', 'normal', 'wrathful', 'truculent', 'level', 'hollow', 'disillusioned', 'kick', 'weather', 'mighty', 'upbeat', 'troubled', + 'snotty', 'many', 'warn', 'thank', 'trains', 'plan', 'choke', 'activity', 'attend', 'walk', 'thought', 'gabby', 'actor', 'prickly', + 'smell', 'dangerous', 'observation', 'action', 'steady', 'hypnotic', 'second-hand', 'zip', 'mundane', 'sand', 'sneaky', 'harm', + 'pancake', 'guarantee', 'empty', 'bulb', 'burn', 'reject', 'decorate', 'obese', 'crowd', 'clap', 'flat', 'available', 'hop', 'untidy', + 'wreck', 'fasten', 'waves', 'dinosaurs', 'dreary', 'fearful', 'answer', 'parched', 'tight', 'animated', 'desk', 'jaded', 'wax', + 'silver', 'scream', 'puzzling', 'unbiased', 'unite', 'branch', 'quack', 'writing', 'tease', 'mint', 'full', 'plate', 'gusty', 'bear', + 'bell', 'sparkling', 'absurd', 'past', 'earsplitting', 'seemly', 'unadvised', 'paper', 'battle', 'friend', 'control', 'rich', + 'regret', 'used', 'scattered', 'redundant', 'slave', 'languid', 'didactic', 'fairies', 'sofa', 'spiteful', 'reply', 'division', + 'engine', 'suppose', 'homeless', 'pinch', 'ray', 'channel', 'repeat', 'smoke', 'concentrate', 'handy', 'committee', 'songs', 'madly', + 'itch', 'hands', 'clean', 'addition', 'majestic', 'careful', 'fallacious', 'guarded', 'last', 'time', 'tumble', 'plastic', 'force', + 'guess', 'grape', 'loving', 'hand', 'remain', 'vigorous', 'wash', 'cars', 'same', 'provide', 'shelf', 'yam', 'onerous', 'claim', + 'tramp', 'glistening', 'innocent', 'lock', 'close', 'absorbing', 'daily', 'amuck', 'manage', 'energetic', 'absent', 'fantastic', + 'flippant', 'unnatural', 'amount', 'luxuriant', 'clover', 'alert', 'wheel', 'cellar', 'agonizing', 'card', 'memorise', 'meal', + 'suspend', 'concerned', 'uneven', 'deranged', 'spiritual', 'arch', 'dare', 'hammer', 'tug', 'jump', 'vase', 'plant', 'color', 'worm', + 'grab', 'frame', 'taste', 'incandescent', 'little', 'rule', 'confused', 'roomy', 'gorgeous', 'heat', 'whole', 'cracker', 'water', + 'flimsy', 'high-pitched', 'grandfather', 'spooky', 'natural', 'grease', 'noiseless', 'superficial', 'gaze', 'finger', 'afford', + 'racial', 'tiresome', 'tremendous', 'zealous', 'slip', 'position', 'mountainous', 'shelter', 'calculator', 'tacky', 'whip', + 'mountain', 'clear', 'thin', 'smell', 'ants', 'yellow', 'cross', 'employ', 'trouble', 'dazzling', 'enchanting', 'groovy', 'measure', + 'disapprove', 'elastic', 'sparkle', 'cub', 'foolish', 'discussion', 'stormy', 'pies', 'absorbed', 'trashy', 'mammoth', 'low', + 'subdued', 'badge', 'letter', 'previous', 'challenge', 'tart', 'cute', 'suit', 'condition', 'pricey', 'rule', 'wrong', 'bomb', 'wiry', + 'swim', 'crack', 'disgusting', 'gather', 'half', 'sturdy', 'probable', 'stream', 'trick', 'silly', 'sulky', 'nail', 'rotten', 'stir', + 'sneeze', 'even', 'adamant', 'cluttered', 'object', 'battle', 'petite', 'wait', 'instinctive', 'donkey', 'squeamish', 'rainy', + 'craven', 'acceptable', 'husky', 'pollution', 'judicious', 'distribution', 'neck', 'left', 'collect', 'thankful', 'describe', + 'complex', 'transport', 'horses', 'hope', 'chemical', 'dress', 'idea', 'extend', 'laugh', 'event', 'route', 'hose', 'abundant', + 'insect', 'spectacular', 'whistle', 'home', 'vast', 'massive', 'grey', 'sail', 'lavish', 'word', 'coach', 'repair', 'squeak', + 'curious', 'beam', 'middle', 'obscene', 'efficacious', 'supreme', 'torpid', 'jazzy', 'linen', 'cause', 'synonymous', 'book', 'brave', + 'staking', 'weak', 'show', 'birds', 'barbarous', 'hilarious', 'injure', 'walk', 'screeching', 'frequent', 'wide', 'kiss', 'lonely', + 'quarrelsome', 'arm', 'flowers', 'surround', 'level', 'enjoy', 'calculate', 'reach', 'brother', 'grandiose', 'clammy', 'thunder', + 'pen', 'rake', 'whirl', 'sharp', 'fence', 'scissors', 'polish', 'recondite', 'brief', 'pig', 'ten', 'spell', 'coal', 'sidewalk', + 'straight', 'melted', 'ring', 'deadpan', 'nine', 'wound', 'use', 'switch', 'watch', 'meat', 'governor', 'lively', 'neat', 'dapper', + 'gate', 'rose', 'wealthy', 'psychedelic', 'slap', 'note', 'request', 'match', 'abashed', 'snail', 'tray', 'pump', 'disappear', + 'vegetable', 'wool', 'abstracted', 'impulse', 'fork', 'brake', 'shiny', 'team', 'coherent', 'dust', 'relieved', 'long', 'broad', + 'shop', 'innate', 'milk', 'mother', 'screw', 'cushion', 'listen', 'spot', 'willing', 'legs', 'clever', 'obsolete', 'coil', 'smoke', + 'call', 'men', 'purpose', 'bumpy', 'receipt', 'soothe', 'thinkable', 'launch', 'kittens', 'oceanic', 'dolls', 'jagged', 'fine', + 'start', 'muddled', 'want', 'develop', 'skillful', 'real', 'sisters', 'cooperative', 'retire', 'scarecrow', 'caring', 'chance', + 'search', 'visitor', 'stem', 'rabid', 'seed', 'endurable', 'cloistered', 'knife', 'cast', 'trouble', 'cold', 'brainy', 'admit', + 'base', 'multiply', 'escape', 'bike', 'frighten', 'large', 'pull', 'observant', 'stereotyped', 'dirty', 'tin', 'vague', 'celery', + 'hungry', 'best', 'difficult', 'burly', 'horse', 'flawless', 'fresh', 'inquisitive', 'illegal', 'omniscient', 'simplistic', 'selfish', + 'clean', 'hospital', 'encouraging', 'incompetent', 'right', 'learn', 'relation', 'spoil', 'amused', 'ruthless', 'squalid', + 'aftermath', 'increase', 'greasy', 'futuristic', 'shut', 'friendly', 'steep', 'range', 'faint', 'jail', 'wide-eyed', 'uptight', + 'erratic', 'eyes', 'cure', 'overwrought', 'muddle', 'bedroom', 'scale', 'rub', 'conscious', 'snake', 'box', 'command', 'slippery', + 'handsome', 'spy', 'tongue', 'unbecoming', 'magnificent', 'gold', 'resolute', 'face', 'childlike', 'approval', 'meaty', 'frog', + 'abrasive', 'rat', 'peel', 'office', 'panoramic', 'explode', 'selective', 'ahead', 'thaw', 'mean', 'odd', 'hate', 'window', 'somber', + 'guard', 'riddle', 'judge', 'flock', 'black', 'amusement', 'bikes', 'milk', 'sock', 'historical', 'tawdry', 'bare', 'mitten', 'harsh', + 'street', 'unequal', 'five', 'zinc', 'faulty', 'messy', 'thoughtful', 'spicy', 'oval', 'telephone', 'decisive', 'teeny', 'fix', + 'outstanding', 'excuse', 'abject', 'print', 'receive', 'jump', 'knock', 'ubiquitous', 'anxious', 'fill', 'shrug', 'ossified', + 'penitent', 'dry', 'abaft', 'uncle', 'voiceless', 'spray', 'town', 'aspiring', 'testy', 'bed', 'likeable', 'breezy', 'jumpy', 'talk', + 'powerful', 'various', 'crawl', 'lacking', 'lethal', 'baby', 'sore', 'mourn', 'behave', 'pass', 'mark', 'summer', 'cause', + 'destruction', 'stale', 'basin', 'embarrass', 'rob', 'income', 'overjoyed', 'aback', 'spark', 'air', 'worthless', 'hospitable', + 'dynamic', 'push', 'nervous', 'dark', 'chin', 'shock', 'frame', 'dojo'); + +function GetRndFirstName: String; +function GetRndLastName: String; +function GetRndFullName: String; +function GetRndCountry: String; +function GetRndEMailAddress: String; +function GetRndDate(const InitialYear: Word = 1980; YearsSpan: Word = 40): TDate; +function GetRndInteger(const aFrom: Integer = 0; aTo: Integer = 1000): Integer; +function GetRndWord: String; +function GetRndPhrase(const aFrom: Integer = 0; aTo: Integer = 1000): String; + +{$IF Defined(GENERATE_DATASETS)} +function GetPeople(const Count: Integer = 20): TDataSet; +function GetUsers(const Count: Integer = 10): TDataSet; +function GetPosts(const Count: Integer = 10): TDataSet; +{$ENDIF} implementation -function GetRndCountry: string; + +uses + System.SysUtils, System.DateUtils, System.Math; + +const + OneDay = OneHour * 24; + +function GetRndDate(const InitialYear: Word; YearsSpan: Word): TDate; +begin + Result := EncodeDate(InitialYear + Random(YearsSpan),1,1) + (OneDay * Random(365)); +end; + +function GetRndEMailAddress: String; +begin + Result := GetRndFirstName.Substring(0, RandomRange(1,3)) + '.' + + GetRndLastName + '@' + GetRndCountry + GetRndInteger(1,3).ToString + '.com'; + Result := Result.Replace(' ', '_', [rfReplaceAll]); +end; + +function GetRndCountry: String; +begin + Result := Countries[Random(High(Countries)+1)]; +end; + +function GetRndFirstName: String; +begin + Result := FirstNames[Random(High(FirstNames)+1)]; +end; + +function GetRndFullName: String; +begin + Result := GetRndFirstName + ' ' + GetRndLastName; +end; + +function GetRndLastName: String; +begin + Result := LastNames[Random(High(LastNames)+1)]; +end; + +function GetRndWord: String; +begin + Result := WORDS[RandomRange(0, Length(WORDS))]; +end; + +function GetRndPhrase(const aFrom: Integer = 0; aTo: Integer = 1000): String; +var + WordCount: Integer; + I: Integer; begin - Result := Countries[Random(10)]; + Result := ''; + WordCount := RandomRange(aFrom, aTo); + for I := 1 to WordCount do + begin + Result := Result + GetRndWord + ' '; + end; + Result := Result.Trim; + Result := UpCase(Result.Chars[0]) + Result.Substring(1) + '.'; end; -function GetRndFirstName: string; +function GetRndInteger(const aFrom: Integer; aTo: Integer): Integer; begin - Result := FirstNames[Random(10)]; + if aFrom >= aTo then + begin + raise Exception.Create('FROM cannot be greater nor equal to TO'); + end; + Result := RandomRange(aFrom, aTo); end; -function GetRndLastName: string; + +{$IF Defined(GENERATE_DATASETS)} +function GetPeople(const Count: Integer): TDataSet; +var + lMT: TFDMemTable; + I: Integer; begin - Result := LastNames[Random(10)]; + lMT := TFDMemTable.Create(nil); + try + lMT.FieldDefs.Clear; + lMT.FieldDefs.Add('code', ftInteger); + lMT.FieldDefs.Add('first_name', ftString, 20); + lMT.FieldDefs.Add('last_name', ftString, 20); + lMT.FieldDefs.Add('country', ftString, 20); + lMT.FieldDefs.Add('dob', ftDate); + lMT.Active := True; + for I := 1 to Count do + begin + lMT.AppendRecord([I, GetRndFirstName, GetRndLastName, GetRndCountry, GetRndDate]); + end; + lMT.First; + Result := lMT; + except + lMT.Free; + raise; + end; end; +function GetUsers(const Count: Integer): TDataSet; +var + lMT: TFDMemTable; + I: Integer; +begin + lMT := TFDMemTable.Create(nil); + try + lMT.FieldDefs.Clear; + lMT.FieldDefs.Add('first_name', ftString, 100); + lMT.FieldDefs.Add('last_name', ftString, 100); + lMT.FieldDefs.Add('email', ftString, 100); + lMT.Active := True; + for I := 1 to Count do + begin + lMT.AppendRecord([GetRndFirstName, GetRndLastName, GetRndEMailAddress]); + end; + lMT.First; + Result := lMT; + except + lMT.Free; + raise; + end; +end; + +function GetPosts(const Count: Integer): TDataSet; +var + lMT: TFDMemTable; + I: Integer; +begin + lMT := TFDMemTable.Create(nil); + try + lMT.FieldDefs.Clear; + lMT.FieldDefs.Add('title', ftString, 100); + lMT.FieldDefs.Add('abstract', ftString, 400); + lMT.FieldDefs.Add('word_count', ftInteger); + lMT.FieldDefs.Add('comments', ftInteger); + lMT.FieldDefs.Add('post_date', ftDate); + lMT.Active := True; + for I := 1 to Count do + begin + lMT.AppendRecord([ + GetRndPhrase(3, 8), + GetRndPhrase(30, 50), + GetRndInteger(20, 5000), + GetRndInteger(0,20), + GetRndDate(2020, 4) + ]); + end; + lMT.First; + Result := lMT; + except + lMT.Free; + raise; + end; +end; + + +{$ENDIF} + +initialization + +Randomize; + end. + diff --git a/samples/customlogger/CustomLoggerSample.dproj b/samples/customlogger/CustomLoggerSample.dproj index 6ceb64c9..c359f86a 100644 --- a/samples/customlogger/CustomLoggerSample.dproj +++ b/samples/customlogger/CustomLoggerSample.dproj @@ -1,7 +1,7 @@  {0FEB7B51-EA71-4055-9834-8C63B5F92D46} - 20.1 + 20.2 None CustomLoggerSample.dpr True @@ -24,26 +24,6 @@ Base true - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -100,26 +80,6 @@ Debug activity-1.1.0.dex.jar;annotation-1.2.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;biometric-1.1.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.1.0.dex.jar;core-runtime-2.1.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.2.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.2.0.dex.jar;lifecycle-runtime-2.2.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.2.0.dex.jar;lifecycle-viewmodel-savedstate-2.2.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;savedstate-1.0.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - Debug - $(MSBuildProjectName) - - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -186,7 +146,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -213,16 +173,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -233,12 +183,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1067,11 +1011,7 @@ False False - False - False True - False - False True False diff --git a/samples/dotenv_showcase/dotEnv_ShowCase.dproj b/samples/dotenv_showcase/dotEnv_ShowCase.dproj index 19b47871..2e0f8596 100644 --- a/samples/dotenv_showcase/dotEnv_ShowCase.dproj +++ b/samples/dotenv_showcase/dotEnv_ShowCase.dproj @@ -1,7 +1,7 @@  {5BD4812E-15AA-4F9D-B25F-5C84C8B1998F} - 19.5 + 20.2 VCL True Debug @@ -9,6 +9,7 @@ 1 Application dotEnv_ShowCase.dpr + dotEnv_ShowCase true @@ -133,13 +134,8 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - dotEnv_ShowCase.exe - true - - + + 1 @@ -152,16 +148,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -172,12 +158,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -230,6 +210,16 @@ 1 + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + res\values @@ -250,6 +240,66 @@ 1 + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + res\values @@ -260,6 +310,16 @@ 1 + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + res\drawable @@ -430,6 +490,56 @@ 1 + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + 1 @@ -670,6 +780,9 @@ 1 + + 1 + @@ -962,6 +1075,7 @@ + True diff --git a/samples/functional_actions_showcase/function_actions_showcase.dproj b/samples/functional_actions_showcase/function_actions_showcase.dproj index 250270f1..7957e5a0 100644 --- a/samples/functional_actions_showcase/function_actions_showcase.dproj +++ b/samples/functional_actions_showcase/function_actions_showcase.dproj @@ -1,7 +1,7 @@  {84012097-1BD4-41B3-A479-B831D1147725} - 20.1 + 20.2 None True Debug @@ -147,7 +147,7 @@ function_actions_showcase.dpr - + true @@ -163,12 +163,7 @@ true - - - function_actions_showcase.exe - true - - + 1 @@ -177,16 +172,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -197,12 +182,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/htmx/HTMX_Sample.dproj b/samples/htmx/HTMX_Sample.dproj index 8431a89e..edbfee91 100644 --- a/samples/htmx/HTMX_Sample.dproj +++ b/samples/htmx/HTMX_Sample.dproj @@ -1,7 +1,7 @@  {F83DC587-0170-4AD8-A074-313817B12F2F} - 20.1 + 20.2 VCL True Debug @@ -97,8 +97,8 @@ none true true - 6 - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.6;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + 7 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.7;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= false @@ -143,40 +143,13 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - true - - - - - true - - - - - true - - - - - HTMX_Sample.exe - true - - - - - HTMX_Sample.exe - true - - - - - HTMX_Sample.rsm - true - - + + + + + + + 1 @@ -185,16 +158,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -205,12 +168,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/htmx_website/bin/templates/pages/customers.html b/samples/htmx_website/bin/templates/pages/customers.html index bdf1cd13..74915a80 100644 --- a/samples/htmx_website/bin/templates/pages/customers.html +++ b/samples/htmx_website/bin/templates/pages/customers.html @@ -19,7 +19,7 @@

Customers

{{:cust.first_name}} {{:cust.last_name}} {{:cust.country|capitalize}} - {{:cust.dob}} + {{:cust.dob}}{{if cust.dob|ge,"2000/01/01"}}📅{{endif}} {{endfor}} {{endif}} diff --git a/samples/htmx_website/htmx_website.dpr b/samples/htmx_website/htmx_website.dpr index 03323851..80a217f0 100644 --- a/samples/htmx_website/htmx_website.dpr +++ b/samples/htmx_website/htmx_website.dpr @@ -16,7 +16,8 @@ uses MVCFramework.Signal, ControllerU in 'ControllerU.pas', WebModuleU in 'WebModuleU.pas' {MyWebModule: TWebModule}, - RandomUtilsU in '..\commons\RandomUtilsU.pas'; + RandomUtilsU in '..\commons\RandomUtilsU.pas', + TemplatePro in '..\..\sources\TemplatePro.pas'; {$R *.res} @@ -32,7 +33,7 @@ begin LServer.MaxConnections := dotEnv.Env('dmvc.webbroker.max_connections', 0); LServer.ListenQueue := dotEnv.Env('dmvc.indy.listen_queue', 500); LServer.Active := True; - LogI('Listening on port ' + APort.ToString); + LogI('Listening on http://localhost:' + APort.ToString); LogI('Application started. Press Ctrl+C to shut down.'); WaitForTerminationSignal; EnterInShutdownState; diff --git a/samples/htmx_website/htmx_website.dproj b/samples/htmx_website/htmx_website.dproj index 5a7e62d5..5fb6ef21 100644 --- a/samples/htmx_website/htmx_website.dproj +++ b/samples/htmx_website/htmx_website.dproj @@ -127,6 +127,7 @@ TWebModule + Base diff --git a/samples/jsonrpc/async_client/jsonrpcclient_async.dproj b/samples/jsonrpc/async_client/jsonrpcclient_async.dproj index f145a34e..ce72d308 100644 --- a/samples/jsonrpc/async_client/jsonrpcclient_async.dproj +++ b/samples/jsonrpc/async_client/jsonrpcclient_async.dproj @@ -1,7 +1,7 @@  {192C33A7-36AC-4357-8D52-AE88D4C974E7} - 20.1 + 20.2 VCL True Debug @@ -139,13 +139,8 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - jsonrpcclient_async.exe - true - - + + 1 @@ -158,16 +153,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -178,12 +163,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/jsonrpc/jsonrpcserver/jsonrpcserver.dproj b/samples/jsonrpc/jsonrpcserver/jsonrpcserver.dproj index 423232f4..80d0d656 100644 --- a/samples/jsonrpc/jsonrpcserver/jsonrpcserver.dproj +++ b/samples/jsonrpc/jsonrpcserver/jsonrpcserver.dproj @@ -1,7 +1,7 @@  {AF5FBC36-0D1D-4C07-B2E3-C2A2E688AC6F} - 20.1 + 20.2 VCL jsonrpcserver.dpr True @@ -143,17 +143,12 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + - - - jsonrpcserver.exe - true - - + @@ -163,16 +158,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -183,12 +168,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/jsonrpc/sync_client/jsonrpcclient_sync.dproj b/samples/jsonrpc/sync_client/jsonrpcclient_sync.dproj index ae7cfe20..a1255c29 100644 --- a/samples/jsonrpc/sync_client/jsonrpcclient_sync.dproj +++ b/samples/jsonrpc/sync_client/jsonrpcclient_sync.dproj @@ -1,7 +1,7 @@  {300F83FF-8F7B-43FD-B740-A3DFDF7238ED} - 20.1 + 20.2 VCL jsonrpcclient_sync.dpr True @@ -136,13 +136,8 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - jsonrpcclient_sync.exe - true - - + + @@ -156,16 +151,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -176,12 +161,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/jsonwebtoken/AuthenticationU.pas b/samples/jsonwebtoken/AuthenticationU.pas index bbfae16f..f6365632 100644 --- a/samples/jsonwebtoken/AuthenticationU.pas +++ b/samples/jsonwebtoken/AuthenticationU.pas @@ -25,7 +25,8 @@ implementation { TMVCAuthorization } -procedure TAuthenticationSample.OnAuthentication(const AContext: TWebContext; const UserName: string; +procedure TAuthenticationSample.OnAuthentication(const AContext: TWebContext; + const UserName: string; const Password: string; UserRoles: TList; var IsValid: Boolean; const SessionData: TSessionData); diff --git a/samples/jsonwebtoken_roleauth/JWTRoleAuthServer.dproj b/samples/jsonwebtoken_roleauth/JWTRoleAuthServer.dproj index 02bd6fe6..9e95e9ef 100644 --- a/samples/jsonwebtoken_roleauth/JWTRoleAuthServer.dproj +++ b/samples/jsonwebtoken_roleauth/JWTRoleAuthServer.dproj @@ -1,7 +1,7 @@  {7B54055A-5749-4136-9FE2-35FDBEEA874C} - 20.1 + 20.2 VCL JWTRoleAuthServer.dpr True @@ -167,7 +167,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -177,16 +177,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -197,12 +187,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/middleware_basicauthentication/AuthenticateAuthorize.dproj b/samples/middleware_basicauthentication/AuthenticateAuthorize.dproj index 09672ace..4eb52d2c 100644 --- a/samples/middleware_basicauthentication/AuthenticateAuthorize.dproj +++ b/samples/middleware_basicauthentication/AuthenticateAuthorize.dproj @@ -1,7 +1,7 @@  {7B54055A-5749-4136-9FE2-35FDBEEA874C} - 20.1 + 20.2 VCL AuthenticateAuthorize.dpr True @@ -168,7 +168,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -178,16 +178,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -198,12 +188,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dpr b/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dpr index 6414d976..73919b15 100644 --- a/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dpr +++ b/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dpr @@ -2,13 +2,13 @@ program AuthenticationAuthorizationClient; uses Vcl.Forms, - MainClientFormU in 'MainClientFormU.pas' {Form5}; + MainClientFormU in 'MainClientFormU.pas' {MainForm}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; - Application.CreateForm(TForm5, Form5); + Application.CreateForm(TMainForm, MainForm); Application.Run; end. diff --git a/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dproj b/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dproj index 0865ac14..bd80b775 100644 --- a/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dproj +++ b/samples/middleware_basicauthentication/vclclient/AuthenticationAuthorizationClient.dproj @@ -1,7 +1,7 @@  {E7317702-64D3-4A65-8734-030F3AE3DBBC} - 20.1 + 20.2 VCL AuthenticationAuthorizationClient.dpr True @@ -107,7 +107,7 @@ MainSource -
Form5
+
MainForm
dfm
@@ -137,7 +137,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -151,16 +151,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -171,12 +161,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/middleware_basicauthentication/vclclient/MainClientFormU.dfm b/samples/middleware_basicauthentication/vclclient/MainClientFormU.dfm index 23c06d6d..b8bbe533 100644 --- a/samples/middleware_basicauthentication/vclclient/MainClientFormU.dfm +++ b/samples/middleware_basicauthentication/vclclient/MainClientFormU.dfm @@ -1,22 +1,22 @@ -object Form5: TForm5 +object MainForm: TMainForm Left = 0 Top = 0 - Caption = 'Form5' + Caption = 'Basic Authentication' ClientHeight = 231 ClientWidth = 505 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -11 + Font.Height = -19 Font.Name = 'Tahoma' Font.Style = [] - TextHeight = 13 + TextHeight = 23 object btnGet: TButton Left = 8 Top = 8 - Width = 161 - Height = 41 - Caption = 'btnGet' + Width = 273 + Height = 65 + Caption = 'Login with user1/user1' TabOrder = 0 OnClick = btnGetClick end diff --git a/samples/middleware_basicauthentication/vclclient/MainClientFormU.pas b/samples/middleware_basicauthentication/vclclient/MainClientFormU.pas index 0e7966a4..f19576d5 100644 --- a/samples/middleware_basicauthentication/vclclient/MainClientFormU.pas +++ b/samples/middleware_basicauthentication/vclclient/MainClientFormU.pas @@ -8,7 +8,7 @@ interface Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type - TForm5 = class(TForm) + TMainForm = class(TForm) btnGet: TButton; procedure btnGetClick(Sender: TObject); private @@ -18,7 +18,7 @@ TForm5 = class(TForm) end; var - Form5: TForm5; + MainForm: TMainForm; implementation @@ -28,7 +28,7 @@ implementation MVCFramework.RESTClient.Intf, MVCFramework.RESTClient; -procedure TForm5.btnGetClick(Sender: TObject); +procedure TMainForm.btnGetClick(Sender: TObject); var lClient: IMVCRESTClient; lRest: IMVCRESTResponse; diff --git a/samples/renders/renders.dproj b/samples/renders/renders.dproj index 20648895..e20f9475 100644 --- a/samples/renders/renders.dproj +++ b/samples/renders/renders.dproj @@ -1,7 +1,7 @@  {8CCDACDA-3FA5-486E-AD8E-63E4113177EE} - 20.1 + 20.2 None renders.dpr True @@ -14,6 +14,16 @@ true + + true + Base + true + + + true + Base + true + true Base @@ -56,6 +66,16 @@ false false + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + None 1033 @@ -183,7 +203,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -213,16 +233,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -233,12 +243,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1065,6 +1069,9 @@ + False + False + False True False diff --git a/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dpr b/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dpr index 7b9c56d7..16f5df15 100644 --- a/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dpr +++ b/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dpr @@ -38,7 +38,7 @@ begin {$IFDEF MSWINDOWS} ShellExecute(0, 'open', PChar('http://localhost:' + inttostr(APort)), nil, nil, SW_SHOW); {$ENDIF} - LogI('Ctrl+C to stop the server'); + LogI('Ctrl+C to stop the server'); WaitForTerminationSignal; EnterInShutdownState; LServer.Active := False; @@ -49,7 +49,6 @@ end; begin ReportMemoryLeaksOnShutdown := True; - MVCUseTemplatesCache := True; try if WebRequestHandler <> nil then WebRequestHandler.WebModuleClass := WebModuleClass; diff --git a/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dproj b/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dproj index 1bd3294f..63d5b8b8 100644 --- a/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dproj +++ b/samples/serversideviews_templatepro/ServerSideViewsTemplatePro.dproj @@ -1,7 +1,7 @@  {C829684B-145E-49F2-8C37-2562C6C5904E} - 20.1 + 20.2 VCL ServerSideViewsTemplatePro.dpr True @@ -146,26 +146,11 @@ Embarcadero C++Builder Office XP Servers Package - + - - - ServerSideViewsTemplatePro.exe - true - - - - - ServerSideViewsTemplatePro.exe - true - - - - - ServerSideViewsTemplatePro.rsm - true - - + + + 1 @@ -174,16 +159,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -194,12 +169,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dpr b/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dpr index ab13cef6..f4f17999 100644 --- a/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dpr +++ b/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dpr @@ -23,7 +23,7 @@ procedure RunServer(APort: Integer); var LServer: TIdHTTPWebBrokerBridge; begin - Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); + LogI('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); LServer := TIdHTTPWebBrokerBridge.Create(nil); try @@ -41,7 +41,7 @@ begin LServer.Active := True; - WriteLn('CTRL+C to shutdown the server'); + LogI('CTRL+C to shutdown the server'); WaitForTerminationSignal; finally LServer.Free; @@ -51,6 +51,7 @@ end; begin ReportMemoryLeaksOnShutdown := True; IsMultiThread := True; + UseConsoleLogger := True; try if WebRequestHandler <> nil then WebRequestHandler.WebModuleClass := WebModuleClass; @@ -58,6 +59,6 @@ begin RunServer(8080); except on E: Exception do - Writeln(E.ClassName, ': ', E.Message); + LogException(E, E.Message); end; end. diff --git a/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dproj b/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dproj index 1941d6ef..c122a3fd 100644 --- a/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dproj +++ b/samples/simple_api_using_datasets/SimpleRESTAPIUsingDatasets.dproj @@ -1,7 +1,7 @@  {B236EE43-17B7-45E2-9BEF-472B44C424C1} - 19.5 + 20.2 None SimpleRESTAPIUsingDatasets.dpr True @@ -9,6 +9,7 @@ Win32 1 Console + SimpleRESTAPIUsingDatasets true @@ -23,11 +24,6 @@ Base true - - true - Base - true - true Base @@ -92,30 +88,6 @@ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - - iPhoneAndiPad - true - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - RESTComponents;DataSnapServerMidas;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;FireDACIBDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;FireDACOracleDriver;CloudService;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;FireDACMongoDBDriver;IndyProtocols;$(DCC_UsePackage) @@ -190,7 +162,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + true @@ -215,16 +187,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -235,12 +197,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -293,6 +249,16 @@ 1 + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + res\values @@ -313,6 +279,66 @@ 1 + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + res\values @@ -323,6 +349,16 @@ 1 + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + res\drawable @@ -493,6 +529,56 @@ 1 + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + 1 @@ -598,6 +684,130 @@ 0 + + + 1 + + + 1 + + + + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset @@ -798,127 +1008,6 @@ 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - - - - 1 - - - 1 - - - 1 - - - - - - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - Assets - 1 - - - Assets - 1 - - @@ -931,11 +1020,11 @@ + False False - False False True False diff --git a/samples/simple_api_using_mvcactiverecord/CustomersControllerU.pas b/samples/simple_api_using_mvcactiverecord/CustomersControllerU.pas index eace0d39..363fd267 100644 --- a/samples/simple_api_using_mvcactiverecord/CustomersControllerU.pas +++ b/samples/simple_api_using_mvcactiverecord/CustomersControllerU.pas @@ -56,10 +56,7 @@ procedure TCustomersController.GetCustomerByID(const ID: Integer); procedure TCustomersController.GetCustomers([MVCFromQueryString('rql','')] RQLFilter: String); begin - if RQLFilter.IsEmpty then - Render(ObjectDict().Add('data', TMVCActiveRecord.All)) - else - Render(ObjectDict().Add('data', TMVCActiveRecord.SelectRQL(RQLFilter, 1000))); + Render(ObjectDict().Add('data', TMVCActiveRecord.SelectRQL(RQLFilter, 1000))); end; procedure TCustomersController.BulkCreateCustomers(const Customers: TObjectList); diff --git a/samples/simple_api_using_mvcactiverecord_with_injection/SimpleRESTAPIUsingInjection.dproj b/samples/simple_api_using_mvcactiverecord_with_injection/SimpleRESTAPIUsingInjection.dproj index d240a946..acde2f74 100644 --- a/samples/simple_api_using_mvcactiverecord_with_injection/SimpleRESTAPIUsingInjection.dproj +++ b/samples/simple_api_using_mvcactiverecord_with_injection/SimpleRESTAPIUsingInjection.dproj @@ -1,7 +1,7 @@  {2921E3FB-91B6-4BA4-A930-D3F18FEED6C6} - 20.1 + 20.2 None SimpleRESTAPIUsingInjection.dpr True @@ -159,7 +159,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + true @@ -176,12 +176,7 @@ - - - SimpleRESTAPIUsingInjection.exe - true - - + 1 @@ -190,16 +185,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -210,12 +195,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1048,6 +1027,7 @@ True False + False 12 diff --git a/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dpr b/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dpr index ccff7944..31c90f3a 100644 --- a/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dpr +++ b/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dpr @@ -24,7 +24,7 @@ procedure RunServer(APort: Integer); var LServer: TIdHTTPWebBrokerBridge; begin - Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); + LogI('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); LServer := TIdHTTPWebBrokerBridge.Create(nil); try @@ -39,8 +39,8 @@ begin http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=TIdCustomTCPServer_ListenQueue.html } LServer.ListenQueue := 200; LServer.Active := True; - Writeln('Listening on port ', APort); - Writeln('CTRL+C to shutdown the server'); + LogI('Listening on port ' + APort.ToString); + LogI('CTRL+C to shutdown the server'); WaitForTerminationSignal; EnterInShutdownState; finally @@ -58,6 +58,6 @@ begin RunServer(8080); except on E: Exception do - Writeln(E.ClassName, ': ', E.Message); + LogException(E, E.Message); end; end. diff --git a/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dproj b/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dproj index 55d23169..aff2464c 100644 --- a/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dproj +++ b/samples/simple_api_using_mvcactiverecord_with_version/SimpleVersionedRESTAPIUsingActiveRecord.dproj @@ -1,7 +1,7 @@  - {2921E3FB-91B6-4BA4-A930-D3F18FEED6C6} - 20.1 + {1862D7C8-32B5-40FE-A71A-465CDECA94F8} + 20.2 None SimpleVersionedRESTAPIUsingActiveRecord.dpr True @@ -9,6 +9,7 @@ Win32 1 Console + SimpleVersionedRESTAPIUsingActiveRecord true @@ -157,7 +158,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + true @@ -174,12 +175,7 @@ - - - SimpleVersionedRESTAPIUsingActiveRecord.exe - true - - + 1 @@ -188,16 +184,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -208,12 +194,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -773,6 +753,9 @@ 1 + + 1 + @@ -1034,6 +1017,7 @@ + False diff --git a/samples/swagger_primer/SwaggerPrimer.dproj b/samples/swagger_primer/SwaggerPrimer.dproj index 80b6d7cd..f5ab860c 100644 --- a/samples/swagger_primer/SwaggerPrimer.dproj +++ b/samples/swagger_primer/SwaggerPrimer.dproj @@ -1,7 +1,7 @@  {53EA2B08-DB19-4D58-86AE-E3B7DB674D33} - 19.4 + 20.2 VCL SwaggerPrimer.dpr True @@ -9,6 +9,7 @@ Win32 1 Console + SwaggerPrimer true @@ -155,28 +156,11 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - true - - - - - true - - - - - true - - - - - SwaggerPrimer.exe - true - - + + + + + 1 @@ -185,26 +169,6 @@ 0 - - - classes - 64 - - - classes - 64 - - - - - classes - 1 - - - classes - 1 - - res\xml @@ -215,12 +179,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -273,6 +231,16 @@ 1 + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + res\values @@ -293,6 +261,66 @@ 1 + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + res\values @@ -303,6 +331,16 @@ 1 + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + res\drawable @@ -473,6 +511,56 @@ 1 + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + 1 @@ -528,7 +616,7 @@ 1 .dylib - + 1 .dylib @@ -562,7 +650,7 @@ 0 - + 0 @@ -578,149 +666,167 @@ 0 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + 1 + + 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + + + + Contents\Resources 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Contents\Resources + 1 + + + Contents\Resources 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + library\lib\armeabi-v7a 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + library\lib\arm64-v8a 1 - - 1 1 - + 1 - - - + 1 - + 1 - + 1 - - - + 1 - - 1 + + 0 - + + + + library\lib\armeabi-v7a 1 - - + + 1 - + 1 - + 1 - + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - + + + + 1 1 - + 1 - - + + + Assets 1 - + + Assets 1 - + + + + Assets 1 - - - + + Assets 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 @@ -729,7 +835,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 @@ -739,7 +845,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -749,7 +855,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -759,7 +865,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -769,7 +875,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -779,128 +885,18 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset - 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset - 1 - - - - - 1 - - - 1 - - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 @@ -909,61 +905,17 @@ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 @@ -973,7 +925,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 @@ -983,7 +935,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -993,7 +945,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -1003,7 +955,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -1013,7 +965,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -1023,7 +975,7 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 @@ -1033,133 +985,16 @@ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - - - - - 1 - - - 1 - - - 1 - - - - - - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - Assets - 1 - - - Assets - 1 - - + @@ -1167,6 +1002,7 @@ + False diff --git a/samples/wine_cellar_sample/winecellarclient_mobile/WineCellarMobileClient.dproj b/samples/wine_cellar_sample/winecellarclient_mobile/WineCellarMobileClient.dproj index 8503a65b..8542b4ea 100644 --- a/samples/wine_cellar_sample/winecellarclient_mobile/WineCellarMobileClient.dproj +++ b/samples/wine_cellar_sample/winecellarclient_mobile/WineCellarMobileClient.dproj @@ -1,7 +1,7 @@  {6BBE33E4-1C16-4F41-99DF-C40C746C2EA7} - 20.1 + 20.2 FMX WineCellarMobileClient.dpr True @@ -24,26 +24,6 @@ Base true - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -141,7 +121,7 @@ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 Debug true true @@ -160,68 +140,6 @@ annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - Debug - $(MSBuildProjectName) - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - true - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - true - DBXSqliteDriver;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;tethering;svnui;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;emsedge;fmx;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;DataSnapCommon;DataSnapConnectors;VCLRESTComponents;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;DataSnapClient;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;emshosting;FireDACPgDriver;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage) Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -320,7 +238,7 @@ File C:\Program Files (x86)\Raize\RadiantShapes\1.3\Bin\RadiantShapesFmx_Design270.bpl not found - + @@ -339,154 +257,53 @@ - - - ic_launcher.png - true - - - - - ic_launcher.png - true - - + + + - - - ic_launcher.png - true - - - - - ic_launcher.png - true - - + + - - - ic_launcher.png - true - - - - - ic_launcher.png - true - - + - - - libWineCellarMobileClient.so - true - - + + - - - libWineCellarMobileClient.so - true - - - - - libWineCellarMobileClient.so - true - - + + - - - true - - - - - 64 - true - - - - - true - - + + - - - libWineCellarMobileClient.so - true - - - - - true - - + + - - - true - - - - - styles.xml - true - - + + - - - true - - - - - splash_image.png - true - - + + - - - splash_image.png - true - - - - - splash_image.png - true - - + + - - - splash_image.png - true - - 1 @@ -499,16 +316,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -519,12 +326,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1448,10 +1249,6 @@ False True - False - False - False - False True False diff --git a/samples/wine_cellar_sample/winecellarclient_mobile_withrestadapter/WineCellarMobileClientWithRESTAdapter.dproj b/samples/wine_cellar_sample/winecellarclient_mobile_withrestadapter/WineCellarMobileClientWithRESTAdapter.dproj index 1ce4b4aa..d951ebff 100644 --- a/samples/wine_cellar_sample/winecellarclient_mobile_withrestadapter/WineCellarMobileClientWithRESTAdapter.dproj +++ b/samples/wine_cellar_sample/winecellarclient_mobile_withrestadapter/WineCellarMobileClientWithRESTAdapter.dproj @@ -1,7 +1,7 @@  {399F33CB-E12B-4804-BAA0-F6E31262A9E7} - 20.1 + 20.2 FMX WineCellarMobileClientWithRESTAdapter.dpr True @@ -24,26 +24,6 @@ Base true - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -137,7 +117,7 @@ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 Debug true 1 @@ -149,7 +129,7 @@ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 Debug true true @@ -169,68 +149,6 @@ 1 $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - Debug - $(MSBuildProjectName) - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - - - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - iPhoneAndiPad - true - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png - $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png - $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png - $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png - $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - true - - - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface - Debug - true - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png @@ -366,7 +284,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + @@ -399,18 +317,8 @@ - - - WineCellarMobileClientWithRESTAdapter.exe - true - - - - - WineCellarMobileClientWithRESTAdapter.rsm - true - - + + @@ -426,16 +334,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -446,12 +344,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -1375,10 +1267,6 @@ True True - False - False - False - False True True diff --git a/samples/wine_cellar_sample/winecellarclient_vcl/WineCellarVCLClient.dproj b/samples/wine_cellar_sample/winecellarclient_vcl/WineCellarVCLClient.dproj index 42ed7ab0..c9d0b23f 100644 --- a/samples/wine_cellar_sample/winecellarclient_vcl/WineCellarVCLClient.dproj +++ b/samples/wine_cellar_sample/winecellarclient_vcl/WineCellarVCLClient.dproj @@ -1,7 +1,7 @@  {92D799DE-2A65-48F8-96D8-08C51166B50F} - 20.1 + 20.2 VCL WineCellarVCLClient.dpr True @@ -164,13 +164,8 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - - WineCellarVCLClient.exe - true - - + + 1 @@ -183,16 +178,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -203,12 +188,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi diff --git a/samples/wine_cellar_sample/winecellarserver/MainDataModuleUnit.pas b/samples/wine_cellar_sample/winecellarserver/MainDataModuleUnit.pas index 727fae07..e1760e1b 100644 --- a/samples/wine_cellar_sample/winecellarserver/MainDataModuleUnit.pas +++ b/samples/wine_cellar_sample/winecellarserver/MainDataModuleUnit.pas @@ -88,7 +88,7 @@ procedure TWineCellarDataModule.ConnectionBeforeConnect(Sender: TObject); else begin // compiled as apache module or isapi - lDBPath := ExtractFilePath(GetModuleName(HInstance)) + '..\..\..\WineCellarSample\winecellarserver\WINES_FB30.FDB'; + lDBPath := ExtractFilePath(GetModuleName(HInstance)) + '..\..\..\wine_cellar_sample\winecellarserver\WINES_FB30.FDB'; if lDBPath.StartsWith('\\?\') then lDBPath := lDBPath.Remove(0, 4); Connection.Params.Values['Database'] := lDBPath; diff --git a/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dpr b/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dpr index 6e53f5ea..ba721051 100644 --- a/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dpr +++ b/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dpr @@ -19,6 +19,7 @@ uses WineCellarAppControllerU in 'WineCellarAppControllerU.pas', MainDataModuleUnit in 'MainDataModuleUnit.pas' {WineCellarDataModule: TDataModule} , WinesBO in 'WinesBO.pas', + MVCFramework.Logger, IdHTTPWebBrokerBridge; {$R *.res} @@ -28,12 +29,12 @@ procedure RunServer(APort: Integer); var LServer: TIdHTTPWebBrokerBridge; begin - Writeln(Format('Starting HTTP Server or port %d', [APort])); + LogI(Format('Starting HTTP Server or port %d', [APort])); LServer := TIdHTTPWebBrokerBridge.Create(nil); try LServer.DefaultPort := APort; LServer.Active := True; - Writeln('Press RETURN to stop the server'); + LogI('Press RETURN to stop the server'); {$IFDEF MSWINDOWS} @@ -52,11 +53,11 @@ begin try if WebRequestHandler <> nil then WebRequestHandler.WebModuleClass := WebModuleClass; - WebRequestHandlerProc.MaxConnections := 1024; // daniele teti + WebRequestHandlerProc.MaxConnections := 1024; RunServer(3000); except on E: Exception do - Writeln(E.ClassName, ': ', E.Message); + LogException(E, E.Message); end end. diff --git a/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dproj b/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dproj index 4b080b94..4e6d67b2 100644 --- a/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dproj +++ b/samples/wine_cellar_sample/winecellarserver/WineCellarServer.dproj @@ -1,7 +1,7 @@  {D87A49D2-D936-4F0E-BC4F-38702084A156} - 20.1 + 20.2 VCL WineCellarServer.dpr True @@ -229,7 +229,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + False False diff --git a/sources/MVCFramework.Middleware.Shutdown.pas b/sources/MVCFramework.Middleware.Shutdown.pas new file mode 100644 index 00000000..f203cc7e --- /dev/null +++ b/sources/MVCFramework.Middleware.Shutdown.pas @@ -0,0 +1,209 @@ +// *************************************************************************** +// +// Delphi MVC Framework +// +// Copyright (c) 2010-2024 Daniele Teti and the DMVCFramework Team +// +// https://github.com/danieleteti/delphimvcframework +// +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** } + +//PS C:\> http --print=hHbB POST :8080/api/shutdown apikey==amoriderediroma +//POST /api/shutdown?apikey=amoriderediroma HTTP/1.1 +//Accept: */* +//Accept-Encoding: gzip, deflate +//Connection: keep-alive +//Content-Length: 0 +//Host: localhost:8080 +//User-Agent: HTTPie/3.2.3 +// +// +// +//HTTP/1.1 200 OK +//Connection: keep-alive +//Content-Length: 13 +//Content-Type: text/html; charset=utf-8 +//Date: Mon, 30 Sep 2024 17:03:13 GMT +//X-Powered-By: DMVCFramework 3.4.2-magnesium-rc3 +// +//Shutting down + + +unit MVCFramework.Middleware.Shutdown; + +interface + +uses + MVCFramework, + MVCFramework.Commons, + System.Generics.Collections; + +type + TMVCShutdownMiddleware = class(TInterfacedObject, IMVCMiddleware) + private + fURLSegment: string; + fQueryStringParamName: string; + fQueryStringParamValue: string; + protected + procedure OnBeforeRouting(aContext: TWebContext; var aHandled: Boolean); + procedure OnBeforeControllerAction(aContext: TWebContext; const aControllerQualifiedClassName: string; + const AActionName: string; var aHandled: Boolean); + procedure OnAfterControllerAction(aContext: TWebContext; const aControllerQualifiedClassName: string; + const AActionName: string; const aHandled: Boolean); + procedure OnAfterRouting(aContext: TWebContext; const aHandled: Boolean); + public + constructor Create(const aAPIKeyQueryStringParamName, aAPIKeyQueryStringParamValue: String; + const aURLSegment: String = '/api/shutdown'); + destructor Destroy; override; + class procedure WaitForShutdownOrConsoleReturn; + end; + +implementation + +uses +{$IF Defined(MSWINDOWS)} + WinAPI.Windows, +{$ENDIF} + MVCFramework.Logger, + System.SysUtils, + System.NetEncoding, + System.IOUtils, + System.Classes; + +{ TMVCShutdownMiddleware } + +constructor TMVCShutdownMiddleware.Create(const aAPIKeyQueryStringParamName, aAPIKeyQueryStringParamValue: String; + const aURLSegment: String); +begin + inherited Create; + fURLSegment := aURLSegment; + fQueryStringParamName := aAPIKeyQueryStringParamName; + fQueryStringParamValue := aAPIKeyQueryStringParamValue; +end; + +destructor TMVCShutdownMiddleware.Destroy; +begin + + inherited; +end; + +procedure TMVCShutdownMiddleware.OnAfterControllerAction(aContext: TWebContext; + const aControllerQualifiedClassName: string; const AActionName: string; const aHandled: Boolean); +begin + // do nothing +end; + +procedure TMVCShutdownMiddleware.OnAfterRouting(aContext: TWebContext; const aHandled: Boolean); +begin + // do nothing +end; + +procedure TMVCShutdownMiddleware.OnBeforeControllerAction(aContext: TWebContext; + const aControllerQualifiedClassName, AActionName: string; var aHandled: Boolean); +begin + // do nothing +end; + +procedure TMVCShutdownMiddleware.OnBeforeRouting(aContext: TWebContext; var aHandled: Boolean); +var + lPathInfo: string; +begin + lPathInfo := aContext.Request.PathInfo; + aHandled := False; + if lPathInfo.StartsWith(fURLSegment, True) and (aContext.Request.HTTPMethod = httpPOST) then + begin + if aContext.Request.QueryStringParam(fQueryStringParamName) = fQueryStringParamValue then + begin + LogW(ClassName + ' middleware intercepted a shutdown POST request at ' + fURLSegment); + aContext.Response.Content := 'Shutting down'; + aContext.Response.StatusCode := 200; + EnterInShutdownState; + aHandled := True; + end; + end; +end; + +{$IF Defined(MSWINDOWS)} +function KeyPressed(out KeyPressed: Word): Boolean; +var + lpNumberOfEvents : DWORD; + lpBuffer : TInputRecord; + lpNumberOfEventsRead : DWORD; + nStdHandle : THandle; +begin + Result:=false; + KeyPressed := 0; + //get the console handle + nStdHandle := GetStdHandle(STD_INPUT_HANDLE); + lpNumberOfEvents:=0; + //get the number of events + GetNumberOfConsoleInputEvents(nStdHandle,lpNumberOfEvents); + if lpNumberOfEvents<> 0 then + begin + //retrieve the event + PeekConsoleInput(nStdHandle,lpBuffer,1,lpNumberOfEventsRead); + if lpNumberOfEventsRead <> 0 then + begin + if lpBuffer.EventType = KEY_EVENT then //is a Keyboard event? + begin + if lpBuffer.Event.KeyEvent.bKeyDown then //the key was pressed? + begin + KeyPressed := lpBuffer.Event.KeyEvent.wVirtualKeyCode; + Result:=true; + end; + FlushConsoleInputBuffer(nStdHandle); //flush the buffer + end + else + begin + FlushConsoleInputBuffer(nStdHandle);//flush the buffer + end; + end; + end; +end; + +class procedure TMVCShutdownMiddleware.WaitForShutdownOrConsoleReturn; +var + lKeyPressed: Word; +begin + while True do + begin + while (not IsShuttingDown) and (not KeyPressed(lKeyPressed)) do + begin + Sleep(500); + end; + if IsShuttingDown or (lKeyPressed = VK_RETURN) then + begin + LogI('Shutting down...'); + WriteLn('Shutting down...'); + Break; + end; + end; +end; +{$ELSE} + +class procedure TMVCShutdownMiddleware.WaitForShutdownOrConsoleReturn; +begin + raise Exception.Create('WaitForShutdownOrConsoleReturn is available only on MSWindows'); +end; + +{$ENDIF} + + + + +end. diff --git a/sources/TemplatePro.pas b/sources/TemplatePro.pas index 32a0b735..b93954fe 100644 --- a/sources/TemplatePro.pas +++ b/sources/TemplatePro.pas @@ -155,6 +155,7 @@ TLoopStackItem = class TTProCompiledTemplate = class(TInterfacedObject, ITProCompiledTemplate) private + fLocaleFormatSettings: TFormatSettings; fTokens: TList; fVariables: TTProVariables; fTemplateFunctions: TDictionary; @@ -260,7 +261,6 @@ TTProConfiguration = class sealed end; function HTMLEncode(s: string): string; -function HTMLSpecialCharsEncode(s: string): string; function HandleTemplateSectionStateMachine( const aTokenValue1: String; var aTemplateSectionType: TTProTemplateSectionType; @@ -315,6 +315,7 @@ TTProDuckTypedList = class(TInterfacedObject, ITProWrappedList) class function CanBeWrappedAsList(const AInterfaceAsDuck: IInterface): Boolean; overload; static; class function Wrap(const AObjectAsDuck: TObject): ITProWrappedList; static; end; + TComparandType = (ctEQ, ctNE, ctGT, ctGE, ctLT, ctLE); var GlContext: TRttiContext; @@ -324,6 +325,112 @@ function WrapAsList(const AObject: TObject): ITProWrappedList; Result := TTProDuckTypedList.Wrap(AObject); end; +procedure FunctionError(const aFunctionName, aErrMessage: string); +begin + raise ETProRenderException.Create(Format('%s in function %s', [aErrMessage, aFunctionName])) at ReturnAddress; +end; + +function _Comparand(const aComparandType: TComparandType; const aValue: TValue; const aParameters: TArray; const aLocaleFormatSettings: TFormatSettings): TValue; +var + lInt64Value: Int64; + lStrValue: string; + lExtendedValue: Extended; + function GetComparandResultStr(const aComparandType: TComparandType; const aLeftValue, aRightValue: String): TValue; + begin + case aComparandType of + ctEQ: Result := aLeftValue = aRightValue; + ctNE: Result := aLeftValue <> aRightValue; + ctGT: Result := aLeftValue > aRightValue; + ctGE: Result := aLeftValue >= aRightValue; + ctLT: Result := aLeftValue < aRightValue; + ctLE: Result := aLeftValue <= aRightValue; + else + raise ETProRenderException.Create('Invalid Comparand Type: ' + TRttiEnumerationType.GetName(aComparandType)); + end; + end; +begin + if Length(aParameters) <> 1 then + FunctionError(TRttiEnumerationType.GetName(aComparandType), 'expected 1 parameter'); + case aValue.TypeInfo.Kind of + tkInteger,tkEnumeration,tkInt64: begin + if TryStrToInt64(aParameters[0], lInt64Value) then + begin + case aComparandType of + ctEQ: Result := aValue.AsInt64 = lInt64Value; + ctNE: Result := aValue.AsInt64 <> lInt64Value; + ctGT: Result := aValue.AsInt64 > lInt64Value; + ctGE: Result := aValue.AsInt64 >= lInt64Value; + ctLT: Result := aValue.AsInt64 < lInt64Value; + ctLE: Result := aValue.AsInt64 <= lInt64Value; + else + raise ETProRenderException.Create('Invalid Comparand Type: ' + TRttiEnumerationType.GetName(aComparandType)); + end; + end + else + raise ETProRenderException.CreateFmt('Cannot convert comparand value for "%s" function to Integer', + [TRttiEnumerationType.GetName(aComparandType)]); + end; + tkFloat: begin + if aValue.TypeInfo.Name = 'TDateTime' then + begin + lStrValue := DateTimeToStr(aValue.AsExtended, aLocaleFormatSettings); + Result := GetComparandResultStr(aComparandType, lStrValue, aParameters[0]); + end + else if aValue.TypeInfo.Name = 'TDate' then + begin + lStrValue := DateToStr(aValue.AsExtended, aLocaleFormatSettings); + Result := GetComparandResultStr(aComparandType, lStrValue, aParameters[0]); + end + else + begin + if TryStrToFloat(aParameters[0], lExtendedValue) then + begin + case aComparandType of + ctEQ: Result := aValue.AsExtended = lExtendedValue; + ctNE: Result := aValue.AsExtended <> lExtendedValue; + ctGT: Result := aValue.AsExtended > lExtendedValue; + ctGE: Result := aValue.AsExtended >= lExtendedValue; + ctLT: Result := aValue.AsExtended < lExtendedValue; + ctLE: Result := aValue.AsExtended <= lExtendedValue; + else + raise ETProRenderException.Create('Invalid Comparand Type: ' + TRttiEnumerationType.GetName(aComparandType)); + end + end + else + begin + raise ETProRenderException.Create('Cannot convert comparand value for ''ge'' function'); + end; + end; + end; + else + begin + Result := GetComparandResultStr(aComparandType, aValue.AsString, aParameters[0]); + end; + end; +end; + +function _eq(const aValue: TValue; const aParameters: TArray; const aLocaleFormatSettings: TFormatSettings): TValue; +var + lStrValue: string; +begin + if Length(aParameters) <> 1 then + FunctionError('eq/ne', 'expected 1 parameter'); + if aValue.IsType then + Result := aValue.AsString = aParameters[0] + else if aValue.IsType then + Result := aValue.AsInt64 = StrToInt(aParameters[0]) + else if aValue.IsType then + Result := aValue.AsInteger = StrToInt64(aParameters[0]) + else if aValue.IsType then + begin + lStrValue := DateTimeToStr(TDate(aValue.AsExtended), aLocaleFormatSettings); + Result := lStrValue = aParameters[0]; + end + else + FunctionError('eq/ne', 'Unsupported param type for "' + String(aValue.TypeInfo.Name) + '"'); +end; + + { TParser } procedure TTProCompiledTemplate.AddFilter(const FunctionName: string; const FunctionImpl: TTProTemplateFunction); @@ -1453,86 +1560,64 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: aValue: TValue): TValue; var lDateValue: TDateTime; + lDateFilterFormatSetting: TFormatSettings; lStrValue: string; lFunc: TTProTemplateFunction; lAnonFunc: TTProTemplateAnonFunction; - lFormatSettings: TFormatSettings; lIntegerPar1: Integer; - procedure FunctionError(const ErrMessage: string); - begin - Error(Format('%s in function %s', [ErrMessage, aFunctionName])); - end; - + lInt64Value: Int64; + lExtendedValue: Double; begin aFunctionName := lowercase(aFunctionName); - if aFunctionName = 'gt' then + if SameText(aFunctionName, 'gt') then begin - if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsInt64 > StrToInt64(aParameters[0]); + Result := _Comparand(ctGT, aValue, aParameters, fLocaleFormatSettings); end - else if aFunctionName = 'ge' then + else if SameText(aFunctionName, 'ge') then begin - if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsInt64 >= StrToInt64(aParameters[0]); + Result := _Comparand(ctGE, aValue, aParameters, fLocaleFormatSettings); end - else if aFunctionName = 'lt' then + else if SameText(aFunctionName, 'lt') then begin - if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsInt64 < StrToInt64(aParameters[0]); + Result := _Comparand(ctLT, aValue, aParameters, fLocaleFormatSettings); end - else if aFunctionName = 'le' then + else if SameText(aFunctionName, 'le') then begin - if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsInt64 <= StrToInt64(aParameters[0]); + Result := _Comparand(ctLE, aValue, aParameters, fLocaleFormatSettings); end - else if aFunctionName = 'contains' then + else if SameText(aFunctionName, 'eq') then begin - if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsString.Contains(aParameters[0]); + Result := _Comparand(ctEQ, aValue, aParameters, fLocaleFormatSettings); end - else if aFunctionName = 'contains_ignore_case' then + else if SameText(aFunctionName, 'ne') then + begin + Result := _Comparand(ctNE, aValue, aParameters, fLocaleFormatSettings); + end + else if SameText(aFunctionName, 'contains') then begin if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - Result := aValue.AsString.ToLowerInvariant.Contains(aParameters[0].ToLowerInvariant); + FunctionError(aFunctionName, 'expected 1 parameter'); + Result := aValue.AsString.Contains(aParameters[0]); end - else if (aFunctionName = 'eq') or (aFunctionName = 'ne') then + else if SameText(aFunctionName, 'contains_ignore_case') then begin if Length(aParameters) <> 1 then - FunctionError('expected 1 parameter'); - if aValue.IsType then - Result := aValue.AsString = aParameters[0] - else if aValue.IsType then - Result := aValue.AsInt64 = StrToInt(aParameters[0]) - else if aValue.IsType then - Result := aValue.AsInteger = StrToInt64(aParameters[0]) - else if aValue.IsType then - Result := TDate(aValue.AsExtended) = TDate(StrToFloat(aParameters[0])) - else - FunctionError('Unsupported param type for "' + String(aValue.TypeInfo.Name) + '"'); - if aFunctionName = 'ne' then - begin - Result := not Result.AsBoolean; - end; + FunctionError(aFunctionName, 'expected 1 parameter'); + Result := aValue.AsString.ToLowerInvariant.Contains(aParameters[0].ToLowerInvariant); end - else if aFunctionName = 'uppercase' then + else if SameText(aFunctionName, 'uppercase') then begin Result := UpperCase(aValue.AsString); end - else if aFunctionName = 'lowercase' then + else if SameText(aFunctionName, 'lowercase') then begin Result := lowercase(aValue.AsString); end - else if aFunctionName = 'capitalize' then + else if SameText(aFunctionName, 'capitalize') then begin Result := CapitalizeString(aValue.AsString, True); end - else if aFunctionName = 'trunc' then + else if SameText(aFunctionName, 'trunc') then begin CheckParNumber(1, 1, aParameters); lStrValue := aValue.AsString.TrimRight; @@ -1546,14 +1631,14 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: Result := lStrValue; end; end - else if aFunctionName = 'rpad' then + else if SameText(aFunctionName, 'rpad') then begin if aValue.IsType then lStrValue := aValue.AsInteger.ToString else if aValue.IsType then lStrValue := aValue.AsString else - FunctionError('Invalid parameter/s'); + FunctionError(aFunctionName, 'Invalid parameter/s'); CheckParNumber(1, 2, aParameters); if Length(aParameters) = 1 then @@ -1565,14 +1650,14 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: Result := lStrValue.PadRight(aParameters[0].ToInteger, aParameters[1].Chars[0]); end; end - else if aFunctionName = 'lpad' then + else if SameText(aFunctionName, 'lpad') then begin if aValue.IsType then lStrValue := aValue.AsInteger.ToString else if aValue.IsType then lStrValue := aValue.AsString else - FunctionError('Invalid parameter/s'); + FunctionError(aFunctionName, 'Invalid parameter/s'); CheckParNumber(1, 2, aParameters); if Length(aParameters) = 1 then @@ -1584,7 +1669,7 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: Result := lStrValue.PadLeft(aParameters[0].ToInteger, aParameters[1].Chars[0]); end; end - else if aFunctionName = 'datetostr' then + else if SameText(aFunctionName, 'datetostr') then begin if aValue.IsEmpty then begin @@ -1599,16 +1684,16 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: else begin CheckParNumber(1, aParameters); - lFormatSettings.ShortDateFormat := aParameters[0]; - Result := DateToStr(lDateValue, lFormatSettings) + lDateFilterFormatSetting.ShortDateFormat := aParameters[0]; + Result := DateToStr(lDateValue, lDateFilterFormatSetting) end; end else begin - FunctionError('Invalid date ' + aValue.AsString.QuotedString); + FunctionError(aFunctionName, 'Invalid date ' + aValue.AsString.QuotedString); end; end - else if (aFunctionName = 'datetimetostr') or (aFunctionName = 'formatdatetime') then + else if SameText(aFunctionName, 'datetimetostr') or SameText(aFunctionName, 'formatdatetime') then begin if aValue.IsEmpty then begin @@ -1626,15 +1711,20 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: end else begin - FunctionError('Invalid datetime ' + aValue.AsString.QuotedString); + FunctionError(aFunctionName, 'Invalid datetime ' + aValue.AsString.QuotedString); end; end - else if aFunctionName = 'empty' then + else if SameText(aFunctionName, 'totrue') then begin CheckParNumber(0, aParameters); - Result := TValue.Empty; + Result := true; + end + else if SameText(aFunctionName, 'tofalse') then + begin + CheckParNumber(0, aParameters); + Result := false; end - else if aFunctionName = 'version' then + else if SameText(aFunctionName, 'version') then begin CheckParNumber(0, aParameters); Result := TEMPLATEPRO_VERSION; @@ -1654,24 +1744,27 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; aParameters: end; function HTMLEncode(s: string): string; -begin - Result := HTMLSpecialCharsEncode(s); -end; - -function HTMLSpecialCharsEncode(s: string): string; var I: Integer; r: string; + b: byte; begin I := 1; while I <= Length(s) do begin r := ''; - case ord(s[I]) of + b := ord(s[I]); + case b of ord('>'): r := 'gt'; ord('<'): r := 'lt'; + 34: + r := '#' + IntToStr(b); + 39: + r := '#' + IntToStr(b); + 43: + r := 'quot'; 160: r := 'nbsp'; 161: @@ -1867,7 +1960,7 @@ function HTMLSpecialCharsEncode(s: string): string; end; if r <> '' then begin - s := s.Replace(s[I], '&' + r + ';'); + s := s.Replace(s[I], '&' + r + ';', []); Inc(I, Length(r) + 1); end; Inc(I) @@ -1977,9 +2070,12 @@ constructor TTProCompiledTemplate.Create(Tokens: TList); inherited Create; fLoopsStack := TObjectList.Create(True); fTokens := Tokens; - fTemplateFunctions := TDictionary.Create; + fTemplateFunctions := TDictionary.Create(TTProEqualityComparer.Create); fTemplateAnonFunctions := nil; TTProConfiguration.RegisterHandlers(self); + fLocaleFormatSettings.DateSeparator := '-'; + fLocaleFormatSettings.TimeSeparator := ':'; + fLocaleFormatSettings.ShortDateFormat := 'yyyy-mm-dd'; end; class function TTProCompiledTemplate.CreateFromFile(const FileName: String): ITProCompiledTemplate; @@ -2045,7 +2141,6 @@ procedure TTProCompiledTemplate.DumpToFile(const FileName: String); procedure TTProCompiledTemplate.Error(const aMessage: String); begin - Writeln(aMessage); raise ETProRenderException.Create(aMessage) at ReturnAddress; end;