Skip to content

How to build WebLaF binaries

Mikle edited this page May 7, 2014 · 10 revisions

Step 1: Download source code

First of all you will need to get WebLaF sources - you can do that using various GitHub features or by downloading sources ZIP archive from the latest release: https://github.com/mgarin/weblaf/releases


Step 2: Install ANT

You will find build.xml file inside project's build folder - this is an ANT build script that can build any of distributions that are available on site (and even some additional ones).

To run this build script you will either need to install ANT or use some modern IDE that includes ANT - here are Intellij IDEA and NetBeans official instructions to run ANT scripts.


Step 3: Use ANT targets

There are a few main ANT targets in WebLaF build script:
build.artifacts - default target, builds all artifacts at once
build.sources.zip - builds Sources.zip and saves it into artifacts folder
build.weblaf.jar - builds WebLookAndFeel.jar and saves it into artifacts folder
build.npe.jar - builds NinePatchEditor.jar and saves it into artifacts folder
build.weblaf.demo.jar - builds WebLookAndFeel_demo.jar and saves it into artifacts folder
build.javadoc - creates library zipped JavaDoc inside artifacts folder and unzipped version in a separate "javadoc" folder
run.npe - build and run NinePatchEditor.jar (Nine-Patch Editor application)
run.weblaf - build and run WebLookAndFeel.jar (library information dialog)
run.weblaf.demo - build and run WebLookAndFeel_demo.jar (library demo application)

Other targets are used to perform various operations required to build artifacts. I doubt you will need them at all.


Step 4: Configure build

You can also find build.properties file inside the build folder - it contains various properties which you might want to change to redirect the output, rename jars or something else. Make sure you know what you are doing, before changing anything there.

Anyway, you always can get a new version of the library from the SVN if you break something ;)