diff --git a/.gitignore b/.gitignore index ae7705d3..bb615725 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ bin *.creator.user *.files *.includes +*.idb # Gprof output gmon.out diff --git a/SConstruct b/SConstruct index 7049baf1..74817728 100644 --- a/SConstruct +++ b/SConstruct @@ -256,6 +256,7 @@ elif env["platform"] == "ios": elif env["platform"] == "windows": if host_platform == "windows" and not env["use_mingw"]: # MSVC + env.Append(CPPDEFINES=["TYPED_METHOD_BIND"]) env.Append(LINKFLAGS=["/WX"]) if env["target"] == "debug": env.Append(CCFLAGS=["/Z7", "/Od", "/EHsc", "/D_DEBUG", "/MDd"]) diff --git a/test/SConstruct b/test/SConstruct index b9d13209..074952de 100644 --- a/test/SConstruct +++ b/test/SConstruct @@ -25,7 +25,7 @@ opts.Add( ) opts.Add(EnumVariable("bits", "Target platform bits", "64", ("32", "64"))) opts.Add(BoolVariable("use_llvm", "Use the LLVM / Clang compiler", "no")) -opts.Add(PathVariable("target_path", "The path where the lib is installed.", "bin/", PathVariable.PathAccept)) +opts.Add(PathVariable("target_path", "The path where the lib is installed.", "demo/bin/", PathVariable.PathAccept)) opts.Add(PathVariable("target_name", "The library name.", "libgdexample", PathVariable.PathAccept)) # Local dependency paths, adapt them to your setup @@ -106,14 +106,18 @@ elif env["platform"] == "windows": env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS"]) env.Append(CCFLAGS=["-W3", "-GR"]) + env.Append(CXXFLAGS=["-std:c++17"]) if env["target"] in ("debug", "d"): env.Append(CPPDEFINES=["_DEBUG"]) - env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI"]) + env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI", "-FS"]) env.Append(LINKFLAGS=["-DEBUG"]) else: env.Append(CPPDEFINES=["NDEBUG"]) env.Append(CCFLAGS=["-O2", "-EHsc", "-MD"]) + if not(env["use_llvm"]): + env.Append(CPPDEFINES=["TYPED_METHOD_BIND"]) + if env["target"] in ("debug", "d"): cpp_library += ".debug" else: diff --git a/test/default_env.tres b/test/demo/default_env.tres similarity index 100% rename from test/default_env.tres rename to test/demo/default_env.tres diff --git a/test/example.gdextension b/test/demo/example.gdextension similarity index 71% rename from test/example.gdextension rename to test/demo/example.gdextension index 491d38d9..d912e0e7 100644 --- a/test/example.gdextension +++ b/test/demo/example.gdextension @@ -5,3 +5,4 @@ entry_symbol = "example_library_init" [libraries] Linux.64 = "bin/x11/libgdexample.so" +Windows.64 = "bin/win64/libgdexample.dll" diff --git a/test/icon.png b/test/demo/icon.png similarity index 100% rename from test/icon.png rename to test/demo/icon.png diff --git a/test/icon.png.import b/test/demo/icon.png.import similarity index 100% rename from test/icon.png.import rename to test/demo/icon.png.import diff --git a/test/main.gd b/test/demo/main.gd similarity index 100% rename from test/main.gd rename to test/demo/main.gd diff --git a/test/main.tscn b/test/demo/main.tscn similarity index 94% rename from test/main.tscn rename to test/demo/main.tscn index 23b2799f..e64674f3 100644 --- a/test/main.tscn +++ b/test/demo/main.tscn @@ -6,8 +6,6 @@ script = ExtResource( "1_c326s" ) [node name="Example" type="Example" parent="."] -offset_right = 40.0 -offset_bottom = 40.0 script = null __meta__ = { "_edit_use_anchors_": false diff --git a/test/project.godot b/test/demo/project.godot similarity index 100% rename from test/project.godot rename to test/demo/project.godot