Using -c and --savepath on the command line

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
Islanti
Posts: 5
Joined: Sun May 25, 2008 9:13 am
Location: Orange County, CA

Using -c and --savepath on the command line

Post by Islanti »

I'm running a recent 0.12.0svn build. I'm attempting to get it to run from a U3 (memory stick) environment. If you aren't familiar, U3 copies .EXE and .DLL files to the host machine's hard drive to improve execution but leaves data and configuration files on the flash drive. Anyway, in order for ScummVM to work properly I need to specify 4 command line parameters:

--savepath=%U3_APP_DATA_PATH%\Save --extrapath=%U3_DEVICE_EXEC_PATH% --themepath=%U3_DEVICE_EXEC_PATH% --config=%U3_APP_DATA_PATH%\scummvm.ini

The last 3 work fine however the --savepath parameter seems to be ignored when a config file is specified.

It seems like a bug that command line options override config file options EXCEPT for --savepath. What's strange, though, is that Scumm is CHECKING the --savepath specified parameter because if that folder does not exist ScummVM.exe complains and exits. Before I log a bug I figured I'd sanity check what I'm doing to make sure I haven't overlooked anything.

ScummVM doesn't resolve environment variables properly when used in the config file unfortunately so I can't use the scummvm.ini as a workaround.
jvprat
ScummVM Developer
Posts: 76
Joined: Mon Oct 30, 2006 9:10 pm

Re: Using -c and --savepath on the command line

Post by jvprat »

Islanti wrote:The last 3 work fine however the --savepath parameter seems to be ignored when a config file is specified.
It's a known bug, documented here: http://sourceforge.net/tracker/index.ph ... tid=418820
Islanti
Posts: 5
Joined: Sun May 25, 2008 9:13 am
Location: Orange County, CA

Re: Using -c and --savepath on the command line

Post by Islanti »

jvprat wrote:
Islanti wrote:The last 3 work fine however the --savepath parameter seems to be ignored when a config file is specified.
It's a known bug, documented here: http://sourceforge.net/tracker/index.ph ... tid=418820
For some reason your link didn't work. I did find the bug here. Thanks for the tip!
HackerJoe
Posts: 4
Joined: Sun Aug 26, 2007 6:43 pm

Post by HackerJoe »

This is still a bug in 1.2.1 and latest git.
Using Win x64.

But now it seems to also affect --extrapath=

Quite confusing...
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Post by LordHoto »

HackerJoe wrote:This is still a bug in 1.2.1 and latest git.
Using Win x64.

But now it seems to also affect --extrapath=

Quite confusing...
See the last tracker comment:
Fingolfin wrote:Well, this happens because launcherDialog() clears the kTransientDomain
domain; and this should actually also affect the extrapath & themepath,
only that it's less noticable there, since the themepath is not needed
anymore once the theme has been loaded.
HackerJoe
Posts: 4
Joined: Sun Aug 26, 2007 6:43 pm

Post by HackerJoe »

Thanks for the explanation, I have looked at the bug tracker but this comment I must have missed.
I did not have a look at the code. But maybe it would be the simplest solution to just replace the values (in memory) from the conf/ini file with the command line arguments after it has been loaded.
This would be the behavior I expected.
Leaving the corresponding setting blank in the conf/ini file has no effect on this behavior. And as mentioned it only happens when/if the GUI is displayed.
Post Reply