mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-04-18 10:38:16 +00:00
update configuration example (#10)
This commit is contained in:
@@ -414,6 +414,10 @@ void CSdvPackagerEnvironment::ReportInfo() const
|
||||
if (!m_pathPackage.empty())
|
||||
rstreamVerbose << "Package: " << m_pathPackage.generic_u8string() << std::endl;
|
||||
break;
|
||||
case EOperatingMode::configure:
|
||||
rstreamNormal << "Configure system..." << std::endl;
|
||||
break;
|
||||
|
||||
default:
|
||||
rstreamNormal << "Nothing to do..." << std::endl;
|
||||
break;
|
||||
@@ -969,6 +973,7 @@ bool CSdvPackagerEnvironment::ProcessCommandLine(const std::vector<std::string>&
|
||||
fnGetProduct();
|
||||
break;
|
||||
case EOperatingMode::configure:
|
||||
if (!fnCheckSourceLocation()) return false;
|
||||
if (!fnGetConfigFiles()) return false;
|
||||
if (!fnConfigTargets()) return false;
|
||||
break;
|
||||
|
||||
@@ -364,6 +364,9 @@ bool CPackager::Configure()
|
||||
}
|
||||
}
|
||||
|
||||
// CHANGE EVE 13.04.2026: Disabled this check. Unclear if necessary.
|
||||
std::filesystem::path pathBaseSearch;
|
||||
|
||||
// If the pattern is defined using an absolute path, this path needs to correspond with the base path.
|
||||
std::filesystem::path pathConfigFile(ssSearchString);
|
||||
if (pathConfigFile.is_absolute())
|
||||
@@ -374,19 +377,23 @@ bool CPackager::Configure()
|
||||
{
|
||||
if (itConfigPart == pathConfigFile.end() || *itBasePart != *itConfigPart)
|
||||
{
|
||||
m_nError = CMDLN_SOURCE_LOCATION_ERROR;
|
||||
m_ssArgError = CMDLN_SOURCE_LOCATION_ERROR_MSG;
|
||||
return false;
|
||||
//m_nError = CMDLN_SOURCE_LOCATION_ERROR;
|
||||
//m_ssArgError = CMDLN_SOURCE_LOCATION_ERROR_MSG;
|
||||
//return false;
|
||||
break;
|
||||
}
|
||||
pathBaseSearch /= *itBasePart;
|
||||
|
||||
// Next part
|
||||
itBasePart++;
|
||||
itConfigPart++;
|
||||
}
|
||||
}
|
||||
else
|
||||
pathBaseSearch = pathBasePath;
|
||||
|
||||
// Get the list of files
|
||||
auto vecFiles = CollectWildcardPath(pathBasePath, ssSearchString, eAlgorithm);
|
||||
auto vecFiles = CollectWildcardPath(pathBaseSearch, ssSearchString, eAlgorithm);
|
||||
|
||||
// For each file, check whether the file is somewhere within the base path (if provided) and add the file to the file list.
|
||||
for (const std::filesystem::path& rpathFile : vecFiles)
|
||||
@@ -397,7 +404,7 @@ bool CPackager::Configure()
|
||||
continue;
|
||||
|
||||
// Add the file
|
||||
vecConfigFiles.push_back(rpathFile);
|
||||
vecConfigFiles.push_back(pathBaseSearch / rpathFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user