2017-10-09 08:35:48 +02:00
|
|
|
#/*****************************************************************************
|
|
|
|
#* gta5view Grand Theft Auto V Profile Viewer
|
2020-04-24 05:36:11 +02:00
|
|
|
#* Copyright (C) 2015-2020 Syping
|
2017-10-09 08:35:48 +02:00
|
|
|
#*
|
|
|
|
#* This program is free software: you can redistribute it and/or modify
|
|
|
|
#* it under the terms of the GNU General Public License as published by
|
|
|
|
#* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
#* (at your option) any later version.
|
|
|
|
#*
|
|
|
|
#* This program is distributed in the hope that it will be useful,
|
|
|
|
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
#* GNU General Public License for more details.
|
|
|
|
#*
|
|
|
|
#* You should have received a copy of the GNU General Public License
|
|
|
|
#* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#*****************************************************************************/
|
|
|
|
|
2020-09-03 00:03:04 +02:00
|
|
|
QT += core gui network svg
|
2017-10-09 08:35:48 +02:00
|
|
|
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras
|
|
|
|
|
|
|
|
DEPLOYMENT.display_name = gta5view
|
|
|
|
TARGET = gta5view
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
HEADERS += config.h
|
2018-06-15 05:04:20 +02:00
|
|
|
PRECOMPILED_HEADER += config.h
|
2017-10-09 08:35:48 +02:00
|
|
|
|
|
|
|
SOURCES += main.cpp \
|
|
|
|
AboutDialog.cpp \
|
|
|
|
AppEnv.cpp \
|
|
|
|
CrewDatabase.cpp \
|
|
|
|
DatabaseThread.cpp \
|
|
|
|
ExportDialog.cpp \
|
|
|
|
ExportThread.cpp \
|
|
|
|
GlobalString.cpp \
|
|
|
|
IconLoader.cpp \
|
|
|
|
ImportDialog.cpp \
|
2017-11-22 14:59:40 +01:00
|
|
|
JsonEditorDialog.cpp \
|
2017-11-12 15:58:59 +01:00
|
|
|
MapLocationDialog.cpp \
|
2020-09-13 02:10:15 +02:00
|
|
|
MessageThread.cpp \
|
2017-10-09 08:35:48 +02:00
|
|
|
OptionsDialog.cpp \
|
|
|
|
PictureDialog.cpp \
|
|
|
|
PictureExport.cpp \
|
|
|
|
PictureWidget.cpp \
|
2017-12-12 04:45:46 +01:00
|
|
|
PlayerListDialog.cpp \
|
2017-10-09 08:35:48 +02:00
|
|
|
ProfileDatabase.cpp \
|
|
|
|
ProfileInterface.cpp \
|
|
|
|
ProfileLoader.cpp \
|
|
|
|
ProfileWidget.cpp \
|
|
|
|
SavegameCopy.cpp \
|
|
|
|
SavegameData.cpp \
|
|
|
|
SavegameDialog.cpp \
|
|
|
|
SavegameWidget.cpp \
|
|
|
|
SidebarGenerator.cpp \
|
|
|
|
SnapmaticEditor.cpp \
|
|
|
|
SnapmaticPicture.cpp \
|
|
|
|
SnapmaticWidget.cpp \
|
|
|
|
StandardPaths.cpp \
|
|
|
|
StringParser.cpp \
|
2018-01-11 08:41:00 +01:00
|
|
|
TelemetryClass.cpp \
|
2017-10-09 08:35:48 +02:00
|
|
|
TranslationClass.cpp \
|
|
|
|
UserInterface.cpp \
|
2018-07-20 15:58:51 +02:00
|
|
|
anpro/imagecropper.cpp \
|
2018-06-15 04:43:13 +02:00
|
|
|
pcg/pcg_basic.c \
|
2018-01-11 08:41:00 +01:00
|
|
|
tmext/TelemetryClassAuthenticator.cpp \
|
2018-07-20 15:58:51 +02:00
|
|
|
uimod/JSHighlighter.cpp \
|
2017-10-09 08:35:48 +02:00
|
|
|
uimod/UiModLabel.cpp \
|
|
|
|
uimod/UiModWidget.cpp
|
|
|
|
|
2020-09-03 00:03:04 +02:00
|
|
|
HEADERS += \
|
2017-10-09 08:35:48 +02:00
|
|
|
AboutDialog.h \
|
|
|
|
AppEnv.h \
|
|
|
|
CrewDatabase.h \
|
|
|
|
DatabaseThread.h \
|
|
|
|
ExportDialog.h \
|
|
|
|
ExportThread.h \
|
|
|
|
GlobalString.h \
|
|
|
|
IconLoader.h \
|
|
|
|
ImportDialog.h \
|
2017-11-22 14:59:40 +01:00
|
|
|
JsonEditorDialog.h \
|
2017-11-12 15:58:59 +01:00
|
|
|
MapLocationDialog.h \
|
2020-09-13 02:10:15 +02:00
|
|
|
MessageThread.h \
|
2017-10-09 08:35:48 +02:00
|
|
|
OptionsDialog.h \
|
|
|
|
PictureDialog.h \
|
|
|
|
PictureExport.h \
|
|
|
|
PictureWidget.h \
|
2017-12-12 04:45:46 +01:00
|
|
|
PlayerListDialog.h \
|
2017-10-09 08:35:48 +02:00
|
|
|
ProfileDatabase.h \
|
|
|
|
ProfileInterface.h \
|
|
|
|
ProfileLoader.h \
|
|
|
|
ProfileWidget.h \
|
|
|
|
SavegameCopy.h \
|
|
|
|
SavegameData.h \
|
|
|
|
SavegameDialog.h \
|
|
|
|
SavegameWidget.h \
|
|
|
|
SidebarGenerator.h \
|
|
|
|
SnapmaticEditor.h \
|
|
|
|
SnapmaticPicture.h \
|
|
|
|
SnapmaticWidget.h \
|
|
|
|
StandardPaths.h \
|
|
|
|
StringParser.h \
|
2018-01-11 08:41:00 +01:00
|
|
|
TelemetryClass.h \
|
2017-10-09 08:35:48 +02:00
|
|
|
TranslationClass.h \
|
|
|
|
UserInterface.h \
|
2018-07-20 15:58:51 +02:00
|
|
|
anpro/imagecropper.h \
|
|
|
|
anpro/imagecropper_e.h \
|
|
|
|
anpro/imagecropper_p.h \
|
2018-06-15 04:43:13 +02:00
|
|
|
pcg/pcg_basic.h \
|
2018-01-11 08:41:00 +01:00
|
|
|
tmext/TelemetryClassAuthenticator.h \
|
2018-07-20 15:58:51 +02:00
|
|
|
uimod/JSHighlighter.h \
|
2017-10-09 08:35:48 +02:00
|
|
|
uimod/UiModLabel.h \
|
|
|
|
uimod/UiModWidget.h
|
|
|
|
|
2020-09-03 00:03:04 +02:00
|
|
|
FORMS += \
|
2017-10-09 08:35:48 +02:00
|
|
|
AboutDialog.ui \
|
|
|
|
ExportDialog.ui \
|
|
|
|
ImportDialog.ui \
|
2017-11-22 14:59:40 +01:00
|
|
|
JsonEditorDialog.ui \
|
2017-11-12 15:58:59 +01:00
|
|
|
MapLocationDialog.ui \
|
2017-10-09 08:35:48 +02:00
|
|
|
OptionsDialog.ui \
|
|
|
|
PictureDialog.ui \
|
2017-12-12 04:45:46 +01:00
|
|
|
PlayerListDialog.ui \
|
2017-10-09 08:35:48 +02:00
|
|
|
ProfileInterface.ui \
|
|
|
|
SavegameDialog.ui \
|
|
|
|
SavegameWidget.ui \
|
|
|
|
SnapmaticEditor.ui \
|
|
|
|
SnapmaticWidget.ui \
|
|
|
|
UserInterface.ui
|
|
|
|
|
|
|
|
TRANSLATIONS += \
|
2018-07-06 02:59:11 +02:00
|
|
|
res/gta5sync.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_de.ts \
|
2018-07-30 02:17:47 +02:00
|
|
|
res/gta5sync_en_US.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_fr.ts \
|
2019-08-04 15:49:32 +02:00
|
|
|
res/gta5sync_ko.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_ru.ts \
|
2018-05-12 20:34:52 +02:00
|
|
|
res/gta5sync_uk.ts \
|
2018-05-31 04:49:17 +02:00
|
|
|
res/gta5sync_zh_TW.ts
|
2017-10-09 08:35:48 +02:00
|
|
|
|
|
|
|
RESOURCES += \
|
2020-09-03 00:03:04 +02:00
|
|
|
res/app.qrc \
|
|
|
|
res/tr_g5p.qrc
|
2017-10-09 08:35:48 +02:00
|
|
|
|
2020-08-28 13:33:35 +02:00
|
|
|
DISTFILES += \
|
|
|
|
res/gta5view-16.png \
|
|
|
|
res/gta5view-24.png \
|
|
|
|
res/gta5view-32.png \
|
|
|
|
res/gta5view-40.png \
|
|
|
|
res/gta5view-48.png \
|
|
|
|
res/gta5view-64.png \
|
|
|
|
res/gta5view-96.png \
|
|
|
|
res/gta5view-128.png \
|
|
|
|
res/gta5view-256.png \
|
|
|
|
res/gta5view-512.png \
|
|
|
|
res/app.rc \
|
2020-08-28 13:06:27 +02:00
|
|
|
res/de.syping.gta5view.desktop \
|
2020-08-28 22:11:52 +02:00
|
|
|
res/de.syping.gta5view.png \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_de.ts \
|
2018-07-30 02:17:47 +02:00
|
|
|
res/gta5sync_en_US.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_fr.ts \
|
2019-08-04 15:49:32 +02:00
|
|
|
res/gta5sync_ko.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5sync_ru.ts \
|
2018-05-12 20:34:52 +02:00
|
|
|
res/gta5sync_uk.ts \
|
2018-01-25 12:46:43 +01:00
|
|
|
res/gta5sync_zh_TW.ts \
|
2017-10-09 08:35:48 +02:00
|
|
|
res/gta5view.exe.manifest \
|
|
|
|
res/gta5view.png \
|
|
|
|
lang/README.txt
|
|
|
|
|
2018-06-15 04:43:13 +02:00
|
|
|
INCLUDEPATH += ./anpro ./pcg ./tmext ./uimod
|
2017-10-09 08:35:48 +02:00
|
|
|
|
2017-10-12 22:21:45 +02:00
|
|
|
# GTA5SYNC/GTA5VIEW ONLY
|
|
|
|
|
2020-08-27 18:14:30 +02:00
|
|
|
DEFINES += GTA5SYNC_QMAKE # We using qmake do we?
|
2017-10-12 22:21:45 +02:00
|
|
|
DEFINES += GTA5SYNC_PROJECT # Enable exclusive gta5sync/gta5view functions
|
2020-09-26 16:12:55 +02:00
|
|
|
DEFINES += SNAPMATIC_NODEFAULT # Not assisting at proper usage of SnapmaticPicture class
|
2017-10-12 22:21:45 +02:00
|
|
|
|
2017-10-09 08:35:48 +02:00
|
|
|
# WINDOWS ONLY
|
|
|
|
|
|
|
|
win32: RC_FILE += res/app.rc
|
|
|
|
win32: CONFIG -= embed_manifest_exe
|
2018-07-27 04:26:10 +02:00
|
|
|
contains(DEFINES, GTA5SYNC_TELEMETRY): win32: LIBS += -ld3d9 # Required for getting information about GPU
|
2017-10-09 08:35:48 +02:00
|
|
|
|
|
|
|
# MAC OS X ONLY
|
|
|
|
macx: ICON = res/5sync.icns
|
|
|
|
|
|
|
|
# QT4 ONLY STUFF
|
|
|
|
|
|
|
|
isEqual(QT_MAJOR_VERSION, 4): INCLUDEPATH += ./qjson4
|
|
|
|
isEqual(QT_MAJOR_VERSION, 4): HEADERS += qjson4/QJsonArray.h \
|
|
|
|
qjson4/QJsonDocument.h \
|
|
|
|
qjson4/QJsonObject.h \
|
|
|
|
qjson4/QJsonParseError.h \
|
|
|
|
qjson4/QJsonValue.h \
|
|
|
|
qjson4/QJsonValueRef.h \
|
|
|
|
qjson4/QJsonParser.h \
|
|
|
|
qjson4/QJsonRoot.h
|
|
|
|
|
|
|
|
isEqual(QT_MAJOR_VERSION, 4): SOURCES += qjson4/QJsonArray.cpp \
|
|
|
|
qjson4/QJsonDocument.cpp \
|
|
|
|
qjson4/QJsonObject.cpp \
|
|
|
|
qjson4/QJsonParseError.cpp \
|
|
|
|
qjson4/QJsonValue.cpp \
|
|
|
|
qjson4/QJsonValueRef.cpp \
|
|
|
|
qjson4/QJsonParser.cpp
|
|
|
|
|
|
|
|
isEqual(QT_MAJOR_VERSION, 4): RESOURCES += res/tr_qt4.qrc
|
2018-06-09 21:53:28 +02:00
|
|
|
isEqual(QT_MAJOR_VERSION, 4): GTA5SYNC_RCC = $$[QT_INSTALL_BINS]/rcc
|
2017-10-09 08:35:48 +02:00
|
|
|
|
|
|
|
# QT5 ONLY STUFF
|
2018-06-09 21:53:28 +02:00
|
|
|
|
2017-10-09 08:35:48 +02:00
|
|
|
isEqual(QT_MAJOR_VERSION, 5): RESOURCES += res/tr_qt5.qrc
|
2018-06-09 21:53:28 +02:00
|
|
|
isEqual(QT_MAJOR_VERSION, 5): GTA5SYNC_RCC = $$[QT_HOST_BINS]/rcc
|
2017-10-09 08:35:48 +02:00
|
|
|
|
2018-06-09 21:16:33 +02:00
|
|
|
# RESOURCE COMPILATION
|
|
|
|
|
2020-09-03 00:03:04 +02:00
|
|
|
system($$GTA5SYNC_RCC -threshold 0 -compress 9 $$PWD/res/global.qrc -o $$OUT_PWD/qrc_global.cpp) {
|
|
|
|
SOURCES += $$OUT_PWD/qrc_global.cpp
|
|
|
|
} else {
|
|
|
|
message("Failed to generate qrc_global.cpp")
|
|
|
|
}
|
2018-06-09 21:16:33 +02:00
|
|
|
|
2017-10-09 08:35:48 +02:00
|
|
|
# PROJECT INSTALLATION
|
|
|
|
|
|
|
|
isEmpty(GTA5SYNC_PREFIX): GTA5SYNC_PREFIX = /usr/local
|
|
|
|
|
|
|
|
appfiles.path = $$GTA5SYNC_PREFIX/share/applications
|
2020-08-28 13:06:27 +02:00
|
|
|
appfiles.files = $$PWD/res/de.syping.gta5view.desktop
|
2017-10-09 08:35:48 +02:00
|
|
|
pixmaps.path = $$GTA5SYNC_PREFIX/share/pixmaps
|
2020-08-28 22:11:52 +02:00
|
|
|
pixmaps.files = $$PWD/res/de.syping.gta5view.png
|
2017-10-09 08:35:48 +02:00
|
|
|
target.path = $$GTA5SYNC_PREFIX/bin
|
|
|
|
INSTALLS += target pixmaps appfiles
|
|
|
|
|
|
|
|
# QCONF BASED BUILD STUFF
|
|
|
|
|
2020-09-13 02:10:15 +02:00
|
|
|
contains(DEFINES, GTA5SYNC_QCONF) {
|
2017-10-09 08:35:48 +02:00
|
|
|
isEqual(QT_MAJOR_VERSION, 4): RESOURCES -= res/tr_qt4.qrc
|
|
|
|
isEqual(QT_MAJOR_VERSION, 5): RESOURCES -= res/tr_qt5.qrc
|
2020-09-13 02:10:15 +02:00
|
|
|
!contains(DEFINES, GTA5SYNC_QCONF_IN) {
|
2017-10-09 08:35:48 +02:00
|
|
|
RESOURCES -= res/tr_g5p.qrc
|
|
|
|
langfiles.path = $$GTA5SYNC_PREFIX/share/gta5view/translations
|
2020-08-28 00:26:30 +02:00
|
|
|
langfiles.files = $$PWD/res/gta5sync_en_US.qm $$PWD/res/gta5sync_de.qm $$PWD/res/gta5sync_fr.qm $$PWD/res/gta5sync_ko.qm $$PWD/res/gta5sync_ru.qm $$PWD/res/gta5sync_uk.qm $$PWD/res/gta5sync_zh_TW.qm $$PWD/res/qtbase_en_GB.qm
|
2017-10-09 08:35:48 +02:00
|
|
|
INSTALLS += langfiles
|
|
|
|
}
|
|
|
|
}
|
2018-01-11 08:41:00 +01:00
|
|
|
|
|
|
|
# TELEMETRY BASED STUFF
|
|
|
|
|
2020-09-13 02:10:15 +02:00
|
|
|
!contains(DEFINES, GTA5SYNC_TELEMETRY) {
|
2018-01-11 08:41:00 +01:00
|
|
|
SOURCES -= TelemetryClass.cpp \
|
|
|
|
tmext/TelemetryClassAuthenticator.cpp
|
|
|
|
HEADERS -= TelemetryClass.h \
|
|
|
|
tmext/TelemetryClassAuthenticator.h
|
|
|
|
}
|
2020-09-03 00:03:04 +02:00
|
|
|
|
2020-09-13 02:10:15 +02:00
|
|
|
!contains(DEFINES, GTA5SYNC_MOTD) {
|
|
|
|
SOURCES -= MessageThread.cpp
|
|
|
|
HEADERS -= MessageThread.h
|
|
|
|
} else {
|
|
|
|
lessThan(QT_MAJOR_VERSION, 5) {
|
|
|
|
SOURCES -= MessageThread.cpp
|
|
|
|
HEADERS -= MessageThread.h
|
|
|
|
DEFINES -= GTA5SYNC_MOTD
|
|
|
|
message("Messages require Qt5 or newer!")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-03 00:03:04 +02:00
|
|
|
# CMAKE BASED STUFF
|
|
|
|
|
2020-09-26 16:12:55 +02:00
|
|
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
|
|
message("Building gta5view with QMake is deprecated, please use CMake instead!")
|
2020-09-03 00:03:04 +02:00
|
|
|
}
|