瀏覽代碼

Keep environment variables on windows

This ensures that environment variables are kept when on windows meaning you can run it with any version of VS, so long as you are in a VS prompt or have run the vcvars.bat file for your architecture
Richy HBM 8 年之前
父節點
當前提交
b503db1712
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      SConstruct

+ 4 - 1
SConstruct

@@ -9,8 +9,11 @@ godot_bin_path = "../godot_fork/bin/"
 # for windows
 # for windows
 godot_lib_path = "../godot_fork/bin/"
 godot_lib_path = "../godot_fork/bin/"
 
 
-
+# This makes sure to keep the session environment variables on windows, 
+# that way you can run scons in a vs 2017 prompt and it will find all the required tools
 env = Environment()
 env = Environment()
+if platform == "windows":
+    env = Environment(ENV = os.environ)
 
 
 if ARGUMENTS.get("use_llvm", "no") == "yes":
 if ARGUMENTS.get("use_llvm", "no") == "yes":
     env["CXX"] = "clang++"
     env["CXX"] = "clang++"