Ejemplo n.º 1
0
def _add_android_abi(abi, asan=False):

    # Create asan wrapper scripts if required
    asan_build_func = _asan_setup if asan else _asan_clean

    dragon.add_alchemy_task(
        name='build-common-{}'.format(abi),
        desc='Build android common for {}'.format(abi),
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=['all', 'sdk'],
        prehook=lambda task, args: _setup_android_abi(task, args, abi),
        posthook=lambda task, args: asan_build_func(abi),
        weak=True,
        outsubdir=abi,
        host_in_subdir=False,
        secondary_help=True)

    dragon.add_alchemy_task(
        name='clean-common-{}'.format(abi),
        desc='Clean android common for {}'.format(abi),
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=['clobber'],
        prehook=lambda task, args: _setup_android_abi(task, args, abi),
        posthook=lambda task, args: _asan_clean(abi),
        weak=True,
        outsubdir=abi,
        host_in_subdir=False,
        secondary_help=True)
Ejemplo n.º 2
0
def add_android_abi(abi):
    dragon.add_alchemy_task(
        name="alchemy-%s" % abi,
        desc="Run alchemy task for %s" % abi,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        prehook=lambda task, args: setup_android_abi(task, abi),
        posthook=lambda task, args: create_android_compat_symlink(abi),
        weak=True,
        outsubdir=abi)
Ejemplo n.º 3
0
def add_unix_sample(sample):
    dragon.add_alchemy_task(
        name="build-sample-%s" % sample,
        desc="Build unix sdk sample for %s" % sample,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=[sample],
    )
    dragon.add_alchemy_task(
        name="clean-sample-%s" % sample,
        desc="Clean unix sdk sample for %s" % sample,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=[sample + "-clean"],
    )
Ejemplo n.º 4
0
def add_task_build_common():
    dragon.add_alchemy_task(name='build-common',
                            desc='Build ios common code',
                            product=dragon.PRODUCT,
                            variant=dragon.VARIANT,
                            defargs=['all', 'sdk'],
                            weak=True,
                            posthook=lambda task, args: _set_product(),
                            secondary_help=True)

    dragon.add_alchemy_task(name='clean-common',
                            desc='Clean ios common code',
                            product=dragon.PRODUCT,
                            variant=dragon.VARIANT,
                            defargs=['clobber'],
                            weak=True,
                            secondary_help=True)
Ejemplo n.º 5
0
def add_unix_sample(sample):
    name = "build-sample-%s" % sample
    c_name = "clean-sample-%s" % sample
    dragon.add_alchemy_task(
        name=name,
        desc="Build unix sdk sample for %s" % sample,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=[sample],
    )
    dragon.add_alchemy_task(
        name=c_name,
        desc="Clean unix sdk sample for %s" % sample,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=["%s-clean" % sample],
    )
    return (name, c_name)
Ejemplo n.º 6
0
    cmd_args = [
        script_path, subscript_name, "-b",
        "'-p %s-%s -A'" % (dragon.PRODUCT, dragon.VARIANT), dump_xml,
        " ".join(args)
    ]
    dragon.exec_cmd(" ".join(cmd_args))


#===============================================================================
# Tasks
#===============================================================================

dragon.add_alchemy_task(
    name="alchemy",
    desc="Directly pass commands to alchemy",
    product=dragon.PRODUCT,
    variant=dragon.VARIANT,
    weak=False,
)

dragon.add_meta_task(
    name="build",
    desc="Build everything and generate final directory",
    subtasks=["alchemy all final"],
    weak=True,
)

dragon.add_meta_task(
    name="clean",
    desc="Clean everything",
    subtasks=["alchemy clobber"],
Ejemplo n.º 7
0
        raise dragon.TaskExit()

    dump_xml = dragon.gen_alchemy_dump_xml()
    cmd_args = [script_path, subscript_name,
                "-b", "'-p %s-%s -A'" % (dragon.PRODUCT, dragon.VARIANT),
                dump_xml, " ".join(args)]
    dragon.exec_cmd(" ".join(cmd_args))

#===============================================================================
# Tasks
#===============================================================================

dragon.add_alchemy_task(
    name = "alchemy",
    desc = "Directly pass commands to alchemy",
    product = dragon.PRODUCT,
    variant = dragon.VARIANT,
    weak = False,
)

dragon.add_meta_task(
    name = "build",
    desc = "Build everything and generate final directory",
    subtasks=["alchemy all final"],
    weak = True,
)

dragon.add_meta_task(
    name = "clean",
    desc = "Clean everything",
    subtasks=["alchemy clobber"],
Ejemplo n.º 8
0
                             "alchemy clobber",
                             "alchemy-armeabi clobber",
                             "alchemy-armeabi-v7a clobber",
                             "alchemy-mips clobber",
                             "alchemy-x86 clobber",
                             "alchemy-arm64-v8a clobber",
                         ])

#===============================================================================
#===============================================================================
if dragon.VARIANT == "ios":
    dragon.add_alchemy_task(
        name="build-sdk",
        desc="Build ios sdk",
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=["all", "sdk"],
        posthook=lambda task, args: create_ios_compat_symlink(),
        weak=True,
    )
    dragon.add_meta_task(name="clean-sdk",
                         desc="Clean ios sdk",
                         subtasks=["alchemy clobber"])

#===============================================================================
#===============================================================================
if dragon.VARIANT == "ios_sim":
    dragon.add_alchemy_task(
        name="build-sdk",
        desc="Build ios simulator sdk",
        product=dragon.PRODUCT,
Ejemplo n.º 9
0
        defargs=[sample],
    )
    dragon.add_alchemy_task(
        name=c_name,
        desc="Clean unix sdk sample for %s" % sample,
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=["%s-clean" % sample],
    )
    return (name, c_name)

if dragon.VARIANT == "native":
    dragon.add_alchemy_task(
        name="build-sdk",
        desc="Build native sdk",
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=["all"]
    )
    dragon.add_alchemy_task(
        name="clean-sdk",
        desc="Clean native sdk",
        product=dragon.PRODUCT,
        variant=dragon.VARIANT,
        defargs=["clobber"]
    )

    all_samples = []
    clean_samples = []
    samples = ["BebopSample", "JumpingSumoSample", "BebopController"]
    for sample in samples: