Location of INI-file and relative paths for portable use

Ask for help with ScummVM problems

Moderator: ScummVM Team

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

Location of INI-file and relative paths for portable use

Post by a.borque » Tue Feb 05, 2019 8:01 am

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: 397
Joined: Thu Nov 10, 2005 9:54 pm

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

Post by LogicDeLuxe » Tue Feb 05, 2019 9:29 am

All paths can be set with command line parameters, check the readme file.

User avatar
Dark-Star
Posts: 137
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 » Tue Feb 05, 2019 12:20 pm

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 Team Member
Posts: 41
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 » 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? :)

a.borque
Posts: 33
Joined: Thu Jun 19, 2008 10:00 pm

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

Post by a.borque » Mon Feb 11, 2019 8:51 am

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: 117
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 » Thu Feb 14, 2019 11:58 pm

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.

Post Reply