add hybrid code of gta5sync/gta5view

This commit is contained in:
Rafael 2017-01-27 01:53:14 +01:00
parent 78df09d1dd
commit 6b1d5b6d1d
3 changed files with 16 additions and 9 deletions

View file

@ -33,15 +33,11 @@ AboutDialog::AboutDialog(QWidget *parent) :
buildType.replace("_", " ");
QString projectBuild = QString("%1, %2").arg(__DATE__, __TIME__);
QString buildStr = QString("%1, %2").arg(QT_VERSION_STR, GTA5SYNC_COMPILER);
QString projectDes = tr(GTA5SYNC_APPDES);
if (QString(GTA5SYNC_APPSTR) == "gta5view")
{
projectDes = tr("A project for viewing Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
}
else if (QString(GTA5SYNC_APPSTR) == "gta5sync")
{
projectDes = tr("A project for viewing and sync Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
}
#ifdef GTA5SYNC_ENABLED
QString projectDes = tr("A project for viewing and sync Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
#else
QString projectDes = tr("A project for viewing Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
#endif
ui->labAbout->setText(aboutStr.arg(appVersion % " (" % buildType % ")", buildStr, qVersion(), projectBuild, GTA5SYNC_APPVENDORLINK, GTA5SYNC_APPVENDOR, GTA5SYNC_COPYRIGHT, GTA5SYNC_APPSTR, projectDes));
this->setWindowTitle(titleStr.arg(GTA5SYNC_APPSTR));
}

View file

@ -28,9 +28,17 @@
#define GTA5SYNC_APPVENDORLINK "https://github.com/Syping/"
#endif
#ifndef GTA5SYNC_DISABLED
#define GTA5SYNC_ENABLED
#endif
#ifndef GTA5SYNC_APPSTR
#ifdef GTA5SYNC_ENABLED
#define GTA5SYNC_APPSTR "gta5sync"
#else
#define GTA5SYNC_APPSTR "gta5view"
#endif
#endif
#ifndef GTA5SYNC_APPDES
#define GTA5SYNC_APPDES "INSERT YOUR APPLICATION DESCRIPTION HERE"

View file

@ -21,8 +21,11 @@ QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras
DEFINES += GTA5SYNC_DISABLED # disabling sync (remove it for building gta5sync)
DEPLOYMENT.display_name = gta5view
TARGET = gta5view
TEMPLATE = app
SOURCES += main.cpp \