From 7da2fd5b8b23c34d1b7eed091c3e731a2001ba49 Mon Sep 17 00:00:00 2001 From: Matej Kafka <6414091+MatejKafka@users.noreply.github.com> Date: Sun, 25 Oct 2020 03:54:59 +0100 Subject: [PATCH 01/20] Update BUILD.md Extended description of Windows build process based on about 6 hours wasted on trial and error. --- BUILD.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/BUILD.md b/BUILD.md index 9f0061a0..c120ec51 100644 --- a/BUILD.md +++ b/BUILD.md @@ -92,14 +92,19 @@ Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt ## Dependencies * [Qt 5.6+ Development tools](http://qt-project.org/downloads) -- Qt Online Installer for Windows -* [OpenSSL](http://slproweb.com/products/Win32OpenSSL.html) -- Newest Win32 OpenSSL Light + - http://download.qt.io/new_archive/qt/5.6/5.6.0/qt-opensource-windows-x86-mingw492-5.6.0.exe + - Download the MinGW version (MSVC version does not work). +* [OpenSSL](https://indy.fulgan.com/SSL/Archive/) -- Win32 OpenSSL, version 1.0.2g (from 2016) + - https://indy.fulgan.com/SSL/Archive/openssl-1.0.2g-i386-win32.zip + - the usual OpenSSL for Windows (http://slproweb.com/products/Win32OpenSSL.html) only provides the newest version of OpenSSL, and we need the 1.0.2g version + - **Download the 32-bit version, not 64-bit.** - Microsoft Visual C++ 2008 Redist is required for this, there's a link on the OpenSSL download page above next to the main download. - We use a custom build of OpenSSL that doesn't have this dependency. For normal development, the custom build is not necessary though. * [zlib 1.2+](http://gnuwin32.sourceforge.net/packages/zlib.htm) - the Setup is fine * [Java JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) * [CMake](http://www.cmake.org/cmake/resources/software.html) -- Windows (Win32 Installer) - Put it somewhere on the `PATH`, so that it is accessible from the console. +Ensure that OpenSSL, zlib, Java and CMake are on `PATH`. ## Getting set up @@ -115,9 +120,8 @@ Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt - Installation can take a very long time, go grab a cup of tea or something and let it work. ### Installing OpenSSL -1. Run the OpenSSL installer, -2. It's best to choose the option to copy OpenSSL DLLs to the `/bin` directory - - If you do this you'll need to add that directory (the default being `C:\OpenSSL-Win32\bin`) to your PATH system variable (Google how to do this, or use this guide for Java: http://www.java.com/en/download/help/path.xml). +1. Download .zip file from the link above. +2. Unzip and add the directory to PATH, so CMake can find it. ### Installing CMake 1. Run the CMake installer, @@ -140,6 +144,24 @@ Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt - If the project builds successfully it will run and the MultiMC5 window will pop up, - Test OpenSSL by making an instance and trying to log in. If Qt Creator couldn't find OpenSSL during the CMake stage, login will fail and you'll get an error. +The following .dlls are needed for the app to run (copy them to build directory if you want to be able to move the build to another pc): +``` +platforms/qwindows.dll +libeay32.dll +libgcc_s_dw2-1.dll +libssp-0.dll +libstdc++-6.dll +libwinpthread-1.dll +Qt5Core.dll +Qt5Gui.dll +Qt5Network.dll +Qt5Svg.dll +Qt5Widgets.dll +Qt5Xml.dll +ssleay32.dll +zlib1.dll +``` + **These build instructions worked for me (Drayshak) on a fresh Windows 8 x64 Professional install. If they don't work for you, let us know on IRC ([Esper/#MultiMC](http://webchat.esper.net/?nick=&channels=MultiMC))!** ### Compile from command line on Windows 1. If you installed Qt with the web installer, there should be a shortcut called `Qt 5.4 for Desktop (MinGW 4.9 32-bit)` in the Start menu on Windows 7 and 10. Best way to find it is to search for it. Do note you cannot just use cmd.exe, you have to use the shortcut, otherwise the proper MinGW software will not be on the PATH. From 49126fa8e2769bd86ebea316c88f34ffefa1ce59 Mon Sep 17 00:00:00 2001 From: Moresteck Date: Thu, 12 Nov 2020 14:58:12 +0000 Subject: [PATCH 02/20] NOISSUE Corrected the fix for Classic saving, fixes Indev compatibility --- libraries/launcher/net/minecraft/Launcher.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/launcher/net/minecraft/Launcher.java b/libraries/launcher/net/minecraft/Launcher.java index 29ddbd3e..45f06a66 100644 --- a/libraries/launcher/net/minecraft/Launcher.java +++ b/libraries/launcher/net/minecraft/Launcher.java @@ -143,7 +143,11 @@ public class Launcher extends Applet implements AppletStub public URL getDocumentBase() { try { - return new URL("http", "www.minecraft.net", 80, "/game/", null); + // Special case only for Classic versions + if (wrappedApplet.getClass().getCanonicalName().startsWith("com.mojang")) { + return new URL("http", "www.minecraft.net", 80, "/game/", null); + } + return new URL("http://www.minecraft.net/game/"); } catch (MalformedURLException e) { e.printStackTrace(); } From 88d6b6ea3fb8b6f3711d4d829f78c367e497945a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 24 Nov 2020 22:31:19 +0100 Subject: [PATCH 03/20] GH-3427 add low effort datapack button to worlds --- application/pages/instance/WorldListPage.cpp | 18 ++++++++++++++++++ application/pages/instance/WorldListPage.h | 1 + application/pages/instance/WorldListPage.ui | 9 +++++++++ 3 files changed, 28 insertions(+) diff --git a/application/pages/instance/WorldListPage.cpp b/application/pages/instance/WorldListPage.cpp index 75741d22..4d737025 100644 --- a/application/pages/instance/WorldListPage.cpp +++ b/application/pages/instance/WorldListPage.cpp @@ -170,6 +170,24 @@ void WorldListPage::on_actionView_Folder_triggered() DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true); } +void WorldListPage::on_actionDatapacks_triggered() +{ + QModelIndex index = getSelectedWorld(); + + if (!index.isValid()) + { + return; + } + + if(!worldSafetyNagQuestion()) + return; + + auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString(); + + DesktopServices::openDirectory(FS::PathCombine(fullPath, "datapacks"), true); +} + + void WorldListPage::on_actionReset_Icon_triggered() { auto proxiedIndex = getSelectedWorld(); diff --git a/application/pages/instance/WorldListPage.h b/application/pages/instance/WorldListPage.h index 8ff14819..d19f4937 100644 --- a/application/pages/instance/WorldListPage.h +++ b/application/pages/instance/WorldListPage.h @@ -90,6 +90,7 @@ private slots: void on_actionRename_triggered(); void on_actionRefresh_triggered(); void on_actionView_Folder_triggered(); + void on_actionDatapacks_triggered(); void on_actionReset_Icon_triggered(); void worldChanged(const QModelIndex ¤t, const QModelIndex &previous); void mceditState(LoggedProcess::State state); diff --git a/application/pages/instance/WorldListPage.ui b/application/pages/instance/WorldListPage.ui index 8d00f8f4..ed078d94 100644 --- a/application/pages/instance/WorldListPage.ui +++ b/application/pages/instance/WorldListPage.ui @@ -85,6 +85,7 @@ + @@ -139,6 +140,14 @@ Remove world icon to make the game re-generate it on next load. + + + Datapacks + + + Manage datapacks inside the world. + + From 58c2228247c633805cdbe02ff97eb8cb6f3b3af7 Mon Sep 17 00:00:00 2001 From: kb1000 Date: Thu, 26 Nov 2020 22:02:26 +0100 Subject: [PATCH 04/20] NOISSUE Add an RPM package for MultiMC The RPM package reuses the files from the Ubuntu package. --- application/package/rpm/MultiMC5.spec | 40 +++++++++++++++++++ application/package/rpm/README.md | 12 ++++++ .../package/ubuntu/{readme.md => README.md} | 4 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 application/package/rpm/MultiMC5.spec create mode 100644 application/package/rpm/README.md rename application/package/ubuntu/{readme.md => README.md} (50%) diff --git a/application/package/rpm/MultiMC5.spec b/application/package/rpm/MultiMC5.spec new file mode 100644 index 00000000..9dcc01b4 --- /dev/null +++ b/application/package/rpm/MultiMC5.spec @@ -0,0 +1,40 @@ +Name: MultiMC5 +Version: 1.4 +Release: 1%{?dist} +Summary: A local install wrapper for MultiMC + +License: ASL 2.0 +URL: https://multimc.org +BuildArch: x86_64 + +Requires: zenity qt5-qtbase wget +Provides: multimc MultiMC multimc5 + +%description +A local install wrapper for MultiMC + +%prep + + +%build + + +%install +mkdir -p %{buildroot}/opt/multimc +install -m 0644 ../ubuntu/multimc/opt/multimc/icon.svg %{buildroot}/opt/multimc/icon.svg +install -m 0755 ../ubuntu/multimc/opt/multimc/run.sh %{buildroot}/opt/multimc/run.sh +mkdir -p %{buildroot}/%{_datadir}/applications +install -m 0644 ../ubuntu/multimc/usr/share/applications/multimc.desktop %{buildroot}/%{_datadir}/applications/multimc.desktop + + +%files +%dir /opt/multimc +/opt/multimc/icon.svg +/opt/multimc/run.sh +%{_datadir}/applications/multimc.desktop + + + +%changelog +* Wed Nov 25 22:53:59 CET 2020 kb1000 +- Initial version of the RPM package, based on the Ubuntu package diff --git a/application/package/rpm/README.md b/application/package/rpm/README.md new file mode 100644 index 00000000..98b6d5cb --- /dev/null +++ b/application/package/rpm/README.md @@ -0,0 +1,12 @@ +# What is this? +A simple RPM package for MultiMC that contains a script that downloads and installs real MultiMC on Red Hat based systems. + +It contains a `.desktop` file, an icon, and a simple script that does the heavy lifting. + +# How to build this? +You need the `rpm-build` package. Switch into this directory, then run: +``` +rpmbuild --build-in-place -bb MultiMC5.spec +``` + +Replace the version with whatever is appropriate. diff --git a/application/package/ubuntu/readme.md b/application/package/ubuntu/README.md similarity index 50% rename from application/package/ubuntu/readme.md rename to application/package/ubuntu/README.md index 5b0d6b27..5c0f4eeb 100644 --- a/application/package/ubuntu/readme.md +++ b/application/package/ubuntu/README.md @@ -1,8 +1,10 @@ # What is this? -A simple ubuntu package for MultiMC that wraps the contains a script that downloads and installs real MultiMC on ubuntu based systems. +A simple Ubuntu package for MultiMC that contains a script that downloads and installs real MultiMC on Ubuntu based systems. It contains a `.desktop` file, an icon, and a simple script that does the heavy lifting. +This is also the source for the files in the [RPM package](../rpm). If you rename, create or delete files here, you'll likely also have to update the RPM spec file there. + # How to build this? You need dpkg utils. Rename the `multimc` folder to `multimc_1.3-1` and then run: ``` From 6249a54ba2940a2836b2fc5e794d56016a4f2c40 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 28 Nov 2020 22:06:35 +0000 Subject: [PATCH 05/20] NOISSUE Use new modpacks.ch route for listing packs --- application/pages/modplatform/ftb/FtbModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/pages/modplatform/ftb/FtbModel.cpp b/application/pages/modplatform/ftb/FtbModel.cpp index ecdcb00b..caf94041 100644 --- a/application/pages/modplatform/ftb/FtbModel.cpp +++ b/application/pages/modplatform/ftb/FtbModel.cpp @@ -79,7 +79,7 @@ void ListModel::performSearch() auto *netJob = new NetJob("Ftb::Search"); QString searchUrl; if(currentSearchTerm.isEmpty()) { - searchUrl = BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/popular/plays/100"; + searchUrl = BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/all"; } else { searchUrl = QString(BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/search/25?term=%1") From 7321a4fd3d3e19bf4c1b296849a7c876b1f686f0 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 28 Nov 2020 22:13:53 +0000 Subject: [PATCH 06/20] NOISSUE Ignore 'dud' FTB packs There is no guarantee from modpacks.ch that modpacks contain any versions, which is currently an issue with pack 63 (Direwolf20 1.5). --- application/pages/modplatform/ftb/FtbModel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/pages/modplatform/ftb/FtbModel.cpp b/application/pages/modplatform/ftb/FtbModel.cpp index ecdcb00b..2c646495 100644 --- a/application/pages/modplatform/ftb/FtbModel.cpp +++ b/application/pages/modplatform/ftb/FtbModel.cpp @@ -206,6 +206,14 @@ void ListModel::packRequestFinished() return; } + // Since there is no guarantee that packs have a version, this will just + // ignore those "dud" packs. + if (pack.versions.empty()) + { + qWarning() << "FTB Pack " << pack.id << " ignored. reason: lacking any versions"; + return; + } + beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size()); modpacks.append(pack); endInsertRows(); From b8c6a42f498823151a61b5d56c8cc587fd88c728 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 14 Nov 2020 18:06:27 +0000 Subject: [PATCH 07/20] NOISSUE Add sorting options to FTB pack install page --- .../modpacksch/FTBPackInstallTask.cpp | 2 +- application/CMakeLists.txt | 6 +- .../pages/modplatform/ftb/FtbFilterModel.cpp | 64 +++++++++++++++++++ .../pages/modplatform/ftb/FtbFilterModel.h | 33 ++++++++++ .../ftb/{FtbModel.cpp => FtbListModel.cpp} | 2 +- .../ftb/{FtbModel.h => FtbListModel.h} | 0 application/pages/modplatform/ftb/FtbPage.cpp | 36 ++++++++--- application/pages/modplatform/ftb/FtbPage.h | 7 +- application/pages/modplatform/ftb/FtbPage.ui | 41 ++++++------ 9 files changed, 158 insertions(+), 33 deletions(-) create mode 100644 application/pages/modplatform/ftb/FtbFilterModel.cpp create mode 100644 application/pages/modplatform/ftb/FtbFilterModel.h rename application/pages/modplatform/ftb/{FtbModel.cpp => FtbListModel.cpp} (99%) rename application/pages/modplatform/ftb/{FtbModel.h => FtbListModel.h} (100%) diff --git a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp index 912beb67..b532af7f 100644 --- a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp +++ b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp @@ -117,7 +117,7 @@ void PackInstallTask::install() if(file.serverOnly) continue; auto relpath = FS::PathCombine("minecraft", file.path, file.name); - auto path = FS::PathCombine(m_stagingPath , relpath); + auto path = FS::PathCombine(m_stagingPath, relpath); qDebug() << "Will download" << file.url << "to" << path; auto dl = Net::Download::makeFile(file.url, path); diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 38bd586b..1a3bd1c3 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -124,8 +124,10 @@ SET(MULTIMC_SOURCES # GUI - platform pages pages/modplatform/VanillaPage.cpp pages/modplatform/VanillaPage.h - pages/modplatform/ftb/FtbModel.cpp - pages/modplatform/ftb/FtbModel.h + pages/modplatform/ftb/FtbFilterModel.cpp + pages/modplatform/ftb/FtbFilterModel.h + pages/modplatform/ftb/FtbListModel.cpp + pages/modplatform/ftb/FtbListModel.h pages/modplatform/ftb/FtbPage.cpp pages/modplatform/ftb/FtbPage.h pages/modplatform/legacy_ftb/Page.cpp diff --git a/application/pages/modplatform/ftb/FtbFilterModel.cpp b/application/pages/modplatform/ftb/FtbFilterModel.cpp new file mode 100644 index 00000000..dec3a017 --- /dev/null +++ b/application/pages/modplatform/ftb/FtbFilterModel.cpp @@ -0,0 +1,64 @@ +#include "FtbFilterModel.h" + +#include + +#include "modplatform/modpacksch/FTBPackManifest.h" +#include + +namespace Ftb { + +FilterModel::FilterModel(QObject *parent) : QSortFilterProxyModel(parent) +{ + currentSorting = Sorting::ByPlays; + sortings.insert(tr("Sort by plays"), Sorting::ByPlays); + sortings.insert(tr("Sort by installs"), Sorting::ByInstalls); + sortings.insert(tr("Sort by name"), Sorting::ByName); +} + +const QMap FilterModel::getAvailableSortings() +{ + return sortings; +} + +QString FilterModel::translateCurrentSorting() +{ + return sortings.key(currentSorting); +} + +void FilterModel::setSorting(Sorting sorting) +{ + currentSorting = sorting; + invalidate(); +} + +FilterModel::Sorting FilterModel::getCurrentSorting() +{ + return currentSorting; +} + +bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + return true; +} + +bool FilterModel::lessThan(const QModelIndex &left, const QModelIndex &right) const +{ + ModpacksCH::Modpack leftPack = sourceModel()->data(left, Qt::UserRole).value(); + ModpacksCH::Modpack rightPack = sourceModel()->data(right, Qt::UserRole).value(); + + if (currentSorting == ByPlays) { + return leftPack.plays < rightPack.plays; + } + else if (currentSorting == ByInstalls) { + return leftPack.installs < rightPack.installs; + } + else if (currentSorting == ByName) { + return Strings::naturalCompare(leftPack.name, rightPack.name, Qt::CaseSensitive) >= 0; + } + + // Invalid sorting set, somehow... + qWarning() << "Invalid sorting set!"; + return true; +} + +} diff --git a/application/pages/modplatform/ftb/FtbFilterModel.h b/application/pages/modplatform/ftb/FtbFilterModel.h new file mode 100644 index 00000000..4fe2a274 --- /dev/null +++ b/application/pages/modplatform/ftb/FtbFilterModel.h @@ -0,0 +1,33 @@ +#pragma once + +#include + +namespace Ftb { + +class FilterModel : public QSortFilterProxyModel +{ + Q_OBJECT + +public: + FilterModel(QObject* parent = Q_NULLPTR); + enum Sorting { + ByPlays, + ByInstalls, + ByName, + }; + const QMap getAvailableSortings(); + QString translateCurrentSorting(); + void setSorting(Sorting sorting); + Sorting getCurrentSorting(); + +protected: + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; + +private: + QMap sortings; + Sorting currentSorting; + +}; + +} diff --git a/application/pages/modplatform/ftb/FtbModel.cpp b/application/pages/modplatform/ftb/FtbListModel.cpp similarity index 99% rename from application/pages/modplatform/ftb/FtbModel.cpp rename to application/pages/modplatform/ftb/FtbListModel.cpp index 972c5040..e53f1134 100644 --- a/application/pages/modplatform/ftb/FtbModel.cpp +++ b/application/pages/modplatform/ftb/FtbListModel.cpp @@ -1,4 +1,4 @@ -#include "FtbModel.h" +#include "FtbListModel.h" #include "BuildConfig.h" #include "Env.h" diff --git a/application/pages/modplatform/ftb/FtbModel.h b/application/pages/modplatform/ftb/FtbListModel.h similarity index 100% rename from application/pages/modplatform/ftb/FtbModel.h rename to application/pages/modplatform/ftb/FtbListModel.h diff --git a/application/pages/modplatform/ftb/FtbPage.cpp b/application/pages/modplatform/ftb/FtbPage.cpp index c82508b3..60294de0 100644 --- a/application/pages/modplatform/ftb/FtbPage.cpp +++ b/application/pages/modplatform/ftb/FtbPage.cpp @@ -10,12 +10,26 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::FtbPage), dialog(dialog) { ui->setupUi(this); - connect(ui->searchButton, &QPushButton::clicked, this, &FtbPage::triggerSearch); - ui->searchEdit->installEventFilter(this); - model = new Ftb::ListModel(this); - ui->packView->setModel(model); - connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged); + filterModel = new Ftb::FilterModel(this); + listModel = new Ftb::ListModel(this); + filterModel->setSourceModel(listModel); + ui->packView->setModel(filterModel); + ui->packView->setSortingEnabled(true); + ui->packView->header()->hide(); + ui->packView->setIndentation(0); + + ui->searchEdit->installEventFilter(this); + + for(int i = 0; i < filterModel->getAvailableSortings().size(); i++) + { + ui->sortByBox->addItem(filterModel->getAvailableSortings().keys().at(i)); + } + ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); + + connect(ui->searchButton, &QPushButton::clicked, this, &FtbPage::triggerSearch); + connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &FtbPage::onSortingSelectionChanged); + connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FtbPage::onVersionSelectionChanged); } @@ -59,7 +73,7 @@ void FtbPage::suggestCurrent() QString editedLogoName; editedLogoName = selected.name; - model->getLogo(selected.name, art.url, [this, editedLogoName](QString logo) + listModel->getLogo(selected.name, art.url, [this, editedLogoName](QString logo) { dialog->setSuggestedIconFromFile(logo + ".small", editedLogoName); }); @@ -70,7 +84,13 @@ void FtbPage::suggestCurrent() void FtbPage::triggerSearch() { - model->searchWithTerm(ui->searchEdit->text()); + listModel->searchWithTerm(ui->searchEdit->text()); +} + +void FtbPage::onSortingSelectionChanged(QString data) +{ + auto toSet = filterModel->getAvailableSortings().value(data); + filterModel->setSorting(toSet); } void FtbPage::onSelectionChanged(QModelIndex first, QModelIndex second) @@ -86,7 +106,7 @@ void FtbPage::onSelectionChanged(QModelIndex first, QModelIndex second) return; } - selected = model->data(first, Qt::UserRole).value(); + selected = filterModel->data(first, Qt::UserRole).value(); // reverse foreach, so that the newest versions are first for (auto i = selected.versions.size(); i--;) { diff --git a/application/pages/modplatform/ftb/FtbPage.h b/application/pages/modplatform/ftb/FtbPage.h index 80f152c6..b31e1c9e 100644 --- a/application/pages/modplatform/ftb/FtbPage.h +++ b/application/pages/modplatform/ftb/FtbPage.h @@ -15,7 +15,8 @@ #pragma once -#include "FtbModel.h" +#include "FtbFilterModel.h" +#include "FtbListModel.h" #include @@ -64,13 +65,15 @@ private: private slots: void triggerSearch(); + void onSortingSelectionChanged(QString data); void onSelectionChanged(QModelIndex first, QModelIndex second); void onVersionSelectionChanged(QString data); private: Ui::FtbPage *ui = nullptr; NewInstanceDialog* dialog = nullptr; - Ftb::ListModel* model = nullptr; + Ftb::ListModel* listModel = nullptr; + Ftb::FilterModel* filterModel = nullptr; ModpacksCH::Modpack selected; QString selectedVersion; diff --git a/application/pages/modplatform/ftb/FtbPage.ui b/application/pages/modplatform/ftb/FtbPage.ui index 772b0276..3a2203db 100644 --- a/application/pages/modplatform/ftb/FtbPage.ui +++ b/application/pages/modplatform/ftb/FtbPage.ui @@ -11,22 +11,6 @@ - - - - true - - - - 48 - 48 - - - - true - - - @@ -38,19 +22,38 @@ - - + + - + Version selected: + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + true + + + + 48 + 48 + + + + From 5eace10d51d862efa944418c4473fb053b5b04b4 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 29 Nov 2020 13:58:20 +0000 Subject: [PATCH 08/20] NOISSUE Continue requesting packs after ignoring one This was a mishap on my part, fortunately quickly exposed as the combination of GH-3463 and GH-3464 made no packs visible. --- application/pages/modplatform/ftb/FtbListModel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/pages/modplatform/ftb/FtbListModel.cpp b/application/pages/modplatform/ftb/FtbListModel.cpp index e53f1134..63236827 100644 --- a/application/pages/modplatform/ftb/FtbListModel.cpp +++ b/application/pages/modplatform/ftb/FtbListModel.cpp @@ -211,12 +211,13 @@ void ListModel::packRequestFinished() if (pack.versions.empty()) { qWarning() << "FTB Pack " << pack.id << " ignored. reason: lacking any versions"; - return; } - - beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size()); - modpacks.append(pack); - endInsertRows(); + else + { + beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size()); + modpacks.append(pack); + endInsertRows(); + } if(!remainingPacks.isEmpty()) { currentPack = remainingPacks.at(0); From f4d58e17eeb5bd608766acfebe425925d40d5825 Mon Sep 17 00:00:00 2001 From: kb1000 Date: Mon, 2 Nov 2020 22:28:07 +0100 Subject: [PATCH 09/20] NOISSUE Add pack author and description to technic modpack import page --- .../pages/modplatform/technic/TechnicData.h | 3 ++ .../pages/modplatform/technic/TechnicPage.cpp | 24 +++++++-------- .../pages/modplatform/technic/TechnicPage.ui | 29 +++++++++++++++++++ application/widgets/MCModInfoFrame.cpp | 1 + 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/application/pages/modplatform/technic/TechnicData.h b/application/pages/modplatform/technic/TechnicData.h index e23cb7f6..c7ddd9ce 100644 --- a/application/pages/modplatform/technic/TechnicData.h +++ b/application/pages/modplatform/technic/TechnicData.h @@ -33,6 +33,9 @@ struct Modpack { QString minecraftVersion; bool metadataLoaded = false; + QString websiteUrl; + QString author; + QString description; }; } diff --git a/application/pages/modplatform/technic/TechnicPage.cpp b/application/pages/modplatform/technic/TechnicPage.cpp index 584e9c27..f6facd57 100644 --- a/application/pages/modplatform/technic/TechnicPage.cpp +++ b/application/pages/modplatform/technic/TechnicPage.cpp @@ -158,6 +158,9 @@ void TechnicPage::suggestCurrent() } current.minecraftVersion = Json::ensureString(obj, "minecraft", QString(), "__placeholder__"); + current.websiteUrl = Json::ensureString(obj, "platformUrl", QString(), "__placeholder__"); + current.author = Json::ensureString(obj, "user", QString(), "__placeholder__"); + current.description = Json::ensureString(obj, "description", QString(), "__placeholder__"); current.metadataLoaded = true; metadataLoaded(); }); @@ -168,29 +171,22 @@ void TechnicPage::suggestCurrent() // expects current.metadataLoaded to be true void TechnicPage::metadataLoaded() { - /*QString text = ""; + QString text = ""; QString name = current.name; if (current.websiteUrl.isEmpty()) + // This allows injecting HTML here. text = name; else + // URL not properly escaped for inclusion in HTML. The name allows for injecting HTML. text = "" + name + ""; - if (!current.authors.empty()) { - auto authorToStr = [](Technic::ModpackAuthor & author) { - if(author.url.isEmpty()) { - return author.name; - } - return QString("%2").arg(author.url, author.name); - }; - QStringList authorStrs; - for(auto & author: current.authors) { - authorStrs.push_back(authorToStr(author)); - } - text += tr(" by ") + authorStrs.join(", "); + if (!current.author.isEmpty()) { + // This allows injecting HTML here + text += tr(" by ") + current.author; } ui->frame->setModText(text); - ui->frame->setModDescription(current.description);*/ + ui->frame->setModDescription(current.description); if (!current.isSolder) { dialog->setSuggestedPack(current.name, new Technic::SingleZipPackInstallTask(current.url, current.minecraftVersion)); diff --git a/application/pages/modplatform/technic/TechnicPage.ui b/application/pages/modplatform/technic/TechnicPage.ui index be56fa82..36ce2ecf 100644 --- a/application/pages/modplatform/technic/TechnicPage.ui +++ b/application/pages/modplatform/technic/TechnicPage.ui @@ -55,8 +55,37 @@ + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + MCModInfoFrame + QFrame +
widgets/MCModInfoFrame.h
+ 1 +
+
+ + searchEdit + searchButton + packView + diff --git a/application/widgets/MCModInfoFrame.cpp b/application/widgets/MCModInfoFrame.cpp index 577b32a7..89bb90fd 100644 --- a/application/widgets/MCModInfoFrame.cpp +++ b/application/widgets/MCModInfoFrame.cpp @@ -135,6 +135,7 @@ void MCModInfoFrame::setModDescription(QString text) ui->label_ModDescription->setOpenExternalLinks(false); ui->label_ModDescription->setTextFormat(Qt::TextFormat::RichText); desc = text; + // This allows injecting HTML here. labeltext.append("" + finaltext.left(287) + "..."); QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler); } From c1161e237743e343327563154444c2ae1e766795 Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 00:30:29 -0500 Subject: [PATCH 10/20] Add metainfo.xml for improving package metadata --- .../package/linux/multimc.metainfo.xml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 application/package/linux/multimc.metainfo.xml diff --git a/application/package/linux/multimc.metainfo.xml b/application/package/linux/multimc.metainfo.xml new file mode 100644 index 00000000..dd1764a3 --- /dev/null +++ b/application/package/linux/multimc.metainfo.xml @@ -0,0 +1,54 @@ + + + multimc + multimc.desktop + MultiMC + Manage Minecraft instances with ease + +

