Author Topic: Relative paths where possible  (Read 4616 times)

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,036
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Relative paths where possible
« on: February 22, 2007, 14:09:49 »
I'd like to request including relevate paths where possible.

With a relative path, I refer to the path directed from the mptracker.exe file.

Lets say, you have mptracker in the following directory:

E:\mystuff\music\programs\openmpt\mptracker.exe

and you have your keyboard config file in the following directory:

E:\mystuff\music\programs\openmpt\keyconfigs

and you have your .iti's in the following directory:

E:\mystuff\music\sounds\mpt instruments

The keyconfigs would relativelly stored as .\keyconfigs\default.mkb

the instruments would be stored as ..\..\sounds\mpt instruments\sound.iti

The reason for this request is fairly simple:

If you put mpt on a stick, or for some reason, your drive letter changes, mpt won't find the keyconfig, and any .itp song stops working.

But even better, if the .itp songs store the instruments relativelly, you can distribute the .itp with a structure in tact.


EDIT: this problem has also been found for installed plugins.
"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

Offline Waxhead

  • Workaholic artist
  • ***
  • Posts: 251
  • Gender: Male
    • http://www.dirtcellar.net
  • Operating System: WinXP , Linux
Relative paths where possible
« Reply #1 on: February 22, 2007, 14:48:42 »
Amen to the above

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
Relative paths where possible
« Reply #2 on: February 23, 2007, 00:21:17 »
Makes sense
0.618033988

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,621
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Relative paths where possible
« Reply #3 on: May 30, 2010, 13:47:06 »
Relative paths are now used when using the "portable mode" INI setting. They are used for almost all settings, but for the time being not for VST plugin paths. This will hopefully be added in the next version.
Anyway... Please confirm that this has been implemented as wished in in OpenMPT 1.18.02.00. You may close this thread yourself then (edit first post and set the status in the topic title to S=C).
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,036
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Relative paths where possible
« Reply #4 on: May 30, 2010, 14:51:18 »
How do I enable portablemode?
"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

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,621
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Relative paths where possible
« Reply #5 on: May 30, 2010, 15:05:43 »
Use the "portable mode" in the installer to make a portable installation without registry changes.
Alternatively (when using an existing installation), you can copy mptrack.ini to OpenMPT's folder (it's in %APPDATA%\OpenMPT by default) and add UseAppDataDirectory=0 to the [Paths] section.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Paul Legovitch

  • Workaholic artist
  • ***
  • Posts: 145
    • http://legovitch.blogspot.com
Re: (S=P) Relative paths where possible
« Reply #6 on: May 31, 2010, 16:29:09 »
Quote from: "LPChip"
But even better, if the .itp songs store the instruments relativelly, you can distribute the .itp with a structure in tact.

I'd like to request that part too : if possible, when setting the path to the instrument the right click menu would offer to :
- set absolute path
- set relative path
It would still be good to have the two possible :
1) with an absolute path you can move your itp file on your hd it will still find the instruments.
2) with a relative path you can send an itp file along with its instruments in the same folder to another computer and the itp will load fine.