فهرست منبع

Fixed this report from Gavin Lambert: http://news.jrsoftware.org/read/article.php?id=96800&group=jrsoftware.innosetup#96800

Not just for deleteafterinstall but also fo uninsneveruninstall.
Martijn Laan 13 سال پیش
والد
کامیت
2ba3c10665
2فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 10 2
      Projects/Install.pas
  2. 1 0
      whatsnew.htm

+ 10 - 2
Projects/Install.pas

@@ -897,6 +897,7 @@ var
     RetriesLeft: Integer;
     LastError: DWORD;
     DestF, SourceF: TFile;
+    Flags: TMakeDirFlags;
   label Retry, Skip;
   begin
     Log('-- File entry --');
@@ -1206,7 +1207,10 @@ var
           file's directory if it didn't already exist. }
         LastOperation := SetupMessages[msgErrorCreatingTemp];
         TempFile := GenerateUniqueName(DisableFsRedir, PathExtractPath(DestFile), '.tmp');
-        MakeDir(DisableFsRedir, PathExtractDir(TempFile), []);
+        Flags := [];
+        if foUninsNeverUninstall in CurFile^.Options then Include(Flags, mdNoUninstall);
+        if foDeleteAfterInstall in CurFile^.Options then Include(Flags, mdDeleteAfterInstall);
+        MakeDir(DisableFsRedir, PathExtractDir(TempFile), Flags);
         DestF := TFileRedir.Create(DisableFsRedir, TempFile, fdCreateAlways, faReadWrite, fsNone);
         try
           TempFileLeftOver := True;
@@ -1505,6 +1509,7 @@ var
       H: THandle;
       FindData: TWin32FindData;
       Size: Integer64;
+      Flags: TMakeDirFlags;
     begin
       SearchFullPath := SearchBaseDir + SearchSubDir + SearchWildcard;
       Result := False;
@@ -1573,7 +1578,10 @@ var
             DestName := DestName + SearchSubDir
           else
             DestName := PathExtractPath(DestName) + SearchSubDir;
-          MakeDir(DisableFsRedir, DestName, []);
+          Flags := [];
+          if foUninsNeverUninstall in CurFile^.Options then Include(Flags, mdNoUninstall);
+          if foDeleteAfterInstall in CurFile^.Options then Include(Flags, mdDeleteAfterInstall);
+          MakeDir(DisableFsRedir, DestName, Flags);
           Result := True;
         end;
       end;

+ 1 - 0
whatsnew.htm

@@ -29,6 +29,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <p><a name="5.5.2"></a><span class="ver">5.5.2-dev </span><span class="date">(?)</span></p>
 <ul>
 <li>Added the Windows 8 "compatibility" section to the various manifest resources used by Inno Setup.</li>
+<li>Minor tweaks.</li>
 </ul>
 
 <p><a name="5.5.1"></a><span class="ver">5.5.1 </span><span class="date">(2012-07-09)</span></p>