Skip to main content

Changes to builder-New way to add plugins

No replies
Joined: 2004-07-15
Points: 0

I just extended the builder to hopefully help some of you wanting to add your own code. The definition of all the available commands used to be hard coded into the builder, with a mechanism to add your own plugin. Well, it turns out we have some pretty generic commands already available and we thought that it might be useful to provide more dynamic access to them.

builder will now iterate through all top level directories found in the dir where it is being run, and will look for a file. If it finds one it will parse it and add the commands.

You can also use the -plugins: option to specify an arbitrary file

At the moment the types of commands that can be specified are
- used to find the class specified for all commandName= specified
- Class specified must be a subclass of com.sun.squawk.builder.Command
Target.. =
- Target is a command that is used to build the cldc, and imp modules
-- this command will pre-process source files, compile them, preverify them, and create a classes.jar file
-- the resulting output can be used with rom and romize commands to build suites
- valid s
-- j2me=true
--- if project is intended to be a pre-verified
-- dependsOn=:
--- other commands/targets to build prior to this one
-- extraClassPath=
--- extra class path entries to use for compilation of this module
-- extraSourceDirs=
--- If your source for this module is not contained only in src folder, add entries here
--- see imp/ for an example

What this allows you to do is to have your own J2ME project that you can use to integrate into a Squawk bootstrap suite or other suite. In order to build your project you can do something like
d plugins:../myapp myapp
To clean all, including your project
d plugins:../myapp clean
To build the bootstrap suite and Squawk exe
d rom cldc imp ../myapp
- provided you've built it with the above command

Ok, this took me a while to write as I had forgotten to fix the -plugins: command line to work properly. Lets put it out there and see if this helps anyone :)

PS: I forgot spaces dont work too well to outline things, so added multiple -'s. Will work on figuring out a better layout for when I do this in future.

Message was edited by: eric_arseneau