PDA

View Full Version : Incorrect shortcuts created by 1.2 installer



iamphet
11-27-2008, 12:36
The installer creates shortcuts which do not work. I've decompiled installer and found that install scripts states


[Icons]
Name: "{group}\Run Europa Barbarorum"; Filename: "{app}\RomeTW.exe -mod:eb -show_err"; WorkingDir: "{app}"; IconFilename: "{app}\ebicon.ico";
Name: "{group}\Run Europa Barbarorum (troubleshooting)"; Filename: "{app}\RomeTW.exe -mod:eb -show_err -nm -ne"; WorkingDir: "{app}"; IconFilename: "{app}\ebicon.ico";


while in fact it should be



[Icons]
Name: "{group}\Run Europa Barbarorum"; Filename: "{app}\RomeTW.exe"; Parameters: "-mod:eb -show_err"; WorkingDir: "{app}"; IconFilename: "{app}\ebicon.ico";
Name: "{group}\Run Europa Barbarorum (troubleshooting)"; Filename: "{app}\RomeTW.exe"; Parameters: "-mod:eb -show_err -nm -ne"; WorkingDir: "{app}"; IconFilename: "{app}\ebicon.ico";


Does it mean nobody uses the shortcuts preferring EBTrivialScript'ed ones? :laugh4:

Also I notices that in addition to "Validate Install" created by 1.1 the installer creates "Validate Installation" shortcuts which looks quite confusing for me.

bovi
11-27-2008, 13:37
That's weird, when I tested installing 1.1 and 1.2 I thought the 1.1 installer didn't create the shortcut for the validation. I guess that's the reason for Lemur having two such shortcuts though... Maybe I overwrote that one on an earlier test run before deleting it when I decided on another name for it.

I guess the icons are created incorrectly (my first time, and no cuddle afterwards :juggle2:), but how do the shortcuts turn out then? I really think the game ran with the shortcuts successfully after test installing 1.2...

iamphet
11-27-2008, 13:47
Maybe some versions if Windows know how to resolve those shortcuts or something like that. I'm pretty sure they didn't work on my PC ~:doh:

bovi
11-27-2008, 14:48
But how does the target string look? Does it include the "-mod:eb -show_err" switches?

iamphet
11-27-2008, 14:56
Verbatim, including quotes:

"d:\Games\Rome - Total War\RomeTW.exe -mod:eb -show_err"
So Windows tries to find that strange file d:\Games\Rome - Total War\RomeTW.exe -mod:eb -show_err :oops:

bovi
11-27-2008, 15:51
But... Isn't that exactly right :inquisitive:?

iamphet
11-27-2008, 15:57
Of course, not. You can paste it into cmd.exe and see. Correct one would be "d:\Games\Rome - Total War\RomeTW.exe" -mod:eb -show_err
BTW TrivialScript installer does that correctly:


[Icons]
Name: "{app}\Examples\Foobar Control\FoobarControl"; Filename: "{app}\EBTrivialScript.exe"; Parameters: "-s foobar.xml"; WorkingDir: "{app}\Examples\Foobar Control\";
Name: "{app}\Examples\Hello World\HelloWorld"; Filename: "{app}\EBTrivialScript.exe"; Parameters: "-s hello.xml"; WorkingDir: "{app}\Examples\Hello World\";

bovi
11-27-2008, 17:42
Yeah, I got home and checked. You're right of course (again)... I think I'll make an entry in the frequent issues about this. I could have sworn it worked earlier, but not now at least.

iamphet
11-29-2008, 13:32
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 ;)


[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 :smash:

bovi
11-29-2008, 15:48
That's great. I've bookmarked the thread.