mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-08-30 04:15:10 +00:00
connection between 2 systems and bug fixes (#14)
This commit is contained in:
@@ -24,4 +24,5 @@
|
||||
#include "../../sdv_services/core/toml_parser/character_reader_utf_8.cpp"
|
||||
#include "../../sdv_services/core/toml_parser/miscellaneous.cpp"
|
||||
#include "../../sdv_services/core/toml_parser/code_snippet.cpp"
|
||||
#include "../../sdv_services/core/toml_parser/parser_node_indexer.cpp"
|
||||
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "../../global/exec_dir_helper.h"
|
||||
#include "../../global/cmdlnparser/cmdlnparser.cpp"
|
||||
|
||||
CSdvPackagerEnvironment::CSdvPackagerEnvironment() :
|
||||
@@ -862,13 +861,16 @@ bool CSdvPackagerEnvironment::ProcessCommandLine(const std::vector<std::string>&
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const wchar_t* szInstallDir = _wgetenv(L"SDV_COMPONENT_INSTALL");
|
||||
if (!szInstallDir) szInstallDir = _wgetenv(L"SDV_FRAMEWORK_RUNTIME");
|
||||
if (szInstallDir) m_pathTargetLocation = szInstallDir;
|
||||
#elif defined __unix__
|
||||
const char* szInstallDir = getenv("SDV_COMPONENT_INSTALL");
|
||||
if (!szInstallDir) szInstallDir = getenv("SDV_FRAMEWORK_RUNTIME");
|
||||
if (szInstallDir) m_pathTargetLocation = std::filesystem::u8path(szInstallDir);
|
||||
#else
|
||||
#error OS not supported!
|
||||
#endif
|
||||
if (m_pathTargetLocation.empty()) m_pathTargetLocation = GetExecDirectory();
|
||||
}
|
||||
|
||||
// Is the directory existing? If not, create the directory
|
||||
|
||||
@@ -41,12 +41,6 @@ extern "C" int main(int iArgc, const char* rgszArgv[])
|
||||
// NOTE EVE 27.05.2025: This task has been taken over by the process watchdog.
|
||||
CProcessWatchdog watchdog;
|
||||
|
||||
// If not set, set the runtime location to the EXE directory.
|
||||
if (sdv::app::CAppControl::GetFrameworkRuntimeDirectory().empty())
|
||||
sdv::app::CAppControl::SetFrameworkRuntimeDirectory(GetExecDirectory());
|
||||
if (sdv::app::CAppControl::GetComponentInstallDirectory().empty())
|
||||
sdv::app::CAppControl::SetComponentInstallDirectory(GetExecDirectory());
|
||||
|
||||
// Process the command line.
|
||||
CSdvPackagerEnvironment environment(iArgc, rgszArgv);
|
||||
|
||||
@@ -54,7 +48,7 @@ extern "C" int main(int iArgc, const char* rgszArgv[])
|
||||
if (!environment.Silent())
|
||||
{
|
||||
std::cout << "SDV Component Installation Package Utility" << std::endl;
|
||||
std::cout << "Copyright (C): 2022-2025 ZF Friedrichshafen AG" << std::endl;
|
||||
std::cout << "Copyright (C): 2022-2026 ZF Friedrichshafen AG" << std::endl;
|
||||
std::cout << "Author: Erik Verhoeven" << std::endl << std::endl;
|
||||
}
|
||||
|
||||
@@ -114,7 +108,7 @@ extern "C" int main(int iArgc, const char* rgszArgv[])
|
||||
}
|
||||
|
||||
// If running as server, load the settings file
|
||||
if (!environment.Local() && !GetAppSettings().LoadSettingsFile())
|
||||
if (!environment.Local() && !GetAppSettings().LoadSettings())
|
||||
{
|
||||
std::cerr << "ERROR: Failed to load the application settings file; cannot continue!" << std::endl;
|
||||
return -1;
|
||||
|
||||
@@ -450,7 +450,7 @@ bool CPackager::Configure()
|
||||
m_ssArgError = CMDLN_MISSING_TARGET_MSG;
|
||||
return false;
|
||||
}
|
||||
if (!GetAppSettings().SaveSettingsFile())
|
||||
if (!GetAppSettings().SaveSettings())
|
||||
{
|
||||
SDV_LOG_ERROR("Failed to save application settings. Cannot configure components!");
|
||||
return false;
|
||||
@@ -743,7 +743,7 @@ bool CPackager::ConfigureFromManifest(const CInstallManifest& rmanifest)
|
||||
auto pathConfig = GetAppSettings().GetConfigPath(CAppSettings::EConfigType::user_config);
|
||||
WriteConfig(vecClasses, pathConfig, vecComponentsToAdd, true, vecAddedToConfig);
|
||||
}
|
||||
if (!GetAppSettings().SaveSettingsFile())
|
||||
if (!GetAppSettings().SaveSettings())
|
||||
{
|
||||
SDV_LOG_ERROR("Failed to save application settings. Cannot configure components!");
|
||||
return false;
|
||||
@@ -806,11 +806,11 @@ void CPackager::WriteConfig(const std::vector<sdv::SClassInfo>& rvecAllClasses,
|
||||
break;
|
||||
case sdv::EObjectType::complex_service:
|
||||
case sdv::EObjectType::vehicle_function:
|
||||
case sdv::EObjectType::utility:
|
||||
eIncompatible = bUserConfig ? ECompatibility::compatible : ECompatibility::incompatible;
|
||||
break;
|
||||
case sdv::EObjectType::proxy:
|
||||
case sdv::EObjectType::stub:
|
||||
case sdv::EObjectType::utility:
|
||||
eIncompatible = ECompatibility::silent_incompatible;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user