diff --git a/Changelog b/Changelog index 21f41d8f0..f3e2c84b0 100644 --- a/Changelog +++ b/Changelog @@ -1,46 +1,46 @@ 0.25.1 (2018-02-23): -* Enhancements: build compatibility with MacOS, Qt 5.9. - Qt 4.6+4.7 supported as well with restrictions: +* Enhancements: build compatibility with MacOS and Qt 5.9. + Qt 4.6 supported now as well with one restriction: the package installation feature is not working. -* Bugfix: Package manager +* Bugfixs: Package manager - Remove button wasn't enabled if multiple packages were selected - A potential crash ob removing packages was fixed * Enhancement: 64 bit coordinate support enabled on Windows builds * Further bugfixes: See links - https://github.com/klayoutmatthias/klayout/issues/21 (Autorun(-early) doesn't seem to run when lym files are inside a package) - - https://github.com/klayoutmatthias/klayout/issues/24 (Text insert dialog possible) + - https://github.com/klayoutmatthias/klayout/issues/24 (Text insert dialog bug - Ok button isn't working) - https://github.com/klayoutmatthias/klayout/issues/26 (Exceptions are reported every time they propagate up in the call chain in the ruby debugger) - https://github.com/klayoutmatthias/klayout/issues/28 (CIF format detection failed) - https://github.com/klayoutmatthias/klayout/issues/30 (Writer options dialog non-functional on a fresh configuration) - - https://github.com/klayoutmatthias/klayout/issues/32 (rounding issue with instance properties) + - https://github.com/klayoutmatthias/klayout/issues/32 (Rounding issue with instance properties) - https://github.com/klayoutmatthias/klayout/issues/33 (Plugin factory not working when using with Python) - - https://github.com/klayoutmatthias/klayout/issues/36 (hardening against destruction of object inside event handler) + - https://github.com/klayoutmatthias/klayout/issues/36 (Hardening against destruction of object inside event handler) - https://github.com/klayoutmatthias/klayout/issues/39 (Action cannot be reassigned) - https://github.com/klayoutmatthias/klayout/issues/40 (Crash in Python binding) - https://github.com/klayoutmatthias/klayout/issues/41 (Polygon#touches? issue) - - https://github.com/klayoutmatthias/klayout/issues/42 (headless mode support with Qt5/-zz) - - https://github.com/klayoutmatthias/klayout/issues/43 (crash when using Qt specific command line options) + - https://github.com/klayoutmatthias/klayout/issues/42 (Headless mode support with Qt5/-zz) + - https://github.com/klayoutmatthias/klayout/issues/43 (Crash when using Qt specific command line options) - https://github.com/klayoutmatthias/klayout/issues/44 (Transformation constructor with x,y not working) - https://github.com/klayoutmatthias/klayout/issues/45 (Partial selection does not capture instance) - https://github.com/klayoutmatthias/klayout/issues/48 (Cancel does not reset current tool) - https://github.com/klayoutmatthias/klayout/issues/51 (Segmentation fault on return to main window and other opportunities) - - https://github.com/klayoutmatthias/klayout/issues/53 (unreadable 'about' text) - - https://github.com/klayoutmatthias/klayout/issues/59 (async download of package index and details) + - https://github.com/klayoutmatthias/klayout/issues/53 (Unreadable 'about' text) - https://github.com/klayoutmatthias/klayout/issues/62 (QXmlSimpleReader#parse cannot be called) - - https://github.com/klayoutmatthias/klayout/issues/63 (wrong output on DRC non_interacting with empty second input) - - https://github.com/klayoutmatthias/klayout/issues/64 (crash on exit) + - https://github.com/klayoutmatthias/klayout/issues/63 (Wrong output on DRC non_interacting with empty second input) + - https://github.com/klayoutmatthias/klayout/issues/64 (Crash on exit) - https://github.com/klayoutmatthias/klayout/issues/68 (OASIS reader issue with degenerated shapes) - https://github.com/klayoutmatthias/klayout/issues/69 (DRC: 'inside' does not merge shapes of second input) - - https://github.com/klayoutmatthias/klayout/issues/71 (target cell argument is required) + - https://github.com/klayoutmatthias/klayout/issues/71 (Target cell argument is required) - https://github.com/klayoutmatthias/klayout/issues/72 (Edges/Region NOT issue) - - https://github.com/klayoutmatthias/klayout/issues/73 (allow 'change layers' on PCells which support a single layer parameter) - - https://github.com/klayoutmatthias/klayout/issues/74 (small-corner boolean issue) + - https://github.com/klayoutmatthias/klayout/issues/73 (Allow 'change layers' on PCells which support a single layer parameter) + - https://github.com/klayoutmatthias/klayout/issues/74 (Small-corner boolean issue) - https://github.com/klayoutmatthias/klayout/issues/75 (Python PCell issue when parameters are called 'layer') - https://github.com/klayoutmatthias/klayout/issues/79 (Replace function enabled also for read-only macros) * Further enhancements: see links - - https://github.com/klayoutmatthias/klayout/issues/29 (permissive mode for OASIS writer on odd-width paths) + - https://github.com/klayoutmatthias/klayout/issues/29 (Permissive mode for OASIS writer on odd-width paths) + - https://github.com/klayoutmatthias/klayout/issues/59 (Async download of package index and details) - https://github.com/klayoutmatthias/klayout/issues/66 (Authentication dialog indicates retry) - - https://github.com/klayoutmatthias/klayout/issues/77 (copy_tree works in non-editable mode too) + - https://github.com/klayoutmatthias/klayout/issues/77 (Layout#copy_tree now works in non-editable mode too) 0.25 (2017-11-04): * Enhancement: Menu customization diff --git a/macbuild/.gitignore b/macbuild/.gitignore new file mode 100644 index 000000000..0d20b6487 --- /dev/null +++ b/macbuild/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/macbuild/ReadMe.md b/macbuild/ReadMe.md index 7412de414..f27677548 100644 --- a/macbuild/ReadMe.md +++ b/macbuild/ReadMe.md @@ -62,7 +62,7 @@ $ ./build4mac.py -r mp24 -p mp36 ``` $ ./build4mac.py -r mp24 -p mp36 -Y ``` -* [-Y|--DEPOLY] option deploys KLayout's dylibs and executables only. +* [-Y|--DEPLOY] option deploys KLayout's dylibs and executables only. That is, paths to other modules (Ruby, Python, and Qt5 Frameworks) remain unchanged (absolute paths in your development environment). 5. Copy/move generated bundles ("klayout.app" and "klayout.scripts/") to your "/Applications" directory for installation. @@ -84,4 +84,25 @@ $ ./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 + +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: + +``` +# Build step +./build4mac.py -p B36 -q Qt5Custom + +# 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 + +# Packaging step +./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m -q Qt594 + +``` + +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. + [End of File] diff --git a/macbuild/ReadMe.txt b/macbuild/ReadMe.txt index c8519bab3..87921776f 100644 --- a/macbuild/ReadMe.txt +++ b/macbuild/ReadMe.txt @@ -60,7 +60,7 @@ Relevant KLayout version: 0.25.1 to deploy executables and libraries under "klayout.app" bundle. The buddy command line tools (strm*) will also be deployed. $ ./build4mac.py -r mp24 -p mp36 -Y - * [-Y|--DEPOLY] option deploys KLayout's dylibs and executables only. + * [-Y|--DEPLOY] option deploys KLayout's dylibs and executables only. That is, paths to other modules (Ruby, Python, and Qt5 Frameworks) remain unchanged (absolute paths in your development environment). (5) Copy/move generated bundles ("klayout.app" and "klayout.scripts/") to your diff --git a/macbuild/Resources/Info.plist.template b/macbuild/Resources/Info.plist.template index 74090cbb3..65fa6d47a 100644 --- a/macbuild/Resources/Info.plist.template +++ b/macbuild/Resources/Info.plist.template @@ -18,6 +18,21 @@ APPL CFBundleVersion ${VERSION} + CFBundleShortVersionString + ${VERSION} + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + gds + + CFBundleTypeRole + Editor + CFBundleTypeIconFile + ${ICONFILE} + + CFBundleSignature ???? NSPrincipalClass diff --git a/macbuild/Resources/KLayoutDMG.applescript b/macbuild/Resources/KLayoutDMG.applescript new file mode 100644 index 000000000..91a80a3ec --- /dev/null +++ b/macbuild/Resources/KLayoutDMG.applescript @@ -0,0 +1,116 @@ +------------------------------------------------------------------------------------------------- +(* + * Template File: + * macbuild/Resources/template-KLayoutDMG.applescript + * + * Actual AppleScrip File to be generated: + * macbuild/Resources/KLayoutDMG.applescript + * + * Description: + * A template AppleScript to make a fancy DMG installer of KLayout + * (http://www.klayout.de/index.php) bundles. + * "makeDMG4mac.py" will read this template and generate the actual AppleScript to execute. + * Values to be found and replaced by "makeDMG4mac.py" are marked by ${KEYWORD}. + * + * The background image was designed using Logoist2 (http://www.syniumsoftware.com/en/logoist) + * and exported to a PNG file of 1000 x 700 pix size. + *----------------------------------------------------------------------------------------------- + * This is a derivative work of Ref. 2) below. Refer to "macbuild/LICENSE" file. + * Ref. + * 1) https://el-tramo.be/guides/fancy-dmg/ + * 2) https://github.com/andreyvit/create-dmg.git + *) +------------------------------------------------------------------------------------------------- +on run (volumeName) -- most likely, the volume name is "KLayout" + tell application "Finder" + tell disk (volumeName as string) + -- [1] Open the volume + open + + -- [2] Set the key coordinates and windows size + -- The size of given background PNG image is 1000 x 700 pix + -- ORGX = [50] pix + -- ORGY = [100] pix + -- WIN_WIDTH = [1000] pix + -- WIN_HEIGHT = [700] pix + set posMargin to 50 + set negMargin to 10 + set theTopLeftX to 50 + set theTopLeftY to 100 + set theWidth to 1000 + set theHeight to 700 + set theBottomRightX to (theTopLeftX + theWidth + posMargin) + set theBottomRightY to (theTopLeftY + theHeight + posMargin) + + -- [3] Set the full path to .DS_Store file + set dotDSStore to "/Volumes/KLayout/.DS_Store" + + -- [4] Set global view options + tell container window + set current view to icon view + set toolbar visible to false + set statusbar visible to false + set statusbar visible to false + set bounds to {theTopLeftX, theTopLeftY, theBottomRightX, theBottomRightY} + set position of every item to {theTopLeftX + 150, theTopLeftY + 350} + end tell + + -- [5] Set icon view options + set opts to the icon view options of container window + tell opts + set icon size to 80 + set text size to 16 + set arrangement to not arranged + end tell + + -- [6] Set the background PNG image (1000 x 700 pix) file name stored + set background picture of opts to file ".background:KLayoutDMG-Back.png" + + -- [7] Set positions of each icon + -- ITEM_1 = klayout.app {960, 140} + -- ITEM_2 = klayout.scripts {610, 140} + -- ITEM_3 = Applications {790, 140} + set position of item "klayout.app" to {960, 140} + set position of item "klayout.scripts" to {610, 140} + set position of item "Applications" to {790, 140} + + -- [8] Update the contents of container + close + open + update without registering applications + + -- [9] Force save the negatively resized window size + delay 2 + tell container window + set statusbar visible to false + set bounds to {theTopLeftX, theTopLeftY, theBottomRightX - negMargin, theBottomRightY - negMargin} + end tell + update without registering applications + end tell + + -- [10] Restore back the original window size + delay 2 + tell disk (volumeName as string) + tell container window + set statusbar visible to false + set bounds to {theTopLeftX, theTopLeftY, theBottomRightX, theBottomRightY} + end tell + update without registering applications + end tell + + -- [11] Wait for some time so that "Finder" can complete writing to .DS_Store file + delay 3 + set elapsedTime to 0 + set ejected to false + repeat while ejected is false + delay 1 + set elapsedTime to elapsedTime + 1 + if (do shell script "[ -f " & dotDSStore & " ]; echo $?") = "0" then set ejected to true + end repeat + log "### Elapsed <" & elapsedTime & "> [sec] for writing .DS_Store file." + end tell +end run + +-- +-- End of file +-- diff --git a/macbuild/Resources/qt.conf b/macbuild/Resources/qt.conf new file mode 100644 index 000000000..df50e9dba --- /dev/null +++ b/macbuild/Resources/qt.conf @@ -0,0 +1,4 @@ +[Paths] +Plugins = ../PlugIns +Imports = ../Resources/qml +Qml2Imports = ../Resources/qml diff --git a/macbuild/build4mac.py b/macbuild/build4mac.py index 9eaeaca8b..c4ca6933f 100755 --- a/macbuild/build4mac.py +++ b/macbuild/build4mac.py @@ -65,9 +65,9 @@ def SetGlobals(): Usage += " : 'nil' = not to support the script language | \n" Usage += " : 'Sys' = using the OS standard script language | \n" Usage += " : Refer to 'macbuild/build4mac_env.py' for details | \n" - Usage += " [-q|--qt ] : type=['Qt4MacPorts', 'Qt5MacPorts'] | qt5macports \n" - Usage += " [-r|--ruby ] : type=['nil', 'Sys', 'Src24', 'MP24'] | sys \n" - Usage += " [-p|--python ] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36'] | sys \n" + Usage += " [-q|--qt ] : type=['Qt4MacPorts', 'Qt5MacPorts', 'Qt5Custom'] | qt5macports \n" + Usage += " [-r|--ruby ] : type=['nil', 'Sys', 'Src24', 'MP24', 'B25'] | sys \n" + Usage += " [-p|--python ] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B36'] | sys \n" Usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \n" Usage += " [-m|--make