From f7b7820a8e05a11336700419b85547b07860fdbd Mon Sep 17 00:00:00 2001 From: Patrick Exner Date: Fri, 9 Jan 2026 21:24:57 +0100 Subject: [PATCH] Rename demo folder to project for generalizing the template usecase Renames all references to the demo folder and changes it to "project" --- .gitignore | 30 +++++++++++------------ CMakeLists.txt | 2 +- README.md | 10 ++++---- SConstruct | 2 +- {demo => project}/bin/android/.gitkeep | 0 {demo => project}/bin/example.gdextension | 0 {demo => project}/bin/linux/.gitkeep | 0 {demo => project}/bin/macos/.gitkeep | 0 {demo => project}/bin/windows/.gitkeep | 0 {demo => project}/example.gd | 0 {demo => project}/example.tscn | 0 {demo => project}/icon.svg | 0 {demo => project}/icon.svg.import | 0 {demo => project}/project.godot | 0 14 files changed, 22 insertions(+), 22 deletions(-) rename {demo => project}/bin/android/.gitkeep (100%) rename {demo => project}/bin/example.gdextension (100%) rename {demo => project}/bin/linux/.gitkeep (100%) rename {demo => project}/bin/macos/.gitkeep (100%) rename {demo => project}/bin/windows/.gitkeep (100%) rename {demo => project}/example.gd (100%) rename {demo => project}/example.tscn (100%) rename {demo => project}/icon.svg (100%) rename {demo => project}/icon.svg.import (100%) rename {demo => project}/project.godot (100%) diff --git a/.gitignore b/.gitignore index 8367781e..66de977e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,20 +3,20 @@ .godot/ # Ignore library files but not the gdextension file -demo/bin/* -!demo/bin/android -demo/bin/android/* -!demo/bin/android/.gitkeep -!demo/bin/linux -demo/bin/linux/* -!demo/bin/linux/.gitkeep -!demo/bin/macos -demo/bin/macos/* -!demo/bin/macos/.gitkeep -!demo/bin/windows -demo/bin/windows/* -!demo/bin/windows/.gitkeep -!demo/bin/*.gdextension +project/bin/* +!project/bin/android +project/bin/android/* +!project/bin/android/.gitkeep +!project/bin/linux +project/bin/linux/* +!project/bin/linux/.gitkeep +!project/bin/macos +project/bin/macos/* +!project/bin/macos/.gitkeep +!project/bin/windows +project/bin/windows/* +!project/bin/windows/.gitkeep +!project/bin/*.gdextension .sconsign*.dblite # Ignore custom.py @@ -59,4 +59,4 @@ compile_commands.json # Cmake cmake-build* -CMakeUserPresets.json \ No newline at end of file +CMakeUserPresets.json diff --git a/CMakeLists.txt b/CMakeLists.txt index fe55943d..a252427c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ if(CMAKE_C_COMPILER) endif() set(LIBNAME "EXTENSION-NAME" CACHE STRING "The name of the library") -set(GODOT_PROJECT_DIR "demo" CACHE STRING "The directory of a Godot project folder") +set(GODOT_PROJECT_DIR "project" CACHE STRING "The directory of a Godot project folder") # Make sure all the dependencies are satisfied find_package(Python3 3.4 REQUIRED) diff --git a/README.md b/README.md index 95bccade..38872b5e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository serves as a quickstart template for GDExtension development with ## Contents * Preconfigured source files for C++ development of the GDExtension ([src/](./src/)) -* An empty Godot project in [demo/](./demo), to test the GDExtension +* An empty Godot project in [project/](./project), to test the GDExtension * godot-cpp as a submodule (`godot-cpp/`) * GitHub Issues template ([.github/ISSUE_TEMPLATE.yml](./.github/ISSUE_TEMPLATE.yml)) * GitHub CI/CD workflows to publish your library packages when creating a release ([.github/workflows/builds.yml](./.github/workflows/builds.yml)) @@ -18,10 +18,10 @@ To get started with your new GDExtension, do the following: * clone your repository to your local computer * initialize the godot-cpp git submodule via `git submodule update --init` * change the name of the compiled library file inside the [SConstruct](./SConstruct) file by modifying the `libname` string. - * change the paths of the to be loaded library name inside the [demo/bin/example.gdextension](./demo/bin/example.gdextension) file, by replacing `EXTENSION-NAME` with the name you chose for `libname`. -* change the `entry_symbol` string inside [demo/bin/example.gdextension](./demo/bin/example.gdextension) file. + * change the paths of the to be loaded library name inside the [project/bin/example.gdextension](./project/bin/example.gdextension) file, by replacing `EXTENSION-NAME` with the name you chose for `libname`. +* change the `entry_symbol` string inside [project/bin/example.gdextension](./project/bin/example.gdextension) file. * rename the `example_library_init` function in [src/register_types.cpp](./src/register_types.cpp) to the same name you chose for `entry_symbol`. -* change the name of the `demo/bin/example.gdextension` file +* change the name of the `project/bin/example.gdextension` file Now, you can build the project with the following command: @@ -29,7 +29,7 @@ Now, you can build the project with the following command: scons ``` -If the build command worked, you can test it with the [demo](./demo) project. Import it into Godot, open it, and launch the main scene. You should see it print the following line in the console: +If the build command worked, you can test it with the [project](./project) project. Import it into Godot, open it, and launch the main scene. You should see it print the following line in the console: ``` Type: 24 diff --git a/SConstruct b/SConstruct index 1d599d0d..1ea68545 100644 --- a/SConstruct +++ b/SConstruct @@ -6,7 +6,7 @@ from methods import print_error libname = "EXTENSION-NAME" -projectdir = "demo" +projectdir = "project" localEnv = Environment(tools=["default"], PLATFORM="") diff --git a/demo/bin/android/.gitkeep b/project/bin/android/.gitkeep similarity index 100% rename from demo/bin/android/.gitkeep rename to project/bin/android/.gitkeep diff --git a/demo/bin/example.gdextension b/project/bin/example.gdextension similarity index 100% rename from demo/bin/example.gdextension rename to project/bin/example.gdextension diff --git a/demo/bin/linux/.gitkeep b/project/bin/linux/.gitkeep similarity index 100% rename from demo/bin/linux/.gitkeep rename to project/bin/linux/.gitkeep diff --git a/demo/bin/macos/.gitkeep b/project/bin/macos/.gitkeep similarity index 100% rename from demo/bin/macos/.gitkeep rename to project/bin/macos/.gitkeep diff --git a/demo/bin/windows/.gitkeep b/project/bin/windows/.gitkeep similarity index 100% rename from demo/bin/windows/.gitkeep rename to project/bin/windows/.gitkeep diff --git a/demo/example.gd b/project/example.gd similarity index 100% rename from demo/example.gd rename to project/example.gd diff --git a/demo/example.tscn b/project/example.tscn similarity index 100% rename from demo/example.tscn rename to project/example.tscn diff --git a/demo/icon.svg b/project/icon.svg similarity index 100% rename from demo/icon.svg rename to project/icon.svg diff --git a/demo/icon.svg.import b/project/icon.svg.import similarity index 100% rename from demo/icon.svg.import rename to project/icon.svg.import diff --git a/demo/project.godot b/project/project.godot similarity index 100% rename from demo/project.godot rename to project/project.godot