You are here

PortableApps.com Launcher WorkingDirectory

3 posts / 0 new
Last post
dagardner
dagardner's picture
Offline
Last seen: 5 years 5 months ago
Developer
Joined: 2007-09-20 14:41
PortableApps.com Launcher WorkingDirectory

I'm working on converting Hedgewars Portable from a custom installer script to a PortableApps.com Launcher, but I'm having trouble with WorkingDirectory.

If I create a launcher that runs the hedgewars.exe, I get the following error from Hedgewars:

Failed to open data directory:
C:/Documents and Settings/user/Desktop/HedgewarsPortable/hedgewars/Data
Please check your installation

Now, the data directory is actual located in:

C:\Documents and Settings\user\Desktop\HedgewarsPortable\App\Hedgewars\share\hedgewars\Data

If I run hedgewars.exe from the bin directory and it works. If I put a batch file in the HedgewarsPortable directory that contains:

App\Hedgewars\bin\hedgewars.exe

I get the same error as from the launcher, but if I change it to:

cd App\Hedgewars\bin
hedgewars.exe

Hedgewars runs.

Looking at the documentation, I thought WorkingDirectory is what I needed, so I added:

WorkingDirectory=%PAL:AppDir%\Hedgewars\bin\

to the [Launch] Section in HedgewarsPortable.ini, but that still didn't fix the error.

Does anyone have any idea what I need to do to get this to work?

Thanks,

Andy

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Remove trailing slash

On Windows, paths to directories should not include a trailing slash in general.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

dagardner
dagardner's picture
Offline
Last seen: 5 years 5 months ago
Developer
Joined: 2007-09-20 14:41
Yep

That was the problem.

Thanks!

Log in or register to post comments