mirror of
https://github.com/limo-app/limo.git
synced 2025-12-23 23:07:52 -05:00
fix FOMOD root level detection
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.25)
|
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)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,14 @@
|
|||||||
|
|
||||||
|
|
||||||
<releases>
|
<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">
|
<release version="1.2.1" date="2025-05-02">
|
||||||
<description>
|
<description>
|
||||||
<p>Root level detection improvements</p>
|
<p>Root level detection improvements</p>
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
{
|
{
|
||||||
"versions":
|
"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",
|
"version" : "1.2.1",
|
||||||
"date" : 1746216782,
|
"date" : 1746216782,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
constexpr char APP_VERSION[] = "1.2.1";
|
constexpr char APP_VERSION[] = "1.2.2";
|
||||||
constexpr char APP_INSTALL_PREFIX[] = "/usr/local";
|
constexpr char APP_INSTALL_PREFIX[] = "/usr/local";
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
|
|||||||
if(!info.version_overwrite.empty())
|
if(!info.version_overwrite.empty())
|
||||||
ui->version_text->setText(info.version_overwrite.c_str());
|
ui->version_text->setText(info.version_overwrite.c_str());
|
||||||
|
|
||||||
|
bool root_level_checked = false;
|
||||||
ui->installer_box->clear();
|
ui->installer_box->clear();
|
||||||
int root_level = 0;
|
int root_level = 0;
|
||||||
std::string prefix;
|
std::string prefix;
|
||||||
@@ -270,6 +271,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
|
|||||||
}
|
}
|
||||||
if(detected_type == Installer::FOMODINSTALLER)
|
if(detected_type == Installer::FOMODINSTALLER)
|
||||||
{
|
{
|
||||||
|
root_level_checked = true;
|
||||||
auto [name, version] = fomod::FomodInstaller::getMetaData(info.current_path / prefix);
|
auto [name, version] = fomod::FomodInstaller::getMetaData(info.current_path / prefix);
|
||||||
if(!name.empty() && info.name_overwrite.empty())
|
if(!name.empty() && info.name_overwrite.empty())
|
||||||
ui->name_text->setText(name.c_str());
|
ui->name_text->setText(name.c_str());
|
||||||
@@ -361,15 +363,17 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
|
|||||||
return false;
|
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());
|
for(const auto& condition : root_level_conditions)
|
||||||
level && *level >= 0)
|
|
||||||
{
|
{
|
||||||
root_level_checked = true;
|
if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem());
|
||||||
ui->root_level_box->setValue(std::min(std::max(0, *level), directory_tree_depth_ - 1));
|
level && *level >= 0)
|
||||||
break;
|
{
|
||||||
|
root_level_checked = true;
|
||||||
|
ui->root_level_box->setValue(std::min(std::max(0, *level), directory_tree_depth_ - 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user