Rename demo folder to project for generalizing the template usecase
Renames all references to the demo folder and changes it to "project"
This commit is contained in:
1 parent
e59f81e7e4
commit
f7b7820a8e
14 files changed
+21
-21
No files matched your search
+14
-14
@@ -3,20 +3,20 @@
|
|||||||
.godot/
|
.godot/
|
||||||
|
|
||||||
# Ignore library files but not the gdextension file
|
# Ignore library files but not the gdextension file
|
||||||
demo/bin/*
|
project/bin/*
|
||||||
!demo/bin/android
|
!project/bin/android
|
||||||
demo/bin/android/*
|
project/bin/android/*
|
||||||
!demo/bin/android/.gitkeep
|
!project/bin/android/.gitkeep
|
||||||
!demo/bin/linux
|
!project/bin/linux
|
||||||
demo/bin/linux/*
|
project/bin/linux/*
|
||||||
!demo/bin/linux/.gitkeep
|
!project/bin/linux/.gitkeep
|
||||||
!demo/bin/macos
|
!project/bin/macos
|
||||||
demo/bin/macos/*
|
project/bin/macos/*
|
||||||
!demo/bin/macos/.gitkeep
|
!project/bin/macos/.gitkeep
|
||||||
!demo/bin/windows
|
!project/bin/windows
|
||||||
demo/bin/windows/*
|
project/bin/windows/*
|
||||||
!demo/bin/windows/.gitkeep
|
!project/bin/windows/.gitkeep
|
||||||
!demo/bin/*.gdextension
|
!project/bin/*.gdextension
|
||||||
.sconsign*.dblite
|
.sconsign*.dblite
|
||||||
|
|
||||||
# Ignore custom.py
|
# Ignore custom.py
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ if(CMAKE_C_COMPILER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBNAME "EXTENSION-NAME" CACHE STRING "The name of the library")
|
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
|
# Make sure all the dependencies are satisfied
|
||||||
find_package(Python3 3.4 REQUIRED)
|
find_package(Python3 3.4 REQUIRED)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ This repository serves as a quickstart template for GDExtension development with
|
|||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
* Preconfigured source files for C++ development of the GDExtension ([src/](./src/))
|
* 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/`)
|
* godot-cpp as a submodule (`godot-cpp/`)
|
||||||
* GitHub Issues template ([.github/ISSUE_TEMPLATE.yml](./.github/ISSUE_TEMPLATE.yml))
|
* 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))
|
* 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
|
* clone your repository to your local computer
|
||||||
* initialize the godot-cpp git submodule via `git submodule update --init`
|
* 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 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 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 [demo/bin/example.gdextension](./demo/bin/example.gdextension) file.
|
* 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`.
|
* 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:
|
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
|
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
|
Type: 24
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ from methods import print_error
|
|||||||
|
|
||||||
|
|
||||||
libname = "EXTENSION-NAME"
|
libname = "EXTENSION-NAME"
|
||||||
projectdir = "demo"
|
projectdir = "project"
|
||||||
|
|
||||||
localEnv = Environment(tools=["default"], PLATFORM="")
|
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user