From 0aa7fcd41042f4ba96b259c438e5ea3d220c6cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 21 Jul 2018 23:17:03 +0200 Subject: SCons: Prevent using disable_3d or disable_advanced_gui with tools=yes Those make no sense for tools build, as the editor uses advanced GUI features heavily, and adding checks for 3D/physics features everywhere in the editor would be cumbersome (and error-prone). Fixes #1701. --- SConstruct | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 50fb5bc48c..08c5b6d34f 100644 --- a/SConstruct +++ b/SConstruct @@ -417,11 +417,19 @@ if selected_platform in platform_list: if env['tools']: env.Append(CPPDEFINES=['TOOLS_ENABLED']) 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']: env.Append(CPPDEFINES=['GDSCRIPT_ENABLED']) 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']: env.Append(CPPDEFINES=['MINIZIP_ENABLED']) if env['xml']: -- cgit v1.2.3