-
Notifications
You must be signed in to change notification settings - Fork 4
Compiling
Inside your /path/to/hemlock/src/ directory, look inside the config/ directory. Duplicate the environment.as-example file as environment.as.
Via environment.as, you can customize configurations and constants for your local development environment. If you make any important changes here that everyone else needs for running an app, add these changes to environment.as-example (and other similarly named files) and commit them. Do not add your environment.as to the repository.
You can use mxmlc to compile ActionScript in a given application’s main class file to create a SWF file. For instance, you can compile the PersonMostLikely app like so:
cd /path/to/hemlock/src/
mxmlc com/mintdigital/personMostLikely/PersonMostLikely.asThis compiles the file com/mintdigital/personMostLikely/PersonMostLikely.swf, which you can run in your browser with the Flash plugin, or with a standalone Flash Player desktop app.
During development, you should always run mxmlc with debugging enabled:
mxmlc -compiler.debug=true com/mintdigital/personMostLikely/PersonMostLikely.asThe utility opens a given SWF in the standalone Flash Player desktop app, and opens a command-line console for logging ActionScript messages given by the trace() command. However, this console will only work if you compiled the SWF file with debugging enabled! To do this, you should always run mxmlc with the -compiler.debug=true option mentioned above.
- Add this to your
~/.profileor equivalent for quick debugging:Then, from yourmf(){ mxmlc -compiler.debug=true -compiler.source-path=. -compiler.fonts.managers=flash.fonts.AFEFontManager ${1}.as && fdb ${1}.swf; }/path/to/hemlock/srcdirectory, you can use this command to compile an app (like PersonMostLikely) with mxmlc and run it with fdb:In the example command above, note the lack of themf com/mintdigital/personMostLikely/PersonMostLikely.asextension. The last item in the path is the app’s name. - To test an app with multiple users logged in at once, you can open the SWF file in the Flash Player standalone app, and another copy in your browser (with the Flash plugin installed). Be sure to create additional local accounts as needed.