Skip to content

Commit

Permalink
gta5view 1.8.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Syping committed Oct 11, 2020
1 parent 678425a commit 1fbe4d9
Show file tree
Hide file tree
Showing 27 changed files with 1,636 additions and 1,631 deletions.
4 changes: 2 additions & 2 deletions .ci/windows_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export GTA5VIEW_EXECUTABLE=gta5view-${EXECUTABLE_VERSION}${EXECUTABLE_ARCH}.exe
if [ "${PACKAGE_CODE}" == "gta5-mods" ]; then
${PROJECT_DIR}/.ci/dropbox_uploader.sh mkdir gta5-mods/${PACKAGE_VERSION}
${PROJECT_DIR}/.ci/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gta5-mods/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
rm -rf ${GTA5VIEW_EXECUTABLE}
rm -rf ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE}
elif [ "${PACKAGE_CODE}" == "gtainside" ]; then
${PROJECT_DIR}/.ci/dropbox_uploader.sh mkdir gtainside/${PACKAGE_VERSION}
${PROJECT_DIR}/.ci/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gtainside/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
rm -rf ${GTA5VIEW_EXECUTABLE}
rm -rf ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE}
fi
1 change: 0 additions & 1 deletion .ci/wininstall_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ x86_64-w64-mingw32-strip -s gta5view.exe && \
cd ${PROJECT_DIR}/assets && \
makensis -NOCD ${PROJECT_DIR}/.ci/gta5view.nsi && \
mv -f gta5view_setup.exe gta5view-${EXECUTABLE_VERSION}_setup.exe

13 changes: 12 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: pipeline
type: docker

environment:
BUILD_TYPE: "RC"
BUILD_TYPE: "REL"

steps:
- name: Windows Installer
Expand All @@ -14,6 +14,9 @@ steps:
from_secret: tca_pass
commands:
- .drone/drone.sh
volumes:
- name: gta5view
path: /srv/gta5view
- name: Windows Portable
image: sypingauto/gta5view-build:1.8-static
environment:
Expand All @@ -23,3 +26,11 @@ steps:
from_secret: tca_pass
commands:
- .drone/drone.sh
volumes:
- name: gta5view
path: /srv/gta5view

volumes:
- name: gta5view
host:
path: /srv/gta5view
5 changes: 3 additions & 2 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fi
# Init Application Commit Hash
export APPLICATION_COMMIT=$(git rev-parse --short HEAD)

