minor changes
This commit is contained in:
parent
7c08e1486e
commit
4135b1f588
4 changed files with 50 additions and 33 deletions
|
@ -89,7 +89,7 @@ InstallDir "$PROGRAMFILES64\Syping\gta5view"
|
||||||
Function .onInit
|
Function .onInit
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
!ifdef WIN32
|
!ifdef WIN32
|
||||||
MessageBox MB_OK|MB_ICONSTOP "Can't install the 64bit version on a 32bit system, please download the 32bit version!"
|
MessageBox MB_OK|MB_ICONSTOP "Windows 32-Bit is not supported anymore!"
|
||||||
Quit
|
Quit
|
||||||
!endif
|
!endif
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
|
@ -140,6 +140,9 @@ File "/opt/windev/qt64d-latest/plugins/imageformats/qwbmp.dll"
|
||||||
File "/opt/windev/qt64d-latest/plugins/imageformats/qwebp.dll"
|
File "/opt/windev/qt64d-latest/plugins/imageformats/qwebp.dll"
|
||||||
SetOutPath "$INSTDIR\platforms"
|
SetOutPath "$INSTDIR\platforms"
|
||||||
File "/opt/windev/qt64d-latest/plugins/platforms/qwindows.dll"
|
File "/opt/windev/qt64d-latest/plugins/platforms/qwindows.dll"
|
||||||
|
SetOutPath "$INSTDIR\styles"
|
||||||
|
File "/opt/windev/qt64d-latest/plugins/styles/qcleanlooksstyle.dll"
|
||||||
|
File "/opt/windev/qt64d-latest/plugins/styles/qplastiquestyle.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -223,11 +226,13 @@ Delete "$INSTDIR\imageformats\qtiff.dll"
|
||||||
Delete "$INSTDIR\imageformats\qwbmp.dll"
|
Delete "$INSTDIR\imageformats\qwbmp.dll"
|
||||||
Delete "$INSTDIR\imageformats\qwebp.dll"
|
Delete "$INSTDIR\imageformats\qwebp.dll"
|
||||||
Delete "$INSTDIR\platforms\qwindows.dll"
|
Delete "$INSTDIR\platforms\qwindows.dll"
|
||||||
|
Delete "$INSTDIR\styles\qcleanlooksstyle.dll"
|
||||||
|
Delete "$INSTDIR\styles\qplastiquestyle.dll"
|
||||||
RmDir "$INSTDIR\lang"
|
RmDir "$INSTDIR\lang"
|
||||||
RmDir "$INSTDIR\audio"
|
RmDir "$INSTDIR\audio"
|
||||||
RmDir "$INSTDIR\imageformats"
|
RmDir "$INSTDIR\imageformats"
|
||||||
RmDir "$INSTDIR\platforms"
|
RmDir "$INSTDIR\platforms"
|
||||||
|
RmDir "$INSTDIR\styles"
|
||||||
|
|
||||||
Delete "$INSTDIR\uninstall.exe"
|
Delete "$INSTDIR\uninstall.exe"
|
||||||
!ifdef WEB_SITE
|
!ifdef WEB_SITE
|
||||||
|
|
|
@ -1,48 +1,23 @@
|
||||||
debian32:
|
debian:
|
||||||
image: i386/debian:stretch
|
image: debian:stretch
|
||||||
variables:
|
variables:
|
||||||
BUILD_SCRIPT: "debian_ci.sh"
|
BUILD_SCRIPT: "debian_ci.sh"
|
||||||
APT_INSTALL: "clang"
|
APT_INSTALL: "clang"
|
||||||
script:
|
script:
|
||||||
- .gitlab/gitlab.sh
|
- .gitlab/gitlab.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "gta5view-$CI_COMMIT_REF_NAME-debian32"
|
name: "gta5view-$CI_COMMIT_REF_NAME-debian"
|
||||||
paths:
|
paths:
|
||||||
- assets/*.deb
|
- assets/*.deb
|
||||||
|
|
||||||
debian64:
|
windows:
|
||||||
image: amd64/debian:stretch
|
|
||||||
variables:
|
|
||||||
BUILD_SCRIPT: "debian_ci.sh"
|
|
||||||
APT_INSTALL: "clang"
|
|
||||||
script:
|
|
||||||
- .gitlab/gitlab.sh
|
|
||||||
artifacts:
|
|
||||||
name: "gta5view-$CI_COMMIT_REF_NAME-debian64"
|
|
||||||
paths:
|
|
||||||
- assets/*.deb
|
|
||||||
|
|
||||||
win32:
|
|
||||||
image: syping/qt5-static-mingw:5.9.6
|
|
||||||
variables:
|
|
||||||
BUILD_SCRIPT: "windows_build.sh"
|
|
||||||
QT_SELECT: "qt5-i686-w64-mingw32"
|
|
||||||
script:
|
|
||||||
- .gitlab/gitlab.sh
|
|
||||||
artifacts:
|
|
||||||
name: "gta5view-$CI_COMMIT_REF_NAME-win32"
|
|
||||||
paths:
|
|
||||||
- assets/*.exe
|
|
||||||
|
|
||||||
win64:
|
|
||||||
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"
|
||||||
QT_SELECT: "qt5-x86_64-w64-mingw32"
|
QT_SELECT: "qt5-x86_64-w64-mingw32"
|
||||||
EXECUTABLE_ARCH: "_x64"
|
|
||||||
script:
|
script:
|
||||||
- .gitlab/gitlab.sh
|
- .gitlab/gitlab.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "gta5view-$CI_COMMIT_REF_NAME-win64"
|
name: "gta5view-$CI_COMMIT_REF_NAME-windows"
|
||||||
paths:
|
paths:
|
||||||
- assets/*.exe
|
- assets/*.exe
|
||||||
|
|
33
AppEnv.cpp
33
AppEnv.cpp
|
@ -152,7 +152,38 @@ QString AppEnv::getPluginsFolder()
|
||||||
|
|
||||||
QByteArray AppEnv::getUserAgent()
|
QByteArray AppEnv::getUserAgent()
|
||||||
{
|
{
|
||||||
return QString("Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 %1/%2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER).toUtf8();
|
#if QT_VERSION >= 0x050400
|
||||||
|
#ifdef GTA5SYNC_WIN
|
||||||
|
QString kernelVersion = QSysInfo::kernelVersion();
|
||||||
|
const QStringList &kernelVersionList = kernelVersion.split(".");
|
||||||
|
if (kernelVersionList.length() > 2)
|
||||||
|
{
|
||||||
|
kernelVersion = kernelVersionList.at(0) % "." % kernelVersionList.at(1);
|
||||||
|
}
|
||||||
|
QString runArch = QSysInfo::buildCpuArchitecture();
|
||||||
|
if (runArch == "x86_64")
|
||||||
|
{
|
||||||
|
runArch = "Win64; x64";
|
||||||
|
}
|
||||||
|
else if (runArch == "i686")
|
||||||
|
{
|
||||||
|
const QString &curArch = QSysInfo::currentCpuArchitecture();
|
||||||
|
if (curArch == "x86_64")
|
||||||
|
{
|
||||||
|
runArch = "WOW64";
|
||||||
|
}
|
||||||
|
else if (curArch == "i686")
|
||||||
|
{
|
||||||
|
runArch = "Win32; x86";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QString("Mozilla/5.0 (Windows NT %1; %2) %3/%4").arg(kernelVersion, runArch, GTA5SYNC_APPSTR, GTA5SYNC_APPVER).toUtf8();
|
||||||
|
#else
|
||||||
|
return QString("Mozilla/5.0 (%1; %2) %3/%4").arg(QSysInfo::kernelType(), QSysInfo::kernelVersion(), GTA5SYNC_APPSTR, GTA5SYNC_APPVER).toUtf8();
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
return QString("Mozilla/5.0 %1/%2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER).toUtf8();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// QUrl AppEnv::getCrewFetchingUrl(QString crewID)
|
// QUrl AppEnv::getCrewFetchingUrl(QString crewID)
|
||||||
|
|
|
@ -198,6 +198,7 @@ void TelemetryClass::push(TelemetryCategory category, QJsonDocument json)
|
||||||
|
|
||||||
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
||||||
QNetworkRequest netRequest(TelemetryClassAuthenticator::getTrackingPushURL());
|
QNetworkRequest netRequest(TelemetryClassAuthenticator::getTrackingPushURL());
|
||||||
|
netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent());
|
||||||
QNetworkReply *netReply = netManager->post(netRequest, httpMultiPart);
|
QNetworkReply *netReply = netManager->post(netRequest, httpMultiPart);
|
||||||
httpMultiPart->setParent(netReply);
|
httpMultiPart->setParent(netReply);
|
||||||
|
|
||||||
|
@ -209,6 +210,10 @@ QJsonDocument TelemetryClass::getOperatingSystem()
|
||||||
QJsonDocument jsonDocument;
|
QJsonDocument jsonDocument;
|
||||||
QJsonObject jsonObject;
|
QJsonObject jsonObject;
|
||||||
#if QT_VERSION >= 0x050400
|
#if QT_VERSION >= 0x050400
|
||||||
|
jsonObject["KernelType"] = QSysInfo::kernelType();
|
||||||
|
jsonObject["KernelVersion"] = QSysInfo::kernelVersion();
|
||||||
|
jsonObject["ProductType"] = QSysInfo::productType();
|
||||||
|
jsonObject["ProductVersion"] = QSysInfo::productVersion();
|
||||||
jsonObject["OSName"] = QSysInfo::prettyProductName();
|
jsonObject["OSName"] = QSysInfo::prettyProductName();
|
||||||
jsonObject["OSArch"] = QSysInfo::currentCpuArchitecture();
|
jsonObject["OSArch"] = QSysInfo::currentCpuArchitecture();
|
||||||
#endif
|
#endif
|
||||||
|
@ -434,6 +439,7 @@ void TelemetryClass::registerClient()
|
||||||
{
|
{
|
||||||
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
QNetworkAccessManager *netManager = new QNetworkAccessManager();
|
||||||
QNetworkRequest netRequest(TelemetryClassAuthenticator::getTrackingRegURL());
|
QNetworkRequest netRequest(TelemetryClassAuthenticator::getTrackingRegURL());
|
||||||
|
netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent());
|
||||||
netManager->get(netRequest);
|
netManager->get(netRequest);
|
||||||
|
|
||||||
connect(netManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(registerFinished(QNetworkReply*)));
|
connect(netManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(registerFinished(QNetworkReply*)));
|
||||||
|
|
Loading…
Reference in a new issue