Using the "aionbuilder" GUI utility to build AION BRE applications on Unix:

Document ID : KB000055595
Last Modified Date : 14/02/2018
Show Technical Document Details

aionbuilder is a Java-based tool to build AION BRE applications (app files) on Unix. On the Windows platform, the AION BRE IDE is used to build the apps. One neat feature of the IDE is that if the app being built includes a number of other (included) user apps, then building the top level app from the IDE also builds the included apps. This is convenient when there are a large number of such apps because doing it manually can be tedious.

The IDE is not available on Unix, so most of the developers use the command-line build utility "respawn" to build the apps. The developer has to manually run "respawn" a number of times (in the right order) if the top-level app includes user-written included-apps because "respawn" does not automatically build the included apps on which the main app is dependent. It is in this scenario the aionbuilder utility can come in handy on UNIX because just like the IDE counterpart, the aionbuilder utility can figure out that the top-level app uses the included apps and will build them automatically when the top-level app is built.

This document assumes that the AION BRE developer connects to the remote UNIX box using some kind of remote connectivity software (e.g. Hummingbird Exceed etc) from a Windows machine. Basically, you will need to have the ability to display an X Window on your UNIX terminal since the aionbuilder utility is a GUI-based tool.

We will take one of the example apps ($AION_HOMEexamples/DynaRule/NPDRule) provided with AION BRE and try to build it on a UNIX box using aionbuilder. The NPDRule example has 2 apps:

  1. npdrules.app - the top level app.

  2. nplib.app - the included app used by npdrules.app.

For the sake of demonstration, we will assume that the Unix box is a Solaris machine.

Steps to build the NPDRule example using aionbuilder on Solaris:

  1. Since the development of the AION BRE apps is done on the Windows platform, before you FTP the apps on to the Solaris machine to do the builds, set the "Executable Directory" in the top-level app (npdrules.app) in the AION BRE IDE:


    Open npdrules.app in the IDE, select the Classes tab, then choose Logic, Properties, Directories. Enter a directory name (e.g.: "../appbuild") under "Executable Directory". Notice that since we are doing the build on Solaris (Unix), we need to use the "forward slash" as directory separator.

    Figure 1

    Click OK. Save and close the app.

  2. FTP the 2 apps to the Solaris machine into a directory called NPDRule.

    $ cd NPDRule
    $ ls
    npdrules.app npdrules.txt nplib.app

    Set the AION BRE environment in the Solaris terminal. Once the environment is set, the AION_HOME variable points to the AION BRE installation directory. And the PATH variable contains $AION_HOME/bin among other things. You should also make sure that "java" is in the PATH because "java" is used to launch the aionbuilder utility.

    Also, ensure that the DISPLAY environment variable is set :
    $echo $DISPLAY
    138.42.165.103:0.0

  3. The aionbuilder utility is started using the runbuilder.sh script (in $AION_HOME/bin). From the NPDRule directory, launch the aionbuilder utility using the command:

    $ runbuilder.sh &

    This will bring up the following window:

    Figure 2

  4. Choose File->Open ... and select the "npdrules.app".

    Figure 3

    Click OK.

    Since this is the first time we are opening the app, it will be restored first.

    Figure 4

    Click OK. aionbuilder will restore the npdrules.app and the included apps, if necessary.

    Figure 5

    npdrules.app is now opened in aionbuilder.

  5. With the npdrules.app open in aionbuilder, click on File->Build to build the app.

    Figure 6

    This will first build the included library nplib.app and then the npdrules.app.

    Figure 7

    Since we specified an "Executable Directory", once the build is done, aionbuilder will copy all the relevant libraries to the "../appbuild" directory.

    $ls appbuild

    lrwxrwxrwx 1 bhoki01 pduser 12 Mar 31 18:23 libreutil10.so -> reutil10.dll

    lrwxrwxrwx 1 bhoki01 pduser 11 Mar 31 18:23 libresys10.so -> resys10.dll

    -rwxr-xr-x 1 bhoki01 pduser 359964 Mar 31 18:23 resys10.dll

    -rwxr-xr-x 1 bhoki01 pduser 55076 Mar 31 18:23 reutil10.dll

    lrwxrwxrwx 1 bhoki01 pduser 9 Mar 31 18:23 libnplib.so -> nplib.dll

    lrwxrwxrwx 1 bhoki01 pduser 11 Mar 31 18:23 libreldr10.so -> reldr10.dll

    lrwxrwxrwx 1 bhoki01 pduser 12 Mar 31 18:23 librelsys10.so -> relsys10.dll

    -rwxr-xr-x 1 bhoki01 pduser 23292 Mar 31 18:23 nplib.dll

    -rwxr-xr-x 1 bhoki01 pduser 308708 Mar 31 18:23 reldr10.dll

    -rwxr-xr-x 1 bhoki01 pduser 9184 Mar 31 18:23 _npdrules

    lrwxrwxrwx 1 bhoki01 pduser 12 Mar 31 18:23 libnpdrules.so -> npdrules.dll

    -rwxr-xr-x 1 bhoki01 pduser 74440 Mar 31 18:23 npdrules.dll

    -rwxr-xr-x 1 bhoki01 pduser 211468 Mar 31 18:23 relsys10.dll

    The application is now built. You can execute the example by running the "_npdrule" executable from the "appbuild" directory.

  6. Close the npdrules.app using File->Close.

  7. Close the aionbuilder utility using File->Exit.