2023-02-06 22:27:19 -08:00
|
|
|
#define UTIL_CPP
|
|
|
|
#include <app.h>
|
2023-02-05 10:49:07 -08:00
|
|
|
|
2023-02-06 22:27:19 -08:00
|
|
|
#undef CLASS
|
|
|
|
#define CLASS QUtils
|
|
|
|
|
|
|
|
CLASS::CLASS() : appInstance(Poco::Util::Application::instance())
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CLASS::isMerlin32(void)
|
2023-02-05 10:49:07 -08:00
|
|
|
{
|
|
|
|
return(false);
|
|
|
|
}
|
|
|
|
|
2023-02-06 22:27:19 -08:00
|
|
|
bool CLASS::isMerlin816(void)
|
2023-02-05 10:49:07 -08:00
|
|
|
{
|
|
|
|
return(true);
|
|
|
|
}
|
2023-02-05 21:38:02 -08:00
|
|
|
|
2023-02-06 22:27:19 -08:00
|
|
|
string CLASS::getAppPath()
|
|
|
|
{
|
|
|
|
char buff[PATH_MAX+1];
|
|
|
|
char *x;
|
|
|
|
|
|
|
|
string res="";
|
|
|
|
res=appInstance.commandPath();
|
|
|
|
x=realpath(res.c_str(),buff);
|
|
|
|
if (x!=NULL)
|
|
|
|
{
|
|
|
|
res=buff;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
res="";
|
|
|
|
return(res);
|
|
|
|
}
|
|
|
|
|
|
|
|
|