From 63adb26de97dacb93e2c46386dc54e2013f60014 Mon Sep 17 00:00:00 2001 From: "Nathan T.A. Lewis" Date: Fri, 7 Jun 2024 11:00:03 -0600 Subject: [PATCH 1/4] Update C++ example to use version 4.2 --- .../scripting/gdextension/gdextension_cpp_example.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index e42f0ce73..31364cc70 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -35,7 +35,7 @@ of Godot. GDExtensions will not work in older versions of Godot (only Godot 4 an .. note:: To use `GDExtension `__ you need to use the godot-cpp branch that matches the version of Godot that you are - targeting. For example, if you're targeting Godot 4.1, use the ``4.1`` branch, + targeting. For example, if you're targeting Godot 4.2, use the ``4.2`` branch, which is what is shown through out this tutorial. The ``master`` branch is the development branch which is updated regularly @@ -59,7 +59,7 @@ a Git submodule: mkdir gdextension_cpp_example cd gdextension_cpp_example git init - git submodule add -b 4.1 https://github.com/godotengine/godot-cpp + git submodule add -b 4.2 https://github.com/godotengine/godot-cpp cd godot-cpp git submodule update --init @@ -69,7 +69,7 @@ Alternatively, you can also clone it to the project folder: mkdir gdextension_cpp_example cd gdextension_cpp_example - git clone -b 4.1 https://github.com/godotengine/godot-cpp + git clone -b 4.2 https://github.com/godotengine/godot-cpp .. note:: @@ -332,7 +332,7 @@ build files in a subsequent tutorial. This ``SConstruct`` file was written to be used with the latest ``godot-cpp`` master, you may need to make small changes using it with older versions or - refer to the ``SConstruct`` file in the Godot 4.0 documentation. + refer to the ``SConstruct`` file in the Godot 4.2 documentation. Once you've downloaded the ``SConstruct`` file, place it in your GDExtension folder structure alongside ``godot-cpp``, ``src`` and ``demo``, then run: @@ -363,7 +363,7 @@ loaded for each platform and the entry function for the module. It is called ``g [configuration] entry_symbol = "example_library_init" - compatibility_minimum = "4.1" + compatibility_minimum = "4.2" [libraries] From 42cb5ef1ff65abd80572992e7fde0a409bc38b3f Mon Sep 17 00:00:00 2001 From: "Nathan T.A. Lewis" Date: Fri, 7 Jun 2024 20:07:15 -0600 Subject: [PATCH 2/4] Revert compatibility_minimum change Since 4.2 is still compatible with 4.1, the minimum compatibility can remain 4.1. --- tutorials/scripting/gdextension/gdextension_cpp_example.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index 31364cc70..c3dc81af7 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -363,7 +363,7 @@ loaded for each platform and the entry function for the module. It is called ``g [configuration] entry_symbol = "example_library_init" - compatibility_minimum = "4.2" + compatibility_minimum = "4.1" [libraries] From 2075def75e7f41a7b1577f0c73acc4ef027ef0c0 Mon Sep 17 00:00:00 2001 From: "Nathan T.A. Lewis" Date: Sat, 15 Jun 2024 09:41:17 -0600 Subject: [PATCH 3/4] Abstract the minor verison number where possible To ease the maintenance burden in the future, we are abstracting the minor version number to avoid the number of doc updates required. --- .../gdextension/gdextension_cpp_example.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index c3dc81af7..ff33160d2 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -35,16 +35,17 @@ of Godot. GDExtensions will not work in older versions of Godot (only Godot 4 an .. note:: To use `GDExtension `__ you need to use the godot-cpp branch that matches the version of Godot that you are - targeting. For example, if you're targeting Godot 4.2, use the ``4.2`` branch, - which is what is shown through out this tutorial. + targeting. For example, if you're targeting Godot 4.1, use the ``4.1`` branch. Throughout + this tutorial we use ``4.x`,` which will need to be replaced with the version of Godot you + are targeting. The ``master`` branch is the development branch which is updated regularly to work with Godot's ``master`` branch. .. warning:: Our long-term goal is that GDExtensions targeting an earlier version of Godot will work - in later minor versions, but not vice-versa. For example, a GDExtension targeting Godot 4.2 - should work just fine in Godot 4.3, but one targeting Godot 4.3 won't work in Godot 4.2. + in later minor versions, but not vice-versa. For example, a GDExtension targeting Godot 4.1 + should work just fine in Godot 4.2, but one targeting Godot 4.2 won't work in Godot 4.1. However, GDExtension is currently *experimental*, which means that we may break compatibility in order to fix major bugs or include critical features. For example, GDExtensions created @@ -59,7 +60,7 @@ a Git submodule: mkdir gdextension_cpp_example cd gdextension_cpp_example git init - git submodule add -b 4.2 https://github.com/godotengine/godot-cpp + git submodule add -b 4.x https://github.com/godotengine/godot-cpp cd godot-cpp git submodule update --init @@ -69,7 +70,7 @@ Alternatively, you can also clone it to the project folder: mkdir gdextension_cpp_example cd gdextension_cpp_example - git clone -b 4.2 https://github.com/godotengine/godot-cpp + git clone -b 4.x https://github.com/godotengine/godot-cpp .. note:: @@ -332,7 +333,7 @@ build files in a subsequent tutorial. This ``SConstruct`` file was written to be used with the latest ``godot-cpp`` master, you may need to make small changes using it with older versions or - refer to the ``SConstruct`` file in the Godot 4.2 documentation. + refer to the ``SConstruct`` file in the Godot 4.x documentation. Once you've downloaded the ``SConstruct`` file, place it in your GDExtension folder structure alongside ``godot-cpp``, ``src`` and ``demo``, then run: From 0d58b5ad55e5bf58b190b3f35ca8cd718507ac24 Mon Sep 17 00:00:00 2001 From: "Nathan T.A. Lewis" Date: Sat, 15 Jun 2024 11:11:51 -0600 Subject: [PATCH 4/4] Fix typo Co-authored-by: A Thousand Ships (she/her) <96648715+AThousandShips@users.noreply.github.com> --- tutorials/scripting/gdextension/gdextension_cpp_example.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index ff33160d2..c62fe41a7 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -36,7 +36,7 @@ of Godot. GDExtensions will not work in older versions of Godot (only Godot 4 an To use `GDExtension `__ you need to use the godot-cpp branch that matches the version of Godot that you are targeting. For example, if you're targeting Godot 4.1, use the ``4.1`` branch. Throughout - this tutorial we use ``4.x`,` which will need to be replaced with the version of Godot you + this tutorial we use ``4.x``, which will need to be replaced with the version of Godot you are targeting. The ``master`` branch is the development branch which is updated regularly