Migration guides

To migrate your Kanzi Studio projects to a newer version of Kanzi Connect always:

  • Refresh the services from the Kanzi Connect Server and in Kanzi Studio export the kzb files for that project.

  • Recompile libraries using the version of Kanzi that the version of Kanzi Connect to which you are moving supports. When building your Android application use Android Studio 4.2.1 and Android SDK Build Tools 30 or newer.

Migrating from Kanzi Connect 3.9.7 to Kanzi Connect 3.9.8

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.7 to Kanzi Connect 3.9.8, no additional migration effort is required.

Migrating from Kanzi Connect 3.9.6 to Kanzi Connect 3.9.7

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.6 to Kanzi Connect 3.9.7, no additional migration effort is required.

Migrating from Kanzi Connect 3.9.5 to Kanzi Connect 3.9.6

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.5 to Kanzi Connect 3.9.6, no additional migration effort is required.

Migrating from Kanzi Connect 3.9.4 to Kanzi Connect 3.9.5

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.4 to Kanzi Connect 3.9.5, no additional migration effort is required.

Migrating from Kanzi Connect 3.9.3 to Kanzi Connect 3.9.4

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.3 to Kanzi Connect 3.9.4:

  • Visual Studio 2019 libraries are used by default. If your build your own Windows libraries for Kanzi Connect, you may want to use vs2019 from now on.

Migrating from Kanzi Connect 3.9.2 to Kanzi Connect 3.9.3

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.2 to Kanzi Connect 3.9.3:

  • Updated the Android services default package name. The package name is now used also to generate the project source hierarchy with the Java service template. If your project uses generated service files from multiple services, explicitly set the shared package name on the service descriptions.

  • Updated the service templates for the native and Android services. Update the projects that you created using the previous template.

Migrating from Kanzi Connect 3.9.1 to Kanzi Connect 3.9.2

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.1 to Kanzi Connect 3.9.2:

  • Service scripts now support data sources and runtimedata lists in json strings. If your service script modifies or reads runtimedata list content using a flat argument array, you need to change the list arguments to a single json array.

  • Renamed these service libraries:

    Kanzi Connect 3.9.1

    Kanzi Connect 3.9.2

    service_Cluster

    service_cluster

    service_Media

    service_media

    service_Obd2

    service_obd2

    service_Sensor

    service_sensor

    service_System

    service_system

    service_Stream

    service_stream

    service_ServiceInvoke

    service_serviceInvoke

    If your project uses a custom configuration file for the Kanzi Connect server, update the service names in:

    • The connect_server_config.xml file.

      For example, replace

      <service library="service_Cluster" name="Cluster" optional="true">
      

      with

      <service library="service_cluster" name="Cluster" optional="true">
      
    • The Application/configs/platforms/android_gradle/app/build.gradle file.

      For example, replace libservice_Cluster.so with libservice_cluster.so.

Migrating from Kanzi Connect 3.9.0 to Kanzi Connect 3.9.1

To migrate your Kanzi Studio projects from Kanzi Connect 3.9.0 to Kanzi Connect 3.9.1:

  • Sqlite-ContentProvider is now a sepate library. This allows smaller memory footprint for Kanzi Connect client applications. However, if the server is using an sqlite-database, this change requires that you update the Kanzi Connect server build files to include the library.

  • ServiceRuntimeData::getSchema now uses a cached XML schema. If you modify the service runtimedata hierarchy using RuntimeDataObject, call ServiceRuntimeData::invalidateSchema to update the schema and the service description.

Migrating from Kanzi Connect 1.1 to Kanzi Connect 3.9.0

