Deploying Kanzi applications to Windows
You can build and deploy Kanzi applications to Windows:
Building and deploying Kanzi applications to Windows from Kanzi Studio
To run a Kanzi application on Windows, you need to have Visual C++ Redistributable x86 for Visual Studio 2015 installed.
To build and deploy your Kanzi application to Windows from Kanzi Studio:
- In Kanzi Studio create or open the project for your Kanzi application and select > Export > Export as KZB Player for Windows.
Kanzi Studio builds the application source code and creates these files in the Application Player directory of your Kanzi Studio project:- application.cfg contains configuration settings for your Kanzi application. See Configuring your application.
- binaries.cfg contains a list of all kzb files Kanzi created from your project.
- <ProjectName>.exe contains your Kanzi application and the Kanzi Application Player, which enables you to run your application as a standalone application.
- <project_name>.kzb contains your project in a binary format. See Using kzb files.
- <project_name>.kzb.txt contains a list of all project shortcuts, project resources, and nodes.
- When Kanzi Studio creates the application, it adds the link to the application in the Status Bar, which you can find below the Library window, and the Log window. Click the link to open the directory where Kanzi Studio created your application.
Your application is stored in the Application Player directory of your Kanzi Studio project. To run the application, run the exe application file.
Building Kanzi applications from Visual Studio
When you create a Kanzi Studio project with a C++ application, Kanzi creates the Visual Studio solution and project files. See Tutorial: Hello world!.
To build your Kanzi application from Visual Studio:
- In Kanzi Studio create or open the project for your Kanzi application and select > Export > Export KZB.
Kanzi Studio creates the kzb file for your application in the <ProjectName>/Application/bin.
- Open the Visual Studio solution for your Kanzi application stored in <ProjectName>/Application/configs/platforms/win32/<ProjectName>.sln, and apply these configurations:
- Set the solution configuration.
For example, select GL_vs2015_Release solution configuration.
- (Optional) Right-click the main project and set it as the StartUp project.
- Select Build > Build Solution to build the application.
Visual Studio creates the application executable in the <ProjectName>/Application/output directory.
You can specify the relative location to the Kanzi Engine in the project configuration file <ProjectName>/Application/configs/platforms/win32/application.vsprops.
Building Kanzi applications for Windows manually
SCons runs the SConstruct file in the configuration directory of the platform from which you run the scons
command. SConstruct file is the entry point for building the application and contains the information about the Kanzi Engine location and runs these files:
- <KanziWorkspace>/Engine/configs/platforms/common/config.py includes the Kanzi library definitions and common build flags used when building for all platforms.
- <KanziWorkspace>/Engine/configs/platforms/<PlatformName>/config.py includes the Kanzi platform-specific build flags and defines, and the toolchain. Edit this file when you want to customize the build configuration for your platform. For example, to match the locations of your platform SDK and board support package.
- <ProjectName>/Application/configs/platforms/common/config.py includes the optional, project-specific common configuration parameters.
- <ProjectName>/Application/configs/platforms/<PlatformName>/config.py includes the optional, project-specific platform configuration parameters.
To build your Kanzi application for Windows manually:
-
Open the command line in the configuration directory of the platform for which you want to build the Kanzi application (<ProjectName>/Application/configs/platforms/<PlatformName>) and make sure you have the correct environmental variables set. See Setting the Kanzi environment variables.
For example, to build your Kanzi application for:- Android. Open the command line in the <ProjectName>/Application/configs/platforms/android directory.
- Linux. Open the command line in the <ProjectName>/Application/configs/platforms/linux_x11_glx_cpp98 directory.
- Windows. Open the command line in the <ProjectName>/Application/configs/platforms/win32 directory.
-
Run the
scons
command with the build parameters for your Kanzi application.Syntax | scons <library> <type> <name> |
Parameters | library | (Optional) the graphics library: ES2 builds the application with OpenGL ES 2.0GL builds the application with OpenGL
| type | (Optional) the build type: Release builds the application with compiler optimizations enabled. The release option builds smaller files than the debug option. Use this option for production purposes. Default value.Debug builds the application with disabled compiler optimizations and contains full debug information you can use with a debugger. The debug option builds larger files and debug applications run slower. Use this option for development purposes.Profiling builds the application with compiler optimizations enabled and links the application against the Profiling build. Use this option when you want to measure the performance of different parts of Kanzi Engine. For example, when you want to find out how much time Kanzi uses on different tasks during application startup, or which parts of the application take a lot of time to run. See Measuring application performance.
| name | (Optional) the name of the project |
|
Examples |
// Builds the application with the default settings as specified
// in config.py and SConstruct configuration files.
scons
// Builds the debug version of the application with
// the OpenGL graphics library.
scons GL debug
// Builds the debug version of the application with the
// OpenGL ES 2.0 graphics library from the Kanzi Studio
// project named MyProject.
scons ES2 debug MyProject |
Scons builds the Kanzi application source code and binary files in the <ProjectName>/Application/output directory.
See also
Installing the Kanzi build environment manually
Tutorial: Create a simple in-vehicle infotainment application
Tutorial: Hello world!
Deploying Kanzi applications
Configuring your application
Using kzb files
Measuring application performance
Open topic with navigation