From a47ef5e3a112adcfce24aedc2aa93ea9f2539e17 Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Fri, 17 Jun 2022 13:22:33 -0500 Subject: [PATCH] move project files to subdirectory, remove extra imports --- .github/workflows/build.yml | 8 +++----- .gitignore | 3 --- SConstruct | 3 ++- project/.gitignore | 2 ++ {addons => project/addons}/example/example.gdextension | 0 {demo => project/demo}/demo.gd | 0 {demo => project/demo}/demo.tscn | 0 project.godot => project/project.godot | 0 src/.gdignore | 0 src/my_node.cpp | 3 --- src/my_node.hpp | 4 ---- src/my_singleton.cpp | 3 --- src/my_singleton.hpp | 4 ---- 13 files changed, 7 insertions(+), 23 deletions(-) create mode 100644 project/.gitignore rename {addons => project/addons}/example/example.gdextension (100%) rename {demo => project/demo}/demo.gd (100%) rename {demo => project/demo}/demo.tscn (100%) rename project.godot => project/project.godot (100%) delete mode 100644 src/.gdignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9418ede..f99d972 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,12 +138,12 @@ jobs: # SCONS_CACHE_LIMIT: 8192 run: | scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' -j2 - ls -l addons/example/bin/ + ls -l project/addons/*/bin/ - name: Copy extra files to addon shell: sh run: | - for addon in ${{ github.workspace }}/addons/*/; do + for addon in ${{ github.workspace }}/project/addons/*/; do cp --no-clobber '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE' "$addon" done @@ -156,6 +156,4 @@ jobs: with: name: ${{ github.event.repository.name }}_${{ steps.version.outputs.version }} path: | - ${{ github.workspace }}/addons/ - # TODO: Remove extra file once https://github.com/actions/upload-artifact/issues/174 resolved. - ${{ github.workspace }}/project.godot + ${{ github.workspace }}/project/ diff --git a/.gitignore b/.gitignore index 2823a3c..f8bda60 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,3 @@ # Editors .vscode/ - -# Godot 4+ specific ignores -.godot/ diff --git a/SConstruct b/SConstruct index 995922d..ff15d98 100644 --- a/SConstruct +++ b/SConstruct @@ -7,7 +7,8 @@ env = SConscript("godot-cpp/SConstruct") env.Append(CPPPATH=["src/"]) sources = Glob("src/*.cpp") -(addon_path,) = glob("addons/*/") +# Find correct addons path even if the directory is renamed. +(addon_path,) = glob("project/addons/*/") scons_cache_path = os.environ.get("SCONS_CACHE") if scons_cache_path != None: diff --git a/project/.gitignore b/project/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/project/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/addons/example/example.gdextension b/project/addons/example/example.gdextension similarity index 100% rename from addons/example/example.gdextension rename to project/addons/example/example.gdextension diff --git a/demo/demo.gd b/project/demo/demo.gd similarity index 100% rename from demo/demo.gd rename to project/demo/demo.gd diff --git a/demo/demo.tscn b/project/demo/demo.tscn similarity index 100% rename from demo/demo.tscn rename to project/demo/demo.tscn diff --git a/project.godot b/project/project.godot similarity index 100% rename from project.godot rename to project/project.godot diff --git a/src/.gdignore b/src/.gdignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/my_node.cpp b/src/my_node.cpp index 8889196..d304aa8 100644 --- a/src/my_node.cpp +++ b/src/my_node.cpp @@ -1,9 +1,6 @@ #include "my_node.hpp" #include - -#include -#include #include using namespace godot; diff --git a/src/my_node.hpp b/src/my_node.hpp index 369226b..253e554 100644 --- a/src/my_node.hpp +++ b/src/my_node.hpp @@ -1,10 +1,6 @@ #pragma once #include -#include -#include - -#include using namespace godot; diff --git a/src/my_singleton.cpp b/src/my_singleton.cpp index 7447857..1d2b726 100644 --- a/src/my_singleton.cpp +++ b/src/my_singleton.cpp @@ -1,9 +1,6 @@ #include "my_singleton.hpp" #include - -#include -#include #include using namespace godot; diff --git a/src/my_singleton.hpp b/src/my_singleton.hpp index 3a38b59..74805b2 100644 --- a/src/my_singleton.hpp +++ b/src/my_singleton.hpp @@ -1,10 +1,6 @@ #pragma once #include -#include -#include - -#include using namespace godot;