mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
control Prism data directory via env variable
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -331,6 +331,16 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar
|
||||
if (QFile::exists(FS::PathCombine(m_rootPath, "portable.txt"))) {
|
||||
m_isPortable = true;
|
||||
}
|
||||
#endif
|
||||
} else if (auto dataDirEnv =
|
||||
QProcessEnvironment::systemEnvironment().value(QString("%1_DATA_DIR").arg(BuildConfig.LAUNCHER_NAME.toUpper()));
|
||||
!dataDirEnv.isEmpty()) {
|
||||
adjustedBy = "System environment";
|
||||
m_dataPath = dataDirEnv;
|
||||
#ifndef Q_OS_MACOS
|
||||
if (QFile::exists(FS::PathCombine(m_rootPath, "portable.txt"))) {
|
||||
m_isPortable = true;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
|
||||
|
Reference in New Issue
Block a user