This is the installation manual for LIBPF™ SDK (LIBrary for Process Flowsheeting Software Development Kit) version 1.0 on Microsoft Windows operating systems, for the model developer who wants to install a LIBPF SDK she received, that has been packaged by a LIBPF core developer.

Mandatory prerequisites

LIBPF™ development on Microsoft Windows is supported on the following versions and platforms:

  • Microsoft Windows 7 32-bit (x86) and 64-bit (amd64);

  • Microsoft Windows 8 or 8.1 32-bit (x86) and 64-bit (amd64);

  • Microsoft Windows 10 64-bit (amd64).

To develop models with the LIBPF™ SDK, as a minimum you need:

  1. A supported C++ compiler / Integrated Development Environment (IDE);

  2. The boost C++ libraries.

Compiler

The currently supported C++ compiler / IDE is Microsoft Visual Studio C++, either version 2013 or version 2015. Get it for free from http://www.visualstudio.com/downloads/download-visual-studio-vs, either the Community (preferred) or the Express version.

Alternatively you can use the compiler from Visual Studio, but Qt Creator as IDE - see instructions below.

In any case you'll need it for the compiler, so here are the steps to install Microsoft Visual Studio C++ (install either VS2013 or VS2015!):

VS2013

  1. download the ISO file

  2. mount it by double-clicking; on Windows 7, use the 7-Zip utility available from http://www.7-zip.org/ to extract the ISO content to a directory

  3. launch the vs_community.exe file

  4. accept the license:

    Screenshot

  5. deselect the optional features, and ignore the message "Windows Store app development requires Windows 8.1":

    Screenshot

  6. acknowledge the User Account Control confirmation box:

    Screenshot

    and wait for the installation to finish (about 30 minutes)

After installing the Visual Studio IDE, make sure you install all the available updates for Visual Studio, then perform a Windows Update and apply the service packs and updates as suggested.

On first launch, this window will appear:

Screenshot

at this point you can safely select "Not now, maybe later".

The next window sets up the environment, here the suggested settings are:

  • Development setting = Visual C++

  • Color theme: Blue

as in this screenshot:

Screenshot

VS2015

  1. download the ISO file

  2. mount it by double-clicking; on Windows 7, use the 7-Zip utility available from http://www.7-zip.org/ to extract the ISO content to a directory

  3. launch the vs_community.exe file

  4. choose the "Custom" type of installation:

    Screenshot

  5. deselect the currently selected features, and select only "Programming Languages", "Visual C++" and "Common Tools for Visual C++ 2015":

    Screenshot

  6. acknowledge the User Account Control confirmation box:

    Screenshot

    and wait for the installation to finish (about 30 minutes)

After installing the Visual Studio IDE, make sure you install all the available updates for Visual Studio, then perform a Windows Update and apply the service packs and updates as suggested.

On first launch, this window will appear:

Screenshot

at this point you can safely select "Not now, maybe later".

The next window sets up the environment, here the suggested settings are:

  • Development setting = Visual C++

  • Color theme: Blue

as in this screenshot:

Screenshot

Boost

Boost is a set of libraries for the C++ programming language. You can get them by downloading the boost libraries version 1.55 from http://www.boost.org/ and extracting the archive in “C:\Program Files” as boost_1_55_0.

LIBPF™ relies on the include-only libraries for arrays, graphs and bimaps, so there is no need to build boost.

The include paths and the location of the boost-build system are set for boost version 1.55 so if you install any other version you will need to manually fix them. Here is the direct download link for version 1.55: http://sourceforge.net/projects/boost/files/boost/1.55.0/. We suggest to download the boost_1_55_0.7z link.

Optional prerequisites

Depending on your requirements, there are more tools you might need.

To run your models

If you plan to test and debug the developed models on the development workstation, you also need to install one of the LIBPF™ 1.0 demos, so that the installer will take care of installing the runtime prerequisites, setup the database and the ODBC / registry settings.

Make sure you install one of the demos with the same architecture of the SDK i.e. either 32-bit (x86) or 64-bit (amd64).

LIBPF™ must also be activated, see the LIBPF™ Activation Guide (English or Italian) for the rationale and the functioning of the activation system.

To create installers

If you plan to package and distribute your models in the form of runtime installers, you also need to install:

To use a Version Control System

If you wish to orderly manage the changes to the source code of your models you might want to put the code you write under a Version Control System (VCS); you can use any tool you wish but the suggested tool is the Git distributed VCS available for free from: http://git-scm.com/download/win.

To enhance the User Interface or just use Qt Creator

