NOISSUE continue version file format refactors
This commit is contained in:
parent
1854e05e1b
commit
02c1df2c3c
@ -24,13 +24,13 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
|
|||||||
set(MMC_SRC "${PROJECT_SOURCE_DIR}")
|
set(MMC_SRC "${PROJECT_SOURCE_DIR}")
|
||||||
set(MMC_BIN "${PROJECT_BINARY_DIR}")
|
set(MMC_BIN "${PROJECT_BINARY_DIR}")
|
||||||
|
|
||||||
# Output all executables and shared libs in the main build folder, not in subfolders.
|
# # Output all executables and shared libs in the main build folder, not in subfolders.
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||||
if(UNIX)
|
# if(UNIX)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||||
endif()
|
# endif()
|
||||||
|
|
||||||
set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/jars)
|
set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/application/jars)
|
||||||
|
|
||||||
######## Set compiler flags ########
|
######## Set compiler flags ########
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
||||||
|
@ -47,8 +47,7 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
|
|||||||
ui->modTreeView->setModel(m_mods.get());
|
ui->modTreeView->setModel(m_mods.get());
|
||||||
ui->modTreeView->installEventFilter(this);
|
ui->modTreeView->installEventFilter(this);
|
||||||
auto smodel = ui->modTreeView->selectionModel();
|
auto smodel = ui->modTreeView->selectionModel();
|
||||||
connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
|
connect(smodel, &QItemSelectionModel::currentChanged, this, &ModFolderPage::modCurrent);
|
||||||
SLOT(modCurrent(QModelIndex, QModelIndex)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModFolderPage::opened()
|
void ModFolderPage::opened()
|
||||||
@ -91,7 +90,15 @@ bool CoreModFolderPage::shouldDisplay() const
|
|||||||
auto version = inst->getMinecraftProfile();
|
auto version = inst->getMinecraftProfile();
|
||||||
if (!version)
|
if (!version)
|
||||||
return true;
|
return true;
|
||||||
if (version->m_releaseTime < g_VersionFilterData.legacyCutoffDate)
|
if(!version->versionPatch("net.minecraftforge"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!version->versionPatch("net.minecraft"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(version->versionPatch("net.minecraft")->getReleaseDateTime() < g_VersionFilterData.legacyCutoffDate)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -156,10 +156,10 @@ void VersionPage::packageCurrent(const QModelIndex ¤t, const QModelIndex &
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
{
|
{
|
||||||
case PROBLEM_WARNING:
|
case PROBLEM_WARNING:
|
||||||
ui->frame->setModText(tr("%1 possibly has issues.").arg(patch->getPatchName()));
|
ui->frame->setModText(tr("%1 possibly has issues.").arg(patch->getName()));
|
||||||
break;
|
break;
|
||||||
case PROBLEM_ERROR:
|
case PROBLEM_ERROR:
|
||||||
ui->frame->setModText(tr("%1 has issues!").arg(patch->getPatchName()));
|
ui->frame->setModText(tr("%1 has issues!").arg(patch->getName()));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case PROBLEM_NONE:
|
case PROBLEM_NONE:
|
||||||
@ -251,8 +251,7 @@ void VersionPage::on_modBtn_clicked()
|
|||||||
void VersionPage::on_jarmodBtn_clicked()
|
void VersionPage::on_jarmodBtn_clicked()
|
||||||
{
|
{
|
||||||
bool nagShown = false;
|
bool nagShown = false;
|
||||||
auto traits = m_version->traits;
|
if (!m_version->hasTrait("legacyLaunch") && !m_version->hasTrait("alphaLaunch"))
|
||||||
if (!traits.contains("legacyLaunch") && !traits.contains("alphaLaunch"))
|
|
||||||
{
|
{
|
||||||
// not legacy launch... nag
|
// not legacy launch... nag
|
||||||
auto seenNag = MMC->settings()->get("JarModNagSeen").toBool();
|
auto seenNag = MMC->settings()->get("JarModNagSeen").toBool();
|
||||||
@ -513,7 +512,7 @@ void VersionPage::on_editBtn_clicked()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto filename = version->getPatchFilename();
|
auto filename = version->getFilename();
|
||||||
if(!QFileInfo::exists(filename))
|
if(!QFileInfo::exists(filename))
|
||||||
{
|
{
|
||||||
qWarning() << "file" << filename << "can't be opened for editing, doesn't exist!";
|
qWarning() << "file" << filename << "can't be opened for editing, doesn't exist!";
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
"checksum": "6897c3287fb971c9f362eb3ab20f5ddd",
|
"checksum": "6897c3287fb971c9f362eb3ab20f5ddd",
|
||||||
"releaseTime": "2013-04-25T17:45:00+02:00",
|
"releaseTime": "2013-04-25T17:45:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -13,7 +12,6 @@
|
|||||||
"checksum": "5c1219d869b87d233de3033688ec7567",
|
"checksum": "5c1219d869b87d233de3033688ec7567",
|
||||||
"releaseTime": "2013-03-20T12:00:00+02:00",
|
"releaseTime": "2013-03-20T12:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -21,7 +19,6 @@
|
|||||||
"checksum": "fd11cbc5b01aae1d62cff0145171f3d9",
|
"checksum": "fd11cbc5b01aae1d62cff0145171f3d9",
|
||||||
"releaseTime": "2013-03-07T00:00:00+02:00",
|
"releaseTime": "2013-03-07T00:00:00+02:00",
|
||||||
"type": "snapshot",
|
"type": "snapshot",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -29,7 +26,6 @@
|
|||||||
"checksum": "8e80fb01b321c6b3c7efca397a3eea35",
|
"checksum": "8e80fb01b321c6b3c7efca397a3eea35",
|
||||||
"releaseTime": "2012-12-28T00:00:00+02:00",
|
"releaseTime": "2012-12-28T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -37,7 +33,6 @@
|
|||||||
"checksum": "48677dc4c2b98c29918722b5ab27b4fd",
|
"checksum": "48677dc4c2b98c29918722b5ab27b4fd",
|
||||||
"releaseTime": "2012-12-20T00:00:00+02:00",
|
"releaseTime": "2012-12-20T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -45,7 +40,6 @@
|
|||||||
"checksum": "b15e2b2b6b4629f0d99a95b6b44412a0",
|
"checksum": "b15e2b2b6b4629f0d99a95b6b44412a0",
|
||||||
"releaseTime": "2012-11-20T00:00:00+02:00",
|
"releaseTime": "2012-11-20T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -53,7 +47,6 @@
|
|||||||
"checksum": "7aa46c8058cba2f38e9d2ddddcc77c72",
|
"checksum": "7aa46c8058cba2f38e9d2ddddcc77c72",
|
||||||
"releaseTime": "2012-11-14T00:00:00+02:00",
|
"releaseTime": "2012-11-14T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,7 +54,6 @@
|
|||||||
"checksum": "9cc3295931edb6339f22989fe1b612a6",
|
"checksum": "9cc3295931edb6339f22989fe1b612a6",
|
||||||
"releaseTime": "2012-11-01T00:00:00+02:00",
|
"releaseTime": "2012-11-01T00:00:00+02:00",
|
||||||
"type": "snapshot",
|
"type": "snapshot",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -69,7 +61,6 @@
|
|||||||
"checksum": "771175c01778ea67395bc6919a5a9dc5",
|
"checksum": "771175c01778ea67395bc6919a5a9dc5",
|
||||||
"releaseTime": "2012-10-25T00:00:00+02:00",
|
"releaseTime": "2012-10-25T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -77,7 +68,6 @@
|
|||||||
"checksum": "542621a5298659dc65f383f35170fc4c",
|
"checksum": "542621a5298659dc65f383f35170fc4c",
|
||||||
"releaseTime": "2012-10-23T00:00:00+02:00",
|
"releaseTime": "2012-10-23T00:00:00+02:00",
|
||||||
"type": "snapshot",
|
"type": "snapshot",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -85,7 +75,6 @@
|
|||||||
"checksum": "32a654388b54d3e4bb29c1a46e7d6a12",
|
"checksum": "32a654388b54d3e4bb29c1a46e7d6a12",
|
||||||
"releaseTime": "2012-10-19T00:00:00+02:00",
|
"releaseTime": "2012-10-19T00:00:00+02:00",
|
||||||
"type": "snapshot",
|
"type": "snapshot",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -93,7 +82,6 @@
|
|||||||
"checksum": "969699f13e5bbe7f12e40ac4f32b7d9a",
|
"checksum": "969699f13e5bbe7f12e40ac4f32b7d9a",
|
||||||
"releaseTime": "2012-08-16T00:00:00+02:00",
|
"releaseTime": "2012-08-16T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,7 +89,6 @@
|
|||||||
"checksum": "266ccbc9798afd2eadf3d6c01b4c562a",
|
"checksum": "266ccbc9798afd2eadf3d6c01b4c562a",
|
||||||
"releaseTime": "2012-08-01T00:00:00+02:00",
|
"releaseTime": "2012-08-01T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -109,7 +96,6 @@
|
|||||||
"checksum": "a6effac1eaccf5d429aae340cf95ed5d",
|
"checksum": "a6effac1eaccf5d429aae340cf95ed5d",
|
||||||
"releaseTime": "2012-07-26T00:00:00+02:00",
|
"releaseTime": "2012-07-26T00:00:00+02:00",
|
||||||
"type": "snapshot",
|
"type": "snapshot",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -117,7 +103,6 @@
|
|||||||
"checksum": "8e8778078a175a33603a585257f28563",
|
"checksum": "8e8778078a175a33603a585257f28563",
|
||||||
"releaseTime": "2012-03-30T00:00:00+02:00",
|
"releaseTime": "2012-03-30T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -125,7 +110,6 @@
|
|||||||
"checksum": "25423eab6d8707f96cc6ad8a21a7250a",
|
"checksum": "25423eab6d8707f96cc6ad8a21a7250a",
|
||||||
"releaseTime": "2012-03-22T00:00:00+02:00",
|
"releaseTime": "2012-03-22T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -133,7 +117,6 @@
|
|||||||
"checksum": "12f6c4b1bdcc63f029e3c088a364b8e4",
|
"checksum": "12f6c4b1bdcc63f029e3c088a364b8e4",
|
||||||
"releaseTime": "2012-03-02T00:00:00+02:00",
|
"releaseTime": "2012-03-02T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -141,7 +124,6 @@
|
|||||||
"checksum": "6189e96efaea11e5164b4a4755574324",
|
"checksum": "6189e96efaea11e5164b4a4755574324",
|
||||||
"releaseTime": "2012-03-01T00:00:01+02:00",
|
"releaseTime": "2012-03-01T00:00:01+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -149,7 +131,6 @@
|
|||||||
"checksum": "97067a603eba2b6eb75d3194f81f6bcd",
|
"checksum": "97067a603eba2b6eb75d3194f81f6bcd",
|
||||||
"releaseTime": "2012-03-01T00:00:00+02:00",
|
"releaseTime": "2012-03-01T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -157,7 +138,6 @@
|
|||||||
"checksum": "e92302d2acdba7c97e0d8df1e10d2006",
|
"checksum": "e92302d2acdba7c97e0d8df1e10d2006",
|
||||||
"releaseTime": "2012-01-12T00:00:00+02:00",
|
"releaseTime": "2012-01-12T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -165,7 +145,6 @@
|
|||||||
"checksum": "3820d222b95d0b8c520d9596a756a6e6",
|
"checksum": "3820d222b95d0b8c520d9596a756a6e6",
|
||||||
"releaseTime": "2011-11-18T00:00:00+02:00",
|
"releaseTime": "2011-11-18T00:00:00+02:00",
|
||||||
"type": "release",
|
"type": "release",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -173,7 +152,6 @@
|
|||||||
"checksum": "f8c5a2ccd3bc996792bbe436d8cc08bc",
|
"checksum": "f8c5a2ccd3bc996792bbe436d8cc08bc",
|
||||||
"releaseTime": "2011-09-19T00:00:00+02:00",
|
"releaseTime": "2011-09-19T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -181,7 +159,6 @@
|
|||||||
"checksum": "a59a9fd4c726a573b0a2bdd10d857f59",
|
"checksum": "a59a9fd4c726a573b0a2bdd10d857f59",
|
||||||
"releaseTime": "2011-09-15T00:00:00+02:00",
|
"releaseTime": "2011-09-15T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -189,7 +166,6 @@
|
|||||||
"checksum": "eae3353fdaa7e10a59b4cb5b45bfa10d",
|
"checksum": "eae3353fdaa7e10a59b4cb5b45bfa10d",
|
||||||
"releaseTime": "2011-07-08T00:00:00+02:00",
|
"releaseTime": "2011-07-08T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -197,7 +173,6 @@
|
|||||||
"checksum": "dd9215ab1141170d4871f42bff4ab302",
|
"checksum": "dd9215ab1141170d4871f42bff4ab302",
|
||||||
"releaseTime": "2011-07-01T00:00:00+02:00",
|
"releaseTime": "2011-07-01T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -205,7 +180,6 @@
|
|||||||
"checksum": "682419e9ed1a236c3067822d53cda1e4",
|
"checksum": "682419e9ed1a236c3067822d53cda1e4",
|
||||||
"releaseTime": "2011-06-30T00:00:00+02:00",
|
"releaseTime": "2011-06-30T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -213,7 +187,6 @@
|
|||||||
"checksum": "ce80072464433cd5b05d505aa8ff29d1",
|
"checksum": "ce80072464433cd5b05d505aa8ff29d1",
|
||||||
"releaseTime": "2011-05-31T00:00:00+02:00",
|
"releaseTime": "2011-05-31T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -221,7 +194,6 @@
|
|||||||
"checksum": "2aba888864b32038c8d22ee5df71b7c8",
|
"checksum": "2aba888864b32038c8d22ee5df71b7c8",
|
||||||
"releaseTime": "2011-05-28T00:00:00+02:00",
|
"releaseTime": "2011-05-28T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -229,7 +201,6 @@
|
|||||||
"checksum": "5c4df6f120336f113180698613853dba",
|
"checksum": "5c4df6f120336f113180698613853dba",
|
||||||
"releaseTime": "2011-05-26T00:00:04+02:00",
|
"releaseTime": "2011-05-26T00:00:04+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -237,7 +208,6 @@
|
|||||||
"checksum": "efc2becca965e4f8feb5b4210c6a4fd1",
|
"checksum": "efc2becca965e4f8feb5b4210c6a4fd1",
|
||||||
"releaseTime": "2011-05-26T00:00:03+02:00",
|
"releaseTime": "2011-05-26T00:00:03+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -245,7 +215,6 @@
|
|||||||
"checksum": "01330b1c930102a683a4dd8d792e632e",
|
"checksum": "01330b1c930102a683a4dd8d792e632e",
|
||||||
"releaseTime": "2011-05-26T00:00:02+02:00",
|
"releaseTime": "2011-05-26T00:00:02+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -253,7 +222,6 @@
|
|||||||
"checksum": "a7e82c441a57ef4068c533f4d777336a",
|
"checksum": "a7e82c441a57ef4068c533f4d777336a",
|
||||||
"releaseTime": "2011-05-26T00:00:01+02:00",
|
"releaseTime": "2011-05-26T00:00:01+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -261,7 +229,6 @@
|
|||||||
"checksum": "d531e221227a65392259d3141893280d",
|
"checksum": "d531e221227a65392259d3141893280d",
|
||||||
"releaseTime": "2011-05-26T00:00:00+02:00",
|
"releaseTime": "2011-05-26T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -269,7 +236,6 @@
|
|||||||
"checksum": "d02fa9998e30693d8d989d5f88cf0040",
|
"checksum": "d02fa9998e30693d8d989d5f88cf0040",
|
||||||
"releaseTime": "2011-04-20T00:00:00+02:00",
|
"releaseTime": "2011-04-20T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -277,7 +243,6 @@
|
|||||||
"checksum": "24289130902822d73f8722b52bc07cdb",
|
"checksum": "24289130902822d73f8722b52bc07cdb",
|
||||||
"releaseTime": "2011-04-19T00:00:00+02:00",
|
"releaseTime": "2011-04-19T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -285,7 +250,6 @@
|
|||||||
"checksum": "9379e54b581ba4ef3acc3e326e87db91",
|
"checksum": "9379e54b581ba4ef3acc3e326e87db91",
|
||||||
"releaseTime": "2011-04-05T00:00:00+02:00",
|
"releaseTime": "2011-04-05T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -293,7 +257,6 @@
|
|||||||
"checksum": "71e64b61175b371ed148b385f2d14ebf",
|
"checksum": "71e64b61175b371ed148b385f2d14ebf",
|
||||||
"releaseTime": "2011-03-31T00:00:00+02:00",
|
"releaseTime": "2011-03-31T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -301,7 +264,6 @@
|
|||||||
"checksum": "4203826f35e1036f089919032c3d19d1",
|
"checksum": "4203826f35e1036f089919032c3d19d1",
|
||||||
"releaseTime": "2011-02-23T00:00:00+02:00",
|
"releaseTime": "2011-02-23T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -309,7 +271,6 @@
|
|||||||
"checksum": "de2164df461d028229ed2e101181bbd4",
|
"checksum": "de2164df461d028229ed2e101181bbd4",
|
||||||
"releaseTime": "2011-02-22T00:00:00+02:00",
|
"releaseTime": "2011-02-22T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -317,7 +278,6 @@
|
|||||||
"checksum": "1736c5ba4f63a981220c2a18a4120180",
|
"checksum": "1736c5ba4f63a981220c2a18a4120180",
|
||||||
"releaseTime": "2011-01-21T00:00:00+02:00",
|
"releaseTime": "2011-01-21T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -325,7 +285,6 @@
|
|||||||
"checksum": "486d83ec00554b45ffa21af2faa0116a",
|
"checksum": "486d83ec00554b45ffa21af2faa0116a",
|
||||||
"releaseTime": "2011-01-14T00:00:00+02:00",
|
"releaseTime": "2011-01-14T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -333,7 +292,6 @@
|
|||||||
"checksum": "6426223efe23c3931a4ef89685be3349",
|
"checksum": "6426223efe23c3931a4ef89685be3349",
|
||||||
"releaseTime": "2011-01-13T00:00:00+02:00",
|
"releaseTime": "2011-01-13T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -341,7 +299,6 @@
|
|||||||
"checksum": "7d547e495a770c62054ef136add43034",
|
"checksum": "7d547e495a770c62054ef136add43034",
|
||||||
"releaseTime": "2010-12-22T00:00:01+02:00",
|
"releaseTime": "2010-12-22T00:00:01+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -349,7 +306,6 @@
|
|||||||
"checksum": "1f9331f2bfca81b6ce2acdfc1f105837",
|
"checksum": "1f9331f2bfca81b6ce2acdfc1f105837",
|
||||||
"releaseTime": "2010-12-22T00:00:00+02:00",
|
"releaseTime": "2010-12-22T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -357,7 +313,6 @@
|
|||||||
"checksum": "d200c465b8c167cc8df6537531fc9a48",
|
"checksum": "d200c465b8c167cc8df6537531fc9a48",
|
||||||
"releaseTime": "2010-12-21T00:00:00+02:00",
|
"releaseTime": "2010-12-21T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -365,7 +320,6 @@
|
|||||||
"checksum": "03bd20b870dbbd121de5dca98af4e1ce",
|
"checksum": "03bd20b870dbbd121de5dca98af4e1ce",
|
||||||
"releaseTime": "2010-12-20T00:00:01+02:00",
|
"releaseTime": "2010-12-20T00:00:01+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -373,7 +327,6 @@
|
|||||||
"checksum": "5f8733dbbf09b4e7c874661a3c29c239",
|
"checksum": "5f8733dbbf09b4e7c874661a3c29c239",
|
||||||
"releaseTime": "2010-12-20T00:00:00+02:00",
|
"releaseTime": "2010-12-20T00:00:00+02:00",
|
||||||
"type": "old_beta",
|
"type": "old_beta",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -381,7 +334,6 @@
|
|||||||
"checksum": "ddd5e39467f28d1ea1a03b4d9e790867",
|
"checksum": "ddd5e39467f28d1ea1a03b4d9e790867",
|
||||||
"releaseTime": "2010-12-03T00:00:00+02:00",
|
"releaseTime": "2010-12-03T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -389,7 +341,6 @@
|
|||||||
"checksum": "7d3a43037190970ff2e11153b5718b74",
|
"checksum": "7d3a43037190970ff2e11153b5718b74",
|
||||||
"releaseTime": "2010-12-01T00:00:00+02:00",
|
"releaseTime": "2010-12-01T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -397,7 +348,6 @@
|
|||||||
"checksum": "0a1cc8c668faa6dc93fc418e8b4b097a",
|
"checksum": "0a1cc8c668faa6dc93fc418e8b4b097a",
|
||||||
"releaseTime": "2010-11-30T00:00:00+02:00",
|
"releaseTime": "2010-11-30T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -405,7 +355,6 @@
|
|||||||
"checksum": "b2c25a753c82a1cd228ce71469829dc1",
|
"checksum": "b2c25a753c82a1cd228ce71469829dc1",
|
||||||
"releaseTime": "2010-11-26T00:00:00+02:00",
|
"releaseTime": "2010-11-26T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -413,7 +362,6 @@
|
|||||||
"checksum": "3ad4808ef2ac3b65d10305315260da03",
|
"checksum": "3ad4808ef2ac3b65d10305315260da03",
|
||||||
"releaseTime": "2010-11-25T00:00:00+02:00",
|
"releaseTime": "2010-11-25T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -421,7 +369,6 @@
|
|||||||
"checksum": "70cbab762b17c5b11fefea9b12564119",
|
"checksum": "70cbab762b17c5b11fefea9b12564119",
|
||||||
"releaseTime": "2010-11-24T00:00:01+02:00",
|
"releaseTime": "2010-11-24T00:00:01+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -429,7 +376,6 @@
|
|||||||
"checksum": "25f053114e34b915e675f82d58f08711",
|
"checksum": "25f053114e34b915e675f82d58f08711",
|
||||||
"releaseTime": "2010-11-24T00:00:00+02:00",
|
"releaseTime": "2010-11-24T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -437,7 +383,6 @@
|
|||||||
"checksum": "6250fb17f8898c4d970d6bd03c229177",
|
"checksum": "6250fb17f8898c4d970d6bd03c229177",
|
||||||
"releaseTime": "2010-11-10T00:00:01+02:00",
|
"releaseTime": "2010-11-10T00:00:01+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -445,7 +390,6 @@
|
|||||||
"checksum": "0f9fe018b344fd9dd849005f9bdca803",
|
"checksum": "0f9fe018b344fd9dd849005f9bdca803",
|
||||||
"releaseTime": "2010-11-10T00:00:00+02:00",
|
"releaseTime": "2010-11-10T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "texturepacks"]
|
"+traits": ["legacyLaunch", "texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -453,7 +397,6 @@
|
|||||||
"checksum": "0a496e44a7b4e2f493b5893d8e5845bd",
|
"checksum": "0a496e44a7b4e2f493b5893d8e5845bd",
|
||||||
"releaseTime": "2010-11-05T00:00:01+02:00",
|
"releaseTime": "2010-11-05T00:00:01+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -461,7 +404,6 @@
|
|||||||
"checksum": "0a496e44a7b4e2f493b5893d8e5845bd",
|
"checksum": "0a496e44a7b4e2f493b5893d8e5845bd",
|
||||||
"releaseTime": "2010-11-05T00:00:00+02:00",
|
"releaseTime": "2010-11-05T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -469,7 +411,6 @@
|
|||||||
"checksum": "f5bcb4d0c0e78bc220f164b89ae9bd60",
|
"checksum": "f5bcb4d0c0e78bc220f164b89ae9bd60",
|
||||||
"releaseTime": "2010-11-04T00:00:00+02:00",
|
"releaseTime": "2010-11-04T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -477,7 +418,6 @@
|
|||||||
"checksum": "b2e9333e967cb89488884c2e5c715d4f",
|
"checksum": "b2e9333e967cb89488884c2e5c715d4f",
|
||||||
"releaseTime": "2010-10-31T00:00:00+02:00",
|
"releaseTime": "2010-10-31T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -485,7 +425,6 @@
|
|||||||
"checksum": "44c384dae02390f700458b95d82c3e2a",
|
"checksum": "44c384dae02390f700458b95d82c3e2a",
|
||||||
"releaseTime": "2010-10-30T00:00:00+02:00",
|
"releaseTime": "2010-10-30T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -493,7 +432,6 @@
|
|||||||
"checksum": "94346e1b8f6ad0e4a284314f0e29207b",
|
"checksum": "94346e1b8f6ad0e4a284314f0e29207b",
|
||||||
"releaseTime": "2010-09-23T00:00:00+02:00",
|
"releaseTime": "2010-09-23T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -501,7 +439,6 @@
|
|||||||
"checksum": "72ba1f834327805cb44164a42b331522",
|
"checksum": "72ba1f834327805cb44164a42b331522",
|
||||||
"releaseTime": "2010-09-20T00:00:00+02:00",
|
"releaseTime": "2010-09-20T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -509,7 +446,6 @@
|
|||||||
"checksum": "891fd93e04f5daaf35d73c58e45c01b1",
|
"checksum": "891fd93e04f5daaf35d73c58e45c01b1",
|
||||||
"releaseTime": "2010-09-13T00:00:00+02:00",
|
"releaseTime": "2010-09-13T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -517,7 +453,6 @@
|
|||||||
"checksum": "16ed7dc58244772847991e504afcf02f",
|
"checksum": "16ed7dc58244772847991e504afcf02f",
|
||||||
"releaseTime": "2010-08-23T00:00:00+02:00",
|
"releaseTime": "2010-08-23T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -525,7 +460,6 @@
|
|||||||
"checksum": "d89760b0871ef61a55c9f336c0439d58",
|
"checksum": "d89760b0871ef61a55c9f336c0439d58",
|
||||||
"releaseTime": "2010-08-20T00:00:00+02:00",
|
"releaseTime": "2010-08-20T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -533,7 +467,6 @@
|
|||||||
"checksum": "6bbde02c13aed5766275f4398ede6aae",
|
"checksum": "6bbde02c13aed5766275f4398ede6aae",
|
||||||
"releaseTime": "2010-08-12T00:00:00+02:00",
|
"releaseTime": "2010-08-12T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -541,7 +474,6 @@
|
|||||||
"checksum": "ade257d2080d56fa983763f9c701fa14",
|
"checksum": "ade257d2080d56fa983763f9c701fa14",
|
||||||
"releaseTime": "2010-08-04T00:00:00+02:00",
|
"releaseTime": "2010-08-04T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -549,7 +481,6 @@
|
|||||||
"checksum": "227d0c6fa896a231de6269a074c9a458",
|
"checksum": "227d0c6fa896a231de6269a074c9a458",
|
||||||
"releaseTime": "2010-07-30T00:00:00+02:00",
|
"releaseTime": "2010-07-30T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -557,7 +488,6 @@
|
|||||||
"checksum": "6f1b1dd157fa0df39760f5be3eab01b0",
|
"checksum": "6f1b1dd157fa0df39760f5be3eab01b0",
|
||||||
"releaseTime": "2010-07-23T00:00:00+02:00",
|
"releaseTime": "2010-07-23T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -565,7 +495,6 @@
|
|||||||
"checksum": "ae5f606caa18222e7568819c910ee423",
|
"checksum": "ae5f606caa18222e7568819c910ee423",
|
||||||
"releaseTime": "2010-07-13T00:00:00+02:00",
|
"releaseTime": "2010-07-13T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "y",
|
"mainClass": "y",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
@ -574,7 +503,6 @@
|
|||||||
"checksum": "13ce7935c3670e7494e26b2704bfa3e9",
|
"checksum": "13ce7935c3670e7494e26b2704bfa3e9",
|
||||||
"releaseTime": "2010-07-09T00:00:00+02:00",
|
"releaseTime": "2010-07-09T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "ax",
|
"mainClass": "ax",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
},
|
},
|
||||||
@ -583,7 +511,6 @@
|
|||||||
"checksum": "f5f5aa34760facc10486e906a7c60196",
|
"checksum": "f5f5aa34760facc10486e906a7c60196",
|
||||||
"releaseTime": "2010-06-16T00:00:00+02:00",
|
"releaseTime": "2010-06-16T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "net.minecraft.client.d",
|
"mainClass": "net.minecraft.client.d",
|
||||||
"appletClass": "net.minecraft.client.MinecraftApplet",
|
"appletClass": "net.minecraft.client.MinecraftApplet",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
@ -593,7 +520,6 @@
|
|||||||
"checksum": "fcfd7f83a6b27503cf48202381a5adf2",
|
"checksum": "fcfd7f83a6b27503cf48202381a5adf2",
|
||||||
"releaseTime": "2009-12-22T00:00:00+02:00",
|
"releaseTime": "2009-12-22T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.minecraft.l",
|
"mainClass": "com.mojang.minecraft.l",
|
||||||
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
@ -603,7 +529,6 @@
|
|||||||
"checksum": "a9527cb5aef198e0f53e235ebe13dc75",
|
"checksum": "a9527cb5aef198e0f53e235ebe13dc75",
|
||||||
"releaseTime": "2009-05-22T00:00:00+02:00",
|
"releaseTime": "2009-05-22T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.minecraft.c",
|
"mainClass": "com.mojang.minecraft.c",
|
||||||
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
@ -613,7 +538,6 @@
|
|||||||
"checksum": "3617fbf5fbfd2b837ebf5ceb63584908",
|
"checksum": "3617fbf5fbfd2b837ebf5ceb63584908",
|
||||||
"releaseTime": "2009-05-31T00:00:00+02:00",
|
"releaseTime": "2009-05-31T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.minecraft.Minecraft",
|
"mainClass": "com.mojang.minecraft.Minecraft",
|
||||||
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
@ -623,7 +547,6 @@
|
|||||||
"checksum": "a6e03c2eaf74709facc0d2477648e999",
|
"checksum": "a6e03c2eaf74709facc0d2477648e999",
|
||||||
"releaseTime": "2009-05-17T00:00:00+02:00",
|
"releaseTime": "2009-05-17T00:00:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.minecraft.Minecraft",
|
"mainClass": "com.mojang.minecraft.Minecraft",
|
||||||
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
"appletClass": "com.mojang.minecraft.MinecraftApplet",
|
||||||
"+traits": ["legacyLaunch", "no-texturepacks"]
|
"+traits": ["legacyLaunch", "no-texturepacks"]
|
||||||
@ -633,7 +556,6 @@
|
|||||||
"checksum": "80882b8936a5c8d91500838a6660b504",
|
"checksum": "80882b8936a5c8d91500838a6660b504",
|
||||||
"releaseTime": "2009-05-16T13:48:00+02:00",
|
"releaseTime": "2009-05-16T13:48:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.minecraft.RubyDung",
|
"mainClass": "com.mojang.minecraft.RubyDung",
|
||||||
"+traits": ["no-texturepacks"]
|
"+traits": ["no-texturepacks"]
|
||||||
},
|
},
|
||||||
@ -642,7 +564,6 @@
|
|||||||
"checksum": "24c5cc99a2a612697ed2f7d5d04242fe",
|
"checksum": "24c5cc99a2a612697ed2f7d5d04242fe",
|
||||||
"releaseTime": "2009-05-16T00:52:00+02:00",
|
"releaseTime": "2009-05-16T00:52:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.rubydung.RubyDung",
|
"mainClass": "com.mojang.rubydung.RubyDung",
|
||||||
"+traits": ["no-texturepacks"]
|
"+traits": ["no-texturepacks"]
|
||||||
},
|
},
|
||||||
@ -651,7 +572,6 @@
|
|||||||
"checksum": "70e33a81c541b13a477e68c1207124eb",
|
"checksum": "70e33a81c541b13a477e68c1207124eb",
|
||||||
"releaseTime": "2009-05-13T23:28:00+02:00",
|
"releaseTime": "2009-05-13T23:28:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.rubydung.RubyDung",
|
"mainClass": "com.mojang.rubydung.RubyDung",
|
||||||
"+traits": ["no-texturepacks"]
|
"+traits": ["no-texturepacks"]
|
||||||
},
|
},
|
||||||
@ -660,7 +580,6 @@
|
|||||||
"checksum": "99fdaea10c494b9c3c3254636b98b799",
|
"checksum": "99fdaea10c494b9c3c3254636b98b799",
|
||||||
"releaseTime": "2009-05-13T22:11:00+02:00",
|
"releaseTime": "2009-05-13T22:11:00+02:00",
|
||||||
"type": "old_alpha",
|
"type": "old_alpha",
|
||||||
"processArguments": "legacy",
|
|
||||||
"mainClass": "com.mojang.rubydung.RubyDung",
|
"mainClass": "com.mojang.rubydung.RubyDung",
|
||||||
"+traits": ["no-texturepacks"]
|
"+traits": ["no-texturepacks"]
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,6 @@ set(LOGIC_SOURCES
|
|||||||
minecraft/VersionFile.cpp
|
minecraft/VersionFile.cpp
|
||||||
minecraft/VersionFile.h
|
minecraft/VersionFile.h
|
||||||
minecraft/ProfilePatch.h
|
minecraft/ProfilePatch.h
|
||||||
minecraft/VersionSource.h
|
|
||||||
minecraft/VersionFilterData.h
|
minecraft/VersionFilterData.h
|
||||||
minecraft/VersionFilterData.cpp
|
minecraft/VersionFilterData.cpp
|
||||||
minecraft/Mod.h
|
minecraft/Mod.h
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "GradleSpecifier.h"
|
#include "GradleSpecifier.h"
|
||||||
#include "net/URLConstants.h"
|
#include "net/URLConstants.h"
|
||||||
|
|
||||||
class MojangLibraryDownloadInfo;
|
struct MojangLibraryDownloadInfo;
|
||||||
class Library;
|
class Library;
|
||||||
|
|
||||||
typedef std::shared_ptr<Library> LibraryPtr;
|
typedef std::shared_ptr<Library> LibraryPtr;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <Version.h>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
@ -60,11 +61,8 @@ void MinecraftProfile::reload()
|
|||||||
void MinecraftProfile::clear()
|
void MinecraftProfile::clear()
|
||||||
{
|
{
|
||||||
id.clear();
|
id.clear();
|
||||||
m_updateTime = QDateTime();
|
|
||||||
m_releaseTime = QDateTime();
|
|
||||||
type.clear();
|
type.clear();
|
||||||
assets.clear();
|
assets.clear();
|
||||||
processArguments.clear();
|
|
||||||
minecraftArguments.clear();
|
minecraftArguments.clear();
|
||||||
mainClass.clear();
|
mainClass.clear();
|
||||||
appletClass.clear();
|
appletClass.clear();
|
||||||
@ -94,13 +92,13 @@ bool MinecraftProfile::remove(const int index)
|
|||||||
auto patch = versionPatch(index);
|
auto patch = versionPatch(index);
|
||||||
if (!patch->isRemovable())
|
if (!patch->isRemovable())
|
||||||
{
|
{
|
||||||
qDebug() << "Patch" << patch->getPatchID() << "is non-removable";
|
qDebug() << "Patch" << patch->getID() << "is non-removable";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!m_strategy->removePatch(patch))
|
if(!m_strategy->removePatch(patch))
|
||||||
{
|
{
|
||||||
qCritical() << "Patch" << patch->getPatchID() << "could not be removed";
|
qCritical() << "Patch" << patch->getID() << "could not be removed";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +115,7 @@ bool MinecraftProfile::remove(const QString id)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto patch : VersionPatches)
|
for (auto patch : VersionPatches)
|
||||||
{
|
{
|
||||||
if (patch->getPatchID() == id)
|
if (patch->getID() == id)
|
||||||
{
|
{
|
||||||
return remove(i);
|
return remove(i);
|
||||||
}
|
}
|
||||||
@ -131,12 +129,12 @@ bool MinecraftProfile::customize(int index)
|
|||||||
auto patch = versionPatch(index);
|
auto patch = versionPatch(index);
|
||||||
if (!patch->isCustomizable())
|
if (!patch->isCustomizable())
|
||||||
{
|
{
|
||||||
qDebug() << "Patch" << patch->getPatchID() << "is not customizable";
|
qDebug() << "Patch" << patch->getID() << "is not customizable";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!m_strategy->customizePatch(patch))
|
if(!m_strategy->customizePatch(patch))
|
||||||
{
|
{
|
||||||
qCritical() << "Patch" << patch->getPatchID() << "could not be customized";
|
qCritical() << "Patch" << patch->getID() << "could not be customized";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reapplySafe();
|
reapplySafe();
|
||||||
@ -151,12 +149,12 @@ bool MinecraftProfile::revertToBase(int index)
|
|||||||
auto patch = versionPatch(index);
|
auto patch = versionPatch(index);
|
||||||
if (!patch->isRevertible())
|
if (!patch->isRevertible())
|
||||||
{
|
{
|
||||||
qDebug() << "Patch" << patch->getPatchID() << "is not revertible";
|
qDebug() << "Patch" << patch->getID() << "is not revertible";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!m_strategy->revertPatch(patch))
|
if(!m_strategy->revertPatch(patch))
|
||||||
{
|
{
|
||||||
qCritical() << "Patch" << patch->getPatchID() << "could not be reverted";
|
qCritical() << "Patch" << patch->getID() << "could not be reverted";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reapplySafe();
|
reapplySafe();
|
||||||
@ -172,14 +170,14 @@ QString MinecraftProfile::versionFileId(const int index) const
|
|||||||
{
|
{
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
return VersionPatches.at(index)->getPatchID();
|
return VersionPatches.at(index)->getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfilePatchPtr MinecraftProfile::versionPatch(const QString &id)
|
ProfilePatchPtr MinecraftProfile::versionPatch(const QString &id)
|
||||||
{
|
{
|
||||||
for (auto file : VersionPatches)
|
for (auto file : VersionPatches)
|
||||||
{
|
{
|
||||||
if (file->getPatchID() == id)
|
if (file->getID() == id)
|
||||||
{
|
{
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
@ -216,9 +214,9 @@ bool MinecraftProfile::revertToVanilla()
|
|||||||
}
|
}
|
||||||
if(it->isRevertible() || it->isRemovable())
|
if(it->isRevertible() || it->isRemovable())
|
||||||
{
|
{
|
||||||
if(!remove(it->getPatchID()))
|
if(!remove(it->getID()))
|
||||||
{
|
{
|
||||||
qWarning() << "Couldn't remove" << it->getPatchID() << "from profile!";
|
qWarning() << "Couldn't remove" << it->getID() << "from profile!";
|
||||||
reapplySafe();
|
reapplySafe();
|
||||||
saveCurrentOrder();
|
saveCurrentOrder();
|
||||||
return false;
|
return false;
|
||||||
@ -230,7 +228,7 @@ bool MinecraftProfile::revertToVanilla()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNormalLibs()
|
QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNormalLibs() const
|
||||||
{
|
{
|
||||||
QList<std::shared_ptr<Library> > output;
|
QList<std::shared_ptr<Library> > output;
|
||||||
for (auto lib : libraries)
|
for (auto lib : libraries)
|
||||||
@ -251,7 +249,7 @@ QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNormalLibs()
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNativeLibs()
|
QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNativeLibs() const
|
||||||
{
|
{
|
||||||
QList<std::shared_ptr<Library> > output;
|
QList<std::shared_ptr<Library> > output;
|
||||||
for (auto lib : libraries)
|
for (auto lib : libraries)
|
||||||
@ -282,16 +280,16 @@ QVariant MinecraftProfile::data(const QModelIndex &index, int role) const
|
|||||||
switch (column)
|
switch (column)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return VersionPatches.at(row)->getPatchName();
|
return VersionPatches.at(row)->getName();
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if(patch->isCustom())
|
if(patch->isCustom())
|
||||||
{
|
{
|
||||||
return QString("%1 (Custom)").arg(patch->getPatchVersion());
|
return QString("%1 (Custom)").arg(patch->getVersion());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return patch->getPatchVersion();
|
return patch->getVersion();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -366,7 +364,7 @@ void MinecraftProfile::saveCurrentOrder() const
|
|||||||
{
|
{
|
||||||
if(!item->isMoveable())
|
if(!item->isMoveable())
|
||||||
continue;
|
continue;
|
||||||
order.append(item->getPatchID());
|
order.append(item->getID());
|
||||||
}
|
}
|
||||||
m_strategy->saveOrder(order);
|
m_strategy->saveOrder(order);
|
||||||
}
|
}
|
||||||
@ -419,7 +417,6 @@ void MinecraftProfile::reapply()
|
|||||||
{
|
{
|
||||||
file->applyTo(this);
|
file->applyTo(this);
|
||||||
}
|
}
|
||||||
finalize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MinecraftProfile::reapplySafe()
|
bool MinecraftProfile::reapplySafe()
|
||||||
@ -437,41 +434,186 @@ bool MinecraftProfile::reapplySafe()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftProfile::finalize()
|
static void applyString(const QString & from, QString & to)
|
||||||
|
{
|
||||||
|
if(from.isEmpty())
|
||||||
|
return;
|
||||||
|
to = from;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyMinecraftVersion(const QString& id)
|
||||||
|
{
|
||||||
|
applyString(id, this->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyAppletClass(const QString& appletClass)
|
||||||
|
{
|
||||||
|
applyString(appletClass, this->appletClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyMainClass(const QString& mainClass)
|
||||||
|
{
|
||||||
|
applyString(mainClass, this->mainClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyMinecraftArguments(const QString& minecraftArguments, bool isMinecraft)
|
||||||
|
{
|
||||||
|
applyString(minecraftArguments, this->minecraftArguments);
|
||||||
|
if(isMinecraft)
|
||||||
|
{
|
||||||
|
applyString(minecraftArguments, this->vanillaMinecraftArguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyMinecraftVersionType(const QString& type)
|
||||||
|
{
|
||||||
|
applyString(type, this->type);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyMinecraftAssets(const QString& assets)
|
||||||
|
{
|
||||||
|
applyString(assets, this->assets);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyTraits(const QSet<QString>& traits)
|
||||||
|
{
|
||||||
|
this->traits.unite(traits);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyTweakers(const QStringList& tweakers)
|
||||||
|
{
|
||||||
|
// FIXME: check for dupes?
|
||||||
|
// FIXME: does order matter?
|
||||||
|
for (auto tweaker : tweakers)
|
||||||
|
{
|
||||||
|
this->tweakers += tweaker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyJarMods(const QList<JarmodPtr>& jarMods)
|
||||||
|
{
|
||||||
|
this->jarMods.append(jarMods);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int findLibraryByName(QList<LibraryPtr> haystack, const GradleSpecifier &needle)
|
||||||
|
{
|
||||||
|
int retval = -1;
|
||||||
|
for (int i = 0; i < haystack.size(); ++i)
|
||||||
|
{
|
||||||
|
if (haystack.at(i)->rawName().matchName(needle))
|
||||||
|
{
|
||||||
|
// only one is allowed.
|
||||||
|
if (retval != -1)
|
||||||
|
return -1;
|
||||||
|
retval = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinecraftProfile::applyLibrary(LibraryPtr library, bool isMinecraft)
|
||||||
|
{
|
||||||
|
auto insert = [&](QList<LibraryPtr> & into)
|
||||||
|
{
|
||||||
|
// find the library by name.
|
||||||
|
const int index = findLibraryByName(into, library->rawName());
|
||||||
|
// library not found? just add it.
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
into.append(Library::limitedCopy(library));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto existingLibrary = into.at(index);
|
||||||
|
// if we are higher it means we should update
|
||||||
|
if (Version(library->version()) > Version(existingLibrary->version()))
|
||||||
|
{
|
||||||
|
auto libraryCopy = Library::limitedCopy(library);
|
||||||
|
into.replace(index, libraryCopy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
insert(libraries);
|
||||||
|
if(isMinecraft)
|
||||||
|
{
|
||||||
|
insert(vanillaLibraries);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString MinecraftProfile::getMinecraftVersion() const
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString MinecraftProfile::getAppletClass() const
|
||||||
|
{
|
||||||
|
return appletClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString MinecraftProfile::getMainClass() const
|
||||||
|
{
|
||||||
|
return mainClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QSet<QString> &MinecraftProfile::getTraits() const
|
||||||
|
{
|
||||||
|
return traits;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QStringList & MinecraftProfile::getTweakers() const
|
||||||
|
{
|
||||||
|
return tweakers;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MinecraftProfile::hasTrait(const QString& trait) const
|
||||||
|
{
|
||||||
|
return traits.contains(trait);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString MinecraftProfile::getMinecraftVersionType() const
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString MinecraftProfile::getMinecraftAssets() const
|
||||||
{
|
{
|
||||||
// HACK: deny april fools. my head hurts enough already.
|
// HACK: deny april fools. my head hurts enough already.
|
||||||
QDate now = QDate::currentDate();
|
QDate now = QDate::currentDate();
|
||||||
bool isAprilFools = now.month() == 4 && now.day() == 1;
|
bool isAprilFools = now.month() == 4 && now.day() == 1;
|
||||||
if (assets.endsWith("_af") && !isAprilFools)
|
if (assets.endsWith("_af") && !isAprilFools)
|
||||||
{
|
{
|
||||||
assets = assets.left(assets.length() - 3);
|
return assets.left(assets.length() - 3);
|
||||||
}
|
}
|
||||||
if (assets.isEmpty())
|
if (assets.isEmpty())
|
||||||
{
|
{
|
||||||
assets = "legacy";
|
return QLatin1Literal("legacy");
|
||||||
}
|
}
|
||||||
auto finalizeArguments = [&]( QString & minecraftArguments, const QString & processArguments ) -> void
|
return assets;
|
||||||
{
|
}
|
||||||
if (!minecraftArguments.isEmpty())
|
|
||||||
return;
|
QString MinecraftProfile::getMinecraftArguments() const
|
||||||
QString toCompare = processArguments.toLower();
|
{
|
||||||
if (toCompare == "legacy")
|
return minecraftArguments;
|
||||||
{
|
}
|
||||||
minecraftArguments = " ${auth_player_name} ${auth_session}";
|
|
||||||
}
|
QString MinecraftProfile::getVanillaMinecraftArguments() const
|
||||||
else if (toCompare == "username_session")
|
{
|
||||||
{
|
return vanillaMinecraftArguments;
|
||||||
minecraftArguments = "--username ${auth_player_name} --session ${auth_session}";
|
}
|
||||||
}
|
|
||||||
else if (toCompare == "username_session_version")
|
const QList<JarmodPtr> & MinecraftProfile::getJarMods() const
|
||||||
{
|
{
|
||||||
minecraftArguments = "--username ${auth_player_name} "
|
return jarMods;
|
||||||
"--session ${auth_session} "
|
}
|
||||||
"--version ${profile_name}";
|
|
||||||
}
|
const QList<LibraryPtr> & MinecraftProfile::getLibraries() const
|
||||||
};
|
{
|
||||||
finalizeArguments(vanillaMinecraftArguments, vanillaProcessArguments);
|
return libraries;
|
||||||
finalizeArguments(minecraftArguments, processArguments);
|
}
|
||||||
|
|
||||||
|
const QList<LibraryPtr> & MinecraftProfile::getVanillaLibraries() const
|
||||||
|
{
|
||||||
|
return vanillaLibraries;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftProfile::installJarMods(QStringList selectedFiles)
|
void MinecraftProfile::installJarMods(QStringList selectedFiles)
|
||||||
|
@ -88,16 +88,40 @@ public:
|
|||||||
/// apply the patches. Catches all the errors and returns true/false for success/failure
|
/// apply the patches. Catches all the errors and returns true/false for success/failure
|
||||||
bool reapplySafe();
|
bool reapplySafe();
|
||||||
|
|
||||||
/// do a finalization step (should always be done after applying all patches to profile)
|
public:
|
||||||
void finalize();
|
void applyMinecraftVersion(const QString& id);
|
||||||
|
void applyMainClass(const QString& mainClass);
|
||||||
|
void applyAppletClass(const QString& appletClass);
|
||||||
|
void applyMinecraftArguments(const QString& minecraftArguments, bool isMinecraft);
|
||||||
|
void applyMinecraftVersionType(const QString& type);
|
||||||
|
void applyMinecraftAssets(const QString& assets);
|
||||||
|
void applyTraits(const QSet<QString> &traits);
|
||||||
|
void applyTweakers(const QStringList &tweakers);
|
||||||
|
void applyJarMods(const QList<JarmodPtr>&jarMods);
|
||||||
|
void applyLibrary(LibraryPtr library, bool isMinecraft);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// get all java libraries that belong to the classpath
|
/// get all java libraries that belong to the classpath
|
||||||
QList<LibraryPtr> getActiveNormalLibs();
|
QList<LibraryPtr> getActiveNormalLibs() const;
|
||||||
|
|
||||||
/// get all native libraries that need to be available to the process
|
/// get all native libraries that need to be available to the process
|
||||||
QList<LibraryPtr> getActiveNativeLibs();
|
QList<LibraryPtr> getActiveNativeLibs() const;
|
||||||
|
|
||||||
|
QString getMinecraftVersion() const;
|
||||||
|
QString getMainClass() const;
|
||||||
|
QString getAppletClass() const;
|
||||||
|
QString getMinecraftVersionType() const;
|
||||||
|
QString getMinecraftAssets() const;
|
||||||
|
QString getMinecraftArguments() const;
|
||||||
|
QString getVanillaMinecraftArguments() const;
|
||||||
|
const QSet<QString> & getTraits() const;
|
||||||
|
const QStringList & getTweakers() const;
|
||||||
|
const QList<JarmodPtr> & getJarMods() const;
|
||||||
|
const QList<LibraryPtr> & getLibraries() const;
|
||||||
|
const QList<LibraryPtr> & getVanillaLibraries() const;
|
||||||
|
bool hasTrait(const QString & trait) const;
|
||||||
|
|
||||||
|
public:
|
||||||
/// get file ID of the patch file at #
|
/// get file ID of the patch file at #
|
||||||
QString versionFileId(const int index) const;
|
QString versionFileId(const int index) const;
|
||||||
|
|
||||||
@ -110,34 +134,22 @@ public:
|
|||||||
/// save the current patch order
|
/// save the current patch order
|
||||||
void saveCurrentOrder() const;
|
void saveCurrentOrder() const;
|
||||||
|
|
||||||
public: /* only use in ProfileStrategy */
|
|
||||||
/// Remove all the patches
|
/// Remove all the patches
|
||||||
void clearPatches();
|
void clearPatches();
|
||||||
|
|
||||||
/// Add the patch object to the internal list of patches
|
/// Add the patch object to the internal list of patches
|
||||||
void appendPatch(ProfilePatchPtr patch);
|
void appendPatch(ProfilePatchPtr patch);
|
||||||
|
|
||||||
public: /* data */
|
protected: /* data */
|
||||||
/// the ID - determines which jar to use! ACTUALLY IMPORTANT!
|
/// the ID - determines which jar to use! ACTUALLY IMPORTANT!
|
||||||
QString id;
|
QString id;
|
||||||
|
|
||||||
/// the time this version was actually released by Mojang
|
|
||||||
QDateTime m_releaseTime;
|
|
||||||
|
|
||||||
/// the time this version was last updated by Mojang
|
|
||||||
QDateTime m_updateTime;
|
|
||||||
|
|
||||||
/// Release type - "release" or "snapshot"
|
/// Release type - "release" or "snapshot"
|
||||||
QString type;
|
QString type;
|
||||||
|
|
||||||
/// Assets type - "legacy" or a version ID
|
/// Assets type - "legacy" or a version ID
|
||||||
QString assets;
|
QString assets;
|
||||||
/**
|
|
||||||
* DEPRECATED: Old versions of the new vanilla launcher used this
|
|
||||||
* ex: "username_session_version"
|
|
||||||
*/
|
|
||||||
QString processArguments;
|
|
||||||
/// Same as above, but only for vanilla
|
|
||||||
QString vanillaProcessArguments;
|
|
||||||
/**
|
/**
|
||||||
* arguments that should be used for launching minecraft
|
* arguments that should be used for launching minecraft
|
||||||
*
|
*
|
||||||
@ -145,19 +157,17 @@ public: /* data */
|
|||||||
* --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets}"
|
* --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets}"
|
||||||
*/
|
*/
|
||||||
QString minecraftArguments;
|
QString minecraftArguments;
|
||||||
|
|
||||||
/// Same as above, but only for vanilla
|
/// Same as above, but only for vanilla
|
||||||
QString vanillaMinecraftArguments;
|
QString vanillaMinecraftArguments;
|
||||||
/**
|
|
||||||
* A list of all tweaker classes
|
/// A list of all tweaker classes
|
||||||
*/
|
|
||||||
QStringList tweakers;
|
QStringList tweakers;
|
||||||
/**
|
|
||||||
* The main class to load first
|
/// The main class to load first
|
||||||
*/
|
|
||||||
QString mainClass;
|
QString mainClass;
|
||||||
/**
|
|
||||||
* The applet class, for some very old minecraft releases
|
/// The applet class, for some very old minecraft releases
|
||||||
*/
|
|
||||||
QString appletClass;
|
QString appletClass;
|
||||||
|
|
||||||
/// the list of libs - both active and inactive, native and java
|
/// the list of libs - both active and inactive, native and java
|
||||||
|
@ -43,6 +43,11 @@ QString MinecraftVersion::typeString() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VersionSource MinecraftVersion::getVersionSource()
|
||||||
|
{
|
||||||
|
return m_versionSource;
|
||||||
|
}
|
||||||
|
|
||||||
bool MinecraftVersion::hasJarMods()
|
bool MinecraftVersion::hasJarMods()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -64,19 +69,6 @@ void MinecraftVersion::applyFileTo(MinecraftProfile *version)
|
|||||||
throw VersionIncomplete(QObject::tr("Can't apply incomplete/builtin Minecraft version %1").arg(m_name));
|
throw VersionIncomplete(QObject::tr("Can't apply incomplete/builtin Minecraft version %1").arg(m_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
QJsonDocument MinecraftVersion::toJson(bool saveOrder)
|
|
||||||
{
|
|
||||||
if(m_versionSource == Local && getVersionFile())
|
|
||||||
{
|
|
||||||
return getVersionFile()->toJson(saveOrder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw VersionIncomplete(QObject::tr("Can't write incomplete/builtin Minecraft version %1").arg(m_name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
QString MinecraftVersion::getUrl() const
|
QString MinecraftVersion::getUrl() const
|
||||||
{
|
{
|
||||||
@ -171,36 +163,12 @@ void MinecraftVersion::applyTo(MinecraftProfile *version)
|
|||||||
throw VersionIncomplete(QObject::tr(
|
throw VersionIncomplete(QObject::tr(
|
||||||
"Minecraft version %1 could not be applied: version files are missing.").arg(m_descriptor));
|
"Minecraft version %1 could not be applied: version files are missing.").arg(m_descriptor));
|
||||||
}
|
}
|
||||||
if (!m_descriptor.isNull())
|
version->applyMinecraftVersion(m_descriptor);
|
||||||
{
|
version->applyMainClass(m_mainClass);
|
||||||
version->id = m_descriptor;
|
version->applyAppletClass(m_appletClass);
|
||||||
}
|
version->applyMinecraftArguments(" ${auth_player_name} ${auth_session}", true); // all builtin versions are legacy
|
||||||
if (!m_mainClass.isNull())
|
version->applyMinecraftVersionType(m_type);
|
||||||
{
|
version->applyTraits(m_traits);
|
||||||
version->mainClass = m_mainClass;
|
|
||||||
}
|
|
||||||
if (!m_appletClass.isNull())
|
|
||||||
{
|
|
||||||
version->appletClass = m_appletClass;
|
|
||||||
}
|
|
||||||
if (!m_processArguments.isNull())
|
|
||||||
{
|
|
||||||
version->vanillaProcessArguments = m_processArguments;
|
|
||||||
version->processArguments = m_processArguments;
|
|
||||||
}
|
|
||||||
if (!m_type.isNull())
|
|
||||||
{
|
|
||||||
version->type = m_type;
|
|
||||||
}
|
|
||||||
if (!m_releaseTime.isNull())
|
|
||||||
{
|
|
||||||
version->m_releaseTime = m_releaseTime;
|
|
||||||
}
|
|
||||||
if (!m_updateTime.isNull())
|
|
||||||
{
|
|
||||||
version->m_updateTime = m_updateTime;
|
|
||||||
}
|
|
||||||
version->traits.unite(m_traits);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int MinecraftVersion::getOrder()
|
int MinecraftVersion::getOrder()
|
||||||
@ -218,22 +186,27 @@ QList<JarmodPtr> MinecraftVersion::getJarMods()
|
|||||||
return QList<JarmodPtr>();
|
return QList<JarmodPtr>();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MinecraftVersion::getPatchName()
|
QString MinecraftVersion::getName()
|
||||||
{
|
{
|
||||||
return "Minecraft";
|
return "Minecraft";
|
||||||
}
|
}
|
||||||
QString MinecraftVersion::getPatchVersion()
|
QString MinecraftVersion::getVersion()
|
||||||
{
|
{
|
||||||
return m_descriptor;
|
return m_descriptor;
|
||||||
}
|
}
|
||||||
QString MinecraftVersion::getPatchID()
|
QString MinecraftVersion::getID()
|
||||||
{
|
{
|
||||||
return "net.minecraft";
|
return "net.minecraft";
|
||||||
}
|
}
|
||||||
QString MinecraftVersion::getPatchFilename()
|
QString MinecraftVersion::getFilename()
|
||||||
{
|
{
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
QDateTime MinecraftVersion::getReleaseDateTime()
|
||||||
|
{
|
||||||
|
return m_releaseTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MinecraftVersion::needsUpdate()
|
bool MinecraftVersion::needsUpdate()
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "BaseVersion.h"
|
#include "BaseVersion.h"
|
||||||
#include "ProfilePatch.h"
|
#include "ProfilePatch.h"
|
||||||
#include "VersionFile.h"
|
#include "VersionFile.h"
|
||||||
#include "VersionSource.h"
|
|
||||||
|
|
||||||
#include "multimc_logic_export.h"
|
#include "multimc_logic_export.h"
|
||||||
|
|
||||||
@ -32,6 +31,8 @@ typedef std::shared_ptr<MinecraftVersion> MinecraftVersionPtr;
|
|||||||
|
|
||||||
class MULTIMC_LOGIC_EXPORT MinecraftVersion : public BaseVersion, public ProfilePatch
|
class MULTIMC_LOGIC_EXPORT MinecraftVersion : public BaseVersion, public ProfilePatch
|
||||||
{
|
{
|
||||||
|
friend class MinecraftVersionList;
|
||||||
|
|
||||||
public: /* methods */
|
public: /* methods */
|
||||||
bool usesLegacyLauncher();
|
bool usesLegacyLauncher();
|
||||||
virtual QString descriptor() override;
|
virtual QString descriptor() override;
|
||||||
@ -43,10 +44,13 @@ public: /* methods */
|
|||||||
virtual int getOrder() override;
|
virtual int getOrder() override;
|
||||||
virtual void setOrder(int order) override;
|
virtual void setOrder(int order) override;
|
||||||
virtual QList<JarmodPtr> getJarMods() override;
|
virtual QList<JarmodPtr> getJarMods() override;
|
||||||
virtual QString getPatchID() override;
|
virtual QString getID() override;
|
||||||
virtual QString getPatchVersion() override;
|
virtual QString getVersion() override;
|
||||||
virtual QString getPatchName() override;
|
virtual QString getName() override;
|
||||||
virtual QString getPatchFilename() override;
|
virtual QString getFilename() override;
|
||||||
|
QDateTime getReleaseDateTime() override;
|
||||||
|
VersionSource getVersionSource() override;
|
||||||
|
|
||||||
bool needsUpdate();
|
bool needsUpdate();
|
||||||
bool hasUpdate();
|
bool hasUpdate();
|
||||||
virtual bool isCustom() override;
|
virtual bool isCustom() override;
|
||||||
@ -84,7 +88,7 @@ public: /* methods */
|
|||||||
private: /* methods */
|
private: /* methods */
|
||||||
void applyFileTo(MinecraftProfile *version);
|
void applyFileTo(MinecraftProfile *version);
|
||||||
|
|
||||||
public: /* data */
|
protected: /* data */
|
||||||
VersionSource m_versionSource = Builtin;
|
VersionSource m_versionSource = Builtin;
|
||||||
|
|
||||||
/// The URL that this version will be downloaded from.
|
/// The URL that this version will be downloaded from.
|
||||||
@ -105,9 +109,6 @@ public: /* data */
|
|||||||
/// The applet class this version uses (if any, can be empty).
|
/// The applet class this version uses (if any, can be empty).
|
||||||
QString m_appletClass;
|
QString m_appletClass;
|
||||||
|
|
||||||
/// The process arguments used by this version
|
|
||||||
QString m_processArguments;
|
|
||||||
|
|
||||||
/// The type of this release
|
/// The type of this release
|
||||||
QString m_type;
|
QString m_type;
|
||||||
|
|
||||||
@ -126,7 +127,6 @@ public: /* data */
|
|||||||
/// an update available from Mojang
|
/// an update available from Mojang
|
||||||
MinecraftVersionPtr upstreamUpdate;
|
MinecraftVersionPtr upstreamUpdate;
|
||||||
|
|
||||||
private: /* data */
|
|
||||||
QDateTime m_loadedVersionFileTimestamp;
|
QDateTime m_loadedVersionFileTimestamp;
|
||||||
mutable VersionFilePtr m_loadedVersionFile;
|
mutable VersionFilePtr m_loadedVersionFile;
|
||||||
};
|
};
|
||||||
|
@ -111,7 +111,7 @@ static bool cmpVersions(BaseVersionPtr first, BaseVersionPtr second)
|
|||||||
{
|
{
|
||||||
auto left = std::dynamic_pointer_cast<MinecraftVersion>(first);
|
auto left = std::dynamic_pointer_cast<MinecraftVersion>(first);
|
||||||
auto right = std::dynamic_pointer_cast<MinecraftVersion>(second);
|
auto right = std::dynamic_pointer_cast<MinecraftVersion>(second);
|
||||||
return left->m_releaseTime > right->m_releaseTime;
|
return left->getReleaseDateTime() > right->getReleaseDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftVersionList::sortInternal()
|
void MinecraftVersionList::sortInternal()
|
||||||
@ -191,7 +191,6 @@ void MinecraftVersionList::loadBuiltinList()
|
|||||||
mcVersion->m_appletClass = versionObj.value("appletClass").toString("");
|
mcVersion->m_appletClass = versionObj.value("appletClass").toString("");
|
||||||
mcVersion->m_mainClass = versionObj.value("mainClass").toString("");
|
mcVersion->m_mainClass = versionObj.value("mainClass").toString("");
|
||||||
mcVersion->m_jarChecksum = versionObj.value("checksum").toString("");
|
mcVersion->m_jarChecksum = versionObj.value("checksum").toString("");
|
||||||
mcVersion->m_processArguments = versionObj.value("processArguments").toString("legacy");
|
|
||||||
if (versionObj.contains("+traits"))
|
if (versionObj.contains("+traits"))
|
||||||
{
|
{
|
||||||
for (auto traitVal : Json::requireArray(versionObj.value("+traits")))
|
for (auto traitVal : Json::requireArray(versionObj.value("+traits")))
|
||||||
|
@ -150,7 +150,7 @@ VersionFilePtr MojangVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
Bits::readString(root, "id", out->id);
|
Bits::readString(root, "id", out->id);
|
||||||
|
|
||||||
Bits::readString(root, "mainClass", out->mainClass);
|
Bits::readString(root, "mainClass", out->mainClass);
|
||||||
Bits::readString(root, "minecraftArguments", out->overwriteMinecraftArguments);
|
Bits::readString(root, "minecraftArguments", out->minecraftArguments);
|
||||||
Bits::readString(root, "type", out->type);
|
Bits::readString(root, "type", out->type);
|
||||||
|
|
||||||
if(root.contains("assetIndex"))
|
if(root.contains("assetIndex"))
|
||||||
@ -203,8 +203,7 @@ QJsonDocument versionFileToJson(VersionFilePtr patch)
|
|||||||
QJsonObject root;
|
QJsonObject root;
|
||||||
writeString(root, "id", patch->id);
|
writeString(root, "id", patch->id);
|
||||||
writeString(root, "mainClass", patch->mainClass);
|
writeString(root, "mainClass", patch->mainClass);
|
||||||
writeString(root, "processArguments", patch->processArguments);
|
writeString(root, "minecraftArguments", patch->minecraftArguments);
|
||||||
writeString(root, "minecraftArguments", patch->overwriteMinecraftArguments);
|
|
||||||
writeString(root, "type", patch->type);
|
writeString(root, "type", patch->type);
|
||||||
writeString(root, "assets", patch->assets);
|
writeString(root, "assets", patch->assets);
|
||||||
writeString(root, "releaseTime", timeToS3Time(patch->m_releaseTime));
|
writeString(root, "releaseTime", timeToS3Time(patch->m_releaseTime));
|
||||||
@ -246,7 +245,7 @@ QJsonDocument versionFileToJson(VersionFilePtr patch)
|
|||||||
|
|
||||||
static QJsonDocument minecraftVersionToJson(MinecraftVersionPtr patch)
|
static QJsonDocument minecraftVersionToJson(MinecraftVersionPtr patch)
|
||||||
{
|
{
|
||||||
if(patch->m_versionSource == Local && patch->getVersionFile())
|
if(patch->getVersionSource() == Local && patch->getVersionFile())
|
||||||
{
|
{
|
||||||
return MojangVersionFormat::profilePatchToJson(patch->getVersionFile());
|
return MojangVersionFormat::profilePatchToJson(patch->getVersionFile());
|
||||||
}
|
}
|
||||||
@ -268,7 +267,7 @@ QJsonDocument MojangVersionFormat::profilePatchToJson(const ProfilePatchPtr &pat
|
|||||||
{
|
{
|
||||||
return minecraftVersionToJson(mversion);
|
return minecraftVersionToJson(mversion);
|
||||||
}
|
}
|
||||||
throw VersionIncomplete(QObject::tr("Unhandled object type while processing %1").arg(patch->getPatchName()));
|
throw VersionIncomplete(QObject::tr("Unhandled object type while processing %1").arg(patch->getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryPtr MojangVersionFormat::libraryFromJson(const QJsonObject &libObj, const QString &filename)
|
LibraryPtr MojangVersionFormat::libraryFromJson(const QJsonObject &libObj, const QString &filename)
|
||||||
|
@ -14,6 +14,14 @@ enum ProblemSeverity
|
|||||||
PROBLEM_ERROR
|
PROBLEM_ERROR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// where is a version from?
|
||||||
|
enum VersionSource
|
||||||
|
{
|
||||||
|
Builtin, //!< version loaded from the internal resources.
|
||||||
|
Local, //!< version loaded from a file in the cache.
|
||||||
|
Remote, //!< incomplete version on a remote server.
|
||||||
|
};
|
||||||
|
|
||||||
class PatchProblem
|
class PatchProblem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -56,10 +64,14 @@ public:
|
|||||||
virtual void setOrder(int order) = 0;
|
virtual void setOrder(int order) = 0;
|
||||||
virtual int getOrder() = 0;
|
virtual int getOrder() = 0;
|
||||||
|
|
||||||
virtual QString getPatchID() = 0;
|
virtual QString getID() = 0;
|
||||||
virtual QString getPatchName() = 0;
|
virtual QString getName() = 0;
|
||||||
virtual QString getPatchVersion() = 0;
|
virtual QString getVersion() = 0;
|
||||||
virtual QString getPatchFilename() = 0;
|
virtual QDateTime getReleaseDateTime() = 0;
|
||||||
|
|
||||||
|
virtual QString getFilename() = 0;
|
||||||
|
|
||||||
|
virtual VersionSource getVersionSource() = 0;
|
||||||
|
|
||||||
virtual const QList<PatchProblem>& getProblems()
|
virtual const QList<PatchProblem>& getProblems()
|
||||||
{
|
{
|
||||||
|
@ -166,6 +166,5 @@ void removeLwjglFromPatch(VersionFilePtr patch)
|
|||||||
libs = filteredLibs;
|
libs = filteredLibs;
|
||||||
};
|
};
|
||||||
filter(patch->addLibs);
|
filter(patch->addLibs);
|
||||||
filter(patch->overwriteLibs);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,22 +12,6 @@
|
|||||||
#include "VersionBuildError.h"
|
#include "VersionBuildError.h"
|
||||||
#include <Version.h>
|
#include <Version.h>
|
||||||
|
|
||||||
int findLibraryByName(QList<LibraryPtr> haystack, const GradleSpecifier &needle)
|
|
||||||
{
|
|
||||||
int retval = -1;
|
|
||||||
for (int i = 0; i < haystack.size(); ++i)
|
|
||||||
{
|
|
||||||
if (haystack.at(i)->rawName().matchName(needle))
|
|
||||||
{
|
|
||||||
// only one is allowed.
|
|
||||||
if (retval != -1)
|
|
||||||
return -1;
|
|
||||||
retval = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool VersionFile::isMinecraftVersion()
|
bool VersionFile::isMinecraftVersion()
|
||||||
{
|
{
|
||||||
return fileId == "net.minecraft";
|
return fileId == "net.minecraft";
|
||||||
@ -40,105 +24,31 @@ bool VersionFile::hasJarMods()
|
|||||||
|
|
||||||
void VersionFile::applyTo(MinecraftProfile *version)
|
void VersionFile::applyTo(MinecraftProfile *version)
|
||||||
{
|
{
|
||||||
if (!version->id.isNull() && !mcVersion.isNull())
|
auto theirVersion = version->getMinecraftVersion();
|
||||||
|
if (!theirVersion.isNull() && !mcVersion.isNull())
|
||||||
{
|
{
|
||||||
if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(version->id) ==
|
if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1)
|
||||||
-1)
|
|
||||||
{
|
{
|
||||||
throw MinecraftVersionMismatch(fileId, mcVersion, version->id);
|
throw MinecraftVersionMismatch(fileId, mcVersion, theirVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool is_minecraft = isMinecraftVersion();
|
||||||
|
version->applyMinecraftVersion(id);
|
||||||
|
version->applyMainClass(mainClass);
|
||||||
|
version->applyAppletClass(appletClass);
|
||||||
|
version->applyMinecraftArguments(minecraftArguments, is_minecraft);
|
||||||
|
if (is_minecraft)
|
||||||
|
{
|
||||||
|
version->applyMinecraftVersionType(type);
|
||||||
|
}
|
||||||
|
version->applyMinecraftAssets(assets);
|
||||||
|
version->applyTweakers(addTweakers);
|
||||||
|
|
||||||
|
version->applyJarMods(jarMods);
|
||||||
|
version->applyTraits(traits);
|
||||||
|
|
||||||
if (!id.isNull())
|
|
||||||
{
|
|
||||||
version->id = id;
|
|
||||||
}
|
|
||||||
if (!mainClass.isNull())
|
|
||||||
{
|
|
||||||
version->mainClass = mainClass;
|
|
||||||
}
|
|
||||||
if (!appletClass.isNull())
|
|
||||||
{
|
|
||||||
version->appletClass = appletClass;
|
|
||||||
}
|
|
||||||
if (!processArguments.isNull())
|
|
||||||
{
|
|
||||||
if (isMinecraftVersion())
|
|
||||||
{
|
|
||||||
version->vanillaProcessArguments = processArguments;
|
|
||||||
}
|
|
||||||
version->processArguments = processArguments;
|
|
||||||
}
|
|
||||||
if (isMinecraftVersion())
|
|
||||||
{
|
|
||||||
if (!type.isNull())
|
|
||||||
{
|
|
||||||
version->type = type;
|
|
||||||
}
|
|
||||||
if (!m_releaseTime.isNull())
|
|
||||||
{
|
|
||||||
version->m_releaseTime = m_releaseTime;
|
|
||||||
}
|
|
||||||
if (!m_updateTime.isNull())
|
|
||||||
{
|
|
||||||
version->m_updateTime = m_updateTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!assets.isNull())
|
|
||||||
{
|
|
||||||
version->assets = assets;
|
|
||||||
}
|
|
||||||
if (!overwriteMinecraftArguments.isNull())
|
|
||||||
{
|
|
||||||
if (isMinecraftVersion())
|
|
||||||
{
|
|
||||||
version->vanillaMinecraftArguments = overwriteMinecraftArguments;
|
|
||||||
}
|
|
||||||
version->minecraftArguments = overwriteMinecraftArguments;
|
|
||||||
}
|
|
||||||
if (!addMinecraftArguments.isNull())
|
|
||||||
{
|
|
||||||
version->minecraftArguments += addMinecraftArguments;
|
|
||||||
}
|
|
||||||
if (shouldOverwriteTweakers)
|
|
||||||
{
|
|
||||||
version->tweakers = overwriteTweakers;
|
|
||||||
}
|
|
||||||
for (auto tweaker : addTweakers)
|
|
||||||
{
|
|
||||||
version->tweakers += tweaker;
|
|
||||||
}
|
|
||||||
version->jarMods.append(jarMods);
|
|
||||||
version->traits.unite(traits);
|
|
||||||
if (shouldOverwriteLibs)
|
|
||||||
{
|
|
||||||
QList<LibraryPtr> libs;
|
|
||||||
for (auto lib : overwriteLibs)
|
|
||||||
{
|
|
||||||
libs.append(Library::limitedCopy(lib));
|
|
||||||
}
|
|
||||||
if (isMinecraftVersion())
|
|
||||||
{
|
|
||||||
version->vanillaLibraries = libs;
|
|
||||||
}
|
|
||||||
version->libraries = libs;
|
|
||||||
}
|
|
||||||
for (auto addedLibrary : addLibs)
|
for (auto addedLibrary : addLibs)
|
||||||
{
|
{
|
||||||
// find the library by name.
|
version->applyLibrary(addedLibrary, isMinecraftVersion());
|
||||||
const int index = findLibraryByName(version->libraries, addedLibrary->rawName());
|
|
||||||
// library not found? just add it.
|
|
||||||
if (index < 0)
|
|
||||||
{
|
|
||||||
version->libraries.append(Library::limitedCopy(addedLibrary));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
auto existingLibrary = version->libraries.at(index);
|
|
||||||
// if we are higher it means we should update
|
|
||||||
if (Version(addedLibrary->version()) > Version(existingLibrary->version()))
|
|
||||||
{
|
|
||||||
auto library = Library::limitedCopy(addedLibrary);
|
|
||||||
version->libraries.replace(index, library);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ struct MojangAssetIndexInfo;
|
|||||||
typedef std::shared_ptr<VersionFile> VersionFilePtr;
|
typedef std::shared_ptr<VersionFile> VersionFilePtr;
|
||||||
class VersionFile : public ProfilePatch
|
class VersionFile : public ProfilePatch
|
||||||
{
|
{
|
||||||
|
friend class MojangVersionFormat;
|
||||||
|
friend class OneSixVersionFormat;
|
||||||
public: /* methods */
|
public: /* methods */
|
||||||
virtual void applyTo(MinecraftProfile *version) override;
|
virtual void applyTo(MinecraftProfile *version) override;
|
||||||
virtual bool isMinecraftVersion() override;
|
virtual bool isMinecraftVersion() override;
|
||||||
@ -36,22 +38,32 @@ public: /* methods */
|
|||||||
{
|
{
|
||||||
return jarMods;
|
return jarMods;
|
||||||
}
|
}
|
||||||
virtual QString getPatchID() override
|
virtual QString getID() override
|
||||||
{
|
{
|
||||||
return fileId;
|
return fileId;
|
||||||
}
|
}
|
||||||
virtual QString getPatchName() override
|
virtual QString getName() override
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
virtual QString getPatchVersion() override
|
virtual QString getVersion() override
|
||||||
{
|
{
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
virtual QString getPatchFilename() override
|
virtual QString getFilename() override
|
||||||
{
|
{
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
virtual QDateTime getReleaseDateTime() override
|
||||||
|
{
|
||||||
|
return m_releaseTime;
|
||||||
|
}
|
||||||
|
VersionSource getVersionSource() override
|
||||||
|
{
|
||||||
|
return Local;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual bool isCustom() override
|
virtual bool isCustom() override
|
||||||
{
|
{
|
||||||
return !m_isVanilla;
|
return !m_isVanilla;
|
||||||
@ -138,17 +150,11 @@ public: /* data */
|
|||||||
/// Mojang: class to launch Minecraft with
|
/// Mojang: class to launch Minecraft with
|
||||||
QString mainClass;
|
QString mainClass;
|
||||||
|
|
||||||
/// MultiMC: class to launch legacy Minecraft with (ambed in a custom window)
|
/// MultiMC: DEPRECATED class to launch legacy Minecraft with (ambed in a custom window)
|
||||||
QString appletClass;
|
QString appletClass;
|
||||||
|
|
||||||
/// Mojang: Minecraft launch arguments (may contain placeholders for variable substitution)
|
/// Mojang: Minecraft launch arguments (may contain placeholders for variable substitution)
|
||||||
QString overwriteMinecraftArguments;
|
QString minecraftArguments;
|
||||||
|
|
||||||
/// MultiMC: Minecraft launch arguments, additive variant
|
|
||||||
QString addMinecraftArguments;
|
|
||||||
|
|
||||||
/// Mojang: DEPRECATED variant of the Minecraft arguments, hardcoded, do not use!
|
|
||||||
QString processArguments;
|
|
||||||
|
|
||||||
/// Mojang: type of the Minecraft version
|
/// Mojang: type of the Minecraft version
|
||||||
QString type;
|
QString type;
|
||||||
@ -162,17 +168,9 @@ public: /* data */
|
|||||||
/// Mojang: DEPRECATED asset group to be used with Minecraft
|
/// Mojang: DEPRECATED asset group to be used with Minecraft
|
||||||
QString assets;
|
QString assets;
|
||||||
|
|
||||||
/// MultiMC: override list of tweaker mod arguments for launchwrapper (replaces the previously assembled lists)
|
|
||||||
bool shouldOverwriteTweakers = false;
|
|
||||||
QStringList overwriteTweakers;
|
|
||||||
|
|
||||||
/// MultiMC: list of tweaker mod arguments for launchwrapper
|
/// MultiMC: list of tweaker mod arguments for launchwrapper
|
||||||
QStringList addTweakers;
|
QStringList addTweakers;
|
||||||
|
|
||||||
/// MultiMC: override list of libraries (replaces the previously assembled lists)
|
|
||||||
bool shouldOverwriteLibs = false;
|
|
||||||
QList<LibraryPtr> overwriteLibs;
|
|
||||||
|
|
||||||
/// Mojang: list of libraries to add to the version
|
/// Mojang: list of libraries to add to the version
|
||||||
QList<LibraryPtr> addLibs;
|
QList<LibraryPtr> addLibs;
|
||||||
|
|
||||||
@ -182,6 +180,7 @@ public: /* data */
|
|||||||
/// MultiMC: list of jar mods added to this version
|
/// MultiMC: list of jar mods added to this version
|
||||||
QList<JarmodPtr> jarMods;
|
QList<JarmodPtr> jarMods;
|
||||||
|
|
||||||
|
public:
|
||||||
// Mojang: list of 'downloads' - client jar, server jar, windows server exe, maybe more.
|
// Mojang: list of 'downloads' - client jar, server jar, windows server exe, maybe more.
|
||||||
QMap <QString, std::shared_ptr<MojangDownloadInfo>> mojangDownloads;
|
QMap <QString, std::shared_ptr<MojangDownloadInfo>> mojangDownloads;
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
/// where is a version from?
|
|
||||||
enum VersionSource
|
|
||||||
{
|
|
||||||
Builtin, //!< version loaded from the internal resources.
|
|
||||||
Local, //!< version loaded from a file in the cache.
|
|
||||||
Remote, //!< incomplete version on a remote server.
|
|
||||||
};
|
|
@ -119,7 +119,7 @@ void ForgeInstaller::prepare(const QString &filename, const QString &universalUr
|
|||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
m_forge_json = newVersion;
|
m_forge_json = newVersion;
|
||||||
m_forge_json->id = installObj.value("minecraft").toString();
|
//m_forge_json->id = installObj.value("minecraft").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ForgeInstaller::add(OneSixInstance *to)
|
bool ForgeInstaller::add(OneSixInstance *to)
|
||||||
@ -134,15 +134,14 @@ bool ForgeInstaller::add(OneSixInstance *to)
|
|||||||
|
|
||||||
if (!m_forge_json)
|
if (!m_forge_json)
|
||||||
return false;
|
return false;
|
||||||
int sliding_insert_window = 0;
|
|
||||||
{
|
{
|
||||||
QJsonArray librariesPlus;
|
QJsonArray libraries;
|
||||||
// A blacklist
|
// A blacklist
|
||||||
QSet<QString> blacklist{"authlib", "realms"};
|
QSet<QString> blacklist{"authlib", "realms"};
|
||||||
//
|
//
|
||||||
QList<QString> xzlist{"org.scala-lang", "com.typesafe"};
|
QList<QString> xzlist{"org.scala-lang", "com.typesafe"};
|
||||||
// for each library in the version we are adding (except for the blacklisted)
|
// for each library in the version we are adding (except for the blacklisted)
|
||||||
for (auto lib : m_forge_json->libraries)
|
for (auto lib : m_forge_json->getLibraries())
|
||||||
{
|
{
|
||||||
QString libName = lib->artifactId();
|
QString libName = lib->artifactId();
|
||||||
QString rawName = lib->rawName();
|
QString rawName = lib->rawName();
|
||||||
@ -194,41 +193,27 @@ bool ForgeInstaller::add(OneSixInstance *to)
|
|||||||
|
|
||||||
QJsonObject libObj = OneSixVersionFormat::libraryToJson(lib.get());
|
QJsonObject libObj = OneSixVersionFormat::libraryToJson(lib.get());
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
bool equals = false;
|
bool equals = false;
|
||||||
// find an entry that matches this one
|
// find an entry that matches this one
|
||||||
for (auto tolib : to->getMinecraftProfile()->vanillaLibraries)
|
for (auto tolib : to->getMinecraftProfile()->getVanillaLibraries())
|
||||||
{
|
{
|
||||||
if (tolib->artifactId() != libName)
|
if (tolib->artifactId() != libName)
|
||||||
continue;
|
continue;
|
||||||
found = true;
|
|
||||||
if (OneSixVersionFormat::libraryToJson(tolib.get()) == libObj)
|
if (OneSixVersionFormat::libraryToJson(tolib.get()) == libObj)
|
||||||
{
|
{
|
||||||
equals = true;
|
equals = true;
|
||||||
}
|
}
|
||||||
// replace lib
|
|
||||||
libObj.insert("insert", QString("replace"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (equals)
|
if (equals)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!found)
|
libraries.append(libObj);
|
||||||
{
|
|
||||||
// add lib
|
|
||||||
libObj.insert("insert", QString("prepend"));
|
|
||||||
if (lib->artifactId() == "minecraftforge" || lib->artifactId() == "forge")
|
|
||||||
{
|
|
||||||
libObj.insert("MMC-depend", QString("hard"));
|
|
||||||
}
|
|
||||||
sliding_insert_window++;
|
|
||||||
}
|
|
||||||
librariesPlus.prepend(libObj);
|
|
||||||
}
|
}
|
||||||
obj.insert("+libraries", librariesPlus);
|
obj.insert("libraries", libraries);
|
||||||
obj.insert("mainClass", m_forge_json->mainClass);
|
obj.insert("mainClass", m_forge_json->getMainClass());
|
||||||
QString args = m_forge_json->minecraftArguments;
|
QString args = m_forge_json->getMinecraftArguments();
|
||||||
QStringList tweakers;
|
QStringList tweakers;
|
||||||
{
|
{
|
||||||
QRegularExpression expression("--tweakClass ([a-zA-Z0-9\\.]*)");
|
QRegularExpression expression("--tweakClass ([a-zA-Z0-9\\.]*)");
|
||||||
@ -240,7 +225,7 @@ bool ForgeInstaller::add(OneSixInstance *to)
|
|||||||
match = expression.match(args);
|
match = expression.match(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!args.isEmpty() && args != to->getMinecraftProfile()->vanillaMinecraftArguments)
|
if (!args.isEmpty() && args != to->getMinecraftProfile()->getVanillaMinecraftArguments())
|
||||||
{
|
{
|
||||||
obj.insert("minecraftArguments", args);
|
obj.insert("minecraftArguments", args);
|
||||||
}
|
}
|
||||||
@ -248,11 +233,6 @@ bool ForgeInstaller::add(OneSixInstance *to)
|
|||||||
{
|
{
|
||||||
obj.insert("+tweakers", QJsonArray::fromStringList(tweakers));
|
obj.insert("+tweakers", QJsonArray::fromStringList(tweakers));
|
||||||
}
|
}
|
||||||
if (!m_forge_json->processArguments.isEmpty() &&
|
|
||||||
m_forge_json->processArguments != to->getMinecraftProfile()->vanillaProcessArguments)
|
|
||||||
{
|
|
||||||
obj.insert("processArguments", m_forge_json->processArguments);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.insert("name", QString("Forge"));
|
obj.insert("name", QString("Forge"));
|
||||||
|
@ -54,9 +54,6 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches()
|
|||||||
auto file = ProfileUtils::parseJsonFile(QFileInfo(mcJson), false);
|
auto file = ProfileUtils::parseJsonFile(QFileInfo(mcJson), false);
|
||||||
|
|
||||||
// adapt the loaded file - the FTB patch file format is different than ours.
|
// adapt the loaded file - the FTB patch file format is different than ours.
|
||||||
file->addLibs = file->overwriteLibs;
|
|
||||||
file->overwriteLibs.clear();
|
|
||||||
file->shouldOverwriteLibs = false;
|
|
||||||
file->id.clear();
|
file->id.clear();
|
||||||
for(auto addLib: file->addLibs)
|
for(auto addLib: file->addLibs)
|
||||||
{
|
{
|
||||||
@ -98,8 +95,6 @@ void FTBProfileStrategy::load()
|
|||||||
|
|
||||||
loadDefaultBuiltinPatches();
|
loadDefaultBuiltinPatches();
|
||||||
loadUserPatches();
|
loadUserPatches();
|
||||||
|
|
||||||
profile->finalize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FTBProfileStrategy::saveOrder(ProfileUtils::PatchOrder order)
|
bool FTBProfileStrategy::saveOrder(ProfileUtils::PatchOrder order)
|
||||||
|
@ -61,7 +61,7 @@ QSet<QString> OneSixInstance::traits()
|
|||||||
return {"version-incomplete"};
|
return {"version-incomplete"};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return version->traits;
|
return version->getTraits();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Task> OneSixInstance::createUpdateTask()
|
std::shared_ptr<Task> OneSixInstance::createUpdateTask()
|
||||||
@ -95,8 +95,8 @@ QString replaceTokensIn(QString text, QMap<QString, QString> with)
|
|||||||
|
|
||||||
QStringList OneSixInstance::processMinecraftArgs(AuthSessionPtr session)
|
QStringList OneSixInstance::processMinecraftArgs(AuthSessionPtr session)
|
||||||
{
|
{
|
||||||
QString args_pattern = m_version->minecraftArguments;
|
QString args_pattern = m_version->getMinecraftArguments();
|
||||||
for (auto tweaker : m_version->tweakers)
|
for (auto tweaker : m_version->getTweakers())
|
||||||
{
|
{
|
||||||
args_pattern += " --tweakClass " + tweaker;
|
args_pattern += " --tweakClass " + tweaker;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ QStringList OneSixInstance::processMinecraftArgs(AuthSessionPtr session)
|
|||||||
token_mapping["profile_name"] = token_mapping["version_name"] = "MultiMC5";
|
token_mapping["profile_name"] = token_mapping["version_name"] = "MultiMC5";
|
||||||
if(m_version->isVanilla())
|
if(m_version->isVanilla())
|
||||||
{
|
{
|
||||||
token_mapping["version_type"] = m_version->type;
|
token_mapping["version_type"] = m_version->getMinecraftVersionType();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -123,24 +123,14 @@ QStringList OneSixInstance::processMinecraftArgs(AuthSessionPtr session)
|
|||||||
QString absRootDir = QDir(minecraftRoot()).absolutePath();
|
QString absRootDir = QDir(minecraftRoot()).absolutePath();
|
||||||
token_mapping["game_directory"] = absRootDir;
|
token_mapping["game_directory"] = absRootDir;
|
||||||
QString absAssetsDir = QDir("assets/").absolutePath();
|
QString absAssetsDir = QDir("assets/").absolutePath();
|
||||||
token_mapping["game_assets"] = AssetsUtils::reconstructAssets(m_version->assets).absolutePath();
|
token_mapping["game_assets"] = AssetsUtils::reconstructAssets(m_version->getMinecraftAssets()).absolutePath();
|
||||||
|
|
||||||
token_mapping["user_properties"] = session->serializeUserProperties();
|
token_mapping["user_properties"] = session->serializeUserProperties();
|
||||||
token_mapping["user_type"] = session->user_type;
|
token_mapping["user_type"] = session->user_type;
|
||||||
|
|
||||||
// 1.7.3+ assets tokens
|
// 1.7.3+ assets tokens
|
||||||
token_mapping["assets_root"] = absAssetsDir;
|
token_mapping["assets_root"] = absAssetsDir;
|
||||||
token_mapping["assets_index_name"] = m_version->assets;
|
token_mapping["assets_index_name"] = m_version->getMinecraftAssets();
|
||||||
|
|
||||||
// 1.9+ version type token
|
|
||||||
if(m_version->isVanilla())
|
|
||||||
{
|
|
||||||
token_mapping["version_type"] = m_version->type;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
token_mapping["version_type"] = "custom";
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList parts = args_pattern.split(' ', QString::SkipEmptyParts);
|
QStringList parts = args_pattern.split(' ', QString::SkipEmptyParts);
|
||||||
for (int i = 0; i < parts.length(); i++)
|
for (int i = 0; i < parts.length(); i++)
|
||||||
@ -182,7 +172,7 @@ QString OneSixInstance::createLaunchScript(AuthSessionPtr session)
|
|||||||
launchScript += "coremod " + coremod.filename().completeBaseName() + "\n";;
|
launchScript += "coremod " + coremod.filename().completeBaseName() + "\n";;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto & jarmod: m_version->jarMods)
|
for(auto & jarmod: m_version->getJarMods())
|
||||||
{
|
{
|
||||||
launchScript += "jarmod " + jarmod->originalName + " (" + jarmod->name + ")\n";
|
launchScript += "jarmod " + jarmod->originalName + " (" + jarmod->name + ")\n";
|
||||||
}
|
}
|
||||||
@ -201,17 +191,19 @@ QString OneSixInstance::createLaunchScript(AuthSessionPtr session)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString relpath = m_version->id + "/" + m_version->id + ".jar";
|
QString relpath = m_version->getMinecraftVersion() + "/" + m_version->getMinecraftVersion() + ".jar";
|
||||||
launchScript += "cp " + versionsPath().absoluteFilePath(relpath) + "\n";
|
launchScript += "cp " + versionsPath().absoluteFilePath(relpath) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_version->mainClass.isEmpty())
|
auto mainClass = m_version->getMainClass();
|
||||||
|
if (!mainClass.isEmpty())
|
||||||
{
|
{
|
||||||
launchScript += "mainClass " + m_version->mainClass + "\n";
|
launchScript += "mainClass " + mainClass + "\n";
|
||||||
}
|
}
|
||||||
if (!m_version->appletClass.isEmpty())
|
auto appletClass = m_version->getAppletClass();
|
||||||
|
if (!appletClass.isEmpty())
|
||||||
{
|
{
|
||||||
launchScript += "appletClass " + m_version->appletClass + "\n";
|
launchScript += "appletClass " + appletClass + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// generic minecraft params
|
// generic minecraft params
|
||||||
@ -251,7 +243,7 @@ QString OneSixInstance::createLaunchScript(AuthSessionPtr session)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// traits. including legacyLaunch and others ;)
|
// traits. including legacyLaunch and others ;)
|
||||||
for (auto trait : m_version->traits)
|
for (auto trait : m_version->getTraits())
|
||||||
{
|
{
|
||||||
launchScript += "traits " + trait + "\n";
|
launchScript += "traits " + trait + "\n";
|
||||||
}
|
}
|
||||||
@ -323,7 +315,7 @@ std::shared_ptr<Task> OneSixInstance::createJarModdingTask()
|
|||||||
{
|
{
|
||||||
std::shared_ptr<MinecraftProfile> version = m_inst->getMinecraftProfile();
|
std::shared_ptr<MinecraftProfile> version = m_inst->getMinecraftProfile();
|
||||||
// nuke obsolete stripped jar(s) if needed
|
// nuke obsolete stripped jar(s) if needed
|
||||||
QString version_id = version->id;
|
QString version_id = version->getMinecraftVersion();
|
||||||
QString strippedPath = version_id + "/" + version_id + "-stripped.jar";
|
QString strippedPath = version_id + "/" + version_id + "-stripped.jar";
|
||||||
QFile strippedJar(strippedPath);
|
QFile strippedJar(strippedPath);
|
||||||
if(strippedJar.exists())
|
if(strippedJar.exists())
|
||||||
@ -351,7 +343,7 @@ std::shared_ptr<Task> OneSixInstance::createJarModdingTask()
|
|||||||
auto jarMods = m_inst->getJarMods();
|
auto jarMods = m_inst->getJarMods();
|
||||||
if(jarMods.size())
|
if(jarMods.size())
|
||||||
{
|
{
|
||||||
auto sourceJarPath = m_inst->versionsPath().absoluteFilePath(version->id + "/" + version->id + ".jar");
|
auto sourceJarPath = m_inst->versionsPath().absoluteFilePath(version_id + "/" + version_id + ".jar");
|
||||||
QString localPath = version_id + "/" + version_id + ".jar";
|
QString localPath = version_id + "/" + version_id + ".jar";
|
||||||
auto metacache = ENV.metacache();
|
auto metacache = ENV.metacache();
|
||||||
auto entry = metacache->resolveEntry("versions", localPath);
|
auto entry = metacache->resolveEntry("versions", localPath);
|
||||||
@ -439,7 +431,7 @@ bool OneSixInstance::setIntendedVersionId(QString version)
|
|||||||
QList< Mod > OneSixInstance::getJarMods() const
|
QList< Mod > OneSixInstance::getJarMods() const
|
||||||
{
|
{
|
||||||
QList<Mod> mods;
|
QList<Mod> mods;
|
||||||
for (auto jarmod : m_version->jarMods)
|
for (auto jarmod : m_version->getJarMods())
|
||||||
{
|
{
|
||||||
QString filePath = jarmodsPath().absoluteFilePath(jarmod->name);
|
QString filePath = jarmodsPath().absoluteFilePath(jarmod->name);
|
||||||
mods.push_back(Mod(QFileInfo(filePath)));
|
mods.push_back(Mod(QFileInfo(filePath)));
|
||||||
|
@ -228,8 +228,6 @@ void OneSixProfileStrategy::load()
|
|||||||
upgradeDeprecatedFiles();
|
upgradeDeprecatedFiles();
|
||||||
loadDefaultBuiltinPatches();
|
loadDefaultBuiltinPatches();
|
||||||
loadUserPatches();
|
loadUserPatches();
|
||||||
|
|
||||||
profile->finalize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OneSixProfileStrategy::saveOrder(ProfileUtils::PatchOrder order)
|
bool OneSixProfileStrategy::saveOrder(ProfileUtils::PatchOrder order)
|
||||||
@ -246,7 +244,7 @@ bool OneSixProfileStrategy::removePatch(ProfilePatchPtr patch)
|
|||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
// first, remove the patch file. this ensures it's not used anymore
|
// first, remove the patch file. this ensures it's not used anymore
|
||||||
auto fileName = patch->getPatchFilename();
|
auto fileName = patch->getFilename();
|
||||||
if(fileName.size())
|
if(fileName.size())
|
||||||
{
|
{
|
||||||
QFile patchFile(fileName);
|
QFile patchFile(fileName);
|
||||||
@ -289,7 +287,7 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto filename = FS::PathCombine(m_instance->instanceRoot(), "patches" , patch->getPatchID() + ".json");
|
auto filename = FS::PathCombine(m_instance->instanceRoot(), "patches" , patch->getID() + ".json");
|
||||||
if(!FS::ensureFilePathExists(filename))
|
if(!FS::ensureFilePathExists(filename))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -327,7 +325,7 @@ bool OneSixProfileStrategy::revertPatch(ProfilePatchPtr patch)
|
|||||||
// already not custom
|
// already not custom
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
auto filename = patch->getPatchFilename();
|
auto filename = patch->getFilename();
|
||||||
if(!QFile::exists(filename))
|
if(!QFile::exists(filename))
|
||||||
{
|
{
|
||||||
// already gone / not custom
|
// already gone / not custom
|
||||||
|
@ -51,8 +51,7 @@ void OneSixUpdate::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get a pointer to the version object that corresponds to the instance's version.
|
// Get a pointer to the version object that corresponds to the instance's version.
|
||||||
targetVersion = std::dynamic_pointer_cast<MinecraftVersion>(
|
targetVersion = std::dynamic_pointer_cast<MinecraftVersion>(ENV.getVersion("net.minecraft", m_inst->intendedVersionId()));
|
||||||
ENV.getVersion("net.minecraft", m_inst->intendedVersionId()));
|
|
||||||
if (targetVersion == nullptr)
|
if (targetVersion == nullptr)
|
||||||
{
|
{
|
||||||
// don't do anything if it was invalid
|
// don't do anything if it was invalid
|
||||||
@ -89,7 +88,7 @@ void OneSixUpdate::assetIndexStart()
|
|||||||
setStatus(tr("Updating assets index..."));
|
setStatus(tr("Updating assets index..."));
|
||||||
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
||||||
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
||||||
QString assetName = version->assets;
|
QString assetName = version->getMinecraftAssets();
|
||||||
QUrl indexUrl = "http://" + URLConstants::AWS_DOWNLOAD_INDEXES + assetName + ".json";
|
QUrl indexUrl = "http://" + URLConstants::AWS_DOWNLOAD_INDEXES + assetName + ".json";
|
||||||
QString localPath = assetName + ".json";
|
QString localPath = assetName + ".json";
|
||||||
auto job = new NetJob(tr("Asset index for %1").arg(inst->name()));
|
auto job = new NetJob(tr("Asset index for %1").arg(inst->name()));
|
||||||
@ -115,7 +114,7 @@ void OneSixUpdate::assetIndexFinished()
|
|||||||
|
|
||||||
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
||||||
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
||||||
QString assetName = version->assets;
|
QString assetName = version->getMinecraftAssets();
|
||||||
|
|
||||||
QString asset_fname = "assets/indexes/" + assetName + ".json";
|
QString asset_fname = "assets/indexes/" + assetName + ".json";
|
||||||
if (!AssetsUtils::loadAssetsIndexJson(asset_fname, &index))
|
if (!AssetsUtils::loadAssetsIndexJson(asset_fname, &index))
|
||||||
@ -194,7 +193,7 @@ void OneSixUpdate::jarlibStart()
|
|||||||
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
||||||
// minecraft.jar for this version
|
// minecraft.jar for this version
|
||||||
{
|
{
|
||||||
QString version_id = version->id;
|
QString version_id = version->getMinecraftVersion();
|
||||||
QString localPath = version_id + "/" + version_id + ".jar";
|
QString localPath = version_id + "/" + version_id + ".jar";
|
||||||
QString urlstr = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + localPath;
|
QString urlstr = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + localPath;
|
||||||
|
|
||||||
@ -292,7 +291,7 @@ void OneSixUpdate::jarlibFinished()
|
|||||||
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
OneSixInstance *inst = (OneSixInstance *)m_inst;
|
||||||
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
std::shared_ptr<MinecraftProfile> version = inst->getMinecraftProfile();
|
||||||
|
|
||||||
if (version->traits.contains("legacyFML"))
|
if (version->hasTrait("legacyFML"))
|
||||||
{
|
{
|
||||||
fmllibsStart();
|
fmllibsStart();
|
||||||
}
|
}
|
||||||
|
@ -81,9 +81,30 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
|
|
||||||
readString(root, "mainClass", out->mainClass);
|
readString(root, "mainClass", out->mainClass);
|
||||||
readString(root, "appletClass", out->appletClass);
|
readString(root, "appletClass", out->appletClass);
|
||||||
readString(root, "processArguments", out->processArguments);
|
readString(root, "minecraftArguments", out->minecraftArguments);
|
||||||
readString(root, "minecraftArguments", out->overwriteMinecraftArguments);
|
if(out->minecraftArguments.isEmpty())
|
||||||
readString(root, "+minecraftArguments", out->addMinecraftArguments);
|
{
|
||||||
|
QString processArguments;
|
||||||
|
readString(root, "processArguments", processArguments);
|
||||||
|
QString toCompare = processArguments.toLower();
|
||||||
|
if (toCompare == "legacy")
|
||||||
|
{
|
||||||
|
out->minecraftArguments = " ${auth_player_name} ${auth_session}";
|
||||||
|
}
|
||||||
|
else if (toCompare == "username_session")
|
||||||
|
{
|
||||||
|
out->minecraftArguments = "--username ${auth_player_name} --session ${auth_session}";
|
||||||
|
}
|
||||||
|
else if (toCompare == "username_session_version")
|
||||||
|
{
|
||||||
|
out->minecraftArguments = "--username ${auth_player_name} --session ${auth_session} --version ${profile_name}";
|
||||||
|
}
|
||||||
|
else if (!toCompare.isEmpty())
|
||||||
|
{
|
||||||
|
out->addProblem(PROBLEM_ERROR, QObject::tr("processArguments is set to unknown value '%1'").arg(processArguments));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readString(root, "type", out->type);
|
readString(root, "type", out->type);
|
||||||
|
|
||||||
out->m_releaseTime = timeFromS3Time(readStringRet(root, "releaseTime"));
|
out->m_releaseTime = timeFromS3Time(readStringRet(root, "releaseTime"));
|
||||||
@ -91,15 +112,6 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
|
|
||||||
readString(root, "assets", out->assets);
|
readString(root, "assets", out->assets);
|
||||||
|
|
||||||
if (root.contains("tweakers"))
|
|
||||||
{
|
|
||||||
out->shouldOverwriteTweakers = true;
|
|
||||||
for (auto tweakerVal : requireArray(root.value("tweakers")))
|
|
||||||
{
|
|
||||||
out->overwriteTweakers.append(requireString(tweakerVal));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (root.contains("+tweakers"))
|
if (root.contains("+tweakers"))
|
||||||
{
|
{
|
||||||
for (auto tweakerVal : requireArray(root.value("+tweakers")))
|
for (auto tweakerVal : requireArray(root.value("+tweakers")))
|
||||||
@ -108,7 +120,6 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (root.contains("+traits"))
|
if (root.contains("+traits"))
|
||||||
{
|
{
|
||||||
for (auto tweakerVal : requireArray(root.value("+traits")))
|
for (auto tweakerVal : requireArray(root.value("+traits")))
|
||||||
@ -117,18 +128,6 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.contains("libraries"))
|
|
||||||
{
|
|
||||||
out->shouldOverwriteLibs = true;
|
|
||||||
for (auto libVal : requireArray(root.value("libraries")))
|
|
||||||
{
|
|
||||||
auto libObj = requireObject(libVal);
|
|
||||||
|
|
||||||
auto lib = libraryFromJson(libObj, filename);
|
|
||||||
out->overwriteLibs.append(lib);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (root.contains("+jarMods"))
|
if (root.contains("+jarMods"))
|
||||||
{
|
{
|
||||||
for (auto libVal : requireArray(root.value("+jarMods")))
|
for (auto libVal : requireArray(root.value("+jarMods")))
|
||||||
@ -147,18 +146,38 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.contains("+libraries"))
|
auto readLibs = [&](const char * which)
|
||||||
{
|
{
|
||||||
for (auto libVal : requireArray(root.value("+libraries")))
|
for (auto libVal : requireArray(root.value(which)))
|
||||||
{
|
{
|
||||||
QJsonObject libObj = requireObject(libVal);
|
QJsonObject libObj = requireObject(libVal);
|
||||||
// parse the library
|
// parse the library
|
||||||
auto lib = libraryFromJson(libObj, filename);
|
auto lib = libraryFromJson(libObj, filename);
|
||||||
out->addLibs.append(lib);
|
out->addLibs.append(lib);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
bool hasPlusLibs = root.contains("+libraries");
|
||||||
|
bool hasLibs = root.contains("libraries");
|
||||||
|
if (hasPlusLibs && hasLibs)
|
||||||
|
{
|
||||||
|
out->addProblem(PROBLEM_WARNING, QObject::tr("Version file has both '+libraries' and 'libraries'. This is no longer supported."));
|
||||||
|
readLibs("libraries");
|
||||||
|
readLibs("+libraries");
|
||||||
|
}
|
||||||
|
else if (hasLibs)
|
||||||
|
{
|
||||||
|
readLibs("libraries");
|
||||||
|
}
|
||||||
|
else if(hasPlusLibs)
|
||||||
|
{
|
||||||
|
readLibs("+libraries");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* removed features that shouldn't be used */
|
/* removed features that shouldn't be used */
|
||||||
|
if (root.contains("tweakers"))
|
||||||
|
{
|
||||||
|
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element 'tweakers'"));
|
||||||
|
}
|
||||||
if (root.contains("-libraries"))
|
if (root.contains("-libraries"))
|
||||||
{
|
{
|
||||||
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element '-libraries'"));
|
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element '-libraries'"));
|
||||||
@ -171,6 +190,10 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
{
|
{
|
||||||
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element '-minecraftArguments'"));
|
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element '-minecraftArguments'"));
|
||||||
}
|
}
|
||||||
|
if (root.contains("+minecraftArguments"))
|
||||||
|
{
|
||||||
|
out->addProblem(PROBLEM_ERROR, QObject::tr("Version file contains unsupported element '+minecraftArguments'"));
|
||||||
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,9 +220,7 @@ static QJsonDocument versionFileToJson(VersionFilePtr patch, bool saveOrder)
|
|||||||
writeString(root, "id", patch->id);
|
writeString(root, "id", patch->id);
|
||||||
writeString(root, "mainClass", patch->mainClass);
|
writeString(root, "mainClass", patch->mainClass);
|
||||||
writeString(root, "appletClass", patch->appletClass);
|
writeString(root, "appletClass", patch->appletClass);
|
||||||
writeString(root, "processArguments", patch->processArguments);
|
writeString(root, "minecraftArguments", patch->minecraftArguments);
|
||||||
writeString(root, "minecraftArguments", patch->overwriteMinecraftArguments);
|
|
||||||
writeString(root, "+minecraftArguments", patch->addMinecraftArguments);
|
|
||||||
writeString(root, "type", patch->type);
|
writeString(root, "type", patch->type);
|
||||||
writeString(root, "assets", patch->assets);
|
writeString(root, "assets", patch->assets);
|
||||||
if (patch->isMinecraftVersion())
|
if (patch->isMinecraftVersion())
|
||||||
@ -207,18 +228,8 @@ static QJsonDocument versionFileToJson(VersionFilePtr patch, bool saveOrder)
|
|||||||
writeString(root, "releaseTime", timeToS3Time(patch->m_releaseTime));
|
writeString(root, "releaseTime", timeToS3Time(patch->m_releaseTime));
|
||||||
writeString(root, "time", timeToS3Time(patch->m_updateTime));
|
writeString(root, "time", timeToS3Time(patch->m_updateTime));
|
||||||
}
|
}
|
||||||
writeStringList(root, "tweakers", patch->overwriteTweakers);
|
|
||||||
writeStringList(root, "+tweakers", patch->addTweakers);
|
writeStringList(root, "+tweakers", patch->addTweakers);
|
||||||
writeStringList(root, "+traits", patch->traits.toList());
|
writeStringList(root, "+traits", patch->traits.toList());
|
||||||
if (!patch->overwriteLibs.isEmpty())
|
|
||||||
{
|
|
||||||
QJsonArray array;
|
|
||||||
for (auto value: patch->overwriteLibs)
|
|
||||||
{
|
|
||||||
array.append(OneSixVersionFormat::libraryToJson(value.get()));
|
|
||||||
}
|
|
||||||
root.insert("libraries", array);
|
|
||||||
}
|
|
||||||
if (!patch->addLibs.isEmpty())
|
if (!patch->addLibs.isEmpty())
|
||||||
{
|
{
|
||||||
QJsonArray array;
|
QJsonArray array;
|
||||||
@ -226,7 +237,7 @@ static QJsonDocument versionFileToJson(VersionFilePtr patch, bool saveOrder)
|
|||||||
{
|
{
|
||||||
array.append(OneSixVersionFormat::libraryToJson(value.get()));
|
array.append(OneSixVersionFormat::libraryToJson(value.get()));
|
||||||
}
|
}
|
||||||
root.insert("+libraries", array);
|
root.insert("libraries", array);
|
||||||
}
|
}
|
||||||
if (!patch->jarMods.isEmpty())
|
if (!patch->jarMods.isEmpty())
|
||||||
{
|
{
|
||||||
@ -247,7 +258,7 @@ static QJsonDocument versionFileToJson(VersionFilePtr patch, bool saveOrder)
|
|||||||
|
|
||||||
static QJsonDocument minecraftVersionToJson(MinecraftVersionPtr patch, bool saveOrder)
|
static QJsonDocument minecraftVersionToJson(MinecraftVersionPtr patch, bool saveOrder)
|
||||||
{
|
{
|
||||||
if(patch->m_versionSource == Local && patch->getVersionFile())
|
if(patch->getVersionSource() == Local && patch->getVersionFile())
|
||||||
{
|
{
|
||||||
return OneSixVersionFormat::profilePatchToJson(patch->getVersionFile(), saveOrder);
|
return OneSixVersionFormat::profilePatchToJson(patch->getVersionFile(), saveOrder);
|
||||||
}
|
}
|
||||||
@ -269,7 +280,7 @@ QJsonDocument OneSixVersionFormat::profilePatchToJson(const ProfilePatchPtr &pat
|
|||||||
{
|
{
|
||||||
return minecraftVersionToJson(mversion, saveOrder);
|
return minecraftVersionToJson(mversion, saveOrder);
|
||||||
}
|
}
|
||||||
throw VersionIncomplete(QObject::tr("Unhandled object type while processing %1").arg(patch->getPatchName()));
|
throw VersionIncomplete(QObject::tr("Unhandled object type while processing %1").arg(patch->getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<MinecraftProfile> OneSixVersionFormat::profileFromSingleJson(const QJsonObject &obj)
|
std::shared_ptr<MinecraftProfile> OneSixVersionFormat::profileFromSingleJson(const QJsonObject &obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user