README.macos 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. % README.macos 2024-01-18
  2. % Tested on macOS 12.7.2 Monterey VirtualBox (thanks to https://github.com/myspaghetti/macos-virtualbox)
  3. 1. Prerequisites for building zint and zint-qt
  4. ==============================================
  5. Start a terminal.
  6. First if not already installed, install the developer command line tools
  7. xcode-select --install
  8. This can take a (very) long time. Once done, check for updates by selecting "System Preferences" > "Software Update",
  9. and clicking "Advanced" and "OK" (with all the checkboxes set) to trigger the check. If updates are found, install.
  10. This can also take a long time.
  11. With the latest versions of the command line tools, "/usr/include" no longer has the standard C include files. Set
  12. SDKROOT to overcome this (https://stackoverflow.com/a/60002595/664741)
  13. export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
  14. Install Homebrew (unless already installed)
  15. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  16. Install CMake, libpng and Qt5 (git, make, cc & c++ should already be available with command line tools)
  17. brew install cmake
  18. brew install libpng
  19. brew install qt5
  20. Add the Qt5 bin directory to the PATH
  21. export PATH='/usr/local/opt/qt@5/bin':"$PATH"
  22. Clone the latest zint source
  23. git clone https://git.code.sf.net/p/zint/code zint
  24. 2. Build
  25. ========
  26. The rest is standard CMake
  27. cd zint
  28. mkdir build
  29. cd build
  30. cmake ..
  31. make
  32. sudo make install
  33. This installs into "/usr/local". You can then move the GUI "/usr/local/bin/zint-qt.app" into the main "/Applications"
  34. folder if you wish.
  35. 3. CMake options
  36. ================
  37. See "README.linux".