2021-12-18 00:07:57 +00:00
|
|
|
/*
|
2022-05-02 13:58:20 +00:00
|
|
|
* Copyright 2020-2022 Jamie Mansfield <jmansfield@cadixdev.org>
|
2021-12-18 00:07:57 +00:00
|
|
|
* Copyright 2020-2021 Petr Mrazek <peterix@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2020-08-21 00:40:19 +00:00
|
|
|
#include "FTBPackManifest.h"
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
|
|
|
|
#include "Json.h"
|
|
|
|
|
|
|
|
static void loadSpecs(ModpacksCH::Specs & s, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
s.id = Json::requireInteger(obj, "id");
|
|
|
|
s.minimum = Json::requireInteger(obj, "minimum");
|
|
|
|
s.recommended = Json::requireInteger(obj, "recommended");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadTag(ModpacksCH::Tag & t, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
t.id = Json::requireInteger(obj, "id");
|
|
|
|
t.name = Json::requireString(obj, "name");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadArt(ModpacksCH::Art & a, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
a.id = Json::requireInteger(obj, "id");
|
|
|
|
a.url = Json::requireString(obj, "url");
|
|
|
|
a.type = Json::requireString(obj, "type");
|
|
|
|
a.width = Json::requireInteger(obj, "width");
|
|
|
|
a.height = Json::requireInteger(obj, "height");
|
|
|
|
a.compressed = Json::requireBoolean(obj, "compressed");
|
|
|
|
a.sha1 = Json::requireString(obj, "sha1");
|
|
|
|
a.size = Json::requireInteger(obj, "size");
|
|
|
|
a.updated = Json::requireInteger(obj, "updated");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadAuthor(ModpacksCH::Author & a, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
a.id = Json::requireInteger(obj, "id");
|
|
|
|
a.name = Json::requireString(obj, "name");
|
|
|
|
a.type = Json::requireString(obj, "type");
|
|
|
|
a.website = Json::requireString(obj, "website");
|
|
|
|
a.updated = Json::requireInteger(obj, "updated");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadVersionInfo(ModpacksCH::VersionInfo & v, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
v.id = Json::requireInteger(obj, "id");
|
|
|
|
v.name = Json::requireString(obj, "name");
|
|
|
|
v.type = Json::requireString(obj, "type");
|
|
|
|
v.updated = Json::requireInteger(obj, "updated");
|
2022-05-02 13:58:20 +00:00
|
|
|
|
|
|
|
// CurseForge packs don't have specs.
|
|
|
|
if (obj.contains("specs")) {
|
|
|
|
auto specs = Json::requireObject(obj, "specs");
|
|
|
|
loadSpecs(v.specs, specs);
|
|
|
|
}
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModpacksCH::loadModpack(ModpacksCH::Modpack & m, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
m.id = Json::requireInteger(obj, "id");
|
|
|
|
m.name = Json::requireString(obj, "name");
|
|
|
|
m.synopsis = Json::requireString(obj, "synopsis");
|
|
|
|
m.description = Json::requireString(obj, "description");
|
|
|
|
m.type = Json::requireString(obj, "type");
|
|
|
|
m.featured = Json::requireBoolean(obj, "featured");
|
|
|
|
m.installs = Json::requireInteger(obj, "installs");
|
|
|
|
m.plays = Json::requireInteger(obj, "plays");
|
|
|
|
m.updated = Json::requireInteger(obj, "updated");
|
|
|
|
m.refreshed = Json::requireInteger(obj, "refreshed");
|
|
|
|
auto artArr = Json::requireArray(obj, "art");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef artRaw : artArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto artObj = Json::requireObject(artRaw);
|
|
|
|
ModpacksCH::Art art;
|
|
|
|
loadArt(art, artObj);
|
|
|
|
m.art.append(art);
|
|
|
|
}
|
|
|
|
auto authorArr = Json::requireArray(obj, "authors");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef authorRaw : authorArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto authorObj = Json::requireObject(authorRaw);
|
|
|
|
ModpacksCH::Author author;
|
|
|
|
loadAuthor(author, authorObj);
|
|
|
|
m.authors.append(author);
|
|
|
|
}
|
|
|
|
auto versionArr = Json::requireArray(obj, "versions");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef versionRaw : versionArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto versionObj = Json::requireObject(versionRaw);
|
|
|
|
ModpacksCH::VersionInfo version;
|
|
|
|
loadVersionInfo(version, versionObj);
|
|
|
|
m.versions.append(version);
|
|
|
|
}
|
|
|
|
auto tagArr = Json::requireArray(obj, "tags");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef tagRaw : tagArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto tagObj = Json::requireObject(tagRaw);
|
|
|
|
ModpacksCH::Tag tag;
|
|
|
|
loadTag(tag, tagObj);
|
|
|
|
m.tags.append(tag);
|
|
|
|
}
|
|
|
|
m.updated = Json::requireInteger(obj, "updated");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadVersionTarget(ModpacksCH::VersionTarget & a, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
a.id = Json::requireInteger(obj, "id");
|
|
|
|
a.name = Json::requireString(obj, "name");
|
|
|
|
a.type = Json::requireString(obj, "type");
|
|
|
|
a.version = Json::requireString(obj, "version");
|
|
|
|
a.updated = Json::requireInteger(obj, "updated");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void loadVersionFile(ModpacksCH::VersionFile & a, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
a.id = Json::requireInteger(obj, "id");
|
|
|
|
a.type = Json::requireString(obj, "type");
|
|
|
|
a.path = Json::requireString(obj, "path");
|
|
|
|
a.name = Json::requireString(obj, "name");
|
2022-05-02 13:58:20 +00:00
|
|
|
|
|
|
|
// This will be an integer with CurseForge packs.
|
|
|
|
auto versionVal = obj.value("version");
|
|
|
|
if (versionVal.isString()) {
|
|
|
|
a.version = versionVal.toString();
|
|
|
|
}
|
|
|
|
else if (versionVal.isDouble()) {
|
|
|
|
a.version = QString(versionVal.toInt());
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
throw Json::JsonException("'version' is not a string or integer");
|
|
|
|
}
|
|
|
|
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
a.url = Json::requireString(obj, "url");
|
|
|
|
a.sha1 = Json::requireString(obj, "sha1");
|
|
|
|
a.size = Json::requireInteger(obj, "size");
|
|
|
|
a.clientOnly = Json::requireBoolean(obj, "clientonly");
|
|
|
|
a.serverOnly = Json::requireBoolean(obj, "serveronly");
|
|
|
|
a.optional = Json::requireBoolean(obj, "optional");
|
|
|
|
a.updated = Json::requireInteger(obj, "updated");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ModpacksCH::loadVersion(ModpacksCH::Version & m, QJsonObject & obj)
|
|
|
|
{
|
|
|
|
m.id = Json::requireInteger(obj, "id");
|
|
|
|
m.parent = Json::requireInteger(obj, "parent");
|
|
|
|
m.name = Json::requireString(obj, "name");
|
|
|
|
m.type = Json::requireString(obj, "type");
|
|
|
|
m.installs = Json::requireInteger(obj, "installs");
|
|
|
|
m.plays = Json::requireInteger(obj, "plays");
|
|
|
|
m.updated = Json::requireInteger(obj, "updated");
|
|
|
|
m.refreshed = Json::requireInteger(obj, "refreshed");
|
2022-05-02 13:58:20 +00:00
|
|
|
|
|
|
|
// CurseForge packs don't have specs.
|
|
|
|
if (obj.contains("specs")) {
|
|
|
|
auto specs = Json::requireObject(obj, "specs");
|
|
|
|
loadSpecs(m.specs, specs);
|
|
|
|
}
|
|
|
|
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
auto targetArr = Json::requireArray(obj, "targets");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef targetRaw : targetArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto versionObj = Json::requireObject(targetRaw);
|
|
|
|
ModpacksCH::VersionTarget target;
|
|
|
|
loadVersionTarget(target, versionObj);
|
|
|
|
m.targets.append(target);
|
|
|
|
}
|
|
|
|
auto fileArr = Json::requireArray(obj, "files");
|
2021-03-29 20:03:52 +00:00
|
|
|
for (QJsonValueRef fileRaw : fileArr)
|
GH-3095 New FTB platform support
Models are based on the models from my go-modpacksch library.
License:
========
The MIT License (MIT)
Copyright (c) Jamie Mansfield <https://www.jamiemansfield.me/>
Copyright (c) contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2020-06-07 15:14:47 +00:00
|
|
|
{
|
|
|
|
auto fileObj = Json::requireObject(fileRaw);
|
|
|
|
ModpacksCH::VersionFile file;
|
|
|
|
loadVersionFile(file, fileObj);
|
|
|
|
m.files.append(file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//static void loadVersionChangelog(ModpacksCH::VersionChangelog & m, QJsonObject & obj)
|
|
|
|
//{
|
|
|
|
// m.content = Json::requireString(obj, "content");
|
|
|
|
// m.updated = Json::requireInteger(obj, "updated");
|
|
|
|
//}
|