Compare commits

...

2 Commits

Author SHA1 Message Date
Syping 141be3e237 1.5.5 release 3 years ago
Syping 5dae0a9628 1.6.0 backport for 1.5.5 3 years ago
  1. 14
      .travis.yml
  2. 4
      .travis/debian_build.sh
  3. 2
      .travis/debian_travis.sh
  4. 1
      .travis/dropbox_uploader.enc
  5. 1763
      .travis/dropbox_uploader.sh
  6. 3
      .travis/gta5view.nsi
  7. 2
      .travis/osx_build.sh
  8. 3
      .travis/source.sh
  9. 14
      .travis/travis.sh
  10. 17
      .travis/windows_build.sh
  11. 3
      .travis/windows_travis.sh
  12. 5
      .travis/wininstall_build.sh
  13. 2
      .travis/wininstall_travis.sh
  14. 6
      AboutDialog.cpp
  15. 2
      AboutDialog.h
  16. 2
      AppEnv.cpp
  17. 2
      AppEnv.h
  18. 2
      CrewDatabase.cpp
  19. 2
      CrewDatabase.h
  20. 2
      DatabaseThread.cpp
  21. 2
      DatabaseThread.h
  22. 2
      ExportDialog.cpp
  23. 2
      ExportDialog.h
  24. 2
      ExportThread.cpp
  25. 2
      ExportThread.h
  26. 2
      GlobalString.cpp
  27. 2
      GlobalString.h
  28. 2
      IconLoader.cpp
  29. 2
      IconLoader.h
  30. 2
      ImageEditorDialog.cpp
  31. 2
      ImageEditorDialog.h
  32. 3
      ImportDialog.cpp
  33. 2
      ImportDialog.h
  34. 2
      JsonEditorDialog.cpp
  35. 2
      JsonEditorDialog.h
  36. 3
      MapLocationDialog.cpp
  37. 2
      MapLocationDialog.h
  38. 6
      OptionsDialog.cpp
  39. 2
      OptionsDialog.h
  40. 22
      OptionsDialog.ui
  41. 2
      PictureDialog.cpp
  42. 2
      PictureDialog.h
  43. 7
      PictureDialog.ui
  44. 2
      PictureExport.cpp
  45. 2
      PictureExport.h
  46. 2
      PictureWidget.cpp
  47. 2
      PictureWidget.h
  48. 2
      PlayerListDialog.cpp
  49. 2
      PlayerListDialog.h
  50. 2
      ProfileDatabase.cpp
  51. 2
      ProfileDatabase.h
  52. 3
      ProfileInterface.cpp
  53. 2
      ProfileInterface.h
  54. 2
      ProfileLoader.cpp
  55. 2
      ProfileLoader.h
  56. 2
      ProfileWidget.cpp
  57. 2
      ProfileWidget.h
  58. 6
      README.md
  59. 2
      SavegameCopy.cpp
  60. 2
      SavegameCopy.h
  61. 9
      SavegameData.cpp
  62. 2
      SavegameData.h
  63. 2
      SavegameDialog.cpp
  64. 2
      SavegameDialog.h
  65. 2
      SavegameWidget.cpp
  66. 2
      SavegameWidget.h
  67. 2
      SidebarGenerator.cpp
  68. 2
      SidebarGenerator.h
  69. 2
      SnapmaticEditor.cpp
  70. 2
      SnapmaticEditor.h
  71. 76
      SnapmaticPicture.cpp
  72. 9
      SnapmaticPicture.h
  73. 2
      SnapmaticWidget.cpp
  74. 2
      SnapmaticWidget.h
  75. 2
      StandardPaths.cpp
  76. 2
      StandardPaths.h
  77. 22
      StringParser.cpp
  78. 5
      StringParser.h
  79. 8
      TelemetryClass.cpp
  80. 2
      TelemetryClass.h
  81. 3
      TranslationClass.cpp
  82. 2
      TranslationClass.h
  83. 2
      UserInterface.cpp
  84. 2
      UserInterface.h
  85. 2
      anpro/JSHighlighter.cpp
  86. 2
      anpro/JSHighlighter.h
  87. 12
      config.h
  88. 7
      gta5view.pro
  89. 2
      lang/README.txt
  90. BIN
      lang/gta5sync_no.qm
  91. 2225
      lang/gta5sync_no.ts
  92. 65
      main.cpp
  93. 2
      qjson4/QJsonArray.cpp
  94. 2
      qjson4/QJsonArray.h
  95. 2
      qjson4/QJsonDocument.cpp
  96. 2
      qjson4/QJsonDocument.h
  97. 2
      qjson4/QJsonObject.cpp
  98. 2
      qjson4/QJsonObject.h
  99. 2
      qjson4/QJsonParseError.cpp
  100. 2
      qjson4/QJsonParseError.h

