Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-495

The Applications from AGL framework must have a build script

XMLWordPrintable

      The Applications from AGL framework should have a full packaging solution, Independent of yocto workflow.

      Unfortunately the build part of the Applications is only in documentation or in yocto recipes.

      The Applications build with AGL framework must be automated without any yocto recipes.


      Current proposal:

      1. a script named AGLbuild is used to control application build operations
      2. the bbclass aglwgt.bbclass will call AGLbuild for all operations
      3. AGLbuild is located at the top level of the application repository
      4. AGLbuild is a script written in one of the following languages:
        1. Makefile
        2. Bash
        3. Python
      5. The script will be executed directly after a chmod() on it (this implies that the caller should make the script executable before calling it: caller could be aglwgt.bbclass, a jenkins job, a 'real' developer ...)
        An appropriate shebang is required to make the script callable directly:
        1. '#!/usr/bin/make -f' for Makefile format,
        2. '#/usr/bin/bash' for Bash
        3. etc.
      6. The calling convention is close to the one from make, in particular to pass arguments through env variables. This is also easy for bash, as a simple eval on arguments will set environment variables correctly.
        The generic call has the following format:
        1. AGLbuild <command> [ARG1="value1" [ARG2="value2" ... ]]
          which is equivalent to
        2. export ARG1="value"; export ARG2="value" ...; AGLbuild <command>
      7. AGLbuild can be invoked from any directory and all relative paths are considered to be relative to the location of AGLbuild.
        1. For makefile scripts, this is the usual behaviour.
        2. For bash scripts, running a 'cd $(dirname $0)' at the beginning is mandatory
      8. At build time, the following calls must be made in the following order:
        1. AGLbuild configure CONFIGURE_ARGS="..."
          initializes the build environment (ex: if app uses cmake, the 'configure'' step will run cmake)
        2. AGLbuild build BUILD_ARGS="...."
          builds the application (compile, link binaries, assembles javascript etc.)
        3. AGLbuild package PACKAGE_ARGS="..." DEST=<path for resulting wgt file(s)>
          creates the widget package(s) in the specified destination path prepared by the caller
        4. AGLbuild clean CLEAN_ARGS="..."
          clean the built files (removes the result of AGLbuild build)
        5. AGLbuild distclean DISTCLEAN_ARGS="..."
          clean everything (removes the result of AGLbuild build + AGLbuild configure)
      9. Notes, comments, options:
        1. multiple widgets can be created for a single build
        2. the caller is responsible for giving the destination path where the .wgt files will be created (default is top directory: DEST=. ) So aglwgt.bbclass will need a small adjustment on this.
        3. there's nothing specified regarding CONFIGURE_ARGS, BUILD_ARGS, PACKAGE_ARGS: the values can be set from bitbake recipes or freely from a caller script.
          1. Typically bitbake variables AGLWGT_XXX could be re-used by aglwgt.bbclass to pass arguments XXX_ARGS to AGLbuild
        4. official arguments could be introduced for different purposes:
          1. specify a build mode: debug, development, qa, release/production
          2. apps signing

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sdesneux Stephane Desneux
            ronan ronan Le Martret
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: