Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -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=<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=<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.<platform>.editor.<arch> --headless --dump-gdextension-interface --dump-extension-api
```

2. Build the plugin along with the godot-cpp library.

```
scons platform=<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=<platform> -h`.
62 changes: 12 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

<img src="/icon.png" width="25%" />

# 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=<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=<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.<platform>.editor.<arch> --headless --dump-gdextension-interface --dump-extension-api
```

2. Build the plugin along with the godot-cpp library.

```
scons platform=<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=<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)
4 changes: 2 additions & 2 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Third-Party Notices
# Third-party notices

The Godot Git Plugin source code uses the following third-party source code:

Expand All @@ -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

Expand Down