aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'launcher')
-rw-r--r--launcher/CMakeLists.txt8
-rw-r--r--launcher/InstanceImportTask.cpp2
-rw-r--r--launcher/resources/multimc/128x128/instances/modrinth.pngbin10575 -> 0 bytes
-rw-r--r--launcher/resources/multimc/32x32/instances/modrinth.pngbin1913 -> 0 bytes
-rw-r--r--launcher/resources/multimc/multimc.qrc3
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.cpp2
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp45
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.h46
8 files changed, 72 insertions, 34 deletions
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index cbe135e2..7984d3c9 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -532,6 +532,8 @@ set(FLAME_SOURCES
set(MODRINTH_SOURCES
modplatform/modrinth/ModrinthPackIndex.cpp
modplatform/modrinth/ModrinthPackIndex.h
+ modplatform/modrinth/ModrinthPackManifest.cpp
+ modplatform/modrinth/ModrinthPackManifest.h
)
set(MODPACKSCH_SOURCES
@@ -563,11 +565,6 @@ set(ATLAUNCHER_SOURCES
modplatform/atlauncher/ATLShareCode.h
)
-set(MODRINTH_SOURCES
- modplatform/modrinth/ModrinthPackManifest.cpp
- modplatform/modrinth/ModrinthPackManifest.h
-)
-
add_unit_test(Index
SOURCES meta/Index_test.cpp
LIBS Launcher_logic
@@ -601,7 +598,6 @@ set(LOGIC_SOURCES
${MODPACKSCH_SOURCES}
${TECHNIC_SOURCES}
${ATLAUNCHER_SOURCES}
- ${MODRINTH_SOURCES}
)
SET(LAUNCHER_SOURCES
diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp
index 51715581..ec0f58e0 100644
--- a/launcher/InstanceImportTask.cpp
+++ b/launcher/InstanceImportTask.cpp
@@ -581,8 +581,6 @@ void InstanceImportTask::processModrinth() {
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
- instanceSettings->registerSetting("InstanceType", "Legacy");
- instanceSettings->set("InstanceType", "OneSix");
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
auto components = instance.getPackProfile();
components->buildingFromScratch();
diff --git a/launcher/resources/multimc/128x128/instances/modrinth.png b/launcher/resources/multimc/128x128/instances/modrinth.png
deleted file mode 100644
index 740bc8f0..00000000
--- a/launcher/resources/multimc/128x128/instances/modrinth.png
+++ /dev/null
Binary files differ
diff --git a/launcher/resources/multimc/32x32/instances/modrinth.png b/launcher/resources/multimc/32x32/instances/modrinth.png
deleted file mode 100644
index 025ed065..00000000
--- a/launcher/resources/multimc/32x32/instances/modrinth.png
+++ /dev/null
Binary files differ
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc
index 1671093d..86ebf753 100644
--- a/launcher/resources/multimc/multimc.qrc
+++ b/launcher/resources/multimc/multimc.qrc
@@ -275,9 +275,6 @@
<file>32x32/instances/flame.png</file>
<file>128x128/instances/flame.png</file>
- <file>32x32/instances/modrinth.png</file>
- <file>128x128/instances/modrinth.png</file>
-
<file>32x32/instances/gear.png</file>
<file>128x128/instances/gear.png</file>
diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp
index 8ae38f8d..3b65de9d 100644
--- a/launcher/ui/pages/modplatform/ImportPage.cpp
+++ b/launcher/ui/pages/modplatform/ImportPage.cpp
@@ -144,8 +144,8 @@ void ImportPage::setUrl(const QString& url)
void ImportPage::on_modpackBtn_clicked()
{
- // TODO: Add .mrpack filter
auto filter = QMimeDatabase().mimeTypeForName("application/zip").filterString();
+ filter += ";;" + tr("Modrinth pack (*.mrpack)");
const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), filter);
if (url.isValid())
{
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
index 93b1ca02..0d65ef16 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
@@ -1,18 +1,36 @@
+// SPDX-License-Identifier: GPL-3.0-only
/*
- * Copyright 2013-2021 MultiMC Contributors
- * Copyright 2021-2022 kb1000
+ * PolyMC - Minecraft Launcher
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ * Copyright 2021-2022 kb1000
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include "ModrinthPage.h"
@@ -31,6 +49,11 @@ ModrinthPage::~ModrinthPage()
delete ui;
}
+void ModrinthPage::retranslate()
+{
+ ui->retranslateUi(this);
+}
+
void ModrinthPage::openedImpl()
{
BasePage::openedImpl();
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
index 6c75b60d..562049b4 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
@@ -1,18 +1,36 @@
+// SPDX-License-Identifier: GPL-3.0-only
/*
- * Copyright 2013-2021 MultiMC Contributors
- * Copyright 2021-2022 kb1000
+ * PolyMC - Minecraft Launcher
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ * Copyright 2021-2022 kb1000
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#pragma once
@@ -49,6 +67,12 @@ public:
return "modrinth";
}
+ virtual QString helpPage() const override
+ {
+ return "Modrinth-platform";
+ }
+ void retranslate() override;
+
void openedImpl() override;
bool eventFilter(QObject *watched, QEvent *event) override;