Example #1
0
def build_editor(ctx):
    """Builds and configures the editor"""
    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(SENTINEL_SCRIPT_PATH,
                                    ["run-module", "ue4", "build", "editor"],
                                    data)
    utilities.run_cmd(cmd)
Example #2
0
def build_editor(ctx):
    """Builds and configures the editor"""
    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./Sentinel.py",
                                    ["run-module", "ue4", "build", "editor"],
                                    data)
    utilities.run_cmd(cmd)
Example #3
0
def validate_packages(ctx):
    """Checks project packages for errors"""

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(
        "./Sentinel.py",
        ["run-module", "ue4", "project", "refresh-asset-info"], data)
    utilities.run_cmd(cmd)
Example #4
0
def vcs(ctx, args):
    """Interact with the Version Control System"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./sentinel_vcs/vcs_cli.py", args, data)
    utilities.run_cmd(cmd)
def ue4(ctx, args):
    """Interact with UE4"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(SENTINEL_UE4, args, data)
    utilities.run_cmd(cmd)
def environment(ctx, args):
    """Info about the local environment"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(SENTINEL_ENVIRONMENT, args, data)
    utilities.run_cmd(cmd)
Example #7
0
def commands(ctx, args):
    """ Utility commands"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./commands.py", args, data)
    utilities.run_cmd(cmd)
Example #8
0
def refresh_config(ctx, default=False):
    data = utilities.convert_input_to_dict(ctx)

    defult_arg = str(default).lower()
    generate_config_cmd = utilities.get_commandline(
        "./Sentinel.py", ["run-module", "environment", "generate"],
        data,
        sub_command_arguments=["--default=" + defult_arg])

    utilities.run_cmd(generate_config_cmd)
Example #9
0
def environment(ctx, args):
    """Info about the local environment"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(
        "./SentinelEnvironment/SentinelEnvironment.py", args, data)
    utilities.run_cmd(cmd)
Example #10
0
def database(ctx, args):
    """Interact with the Database"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline("./SentinelDB/SentinelDB.py", args, data)
    utilities.run_cmd(cmd)
Example #11
0
def fix_up_redirectors(ctx):
    """Runs the commandlet fix up redirectors"""

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline(
        SENTINEL_SCRIPT_PATH, ["run-module", "ue4", "project", "commandlet"],
        data,
        sub_command_arguments=["--task=fixup-redirectors"])
    utilities.run_cmd(cmd)
Example #12
0
def ue4(ctx, args):
    """Interact with UE4"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./SentinelUE4/SentinelUE4.py ", args,
                                    data)
    utilities.run_cmd(cmd)
Example #13
0
def generate_lightmaps(ctx):
    """Generates lightmaps for the project"""

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline(
        "./Sentinel.py", ["run-module", "ue4", "project", "commandlet"],
        data,
        sub_command_arguments=["--task=Build-Lighting"])
    utilities.run_cmd(cmd)
Example #14
0
def validate_project(ctx):
    """Checks the dev environment for errors"""

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./Sentinel.py",
                                    ["run-module", "ue4", "build", "editor"],
                                    data)

    # If the compile blueprints step fails then it returns an error code,  we want the step to exit succesfully
    utilities.run_cmd(cmd, overwrite_exit_code=0)
Example #15
0
def validate_blueprints(ctx):
    """Check all blueprints in the project for errors"""

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline(
        "./Sentinel.py", ["run-module", "ue4", "project", "commandlet"],
        data,
        sub_command_arguments=["--task=Compile-Blueprints"])
    utilities.run_cmd(cmd)
Example #16
0
def generate_ddc_cache(ctx):
    """Refreshes the DDC cache for the project"""

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline(
        "./Sentinel.py", ["run-module", "ue4", "project", "commandlet"],
        data,
        sub_command_arguments=["--task=generate-ddc-cache"])
    utilities.run_cmd(cmd)
Example #17
0
def run_module(ctx, args):
    """modules in isolation"""
    data = utilities.convert_input_to_dict(ctx)

    if not args:
        args = "--help"

    cmd = utilities.get_commandline(script_name="./standalone.py",
                                    script_commands=args,
                                    global_arguments=data)
    utilities.run_cmd(cmd)
Example #18
0
def aws(ctx, args):
    """ Interact with Amazon Web Services """
    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)

    cmd = utilities.get_commandline("./SentinelAWS/SentinelAWS.py",
                                    args,
                                    data,
                                    arguments_at_end=False)
    utilities.run_cmd(cmd)
Example #19
0
def run_action(ctx, args):
    """actions and commands"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(script_name="./commands.py",
                                    script_commands=args,
                                    global_arguments=data)

    utilities.run_cmd(cmd)
Example #20
0
def run_query(ctx, args):
    """fetch information from the environment"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(script_name="./queries.py",
                                    script_commands=args,
                                    global_arguments=data)

    utilities.run_cmd(cmd)
Example #21
0
def run_action(ctx, args):
    """actions and commands"""

    if not args:
        args = "--help"

    data = utilities.convert_input_to_dict(ctx)
    script = root_folder.joinpath("commands.py").as_posix()
    cmd = utilities.get_commandline(script_name=script,
                                    script_commands=args,
                                    global_arguments=data)

    utilities.run_cmd(cmd)
Example #22
0
def build_client(ctx, preset, deploy_path, compress):
    """Builds and configures playable client"""

    global_args = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline(
        "./Sentinel.py", ["run-module", "ue4", "build", "client"],
        global_arguments=global_args,
        sub_command_arguments=["--preset=" + preset])
    utilities.run_cmd(cmd)

    if deploy_path:
        if deploy_path.lower.startswith("s3"):
            print("Dealing with s3 path")
        elif os.path.exists(deploy_path):
            print("Dealing with an os path")
        else:
            print("Unable to access access")
Example #23
0
def setup(ctx, project_root, engine_root, config_root, artifact_name, vcs_root,
          artifacts_root, cache_root):
    """first time environment"""
    input_arguments = [
        "--project_name=" + project_root, "--engine_path=" + engine_root,
        "--artifact_name=" + artifact_name, "--config_path=" + config_root,
        "--version_control_root=" + vcs_root,
        "--artifacts_root=" + artifacts_root, "--cache_path=" + cache_root
    ]

    global_args = utilities.convert_input_to_dict(ctx)
    script = root_folder.joinpath("Sentinel.py").as_posix()
    generate_default_config_cmd = utilities.get_commandline(
        script, ["run-module", "environment", "make-default-config"],
        global_args, input_arguments)
    utilities.run_cmd(generate_default_config_cmd)

    commands.refresh_config(ctx)
Example #24
0
def get_commit_id(ctx):
    """Returns the current commit ID"""

    global_args = utilities.convert_input_to_dict(ctx)
    cmd = utilities.get_commandline("./Sentinel.py ", ["run-module", "vcs", "get-current-commit-id"])
    utilities.run_cmd(cmd)