Martijn Laan 5 tahun lalu
induk
melakukan
7c7b76a7c5
2 mengubah file dengan 8 tambahan dan 7 penghapusan
  1. 7 6
      Projects/Install.pas
  2. 1 1
      whatsnew.htm

+ 7 - 6
Projects/Install.pas

@@ -1039,17 +1039,18 @@ var
     end;
 
     function AskOverwrite(const DestFile, Instruction, Caption, Caption2: string; const ButtonLabels: array of String;
-      const VerificationText: String; const Default, Overwrite: Integer; var OverwriteAll: TOverwriteAll): Boolean;
+      const VerificationText: String; const Typ: TMsgBoxType; const Default, Overwrite: Integer;
+      var OverwriteAll: TOverwriteAll): Boolean;
     var
       VerificationFlagChecked: BOOL;
     begin
       if OverwriteAll = oaKeep then
         Result := False { The user already said to keep (=not overwrite) all }
       else if (Caption2 = '') then
-        Result := LoggedMsgBox(DestFile + SNewLine2 + Caption, '', mbError, MB_YESNO, True, Default) = Overwrite
+        Result := LoggedMsgBox(DestFile + SNewLine2 + Caption, '', Typ, MB_YESNO, True, Default) = Overwrite
       else begin
         Result := LoggedTaskDialogMsgBox('', Instruction, DestFile + SNewLine2 + Caption2, '',
-          mbConfirmation, MB_YESNO, ButtonLabels, 0, True, Default, VerificationText, @VerificationFlagChecked) = Overwrite;
+          Typ, MB_YESNO, ButtonLabels, 0, True, Default, VerificationText, @VerificationFlagChecked) = Overwrite;
         if VerificationFlagChecked then begin
           if Result then
             OverwriteAll := oaOverwrite
@@ -1236,7 +1237,7 @@ var
                       SetupMessages[msgExistingFileNewer], SetupMessages[msgExistingFileNewer2],
                       [SetupMessages[msgExistingFileNewerKeepExisting], SetupMessages[msgExistingFileNewerOverwriteExisting]],
                       SetupMessages[msgExistingFileNewerOverwriteOrKeepAll],
-                      IDYES, IDNO, PromptIfOlderOverwriteAll);
+                     mbError, IDYES, IDNO, PromptIfOlderOverwriteAll);
                     if not Overwrite then begin
                       Log('User opted not to overwrite the existing file. Skipping.');
                       goto Skip;
@@ -1323,7 +1324,7 @@ var
                     SetupMessages[msgExistingFileNewer], SetupMessages[msgExistingFileNewer2],
                     [SetupMessages[msgExistingFileNewerKeepExisting], SetupMessages[msgExistingFileNewerOverwriteExisting]],
                     SetupMessages[msgExistingFileNewerOverwriteOrKeepAll],
-                    IDYES, IDNO, PromptIfOlderOverwriteAll);
+                    mbError, IDYES, IDNO, PromptIfOlderOverwriteAll);
                   if not Overwrite then begin
                     Log('User opted not to overwrite the existing file. Skipping.');
                     goto Skip;
@@ -1353,7 +1354,7 @@ var
                 SetupMessages[msgFileExists], SetupMessages[msgFileExists2],
                 [SetupMessages[msgFileExistsOverwriteExisting], SetupMessages[msgFileExistsKeepExisting]],
                 SetupMessages[msgFileExistsOverwriteOrKeepAll],
-                IDNO, IDYES, ConfirmOverwriteOverwriteAll);
+                mbConfirmation, IDNO, IDYES, ConfirmOverwriteOverwriteAll);
               if not Overwrite then begin
                 Log('User opted not to overwrite the existing file. Skipping.');
                 goto Skip;

+ 1 - 1
whatsnew.htm

@@ -42,7 +42,7 @@ For conditions of distribution and use, see <a href="https://jrsoftware.org/file
   <li>Some messages have been added in this version: (<a href="https://github.com/jrsoftware/issrc/commit/66df4cb6478ffe3bde4ff94f901089366b0358ec">View differences in Default.isl</a>).
   <ul>
     <li>FileExistsSelectAction, FileExists2, FileExistsOverwriteExisting, FileExistsKeepExisting, FileExistsOverwriteOrKeepAll: If the FileExists2 message is set by a translation, Setup will instead use these messages instead of the FileExist message to show <a href="https://i.imgur.com/AnF6qo8.png">more user friendly prompts</a> to overwrite or keep existing files if the <tt>confirmoverwrite</tt> flag is set.</li>
-    <li>ExistingFileNewerSelectAction, ExistingFileNewer2, ExistingFileNewerOverwriteExisting, ExistingFileNewerKeepExisting, ExistingFileNewerOverwriteOrKeepAll: If the ExistingFileNewer2 message is set by a translation, Setup will instead use these messages instead of the ExistingFileNewer message to show <a href="https://i.imgur.com/vbXFpUE.png">more user friendly prompts</a> to keep or overwrite existing files if the <tt>promptifolder</tt> flag is set.</li>
+    <li>ExistingFileNewerSelectAction, ExistingFileNewer2, ExistingFileNewerOverwriteExisting, ExistingFileNewerKeepExisting, ExistingFileNewerOverwriteOrKeepAll: If the ExistingFileNewer2 message is set by a translation, Setup will instead use these messages instead of the ExistingFileNewer message to show <a href="https://i.imgur.com/VBDuZ7U.png">more user friendly prompts</a> to keep or overwrite existing files if the <tt>promptifolder</tt> flag is set.</li>
   </ul>
   </li>
   <li>QuickStart Pack: Now registers the Inno Setup compiler path in the Inno Script Studio options so that it will find the Inno Setup compiler automatically. Required because Inno Script Studio doesn't officially support Inno Setup 6.</li>