Martijn Laan 5 年 前
コミット
7c7b76a7c5
2 ファイル変更8 行追加7 行削除
  1. 7 6
      Projects/Install.pas
  2. 1 1
      whatsnew.htm

+ 7 - 6
Projects/Install.pas

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