# Path: mod/log.py
# RED = '\033[1;31m'
# GREEN = '\033[1;32m'
# YELLOW = '\033[1;33m'
# BLUE = '\033[1;36m'
# DEF = '\033[0;0m'
# def error(msg, fatal=True) :
# def warn(msg) :
# def ok(item, status) :
# def failed(item, status) :
# def optional(item, status) :
# def info(msg) :
# def colored(color, msg) :
# 
# Path: mod/emsdk.py
# EMSDK_URL = "https://github.com/emscripten-core/emsdk.git"
# EMSDK_DEFAULT_VERSION = 'latest'
# def remove_readonly(func, path, _):
# def get_sdkroot_dir(fips_dir):
# def sdkroot_exists(fips_dir):
# def make_dirs(fips_dir):
# def get_emsdk_dir(fips_dir):
# def emsdk_dir_exists(fips_dir):
# def get_emsdk_path(fips_dir):
# def check_exists(fips_dir):
# def get_em_config(fips_dir):
# def run(fips_dir, cmdline):
# def clone_or_update_emsdk(fips_dir):
# def list(fips_dir):
# def activate(fips_dir, emsdk_version):
# def install(fips_dir, emsdk_version):
# def remove_old_sdks(fips_dir):
# def uninstall(fips_dir):
# def parse_config(fips_dir):
# def show_config(fips_dir):
# def get_emscripten_root(fips_dir):
# 
# Path: mod/android.py
# def get_sdk_dir(fips_dir) :
# def check_exists(fips_dir) :
# def get_adb_path(fips_dir):
# def get_tools_url() :
# def get_tools_archive_path(fips_dir):
# def target_to_package_name(target):
# def install_package(fips_dir, pkg):
# def ensure_sdk_dirs(fips_dir) :
# def uncompress(fips_dir, path) :
# def compute_sha256(path, converter=lambda x: x, chunk_size=65536) :
# def strip_whitespace(bin_str) :
# def setup(fips_dir) :
# 
# Path: mod/wasisdk.py
# def get_sdk_dir(fips_dir):
# def check_exists(fips_dir):
# def get_url():
# def get_archive_path(fips_dir):
# def get_wasisdk_root(fips_dir):
# def sdk_dir_exists(fips_dir):
# def ensure_sdk_dirs(fips_dir) :
# def install(fips_dir):
# def uninstall(fips_dir):


from mod import log, emsdk, android, wasisdk
"""'setup' verb to setup platform SDKs

setup emscripten
setup android
"""


#-------------------------------------------------------------------------------
def run(fips_dir, proj_dir, args) :
    """run the 'setup' verb"""
    sdk_name = None
    if len(args) > 0 :
        sdk_name = args[0]
    if sdk_name == 'emscripten' :
        emsdk.install(fips_dir, None)
    elif sdk_name == 'android' :
        android.setup(fips_dir)
    elif sdk_name == 'wasisdk':
        wasisdk.setup(fips_dir)
    else :
        log.error("invalid SDK name (must be 'emscripten' or 'android')")

#-------------------------------------------------------------------------------
def help() :
    """print help text for init verb"""

# Path: mod/log.py
# RED = '\033[1;31m'
# GREEN = '\033[1;32m'
# YELLOW = '\033[1;33m'
# BLUE = '\033[1;36m'
# DEF = '\033[0;0m'
# def error(msg, fatal=True) :
# def warn(msg) :
# def ok(item, status) :
# def failed(item, status) :
# def optional(item, status) :
# def info(msg) :
# def colored(color, msg) :
# 
# Path: mod/emsdk.py
# EMSDK_URL = "https://github.com/emscripten-core/emsdk.git"
# EMSDK_DEFAULT_VERSION = 'latest'
# def remove_readonly(func, path, _):
# def get_sdkroot_dir(fips_dir):
# def sdkroot_exists(fips_dir):
# def make_dirs(fips_dir):
# def get_emsdk_dir(fips_dir):
# def emsdk_dir_exists(fips_dir):
# def get_emsdk_path(fips_dir):
# def check_exists(fips_dir):
# def get_em_config(fips_dir):
# def run(fips_dir, cmdline):
# def clone_or_update_emsdk(fips_dir):
# def list(fips_dir):
# def activate(fips_dir, emsdk_version):
# def install(fips_dir, emsdk_version):
# def remove_old_sdks(fips_dir):
# def uninstall(fips_dir):
# def parse_config(fips_dir):
# def show_config(fips_dir):
# def get_emscripten_root(fips_dir):
# 
# Path: mod/android.py
# def get_sdk_dir(fips_dir) :
# def check_exists(fips_dir) :
# def get_adb_path(fips_dir):
# def get_tools_url() :
# def get_tools_archive_path(fips_dir):
# def target_to_package_name(target):
# def install_package(fips_dir, pkg):
# def ensure_sdk_dirs(fips_dir) :
# def uncompress(fips_dir, path) :
# def compute_sha256(path, converter=lambda x: x, chunk_size=65536) :
# def strip_whitespace(bin_str) :
# def setup(fips_dir) :
# 
# Path: mod/wasisdk.py
# def get_sdk_dir(fips_dir):
# def check_exists(fips_dir):
# def get_url():
# def get_archive_path(fips_dir):
# def get_wasisdk_root(fips_dir):
# def sdk_dir_exists(fips_dir):
# def ensure_sdk_dirs(fips_dir) :
# def install(fips_dir):
# def uninstall(fips_dir):


# Path: verbs/setup.py
from mod import log, emsdk, android, wasisdk

"""'setup' verb to setup platform SDKs

setup emscripten
setup android
"""


#-------------------------------------------------------------------------------
def run(fips_dir, proj_dir, args) :
    """run the 'setup' verb"""
    sdk_name = None
    if len(args) > 0 :
        sdk_name = args[0]
    if sdk_name == 'emscripten' :
        emsdk.install(fips_dir, None)
    elif sdk_name == 'android' :
        android.setup(fips_dir)
    elif sdk_name == 'wasisdk':
        wasisdk.setup(fips_dir)
    else :
        log.error("invalid SDK name (must be 'emscripten' or 'android')")

#-------------------------------------------------------------------------------
def help() :
    """print help text for init verb"""

    log.info(log.YELLOW +