Download And Build

Download current version

Download packages for the current versions from these links. You find download links for other versions here.

Platform Version Download
unix (source package) 0.21.15 klayout-0.21.15.tar.gz
Windows 32 bit (binary package) 0.21.15 klayout-0.21.15-win32.zip (binaries)
klayout-0.21.15-win32-install.exe (installer)
Windows 64 bit (binary package) 0.21.15 klayout-0.21.15-win64.zip (binaries)
klayout-0.21.15-win64-install.exe (installer)
Windows 32 bit (binary package)
legacy MinGW based build
0.21.15 klayout-0.21.15-mingw32.zip (binaries)
MacOS 10.7 (binary package) 0.21.13 klayout-0.21.13.intel-lion.dmg (klayout.app, Qt included)

Development Snapshot

A snapshot of the current development code base (last update 2012-01-22) can be obtained here:
klayout-r1062.tar.gz.

Packaged Release for Windows

For the Windows platform, a zip archive is provided that contains all the required executables and DLL's. A description how to actually build KLayout on Windows using MinGW and Visual Studio 2010 can be found below.

Starting with version 0.15, an installer executable is provided as well. To install KLayout using the installer, download the executable and execute it. It will install the binaries at the target location, which can be selected in the installer user interface. In addition, it will create three KLayout shortcuts in the "Programs" section of the start menu. It will also register itself as handler for file types ".gds" and ".oas".

If the installer is executed from a normal user account, it will install itself for that user only. No particular rights are required in this case. If started with administrator rights, it will install itself for all users.

Building on MacOS

For building the executable on MacOS 10.5.7, the "mac-leopard-gcc-release" platform is provided. The build is based on the Xcode installation. This build script call was used successfully with Qt 4.5.2 from the Xcode package:

  ./build.sh -platform mac-leopard-gcc-release \
    -qtbin /Developer/Tools/Qt \
    -qtlib /usr/lib \
    -rblib /usr/lib/libruby.dylib \
    -rbinc /usr/lib/ruby/1.8/universal-darwin9.0

On MacOS 10.6 this build script call was used successfully (Qt library is qt-mac-cocoa-opensource-4.6.2.dmg):

  ./build.sh -platform mac-leopard-gcc-release \
    -qtbin /Developer/Tools/Qt \
    -qtlib /usr/lib \
    -rblib /usr/lib/libruby.dylib \
    -rbinc /usr/lib/ruby/1.8/universal-darwin10.0

Apparently, both 32 and 64 bit versions of Qt must be installed.

Building KLayout on Unix

System Requirements:

  • Linux system (tested on Ubuntu 8.04LTS, 10.04LTS, RHE 4)
  • on Linux: gcc Version 3.2 or later (tested with 3.4.5, 4.3.2, 4.4.3). Solaris is no longer supported.
  • Qt Version 4.2.x or later (tested with 4.2.3, 4.4.3, 4.5.2, 4.6.2).
  • gcc C++ compiler (package "g++" on Debian)
  • zlib library and headers (package "zlib1g-dev" on Debian)

To build, the simplest way is to use the build.sh wrapper script provided. Unpack the tarkit, change to the directory created and type

./build.sh

If the script complains about missing tools are libraries, the Qt installation needs to be specified. There are basically two ways: either a Qt package was configured or installed using the environment provided by TrollTech, or the system provides a Qt4 installtion itself.

In the first case, the actual Qt installation path can be specified with the -qt option: i.e.

./build.sh -qt ~/qt

will locate the Qt include files in ~/qt/include, the Qt library in ~/qt/lib. The installation path is the prefix that was specified on Qt's configure command line.

On LSB (Linux Standard Base) systems, the Qt4 library can be optionally installed. It is common to have different installation directories for include and library files. On Ubuntu 6.10 with Qt4 for example, the libraries are located in "/usr/lib", the development tools like "uic" are installed in "/usr/bin" and the include files reside in "/usr/include/qt4". In this case, use:

./build.sh -qtbin /usr/bin -qtlib /usr/lib -qtinc /usr/include/qt4

Since the above settings are the default, this is equivalent to specifying nothing as shown above.

The build script does not determine the platform to build upon. By default, 32 bit Linux and "gcc" is configured as the build platform. To build for an other platform, use

./build.sh -platform <platform>

The platforms and build variants available are listed with

./build.sh -help

The build script will create the final executable in

./bin.<platform>/klayout

To integrate other build variants, a new file can be created in the "config" subdirectory. This is a partial Makefile that defined the variables specific for a certain build.

To enable Ruby script automation capabilities (RBA), the Ruby library and path to the Ruby headers must be specified for the build script:

build.sh -rblib <ruby library path> -rbinc <ruby headers location>

For example:

build.sh -rblib /usr/lib/libruby1.8.so -rbinc /usr/lib/ruby/1.8/i486-linux

For more details about RBA, see RBA introduction.

Building KLayout for Windows 32 bit with MinGW

