mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
b9a766d909
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
from SCons.Script import GetBuildFailures
|
|
|
|
import sys
|
|
import os
|
|
import atexit
|
|
|
|
sys.path.insert(0, os.path.join(os.getcwd(), "scripts"))
|
|
sys.path.insert(0, os.path.join(os.getcwd(), "lib/cxxheaderparser"))
|
|
|
|
|
|
def bf_to_str(bf):
|
|
"""Convert an element of GetBuildFailures() to a string
|
|
in a useful way."""
|
|
import SCons.Errors
|
|
|
|
if bf is None: # unknown targets product None in list
|
|
return "(unknown tgt)"
|
|
elif isinstance(bf, SCons.Errors.StopError):
|
|
return str(bf)
|
|
elif bf.node:
|
|
return str(bf.node) + ": " + bf.errstr
|
|
elif bf.filename:
|
|
return bf.filename + ": " + bf.errstr
|
|
return "unknown failure: " + bf.errstr
|
|
|
|
|
|
def display_build_status():
|
|
"""Display the build status. Called by atexit.
|
|
Here you could do all kinds of complicated things."""
|
|
bf = GetBuildFailures()
|
|
if bf:
|
|
# bf is normally a list of build failures; if an element is None,
|
|
# it's because of a target that scons doesn't know anything about.
|
|
failures_message = "\n".join(
|
|
["Failed building %s" % bf_to_str(x) for x in bf if x is not None]
|
|
)
|
|
print("*" * 10, "ERRORS", "*" * 10)
|
|
print(failures_message)
|
|
|
|
|
|
atexit.register(display_build_status)
|