Building Standalone APL Applications
What is a standalone APL application?
If you write an APL application using APLX, you can build a standalone application from it using a facility called the APLX Packager, which is built-in to APLX. This takes an APL workspace, and packages it together with a special runtime version of the APLX interpreter to form a single file which is a program which runs under Windows, Linux or MacOS. You can use this facility to create applications where the users need not be aware that the application was written in APL, and, subject to some simple conditions described in the section Redistribution of Standalone Applications, you can distribute the application to other people without having to pay a royalty to MicroAPL.
Note: The APLX Packager is not available in the free Evaluation or Personal Edition versions of APLX. You need to purchase the appropriate full version of APLX to create standalone applications.
Creating the standalone executable file
To create a standalone application, you should first develop and test your APL workspace as normal on the target platform (Windows, MacOS or Linux), ensuring that you have set
Then you simply select the 'Save As..' option from the APLX File menu, and use the drop-down menu in the dialog to select the save format to be "Executable (packaged WS)":
You can use any name which the operating system permits under MacOS or Linux; under Windows, the name must end in '.exe' (this will be added automatically).
An example of a simple standalone application and the workspace from which it was created is supplied with APLX. The workspace is 10 PACKAGEDEMO and the standalone application is 'SampleApp.exe' (under Windows) or 'SampleApp' under MacOS and Linux. The packaged application can be found in the /bin directory of the APLX installation.
Under Windows, the end-user needs two DLLs (Dynamic Link Libraries) to run the application. The library aplxrun4.dll is supplied with your copy of APLX, and can be distributed with your application code. A second library called APLXSupport4.dll is also needed; this is available free of charge (subject to a licence agreement) from the MicroAPL website http://www.microapl.co.uk/apl/player. Both DLLs should be installed in one of the following locations:
So that you can test your application, the DLLs are installed as part of the full version of APLX.
Under Linux, the end-user needs a file called APLXSupport4 in order to run the application. Again this is available free of charge (subject a licence agreement) from the MicroAPL website http://www.microapl.co.uk/apl/player. It should be installed in one of the following locations:
So that you can test your application, APLXSupport4 is installed as part of the full Linux version of APLX.
Under MacOS, the application you build in this way is completely self-contained; all of the APLX files and libraries required to run it are included in the application file.
Before saving the workspace as an executable, it is a good idea to set the preferred workspace size which will be used when the application runs. You can do this using
File types and icons
Under MacOS, your application will by default have a type 'APPL' but a blank signature. This means that it will not respond to document files being dragged on to it, or double clicked. If you want to handle events of this kind, you will need to use Apple's ResEdit (or a similar tool) to set up the BNDL resource for your packaged application, and set the file signature to a unique four-character code. You can also use ResEdit to define a custom icon for your program.
Under Windows, your application will by default have the standard Windows icon for an executable file, and will have no file types associated with it. If you create a Shortcut to the application (by right-clicking on the program name), you can select a different icon for the shortcut. You can associate one or more document file types with the application by double-clicking on a sample file and selecting your application as the one to associate with the file type.
Copyright © 1996-2010 MicroAPL Ltd