diff --git a/README.md b/README.md index c58344c..0a3d86a 100644 --- a/README.md +++ b/README.md @@ -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` \ No newline at end of file diff --git a/build.bat b/build.bat index 2f3f33f..1409fe2 100644 --- a/build.bat +++ b/build.bat @@ -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 \ No newline at end of file +scons platform=windows generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64 diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..4a8c8d9 --- /dev/null +++ b/build.sh @@ -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