Skip to content

Commit

Permalink
gta5view 1.9.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Syping committed Nov 30, 2020
1 parent 9adc8d9 commit 5dbc06f
Show file tree
Hide file tree
Showing 32 changed files with 229 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .ci/windows_docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

DOCKER_IMAGE=sypingauto/gta5view-build:1.8-static
DOCKER_IMAGE=sypingauto/gta5view-build:1.9-static
PROJECT_DIR_DOCKER=/gta5view

cd ${PROJECT_DIR} && \
Expand Down
2 changes: 1 addition & 1 deletion .ci/wininstall_docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

DOCKER_IMAGE=sypingauto/gta5view-build:1.8-shared
DOCKER_IMAGE=sypingauto/gta5view-build:1.9-shared
PROJECT_DIR_DOCKER=/gta5view

cd ${PROJECT_DIR} && \
Expand Down
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ kind: pipeline
type: docker

environment:
BUILD_TYPE: "DEV"
BUILD_TYPE: "REL"

steps:
- name: Windows Installer
image: sypingauto/gta5view-build:1.8-shared
image: sypingauto/gta5view-build:1.9-shared
environment:
BUILD_SCRIPT: "wininstall_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32"
Expand All @@ -18,7 +18,7 @@ steps:
- name: gta5view
path: /srv/gta5view
- name: Windows Portable
image: sypingauto/gta5view-build:1.8-static
image: sypingauto/gta5view-build:1.9-static
environment:
BUILD_SCRIPT: "windows_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32"
Expand Down
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ stages:
- build

variables:
BUILD_TYPE: "DEV"
BUILD_TYPE: "REL"

Windows Installer:
stage: build
image: sypingauto/gta5view-build:1.8-shared
image: sypingauto/gta5view-build:1.9-shared
variables:
BUILD_SCRIPT: "wininstall_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32"
Expand All @@ -19,7 +19,7 @@ Windows Installer:

Windows Portable:
stage: build
image: sypingauto/gta5view-build:1.8-static
image: sypingauto/gta5view-build:1.9-static
variables:
BUILD_SCRIPT: "windows_build.sh"
QT_SELECT: "qt5-x86_64-w64-mingw32"
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ sudo: required

language: cpp

service:
services:
- docker

env:
global:
- BUILD_TYPE=DEV
- BUILD_TYPE=REL

matrix:
include:
Expand Down Expand Up @@ -37,6 +37,7 @@ matrix:
- QT_SELECT=qt5-x86_64-w64-mingw32
- RELEASE_LABEL="Windows 64-Bit Installer"
- os: osx
osx_image: xcode10.3
env:
- BUILD_SCRIPT=osx_ci.sh
- RELEASE_LABEL="Mac OS X 64-Bit Disk Image"
Expand Down
57 changes: 23 additions & 34 deletions AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,86 +32,77 @@ AboutDialog::AboutDialog(QWidget *parent) :
setWindowFlags(windowFlags()^Qt::WindowContextHelpButtonHint);

// Build Strings
QString appVersion = qApp->applicationVersion();
const QString appVersion = QApplication::applicationVersion();
QString buildType = tr(GTA5SYNC_BUILDTYPE);
buildType.replace("_", " ");
QString projectBuild = AppEnv::getBuildDateTime();
QString buildStr = GTA5SYNC_BUILDSTRING;
const QString projectBuild = AppEnv::getBuildDateTime();
const QString buildStr = GTA5SYNC_BUILDSTRING;
#ifndef GTA5SYNC_BUILDTYPE_REL
#ifdef GTA5SYNC_COMMIT
if (!appVersion.contains("-")) { appVersion = appVersion % "-" % GTA5SYNC_COMMIT; }
if (!appVersion.contains("-"))
appVersion = appVersion % "-" % GTA5SYNC_COMMIT;
#endif
#endif

