@@ -19,10 +19,27 @@ A basic CLI is provided for compiling ActionScript files to SWF files.
1919
2020### Usage
2121
22- For now, it's a simple ` rascal filename.as ` or ` rascal filename.pcode ` , and it will output ` filename.swf ` .
23-
24- This definitely needs some love with more options - including multiple input files, SWF version, optimisation levels,
25- etc.
22+ For full CLI usage, run ` rascal --help ` .
23+
24+ There are two kinds of inputs, and they are intermixable. At least one entry point must be specified: either a script,
25+ or ** one** class with a ` static function main() ` method.
26+
27+ - ` rascal foo.as ` - Compiles a script (not a class, loose code) into a SWF file.
28+ - Multiple script files can be specified, and they will execute in the order they are specified.
29+ - ` rascal -c some.ClassName ` - Compiles a class named ` some.ClassName ` (expected to be available at ` some/ClassName.as ` )
30+ into a SWF file.
31+ - The classpath defaults to working directory, but can be specified via the ` --classpath ` flag.
32+ - Multiple class names can be specified, and they will be loaded in the order they are specified.
33+
34+ Various options about the output are available:
35+
36+ - ` -o foo.swf ` /` --output foo.swf ` - The output SWF file
37+ - This defaults to either the first script file + ` .swf ` , else ` output.swf `
38+ - ` -v 10 ` /` --swf-version 10 ` - The version of SWF file to produce
39+ - This defaults to 15,
40+ which [ corresponds to Flash Player 11.2] ( https://github.com/ruffle-rs/ruffle/wiki/SWF-version-chart )
41+ - ` --frame-rate 30 ` - The frame rate of the SWF file
42+ - This defaults to 24
2643
2744## Library
2845
0 commit comments