mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
scons fuckery
This commit is contained in:
+9
-1
@@ -40,7 +40,15 @@ class GitVersion:
|
||||
os.environ.get("CUSTOM_FLIPPER_NAME", None)
|
||||
or ""
|
||||
)
|
||||
|
||||
|
||||
force_no_dirty = (
|
||||
os.environ.get("FORCE_NO_DIRTY", None)
|
||||
or ""
|
||||
)
|
||||
|
||||
if (force_no_dirty != ""):
|
||||
dirty = False
|
||||
|
||||
if (custom_fz_name != "") and (len(custom_fz_name) <= 8) and (custom_fz_name.isalnum()) and (custom_fz_name.isascii()):
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
|
||||
@@ -106,6 +106,11 @@ vars.AddVariables(
|
||||
"Replaces OTP flipper name with custom string of 8 chars",
|
||||
"",
|
||||
),
|
||||
(
|
||||
"FORCE_NO_DIRTY",
|
||||
"Force disable dirty status of the build",
|
||||
"",
|
||||
),
|
||||
(
|
||||
"COPRO_CUBE_VERSION",
|
||||
"Cube version",
|
||||
@@ -242,4 +247,4 @@ vars.AddVariables(
|
||||
),
|
||||
)
|
||||
|
||||
Return("vars")
|
||||
Return("vars")
|
||||
@@ -21,6 +21,7 @@ variables_to_forward = [
|
||||
"WORKFLOW_BRANCH_OR_TAG",
|
||||
"DIST_SUFFIX",
|
||||
"CUSTOM_FLIPPER_NAME",
|
||||
"FORCE_NO_DIRTY",
|
||||
# Python & other tools
|
||||
"HOME",
|
||||
"APPDATA",
|
||||
@@ -87,4 +88,4 @@ SetOption("max_drift", 1)
|
||||
wrap_tempfile(coreenv, "LINKCOM")
|
||||
wrap_tempfile(coreenv, "ARCOM")
|
||||
|
||||
Return("coreenv")
|
||||
Return("coreenv")
|
||||
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
from dataclasses import dataclass, field
|
||||
from SCons.Node import NodeList
|
||||
from SCons.Warnings import warn, WarningOnByDefault
|
||||
@@ -110,25 +109,12 @@ if appsrc := appenv.subst("$APPSRC"):
|
||||
app_artifacts = appenv.GetExtAppFromPath(appsrc)
|
||||
appenv.PhonyTarget(
|
||||
"launch_app",
|
||||
'${PYTHON3} "${APP_RUN_SCRIPT}" --launch "${SOURCE}" --fap_dst_dir "/ext/apps/${FAP_CATEGORY}"',
|
||||
'${PYTHON3} "${APP_RUN_SCRIPT}" "${SOURCE}" --fap_dst_dir "/ext/apps/${FAP_CATEGORY}"',
|
||||
source=app_artifacts.compact,
|
||||
FAP_CATEGORY=app_artifacts.app.fap_category,
|
||||
)
|
||||
appenv.Alias("launch_app", app_artifacts.validator)
|
||||
|
||||
appenv.PhonyTarget(
|
||||
"faps_copy",
|
||||
os.linesep.join(
|
||||
[
|
||||
'${PYTHON3} "${APP_RUN_SCRIPT}"'
|
||||
f' "{app_artifact.compact[0].rstr()}"'
|
||||
f' --fap_dst_dir "/ext/apps/{app_artifact.app.fap_category}"'
|
||||
for app_artifact in appenv["EXT_APPS"].values()
|
||||
]
|
||||
),
|
||||
source=["faps"],
|
||||
)
|
||||
|
||||
# SDK management
|
||||
|
||||
sdk_origin_path = "${BUILD_DIR}/sdk_origin"
|
||||
|
||||
Reference in New Issue
Block a user