scummvm.ini in ScummVM root dir
Moderator: ScummVM Team
scummvm.ini in ScummVM root dir
Hi, may be useful to add a check, if a scummvm.ini is present in root of ScummVM dir, use it instead that in %APPDATA%\ScummVM\scummvm.ini, so if I'm using the unzipped version, I may use it in another pc without to lose games configurations (same thing with Saved games dir too), what you thing about?
- MusicallyInspired
- Posts: 1138
- Joined: Fri Mar 02, 2007 8:03 am
- Location: Manitoba, Canada
- Contact:
Re: scummvm.ini in ScummVM root dir
I second this.
- Praetorian
- ScummVM Developer
- Posts: 882
- Joined: Tue May 08, 2007 8:54 am
- Location: Greece
- Contact:
Re: scummvm.ini in ScummVM root dir
For the Windows ports, GOG already uses a "portable" version of ScummVM.giovpres wrote: ↑Wed Mar 10, 2021 2:53 pm Hi, may be useful to add a check, if a scummvm.ini is present in root of ScummVM dir, use it instead that in %APPDATA%\ScummVM\scummvm.ini, so if I'm using the unzipped version, I may use it in another pc without to lose games configurations (same thing with Saved games dir too), what you thing about?
It basically creates shortcuts that launch ScummVM with a custom scummvm.ini.
Code: Select all
scummvm.exe" -c "..\project_nov.ini" project-nov
The final parameter "project-nov" launches directly into the game instead of the ScummVM launcher window, so you probably can skip that part.
The example also assumes that ScummVM is in a subfolder inside the Blade Runner game folder, while the "project_nov.ini" is in the game folder itself, hence the "..".
So, perhaps something similar could also be suitable for your use case. Meaning, launching ScummVM with your config file (ini) of preference.
Keep in mind, that just copying a scummvm.ini from one PC to another will not necessarily work, as the config file stores *absolute* paths for each game folder and also save games folder (if it is custom), and any other custom defined paths (eg. "Extras").
However, there have been discussions about portable ScummVM before. A few recent ones from a quick search:
viewtopic.php?t=14804
viewtopic.php?t=15071
Re: scummvm.ini in ScummVM root dir
Since they moved the ini to the Appdata folder, I am using a Batch file for myself. All my ScummVM games are in D:\ScummVM. The content of ScummVM.zip I saved in D:\ScummVM\Data. I can move this everywhere I want and it will work. Only possible problematic settings are usually the Graphics Settings, as e.g. my travel laptop still operates on 900p while my Desktop uses 1440p.
The Batchfile looks like this and should be in Main ScummVM dir:
The Batchfile looks like this and should be in Main ScummVM dir:
Code: Select all
Data\ScummVM.exe -c .\Data\Settings.ini
Re: scummvm.ini in ScummVM root dir
My ScummVM its 100% portable with the games too.
I have the games inside ScummVM folder
ScummVM.bat
@echo off
start scummvm.exe --no-console -c ".\scummvm.ini"
scummvm.ini (the games are like this, expample)
[gk1-cd-win]
description=Gabriel Knight: Sins of the Fathers
extra=CD
speech_volume=60
talkspeed=255
originalsaveload=false
path=.\Gabriel Knight - Sins of the Fathers\
engineid=sci
subtitles=true
fullscreen=true
gameid=gk1
language=en
sfx_volume=60
savepath=.\Gabriel Knight - Sins of the Fathers\_saves
music_volume=157
platform=windows
enable_hq_video=true
speech_mute=false
guioptions=sndLinkSpeechToSfx gameOption2 gameOptionA lang_English
EXTRA: update.bat
mkdir temp
curl --output ./temp/update.zip https://buildbot.scummvm.org/snapshots/ ... latest.zip
powershell -command "expand-archive -force '.\temp\update.zip' '.\temp\'"
for /d %%a in (.\temp\master*) do move /Y %%a\scummvm.exe .\
for /d %%a in (.\temp\master*) do move /Y %%a\WinSparkle.dll .\
rmdir /S /q "temp"
I have the games inside ScummVM folder
ScummVM.bat
@echo off
start scummvm.exe --no-console -c ".\scummvm.ini"
scummvm.ini (the games are like this, expample)
[gk1-cd-win]
description=Gabriel Knight: Sins of the Fathers
extra=CD
speech_volume=60
talkspeed=255
originalsaveload=false
path=.\Gabriel Knight - Sins of the Fathers\
engineid=sci
subtitles=true
fullscreen=true
gameid=gk1
language=en
sfx_volume=60
savepath=.\Gabriel Knight - Sins of the Fathers\_saves
music_volume=157
platform=windows
enable_hq_video=true
speech_mute=false
guioptions=sndLinkSpeechToSfx gameOption2 gameOptionA lang_English
EXTRA: update.bat
mkdir temp
curl --output ./temp/update.zip https://buildbot.scummvm.org/snapshots/ ... latest.zip
powershell -command "expand-archive -force '.\temp\update.zip' '.\temp\'"
for /d %%a in (.\temp\master*) do move /Y %%a\scummvm.exe .\
for /d %%a in (.\temp\master*) do move /Y %%a\WinSparkle.dll .\
rmdir /S /q "temp"
Last edited by dariwonka on Sat May 01, 2021 6:04 am, edited 1 time in total.
Re: scummvm.ini in ScummVM root dir
Thank you for the solution, but isn't better to place the settings.ini file into the ScummVM folder as default so just to launch the ScummVM.exe avoiding to create batch files? The batch file may be made instead to load scummvm.ini files placed in others owners pc folders (more rare situation).
Re: scummvm.ini in ScummVM root dir
1. The .ini is inside the scummvm foldergiovpres wrote: ↑Thu Mar 18, 2021 1:13 am Thank you for the solution, but isn't better to place the settings.ini file into the ScummVM folder as default so just to launch the ScummVM.exe avoiding to create batch files? The batch file may be made instead to load scummvm.ini files placed in others owners pc folders (more rare situation).
2. The scummvm.exe will always load %APPDATA%\ScummVM\scummvm.ini
3. If you want to use another ini, for example the one in the scummvm folder you need a .bat and as you can see, my .bat is pointing the ini inside scummvm folder.
As I said, my scummvm is 100% portable, everything: games, ini, bat are inside the same folder
Re: scummvm.ini in ScummVM root dir
The problem is that ScummVM always will look by default to the %Appdata% folder. So there are two solutions for this:
1. You create a batch file with the command to point to another ini file, which was already given by Praetorian, dariwonka and me. This is the easiest solution and most compatible, you can always update ScummVM whenever you like by overwriting the Exe.
2. You recompile ScummVM, and change the base directory for your ini to be always the same dir. I don't know which parts you have to change, but thats what you would need to to do if you want a clean ScummVM. But then you have to redo it every new release, which is quite tedious.
1. You create a batch file with the command to point to another ini file, which was already given by Praetorian, dariwonka and me. This is the easiest solution and most compatible, you can always update ScummVM whenever you like by overwriting the Exe.
2. You recompile ScummVM, and change the base directory for your ini to be always the same dir. I don't know which parts you have to change, but thats what you would need to to do if you want a clean ScummVM. But then you have to redo it every new release, which is quite tedious.
- rootfather
- ScummVM Lead
- Posts: 182
- Joined: Tue Mar 31, 2015 11:59 am
- Location: Germany
- Contact:
Re: scummvm.ini in ScummVM root dir
Hmmm. What do you folks think about something along the lines of an additional command line switch like "--portable" which will redirect all saves and the .ini file to the path where the ScummVM executable is located?
Re: scummvm.ini in ScummVM root dir
How about checking if an ini file exists in the current directory and launching ScummVM with that config it it is found, while falling back to the current behavior if no ini file exists?
ScummVM could start in a "portable" mode with an ini in the current directory automatically, where all new games get added automatically with a relative path instead of an absolute one
ScummVM could start in a "portable" mode with an ini in the current directory automatically, where all new games get added automatically with a relative path instead of an absolute one
Re: scummvm.ini in ScummVM root dir
the portable parameter sounds actually nice, maybe you suggest this behavior in the GitHub as enhancement.
With the ini file in directory is for me actually a nice and smart idea to solve the issue we discussed. BUT the problem is, that this is not good coding style you should use for a public software. ScummVM is following Microsofts software best practices and this is totally fine to do. Using an ini in the same directory, might confuse especially not so tech savvy users and this can't be an option. So it should be only possible via Startparameter, thus .bat or a .lnk file.
With the ini file in directory is for me actually a nice and smart idea to solve the issue we discussed. BUT the problem is, that this is not good coding style you should use for a public software. ScummVM is following Microsofts software best practices and this is totally fine to do. Using an ini in the same directory, might confuse especially not so tech savvy users and this can't be an option. So it should be only possible via Startparameter, thus .bat or a .lnk file.
-
- Posts: 68
- Joined: Thu Jul 18, 2019 1:31 pm
Re: scummvm.ini in ScummVM root dir
I would love to see that for ScummVM. In other applications like the Dolphin emulator it does that by checking whether there's an empty "portable.txt" in the main app folder.Dark-Star wrote: ↑Fri Mar 26, 2021 8:31 pm How about checking if an ini file exists in the current directory and launching ScummVM with that config it it is found, while falling back to the current behavior if no ini file exists?
ScummVM could start in a "portable" mode with an ini in the current directory automatically, where all new games get added automatically with a relative path instead of an absolute one
Re: scummvm.ini in ScummVM root dir
For the non-tech-savvy user, running a BAT file that adds that parameter (instead of just running the EXE file, like they're used to) is probably even more confusing, that's why a solution that doesn't require any special parameter is IMHO the better way.invwar wrote: ↑Sat Mar 27, 2021 5:47 am the portable parameter sounds actually nice, maybe you suggest this behavior in the GitHub as enhancement.
With the ini file in directory is for me actually a nice and smart idea to solve the issue we discussed. BUT the problem is, that this is not good coding style you should use for a public software. ScummVM is following Microsofts software best practices and this is totally fine to do. Using an ini in the same directory, might confuse especially not so tech savvy users and this can't be an option. So it should be only possible via Startparameter, thus .bat or a .lnk file.
Also, Microsoft's software best practices don't apply to portable software, as that's the reason people use portable software in the first place
Re: scummvm.ini in ScummVM root dir
Sure, but ScummVM is since years not anymore a portable software per se. The Windows Installer is the official preferred method. But I definitely would also like to have the "Zipfile" version declared as fully portable.
Re: scummvm.ini in ScummVM root dir
ScummVM is perfectly portable. You just need the EXE file and some DLLs. Even better: If you compile it yourself you can get a single EXE file that runs without any DLLs at all, this is how I've been setting up a portable version of ScummVM.
The installer is just convenience, no system files or anything else needs to be "installed" outside the ScummVM install dir.