Minor changes and MimeType support
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Syping 2021-05-27 02:28:41 +02:00
parent f4b4450f69
commit 4a293b6acd
11 changed files with 60 additions and 50 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Install packages
.ci/debian_install.sh && \

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ "${DOCKER_USER}" != "" ]; then
DOCKER_IMAGE=${DOCKER_USER}/debian:${DEBIAN_VERSION}

View File

@ -5,7 +5,7 @@
!define WEB_SITE "https://gta5view.syping.de/"
!define VERSION "1.10.0.0"
!define COPYRIGHT "Copyright © 2016-2021 Syping"
!define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
!define DESCRIPTION "Open Source Snapmatic and Savegame viewer/editor for GTA V"
!define INSTALLER_NAME "gta5view_setup.exe"
!define MAIN_APP_EXE "gta5view.exe"
!define INSTALL_TYPE "SetShellVarContext all"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
DOCKER_IMAGE=sypingauto/gta5view-build:1.10-static
PROJECT_DIR_DOCKER=/gta5view

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
DOCKER_IMAGE=sypingauto/gta5view-build:1.10-shared
PROJECT_DIR_DOCKER=/gta5view

View File

@ -365,6 +365,7 @@ target_link_libraries(gta5view PRIVATE Qt${QT_VERSION_MAJOR}::Network Qt${QT_VER
install(TARGETS gta5view DESTINATION bin)
install(FILES res/de.syping.gta5view.desktop DESTINATION share/applications)
install(FILES res/de.syping.gta5view.metainfo.xml DESTINATION share/metainfo)
install(FILES res/de.syping.gta5view.xml DESTINATION share/mime/packages)
install(FILES res/gta5view-16.png DESTINATION share/icons/hicolor/16x16/apps RENAME de.syping.gta5view.png)
install(FILES res/gta5view-24.png DESTINATION share/icons/hicolor/24x24/apps RENAME de.syping.gta5view.png)
install(FILES res/gta5view-32.png DESTINATION share/icons/hicolor/32x32/apps RENAME de.syping.gta5view.png)
@ -374,7 +375,6 @@ install(FILES res/gta5view-96.png DESTINATION share/icons/hicolor/96x96/apps REN
install(FILES res/gta5view-128.png DESTINATION share/icons/hicolor/128x128/apps RENAME de.syping.gta5view.png)
install(FILES res/gta5view-256.png DESTINATION share/icons/hicolor/256x256/apps RENAME de.syping.gta5view.png)
install(FILES res/gta5view-512.png DESTINATION share/icons/hicolor/512x512/apps RENAME de.syping.gta5view.png)
install(FILES res/de.syping.gta5view.png DESTINATION share/pixmaps)
if(QCONF_BUILD)
include(res/img.cmake)
install(FILES ${GTA5VIEW_IMGFILES} DESTINATION share/gta5view/resources)

View File

@ -266,11 +266,13 @@ void ProfileInterface::loadingProgress(int value, int maximum)
void ProfileInterface::directoryChanged(const QString &path)
{
Q_UNUSED(path)
QDir dir(profileFolder);
QVector<QString> t_savegameFiles;
QVector<QString> t_snapmaticPics;
QVector<QString> n_savegameFiles;
QVector<QString> n_snapmaticPics;
const QStringList files = dir.entryList(QDir::Files);
for (const QString &fileName : files) {
if (fileName.startsWith("SGTA5") && !fileName.endsWith(".bak")) {
@ -290,10 +292,7 @@ void ProfileInterface::directoryChanged(const QString &path)
snapmaticPics = t_snapmaticPics;
if (!n_savegameFiles.isEmpty() || !n_snapmaticPics.isEmpty()) {
QEventLoop loop;
QTimer::singleShot(1000, &loop, SLOT(quit()));
loop.exec();
QTimer::singleShot(1000, this, [=](){
for (const QString &fileName : qAsConst(n_savegameFiles)) {
const QString filePath = profileFolder % "/" % fileName;
SavegameData *savegame = new SavegameData(filePath);
@ -310,6 +309,7 @@ void ProfileInterface::directoryChanged(const QString &path)
else
delete picture;
}
});
}
}
@ -318,7 +318,7 @@ void ProfileInterface::directoryScanned(QVector<QString> savegameFiles_s, QVecto
savegameFiles = savegameFiles_s;
snapmaticPics = snapmaticPics_s;
fileSystemWatcher.addPath(profileFolder);
QObject::connect(&fileSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(directoryChanged(QString)));
QObject::connect(&fileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &ProfileInterface::directoryChanged);
}
#endif

View File

@ -1,5 +1,5 @@
## gta5view
Grand Theft Auto V Savegame and Snapmatic viewer/editor
Open Source Snapmatic and Savegame viewer/editor for GTA V
- View Snapmatics with the ability to disable them in-game
- Edit Snapmatic pictures and properties in multiple ways

View File

@ -4,8 +4,9 @@ Name=gta5view
Comment=Open and edit GTA V profiles
Comment[de]=GTA V Profile öffnen und bearbeiten
Comment[ru]=Просмотрщик и редактор профилей GTA V
Categories=Qt;Utility;FileTools
Exec=gta5view
Comment[zh_TW]=打開與編輯 GTA V 個人檔案
Categories=Qt;Utility;FileTools;
TryExec=gta5view
Exec=gta5view %f
Icon=de.syping.gta5view
Terminal=false
StartupNotify=false
MimeType=application/x-gta5view-export;

View File

@ -11,11 +11,12 @@
<summary>Open and edit GTA V profiles</summary>
<summary xml:lang="de">GTA V Profile öffnen und bearbeiten</summary>
<summary xml:lang="ru">Просмотрщик и редактор профилей GTA V</summary>
<summary xml:lang="zh-TW">打開與編輯 GTA V 個人檔案</summary>
<icon type="remote">https://img.syping.de/gta5view/gta5view.png</icon>
<description>
<p>Open Source Snapmatic picture and Savegame viewer/editor for GTA V</p>
<p>Open Source Snapmatic and Savegame viewer/editor for GTA V</p>
<p>Features</p>
<ul>
<li>View Snapmatics with the ability to disable them in-game</li>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-gta5view-export">
<comment>gta5view Export</comment>
<glob pattern="*.g5e"/>
<generic-icon name="de.syping.gta5view"/>
</mime-type>
</mime-info>