Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 27, 2020
1 parent 4edd35c commit 7c7b76a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions Projects/Install.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1039,17 +1039,18 @@ TRegisterFilesListRec = record
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
Expand Down Expand Up @@ -1236,7 +1237,7 @@ TRegisterFilesListRec = record
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;
Expand Down Expand Up @@ -1323,7 +1324,7 @@ TRegisterFilesListRec = record
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;
Expand Down Expand Up @@ -1353,7 +1354,7 @@ TRegisterFilesListRec = record
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;
Expand Down
2 changes: 1 addition & 1 deletion whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<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>
Expand Down

0 comments on commit 7c7b76a

Please sign in to comment.