14
.travis.yml

@ -27,13 +27,23 @@ matrix:
- BUILD_SCRIPT=windows_travis.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
- EXECUTABLE_ARCH=_x64
- env:
- BUILD_SCRIPT=windows_travis.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
- PACKAGE_CODE=Dropbox
- env:
- BUILD_SCRIPT=windows_travis.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
- PACKAGE_CODE=gta5-mods
- env:
- BUILD_SCRIPT=wininstall_travis.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
- os: osx
env: BUILD_SCRIPT=osx_travis.sh
before_install:
- ".travis/source.sh"
script:
- ".travis/travis.sh"

4
.travis/debian_build.sh

@ -21,11 +21,11 @@ mkdir -p /usr/share/gta5view && \
# Starting build
cd qt5 && \
qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"GitHub\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../../gta5view.pro && \
qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../../gta5view.pro && \
make -j 4 && \
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<[email protected]\>" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=${PROJECT_DIR}/assets && \
cd .. && \
cd qt4 && \
qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT4} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"GitHub\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT4} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
make -j 4 && \
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \<[email protected]\>" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=${PROJECT_DIR}/assets

2
.travis/debian_travis.sh

@ -12,4 +12,4 @@ docker pull ${DOCKER_IMAGE} && \
docker run --rm \
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
${DOCKER_IMAGE} \
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export APT_INSTALL=${APT_INSTALL} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/debian_install.sh && .travis/debian_build.sh"
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export APT_INSTALL=${APT_INSTALL} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/debian_install.sh && .travis/debian_build.sh"

1
.travis/dropbox_uploader.enc

