NOISSUE fix legacy edit instance
This commit is contained in:
parent
fe540e5dda
commit
9df2f1fa5c
@ -177,6 +177,10 @@ SET(MULTIMC_SOURCES
|
|||||||
pages/ScreenshotsPage.h
|
pages/ScreenshotsPage.h
|
||||||
pages/OtherLogsPage.cpp
|
pages/OtherLogsPage.cpp
|
||||||
pages/OtherLogsPage.h
|
pages/OtherLogsPage.h
|
||||||
|
pages/LegacyJarModPage.cpp
|
||||||
|
pages/LegacyJarModPage.h
|
||||||
|
pages/LegacyUpgradePage.cpp
|
||||||
|
pages/LegacyUpgradePage.h
|
||||||
|
|
||||||
# GUI - global settings pages
|
# GUI - global settings pages
|
||||||
pages/global/AccountListPage.cpp
|
pages/global/AccountListPage.cpp
|
||||||
@ -266,6 +270,8 @@ SET(MULTIMC_UIS
|
|||||||
pages/NotesPage.ui
|
pages/NotesPage.ui
|
||||||
pages/ScreenshotsPage.ui
|
pages/ScreenshotsPage.ui
|
||||||
pages/OtherLogsPage.ui
|
pages/OtherLogsPage.ui
|
||||||
|
pages/LegacyJarModPage.ui
|
||||||
|
pages/LegacyUpgradePage.ui
|
||||||
|
|
||||||
# Global settings pages
|
# Global settings pages
|
||||||
pages/global/AccountListPage.ui
|
pages/global/AccountListPage.ui
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "minecraft/OneSixInstance.h"
|
#include "minecraft/OneSixInstance.h"
|
||||||
|
#include "minecraft/LegacyInstance.h"
|
||||||
#include "pages/BasePage.h"
|
#include "pages/BasePage.h"
|
||||||
#include "pages/VersionPage.h"
|
#include "pages/VersionPage.h"
|
||||||
#include "pages/ModFolderPage.h"
|
#include "pages/ModFolderPage.h"
|
||||||
@ -10,8 +11,10 @@
|
|||||||
#include "pages/InstanceSettingsPage.h"
|
#include "pages/InstanceSettingsPage.h"
|
||||||
#include "pages/OtherLogsPage.h"
|
#include "pages/OtherLogsPage.h"
|
||||||
#include "pages/BasePageProvider.h"
|
#include "pages/BasePageProvider.h"
|
||||||
|
#include "pages/LegacyJarModPage.h"
|
||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
|
|
||||||
|
|
||||||
class InstancePageProvider : public QObject, public BasePageProvider
|
class InstancePageProvider : public QObject, public BasePageProvider
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -40,6 +43,24 @@ public:
|
|||||||
values.append(new InstanceSettingsPage(onesix.get()));
|
values.append(new InstanceSettingsPage(onesix.get()));
|
||||||
values.append(new OtherLogsPage(onesix->minecraftRoot()));
|
values.append(new OtherLogsPage(onesix->minecraftRoot()));
|
||||||
}
|
}
|
||||||
|
std::shared_ptr<LegacyInstance> legacy = std::dynamic_pointer_cast<LegacyInstance>(inst);
|
||||||
|
if(legacy)
|
||||||
|
{
|
||||||
|
QList<BasePage *> values;
|
||||||
|
// FIXME: actually implement the legacy instance upgrade, then enable this.
|
||||||
|
//values.append(new LegacyUpgradePage(this));
|
||||||
|
values.append(new LegacyJarModPage(legacy.get()));
|
||||||
|
values.append(new ModFolderPage(legacy.get(), legacy->loaderModList(), "mods", "loadermods", tr("Loader mods"),
|
||||||
|
"Loader-mods"));
|
||||||
|
values.append(new ModFolderPage(legacy.get(), legacy->coreModList(), "coremods", "coremods", tr("Core mods"),
|
||||||
|
"Loader-mods"));
|
||||||
|
values.append(new TexturePackPage(legacy.get()));
|
||||||
|
values.append(new NotesPage(legacy.get()));
|
||||||
|
values.append(new ScreenshotsPage(PathCombine(legacy->minecraftRoot(), "screenshots")));
|
||||||
|
values.append(new InstanceSettingsPage(legacy.get()));
|
||||||
|
values.append(new OtherLogsPage(legacy->minecraftRoot()));
|
||||||
|
return values;
|
||||||
|
}
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,14 +22,12 @@
|
|||||||
|
|
||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
|
|
||||||
#include "gui/dialogs/VersionSelectDialog.h"
|
#include "dialogs/VersionSelectDialog.h"
|
||||||
#include "gui/dialogs/ProgressDialog.h"
|
#include "dialogs/ProgressDialog.h"
|
||||||
#include "gui/dialogs/ModEditDialogCommon.h"
|
#include "dialogs/ModEditDialogCommon.h"
|
||||||
#include "logic/minecraft/ModList.h"
|
#include "minecraft/ModList.h"
|
||||||
#include "logic/minecraft/LegacyInstance.h"
|
#include "minecraft/LegacyInstance.h"
|
||||||
#include "logic/forge/ForgeVersion.h"
|
#include "Env.h"
|
||||||
#include "logic/forge/ForgeVersionList.h"
|
|
||||||
#include "logic/Env.h"
|
|
||||||
#include "MultiMC.h"
|
#include "MultiMC.h"
|
||||||
|
|
||||||
LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
|
LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
|
||||||
@ -102,6 +100,8 @@ bool LegacyJarModPage::eventFilter(QObject *obj, QEvent *ev)
|
|||||||
|
|
||||||
void LegacyJarModPage::on_addForgeBtn_clicked()
|
void LegacyJarModPage::on_addForgeBtn_clicked()
|
||||||
{
|
{
|
||||||
|
//FIXME: dead. clean up.
|
||||||
|
/*
|
||||||
VersionSelectDialog vselect(MMC->forgelist().get(), tr("Select Forge version"), this);
|
VersionSelectDialog vselect(MMC->forgelist().get(), tr("Select Forge version"), this);
|
||||||
vselect.setExactFilter(1, m_inst->intendedVersionId());
|
vselect.setExactFilter(1, m_inst->intendedVersionId());
|
||||||
if (vselect.exec() && vselect.selectedVersion())
|
if (vselect.exec() && vselect.selectedVersion())
|
||||||
@ -135,7 +135,7 @@ void LegacyJarModPage::on_addForgeBtn_clicked()
|
|||||||
m_jarmods->installMod(QFileInfo(entry->getFullPath()));
|
m_jarmods->installMod(QFileInfo(entry->getFullPath()));
|
||||||
m_jarmods->startWatching();
|
m_jarmods->startWatching();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
void LegacyJarModPage::on_addJarBtn_clicked()
|
void LegacyJarModPage::on_addJarBtn_clicked()
|
||||||
{
|
{
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "logic/net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "BasePage.h"
|
#include "BasePage.h"
|
||||||
#include <MultiMC.h>
|
#include <MultiMC.h>
|
||||||
|
|
@ -152,18 +152,18 @@
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>ModListView</class>
|
<class>ModListView</class>
|
||||||
<extends>QTreeView</extends>
|
<extends>QTreeView</extends>
|
||||||
<header>gui/widgets/ModListView.h</header>
|
<header>widgets/ModListView.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>MCModInfoFrame</class>
|
<class>MCModInfoFrame</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>gui/widgets/MCModInfoFrame.h</header>
|
<header>widgets/MCModInfoFrame.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LineSeparator</class>
|
<class>LineSeparator</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/widgets/LineSeparator.h</header>
|
<header>widgets/LineSeparator.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
@ -1,7 +1,7 @@
|
|||||||
#include "LegacyUpgradePage.h"
|
#include "LegacyUpgradePage.h"
|
||||||
#include "ui_LegacyUpgradePage.h"
|
#include "ui_LegacyUpgradePage.h"
|
||||||
|
|
||||||
#include "logic/minecraft/LegacyInstance.h"
|
#include "minecraft/LegacyInstance.h"
|
||||||
|
|
||||||
LegacyUpgradePage::LegacyUpgradePage(LegacyInstance *inst, QWidget *parent)
|
LegacyUpgradePage::LegacyUpgradePage(LegacyInstance *inst, QWidget *parent)
|
||||||
: QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst)
|
: QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst)
|
@ -17,9 +17,9 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "logic/minecraft/OneSixInstance.h"
|
#include "minecraft/OneSixInstance.h"
|
||||||
#include "logic/net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
#include "gui/pages/BasePage.h"
|
#include "pages/BasePage.h"
|
||||||
#include <MultiMC.h>
|
#include <MultiMC.h>
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
@ -26,15 +26,6 @@
|
|||||||
#include "icons/IconList.h"
|
#include "icons/IconList.h"
|
||||||
#include "minecraft/MinecraftProcess.h"
|
#include "minecraft/MinecraftProcess.h"
|
||||||
#include "minecraft/ModList.h"
|
#include "minecraft/ModList.h"
|
||||||
/*
|
|
||||||
#include "gui/pages/LegacyUpgradePage.h"
|
|
||||||
#include "gui/pages/ModFolderPage.h"
|
|
||||||
#include "gui/pages/LegacyJarModPage.h"
|
|
||||||
#include <gui/pages/TexturePackPage.h>
|
|
||||||
#include <gui/pages/InstanceSettingsPage.h>
|
|
||||||
#include <gui/pages/NotesPage.h>
|
|
||||||
#include <gui/pages/ScreenshotsPage.h>
|
|
||||||
*/
|
|
||||||
|
|
||||||
LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir)
|
LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir)
|
||||||
: MinecraftInstance(globalSettings, settings, rootDir)
|
: MinecraftInstance(globalSettings, settings, rootDir)
|
||||||
@ -56,30 +47,6 @@ LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectP
|
|||||||
settings->registerSetting("CustomBaseJar", "");
|
settings->registerSetting("CustomBaseJar", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
QList<BasePage *> LegacyInstance::getPages()
|
|
||||||
{
|
|
||||||
QList<BasePage *> values;
|
|
||||||
// FIXME: actually implement the legacy instance upgrade, then enable this.
|
|
||||||
//values.append(new LegacyUpgradePage(this));
|
|
||||||
values.append(new LegacyJarModPage(this));
|
|
||||||
values.append(new ModFolderPage(this, loaderModList(), "mods", "loadermods", tr("Loader mods"),
|
|
||||||
"Loader-mods"));
|
|
||||||
values.append(new ModFolderPage(this, coreModList(), "coremods", "coremods", tr("Core mods"),
|
|
||||||
"Loader-mods"));
|
|
||||||
values.append(new TexturePackPage(this));
|
|
||||||
values.append(new NotesPage(this));
|
|
||||||
values.append(new ScreenshotsPage(PathCombine(minecraftRoot(), "screenshots")));
|
|
||||||
values.append(new InstanceSettingsPage(this));
|
|
||||||
return values;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LegacyInstance::dialogTitle()
|
|
||||||
{
|
|
||||||
return tr("Edit Instance (%1)").arg(name());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
QString LegacyInstance::baseJar() const
|
QString LegacyInstance::baseJar() const
|
||||||
{
|
{
|
||||||
bool customJar = m_settings->get("UseCustomBaseJar").toBool();
|
bool customJar = m_settings->get("UseCustomBaseJar").toBool();
|
||||||
|
Loading…
Reference in New Issue
Block a user