Revert "Switch to using external pdftops utility to convert pdf to ps on mac."

This reverts commit 4eba1fa673.
This commit is contained in:
Roman Telezhynskyi 2023-09-21 16:31:41 +03:00
parent 6a86463fde
commit 5876813056
6 changed files with 31 additions and 2 deletions

View File

@ -39,7 +39,6 @@
- New option: Pointer mode.
- Fix GUI freezing while nesting.
- New option: Use Tool Groups.
- Switch to using external pdftops utility to convert pdf to ps on mac.
# Valentina 0.7.52 September 12, 2022
- Fix crash when default locale is ru.

BIN
dist/macx/bin64/pdftops vendored Executable file

Binary file not shown.

View File

@ -201,6 +201,16 @@ VToolApp {
qbs.installDir: buildconfig.installBinaryPath
}
Group {
condition: qbs.targetOS.contains("macos") && qbs.architecture.contains("x86_64") && buildconfig.enableMultiBundle
name: "pdftops MacOS"
prefix: project.sourceDirectory + "/dist/macx/bin64/"
files: ["pdftops"]
fileTags: ["pdftops_dist_macx"]
qbs.install: true
qbs.installDir: buildconfig.installBinaryPath
}
Group {
name: "48x48/apps"
prefix: project.sourceDirectory + "/share/icons/48x48/apps/"

View File

@ -304,6 +304,10 @@ unix{
puzzle.path = $$MACOS_DIR
puzzle.files += $${OUT_PWD}/../puzzle/$${DESTDIR}/puzzle.app/$$MACOS_DIR/puzzle
# Utility pdftops need for saving a layout image to PS and EPS formates.
xpdf.path = $$MACOS_DIR
xpdf.files += $${PWD}/../../../dist/macx/bin64/pdftops
# logo on macx.
ICON = ../../../dist/Valentina.icns
@ -342,6 +346,7 @@ unix{
libraries \
tape \
puzzle \
xpdf \
icns_resources
}
}

View File

@ -267,6 +267,15 @@ VToolApp {
qbs.installDir: buildconfig.installBinaryPath
}
Group {
condition: qbs.targetOS.contains("macos") && qbs.architecture.contains("x86_64")
name: "pdftops MacOS"
prefix: project.sourceDirectory + "/dist/macx/bin64/"
files: ["pdftops"]
qbs.install: true
qbs.installDir: buildconfig.installBinaryPath
}
Group {
name: "freedesktop"
prefix: project.sourceDirectory + "/dist/"

View File

@ -405,7 +405,7 @@ void VLayoutExporter::ExportToHPGL2(const QVector<VLayoutPiece> &details) const
auto VLayoutExporter::SupportPDFConversion() -> bool
{
QProcess proc;
#if defined(Q_OS_WIN)
#if defined(Q_OS_WIN) || defined(Q_OS_OSX)
// Seek pdftops in app bundle or near valentina.exe
proc.start(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS, QStringList());
#else
@ -435,7 +435,13 @@ void VLayoutExporter::PdfToPs(const QStringList &params)
#endif
QProcess proc;
#if defined(Q_OS_MAC)
// Fix issue #594. Broken export on Mac.
proc.setWorkingDirectory(qApp->applicationDirPath());
proc.start(QLatin1String("./") + *PDFTOPS, params);
#else
proc.start(*PDFTOPS, params);
#endif
const int timeout = 15000;
if (proc.waitForStarted(timeout))