Skip to content

Commit

Permalink
Merge branch 'master' into macos_retina
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslima committed Mar 20, 2018
2 parents 73e84d4 + 238970d commit 1ed12d4
Show file tree
Hide file tree
Showing 26 changed files with 382 additions and 214 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
klayout is packaged by Peter C.S. Scholtens <[email protected]>
and Matthias Köfferlein <[email protected]>
and was obtained from https://www.klayout.org/downloads/source/klayout-0.25.1.tar.gz
and was obtained from https://www.klayout.org/downloads/source/klayout-0.25.2.tar.gz

Authors:
Matthias Köfferlein
Expand Down
15 changes: 15 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
0.25.2 (2018-03-17):
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/90
DRC: "extended" was not working as expected with "joined = true"
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/89
Display issue on MacOS fixed
* Enhancement: https://github.com/klayoutmatthias/klayout/issues/85
IDE debugger: files can be excluded from showing exceptions when
they are thrown. To exclude a file press the new "Ignore" button
when the debugger tells you an exception has been generated.
To re-able exception reporting, clear the list of the files
in the IDE settings ("Debugging" tab)
The macro IDE settings can now be edited in the File/Setup
dialog.
* Enhancements: build enhancements for MacOS

0.25.1 (2018-02-23):
* Enhancements: build compatibility with MacOS and Qt 5.9.
Qt 4.6 supported now as well with one restriction:
Expand Down
7 changes: 7 additions & 0 deletions Changelog.Debian
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
klayout (0.25.2-1) unstable; urgency=low

* New features and bugfixes
- See changelog

-- Matthias Köfferlein <[email protected]> Sun, 18 Mar 2018 18:51:19 +0100

klayout (0.25.1-1) unstable; urgency=low

* New features and bugfixes
Expand Down
1 change: 1 addition & 0 deletions build4mac.py
58 changes: 32 additions & 26 deletions macbuild/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
Relevant KLayout version: 0.25.1
Relevant KLayout version: 0.25.2

# 1. Introduction
This directory "macbuild" contains different files required for building KLayout (http://www.klayout.de/) version 0.25 or later for different Mac OSXs including:
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)
* El Capitan (10.11)
* Sierra (10.12)
* High Sierra (10.13)

By default, Qt framework is "Qt5" from Mac Ports (https://www.macports.org/) which is usually located under:
By default, Qt framework is "Qt5" from MacPorts (https://www.macports.org/) which is usually located under:
```
/opt/local/libexec/qt5/
```

Alternatively, you can use "Qt5" from Homebrew (https://brew.sh/) which is usually located under:
```
/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.

### IMPORTANT
```
* Please DO NOT USE "Qt 5.10.0" which is problematic in showing your design in the main canvas.
* Please USE "Qt 5.9.x" instead (5.9.3 is recommended).
* Building with Qt4 will lead to some compile errors.
* Please DO NOT USE "Qt 4.x" which is problematic in compilation.
```

Also by default, supported script languages, i.e, Ruby and Python, are those standard ones bundled with the OS.

# 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.

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.6 provided by Mac Ports is usable.
Please try this (refer to 3B below) if you feel it's useful.
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.6 provided by MacPorts or Homebrew is usable.
Please try this (refer to 3B below or Section #5) if you feel it's useful.

# 3. Use-cases
### 3A. Debug build using the OS-standard script languages
1. Make a symbolic link from the parent directory (where 'build.sh' exists) to
'build4mac.py', that is,
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
```
Expand All @@ -40,15 +45,15 @@ Please try this (refer to 3B below) if you feel it's useful.
$ cd /where/'build.sh'/exists
$ ./build4mac.py -d
```
3. Confirm successful build.
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.
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.

### 3B. Release build using the non-OS-standard Ruby 2.4 and Python 3.6 both from MacPorts
1. Make a symbolic link from the parent directory (where 'build.sh' exists) to 'build4mac.py', that is,
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
```
Expand All @@ -57,8 +62,8 @@ build4mac.py -> macbuild/build4mac.py
$ cd /where/'build.sh'/exists
$ ./build4mac.py -r mp24 -p mp36
```
3. Confirm successful build.
4. Run 'build4mac.py' again with the same options used in 2. PLUS "-Y" to deploy executables and libraries under "klayout.app" bundle. The buddy command line tools (strm*) will also be deployed.
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 under "klayout.app" bundle. The buddy command line tools (strm*) will also be deployed in this step.
```
$ ./build4mac.py -r mp24 -p mp36 -Y
```
Expand All @@ -73,7 +78,7 @@ That is, paths to other modules (Ruby, Python, and Qt5 Frameworks) remain unchan
You can make a DMG installer using another Python script 'makeDMG4mac.py'.
This script requires a directory generated by 'build4mac.py' with [-y|-Y] option (refer to 3A.4 & 3B.4)

1. Make a symbolic link from the parent directory (where 'build.sh' exists) to 'makeDMG4mac.py', that is,
1. Make a symbolic link (if it does not exist) from the parent directory (where 'build.sh' exists) to 'makeDMG4mac.py', that is,
```
makeDMG4mac.py -> macbuild/makeDMG4mac.py
```
Expand All @@ -83,26 +88,27 @@ $ cd /where/'build.sh'/exists
$ ./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m
```

By: Kazzz (January 16, 2018)

# 5. Alternative building options
### 5.1 Python 3.6 from brew, Qt 5.9.4 from offline installer
### 5.1 Python 3.6 from Homebrew, Qt 5.10.1 from Homebrew

Homebrew's installation of python3 places a `Python.framework` in `/usr/local/opt/python/Frameworks/Python.framework/`, which you can use to build KLayout from. Qt can be downloaded for [offline installation](https://www1.qt.io/offline-installers/). You can place it in your home folder: e.g. `/home/username/Qt5.9.4/`. Given these two dependencies, you can successfully compile KLayout with the following commands:
Homebrew's installation of python3 (`brew install python3`) places a `Python.framework` in `/usr/local/opt/python/Frameworks/Python.framework/`, which you can use to build KLayout from. Qt can also be downloaded from brew with `brew install qt`.

```
# Build step
./build4mac.py -p B36 -q Qt5Custom
./build4mac.py -p B36 -q Qt5Brew
# Deploy step
./build4mac.py -p B36 -q Qt5Custom -y # normal deploy
./build4mac.py -p B36 -q Qt5Custom -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options
./build4mac.py -p B36 -q Qt5Brew -y # normal deploy
./build4mac.py -p B36 -q Qt5Brew -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options
# Packaging step
./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m -q Qt594
./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m -q Qt5101
```

PS: If you get a syntax error in one of ruby's libraries because it is not compatible with C++11, do not fret. You only have to change one offending file.
#### Known issues

Because we link python to `/usr/local/opt/python/Frameworks/Python.framework/`, updating python from brew might break KLayout if the new version is incompatible. To fix this, it is better to link python directly to `/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework`, but that might complicate release builds, because that assumes users have the exact version of python installed by brew.

[End of File]
80 changes: 0 additions & 80 deletions macbuild/ReadMe.txt

This file was deleted.

2 changes: 2 additions & 0 deletions macbuild/Resources/Info.plist.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>gds</string>
<string>gds2</string>
<string>oas</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
Expand Down
Loading

0 comments on commit 1ed12d4

Please sign in to comment.