To migrate your Kanzi Studio projects from Kanzi Connect 1.1 to Kanzi Connect 3.9.0:

  • The migration effort from Kanzi Connect 1.1 to Kanzi Connect 3.9.0 is larger than usual as the base LTS release changes. For some applications the recommended way to migrate is to create in Kanzi Studio a new application using the Kanzi Connect Client application or Service template, and merge the required logic and Kanzi Studio project content from the previous version.

  • Import and export the service definitions using the Kanzi Connect Simulator and run the code generation. For some projects the initial run creates large delta for the generated code. From this version onwards, the changes are going to be more deterministic and easier to maintain in version control.

  • Android ANT workflow is no longer supported. To build a project for Kanzi Connect 3.9, migrate the project to Gradle. The Kanzi Connect examples use ARM64_V8A eabi.

  • Recompile Android libraries using Kanzi 3.9.0. When building your Android application use:

    • Android Studio 4.2

    • Android SDK Build Tools 30 or newer

    • Minimum API level 26, the recommended API level 28 or newer

    • NDK version 21d

  • Scons build system is going to be deprecated. Build applications with CMake.

  • Kanzi Connect Windows platform now uses 64-bit architecture. Replace all instances and paths in your application that contain win32 with win64.

  • SDK binaries location changed from <KanziConnectInstallation>/SDK/output to <KanziConnectInstallation>/SDK/lib.

  • C++14 replaces C++11.

  • Semantics of KANZI_API_IMPORT have changed. Remove all references to KANZI_API_IMPORT. If you want to continue using it, check that the define exists and is an empty string.

Migrating from Kanzi Connect 1.1.0 to 1.1.1

To migrate your Kanzi Studio projects form Kanzi Connect 1.1.0 to 1.1.1:

  • For service descriptions that you intend to modify in the Kanzi Connect Simulator, export the service and run the code generation. The initial run creates large delta for the generated code. From this version onwards, the changes are going to be more deterministic and easier to maintain in version control.

  • Recompile Android libraries using Kanzi 3.6.12. When building your Android application use Android Studio 4.0 and Android SDK Build Tools 30 or newer.

  • Update the Kanzi Connect application template:

    • In the Application/src/<ProjectName>.cpp replace:

      #if defined(IGNORE_SIGPIPE)
      #include <signal.h>
      
      static void ignore_sigpipe(void)
      {
      #if defined(__QNXNTO__)
          signal(SIGPIPE, SIG_IGN)
      #else
          struct sigaction act;
          memset(&act, 0, sizeof(act));
          act.sa_handler = SIG_IGN;
          act.sa_flags = SA_RESTART;
          (void)sigaction(SIGPIPE, &act, NULL);
      #endif
      }
      #endif
      

      with

      #if defined(IGNORE_SIGPIPE)
      #include <signal.h>
      
      #if !defined(__QNXNTO__)
          static struct sigaction g_act;
      #endif
      
      static void ignore_sigpipe(void)
      {
      #if defined(__QNXNTO__)
          signal(SIGPIPE, SIG_IGN)
      #else
          memset(&g_act, 0, sizeof(g_act));
          g_act.sa_handler = SIG_IGN;
          g_act.sa_flags = SA_RESTART;
          (void)sigaction(SIGPIPE, &g_act, NULL);
      #endif
      }
      #endif
      

      This change enhances the signal handler for the SIGPIPE.

    • Replace the Android-specific CMake file with a generic version at <KanziConnectInstallation>/templates/studio/connect_client_template/Application/CMakelist.txt.

      The generic version of the CMake file contains modifications to use the new CMake utilities and to make it consistent with the approach of the Kanzi Engine CMake files.

Migrating from Kanzi Connect 1.0.5 to 1.1.0

To migrate your Kanzi Studio projects form Kanzi Connect 1.0.5 to 1.1.0:

  • Consolidated the use of CMake with Kanzi Engine. Common interfaces are now defined in KanziConnectConfig.cmake.

  • Recompile Android libraries using Kanzi 3.6.12. When building your Android application use Android Studio 4.0 and Android SDK Build Tools 30 or newer.

Migrating from Kanzi Connect 1.0.4 to 1.0.5

To migrate your Kanzi Studio projects from Kanzi Connect 1.0.4 to 1.0.5:

  • Recompile Android libraries using Kanzi 3.6.11. When building your Android application use Android Studio 4.0 and Android SDK Build Tools 30 or newer.

  • Instead of SDK/lib/android/bindings/kanziconnect-debug.aar and kanziconnect-release.aar use SDK/lib/android_gradle/kanziconnect-debug.aar and kanziconnect-release.aar.

  • Updated the properties of the Input Service. If your application uses this service, refresh the services from the Kanzi Connect Server and export the kzb files.

Migrating from Kanzi Connect 1.0.3 to 1.0.4

