Update DOSBox-X-setup.iss

This commit is contained in:
Wengier 2021-03-06 03:12:21 -05:00 committed by GitHub
parent d1078245fb
commit 12770cccb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
#define MyAppName "DOSBox-X"
#define MyAppVersion "0.83.11"
#define MyAppVersion "0.83.12"
#define MyAppPublisher "joncampbell123"
#define MyAppURL "https://dosbox-x.com/"
#define MyAppExeName "dosbox-x.exe"
@ -189,6 +189,18 @@ var
build64: Boolean;
HelpButton: TNewButton;
PageBuild, PageOutput, PageVer: TInputOptionWizardPage;
function IsVerySilent(): Boolean;
var
k: Integer;
begin
Result := False;
for k := 1 to ParamCount do
if CompareText(ParamStr(k), '/verysilent') = 0 then
begin
Result := True;
Break;
end;
end;
function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;
var
Version: TWindowsVersion;
@ -262,7 +274,7 @@ begin
build64:=False;
if IsWin64 then
begin
if (MsgBox('You are running 64-bit Windows. Do you want to install 64-bit version of DOSBox-X, which is recommended?' #13#13 'If you select No, then 32-bit version of DOSBox-X will be installed.', mbInformation, MB_YESNO) = IDYES) then
if IsVerySilent() or (MsgBox('You are running 64-bit Windows. Do you want to install 64-bit version of DOSBox-X, which is recommended?' #13#13 'If you select No, then 32-bit version of DOSBox-X will be installed.', mbInformation, MB_YESNO) = IDYES) then
build64:=True;
end;
end;
@ -459,7 +471,14 @@ begin
else if (CompareStr(GetSHA1OfFile(ExpandConstant('{app}\dosbox-x.conf')), GetSHA1OfFile(ExpandConstant(refname))) <> 0) or (CompareStr(GetMD5OfFile(ExpandConstant('{app}\dosbox-x.conf')), GetMD5OfFile(ExpandConstant(refname))) <> 0) then
begin
msg:='The configuration file dosbox-x.conf already exists in the destination. Do you want to keep your current settings?' #13#13 'If you choose "Yes", your current settings will be kept and the file dosbox-x.conf will be automatically upgraded to the latest version format (recommended).' #13#13 'If you choose "No", the dosbox-x.conf file will be reset to the new default configuration, and your old dosbox-x.conf file will be named dosbox-x.conf.old in the installation directory.' #13#13 'If you choose "Cancel", your current dosbox-x.conf file will be kept as is without any modifications.' #13 #13 'In any case, the new default configuration file will be named dosbox-x.reference.conf in the installation directory.';
res := MsgBox(msg, mbConfirmation, MB_YESNOCANCEL);
if IsVerySilent() then
begin
res := IDYES;
end
else
begin
res := MsgBox(msg, mbConfirmation, MB_YESNOCANCEL);
end
if (res = IDNO) then
begin
FileCopy(ExpandConstant('{app}\dosbox-x.conf'), ExpandConstant('{app}\dosbox-x.conf.old'), false);
@ -627,4 +646,4 @@ begin
Result := False;
if (dir=name) then
Result := True;
end;
end;