mirror of
https://github.com/QuasarApp/Patronum.git
synced 2025-04-29 09:04:31 +00:00
try fix internal install error
This commit is contained in:
parent
ebd73e802b
commit
a8678a578e
Patronum/src
@ -99,6 +99,7 @@ public:
|
|||||||
|
|
||||||
_argc = argc;
|
_argc = argc;
|
||||||
_argv = argv;
|
_argv = argv;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~Service() override {
|
~Service() override {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "serviceprivate.h"
|
#include "serviceprivate.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include "patronum.h"
|
||||||
|
|
||||||
namespace Patronum {
|
namespace Patronum {
|
||||||
|
|
||||||
@ -24,6 +25,8 @@ ServiceBase::ServiceBase(int argc, char *argv[]) {
|
|||||||
QuasarAppUtils::Params::parseParams(argc, argv);
|
QuasarAppUtils::Params::parseParams(argc, argv);
|
||||||
d_ptr = new ServicePrivate(this);
|
d_ptr = new ServicePrivate(this);
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceBase::~ServiceBase() {
|
ServiceBase::~ServiceBase() {
|
||||||
|
@ -36,7 +36,7 @@ bool InstallerSystemD::install(const QString &executable, const QString& user) {
|
|||||||
QFile templ(":/systemd/SystemD/service.service");
|
QFile templ(":/systemd/SystemD/service.service");
|
||||||
QString name = PCommon::instance()->getServiceName();
|
QString name = PCommon::instance()->getServiceName();
|
||||||
if (!templ.open(QIODevice::ReadOnly)) {
|
if (!templ.open(QIODevice::ReadOnly)) {
|
||||||
QuasarAppUtils::Params::log(QString{"Cannot install %0. System error.\n"}.
|
QuasarAppUtils::Params::log(QString{"Cannot install %0. The service template not available.\n"}.
|
||||||
arg(name),
|
arg(name),
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
|
|
||||||
|
@ -13,5 +13,10 @@ namespace Patronum {
|
|||||||
QString patronumLibVersion() {
|
QString patronumLibVersion() {
|
||||||
return PATRONUM_VERSION;
|
return PATRONUM_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init() {
|
||||||
|
initPatronumResources();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "PFeature.h"
|
#include "PFeature.h"
|
||||||
#include "PService.h"
|
#include "PService.h"
|
||||||
|
|
||||||
|
inline void initPatronumResources() { Q_INIT_RESOURCE(templates); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The Patronum namespace - It is main name space of Patronum Library.
|
* @brief The Patronum namespace - It is main name space of Patronum Library.
|
||||||
* The Patronum library support the two work mode
|
* The Patronum library support the two work mode
|
||||||
@ -54,5 +56,7 @@ namespace Patronum {
|
|||||||
* @return current version of library
|
* @return current version of library
|
||||||
*/
|
*/
|
||||||
QString patronumLibVersion();
|
QString patronumLibVersion();
|
||||||
|
|
||||||
|
void init() ;
|
||||||
}
|
}
|
||||||
#endif // PATRONUM_H
|
#endif // PATRONUM_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user