macOSBuildHowto.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. A.- Requirements
  2. To build on macOS you need Xcode 12, 13 or 14 (get it from the App store or the
  3. Apple developer site) and therefore macOS Catalina for Xcode 12, Big Sur for
  4. Xcode 13, or Monterey for Xcode 14 (the target system/SDK is set by the viewer
  5. build scripts to v10.13, so the resulting viewer binary should nonetheless be
  6. compatible with macOS High Sierra or newer Mac systems).
  7. When building with Xcode 13+ you get some more link-time warnings due to a few
  8. badly targetted libraries (too old a build target); these are harmless.
  9. You additionally need Python and CMake. You may install both using macports
  10. (https://ports.macports.org/).
  11. Alternatively (but untested by me) you may install Python from a macOS PKG
  12. downloaded from the official Python site (https://www.python.org/). Do make
  13. sure the 'python' executable path is added to your PATH environment variable.
  14. You may also install CMake with the DMG downloaded from the official CMake site
  15. (https://cmake.org/download/). IMPORTANT: cmake v3.12.0 is the *minimum* cmake
  16. version required for buidling with Xcode 10 or newer. CMake v3.16+ is
  17. recommended for a faster compilation. Also make sure to run:
  18. sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
  19. in order to get the command line cmake to be properly installed.
  20. To verify that all the required components are available on your system, open a
  21. new terminal (i.e. do not use the one you installed from) and type:
  22. xcodebuild -version
  23. python --version
  24. cmake --version
  25. B.- Building
  26. To build a viewer release (x86, 64 bits only) from the sources:
  27. 1.- Extract the viewer sources from the tarball.
  28. 2.- Open a terminal.
  29. 3.- Change to the linden/ directory.
  30. 4.- Type (*): ./macos-build.sh
  31. 5.- Cross your fingers...
  32. With some luck (did you properly cross your fingers ?), you should find the
  33. resulting, ready to run "Cool VL Viewer.app" in the following directory:
  34. linden/build-darwin-x86_64/
  35. (*) Or, to build a RelWithDebInfo viewer binary: ./macos-build.sh -s
  36. And for a Debug build: ./macos-build.sh -d