Kanzi 3.9.8 マイグレーションガイド

このマイグレーションガイドを使用して、Kanzi アプリケーションを Kanzi 3.9.7 から Kanzi 3.9.8 に更新してください。

InputManipulator::Collection APIの変更点

input_manipulator.hpp で、メンバ関数のタイプミスを修正しました。

Kanzi アプリケーションが InputManipulator::Collection::cancelAllKeyInputManipators 関数を使用している場合、それを InputManipulator::Collection::cancelAllKeyInputManipulators にリネームしてください。

InputMethodListener APIの変更点

input_manipulator.hpp で、メンバ関数のタイプミスを修正しました。

Kanzi アプリケーションが InputMethodListener::onCompositionTextCommitedOverride 関数を使用している場合、それを InputMethodListener::onCompositionTextCommittedOverride にリネームしてください。

TextBoxConceptImpl APIの変更点

text_box_concept_impl.hpp で、メンバ関数のタイプミスを修正しました。

Kanzi アプリケーションが TextBoxConceptImpl::deteleCharactersAtCursor 関数を使用している場合、それを TextBoxConceptImpl::deleteCharactersAtCursor にリネームしてください。

PropertyDrivenAnimationPlayer APIの変更点

property_driven_animation_player.hpp で、メンバ関数のタイプミスを修正しました。

Kanzi アプリケーションが PropertyDrivenAnimationPlayer::timeControllerPropertyNoticationHandler 関数を使用している場合、それを PropertyDrivenAnimationPlayer::timeControllerPropertyNotificationHandler にリネームしてください。

ActivityHostConcept APIの変更点

activity_host_concept.hpp で、仮想メンバ関数 ActivityHostConcept::onActivateActivityOverride のシグネチャが変更されました。もしあなたの Kanzi アプリケーションがこの関数を再定義している場合、アクティビティのプロパティ値をリセットしてアクティビティをアクティブにするかどうかを設定する型 bool のパラメータを追加してください。

デフォルトのサーフェスプロパティの変更

アプリケーション構成で、これらのサーフェスプロパティのデフォルト値を変更しました:

  • カラーチャンネルサイズ

  • デプスバッファサイズ

  • アンチエイリアスサンプルの数

このテーブルは変更されたデフォルト値を示しています:

構成

Kanzi 3.9.7 デフォルト値

Kanzi 3.9.8 デフォルト値

SurfaceBitsDepthBuffer

16ビット

24ビット

SurfaceBitsRed

プラットフォームが決定します

8 ビット

SurfaceBitsGreen

プラットフォームが決定します

8 ビット

SurfaceBitsBlue

プラットフォームが決定します

8 ビット

SurfaceBitsAlpha

プラットフォームが決定します

8 ビット

SurfaceSamplesAntialiasing

  • Windows: 4 サンプル

  • 他のプラットフォーム: 0 サンプル

  • Windows: 4 サンプル

  • 他のプラットフォーム: platform decides

これらの変更は、デフォルト値に依存する Kanzi アプリケーションに小さな視覚的品質の影響を与える可能性があります。Kanzi アプリケーションを3.9.8に移行する際、Kanzi の以前のバージョンでのデフォルトの色チャンネルサイズに合わせるには、"unspecified" を使用してください。

サーフェスのプロパティ を参照してください。

Androidアプリケーションテンプレートの変更

Kanzi 3.9.8はJDK 17をサポートし始め、JDK 8のサポートを終了しました。JDK 17を使用するには、Kanzi アプリケーションをGradle 7.6.2およびAndroid Gradle Plugin 7.4.2を使用するように移行してください。

JDK 11を使用している場合、アプリケーションを移行する必要はありません。

