Skip to content

Commit

Permalink
gta5view 1.10.2 release
Browse files Browse the repository at this point in the history
- fix crash bug and upload issue
  • Loading branch information
Syping committed Mar 15, 2023
1 parent d7b28c2 commit 13b6d61
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .ci/app.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .ci/gta5view.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: cpp

services:
- docker

env:
global:
- BUILD_TYPE=REL
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
12 changes: 10 additions & 2 deletions ProfileInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down
30 changes: 29 additions & 1 deletion RagePhoto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@
#include <chrono>
#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;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -563,6 +586,8 @@ bool RagePhoto::setPhotoData(const char *data, int size)
if (static_cast<quint32>(size) > p_photoBuffer)
return false;
p_photoData = QByteArray(data, size);
// serializer band-aid
setJsonData(p_jsonData);
return true;
}

Expand Down Expand Up @@ -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<quint32>(PhotoFormat::G5EX);
Expand Down
4 changes: 2 additions & 2 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions res/app.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ IDI_ICON1 ICON DISCARDABLE "5sync.ico"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest"
#include <windows.h>
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
Expand All @@ -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
1 change: 1 addition & 0 deletions res/de.syping.gta5view.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<developer_name>Syping</developer_name>

<releases>
<release date="2022-03-15" version="1.10.2"/>
<release date="2021-06-17" version="1.10.1"/>
<release date="2021-05-27" version="1.10.0"/>
<release date="2021-03-22" version="1.9.2"/>
Expand Down

0 comments on commit 13b6d61

Please sign in to comment.