Location of INI-file and relative paths for portable use

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
a.borque
Posts: 44
Joined: Thu Jun 19, 2008 10:00 pm

Location of INI-file and relative paths for portable use

Post by a.borque »

Hello!
If I read the documentation correctly ScummVM stores the INI-file somewhere in the users home-directory and needs absolute paths to the game-directories.
I don't know how much coding-work it would cost, ot whether it contradicts some ScummVM-design-philosophy, but would it be possible to allow

- storage of the INI-file in ScummVMs installation-directory
and
- relative paths to the game-data-directories

to ease portable use?
Doing a quick forum search I have not found any thread dealing with this, so I ask it.
Thanks!
A.Borque
User avatar
LogicDeLuxe
Posts: 431
Joined: Thu Nov 10, 2005 9:54 pm

Re: Location of INI-file and relative paths for portable use

Post by LogicDeLuxe »

All paths can be set with command line parameters, check the readme file.
User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Re: Location of INI-file and relative paths for portable use

Post by Dark-Star »

you can launch ScummVM with

Code: Select all

scummvm.exe --config=foo.ini
to use the INI file from the current directory, and then store/change all paths in that INI file to relative paths. This is a manual process (ScummVM will always write absolute paths to that file) but once you converted it, your ScummVM will be portable. I've been using this method for years.
User avatar
rootfather
ScummVM Lead
Posts: 173
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Location of INI-file and relative paths for portable use

Post by rootfather »

If there's any particular interest, I can try to build a version that would respect a "marker file" like "is_portable" and if such a file is present, automagically set all paths including the configuration relative to the ScummVM directory for "real" portable use.

@a.borque: Would that solve your issue? :)
a.borque
Posts: 44
Joined: Thu Jun 19, 2008 10:00 pm

Re: Location of INI-file and relative paths for portable use

Post by a.borque »

rootfather wrote: Fri Feb 08, 2019 10:55 am If there's any particular interest, I can try to build a version that would respect a "marker file" like "is_portable" and if such a file is present, automagically set all paths including the configuration relative to the ScummVM directory for "real" portable use.

@a.borque: Would that solve your issue? :)
Hi!
Yes, that would be great.
Perhaps ScummVM should expect the INI-file and (optional) additional libraries etc. in the directory where the main executable is stored (or a subfolder) in the first place and search by a relative path if not found there. The game data files should/could have relative paths by default?
Thanks a lot once again!
A.Borque
NLS
Posts: 127
Joined: Sun Jan 08, 2006 4:43 pm
Location: Greece
Contact:

Re: Location of INI-file and relative paths for portable use

Post by NLS »

Indeed this is the proper method.
Look for the .ini locally first. This makes portable use easy.
Look for the .ini in user home directory. Prefer that if it exists. This would allow for custom parameters based on host hardware.

Also implement parameters to -ignorelocal or -ignorehome.
User avatar
rootfather
ScummVM Lead
Posts: 173
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Location of INI-file and relative paths for portable use

Post by rootfather »

A first solution for this issue now resides at https://github.com/scummvm/scummvm/pull/1504.
NLS
Posts: 127
Joined: Sun Jan 08, 2006 4:43 pm
Location: Greece
Contact:

Re: Location of INI-file and relative paths for portable use

Post by NLS »

Very good solution and I don't get why another dev fights it so much.
It is transparent, quite stupid-proof, has validity checks. It is OK.

Not all people want to use default user home directories in windows.
I actually don't even like that the exe (installer) version is "promoted" more for Windows, rather than the zip one (even for nightlies that are NOT intended for the casual user!).
Looks a bit like babysitting the users or not trusting them to "not make something stupid".
a.borque
Posts: 44
Joined: Thu Jun 19, 2008 10:00 pm

Re: Location of INI-file and relative paths for portable use

Post by a.borque »

Hi!
Aside from being not a dev but an (perhaps advanced, I don't know) user who only donated a small amount of money instead of code:

I support an optional portable solution for Windows!

I too don't get why other devs are fighting it so fiercely and say forking ScummVM would be the only possible way to get this done.
If an active user intervention is required to change the default behaviour, everyone doing so should have noticed and it should be no problem for support?
If it is such a big concern perhaps a string like "Portable mode" could be additionally displayed at a prominent place in the interface to further clarify ScummVMs current mode of operation?

A.Borque
PS: I am not posting this on Github because I am no Dev!
Post Reply