Quellcode durchsuchen

Skip preflight checks only (#21658)

Followup to e8af38cc2d
Scott Lahteine vor 3 Jahren
Ursprung
Commit
59fd6428ae
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 0
- 6
buildroot/share/PlatformIO/scripts/common-cxxflags.py Datei anzeigen

@@ -3,12 +3,6 @@
3 3
 # Convenience script to apply customizations to CPP flags
4 4
 #
5 5
 Import("env")
6
-
7
-# Detect that 'vscode init' is running
8
-from SCons.Script import COMMAND_LINE_TARGETS
9
-if "idedata" in COMMAND_LINE_TARGETS:
10
-    env.Exit(0)
11
-
12 6
 env.Append(CXXFLAGS=[
13 7
   "-Wno-register"
14 8
   #"-Wno-incompatible-pointer-types",

+ 1
- 6
buildroot/share/PlatformIO/scripts/common-dependencies-post.py Datei anzeigen

@@ -2,13 +2,8 @@
2 2
 # common-dependencies-post.py
3 3
 # Convenience script to add build flags for Marlin Enabled Features
4 4
 #
5
-Import("env")
6
-
7
-# Detect that 'vscode init' is running
8
-from SCons.Script import COMMAND_LINE_TARGETS
9
-if "idedata" in COMMAND_LINE_TARGETS:
10
-    env.Exit(0)
11 5
 
6
+Import("env")
12 7
 Import("projenv")
13 8
 
14 9
 def apply_board_build_flags():

+ 4
- 9
buildroot/share/PlatformIO/scripts/common-dependencies.py Datei anzeigen

@@ -2,15 +2,6 @@
2 2
 # common-dependencies.py
3 3
 # Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
4 4
 #
5
-Import("env")
6
-
7
-#print(env.Dump())
8
-
9
-# Detect that 'vscode init' is running
10
-from SCons.Script import COMMAND_LINE_TARGETS
11
-if "idedata" in COMMAND_LINE_TARGETS:
12
-    env.Exit(0)
13
-
14 5
 import subprocess,os,re
15 6
 
16 7
 PIO_VERSION_MIN = (5, 0, 3)
@@ -40,6 +31,10 @@ except:
40 31
 from platformio.package.meta import PackageSpec
41 32
 from platformio.project.config import ProjectConfig
42 33
 
34
+Import("env")
35
+
36
+#print(env.Dump())
37
+
43 38
 try:
44 39
 	verbose = int(env.GetProjectOption('custom_verbose'))
45 40
 except:

+ 0
- 7
buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py Datei anzeigen

@@ -1,13 +1,6 @@
1 1
 #
2 2
 # copy_marlin_variant_to_framework.py
3 3
 #
4
-Import("env")
5
-
6
-# Detect that 'vscode init' is running
7
-from SCons.Script import COMMAND_LINE_TARGETS
8
-if "idedata" in COMMAND_LINE_TARGETS:
9
-    env.Exit(0)
10
-
11 4
 import os,shutil
12 5
 from SCons.Script import DefaultEnvironment
13 6
 from platformio import util

+ 42
- 42
buildroot/share/PlatformIO/scripts/preflight-checks.py Datei anzeigen

@@ -2,14 +2,8 @@
2 2
 # preflight-checks.py
3 3
 # Check for common issues prior to compiling
4 4
 #
5
-Import("env")
6
-
7
-# Detect that 'vscode init' is running
8
-from SCons.Script import COMMAND_LINE_TARGETS
9
-if "idedata" in COMMAND_LINE_TARGETS:
10
-    env.Exit(0)
11
-
12 5
 import os,re,sys
6
+Import("env")
13 7
 
14 8
 def get_envs_for_board(board):
15 9
 	with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file:
@@ -50,44 +44,50 @@ def check_envs(build_env, board_envs, config):
50 44
 					return True
51 45
 	return False
52 46
 
53
-# Sanity checks:
54
-if 'PIOENV' not in env:
55
-	raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO")
47
+def sanity_check_target():
48
+	# Sanity checks:
49
+	if 'PIOENV' not in env:
50
+		raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO")
56 51
 
57
-if 'MARLIN_FEATURES' not in env:
58
-	raise SystemExit("Error: this script should be used after common Marlin scripts")
52
+	if 'MARLIN_FEATURES' not in env:
53
+		raise SystemExit("Error: this script should be used after common Marlin scripts")
59 54
 
60
-if 'MOTHERBOARD' not in env['MARLIN_FEATURES']:
61
-	raise SystemExit("Error: MOTHERBOARD is not defined in Configuration.h")
55
+	if 'MOTHERBOARD' not in env['MARLIN_FEATURES']:
56
+		raise SystemExit("Error: MOTHERBOARD is not defined in Configuration.h")
62 57
 
63
-build_env = env['PIOENV']
64
-motherboard = env['MARLIN_FEATURES']['MOTHERBOARD']
65
-board_envs = get_envs_for_board(motherboard)
66
-config = env.GetProjectConfig()
67
-result = check_envs("env:"+build_env, board_envs, config)
58
+	build_env = env['PIOENV']
59
+	motherboard = env['MARLIN_FEATURES']['MOTHERBOARD']
60
+	board_envs = get_envs_for_board(motherboard)
61
+	config = env.GetProjectConfig()
62
+	result = check_envs("env:"+build_env, board_envs, config)
68 63
 
69
-if not result:
70
-	err = "Error: Build environment '%s' is incompatible with %s. Use one of these: %s" % \
71
-		  ( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
72
-	raise SystemExit(err)
64
+	if not result:
65
+		err = "Error: Build environment '%s' is incompatible with %s. Use one of these: %s" % \
66
+			  ( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
67
+		raise SystemExit(err)
73 68
 
74
-#
75
-# Check for Config files in two common incorrect places
76
-#
77
-for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]:
78
-	for f in [ "Configuration.h", "Configuration_adv.h" ]:
79
-		if os.path.isfile(os.path.join(p, f)):
80
-			err = "ERROR: Config files found in directory %s. Please move them into the Marlin subfolder." % p
81
-			raise SystemExit(err)
69
+	#
70
+	# Check for Config files in two common incorrect places
71
+	#
72
+	for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]:
73
+		for f in [ "Configuration.h", "Configuration_adv.h" ]:
74
+			if os.path.isfile(os.path.join(p, f)):
75
+				err = "ERROR: Config files found in directory %s. Please move them into the Marlin subfolder." % p
76
+				raise SystemExit(err)
82 77
 
83
-#
84
-# Check for old files indicating an entangled Marlin (mixing old and new code)
85
-#
86
-mixedin = []
87
-for p in [ os.path.join(env['PROJECT_DIR'], "Marlin/src/lcd/dogm") ]:
88
-	for f in [ "ultralcd_DOGM.cpp", "ultralcd_DOGM.h" ]:
89
-		if os.path.isfile(os.path.join(p, f)):
90
-			mixedin += [ f ]
91
-if mixedin:
92
-	err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin)
93
-	raise SystemExit(err)
78
+	#
79
+	# Check for old files indicating an entangled Marlin (mixing old and new code)
80
+	#
81
+	mixedin = []
82
+	for p in [ os.path.join(env['PROJECT_DIR'], "Marlin/src/lcd/dogm") ]:
83
+		for f in [ "ultralcd_DOGM.cpp", "ultralcd_DOGM.h" ]:
84
+			if os.path.isfile(os.path.join(p, f)):
85
+				mixedin += [ f ]
86
+	if mixedin:
87
+		err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin)
88
+		raise SystemExit(err)
89
+
90
+# Detect that 'vscode init' is running
91
+from SCons.Script import COMMAND_LINE_TARGETS
92
+if "idedata" not in COMMAND_LINE_TARGETS:
93
+    sanity_check_target()

Laden…
Abbrechen
Speichern