Skip to content
Snippets Groups Projects
Commit e45512cd authored by Christoph Pohl's avatar Christoph Pohl Committed by ARMAR-DE
Browse files

Fix `armarx gui` trying to start the old memory if `MemoryX` is not in the workspace

Signed-off-by: ARMAR-DE <>
parent ecf23230
No related branches found
No related tags found
No related merge requests found
......@@ -174,12 +174,13 @@ namespace armarx
int ArmarXGuiApp::startArmarX()
{
CMakePackageFinder finder("ArmarXCore");
CMakePackageFinder armarx_core("ArmarXCore");
CMakePackageFinder armarx_memoryx("MemoryX");
int res;
if (finder.packageFound())
if (armarx_core.packageFound())
{
res = system(std::string(finder.getBinaryDir() + std::string("/armarx start")).c_str());
res = system(std::string(armarx_core.getBinaryDir() + std::string("/armarx start")).c_str());
}
else
{
......@@ -189,19 +190,18 @@ namespace armarx
if (res == EXIT_SUCCESS)
{
ARMARX_INFO_S << "Started ArmarX successfully!";
if (finder.packageFound())
{
res = system(std::string(finder.getBinaryDir() + std::string("/armarx memory start")).c_str());
}
else
{
res = system("armarx memory assureRunning");
}
res = WEXITSTATUS(res);
if (res == EXIT_FAILURE)
{
QMessageBox::warning(nullptr, "ArmarX Error", "Could not start MongoDB! See terminal output for more information. The GUI will now started anyway.");
return 0;
if (armarx_memoryx.packageFound()) {
if (armarx_core.packageFound()) {
res = system(std::string(armarx_core.getBinaryDir() + std::string("/armarx memory start")).c_str());
} else {
res = system("armarx memory assureRunning");
}
res = WEXITSTATUS(res);
if (res == EXIT_FAILURE) {
QMessageBox::warning(nullptr, "ArmarX Error",
"Could not start MongoDB! See terminal output for more information. The GUI will now started anyway.");
return 0;
}
}
}
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment