|
|
@ -2,14 +2,8 @@ |
|
|
|
# preflight-checks.py |
|
|
|
# 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("env") |
|
|
|
|
|
|
|
def get_envs_for_board(board): |
|
|
|
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 False |
|
|
|
|
|
|
|
def sanity_check_target(): |
|
|
|
# Sanity checks: |
|
|
|
if 'PIOENV' not in env: |
|
|
|
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: |
|
|
|
err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin) |
|
|
|
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() |
|
|
|