diff --git a/.ci/app.rc b/.ci/app.rc index f247bab..8a785d2 100644 --- a/.ci/app.rc +++ b/.ci/app.rc @@ -24,7 +24,7 @@ BEGIN VALUE "FileDescription", "gta5view" VALUE "FileVersion", "MAJOR_VER.MINOR_VER.PATCH_VERSTR_BUILD_VER" VALUE "InternalName", "gta5view" - VALUE "LegalCopyright", "Copyright © 2016-2022 Syping" + VALUE "LegalCopyright", "Copyright © 2016-2023 Syping" VALUE "OriginalFilename", "gta5view.exe" VALUE "ProductName", "gta5view" VALUE "ProductVersion", "MAJOR_VER.MINOR_VER.PATCH_VERSTR_BUILD_VER" diff --git a/.ci/gta5view.nsi b/.ci/gta5view.nsi index 56ea8fa..1ddd882 100644 --- a/.ci/gta5view.nsi +++ b/.ci/gta5view.nsi @@ -4,7 +4,7 @@ !define APP_EXT ".g5e" !define COMP_NAME "Syping" !define WEB_SITE "https://gta5view.syping.de/" -!define VERSION "1.10.1.1" +!define VERSION "1.10.2.0" !define COPYRIGHT "Copyright © 2016-2022 Syping" !define DESCRIPTION "Open Source Snapmatic and Savegame viewer/editor for GTA V" !define INSTALLER_NAME "gta5view_setup.exe" diff --git a/.travis.yml b/.travis.yml index 8dee407..f6c3397 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: cpp services: - docker - + env: global: - BUILD_TYPE=REL @@ -27,7 +27,7 @@ matrix: - QT_SELECT=qt5-x86_64-w64-mingw32 - RELEASE_LABEL="Windows 64-Bit Installer" - os: osx - osx_image: xcode12.2 + osx_image: xcode14.2 env: - BUILD_SCRIPT=osx_ci.sh - RELEASE_LABEL="Mac OS X 64-Bit Disk Image" diff --git a/CMakeLists.txt b/CMakeLists.txt index cbb26a5..dbd21a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ if(APPLE) res/gta5view.icns ) set(MACOSX_BUNDLE_BUNDLE_NAME gta5view) - set(MACOSX_BUNDLE_BUNDLE_VERSION 1.10.1) + set(MACOSX_BUNDLE_BUNDLE_VERSION 1.10.2) set(MACOSX_BUNDLE_ICON_FILE gta5view.icns) set(MACOSX_BUNDLE_GUI_IDENTIFIER de.syping.gta5view) set_source_files_properties(res/gta5view.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index ce87356..8eca40a 100644 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -287,8 +287,16 @@ void ProfileInterface::directoryChanged(const QString &path) } if (fileName.startsWith("PGTA5") && !fileName.endsWith(".bak")) { t_snapmaticPics << fileName; - if (!snapmaticPics.contains(fileName)) { - n_snapmaticPics << fileName; + if (fileName.endsWith(".hidden")) { + const QString originalFileName = fileName.left(fileName.length() - 7); + if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(originalFileName)) { + n_snapmaticPics << fileName; + } + } + else { + if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(fileName % ".hidden")) { + n_snapmaticPics << fileName; + } } } } diff --git a/RagePhoto.cpp b/RagePhoto.cpp index 293d4a8..ba03159 100644 --- a/RagePhoto.cpp +++ b/RagePhoto.cpp @@ -31,6 +31,20 @@ #include #endif +inline quint32 joaatFromSI(const char *data, size_t size) +{ + quint32 val = 0xE47AB81CUL; + for (size_t i = 0; i != size; i++) { + val += data[i]; + val += (val << 10); + val ^= (val >> 6); + } + val += (val << 3); + val ^= (val >> 11); + val += (val << 15); + return val; +} + RagePhoto::RagePhoto() { p_photoFormat = PhotoFormat::Undefined; @@ -530,8 +544,15 @@ bool RagePhoto::setJsonData(const QByteArray &data) QJsonDocument t_jsonDocument = QJsonDocument::fromJson(data); if (t_jsonDocument.isNull()) return false; - p_jsonData = t_jsonDocument.toJson(QJsonDocument::Compact); p_jsonObject = t_jsonDocument.object(); + // serializer band-aid + QJsonObject t_jsonObject = p_jsonObject; + t_jsonObject["sign"] = "__gta5view.sign"; + t_jsonDocument.setObject(t_jsonObject); + p_jsonData = t_jsonDocument.toJson(QJsonDocument::Compact); + char sign_char[24]; + sprintf(sign_char, "%llu", (0x100000000000000ULL | joaatFromSI(p_photoData.constData(), p_photoData.size()))); + p_jsonData.replace("\"__gta5view.sign\"", sign_char); return true; } @@ -555,6 +576,8 @@ bool RagePhoto::setPhotoData(const QByteArray &data) if (size > p_photoBuffer) return false; p_photoData = data; + // serializer band-aid + setJsonData(p_jsonData); return true; } @@ -563,6 +586,8 @@ bool RagePhoto::setPhotoData(const char *data, int size) if (static_cast(size) > p_photoBuffer) return false; p_photoData = QByteArray(data, size); + // serializer band-aid + setJsonData(p_jsonData); return true; } @@ -640,6 +665,9 @@ QByteArray RagePhoto::save(PhotoFormat photoFormat) void RagePhoto::save(QIODevice *ioDevice, PhotoFormat photoFormat) { + // serializer band-aid + setJsonData(p_jsonData); + if (photoFormat == PhotoFormat::G5EX) { char uInt32Buffer[4]; quint32 format = static_cast(PhotoFormat::G5EX); diff --git a/config.h b/config.h index 23874e2..6f96056 100644 --- a/config.h +++ b/config.h @@ -47,11 +47,11 @@ #endif #ifndef GTA5SYNC_COPYRIGHT -#define GTA5SYNC_COPYRIGHT "2016-2022" +#define GTA5SYNC_COPYRIGHT "2016-2023" #endif #ifndef GTA5SYNC_APPVER -#define GTA5SYNC_APPVER "1.10.1" +#define GTA5SYNC_APPVER "1.10.2" #endif #if __cplusplus diff --git a/res/app.rc b/res/app.rc index 87b29d5..56b1561 100644 --- a/res/app.rc +++ b/res/app.rc @@ -4,8 +4,8 @@ IDI_ICON1 ICON DISCARDABLE "5sync.ico" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest" #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 1, 10, 1, 2 -PRODUCTVERSION 1, 10, 1, 2 +FILEVERSION 1, 10, 2, 0 +PRODUCTVERSION 1, 10, 2, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -22,12 +22,12 @@ BEGIN BEGIN VALUE "CompanyName", "Syping" VALUE "FileDescription", "gta5view" - VALUE "FileVersion", "1.10.1" + VALUE "FileVersion", "1.10.2" VALUE "InternalName", "gta5view" - VALUE "LegalCopyright", "Copyright © 2016-2022 Syping" + VALUE "LegalCopyright", "Copyright © 2016-2023 Syping" VALUE "OriginalFilename", "gta5view.exe" VALUE "ProductName", "gta5view" - VALUE "ProductVersion", "1.10.1" + VALUE "ProductVersion", "1.10.2" END END END diff --git a/res/de.syping.gta5view.metainfo.xml b/res/de.syping.gta5view.metainfo.xml index 9bc50a1..87a294f 100644 --- a/res/de.syping.gta5view.metainfo.xml +++ b/res/de.syping.gta5view.metainfo.xml @@ -34,6 +34,7 @@ Syping +