diff --git a/macbuild/ReadMe.md b/macbuild/ReadMe.md index 9ea112376..847d26dd7 100644 --- a/macbuild/ReadMe.md +++ b/macbuild/ReadMe.md @@ -1,13 +1,15 @@ -Relevant KLayout version: 0.25.2 +Relevant KLayout version: 0.26.1 # 1. Introduction -This directory "macbuild" contains different files required for building KLayout (http://www.klayout.de/) version 0.25 or later for different 64-bit Mac OSXs including: -* Yosemite (10.10) +This directory **`macbuild`** contains different files required for building KLayout (http://www.klayout.de/) version 0.26.1 or later for different 64-bit Mac OSXs including: * El Capitan (10.11) * Sierra (10.12) * High Sierra (10.13) +* Mojave (10.14) +* Catalina (10.15) -By default, Qt framework is "Qt5" from MacPorts (https://www.macports.org/) which is usually located under: +# 2. Qt5 Frameworks +By default, Qt frameworks are "Qt5" from MacPorts (https://www.macports.org/) which is usually located under: ``` /opt/local/libexec/qt5/ ``` @@ -16,102 +18,218 @@ Alternatively, you can use "Qt5" from Homebrew (https://brew.sh/) which is usual ``` /usr/local/opt/qt/ ``` -Please refer to Section # 5. of this document regarding use of Homebrew. -KLayout 0.25.2 was successfully built with "Qt 5.10.0" from MacPorts and "Qt 5.10.1" from Homebrew. + OR -### IMPORTANT +"Qt5" from Anaconda3 (https://www.anaconda.com/) which is usually located under: ``` -* Please DO NOT USE "Qt 4.x" which is problematic in compilation. +$HOME/opt/anaconda3/pkgs/qt-{version} ``` -Also by default, supported script languages, i.e, Ruby and Python, are those standard ones bundled with the OS. +# 3. Script language support: Ruby and Python +By default, supported script languages, i.e., Ruby and Python, are those standard ones bundled with the OS.
+As for Catalina (10.15), +``` +$ /usr/bin/ruby -v + ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19] -# 2. Non-OS-standard script language support -You may want to use a non-OS-standard script language such as Python 3.6 from Anaconda2 (https://www.anaconda.com/download/#macos) in combination with KLayout. +$ /usr/bin/python --version + Python 2.7.16 +``` +Even in the latest OS as of today (December 2019), Python 3.x is not bundled with the OS, and this is the main reason why users want non-OS-standard script language support. -Since Anaconda2 is a popular Python development environment, this is worth trying. Unfortunately, however, some dynamic linkage problems are observed as of today. -On the other hand, Python 3.7 provided by MacPorts or Homebrew is usable. -Please try this (refer to 3B below or Section #5) if you feel it's useful. +To meet such a requirement, the build script **`build4mac.py`** provides several possible combinations of Qt5, Ruy and Python module.
+Some typical use cases are described in Section 6. -# 3. Use-cases -### 3A. Debug build using the OS-standard script languages -1. Make a symbolic link (if it does not exist) from the parent directory (where 'build.sh' exists) to 'build4mac.py', that is, -``` - build4mac.py -> macbuild/build4mac.py -``` -2. Invoke 'build4mac.py' with appropriate options ("-d" for debug build): -``` -$ cd /where/'build.sh'/exists -$ ./build4mac.py -d -``` -3. Confirm successful build (it will take about one hour). -4. Run 'build4mac.py' again with the same options used in 2. PLUS "-y" to deploy executables and libraries (including Qt's frameworks) under "klayout.app" bundle. The buddy command line tools (strm*) will also be deployed in this step. -``` -$ ./build4mac.py -d -y -``` -5. Copy/move generated bundles ("klayout.app" and "klayout.scripts/") to your "/Applications" directory for installation. +# 4. Prerequisites +You need to have: +* the latest Xcode and command-line tool kit compliant with each OS +* Qt5 package from MacPorts, Homebrew, or Anaconda3 +* optionally Ruby and Python packages from MacPorts, Homebrew, or Anaconda3 +#### For matching versions of Ruby and Python, please also refer to `build4mac_env.py`. #### -### 3B. Release build using the non-OS-standard Ruby 2.4 and Python 3.6 both from MacPorts -1. Make a symbolic link (if it does not exist) from the parent directory (where 'build.sh' exists) to 'build4mac.py', that is, +# 5. Command-line options of **`build4mac.py`** are as shown below. ``` -build4mac.py -> macbuild/build4mac.py +--------------------------------------------------------------------------------------------------------- +<< Usage of **`build4mac.py`** >> + for building KLayout 0.26.1 or later on different Apple Mac OSX platforms. + +$ [python] ./build4mac.py + option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value + --------------------------------------------------------------------------------------+--------------- + [-q|--qt ] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3'] | qt5macports + : Qt5MacPorts: use Qt5 from MacPorts | + : Qt5Brew: use Qt5 from Homebrew | + : Qt5Ana3: use Qt5 from Anaconda3 | + [-r|--ruby ] : case-insensitive type=['nil', 'Sys', 'MP26', 'HB26', 'Ana3'] | sys + : nil: don't bind Ruby | + : Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS | + : MP26: use Ruby 2.6 from MacPorts | + : HB26: use Ruby 2.6 from Homebrew | + : Ana3: use Ruby 2.5 from Anaconda3 | + [-p|--python ] : case-insensitive type=['nil', 'Sys', 'MP37', 'HB37', 'Ana3'] | sys + : nil: don't bind Python | + : Sys: use OS-bundled Python 2.7 [ElCapitan -- Catalina] | + : MP37: use Python 3.7 from MacPorts | + : HB37: use Python 3.7 from Homebrew | + : Ana3: use Python 3.7 from Anaconda3 | + [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled + [-m|--make