Updated some documentation.

This commit is contained in:
Matthias Koefferlein 2017-07-29 11:37:58 +02:00
parent 6870de884d
commit a76fccf57b
13 changed files with 140 additions and 8 deletions

View File

@ -59,8 +59,10 @@
</ul>
<p>
Libraries are loaded on startup and reside in memory while KLayout is running. Therefore, in
order to update a library when the content has changed, KLayout must be restarted.
Starting with version 0.25, libraries can be provides through packages. This means, they can be downloaded from some
repository and can be managed within the package manager. Library installation is very simple
this way. Library deinstallation too. See <link href="/about/packages.xml"/> for details
about packages.
</p>
</doc>

View File

@ -60,11 +60,15 @@
<p>
PCell's are usually packed in libraries. PCell libraries can be provided as
shared objects/DLL's (in C++) or as Ruby scripts. Because PCell code is only executed if
required, performance is not absolutely mandatory. A Ruby implementation
required, performance usally is not the main objective. A Ruby implementation
will therefore be sufficient in most cases and
is a much easier to provide. The Ruby approach also benefits from KLayout's integrated development
is a much easier to maintain. The Ruby approach also benefits from KLayout's integrated development
environment.
</p>
<p>
For an introduction into PCell programming with Ruby, see <link href="/programming/ruby_pcells.xml"/>.
</p>
</doc>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -24,6 +24,7 @@
<topic href="/about/about_libraries.xml"/>
<topic href="/about/about_pcells.xml"/>
<topic href="/about/basic_lib.xml"/>
<topic href="/about/packages.xml"/>
<topic href="/about/technology_manager.xml"/>
<topic href="/about/custom_queries.xml"/>
<topic href="/about/rba_notation.xml"/>

View File

