From 28bc11ae23c5e737d287eb6a5b0913467a7532f8 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Mon, 10 Jan 2022 11:32:22 +0100 Subject: [PATCH] New package: PolyMC-1.0.6 --- .../PolyMC/patches/00-backport-fixes.patch | 693 ++++++++++++++++++ srcpkgs/PolyMC/template | 37 + 2 files changed, 730 insertions(+) create mode 100644 srcpkgs/PolyMC/patches/00-backport-fixes.patch create mode 100644 srcpkgs/PolyMC/template diff --git a/srcpkgs/PolyMC/patches/00-backport-fixes.patch b/srcpkgs/PolyMC/patches/00-backport-fixes.patch new file mode 100644 index 000000000000..9aa6982c8639 --- /dev/null +++ b/srcpkgs/PolyMC/patches/00-backport-fixes.patch @@ -0,0 +1,693 @@ +# These are all upstream backports, to be dropped with the next release. +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2507a48..d28b05f6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,7 +46,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y") + ##################################### Set Application options ##################################### + + ######## Set URLs ######## +-set(Launcher_NEWS_RSS_URL "https://multimc.org/rss.xml" CACHE STRING "URL to fetch Launcher's news RSS feed from.") ++set(Launcher_NEWS_RSS_URL "https://polymc.github.io/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.") ++set(Launcher_NEWS_OPEN_URL "https://polymc.github.io/news/" CACHE STRING "URL that gets opened when the user clicks 'More News'") + + ######## Set version numbers ######## + set(Launcher_VERSION_MAJOR 1) +@@ -68,9 +69,6 @@ set(Launcher_NOTIFICATION_URL "" CACHE STRING "URL for checking for notification + # The metadata server + set(Launcher_META_URL "https://meta.polymc.org/v1/" CACHE STRING "URL to fetch PolyMC's meta files from.") + +-# paste.ee API key +-set(Launcher_PASTE_EE_API_KEY "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" CACHE STRING "API key you can get from paste.ee when you register an account") +- + # Imgur API Client ID + set(Launcher_IMGUR_CLIENT_ID "5b97b0713fba4a3" CACHE STRING "Client ID you can get from Imgur when you register an application") + +@@ -80,6 +78,9 @@ set(Launcher_MSA_CLIENT_ID "17b47edd-c884-4997-926d-9e7f9a6b4647" CACHE STRING " + # Bug tracker URL + set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STRING "URL for the bug tracker.") + ++# Translations Platform URL ++set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.") ++ + # Discord URL + set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.") + +diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in +index af8845dc..2c872124 100644 +--- a/buildconfig/BuildConfig.cpp.in ++++ b/buildconfig/BuildConfig.cpp.in +@@ -42,12 +42,13 @@ Config::Config() + + VERSION_STR = "@Launcher_VERSION_STRING@"; + NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@"; +- PASTE_EE_KEY = "@Launcher_PASTE_EE_API_KEY@"; ++ NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@"; + IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@"; + MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@"; + META_URL = "@Launcher_META_URL@"; + + BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@"; ++ TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@"; + DISCORD_URL = "@Launcher_DISCORD_URL@"; + SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@"; + } +diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h +index 009fb2bc..760d208a 100644 +--- a/buildconfig/BuildConfig.h ++++ b/buildconfig/BuildConfig.h +@@ -68,9 +68,9 @@ public: + QString NEWS_RSS_URL; + + /** +- * API key you can get from paste.ee when you register an account ++ * URL that gets opened when the user clicks "More News" + */ +- QString PASTE_EE_KEY; ++ QString NEWS_OPEN_URL; + + /** + * Client ID you can get from Imgur when you register an application +@@ -88,6 +88,7 @@ public: + QString META_URL; + + QString BUG_TRACKER_URL; ++ QString TRANSLATIONS_URL; + QString DISCORD_URL; + QString SUBREDDIT_URL; + +@@ -96,7 +97,7 @@ public: + QString AUTH_BASE = "https://authserver.mojang.com/"; + QString IMGUR_BASE_URL = "https://api.imgur.com/3/"; + QString FMLLIBS_BASE_URL = "https://files.multimc.org/fmllibs/"; +- QString TRANSLATIONS_BASE_URL = "https://files.multimc.org/translations/"; ++ QString TRANSLATIONS_BASE_URL = "https://i18n.polymc.org/"; + + QString MODPACKSCH_API_BASE_URL = "https://api.modpacks.ch/"; + +diff --git a/launcher/Application.cpp b/launcher/Application.cpp +index 9bd4ebae..9472f0ef 100644 +--- a/launcher/Application.cpp ++++ b/launcher/Application.cpp +@@ -14,7 +14,7 @@ + #include "ui/pages/global/ProxyPage.h" + #include "ui/pages/global/ExternalToolsPage.h" + #include "ui/pages/global/AccountListPage.h" +-#include "ui/pages/global/PasteEEPage.h" ++#include "ui/pages/global/PastePage.h" + #include "ui/pages/global/CustomCommandsPage.h" + + #include "ui/themes/ITheme.h" +@@ -714,8 +714,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) + + m_settings->registerSetting("UpdateDialogGeometry", ""); + +- // paste.ee API key +- m_settings->registerSetting("PasteEEAPIKey", "multimc"); ++ // pastebin URL ++ m_settings->registerSetting("PastebinURL", "https://0x0.st"); + + // Init page provider + { +@@ -728,7 +728,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) + m_globalSettingsProvider->addPage(); + m_globalSettingsProvider->addPage(); + m_globalSettingsProvider->addPage(); +- m_globalSettingsProvider->addPage(); ++ m_globalSettingsProvider->addPage(); + } + qDebug() << "<> Settings loaded."; + } +diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt +index b5c52afa..c49b68b2 100644 +--- a/launcher/CMakeLists.txt ++++ b/launcher/CMakeLists.txt +@@ -707,8 +707,8 @@ SET(LAUNCHER_SOURCES + ui/pages/global/LauncherPage.h + ui/pages/global/ProxyPage.cpp + ui/pages/global/ProxyPage.h +- ui/pages/global/PasteEEPage.cpp +- ui/pages/global/PasteEEPage.h ++ ui/pages/global/PastePage.cpp ++ ui/pages/global/PastePage.h + + # GUI - platform pages + ui/pages/modplatform/VanillaPage.cpp +@@ -842,7 +842,7 @@ qt5_wrap_ui(LAUNCHER_UI + ui/pages/global/AccountListPage.ui + ui/pages/global/JavaPage.ui + ui/pages/global/LauncherPage.ui +- ui/pages/global/PasteEEPage.ui ++ ui/pages/global/PastePage.ui + ui/pages/global/ProxyPage.ui + ui/pages/global/MinecraftPage.ui + ui/pages/global/ExternalToolsPage.ui +diff --git a/launcher/net/PasteUpload.cpp b/launcher/net/PasteUpload.cpp +index 4b69b68a..6c5aa221 100644 +--- a/launcher/net/PasteUpload.cpp ++++ b/launcher/net/PasteUpload.cpp +@@ -8,44 +8,34 @@ + #include + #include + +-PasteUpload::PasteUpload(QWidget *window, QString text, QString key) : m_window(window) ++PasteUpload::PasteUpload(QWidget *window, QString text, QString url) : m_window(window), m_uploadUrl(url), m_text(text.toUtf8()) + { +- m_key = key; +- QByteArray temp; +- QJsonObject topLevelObj; +- QJsonObject sectionObject; +- sectionObject.insert("contents", text); +- QJsonArray sectionArray; +- sectionArray.append(sectionObject); +- topLevelObj.insert("description", "Log Upload"); +- topLevelObj.insert("sections", sectionArray); +- QJsonDocument docOut; +- docOut.setObject(topLevelObj); +- m_jsonContent = docOut.toJson(); + } + + PasteUpload::~PasteUpload() + { + } + +-bool PasteUpload::validateText() +-{ +- return m_jsonContent.size() <= maxSize(); +-} +- + void PasteUpload::executeTask() + { +- QNetworkRequest request(QUrl("https://api.paste.ee/v1/pastes")); ++ QNetworkRequest request{QUrl(m_uploadUrl)}; + request.setHeader(QNetworkRequest::UserAgentHeader, BuildConfig.USER_AGENT_UNCACHED); + +- request.setRawHeader("Content-Type", "application/json"); +- request.setRawHeader("Content-Length", QByteArray::number(m_jsonContent.size())); +- request.setRawHeader("X-Auth-Token", m_key.toStdString().c_str()); ++ QHttpMultiPart *multiPart = new QHttpMultiPart{QHttpMultiPart::FormDataType}; + +- QNetworkReply *rep = APPLICATION->network()->post(request, m_jsonContent); ++ QHttpPart filePart; ++ filePart.setBody(m_text); ++ filePart.setHeader(QNetworkRequest::ContentTypeHeader, "text/plain"); ++ filePart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data; name=\"file\"; filename=\"log.txt\""); ++ ++ multiPart->append(filePart); ++ ++ QNetworkReply *rep = APPLICATION->network()->post(request, multiPart); ++ multiPart->setParent(rep); + + m_reply = std::shared_ptr(rep); +- setStatus(tr("Uploading to paste.ee")); ++ setStatus(tr("Uploading to %1").arg(m_uploadUrl)); ++ + connect(rep, &QNetworkReply::uploadProgress, this, &Task::setProgress); + connect(rep, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); + connect(rep, SIGNAL(finished()), this, SLOT(downloadFinished())); +@@ -61,45 +51,23 @@ void PasteUpload::downloadError(QNetworkReply::NetworkError error) + void PasteUpload::downloadFinished() + { + QByteArray data = m_reply->readAll(); +- // if the download succeeded +- if (m_reply->error() == QNetworkReply::NetworkError::NoError) ++ int statusCode = m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); ++ ++ if (m_reply->error() != QNetworkReply::NetworkError::NoError) + { +- m_reply.reset(); +- QJsonParseError jsonError; +- QJsonDocument doc = QJsonDocument::fromJson(data, &jsonError); +- if (jsonError.error != QJsonParseError::NoError) +- { +- emitFailed(jsonError.errorString()); +- return; +- } +- if (!parseResult(doc)) +- { +- emitFailed(tr("paste.ee returned an error. Please consult the logs for more information")); +- return; +- } +- } +- // else the download failed +- else +- { +- emitFailed(QString("Network error: %1").arg(m_reply->errorString())); ++ emitFailed(tr("Network error: %1").arg(m_reply->errorString())); + m_reply.reset(); + return; + } ++ else if (statusCode != 200) ++ { ++ QString reasonPhrase = m_reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString(); ++ emitFailed(tr("Error: %1 returned unexpected status code %2 %3").arg(m_uploadUrl).arg(statusCode).arg(reasonPhrase)); ++ qCritical() << m_uploadUrl << " returned unexpected status code " << statusCode << " with body: " << data; ++ m_reply.reset(); ++ return; ++ } ++ ++ m_pasteLink = QString::fromUtf8(data); + emitSucceeded(); + } +- +-bool PasteUpload::parseResult(QJsonDocument doc) +-{ +- auto object = doc.object(); +- auto status = object.value("success").toBool(); +- if (!status) +- { +- qCritical() << "paste.ee reported error:" << QString(object.value("error").toString()); +- return false; +- } +- m_pasteLink = object.value("link").toString(); +- m_pasteID = object.value("id").toString(); +- qDebug() << m_pasteLink; +- return true; +-} +- +diff --git a/launcher/net/PasteUpload.h b/launcher/net/PasteUpload.h +index 5514e058..62b2dc36 100644 +--- a/launcher/net/PasteUpload.h ++++ b/launcher/net/PasteUpload.h +@@ -8,37 +8,21 @@ class PasteUpload : public Task + { + Q_OBJECT + public: +- PasteUpload(QWidget *window, QString text, QString key = "public"); ++ PasteUpload(QWidget *window, QString text, QString url); + virtual ~PasteUpload(); + + QString pasteLink() + { + return m_pasteLink; + } +- QString pasteID() +- { +- return m_pasteID; +- } +- int maxSize() +- { +- // 2MB for paste.ee - public +- if(m_key == "public") +- return 1024*1024*2; +- // 12MB for paste.ee - with actual key +- return 1024*1024*12; +- } +- bool validateText(); + protected: + virtual void executeTask(); + + private: +- bool parseResult(QJsonDocument doc); +- QString m_error; + QWidget *m_window; +- QString m_pasteID; + QString m_pasteLink; +- QString m_key; +- QByteArray m_jsonContent; ++ QString m_uploadUrl; ++ QByteArray m_text; + std::shared_ptr m_reply; + public + slots: +diff --git a/launcher/news/NewsChecker.cpp b/launcher/news/NewsChecker.cpp +index 4f4359b8..6724950f 100644 +--- a/launcher/news/NewsChecker.cpp ++++ b/launcher/news/NewsChecker.cpp +@@ -70,7 +70,7 @@ void NewsChecker::rssDownloadFinished() + } + + // If the parsing succeeded, read it. +- QDomNodeList items = doc.elementsByTagName("item"); ++ QDomNodeList items = doc.elementsByTagName("entry"); + m_newsEntries.clear(); + for (int i = 0; i < items.length(); i++) + { +diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp +index 2e744007..5f7db4d7 100644 +--- a/launcher/translations/TranslationsModel.cpp ++++ b/launcher/translations/TranslationsModel.cpp +@@ -576,7 +576,7 @@ void TranslationsModel::downloadIndex() + d->m_index_job = new NetJob("Translations Index", APPLICATION->network()); + MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("translations", "index_v2.json"); + entry->setStale(true); +- d->m_index_task = Net::Download::makeCached(QUrl("https://files.multimc.org/translations/index_v2.json"), entry); ++ d->m_index_task = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATIONS_BASE_URL + "index_v2.json"), entry); + d->m_index_job->addNetAction(d->m_index_task); + connect(d->m_index_job.get(), &NetJob::failed, this, &TranslationsModel::indexFailed); + connect(d->m_index_job.get(), &NetJob::succeeded, this, &TranslationsModel::indexReceived); +diff --git a/launcher/ui/GuiUtil.cpp b/launcher/ui/GuiUtil.cpp +index efb1a4df..9eb658e2 100644 +--- a/launcher/ui/GuiUtil.cpp ++++ b/launcher/ui/GuiUtil.cpp +@@ -16,21 +16,8 @@ + QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget) + { + ProgressDialog dialog(parentWidget); +- auto APIKeySetting = APPLICATION->settings()->get("PasteEEAPIKey").toString(); +- if(APIKeySetting == "multimc") +- { +- APIKeySetting = BuildConfig.PASTE_EE_KEY; +- } +- std::unique_ptr paste(new PasteUpload(parentWidget, text, APIKeySetting)); +- +- if (!paste->validateText()) +- { +- CustomMessageBox::selectable( +- parentWidget, QObject::tr("Upload failed"), +- QObject::tr("The log file is too big. You'll have to upload it manually."), +- QMessageBox::Warning)->exec(); +- return QString(); +- } ++ auto pasteUrlSetting = APPLICATION->settings()->get("PastebinURL").toString(); ++ std::unique_ptr paste(new PasteUpload(parentWidget, text, pasteUrlSetting)); + + dialog.execWithTask(paste.get()); + if (!paste->wasSuccessful()) +diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp +index 3dcc8ee9..32b27afb 100644 +--- a/launcher/ui/MainWindow.cpp ++++ b/launcher/ui/MainWindow.cpp +@@ -1687,7 +1687,7 @@ void MainWindow::on_actionReportBug_triggered() + + void MainWindow::on_actionMoreNews_triggered() + { +- DesktopServices::openUrl(QUrl("https://multimc.org/posts.html")); ++ DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL)); + } + + void MainWindow::newsButtonClicked() +@@ -1699,7 +1699,7 @@ void MainWindow::newsButtonClicked() + } + else + { +- DesktopServices::openUrl(QUrl("https://multimc.org/posts.html")); ++ DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL)); + } + } + +diff --git a/launcher/ui/pages/global/PasteEEPage.cpp b/launcher/ui/pages/global/PastePage.cpp +similarity index 51% +rename from launcher/ui/pages/global/PasteEEPage.cpp +rename to launcher/ui/pages/global/PastePage.cpp +index 4b375d9a..7c69e1a4 100644 +--- a/launcher/ui/pages/global/PasteEEPage.cpp ++++ b/launcher/ui/pages/global/PastePage.cpp +@@ -1,4 +1,4 @@ +-/* Copyright 2013-2021 MultiMC Contributors ++/* Copyright 2013-2021 MultiMC & PolyMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. +@@ -13,69 +13,51 @@ + * limitations under the License. + */ + +-#include "PasteEEPage.h" +-#include "ui_PasteEEPage.h" ++#include "PastePage.h" ++#include "ui_PastePage.h" + + #include + #include + #include + #include ++#include + + #include "settings/SettingsObject.h" + #include "tools/BaseProfiler.h" + #include "Application.h" + +-PasteEEPage::PasteEEPage(QWidget *parent) : ++PastePage::PastePage(QWidget *parent) : + QWidget(parent), +- ui(new Ui::PasteEEPage) ++ ui(new Ui::PastePage) + { ++ static QRegularExpression validUrlRegExp("https?://.+"); + ui->setupUi(this); ++ ui->urlChoices->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->urlChoices)); + ui->tabWidget->tabBar()->hide();\ +- connect(ui->customAPIkeyEdit, &QLineEdit::textEdited, this, &PasteEEPage::textEdited); + loadSettings(); + } + +-PasteEEPage::~PasteEEPage() ++PastePage::~PastePage() + { + delete ui; + } + +-void PasteEEPage::loadSettings() ++void PastePage::loadSettings() + { + auto s = APPLICATION->settings(); +- QString keyToUse = s->get("PasteEEAPIKey").toString(); +- if(keyToUse == "multimc") +- { +- ui->multimcButton->setChecked(true); +- } +- else +- { +- ui->customButton->setChecked(true); +- ui->customAPIkeyEdit->setText(keyToUse); +- } ++ QString pastebinURL = s->get("PastebinURL").toString(); ++ ui->urlChoices->setCurrentText(pastebinURL); + } + +-void PasteEEPage::applySettings() ++void PastePage::applySettings() + { + auto s = APPLICATION->settings(); +- +- QString pasteKeyToUse; +- if (ui->customButton->isChecked()) +- pasteKeyToUse = ui->customAPIkeyEdit->text(); +- else +- { +- pasteKeyToUse = "multimc"; +- } +- s->set("PasteEEAPIKey", pasteKeyToUse); ++ QString pastebinURL = ui->urlChoices->currentText(); ++ s->set("PastebinURL", pastebinURL); + } + +-bool PasteEEPage::apply() ++bool PastePage::apply() + { + applySettings(); + return true; + } +- +-void PasteEEPage::textEdited(const QString& text) +-{ +- ui->customButton->setChecked(true); +-} +diff --git a/launcher/ui/pages/global/PasteEEPage.h b/launcher/ui/pages/global/PastePage.h +similarity index 84% +rename from launcher/ui/pages/global/PasteEEPage.h +rename to launcher/ui/pages/global/PastePage.h +index a1c7d434..d475dfd9 100644 +--- a/launcher/ui/pages/global/PasteEEPage.h ++++ b/launcher/ui/pages/global/PastePage.h +@@ -21,16 +21,16 @@ + #include + + namespace Ui { +-class PasteEEPage; ++class PastePage; + } + +-class PasteEEPage : public QWidget, public BasePage ++class PastePage : public QWidget, public BasePage + { + Q_OBJECT + + public: +- explicit PasteEEPage(QWidget *parent = 0); +- ~PasteEEPage(); ++ explicit PastePage(QWidget *parent = 0); ++ ~PastePage(); + + QString displayName() const override + { +@@ -54,9 +54,7 @@ private: + void loadSettings(); + void applySettings(); + +-private slots: +- void textEdited(const QString &text); +- + private: +- Ui::PasteEEPage *ui; ++ Ui::PastePage *ui; + }; ++ +diff --git a/launcher/ui/pages/global/PasteEEPage.ui b/launcher/ui/pages/global/PastePage.ui +similarity index 61% +rename from launcher/ui/pages/global/PasteEEPage.ui +rename to launcher/ui/pages/global/PastePage.ui +index 10883781..2d13a765 100644 +--- a/launcher/ui/pages/global/PasteEEPage.ui ++++ b/launcher/ui/pages/global/PastePage.ui +@@ -1,7 +1,7 @@ + + +- PasteEEPage +- ++ PastePage ++ + + + 0 +@@ -36,39 +36,9 @@ + + + +- paste.ee API key ++ Pastebin URL + +- +- +- +- +- MultiMC key - 12MB &upload limit +- +- +- pasteButtonGroup +- +- +- +- +- +- +- &Your own key - 12MB upload limit: +- +- +- pasteButtonGroup +- +- +- +- +- +- +- QLineEdit::Password +- +- +- Paste your API key here! +- +- +- ++ + + + +@@ -76,10 +46,45 @@ + + + ++ ++ ++ ++ ++ 10 ++ ++ ++ ++ <html><head/><body><p>Note: only input that starts with <span style=" font-weight:600;">http://</span> or <span style=" font-weight:600;">https://</span> will be accepted.</p></body></html> ++ ++ ++ false ++ ++ ++ ++ ++ ++ ++ true ++ ++ ++ QComboBox::NoInsert ++ ++ ++ ++ https://0x0.st ++ ++ ++ ++ ++ https://paste.polymc.org ++ ++ ++ ++ + + + +- <html><head/><body><p><a href="https://paste.ee">paste.ee</a> is used by MultiMC for log uploads. If you have a <a href="https://paste.ee">paste.ee</a> account, you can add your API key here and have your uploaded logs paired with your account.</p></body></html> ++ <html><head/><body><p>Here you can choose from a predefined list of paste services, or input the URL of a different paste service of your choice, provided it supports the same protocol as 0x0.st, that is POST a file parameter to the URL and return a link in the response body.</p></body></html> + + + Qt::RichText +@@ -116,13 +121,7 @@ + + + tabWidget +- multimcButton +- customButton +- customAPIkeyEdit + + + +- +- +- + +diff --git a/launcher/ui/pages/instance/LogPage.ui b/launcher/ui/pages/instance/LogPage.ui +index ccfc1551..31bb368c 100644 +--- a/launcher/ui/pages/instance/LogPage.ui ++++ b/launcher/ui/pages/instance/LogPage.ui +@@ -100,7 +100,7 @@ + + + +- Upload the log to paste.ee - it will stay online for a month ++ Upload the log to the paste service configured in preferences + + + Upload +diff --git a/launcher/ui/pages/instance/OtherLogsPage.ui b/launcher/ui/pages/instance/OtherLogsPage.ui +index 56ff3b62..77f3e647 100644 +--- a/launcher/ui/pages/instance/OtherLogsPage.ui ++++ b/launcher/ui/pages/instance/OtherLogsPage.ui +@@ -84,7 +84,7 @@ + + + +- Upload the log to paste.ee - it will stay online for a month ++ Upload the log to the paste service configured in preferences. + + + Upload +diff --git a/launcher/ui/widgets/LanguageSelectionWidget.cpp b/launcher/ui/widgets/LanguageSelectionWidget.cpp +index cf70c7b4..fc089f26 100644 +--- a/launcher/ui/widgets/LanguageSelectionWidget.cpp ++++ b/launcher/ui/widgets/LanguageSelectionWidget.cpp +@@ -5,6 +5,7 @@ + #include + #include + #include "Application.h" ++#include "BuildConfig.h" + #include "translations/TranslationsModel.h" + + LanguageSelectionWidget::LanguageSelectionWidget(QWidget *parent) : +@@ -48,7 +49,7 @@ QString LanguageSelectionWidget::getSelectedLanguageKey() const + void LanguageSelectionWidget::retranslate() + { + QString text = tr("Don't see your language or the quality is poor?
Help us with translations!") +- .arg("https://github.com/MultiMC/Launcher/wiki/Translating-MultiMC"); ++ .arg(BuildConfig.TRANSLATIONS_URL); + helpUsLabel->setText(text); + + } diff --git a/srcpkgs/PolyMC/template b/srcpkgs/PolyMC/template new file mode 100644 index 000000000000..f2047c50bd26 --- /dev/null +++ b/srcpkgs/PolyMC/template @@ -0,0 +1,37 @@ +# Template file for 'PolyMC' +pkgname=PolyMC +version=1.0.6 +revision=1 +_nbtversion="dc72a20b7efd304d12af2025223fad07b4b78464" +_quazipversion="c9ef32de19bceb58d236f5c22382698deaec69fd" +build_style=cmake +configure_args="-DLauncher_BUILD_PLATFORM=Void -DLauncher_LAYOUT=lin-system" +hostmakedepends="openjdk11 qt5-host-tools qt5-qmake" +makedepends="qt5-devel" +depends="virtual?java-runtime" +short_desc="Custom launcher for Minecraft" +maintainer="Philipp David " +license="Apache-2.0, GPL-3.0-or-later, LGPL-3.0-or-later, LGPL-2.1-or-later, + MIT, BSD-3-Clause, BSD-2-Clause" +homepage="https://polymc.org/" +distfiles="https://github.com/PolyMC/PolyMC/archive/${version}.tar.gz + https://github.com/MultiMC/libnbtplusplus/archive/${_nbtversion}.tar.gz + https://github.com/PolyMC/quazip/archive/${_quazipversion}.tar.gz" +checksum="78c7b24c6895a37f45f563b88cf0ad5cf26dd66264383ed77909e66065df9ea6 + 2ed9dc824007b4f7b12f807f56c98e1248b8a7aba7eca4838085092958dc1595 + 6c5e719833c143f300d7f6101b3c04dfb1bc025e3f672d803dcef0fbce29e254" + +case "$XBPS_TARGET_MACHINE" in + armv*) broken="https://github.com/MultiMC/MultiMC5/issues/2895";; +esac + +post_extract() { + rmdir libraries/libnbtplusplus + rmdir libraries/quazip + mv ../libnbtplusplus-${_nbtversion} libraries/libnbtplusplus + mv ../quazip-${_quazipversion} libraries/quazip +} + +post_install() { + vlicense COPYING.md +}