Merge pull request #50 from EddieDover/multiplatform-building
Better platform detection
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,3 +23,6 @@ src/lib/discord_game_sdk/
|
|||||||
|
|
||||||
# release.py
|
# release.py
|
||||||
release/
|
release/
|
||||||
|
|
||||||
|
# venv
|
||||||
|
venv/
|
11
build.py
11
build.py
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
yes = {"yes", "y", "ye", ""}
|
yes = {"yes", "y", "ye", ""}
|
||||||
@@ -16,15 +17,17 @@ if choice in yes:
|
|||||||
"python -m SCons && python -m SCons target=template_release && cd project && godot"
|
"python -m SCons && python -m SCons target=template_release && cd project && godot"
|
||||||
)
|
)
|
||||||
elif choice in no:
|
elif choice in no:
|
||||||
if os.name == "nt": # Windows
|
system = platform.system()
|
||||||
|
print("Building for: '%s'" % (system))
|
||||||
|
if system == "Windows": # Windows
|
||||||
os.system(
|
os.system(
|
||||||
"python -m SCons && python -m SCons target=template_release && godot project\project.godot"
|
"python -m SCons && python -m SCons target=template_release && godot project/project.godot"
|
||||||
)
|
)
|
||||||
elif os.name == "darwin": # macOS
|
elif system == "Darwin": # macOS
|
||||||
os.system(
|
os.system(
|
||||||
"python -m SCons target=template_release arch=x86_64 && python -m SCons target=template_debug arch=x86_64 && python -m SCons target=template_release arch=arm64 && python -m SCons target=template_debug arch=arm64 && godot project/project.godot"
|
"python -m SCons target=template_release arch=x86_64 && python -m SCons target=template_debug arch=x86_64 && python -m SCons target=template_release arch=arm64 && python -m SCons target=template_debug arch=arm64 && godot project/project.godot"
|
||||||
)
|
)
|
||||||
else:
|
else: # Linux
|
||||||
os.system(
|
os.system(
|
||||||
"python -m SCons && python -m SCons target=template_release && godot project/project.godot"
|
"python -m SCons && python -m SCons target=template_release && godot project/project.godot"
|
||||||
)
|
)
|
||||||
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
setuptools
|
||||||
|
scons
|
Reference in New Issue
Block a user