mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-21 00:37:15 +02:00
Store current version in packwiz metadata (temporarily using x-prismlauncher-version-number
)
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
35b5c8097c
commit
2c18d0f1a5
@ -91,8 +91,9 @@ auto intEntry(toml::table table, QString entry_name) -> int
|
|||||||
return node.value_or(0);
|
return node.value_or(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto V1::createModFormat([[maybe_unused]] const QDir& index_dir, ModPlatform::IndexedPack& mod_pack, ModPlatform::IndexedVersion& mod_version)
|
auto V1::createModFormat([[maybe_unused]] const QDir& index_dir,
|
||||||
-> Mod
|
ModPlatform::IndexedPack& mod_pack,
|
||||||
|
ModPlatform::IndexedVersion& mod_version) -> Mod
|
||||||
{
|
{
|
||||||
Mod mod;
|
Mod mod;
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ auto V1::createModFormat([[maybe_unused]] const QDir& index_dir, ModPlatform::In
|
|||||||
mod.hash = mod_version.hash;
|
mod.hash = mod_version.hash;
|
||||||
|
|
||||||
mod.provider = mod_pack.provider;
|
mod.provider = mod_pack.provider;
|
||||||
|
mod.version_number = mod_version.version_number;
|
||||||
mod.file_id = mod_version.fileId;
|
mod.file_id = mod_version.fileId;
|
||||||
mod.project_id = mod_pack.addonId;
|
mod.project_id = mod_pack.addonId;
|
||||||
mod.side = stringToSide(mod_pack.side);
|
mod.side = stringToSide(mod_pack.side);
|
||||||
@ -199,7 +201,8 @@ void V1::updateModIndex(const QDir& index_dir, Mod& mod)
|
|||||||
{ "hash-format", mod.hash_format.toStdString() },
|
{ "hash-format", mod.hash_format.toStdString() },
|
||||||
{ "hash", mod.hash.toStdString() },
|
{ "hash", mod.hash.toStdString() },
|
||||||
} },
|
} },
|
||||||
{ "update", toml::table{ { ProviderCaps.name(mod.provider), update } } } };
|
{ "update", toml::table{ { ProviderCaps.name(mod.provider), update },
|
||||||
|
{ "x-prismlauncher-version-number", mod.version_number.toStdString() } } } };
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << tbl;
|
ss << tbl;
|
||||||
in_stream << QString::fromStdString(ss.str());
|
in_stream << QString::fromStdString(ss.str());
|
||||||
|
@ -52,6 +52,7 @@ class V1 {
|
|||||||
|
|
||||||
// [update]
|
// [update]
|
||||||
ModPlatform::ResourceProvider provider{};
|
ModPlatform::ResourceProvider provider{};
|
||||||
|
QString version_number{};
|
||||||
QVariant file_id{};
|
QVariant file_id{};
|
||||||
QVariant project_id{};
|
QVariant project_id{};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user