# Start CI script and copying assets into base directory
# Start CI script and copying assets into gta5view directory
.ci/ci.sh && \
cp -Rf assets/* ./
mkdir -p /srv/gta5view/${APPLICATION_COMMIT} && \
cp -Rf assets/* /srv/gta5view/${APPLICATION_COMMIT}/
2 changes: 1 addition & 1 deletion .flatpak/de.syping.gta5view.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: de.syping.gta5view
runtime: org.kde.Platform
runtime-version: '5.14'
runtime-version: '5.15'
sdk: org.kde.Sdk
command: gta5view
finish-args:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stages:
- build

variables:
BUILD_TYPE: "RC"
BUILD_TYPE: "REL"

Windows Installer:
stage: build
Expand Down
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: trusty
dist: bionic
sudo: required

language: cpp
Expand All @@ -8,7 +8,7 @@ service:

env:
global:
- BUILD_TYPE=RC
- BUILD_TYPE=REL

matrix:
include:
Expand All @@ -27,6 +27,11 @@ matrix:
- QT_SELECT=qt5-x86_64-w64-mingw32
- RELEASE_LABEL="Windows 64-Bit Portable for gta5-mods"
- PACKAGE_CODE=gta5-mods
- env:
- BUILD_SCRIPT=windows_docker.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
- RELEASE_LABEL="Windows 64-Bit Portable for gtainside"
- PACKAGE_CODE=gtainside
- env:
- BUILD_SCRIPT=wininstall_docker.sh
- QT_SELECT=qt5-x86_64-w64-mingw32
Expand Down
24 changes: 24 additions & 0 deletions MapLocationDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ void MapLocationDialog::on_cmdDone_clicked()
changeMode = false;
}

#if QT_VERSION >= 0x060000
void MapLocationDialog::updatePosFromEvent(double x, double y)
{
QSize mapPixelSize = size();
double xpos_ad = x;
double ypos_ad = mapPixelSize.height() - y;
double xrat = 10000 / (double)mapPixelSize.width();
double yrat = 12000 / (double)mapPixelSize.height();
double xpos_rv = xrat * xpos_ad;
double ypos_rv = yrat * ypos_ad;
double xpos_fp = xpos_rv - 4000;
double ypos_fp = ypos_rv - 4000;
drawPointOnMap(xpos_fp, ypos_fp);
}
#else
void MapLocationDialog::updatePosFromEvent(int x, int y)
{
QSize mapPixelSize = size();
Expand All @@ -108,6 +123,7 @@ void MapLocationDialog::updatePosFromEvent(int x, int y)
double ypos_fp = ypos_rv - 4000;
drawPointOnMap(xpos_fp, ypos_fp);
}
#endif

void MapLocationDialog::paintEvent(QPaintEvent *ev)
{
Expand Down Expand Up @@ -156,7 +172,11 @@ void MapLocationDialog::mouseMoveEvent(QMouseEvent *ev)
if (!changeMode) { ev->ignore(); }
else if (ev->buttons() & Qt::LeftButton)
{
#if QT_VERSION >= 0x060000
updatePosFromEvent(ev->position().x(), ev->position().y());
#else
updatePosFromEvent(ev->x(), ev->y());
#endif
ev->accept();
}
else
Expand All @@ -170,7 +190,11 @@ void MapLocationDialog::mouseReleaseEvent(QMouseEvent *ev)
if (!changeMode) { ev->ignore(); }
else if (ev->button() == Qt::LeftButton)
{
#if QT_VERSION >= 0x060000
updatePosFromEvent(ev->position().x(), ev->position().y());
#else
updatePosFromEvent(ev->x(), ev->y());
#endif
ev->accept();
}
else
Expand Down
4 changes: 4 additions & 0 deletions MapLocationDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ private slots:
void on_cmdApply_clicked();
void on_cmdChange_clicked();
void on_cmdRevert_clicked();
#if QT_VERSION >= 0x060000
void updatePosFromEvent(double x, double y);
#else
void updatePosFromEvent(int x, int y);
#endif
void on_cmdClose_clicked();

private:
Expand Down
16 changes: 2 additions & 14 deletions ProfileInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,7 @@ void ProfileInterface::insertSnapmaticIPI(QWidget *widget)
QStringList widgetsKeyList = widgets.values();
QStringList pictureKeyList = widgetsKeyList.filter("PIC", Qt::CaseSensitive);
#if QT_VERSION >= 0x050600
#if QT_VERSION >= 0x050F00
std::sort(pictureKeyList.rbegin(), pictureKeyList.rend());
#else
qSort(pictureKeyList.rbegin(), pictureKeyList.rend());
#endif
#else
qSort(pictureKeyList.begin(), pictureKeyList.end(), qGreater<QString>());
#endif
Expand All @@ -287,7 +283,7 @@ void ProfileInterface::insertSavegameIPI(QWidget *widget)
QString widgetKey = widgets[proWidget];
QStringList widgetsKeyList = widgets.values();
QStringList savegameKeyList = widgetsKeyList.filter("SGD", Qt::CaseSensitive);
#if QT_VERSION >= 0x050F00
#if QT_VERSION >= 0x050600
std::sort(savegameKeyList.begin(), savegameKeyList.end());
#else
qSort(savegameKeyList.begin(), savegameKeyList.end());
Expand All @@ -310,11 +306,7 @@ void ProfileInterface::dialogNextPictureRequested(QWidget *dialog)
QStringList widgetsKeyList = widgets.values();
QStringList pictureKeyList = widgetsKeyList.filter("PIC", Qt::CaseSensitive);
#if QT_VERSION >= 0x050600
#if QT_VERSION >= 0x050F00
std::sort(pictureKeyList.rbegin(), pictureKeyList.rend());
#else
qSort(pictureKeyList.rbegin(), pictureKeyList.rend());
#endif
#else
qSort(pictureKeyList.begin(), pictureKeyList.end(), qGreater<QString>());
#endif
Expand Down Expand Up @@ -349,11 +341,7 @@ void ProfileInterface::dialogPreviousPictureRequested(QWidget *dialog)
QStringList widgetsKeyList = widgets.values();
QStringList pictureKeyList = widgetsKeyList.filter("PIC", Qt::CaseSensitive);
#if QT_VERSION >= 0x050600
#if QT_VERSION >= 0x050F00
std::sort(pictureKeyList.rbegin(), pictureKeyList.rend());
#else
qSort(pictureKeyList.rbegin(), pictureKeyList.rend());
#endif
#else
qSort(pictureKeyList.begin(), pictureKeyList.end(), qGreater<QString>());
#endif
Expand Down Expand Up @@ -385,7 +373,7 @@ void ProfileInterface::sortingProfileInterface()

QStringList widgetsKeyList = widgets.values();

#if QT_VERSION >= 0x050F00
#if QT_VERSION >= 0x050600
std::sort(widgetsKeyList.begin(), widgetsKeyList.end());
#else
qSort(widgetsKeyList.begin(), widgetsKeyList.end());
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Grand Theft Auto V Savegame and Snapmatic viewer/editor
- View Snapmatics with the ability to disable them in-game
- Edit Snapmatic pictures and properties in multiple ways
- Import/Export Snapmatics, Savegames and pictures
- Let choose between multiple Social Club accounts as GTA V profiles IDs
- Choose between multiple Social Club accounts as GTA V profiles IDs

#### Screenshots
![Snapmatic Picture Viewer](res/src/picture.png)
Expand Down
1 change: 1 addition & 0 deletions SnapmaticPicture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,7 @@ QString SnapmaticPicture::parseTitleString(const QByteArray &commitBytes, int ma
#if QT_VERSION >= 0x060000
QStringDecoder strDecoder = QStringDecoder(QStringDecoder::Utf16LE);
QString retStr = strDecoder(commitBytes);
retStr = retStr.trimmed();
#else
QString retStr = QTextCodec::codecForName("UTF-16LE")->toUnicode(commitBytes).trimmed();
#endif
Expand Down
12 changes: 8 additions & 4 deletions StringParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ QString StringParser::escapeString(const QString &toEscape)
QString StringParser::convertBuildedString(const QString &buildedStr)
{
QString outputStr = buildedStr;
QByteArray sharePath = GTA5SYNC_SHARE;
outputStr.replace("APPNAME:", GTA5SYNC_APPSTR);
outputStr.replace("SHAREDDIR:", QString::fromUtf8(sharePath));
outputStr.replace("RUNDIR:", QFileInfo(qApp->applicationFilePath()).absoluteDir().absolutePath());
outputStr.replace("APPNAME:", QString::fromUtf8(GTA5SYNC_APPSTR));
outputStr.replace("SHAREDDIR:", QString::fromUtf8(GTA5SYNC_SHARE));
outputStr.replace("RUNDIR:", QFileInfo(QApplication::applicationFilePath()).canonicalPath());
#if QT_VERSION >= 0x060000
outputStr.replace("QCONFLANG:", QLibraryInfo::path(QLibraryInfo::TranslationsPath));
outputStr.replace("QCONFPLUG:", QLibraryInfo::path(QLibraryInfo::PluginsPath));
#else
outputStr.replace("QCONFLANG:", QLibraryInfo::location(QLibraryInfo::TranslationsPath));
outputStr.replace("QCONFPLUG:", QLibraryInfo::location(QLibraryInfo::PluginsPath));
#endif
outputStr.replace("SEPARATOR:", QDir::separator());
return outputStr;
}
Expand Down
Loading

0 comments on commit 1fbe4d9

Please sign in to comment.