mirror of
https://github.com/godotengine/godot-git-plugin.git
synced 2026-01-01 01:48:28 +03:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e0415dd14 | ||
|
|
242d72e5b6 | ||
|
|
0378e78572 | ||
|
|
fab7b595e1 | ||
|
|
d821a882c3 | ||
|
|
f85fef24b7 | ||
|
|
7fd33bec6f | ||
|
|
95e909bc6b | ||
|
|
3abcf57b6a | ||
|
|
2d938a85a3 | ||
|
|
2c7f341285 | ||
|
|
9cefa91f58 | ||
|
|
89d5532b1b | ||
|
|
c952c57bd9 |
4
.github/workflows/clang-format.yml
vendored
4
.github/workflows/clang-format.yml
vendored
@@ -1,9 +1,9 @@
|
||||
name: clang-format
|
||||
|
||||
on: [push]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -16,3 +16,10 @@ api.json
|
||||
# Binaries
|
||||
build/
|
||||
*.obj
|
||||
*.os
|
||||
*.so
|
||||
*.dll
|
||||
*.exp
|
||||
*.lib
|
||||
*.a
|
||||
*.dylib
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2019 The Godot Engine community
|
||||
Copyright (c) 2016-2022 The Godot Engine community
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
16
README.md
16
README.md
@@ -4,7 +4,7 @@
|
||||
|
||||
Git implementation of the Godot Engine VCS interface in Godot. We use [libgit2](https://libgit2.org) as our backend to simulate Git in code.
|
||||
|
||||
> Planned for the upcoming version of Godot. Look for other branches for support in other Godot releases.
|
||||
**Works only for the Godot 3.2.x-3.4.x releases**
|
||||
|
||||
## Installation Instructions
|
||||
|
||||
@@ -44,6 +44,18 @@ Required build tools:
|
||||
2. Run ```. ./build_libs_mac.sh Release```.
|
||||
3. Run ```scons platform=osx target=release```.
|
||||
|
||||
#### Debug build
|
||||
### Debug build
|
||||
|
||||
Replace `Release` with `Debug` and `release` with `debug` in the above instructions for a debug build. You will also have to do the same in the paths mentioned in `demo/git_api.gdnlib` before opening the demo project in Godot.
|
||||
|
||||
### Bleeding Edge Builds
|
||||
|
||||
> This section onwards is only meant to be used by developers.
|
||||
|
||||
Most of the times when new features are being worked on for the Godot VCS Integration, this requires us to make changes in Godot along with this plugin. Thus, this means we need to manually generate the GDNative API from these newer Godot builds and then use them with godot-cpp.
|
||||
|
||||
1. Generate `api.json` from Godot executable: `godot --gdnative-generate-json-api api.json`
|
||||
2. Change directory to `godot-cpp`: `cd godot-cpp`
|
||||
3. Build the C++ bindings: `scons platform=<platform> target=<target> generate_bindings=yes bits=64 use_custom_api_file=yes custom_api_file=<path/to/api.json> -j <number of CPUs>`
|
||||
4. Change directory up one level: `cd ..`
|
||||
5. Build the plugin as usual: `scons platform=<windows> target=<target>`
|
||||
|
||||
1062
THIRDPARTY.md
Normal file
1062
THIRDPARTY.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ cd godot-git-plugin/thirdparty/libgit2/
|
||||
mkdir build
|
||||
cd build/
|
||||
rm -f CMakeCache.txt
|
||||
cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF -DUSE_SSH=OFF -DUSE_HTTPS=OFF -DUSE_BUNDLED_ZLIB=ON
|
||||
cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF -DUSE_SSH=OFF -DUSE_HTTPS=OFF -DUSE_BUNDLED_ZLIB=ON -DREGEX_BACKEND=builtin
|
||||
cmake --build . --config $1
|
||||
cd ../../../../
|
||||
mkdir -p "demo/addons/godot-git-plugin/x11/"
|
||||
@@ -19,6 +19,6 @@ else
|
||||
fi
|
||||
|
||||
cd godot-cpp/;
|
||||
CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
|
||||
CORES=$(grep -c \^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
|
||||
scons platform=linux target=$1 generate_bindings=yes bits=64 -j$CORES;
|
||||
cd ..
|
||||
|
||||
3
godot-git-plugin/thirdparty/VERSIONS
vendored
3
godot-git-plugin/thirdparty/VERSIONS
vendored
@@ -1,3 +0,0 @@
|
||||
# This file lists all thirdparty libraries used in this plugin with the latest master commit link of when source was picked up
|
||||
|
||||
libgit2 v1.0: https://github.com/libgit2/libgit2/commit/7d3c7057f0e774aecd6fc4ef8333e69e5c4873e0
|
||||
62
release.sh
Executable file
62
release.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script is used to create releases for this plugin. This is mostly a helper script for the maintainer.
|
||||
|
||||
echo "Enter the new version number (e.g. 1.2.1):"
|
||||
read version
|
||||
|
||||
echo "Enter the Windows x64 release ZIP URL:"
|
||||
read windowsZIPURL
|
||||
|
||||
echo "Enter the Linux x64 release ZIP URL:"
|
||||
read linuxZIPURL
|
||||
|
||||
echo "Enter the MacOS universal release ZIP URL:"
|
||||
read macZIPURL
|
||||
|
||||
# wget-ing the github.com URL gives a 404, so we use the method proposed here - https://github.com/actions/upload-artifact/issues/51#issuecomment-735989475
|
||||
windowsZIPURL=${windowsZIPURL/github.com/nightly.link}
|
||||
linuxZIPURL=${linuxZIPURL/github.com/nightly.link}
|
||||
macZIPURL=${macZIPURL/github.com/nightly.link}
|
||||
|
||||
wget -O windows.zip $windowsZIPURL
|
||||
wget -O x11.zip $linuxZIPURL
|
||||
wget -O mac.zip $macZIPURL
|
||||
|
||||
unzip windows.zip -d windows/
|
||||
unzip x11.zip -d x11/
|
||||
unzip mac.zip -d mac/
|
||||
|
||||
releasePath=godot-git-plugin-v$version
|
||||
mkdir $releasePath
|
||||
|
||||
cp -r windows/addons/ $releasePath
|
||||
addonsPath=$releasePath/addons
|
||||
pluginPath=$addonsPath/godot-git-plugin
|
||||
|
||||
mkdir $pluginPath/x11
|
||||
mkdir $pluginPath/osx
|
||||
cp -r x11/addons/godot-git-plugin/x11/ $pluginPath/
|
||||
cp -r mac/addons/godot-git-plugin/osx/ $pluginPath/
|
||||
|
||||
sed -i "s/version=\"[^\"]*\"/version=\"v${version}\"/g" $pluginPath/plugin.cfg
|
||||
cp LICENSE $pluginPath/LICENSE
|
||||
cp THIRDPARTY.md $pluginPath/THIRDPARTY.md
|
||||
|
||||
rm -f $pluginPath/x11/libgit2.a
|
||||
rm -f $pluginPath/osx/libgit2.a
|
||||
rm -f $pluginPath/win64/git2.lib
|
||||
|
||||
pushd $releasePath
|
||||
zip -r $releasePath.zip addons/
|
||||
popd
|
||||
|
||||
mv $releasePath/$releasePath.zip ./
|
||||
|
||||
rm -rf $releasePath
|
||||
rm -rf windows
|
||||
rm -rf x11
|
||||
rm -rf mac
|
||||
rm windows.zip
|
||||
rm x11.zip
|
||||
rm mac.zip
|
||||
Reference in New Issue
Block a user