fix FOMOD root level detection

This commit is contained in:
Limo
2025-05-03 11:00:07 +02:00
parent 9b805ab924
commit ffdb4f9b9e
5 changed files with 33 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.25)
project(Limo VERSION 1.2.1 LANGUAGES CXX)
project(Limo VERSION 1.2.2 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@@ -41,6 +41,14 @@
<releases>
<release version="1.2.2" date="2025-05-03">
<description>
<p>Minor FOMOD fix</p>
<ul>
<li>Fixed root level detection for FOMOD</li>
</ul>
</description>
</release>
<release version="1.2.1" date="2025-05-02">
<description>
<p>Root level detection improvements</p>

View File

@@ -1,6 +1,18 @@
{
"versions":
[
{
"version" : "1.2.2",
"date" : 1746262543,
"title" : "Minor FOMOD fix",
"changes" :
[
{
"type" : 2,
"short_description" : "Fixed root level detection for FOMOD"
}
]
},
{
"version" : "1.2.1",
"date" : 1746216782,

View File

@@ -1,4 +1,4 @@
#pragma once
constexpr char APP_VERSION[] = "1.2.1";
constexpr char APP_VERSION[] = "1.2.2";
constexpr char APP_INSTALL_PREFIX[] = "/usr/local";

View File

@@ -253,6 +253,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
if(!info.version_overwrite.empty())
ui->version_text->setText(info.version_overwrite.c_str());
bool root_level_checked = false;
ui->installer_box->clear();
int root_level = 0;
std::string prefix;
@@ -270,6 +271,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
}
if(detected_type == Installer::FOMODINSTALLER)
{
root_level_checked = true;
auto [name, version] = fomod::FomodInstaller::getMetaData(info.current_path / prefix);
if(!name.empty() && info.name_overwrite.empty())
ui->name_text->setText(name.c_str());
@@ -361,7 +363,8 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
return false;
}
bool root_level_checked = false;
if(!root_level_checked)
{
for(const auto& condition : root_level_conditions)
{
if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem());
@@ -372,6 +375,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
break;
}
}
}
ui->fomod_deployer_box->clear();
for(int i = 0; i < deployers.size(); i++)