Browse Source

Merge pull request #20339 from akien-mga/scons-disable-with-tools

SCons: Prevent using disable_3d or disable_advanced_gui with tools=yes
Max Hilbrunner 7 years ago
parent
commit
2f365bb9bb
1 changed files with 10 additions and 2 deletions
  1. 10 2
      SConstruct

+ 10 - 2
SConstruct

@@ -417,11 +417,19 @@ if selected_platform in platform_list:
     if env['tools']:
     if env['tools']:
         env.Append(CPPDEFINES=['TOOLS_ENABLED'])
         env.Append(CPPDEFINES=['TOOLS_ENABLED'])
     if env['disable_3d']:
     if env['disable_3d']:
-        env.Append(CPPDEFINES=['_3D_DISABLED'])
+        if env['tools']:
+            print("Build option 'disable_3d=yes' cannot be used with 'tools=yes' (editor), only with 'tools=no' (export template).")
+            sys.exit(255)
+        else:
+            env.Append(CPPDEFINES=['_3D_DISABLED'])
     if env['gdscript']:
     if env['gdscript']:
         env.Append(CPPDEFINES=['GDSCRIPT_ENABLED'])
         env.Append(CPPDEFINES=['GDSCRIPT_ENABLED'])
     if env['disable_advanced_gui']:
     if env['disable_advanced_gui']:
-        env.Append(CPPDEFINES=['ADVANCED_GUI_DISABLED'])
+        if env['tools']:
+            print("Build option 'disable_advanced_gui=yes' cannot be used with 'tools=yes' (editor), only with 'tools=no' (export template).")
+            sys.exit(255)
+        else:
+            env.Append(CPPDEFINES=['ADVANCED_GUI_DISABLED'])
     if env['minizip']:
     if env['minizip']:
         env.Append(CPPDEFINES=['MINIZIP_ENABLED'])
         env.Append(CPPDEFINES=['MINIZIP_ENABLED'])
     if env['xml']:
     if env['xml']: