diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 91f5ef9d..ba4096b6 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -699,6 +699,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->reset("PastebinCustomAPIBase");
}
}
+ // meta URL
+ m_settings->registerSetting("MetaURLOverride", "");
m_settings->registerSetting("CloseAfterLaunch", false);
m_settings->registerSetting("QuitAfterGameStop", false);
diff --git a/launcher/meta/BaseEntity.cpp b/launcher/meta/BaseEntity.cpp
index 84155922..de4e1012 100644
--- a/launcher/meta/BaseEntity.cpp
+++ b/launcher/meta/BaseEntity.cpp
@@ -75,7 +75,16 @@ Meta::BaseEntity::~BaseEntity()
QUrl Meta::BaseEntity::url() const
{
- return QUrl(BuildConfig.META_URL).resolved(localFilename());
+ auto s = APPLICATION->settings();
+ QString metaOverride = s->get("MetaURLOverride").toString();
+ if(metaOverride.isEmpty())
+ {
+ return QUrl(BuildConfig.META_URL).resolved(localFilename());
+ }
+ else
+ {
+ return QUrl(metaOverride).resolved(localFilename());
+ }
}
bool Meta::BaseEntity::loadLocalFile()
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp
index 2841544f..6ad243dd 100644
--- a/launcher/ui/pages/global/APIPage.cpp
+++ b/launcher/ui/pages/global/APIPage.cpp
@@ -132,6 +132,8 @@ void APIPage::loadSettings()
QString msaClientID = s->get("MSAClientIDOverride").toString();
ui->msaClientID->setText(msaClientID);
+ QString metaURL = s->get("MetaURLOverride").toString();
+ ui->metaURL->setText(metaURL);
QString curseKey = s->get("CFKeyOverride").toString();
ui->curseKey->setText(curseKey);
}
@@ -145,6 +147,21 @@ void APIPage::applySettings()
QString msaClientID = ui->msaClientID->text();
s->set("MSAClientIDOverride", msaClientID);
+ QUrl metaURL = ui->metaURL->text();
+ // Add required trailing slash
+ if (!metaURL.isEmpty() && !metaURL.path().endsWith('/'))
+ {
+ QString path = metaURL.path();
+ path.append('/');
+ metaURL.setPath(path);
+ }
+ // Don't allow HTTP, since meta is basically RCE with all the jar files.
+ if(!metaURL.isEmpty() && metaURL.scheme() == "http")
+ {
+ metaURL.setScheme("https");
+ }
+
+ s->set("MetaURLOverride", metaURL);
QString curseKey = ui->curseKey->text();
s->set("CFKeyOverride", curseKey);
}
diff --git a/launcher/ui/pages/global/APIPage.ui b/launcher/ui/pages/global/APIPage.ui
index b6af1958..24189c5c 100644
--- a/launcher/ui/pages/global/APIPage.ui
+++ b/launcher/ui/pages/global/APIPage.ui
@@ -6,8 +6,8 @@
0
0
- 512
- 538
+ 800
+ 600
@@ -124,6 +124,51 @@
+ -
+
+
+ Meta&data Server
+
+
+
-
+
+
+ You can set this to a third-party metadata server to use patched libraries or other hacks.
+
+
+ Qt::RichText
+
+
+ true
+
+
+
+ -
+
+
+ (Default)
+
+
+
+ -
+
+
+ Enter a custom URL for meta here.
+
+
+ Qt::RichText
+
+
+ true
+
+
+ true
+
+
+
+
+
+
-
@@ -132,16 +177,9 @@
&CurseForge Core API
-
+
-
-
-
- Qt::Horizontal
-
-
-
- -
-
+
Note: you probably don't need to set this if CurseForge already works.
@@ -158,7 +196,7 @@
-
-
+
Enter a custom API Key for CurseForge here.
@@ -176,6 +214,19 @@
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+