-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallinfo.cpp
More file actions
30 lines (24 loc) · 838 Bytes
/
installinfo.cpp
File metadata and controls
30 lines (24 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "installinfo.h"
QString InstallInfo::InstallPath = QString();
QString InstallInfo::DesktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
QString InstallInfo::StartMenuPath = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
QString InstallInfo::version = "4.0.1.0";
InstallInfo::InstallInfo() {
}
bool InstallInfo::appIs64Bit() {
void* p = nullptr;
if (sizeof(p) == 4)
return false;
else
return true;
}
bool InstallInfo::sysIs64Bit() {
SYSTEM_INFO si;
// Copy the hardware information to the SYSTEM_INFO structure.
GetNativeSystemInfo(&si);
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 || si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {
return true;
} else {
return false;
}
}