Unix is required. Only Linux has been tested, but most other versions of Unix should be okay.
Ensure you have Perl 5:
$ perl --version
Change to the directory of your working copy:
$ cd working-copy/
(If you have no working copy, then make use of the release repository located at http://reluk.ca/var/db/repo/votorola/. Refer to the instructions at http://reluk.ca/w/Wiki:Revision_control_system.)
Smoke test the build script:
$ votorola/b/build --help
If this is your first build, then it will fail with an error message. The exact fix depends on the error message. Either:
Can't locate MODULE.pm in @INC...
A Perl module is missing. Simply install the module, e.g. from CPAN.
Unable to parse votorola/b/MODULE_config.pl: No such file or directory
A configuration file is missing. Config.pm explains the reason and how to fix it.
When all of the dependencies are in place, the command will run to completion and print a help message:
Usage: votorola/b/build clean votorola/b/build argument* votorola/b/build --help | --man Arguments: clean Deletes all build files. doc Builds the documentation files. Almost all of the source is output, with only lightly filtering to exclude a few unwanted files. javadoc Builds the Java API docs. release Builds the whole of Votorola for release. This is the default. It is equivalent to 'build doc x javadoc'. x Builds the executables. Options: --help Outputs a brief help message and exits. --man Outputs the full manual page and exits. --verbose Increases the level of console output.
Build the code.
$ votorola/b/build
As in the previous step, it may fail if any dependencies are missing. Simply supply the missing dependencies and retry.
Otherwise it simply prints out its progress:
release doc x (compile 480... (jar files 1114... xgwt (compile javadoc (javadoc ...
The code is now built to the out_dir() as defined in your Build_config.pl.
Run the code by setting up a deployment area, except:
During routine development and testing of code, you probably want to enable Java assertions and other checks. This means appending the following options to the 'java' launcher:
-enableassertions:votorola... -Xfuture
How exactly depends on the type of deployment you are testing.
For command line invocations,
you may append the options directly to the command. Or, if you are using
binfmt_misc jar-wrapper
,
consider putting something like this in your vote-server's ~/.bashrc:
export JAR_WRAPPER_OPT="-enableassertions:votorola... -Xfuture"
For servlet deployed code such as WAP and Wicket, you may have to specify them in the configuration of your servlet container. Here's an example conf.d/tomcat-6 for a Gentoo distro.
For GWT deployed code, assertions are automatically enabled when running in devmode. However, they must be explicitly enabled for production builds (e.g. on your dev workstation), as shown is this example GWT_config.pl.