Quick Start

To use the pre-built example workspace, follow the three steps below. To use the project template system to create a "Hello, World!" project from scratch, see Project Templates.

Step 1

Download the Milescript Compiler, which now includes the example workspace with default xml file configurations. Milescript Compiler Alpha 0.8.1.

Step 2

Unzip the archive into a directory on your system. Your folder structure should look like this...

./
./bin
./doc
./example
./lib
./license
./templates
./KNOWN.ISSUES
./MILESCRIPT.README
./CHANGELOG

Step 3

Open the command console and navigate to the root directory of the Milescript Compiler. Type the following command at the prompt. You will need Java 1.5 or higher installed.

java -jar ./bin/milesc.jar --workspace ./example/example_workspace.xml --monitor

You should see the following output,

Workspace: Starting initial compilation of all projects
-------------------------------------------------------

Workspace: Compiling projects  'graphicsdemo' 'externaldemo' 'libpixelengine' 'lifegame' 'snakegame' 'fisheyedemo'
-----------------------------


Workspace: Compiling project graphicsdemo

Compiling...
Linking...
Static link: 9 of 20 code-generating classes emitted...
Compilation time: 8.109s

Workspace: Compiling project externaldemo

Compiling...
Linking...
Static link: 5 of 16 code-generating classes emitted...
Compilation time: 5.640s

Workspace: Compiling project libpixelengine

Compiling...
Linking...
Compilation time: 7.328s

Workspace: Compiling project lifegame

Compiling...
Linking...
Static link: 10 of 22 code-generating classes emitted...
Compilation time: 6.484s

Workspace: Compiling project snakegame

Compiling...
Linking...
Static link: 15 of 27 code-generating classes emitted...
Compilation time: 5.172s

Workspace: Compiling project fisheyedemo

Compiling...
Linking...
Static link: 6 of 17 code-generating classes emitted...
Compilation time: 5.78s

The workspace is now running in "monitor" mode. For a description of "monitor" mode and other compiler options, see Getting and Using the Milescript Compiler. In this mode, any changes you make to the source files will cause the necessary source files to recompile. To stop the workspace, hit Ctrl-C.

Run the Applications

Now you can open the test.html file in the bin directory of each Milescript project. The Milescript projects are located in the example directory. Each project folder has a bin directory containing the generated JavaScript, a handwritten sample HTML file, and a dependency file. Just open the test.html file in your favorite JavaScript enabled web browser to run the application. If the workspace is still running in continuous-compilation mode and you edit the Milescript source, wait for the compiler to automatically recompile, and then refresh your browser to see the changes.