💾 Archived View for blitter.com › apl-books › APLX50 › APLX-manual › www.microapl.com › apl_help › c… captured on 2023-01-29 at 14:38:07.

View Raw

More Information

⬅️ Previous capture (2022-07-17)

-=-=-=-=-=-=-

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Building Standalone APL Applications</TITLE>
<META NAME="DESCRIPTION" CONTENT="APL language help page: Building Standalone APL Applications">
<META NAME="KEYWORDS" CONTENT="standalone application,application,packager,runtime,executable, APLXSupport.dll,apl,aplx,apl help">
<!-- %%COMMON_HEAD%% -->
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="http://www.microapl.com/styles_apl_help.css">
<!-- %%END%%-->
</HEAD>
<body>
<table>
<tr>
<td width="800" valign="top" colspan="2">
<center>Topic: <A HREF="ch.htm">APLX Help</A> : <A HREF="ch_110.htm">Standalone APL Applications</A> : <A HREF="ch_110_010.htm">Building Standalone APL Applications</A>
</center>
<center>
[<A HREF="ch_110_020.htm">Next</A> | <A HREF="ch.htm">Contents</A>  | <A HREF="help_index.htm">Index</A>  | <A HREF="http://www.microapl.co.uk/apl/index.html">APL Home</A> ]</center>
<br></td>
</tr>
<tr>
<td width="120">
<a href="http://www.microapl.co.uk/apl/index.html"><img height="68" border="0" width="119" src="MicroAPL_logo.gif" alt="www.microapl.co.uk"></a>
</td>
<td align="left" valign="bottom">
<h1>Building Standalone APL Applications</h1>
</td>
</tr>
<tr>
<td width="800" valign="top" colspan="2">
<hr>
<H2>What is a standalone APL application?</H2>
<p>If you write an APL application using APLX, you can build a standalone application from it using a facility called the <i>APLX Packager</i>, 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 <a href="ch_110_040.htm">Redistribution of Standalone Applications</a>, you can distribute the application to other people without having to pay a royalty to MicroAPL.</p>

<p>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.</p>

<H2>Creating the standalone executable file</H2>
<p>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 <code>&#9109;LX</code> so that it starts automatically when it is loaded.</p>
<p>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)":</p>
<center><img src="saveas.jpg" width="428" height="266" border="0"></center>
<p><br></p>
<p>You can use any name which the operating system permits under MacOS or Linux; under Windows, the name must end in <tt>'.exe'</tt> (this will be added automatically).</p>

<p>An example of a simple standalone application and the workspace from which it was created is supplied with APLX.  The workspace is <tt>10 PACKAGEDEMO</tt> and the standalone application is <tt>'SampleApp.exe'</tt> (under Windows) or <tt>'SampleApp'</tt> under MacOS and Linux. The packaged application can be found in the <tt>/bin</tt> directory of the APLX installation.</p>


<H2>Support libraries</H2>

<H3>Windows</H3>
<p>Under Windows, the end-user needs two DLLs (Dynamic Link Libraries) to run the application.  The library <tt>aplxrun4.dll</tt> is supplied with your copy of APLX, and can be distributed with your application code. A second library called <tt>APLXSupport4.dll</tt> is also needed; this is available free of charge (subject to a licence agreement) from the MicroAPL website <a href="http://www.microapl.co.uk/apl/player">http://www.microapl.co.uk/apl/player</a>.  Both DLLs should be installed in one of the following locations:</p>
<ul>
<li>In the same directory as your standalone application;
<li>In the standard Windows DLL path;
<li>In the <tt>/bin</tt> directory of the standard APLX installation.
</ul>
<p>So that you can test your application, the DLLs are installed as part of the full version of APLX.</p>

<H3>Linux</H3>
<p>Under Linux, the end-user needs a file called <tt>APLXSupport4</tt> in order to run the application.  Again this is available free of charge (subject a licence agreement) from the MicroAPL website <a href="http://www.microapl.co.uk/apl/player">http://www.microapl.co.uk/apl/player</a>.  It should be installed in one of the following locations:</p>
<ul>
<li>In the same directory as your standalone application;
<li>In the standard Linux executable path;
<li>In the <tt>/bin</tt> directory of the standard APLX installation.
</ul>
<p>So that you can test your application, APLXSupport4 is installed as part of the full Linux version of APLX.</p>

<H3>MacOS</H3>
<p>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.</p>

<H2>Workspace size</H2>
<p>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 <code><A HREF="ch_020_070_120.htm">7 &#9109;CONF</A></code>.</p>


<H2>File types and icons</H2>
<H3>MacOS</H3>
<p>Under MacOS, your application will by default have a type <tt>'APPL'</tt> 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 <tt>BNDL</tt> 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.</p>

<H3>Windows</H3>
<p>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.</p>

<hr>
</td>
</tr>
<tr>
<td width="800" valign="top" colspan="2">
<center>Topic: <A HREF="ch.htm">APLX Help</A> : <A HREF="ch_110.htm">Standalone APL Applications</A> : <A HREF="ch_110_010.htm">Building Standalone APL Applications</A>
</center>
<center>
[<A HREF="ch_110_020.htm">Next</A> | <A HREF="ch.htm">Contents</A>  | <A HREF="help_index.htm">Index</A>  | <A HREF="http://www.microapl.co.uk/apl/index.html">APL Home</A> ]</center>
<br></td>
</tr>
</table>
<!-- %%COMMON_BODY_TAIL%% -->
<p class="copyright">Copyright &copy; 1996-2010 MicroAPL Ltd</p>
<!-- %%END%% -->
</body>
</html>