Commit 9cd3f530 by Carwyn

1. 运行目录改名为 bins ,解决无法下发bin目录问题; 2. Windows 2008 Server 上无法退出问题; 3. 日志打开方式使用 Text 模式

parent 3f08dc2e
......@@ -12,10 +12,10 @@ SOURCES += \
fm_pos_app.cpp
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../debug/bin
DESTDIR = $$PWD/../debug/bins
}
else {
DESTDIR = $$PWD/../release/bin
DESTDIR = $$PWD/../release/bins
}
win32 {
......
......@@ -7,9 +7,9 @@ TARGET = FreemudSyncer
CONFIG += app
CONFIG(debug, debug|release) {
DESTDIR = $$PWD/../debug/bin
DESTDIR = $$PWD/../debug/bins
} else {
DESTDIR = $$PWD/../release/bin
DESTDIR = $$PWD/../release/bins
}
win32 {
......
......@@ -14,7 +14,7 @@ Animation=1
Path=log
Size=1
;0:关闭 1:错误 2:警告 3:信息 4:调试
Level=0
Level=4
[Home]
Server=http://115.159.226.87:20001/api/user/login
......@@ -29,11 +29,11 @@ Server=https://115.159.18.100/api
Timeout=60
[Vip]
Server=http://member.freemudorder.com/member_today/service/restful/pos
Server=http://jtest.sandload.cn/member_tianfu/service/restful/pos
[Syncer]
Interval=3
TaskUrl=http://192.168.110.150:8080/api/fork/checkupdate
TaskUrl=http://115.159.33.143/api/fork/checkupdate
DeployPath=..
DownloadPath=download
......
......@@ -30,7 +30,7 @@ int FMPLoggerPrivate::Init()
if (q->_level > 0) {
QString filename = _NewFileName();
q->_file = new QFile(filename);
q->_file->open(QFile::Append);
q->_file->open(QFile::Text | QFile::Append);
}
_inited = true;
return FMP_SUCCESS;
......@@ -173,7 +173,7 @@ void FMPLoggerPrivate::_KeepFileSize()
FMP_INFO() << "New log file:" << new_file_name;
q->_file->close();
q->_file->setFileName(new_file_name);
q->_file->open(QFile::Append);
q->_file->open(QFile::Text | QFile::Append);
}
}
}
......
......@@ -102,29 +102,30 @@ void FMPluginManager::UninitService()
FMP_INFO() << "======================== Quit ========================";
_watcher.removePath(_fw_props[FMP_PROPKEY_PLUGINPATH].toString());
FMPLoggerInterface::InitContext(_ctx, false);
//! 优雅关闭
while(!_plugins.isEmpty()) {
_plugins.pop()->stop();
}
try {
_fw->stop();
int cnt = 0;
while(cnt++ < 10 &&
_fw->waitForStop(50).getType() == ctkPluginFrameworkEvent::FRAMEWORK_WAIT_TIMEDOUT) {
QCoreApplication::processEvents();
}
}
catch (const ctkPluginException &e) {
FMP_DEBUG() << e.cause()->what();
}
// try {
// _fw->stop();
// int cnt = 0;
// while(cnt++ < 100 &&
// _fw->waitForStop(50).getType() == ctkPluginFrameworkEvent::FRAMEWORK_WAIT_TIMEDOUT) {
// QCoreApplication::processEvents();
// }
// }
// catch (const ctkPluginException &e) {
// FMP_DEBUG() << e.cause()->what();
// }
delete _fw_factory;
_fw_factory = nullptr;
_ctx = nullptr;
_fw.clear();
_event_handlers.clear();
// delete _fw_factory;
_fw_factory = nullptr;
_ctx = nullptr;
qApp->quit();
}
else {
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 56
#define VER_BUILD 58
//! Convert version numbers to string
#define _STR(S) #S
......
......@@ -14,20 +14,26 @@ Animation=1
Path=log
Size=1
;0:关闭 1:错误 2:警告 3:信息 4:调试
Level=0
Level=1
[Home]
Server=http://115.159.226.87:20001/api/user/login
StoreId=fm99999
PartnerId=1371
Position=293, 170
StoreId=pos_coco_CN9999
PosId=fm1802
Position=339, 251
CashierId=001
[Pay]
Server=https://115.159.18.100/api
Timeout=60
[Vip]
Server=http://member.freemudorder.com/member_today/service/restful/pos
Server=http://jtest.sandload.cn/member_tianfu/service/restful/pos
[Syncer]
Interval=3
TaskUrl=http://192.168.110.150:8080/api/fork/checkupdate
TaskUrl=http://115.159.33.143/api/fork/checkupdate
DeployPath=..
DownloadPath=download
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment