improve CPU string + GitLab CI
This commit is contained in:
parent
f932a8d5ee
commit
541a7d18bd
2 changed files with 9 additions and 4 deletions
|
@ -1,4 +1,8 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
Windows Portable:
|
Windows Portable:
|
||||||
|
stage: build
|
||||||
image: syping/qt5-static-mingw:5.9.6
|
image: syping/qt5-static-mingw:5.9.6
|
||||||
variables:
|
variables:
|
||||||
BUILD_SCRIPT: "windows_build.sh"
|
BUILD_SCRIPT: "windows_build.sh"
|
||||||
|
@ -6,11 +10,12 @@ Windows Portable:
|
||||||
script:
|
script:
|
||||||
- .gitlab/gitlab.sh
|
- .gitlab/gitlab.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "gta5view-${CI_COMMIT_SHA:0:8}_portable"
|
name: "gta5view-{$CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:8}_portable"
|
||||||
paths:
|
paths:
|
||||||
- "gta5view-*.exe"
|
- "gta5view-*.exe"
|
||||||
|
|
||||||
Windows Installer:
|
Windows Installer:
|
||||||
|
stage: build
|
||||||
image: syping/qt5-shared-mingw:5.9.6
|
image: syping/qt5-shared-mingw:5.9.6
|
||||||
variables:
|
variables:
|
||||||
BUILD_SCRIPT: "wininstall_build.sh"
|
BUILD_SCRIPT: "wininstall_build.sh"
|
||||||
|
@ -18,6 +23,6 @@ Windows Installer:
|
||||||
script:
|
script:
|
||||||
- .gitlab/gitlab.sh
|
- .gitlab/gitlab.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "gta5view-${CI_COMMIT_SHA:0:8}_setup"
|
name: "gta5view-{$CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:8}_setup"
|
||||||
paths:
|
paths:
|
||||||
- "gta5view-*.exe"
|
- "gta5view-*.exe"
|
||||||
|
|
|
@ -239,7 +239,7 @@ QJsonDocument TelemetryClass::getSystemHardware()
|
||||||
else if (i == 0x80000003) { memcpy(CPUBrandString + 16, CPUInfo, sizeof(CPUInfo)); }
|
else if (i == 0x80000003) { memcpy(CPUBrandString + 16, CPUInfo, sizeof(CPUInfo)); }
|
||||||
else if (i == 0x80000004) { memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo)); }
|
else if (i == 0x80000004) { memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo)); }
|
||||||
}
|
}
|
||||||
jsonObject["CPUName"] = QString(CPUBrandString).trimmed();
|
jsonObject["CPUName"] = QString::fromLatin1(CPUBrandString).simplified();
|
||||||
SYSTEM_INFO sysInfo;
|
SYSTEM_INFO sysInfo;
|
||||||
GetSystemInfo(&sysInfo);
|
GetSystemInfo(&sysInfo);
|
||||||
jsonObject["CPUThreads"] = QString::number(sysInfo.dwNumberOfProcessors);
|
jsonObject["CPUThreads"] = QString::number(sysInfo.dwNumberOfProcessors);
|
||||||
|
@ -265,7 +265,7 @@ QJsonDocument TelemetryClass::getSystemHardware()
|
||||||
QByteArray cpuData = cpuInfoBuffer.readLine();
|
QByteArray cpuData = cpuInfoBuffer.readLine();
|
||||||
if (cpuData.left(toFind.length()) == toFind)
|
if (cpuData.left(toFind.length()) == toFind)
|
||||||
{
|
{
|
||||||
jsonObject["CPUName"] = QString::fromUtf8(cpuData).split(':').at(1).trimmed();
|
jsonObject["CPUName"] = QString::fromUtf8(cpuData).split(':').at(1).simplified();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue