Using Package Manager to create and deploy an Asset package

Creating an Asset Package Project

To create an asset package in Kanzi Studio using the Package Manager:

  1. Create your project using the Kanzi Asset Conan Template from the Template dropdown.

    ../../_images/kanzi-studio-kpm-asset-template.png
  2. After building the content of your project, enable the Export in Asset Package property for the assets you want to include in the package.

    ../../_images/kanzi-studio-export-asset-package.png
  3. Save your project.

Creating and deploying the Asset Package as a Conan Package

  1. Navigate to the root of your project directory in the file explorer. You will notice two files that assist in creating and deploying the package:

    • conanfile.py governs the asset packaging.

    • create_and_deploy.bat is a convenience script that runs the Conan command to create the asset package and deploy it to a specified Conan repository.

    ../../_images/asset-helper-scripts.png
  2. Edit create_and_deploy.bat:

    This script contains helper variables you can modify as needed. For example, set the Conan remote to which you want to deploy your asset by editing the CONAN_REMOTE variable. You can also update the package name, version, and the Kanzi version for which this package is intended.

  3. Run create_and_deploy.bat:

    Deploys the package to the Conan remote specified in the script.

    Note

    This script creates a Conan package identified by the reference my_asset/1.0.0@kanzi-3.9.13-assets/stable.

  4. Open the Package Manager in Kanzi Studio:

    • Select the Remote tab.

    • From the Repository dropdown list, select the repository to where you deployed the asset package to.

    ../../_images/package-manager-repository-dropdown.png
    • Refresh the repository list by pressing the refresh icon.

    ../../_images/package-manager-repository-refresh.png
    • You will see your new asset package listed under the repository assets.

    ../../_images/package-manager-my-asset.png

See also

Asset packages

Package Manager

Using Package Manager Kanzi Studio plugin