#include "dialog.h" #include "Log/Log.h" #include #include #include #include #include #include #include #include #define VER_FILE "1.0.0.0" #define GIT_HASH "" QString getSystemInfo() { QString s = "\n"; s.append(QString("Build:%1 Version:%2\n").arg(GIT_HASH).arg(VER_FILE)); s.append("System Info: \n"); QTextStream out(&s); QSysInfo systemInfo; #ifdef Q_OS_WIN out << " Windows Version: " << systemInfo.windowsVersion() << endl; #endif out << " Build Cpu Architecture: " << systemInfo.buildCpuArchitecture() << endl; out << " Current Cpu Architecture: " << systemInfo.currentCpuArchitecture() << endl; out << " Kernel Type: " << systemInfo.kernelType() << endl; out << " Kernel Version: " << systemInfo.kernelVersion() << endl; out << " Machine Host Name: " << systemInfo.machineHostName() << endl; out << " Product Type: " << systemInfo.productType() << endl; out << " Product Version: " << systemInfo.productVersion() << endl; out << " Byte Order: " << systemInfo.buildAbi() << endl; out << " Pretty ProductName: " << systemInfo.prettyProductName() << endl; // root QStorageInfo storage = QStorageInfo::root(); out << storage.rootPath() << endl; out << "isReadOnly:" << storage.isReadOnly() << endl; out << "name:" << storage.name() << endl; out << "fileSystemType:" << storage.fileSystemType() << endl; out << "size:" << storage.bytesTotal()/1000/1000 << "MB" << endl; out << "availableSize:" << storage.bytesAvailable()/1000/1000 << "MB" << endl; // current volumn QStorageInfo storageCurrent(qApp->applicationDirPath()); out << qApp->applicationDirPath() << endl; out << storageCurrent.rootPath() << endl; out << "isReadOnly:" << storageCurrent.isReadOnly() << endl; out << "name:" << storageCurrent.name() << endl; out << "fileSystemType:" << storageCurrent.fileSystemType() << endl; out << "size:" << storageCurrent.bytesTotal()/1000/1000 << "MB" << endl; out << "availableSize:" << storageCurrent.bytesAvailable()/1000/1000 << "MB" << endl; return s; } int main(int argc, char *argv[]) { QApplication a(argc, argv); LogError(getSystemInfo()); LogError("start HmiRunTimeData!"); Dialog w; w.show(); return a.exec(); }