10 Commits

Author SHA1 Message Date
Twarit Waikar
7dec368991 Add MIT license 2020-02-05 17:44:19 +05:30
Twarit Waikar
23af5c9f50 Merge pull request #14 from follower/patch-1
Add brief installation instructions
2020-02-05 13:38:15 +05:30
follower
c71c5c15be Add brief installation instructions
Primarily so people realise building from source isn't required for Windows/Linux.
2020-02-05 15:06:29 +13:00
Twarit
c2485c1346 Remove plugin .so binary 2020-02-03 22:37:07 +05:30
Twarit
c72509109b Gitignore plugin binaries 2020-02-03 22:35:55 +05:30
Twarit
ee3c9c9746 Add new windows binaries 2020-02-03 22:30:38 +05:30
Twarit Waikar
0bf806c508 Delete main.yml 2020-02-03 21:36:42 +05:30
Twarit
5b2d8d48c3 Add release build script 2020-02-03 21:23:40 +05:30
Twarit Waikar
a1d32d04bb Fix command concat for windows cmd in build action 2020-02-03 21:18:10 +05:30
Twarit Waikar
066e951e2f Add Linux and Windows build action 2020-02-03 21:11:19 +05:30
14 changed files with 70 additions and 18 deletions

4
.gitignore vendored
View File

@@ -27,9 +27,5 @@ build/
# Binaries for distribution
!/demo/bin/
!libgitapi.dll
!libgitapi.so
!libgitapi.dylib
!git2.lib
!libgit.a

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2019 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,20 +1,25 @@
# GDNative Based Git Plugin for Godot Version Control Editor Plugin
Implements the proxy end-points for the `EditorVCSInterface` API in the Godot Engine Editor. Uses [libgit2](https://libgit2.org) at its backend to simulate Git in code.
## Installation Instructions
1. Plugin binary releases for Linux & Windows are here: <https://github.com/godotengine/godot-git-plugin/releases>
2. Installation instructions are here: <https://godotengine.org/article/gsoc-2019-progress-report-3#vcs-integration>
## Build Instructions
### Windows
1. Open `build.bat` as text.
1. Open `build_libs_release.bat` as text.
2. Edit the relative paths to the Godot binary and from the Godot binary directory to this repository's directory in line 1 and line 2.
3. Run `build.bat`.
3. Run `build_libs_release.bat`.
4. Run `cd ..` because the build file leaves you one level deeper in the repository.
5. Load the x64 command prompt: `x64 Native Tools Command Prompt for VS 2017`.
6. Run `scons platform=windows`
6. Run `scons platform=windows target=release`
### Linux
1. Open `build.sh` as text.
1. Open `build_libs_release.sh` as text.
2. Edit the relative paths to the Godot binary and from the Godot binary directory to this repository's directory in line 1 and line 2.
3. Prepare script for execution: `chmod 755 build.sh`
4. Run ```. ./build.sh```.
3. Prepare script for execution: `chmod 755 build_libs_release.sh`
4. Run ```. ./build_libs_release.sh```.
5. Run `cd ..` because the build file leaves you one level deeper in the repository.
6. Run `scons platform=x11`.
6. Run `scons platform=x11 target=release`.

View File

@@ -76,8 +76,10 @@ elif env['platform'] == "windows":
if env['target'] in ('debug', 'd'):
cpp_library += '.debug'
env['target_path'] += 'debug/'
else:
cpp_library += '.release'
env['target_path'] += 'release/'
cpp_library += '.' + str(bits)

View File

@@ -6,4 +6,4 @@ cd %GODOT_PATH_RELATIVE_TO_PLUGIN%
godot.windows.tools.64.exe --gdnative-generate-json-api api.json
copy api.json %GIT_PLUGIN_RELATIVE_TO_GODOT%\api.json /Y
cd %GIT_PLUGIN_RELATIVE_TO_GODOT%\godot-cpp\
scons platform=windows generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64
scons platform=windows target=debug generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64

2
build.sh → build_libs_debug.sh Executable file → Normal file
View File

@@ -7,4 +7,4 @@ cd $GODOT_PATH_RELATIVE_TO_PLUGIN;
cp api.json $GIT_PLUGIN_RELATIVE_TO_GODOT/api.json;
cd $GIT_PLUGIN_RELATIVE_TO_GODOT;
cd godot-cpp/;
scons platform=linux generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64;
scons platform=linux target=debug generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64;

9
build_libs_release.bat Normal file
View File

@@ -0,0 +1,9 @@
set GODOT_PATH_RELATIVE_TO_PLUGIN="..\godot\bin"
set GIT_PLUGIN_RELATIVE_TO_GODOT="..\..\godot-git-plugin\"
git submodule init
git submodule update --init --recursive
cd %GODOT_PATH_RELATIVE_TO_PLUGIN%
godot.windows.tools.64.exe --gdnative-generate-json-api api.json
copy api.json %GIT_PLUGIN_RELATIVE_TO_GODOT%\api.json /Y
cd %GIT_PLUGIN_RELATIVE_TO_GODOT%\godot-cpp\
scons platform=windows target=release generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64

10
build_libs_release.sh Normal file
View File

@@ -0,0 +1,10 @@
GODOT_PATH_RELATIVE_TO_PLUGIN="../godot/bin";
GIT_PLUGIN_RELATIVE_TO_GODOT="../../godot-git-plugin/";
git submodule init;
git submodule update --init --recursive;
cd $GODOT_PATH_RELATIVE_TO_PLUGIN;
./godot.x11.tools.64 --gdnative-generate-json-api api.json;
cp api.json $GIT_PLUGIN_RELATIVE_TO_GODOT/api.json;
cd $GIT_PLUGIN_RELATIVE_TO_GODOT;
cd godot-cpp/;
scons platform=linux target=release generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -7,8 +7,8 @@ reloadable=false
[entry]
Windows.64="res://bin/win64/libgitapi.dll"
X11.64="res://bin/x11/libgitapi.so"
Windows.64="res://bin/win64/release/libgitapi.dll"
X11.64="res://bin/x11/release/libgitapi.so"
[dependencies]

View File

@@ -32,7 +32,7 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
@@ -45,7 +45,7 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
@@ -75,7 +75,15 @@
<SourcePath>.\src\;$(VC_SourcePath);</SourcePath>
<OutDir>$(SolutionDir)..\demo\bin\win64\</OutDir>
<IntDir>$(SolutionDir)..\demo\bin\win64\intermediate\</IntDir>
<TargetName>libgitapi</TargetName>
<TargetName>libgitapi-debug</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>D:\CPP Projects\godot-git-plugin\godot-git-plugin\thirdparty\libgit2\include;.\src\;..\godot-cpp\godot_headers\;..\godot-cpp\include\gen;..\godot-cpp\include\core\;..\godot-cpp\include\;$(IncludePath)</IncludePath>
<LibraryPath>D:\CPP Projects\godot-git-plugin\demo\bin\win64;..\godot-cpp\bin;$(LibraryPath)</LibraryPath>
<SourcePath>.\src\;$(VC_SourcePath);</SourcePath>
<TargetName>libgitapi-release</TargetName>
<IntDir>$(SolutionDir)..\demo\bin\win64\intermediate\</IntDir>
<OutDir>$(SolutionDir)..\demo\bin\win64\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -124,6 +132,7 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libgodot-cpp.windows.release.64.lib;git2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>