Building current sources on Mac OS #81
trufanov-nok
started this conversation in
General
Replies: 1 comment 6 replies
-
I tried using this method on current macOS sequoia, this is the output I got.
I have downloaded the last precompiled version of qt for mac (5.14.2) and I'm using the macos SDK that is installed through CommandLineTools that has always worked perfectly for building qt apps. I've edited all the files I was told to edit (especially the last one with: IF(APPLE)
# hardcoded path to Qt5CoreConfig.cmake etc. [truf]
SET(CMAKE_PREFIX_PATH "/Users/giovanni/build/Qt/5.14.2/clang_64/")
ENDIF(APPLE) After editing the buildscantailor.sh commenting out the following lines export CC=gcc-7
export CPP=cpp-7
export CXX=g++-7
export LD=g++-7 Then building process seems to proceed a little more but it still fails with the following output
Am I doing something wrong? It would be awesome to have access to a precompiled mac package. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a brief instructions on how to build ScanTailor Universal distributive (.dmg) for Mac OS.
Unlike building for other platforms Mac OS build scripts contain some hardcoded paths one may need to change. There was a code to autodetect these paths but years ago while debugging I simplified it to hardcoded values. So:
(Tested with Mac OS 10.9 Maverick)
Make
build/
folder in your home dir.Make sure your system has CMake and Git installed. Install them if needed.
Install XCode. Up-to-date versions can be found at: https://developer.apple.com/xcode/
As I'm using Mac OS 10.9 to build distributive I found and installed old XCode v6.2
Find out there MacOS SDK has been installed by execution:
xcrun --sdk macosx --show-sdk-path
in Terminal and remember it. You'll need to replace hardcoded value with it.
First of all, find out what Qt version supports your OS version. For example latest Qt framework that still support my Mac OS is Qt 5.8: https://doc.qt.io/archives/qt-5.8/supported-platforms.html
You may iterate version number in url to get a list of supported platforms for it.
Then download Qt distributive. For example, Qt 5.8 for Mac can be found here:
https://download.qt.io/new_archive/qt/5.8/5.8.0/qt-opensource-mac-x64-clang-5.8.0.dmg
Install it to
~/build/Qt
. You must have a folder~/build/Qt/5.8/clang_64/lib
after that.~/build/scantailor-universal
withgit clone --recurse-submodules https://github.com/trufanov-nok/scantailor.git
This will not only download scantailor-universal sources but also its submodules sources.
Now the file tree might looks like:
But with different library versions in folder names. That's ok - build script will autodetect them.
Create two empty folders:
scantailor-universal-build
andscantailor-universal-deps-build
in~/build/
Edit following hardcoded paths in files:
~/build/scantailor-universal/src/packaging/osx/buildscantailor.sh:
~/build/scantailor-universal/src/packaging/osx/makeapp.sh:
~/build/scantailor-universal/CMakeLists.txt:
buildscantailor.sh
from~/build/scantailor-universal/src/packaging/osx/
in Mac OS' Terminal to build everything. It will build all required libraries inscantailor-universal-deps-build
, build scantailor itself and then invokemakeapp.sh
script which create MacOs Bundle for scantailor inscantailor-universal-build
.Beta Was this translation helpful? Give feedback.
All reactions