-
Notifications
You must be signed in to change notification settings - Fork 4
Ref AppletCompiler
Justin Fyfe edited this page Jan 28, 2018
·
1 revision
The applet compiler is a tool which will bundle your AngularJS controllers, views, models, business rules, protocols, reports, and other assets into a single compressed PAK file for distribution.
The applet compiler will also optionally sign the package using your signing key.
Tool: appletcompiler.exe
The following parameters are supported by the applet compiler:
| Option | Description | Example |
|---|---|---|
| deploy | Deployes the rendered applet files to an HTTP server location | --deploy=/srv/www/htdocs |
| lang | The language to pre-render deployed output files in | --lang=en |
| c | Instructs the compiler to clean the output directory | |
| source | The source files / directory to include in the applet | --source=c:\myapplet |
| output | The destination PAK file that should be created | --output=myapplet.pak |
| help | Display application help and exit | |
| include | Includes / references files from another applet pak file | --include=org.openiz.core.pak |
| optimize | When provided, instructs the applet compiler to minify javascript and css files | |
| keyFile | Specifies the location of your signing key (in PFX format) | --keyFile=mykey.pfx |
| keyPassword | Specifies a file where the password to unlock your private key can be found | --keyPassword=mykey.password |
| compile | Instructs the applet compiler to compile the --source directory into --output pak flie | |
| sign | Instructs the applet compiler to sign an exsiting --source pak file and output it to --output pak file | |
| embedCert | Instructs the applet compiler to embed a copy of the public key into the PAK file (recommended for deployments) | |
| compression | Changes the compression algorithm from DEFLATE to an alternate method (lzma, gzip, bzip2, defalte) | --compression=lzma |
To publish your applet it is recommended you first obtain a code signing certificate (PFX file) either from MEDIC or generate your own steps here.
Creating an Unsigned Applet (Debugging Only)
To create an unsigned applet:
- Ensure your manifest.xml file is accurate including version, package id, etc.
- Run the applet compiler as follows:
appletcompiler --source=C:\myapp --output=myapp.pak - Upload myapp.pak to your OpenIZ IMS server
- Join your OpenIZ IMS server with the disconnected client
- Your IMS server may not start or may refuse to load unsigned applets. If this is the case either configure your IMS server to allow unsigned applets or sign your applet
- Notice that your disconnected client will warn you that the package is not signed
- Note that contents of the file can be accessed by using
DisconnectedClient --debug, no minifcation has occurred.
Creating a Production Applet
To create a production (optimized) applet:
- Ensure your manifest.xml file is accurate including version, packagte id, etc.
- Run the applet compiler as follows:
appletcompiler --source=C:\myapp --output=myapp.pak --optimize --keyFile=C:\keys\mykey.pfx --embedCert - When prompted enter the private key password for your PFX file
- Alternately you can save the password in a file and use --keyPassword parameter (make sure the key password file and PFX file are kept out of source control)
- Upload myapp.pak to your OpenIZ IMS server
- Join your OpenIZ IMS server with the disconnected client
- Your IMS server may not start or may refuse to applets signed from third party keys. If this is the case add the thumbprint of your signing key to <trustedPublishers>
- The disconnected client may warn that the application is from an unknown publisher
- Note that contents of the controller files are minified, so running
DisconnectedClient --debugwill require un-minification tools to debug.
- Setup & Installation
- For Developers
- Reference Pages