From b84993faed049416b8c4b97e313ccc5b483106a6 Mon Sep 17 00:00:00 2001 From: cmod31 Date: Sat, 22 Apr 2023 12:34:23 +0200 Subject: [PATCH] updated build script --- build.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 5d3e072..e97f610 100644 --- a/build.py +++ b/build.py @@ -1,3 +1,17 @@ import os +import sys -os.system("scons && cd project && godot project.godot")#ask if editor or game should be opened \ No newline at end of file +yes = {'yes','y', 'ye', ''} +no = {'no','n'} + +if sys.argv[1]: + choice = sys.argv[1].removeprefix("-") +else: + sys.stdout.write("Do you want to open only the built project instead of the Godot Editor after building? ([y]es/[n]o): ") + choice = input().lower() +if choice in yes: + os.system("scons && cd project && godot") +elif choice in no: + os.system("scons && godot project\project.godot") +else: + sys.stdout.write("Please respond with 'yes' or 'no'") \ No newline at end of file