Kanzi アプリケーションを移行するには、

  1. <ProjectName>/Application/configs/platforms/android_gradle/build.gradle で、置き換え:

    dependencies {
        classpath 'com.android.tools.build:gradle:<android-gradle-plugin-version>'
        classpath 'com.rightware.gradle:kanzi:<kanzi-gradle-plugin-version>'
    }
    

    以下に置き換えます。

    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.2'
        classpath 'com.rightware.gradle:kanzi:0.8.1'
    }
    
  2. <ProjectName>/Application/configs/platforms/android_gradle/gradle/wrapper/gradle-wrapper.properties で、置き換え:

    distributionUrl=https\://services.gradle.org/distributions/gradle-<version>-bin.zip
    

    以下に置き換えます。

    distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
    
  3. <ProjectName>/Application/configs/platforms/android_gradle/app/build.gradle で:

    • 置換:

      android {
          compileSdkVersion 28
      
          defaultConfig {
              minSdkVersion 26
              targetSdkVersion  28
      
              // ...
          }
      }
      

      以下に置き換えます。

      android {
          // Add a namespace for your Kanzi application.
          // In most cases, the namespace is the same as "applicationId".
          namespace '<project-namespace>'
          compileSdk 32
      
          defaultConfig {
              minSdk 26
              targetSdk 28
      
              // ...
          }
      }
      
    • 削除:

      kanzi {
          appFramework "kanziruntime-droidfw"
      }
      
    • dependencies セクションに新しいアイテムを追加します。

      dependencies {
          implementation 'com.rightware.kanzi:kanziruntime-droidfw@aar'
          // ...
      }
      
    • Android SDK バージョンを設定します:

      • Kanzi アプリケーションを Google Play に公開する予定がない場合は、android セクションでターゲット SDK バージョンのチェックを無効にしてください。

        android {
            lintOptions {
                disable 'ExpiredTargetSdkVersion'
            }
        }
        
      • Kanzi アプリケーションをGoogle Playで公開する予定がある場合は、targetSdk オプションをGoogle Playが要求する値に設定してください。詳細は、https://developer.android.com/google/play/requirements/target-sdk を参照してください。

        例:

        android {
            defaultConfig {
                targetSdk 33
            }
        }
        
  4. <ProjectName>/Application/configs/platforms/android_gradle/app/src/main/AndroidManifest.xml で、変更:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="<PackageName>">
    

    終点

    <manifest xmlns:android="http://schemas.android.com/apk/res/android">
    
  5. アプリケーションがコードビハインドを使用している場合、<ProjectName>/Application/CMakeLists.txt 内のコードビハインドの add_subdirectory 呼び出しで、スペースをアンダースコアに置き換えてください。

    例として、置き換えます:

    set(XML_data_source_codebehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../../Tool_project/CodeBehind/XML data source")
    if(EXISTS "${XML_data_source_codebehind_lib_dir}")
        add_subdirectory("${XML_data_source_codebehind_lib_dir}" "${CMAKE_CURRENT_BINARY_DIR}/CodeBehind/XML data source")
        include_directories(${XML_data_source_codebehind_lib_dir}/include)
        target_link_libraries(XML_data_source_executable XML_data_source_CodeBehind)
    endif()
    

    以下に置き換えます。

    set(XML_data_source_codebehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../../Tool_project/CodeBehind/XML data source")
    if(EXISTS "${XML_data_source_codebehind_lib_dir}")
        add_subdirectory("${XML_data_source_codebehind_lib_dir}" "${CMAKE_CURRENT_BINARY_DIR}/CodeBehind/XML_data_source")
        include_directories(${XML_data_source_codebehind_lib_dir}/include)
        target_link_libraries(XML_data_source_executable XML_data_source_CodeBehind)
    endif()
    
  6. Kanzi Studio で、アプリケーションの Kanzi Studio プロジェクトを開きます。File > Open Kanzi Command Prompt を選択し、コマンドラインで次を実行します:

    cd ..\Application\configs\platforms\android_gradle\
    gradlew wrapper
    

    この方法で、アプリケーション内のGradleをアップグレードします。

  7. (オプション) Android Studioで Kanzi アプリケーションを開きたい場合は、Android StudioをElectric Eelまたはそれ以降のバージョンに更新してください。

    Kanzi Studio から Kanzi Androidアプリケーションをビルドする場合、このステップは必要ありません。

EGL APIの変更点

関数 getEGLConfig を qnx_egl_common.hpp から egl_common.hpp に移動しました。Kanzi アプリケーションがこの関数を使用する場合、egl_common.hpp ヘッダーを含めてください。

Material APIの変更点

Material::ChangeCounterProperty プロパティタイプを削除しました。RenderEntry3D はマテリアルプロパティの変更をリッスンします。

Waylandグラフィックス出力APIの変更点

デフォルトのWaylandシェルをIVIからXDGに変更し、フォールバックオプションを削除しました。

Kanzi が使用する Wayland シェルを設定できるようになりました。Waylandシェル を参照してください。

メインループスケジューラへの変更

メインループスケジューラで、外部でティックされるオーバーロード、つまり経過時間を引数として取る関数をすべて削除しました。

メインループスケジューラをカスタムの時間ソースにアタッチするには、MainLoopScheduler::setClockCallback を使用し、引数を取らないそれぞれのオーバーロードを使用できます。

Kanzi 3.9.7

Kanzi 3.9.8

MainLoopScheduler::advanceFrame
(chrono::nanoseconds lastFrameDuration)

MainLoopScheduler::advanceFrame、MainLoopScheduler::setClockCallback

MainLoopScheduler::getDurationUntilNextTimer
(chrono::nanoseconds elapsedDuration)

MainLoopScheduler::getDurationUntilNextTimer、MainLoopScheduler::setClockCallback

MainLoopScheduler::run
(chrono::nanoseconds lastFrameDuration)

MainLoopScheduler::run、MainLoopScheduler::setClockCallback

関連項目

Kanzi 3.9.8 リリースノート

既知の問題