// Translator Comments
//: Translated by translator, example Translated by Syping
QString translatedByStr = tr("Translated by %1");
const QString translatedByStr = tr("Translated by %1");
//: Insert your name here and profile here in following scheme, First Translator,First Profile\\nSecond Translator\\nThird Translator,Second Profile
QString translatorVal = tr("TRANSLATOR");
const QString translatorVal = tr("TRANSLATOR");
QStringList translatorContent;
if (translatorVal != "TRANSLATOR")
{
if (translatorVal != "TRANSLATOR") {
const QStringList translatorList = translatorVal.split('\n');
for (const QString &translatorStr : translatorList)
{
for (const QString &translatorStr : translatorList) {
QStringList translatorStrList = translatorStr.split(',');
QString translatorName = translatorStrList.at(0);
const QString translatorName = translatorStrList.at(0);
translatorStrList.removeFirst();
QString translatorProfile = translatorStrList.join(QString());
if (!translatorProfile.isEmpty())
{
if (!translatorProfile.isEmpty()) {
translatorContent += QString("<a href=\"%1\">%2</a>").arg(translatorProfile, translatorName);
}
else
{
else {
translatorContent += translatorName;
}
}
}

// Project Description
QString projectDes = tr("A project for viewing Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");
const QString projectDes = tr("A project for viewing Grand Theft Auto V Snapmatic<br/>\nPictures and Savegames");

// Copyright Description
QString copyrightDes1 = tr("Copyright &copy; <a href=\"%1\">%2</a> %3");
copyrightDes1 = copyrightDes1.arg(GTA5SYNC_APPVENDORLINK, GTA5SYNC_APPVENDOR, GTA5SYNC_COPYRIGHT);
QString copyrightDes2 = tr("%1 is licensed under <a href=\"https://www.gnu.org/licenses/gpl-3.0.html#content\">GNU GPLv3</a>");
copyrightDes2 = copyrightDes2.arg(GTA5SYNC_APPSTR);
QString copyrightDesA;
if (!translatorContent.isEmpty())
{
if (!translatorContent.isEmpty()) {
copyrightDesA = copyrightDes1 % "<br/>" % translatedByStr.arg(translatorContent.join(", ")) % "<br/>" % copyrightDes2;
}
else
{
else {
copyrightDesA = copyrightDes1 % "<br/>" % copyrightDes2;
}

// Setup User Interface
ui->setupUi(this);
aboutStr = ui->labAbout->text();
titleStr = this->windowTitle();
titleStr = windowTitle();
ui->labAbout->setText(aboutStr.arg(GTA5SYNC_APPSTR, projectDes, appVersion % " (" % buildType % ")", projectBuild, buildStr, qVersion(), copyrightDesA));
this->setWindowTitle(titleStr.arg(GTA5SYNC_APPSTR));
setWindowTitle(titleStr.arg(GTA5SYNC_APPSTR));

// Set Icon for Close Button
if (QIcon::hasThemeIcon("dialog-close"))
{
if (QIcon::hasThemeIcon("dialog-close")) {
ui->cmdClose->setIcon(QIcon::fromTheme("dialog-close"));
}
else if (QIcon::hasThemeIcon("gtk-close"))
{
else if (QIcon::hasThemeIcon("gtk-close")) {
ui->cmdClose->setIcon(QIcon::fromTheme("gtk-close"));
}

// DPI calculation
qreal screenRatio = AppEnv::screenRatio();
if (!translatorContent.isEmpty())
{
if (!translatorContent.isEmpty()) {
resize(375 * screenRatio, 270 * screenRatio);
}
else
{
else {
resize(375 * screenRatio, 260 * screenRatio);
}
}
Expand All @@ -123,13 +114,11 @@ AboutDialog::~AboutDialog()

void AboutDialog::on_labAbout_linkActivated(const QString &link)
{
if (link.left(12) == "g5e://about?")
{
if (link.left(12) == "g5e://about?") {
QStringList aboutStrList = QString(link).remove(0, 12).split(":");
QMessageBox::information(this, QString::fromUtf8(QByteArray::fromBase64(aboutStrList.at(0).toUtf8())), QString::fromUtf8(QByteArray::fromBase64(aboutStrList.at(1).toUtf8())));
}
else
{
else {
QDesktopServices::openUrl(QUrl(link));
}
}
2 changes: 1 addition & 1 deletion AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;span style=&quot; font-weight:600;&quot;&gt;%1&lt;/span&gt;&lt;br/&gt;
<string>&lt;span style=&quot;font-weight:600&quot;&gt;%1&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;
%2&lt;br/&gt;
&lt;br/&gt;
Expand Down
8 changes: 4 additions & 4 deletions PictureDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;span style=&quot; font-weight:600;&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
&lt;span style=&quot; font-weight:600;&quot;&gt;Created: &lt;/span&gt;%8</string>
<string>&lt;span style=&quot;font-weight:600&quot;&gt;Title: &lt;/span&gt;%6&lt;br/&gt;
&lt;span style=&quot;font-weight:600&quot;&gt;Location: &lt;/span&gt;%7 (%1, %2, %3)&lt;br/&gt;
&lt;span style=&quot;font-weight:600&quot;&gt;Players: &lt;/span&gt;%4 (Crew %5)&lt;br/&gt;
&lt;span style=&quot;font-weight:600&quot;&gt;Created: &lt;/span&gt;%8</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down
31 changes: 0 additions & 31 deletions PictureWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
#include <QKeyEvent>
#include <QPixmap>
#include <QEvent>
#if QT_VERSION < 0x060000
#include <QDesktopWidget>
#endif

PictureWidget::PictureWidget(QWidget *parent) : QDialog(parent)
{
Expand All @@ -46,9 +43,6 @@ PictureWidget::PictureWidget(QWidget *parent) : QDialog(parent)

QObject::connect(pictureLabel, SIGNAL(mouseDoubleClicked(Qt::MouseButton)), this, SLOT(pictureDoubleClicked(Qt::MouseButton)));
QObject::connect(pictureLabel, SIGNAL(customContextMenuRequested(QPoint)), parent, SLOT(exportCustomContextMenuRequested(QPoint)));
#if QT_VERSION < 0x060000
QObject::connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(updateWindowSize(int)));
#endif

setLayout(widgetLayout);
}
Expand Down Expand Up @@ -106,28 +100,3 @@ void PictureWidget::setImage(QImage image_)
#endif
pictureLabel->setPixmap(pixmap);
}

void PictureWidget::updateWindowSize(int screenID)
{
#if QT_VERSION >= 0x060000
Q_UNUSED(screenID)
const qreal screenRatioPR = AppEnv::screenRatioPR();
QRect desktopRect = QApplication::screenAt(pos())->geometry();
move(desktopRect.x(), desktopRect.y());
resize(desktopRect.width(), desktopRect.height());
showFullScreen();
QPixmap pixmap = QPixmap::fromImage(image.scaled(geometry().width() * screenRatioPR, geometry().height() * screenRatioPR, Qt::KeepAspectRatio, Qt::SmoothTransformation));
#if QT_VERSION >= 0x050600
pixmap.setDevicePixelRatio(screenRatioPR);
#endif
pictureLabel->setPixmap(pixmap);
#else
if (screenID == QApplication::desktop()->screenNumber(this)) {
QRect desktopRect = QApplication::desktop()->screenGeometry(this);
move(desktopRect.x(), desktopRect.y());
resize(desktopRect.width(), desktopRect.height());
showFullScreen();
pictureLabel->setPixmap(QPixmap::fromImage(image.scaled(desktopRect.width(), desktopRect.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation)));
}
#endif
}
1 change: 0 additions & 1 deletion PictureWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public slots:

private slots:
void pictureDoubleClicked(Qt::MouseButton button);
void updateWindowSize(int screenID);

signals:
void nextPictureRequested();
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Grand Theft Auto V Savegame and Snapmatic viewer/editor

# Note: Install Docker Community Edition and Git before continuing
git clone https://gitlab.com/Syping/gta5view && cd gta5view
docker pull sypingauto/gta5view-build:1.8-static
docker run --rm -v ${PWD}:/gta5view -it sypingauto/gta5view-build:1.8-static
docker pull sypingauto/gta5view-build:1.9-static
docker run --rm -v ${PWD}:/gta5view -it sypingauto/gta5view-build:1.9-static
cd /gta5view && mkdir -p build && cd build
mingw64-qt-cmake ../
make -j $(nproc --all)
Expand Down Expand Up @@ -47,7 +47,3 @@ Grand Theft Auto V Savegame and Snapmatic viewer/editor
cmake ../
make -j $(nproc --all)
sudo make install

#### Download Binary Releases

Go to [gta5view release](https://github.com/SyDevTeam/gta5view/releases) and download the .exe file for Windows, .deb file for Debian/Ubuntu and .dmg file for OS X.
4 changes: 2 additions & 2 deletions SavegameDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>105</height>
<height>112</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -20,7 +20,7 @@
<item>
<widget class="QLabel" name="labSavegameText">
<property name="text">
<string>&lt;span style=&quot; font-weight:600;&quot;&gt;Savegame&lt;/span&gt;&lt;br&gt;&lt;br&gt;%1</string>
<string>&lt;span style=&quot;font-weight:600&quot;&gt;Savegame&lt;/span&gt;&lt;br&gt;&lt;br&gt;%1</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
Expand Down
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#endif

#ifndef GTA5SYNC_APPVENDORLINK
#define GTA5SYNC_APPVENDORLINK "g5e://about?U3lwaW5n:R2l0TGFiOiA8YSBocmVmPSJodHRwczovL2dpdGxhYi5jb20vU3lwaW5nIj5TeXBpbmc8L2E+PGJyLz5HaXRIdWI6IDxhIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS9TeXBpbmciPlN5cGluZzwvYT48YnIvPlNvY2lhbCBDbHViOiA8YSBocmVmPSJodHRwczovL3NvY2lhbGNsdWIucm9ja3N0YXJnYW1lcy5jb20vbWVtYmVyL1N5cGluZy80NjMwMzA1NiI+U3lwaW5nPC9hPg=="
#define GTA5SYNC_APPVENDORLINK "g5e://about?U3lwaW5n:R2l0TGFiOiA8YSBocmVmPSJodHRwczovL2dpdGxhYi5jb20vU3lwaW5nIj5TeXBpbmc8L2E+PGJyLz5HaXRIdWI6IDxhIGhyZWY9Imh0dHBzOi8vZ2l0aHViLmNvbS9TeXBpbmciPlN5cGluZzwvYT48YnIvPlNvY2lhbCBDbHViOiA8YSBocmVmPSJodHRwczovL3NvY2lhbGNsdWIucm9ja3N0YXJnYW1lcy5jb20vbWVtYmVyL1N5cGluZy80NjMwMzA1NiI+U3lwaW5nPC9hPg"
#endif

#ifndef GTA5SYNC_APPSTR
Expand Down
3 changes: 2 additions & 1 deletion res/de.syping.gta5view.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<developer_name>Syping</developer_name>

<releases>
<release date="2020-10-11" version="1.8.0" />
<release date="2020-11-30" version="1.9.0"/>
<release date="2020-10-11" version="1.8.0"/>
</releases>

<screenshots>
Expand Down
Loading

0 comments on commit 5dbc06f

Please sign in to comment.