You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#include <QtWidgets/QApplication>
|
|
|
|
|
|
#include <QtWidgets/QMessageBox>
|
|
|
|
|
|
#include "IMainWidget.h"
|
|
|
|
|
|
#include "log.h"
|
|
|
|
|
|
#include <QtCore\QLibrary>
|
|
|
|
|
|
|
|
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
|
{
|
|
|
|
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
|
|
QString folderPath = ".\\log\\";
|
|
|
|
|
|
if (!QDir(folderPath).exists())
|
|
|
|
|
|
{
|
|
|
|
|
|
QDir().mkpath(folderPath);
|
|
|
|
|
|
}
|
|
|
|
|
|
LogInfo::recordLog(folderPath);
|
|
|
|
|
|
IMainWidget* pMain = nullptr;
|
|
|
|
|
|
QWidget* pMainWid = nullptr;
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
|
QLibrary lib("lpMaind");
|
|
|
|
|
|
#else
|
|
|
|
|
|
QLibrary lib("lpMain");
|
|
|
|
|
|
#endif
|
|
|
|
|
|
_MainWidget_Create func = (_MainWidget_Create)lib.resolve("MainWidget_Create");
|
|
|
|
|
|
if (func)
|
|
|
|
|
|
{
|
|
|
|
|
|
pMain = func();
|
|
|
|
|
|
if (pMain) {
|
|
|
|
|
|
pMainWid = pMain->getMainWidget();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (pMainWid)
|
|
|
|
|
|
{
|
|
|
|
|
|
pMainWid->show();
|
|
|
|
|
|
a.exec();
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
QMessageBox::information(0, "", QObject::tr("lpMain<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>"));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (pMain) {
|
|
|
|
|
|
delete pMain;
|
|
|
|
|
|
pMain = nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (lib.isLoaded())
|
|
|
|
|
|
lib.unload();
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|