From 10e7f483478759d5b73cefce4718791d10f12fa9 Mon Sep 17 00:00:00 2001 From: Sambhav Saggi <17993169+sambhavsaggi@users.noreply.github.com> Date: Mon, 8 Mar 2021 09:24:37 -0500 Subject: [PATCH 1/4] Fix #3638 --- BUILD.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.md b/BUILD.md index 7aa1b497..4360fdde 100644 --- a/BUILD.md +++ b/BUILD.md @@ -94,8 +94,8 @@ Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt * [Qt 5.6+ Development tools](http://qt-project.org/downloads) -- Qt Online Installer for Windows - 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 +* [OpenSSL](https://github.com/IndySockets/OpenSSL-Binaries/tree/master/Archive/) -- Win32 OpenSSL, version 1.0.2g (from 2016) + - https://github.com/IndySockets/OpenSSL-Binaries/raw/master/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. From 0c98589a7f9115075f2c51f5ad134dce3d244aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 10 Mar 2021 03:52:35 +0100 Subject: [PATCH 2/4] GH-3602 Create .minecraft before running pre-launch commands --- api/logic/CMakeLists.txt | 4 +-- api/logic/minecraft/MinecraftInstance.cpp | 15 +++++----- .../minecraft/launch/CreateGameFolders.cpp | 28 +++++++++++++++++++ ...ourcePacksFolder.h => CreateGameFolders.h} | 8 +++--- .../CreateServerResourcePacksFolder.cpp | 19 ------------- 5 files changed, 42 insertions(+), 32 deletions(-) create mode 100644 api/logic/minecraft/launch/CreateGameFolders.cpp rename api/logic/minecraft/launch/{CreateServerResourcePacksFolder.h => CreateGameFolders.h} (76%) delete mode 100644 api/logic/minecraft/launch/CreateServerResourcePacksFolder.cpp diff --git a/api/logic/CMakeLists.txt b/api/logic/CMakeLists.txt index 84438a6b..3193d813 100644 --- a/api/logic/CMakeLists.txt +++ b/api/logic/CMakeLists.txt @@ -226,8 +226,8 @@ set(MINECRAFT_SOURCES minecraft/launch/ClaimAccount.cpp minecraft/launch/ClaimAccount.h - minecraft/launch/CreateServerResourcePacksFolder.cpp - minecraft/launch/CreateServerResourcePacksFolder.h + minecraft/launch/CreateGameFolders.cpp + minecraft/launch/CreateGameFolders.h minecraft/launch/ModMinecraftJar.cpp minecraft/launch/ModMinecraftJar.h minecraft/launch/DirectJavaLaunch.cpp diff --git a/api/logic/minecraft/MinecraftInstance.cpp b/api/logic/minecraft/MinecraftInstance.cpp index 5fda2f4b..b0343316 100644 --- a/api/logic/minecraft/MinecraftInstance.cpp +++ b/api/logic/minecraft/MinecraftInstance.cpp @@ -1,5 +1,5 @@ #include "MinecraftInstance.h" -#include +#include #include #include #include @@ -38,6 +38,7 @@ #include "MinecraftUpdate.h" #include "MinecraftLoadAndCheck.h" #include +#include #define IBUS "@im=ibus" @@ -810,6 +811,11 @@ shared_qobject_ptr MinecraftInstance::createLaunchTask(AuthSessionPt return process; } + // create the .minecraft folder and server-resource-packs (workaround for Minecraft bug MCL-3732) + { + process->appendStep(new CreateGameFolders(pptr)); + } + // run pre-launch command if that's needed if(getPreLaunchCommand().size()) { @@ -834,7 +840,7 @@ shared_qobject_ptr MinecraftInstance::createLaunchTask(AuthSessionPt process->appendStep(new ModMinecraftJar(pptr)); } - // if there are any jar mods + // Scan mods folders for mods { process->appendStep(new ScanModFolders(pptr)); } @@ -844,11 +850,6 @@ shared_qobject_ptr MinecraftInstance::createLaunchTask(AuthSessionPt process->appendStep(new PrintInstanceInfo(pptr, session)); } - // create the server-resource-packs folder (workaround for Minecraft bug MCL-3732) - { - process->appendStep(new CreateServerResourcePacksFolder(pptr)); - } - // extract native jars if needed { process->appendStep(new ExtractNatives(pptr)); diff --git a/api/logic/minecraft/launch/CreateGameFolders.cpp b/api/logic/minecraft/launch/CreateGameFolders.cpp new file mode 100644 index 00000000..415b7e23 --- /dev/null +++ b/api/logic/minecraft/launch/CreateGameFolders.cpp @@ -0,0 +1,28 @@ +#include "CreateGameFolders.h" +#include "minecraft/MinecraftInstance.h" +#include "launch/LaunchTask.h" +#include "FileSystem.h" + +CreateGameFolders::CreateGameFolders(LaunchTask* parent): LaunchStep(parent) +{ +} + +void CreateGameFolders::executeTask() +{ + auto instance = m_parent->instance(); + std::shared_ptr minecraftInstance = std::dynamic_pointer_cast(instance); + + if(!FS::ensureFolderPathExists(minecraftInstance->gameRoot())) + { + emit logLine("Couldn't create the main game folder", MessageLevel::Error); + emitFailed("Couldn't create the main game folder"); + return; + } + + // HACK: this is a workaround for MCL-3732 - 'server-resource-packs' folder is created. + if(!FS::ensureFolderPathExists(FS::PathCombine(minecraftInstance->gameRoot(), "server-resource-packs"))) + { + emit logLine("Couldn't create the 'server-resource-packs' folder", MessageLevel::Error); + } + emitSucceeded(); +} diff --git a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h b/api/logic/minecraft/launch/CreateGameFolders.h similarity index 76% rename from api/logic/minecraft/launch/CreateServerResourcePacksFolder.h rename to api/logic/minecraft/launch/CreateGameFolders.h index d6b9e15a..9c7d3c94 100644 --- a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h +++ b/api/logic/minecraft/launch/CreateGameFolders.h @@ -19,13 +19,13 @@ #include #include -// HACK: this is a workaround for MCL-3732 - 'server-resource-packs' folder is created. -class CreateServerResourcePacksFolder: public LaunchStep +// Create the main .minecraft for the instance and any other necessary folders +class CreateGameFolders: public LaunchStep { Q_OBJECT public: - explicit CreateServerResourcePacksFolder(LaunchTask *parent); - virtual ~CreateServerResourcePacksFolder() {}; + explicit CreateGameFolders(LaunchTask *parent); + virtual ~CreateGameFolders() {}; virtual void executeTask(); virtual bool canAbort() const diff --git a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.cpp b/api/logic/minecraft/launch/CreateServerResourcePacksFolder.cpp deleted file mode 100644 index ae426e31..00000000 --- a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "CreateServerResourcePacksFolder.h" -#include "minecraft/MinecraftInstance.h" -#include "launch/LaunchTask.h" -#include "FileSystem.h" - -CreateServerResourcePacksFolder::CreateServerResourcePacksFolder(LaunchTask* parent): LaunchStep(parent) -{ -} - -void CreateServerResourcePacksFolder::executeTask() -{ - auto instance = m_parent->instance(); - std::shared_ptr minecraftInstance = std::dynamic_pointer_cast(instance); - if(!FS::ensureFolderPathExists(FS::PathCombine(minecraftInstance->gameRoot(), "server-resource-packs"))) - { - emit logLine(tr("Couldn't create the 'server-resource-packs' folder"), MessageLevel::Error); - } - emitSucceeded(); -} From 84c673c5ba6178afda85dbc9a4a83d9e5fcf5d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 10 Mar 2021 03:57:36 +0100 Subject: [PATCH 3/4] GH-3467 fix stall-out in ScanModFolders when the folders don't exist --- api/logic/minecraft/launch/ScanModFolders.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/logic/minecraft/launch/ScanModFolders.cpp b/api/logic/minecraft/launch/ScanModFolders.cpp index f792efcd..2a0e21b3 100644 --- a/api/logic/minecraft/launch/ScanModFolders.cpp +++ b/api/logic/minecraft/launch/ScanModFolders.cpp @@ -27,11 +27,16 @@ void ScanModFolders::executeTask() auto loaders = m_inst->loaderModList(); connect(loaders.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::modsDone); - loaders->update(); + if(!loaders->update()) { + m_modsDone = true; + } auto cores = m_inst->coreModList(); connect(cores.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::coreModsDone); - cores->update(); + if(!cores->update()) { + m_coreModsDone = true; + } + checkDone(); } void ScanModFolders::modsDone() From 613afce7055e4b106a322bf5e4163c05bdbc337f Mon Sep 17 00:00:00 2001 From: AppleTheGolden Date: Tue, 9 Mar 2021 18:25:08 +0100 Subject: [PATCH 4/4] NOISSUE add github issue forms --- .github/ISSUE_TEMPLATE.md | 51 -------------------------- .github/ISSUE_TEMPLATE/bug_report.yml | 52 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++ .github/ISSUE_TEMPLATE/suggestion.yml | 41 +++++++++++++++++++++ 4 files changed, 98 insertions(+), 51 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/suggestion.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 58596fa0..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,51 +0,0 @@ - - -System Information ------------------------------ -MultiMC version: - -Operating System: - -Summary of the issue or suggestion: ----------------------------------------------- - - -What should happen: ------------------------------- - - -Steps to reproduce the issue (Add more if needed): -------------------------------------------------------------- -1. - -2. - -3. - -Suspected cause: ---------------------------- - - -Logs/Screenshots: ----------------------------- -[//]: # (Please refer to https://github.com/MultiMC/MultiMC5/wiki/Log-Upload for instructions on how to attach your logs.) - - -Additional Info: ---------------------------- diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..7e894785 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,52 @@ +name: Bug Report +description: File a bug report +labels: [bug, needs-triage] +issue_body: false +body: +- type: markdown + attributes: + value: | + If you need help with running Minecraft, please visit us [on our Discord](https://discord.gg/multimc) before making a bug report. + + Before submitting a bug report, please make sure you have read this *entire* form, and that: + * You have read the [FAQ](https://github.com/MultiMC/MultiMC5/wiki/FAQ) and it has not answered your question + * Your bug is not caused by Minecraft or any mods you have installed. + * Your issue has not been reported before, [make sure to use the search function!](https://github.com/MultiMC/MultiMC5/issues) + + **Do not forget to give your issue a descriptive title.** "Bug in the instance screen" makes it hard to distinguish issues at a glance. +- type: dropdown + attributes: + label: Operating System + description: If you know this bug occurs on multiple operating systems, select all you have tested. + multiple: true + options: + - Windows + - macOS + - Linux + - Other +- type: textarea + attributes: + label: Description of bug + description: What did you expect to happen, what happened, and why is it incorrect? + placeholder: The cat button should show a cat, but it showed a dog instead! + validations: + required: true +- type: textarea + attributes: + label: Steps to reproduce + description: A bulleted list, or an exported instance if relevant. + placeholder: "* Press the cat button" + validations: + required: true +- type: textarea + attributes: + label: Suspected cause + description: If you know what could be causing this bug, describe it here. + validations: + required: false +- type: checkboxes + attributes: + label: This issue is unique + options: + - label: I have searched the issue tracker and did not find an issue describing my bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..089f1eb5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: MultiMC Discord + url: https://discord.gg/multimc + about: Please ask for support here before opening an issue. diff --git a/.github/ISSUE_TEMPLATE/suggestion.yml b/.github/ISSUE_TEMPLATE/suggestion.yml new file mode 100644 index 00000000..ab2449a0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/suggestion.yml @@ -0,0 +1,41 @@ +name: Suggestion +description: Make a suggestion +labels: [idea, needs-triage] +issue_body: true +body: +- type: markdown + attributes: + value: | + ### Use this form to suggest a feature for MultiMC. +- type: input + attributes: + label: Role + description: In what way do you use MultiMC that needs this feature? + placeholder: I play modded Minecraft. + validations: + required: true +- type: input + attributes: + label: Suggestion + description: What do you want MultiMC to do? + placeholder: I want the cat button to meow. + validations: + required: true +- type: input + attributes: + label: Benefit + description: Why do you need MultiMC to do this? + placeholder: so that I can always hear a cat when I need to. + validations: + required: true +- type: checkboxes + attributes: + label: This suggestion is unique + options: + - label: I have searched the issue tracker and did not find an issue describing my suggestion, especially not one that has been rejected. + required: true +- type: markdown + attributes: + value: | + ### You may use the editor below to elaborate further. +# The issue_body: true up there makes the standard WYSIWYG editor for issues show up down here.