Starting with version 0.21, a build setup is provided for MinGW with the gcc. A good starting point for the MinGW build is the Qt SDK which comes with a Qt reaily built for MinGW and the gcc compiler suite.

To enable Ruby support, the Ruby interpreter, preferably version 1.9 is required. A strange fact with building Ruby 1.9 is that one needs a Ruby interpreter to build it. One possible solution is first to build a 1.8 version, put the executable into the path and then run the Ruby build from the MinGW console.

To build KLayout on MinGW, simply open the MinGW shell (MSYS), unpack the KLayout source package and cd to the destination folder. Then use build.sh as on Linux. For example, if the Qt SDK was installed in "c:\Qt\2010.04", the build script call is

build.sh -qt /c/Qt/2010.04/qt

For ruby support use the -rblib and -rbinc options accordingly to specify the ruby installation path.

Building KLayout for Windows 32 bit and 64 bit with Visual Studio

Starting with version 0.21, a Visual Studio solution is included in the source branch of KLayout's source tarkit ("klayout.sln"). The solution is provided for Visual Studio 2010.

To build KLayout with Visual Studio, the following requirements must be fulfilled:

  • Qt for Visual Studio 2010 (VC++ version 10). Currently this version must be built manually. Qt version 4.7.1 is compatible with Visual Studio 2010 and building it is pretty straightforward.
  • For a complete build including Ruby support, the ruby interpreter is required as well. Only version 1.9 is supporting the 64 bit platform. Building is straightforward, except that again a ruby interpreter must be installed before version 1.9 can be built. If no interpreter is at hand, a 1.8 version must be built before. The project files currently assume Ruby version 1.9.1.
    A pre-built package for VS2010 can be downloaded here: ruby1.9.1-p430.zip. It contains both the 32 bit and 64 bit builds in the 1.9.1-p430/x86 and 1.9.1-p420/x64 directories.
  • For full performance, it is recommended to replace the standard STL implementation of VC++ with the STLPort implementation which has a 2x performance impact in some cases. Building STLPort on VC++ is straightforward and has been tested with version 5.2.1.
    A pre-built package for VS2010 can be downloaded here: STLport-5.2.1.zip. It contains both the 32 bit and 64 bit builds.

Before building KLayout, it is required to set the following environment variables:

  • $QTDIR to the installation path of Qt for 32 bit build ($QTDIR/bin being the location of the executables, $QTDIR/lib being the location of the libraries and $QTDIR/include being the location of the header files).
  • $QTDIR64 to the installation path of Qt for 64 bit build ($QTDIR64/bin being the location of the executables, $QTDIR64/lib being the location of the libraries and $QTDIR64/include being the location of the header files).
  • $STLPORT to the installation path of the STLPort library (if required). $STLPORT/stlport must be the location of the headers. This variable is the same for 32 and 64 bit builds.
  • $RUBY to the installation path of the Ruby library (if required) for the 32 bit build. $RUBY/include/ruby-1.9.1 must be the location of the ruby.h header.
  • $RUBY64 to the installation path of the Ruby library (if required) for the 64 bit build. $RUBY64/include/ruby-1.9.1 must be the location of the ruby.h header.

After this preparation, KLayout can be build from Visual Studio using the "Win32" platform for 32 bit and "x64" platform for 64 bit. The configurations provided are:

  • "Debug" for the normal debug build without Ruby and STLPort.
  • "Debug (STLPort)" for the debug build with Ruby support and using STLPort.
  • "Release" for the normal release build without Ruby and STLPort.
  • "Release (STLPort)" for the release build with Ruby support and using STLPort.

All Downloads

PlatformVersionDownload
   
Unix
(source package)
0.21.15 (current)klayout-0.21.15.tar.gz
0.21.14klayout-0.21.14.tar.gz
0.21.13klayout-0.21.13.tar.gz
0.21.12klayout-0.21.12.tar.gz
0.21.11klayout-0.21.11.tar.gz
0.21.10klayout-0.21.10.tar.gz
0.21.9klayout-0.21.9.tar.gz
0.21.8klayout-0.21.8.tar.gz
0.21.7klayout-0.21.7.tar.gz
0.21.6klayout-0.21.6.tar.gz
0.21.5klayout-0.21.5.tar.gz
0.21.4klayout-0.21.4.tar.gz
0.21.3klayout-0.21.3.tar.gz
0.21.2klayout-0.21.2.tar.gz
0.21.1klayout-0.21.1.tar.gz
0.21klayout-0.21.tar.gz
   
