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

View file

@ -28,9 +28,17 @@
#define GTA5SYNC_APPVENDORLINK "https://github.com/Syping/" #define GTA5SYNC_APPVENDORLINK "https://github.com/Syping/"
#endif #endif
#ifndef GTA5SYNC_DISABLED
#define GTA5SYNC_ENABLED
#endif
#ifndef GTA5SYNC_APPSTR #ifndef GTA5SYNC_APPSTR
#ifdef GTA5SYNC_ENABLED
#define GTA5SYNC_APPSTR "gta5sync"
#else
#define GTA5SYNC_APPSTR "gta5view" #define GTA5SYNC_APPSTR "gta5view"
#endif #endif
#endif
#ifndef GTA5SYNC_APPDES #ifndef GTA5SYNC_APPDES
#define GTA5SYNC_APPDES "INSERT YOUR APPLICATION DESCRIPTION HERE" #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): QT += widgets
greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras 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 DEPLOYMENT.display_name = gta5view
TARGET = gta5view TARGET = gta5view
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp \ SOURCES += main.cpp \