If you plan to modify the open-source User Interface for LIBPF™ (UIPF), or you just want to use the Qt Creator IDE, you will need the cross-platform application framework Qt version 5.4 or higher, available for free from http://www.qt.io/download-open-source/; if a prebuilt version exists for your operating system, architecture and compiler combination, use that; if not, get the source and build it.

To automate builds

The IDE is great for interactive editing and debugging, but if you need to automate builds and use a command line build system, you will need the bjam.exe tool from the boost build system v2. You can get it by performing just the first step of the boost installation (bootstrap); after that the bjam.exe will be present in the boost root – just copy it to a location in your path (i.e. in C:\Windows\SYSTEM32).

Get and install the LIBPF™ SDK

Once you have set up the prerequisites, download the LIBPF™ SDK from the link you have been supplied.

The LIBPF™ SDK comes in a xz compressed tar archive (such as LIBPF_SDK_vs2013x86_1.0.xxxx.tar.xz); use the 7-Zip utility available from http://www.7-zip.org/ or any other equivalent tool to decompress to.

The LIBPF™ SDK does not rely on absolute paths so you can decompress to any location, such as on the Desktop, at your profile's root, in “C:\Program Files” or at the disk root C:.

Note: in the examples below, it is assumed the LIBPF™ SDK has been moved to the desktop in a directory named LIBPF_sdk.

Testing your LIBPF™ SDK install

The following procedures are for testing that the installation of the LIBPF™ SDK on Microsoft Windows operating systems was successful.

LIBPF™ kernel

By default the SaltPepper example is supplied as test case with the LIBPF™ SDK.

The procedure to build and run it is different whether you use the command-line or one of the two Integrated Development Environments (IDEs) supported on Windows: Qt Creator or Microsoft Visual Studio.

Command-line

Follow this procedure:

  • Open a Git Bash shell, then move to the LIBPF SDK location, for example:

    cd ~/Desktop
    cd LIBPF_sdk
    
  • enter the "pepper" sub-directory and compile the SaltPepper example with:

    cd pepper
    bjam install-bin
    

    note: if your target platform is 64-bit, use this command to build:

    bjam install-bin address-model=64
    
  • run it with:

    ../bin/Qpepper new SaltPepper
    

Qt Creator as IDE

Install Qt then follow this procedure:

  • open the "pepper.pro" project file in the "pepper” directory by double-clicking

  • configure the project accepting the default Qt kit (we're not using Qt anyway), for both debug and release configurations

  • build the project (Build -> Build Project "pepper")

  • set "new SaltPepper" as run arguments in the left-hand-side Tab "Projects" just under "Debug", then top tab "Running"

  • run it (menu Build -> Run)

Microsoft Visual Studio as IDE

Install Qt then follow this procedure:

  • open a Git Bash shell in the "pepper” directory, then generate the project file with qmake:

    cd pepper
    /Qt/Qt5.5.5/5.5/msvc2013/bin/qmake -tp vc
    
  • this command will generate the “pepper.vcproj” Visual Studio project file in the "pepper” directory; open it with Visual Studio by double-clicking

  • build the project (F7)

  • set "new SaltPepper" as run arguments in the Project properties -> Debug settings

  • run it (F5 or CTRL+F5 to prevent the console from closing on execution end).

User interface for LIBPF™

Open a Git Bash shell, browse to the directory where UIPF will be saved and clone the last version of UIPF from https://gitlab.com/simevo/UIPF:

cd your/directory
git clone https://gitlab.com/simevo/UIPF.git

This command will create a UIPF directory in your/directory.

In this UIPF folder double click on the UIPF.pro Qt Creator project file and set up the project:

  • Target Setup: Desktop

  • Create build configuration “Manually”

  • Use Shadow building

  • For each configuration set the ..\bin folder

  • Import build from ...\UIPF

  • Create Build Configuration: “None”

  • Projects – Run Setting: Add a run configuration with the executable path pointing to the folder containg uipf\bin\Debug.UIPF\uipf_debug.exe.

Then build the User Interface for LIBPF™.

Packaging

Double-click the batch file scripts/go.bat, in the LIBPF™ SDK folder.

Verify the installer has been created in ../bin.

How to get on

  1. For more information on how to use the LIBPF™ SDK see the LIBPF SDK manual and the LIBPF SDK reference

  2. Follow one of the Model Developer step-by-step tutorials

  3. Create a subfolder in LIBPF_sdk to put your own source code, adhering to the Source code directory structure standard, for example:

    cd LIBPF_sdk
    mkdir project123
    mkdir project123/src
    mkdir project123/include
    
  4. Start coding & have fun !