updated build script

This commit is contained in:
2023-04-22 12:34:23 +02:00
parent d903b0aa05
commit b84993faed

View File

@@ -1,3 +1,17 @@
import os
import sys
os.system("scons && cd project && godot project.godot")#ask if editor or game should be opened
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'")