Implement portable mode (#5561)

Adds portable mode by creating a file named portable_mode.txt next to lmms
and fixed a typo in the name of the function
This commit is contained in:
LAMCILAK Theo
2020-07-20 04:39:53 +02:00
committed by GitHub
parent 5a7ec92cf0
commit 37d85ef24a
3 changed files with 85 additions and 57 deletions

View File

@@ -50,7 +50,7 @@ const QString LADSPA_PATH ="plugins/ladspa/";
const QString DEFAULT_THEME_PATH = "themes/default/";
const QString TRACK_ICON_PATH = "track_icons/";
const QString LOCALE_PATH = "locale/";
const QString PORTABLE_MODE_FILE = "/portable_mode.txt";
class LMMS_EXPORT ConfigManager : public QObject
{
@@ -71,6 +71,12 @@ public:
return m_workingDir;
}
void initPortableWorkingDir();
void initInstalledWorkingDir();
void initDevelopmentWorkingDir();
const QString & dataDir() const
{
return m_dataDir;
@@ -216,7 +222,7 @@ public:
QString defaultVersion() const;
static QStringList availabeVstEmbedMethods();
static QStringList availableVstEmbedMethods();
QString vstEmbedMethod() const;
// Returns true if the working dir (e.g. ~/lmms) exists on disk.