Merge pull request #109 from paddy-exe/rename-demo-folder-to-project-folder

Rename demo folder to project for generalizing the template usecase
This commit is contained in:
Patrick Exner (FlameLizard) authored and GitHub committed 2026-01-20 18:28:20 +01:00
commit 4c0a06ffe9
14 files changed
+22 -22

No files matched your search

+15 -15
View File
@@ -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
CMakeUserPresets.json
+1 -1
View File
@@ -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)
+5 -5
View File
@@ -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
+1 -1
View File
@@ -6,7 +6,7 @@ from methods import print_error
libname = "EXTENSION-NAME"
projectdir = "demo"
projectdir = "project"
localEnv = Environment(tools=["default"], PLATFORM="")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.