From c5f23f8b711e2c96d662bcffdcd2af73bbf6fd58 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Sat, 1 Jul 2023 01:13:39 +0200 Subject: [PATCH] RMG: expose --lib-path commandline option --- Source/RMG/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/RMG/main.cpp b/Source/RMG/main.cpp index 560f0c52..cfe3bf04 100644 --- a/Source/RMG/main.cpp +++ b/Source/RMG/main.cpp @@ -121,9 +121,11 @@ int main(int argc, char **argv) parser.addVersionOption(); // custom options #ifndef PORTABLE_INSTALL + QCommandLineOption libPathOption("lib-path", "Changes the path where the libraries are stored", "path"); QCommandLineOption corePathOption("core-path", "Changes the path where the core library is stored", "path"); QCommandLineOption pluginPathOption("plugin-path", "Changes the path where the plugins are stored", "path"); QCommandLineOption sharedDataPathOption("shared-data-path", "Changes the path where the shared data is stored", "path"); + libPathOption.setFlags(QCommandLineOption::HiddenFromHelp); corePathOption.setFlags(QCommandLineOption::HiddenFromHelp); pluginPathOption.setFlags(QCommandLineOption::HiddenFromHelp); sharedDataPathOption.setFlags(QCommandLineOption::HiddenFromHelp); @@ -135,6 +137,7 @@ int main(int argc, char **argv) QCommandLineOption diskOption("disk", "64DD Disk to open ROM in combination with", "64DD Disk"); #ifndef PORTABLE_INSTALL + parser.addOption(libPathOption); parser.addOption(corePathOption); parser.addOption(pluginPathOption); parser.addOption(sharedDataPathOption); @@ -151,9 +154,14 @@ int main(int argc, char **argv) #ifndef PORTABLE_INSTALL // set path overrides before initializing + QString libPathOverride = parser.value(libPathOption); QString corePathOveride = parser.value(corePathOption); QString pluginPathOverride = parser.value(pluginPathOption); QString sharedDataPathOverride = parser.value(sharedDataPathOption); + if (!libPathOverride.isEmpty()) + { + CoreSetLibraryPathOverride(libPathOverride.toStdString()); + } if (!corePathOveride.isEmpty()) { CoreSetCorePathOverride(corePathOveride.toStdString());