From 85c033db64a72d15bd1ef78b65f56cc3336eadc7 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 21 Dec 2019 18:00:02 +0100 Subject: [PATCH 1/6] Small doc fixes --- src/db/db/gsiDeclDbLayoutToNetlist.cc | 8 +++++--- src/lay/lay/layGSIHelpProvider.cc | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/db/db/gsiDeclDbLayoutToNetlist.cc b/src/db/db/gsiDeclDbLayoutToNetlist.cc index eab15bca5..dc65068cc 100644 --- a/src/db/db/gsiDeclDbLayoutToNetlist.cc +++ b/src/db/db/gsiDeclDbLayoutToNetlist.cc @@ -329,7 +329,7 @@ Class decl_dbLayoutToNetlist ("db", "LayoutToNetlist", gsi::method ("global_net_name", &db::LayoutToNetlist::global_net_name, gsi::arg ("global_net_id"), "@brief Gets the global net name for the given global net ID." ) + - gsi::method ("extract_netlist", &db::LayoutToNetlist::extract_netlist, gsi::arg ("join_net_names", std::string ()), gsi::arg ("include_floating_subcircuits", false), + gsi::method ("extract_netlist", &db::LayoutToNetlist::extract_netlist, gsi::arg ("join_net_names", std::string (), "\"\""), gsi::arg ("include_floating_subcircuits", false), "@brief Runs the netlist extraction\n" "'join_net_names' is a glob expression for labels. Nets on top level carrying the same label which matches this glob " "expression will be connected implicitly even if there is no physical connection. This feature is useful to simulate a connection " @@ -359,12 +359,14 @@ Class decl_dbLayoutToNetlist ("db", "LayoutToNetlist", "@brief Runs the netlist extraction\n" "This method runs the netlist extraction like the two-parameter version. In addition to the latter, this method " "can be given a per-cell net label joining specification in 'join_net_names_per_cell'. The keys of this array " - "are cell names or cell names or cell name match expressions (glob style). The values are lable match expressions.\n" + "are cell names or cell names or cell name match expressions (glob style). The values are label match expressions.\n" "\n" "If not an empty string, the 'join_net_names' label match expression is applied to the top cell. For all non-top cells " "the per-cell label match expression is applied and determines what labels are joined into single nets. " "As the keys of 'join_net_names_per_cell' are glob expressions, a single cell may fall into more than one category. In this " - "case, the label match pattern are combined. In any case, the 'join_net_names' has priority for the top cell." + "case, the label match pattern are combined. In any case, the 'join_net_names' has priority for the top cell.\n" + "\n" + "This variant of 'extract_netlist' has been introduced in version 0.26.2." ) + gsi::method_ext ("internal_layout", &l2n_internal_layout, "@brief Gets the internal layout\n" diff --git a/src/lay/lay/layGSIHelpProvider.cc b/src/lay/lay/layGSIHelpProvider.cc index ee14780c4..48121cd71 100644 --- a/src/lay/lay/layGSIHelpProvider.cc +++ b/src/lay/lay/layGSIHelpProvider.cc @@ -796,7 +796,6 @@ method_arguments (const gsi::MethodBase *method, const gsi::ClassBase *cls_obj, if (i > 0) { r += ","; r += sep; - r += " "; } r += escape_xml (doc.args [i]); } @@ -816,7 +815,6 @@ method_arguments (const gsi::MethodBase *method, const gsi::ClassBase *cls_obj, if (n > 0) { r += ","; r += sep; - r += " "; } r += type_to_s (*a, linked, false); r += " "; @@ -1312,7 +1310,7 @@ GSIHelpProvider::produce_class_doc (const std::string &cls) const if (! attr.empty ()) { os << "[" << escape_xml (attr) << "] "; } - os << method_return (i->second.first, method_doc, true) << " " << escape_xml (i->first) << " " << method_arguments (i->second.first, cls_obj, method_doc, true, ""); + os << method_return (i->second.first, method_doc, true) << " " << escape_xml (i->first) << " " << method_arguments (i->second.first, cls_obj, method_doc, true, " "); os << "

" << std::endl; os << "

" << tl::to_string (QObject::tr ("Description")) << ": " << replace_references (escape_xml (method_doc.brief_doc), cls_obj) << "

" << std::endl; From aaf117508d5428f6d03c679140a829a00f7f4200 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Sun, 22 Dec 2019 20:15:53 +0900 Subject: [PATCH 2/6] To build 0.26.1 on Catalina. --- macbuild/ReadMe.md | 264 +++++-- macbuild/Resources/KLayoutDMG-Back.logoist | Bin 452095 -> 199144 bytes macbuild/Resources/KLayoutDMG-Back.png | Bin 311787 -> 207064 bytes macbuild/Resources/KLayoutDMG.applescript | 116 ---- macbuild/Resources/KLayoutEditor.sh | 36 - macbuild/Resources/KLayoutViewer.sh | 36 - .../icon-resources/klayout-Ana3.logoist | Bin 0 -> 92023 bytes .../Resources/icon-resources/klayout-Ana3.png | Bin 0 -> 76863 bytes .../icon-resources/klayout-HB.logoist | Bin 0 -> 100754 bytes .../Resources/icon-resources/klayout-HB.png | Bin 0 -> 84476 bytes .../icon-resources/klayout-blue.logoist | Bin 0 -> 96794 bytes .../Resources/icon-resources/klayout-blue.png | Bin 0 -> 91204 bytes .../icon-resources/klayout-green.logoist | Bin 0 -> 80509 bytes .../icon-resources/klayout-green.png | Bin 0 -> 74155 bytes .../icon-resources/klayout-orange.logoist | Bin 0 -> 82643 bytes .../icon-resources/klayout-orange.png | Bin 0 -> 76956 bytes .../icon-resources/klayout-pink.logoist | Bin 0 -> 81898 bytes .../Resources/icon-resources/klayout-pink.png | Bin 0 -> 77667 bytes .../icon-resources/klayout-purple.logoist | Bin 0 -> 81898 bytes .../icon-resources/klayout-purple.png | Bin 0 -> 77392 bytes .../icon-resources/klayout-red.logoist | Bin 0 -> 82384 bytes .../Resources/icon-resources/klayout-red.png | Bin 0 -> 76034 bytes .../icon-resources/klayout-yellow.logoist | Bin 0 -> 92022 bytes .../icon-resources/klayout-yellow.png | Bin 0 -> 86417 bytes macbuild/Resources/klayout-Ana3.icns | Bin 0 -> 353292 bytes macbuild/Resources/klayout-HB.icns | Bin 0 -> 360246 bytes macbuild/Resources/klayout-blue.icns | Bin 251637 -> 381075 bytes macbuild/Resources/klayout-green.icns | Bin 213038 -> 346187 bytes macbuild/Resources/klayout-orange.icns | Bin 0 -> 348445 bytes macbuild/Resources/klayout-pink.icns | Bin 0 -> 348521 bytes macbuild/Resources/klayout-purple.icns | Bin 0 -> 356414 bytes macbuild/Resources/klayout-red.icns | Bin 210773 -> 327739 bytes macbuild/Resources/klayout-yellow.icns | Bin 239220 -> 362697 bytes macbuild/Resources/modified-inv.png | Bin 0 -> 24738 bytes macbuild/Resources/modified-inv_schematic.png | Bin 0 -> 10555 bytes macbuild/Resources/script-bundles.zip | Bin 0 -> 9379888 bytes .../Resources/template-KLayoutDMG.applescript | 22 +- macbuild/build4mac.py | 651 +++++++++--------- macbuild/build4mac_env.py | 217 +++--- macbuild/build4mac_util.py | 19 +- macbuild/makeDMG4mac.py | 215 +++--- 41 files changed, 785 insertions(+), 791 deletions(-) delete mode 100644 macbuild/Resources/KLayoutDMG.applescript delete mode 100755 macbuild/Resources/KLayoutEditor.sh delete mode 100755 macbuild/Resources/KLayoutViewer.sh create mode 100644 macbuild/Resources/icon-resources/klayout-Ana3.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-Ana3.png create mode 100644 macbuild/Resources/icon-resources/klayout-HB.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-HB.png create mode 100644 macbuild/Resources/icon-resources/klayout-blue.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-blue.png create mode 100644 macbuild/Resources/icon-resources/klayout-green.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-green.png create mode 100644 macbuild/Resources/icon-resources/klayout-orange.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-orange.png create mode 100644 macbuild/Resources/icon-resources/klayout-pink.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-pink.png create mode 100644 macbuild/Resources/icon-resources/klayout-purple.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-purple.png create mode 100644 macbuild/Resources/icon-resources/klayout-red.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-red.png create mode 100644 macbuild/Resources/icon-resources/klayout-yellow.logoist create mode 100644 macbuild/Resources/icon-resources/klayout-yellow.png create mode 100644 macbuild/Resources/klayout-Ana3.icns create mode 100644 macbuild/Resources/klayout-HB.icns create mode 100644 macbuild/Resources/klayout-orange.icns create mode 100644 macbuild/Resources/klayout-pink.icns create mode 100644 macbuild/Resources/klayout-purple.icns create mode 100644 macbuild/Resources/modified-inv.png create mode 100644 macbuild/Resources/modified-inv_schematic.png create mode 100644 macbuild/Resources/script-bundles.zip 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