add ppm2pwg as a submodule

This commit is contained in:
Anton Thomasson 2020-05-01 20:54:33 +02:00
parent 002af8c5f8
commit b705cc28ea
4 changed files with 19 additions and 1 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "ppm2pwg"]
path = ppm2pwg
url = https://github.com/attah/ppm2pwg.git

View file

@ -66,3 +66,14 @@ HEADERS += \
src/ippmsg.h \ src/ippmsg.h \
src/ippprinter.h \ src/ippprinter.h \
src/mimer.h src/mimer.h
QMAKE_EXTRA_TARGETS += PPM2PWG
PRE_TARGETDEPS += PPM2PWG
PPM2PWG.commands = make -C $$PWD/ppm2pwg
PPM2PWG.clean_commands = git submodule foreach git clean -fdxq
PPM2PWG.path = /usr/share/harbour-seaprint/
PPM2PWG.files += $$PWD/ppm2pwg/ppm2pwg
INSTALLS += PPM2PWG
QMAKE_INSTALL_FILE = install -m 755 -p

1
ppm2pwg Submodule

@ -0,0 +1 @@
Subproject commit a3ea2da52a0b8432ba7e6ec59451ae3887b1a111

View file

@ -1,4 +1,5 @@
#include "convertworker.h" #include "convertworker.h"
#include <sailfishapp.h>
void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile) void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile)
{ {
@ -9,7 +10,9 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
QProcess* ppm2pwg = new QProcess(this); QProcess* ppm2pwg = new QProcess(this);
ppm2pwg->setProgram("/home/nemo/repos/pwg/ppm2pwg"); qDebug() << SailfishApp::pathTo("ppm2pwg").toString();
QString Ppm2pwgPath = SailfishApp::pathTo("ppm2pwg").toString().remove("file://");
ppm2pwg->setProgram(Ppm2pwgPath);
QStringList env; // {"PREPEND_FILE="+tempfile->fileName()}; QStringList env; // {"PREPEND_FILE="+tempfile->fileName()};
bool apple = false; bool apple = false;