Manual:Portable App
Note: Available since 4.19.
Portable in this sense is defined as "A portable application (portable app), sometimes also called standalone, is a program designed to read and write its configuration settings into an accessible folder in the computer, usually the folder where the portable application can be found. This makes it easier to transfer the program with the user's preferences and data between different computers." -- https://en.wikipedia.org/wiki/Portable_application
This may be useful for varying reasons. You may like to play your MUDs on various PC's or at a friends house, so you can now carry around a version of Mudlet on a USB stick along with your profiles. You may also prefer to have your backups synchronised to the cloud so you can now specify that Mudlet data be stored in the ~/OneDrive
folder.
Note: Different operating systems use different terminology for directories, such as paths or folders. The terms are interchangeable in this page.
See also: Default file paths
How To Enable Portable Mode
Option 1
- create an empty
portable.txt
file in the same directory as the Mudlet executable (or appimage etc.) e.g.d:\usb\mudlet\portable.txt
This will tell Mudlet to use a directory named portable
(in the same directory as the executable) for its data. e.g. d:\usb\mudlet\portable\
Option 2
- Windows: create a
%userprofile%/.config/mudlet/portable.txt
file - Linux or Mac: create a
~/.config/mudlet/portable.txt
file
change the (empty) contents of the file to a directory on your filesystem where you want Mudlet data to be stored. This will tell Mudlet to use the directory written in the file as the location for its data. e.g. the file contents could be d:\usb\mudlet\mudlet_data
.
Note: The path can be relative. A relative path is a way to specify the location of a directory relative to another directory. In our case it will be interpreted relative to Mudlet's executable folder.
All sub-directories must exist up to the last part of the given path. e.g. d:\usb\mudlet
must exist if our path is d:\usb\mudlet\mudlet_data
and Mudlet will create mudlet_data
if it doesn't already exist. This will otherwise lead to an error. This is to avoid taking unintended input. If you see this error but this actually is what you want, just create those folders manually.
Any errors will result in the issue being printed to stderr (the console or terminal) and the program terminating. You probably won't see the error outputs if launched from GUI or Start menu so it's recommended to start Mudlet from the terminal until you are sure everything is setup correctly.
Migrating Existing Profiles
When you first launch Mudlet in portable mode, it will start with a new clean config in the respective directory, just like a new install. If you wish to migrate your existing config data to be portable:
- launch Mudlet at least once (without any
portable.txt
)
This is because it needs to migrate config files from the old format to the new, portable-friendly format. Then you can just copy/move your default data directory ~/.config/mudlet
to wherever you want and use one of the above methods to point Mudlet to that path containing your Mudlet data.