Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Inno shortcut problems  (Read 5195 times)

0 Members and 1 Guest are viewing this topic.

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Inno shortcut problems
« 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
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Inno shortcut problems
« Reply #1 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.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Re: Inno shortcut problems
« Reply #2 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!
Logged
 

Page created in 0.025 seconds with 24 queries.