diff --git a/README.md b/README.md new file mode 100644 index 0000000..c58344c --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# 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` +6. Run `scons platform=windows` + \ No newline at end of file diff --git a/SConstruct b/SConstruct index 3d01dcb..253f954 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.', 'libgitapi', PathVariable.PathAccept)) +opts.Add(PathVariable('target_name', 'The library name.', 'libgdexample', PathVariable.PathAccept)) # Local dependency paths, adapt them to your setup godot_headers_path = "godot-cpp/godot_headers/" @@ -63,7 +63,7 @@ elif env['platform'] == "windows": # that way you can run scons in a vs 2017 prompt and it will find all the required tools env.Append(ENV = os.environ) - env.Append(CCFLAGS = ['-D_WIN64', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS']) + env.Append(CCFLAGS = ['-DWIN32', '-D_WIN32', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS']) if env['target'] in ('debug', 'd'): env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd']) else: @@ -82,8 +82,8 @@ env.Append(LIBPATH=[cpp_bindings_path + 'bin/']) env.Append(LIBS=[cpp_library]) # tweak this if you want to use different folders, or more folders, to store your source code in. -env.Append(CPPPATH=['src/']) -sources = Glob('src/*.cpp') +env.Append(CPPPATH=['godot-git-plugin/src/']) +sources = Glob('godot-git-plugin/src/*.cpp') library = env.SharedLibrary(target=env['target_path'] + env['target_name'] , source=sources)