diff options
| author | Stefan Boberg <[email protected]> | 2021-08-21 18:51:29 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-08-21 18:51:29 +0200 |
| commit | ee2d4c08b48c17605f36c00377beae0b0dc072e3 (patch) | |
| tree | 19c8f1dfef4b2e19293327ee2a6d3a1321339397 /scripts/deploybuild.py | |
| parent | Improved crash reporting setup and removed old stubs (diff) | |
| download | zen-ee2d4c08b48c17605f36c00377beae0b0dc072e3.tar.xz zen-ee2d4c08b48c17605f36c00377beae0b0dc072e3.zip | |
Initial build deploy scripts. Still missing debug information upload step so should not be used
Diffstat (limited to 'scripts/deploybuild.py')
| -rw-r--r-- | scripts/deploybuild.py | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/scripts/deploybuild.py b/scripts/deploybuild.py new file mode 100644 index 000000000..4d9f49d90 --- /dev/null +++ b/scripts/deploybuild.py @@ -0,0 +1,79 @@ +import argparse +import sys +import os +import fileinput +import colorama +import shutil +from peafour import P4 +from colorama import Fore, Back, Style + +colorama.init() + +origcwd = os.getcwd() + +# Parse and validate arguments + +parser = argparse.ArgumentParser(description='Deploy a zen build to an UE tree') +parser.add_argument("root", help="Path to an UE5 root directory") +args = parser.parse_args() + +engineroot = args.root + +if not os.path.isfile(os.path.join(engineroot, "RunUAT.bat")): + print(f"{Fore.RED}Not a valid UE5 engine root directory: '{engineroot}'") + print(Style.RESET_ALL) + exit() + +# Establish root of zen tree + +zenroot = __file__ + +while not os.path.exists(os.path.join(zenroot, "zen.sln")): + zenroot = os.path.dirname(zenroot) + +print(f"Zen root: {zenroot}") + +# Upload symbols etc to Sentry + +# scripts\sentry-cli.exe upload-dif --org to --project zen-server x64\Release\zenserver.exe x64\Release\zenserver.pdb + +# Change into root directory to pick up Perforce environment + +os.chdir(engineroot) +p4info = P4.info().run() + +if not os.path.samefile(p4info.clientRoot, engineroot): + print(f"{Fore.RED}Could not find P4 client for UE5 engine root directory '{engineroot}'") + print(Style.RESET_ALL) + exit() + +# check out the binaries + +print(f"Reverting any previous unsubmitted deploy") + +try: + P4.revert("Engine/Binaries/Win64/zenserver.*").run() +except: + pass + +print(f"Checking out zenserver executables") + +try: + P4.edit("Engine/Binaries/Win64/zenserver.*").run() +except: + pass + +print(f"Placing zenserver executables into tree") + +crashpadtarget = os.path.join(engineroot, "Engine/Binaries/Win64/crashpad_handler.exe") + +try: + shutil.copy(os.path.join(zenroot, "x64\Release\zenserver.exe"), os.path.join(engineroot, "Engine/Binaries/Win64/zenserver.exe")) + shutil.copy(os.path.join(zenroot, r'vcpkg_installed\x64-windows-static\tools\sentry-native\crashpad_handler.exe'), crashpadtarget) + P4.add(crashpadtarget).run() + print("All done and good!") +except Exception as e: + print(f"Noooooo: {e.args}") + pass + +# scripts\sentry-cli.exe upload-dif --org to --project zen-server |