Преглед на файлове

Added TYPED_METHOD_BIND and c++17 flags to windows build and moved test project files

Bastiaan Olij преди 3 години
родител
ревизия
df9164b9bd
променени са 10 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 1 0
      .gitignore
  2. 1 0
      SConstruct
  3. 6 2
      test/SConstruct
  4. 0 0
      test/demo/default_env.tres
  5. 1 0
      test/demo/example.gdextension
  6. 0 0
      test/demo/icon.png
  7. 0 0
      test/demo/icon.png.import
  8. 0 0
      test/demo/main.gd
  9. 0 2
      test/demo/main.tscn
  10. 0 0
      test/demo/project.godot

+ 1 - 0
.gitignore

@@ -23,6 +23,7 @@ bin
 *.creator.user
 *.files
 *.includes
+*.idb
 
 # Gprof output
 gmon.out

+ 1 - 0
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"])

+ 6 - 2
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:

+ 0 - 0
test/default_env.tres → test/demo/default_env.tres


+ 1 - 0
test/example.gdextension → 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"

+ 0 - 0
test/icon.png → test/demo/icon.png


+ 0 - 0
test/icon.png.import → test/demo/icon.png.import


+ 0 - 0
test/main.gd → test/demo/main.gd


+ 0 - 2
test/main.tscn → 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

+ 0 - 0
test/project.godot → test/demo/project.godot