X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-app-framework%2Fclasses%2Faglwgt.bbclass;h=f42c282a73f6c04db30731b040592a73f16c5b98;hb=1b0d65113b277610135b5599c8810ca7a4e3df4c;hp=4dd3feca76416e691cea7da95e1397331c95c70c;hpb=6ba0b4d2b38b88fef8bb847fe8631995d72910b6;p=AGL%2Fmeta-agl.git diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 4dd3feca7..f42c282a7 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -9,16 +9,16 @@ # # 'wgtpkg-pack' in af-main-native is required. -DEPENDS_append = " af-main-native" +DEPENDS:append = " af-main-native" # for bindings af-binder is required. -DEPENDS_append = " af-binder" +DEPENDS:append = " af-binder" # for bindings that use the cmake-apps-module -DEPENDS_append = " cmake-apps-module-native" +DEPENDS:append = " cmake-apps-module-native" # for hal bindings genskel is required. -DEPENDS_append = " af-binder-devtools-native" +DEPENDS:append = " af-binder-devtools-native" # Re-enable strip for qmake based projects (default value is "echo") OE_QMAKE_STRIP = "${STRIP}" @@ -41,18 +41,14 @@ AGLWGT_CMAKE_CONFIGURE_ARGS ?= "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmak # building/packaging of the test widget for other widgets. AGLWGT_HAVE_TESTS ?= "0" -# Warning on missing test/debug/coverage packages disabled by default -# for now to reduce build output clutter. -AGLWGT_PACKAGE_WARN ?= "0" - # Whether the widget should be auto-installed on first boot AGLWGT_AUTOINSTALL ?= "1" # Signature keys # These are default keys for development purposes ! # Change it for production. -WGTPKG_AUTOSIGN_0_agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/developer.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/developer.cert.pem" -WGTPKG_AUTOSIGN_1_agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/platform.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/platform.cert.pem" +WGTPKG_AUTOSIGN_0:agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/developer.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/developer.cert.pem" +WGTPKG_AUTOSIGN_1:agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/platform.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/platform.cert.pem" export WGTPKG_AUTOSIGN_0 export WGTPKG_AUTOSIGN_1 @@ -75,7 +71,11 @@ python aglwgt_cmake_configure () { d.appendVarFlag("AGLWGT_EXTRA_BUILD_ARGS", "vardeps", " AGLWGT_CMAKE_CONFIGURE_ARGS") } -do_configure[noexec] = "1" +# Placeholder to keep things like externalsrc that prefunc or append +# do_configure working as expected. +aglwgt_do_configure() { + true +} aglwgt_do_compile() { bldcmd=${S}/autobuild/agl/autobuild @@ -89,22 +89,17 @@ aglwgt_do_compile() { cd ${B} fi - if ! $bldcmd package BUILD_DIR=${B}/build-release ${AGLWGT_EXTRA_BUILD_ARGS}; then - bbwarn "Target: package failed" - fi - - if ! $bldcmd package-debug BUILD_DIR_DEBUG=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}; then - bbwarn "Target: package-debug failed" - fi + $bldcmd package BUILD_DIR=${B}/build-release ${AGLWGT_EXTRA_BUILD_ARGS} + $bldcmd package-debug BUILD_DIR_DEBUG=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS} if echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then - if ! $bldcmd package-test BUILD_DIR_TEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS}; then - bbwarn "Target: package-test failed" + # Only try building the test widget if there's source for it, to avoid spurious errors + if [ -f ${S}/test/CMakeLists.txt ]; then + $bldcmd package-test BUILD_DIR_TEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS} fi - if ! $bldcmd package-coverage BUILD_DIR_COVERAGE=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}; then - bbwarn "Target: package-coverage failed" - fi + # The coverage widget should always build + $bldcmd package-coverage BUILD_DIR_COVERAGE=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS} fi } @@ -119,22 +114,33 @@ aglwgt_do_install() { DEST=manualinstall fi - if [ "$(find ${B}/build-release -name '*.wgt' -maxdepth 1)" ]; then + wgt="$(find ${B}/build-release -maxdepth 1 -name '*.wgt'| head -n 1)" + if [ -n "$wgt" ]; then install -d ${D}/usr/AGL/apps/$DEST - install -m 0644 ${B}/build-release/*.wgt ${D}/usr/AGL/apps/$DEST/ + install -m 0644 $wgt ${D}/usr/AGL/apps/$DEST/ else bbfatal "no package found in widget directory" fi - for t in test debug coverage; do - if [ "$(find ${B}/build-${t} -name *-${t}.wgt -maxdepth 1)" ]; then + for t in debug coverage test; do + if [ "$(find ${B}/build-${t} -maxdepth 1 -name *-${t}.wgt)" ]; then install -d ${D}/usr/AGL/apps/${t} install -m 0644 ${B}/build-${t}/*-${t}.wgt ${D}/usr/AGL/apps/${t}/ - elif [ "${AGLWGT_PACKAGE_WARN}" = "1" ]; then - if [ "$t" != "test" -a "$t" != "coverage" ]; then - bbwarn "no package found in ${t} widget directory" - elif echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then - bbwarn "no package found in ${t} widget directory" + elif [ "$t" = "debug" ]; then + # HTML5 widgets complicate things here, need to detect them and + # not error out in that case. ATM this requires looking in the + # config.xml of the release widget. + rm -rf ${B}/tmp + unzip $wgt config.xml -d ${B}/tmp + if [ -f ${B}/tmp/config.xml -a \ + ! cat ${B}/tmp/config.xml | \ + grep -q '^[[:space:]]*