mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
No commits in common. "fc13414011a9d5fe561de9e210fb0b1fb1b022f6" and "2c0035bb2f0811030fbb7ab2877759f4a9fd5e0d" have entirely different histories.
fc13414011
...
2c0035bb2f
13
.cirrus.yml
13
.cirrus.yml
|
@ -229,13 +229,14 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
||||||
# This won't display anything secret.
|
# This won't display anything secret.
|
||||||
- security find-identity -v -p codesigning
|
- security find-identity -v -p codesigning
|
||||||
- brew update > /dev/null
|
- brew update > /dev/null
|
||||||
- brew install qt6 coreutils ccache qbs cmake ninja git openssl@1.1 pkg-config poppler
|
- brew outdated
|
||||||
|
- brew install --force qt6 coreutils ccache qbs cmake git openssl@1.1 pkg-config
|
||||||
|
- brew upgrade qt6 coreutils ccache qbs cmake git openssl@1.1 pkg-config
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- chmod -R 755 /opt/homebrew/opt/qt6/*
|
- chmod -R 755 /opt/homebrew/opt/qt6/*
|
||||||
- chmod -R 755 /opt/homebrew/opt/openssl@1.1/*
|
- chmod -R 755 /opt/homebrew/opt/openssl@1.1/*
|
||||||
- chmod -R 755 /opt/homebrew/opt/poppler/*
|
|
||||||
- python3 --version
|
- python3 --version
|
||||||
- pip3 install --user --upgrade pip dropbox conan==1.60
|
- pip3 install --user --upgrade pip dropbox conan==1.60
|
||||||
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
||||||
|
@ -256,10 +257,6 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
||||||
- sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python
|
- sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python
|
||||||
- whereis python
|
- whereis python
|
||||||
- pwd
|
- pwd
|
||||||
- curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
|
|
||||||
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}/macdeployqt-main
|
|
||||||
- cmake ${HOME}/macdeployqt-main -GNinja -S ${HOME}/macdeployqt-main -B ${HOME}/macdeployqt-build-dir -DCMAKE_INSTALL_PREFIX=${HOME}/macdeployqt-install-dir -DCMAKE_BUILD_TYPE=Release
|
|
||||||
- cmake ${HOME}/macdeployqt-main --build ${HOME}/macdeployqt-build-dir --target install
|
|
||||||
- conan profile new valentina
|
- conan profile new valentina
|
||||||
- conan profile update settings.build_type=Release valentina
|
- conan profile update settings.build_type=Release valentina
|
||||||
- conan profile update settings.os=Macos valentina
|
- conan profile update settings.os=Macos valentina
|
||||||
|
@ -274,8 +271,8 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
||||||
- qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6
|
- qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6
|
||||||
- qbs-config defaultProfile qt6
|
- qbs-config defaultProfile qt6
|
||||||
- qbs config profiles.qt6.baseProfile clang
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME"
|
||||||
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME"
|
||||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||||
# from blocking the CI
|
# from blocking the CI
|
||||||
- echo "Create keychain profile"
|
- echo "Create keychain profile"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
- New option: Pointer mode.
|
- New option: Pointer mode.
|
||||||
- Fix GUI freezing while nesting.
|
- Fix GUI freezing while nesting.
|
||||||
- New option: Use Tool Groups.
|
- 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
|
# Valentina 0.7.52 September 12, 2022
|
||||||
- Fix crash when default locale is ru.
|
- Fix crash when default locale is ru.
|
||||||
|
|
13
appveyor.yml
13
appveyor.yml
|
@ -693,7 +693,7 @@ for:
|
||||||
python3 ./scripts/treestate.py scan /usr/local usrlocal.json
|
python3 ./scripts/treestate.py scan /usr/local usrlocal.json
|
||||||
|
|
||||||
brew update
|
brew update
|
||||||
brew install coreutils ccache git openssl@1.1 pkg-config qbs curl cmake ninja poppler
|
brew install coreutils ccache git openssl@1.1 pkg-config qbs
|
||||||
|
|
||||||
# The build environment is now ready for use. We can complete
|
# The build environment is now ready for use. We can complete
|
||||||
# the rest of the process of creating the Homebrew archive
|
# the rest of the process of creating the Homebrew archive
|
||||||
|
@ -717,23 +717,18 @@ for:
|
||||||
fi
|
fi
|
||||||
- sudo python3 -m pip install --upgrade pip
|
- sudo python3 -m pip install --upgrade pip
|
||||||
- pip3 install --user --upgrade pip dropbox conan==1.60
|
- pip3 install --user --upgrade pip dropbox conan==1.60
|
||||||
- export PATH="$PATH:`python3 -m site --user-base`/bin"
|
- export PATH="`python3 -m site --user-base`/bin:$PATH"
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- python3 --version
|
- python3 --version
|
||||||
- conan --version
|
- conan --version
|
||||||
- clang --version
|
- clang --version
|
||||||
- qmake --version
|
- qmake --version
|
||||||
- which qmake
|
- which qmake
|
||||||
- which qbs
|
|
||||||
- qbs --version
|
- qbs --version
|
||||||
# Patch Qbs. Remove after Qbs 2.1.2+.
|
# Patch Qbs. Remove after Qbs 2.1.2+.
|
||||||
- curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
|
- curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
|
||||||
- cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs
|
- cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs
|
||||||
- rm $HOME/BundleModule.qbs
|
- rm $HOME/BundleModule.qbs
|
||||||
- curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
|
|
||||||
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}/macdeployqt-main
|
|
||||||
- cmake ${HOME}/macdeployqt-main -GNinja -S ${HOME}/macdeployqt-main -B ${HOME}/macdeployqt-build-dir -DCMAKE_INSTALL_PREFIX=${HOME}/macdeployqt-install-dir -DCMAKE_BUILD_TYPE=Release
|
|
||||||
- cmake ${HOME}/macdeployqt-main --build ${HOME}/macdeployqt-build-dir --target install
|
|
||||||
- cd ${APPVEYOR_BUILD_FOLDER}
|
- cd ${APPVEYOR_BUILD_FOLDER}
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
|
@ -744,8 +739,8 @@ for:
|
||||||
- qbs setup-qt ${QTDIR}/bin/qmake qt6
|
- qbs setup-qt ${QTDIR}/bin/qmake qt6
|
||||||
- qbs config defaultProfile qt6
|
- qbs config defaultProfile qt6
|
||||||
- qbs config profiles.qt6.baseProfile clang
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME"
|
||||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME"
|
||||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||||
# from blocking the CI
|
# from blocking the CI
|
||||||
- echo "Create keychain profile"
|
- echo "Create keychain profile"
|
||||||
|
|
BIN
dist/macx/bin64/pdftops
vendored
BIN
dist/macx/bin64/pdftops
vendored
Binary file not shown.
|
@ -123,9 +123,4 @@ CppApplication {
|
||||||
}
|
}
|
||||||
fileTags: ["cpp_pch_src"]
|
fileTags: ["cpp_pch_src"]
|
||||||
}
|
}
|
||||||
|
|
||||||
Export {
|
|
||||||
Depends { name: "bundle"; condition: qbs.targetOS.contains("macos") }
|
|
||||||
Depends { name: "macdeployqt"; condition: qbs.targetOS.contains("macos") }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ VApp {
|
||||||
Depends { name: "i18nconfig"; }
|
Depends { name: "i18nconfig"; }
|
||||||
Depends { name: "i18n"; }
|
Depends { name: "i18n"; }
|
||||||
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
|
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
|
||||||
|
Depends { name: "macdeployqt"; condition: qbs.targetOS.contains("macos") }
|
||||||
|
|
||||||
version: buildconfig.projectVersion
|
version: buildconfig.projectVersion
|
||||||
install: true
|
install: true
|
||||||
|
@ -203,6 +204,7 @@ VApp {
|
||||||
Properties {
|
Properties {
|
||||||
condition: qbs.targetOS.contains("macos")
|
condition: qbs.targetOS.contains("macos")
|
||||||
ib.appIconName: targetName
|
ib.appIconName: targetName
|
||||||
|
macdeployqt.targetApps: ["Tape", "Puzzle"]
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
|
|
|
@ -14,8 +14,6 @@ Module {
|
||||||
|
|
||||||
property string macdeployqtArtifact: artifacts ? "maceployqt.txt" : undefined
|
property string macdeployqtArtifact: artifacts ? "maceployqt.txt" : undefined
|
||||||
|
|
||||||
property string macdeployqtProgramBinPath : undefined
|
|
||||||
|
|
||||||
property string macdeployqtProgram: "macdeployqt"
|
property string macdeployqtProgram: "macdeployqt"
|
||||||
|
|
||||||
property bool noPlugins: false
|
property bool noPlugins: false
|
||||||
|
@ -30,7 +28,7 @@ Module {
|
||||||
|
|
||||||
property bool appstoreCompliant: false
|
property bool appstoreCompliant: false
|
||||||
|
|
||||||
property stringList libpath: undefined
|
property string libpath: undefined
|
||||||
|
|
||||||
property stringList targetApps: undefined
|
property stringList targetApps: undefined
|
||||||
|
|
||||||
|
@ -65,7 +63,7 @@ Module {
|
||||||
cmdArgs.push("-no-plugins");
|
cmdArgs.push("-no-plugins");
|
||||||
|
|
||||||
if (product.macdeployqt.verbose !== undefined)
|
if (product.macdeployqt.verbose !== undefined)
|
||||||
cmdArgs.push("-verbose=" + product.macdeployqt.verbose);
|
cmdArgs.push("-verbose", product.macdeployqt.verbose);
|
||||||
|
|
||||||
if (product.macdeployqt.noStrip)
|
if (product.macdeployqt.noStrip)
|
||||||
cmdArgs.push("-no-strip");
|
cmdArgs.push("-no-strip");
|
||||||
|
@ -80,9 +78,7 @@ Module {
|
||||||
cmdArgs.push("-appstore-compliant");
|
cmdArgs.push("-appstore-compliant");
|
||||||
|
|
||||||
if (product.macdeployqt.libpath !== undefined)
|
if (product.macdeployqt.libpath !== undefined)
|
||||||
product.macdeployqt.libpath.forEach(function(libpath) {
|
cmdArgs.push("-libpath", product.macdeployqt.libpath);
|
||||||
cmdArgs.push("-libpath=" + libpath);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (product.buildconfig.enableCodeSigning) {
|
if (product.buildconfig.enableCodeSigning) {
|
||||||
if (product.macdeployqt.signForNotarization)
|
if (product.macdeployqt.signForNotarization)
|
||||||
|
@ -91,18 +87,14 @@ Module {
|
||||||
cmdArgs.push("-codesign=" + product.macdeployqt.signingIdentity);
|
cmdArgs.push("-codesign=" + product.macdeployqt.signingIdentity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (product.macdeployqt.targetApps !== undefined)
|
if (product.macdeployqt.targetApps !== undefined && !product.buildconfig.enableMultiBundle && product.primaryApp)
|
||||||
{
|
{
|
||||||
product.macdeployqt.targetApps.forEach(function(targetApp) {
|
product.macdeployqt.targetApps.forEach(function(targetApp) {
|
||||||
cmdArgs.push("-executable=" + FileInfo.joinPaths(installRoot, product.targetName + ".app", "Contents", "MacOS", targetApp));
|
cmdArgs.push("-executable=\"" + installRoot + "/" + product.targetName + ".app/Contents/MacOS/" + targetApp + "\"");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var macdeployqtProgramBinPath = product.Qt.core.binPath;
|
var cmd = new Command(product.Qt.core.binPath + "/" + macdeployqtProgram, cmdArgs);
|
||||||
if (product.macdeployqt.macdeployqtProgramBinPath !== undefined)
|
|
||||||
macdeployqtProgramBinPath = product.macdeployqt.macdeployqtProgramBinPath;
|
|
||||||
|
|
||||||
var cmd = new Command(macdeployqtProgramBinPath + "/" + macdeployqtProgram, cmdArgs);
|
|
||||||
cmd.jobPool = "macdeployqt";
|
cmd.jobPool = "macdeployqt";
|
||||||
cmd.description = "invoking '" + macdeployqtProgram;
|
cmd.description = "invoking '" + macdeployqtProgram;
|
||||||
cmd.stdoutFilePath = product.buildDirectory + "/" + product.macdeployqt.macdeployqtArtifact;
|
cmd.stdoutFilePath = product.buildDirectory + "/" + product.macdeployqt.macdeployqtArtifact;
|
||||||
|
|
|
@ -70,7 +70,7 @@ Module {
|
||||||
Rule {
|
Rule {
|
||||||
// alwaysRun: true
|
// alwaysRun: true
|
||||||
condition: product.qbs.targetOS.contains("macos") && !product.buildconfig.enableMultiBundle && product.type.contains("application")
|
condition: product.qbs.targetOS.contains("macos") && !product.buildconfig.enableMultiBundle && product.type.contains("application")
|
||||||
inputs: ["bundle.application-executable"]
|
inputs: ["application"]
|
||||||
outputFileTags: ["multibundle"]
|
outputFileTags: ["multibundle"]
|
||||||
outputArtifacts: {
|
outputArtifacts: {
|
||||||
var artifactNames = [];
|
var artifactNames = [];
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
import qbs.Process
|
|
||||||
import qbs.File
|
|
||||||
import qbs.FileInfo
|
|
||||||
import qbs.Utilities
|
|
||||||
|
|
||||||
Module {
|
|
||||||
|
|
||||||
additionalProductTypes: ["pdftops.bundled"]
|
|
||||||
|
|
||||||
readonly property string pdftopsPath: pdftopsProbe.path
|
|
||||||
readonly property bool pdftopsPresent: pdftopsProbe.found
|
|
||||||
|
|
||||||
Probe {
|
|
||||||
id: pdftopsProbe
|
|
||||||
|
|
||||||
property string path
|
|
||||||
property string sourceDirectory: project.sourceDirectory
|
|
||||||
property string qtVersion: product.Qt.core.version
|
|
||||||
|
|
||||||
configure: {
|
|
||||||
if (Utilities.versionCompare(qtVersion, "6") >= 0) {
|
|
||||||
var detector = new Process();
|
|
||||||
try {
|
|
||||||
if (detector.exec("which", ["pdftops"]) === 0) {
|
|
||||||
var binPath = detector.readStdOut().trim(); // we can read only one time
|
|
||||||
if (detector.exec("realpath", [binPath]) === 0) {
|
|
||||||
path = detector.readStdOut().trim();
|
|
||||||
console.info("Found pdftops at '" + path + "'.");
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
detector.close();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
var binPath = sourceDirectory + "/dist/macx/bin64/pdftops";
|
|
||||||
if (product.qbs.architecture.contains("x86_64") && File.exists(binPath)) {
|
|
||||||
path = binPath;
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rule {
|
|
||||||
multiplex: true
|
|
||||||
inputs: ["pdftops.in"]
|
|
||||||
|
|
||||||
prepare: {
|
|
||||||
var cmds = [];
|
|
||||||
|
|
||||||
var src = input.filePath;
|
|
||||||
var dst = output.filePath;
|
|
||||||
var copyCmd = new Command("cp", [src, dst]);
|
|
||||||
copyCmd.highlight = 'filegen';
|
|
||||||
copyCmd.description = "copying " + input.fileName;
|
|
||||||
cmds.push(copyCmd);
|
|
||||||
|
|
||||||
if (!product.codesign.enableCodeSigning)
|
|
||||||
return cmds;
|
|
||||||
|
|
||||||
var actualSigningIdentity = product.codesign._actualSigningIdentity;
|
|
||||||
if (!actualSigningIdentity) {
|
|
||||||
throw "No codesigning identities (i.e. certificate and private key pairs) matching “"
|
|
||||||
+ product.codesign.signingIdentity + "” were found.";
|
|
||||||
}
|
|
||||||
|
|
||||||
var args = ["--force", "--sign", actualSigningIdentity.SHA1];
|
|
||||||
|
|
||||||
// If signingTimestamp is undefined or empty, do not specify the flag at all -
|
|
||||||
// this uses the system-specific default behavior
|
|
||||||
var signingTimestamp = product.codesign.signingTimestamp;
|
|
||||||
if (signingTimestamp) {
|
|
||||||
// If signingTimestamp is an empty string, specify the flag but do
|
|
||||||
// not specify a value - this uses a default Apple-provided server
|
|
||||||
var flag = "--timestamp";
|
|
||||||
if (signingTimestamp)
|
|
||||||
flag += "=" + signingTimestamp;
|
|
||||||
args.push(flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
args = args.concat(product.codesign.codesignFlags || []);
|
|
||||||
|
|
||||||
args.push(output.filePath);
|
|
||||||
console.warn(args);
|
|
||||||
var cmdSign = new Command(product.codesign.codesignPath, args);
|
|
||||||
cmdSign.description = "codesign " + output.fileName
|
|
||||||
+ " (" + actualSigningIdentity.subjectInfo.CN + ")";
|
|
||||||
cmdSign.outputFilePath = output.filePath;
|
|
||||||
cmdSign.stderrFilterFunction = function(stderr) {
|
|
||||||
return stderr.replace(outputFilePath + ": replacing existing signature\n", "");
|
|
||||||
};
|
|
||||||
cmds.push(cmdSign);
|
|
||||||
|
|
||||||
return cmds;
|
|
||||||
}
|
|
||||||
|
|
||||||
Artifact {
|
|
||||||
filePath: FileInfo.joinPaths(product.qbs.installRoot, product.qbs.installPrefix,
|
|
||||||
product.buildconfig.installAppPath,
|
|
||||||
product.targetName + ".app", "Contents", "MacOS", "pdftops")
|
|
||||||
fileTags: ["pdftops.bundled"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ VToolApp {
|
||||||
Depends { name: "FervorLib" }
|
Depends { name: "FervorLib" }
|
||||||
Depends { name: "multibundle"; }
|
Depends { name: "multibundle"; }
|
||||||
Depends { name: "VGAnalyticsLib" }
|
Depends { name: "VGAnalyticsLib" }
|
||||||
Depends { name: "pdftops"; condition: qbs.targetOS.contains("macos") }
|
|
||||||
|
|
||||||
// Explicitly link to libcrypto and libssl to avoid error: Failed to load libssl/libcrypto.
|
// Explicitly link to libcrypto and libssl to avoid error: Failed to load libssl/libcrypto.
|
||||||
// Use moduleProviders.qbspkgconfig.extraPaths to define the missing dependency.
|
// Use moduleProviders.qbspkgconfig.extraPaths to define the missing dependency.
|
||||||
|
@ -202,25 +201,6 @@ VToolApp {
|
||||||
qbs.installDir: buildconfig.installBinaryPath
|
qbs.installDir: buildconfig.installBinaryPath
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties {
|
|
||||||
condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle
|
|
||||||
macdeployqt.targetApps: {
|
|
||||||
var apps = [];
|
|
||||||
|
|
||||||
if (pdftops.pdftopsPresent)
|
|
||||||
apps.push("pdftops");
|
|
||||||
|
|
||||||
return apps;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
|
||||||
condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle && pdftops.pdftopsPresent
|
|
||||||
name: "pdftops MacOS"
|
|
||||||
files: [pdftops.pdftopsPath]
|
|
||||||
fileTags: ["pdftops.in"]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "48x48/apps"
|
name: "48x48/apps"
|
||||||
prefix: project.sourceDirectory + "/share/icons/48x48/apps/"
|
prefix: project.sourceDirectory + "/share/icons/48x48/apps/"
|
||||||
|
|
|
@ -304,10 +304,6 @@ unix{
|
||||||
puzzle.path = $$MACOS_DIR
|
puzzle.path = $$MACOS_DIR
|
||||||
puzzle.files += $${OUT_PWD}/../puzzle/$${DESTDIR}/puzzle.app/$$MACOS_DIR/puzzle
|
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.
|
# logo on macx.
|
||||||
ICON = ../../../dist/Valentina.icns
|
ICON = ../../../dist/Valentina.icns
|
||||||
|
|
||||||
|
@ -346,7 +342,6 @@ unix{
|
||||||
libraries \
|
libraries \
|
||||||
tape \
|
tape \
|
||||||
puzzle \
|
puzzle \
|
||||||
xpdf \
|
|
||||||
icns_resources
|
icns_resources
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ VToolApp {
|
||||||
Depends { name: "VFormatLib"; }
|
Depends { name: "VFormatLib"; }
|
||||||
Depends { name: "VMiscLib"; }
|
Depends { name: "VMiscLib"; }
|
||||||
Depends { name: "VGAnalyticsLib" }
|
Depends { name: "VGAnalyticsLib" }
|
||||||
Depends { name: "pdftops"; condition: qbs.targetOS.contains("macos") }
|
|
||||||
Depends { name: "Tape"; condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle }
|
Depends { name: "Tape"; condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle }
|
||||||
Depends { name: "Puzzle"; condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle }
|
Depends { name: "Puzzle"; condition: qbs.targetOS.contains("macos") && buildconfig.enableMultiBundle }
|
||||||
|
|
||||||
|
@ -45,6 +44,7 @@ VToolApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
primaryApp: true
|
primaryApp: true
|
||||||
|
|
||||||
name: "Valentina"
|
name: "Valentina"
|
||||||
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "Valentina" : "valentina"
|
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "Valentina" : "valentina"
|
||||||
targetName: buildconfig.appTarget
|
targetName: buildconfig.appTarget
|
||||||
|
@ -258,20 +258,6 @@ VToolApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties {
|
|
||||||
condition: qbs.targetOS.contains("macos")
|
|
||||||
macdeployqt.targetApps: {
|
|
||||||
var apps = [];
|
|
||||||
if (!buildconfig.enableMultiBundle)
|
|
||||||
apps.push("Tape", "Puzzle");
|
|
||||||
|
|
||||||
if (pdftops.pdftopsPresent)
|
|
||||||
apps.push("pdftops");
|
|
||||||
|
|
||||||
return apps;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
condition: qbs.targetOS.contains("windows") && (qbs.architecture.contains("x86_64") || qbs.architecture.contains("x86"))
|
||||||
name: "pdftops Windows"
|
name: "pdftops Windows"
|
||||||
|
@ -281,13 +267,6 @@ VToolApp {
|
||||||
qbs.installDir: buildconfig.installBinaryPath
|
qbs.installDir: buildconfig.installBinaryPath
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
|
||||||
name: "pdftops MacOS"
|
|
||||||
condition: qbs.targetOS.contains("macos") && pdftops.pdftopsPresent
|
|
||||||
files: [pdftops.pdftopsPath]
|
|
||||||
fileTags: ["pdftops.in"]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "freedesktop"
|
name: "freedesktop"
|
||||||
prefix: project.sourceDirectory + "/dist/"
|
prefix: project.sourceDirectory + "/dist/"
|
||||||
|
|
|
@ -404,13 +404,12 @@ void VLayoutExporter::ExportToHPGL2(const QVector<VLayoutPiece> &details) const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VLayoutExporter::SupportPDFConversion() -> bool
|
auto VLayoutExporter::SupportPDFConversion() -> bool
|
||||||
{
|
{
|
||||||
auto Test = [](const QString &program)
|
|
||||||
{
|
|
||||||
QProcess proc;
|
QProcess proc;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if defined(Q_OS_WIN)
|
||||||
proc.start(program);
|
// Seek pdftops in app bundle or near valentina.exe
|
||||||
|
proc.start(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS, QStringList());
|
||||||
#else
|
#else
|
||||||
proc.start(program, QStringList());
|
proc.start(*PDFTOPS, QStringList()); // Seek pdftops in standard path
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int timeout = 15000;
|
const int timeout = 15000;
|
||||||
|
@ -419,23 +418,8 @@ auto VLayoutExporter::SupportPDFConversion() -> bool
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << program << "error" << proc.error() << proc.errorString();
|
qDebug() << *PDFTOPS << "error" << proc.error() << proc.errorString();
|
||||||
return false;
|
return false;
|
||||||
};
|
|
||||||
|
|
||||||
#if defined(Q_OS_OSX)
|
|
||||||
// Seek pdftops in app bundle
|
|
||||||
bool found = Test(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS);
|
|
||||||
if (not found)
|
|
||||||
{
|
|
||||||
found = Test(*PDFTOPS);
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
#elif defined(Q_OS_WIN)
|
|
||||||
return Test(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS);
|
|
||||||
#else
|
|
||||||
return Test(*PDFTOPS);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -451,18 +435,7 @@ void VLayoutExporter::PdfToPs(const QStringList ¶ms)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QProcess proc;
|
QProcess proc;
|
||||||
#if defined(Q_OS_MAC)
|
|
||||||
if (QFileInfo::exists(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS))
|
|
||||||
{
|
|
||||||
proc.start(QLatin1String(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS, params);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
proc.start(*PDFTOPS, params);
|
proc.start(*PDFTOPS, params);
|
||||||
}
|
|
||||||
#else
|
|
||||||
proc.start(*PDFTOPS, params);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const int timeout = 15000;
|
const int timeout = 15000;
|
||||||
if (proc.waitForStarted(timeout))
|
if (proc.waitForStarted(timeout))
|
||||||
|
|
Loading…
Reference in a new issue