Explorar el Código

Skip scripts during 'platformio init' (#21643)

Scott Lahteine hace 3 años
padre
commit
e8af38cc2d
No account linked to committer's email address

+ 6
- 0
buildroot/share/PlatformIO/scripts/common-cxxflags.py Ver fichero

@@ -3,6 +3,12 @@
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
+
6 12
 env.Append(CXXFLAGS=[
7 13
   "-Wno-register"
8 14
   #"-Wno-incompatible-pointer-types",

+ 6
- 1
buildroot/share/PlatformIO/scripts/common-dependencies-post.py Ver fichero

@@ -2,8 +2,13 @@
2 2
 # common-dependencies-post.py
3 3
 # Convenience script to add build flags for Marlin Enabled Features
4 4
 #
5
-
6 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
+
7 12
 Import("projenv")
8 13
 
9 14
 def apply_board_build_flags():

+ 9
- 4
buildroot/share/PlatformIO/scripts/common-dependencies.py Ver fichero

@@ -2,6 +2,15 @@
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
+
5 14
 import subprocess,os,re
6 15
 
7 16
 PIO_VERSION_MIN = (5, 0, 3)
@@ -31,10 +40,6 @@ except:
31 40
 from platformio.package.meta import PackageSpec
32 41
 from platformio.project.config import ProjectConfig
33 42
 
34
-Import("env")
35
-
36
-#print(env.Dump())
37
-
38 43
 try:
39 44
 	verbose = int(env.GetProjectOption('custom_verbose'))
40 45
 except:

+ 7
- 0
buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py Ver fichero

@@ -1,6 +1,13 @@
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
+
4 11
 import os,shutil
5 12
 from SCons.Script import DefaultEnvironment
6 13
 from platformio import util

+ 7
- 1
buildroot/share/PlatformIO/scripts/preflight-checks.py Ver fichero

@@ -2,9 +2,15 @@
2 2
 # preflight-checks.py
3 3
 # Check for common issues prior to compiling
4 4
 #
5
-import os,re,sys
6 5
 Import("env")
7 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
+import os,re,sys
13
+
8 14
 def get_envs_for_board(board):
9 15
 	with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file:
10 16
 

Loading…
Cancelar
Guardar