mirror of
https://github.com/godotengine/godot-git-plugin.git
synced 2026-01-03 10:09:43 +03:00
Fix building through scons on Windows
This commit is contained in:
10
README.md
Normal file
10
README.md
Normal file
@@ -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`
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user