mirror of
https://gitlab.com/Syping/gta5view-cmd
synced 2024-11-21 13:10:23 +01:00
first version of gta5view-cmd
This commit is contained in:
parent
8d4424516d
commit
6746a70e65
4 changed files with 118 additions and 0 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "gta5sync"]
|
||||||
|
path = gta5sync
|
||||||
|
url = https://github.com/Syping/gta5sync
|
1
gta5sync
Submodule
1
gta5sync
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b19086213669e3650e141e816d0a5b25588f02f5
|
60
gta5view-cmd.pro
Normal file
60
gta5view-cmd.pro
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#/*****************************************************************************
|
||||||
|
#* gta5view-cmd - gta5view Command Line
|
||||||
|
#* Copyright (C) 2017 Syping
|
||||||
|
#*
|
||||||
|
#* This program is free software: you can redistribute it and/or modify
|
||||||
|
#* it under the terms of the GNU General Public License as published by
|
||||||
|
#* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
#* (at your option) any later version.
|
||||||
|
#*
|
||||||
|
#* This program is distributed in the hope that it will be useful,
|
||||||
|
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
#* GNU General Public License for more details.
|
||||||
|
#*
|
||||||
|
#* You should have received a copy of the GNU General Public License
|
||||||
|
#* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#*****************************************************************************/
|
||||||
|
|
||||||
|
QT += gui
|
||||||
|
|
||||||
|
DEPLOYMENT.display_name = gta5view-cmd
|
||||||
|
TARGET = gta5view-cmd
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
SOURCES += main.cpp \
|
||||||
|
gta5sync/SnapmaticPicture.cpp \
|
||||||
|
gta5sync/StringParser.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
gta5sync/SnapmaticPicture.h \
|
||||||
|
gta5sync/StringParser.h
|
||||||
|
|
||||||
|
INCLUDEPATH += ./gta5sync
|
||||||
|
|
||||||
|
# WINDOWS ONLY
|
||||||
|
|
||||||
|
win32: DEFINES += GTA5SYNC_WIN GTA5VIEW_CMD
|
||||||
|
# win32: RC_FILE += res/app.rc
|
||||||
|
win32: LIBS += -luser32
|
||||||
|
win32: CONFIG -= embed_manifest_exe
|
||||||
|
|
||||||
|
# QT4 ONLY STUFF
|
||||||
|
|
||||||
|
isEqual(QT_MAJOR_VERSION, 4): INCLUDEPATH += ./gta5sync/qjson4
|
||||||
|
isEqual(QT_MAJOR_VERSION, 4): HEADERS += gta5sync/qjson4/QJsonArray.h \
|
||||||
|
gta5sync/qjson4/QJsonDocument.h \
|
||||||
|
gta5sync/qjson4/QJsonObject.h \
|
||||||
|
gta5sync/qjson4/QJsonParseError.h \
|
||||||
|
gta5sync/qjson4/QJsonValue.h \
|
||||||
|
gta5sync/qjson4/QJsonValueRef.h \
|
||||||
|
gta5sync/qjson4/QJsonParser.h \
|
||||||
|
gta5sync/qjson4/QJsonRoot.h
|
||||||
|
|
||||||
|
isEqual(QT_MAJOR_VERSION, 4): SOURCES += gta5sync/qjson4/QJsonArray.cpp \
|
||||||
|
gta5sync/qjson4/QJsonDocument.cpp \
|
||||||
|
gta5sync/qjson4/QJsonObject.cpp \
|
||||||
|
gta5sync/qjson4/QJsonParseError.cpp \
|
||||||
|
gta5sync/qjson4/QJsonValue.cpp \
|
||||||
|
gta5sync/qjson4/QJsonValueRef.cpp \
|
||||||
|
gta5sync/qjson4/QJsonParser.cpp
|
54
main.cpp
Normal file
54
main.cpp
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*****************************************************************************
|
||||||
|
* gta5view-cmd - gta5view Command Line
|
||||||
|
* Copyright (C) 2017 Syping
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "SnapmaticPicture.h"
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QCoreApplication a(argc, argv);
|
||||||
|
QStringList args = a.arguments();
|
||||||
|
|
||||||
|
if (args.length() == 3)
|
||||||
|
{
|
||||||
|
SnapmaticPicture picture(args.at(1));
|
||||||
|
if (picture.readingPicture(true, false, true))
|
||||||
|
{
|
||||||
|
if (!picture.exportPicture(args.at(2), "JPG"))
|
||||||
|
{
|
||||||
|
cout << "gta5view-cmd: Exporting of " << args.at(1).toStdString().c_str() << " to " << args.at(2).toStdString().c_str() << " failed!" << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "gta5view-cmd: Reading of " << args.at(1).toStdString().c_str() << " failed!" << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "Usage: " << args.at(0).toStdString().c_str() << " source target" << endl;
|
||||||
|
return 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue