Inno Setup weirdness
Community Forums/General Help/Inno Setup weirdness
| ||
Not something I'm expressly hoping for help with, but I thought I'd throw this out to the rest of you in case anyone has similar experiences or ideas... I revcently used Inno Setup (the latest version 5.3 or so ? ) to package an installer for a small Blitz app. Everything's unpacked in the right place and the program, once installed, runs fine from the Exe. However, if I try running via the shortcut (created and placed by Inno Setup) the program fails with an MAV. I'm not abl to readily determine the cause of this error, but I suspect it may be perhaps that the DLL are not 'linked' (sorry dunno the correct jargon) to the main .exe if it is run from the shortcut. Seems weird, and I can't say if this is a windows XP issue, a genweral Windows thing, Inno Setup problem (doubtful) or an actual problem with Blitz compilation itself. |
| ||
You need to add WorkingDir: {appdir} to each of your shortcut definitions in the ISS script. |
| ||
Hey thanks, GfK, It seems that doing so populates the "Start In" field for the shortcut. Although the app itself was found regardless once that field is set correctly, it does indeed work properly. Still odd though, I'm kinda curious as to why it happens that way... |
| ||
Its safe practice to set it internally with your app although I can't remember how to do it off-hand. InnoSetup's WorkingDir param is there for people that can't be bothered, like me. It's ChangeDir(<something or other>). |
| ||
It is mentioned in the Innosetup FAQ, see http://www.jrsoftware.org/isfaq.php The part that says you can tell Inno Setup to set the "Start In" field by adding "WorkingDir: {app}" to your [Icons] entries. |
| ||
Yes, but I am curious as to what it is that causes the app to have a MAV if run from the shortcut without that WorkingDir set? |
| ||
Yes, but I am curious as to what it is that causes the app to have a MAV if run from the shortcut without that WorkingDir set? Basically, it won't know where to look for your graphics/sounds etc. I think by default it will look wherever the shortcut is located, whether that's on your desktop, or in your Start Menu folder etc. |
| ||
AH I see, it can affect the actual CurrentDir of the Bliz app? I need to check the installer registry entries then, so I dont use any localised paths... |
| ||
thankfs for this tip, I'd a similar problem. |