@ -30,6 +30,12 @@
menu extension.
</p>
<p>
Macros can be technology specific. This means, they are packaged with a technology and are associated
with the technology in the user interface: if they provide a menu item, this item will only become
visible when the respective technology is active.
</p>
<p>
KLayout also offers an integrated development environment (IDE) that allows editing
and debugging of Ruby and Python scripts. It offers a simple debugger with the ability to set breakpoints and
@ -70,17 +76,31 @@
The "macros" or "pymacros" folders in KLayout's user specific application folder. On Unix that is "~/.klayout/macros".
This is the "local" repository. Any user can store his or her own macros here.
</li>
<li>
Plain Ruby or Python files can be kept inside "ruby" and "python" directories next to "macros" and "pymacros". In
contrast to "macros" and "pymacros", the locations of "ruby" and "python" paths are added to the Ruby or Python
search paths. This makes those folders useful for keeping plain Ruby or Python libraries. Generic ".lym" files cannot
reside there and those locations are not scanned for autorun macros.
</li>
<li>
In addition, further repositories can be given on the command line with the "-j" option. This allows
adding development repositories which are under configuration management and contain the latest code
for the macros. Those repositories are called "project" repositories.
</li>
<li>
Technology folders: each technology folder can carry a "macros" or "pymacros" subfolder where technology-specific
macros are kept. See <link href="/about/technology-manager.xml"/> for details about technologies.
</li>
<li>
Macros can be kept in packages and installed from a remote repository. See <link href="/about/packages.xml"/> for
details about packages.
</li>
</ul>
<p>
The macro IDE will store Python and Ruby macros separately in "macros" and "pymacros" for easier management,
but technically these folders are equivalent. KLayout will automatically derive the interpreter
from the context stored in ".lym" files or the file extension (".rb" or ".py").
from the context stored in ".lym" files or the file extension (".rb" or ".py").
</p>
<p>

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
<doc>
<title>About Packages</title>
<keyword>Packages Manager</keyword>
<keyword>Packages</keyword>
<keyword>Salt</keyword>
<p>
"Salt" is KLayout's package manager which allows selecting and installing packages from a global repository.
Packages make KLayout more tasty. Packages (the "grains") may cover a variety of features:
</p>
<ul>
<li>Ruby or Python macros</li>
<li>DRC runsets</li>
<li>Technologies</li>
<li>Fonts for the Basic.TEXT PCell</li>
<li>Static layout libraries</li>
<li>PCell libraries</li>
<li>Code libraries for Ruby and Python</li>
<li>Binary extensions</li>
</ul>
<p>
Packages can depend on other packages - these are installed automatically if a package requires them and they are not installed yet.
</p>
<p>
Packages are identified by name. A package name needs to be unique in the package universe.
You can use a prefixed name like "www.mydomain.org/nameofpackage" to create a non-ambiguous name.
The choice of the prefix is entirely up to you. You can use a domain name that is owned by
yourself for example.
</p>
<p>
Packages also come with version information, so KLayout can check for updates and install
them if required. KLayout will assume strict upward compatibility. This specifically
applies to packages that other packages are depending on (such as code libraries).
If you need to change them in a non-backward compatible way, you'd need to provide
a new package with a different name.
</p>
<p>
Packages come with some meta data such as authoring information, an optional icon and
screen shot image, license information and more. The more information you provide, the
more useful a package will become.
</p>
<p>
The key component for the package repository is the "Salt.Mine" package repository
service (sami.klayout.org). It is a web service that maintains a package list. It
does not host the packages, but stores links to the actual hosting site. In order
to author a package, you need to upload the package to one of the supported host
sites and register your package on the Salt.Mine page. Registration is a simple
process and the only information required is the link to your host site and a mail
account for confirmation.
</p>
<p>
Currently, GitHub is supported as a host site. As a package author you'll need a GitHub
account and open a project for your package there. GitHub acts both as a code repository
for your development and as a deployment platform. KLayout can download packages directly
from your GitHub project's master or a release tag.
</p>
<h2>The DNA</h2>
<p>
Technically, packages are folders stored below the "salt" folder within KLayout's home
path. Prefixed packages are kept in sub-folders named after the prefix. Each package
directory contains a description file called "grain.xml" and the files that make up the
package. For Ruby macros, for example, the package folder will contain a "macros"
sub-folder. Basically, packages do not require to be of a specific kind - they can
provide technology information, DRC scripts and macros in the same package. In this
example, the will be a "tech", "drc" and "macros" sub-folder with the corresponding
files. KLayout will scan the package folders for useful files and load them automatically.
</p>
<p>
Packages are published on the Salt.Mine server. This is a web service that delivers a
complete list of packages plus a little meta data such as current version, the icon
and a brief description. KLayout will download this list from
"http://sami.klayout.org/repository.xml" by default. You can set the KLAYOUT_SALT_MINE
environment variable to a different URL which makes KLayout use another repository
service, i.e. one inside your own organisation. This service can be any HTTP server
that delivers a package list in the same format than the Salt.Mine package service.
</p>
<p>
When installing a package, KLayout will simply download the files from the URL given
in the package list. KLayout employs the WebDAV protocol to download the files.
This protocol is spoken by Subversion and GitHub with the subversion bridge. The
latter requires a simple translation of the original Git URL's to obtain the
subversion equivalent.
</p>
<p>
For package development you utilize KLayout to initialize and edit the files inside
the package folder or populate the folder manually.
</p>
</doc>

View File

@ -94,9 +94,8 @@
</p>
<p>
Macros and DRC scripts associated with a technology are shown in the technology manager, but
cannot be edited there. The right place to edit, run or debug macros or DRC script is the
macro development environment. To open the macro development environment choose "Macros/Macro Development".
Macros and DRC scripts associated with a technology are shown in the technology manager. To edit
or debug scripts of macros, use the macro development environment ("Macros/Macro Development").
If a technology has a macros or DRC scripts folder, the macro or DRC scripts tree in the
development environment will show a corresponding top-level branch for that technology.
</p>

View File

@ -134,6 +134,7 @@
<file alias="drc_ref_layer.xml">doc/about/drc_ref_layer.xml</file>
<file alias="drc_ref_source.xml">doc/about/drc_ref_source.xml</file>
<file alias="drc_ref_global.xml">doc/about/drc_ref_global.xml</file>
<file alias="packages.xml">doc/about/packages.xml</file>
</qresource>
<qresource prefix="/help/manual">
<file alias="adjust_origin.xml">doc/manual/adjust_origin.xml</file>