|
@@ -36,8 +36,8 @@ parser.add_argument('--assets', action='store_true', help='Build assets')
|
|
|
|
|
|
args = parser.parse_args(o3de_context.args)
|
|
args = parser.parse_args(o3de_context.args)
|
|
|
|
|
|
-if not args.code and not args.assets:
|
|
|
|
- user_input = input('No build command specified. Do you want to build code, assets, or both? (c/a/b): ')
|
|
|
|
|
|
+while not args.code and not args.assets:
|
|
|
|
+ user_input = input('No build command specified. Do you want to build code, assets, or both? (c/a/b). Quit(q): ')
|
|
if user_input.lower() == 'c':
|
|
if user_input.lower() == 'c':
|
|
args.code = True
|
|
args.code = True
|
|
elif user_input.lower() == 'a':
|
|
elif user_input.lower() == 'a':
|
|
@@ -45,9 +45,13 @@ if not args.code and not args.assets:
|
|
elif user_input.lower() == 'b':
|
|
elif user_input.lower() == 'b':
|
|
args.code = True
|
|
args.code = True
|
|
args.assets = True
|
|
args.assets = True
|
|
|
|
+ elif user_input.lower() == 'q':
|
|
|
|
+ quit()
|
|
else:
|
|
else:
|
|
print('Invalid input. Please enter c, a, or b.')
|
|
print('Invalid input. Please enter c, a, or b.')
|
|
|
|
|
|
|
|
+build_folder = os.path.join(o3de_context.project_path, "build", "windows")
|
|
|
|
+
|
|
# Build code
|
|
# Build code
|
|
if (args.code):
|
|
if (args.code):
|
|
# Enable GameLift gems
|
|
# Enable GameLift gems
|
|
@@ -59,19 +63,15 @@ if (args.code):
|
|
quit()
|
|
quit()
|
|
|
|
|
|
# Build server launcher
|
|
# Build server launcher
|
|
- build_folder = os.path.join(o3de_context.project_path, "build", "windows")
|
|
|
|
os.makedirs(build_folder, exist_ok=True)
|
|
os.makedirs(build_folder, exist_ok=True)
|
|
o3de_logger.info(f"Building {project_name}.ServerLauncher")
|
|
o3de_logger.info(f"Building {project_name}.ServerLauncher")
|
|
|
|
|
|
if (process_command(["cmake", "-B", build_folder, "-S", o3de_context.project_path, "-G", "Visual Studio 16"])):
|
|
if (process_command(["cmake", "-B", build_folder, "-S", o3de_context.project_path, "-G", "Visual Studio 16"])):
|
|
quit()
|
|
quit()
|
|
|
|
|
|
- if (process_command(["cmake", "--build", build_folder, "--target", f"{project_name}.ServerLauncher", "--config", "profile", "--", "/m"]) != 0):
|
|
|
|
|
|
+ if (process_command(["cmake", "--build", build_folder, "--target", f"{project_name}.ServerLauncher", "AssetBundler", "--config", "profile", "--", "/m"]) != 0):
|
|
quit()
|
|
quit()
|
|
|
|
|
|
- if (process_command(["cmake", "--build", build_folder, "--target", f"AssetBundler", "--config", "profile", "--", "/m"]) != 0):
|
|
|
|
- quit()
|
|
|
|
-
|
|
|
|
# Build monolithic server launcher build
|
|
# Build monolithic server launcher build
|
|
monolithic_build_folder = os.path.join(o3de_context.project_path, "build", "windows_mono")
|
|
monolithic_build_folder = os.path.join(o3de_context.project_path, "build", "windows_mono")
|
|
os.makedirs(monolithic_build_folder, exist_ok=True)
|
|
os.makedirs(monolithic_build_folder, exist_ok=True)
|