Wintermute Engine Forum

Wintermute Engine => Scripts, plugins, utilities, goodies => Topic started by: Mikael on July 29, 2007, 03:27:18 AM

Title: Inno shortcut problems
Post by: Mikael on July 29, 2007, 03:27:18 AM
I've been trying to get Inno setup to create a working shortcut for my game. However, the shortcut only tells me that it can't find the necessary files when I click on it. The Inno documentation says this about this particular issue:

In virtually all cases, this is something that should be corrected at the application level. Properly designed GUI applications should not expect to be started from a particular directory; they should always specify full pathnames on files they open. In Delphi or C++Builder, for example, it's possible to get the full pathname of the directory containing the application EXE by calling: ExtractFilePath(ParamStr(0)). To get the full path of a file named "File.txt" in the application directory, use: ExtractFilePath(ParamStr(0)) + 'File.txt'.

This is all latin to me, but the documentation also adds this:

If for some reason you cannot fix this at the application level, you can tell Inno Setup to set the "Start In" field by adding "WorkingDir: {app}" to your [Icons] entries.

I've tried all possible ways to insert this to the [Icons] entries, without any success whatsoever. I simply have no idea about how or exactly where it should be added.

Can anybody please help me with this?

Thanks!

Mikaell
Title: Re: Inno shortcut problems
Post by: Mnemonic on July 29, 2007, 07:25:22 AM
The "WorkingDir" should indeed do the trick. Something like this:

Code: Inno
  1. [Icons]
  2. Name: "{group}\My Cool Game"; Filename: "{app}\game.exe"; WorkingDir: "{app}"
  3. Name: "{userdesktop}\Run My Cool Game"; Filename: "{app}\game.exe"; WorkingDir: "{app}"; Tasks: desktopicon
  4.  
Title: Re: Inno shortcut problems
Post by: Mikael on July 29, 2007, 11:01:32 AM
... and so easy it looks when I see it now. I may add to my defence that the INNO docs put the " in the wrong place.

Thanks, Mnemonic!