Kanzi 3.9 alpha 6 migration guide¶
Use this migration guide to update Kanzi applications from Kanzi 3.9 alpha 5 to Kanzi 3.9 alpha 6.
Changes to Code Behind¶
Kanzi 3.9 alpha 6 introduces changes to Code Behind functionality that are not compatible with the previous version of Kanzi. If your Kanzi application uses Code Behind, to migrate your Kanzi 3.9 alpha 5 application to Kanzi 3.9 alpha 6:
Delete directories:
<ProjectName>/Tool_project/CodeBehind/Application/configs<ProjectName>/Tool_project/CodeBehind/Application/lib<ProjectName>/Tool_project/CodeBehind/Application/output
From the
<KanziWorkspace>/Templates/Code_behind_template/Applicationdirectory copy theCMakeLists.txtfile to the<ProjectName>/Tool_project/CodeBehind/Applicationdirectory.In the copied
CMakeLists.txtfile:Replace
Code_behind_templatewith<ProjectName>CodeBehind.For example, if your project name is called
MyActivities, replaceCode_behind_templatewithMyActivitiesCodeBehind.Replace
CODE_BEHIND_TEMPLATEwith<PROJECTNAME>CODEBEHIND.For example, if your project name is
MyActivities, replaceCODE_BEHIND_TEMPLATEwithMYACTIVITIESCODEBEHIND.
Update the application code:
If your application is based on the Application template, in the
<ProjectName>/Application/src/<projectname>.cppfile add:The
<projectname>_code_behind_module.hppheader:#if defined(<PROJECTNAME>CODEBEHIND_API) && !defined(ANDROID) && !defined(KANZI_API_IMPORT) #include <<projectname>_code_behind_module.hpp> #endif
The
registerMetadataOverridefunction to your application class:void registerMetadataOverride(ObjectFactory& factory) override { <ProjectName>::registerMetadataOverride(factory); #if defined(<PROJECTNAME>CODEBEHIND_API) && !defined(ANDROID) && !defined(KANZI_API_IMPORT) <ProjectName>CodeBehindModule::registerModule(getDomain()); #endif }
If your project is based on the Data Source or Engine plugin template, in the
<ProjectName>/Application/src/executable/src/<projectname>.cppfile add:The
<projectname>_code_behind_module.hppheader:#if defined(<PROJECTNAME>CODEBEHIND_API) && !defined(ANDROID) && !defined(KANZI_API_IMPORT) #include <<projectname>_code_behind_module.hpp> #endif
In your application class register the Code Behind module in the
registerMetadataOverridefunction:#if defined(<PROJECTNAME>CODEBEHIND_API) && !defined(ANDROID) && !defined(KANZI_API_IMPORT) <ProjectName>CodeBehindModule::registerModule(getDomain()); #endif
Save the edited files and open the project in Kanzi Studio.
Changes to Light nodes¶
Kanzi 3.9 alpha 6 removes from Light nodes the Color Scale (Light::ColorScaleProperty) property. To adjust the brightness of a light, set the Intensity (I) of the light color property. See Adjusting the brightness of a light.
When you open your project in Kanzi Studio, Kanzi Studio automatically converts local values of light properties, but in some cases you have to adjust the lights manually after converting your project to Kanzi 3.9 alpha 6. For example, if your project contains a binding that binds a light color property to a custom property type, set the Editor of that custom property type to HDR color editor, then adjust the light color.
Changes to color space¶
Kanzi 3.9 alpha 6 introduces linear color workflow that is from now on the default color space. If you want to continue using the legacy color space (nonlinear gamma) in your application, in the application.cfg file for that application add:
SurfaceColorSpace = legacy
Note
On the linux_imx8_wayland_aarch64 platform Kanzi applications work only with the legacy color space.
See Color workflow and Surface properties.