Overview

+

MultiMC is a free, open source launcher for Minecraft. It allows you to have multiple, cleanly separated instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple and powerful interface.

+

Features

+
    +
  • Manage multiple instances of Minecraft at once
  • +
  • Start Minecraft with a custom resolution
  • +
  • Change Java's runtime options (including memory options)
  • +
  • Shows Minecraft's console output in a colour coded window
  • +
  • Kill Minecraft easily if it crashes / freezes
  • +
  • Custom icons and groups for instances
  • +
  • Forge integration (automatic installation, version downloads, mod management)
  • +
  • Minecraft world management
  • +
  • Import and export Minecraft instances to share them with anyone
  • +
  • Supports every version of Minecraft that the vanilla launcher does
  • +
+

NOTE: This distribution is not verified by, affiliated with, or supported by the MultiMC team.

+
+ + + https://multimc.org/images/screenshots/main.png + https://multimc.org/images/screenshots/editmods.png + https://multimc.org/images/screenshots/version.png + https://multimc.org/images/screenshots/console.png + https://multimc.org/images/screenshots/settings.png + + + + + + https://multimc.org/ + https://discord.com/invite/0k2zsXGNHs0fE4Wm + https://github.com/MultiMC/MultiMC5/wiki/FAQ + https://github.com/flathub/multimc/issues + https://translate.multimc.org/ + https://www.patreon.com/multimc + The MultiMC Team + CC0-1.0 + Apache-2.0 + + mild + mild + mild + mild + mild + + joshua.gage.stone_at_gmail.com +
From 399109728fa5115a682f92edff9f98c65e00301d Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 00:38:43 -0500 Subject: [PATCH 11/20] Update RPM .spec to include metainfo file --- application/package/rpm/MultiMC5.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/package/rpm/MultiMC5.spec b/application/package/rpm/MultiMC5.spec index 9dcc01b4..68aad774 100644 --- a/application/package/rpm/MultiMC5.spec +++ b/application/package/rpm/MultiMC5.spec @@ -25,16 +25,21 @@ install -m 0644 ../ubuntu/multimc/opt/multimc/icon.svg %{buildroot}/opt/multimc/ install -m 0755 ../ubuntu/multimc/opt/multimc/run.sh %{buildroot}/opt/multimc/run.sh mkdir -p %{buildroot}/%{_datadir}/applications install -m 0644 ../ubuntu/multimc/usr/share/applications/multimc.desktop %{buildroot}/%{_datadir}/applications/multimc.desktop - +mkdir -p %{buildroot}/%{_datadir}/metainfo +install -m 0644 ../linux/multimc.metainfo.xml %{buildroot}/%{_datadir}/metainfo/multimc.metainfo.xml %files %dir /opt/multimc /opt/multimc/icon.svg /opt/multimc/run.sh %{_datadir}/applications/multimc.desktop - +%{_datadir}/metainfo/multimc.metainfo.xml %changelog + +* Tue Dec 08 00:34:35 CET 2020 joshua-stone +- Add metainfo.xml for improving package metadata + * Wed Nov 25 22:53:59 CET 2020 kb1000 - Initial version of the RPM package, based on the Ubuntu package From 65990a1bf1a904f0433d9af2d26c19ced5993a2f Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 00:42:16 -0500 Subject: [PATCH 12/20] Remove disclaimer --- application/package/linux/multimc.metainfo.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/application/package/linux/multimc.metainfo.xml b/application/package/linux/multimc.metainfo.xml index dd1764a3..3e075267 100644 --- a/application/package/linux/multimc.metainfo.xml +++ b/application/package/linux/multimc.metainfo.xml @@ -20,7 +20,6 @@
  • Import and export Minecraft instances to share them with anyone
  • Supports every version of Minecraft that the vanilla launcher does
  • -

    NOTE: This distribution is not verified by, affiliated with, or supported by the MultiMC team.

    From d55030367eb0f592f83b54011157ed77bf7439fa Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 00:55:50 -0500 Subject: [PATCH 13/20] Use metainfodir macro directly --- application/package/rpm/MultiMC5.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/package/rpm/MultiMC5.spec b/application/package/rpm/MultiMC5.spec index 68aad774..79f416b9 100644 --- a/application/package/rpm/MultiMC5.spec +++ b/application/package/rpm/MultiMC5.spec @@ -25,15 +25,15 @@ install -m 0644 ../ubuntu/multimc/opt/multimc/icon.svg %{buildroot}/opt/multimc/ install -m 0755 ../ubuntu/multimc/opt/multimc/run.sh %{buildroot}/opt/multimc/run.sh mkdir -p %{buildroot}/%{_datadir}/applications install -m 0644 ../ubuntu/multimc/usr/share/applications/multimc.desktop %{buildroot}/%{_datadir}/applications/multimc.desktop -mkdir -p %{buildroot}/%{_datadir}/metainfo -install -m 0644 ../linux/multimc.metainfo.xml %{buildroot}/%{_datadir}/metainfo/multimc.metainfo.xml +mkdir -p %{buildroot}/%{_metainfodir} +install -m 0644 ../linux/multimc.metainfo.xml %{buildroot}/%{_metainfodir}/multimc.metainfo.xml %files %dir /opt/multimc /opt/multimc/icon.svg /opt/multimc/run.sh %{_datadir}/applications/multimc.desktop -%{_datadir}/metainfo/multimc.metainfo.xml +%{_metainfodir}/multimc.metainfo.xml %changelog From a9a78c74db0fef256f8e02d8cfefdec22d089f26 Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 01:13:11 -0500 Subject: [PATCH 14/20] Fix contact email --- application/package/linux/multimc.metainfo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/package/linux/multimc.metainfo.xml b/application/package/linux/multimc.metainfo.xml index 3e075267..15f7fd1d 100644 --- a/application/package/linux/multimc.metainfo.xml +++ b/application/package/linux/multimc.metainfo.xml @@ -49,5 +49,5 @@ mild mild - joshua.gage.stone_at_gmail.com + peterix_at_gmail.com From 42d124ed2b135b439b1215acc101d3eee2fbecdc Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 13:23:52 -0500 Subject: [PATCH 15/20] Move metainfo to ubuntu oflder so it can be used in both .rpm and .deb builds --- application/package/rpm/MultiMC5.spec | 2 +- .../multimc/usr/share/metainfo}/multimc.metainfo.xml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename application/package/{linux => ubuntu/multimc/usr/share/metainfo}/multimc.metainfo.xml (100%) diff --git a/application/package/rpm/MultiMC5.spec b/application/package/rpm/MultiMC5.spec index 79f416b9..5b72c781 100644 --- a/application/package/rpm/MultiMC5.spec +++ b/application/package/rpm/MultiMC5.spec @@ -26,7 +26,7 @@ install -m 0755 ../ubuntu/multimc/opt/multimc/run.sh %{buildroot}/opt/multimc/ru mkdir -p %{buildroot}/%{_datadir}/applications install -m 0644 ../ubuntu/multimc/usr/share/applications/multimc.desktop %{buildroot}/%{_datadir}/applications/multimc.desktop mkdir -p %{buildroot}/%{_metainfodir} -install -m 0644 ../linux/multimc.metainfo.xml %{buildroot}/%{_metainfodir}/multimc.metainfo.xml +install -m 0644 ../ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml %{buildroot}/%{_metainfodir}/multimc.metainfo.xml %files %dir /opt/multimc diff --git a/application/package/linux/multimc.metainfo.xml b/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml similarity index 100% rename from application/package/linux/multimc.metainfo.xml rename to application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml From e9b779aa77a28f723735a91398db1a05744074ea Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Tue, 8 Dec 2020 13:25:34 -0500 Subject: [PATCH 16/20] Update documentation WRT .rpm contents --- application/package/rpm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/package/rpm/README.md b/application/package/rpm/README.md index 98b6d5cb..0c2b1e49 100644 --- a/application/package/rpm/README.md +++ b/application/package/rpm/README.md @@ -1,7 +1,7 @@ # What is this? A simple RPM package for MultiMC that contains a script that downloads and installs real MultiMC on Red Hat based systems. -It contains a `.desktop` file, an icon, and a simple script that does the heavy lifting. +It contains a `.desktop` file, a `.metainfo.xml` file, an icon, and a simple script that does the heavy lifting. # How to build this? You need the `rpm-build` package. Switch into this directory, then run: From 331f6df9e56d6d8f5784896ea2a26f509c52b257 Mon Sep 17 00:00:00 2001 From: Joshua Stone Date: Thu, 10 Dec 2020 11:43:37 -0500 Subject: [PATCH 17/20] Improve metadata for screenshots --- .../usr/share/metainfo/multimc.metainfo.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml b/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml index 15f7fd1d..64b2f44d 100644 --- a/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml +++ b/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml @@ -23,11 +23,19 @@ - https://multimc.org/images/screenshots/main.png - https://multimc.org/images/screenshots/editmods.png - https://multimc.org/images/screenshots/version.png - https://multimc.org/images/screenshots/console.png - https://multimc.org/images/screenshots/settings.png + https://multimc.org/images/screenshots/main.png + + + https://multimc.org/images/screenshots/editmods.png + + + https://multimc.org/images/screenshots/version.png + + + https://multimc.org/images/screenshots/console.png + + + https://multimc.org/images/screenshots/settings.png From dc45d46e9c7e0de2f919c70d80ddebd744c4c751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 7 Jan 2021 11:54:08 +0100 Subject: [PATCH 18/20] NOISSUE fix the metainfo file --- .../usr/share/metainfo/multimc.metainfo.xml | 109 ++++++++---------- 1 file changed, 51 insertions(+), 58 deletions(-) diff --git a/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml b/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml index 64b2f44d..4c6b7450 100644 --- a/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml +++ b/application/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml @@ -1,61 +1,54 @@ - multimc - multimc.desktop - MultiMC - Manage Minecraft instances with ease - -

    Overview

    -

    MultiMC is a free, open source launcher for Minecraft. It allows you to have multiple, cleanly separated instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple and powerful interface.

    -

    Features

    -
      -
    • Manage multiple instances of Minecraft at once
    • -
    • Start Minecraft with a custom resolution
    • -
    • Change Java's runtime options (including memory options)
    • -
    • Shows Minecraft's console output in a colour coded window
    • -
    • Kill Minecraft easily if it crashes / freezes
    • -
    • Custom icons and groups for instances
    • -
    • Forge integration (automatic installation, version downloads, mod management)
    • -
    • Minecraft world management
    • -
    • Import and export Minecraft instances to share them with anyone
    • -
    • Supports every version of Minecraft that the vanilla launcher does
    • -
    -
    - - - https://multimc.org/images/screenshots/main.png - - - https://multimc.org/images/screenshots/editmods.png - - - https://multimc.org/images/screenshots/version.png - - - https://multimc.org/images/screenshots/console.png - - - https://multimc.org/images/screenshots/settings.png - - - - - - https://multimc.org/ - https://discord.com/invite/0k2zsXGNHs0fE4Wm - https://github.com/MultiMC/MultiMC5/wiki/FAQ - https://github.com/flathub/multimc/issues - https://translate.multimc.org/ - https://www.patreon.com/multimc - The MultiMC Team - CC0-1.0 - Apache-2.0 - - mild - mild - mild - mild - mild - - peterix_at_gmail.com + multimc + multimc.desktop + MultiMC + Manage Minecraft instances with ease + +

    Overview

    +

    MultiMC is a free, open source launcher for Minecraft. It allows you to have multiple, cleanly separated instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple and powerful interface.

    +

    Features

    +
      +
    • Manage multiple instances of Minecraft at once
    • +
    • Start Minecraft with a custom resolution
    • +
    • Change Java's runtime options (including memory options)
    • +
    • Shows Minecraft's console output in a colour coded window
    • +
    • Kill Minecraft easily if it crashes / freezes
    • +
    • Custom icons and groups for instances
    • +
    • Forge integration (automatic installation, version downloads, mod management)
    • +
    • Minecraft world management
    • +
    • Import and export Minecraft instances to share them with anyone
    • +
    • Supports every version of Minecraft that the vanilla launcher does
    • +
    +
    + + + https://multimc.org/images/screenshots/main.png + + + https://multimc.org/images/screenshots/editmods.png + + + https://multimc.org/images/screenshots/version.png + + + https://multimc.org/images/screenshots/console.png + + + https://multimc.org/images/screenshots/settings.png + + + + + + https://multimc.org/ + https://discord.com/invite/0k2zsXGNHs0fE4Wm + https://github.com/MultiMC/MultiMC5/wiki/FAQ + https://github.com/MultiMC/MultiMC5/issues + https://translate.multimc.org/ + https://www.patreon.com/multimc + The MultiMC Team + CC0-1.0 + Apache-2.0 + peterix_at_gmail.com
    From 9100373af2655c2eaccdd738d57dfa506ab6ddb5 Mon Sep 17 00:00:00 2001 From: TreyRuffy Date: Mon, 11 Jan 2021 19:26:40 -0700 Subject: [PATCH 19/20] Switch Session Server sessionserver.mojang.com has been down for a while and it looks like it is no longer in use. https://bugs.mojang.com/browse/WEB-3166?focusedCommentId=820167&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-820167 I have switched the url to session.minecraft.net --- application/widgets/ServerStatus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/widgets/ServerStatus.cpp b/application/widgets/ServerStatus.cpp index ce0aed9c..87c34f70 100644 --- a/application/widgets/ServerStatus.cpp +++ b/application/widgets/ServerStatus.cpp @@ -65,7 +65,7 @@ ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, addStatus("authserver.mojang.com", tr("Auth")); addLine(); - addStatus("sessionserver.mojang.com", tr("Session")); + addStatus("session.minecraft.net", tr("Session")); addLine(); addStatus("textures.minecraft.net", tr("Skins")); addLine(); From df2b9adc1e53f44a8172dda9f5df431379e792ba Mon Sep 17 00:00:00 2001 From: kb1000 Date: Fri, 29 Jan 2021 10:18:33 +0100 Subject: [PATCH 20/20] Fix up 1.7.10 forge versions for Technic platform import by removing -1.7.10 suffix --- .../modplatform/technic/TechnicPackProcessor.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/logic/modplatform/technic/TechnicPackProcessor.cpp b/api/logic/modplatform/technic/TechnicPackProcessor.cpp index 4a8191eb..dcf2c267 100644 --- a/api/logic/modplatform/technic/TechnicPackProcessor.cpp +++ b/api/logic/modplatform/technic/TechnicPackProcessor.cpp @@ -176,7 +176,16 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const if (libraryName.startsWith("net.minecraftforge:forge:") && libraryName.contains('-')) { - components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1)); + QString libraryVersion = libraryName.section(':', 2); + if (!libraryVersion.startsWith("1.7.10-")) + { + components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1)); + } + else + { + // 1.7.10 versions sometimes look like 1.7.10-10.13.4.1614-1.7.10, this filters out the 10.13.4.1614 part + components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1, 1)); + } } else if (libraryName.startsWith("net.minecraftforge:minecraftforge:")) {