|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
|
<html> |
|
|
<head> |
|
|
|
|
|
|
|
|
<meta name="Description" content="KLayout layout viewer and editor project page" /> |
|
|
<meta name="Keywords" content="KLayout OASIS GDS2 viewer editor layout semiconductor mask chip design" /> |
|
|
<meta name="abstract" content="KLayout is a free layout viewer and editor for several formats commonly used in the semiconductor industry to transfer layout data" /> |
|
|
<meta name="URL" content="https://www.klayout.de/" /> |
|
|
<meta name="Author" content="Matthias Koefferlein" /> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" /> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
|
|
|
|
<title>KLayout Layout Viewer And Editor</title> |
|
|
|
|
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.klayout.de/news.xml"/> |
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/format.css?v2.0"/> |
|
|
<link rel="shortcut icon" href="https://www.klayout.de/favicon.ico"/> |
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/fonts.css"/> |
|
|
|
|
|
|
|
|
<script src="https://www.klayout.de/jquery-3.4.1.min.js"></script> |
|
|
|
|
|
|
|
|
<link href="https://www.klayout.de/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
<script src="https://www.klayout.de/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<div class="klayout-header"> |
|
|
|
|
|
<div class="container mb-5"> |
|
|
|
|
|
<nav class="navbar navbar-dark navbar-expand-lg"> |
|
|
|
|
|
<a class="navbar-brand" href="https://www.klayout.de"><img src="https://www.klayout.de/klayout.png" srcset="https://www.klayout.de/klayout-x2.png 2x" alt="KLayout"></a> |
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbarToggleExternalContent"> |
|
|
|
|
|
<ul class="navbar-nav ml-auto mr-auto"> |
|
|
|
|
|
<li class="nav-item dropdown active mr-4"> |
|
|
<a class="nav-link dropdown-toggle klayout-menu" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
About |
|
|
</a> |
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/intro.html">KLayout Project</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/doc.html">Documentation</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/galleries.html">Galleries</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/credits.html">Credits</a> |
|
|
<div class="dropdown-divider"></div> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/contact.html">Contact</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/impressum.html">Impressum / Imprint</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/privacy_policy.html">Datenschutz / Privacy Policy</a> |
|
|
</div> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/build.html">Get KLayout</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://sami.klayout.org">Package Index</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-5"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/forum">Forum</a> |
|
|
</li> |
|
|
<li class="nav-item active"> |
|
|
<span class="nav-link klayout-menu"> |
|
|
<a href="https://f-si.org"><img src="https://www.klayout.de/f-si_logo_32h_w.png" border="0" title="Free Silicon Foundation" alt="F-Si"/></a> |
|
|
<a class="ml-4" href="https://github.com/KLayout"><img src="https://www.klayout.de/GitHub-Mark-32px-white.png" border="0" title="KLayout on GitHub" alt="GitHub"/></a> |
|
|
</span> |
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> |
|
|
<span class="navbar-toggler-icon"></span> |
|
|
</button> |
|
|
|
|
|
</nav> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="container"> |
|
|
<h1>The Package Cookbook</h1> |
|
|
|
|
|
|
|
|
<div class="warning"> |
|
|
<b>NOTE:</b> This documentation is outdated with respect to GitHub deployment. |
|
|
As GitHub deprecates the Subversion bridge, this deployment path will not longer |
|
|
work as described. A solution is under construction. |
|
|
</div> |
|
|
|
|
|
|
|
|
<p><i>Let there be work, bread, water and salt for all.<br/> |
|
|
-- Nelson Mandela</i></p> |
|
|
|
|
|
|
|
|
<h2>Salt</h2> |
|
|
|
|
|
<p> |
|
|
"Salt"? Without salt, food is often a little tasteless. By adding salt, you make things interesting. |
|
|
"Salt" is KLayout's package manager, "Salt.Mine" is a package index service where |
|
|
new packages are registered, so users will see those packages in their package manager. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Quick links: |
|
|
</p> |
|
|
<ul> |
|
|
<li>Manual page: <a href="doc-qt5/about/packages.html">About Packages</a></li> |
|
|
<li>Salt.Mine package index: <a href="http://sami.klayout.org">http://sami.klayout.org</a></li> |
|
|
</ul> |
|
|
|
|
|
|
|
|
<h2>Starter</h2> |
|
|
|
|
|
<p> |
|
|
The easiest way to create packages is to let KLayout instantiate one from a template. |
|
|
Choose "Manage Packages" from the "Tools" menu. Go to the "Current Packages" page |
|
|
for a list of installed packages. Click on "Create (Edit) Packages" in the bottom |
|
|
right corner. Pick a template you want to start with (for example "Ruby Macro") |
|
|
and chose a package name. |
|
|
The name can be anything, like "mypackage", but it needs to be unique. Hit "Ok" |
|
|
the let KLayout initialize the package. The new package appears in the list of |
|
|
current packages. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Next thing is to supply some basic information. Select the new package if not |
|
|
already selected and press the "Pen" (Edit Package Details) button in the upper |
|
|
right corner. A package should have at least: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>A version</b>: giving a package a version allows KLayout to check for |
|
|
updates and to give the users some information about the maturity of a |
|
|
package (the usual assumption is that higher versions are more mature).</li> |
|
|
<li><b>A title</b>: together with the name the title appears in the package list |
|
|
and should explain briefly the nature of the package.</li> |
|
|
<li><b>A description</b>: a short description of what the package does. |
|
|
The description is shown in the package list below the title.</li> |
|
|
<li><b>Author and Author contact</b>: this is to claim your authorship and give |
|
|
contact details in case users want to praise you personally.</li> |
|
|
<li><b>License</b>: the license model you are using. You should pick one |
|
|
of the common licenses such as GPL (GPLv3) or MIT. Packages are not closed |
|
|
source and everyone can see your code. The license tells us what we can |
|
|
do with your code. A permissive license model means you allow everyone |
|
|
to freely copy and reuse your code.</li> |
|
|
<li><b>Documentation</b>: a link to some documentation page for the users. |
|
|
This link is supposed to provide user documentation for the users of the |
|
|
package. This can be an external link or you can cross-link into the |
|
|
package installation.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
Not required but useful entries are: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>API version</b>: if you know what your Ruby/Python scripts require |
|
|
a certain API version (KLayout version), you can indicate the minimum |
|
|
API requirements here. If you specify 0.25, the package cannot be |
|
|
installed on 0.24 (well, there is no package manager on 0.24 at all - |
|
|
so this is a hypothetical topic).</li> |
|
|
<li><b>An icon</b>: If you're artist enough, you can supply a custom |
|
|
icon. The icon should be PNG format and 64x64 pixels.</li> |
|
|
<li><b>A showcase image</b>: you can supply a screenshot here to |
|
|
give the users some idea what the package will do.</li> |
|
|
<li><b>Dependencies</b>: if your package depends on other packages you |
|
|
can list them in the dependencies section with a version requirement. |
|
|
If the dependencies are not installed already with a sufficient version, |
|
|
the will be installed together with your package.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
Your new package comes with some files already. The file tree in the |
|
|
details page depicts the files that are installed with the package. |
|
|
The templates already come with a fake documentation page. The "grain.xml" |
|
|
is the badge of the package - this is the file that makes a directory a |
|
|
package and holds the package details. Depending on the template, some |
|
|
more folders may be there - like "macros" for a Ruby macro package. These |
|
|
folders are already populated. |
|
|
</p> |
|
|
|
|
|
<h2>Main Course</h2> |
|
|
|
|
|
<p> |
|
|
Get creative now. Use your favorite editor to edit the documentation |
|
|
pages. Edit macros in KLayout macro development IDE - you'll find "Ruby macros" |
|
|
packages in a new section on the "Ruby" tab. Use the technology editor to |
|
|
edit technology packages. Feed the "libraries" folder of static library |
|
|
packages with layout files. Whatever you want. A package can even combine |
|
|
multiple aspects such as technologies, libraries and DRC scripts. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
But wait - what if you damage something? A package is just a folder |
|
|
initially. So unless you create backups there is no way back. Version control |
|
|
is required. KLayout does not come with a built-in client for a versioning system, but there are |
|
|
many choices. Two important ones are easy to use with KLayout: Subversion (SVN) |
|
|
and Git. I assume now that you know how to create a SVN/Git repository or |
|
|
you have the social skills to persuade your favorite geek to set one up for you. |
|
|
If you managed that, the next steps will feel very easy. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If you plan to |
|
|
go public with your project, you can skip the geek part, just go to GitHub and |
|
|
create a project there (preferably with the same name than you package). You'll |
|
|
use Git on GibHub then. This is the only option currently for publishing |
|
|
projects on Salt.Mine. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The basic problem is that there is a non-versioned directory which you |
|
|
need to attach to a versioning system. The local directory is the |
|
|
directory named after your package below the "salt" folder. |
|
|
You see it in the package details as the root of the "Installed files". |
|
|
If your project goes to GitHub, you can follow their nice |
|
|
<a href="https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line">How-to article</a> |
|
|
for connecting an existing folder (the package subfolder in your case) |
|
|
with a Git project. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If you don't want to publish your package but keep it inside your |
|
|
organisation you need to attach to your local server. |
|
|
It's even possible to deploy (publish) packages that way to other |
|
|
users inside your organisation. The |
|
|
<a href="doc-qt5/about/packages.html">About Packages</a></li> manual page |
|
|
explains how. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Regularly commit/push to create new snapshots of your work. Use a meaningful |
|
|
commit message. |
|
|
You can't spoil the soup if you make this a habit - in the worst case, pull an older |
|
|
version and start over again. If you're not familiar with |
|
|
Subversion or Git yourself, remember your social skills. |
|
|
</p> |
|
|
|
|
|
<h2>Desert</h2> |
|
|
|
|
|
<p> |
|
|
You're not creating a package for your own - packages are supposed to be served. |
|
|
The final step is to deploy a package. Deployment is the sweet part - after deployment |
|
|
all you need to do is to wait and collect the praises. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
This is about public releases from GitHub and into the Salt.Mine index. |
|
|
Local deployment is another topic which is covered below. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
There are basically two ways to serve a release. One is to keep the release name the same |
|
|
and increment the version. This approach is easy to implement, but you cannot |
|
|
easily revert back to a previous release. Plus, with Salt.Mine, there is a time span |
|
|
in which the public package index and the package are out of sync. This may become |
|
|
an issue for users that try to install a package during this period. |
|
|
The release names are technically "tags". GitHub |
|
|
creates tags when you use their release feature. You can call the tag for a |
|
|
release "released" (or something alike) and move this tag forward whenever |
|
|
you have a new release. Then, the package details are the only way to tell |
|
|
the version of the package and there can only be one released version. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The other option is to create a new release name for each release. This way you |
|
|
accumulate releases in your repository, but there is nothing wrong with this. |
|
|
But you'll need to point Salt.Mine to the new release. That's an |
|
|
additional step, but it's pretty painless and helps Salt.Mine to keep |
|
|
synchronized with your releases. In this model, you create a new release tag with |
|
|
every release, preferably with the released version as a name. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Basically, having a release tag is all you need to publish |
|
|
a GitHub-hosted package to the world on Salt.Mine. Except one more thing: you'll need a |
|
|
mail account. The mail account is basically the owner of a package and |
|
|
you'll need it to manage your package. You please pick a mail account |
|
|
that has a future life and which you have control over. No throw-away |
|
|
mail accounts or student accounts. Your mail address won't become visible |
|
|
to others. |
|
|
<b>You'll need the mail account for re-registration of a new package release or |
|
|
package revokation, so be sure you remember it.</b> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
A package needs to be registered at Salt.Mine at |
|
|
least once. Registration requires a GitHub project URL and the mail account for confirmation. |
|
|
On the Salt.Mine main page, chose "Register Package" to open the package registration form. |
|
|
The most important information is the package download URL. This is the source where KLayout will |
|
|
download the packages from. The actual URL needs to be formed from the project |
|
|
URL and the tag name. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The project URL can be found in the "Clone or download" box |
|
|
on the GitHub project page. It's an URL looking like <tt>https://github.com/myself/packagename.git</tt> |
|
|
("myself" will be your user name on GitHub and "packagename" the name of your project). |
|
|
To this URL add "/tags/releasename" where "releasename" is the name of your release (for example |
|
|
the version). Example: |
|
|
</p> |
|
|
|
|
|
<pre>https://github.com/klayoutmatthias/qrcode_pcell.git/tags/1.0</pre> |
|
|
|
|
|
<p> |
|
|
Once you submit the request, Salt.Mine will send a mail to the account given on the registration |
|
|
page and ask for confirmation of the request. Once the confirmation is done, the new package |
|
|
will be listed on Salt.Mine and the package becomes visible to all KLayout users. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If you created a new release of an existing package with a new tag name, you just |
|
|
re-register the package with the new URL. |
|
|
<b>Package re-registration</b> uses the same form than package registration. Enter the new URL and |
|
|
the <b>original mail address</b>. In this case, the package ownership is recognized and the original |
|
|
package is replaced by the new version. |
|
|
</p> |
|
|
|
|
|
|
|
|
</div> |
|
|
</body> |
|
|
</html> |
|
|
|
|
|
|