14 Commits

Author SHA1 Message Date
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
8 changed files with 1150 additions and 10 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-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

View File

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

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

62
release.sh Executable file
View 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