Windows 32 bit
(binary package)
0.21.15 (current)klayout-0.21.15-win32.zip (binaries) klayout-0.21.15-win32-install.exe (installer)
0.21.14klayout-0.21.14-win32.zip (binaries) klayout-0.21.14-win32-install.exe (installer)
0.21.13klayout-0.21.13-win32.zip (binaries) klayout-0.21.13-win32-install.exe (installer)
0.21.12klayout-0.21.12-win32.zip (binaries) klayout-0.21.12-win32-install.exe (installer)
0.21.11klayout-0.21.11-win32.zip (binaries) klayout-0.21.11-win32-install.exe (installer)
0.21.10klayout-0.21.10-win32.zip (binaries) klayout-0.21.10-win32-install.exe (installer)
0.21.9klayout-0.21.9-win32.zip (binaries) klayout-0.21.9-win32-install.exe (installer)
0.21.8klayout-0.21.8-win32.zip (binaries) klayout-0.21.8-win32-install.exe (installer)
0.21.7klayout-0.21.7-win32.zip (binaries) klayout-0.21.7-win32-install.exe (installer)
0.21.6klayout-0.21.6-win32.zip (binaries) klayout-0.21.6-win32-install.exe (installer)
0.21.5klayout-0.21.5-win32.zip (binaries) klayout-0.21.5-win32-install.exe (installer)
0.21.4klayout-0.21.4-win32.zip (binaries) klayout-0.21.4-win32-install.exe (installer)
0.21.3klayout-0.21.3-win32.zip (binaries) klayout-0.21.3-win32-install.exe (installer)
0.21.2klayout-0.21.2-win32.zip (binaries) klayout-0.21.2-win32-install.exe (installer)
0.21.1klayout-0.21.1-win32.zip (binaries) klayout-0.21.1-win32-install.exe (installer)
0.21klayout-0.21-win32.zip (binaries) klayout-0.21-win32-install.exe (installer)
   
Windows 32 bit
legacy MinGW based build
(binary package)
0.21.15 (current)klayout-0.21.15-mingw32.zip (binaries)
0.21.14klayout-0.21.14-mingw32.zip (binaries)
0.21.13klayout-0.21.13-mingw32.zip (binaries)
0.21.12klayout-0.21.12-mingw32.zip (binaries)
0.21.11klayout-0.21.11-mingw32.zip (binaries)
0.21.10klayout-0.21.10-mingw32.zip (binaries)
0.21.9klayout-0.21.9-mingw32.zip (binaries)
0.21.8 klayout-0.21.8-mingw32.zip (binaries)
0.21.7klayout-0.21.7-mingw32.zip (binaries)
0.21.6klayout-0.21.6-mingw32.zip (binaries)
0.21.5klayout-0.21.5-mingw32.zip (binaries)
0.21.4klayout-0.21.4-mingw32.zip (binaries)
0.21.3klayout-0.21.3-mingw32.zip (binaries)
0.21.2klayout-0.21.2-mingw32.zip (binaries)
0.21.1klayout-0.21.1-mingw32.zip (binaries)
   
Windows 64 bit
(binary package)
0.21.15 (current)klayout-0.21.15-win64.zip (binaries) klayout-0.21.15-win64-install.exe (installer)
0.21.14klayout-0.21.14-win64.zip (binaries) klayout-0.21.14-win64-install.exe (installer)
0.21.13klayout-0.21.13-win64.zip (binaries) klayout-0.21.13-win64-install.exe (installer)
0.21.12klayout-0.21.12-win64.zip (binaries) klayout-0.21.12-win64-install.exe (installer)
0.21.11klayout-0.21.11-win64.zip (binaries) klayout-0.21.11-win64-install.exe (installer)
0.21.10klayout-0.21.10-win64.zip (binaries) klayout-0.21.10-win64-install.exe (installer)
0.21.9klayout-0.21.9-win64.zip (binaries) klayout-0.21.9-win64-install.exe (installer)
0.21.8klayout-0.21.8-win64.zip (binaries) klayout-0.21.8-win64-install.exe (installer)
0.21.7klayout-0.21.7-win64.zip (binaries) klayout-0.21.7-win64-install.exe (installer)
0.21.6klayout-0.21.6-win64.zip (binaries) klayout-0.21.6-win64-install.exe (installer)
0.21.5klayout-0.21.5-win64.zip (binaries) klayout-0.21.5-win64-install.exe (installer)
0.21.4klayout-0.21.4-win64.zip (binaries) klayout-0.21.4-win64-install.exe (installer)
0.21.3klayout-0.21.3-win64.zip (binaries) klayout-0.21.3-win64-install.exe (installer)
0.21.2klayout-0.21.2-win64.zip (binaries) klayout-0.21.2-win64-install.exe (installer)
0.21.1klayout-0.21.1-win64.zip (binaries) klayout-0.21.1-win64-install.exe (installer)
0.21klayout-0.21-win64.zip (binaries) klayout-0.21-win64-install.exe (installer)
   
MacOS 10.7
(binary package)
0.21.13klayout-0.21.13.intel-lion.dmg (klayout.app, Qt included)
MacOS 10.6
(binary package)
0.21.6klayout-0.21.6.intel-snowleopard.dmg (klayout.app, Qt included)
0.21.4klayout-0.21.4.intel-snowleopard.dmg.zip (klayout.app, Qt included)
0.21.3klayout-0.21.3.intel-snowleopard.dmg.zip (klayout.app, Qt included)
0.21.1klayout-0.21.1.intel-snowleopard.dmg.zip (klayout.app, Qt included)