Bovi, let me propose few tweaks for the installer which I used for some minor mod. Some of them are too late to implement for EB 1.x since no major updates are expected, but maybe you find them useful for EB2 ;)
Code:
[Setup]
; prevent confusing warning about existing directory
DirExistsWarning=no
EnableDirDoesntExistWarning=yes
; keep AppId the same for all installers
; and they will select previous installation target dir by default
AppId=Europa Barbarorum
; invoke code to guess install directory for users having only one installation
DefaultDirName={code:DefDestDir}
...
{Code}
function DefDestDir(NoArg: String): String;
var
Path: String;
begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SOFTWARE\The Creative Assembly\Rome - Total War - Gold Edition', 'InstallPath', Path) then
Result := Path
else if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SOFTWARE\The Creative Assembly\Rome - Total War', 'InstallPath', Path) then
Result := Path
else
Result := ExpandConstant('{pf}\Activision\Rome - Total War');
end;
// trying to be smart and warn users against selecting wrong directory
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpSelectDir then
Result := (FileExists(RemoveBackslashUnlessRoot(WizardDirValue) + '\RomeTW.exe') or
(MsgBox('The installer cannot find RomeTW.exe in the destination directory. Are you sure you want to use the selected directory?',
mbConfirmation, MB_YESNO) = IDYES))
else
Result := True;
end;
Please replace curly braces around Code with square ones, the forum is too smart trying to find its tags
Bookmarks