18 Commits
v1.2.2 ... v1.x

Author SHA1 Message Date
Twarit Waikar
86535c020d Happy new year! (v1.x) 2023-01-02 13:56:50 +05:30
Twarit Waikar
3bf5297479 Add logo to README.md 2022-08-08 02:58:57 +05:30
Twarit Waikar
3c2a8ded89 Add logo files 2022-08-08 02:56:45 +05:30
ChronicallySerious
5d9cd14c75 Create release zip at one level above for users to install easily 2022-02-01 20:49:57 +05:30
Twarit Waikar
9e0415dd14 Merge pull request #104 from ChronicallySerious/v1-release-automation 2022-02-01 19:30:34 +05:30
ChronicallySerious
242d72e5b6 Change release.sh to compress 1 level deeper 2022-02-01 19:26:41 +05:30
ChronicallySerious
0378e78572 Ignore remaining linux binaries 2022-02-01 18:28:47 +05:30
ChronicallySerious
fab7b595e1 Automate v1.x release creation 2022-02-01 18:21:01 +05:30
Twarit Waikar
d821a882c3 Update licensing date 2022-01-31 22:44:15 +05:30
Twarit Waikar
f85fef24b7 Merge pull request #103 from ChronicallySerious/fix-pcre-undefined 2022-01-31 22:32:42 +05:30
ChronicallySerious
7fd33bec6f Fix pcre not being included in static libgit2 build
Fixes #94

This backports a fix from v2.x which adds the builtin version of pcre as
a static dependency, rather than relying on the OS to provide pcre
2022-01-31 22:15:03 +05:30
Twarit Waikar
95e909bc6b Mention compatible Godot versions for v1.0 2022-01-10 20:27:27 +05:30
Twarit Waikar
3abcf57b6a Fix typo in README.md
`featured` -> `features`
2021-11-29 12:31:05 +05:30
Twarit Waikar
2d938a85a3 Merge pull request #93 from VinegarLove/patch-1 2021-11-29 12:13:26 +05:30
Twarit Waikar
2c7f341285 Trigger clang-format workflow on PRs too 2021-11-29 12:12:04 +05:30
VinegarLove
9cefa91f58 linux build script updated for other shells
fixed the way the CORES variable assignment  to be compliant with other shells other than bash
2021-11-28 23:38:54 +01:00
Twarit Waikar
89d5532b1b Add bleeding edge build instructions 2021-10-02 20:29:42 +05:30
Twarit Waikar
c952c57bd9 Update clang-format.yml 2021-10-02 05:29:07 +05:30
10 changed files with 1293 additions and 11 deletions

View File

@@ -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
View File

@@ -16,3 +16,10 @@ api.json
# Binaries
build/
*.obj
*.os
*.so
*.dll
*.exp
*.lib
*.a
*.dylib

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2016-2019 The Godot Engine community
Copyright (c) 2016-2023 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

View File

@@ -1,10 +1,12 @@
[![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)
# GDNative Based Git Plugin for Godot Version Control Editor Plugin
<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.
> 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. Look in other branches for support in other Godot versions.**
## Installation Instructions
@@ -44,6 +46,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

File diff suppressed because it is too large Load Diff

View File

@@ -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 ..

View File

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

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

144
icon.svg Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="1024"
width="1024"
version="1.1"
id="svg47"
sodipodi:docname="icon_color.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
inkscape:export-filename="icon_color.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs51">
<mask
maskUnits="userSpaceOnUse"
id="mask11953">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.754231;stroke-opacity:1"
id="rect11955"
width="43.98111"
height="4.7610822"
x="490.15945"
y="230.63536" />
</mask>
</defs>
<sodipodi:namedview
id="namedview49"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
shape-rendering="auto"
inkscape:zoom="1"
inkscape:cx="304"
inkscape:cy="521"
inkscape:window-width="2560"
inkscape:window-height="1387"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg47">
<inkscape:grid
type="xygrid"
id="grid2088" />
</sodipodi:namedview>
<path
d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z"
fill="#fff"
transform="matrix(4.162611 0 0 -4.162611 919.24059 673.152141)"
id="path31" />
<path
d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z"
fill="#478cbf"
transform="matrix(4.162611 0 0 -4.162611 104.69892 427.387251)"
id="path33"
style="fill:#ef5132;fill-opacity:1" />
<path
d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z"
fill="#478cbf"
transform="matrix(4.162611 0 0 -4.162611 784.07144 718.723121)"
id="path35"
style="fill:#ef5132;fill-opacity:1" />
<path
d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802"
fill="#fff"
transform="matrix(4.162611 0 0 -4.162611 389.21484 527.151321)"
id="path37" />
<path
d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479"
fill="#414042"
transform="matrix(4.162611 0 0 -4.162611 367.36686 532.537071)"
id="path39" />
<path
d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381"
fill="#fff"
transform="matrix(4.162611 0 0 -4.162611 511.99336 626.219821)"
id="path41" />
<path
d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802"
fill="#fff"
transform="matrix(4.162611 0 0 -4.162611 634.78706 527.151321)"
id="path43" />
<path
d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479"
fill="#414042"
transform="matrix(4.162611 0 0 -4.162611 656.64056 532.537071)"
id="path45" />
<path
style="fill:#ef5132;fill-opacity:1"
d="m 104.57536,667.20303 -0.15289,43.87884 145.09067,135.30584 582.80887,-29.96604 87.13745,-108.31356 -0.43243,-43.78378 -494.37838,-12.64865 z"
id="path265" />
<path
style="fill:#ef5132;fill-opacity:1"
d="m 181.01934,403.62419 666.59147,9.78483 -13.45414,250.73625 -659.25285,-11.00794 z"
id="path1205" />
<g
id="g6283"
transform="matrix(1.325853,0,0,1.325853,-167.12939,-143.97607)"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1">
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"
id="path2034"
cx="511.42264"
cy="380.99677"
rx="54.428112"
ry="56.874317" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"
id="path2034-8"
cx="512.48041"
cy="716.73877"
rx="54.428112"
ry="56.874317" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"
id="path2034-8-0"
cx="653.41595"
cy="520.51215"
rx="54.428112"
ry="56.874317" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"
d="m 490.15878,667.66169 h 44.03173 V 432.76846 l 72.41241,72.41241 31.15384,-31.15384 -84.5946,-84.5946 h -63 z"
id="path5896" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.20357;stroke-opacity:1"
d="m 490.16216,232.8165 h 44 V 336 h -44 z"
id="path6276" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.754231;stroke-opacity:1"
d="m 475.66408,234.00582 h 73.09797 c 0,0 -32.71498,-6.71602 -73.09797,0 z"
id="path11529"
sodipodi:nodetypes="ccc"
mask="url(#mask11953)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.1 KiB

58
release.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/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
zip -r $releasePath.zip $addonsPath
rm -rf $releasePath
rm -rf windows
rm -rf x11
rm -rf mac
rm windows.zip
rm x11.zip
rm mac.zip