• No results found

7 Distributing a High Level API Application The same user application can be deployed under either the Windows or Linux operating systems (OSs) The

differences between the two OSs are:

• The applications must be compiled and linked under the appropriate OS. • Different library files must be redistributed.

7.1 Distributing a PIKA High Level API Application on

Windows

To distribute a user application based on the high level API to a Windows deployment platform, perform the following steps.

1. Install the low level API redistribution libraries as described in the PIKA Low Level API Programmer's Guide. 2. Install the HMP drivers as described in the PIKA Low Level API Programmer's Guide, including restarting the

computer.

3. Install any required boards as described in the PIKA HMP Getting Started Guide. 4. Install the high level API libraries in C:\Windows\System32 on the deployment platform.

The redistribution files can be found in hmpinstalldirectory\redist where the default for hmpinstalldirectory is C:\Program Files\PIKA\hmp. There are redistribution files for each of the following operating systems:

Windows XP and Windows Server 2003 32-bit - hmpinstalldirectory\redist\xp_2k3\win32 • Windows 7 32-bit - hmpinstalldirectory\redist\7\win32

Windows 7 and Windows Server 2008 64-bit - hmpinstalldirectory\redist\7_2008R2\x64

You need to install the following libraries. You can install either the versions from the redistribution directory for the operating system running on the deployment platform, or, if you have modified the GP source, your own versions of these libraries.

• pikagpapi.dll • pikagpgwy.dll

If your application requires SIP support, you need to install the following libraries from the redistribution directory for the operating system running on the deployment platform. Note that building the GP source does not build these libraries.

• libpikasipsrv.dll • libpikasipua.dll

5. Set the environment variables (optional).

• If the configuration files or log files are going to be placed in locations other than the default folders, the appropriate environment variable must be set to the new location.

Environment

Variable

Description

Default Used If No Value Is Assigned to the

Environment Variable

PKH_BASE_DIR Specifies the directory where the HMP SDK was installed.

C:\Program Files\PIKA\hmp

PKH_LOGS_DIR Specifies the base directory under which the log files are written. A separate

sub-directory is created for each run of the user application.

Windows XP/Windows Server 2003: PKH_BASE_DIR\logs Windows 7/Windows Server 2008:

C:\ProgramData\PIKA\hmp\logs

PKH_CONF_DIR Specifies the directory where the pika.cfg file is located.

Windows XP/Windows Server 2003: PKH_BASE_DIR\conf Windows 7/Windows Server 2008:

C:\ProgramData\PIKA\hmp\conf

6. Install the configuration files. Copy the configuration files to the directory specified by the PKH_CONF_DIR environment variable.

7. Install the user application.

8. Generate and install the license keys as described in the PIKA HMP Getting Started Guide. 9. Restart the deployment platform.

7.2 Distributing a PIKA High Level API Application on

Linux

To distribute a user application based on the high level API to a Linux deployment platform, perform the following steps.

1. Install the low level API redistribution files as described in the PIKA Low Level API Programmer's Guide. 2. Install any required boards.

3. Install the high level API libraries.

• Copy the following files to the directory /usr/lib (32-bit operating systems) or /usr/lib64 (64-bit operating systems) on the deployment platform, where x.y.z is the release version number. You can build the GP libraries on the deployment platform as described in Building the High Level API Libraries in Linux (pg. 139) or you can copy library files from your development computer. Ensure that you use the correct libraries for the operating system running on the deployment platform.

• libpikagpapi.so.x.y.z

• libpikagpgwy.so.x.y.z

• If the user application uses SIP, install the SIP plug-in libraries. Separate files for 32-bit and 64-bit operating systems are provided as part of the HMP installation. However, only the files for the operating system running when HMP was installed are provided. If you need the files for a different operating system, you must run the installer on the corresponding operating system. Copy the following files from hmpinstalldirectory/plugins/64-bit to /usr/lib64 or

hmpinstalldirectory/plugins/32-bit to /usr/lib, depending on the operating system running on the deployment platform. • libpikasipsvr.so.x.y.z

• libpikasipua.so.x.y.z

4. Set the environment variables (optional).

• If the configuration files or log files are going to be placed in locations other than the default location, the appropriate environment variable must be set to the new location.

Environment

Variable

Description

Default Used If No Value Is Assigned to the

Environment Variable

PKH_BASE_DIR Specifies the directory where the HMP SDK was installed.

/usr/share/pika/hmp

PKH_LOGS_DIR Specifies the base directory where the log files are written. A separate sub-directory is created for each run of the user application.

/var/log/pika

PKH_CONF_DIR Specifies the directory where the configuration files are located.

/etc/pika

NOTE: Some systems require the current user to log out before new environment variables are available.

5. Install the configuration files. Copy the configuration files to the directory /etc/pika or the directory specified by the PKH_CONF_DIR environment variable.

• Ensure that you include the configuration files in hmpinstalldirectory/grandprix/conf as well as the configuration file specific to your application.

6. Install the user application.

7. Generate and install the license keys as described in the PIKA HMP Getting Started Guide. 8. Restart the deployment platform.

8 Advanced Topics