Compare commits

..

10 Commits

Author SHA1 Message Date
Nathan Franke 6e92461a9a
Revert "move `demo/scene.tscn` to `test.tscn`"
This reverts commit 648dc48bc7.
2 years ago
Nathan Franke e265fc38ea
remove absolute paths 2 years ago
Nathan Franke 648dc48bc7
move `demo/scene.tscn` to `test.tscn` 2 years ago
Nathan Franke 931e8ed82b
update to 4.2.1
working on Linux
2 years ago
Nathan Franke 524256409e
fix Android NDK version 2 years ago
Nathan Franke 31fde21c69
jdk distribution temurin 2 years ago
Nathan Franke 5edc4e0398
update java and android 2 years ago
Nathan Franke 8e095972a3
Merge pull request #8 from Squatnet/4.1.3-fixes
update godot-cpp to 4.1 latest, (4.1.3) and fix up register_types.cpp
2 years ago
Matt Abbott 62eec8a573 update godot-cpp to 4.1 latest, (4.1.3) fix up register_types.cpp for 4.1 2 years ago
Nathan Franke 555286e7fd
Update README.md 2 years ago

@ -52,26 +52,35 @@ jobs:
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: (Android) Set up Java 11 - name: (Android) Install JDK 17
if: ${{ startsWith(matrix.identifier, 'android-') }} if: ${{ startsWith(matrix.identifier, 'android-') }}
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 17
distribution: temurin
- name: (Android) Set up Android SDK - name: (Android) Install Android SDK
if: ${{ startsWith(matrix.identifier, 'android-') }} if: ${{ startsWith(matrix.identifier, 'android-') }}
uses: android-actions/setup-android@v2 uses: android-actions/setup-android@v3
- name: (Android) Install Android Tools # From Godot docs, might not be necessary.
if: ${{ startsWith(matrix.identifier, 'android-') }} #- name: (Android) Install Android Tools
shell: sh # if: ${{ startsWith(matrix.identifier, 'android-') }}
run: | # shell: sh
"$ANDROID_SDK_ROOT"/cmdline-tools/latest/bin/sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529" # run: |
# "$ANDROID_SDK_ROOT"/cmdline-tools/latest/bin/sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404"
- name: (Android) Install NDK r23c
if: ${{ matrix.platform == 'android' }}
uses: nttld/setup-ndk@v1
with:
ndk-version: r23c
link-to-sdk: true
- name: Set up Python - name: Install Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
- name: Set up SCons - name: Install SCons
shell: bash shell: bash
run: | run: |
python -c "import sys; print(sys.version)" python -c "import sys; print(sys.version)"

@ -4,17 +4,14 @@ GDExtension template that automatically builds into a self-contained addon for t
### Getting started: ### Getting started:
1. Clone this repository (or a new repository with this template) with submodules. 1. Clone this repository (or a new repository with this template) with submodules.
- `git clone --recurse-submodules https://github.com/nathanfranke/gdextension.git` \ - `git clone --recurse-submodules https://github.com/nathanfranke/gdextension.git`
- `cd gdextension` - `cd gdextension`
2. Update to the latest `godot-cpp`. 2. Update to the latest `godot-cpp`.
- `git submodule update --remote` - `git submodule update --remote`
2. Build a debug binary for the current platform. 2. Build a debug binary for the current platform.
- `scons` - `scons`
3. Import, edit, and play `project/` using Godot Engine 4+. 3. Import, edit, and play `project/` using Godot Engine 4+.
- Alternatively, run the project using the terminal. - `godot --path project/`
- Either alias an existing executable to godot4: `alias godot4="~/workspace/godot/bin/godot.linuxbsd.tools.x86_64"`
- Or, on Arch Linux, install `godot4-bin` from the AUR (`yay -S aur/godot4-bin`).
- Finally, `godot4 --path project/`
4. Check the output: 4. Check the output:
``` ```
Hello GDScript! Hello GDScript!

@ -1 +1 @@
Subproject commit 9d1c396c54fc3bdfcc7da4f3abcb52b14f6cce8f Subproject commit 48afa82f29354668c12cffaf6a2474dabfd395ed

@ -1,6 +1,7 @@
[configuration] [configuration]
entry_symbol = "gdextension_init" entry_symbol = "gdextension_init"
compatibility_minimum = 4.2
[libraries] [libraries]

@ -12,4 +12,4 @@ config_version=5
config/name="project" config/name="project"
run/main_scene="res://demo/scene.tscn" run/main_scene="res://demo/scene.tscn"
config/features=PackedStringArray("4.0", "Forward Plus") config/features=PackedStringArray("4.2", "Forward Plus")

@ -36,9 +36,9 @@ void gdextension_terminate(ModuleInitializationLevel p_level)
extern "C" extern "C"
{ {
GDExtensionBool GDE_EXPORT gdextension_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) GDExtensionBool GDE_EXPORT gdextension_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization)
{ {
godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
init_obj.register_initializer(gdextension_initialize); init_obj.register_initializer(gdextension_initialize);
init_obj.register_terminator(gdextension_terminate); init_obj.register_terminator(gdextension_terminate);

Loading…
Cancel
Save