From 7be2c5a1199fe5f2ec963aeafd09ac4df03fa0f8 Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Fri, 22 Dec 2023 17:03:46 -0800 Subject: [PATCH 1/5] Requirements and gitignore changes for easier venv setup --- .gitignore | 5 ++++- requirements.txt | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index e9062cd..b32f1c9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ build/ src/lib/discord_game_sdk/ # release.py -release/ \ No newline at end of file +release/ + +# venv +venv/ \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7331a9c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +setuptools +scons \ No newline at end of file From a52ca54bca9a23ba6764f77bf3bd23abee59f374 Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Fri, 22 Dec 2023 17:04:26 -0800 Subject: [PATCH 2/5] Switched from os.name to platform.system for better platform discovery --- build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index bc2b70c..3ad66fd 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ import os +import platform import sys yes = {"yes", "y", "ye", ""} @@ -16,15 +17,16 @@ if choice in yes: "python -m SCons && python -m SCons target=template_release && cd project && godot" ) elif choice in no: - if os.name == "nt": # Windows + system = platform.system() + if system == "Windows": # Windows 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( "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( "python -m SCons && python -m SCons target=template_release && godot project/project.godot" ) From 39078e7a98466bcf16d6281662ec1ceafa9e9063 Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Fri, 22 Dec 2023 17:03:46 -0800 Subject: [PATCH 3/5] Requirements and gitignore changes for easier venv setup --- .gitignore | 5 ++++- requirements.txt | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index e9062cd..b32f1c9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ build/ src/lib/discord_game_sdk/ # release.py -release/ \ No newline at end of file +release/ + +# venv +venv/ \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7331a9c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +setuptools +scons \ No newline at end of file From 20978010a1c524d2c9daf01e1456c392a22ea69e Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Fri, 22 Dec 2023 17:04:26 -0800 Subject: [PATCH 4/5] Switched from os.name to platform.system for better platform discovery --- build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index bc2b70c..3ad66fd 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ import os +import platform import sys yes = {"yes", "y", "ye", ""} @@ -16,15 +17,16 @@ if choice in yes: "python -m SCons && python -m SCons target=template_release && cd project && godot" ) elif choice in no: - if os.name == "nt": # Windows + system = platform.system() + if system == "Windows": # Windows 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( "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( "python -m SCons && python -m SCons target=template_release && godot project/project.godot" ) From 93d424e3e7a30b5aa092a8472ae9b402d9d6e833 Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Sat, 23 Dec 2023 05:49:10 -0800 Subject: [PATCH 5/5] Added platform identifier to output --- build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build.py b/build.py index 3ad66fd..0331fbc 100644 --- a/build.py +++ b/build.py @@ -18,6 +18,7 @@ if choice in yes: ) elif choice in no: system = platform.system() + print("Building for: '%s'" % (system)) if system == "Windows": # Windows os.system( "python -m SCons && python -m SCons target=template_release && godot project/project.godot"