ModPlug Central

Community => General Chatter => Topic started by: LPChip on August 31, 2007, 12:17:14

Title: How to make OpenMPT portable?
Post by: LPChip on August 31, 2007, 12:17:14
Note: This information is outdated and won't work with OpenMPT 1.18
For this reason, this topic has been moved from the technical docs to the general chatter area.
Please read this article (http://forum.openmpt.org/index.php?topic=4350.0) if you want to know how to enable the portable mode in OpenMPT 1.18+


Lets say, you have this nice USB Stick or Removable HardDrive, and you want to use this to make OpenMPT portable?

You could copy OpenMPT to the drive and be done with it.

It will work, but it will disable a few features, such as VST Plugins, because they have the path hardcoded in the database.

I hereby present you a solution to make OpenMPT fully portable so you can put it on a stick, and it doesn't matter where you are, you'll always can make music (unless that computer doesn't have a soundcard :P)

Installation steps to make OpenMPT portable

subst O: .
subst P: "\music\VST Plugins"
subst R: "\music\Samples & Instruments"
subst S: "\music\Songs"
O:\mptrack.exe
subst /d o:
subst /d p:
subst /d r:
subst /d s:


Note that the paths are relative paths from the location where you start OpenMPT.bat. I used the . for O: to use the current path. If you want to put the OpenMPT.bat outside the openMPT folder, make sure you adjust that path too. Also edit the other paths to your needs. If you made all the other directories inside the OpenMPT dir, you only need this:


subst O: .
O:\mptrack.exe
subst /d o:


If you have a music folder with all subfolders in it, you can do it like this:


subst O: \music
O:\OpenMPt\mptrack.exe
subst /d o:
I hope this made sense to you. If you have a problem with your install, feel free to ask. If you ask, please provide as much information on what you currently have, and what you want to make.

Example:

I have my usb stick at E:\.
I have my OpenMPT folder at E:\PortableApps\Music\OpenMPT.
I have my VST folder at E:\PortableApps\Music\VST.
I have my Samples folder at E:\PortableApps\Music\Samples.
etc...

And I want to use driveletter Q: to start all.

Response is:

subst Q: \PortableApps\Music
Q:\OpenMPt\mptrack.exe
subst /d Q:


And settings in OpenMPT are all using Q:
------
Note, that when you close OpenMPT, it will automatically remove the O: or Q: drive association.
Title: How to make OpenMPT portable?
Post by: pelya on August 31, 2007, 13:54:37
Another option is to make Plugins, Songs, Samples etc directories in OpenMPT directory, copy there plugins and everything you want to be on USB stick, register all plugins/soundbanks from these directories and remove all other plugins from OpenMPT Plugin setup. Then exit OpenMPT and edit "mptrack.ini" and "plugin.cache" files by hand  :lol:  -  remove all absolute paths from there - you may just auto-replace string "C:\Program Files\OpenMPT" or wherever you have your OpenMPT installed to empty string in your favorite text editor. Note that if you'll add another plugin the ini files will contain absolute path to it - you'll need to edit them again - other than that described method works fine.