@@ -130,15 +130,26 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater)
130130 public
131131 // / <summary>Stamps config file with current program and file versions.
132132 // / </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
134135 // / 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>
136139 procedure Stamp ; override;
140+ { $IFNDEF PORTABLE}
137141 // / <summary>Deletes program registration information from application
138142 // / section.</summary>
143+ // / <remarks>Standard edition only.</remarks>
139144 procedure DeleteRegistrationInfo ;
140145 // / <summary>Deletes program key from application section.</summary>
146+ // / <remarks>Standard edition only.</remarks>
141147 procedure DeleteProgramKey ;
148+ { $ELSE}
149+ // / <summary>Deletes and common config file</summary>
150+ // / <remarks>Portable edition only</remarks>
151+ procedure DeleteCfgFile ;
152+ { $ENDIF}
142153 end ;
143154
144155
@@ -488,20 +499,32 @@ procedure TUserConfigFileUpdater.UpdateNamespaces;
488499
489500{ TCommonConfigFileUpdater }
490501
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}
491511procedure TCommonConfigFileUpdater.DeleteProgramKey ;
492512begin
493513 if not TFile.Exists(CfgFileName, False) then
494514 CreateNewFile;
495515 DeleteIniKey(' Application' , ' Key' , CfgFileName);
496516end ;
517+ { $ENDIF}
497518
519+ { $IFNDEF PORTABLE}
498520procedure TCommonConfigFileUpdater.DeleteRegistrationInfo ;
499521begin
500522 if not TFile.Exists(CfgFileName, False) then
501523 CreateNewFile;
502524 DeleteIniKey(' Application' , ' RegCode' , CfgFileName);
503525 DeleteIniKey(' Application' , ' RegName' , CfgFileName);
504526end ;
527+ { $ENDIF}
505528
506529class function TCommonConfigFileUpdater.GetFileVersion : Integer;
507530begin
@@ -510,10 +533,12 @@ class function TCommonConfigFileUpdater.GetFileVersion: Integer;
510533
511534procedure TCommonConfigFileUpdater.Stamp ;
512535begin
536+ { $IFNDEF PORTABLE}
513537 inherited ;
514538 SetIniString(
515539 ' Application' , ' Version' , TAppInfo.ProgramReleaseVersion, CfgFileName
516540 );
541+ { $ENDIF}
517542end ;
518543
519544end .
0 commit comments