Make platform control better
This commit is contained in:
@@ -26,10 +26,15 @@ def main():
|
|||||||
description="Packages the SS14 content repo for release on all platforms.")
|
description="Packages the SS14 content repo for release on all platforms.")
|
||||||
parser.add_argument("--platform",
|
parser.add_argument("--platform",
|
||||||
action="store",
|
action="store",
|
||||||
choices=["windows", "mac", "linux", "all"],
|
choices=["windows", "mac", "linux"],
|
||||||
help="Which platform to build for.",
|
nargs="*",
|
||||||
default="all")
|
help="Which platform to build for. If not provided, all platforms will be built")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
platforms = args.platform
|
||||||
|
|
||||||
|
if not platforms:
|
||||||
|
platforms = ["windows", "mac", "linux"]
|
||||||
|
|
||||||
if os.path.exists("release"):
|
if os.path.exists("release"):
|
||||||
print(Fore.BLUE+Style.DIM + "Cleaning old release packages (release/)..." + Style.RESET_ALL)
|
print(Fore.BLUE+Style.DIM + "Cleaning old release packages (release/)..." + Style.RESET_ALL)
|
||||||
@@ -37,15 +42,15 @@ def main():
|
|||||||
|
|
||||||
os.mkdir("release")
|
os.mkdir("release")
|
||||||
|
|
||||||
if args.platform == "all" or args.platform == "windows":
|
if "windows" in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_windows()
|
build_windows()
|
||||||
|
|
||||||
if args.platform == "all" or args.platform == "linux":
|
if "linux" in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_linux()
|
build_linux()
|
||||||
|
|
||||||
if args.platform == "all" or args.platform == "mac":
|
if "mac" in platforms:
|
||||||
wipe_bin()
|
wipe_bin()
|
||||||
build_macos()
|
build_macos()
|
||||||
|
|
||||||
@@ -106,7 +111,7 @@ def build_macos():
|
|||||||
"SpaceStation14Content.sln",
|
"SpaceStation14Content.sln",
|
||||||
"/m",
|
"/m",
|
||||||
"/p:Configuration=Release",
|
"/p:Configuration=Release",
|
||||||
"/p:Platform=x86",
|
"/p:Platform=x64",
|
||||||
"/nologo",
|
"/nologo",
|
||||||
"/v:m",
|
"/v:m",
|
||||||
"/p:TargetOS=MacOS",
|
"/p:TargetOS=MacOS",
|
||||||
|
|||||||
Reference in New Issue
Block a user