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)
|
||||
|
||||
project(Limo VERSION 1.2.1 LANGUAGES CXX)
|
||||
project(Limo VERSION 1.2.2 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,15 +363,17 @@ bool AddModDialog::setupDialog(const QStringList& deployers,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool root_level_checked = false;
|
||||
for(const auto& condition : root_level_conditions)
|
||||
if(!root_level_checked)
|
||||
{
|
||||
if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem());
|
||||
level && *level >= 0)
|
||||
for(const auto& condition : root_level_conditions)
|
||||
{
|
||||
root_level_checked = true;
|
||||
ui->root_level_box->setValue(std::min(std::max(0, *level), directory_tree_depth_ - 1));
|
||||
break;
|
||||
if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem());
|
||||
level && *level >= 0)
|
||||
{
|
||||
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