To migrate your Kanzi Studio projects from Kanzi Connect 1.0.3 to 1.0.4:

  1. For services, run the code generation to take these changes into account:

    • In Kanzi Connect clients the interfaces that use a naked pointer or reference to Client class, now use ClientSharedPtr.

    • In Kanzi Connect services, the support for the Simulator and Scenario service requires additional code during service initialization.

    • Update to the service metadata so that you can use it it with the Simulator on systems other than Windows.

  2. Rebuild all your Kanzi Engine plugins, and Kanzi Connect services and clients with Kanzi 3.6.10.

  3. In Kanzi Studio 3.6.10 open your project and in the main menu select File > Export > Export All KZBs.

  4. Save and close your project.

Migrating from Kanzi Connect 1.0.1 to 1.0.3

To migrate your Kanzi Studio projects from Kanzi Connect 1.0.1 to 1.0.3:

  1. Rebuild all your Kanzi Engine plugins and Kanzi Connect services with Kanzi 3.6.9.

  2. In Kanzi Studio 3.6.9 open your project and in the main menu select File > Export > Export All KZBs.

  3. Save and close your project.

Moved header files

Moved these header files from SDK/sources/connect/core_services to SDK/include:

  • connection_service

    • client_id_manager.hpp

    • connection_manager.hpp

  • content_service

    • boost_base64_conversion.hpp

    • content_client.hpp

    • content_client_local.hpp

    • content_client_remote.hpp

    • content_loader.hpp

    • content_manager.hpp

    • content_provider.hpp

    • content_provider_collection.hpp

    • content_provider_creator.hpp

    • content_provider_introspection_interface.hpp

    • content_query.hpp

    • content_query_arguments.hpp

    • content_subscription.hpp

  • service_service

    • remote_service_host.hpp

    • service_host.hpp

    • service_manager.hpp

  • virtualfile_service

    • file_loader.hpp

    • file_transfer_entry.hpp

    • file_transfer_manager.hpp

    • virtualfileclient.hpp

    • virtualfilelocalclient.hpp

    • virtualfileprovider.hpp

    • virtualfileremoteclient.hpp

    • virtualfilerequesthandler.hpp

    • virtualfileresponse.hpp

    • virtualfileresponseinterface.hpp

    • virtualfileworkitem.hpp

    • virtualfile_service.hpp

Migrating from Kanzi Connect 1.0 to 1.0.1

To migrate your Kanzi Studio projects from Kanzi Connect 1.0 to 1.0.1:

  1. Rebuild all your Kanzi Engine plugins and Kanzi Connect services with Kanzi 3.6.8.

  2. In Kanzi Studio 3.6.8 open your project and in the main menu select File > Export > Export All KZBs.

  3. Save and close your project.

Migrating from Kanzi Connect to 0.9.9 or newer

Use this migration guide to update your Kanzi Connect applications from to 0.9.9 or newer.

Kanzi Connect namespace

Instead of kanzi namespace, Kanzi Connect now uses kanzi::connect namespace.

Migrating Kanzi Studio projects

To migrate your Kanzi Studio projects from Kanzi Connect to 0.9.9 or newer:

  1. Create a backup copy of the Kanzi Studio project that you want to migrate to Kanzi Connect 0.9.9 or newer.

  2. In Kanzi Studio in the main menu select Edit > User Preferences > Advanced tab and set the Start Preview when project is loaded to disabled.

    ../_images/start-preview-when-project-is-loaded.png
  3. In Kanzi Studio open the project that you want to migrate to Kanzi Connect 0.9.9 or newer.

  4. In the Library > Kanzi Engine Plugins, if the connect_datasource plugin is there, delete it.

  5. In the Library > Kanzi Engine Plugins, right-click the connect_services plugin and select Update Kanzi Engine Plugin.

    ../_images/update-connect_services-plugin.png
  6. In the Kanzi Studio main menu select Kanzi Connect > Kanzi Connect Editor. When you open the Kanzi Connect Editor, it makes the required changes to your Kanzi Studio project.

    ../_images/kanzi-connect-kanzi-connect-editor1.png
  7. Save the project and export the kzb file for the project.

Updating custom services

In Kanzi Connect 0.9.9 or newer dynamic_tls.hpp is no longer available.

To update a Kanzi Connect service that you created with the Kanzi Connect version to 0.9.9 or newer, generate the C++ code from the interface definition of that service and then build the service. See Tutorial: Create a custom Kanzi Connect service.