Add Linux build script

This commit is contained in:
IronicallySerious
2019-07-03 23:39:08 +05:30
parent 80d63df6ca
commit a64153f05e
3 changed files with 24 additions and 6 deletions

View File

@@ -1,10 +1,19 @@
# GDNative Based Git Plugin for Godot Version Control Editor Plugin
## Build Instructions
1. Open `build.bat` if you are on Windows or `build.sh` if you are on Linux
2. Edit the relative paths to the Godot binary and from the Godot binary directory to this repositories directory in line 1 and line 2.
3. Run the build script
4. cd to repo's root directory
5. Load the x64 command prompt: `x64 Native Tools Command Prompt for VS 2017`
### Windows
1. Open `build.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`.
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`
### Linux
1. Open `build.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. Run `build.sh`.
4. Run `cd ..` because the build file leaves you one level deeper in the repository.
5. Run `scons platform=x11`

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 generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64

9
build.sh 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.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/godot-cpp/
scons platform=windows generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64