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
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
That was the problem.
Thanks!