@ -0,0 +1 @@
Poァ鏖�劾ラ<作1x」%几�ャネw|RtZv�kホ銓顴Z肄2チ廁湮ォ`�ム,4vヨマ・@€�ヲeハ・~U$+��€��<牾&蓬熙

1763
.travis/dropbox_uploader.sh

File diff suppressed because it is too large

3
.travis/gta5view.nsi

@ -3,7 +3,7 @@
!define APP_NAME "gta5view"
!define COMP_NAME "Syping"
!define WEB_SITE "https://gta5view.syping.de/"
!define VERSION "1.5.4.0"
!define VERSION "1.5.5.0"
!define COPYRIGHT "Copyright © 2016-2018 Syping"
!define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
!define INSTALLER_NAME "gta5view_setup.exe"
@ -79,6 +79,7 @@ InstallDir "$PROGRAMFILES64\Syping\gta5view"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_RESERVEFILE_LANGDLL

2
.travis/osx_build.sh

@ -8,7 +8,7 @@ mkdir -p build && \
mkdir -p assets && \
cd build && \
/usr/local/opt/qt/bin/qmake ${QMAKE_FLAGS_QT5} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"GitHub\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \
/usr/local/opt/qt/bin/qmake ${QMAKE_FLAGS_QT5} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \
make -j 4 && \
/usr/local/opt/qt/bin/macdeployqt gta5view.app -dmg && \
cp -Rf gta5view.dmg ../assets/gta5view-osx_${APPLICATION_VERSION}.dmg

3
.travis/source.sh

@ -1,4 +1,5 @@
#!/bin/bash
rm -rf tmext/TelemetryClassAuthenticator.cpp && \
openssl aes-256-cbc -K $encrypted_55502862a724_key -iv $encrypted_55502862a724_iv -in tmext/TelemetryClassAuthenticator.cpp.enc -out tmext/TelemetryClassAuthenticator.cpp -d
openssl aes-256-cbc -K $encrypted_55502862a724_key -iv $encrypted_55502862a724_iv -in tmext/TelemetryClassAuthenticator.cpp.enc -out tmext/TelemetryClassAuthenticator.cpp -d && \
openssl aes-256-cbc -K $encrypted_d57e7d2f8877_key -iv $encrypted_d57e7d2f8877_iv -in .travis/dropbox_uploader.enc -out ~/.dropbox_uploader -d

14
.travis/travis.sh

@ -8,10 +8,22 @@ elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew install lua
fi
# Check if build is not tagged
if [ "${TRAVIS_TAG}" == "" ]; then
export EXECUTABLE_TAG=-$(git rev-parse --short HEAD)
else
export EXECUTABLE_TAG=
fi
# Check if package code is not set
if [ "${PACKAGE_CODE}" == "" ]; then
export PACKAGE_CODE=GitHub
fi
if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION=`lua -e 'for line in io.lines("config.h") do local m = string.match(line, "#define GTA5SYNC_APPVER \"(.+)\"$"); if m then print(m); os.exit(0) end end'`; else export APPLICATION_VERSION=`git name-rev --tags --name-only $(git rev-parse HEAD)`; fi
export PACKAGE_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}${EXECUTABLE_TAG}
if [[ ! ${PACKAGE_BUILD} ]]; then export PACKAGE_BUILD=1; fi
export PROJECT_DIR=$(pwd)

17
.travis/windows_build.sh

@ -1,5 +1,8 @@
#!/bin/bash
apt-get update -qq && \
apt-get install -qq curl && \
export GTA5VIEW_EXECUTABLE=gta5view-${EXECUTABLE_VERSION}${EXECUTABLE_ARCH}.exe && \
# Creating folders
@ -11,8 +14,18 @@ mkdir -p assets && \
# Starting build
cd build && \
qmake-static ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"GitHub\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \
qmake-static ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \
make -j 4 && \
cp -Rf release/*.exe ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} && \
cd ${PROJECT_DIR}/assets && \
upx --best ${GTA5VIEW_EXECUTABLE}
upx --best ${GTA5VIEW_EXECUTABLE} && \
if [ "${PACKAGE_CODE}" == "Dropbox" ]; then
${PROJECT_DIR}/.travis/dropbox_uploader.sh mkdir gta5view-builds/${PACKAGE_VERSION}
${PROJECT_DIR}/.travis/dropbox_uploader.sh upload ${GTA5VIEW_EXECUTABLE} gta5view-builds/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
rm -rf ${GTA5VIEW_EXECUTABLE}
elif [ "${PACKAGE_CODE}" == "gta5-mods" ]; then
${PROJECT_DIR}/.travis/dropbox_uploader.sh mkdir gta5-mods/${PACKAGE_VERSION}
${PROJECT_DIR}/.travis/dropbox_uploader.sh upload ${GTA5VIEW_EXECUTABLE} gta5-mods/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
rm -rf ${GTA5VIEW_EXECUTABLE}
fi

3
.travis/windows_travis.sh

@ -8,5 +8,6 @@ cd ${PROJECT_DIR} && \
docker pull ${DOCKER_IMAGE} && \
docker run --rm \
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
-v "${HOME}/.dropbox_uploader:/root/.dropbox_uploader" \
${DOCKER_IMAGE} \
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/windows_build.sh"
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/windows_build.sh"

5
.travis/wininstall_build.sh

@ -11,7 +11,8 @@ mkdir -p assets && \
# Starting build
cd build && \
qmake ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"GitHub\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' ../gta5view.pro && \
qmake ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' ../gta5view.pro && \
make -j 4 && \
cd ${PROJECT_DIR}/assets && \
makensis -NOCD ${PROJECT_DIR}/.travis/gta5view.nsi
makensis -NOCD ${PROJECT_DIR}/.travis/gta5view.nsi && \
mv -f gta5view_setup.exe gta5view-${EXECUTABLE_VERSION}_setup.exe

2
.travis/wininstall_travis.sh

@ -9,4 +9,4 @@ docker pull ${DOCKER_IMAGE} && \
docker run --rm \
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
${DOCKER_IMAGE} \
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/wininstall_build.sh"
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/wininstall_build.sh"

6
AboutDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -65,11 +65,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
}
// Project Description
#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
// Copyright Description
QString copyrightDes1 = tr("Copyright &copy; <a href=\"%1\">%2</a> %3");

2
AboutDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
AppEnv.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
AppEnv.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
CrewDatabase.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
CrewDatabase.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
DatabaseThread.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
DatabaseThread.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportThread.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ExportThread.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
GlobalString.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
GlobalString.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
IconLoader.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
IconLoader.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImageEditorDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ImageEditorDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

3
ImportDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -32,6 +32,7 @@
#include <QPixmap>
#include <QImage>
#include <QDebug>
#include <QStyle>
#include <QFile>
#include <QRgb>

2
ImportDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
JsonEditorDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
JsonEditorDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

3
MapLocationDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -22,6 +22,7 @@
#include "AppEnv.h"
#include <QPainter>
#include <QDebug>
#include <QStyle>
MapLocationDialog::MapLocationDialog(double x, double y, QWidget *parent) :
QDialog(parent), xpos_old(x), ypos_old(y),

2
MapLocationDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2017 Syping
*
* This program is free software: you can redistribute it and/or modify

6
OptionsDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -109,10 +109,6 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) :
resize(435 * screenRatio, 405 * screenRatio);
#endif
#ifdef GTA5SYNC_DISABLED
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabSync));
#endif
this->setWindowTitle(windowTitle().arg(GTA5SYNC_APPSTR));
}

2
OptionsDialog.h

@ -1,5 +1,5 @@
/******************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

22
OptionsDialog.ui

@ -20,7 +20,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabProfile">
<attribute name="title">
@ -683,26 +683,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabSync">
<attribute name="title">
<string>Sync</string>
</attribute>
<layout class="QVBoxLayout" name="vlSync">
<item>
<widget class="QLabel" name="labSync">
<property name="text">
<string>Sync is not implemented at current time</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>

2
PictureDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

7
PictureDialog.ui

@ -43,9 +43,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="res/app.qrc">:/img/960x536.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
@ -230,9 +227,7 @@
</slots>
</customwidget>
</customwidgets>
<resources>
<include location="res/app.qrc"/>
</resources>
<resources/>
<connections>
<connection>
<sender>cmdClose</sender>

2
PictureExport.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureExport.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PictureWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PlayerListDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
PlayerListDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileDatabase.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileDatabase.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

3
ProfileInterface.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -51,6 +51,7 @@
#include <QDebug>
#include <QColor>
#include <QTimer>
#include <QStyle>
#include <QFile>
#include <QUrl>
#include <QDir>

2
ProfileInterface.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileLoader.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileLoader.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
ProfileWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

6
README.md

@ -7,9 +7,9 @@ Grand Theft Auto V Savegame and Snapmatic viewer/editor
- Let choose between multiple Social Club accounts as GTA V profiles IDs
#### Screenshots
![Snapmatic Picture Viewer](https://i.imgur.com/dQdW3hx.png)
![User Interface](https://i.imgur.com/SRNQdq6.png)
![Snapmatic Properties](https://i.imgur.com/j1Lodiu.png)
![Snapmatic Picture Viewer](res/src/picture.png)
![User Interface](res/src/mainui.png)
![Snapmatic Properties](res/src/prop.png)
#### Build gta5view for Debian/Ubuntu

2
SavegameCopy.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameCopy.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

9
SavegameData.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include "SnapmaticPicture.h"
#include "StringParser.h"
#include "SavegameData.h"
#include <QStringBuilder>
@ -42,7 +43,7 @@ bool SavegameData::readingSavegame()
QFile *saveFile = new QFile(savegameFileName);
if (!saveFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(savegameFileName);
lastStep = "1;/1,OpenFile," % SnapmaticPicture::convertDrawStringForLog(savegameFileName);
saveFile->deleteLater();
delete saveFile;
return false;
@ -51,7 +52,7 @@ bool SavegameData::readingSavegame()
// Reading Savegame Header
if (!saveFile->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(savegameFileName) % ",1,NOHEADER";
lastStep = "2;/3,ReadingFile," % SnapmaticPicture::convertDrawStringForLog(savegameFileName) % ",1,NOHEADER";
saveFile->close();
saveFile->deleteLater();
delete saveFile;
@ -78,7 +79,7 @@ QString SavegameData::getSavegameDataString(const QByteArray &savegameHeader)
QList<QByteArray> savegameBytesList = savegameBytes.split(char(0x01));
savegameBytes = savegameBytesList.at(1);
savegameBytesList.clear();
return StringParser::parseTitleString(savegameBytes, savegameBytes.length());
return SnapmaticPicture::parseTitleString(savegameBytes, savegameBytes.length());
}
bool SavegameData::readingSavegameFromFile(const QString &fileName)

2
SavegameData.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameDialog.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameDialog.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SavegameWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SidebarGenerator.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SidebarGenerator.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticEditor.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2018 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticEditor.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

76
SnapmaticPicture.cpp

@ -1,6 +1,6 @@
/*****************************************************************************
* gta5sync-spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2017 Syping
* gta5spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2018 Syping
*
* 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
@ -17,12 +17,12 @@
*****************************************************************************/
#include "SnapmaticPicture.h"
#include "StringParser.h"
#include <QStringBuilder>
#include <QJsonDocument>
#include <QJsonObject>
#include <QStringList>
#include <QVariantMap>
#include <QTextCodec>
#include <QJsonArray>
#include <QFileInfo>
#include <QPainter>
@ -101,7 +101,7 @@ void SnapmaticPicture::reset()
jsonStr = QString();
// SNAPMATIC DEFAULTS
#ifdef GTA5SYNC_CSDF
#ifdef GTA5SYNC_NOASSIST
careSnapDefault = false;
#else
careSnapDefault = true;
@ -121,7 +121,7 @@ bool SnapmaticPicture::preloadFile()
if (!picFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(picFilePath);
lastStep = "1;/1,OpenFile," % convertDrawStringForLog(picFilePath);
delete picFile;
return false;
}
@ -191,31 +191,31 @@ bool SnapmaticPicture::preloadFile()
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,G5E_FORMATERROR";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,G5E_NOTCOMPATIBLE";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,G5E_NOTCOMPATIBLE";
return false;
}
}
else
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,G5E_FORMATERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,G5E_FORMATERROR";
return false;
}
}
@ -244,7 +244,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Reading Snapmatic Header
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,NOHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,NOHEADER";
picStream->close();
delete picStream;
return false;
@ -253,7 +253,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
pictureHead = getSnapmaticHeaderString(snapmaticHeaderLine);
if (pictureHead == QLatin1String("MALFORMED"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",1,MALFORMEDHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",1,MALFORMEDHEADER";
picStream->close();
delete picStream;
return false;
@ -262,7 +262,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Reading JPEG Header Line
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOHEADER";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOHEADER";
picStream->close();
delete picStream;
return false;
@ -273,7 +273,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
jpegHeaderLine.remove(0, jpegHeaderLineDifStr);
if (jpegHeaderLine.left(4) != QByteArray("JPEG"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOJPEG";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOJPEG";
picStream->close();
delete picStream;
return false;
@ -282,7 +282,7 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Read JPEG Stream
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",2,NOPIC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",2,NOPIC";
picStream->close();
delete picStream;
return false;
@ -336,14 +336,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
// Read JSON Stream
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,NOJSON";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,NOJSON";
picStream->close();
delete picStream;
return false;
}
else if (picStream->read(4) != QByteArray("JSON"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,CTJSON";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,CTJSON";
picStream->close();
delete picStream;
return false;
@ -354,14 +354,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,NOTITL";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,NOTITL";
picStream->close();
delete picStream;
return false;
}
else if (picStream->read(4) != QByteArray("TITL"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",4,CTTITL";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",4,CTTITL";
picStream->close();
delete picStream;
return false;
@ -371,14 +371,14 @@ bool SnapmaticPicture::readingPicture(bool writeEnabled_, bool cacheEnabled_, bo
if (!picStream->isReadable())
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",5,NODESC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",5,NODESC";
picStream->close();
delete picStream;
return picOk;
}
else if (picStream->read(4) != QByteArray("DESC"))
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",5,CTDESC";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",5,CTDESC";
picStream->close();
delete picStream;
return false;
@ -403,7 +403,7 @@ QString SnapmaticPicture::getSnapmaticHeaderString(const QByteArray &snapmaticHe
QList<QByteArray> snapmaticBytesList = snapmaticHeader.left(snapmaticUsefulLength).split('\x01');
if (snapmaticBytesList.length() < 2) { return QLatin1String("MALFORMED"); }
QByteArray snapmaticBytes = snapmaticBytesList.at(1);
return StringParser::parseTitleString(snapmaticBytes, snapmaticBytes.length());
return parseTitleString(snapmaticBytes, snapmaticBytes.length());
}
QString SnapmaticPicture::getSnapmaticJSONString(const QByteArray &jsonBytes)
@ -792,7 +792,7 @@ QImage SnapmaticPicture::getImage(bool fastLoad)
QFile *picFile = new QFile(picFilePath);
if (!picFile->open(QFile::ReadOnly))
{
lastStep = "1;/1,OpenFile," % StringParser::convertDrawStringForLog(picFilePath);
lastStep = "1;/1,OpenFile," % convertDrawStringForLog(picFilePath);
delete picFile;
return QImage();
}
@ -1014,15 +1014,15 @@ void SnapmaticPicture::parseJsonContent()
{
if (jsonIncomplete && jsonError)
{
lastStep = "2;/4,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE,JSONERROR";
lastStep = "2;/4,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE,JSONERROR";
}
else if (jsonIncomplete)
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONINCOMPLETE";
}
else if (jsonError)
{
lastStep = "2;/3,ReadingFile," % StringParser::convertDrawStringForLog(picFilePath) % ",3,JSONERROR";
lastStep = "2;/3,ReadingFile," % convertDrawStringForLog(picFilePath) % ",3,JSONERROR";
}
jsonOk = false;
}
@ -1377,7 +1377,7 @@ bool SnapmaticPicture::verifyTitle(const QString &title)
// VERIFY TITLE FOR BE A VALID SNAPMATIC TITLE
if (title.length() <= titlStreamCharacterMax && title.length() > 0)
{
for (QChar titleChar : title)
for (const QChar &titleChar : title)
{
if (!verifyTitleChar(titleChar)) return false;
}
@ -1396,3 +1396,25 @@ bool SnapmaticPicture::verifyTitleChar(const QChar &titleChar)
}
return false;
}
// STRING OPERATIONS
QString SnapmaticPicture::parseTitleString(const QByteArray &commitBytes, int maxLength)
{
Q_UNUSED(maxLength)
QString retStr = QTextCodec::codecForName("UTF-16LE")->toUnicode(commitBytes).trimmed();
retStr.remove(QChar('\x00'));
return retStr;
}
QString SnapmaticPicture::convertDrawStringForLog(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&","&u;").replace(",", "&c;");
}
QString SnapmaticPicture::convertLogStringForDraw(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&c;",",").replace("&u;", "&");
}

9
SnapmaticPicture.h

@ -1,6 +1,6 @@
/*****************************************************************************
* gta5sync-spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2017 Syping
* gta5spv Grand Theft Auto Snapmatic Picture Viewer
* Copyright (C) 2016-2018 Syping
*
* 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
@ -134,6 +134,11 @@ public:
// VERIFY CONTENT
static bool verifyTitle(const QString &title);
// STRING OPERATIONS
static QString parseTitleString(const QByteArray &commitBytes, int maxLength);
static QString convertDrawStringForLog(const QString &inputStr);
static QString convertLogStringForDraw(const QString &inputStr);
private:
QString getSnapmaticHeaderString(const QByteArray &snapmaticHeader);
QString getSnapmaticJSONString(const QByteArray &jsonBytes);

2
SnapmaticWidget.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
SnapmaticWidget.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
StandardPaths.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

2
StandardPaths.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify

22
StringParser.cpp

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -36,26 +36,6 @@ StringParser::StringParser()
}
QString StringParser::parseTitleString(const QByteArray &commitBytes, int maxLength)
{
Q_UNUSED(maxLength)
QString retStr = QTextCodec::codecForName("UTF-16LE")->toUnicode(commitBytes).trimmed();
retStr.remove(QChar('\x00'));
return retStr;
}
QString StringParser::convertDrawStringForLog(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&","&u;").replace(",", "&c;");
}
QString StringParser::convertLogStringForDraw(const QString &inputStr)
{
QString outputStr = inputStr;
return outputStr.replace("&c;",",").replace("&u;", "&");
}
QString StringParser::escapeString(const QString &toEscape)
{
#if QT_VERSION >= 0x050000

5
StringParser.h

@ -1,5 +1,5 @@
/*****************************************************************************
* gta5sync GRAND THEFT AUTO V SYNC
* gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping
*
* This program is free software: you can redistribute it and/or modify
@ -26,9 +26,6 @@ class StringParser