Skip to content

Commit d869e90

Browse files
committed
Samples some fixes
1 parent d085aa2 commit d869e90

File tree

34 files changed

+4025
-1778
lines changed

34 files changed

+4025
-1778
lines changed

samples/delphi/QuickAppService/ConsoleAndService/MyServiceConsole.dpr

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type
2929

3030
procedure TMyService.Execute;
3131
begin
32-
//your code
32+
// your code
3333
end;
3434

3535
var
@@ -61,6 +61,7 @@ begin
6161
AppService.ServiceName := 'MyService';
6262
AppService.DisplayName := 'MyServicesvc';
6363
AppService.DesktopInteraction := False;
64+
AppService.CanInstallWithOtherName := True;
6465
{$IFDEF FPC}
6566
AppService.OnStart := TSrvFactory.CreateMyService;
6667
{$ELSE}

samples/delphi/QuickAppService/ConsoleAndService/MyServiceConsole.dproj

+33-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<TargetedPlatforms>1025</TargetedPlatforms>
88
<AppType>Console</AppType>
99
<FrameworkType>None</FrameworkType>
10-
<ProjectVersion>19.1</ProjectVersion>
10+
<ProjectVersion>19.2</ProjectVersion>
1111
<Platform Condition="'$(Platform)'==''">Win32</Platform>
1212
</PropertyGroup>
1313
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -33,6 +33,11 @@
3333
<CfgParent>Base</CfgParent>
3434
<Base>true</Base>
3535
</PropertyGroup>
36+
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Base)'=='true') or '$(Base_OSX64)'!=''">
37+
<Base_OSX64>true</Base_OSX64>
38+
<CfgParent>Base</CfgParent>
39+
<Base>true</Base>
40+
</PropertyGroup>
3641
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
3742
<Base_Win32>true</Base_Win32>
3843
<CfgParent>Base</CfgParent>
@@ -60,6 +65,12 @@
6065
<Cfg_2>true</Cfg_2>
6166
<Base>true</Base>
6267
</PropertyGroup>
68+
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Cfg_2)'=='true') or '$(Cfg_2_OSX64)'!=''">
69+
<Cfg_2_OSX64>true</Cfg_2_OSX64>
70+
<CfgParent>Cfg_2</CfgParent>
71+
<Cfg_2>true</Cfg_2>
72+
<Base>true</Base>
73+
</PropertyGroup>
6374
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
6475
<Cfg_2_Win32>true</Cfg_2_Win32>
6576
<CfgParent>Cfg_2</CfgParent>
@@ -110,6 +121,7 @@
110121
<Android_NotificationIcon48>$(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png</Android_NotificationIcon48>
111122
<Android_NotificationIcon72>$(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png</Android_NotificationIcon72>
112123
<Android_NotificationIcon96>$(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png</Android_NotificationIcon96>
124+
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
113125
</PropertyGroup>
114126
<PropertyGroup Condition="'$(Base_Android64)'!=''">
115127
<VerInfo_Keys>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=</VerInfo_Keys>
@@ -137,6 +149,7 @@
137149
<AUP_WRITE_EXTERNAL_STORAGE>true</AUP_WRITE_EXTERNAL_STORAGE>
138150
<AUP_READ_PHONE_STATE>true</AUP_READ_PHONE_STATE>
139151
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services-ads-7.0.0.dex.jar;google-play-services-analytics-7.0.0.dex.jar;google-play-services-base-7.0.0.dex.jar;google-play-services-identity-7.0.0.dex.jar;google-play-services-maps-7.0.0.dex.jar;google-play-services-panorama-7.0.0.dex.jar;google-play-services-plus-7.0.0.dex.jar;google-play-services-wallet-7.0.0.dex.jar</EnabledSysJars>
152+
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
140153
</PropertyGroup>
141154
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
142155
<iOS_AppStore1024>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png</iOS_AppStore1024>
@@ -153,6 +166,10 @@
153166
<iPhone_Notification40>$(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png</iPhone_Notification40>
154167
<iPad_Notification40>$(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png</iPad_Notification40>
155168
</PropertyGroup>
169+
<PropertyGroup Condition="'$(Base_OSX64)'!=''">
170+
<VerInfo_Keys>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&apos;s speech recognition servers</VerInfo_Keys>
171+
<BT_BuildType>Debug</BT_BuildType>
172+
</PropertyGroup>
156173
<PropertyGroup Condition="'$(Base_Win32)'!=''">
157174
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
158175
<BT_BuildType>Debug</BT_BuildType>
@@ -179,10 +196,14 @@
179196
<iPhone_Notification40>$(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png</iPhone_Notification40>
180197
<iPad_Notification40>$(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png</iPad_Notification40>
181198
</PropertyGroup>
199+
<PropertyGroup Condition="'$(Cfg_2_OSX64)'!=''">
200+
<DCC_RemoteDebug>true</DCC_RemoteDebug>
201+
</PropertyGroup>
182202
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
183203
<VerInfo_Locale>1033</VerInfo_Locale>
184204
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
185205
<Manifest_File>(None)</Manifest_File>
206+
<Debugger_RunParams>prueba /install</Debugger_RunParams>
186207
</PropertyGroup>
187208
<ItemGroup>
188209
<DelphiCompile Include="$(MainSource)">
@@ -226,6 +247,7 @@
226247
<Platform value="Android64">False</Platform>
227248
<Platform value="iOSDevice64">True</Platform>
228249
<Platform value="iOSSimulator">False</Platform>
250+
<Platform value="OSX64">False</Platform>
229251
<Platform value="Win32">True</Platform>
230252
<Platform value="Win64">False</Platform>
231253
</Platforms>
@@ -402,6 +424,16 @@
402424
<Operation>1</Operation>
403425
</Platform>
404426
</DeployClass>
427+
<DeployClass Name="Android_LauncherIcon192">
428+
<Platform Name="Android">
429+
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
430+
<Operation>1</Operation>
431+
</Platform>
432+
<Platform Name="Android64">
433+
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
434+
<Operation>1</Operation>
435+
</Platform>
436+
</DeployClass>
405437
<DeployClass Name="Android_LauncherIcon36">
406438
<Platform Name="Android">
407439
<RemoteDir>res\drawable-ldpi</RemoteDir>
Binary file not shown.

samples/delphi/QuickAutoMapper/AutoMappingObjects.dpr

+5-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ type
6969
fCarList : TCarList;
7070
fPoints : TPointsList;
7171
fAgentList : TAgentList;
72+
fTags : TArray<string>;
7273
public
7374
constructor Create;
7475
destructor Destroy; override;
@@ -80,6 +81,7 @@ type
8081
property CarList : TCarList read fCarList write fCarList;
8182
property Points : TPointsList read fPoints write fPoints;
8283
property AgentList : TAgentList read fAgentList write fAgentList;
84+
property Tags : TArray<string> read fTags write fTags;
8385
end;
8486

8587
TUser2 = class(TUserBase)
@@ -125,6 +127,7 @@ begin
125127
fCarList := TCarList.Create(True);
126128
fPoints := TPointsList.Create;
127129
fAgentList := TAgentList.Create;
130+
fTags := [];
128131
end;
129132

130133
destructor TUser.Destroy;
@@ -193,6 +196,7 @@ begin
193196
agent.Name := 'SecondAgent';
194197
agent.Status := TAgentStatus.stFail;
195198
User.AgentList.Add(agent);
199+
User.Tags := ['Tag1','Tag2','Tag3'];
196200
//User2 := TMapper<TUser2>.Map(User);
197201
AutoMapper := TAutoMapper<TUser,TUser2>.Create;
198202
try
@@ -278,6 +282,7 @@ begin
278282
cout('USER AS JSON RESULT',etTrace);
279283
cout('%s',[User.ToJson],etInfo);
280284
cout(' ',etInfo);
285+
user.Free;
281286
cout('USER2 AS JSON RESULT',etTrace);
282287
cout('%s',[User2.ToJson],etInfo);
283288
{$IFNDEF FPC}
@@ -288,7 +293,6 @@ begin
288293

289294
finally
290295
AutoMapper.Free;
291-
User.Free;
292296
User2.Free;
293297
User3.Free;
294298
end;

0 commit comments

Comments
 (0)