diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 247675fca..6d05e3da5 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1 @@
-open_collective: polymc
+open_collective: prismlauncher
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index ab3c8a29f..ea1fbfdd9 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -8,9 +8,9 @@ body:
If you need help with running Minecraft, please visit us on our Discord 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 [PolyMC wiki](https://polymc.org/wiki/) and it has not answered your question.
+ * You have read the [Prism Launcher wiki](https://prismlauncher.org/wiki/) 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/PolyMC/PolyMC/issues)
+ * Your issue has not been reported before, [make sure to use the search function!](https://github.com/PrismLauncher/PrismLauncher/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
@@ -25,15 +25,15 @@ body:
- Other
- type: textarea
attributes:
- label: Version of PolyMC
- description: The version of PolyMC used in the bug report.
- placeholder: PolyMC 1.4.1
+ label: Version of Prism Launcher
+ description: The version of Prism Launcher used in the bug report.
+ placeholder: Prism Launcher 5.0
validations:
required: true
- type: textarea
attributes:
label: Version of Qt
- description: The version of Qt used in the bug report. You can find it in Help -> About PolyMC -> About Qt.
+ description: The version of Qt used in the bug report. You can find it in Help -> About Prism Launcher -> About Qt.
placeholder: Qt 6.3.0
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 932d0c8f9..97a55db33 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- - name: PolyMC Matrix Support Room
- url: https://matrix.to/#/#support:polymc.org
+ - name: Prism Launcher Matrix Support Room
+ url: https://matrix.to/#/#prism-support:matrix.org
about: Please ask for support here before opening an issue.
diff --git a/.github/ISSUE_TEMPLATE/rfc.yml b/.github/ISSUE_TEMPLATE/rfc.yml
index 0a40d01da..fa7cdbe61 100644
--- a/.github/ISSUE_TEMPLATE/rfc.yml
+++ b/.github/ISSUE_TEMPLATE/rfc.yml
@@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
- ### Use this form to suggest a larger change for PolyMC.
+ ### Use this form to suggest a larger change for Prism Launcher.
- type: textarea
attributes:
label: Goal
@@ -18,7 +18,7 @@ body:
attributes:
label: Motivation
description: |
- Introduce the topic. If this is a not-well-known section of PolyMC, a detailed explanation of the background is recommended.
+ Introduce the topic. If this is a not-well-known section of Prism Launcher, a detailed explanation of the background is recommended.
Some example points of discussion:
- What specific problems are you facing right now that you're trying to address?
- Are there any previous discussions? Link to them and summarize them (don't force your readers to read them though!).
diff --git a/.github/ISSUE_TEMPLATE/suggestion.yml b/.github/ISSUE_TEMPLATE/suggestion.yml
index 48f157b3f..ddee86b65 100644
--- a/.github/ISSUE_TEMPLATE/suggestion.yml
+++ b/.github/ISSUE_TEMPLATE/suggestion.yml
@@ -5,25 +5,25 @@ body:
- type: markdown
attributes:
value: |
- ### Use this form to suggest a feature for PolyMC.
+ ### Use this form to suggest a feature for Prism Launcher.
- type: input
attributes:
label: Role
- description: In what way do you use PolyMC that needs this feature?
+ description: In what way do you use Prism Launcher that needs this feature?
placeholder: I play modded Minecraft.
validations:
required: true
- type: input
attributes:
label: Suggestion
- description: What do you want PolyMC to do?
+ description: What do you want Prism Launcher to do?
placeholder: I want the cat button to meow.
validations:
required: true
- type: input
attributes:
label: Benefit
- description: Why do you need PolyMC to do this?
+ description: Why do you need Prism Launcher to do this?
placeholder: so that I can always hear a cat when I need to.
validations:
required: true
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..41f0604e4
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,9 @@
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 04c34754c..b6400791d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -104,7 +104,7 @@ jobs:
- name: Setup ccache
if: runner.os != 'Windows' && inputs.build_type == 'Debug'
- uses: hendrikmuhs/ccache-action@v1.2.1
+ uses: hendrikmuhs/ccache-action@v1.2.3
with:
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
@@ -126,7 +126,7 @@ jobs:
- name: Retrieve ccache cache (Windows)
if: runner.os == 'Windows' && inputs.build_type == 'Debug'
- uses: actions/cache@v3.0.2
+ uses: actions/cache@v3.0.11
with:
path: '${{ github.workspace }}\.ccache'
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml
index 55b4fdd4f..8adaa5e52 100644
--- a/.github/workflows/trigger_builds.yml
+++ b/.github/workflows/trigger_builds.yml
@@ -3,7 +3,7 @@ name: Build Application
on:
push:
branches-ignore:
- - 'stable'
+ - 'renovate/**'
paths-ignore:
- '**.md'
- '**/LICENSE'
diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml
index 476280df8..e74e870aa 100644
--- a/.github/workflows/trigger_release.yml
+++ b/.github/workflows/trigger_release.yml
@@ -65,7 +65,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
- name: PrismLauncher ${{ env.VERSION }}
+ name: Prism Launcher ${{ env.VERSION }}
draft: true
prerelease: false
files: |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e149ce10..97bad31b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,7 +71,7 @@ endif()
##################################### Set Application options #####################################
######## Set URLs ########
-set(Launcher_NEWS_RSS_URL "https://prismlauncher.org/feed/feed.xml" CACHE STRING "URL to fetch PrismLauncher's news RSS feed from.")
+set(Launcher_NEWS_RSS_URL "https://prismlauncher.org/feed/feed.xml" CACHE STRING "URL to fetch Prism Launcher's news RSS feed from.")
set(Launcher_NEWS_OPEN_URL "https://prismlauncher.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'")
set(Launcher_HELP_URL "https://prismlauncher.org/wiki/help-pages/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help")
@@ -99,7 +99,7 @@ set(Launcher_IMGUR_CLIENT_ID "5b97b0713fba4a3" CACHE STRING "Client ID you can g
set(Launcher_BUG_TRACKER_URL "https://github.com/PrismLauncher/PrismLauncher/issues" CACHE STRING "URL for the bug tracker.")
# Translations Platform URL
-set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/prismlauncher/prismlauncher/" CACHE STRING "URL for the translations platform.")
+set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/prismlauncher/launcher/" CACHE STRING "URL for the translations platform.")
# Matrix Space
set(Launcher_MATRIX_URL "https://matrix.to/#/#prismlauncher:matrix.org" CACHE STRING "URL to the Matrix Space")
@@ -249,7 +249,7 @@ if(UNIX AND APPLE)
elseif(UNIX)
set(BINARY_DEST_DIR "bin")
set(LIBRARY_DEST_DIR "lib${LIB_SUFFIX}")
- set(JARS_DEST_DIR "share/jars")
+ set(JARS_DEST_DIR "share/${Launcher_APP_BINARY_NAME}")
set(LAUNCHER_DESKTOP_DEST_DIR "share/applications" CACHE STRING "Path to the desktop file directory")
set(LAUNCHER_METAINFO_DEST_DIR "share/metainfo" CACHE STRING "Path to the metainfo directory")
set(LAUNCHER_ICON_DEST_DIR "share/icons/hicolor/scalable/apps" CACHE STRING "Path to the scalable icon directory")
diff --git a/README.md b/README.md
index dbcf809ca..d7df8e264 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,87 @@
-# Prism Launcher
+
+
+
+
Prism Launcher is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
-We are working on a website and other media, for more info we have a [Discord server](https://discord.gg/hX4g537UNE). Logo and branding also coming soon.
+This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC.
## Installation
-- All downloads and instructions for Prism Launcher will soon be available.
-- Last build status:
+- All downloads and instructions for Prism Launcher can be found [on our website](https://prismlauncher.org/download/).
+- Last build status can be found [here](https://github.com/PrismLauncher/PrismLauncher/actions).
### Development Builds
There are development builds available [here](https://github.com/PrismLauncher/PrismLauncher/actions). These have debug information in the binaries, so their file sizes are relatively larger.
-Portable builds are provided for AppImage on Linux, Windows, and macOS.
+Portable builds are provided for on Linux, Windows, and macOS.
+For Debian and Arch, you can use these packages for the latest development versions:
+[![prismlauncher-git](https://img.shields.io/badge/aur-prismlauncher--git-blue)](https://aur.archlinux.org/packages/prismlauncher-git/)
+[![prismlauncher-git](https://img.shields.io/badge/mpr-prismlauncher--git-orange)](https://mpr.makedeb.org/packages/prismlauncher-git)
## Help & Support
-- Join the [Discord Server](https://discord.gg/hX4g537UNE) for now.
+Feel free to create an issue if you need help. However, you might find it easier to ask in the Discord server.
+
+[![Prism Launcher Discord server](https://discordapp.com/api/guilds/1031648380885147709/widget.png?style=banner3)](https://discord.gg/prismlauncher)
+
+We will also soon be opening up our Matrix channels.
+You can already join our Matrix space:
+
+[![PrismLauncher Space](https://img.shields.io/matrix/prismlauncher:matrix.org?label=PrismLauncher%20space)](https://matrix.to/#/#prismlauncher:matrix.org)
+
+We also have a subreddit you can post your issues and suggestions on:
+
+[r/PrismLauncher](https://www.reddit.com/r/PrismLauncher/)
+
+## Building
+
+If you want to build Prism Launcher yourself, check [Build Instructions](https://prismlauncher.org/wiki/development/build-instructions/) for build instructions.
+
+## Translations
+
+The translation effort for PrismLauncher is hosted on [Weblate](https://hosted.weblate.org/projects/prismlauncher/launcher/) and information about translating Prism Launcher is available at
+
+## Forking/Redistributing/Custom builds policy
+
+We don't care what you do with your fork/custom build as long as you follow the terms of the [license](LICENSE) (this is a legal responsibility), and if you made code changes rather than just packaging a custom build, please do the following as a basic courtesy:
+
+- Make it clear that your fork is not PrismLauncher and is not endorsed by or affiliated with the PrismLauncher project ().
+- Go through [CMakeLists.txt](CMakeLists.txt) and change PrismLauncher's API keys to your own or set them to empty strings (`""`) to disable them (this way the program will still compile but the functionality requiring those keys will be disabled).
+
+If you have any questions or want any clarification on the above conditions please make an issue and ask us.
+
+Be aware that if you build this software without removing the provided API keys in [CMakeLists.txt](CMakeLists.txt) you are accepting the following terms and conditions:
+
+- [Microsoft Identity Platform Terms of Use](https://docs.microsoft.com/en-us/legal/microsoft-identity-platform/terms-of-use)
+- [CurseForge 3rd Party API Terms and Conditions](https://support.curseforge.com/en/support/solutions/articles/9000207405-curse-forge-3rd-party-api-terms-and-conditions)
+
+If you do not agree with these terms and conditions, then remove the associated API keys from the [CMakeLists.txt](CMakeLists.txt) file by setting them to an empty string (`""`).
## License
All launcher code is available under the GPL-3.0-only license.
+
+The logo and related assets are under the CC BY-SA 4.0 license.
+
+## Sponsors
+
+Thanks to JetBrains for providing us a few licenses for all their products, as part of their [Open Source program](https://www.jetbrains.com/opensource/).
+
+[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/opensource/)
+
+Thanks to Weblate for hosting our translation efforts.
+
+
+
+
+
+Thanks to Netlify for providing us their excellent web services, as part of their [Open Source program](https://www.netlify.com/open-source/)
+
+
+
+Thanks to the awesome people over at [MacStadium](https://www.macstadium.com/), for providing M1-Macs for development purposes!
+
+
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 50e5e8a4b..b8fa51339 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -42,6 +42,7 @@ Config::Config()
{
// Name and copyright
LAUNCHER_NAME = "@Launcher_Name@";
+ LAUNCHER_APP_BINARY_NAME = "@Launcher_APP_BINARY_NAME@";
LAUNCHER_DISPLAYNAME = "@Launcher_DisplayName@";
LAUNCHER_COPYRIGHT = "@Launcher_Copyright@";
LAUNCHER_DOMAIN = "@Launcher_Domain@";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index ef384ed20..13ccdaa18 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -44,6 +44,7 @@ class Config {
public:
Config();
QString LAUNCHER_NAME;
+ QString LAUNCHER_APP_BINARY_NAME;
QString LAUNCHER_DISPLAYNAME;
QString LAUNCHER_COPYRIGHT;
QString LAUNCHER_DOMAIN;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index e94e96a9d..97f757f7c 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -488,7 +488,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Initialize application settings
{
- m_settings.reset(new INISettingsObject(BuildConfig.LAUNCHER_CONFIGFILE, this));
+ // Provide a fallback for migration from PolyMC
+ m_settings.reset(new INISettingsObject({ BuildConfig.LAUNCHER_CONFIGFILE, "polymc.cfg", "multimc.cfg" }, this));
// Updates
// Multiple channels are separated by spaces
m_settings->registerSetting("UpdateChannel", BuildConfig.VERSION_CHANNEL);
@@ -815,6 +816,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_metacache->addBase("FlamePacks", QDir("cache/FlamePacks").absolutePath());
m_metacache->addBase("FlameMods", QDir("cache/FlameMods").absolutePath());
m_metacache->addBase("ModrinthPacks", QDir("cache/ModrinthPacks").absolutePath());
+ m_metacache->addBase("ModrinthModpacks", QDir("cache/ModrinthModpacks").absolutePath());
m_metacache->addBase("root", QDir::currentPath());
m_metacache->addBase("translations", QDir("translations").absolutePath());
m_metacache->addBase("icons", QDir("cache/icons").absolutePath());
@@ -1569,7 +1571,7 @@ QString Application::getJarPath(QString jarFile)
{
QStringList potentialPaths = {
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
- FS::PathCombine(m_rootPath, "share/jars"),
+ FS::PathCombine(m_rootPath, "share/" + BuildConfig.LAUNCHER_APP_BINARY_NAME),
#endif
FS::PathCombine(m_rootPath, "jars"),
FS::PathCombine(applicationDirPath(), "jars")
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 6ad91a85d..79ac49c76 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -854,6 +854,10 @@ SET(LAUNCHER_SOURCES
ui/widgets/PageContainer.cpp
ui/widgets/PageContainer.h
ui/widgets/PageContainer_p.h
+ ui/widgets/ProjectDescriptionPage.h
+ ui/widgets/ProjectDescriptionPage.cpp
+ ui/widgets/VariableSizedImageObject.h
+ ui/widgets/VariableSizedImageObject.cpp
ui/widgets/ProjectItem.h
ui/widgets/ProjectItem.cpp
ui/widgets/VersionListView.cpp
diff --git a/launcher/java/JavaUtils.cpp b/launcher/java/JavaUtils.cpp
index 6096e8122..040fe8210 100644
--- a/launcher/java/JavaUtils.cpp
+++ b/launcher/java/JavaUtils.cpp
@@ -441,7 +441,7 @@ QList JavaUtils::FindJavaPaths()
scanJavaDir("/usr/lib/jvm");
scanJavaDir("/usr/lib64/jvm");
scanJavaDir("/usr/lib32/jvm");
- // javas stored in PolyMC's folder
+ // javas stored in Prism Launcher's folder
scanJavaDir("java");
// manually installed JDKs in /opt
scanJavaDir("/opt/jdk");
diff --git a/launcher/minecraft/Library.h b/launcher/minecraft/Library.h
index 950aec9d7..26dbf962d 100644
--- a/launcher/minecraft/Library.h
+++ b/launcher/minecraft/Library.h
@@ -194,7 +194,7 @@ public: /* methods */
QString getCompatibleNative(const RuntimeContext & runtimeContext) const;
private: /* methods */
- /// the default storage prefix used by PolyMC
+ /// the default storage prefix used by Prism Launcher
static QString defaultStoragePrefix();
/// Get the prefix - root of the storage to be used
@@ -215,23 +215,23 @@ protected: /* data */
/// DEPRECATED URL prefix of the maven repo where the file can be downloaded
QString m_repositoryURL;
- /// DEPRECATED: PolyMC-specific absolute URL. takes precedence over the implicit maven repo URL, if defined
+ /// DEPRECATED: Prism Launcher-specific absolute URL. takes precedence over the implicit maven repo URL, if defined
QString m_absoluteURL;
- /// PolyMC extension - filename override
+ /// Prism Launcher extension - filename override
QString m_filename;
- /// DEPRECATED PolyMC extension - display name
+ /// DEPRECATED Prism Launcher extension - display name
QString m_displayname;
/**
- * PolyMC-specific type hint - modifies how the library is treated
+ * Prism Launcher-specific type hint - modifies how the library is treated
*/
QString m_hint;
/**
- * storage - by default the local libraries folder in polymc, but could be elsewhere
- * PolyMC specific, because of FTB.
+ * storage - by default the local libraries folder in Prism Launcher, but could be elsewhere
+ * Prism Launcher specific, because of FTB.
*/
QString m_storagePrefix;
diff --git a/launcher/minecraft/VersionFile.h b/launcher/minecraft/VersionFile.h
index e1b62f6a4..11c5a3af3 100644
--- a/launcher/minecraft/VersionFile.h
+++ b/launcher/minecraft/VersionFile.h
@@ -62,19 +62,19 @@ public: /* methods */
void applyTo(LaunchProfile* profile, const RuntimeContext & runtimeContext);
public: /* data */
- /// PolyMC: order hint for this version file if no explicit order is set
+ /// Prism Launcher: order hint for this version file if no explicit order is set
int order = 0;
- /// PolyMC: human readable name of this package
+ /// Prism Launcher: human readable name of this package
QString name;
- /// PolyMC: package ID of this package
+ /// Prism Launcher: package ID of this package
QString uid;
- /// PolyMC: version of this package
+ /// Prism Launcher: version of this package
QString version;
- /// PolyMC: DEPRECATED dependency on a Minecraft version
+ /// Prism Launcher: DEPRECATED dependency on a Minecraft version
QString dependsOnMinecraftVersion;
/// Mojang: DEPRECATED used to version the Mojang version format
@@ -86,13 +86,13 @@ public: /* data */
/// Mojang: class to launch Minecraft with
QString mainClass;
- /// PolyMC: class to launch legacy Minecraft with (embed in a custom window)
+ /// Prism Launcher: class to launch legacy Minecraft with (embed in a custom window)
QString appletClass;
/// Mojang: Minecraft launch arguments (may contain placeholders for variable substitution)
QString minecraftArguments;
- /// PolyMC: Additional JVM launch arguments
+ /// Prism Launcher: Additional JVM launch arguments
QStringList addnJvmArguments;
/// Mojang: list of compatible java majors
@@ -110,38 +110,38 @@ public: /* data */
/// Mojang: DEPRECATED asset group to be used with Minecraft
QString assets;
- /// PolyMC: list of tweaker mod arguments for launchwrapper
+ /// Prism Launcher: list of tweaker mod arguments for launchwrapper
QStringList addTweakers;
/// Mojang: list of libraries to add to the version
QList libraries;
- /// PolyMC: list of maven files to put in the libraries folder, but not in classpath
+ /// Prism Launcher: list of maven files to put in the libraries folder, but not in classpath
QList mavenFiles;
- /// PolyMC: list of agents to add to JVM arguments
+ /// Prism Launcher: list of agents to add to JVM arguments
QList agents;
/// The main jar (Minecraft version library, normally)
LibraryPtr mainJar;
- /// PolyMC: list of attached traits of this version file - used to enable features
+ /// Prism Launcher: list of attached traits of this version file - used to enable features
QSet traits;
- /// PolyMC: list of jar mods added to this version
+ /// Prism Launcher: list of jar mods added to this version
QList jarMods;
- /// PolyMC: list of mods added to this version
+ /// Prism Launcher: list of mods added to this version
QList mods;
/**
- * PolyMC: set of packages this depends on
+ * Prism Launcher: set of packages this depends on
* NOTE: this is shared with the meta format!!!
*/
Meta::RequireSet requires;
/**
- * PolyMC: set of packages this conflicts with
+ * Prism Launcher: set of packages this conflicts with
* NOTE: this is shared with the meta format!!!
*/
Meta::RequireSet conflicts;
diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h
index 8136a92ed..a8c3529ac 100644
--- a/launcher/minecraft/auth/AccountList.h
+++ b/launcher/minecraft/auth/AccountList.h
@@ -44,7 +44,7 @@
/*!
* List of available Mojang accounts.
- * This should be loaded in the background by PolyMC on startup.
+ * This should be loaded in the background by Prism Launcher on startup.
*/
class AccountList : public QAbstractListModel
{
diff --git a/launcher/minecraft/auth/MinecraftAccount.h b/launcher/minecraft/auth/MinecraftAccount.h
index 7777f8465..0dcaeb531 100644
--- a/launcher/minecraft/auth/MinecraftAccount.h
+++ b/launcher/minecraft/auth/MinecraftAccount.h
@@ -61,7 +61,7 @@ Q_DECLARE_METATYPE(MinecraftAccountPtr)
* A profile within someone's Mojang account.
*
* Currently, the profile system has not been implemented by Mojang yet,
- * but we might as well add some things for it in PolyMC right now so
+ * but we might as well add some things for it in Prism Launcher right now so
* we don't have to rip the code to pieces to add it later.
*/
struct AccountProfile
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index ce477ad7b..1d8d70833 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -154,7 +154,7 @@ void LauncherPartLaunch::executeTask()
#else
args << classPath.join(':');
#endif
- args << "org.polymc.EntryPoint";
+ args << "org.prismlauncher.EntryPoint";
qDebug() << args.join(' ');
diff --git a/launcher/minecraft/launch/MinecraftServerTarget.cpp b/launcher/minecraft/launch/MinecraftServerTarget.cpp
index 78a333594..a3383ec08 100644
--- a/launcher/minecraft/launch/MinecraftServerTarget.cpp
+++ b/launcher/minecraft/launch/MinecraftServerTarget.cpp
@@ -23,7 +23,7 @@ MinecraftServerTarget MinecraftServerTarget::parse(const QString &fullAddress) {
// The logic below replicates the exact logic minecraft uses for parsing server addresses.
// While the conversion is not lossless and eats errors, it ensures the same behavior
- // within Minecraft and PolyMC when entering server addresses.
+ // within Minecraft and Prism Launcher when entering server addresses.
if (fullAddress.startsWith("["))
{
int bracket = fullAddress.indexOf("]");
diff --git a/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp b/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
index a553eafd1..68d759436 100644
--- a/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
+++ b/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
@@ -736,7 +736,12 @@ void PackInstallTask::downloadMods()
QVector selectedMods;
if (!optionalMods.isEmpty()) {
setStatus(tr("Selecting optional mods..."));
- selectedMods = m_support->chooseOptionalMods(m_version, optionalMods);
+ auto mods = m_support->chooseOptionalMods(m_version, optionalMods);
+ if (!mods.has_value()) {
+ emitAborted();
+ return;
+ }
+ selectedMods = mods.value();
}
setStatus(tr("Downloading mods..."));
diff --git a/launcher/modplatform/atlauncher/ATLPackInstallTask.h b/launcher/modplatform/atlauncher/ATLPackInstallTask.h
index ed4436f07..78cd87fb1 100644
--- a/launcher/modplatform/atlauncher/ATLPackInstallTask.h
+++ b/launcher/modplatform/atlauncher/ATLPackInstallTask.h
@@ -62,7 +62,7 @@ public:
/**
* Requests a user interaction to select which optional mods should be installed.
*/
- virtual QVector chooseOptionalMods(PackVersion version, QVector mods) = 0;
+ virtual std::optional> chooseOptionalMods(PackVersion version, QVector mods) = 0;
/**
* Requests a user interaction to select a component version from a given version list
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index 058d24712..c50abb8f2 100644
--- a/launcher/modplatform/flame/FileResolvingTask.cpp
+++ b/launcher/modplatform/flame/FileResolvingTask.cpp
@@ -9,9 +9,12 @@ Flame::FileResolvingTask::FileResolvingTask(const shared_qobject_ptrabort();
- return true;
+ aborted &= m_dljob->abort();
+ if (m_checkJob)
+ aborted &= m_checkJob->abort();
+ return aborted ? Task::abort() : false;
}
void Flame::FileResolvingTask::executeTask()
@@ -39,7 +42,7 @@ void Flame::FileResolvingTask::netJobFinished()
setProgress(1, 3);
int index = 0;
// job to check modrinth for blocked projects
- auto job = new NetJob("Modrinth check", m_network);
+ m_checkJob = new NetJob("Modrinth check", m_network);
blockedProjects = QMap();
auto doc = Json::requireDocument(*result);
auto array = Json::requireArray(doc.object()["data"]);
@@ -59,15 +62,15 @@ void Flame::FileResolvingTask::netJobFinished()
out.resolved = true;
});
- job->addNetAction(dl);
+ m_checkJob->addNetAction(dl);
blockedProjects.insert(&out, output);
}
}
index++;
}
- connect(job, &NetJob::finished, this, &Flame::FileResolvingTask::modrinthCheckFinished);
+ connect(m_checkJob.get(), &NetJob::finished, this, &Flame::FileResolvingTask::modrinthCheckFinished);
- job->start();
+ m_checkJob->start();
}
void Flame::FileResolvingTask::modrinthCheckFinished() {
diff --git a/launcher/modplatform/flame/FileResolvingTask.h b/launcher/modplatform/flame/FileResolvingTask.h
index f71b87ceb..8fc17ea91 100644
--- a/launcher/modplatform/flame/FileResolvingTask.h
+++ b/launcher/modplatform/flame/FileResolvingTask.h
@@ -30,8 +30,9 @@ protected slots:
private: /* data */
shared_qobject_ptr m_network;
Flame::Manifest m_toProcess;
- std::shared_ptr result;
+ std::shared_ptr result;
NetJob::Ptr m_dljob;
+ NetJob::Ptr m_checkJob;
void modrinthCheckFinished();
diff --git a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
index 209ad884a..06b3788b7 100644
--- a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
@@ -65,48 +65,42 @@ void PackInstallTask::executeTask()
void PackInstallTask::downloadPack()
{
setStatus(tr("Downloading zip for %1").arg(m_pack.name));
+ setAbortable(false);
+
+ archivePath = QString("%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
- auto packoffset = QString("%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
- auto entry = APPLICATION->metacache()->resolveEntry("FTBPacks", packoffset);
netJobContainer = new NetJob("Download FTB Pack", m_network);
-
- entry->setStale(true);
QString url;
- if(m_pack.type == PackType::Private)
- {
- url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "privatepacks/%1").arg(packoffset);
+ if (m_pack.type == PackType::Private) {
+ url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "privatepacks/%1").arg(archivePath);
+ } else {
+ url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "modpacks/%1").arg(archivePath);
}
- else
- {
- url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "modpacks/%1").arg(packoffset);
- }
- netJobContainer->addNetAction(Net::Download::makeCached(url, entry));
- archivePath = entry->getFullPath();
+ netJobContainer->addNetAction(Net::Download::makeFile(url, archivePath));
connect(netJobContainer.get(), &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
connect(netJobContainer.get(), &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
connect(netJobContainer.get(), &NetJob::progress, this, &PackInstallTask::onDownloadProgress);
connect(netJobContainer.get(), &NetJob::aborted, this, &PackInstallTask::onDownloadAborted);
+
netJobContainer->start();
+ setAbortable(true);
progress(1, 4);
}
void PackInstallTask::onDownloadSucceeded()
{
- abortable = false;
unzip();
}
void PackInstallTask::onDownloadFailed(QString reason)
{
- abortable = false;
emitFailed(reason);
}
void PackInstallTask::onDownloadProgress(qint64 current, qint64 total)
{
- abortable = true;
progress(current, total * 4);
setStatus(tr("Downloading zip for %1 (%2%)").arg(m_pack.name).arg(current / 10));
}
@@ -118,8 +112,10 @@ void PackInstallTask::onDownloadAborted()
void PackInstallTask::unzip()
{
- progress(2, 4);
setStatus(tr("Extracting modpack"));
+ setAbortable(false);
+ progress(2, 4);
+
QDir extractDir(m_stagingPath);
m_packZip.reset(new QuaZip(archivePath));
@@ -151,8 +147,8 @@ void PackInstallTask::onUnzipCanceled()
void PackInstallTask::install()
{
- progress(3, 4);
setStatus(tr("Installing modpack"));
+ progress(3, 4);
QDir unzipMcDir(m_stagingPath + "/unzip/minecraft");
if(unzipMcDir.exists())
{
@@ -247,11 +243,12 @@ void PackInstallTask::install()
bool PackInstallTask::abort()
{
- if(abortable)
- {
- return netJobContainer->abort();
+ if (!canAbort()) {
+ return false;
}
- return false;
+
+ netJobContainer->abort();
+ return InstanceTask::abort();
}
}
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
index 97ce1dc6c..7b112d8f9 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
@@ -58,6 +58,9 @@ PackInstallTask::PackInstallTask(Modpack pack, QString version, QWidget* parent)
bool PackInstallTask::abort()
{
+ if (!canAbort())
+ return false;
+
bool aborted = true;
if (m_net_job)
@@ -65,15 +68,13 @@ bool PackInstallTask::abort()
if (m_mod_id_resolver_task)
aborted &= m_mod_id_resolver_task->abort();
- if (aborted)
- emitAborted();
-
- return aborted;
+ return aborted ? InstanceTask::abort() : false;
}
void PackInstallTask::executeTask()
{
setStatus(tr("Getting the manifest..."));
+ setAbortable(false);
// Find pack version
auto version_it = std::find_if(m_pack.versions.constBegin(), m_pack.versions.constEnd(),
@@ -93,10 +94,12 @@ void PackInstallTask::executeTask()
QObject::connect(netJob, &NetJob::succeeded, this, &PackInstallTask::onManifestDownloadSucceeded);
QObject::connect(netJob, &NetJob::failed, this, &PackInstallTask::onManifestDownloadFailed);
+ QObject::connect(netJob, &NetJob::aborted, this, &PackInstallTask::abort);
QObject::connect(netJob, &NetJob::progress, this, &PackInstallTask::setProgress);
m_net_job = netJob;
+ setAbortable(true);
netJob->start();
}
@@ -130,6 +133,7 @@ void PackInstallTask::onManifestDownloadSucceeded()
void PackInstallTask::resolveMods()
{
setStatus(tr("Resolving mods..."));
+ setAbortable(false);
setProgress(0, 100);
m_file_id_map.clear();
@@ -162,15 +166,16 @@ void PackInstallTask::resolveMods()
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::succeeded, this, &PackInstallTask::onResolveModsSucceeded);
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::failed, this, &PackInstallTask::onResolveModsFailed);
+ connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::aborted, this, &PackInstallTask::abort);
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::progress, this, &PackInstallTask::setProgress);
+ setAbortable(true);
+
m_mod_id_resolver_task->start();
}
void PackInstallTask::onResolveModsSucceeded()
{
- m_abortable = false;
-
QString text;
QList urls;
auto anyBlocked = false;
@@ -209,94 +214,23 @@ void PackInstallTask::onResolveModsSucceeded()
urls);
if (message_dialog->exec() == QDialog::Accepted)
- downloadPack();
+ createInstance();
else
abort();
} else {
- downloadPack();
+ createInstance();
}
}
-void PackInstallTask::downloadPack()
+void PackInstallTask::createInstance()
{
- setStatus(tr("Downloading mods..."));
+ setAbortable(false);
- auto* jobPtr = new NetJob(tr("Mod download"), APPLICATION->network());
- for (auto const& file : m_version.files) {
- if (file.serverOnly || file.url.isEmpty())
- continue;
-
- QFileInfo file_info(file.name);
- auto cacheName = file_info.completeBaseName() + "-" + file.sha1 + "." + file_info.suffix();
-
- auto entry = APPLICATION->metacache()->resolveEntry("ModpacksCHPacks", cacheName);
- entry->setStale(true);
-
- auto relpath = FS::PathCombine("minecraft", file.path, file.name);
- auto path = FS::PathCombine(m_stagingPath, relpath);
-
- if (m_files_to_copy.contains(path)) {
- qWarning() << "Ignoring" << file.url << "as a file of that path is already downloading.";
- continue;
- }
-
- qDebug() << "Will download" << file.url << "to" << path;
- m_files_to_copy[path] = entry->getFullPath();
-
- auto dl = Net::Download::makeCached(file.url, entry);
- if (!file.sha1.isEmpty()) {
- auto rawSha1 = QByteArray::fromHex(file.sha1.toLatin1());
- dl->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, rawSha1));
- }
-
- jobPtr->addNetAction(dl);
- }
-
- connect(jobPtr, &NetJob::succeeded, this, &PackInstallTask::onModDownloadSucceeded);
- connect(jobPtr, &NetJob::failed, this, &PackInstallTask::onModDownloadFailed);
- connect(jobPtr, &NetJob::progress, this, &PackInstallTask::setProgress);
-
- m_net_job = jobPtr;
- jobPtr->start();
-
- m_abortable = true;
-}
-
-void PackInstallTask::onModDownloadSucceeded()
-{
- m_net_job.reset();
- install();
-}
-
-void PackInstallTask::install()
-{
- setStatus(tr("Copying modpack files..."));
- setProgress(0, m_files_to_copy.size());
- QCoreApplication::processEvents();
-
- m_abortable = false;
-
- int i = 0;
- for (auto iter = m_files_to_copy.constBegin(); iter != m_files_to_copy.constEnd(); iter++) {
- auto& to = iter.key();
- auto& from = iter.value();
- FS::copy fileCopyOperation(from, to);
- if (!fileCopyOperation()) {
- qWarning() << "Failed to copy" << from << "to" << to;
- emitFailed(tr("Failed to copy files"));
- return;
- }
-
- setProgress(i++, m_files_to_copy.size());
- QCoreApplication::processEvents();
- }
-
- setStatus(tr("Installing modpack..."));
+ setStatus(tr("Creating the instance..."));
QCoreApplication::processEvents();
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
auto instanceSettings = std::make_shared(instanceConfigPath);
- instanceSettings->suspendSave();
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
auto components = instance.getPackProfile();
@@ -337,8 +271,55 @@ void PackInstallTask::install()
instance.setName(name());
instance.setIconKey(m_instIcon);
instance.setManagedPack("modpacksch", QString::number(m_pack.id), m_pack.name, QString::number(m_version.id), m_version.name);
- instanceSettings->resumeSave();
+ instance.saveNow();
+
+ onCreateInstanceSucceeded();
+}
+
+void PackInstallTask::onCreateInstanceSucceeded()
+{
+ downloadPack();
+}
+
+void PackInstallTask::downloadPack()
+{
+ setStatus(tr("Downloading mods..."));
+ setAbortable(false);
+
+ auto* jobPtr = new NetJob(tr("Mod download"), APPLICATION->network());
+ for (auto const& file : m_version.files) {
+ if (file.serverOnly || file.url.isEmpty())
+ continue;
+
+ auto path = FS::PathCombine(m_stagingPath, ".minecraft", file.path, file.name);
+ qDebug() << "Will try to download" << file.url << "to" << path;
+
+ QFileInfo file_info(file.name);
+
+ auto dl = Net::Download::makeFile(file.url, path);
+ if (!file.sha1.isEmpty()) {
+ auto rawSha1 = QByteArray::fromHex(file.sha1.toLatin1());
+ dl->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, rawSha1));
+ }
+
+ jobPtr->addNetAction(dl);
+ }
+
+ connect(jobPtr, &NetJob::succeeded, this, &PackInstallTask::onModDownloadSucceeded);
+ connect(jobPtr, &NetJob::failed, this, &PackInstallTask::onModDownloadFailed);
+ connect(jobPtr, &NetJob::aborted, this, &PackInstallTask::abort);
+ connect(jobPtr, &NetJob::progress, this, &PackInstallTask::setProgress);
+
+ m_net_job = jobPtr;
+
+ setAbortable(true);
+ jobPtr->start();
+}
+
+void PackInstallTask::onModDownloadSucceeded()
+{
+ m_net_job.reset();
emitSucceeded();
}
@@ -352,6 +333,10 @@ void PackInstallTask::onResolveModsFailed(QString reason)
m_net_job.reset();
emitFailed(reason);
}
+void PackInstallTask::onCreateInstanceFailed(QString reason)
+{
+ emitFailed(reason);
+}
void PackInstallTask::onModDownloadFailed(QString reason)
{
m_net_job.reset();
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.h b/launcher/modplatform/modpacksch/FTBPackInstallTask.h
index e63ca0dff..7c6fbeb93 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.h
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.h
@@ -56,7 +56,6 @@ public:
explicit PackInstallTask(Modpack pack, QString version, QWidget* parent = nullptr);
~PackInstallTask() override = default;
- bool canAbort() const override { return m_abortable; }
bool abort() override;
protected:
@@ -65,20 +64,20 @@ protected:
private slots:
void onManifestDownloadSucceeded();
void onResolveModsSucceeded();
+ void onCreateInstanceSucceeded();
void onModDownloadSucceeded();
void onManifestDownloadFailed(QString reason);
void onResolveModsFailed(QString reason);
+ void onCreateInstanceFailed(QString reason);
void onModDownloadFailed(QString reason);
private:
void resolveMods();
+ void createInstance();
void downloadPack();
- void install();
private:
- bool m_abortable = true;
-
NetJob::Ptr m_net_job = nullptr;
shared_qobject_ptr m_mod_id_resolver_task = nullptr;
diff --git a/launcher/resources/OSX/OSX.qrc b/launcher/resources/OSX/OSX.qrc
index 3eca8e195..55be28b5f 100644
--- a/launcher/resources/OSX/OSX.qrc
+++ b/launcher/resources/OSX/OSX.qrc
@@ -34,5 +34,9 @@
scalable/status-yellow.svgscalable/viewfolder.svgscalable/worlds.svg
+ scalable/delete.svg
+ scalable/tag.svg
+ scalable/export.svg
+ scalable/rename.svg
diff --git a/launcher/resources/OSX/scalable/delete.svg b/launcher/resources/OSX/scalable/delete.svg
new file mode 100644
index 000000000..bec8c7d97
--- /dev/null
+++ b/launcher/resources/OSX/scalable/delete.svg
@@ -0,0 +1,49 @@
+
+
+
+
diff --git a/launcher/resources/OSX/scalable/export.svg b/launcher/resources/OSX/scalable/export.svg
new file mode 100644
index 000000000..62145a7e6
--- /dev/null
+++ b/launcher/resources/OSX/scalable/export.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/launcher/resources/OSX/scalable/launcher.svg b/launcher/resources/OSX/scalable/launcher.svg
index c192d5031..69dd84b17 100644
--- a/launcher/resources/OSX/scalable/launcher.svg
+++ b/launcher/resources/OSX/scalable/launcher.svg
@@ -1,21 +1,53 @@
-