From 175132539b14be2681bfbaf3f380f0a9b8a69a26 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 16 Oct 2021 23:31:27 +0100 Subject: [PATCH 01/14] NOISSUE Filter all pack's by name to search for modpacks.ch modpacks.ch searching has changed, and while likely a bug - we may as well make this change while we fetch all packs anyway. This makes MMC more reactive for searchs for the platform. This should be reverted if/when the modpacks.ch hits a size where we need to restrict how many packs are fetched. --- .../pages/modplatform/ftb/FtbFilterModel.cpp | 14 +++++- .../pages/modplatform/ftb/FtbFilterModel.h | 2 + .../pages/modplatform/ftb/FtbListModel.cpp | 47 +++++-------------- launcher/pages/modplatform/ftb/FtbListModel.h | 16 ++----- launcher/pages/modplatform/ftb/FtbPage.cpp | 9 +++- launcher/pages/modplatform/ftb/FtbPage.h | 2 + 6 files changed, 39 insertions(+), 51 deletions(-) diff --git a/launcher/pages/modplatform/ftb/FtbFilterModel.cpp b/launcher/pages/modplatform/ftb/FtbFilterModel.cpp index dec3a017..793b8769 100644 --- a/launcher/pages/modplatform/ftb/FtbFilterModel.cpp +++ b/launcher/pages/modplatform/ftb/FtbFilterModel.cpp @@ -36,9 +36,21 @@ FilterModel::Sorting FilterModel::getCurrentSorting() return currentSorting; } +void FilterModel::setSearchTerm(const QString& term) +{ + searchTerm = term.trimmed(); + invalidate(); +} + bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { - return true; + if (searchTerm.isEmpty()) { + return true; + } + + auto index = sourceModel()->index(sourceRow, 0, sourceParent); + auto pack = sourceModel()->data(index, Qt::UserRole).value(); + return pack.name.contains(searchTerm, Qt::CaseInsensitive); } bool FilterModel::lessThan(const QModelIndex &left, const QModelIndex &right) const diff --git a/launcher/pages/modplatform/ftb/FtbFilterModel.h b/launcher/pages/modplatform/ftb/FtbFilterModel.h index 4fe2a274..2e712c7d 100644 --- a/launcher/pages/modplatform/ftb/FtbFilterModel.h +++ b/launcher/pages/modplatform/ftb/FtbFilterModel.h @@ -19,6 +19,7 @@ public: QString translateCurrentSorting(); void setSorting(Sorting sorting); Sorting getCurrentSorting(); + void setSearchTerm(const QString& term); protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; @@ -27,6 +28,7 @@ protected: private: QMap sortings; Sorting currentSorting; + QString searchTerm { "" }; }; diff --git a/launcher/pages/modplatform/ftb/FtbListModel.cpp b/launcher/pages/modplatform/ftb/FtbListModel.cpp index 98973f2e..f5ed106b 100644 --- a/launcher/pages/modplatform/ftb/FtbListModel.cpp +++ b/launcher/pages/modplatform/ftb/FtbListModel.cpp @@ -74,24 +74,6 @@ QVariant ListModel::data(const QModelIndex &index, int role) const return QVariant(); } -void ListModel::performSearch() -{ - auto *netJob = new NetJob("Ftb::Search"); - QString searchUrl; - if(currentSearchTerm.isEmpty()) { - searchUrl = BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/all"; - } - else { - searchUrl = QString(BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/search/25?term=%1") - .arg(currentSearchTerm); - } - netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response)); - jobPtr = netJob; - jobPtr->start(); - QObject::connect(netJob, &NetJob::succeeded, this, &ListModel::searchRequestFinished); - QObject::connect(netJob, &NetJob::failed, this, &ListModel::searchRequestFailed); -} - void ListModel::getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback) { if(m_logoMap.contains(logo)) @@ -104,28 +86,23 @@ void ListModel::getLogo(const QString &logo, const QString &logoUrl, LogoCallbac } } -void ListModel::searchWithTerm(const QString &term) +void ListModel::request() { - if(searchState != Failed && currentSearchTerm == term && currentSearchTerm.isNull() == term.isNull()) { - // unless the search has failed, then there is no need to perform an identical search. - return; - } - currentSearchTerm = term; - - if(jobPtr) { - jobPtr->abort(); - jobPtr.reset(); - } - beginResetModel(); modpacks.clear(); endResetModel(); - searchState = None; - performSearch(); + auto *netJob = new NetJob("Ftb::Request"); + auto url = QString(BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/all"); + netJob->addNetAction(Net::Download::makeByteArray(QUrl(url), &response)); + jobPtr = netJob; + jobPtr->start(); + + QObject::connect(netJob, &NetJob::succeeded, this, &ListModel::requestFinished); + QObject::connect(netJob, &NetJob::failed, this, &ListModel::requestFailed); } -void ListModel::searchRequestFinished() +void ListModel::requestFinished() { jobPtr.reset(); remainingPacks.clear(); @@ -150,12 +127,10 @@ void ListModel::searchRequestFinished() } } -void ListModel::searchRequestFailed(QString reason) +void ListModel::requestFailed(QString reason) { jobPtr.reset(); remainingPacks.clear(); - - searchState = Failed; } void ListModel::requestPack() diff --git a/launcher/pages/modplatform/ftb/FtbListModel.h b/launcher/pages/modplatform/ftb/FtbListModel.h index de94e6ba..2d6e91da 100644 --- a/launcher/pages/modplatform/ftb/FtbListModel.h +++ b/launcher/pages/modplatform/ftb/FtbListModel.h @@ -30,13 +30,13 @@ public: int columnCount(const QModelIndex &parent) const override; QVariant data(const QModelIndex &index, int role) const override; + void request(); + void getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback); - void searchWithTerm(const QString & term); private slots: - void performSearch(); - void searchRequestFinished(); - void searchRequestFailed(QString reason); + void requestFinished(); + void requestFailed(QString reason); void requestPack(); void packRequestFinished(); @@ -52,14 +52,6 @@ private: QList modpacks; LogoMap m_logoMap; - QString currentSearchTerm; - enum SearchState { - None, - CanPossiblyFetchMore, - ResetRequested, - Finished, - Failed, - } searchState = None; NetJobPtr jobPtr; int currentPack; QList remainingPacks; diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp index b7f35c5d..5917b979 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/pages/modplatform/ftb/FtbPage.cpp @@ -63,7 +63,12 @@ bool FtbPage::shouldDisplay() const void FtbPage::openedImpl() { - triggerSearch(); + if(!initialised) + { + listModel->request(); + initialised = true; + } + suggestCurrent(); } @@ -96,7 +101,7 @@ void FtbPage::suggestCurrent() void FtbPage::triggerSearch() { - listModel->searchWithTerm(ui->searchEdit->text()); + filterModel->setSearchTerm(ui->searchEdit->text()); } void FtbPage::onSortingSelectionChanged(QString data) diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/pages/modplatform/ftb/FtbPage.h index c9c93897..bca09e25 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.h +++ b/launcher/pages/modplatform/ftb/FtbPage.h @@ -77,4 +77,6 @@ private: ModpacksCH::Modpack selected; QString selectedVersion; + + bool initialised { false }; }; From 1869dd0de3bf490abb0fe789236dd6f6909ecf8d Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 16 Oct 2021 23:36:31 +0100 Subject: [PATCH 02/14] NOISSUE Search as you type for modpacks.ch Since we just filter data locally now, this isn't painfully slow - indeed it's very quick. This also matches other platforms, such as ATLauncher. --- launcher/pages/modplatform/ftb/FtbPage.cpp | 8 +++++++- launcher/pages/modplatform/ftb/FtbPage.h | 2 ++ launcher/pages/modplatform/ftb/FtbPage.ui | 12 ++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp index 5917b979..aca93cfe 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/pages/modplatform/ftb/FtbPage.cpp @@ -32,7 +32,8 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) } ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); - connect(ui->searchButton, &QPushButton::clicked, this, &FtbPage::triggerSearch); + connect(ui->searchEdit, &QLineEdit::textChanged, this, &FtbPage::triggerSearch); + connect(ui->resetButton, &QPushButton::clicked, this, &FtbPage::resetSearch); 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); @@ -104,6 +105,11 @@ void FtbPage::triggerSearch() filterModel->setSearchTerm(ui->searchEdit->text()); } +void FtbPage::resetSearch() +{ + ui->searchEdit->setText(""); +} + void FtbPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/pages/modplatform/ftb/FtbPage.h index bca09e25..0dfac1a4 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.h +++ b/launcher/pages/modplatform/ftb/FtbPage.h @@ -65,6 +65,8 @@ private: private slots: void triggerSearch(); + void resetSearch(); + void onSortingSelectionChanged(QString data); void onSelectionChanged(QModelIndex first, QModelIndex second); void onVersionSelectionChanged(QString data); diff --git a/launcher/pages/modplatform/ftb/FtbPage.ui b/launcher/pages/modplatform/ftb/FtbPage.ui index 135afc6d..dc800497 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.ui +++ b/launcher/pages/modplatform/ftb/FtbPage.ui @@ -39,9 +39,9 @@ - + - Search + Reset @@ -49,15 +49,15 @@ + + true + 48 48 - - true - @@ -76,7 +76,7 @@ searchEdit - searchButton + resetButton versionSelectionBox From b93997501d3c18832d0511abaf1514e73494bf56 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 17 Oct 2021 20:14:16 +0100 Subject: [PATCH 03/14] NOISSUE Use Qt's clear button for modpacks.ch page This replaces our 'Reset' button. --- launcher/pages/modplatform/ftb/FtbPage.cpp | 6 ------ launcher/pages/modplatform/ftb/FtbPage.h | 1 - launcher/pages/modplatform/ftb/FtbPage.ui | 9 ++------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp index aca93cfe..bafcfac9 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/pages/modplatform/ftb/FtbPage.cpp @@ -33,7 +33,6 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); connect(ui->searchEdit, &QLineEdit::textChanged, this, &FtbPage::triggerSearch); - connect(ui->resetButton, &QPushButton::clicked, this, &FtbPage::resetSearch); 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); @@ -105,11 +104,6 @@ void FtbPage::triggerSearch() filterModel->setSearchTerm(ui->searchEdit->text()); } -void FtbPage::resetSearch() -{ - ui->searchEdit->setText(""); -} - void FtbPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/pages/modplatform/ftb/FtbPage.h index 0dfac1a4..25b531fb 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.h +++ b/launcher/pages/modplatform/ftb/FtbPage.h @@ -65,7 +65,6 @@ private: private slots: void triggerSearch(); - void resetSearch(); void onSortingSelectionChanged(QString data); void onSelectionChanged(QModelIndex first, QModelIndex second); diff --git a/launcher/pages/modplatform/ftb/FtbPage.ui b/launcher/pages/modplatform/ftb/FtbPage.ui index dc800497..e9c783e3 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.ui +++ b/launcher/pages/modplatform/ftb/FtbPage.ui @@ -36,12 +36,8 @@ Search and filter ... - - - - - - Reset + + true @@ -76,7 +72,6 @@ searchEdit - resetButton versionSelectionBox From 3f0e729815b420e852a0d05f55426b42320055ef Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 17 Oct 2021 20:18:18 +0100 Subject: [PATCH 04/14] NOISSUE Use Qt's clear button for ATLauncher page This replaces our 'Reset' button. --- .../pages/modplatform/atlauncher/AtlPage.cpp | 6 ------ launcher/pages/modplatform/atlauncher/AtlPage.h | 1 - .../pages/modplatform/atlauncher/AtlPage.ui | 17 ++++++----------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/pages/modplatform/atlauncher/AtlPage.cpp index 9fdf111f..245edc59 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.cpp +++ b/launcher/pages/modplatform/atlauncher/AtlPage.cpp @@ -31,7 +31,6 @@ AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent) ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); connect(ui->searchEdit, &QLineEdit::textChanged, this, &AtlPage::triggerSearch); - connect(ui->resetButton, &QPushButton::clicked, this, &AtlPage::resetSearch); connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &AtlPage::onSortingSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &AtlPage::onSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &AtlPage::onVersionSelectionChanged); @@ -85,11 +84,6 @@ void AtlPage::triggerSearch() filterModel->setSearchTerm(ui->searchEdit->text()); } -void AtlPage::resetSearch() -{ - ui->searchEdit->setText(""); -} - void AtlPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.h b/launcher/pages/modplatform/atlauncher/AtlPage.h index 932ec6a6..7d46bc5b 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.h +++ b/launcher/pages/modplatform/atlauncher/AtlPage.h @@ -67,7 +67,6 @@ private: private slots: void triggerSearch(); - void resetSearch(); void onSortingSelectionChanged(QString data); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.ui b/launcher/pages/modplatform/atlauncher/AtlPage.ui index f16c24b8..9085766a 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.ui +++ b/launcher/pages/modplatform/atlauncher/AtlPage.ui @@ -15,15 +15,15 @@ + + true + 96 48 - - true - @@ -68,25 +68,20 @@ - - - - Reset - - - Search and filter ... + + true + searchEdit - resetButton packView packDescription sortByBox From 8bc5b5a01f13dc3ec3fd8188893747ef6ffd7ca0 Mon Sep 17 00:00:00 2001 From: kb1000 Date: Thu, 21 Oct 2021 01:46:13 +0200 Subject: [PATCH 05/14] NOISSUE Update repository links --- BUILD.md | 18 +++++++++--------- changelog.md | 2 +- doc/multimc.1.txt | 4 ++-- launcher/dialogs/UpdateDialog.cpp | 8 ++++---- .../usr/share/metainfo/multimc.metainfo.xml | 4 ++-- launcher/pages/instance/LegacyUpgradePage.ui | 2 +- launcher/updater/DownloadTask.cpp | 2 +- launcher/widgets/LanguageSelectionWidget.cpp | 2 +- launcher/widgets/PageContainer.cpp | 2 +- notsecrets/CMakeLists.txt | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/BUILD.md b/BUILD.md index faa9fa85..838b48c6 100644 --- a/BUILD.md +++ b/BUILD.md @@ -23,7 +23,7 @@ Also note that this guide is for development purposes only. No support is given Clone the source code using git and grab all the submodules: ``` -git clone https://github.com/MultiMC/MultiMC5.git +git clone https://github.com/MultiMC/Launcher.git git submodule init git submodule update ``` @@ -51,7 +51,7 @@ mkdir ~/MultiMC && cd ~/MultiMC mkdir build mkdir install # clone the complete source -git clone --recursive https://github.com/MultiMC/MultiMC5.git src +git clone --recursive https://github.com/MultiMC/Launcher.git src # configure the project cd build cmake -DCMAKE_INSTALL_PREFIX=../install ../src @@ -75,7 +75,7 @@ You can use IDEs like KDevelop or QtCreator to open the CMake project if you wan ### Loading the project in Qt Creator (optional) 1. Open Qt Creator. 2. Choose `File->Open File or Project`. -3. Navigate to the MultiMC5 source folder you cloned and choose CMakeLists.txt. +3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt. 4. Read the instructions that just popped up about a build location and choose one. 5. You should see "Run CMake" in the window. - Make sure that Generator is set to "Unix Generator (Desktop Qt 5.6.x GCC 64bit)". @@ -83,7 +83,7 @@ You can use IDEs like KDevelop or QtCreator to open the CMake project if you wan - You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window. - Hit "Finish" if CMake ran successfully. 6. Cross your fingers and press the Run button (bottom left of Qt Creator). - - If the project builds successfully it will run and the MultiMC5 window will pop up. + - If the project builds successfully it will run and the Launcher window will pop up. **If this doesn't work for you, let us know on IRC ([Esper/#MultiMC](http://webchat.esper.net/?nick=&channels=MultiMC))!** @@ -132,7 +132,7 @@ Ensure that OpenSSL, zlib, Java and CMake are on `PATH`. ### Loading the project 1. Open Qt Creator, 2. Choose File->Open File or Project, -3. Navigate to the MultiMC5 source folder you cloned and choose CMakeLists.txt, +3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt, 4. Read the instructions that just popped up about a build location and choose one, 5. If you chose not to add CMake to the system PATH, tell Qt Creator where you installed it, - Otherwise you can skip this step. @@ -142,7 +142,7 @@ Ensure that OpenSSL, zlib, Java and CMake are on `PATH`. - You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window. - Hit "Finish" if CMake ran successfully. 7. Cross your fingers and press the Run button (bottom left of Qt Creator)! - - If the project builds successfully it will run and the MultiMC5 window will pop up, + - If the project builds successfully it will run and the Launcher 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): @@ -166,7 +166,7 @@ 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. -2. Once that is open, change into your user directory, and clone MultiMC by doing `git clone --recursive https://github.com/MultiMC/MultiMC5.git`, and change directory to the folder you cloned to. +2. Once that is open, change into your user directory, and clone MultiMC by doing `git clone --recursive https://github.com/MultiMC/Launcher.git`, and change directory to the folder you cloned to. 3. Make a build directory, and change directory to the directory and do `cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Path\that\makes\sense\for\you`. By default, it will install to C:\Program Files (x86), which you might not want, if you want a local installation. If you want to install it to that directory, make sure to run the command window as administrator. 3. Do `mingw32-make -jX`, where X is the number of cores your CPU has plus one. 4. Now to wait for it to compile. This could take some time. Hopefully it compiles properly. @@ -186,8 +186,8 @@ zlib1.dll Pick an installation path - this is where the final `.app` will be constructed when you run `make install`. Supply it as the `CMAKE_INSTALL_PREFIX` argument during CMake configuration. ``` -git clone --recursive https://github.com/MultiMC/MultiMC5.git -cd MultiMC5 +git clone --recursive https://github.com/MultiMC/Launcher.git +cd Launcher mkdir build cd build cmake \ diff --git a/changelog.md b/changelog.md index e864a4c7..b2cbdd81 100644 --- a/changelog.md +++ b/changelog.md @@ -1453,7 +1453,7 @@ Long time coming, this release brought a lot of incremental improvements and fix - Update to the German translation. ## MultiMC 0.1.1 -- Hotfix - Changed the issue tracker URL to [GitHub issues](https://github.com/MultiMC/MultiMC5/issues). +- Hotfix - Changed the issue tracker URL to [GitHub issues](https://github.com/MultiMC/Launcher/issues). ## MultiMC 0.1 - Reworked the version numbering system to support our [new Git workflow](http://nvie.com/posts/a-successful-git-branching-model/). diff --git a/doc/multimc.1.txt b/doc/multimc.1.txt index c2d93880..eaf77f8f 100644 --- a/doc/multimc.1.txt +++ b/doc/multimc.1.txt @@ -47,11 +47,11 @@ EXIT STATUS BUGS ---- - + RESOURCES --------- -GitHub: +GitHub: Main website: diff --git a/launcher/dialogs/UpdateDialog.cpp b/launcher/dialogs/UpdateDialog.cpp index 04732d1b..ca3bd915 100644 --- a/launcher/dialogs/UpdateDialog.cpp +++ b/launcher/dialogs/UpdateDialog.cpp @@ -38,12 +38,12 @@ void UpdateDialog::loadChangelog() QString url; if(channel == "stable") { - url = QString("https://raw.githubusercontent.com/MultiMC/MultiMC5/%1/changelog.md").arg(channel); + url = QString("https://raw.githubusercontent.com/MultiMC/Launcher/%1/changelog.md").arg(channel); m_changelogType = CHANGELOG_MARKDOWN; } else { - url = QString("https://api.github.com/repos/MultiMC/MultiMC5/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel); + url = QString("https://api.github.com/repos/MultiMC/Launcher/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel); m_changelogType = CHANGELOG_COMMITS; } dljob->addNetAction(Net::Download::makeByteArray(QUrl(url), &changelogData)); @@ -58,7 +58,7 @@ QString reprocessMarkdown(QByteArray markdown) QString output = hoedown.process(markdown); // HACK: easier than customizing hoedown - output.replace(QRegExp("GH-([0-9]+)"), "GH-\\1"); + output.replace(QRegExp("GH-([0-9]+)"), "GH-\\1"); qDebug() << output; return output; } @@ -100,7 +100,7 @@ QString reprocessCommits(QByteArray json) result += ""; if(issuenr.length()) { - result += QString("GH-%2").arg(issuenr, issuenr); + result += QString("GH-%2").arg(issuenr, issuenr); } else if(prefix.length()) { diff --git a/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml b/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml index 4c6b7450..3bccba47 100644 --- a/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml +++ b/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml @@ -43,8 +43,8 @@ https://multimc.org/ https://discord.com/invite/0k2zsXGNHs0fE4Wm - https://github.com/MultiMC/MultiMC5/wiki/FAQ - https://github.com/MultiMC/MultiMC5/issues + https://github.com/MultiMC/Launcher/wiki/FAQ + https://github.com/MultiMC/Launcher/issues https://translate.multimc.org/ https://www.patreon.com/multimc The MultiMC Team diff --git a/launcher/pages/instance/LegacyUpgradePage.ui b/launcher/pages/instance/LegacyUpgradePage.ui index a94ee039..085919e3 100644 --- a/launcher/pages/instance/LegacyUpgradePage.ui +++ b/launcher/pages/instance/LegacyUpgradePage.ui @@ -26,7 +26,7 @@ - <html><body><h1>Upgrade is required</h1><p>MultiMC now supports old Minecraft versions and all the required features in the new (OneSix) instance format. As a consequence, the old (Legacy) format has been entirely disabled and old instances need to be upgraded.</p><p>The upgrade will create a new instance with the same contents as the current one, in the new format. The original instance will remain untouched, in case anything goes wrong in the process.</p><p>Please report any issues on our <a href="https://github.com/MultiMC/MultiMC5/issues">github issues page</a>.</p><p>There is also a <a href="https://discord.gg/GtPmv93">discord channel for testing here</a>.</p></body></html> + <html><body><h1>Upgrade is required</h1><p>MultiMC now supports old Minecraft versions and all the required features in the new (OneSix) instance format. As a consequence, the old (Legacy) format has been entirely disabled and old instances need to be upgraded.</p><p>The upgrade will create a new instance with the same contents as the current one, in the new format. The original instance will remain untouched, in case anything goes wrong in the process.</p><p>Please report any issues on our <a href="https://github.com/MultiMC/Launcher/issues">github issues page</a>.</p><p>There is also a <a href="https://discord.gg/GtPmv93">discord channel for testing here</a>.</p></body></html> true diff --git a/launcher/updater/DownloadTask.cpp b/launcher/updater/DownloadTask.cpp index 2c62ad24..875d9d84 100644 --- a/launcher/updater/DownloadTask.cpp +++ b/launcher/updater/DownloadTask.cpp @@ -131,7 +131,7 @@ void DownloadTask::processDownloadedVersionInfo() QObject::connect(netJob.get(), &NetJob::progress, this, &DownloadTask::fileDownloadProgressChanged); QObject::connect(netJob.get(), &NetJob::failed, this, &DownloadTask::fileDownloadFailed); - if(netJob->size() == 1) // Translation issues... see https://github.com/MultiMC/MultiMC5/issues/1701 + if(netJob->size() == 1) // Translation issues... see https://github.com/MultiMC/Launcher/issues/1701 { setStatus(tr("Downloading one update file.")); } diff --git a/launcher/widgets/LanguageSelectionWidget.cpp b/launcher/widgets/LanguageSelectionWidget.cpp index 3a8fbd2f..2b972ba7 100644 --- a/launcher/widgets/LanguageSelectionWidget.cpp +++ b/launcher/widgets/LanguageSelectionWidget.cpp @@ -48,7 +48,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/MultiMC5/wiki/Translating-MultiMC"); + .arg("https://github.com/MultiMC/Launcher/wiki/Translating-MultiMC"); helpUsLabel->setText(text); } diff --git a/launcher/widgets/PageContainer.cpp b/launcher/widgets/PageContainer.cpp index 978d3e82..25e3b676 100644 --- a/launcher/widgets/PageContainer.cpp +++ b/launcher/widgets/PageContainer.cpp @@ -206,7 +206,7 @@ void PageContainer::help() QString pageId = m_currentPage->helpPage(); if (pageId.isEmpty()) return; - DesktopServices::openUrl(QUrl("https://github.com/MultiMC/MultiMC5/wiki/" + pageId)); + DesktopServices::openUrl(QUrl("https://github.com/MultiMC/Launcher/wiki/" + pageId)); } } diff --git a/notsecrets/CMakeLists.txt b/notsecrets/CMakeLists.txt index 2369d046..b5dd3cf8 100644 --- a/notsecrets/CMakeLists.txt +++ b/notsecrets/CMakeLists.txt @@ -11,7 +11,7 @@ set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE) set(Launcher_DisplayName "${Launcher_CommonName} 5" PARENT_SCOPE) set(Launcher_UserAgent "${Launcher_CommonName}/5.0" PARENT_SCOPE) set(Launcher_ConfigFile "devlauncher.cfg" PARENT_SCOPE) -set(Launcher_Git "https://github.com/MultiMC/MultiMC5" PARENT_SCOPE) +set(Launcher_Git "https://github.com/MultiMC/Launcher" PARENT_SCOPE) set(Launcher_Branding_ICNS "notsecrets/Launcher.icns" PARENT_SCOPE) set(Launcher_Branding_WindowsRC "notsecrets/launcher.rc" PARENT_SCOPE) From aed8d5f8f5d2b0351274a023470d8f89439ce6e3 Mon Sep 17 00:00:00 2001 From: ImperatorStorm <30777770+ImperatorStorm@users.noreply.github.com> Date: Thu, 21 Oct 2021 19:17:51 -0700 Subject: [PATCH 06/14] MultiMCGH-4120 Add manpage to ubuntu and rpm packages --- launcher/package/rpm/MultiMC5.spec | 17 ++-- .../package/ubuntu/multimc/DEBIAN/control | 2 +- .../multimc/usr/share/man/man1/multimc.1 | 90 +++++++++++++++++++ 3 files changed, 102 insertions(+), 7 deletions(-) create mode 100644 launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1 diff --git a/launcher/package/rpm/MultiMC5.spec b/launcher/package/rpm/MultiMC5.spec index 78b9000e..20839f11 100644 --- a/launcher/package/rpm/MultiMC5.spec +++ b/launcher/package/rpm/MultiMC5.spec @@ -1,6 +1,6 @@ Name: MultiMC5 Version: 1.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A local install wrapper for MultiMC License: ASL 2.0 @@ -18,25 +18,30 @@ A local install wrapper for MultiMC %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 -mkdir -p %{buildroot}/%{_metainfodir} -install -m 0644 ../ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml %{buildroot}/%{_metainfodir}/multimc.metainfo.xml +mkdir -p %{buildroot}/%{_datadir}/metainfo +install -m 0644 ../ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml %{buildroot}/%{_datadir}/metainfo/multimc.metainfo.xml +mkdir -p %{buildroot}/%{_mandir}/man1 +install -m 0644 ../ubuntu/multimc/usr/share/man/man1/multimc.1 %{buildroot}/%{_mandir}/man1/multimc.1 %files %dir /opt/multimc /opt/multimc/icon.svg /opt/multimc/run.sh %{_datadir}/applications/multimc.desktop -%{_metainfodir}/multimc.metainfo.xml - +%{_datadir}/metainfo/multimc.metainfo.xml +%dir /usr/share/man/man1 +%{_mandir}/man1/multimc.1.gz %changelog +* Sun Oct 03 2021 imperatorstorm <30777770+ImperatorStorm@users.noreply.github.com> +- added manpage + * Tue Jun 01 2021 kb1000 - 1.4-2 - Add xrandr to the dependencies diff --git a/launcher/package/ubuntu/multimc/DEBIAN/control b/launcher/package/ubuntu/multimc/DEBIAN/control index be64f517..bfa3f1f2 100644 --- a/launcher/package/ubuntu/multimc/DEBIAN/control +++ b/launcher/package/ubuntu/multimc/DEBIAN/control @@ -1,5 +1,5 @@ Package: multimc -Version: 1.6-1 +Version: 1.6-2 Architecture: all Maintainer: Petr Mrázek Section: games diff --git a/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1 b/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1 new file mode 100644 index 00000000..b2031aa9 --- /dev/null +++ b/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1 @@ -0,0 +1,90 @@ +'\" t +.\" Title: multimc +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 10/21/2021 +.\" Manual: \ \& +.\" Source: \ \& +.\" Language: English +.\" +.TH "MULTIMC" "1" "10/21/2021" "\ \&" "\ \&" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +multimc \- a launcher and instance manager for Minecraft\&. +.SH "SYNOPSIS" +.sp +\fBmultimc\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +MultiMC is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once\&. It also allows you to easily install and remove mods by simply dragging and dropping\&. Here are the current features of MultiMC\&. +.SH "OPTIONS" +.PP +\fB\-d, \-\-dir\fR=\fIDIRECTORY\fR +.RS 4 +Use +\fIDIRECTORY\fR +as the MultiMC root\&. +.RE +.PP +\fB\-l, \-\-launch\fR=\fIINSTANCE_ID\fR +.RS 4 +Launch the instance specified by +\fIINSTANCE_ID\fR\&. +.RE +.PP +\fB\-\-alive\fR +.RS 4 +Write a small +\fIlive\&.check\fR +file after MultiMC starts\&. +.RE +.PP +\fB\-h, \-\-help\fR +.RS 4 +Display help text and exit\&. +.RE +.PP +\fB\-v, \-\-version\fR +.RS 4 +Display program version and exit\&. +.RE +.SH "EXIT STATUS" +.PP +\fB0\fR +.RS 4 +Success +.RE +.PP +\fB1\fR +.RS 4 +Failure (syntax or usage error; configuration error; unexpected error)\&. +.RE +.SH "BUGS" +.sp +https://github\&.com/MultiMC/Launcher/issues +.SH "RESOURCES" +.sp +GitHub: https://github\&.com/MultiMC/Launcher +.sp +Main website: https://multimc\&.org +.SH "AUTHORS" +.sp +peterix From 7cbca6ab20f34bbb9522f002f2f1cfa4eca1da18 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Tue, 28 Sep 2021 23:20:34 +0100 Subject: [PATCH 07/14] NOISSUE Use common duration format for global and instances --- launcher/CMakeLists.txt | 4 ++++ launcher/MMCTime.cpp | 21 +++++++++++++++++++++ launcher/MMCTime.h | 9 +++++++++ launcher/MainWindow.cpp | 16 +++++----------- launcher/minecraft/MinecraftInstance.cpp | 24 +++--------------------- launcher/minecraft/MinecraftInstance.h | 3 --- 6 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 launcher/MMCTime.cpp create mode 100644 launcher/MMCTime.h diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 5c45273b..d67dcdbf 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -84,6 +84,10 @@ set(CORE_SOURCES # A Recursive file system watcher RecursiveFileSystemWatcher.h RecursiveFileSystemWatcher.cpp + + # Time + MMCTime.h + MMCTime.cpp ) add_unit_test(FileSystem diff --git a/launcher/MMCTime.cpp b/launcher/MMCTime.cpp new file mode 100644 index 00000000..fa26e0b9 --- /dev/null +++ b/launcher/MMCTime.cpp @@ -0,0 +1,21 @@ +#include + +#include + +QString Time::prettifyDuration(int64_t duration) { + int seconds = (int) (duration % 60); + duration /= 60; + int minutes = (int) (duration % 60); + duration /= 60; + int hours = (int) (duration % 24); + int days = (int) (duration / 24); + if((hours == 0)&&(days == 0)) + { + return QObject::tr("%1m %2s").arg(minutes).arg(seconds); + } + if (days == 0) + { + return QObject::tr("%1h %2m").arg(hours).arg(minutes); + } + return QObject::tr("%1d %2h %3m").arg(days).arg(hours).arg(minutes); +} diff --git a/launcher/MMCTime.h b/launcher/MMCTime.h new file mode 100644 index 00000000..728a5abb --- /dev/null +++ b/launcher/MMCTime.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +namespace Time { + +QString prettifyDuration(int64_t duration); + +} diff --git a/launcher/MainWindow.cpp b/launcher/MainWindow.cpp index c3cc6b8d..d394238a 100644 --- a/launcher/MainWindow.cpp +++ b/launcher/MainWindow.cpp @@ -88,6 +88,7 @@ #include "UpdateController.h" #include "KonamiCode.h" #include +#include "MMCTime.h" namespace { QString profileInUseFilter(const QString & profile, bool used) @@ -1926,15 +1927,8 @@ void MainWindow::checkInstancePathForProblems() void MainWindow::updateStatusCenter() { - int timeplayed = LAUNCHER->instances()->getTotalPlayTime(); - int minutesTotal = timeplayed / 60; - int seconds = timeplayed % 60; - int minutes = minutesTotal % 60; - int hours = minutesTotal / 60; - if(hours != 0) - m_statusCenter->setText(tr("Total playtime: %1h %2m %3s").arg(hours).arg(minutes).arg(seconds)); - else if(minutes != 0) - m_statusCenter->setText(tr("Total playtime: %1m %2s").arg(minutes).arg(seconds)); - else if(seconds != 0) - m_statusCenter->setText(tr("Total playtime: %1s").arg(seconds)); + int timePlayed = LAUNCHER->instances()->getTotalPlayTime(); + if (timePlayed > 0) { + m_statusCenter->setText(tr("Total playtime: %1").arg(Time::prettifyDuration(timePlayed))); + } } diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 11c4dec1..2982a340 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -10,6 +10,7 @@ #include #include #include +#include "MMCTime.h" #include "launch/LaunchTask.h" #include "launch/steps/LookupServerAddress.h" @@ -766,25 +767,6 @@ QString MinecraftInstance::getLogFileRoot() return gameRoot(); } -QString MinecraftInstance::prettifyTimeDuration(int64_t duration) -{ - int seconds = (int) (duration % 60); - duration /= 60; - int minutes = (int) (duration % 60); - duration /= 60; - int hours = (int) (duration % 24); - int days = (int) (duration / 24); - if((hours == 0)&&(days == 0)) - { - return tr("%1m %2s").arg(minutes).arg(seconds); - } - if (days == 0) - { - return tr("%1h %2m").arg(hours).arg(minutes); - } - return tr("%1d %2h %3m").arg(days).arg(hours).arg(minutes); -} - QString MinecraftInstance::getStatusbarDescription() { QStringList traits; @@ -798,11 +780,11 @@ QString MinecraftInstance::getStatusbarDescription() if(m_settings->get("ShowGameTime").toBool()) { if (lastTimePlayed() > 0) { - description.append(tr(", last played for %1").arg(prettifyTimeDuration(lastTimePlayed()))); + description.append(tr(", last played for %1").arg(Time::prettifyDuration(lastTimePlayed()))); } if (totalTimePlayed() > 0) { - description.append(tr(", total played for %1").arg(prettifyTimeDuration(totalTimePlayed()))); + description.append(tr(", total played for %1").arg(Time::prettifyDuration(totalTimePlayed()))); } } if(hasCrashed()) diff --git a/launcher/minecraft/MinecraftInstance.h b/launcher/minecraft/MinecraftInstance.h index cdfd350b..b11270e6 100644 --- a/launcher/minecraft/MinecraftInstance.h +++ b/launcher/minecraft/MinecraftInstance.h @@ -118,9 +118,6 @@ protected: QStringList validLaunchMethods(); QString launchMethod(); -private: - QString prettifyTimeDuration(int64_t duration); - protected: // data std::shared_ptr m_components; mutable std::shared_ptr m_loader_mod_list; From 5bc6dd8f970249c8279d6302f8df56910c599514 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Fri, 1 Oct 2021 23:20:25 +0100 Subject: [PATCH 08/14] NOISSUE Remove lingering full stop in playtime status --- launcher/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/MainWindow.cpp b/launcher/MainWindow.cpp index d394238a..33d9c7f4 100644 --- a/launcher/MainWindow.cpp +++ b/launcher/MainWindow.cpp @@ -748,7 +748,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow connect(LAUNCHER, &Launcher::globalSettingsClosed, this, &MainWindow::globalSettingsClosed); m_statusLeft = new QLabel(tr("No instance selected"), this); - m_statusCenter = new QLabel(tr("Total playtime: 0s."), this); + m_statusCenter = new QLabel(tr("Total playtime: 0s"), this); statusBar()->addPermanentWidget(m_statusLeft, 1); statusBar()->addPermanentWidget(m_statusCenter, 0); From 2e60413f7fa4b5ce376de7abdb3b5e8a4e0a5d28 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 13 Oct 2021 22:14:02 +0100 Subject: [PATCH 09/14] NOISSUE Add option to disable global play time status --- launcher/Launcher.cpp | 1 + launcher/MainWindow.cpp | 3 +++ launcher/pages/global/MinecraftPage.cpp | 3 ++- launcher/pages/global/MinecraftPage.ui | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index 9a1d1ca3..e5deb791 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -644,6 +644,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) // Game time m_settings->registerSetting("ShowGameTime", true); + m_settings->registerSetting("ShowGlobalGameTime", true); m_settings->registerSetting("RecordGameTime", true); // Minecraft launch method diff --git a/launcher/MainWindow.cpp b/launcher/MainWindow.cpp index 33d9c7f4..0c414285 100644 --- a/launcher/MainWindow.cpp +++ b/launcher/MainWindow.cpp @@ -1610,6 +1610,7 @@ void MainWindow::globalSettingsClosed() proxymodel->invalidate(); proxymodel->sort(0); updateToolsMenu(); + updateStatusCenter(); update(); } @@ -1927,6 +1928,8 @@ void MainWindow::checkInstancePathForProblems() void MainWindow::updateStatusCenter() { + m_statusCenter->setVisible(LAUNCHER->settings()->get("ShowGlobalGameTime").toBool()); + int timePlayed = LAUNCHER->instances()->getTotalPlayTime(); if (timePlayed > 0) { m_statusCenter->setText(tr("Total playtime: %1").arg(Time::prettifyDuration(timePlayed))); diff --git a/launcher/pages/global/MinecraftPage.cpp b/launcher/pages/global/MinecraftPage.cpp index 2830dc7c..342941f4 100644 --- a/launcher/pages/global/MinecraftPage.cpp +++ b/launcher/pages/global/MinecraftPage.cpp @@ -54,7 +54,6 @@ void MinecraftPage::on_maximizedCheckBox_clicked(bool checked) updateCheckboxStuff(); } - void MinecraftPage::applySettings() { auto s = LAUNCHER->settings(); @@ -70,6 +69,7 @@ void MinecraftPage::applySettings() // Game time s->set("ShowGameTime", ui->showGameTime->isChecked()); + s->set("ShowGlobalGameTime", ui->showGlobalGameTime->isChecked()); s->set("RecordGameTime", ui->recordGameTime->isChecked()); } @@ -86,5 +86,6 @@ void MinecraftPage::loadSettings() ui->useNativeGLFWCheck->setChecked(s->get("UseNativeGLFW").toBool()); ui->showGameTime->setChecked(s->get("ShowGameTime").toBool()); + ui->showGlobalGameTime->setChecked(s->get("ShowGlobalGameTime").toBool()); ui->recordGameTime->setChecked(s->get("RecordGameTime").toBool()); } diff --git a/launcher/pages/global/MinecraftPage.ui b/launcher/pages/global/MinecraftPage.ui index 2abd4bd4..857b8cfb 100644 --- a/launcher/pages/global/MinecraftPage.ui +++ b/launcher/pages/global/MinecraftPage.ui @@ -147,6 +147,13 @@
+ + + + Show time spent playing across all instances + + + From a6df7d709f4d7cc70ae99f42a60c2afde33db7f8 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 15 Sep 2021 01:43:09 +0100 Subject: [PATCH 10/14] NOISSUE Correct spelling of miscellaneous --- launcher/pages/instance/InstanceSettingsPage.ui | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/pages/instance/InstanceSettingsPage.ui b/launcher/pages/instance/InstanceSettingsPage.ui index e569ce56..35cd7335 100644 --- a/launcher/pages/instance/InstanceSettingsPage.ui +++ b/launcher/pages/instance/InstanceSettingsPage.ui @@ -416,9 +416,9 @@ - + - Miscellanous + Miscellaneous @@ -489,7 +489,7 @@ - + Qt::Vertical From c377ad6025d8a9207eda8a9be4efa995944fbfce Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 15 Sep 2021 01:27:36 +0100 Subject: [PATCH 11/14] NOISSUE Use MiB suffix for memory and permgen --- launcher/widgets/JavaSettingsWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/widgets/JavaSettingsWidget.cpp b/launcher/widgets/JavaSettingsWidget.cpp index 0e292bb8..11f0653a 100644 --- a/launcher/widgets/JavaSettingsWidget.cpp +++ b/launcher/widgets/JavaSettingsWidget.cpp @@ -74,7 +74,7 @@ void JavaSettingsWidget::setupUi() m_minMemSpinBox = new QSpinBox(m_memoryGroupBox); m_minMemSpinBox->setObjectName(QStringLiteral("minMemSpinBox")); - m_minMemSpinBox->setSuffix(QStringLiteral(" MB")); + m_minMemSpinBox->setSuffix(QStringLiteral(" MiB")); m_minMemSpinBox->setMinimum(128); m_minMemSpinBox->setMaximum(m_availableMemory); m_minMemSpinBox->setSingleStep(128); @@ -87,7 +87,7 @@ void JavaSettingsWidget::setupUi() m_maxMemSpinBox = new QSpinBox(m_memoryGroupBox); m_maxMemSpinBox->setObjectName(QStringLiteral("maxMemSpinBox")); - m_maxMemSpinBox->setSuffix(QStringLiteral(" MB")); + m_maxMemSpinBox->setSuffix(QStringLiteral(" MiB")); m_maxMemSpinBox->setMinimum(128); m_maxMemSpinBox->setMaximum(m_availableMemory); m_maxMemSpinBox->setSingleStep(128); @@ -102,7 +102,7 @@ void JavaSettingsWidget::setupUi() m_permGenSpinBox = new QSpinBox(m_memoryGroupBox); m_permGenSpinBox->setObjectName(QStringLiteral("permGenSpinBox")); - m_permGenSpinBox->setSuffix(QStringLiteral(" MB")); + m_permGenSpinBox->setSuffix(QStringLiteral(" MiB")); m_permGenSpinBox->setMinimum(64); m_permGenSpinBox->setMaximum(m_availableMemory); m_permGenSpinBox->setSingleStep(8); From 4b13577a5924d84fc78111e5f857d5538af77fcd Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 24 Oct 2021 00:39:02 +0100 Subject: [PATCH 12/14] GH-4185 Include the modpack version in instance title for modpacks.ch --- launcher/pages/modplatform/atlauncher/AtlPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/pages/modplatform/atlauncher/AtlPage.cpp index 0367bc48..cdf5cc86 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.cpp +++ b/launcher/pages/modplatform/atlauncher/AtlPage.cpp @@ -70,7 +70,7 @@ void AtlPage::suggestCurrent() return; } - dialog->setSuggestedPack(selected.name, new ATLauncher::PackInstallTask(this, selected.safeName, selectedVersion)); + dialog->setSuggestedPack(selected.name + " " + selectedVersion, new ATLauncher::PackInstallTask(this, selected.safeName, selectedVersion)); auto editedLogoName = selected.safeName; auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/images/%1.png").arg(selected.safeName.toLower()); listModel->getLogo(selected.safeName, url, [this, editedLogoName](QString logo) From 41d855fd11a92475c4562b60de1a85b121f00dbf Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 24 Oct 2021 00:39:42 +0100 Subject: [PATCH 13/14] GH-4185 Include the modpack version in instance title for ATLauncher --- launcher/pages/modplatform/ftb/FtbPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp index bafcfac9..620a56d8 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/pages/modplatform/ftb/FtbPage.cpp @@ -85,7 +85,7 @@ void FtbPage::suggestCurrent() return; } - dialog->setSuggestedPack(selected.name, new ModpacksCH::PackInstallTask(selected, selectedVersion)); + dialog->setSuggestedPack(selected.name + " " + selectedVersion, new ModpacksCH::PackInstallTask(selected, selectedVersion)); for(auto art : selected.art) { if(art.type == "square") { QString editedLogoName; From 6f6c9c6f6848f4167410eedc65e309d0231cf37d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 24 Oct 2021 12:25:44 +0200 Subject: [PATCH 14/14] NOISSUE fix debranding changes affecting version file format --- launcher/minecraft/OneSixVersionFormat.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/launcher/minecraft/OneSixVersionFormat.cpp b/launcher/minecraft/OneSixVersionFormat.cpp index 2572c39e..0329d70e 100644 --- a/launcher/minecraft/OneSixVersionFormat.cpp +++ b/launcher/minecraft/OneSixVersionFormat.cpp @@ -16,11 +16,11 @@ static void readString(const QJsonObject &root, const QString &key, QString &var LibraryPtr OneSixVersionFormat::libraryFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename) { LibraryPtr out = MojangVersionFormat::libraryFromJson(problems, libObj, filename); - readString(libObj, "LAUNCHER-hint", out->m_hint); - readString(libObj, "LAUNCHER-absulute_url", out->m_absoluteURL); - readString(libObj, "LAUNCHER-absoluteUrl", out->m_absoluteURL); - readString(libObj, "LAUNCHER-filename", out->m_filename); - readString(libObj, "LAUNCHER-displayname", out->m_displayname); + readString(libObj, "MMC-hint", out->m_hint); + readString(libObj, "MMC-absulute_url", out->m_absoluteURL); + readString(libObj, "MMC-absoluteUrl", out->m_absoluteURL); + readString(libObj, "MMC-filename", out->m_filename); + readString(libObj, "MMC-displayname", out->m_displayname); return out; } @@ -28,13 +28,13 @@ QJsonObject OneSixVersionFormat::libraryToJson(Library *library) { QJsonObject libRoot = MojangVersionFormat::libraryToJson(library); if (library->m_absoluteURL.size()) - libRoot.insert("LAUNCHER-absoluteUrl", library->m_absoluteURL); + libRoot.insert("MMC-absoluteUrl", library->m_absoluteURL); if (library->m_hint.size()) - libRoot.insert("LAUNCHER-hint", library->m_hint); + libRoot.insert("MMC-hint", library->m_hint); if (library->m_filename.size()) - libRoot.insert("LAUNCHER-filename", library->m_filename); + libRoot.insert("MMC-filename", library->m_filename); if (library->m_displayname.size()) - libRoot.insert("LAUNCHER-displayname", library->m_displayname); + libRoot.insert("MMC-displayname", library->m_displayname); return libRoot; }