From ab4c58180f03331d542a631eb1fa92e11e7017a5 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 22 Sep 2025 16:58:38 +0200 Subject: [PATCH] Improve README and split build instructions to `BUILD.md` This ensures the README is focused on end-user usage and is faster to read. This also improves formatting and consistency in README, the build instructions and the third-party notices. --- BUILD.md | 54 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 62 ++++++++++----------------------------------------- THIRDPARTY.md | 4 ++-- 3 files changed, 68 insertions(+), 52 deletions(-) create mode 100644 BUILD.md diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 0000000..460da61 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,54 @@ +# Compiling from source + +## Required tools + +- **Full** copy of the source code. Remember to use `git clone --recursive`, + or initialize submodules with `git submodule update --init` after cloning. +- [SCons](https://scons.org/pages/download.html) (v3.1.2+), CMake, and Perl. +- C++17 and C99 compilers detectable by SCons and present in `PATH`. + +## Release build + +``` +scons platform= target=editor +``` + +> [!NOTE] +> +> You may get the GDExtension dump yourself from Godot using the instructions +> in the next section, or use the ones provided in [godot-cpp](https://github.com/godotengine/godot-cpp). + +To see a full list of build options, run `scons platform= --help`. + +## Development builds + +When new features are being worked on for the Godot VCS Integration, the build +process sometimes requires developers to make changes in the GDExtension API along +with this plugin. This means we need to manually generate the GDExtension API +from the custom Godot builds and use it to compile godot-cpp, +and then finally link the resulting godot-cpp binary into this plugin. + +If you need to use a custom GDExtension API: + +1. Dump the new bindings from the custom Godot build. + +``` +path/to/godot/bin/godot..editor. --headless --dump-gdextension-interface --dump-extension-api +``` + +2. Build the plugin along with the godot-cpp library. + +``` +scons platform= target=editor generate_bindings=yes dev_build=yes +``` + +> [!NOTE] +> +> You only need to build godot-cpp once every change in the GDExtension API. +> Hence, `generate_bindings=yes` should only be passed in during the first +> time after generating a new GDExtension API dump. + +3. To test the plugin, set up a testing project with Godot, and copy or symlink + the `addons` folder. + +To view more options available while recompiling godot-git-plugin, run `scons platform= -h`. diff --git a/README.md b/README.md index 35ea4a3..14469e0 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,26 @@ -[![C/C++ CI](https://github.com/godotengine/godot-git-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/godotengine/godot-git-plugin/actions/workflows/build.yml) - # Godot Git Plugin -Git implementation of the Godot Engine VCS interface in Godot. We use [libgit2](https://libgit2.org) as our backend to simulate Git in code. +Git implementation of the Godot Engine VCS interface in Godot. +We use [libgit2](https://libgit2.org) as our backend to simulate Git in code. ## Installation -1. Grab the platform binaries here: https://github.com/godotengine/godot-git-plugin/releases -2. Then read the installation instructions: https://github.com/godotengine/godot-git-plugin/wiki - -## Build - -This section onwards is only meant to be used if you intend to compile the plugin from source. - -### Required tools - -- Full copy of the source code. Remember to use `git clone --recursive`, or initialize submodules with `git submodule update --init`. -- [SCons](https://scons.org/pages/download.html) (v3.1.2+), CMake, and Perl. -- C++17 and C90 compilers detectable by SCons and present in `PATH`. - -### Release build - -``` -scons platform= target=editor -``` - -> You may get the GDExtension dump yourself from Godot using the instructions in the next section, or use the ones provided in `godot-cpp`. - -For more build options, run `scons platform= -h` +1. [Download the compiled plugin.](https://github.com/godotengine/godot-git-plugin/releases) +2. [Read the installation and usage instructions.](https://github.com/godotengine/godot-git-plugin/wiki/Git-plugin-v3) -## Dev builds +## Compiling from source -When new features are being worked on for the Godot VCS Integration, the build process sometimes requires developers to make changes in the GDExtension API along with this plugin. This means we need to manually generate the GDExtension API from the custom Godot builds and use it to compile godot-cpp, and then finally link the resulting godot-cpp binary into this plugin. +See [BUILD.md](BUILD.md) for instructions on compiling from source. -If you need to use a custom GDExtension API: - -1. Dump the new bindings from the custom Godot build. - -```shell -./path/to/godot/bin/godot..editor. --headless --dump-gdextension-interface --dump-extension-api -``` - -2. Build the plugin along with the godot-cpp library. - -``` -scons platform= target=editor generate_bindings=yes dev_build=yes -``` - -> You only need to build godot-cpp once every change in the GDExtension API, hence, `generate_bindings=yes` should only be passed in during the first time after generating a new GDExtension API dump. - -3. To test the plugin, set up a testing project with Godot, and copy or symlink the `addons` folder. - -To view more options available while recompiling godot-git-plugin, run `scons platform= -h`. +## License ---- +This plugin is under the MIT license. Third-party notices are present in [THIRDPARTY.md](THIRDPARTY.md). -## License +### OpenSSL license attributions -This plugin is under the MIT License. Third-party notices are present in [THIRDPARTY.md](THIRDPARTY.md). +This product includes software developed by the OpenSSL Project +for use in the OpenSSL Toolkit. (http://www.openssl.org/). -OpenSSL License Attributions - This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) +This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) diff --git a/THIRDPARTY.md b/THIRDPARTY.md index 7b72b27..e52770f 100644 --- a/THIRDPARTY.md +++ b/THIRDPARTY.md @@ -1,4 +1,4 @@ -# Third-Party Notices +# Third-party notices The Godot Git Plugin source code uses the following third-party source code: @@ -7,7 +7,7 @@ The Godot Git Plugin source code uses the following third-party source code: 3. libssh2/libssh2 - BSD-3-Clause License - https://github.com/libssh2/libssh2/tree/635caa90787220ac3773c1d5ba11f1236c22eae8 4. openssl - OpenSSL License - https://github.com/openssl/openssl/tree/26baecb28ce461696966dac9ac889629db0b3b96 -## License Texts +## License texts ### godotengine/godot-cpp