Install and Redistribute

# Windows

Note
  By choosing to install the PST SDK, the PST Interface Service will not be installed as a Windows service. This means that it will not be possible to start the PST-Client application without first starting the PST-Server application manually from the Windows Start menu. This is done because running an application using the PST SDK while the PST Interface Service is running at the same time can cause conflicts.

There are two different Windows installers available. One installs the 32 bit (x86) version of the PST Software Suite and the other one installs the 64 bit (x64) version of the PST Software Suite. Choose which one to use based on the platform you are developing for. The PST SDK is also available as a portable stand alone container which only contains the files from the `Development` folder from the installer.

The PST SDK is installed by selecting the SDK component from the PST installer. This will create a `Development` directory inside the installation directory. The `Development` directory is structured as follows:

- `Assemblies`: The PST-SDK C# assembly.
- `docs`: This documentation.
- `Drivers`: The drivers required to connect to the different types of PST Trackers.
  - `PST`: The driver used for the standard PST Iris and PST Base trackers.
  - `PST-HD`: The driver used for the PST Iris HD, PST Base HD and PST Pico trackers.
- `examples`: Several examples explaining how to use the C++, C, C# and Python APIs.
- `include`: The header files needed to work with the C and C++ APIs.
- `lib`: The lib file needed to link to the C and C++ APIs.
- `python`: The sources of the Python API.
- `Redist`: The dll files and miscellaneous files required to run an application that is using the C or C++ APIs.

When the stand-alone PST SDK package is used, all subfolders of the Development folder will be placed directly in the root folder.

## Redistribution on Windows

### Windows Installer

Redistribution of the PST SDK can be done in two ways. The first one is by redistributing the complete PST installer application. This way, an end user will get all the required components automatically, but it is likely that the package contains components that are unnecessary to make the end-user application work.

### Windows Files

The second way of redistribution is to package a copy of the required files together with the installer of the end-user application. This way only the files that are necessary for the specific use case of the end-user application will be redistributed, lowering the overhead. Depending on which PST Tracker is used, a different set of files will need to be redistributed. The table below shows which files need to be redistributed in which use case.

- The Base (C++) files should always be redistributed in order to make the PST SDK work. They are sufficient when using the C++ API.
- The C file is additionally required when using the C API.
- The C# files are additionally required when using the C# API.
- The Python files are additionally required when using the Python API.
- The PST files are only necessary when making use of a standard PST Iris or PST Base tracker.
- The PST HD files are only necessary when making use of a PST Iris HD, a PST Base HD or a PST Pico tracker.
- The PST-Client files are only necessary if the end-user application should be used in combination with the PST-Client application. This would for example be the case if the PST-Client is used for tracker initialization and tracking target training.
- The PST REST Server executable is only necessary if the end-user application should be used in combination with the stand-alone PST REST Server.

File | Base (C++) | C | C# | Python | PST | PST HD | PST-Client | REST
--- | --- | --- | --- | --- | --- | --- | --- | ---
`libcurl.dll` |  |  |  |  |  |  | X |
`pst-client.exe` |  |  |  |  |  |  | X |
`pst-rest.exe` |  |  |  |  |  |  |  | X
`V3D.dll` |  |  |  |  |  |  | X |
`Development\Redist\baslercameraplugin.dll` |  |  |  |  |  | X |  |
`Development\Redist\basler_ace.xml` |  |  |  |  |  | X (HD only) |  |
`Development\Redist\basler_dart.xml` |  |  |  |  |  | X (Pico only) |  |
`Development\Redist\CameraLibrary2015D.dll`1 |  |  |  |  | X |  |  |
`Development\Redist\Freeimage.dll` | X |  |  |  |  |  |  |
`Development\Redist\GCBase_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\GenApi_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\iris120cameraplugin.dll` |  |  |  |  | X |  |  |
`Development\Redist\iris_120.xml` |  |  |  |  | X |  |  |
`Development\Redist\Log_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\MathParser_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\nlopt-0.dll`2 | X |  |  |  |  |  |  |
`Development\Redist\NodeMapData_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\PocoFoundation.dll` | X |  |  |  |  |  |  |
`Development\Redist\PocoJSON.dll` | X |  |  |  |  |  |  |
`Development\Redist\PocoNet.dll` | X |  |  |  |  |  |  |
`Development\Redist\pstsdk_cpp.dll` | X |  |  |  |  |  |  |
`Development\Redist\PylonBase_v6_0.dll` |  |  |  |  |  | X |  |
`Development\Redist\PylonUsb_v6_0_TL.dll` |  |  |  |  |  | X |  |
`Development\Redist\uxapi_v11.dll` |  |  |  |  |  | X |  |
`Development\Redist\XmlParser_MD_VC141_v3_1_Basler_pylon.dll` |  |  |  |  |  | X |  |
`Development\Redist\pstsdk_c.dll` |  | X | X | X |  |  |  |
`Development\Assemblies\netstandard2.0\PSTech.Pstsdk.dll` |  |  | X |  |  |  |  |
`Development\python\pstech\*`3 |  |  |  | X |  |  |  |
`Development\python\setup.py`4 |  |  |  | X |  |  |  |
`Development\python\pyproject.toml`4 |  |  |  | X |  |  |  |

1Called `CameraLibrary2015x64D.dll` for the 64 bit version.
2Called `nlopt.dll` for the 64 bit version.
3Either a self-created binary of the Python API, or all files within `Development\python\pstech` should be distributed.
4`setup.py` and `pyproject.toml` are not mandatory, but are recommended to distribute when you are not distributing a binary of the Python API.

When the stand-alone PST SDK package is used, all subfolders of the Development folder will be placed directly in the root folder.

### Windows Drivers

Depending on which PST Tracker will be used in the end-user application, a different driver will need to be installed on the end-user machine.

For the standard PST Iris or PST Base, the files located in the `Development\Drivers\PST` directory should be used. When the PST SDK is deployed from the stand-alone PST SDK package, the Drivers folder can be found directly in the root folder. Depending on the target operating system, the following commands can be used to install the driver:

- For a 64bit OS: `dpinst64.exe /c /f /sw /PATH npusbio_x64`
- For a 32bit OS: `dpinst32.exe /c /f /sw /PATH npusbio` (only available in the 32 bit installer)

For the PST Iris HD, the PST Base HD and the PST Pico, the `pylon_USB_Camera_Driver.msi` file located in the `Development\Drivers\PST-HD` directory should be used. Executing this installer package will automatically install the required driver for the PST HD and Pico Trackers.