Skip preflight checks only (#21658)

Followup to e8af38cc2d
This commit is contained in:
Scott Lahteine 2021-04-18 22:46:43 -05:00 committed by GitHub
parent 07c5a4fa04
commit 59fd6428ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 70 deletions

View File

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

View File

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

View File

@ -2,15 +2,6 @@
# common-dependencies.py # common-dependencies.py
# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features # Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
# #
Import("env")
#print(env.Dump())
# Detect that 'vscode init' is running
from SCons.Script import COMMAND_LINE_TARGETS
if "idedata" in COMMAND_LINE_TARGETS:
env.Exit(0)
import subprocess,os,re import subprocess,os,re
PIO_VERSION_MIN = (5, 0, 3) PIO_VERSION_MIN = (5, 0, 3)
@ -40,6 +31,10 @@ except:
from platformio.package.meta import PackageSpec from platformio.package.meta import PackageSpec
from platformio.project.config import ProjectConfig from platformio.project.config import ProjectConfig
Import("env")
#print(env.Dump())
try: try:
verbose = int(env.GetProjectOption('custom_verbose')) verbose = int(env.GetProjectOption('custom_verbose'))
except: except:

View File

@ -1,13 +1,6 @@
# #
# copy_marlin_variant_to_framework.py # copy_marlin_variant_to_framework.py
# #
Import("env")
# Detect that 'vscode init' is running
from SCons.Script import COMMAND_LINE_TARGETS
if "idedata" in COMMAND_LINE_TARGETS:
env.Exit(0)
import os,shutil import os,shutil
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
from platformio import util from platformio import util

View File

@ -2,14 +2,8 @@
# preflight-checks.py # preflight-checks.py
# Check for common issues prior to compiling # Check for common issues prior to compiling
# #
Import("env")
# Detect that 'vscode init' is running
from SCons.Script import COMMAND_LINE_TARGETS
if "idedata" in COMMAND_LINE_TARGETS:
env.Exit(0)
import os,re,sys import os,re,sys
Import("env")
def get_envs_for_board(board): def get_envs_for_board(board):
with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file: with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file:
@ -50,6 +44,7 @@ def check_envs(build_env, board_envs, config):
return True return True
return False return False
def sanity_check_target():
# Sanity checks: # Sanity checks:
if 'PIOENV' not in env: if 'PIOENV' not in env:
raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO") raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO")
@ -91,3 +86,8 @@ for p in [ os.path.join(env['PROJECT_DIR'], "Marlin/src/lcd/dogm") ]:
if mixedin: if mixedin:
err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin) err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin)
raise SystemExit(err) raise SystemExit(err)
# Detect that 'vscode init' is running
from SCons.Script import COMMAND_LINE_TARGETS
if "idedata" not in COMMAND_LINE_TARGETS:
sanity_check_target()