1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

Merge branch 'fz-dev' into dev

This commit is contained in:
MX
2023-02-08 12:43:07 +03:00
7 changed files with 26 additions and 10 deletions

View File

@@ -8,6 +8,10 @@ import os
WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)")
# Used by default when globbing for files with GlobRecursive
# Excludes all files ending with ~, usually created by editors as backup files
GLOB_FILE_EXCLUSION = ["*~"]
def tempfile_arg_esc_func(arg):
arg = quote_spaces(arg)

View File

@@ -27,9 +27,7 @@ def proto_emitter(target, source, env):
def dolphin_emitter(target, source, env):
res_root_dir = source[0].Dir(env["DOLPHIN_RES_TYPE"])
source = [res_root_dir]
source.extend(
env.GlobRecursive("*.*", res_root_dir.srcnode()),
)
source.extend(env.GlobRecursive("*.*", res_root_dir.srcnode()))
target_base_dir = target[0]
env.Replace(_DOLPHIN_OUT_DIR=target[0])

View File

@@ -1,7 +1,11 @@
import SCons
from SCons.Script import Flatten
from fbt.util import GLOB_FILE_EXCLUSION
def GlobRecursive(env, pattern, node=".", exclude=None):
def GlobRecursive(env, pattern, node=".", exclude=[]):
exclude = list(set(Flatten(exclude) + GLOB_FILE_EXCLUSION))
# print(f"Starting glob for {pattern} from {node} (exclude: {exclude})")
results = []
if isinstance(node, str):
node = env.Dir(node)
@@ -13,7 +17,7 @@ def GlobRecursive(env, pattern, node=".", exclude=None):
source=True,
exclude=exclude,
)
# print(f"Glob for {pattern} from {node}: {results}")
# print(f"Glob result for {pattern} from {node}: {results}")
return results