Zuild

Zuild is a small util to create ZIP and JAR files with script files. All my JAR files on this site was built with Zuild (this version or an earlier version).

Version: 2.0
Language: English
Requirements: Java 1.2
Start command:
java Zuild script_file
Download: Zuild.java (20 kB)

Zuild is from version 2 open source and distributed under GNU GPL. Download the source code above or fetch it compiled.

What's new?

2006-01-22: Version 2.0 released! Zuild has got full support for wildcards (simple regular expressions) and have become open-source. The script syntax has some small changes.

How to write Zuild scripts

The script file is a plain text file. On every line you can write one command. The different types of commands are explained below.

Empty lines are ignored. Lines that begin with ; (semicolon) are comment lines. They are ignored by Zuild as well.

The first thing you need to do in a Zuild script file is to specify source and target. The source is a directory and the target is a zip file. The syntax for target is:

target;level

Example:

C:\Java\Zuild2\src.jar;9

This will start a new ZIP or JAR file. target is the name, including path, for the ZIP or JAR file that should be written. Note: If the file already exists, it will be overwritten! If it is a JAR file, a minimal manifest will be written to the file. level is the compression level from 0 (no compression) to 9 (maximum compression). To enable store mode, set level to -1.

The source directory is specified trough having a line with the absolute path to the directory. Example:

C:\Java

This command sets the directory to read entries from (in the example C:\Java). The directory itself won't be included in the archive. Please note that this must be an absolute path; that is a path that goes all the way up to the root directory.

The syntax for adding files is:

[relative_path\]file_or_group

Examples:

Zuild.class
*.java
images\?.png

This command will add one or multiple entries from the source directory. A relative_path is specified if the file or the files not directly are located in the source directory. Note that this must be a relative path. file_or_group is one of the following:

A small but complete script file can look like this:

; Example
C:\Java
C:\Archives\zuild.zip
Zuild2\Zuild.class
Zuild2\*.java