Compare commits

...

7 commits

Author SHA1 Message Date
Roman Telezhynskyi aa22dcf870 Use system curl version. 2023-09-22 16:11:07 +03:00
Roman Telezhynskyi 90dc482b93 Use conan custom profile instead of default. 2023-09-22 15:27:49 +03:00
Roman Telezhynskyi d947c569a4 Update conan requirements. 2023-09-22 15:26:43 +03:00
Roman Telezhynskyi 4fa9aca80d Do not install curl with brew.
Because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.
2023-09-22 14:51:24 +03:00
Roman Telezhynskyi 5589ad2072 Fix build on MacOS. 2023-09-22 12:17:14 +03:00
Roman Telezhynskyi f167b66669 Fix incorrect build command. 2023-09-22 11:32:47 +03:00
Roman Telezhynskyi 63b0cbd4e2 Fix incorrect unzip destination. 2023-09-22 11:25:00 +03:00
3 changed files with 37 additions and 21 deletions

View file

@ -237,7 +237,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- chmod -R 755 /opt/homebrew/opt/openssl@1.1/*
- chmod -R 755 /opt/homebrew/opt/poppler/*
- python3 --version
- pip3 install --user --upgrade pip dropbox conan==1.60
- pip3 install --user --upgrade pip dropbox conan==1.61.0
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
- conan --version
- qmake --version
@ -257,9 +257,9 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- whereis python
- 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
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}
- 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
- cmake --build ${HOME}/macdeployqt-build-dir --target install
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina

View file

@ -411,7 +411,7 @@ for:
# Install the build dependencies of the project.
- (python -m pip install --upgrade pip)
- if "%DEPLOY%" == "true" (python -m pip install dropbox)
- python -m pip install conan==1.60
- python -m pip install conan==1.61.0
# Trick qmake to not work through MSYS
- del /F "C:\Program Files\Git\usr\bin\sh.exe"
- del /F "C:\Program Files\Git\bin\sh.exe"
@ -608,7 +608,7 @@ for:
secure: B8yHPBym+BTDPK5ZCg7WlSnUCHLbcim8WqLTC6/PSNs=
cache:
- /Users/appveyor/.conan/data -> conan-cache
- /Users/appveyor/.conan/data -> conanfile.py
- /Users/appveyor/cache_dir
init:
@ -669,7 +669,7 @@ for:
sudo ln -s /usr/local /opt/local;
cache_tag=usr_local_2 # this can be modified to rebuild deps
cache_tag=usr_local_3 # this can be modified to rebuild deps
cdir=$HOME/cache_dir
cache_tar=$cdir/$cache_tag.tar
@ -693,7 +693,7 @@ for:
python3 ./scripts/treestate.py scan /usr/local usrlocal.json
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 cmake ninja poppler
# The build environment is now ready for use. We can complete
# the rest of the process of creating the Homebrew archive
@ -716,7 +716,7 @@ for:
fi
- sudo python3 -m pip install --upgrade pip
- pip3 install --user --upgrade pip dropbox conan==1.60
- pip3 install --user --upgrade pip dropbox conan==1.61.0
- export PATH="$PATH:`python3 -m site --user-base`/bin"
- echo $PATH
- python3 --version
@ -727,25 +727,33 @@ for:
- which qbs
- qbs --version
# Patch Qbs. Remove after Qbs 2.1.2+.
- curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
- /usr/bin/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
- 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
- /usr/bin/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}
- 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
- cmake --build ${HOME}/macdeployqt-build-dir --target install
- cd ${APPVEYOR_BUILD_FOLDER}
build_script:
- pwd
- conan install . -s os=Macos -s os.version=${MACOS_DEPLOYMENT_TARGET} --build=missing
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os.version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.arch=${ARCH} valentina
- conan profile update settings.compiler=apple-clang valentina
- conan profile update settings.compiler.libcxx=libc++ valentina
- conan profile update settings.compiler.version=14 valentina
- conan install . --build=missing -pr valentina
- qbs setup-toolchains --detect
- qbs config --list profiles
- qbs setup-qt ${QTDIR}/bin/qmake qt6
- qbs config defaultProfile qt6
- 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 -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 --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 project.conanProfiles:valentina 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 project.conanProfiles:valentina 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
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI
- echo "Create keychain profile"
@ -796,7 +804,7 @@ for:
secure: B8yHPBym+BTDPK5ZCg7WlSnUCHLbcim8WqLTC6/PSNs=
cache:
- /Users/appveyor/.conan/data -> conan-cache
- /Users/appveyor/.conan/data -> conanfile.py
init:
- find /Applications -maxdepth 1 -type d -name 'Xcode*.app'
@ -849,7 +857,7 @@ for:
- sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python
- whereis python
- sudo python3 -m pip install --upgrade pip
- pip3 install --user --upgrade pip dropbox conan==1.60
- pip3 install --user --upgrade pip dropbox conan==1.61.0
- conan --version
- clang --version
- qmake --version
@ -859,14 +867,22 @@ for:
build_script:
- pwd
- conan install . -s os=Macos -s os.version=${MACOS_DEPLOYMENT_TARGET} --build=missing
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os.version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.arch=${ARCH} valentina
- conan profile update settings.compiler=apple-clang valentina
- conan profile update settings.compiler.libcxx=libc++ valentina
- conan profile update settings.compiler.version=14 valentina
- conan install . --build=missing -pr valentina
- qbs setup-toolchains --detect
- qbs config --list profiles
- qbs setup-qt ${QTDIR}/bin/qmake qt6
- qbs config defaultProfile qt6
- 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 "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"
- 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 project.conanProfiles:valentina "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 project.conanProfiles:valentina moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME"
# notarytool supported since XCode 13. First we need to backport it.
- curl https://bitbucket.org/valentinaproject/valentinaproject.bitbucket.io/downloads/notarytool.tar.xz --output $HOME/notarytool.tar.xz --silent
- tar -xf $HOME/notarytool.tar.xz

View file

@ -454,7 +454,7 @@ void VLayoutExporter::PdfToPs(const QStringList &params)
#if defined(Q_OS_MAC)
if (QFileInfo::exists(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS))
{
proc.start(QLatin1String(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS, params);
proc.start(qApp->applicationDirPath() + QLatin1String("/") + *PDFTOPS, params);
}
else
{