JustMotion/build.py
zii 7c72d26e46 v1.0
-initial commit
-basic functions tested working
2025-06-26 12:06:41 -04:00

56 lines
1.3 KiB
Python
Executable File

#!/usr/bin/python3
import os
import subprocess
def cd():
current_dir = os.path.dirname(__file__)
if current_dir != "":
os.chdir(current_dir)
def main():
cd()
opt = ""
while opt == "":
print("--Welcome to the build script for JustMotion--")
print("Before we begin it is highly recommended that you install the QT API from the online installer.")
print("The QT API from various linux package managers are often too old to build this app.")
print("Version 6.9+ is recommended.\n")
print("What would you like to build?")
print("[1] Server Only")
print("[2] Client Only")
print("[3] Both")
print("[4] Quit\n")
opt = input("[1-4]: ")
if opt == "1":
os.chdir("server")
subprocess.run(["python3", "build.py"])
break
elif opt == "2":
os.chdir("client")
subprocess.run(["python3", "build.py"])
break
elif opt == "3":
os.chdir("server")
subprocess.run(["python3", "build.py"])
os.chdir("../client")
subprocess.run(["python3", "build.py"])
break
elif opt == "4":
break
else:
print("err: invalid option\n")
opt = ""
cd()
if __name__ == "__main__":
main()