@@ -130,15 +130,26 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater)
130
130
public
131
131
// / <summary>Stamps config file with current program and file versions.
132
132
// / </summary>
133
- // / <remarks>Note that the user config file has program version written to
133
+ // / <remarks>
134
+ // / <para>Note that the user config file has program version written to
134
135
// / a different section to common config file, hence need for overridden
135
- // / methods.</remarks>
136
+ // / methods.</para>
137
+ // / <para>Does nothing in portable edition.</para>
138
+ // / </remarks>
136
139
procedure Stamp ; override;
140
+ { $IFNDEF PORTABLE}
137
141
// / <summary>Deletes program registration information from application
138
142
// / section.</summary>
143
+ // / <remarks>Standard edition only.</remarks>
139
144
procedure DeleteRegistrationInfo ;
140
145
// / <summary>Deletes program key from application section.</summary>
146
+ // / <remarks>Standard edition only.</remarks>
141
147
procedure DeleteProgramKey ;
148
+ { $ELSE}
149
+ // / <summary>Deletes and common config file</summary>
150
+ // / <remarks>Portable edition only</remarks>
151
+ procedure DeleteCfgFile ;
152
+ { $ENDIF}
142
153
end ;
143
154
144
155
@@ -488,20 +499,32 @@ procedure TUserConfigFileUpdater.UpdateNamespaces;
488
499
489
500
{ TCommonConfigFileUpdater }
490
501
502
+ { $IFDEF PORTABLE}
503
+ procedure TCommonConfigFileUpdater.DeleteCfgFile ;
504
+ begin
505
+ if TFile.Exists(CfgFileName, False) then
506
+ TFile.Delete(CfgFileName);
507
+ end ;
508
+ { $ENDIF}
509
+
510
+ { $IFNDEF PORTABLE}
491
511
procedure TCommonConfigFileUpdater.DeleteProgramKey ;
492
512
begin
493
513
if not TFile.Exists(CfgFileName, False) then
494
514
CreateNewFile;
495
515
DeleteIniKey(' Application' , ' Key' , CfgFileName);
496
516
end ;
517
+ { $ENDIF}
497
518
519
+ { $IFNDEF PORTABLE}
498
520
procedure TCommonConfigFileUpdater.DeleteRegistrationInfo ;
499
521
begin
500
522
if not TFile.Exists(CfgFileName, False) then
501
523
CreateNewFile;
502
524
DeleteIniKey(' Application' , ' RegCode' , CfgFileName);
503
525
DeleteIniKey(' Application' , ' RegName' , CfgFileName);
504
526
end ;
527
+ { $ENDIF}
505
528
506
529
class function TCommonConfigFileUpdater.GetFileVersion : Integer;
507
530
begin
@@ -510,10 +533,12 @@ class function TCommonConfigFileUpdater.GetFileVersion: Integer;
510
533
511
534
procedure TCommonConfigFileUpdater.Stamp ;
512
535
begin
536
+ { $IFNDEF PORTABLE}
513
537
inherited ;
514
538
SetIniString(
515
539
' Application' , ' Version' , TAppInfo.ProgramReleaseVersion, CfgFileName
516
540
);
541
+ { $ENDIF}
517
542
end ;
518
543
519
544
end .
0 commit comments