Merge pull request #3438 from jamierocks/technic-zip-fix

GH-3437 Extract Technic single zip packs to correct place
This commit is contained in:
Petr Mrázek 2020-11-14 16:14:50 +01:00 committed by GitHub
commit 66c0999901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 2 additions and 18 deletions

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "SingleZipPackInstallTask.h"
#include "Env.h"
@ -21,6 +20,7 @@
#include "TechnicPackProcessor.h"
#include <QtConcurrent>
#include <FileSystem.h>
Technic::SingleZipPackInstallTask::SingleZipPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion)
{
@ -48,7 +48,7 @@ void Technic::SingleZipPackInstallTask::executeTask()
void Technic::SingleZipPackInstallTask::downloadSucceeded()
{
setStatus(tr("Extracting modpack"));
QDir extractDir(m_stagingPath);
QDir extractDir(FS::PathCombine(m_stagingPath, ".minecraft"));
qDebug() << "Attempting to create instance from" << m_archivePath;
// open the zip and find relevant files in it

View File

@ -13,12 +13,8 @@
* limitations under the License.
*/
#pragma once
#ifndef TECHNIC_SINGLEZIPPACKINSTALLTASK_H
#define TECHNIC_SINGLEZIPPACKINSTALLTASK_H
#include "InstanceTask.h"
#include "net/NetJob.h"
#include "multimc_logic_export.h"
@ -60,5 +56,3 @@ private:
};
} // namespace Technic
#endif // TECHNIC_SINGLEZIPPACKINSTALLTASK_H

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "SolderPackInstallTask.h"
#include <FileSystem.h>

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#pragma once
#include <InstanceTask.h>
@ -22,7 +21,6 @@
#include <QUrl>
namespace Technic
{
class MULTIMC_LOGIC_EXPORT SolderPackInstallTask : public InstanceTask

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "TechnicPackProcessor.h"
#include <FileSystem.h>
@ -27,7 +26,6 @@
#include <memory>
void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const QString &instName, const QString &instIcon, const QString &stagingPath, const QString &minecraftVersion, const bool isSolder)
{
QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");

View File

@ -13,13 +13,11 @@
* limitations under the License.
*/
#pragma once
#include <QString>
#include "settings/SettingsObject.h"
namespace Technic
{
// not exporting it, only used in SingleZipPackInstallTask, InstanceImportTask and SolderPackInstallTask

View File

@ -18,7 +18,6 @@
#include <QList>
#include <QString>
namespace Technic {
struct Modpack {
QString slug;

View File

@ -20,7 +20,6 @@
#include <QIcon>
Technic::ListModel::ListModel(QObject *parent) : QAbstractListModel(parent)
{
}

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "TechnicPage.h"
#include "ui_TechnicPage.h"