rom validation in setup. Will warn about headered files for now. Someone who wants to deal with pascal is welcome to add a check for it.

This commit is contained in:
Fabian Dill 2020-04-07 05:41:44 +02:00
parent e209f00881
commit b427f03e5f
1 changed files with 116 additions and 112 deletions

View File

@ -85,8 +85,8 @@ begin
end; end;
end; end;
var var ROMFilePage: TInputFileWizardPage;
ROMFilePage: TInputFileWizardPage; var R : longint;
procedure InitializeWizard(); procedure InitializeWizard();
begin begin
@ -105,8 +105,12 @@ end;
function GetROMPath(Param: string): string; function GetROMPath(Param: string): string;
begin begin
if Assigned(RomFilePage) then if Assigned(RomFilePage) then begin
Result := ROMFilePage.Values[0] R := CompareStr(GetMD5OfFile(ROMFilePage.Values[0]), '03a63945398191337e896e5771f77173')
if R <> 0 then
MsgBox('ROM validation failed. Very likely wrong file.', mbInformation, MB_OK);
Result := ROMFilePage.Values[0]
end
else else
Result := ''; Result := '';
end; end;