Make OpenMPT portable

Started by LPChip, May 14, 2009, 10:18:55

Previous topic - Next topic

LPChip

Note: This information is outdated and won't work with OpenMPT 1.18+
Please read this article if you want to know how to enable the portable mode in OpenMPT 1.18+




Download:
Click here to download the launcher.

Description:
This package contains a batchfile for launching OpenMPT from any location, regarding where it is located. What it does, it temporarilly creates a drivemapping to the path OpenMPT is in, then launches OpenMPT from that location.

Requirements:
This package requires you to have a free driveletter. P: is being used, but can manually edited. B: is also possible since many of us don't have a 2nd diskdrive.

Installation:
Download the zipfile and extract it inside the directory where you have mptrack.exe located.

If you haven't started OpenMPT for the first time yet, you can skip the following steps as there isn't an mptrack.ini file yet.

Now, we're going to edit the mptrack.ini file to make it work with our portable setting. If you're affraid to edit the mptrack.ini file manually and you don't mind to setup your plugins and settings, just delete mptrack.ini (or rename if that makes you feel safer)

If you decide to edit it, find the old path mptrack was running from (example: E:\Music\Programs\OpenMPT\mptrack.exe) and do a search/replace E:\Music\Programs\OpenMPT\ to P:\

The easiest way to know the correct path is by opening an explorer and navigate to the window where you see mptrack.exe. Copy the url from the adressbar and use that as your search criteria.

If done, save and close the mptrack.ini file and launch the PortableOpenMPT.bat file.

Important notice:
Do note! You'll get an additional command prompt window that will launch the tracker. Do not close this window. It'll be closed automatically when you exit the application. Closing it prematurelly will keep the P:\ drive available until the windows session ends. This can be a bad thing if you have other portable programs that are also using the P:\ drive.

Best Practice:
Once you've done this, its best to move your plugins/songs/instruments/etc (basically everything you want to carry around) in subdirectories of OpenMPT. Although only plugins can be a pain in the ass, and its highly recommended to store plugins inside the OpenMPT directory for portability. If you really need to have a seperate directory for your plugins because you share these with other applications, add the following line to your batch file:

subst v: e:\music\VST Plugins

and put it below the subst p: .

Note that the v: must be a driveletter that currently is not assigned. The e:\music\VST Plugins must be a valid path too.

Also add a respectivelly subst v: /d after the subst p: /d

Once done, start OpenMPT using the launcher and add the plugins using V:\.

For advanced users:
Alternativelly, you could also put OpenMPT as program inside another directory (say music/OpenMPT) and link the P directory to music. That way you could put your songs and plugins in different folders inside the portable area.

Example:

P:\OpenMPT\mptrack.exe
P:\VST Plugins
P:\Samples
P:\Instruments
P:\Songs

where P:\ is relative to E:\MyStuff\Music
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs