ADTF Conan Generator
Loading...
Searching...
No Matches
ADTF Conan Generator

Description

Header only package to generate a solution to handle dependencies, create a running ADTF environment and deploy your session.
It provides two conan generators:

  • ADTF3Generator: Creates start scripts and environment based on requested dependencies from conan cache for usage on local system setup
  • ADTF3GeneratorSelfContained: Copies all requested dependencies from conan cache to one folder, adds environment and start scripts (with relative paths), e.g. to zip or copy to another target without conan

Please have a look at Release Notes.

ADTF Environment Generation with Conan

This workflow utilizes the Conan package manager to construct the environment for ADTF.
In ADTF, the whole environment is defined by the .adtfenvironment file that determines:

  • Which toolboxes and specific versions are required.
  • Which plugins are available.
  • All associated macros, documentation paths, and tool definitions.

Essentially, every component of the ADTF runtime depends on this master environment file. The file itself is modular, including other environment files provided by toolboxes and plugin packages.

The ADTF Conan Generator automates the creation of this .adtfenvironment file simply by defining references and their versions in your Conan script, for example:

requires = [
"adtf/3.22.1@dw/stable",
"adtf_qt5/1.1.1@dw/stable",
"adtf_configuration_editor/2.1.0@dw/stable",
...
]

Introduction

ADTF treats paths within the local environment with *.adtfenvironment files. As this paths are different on each system, they cannot be set during package build and collecting them manually may be a time consuming issue. The adtf_conan_generator automizes this and in addtion it creates handy start scripts for common use cases like starting an ADTF project with the ADTF Configuration Editor. A more detailed explanation can be found in the ADTF Guides.

Remarks
This documentation is not on how to work with ADTF. For information about ADTF, please have a look at the Overview Of Products.

Guide

Please have a look at our Guide.

Examples

Examples on easy usage and starting point conanfile.py's are located and listed within examples.

Migration Guide

From <= 1.6 to >= 2.0

Remarks
With ADTF 3.21 we have extracted all UI content to ADTF Qt5 package (v1.0++) and the CE itself to a standalone adtf_confguration_editor package (v2.0++).
That's why we had to rework the ADTF Conan Generator, which will break compatibility!
Since we had to release a new major version, we also took the opportunity to adjust variable names and structure.
Old Structure New Structure Notes
adtf3_projects[0]["VERSION"] adtf_generator["environment"]["version"] Version info moved under environment.
adtf3_projects[0]["DESCRIPTION"] adtf_generator["environment"]["description"] Description moved under environment.
adtf3_projects[0]["ENVIRONMENT_DIRECTORY_MACRO"] adtf_generator["environment"]["environment_directory_macro"] Macro key renamed.
adtf3_projects[0]["MACROS"] adtf_generator["environment"]["macros"] A dict of macros moved to environment.
adtf3_projects[0]["BASE_PATH"] adtf_generator["base_path"] Refers to the base directory of the project.
adtf3_projects[0]["PROJECT_PATH"] adtf_generator["projects"] Now a list of project paths.
adtf3_projects[0]["SESSION_PATH"] adtf_generator["sessions"] Now a list of session paths.
adtf3_projects[0]["START_ARGS"] adtf_generator["sessions_start_scripts"] Launcher command moved and restructured with placeholders.
adtf3_projects[0]["PLUGIN_DIRECTORIES"] adtf_generator["environment"]["plugin_directories"] Changed to a list format.
adtf3_projects[0]["DOCUMENTATION"] adtf_generator["environment"]["documentation"] Key names are lowercased in new structure.
(Not present) adtf_generator["name"] New required field for naming the configuration.
adtf3_projects[0]["TARGET_FOLDER"] adtf_generator["target_path"] Target output path for generated content.
adtf3_ce_settings["launchers"] (now part of tools) Must be manually converted into a tool or script entry if needed.
adtf3_ce_settings["tools"] adtf_generator["environment"]["tools"] Tools list moved under environment.
adtf3_ce_settings["remote_settings"] adtf_generator["ce_settings"]["remote_settings"] Structure preserved, now under ce_settings.
adtf3_ce_settings["remote_settings"]["remotes"] adtf_generator["ce_settings"]["remote_settings"]["remotes"] Now supports multiple remote URLs.

Command Conversion

Old START_ARGS

Previously, magic names were used and then enriched with additional arguments.

"START_ARGS": {
"launcher": "--console --run",
"launcher_with_profiling": "--console --run",
"control": "",
"guicontrol": ""
}

New sessions_start_scripts

Use the environment file to define your tools and launch commands. This ensures compatibility with ADTF tooling and allows the Conan generator to automatically create your start scripts.

"environment": {
# ...
"tools": [
{
"name": "Example Launch",
"type": "launch",
"command": '"$(ADTF_DIR)/bin/adtf_launcher" --environment "$(ADTF_ENVIRONMENT_FILENAME)" --session "$(ADTF_SESSION_FILENAME)" --console --run --control-url "$(ADTF_REMOTE_CONTROL_URL)" --quit-timeout 3',
"requires_shell": True,
"working_directory": "$(ADTF_DIR)/bin",
"shortcut": "",
"icon_path": "$(ADTF_DIR)/settings/Launcher.svg"
},
# ...

By default, the Conan generator creates a script for every launch command it finds in the environment by parsing all .adtfenvironment files. These entries are then permutated with all sessions provided by the project file defined in your environment. If you want to limit the number of generated scripts, you can use the sessions_whitelist and tools_whitelist properties.

License Information

For any licence information have a look at LICENSE.

Furthermore please refer to Used Open Source Software for an overview of 3rd party packages we are glad to use.