diff --git a/.gitignore b/.gitignore index 149fa6c..d4d0c26 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,6 @@ bin/ *.so *.dylib *.exe +*.os *.out .import/ diff --git a/README.md b/README.md index 0a3d86a..465c77f 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ 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. +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 +3. Prepare script for execution: `chmod 755 build.sh` +4. Run ```. ./build.sh```. +5. Run `cd ..` because the build file leaves you one level deeper in the repository. +6. Run `scons platform=x11`. diff --git a/SConstruct b/SConstruct index 253f954..149abf5 100644 --- a/SConstruct +++ b/SConstruct @@ -12,7 +12,7 @@ opts.Add(EnumVariable('platform', "Compilation platform", '', ['', 'windows', 'x opts.Add(EnumVariable('p', "Compilation target, alias for 'platform'", '', ['', 'windows', 'x11', 'linux', 'osx'])) opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no')) opts.Add(PathVariable('target_path', 'The path where the lib is installed.', 'demo/bin/')) -opts.Add(PathVariable('target_name', 'The library name.', 'libgdexample', PathVariable.PathAccept)) +opts.Add(PathVariable('target_name', 'The library name.', 'libgit_api', PathVariable.PathAccept)) # Local dependency paths, adapt them to your setup godot_headers_path = "godot-cpp/godot_headers/" diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 4a8c8d9..1e1b768 --- a/build.sh +++ b/build.sh @@ -1,9 +1,10 @@ -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 +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 generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json bits=64; diff --git a/demo/new_script.vs b/demo/new_script.vs new file mode 100644 index 0000000..dbb20a5 Binary files /dev/null and b/demo/new_script.vs differ diff --git a/demo/new_script1.gd b/demo/new_script1.gd new file mode 100644 index 0000000..03b9fc6 --- /dev/null +++ b/demo/new_script1.gd @@ -0,0 +1,13 @@ +extends Node + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass