Project

General

Profile

Actions

Support Request #2434

closed

Merge manually and generated part of plugin description

Added by hidden about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Customer:
AUDI
Department:
EX
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Windows 7 64bit
Topic:
ADTF::PluginDescription
FAQ Links:

Description

Supportanfrage

wir hatten es zuletzt in Diskussion, ich bin mir aber nicht mehr sicher, was hier der letzte Stand war und vor allem, was mit ADTF 3.3.0 möglich ist.

Ich habe einen manuellen Teil für eine PluginDescription:

<editor_descriptions>
<editor_description>
<name>Create Pins from Properties</name>
<url>FilterSystemCheck_filtereditor.qml</url>
</editor_description>
</editor_descriptions>

Der PluginDescriptionGenerator scheint die Datei immer komplett neu zu erstellen, sodass ich den manuellen Teil manuell integrieren muss, nachdem der PluginDescriptionGenerator gelaufen ist.

Ich benötige einen automatisierbaren Weg. Habt ihr hier eine Empfehlung?

Lösung

Nutze am besten unser CMake Makro adtf_create_plugindescription inkl. MERGE_DESCRIPTION Option, dass das beim Build gleich entsprechend berücksichtigt wird:

adtf_create_plugindescription(
    TARGET
        ${EXAMPLE_TARGETNAME}
    PLUGIN_SUBDIR
        "src/examples/bin" 
    MERGE_DESCRIPTION
        "demo_data_triggered_filter.plugindescription" 
)

siehe dazu auch unsere Examples

Actions #1

Updated by hidden about 6 years ago

  • Project changed from Public Support to 11
  • Status changed from New to In Progress
  • Topic set to ADTF::PluginDescription
  • Customer set to AUDI
  • Department set to EX
  • Affected Products ADTF 3.3.0 added
  • Platform Windows 7 64bit added
Actions #2

Updated by hidden about 6 years ago

  • Status changed from In Progress to Customer Feedback Required

Hi Jens,

nutzt du unser Makro inkl. MERGE_DESCRIPTION Option, dass das beim Build gleich entsprechend berücksichtigt wird ?

adtf_create_plugindescription(
    TARGET
        ${EXAMPLE_TARGETNAME}
    PLUGIN_SUBDIR
        "src/examples/bin" 
    MERGE_DESCRIPTION
        "demo_data_triggered_filter.plugindescription" 
)

siehe dazu unsere Bsp.

Actions #3

Updated by hidden about 6 years ago

Hallo,

danke, das war den Hinweis, der mir gefehlt hat ;). Ich habe meine Skripte angepasst.
Ticket kann aus meiner Sicht geschlossen werden. Es folgen Informationen für Euch, die ihr nutzen könnt, um ADTF bzw. die Doku zu verbessern.

Zuvor hatte ich vergeblich versucht
  • adtf_plugin_description_generator --help
  • Suche in ADTF_Documentation.html

Ich nutze derzeit mein eigenes Skript zur Benutzung der Plugin-Description.
Unsere Buildsysteme unterscheiden sich etwas. Wir nutzen derzeit z.B. kein Install-Target.
Auch versuche ich im allgemeinen über mehrere ADTF-Versionen kompatibel zu bleiben. Und bei Evaluierungen die Unterschiede zwischen den Versionen herauszuarbeiten.

Mein Skript sieht derzeit so aus:

function(a3e_plugindescriptiongenerator NAME)
    if ("${ADTF_VERSION}" VERSION_LESS "3.3.0")
        set(PLUGIN_ATTR "-plugins")
    elseif("$ENV{ADTF_VERSION}" STREQUAL "3.3.0_Beta1")
        set(PLUGIN_ATTR "--plugin")
    else()
        set(PLUGIN_ATTR "-plugin")
    endif()

    set(MERGE_ARG "")

    set(list_var "${ARGN}")
    foreach(ITEM IN LISTS list_var)
        get_filename_component(ITEM_SUFFIX ${ITEM} EXT)
        if ("${ITEM_SUFFIX}" STREQUAL ".plugindescription")
            get_filename_component(ITEM_FOLDER ${ITEM} DIRECTORY)
            set(MERGE_ARG "-merge=${ITEM}")
        else()
            list(APPEND ADDITIONAL_FILES_TO_COPY COMMAND ${CMAKE_COMMAND} -E copy)
            list(APPEND ADDITIONAL_FILES_TO_COPY ${ITEM})
            list(APPEND ADDITIONAL_FILES_TO_COPY $<TARGET_FILE_DIR:${PROJECT_NAME}>)
        endif()
    endforeach()

    set(ADTF_PLUGINDESCRIPTION_GENERATOR "${ADTF_DIR}/bin/$<$<CONFIG:Debug>:debug/>adtf_plugin_description_generator${CMAKE_EXECUTABLE_SUFFIX}")

    if(MSVC OR (NOT "$ENV{ADTF_VERSION}" STREQUAL "3.3.0_Beta1")) # PluginDescriptionGenerator does not work on Linux with this version
        add_custom_command(TARGET ${NAME} POST_BUILD
            COMMAND ${CMAKE_COMMAND} -E remove $<TARGET_FILE_DIR:${NAME}>/${NAME}.plugindescription
            ${ADDITIONAL_FILES_TO_COPY}
            COMMAND ${ADTF_PLUGINDESCRIPTION_GENERATOR} ${PLUGIN_ATTR}=$<TARGET_FILE:${NAME}> ${MERGE_ARG}
            )
    endif()
endfunction()

Ich verwende es z.B. so

a3e_plugindescriptiongenerator(${PROJECT_NAME}
    ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.plugindescription
    ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}_filtereditor.qml
    )

Actions #4

Updated by hidden about 6 years ago

  • Subject changed from ADTF 3.3.0 PluginDescription: Manuelle Anteile und generierte Anteile zusammenführen to Merge manually and generated part of plugin description
  • Description updated (diff)
  • Status changed from Customer Feedback Required to To Be Closed
  • Resolution set to Solved Issue
Actions #6

Updated by hidden almost 6 years ago

  • Project changed from 11 to Public Support
  • Private changed from Yes to No
Actions #7

Updated by hidden almost 6 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF