Exemple #1
0
def check_installation(sdk, tools_list, printer, prompt):
    '''Check that everything required has been installed'''
    success = True

    # Print the environment variables for debug purposes
    printer.string("{}environment is:".format(prompt))
    text = subprocess.check_output([
        "set",
    ], shell=True)
    for line in text.splitlines():
        printer.string("{}{}".format(prompt, line.decode()))

    # Check for the tools on the path
    printer.string("{}checking tools...".format(prompt))
    for item in tools_list:
        if not item["type"] or (item["type"].lower() == sdk.lower()):
            if u_utils.exe_where(item["which_string"], item["hint"], printer,
                                 prompt):
                if item["version_switch"]:
                    u_utils.exe_version(item["which_string"],
                                        item["version_switch"], printer,
                                        prompt)
            else:
                success = False

    return success
Exemple #2
0
def check_installation(tools_list, printer, prompt):
    '''Check that everything required has been installed'''
    success = True

    # Check for the tools on the path
    printer.string("{}checking tools...".format(prompt))
    for item in tools_list:
        if u_utils.exe_where(item["which_string"], item["hint"], printer,
                             prompt):
            if item["version_switch"]:
                u_utils.exe_version(item["which_string"],
                                    item["version_switch"], printer, prompt)
        else:
            success = False

    return success