How to make ScummVM portable?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

How to make ScummVM portable?

Post by lukeman3000 »

I'm making a USB drive with D-Fend Reloaded and I want to include ScummVM. Can I just drag-and-drop the files from the ScummVM zip download into a "ScummVM" directory on the USB flash drive and everything should work correctly when I point D-Fend Reloaded to that path? Or are there more things that need to be done?
User avatar
sev
ScummVM Lead
Posts: 2273
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: How to make ScummVM portable?

Post by sev »

Could you please elaborate a bit what is "the ScummVM zip download"?


Eugene
User avatar
Mustrum
Posts: 95
Joined: Wed Jan 28, 2009 2:06 pm
Location: Ankh-Morpork
Contact:

Re: How to make ScummVM portable?

Post by Mustrum »

I think lukeman3000 means the stable Windows zipfile from the download page.
User avatar
sev
ScummVM Lead
Posts: 2273
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: How to make ScummVM portable?

Post by sev »

Also it could be some game, or anything else. I need more information in order to be able to help.


Eugene
User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Re: How to make ScummVM portable?

Post by Dark-Star »

No, it won't work, because ScummVM is always looking for its configuration file (scummvm.ini) in your user data directory (c:\users\<foo>\appdata or something).

I made something like a "portable" version some years ago and the method I used still works today. However, there might exist a better option now, I have not checked recently.

Here are the steps you need to take to make ScummVM portable
  • Unpack ScummVM anywhere, let's say C:\SCVM
  • Make a subdirectory for the additional data files (if required for the games you want to play), like sky.cpt, mt32_pcm.rom, etc. Let's say C:\SCVM\Data
  • Copy the games you want in a subdirectory. Let's say C:\SCVM\GameA, C:\SCVM\GameB, etc.
  • Make an empty directory C:\SCVM\Save for your savegames
  • Launch ScummVM from that directory and add all the games you want to play, from their respective subdirectories
  • Find your SCUMMVM.INI file (somewhere in c:\users\<foo>\...) and copy it to the directory where ScummVM.exe is (i.e. C:\SCVM)
  • Edit the INI file and change every absolute path to a relative path (i.e. change for example C:\SCVM\GameA to just GameA, C:\SCVM\GameB\ to just GameB\, etc.... just remove the C:\SCVM\ part from the front)
  • add or change the line "savepath=..." to "savepath=Save\"
  • If not done already, add and/or change the lines "extrapath=..." and "themepath=..." to relative paths where your data files and/or theme files are
  • change any other option you'd like to in the ini file (e.g. fullscreen=, subtitles=, music_driver=, ...)
  • create a BAT or CMD file with the line "scummvm.exe --config=scummvm.ini" and save it in C:\SCVM. Now run the game with that CMD file instead of directly launching the EXE
  • Copy the SCVM directory to a USB stick (or wherever you like)
  • congratulations, you've gone completely portable ;-)
It might be a bit convoluted, and some steps might no longer be neccessary, but who cares as long as it works :)

Note: This will not work if you want to run the game from a UNC path, the CMD file has to be changed for that. You can map a network path as drive letter though, and it will work just fine from there.
lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Re: How to make ScummVM portable?

Post by lukeman3000 »

Yes, I'm referring to the stable release zip of ScummVM.

Thanks for the help - however, I'm not sure that being required to launch a .bat or anything other than the exe itself will work because of the way that D-Fend Reloaded is. In other words I'm not aware of how to specify D-Fend to launch anything other than the ScummVM exe itself. Is there a workaround to this? Perhaps by right-clicking the exe, going into properties, and appending the target with some kind of launch options?
User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Re: How to make ScummVM portable?

Post by Dark-Star »

lukeman3000 wrote:Yes, I'm referring to the stable release zip of ScummVM.

Thanks for the help - however, I'm not sure that being required to launch a .bat or anything other than the exe itself will work because of the way that D-Fend Reloaded is. In other words I'm not aware of how to specify D-Fend to launch anything other than the ScummVM exe itself. Is there a workaround to this? Perhaps by right-clicking the exe, going into properties, and appending the target with some kind of launch options?
I don't know anything about D-Fend but there could be several workarounds
  • Launch the ScummVM exe directly with the corresponding command line parameters (if D-Fend supports this?)
  • Write a smapp wrapper EXE in C (or any other language) that launches ScummVM with the required parameters
  • File a bug report with D-Fend since there's no reason at all that they don't support launching BAT or CMD files (assuming that D-Fend is open-source software)
Right-clicking the EXE would do nothing since this only brings up Windows' property dialog which doesn't do what you want it to do. Or do you mean right-clicking the EXE in D-Fend? If so, then you should probably ask on the D-Fend forum if there's a possiblity to do that
lukeman3000
Got a warning
Posts: 29
Joined: Tue Mar 17, 2009 1:50 am

Post by lukeman3000 »

This is what D-Fend Reloaded looks like wherein you specify the ScummVM folder that it is installed to:

Image

As you can see it only allows you to specify the folder but not the file to be ran (I tried adding scummvm.bat to the end of the path but it acted like it was trying to look in a scummvm.bat foler).

However, there is a parameter box as seen at the bottom. Would this work even though it seems to only allow a single line?

Edit: Wait, is it as simple as typing "-c config.ini" in the parameters box and that should tell it to use the config.ini located in the same directory as the exe (a little rusty on how relative paths work)? Then I simply edit the config file like you specified?
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: How to make ScummVM portable?

Post by EstelRandir »

Dark-Star wrote: Sat Dec 24, 2016 11:49 pm No, it won't work, because ScummVM is always looking for its configuration file (scummvm.ini) in your user data directory (c:\users\<foo>\appdata or something).

I made something like a "portable" version some years ago and the method I used still works today. However, there might exist a better option now, I have not checked recently.

Here are the steps you need to take to make ScummVM portable
  • Unpack ScummVM anywhere, let's say C:\SCVM
  • Make a subdirectory for the additional data files (if required for the games you want to play), like sky.cpt, mt32_pcm.rom, etc. Let's say C:\SCVM\Data
  • Copy the games you want in a subdirectory. Let's say C:\SCVM\GameA, C:\SCVM\GameB, etc.
  • Make an empty directory C:\SCVM\Save for your savegames
  • Launch ScummVM from that directory and add all the games you want to play, from their respective subdirectories
  • Find your SCUMMVM.INI file (somewhere in c:\users\<foo>\...) and copy it to the directory where ScummVM.exe is (i.e. C:\SCVM)
  • Edit the INI file and change every absolute path to a relative path (i.e. change for example C:\SCVM\GameA to just GameA, C:\SCVM\GameB\ to just GameB\, etc.... just remove the C:\SCVM\ part from the front)
  • add or change the line "savepath=..." to "savepath=Save\"
  • If not done already, add and/or change the lines "extrapath=..." and "themepath=..." to relative paths where your data files and/or theme files are
  • change any other option you'd like to in the ini file (e.g. fullscreen=, subtitles=, music_driver=, ...)
  • create a BAT or CMD file with the line "scummvm.exe --config=scummvm.ini" and save it in C:\SCVM. Now run the game with that CMD file instead of directly launching the EXE
  • Copy the SCVM directory to a USB stick (or wherever you like)
  • congratulations, you've gone completely portable ;-)
It might be a bit convoluted, and some steps might no longer be neccessary, but who cares as long as it works :)

Note: This will not work if you want to run the game from a UNC path, the CMD file has to be changed for that. You can map a network path as drive letter though, and it will work just fine from there.
Thank you! I am in a situation where I can only install ScummVM or any games onto a portable drive. This works!
Post Reply