mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
0adad32418
* fbt: fixed py scripts for gdb * fbt: removed compiled dolphin assets from tracked files; resolved cached dependency issues by globally disabling deps cache; changed dependency tracking for dolphin assets * fbt: fix for "resources" node lookup * toolchain: bump to v.16 with scons + x64 win binaries * fbt: using scons from toolchain * vscode: fixed paths for 64-bit Windows toolchain * fbt: added colors! * fbt: moved import validator to ansi lib coloring * fbt: moved COMSTR vars to tools * fbt: custom action for fap dist * fbt: added OPENOCD_ADAPTER_SERIAL configuration var for openocd operations * fbt: added get_stlink target * docs: details on libs for faps * vscode: added DAP config for using Flipper as a debugger for a 2nd Flipper * fbt: blind deps fix for sdk_origin * fbt: sdk: moved deployment actions to pure python * Github: disable disableLicenseExpirationCheck option for pvs Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
24 lines
953 B
Python
24 lines
953 B
Python
from fbt.util import link_dir
|
|
from ansi.color import fg
|
|
|
|
|
|
def link_elf_dir_as_latest(env, elf_node):
|
|
elf_dir = elf_node.Dir(".")
|
|
latest_dir = env.Dir("#build/latest")
|
|
print(fg.green(f"Linking {elf_dir} as latest built dir (./build/latest/)"))
|
|
return link_dir(latest_dir.abspath, elf_dir.abspath, env["PLATFORM"] == "win32")
|
|
|
|
|
|
def should_gen_cdb_and_link_dir(env, requested_targets):
|
|
explicitly_building_updater = False
|
|
# Hacky way to check if updater-related targets were requested
|
|
for build_target in requested_targets:
|
|
if "updater" in str(build_target) and "package" not in str(build_target):
|
|
explicitly_building_updater = True
|
|
|
|
is_updater = not env["IS_BASE_FIRMWARE"]
|
|
# If updater is explicitly requested, link to the latest updater
|
|
# Otherwise, link to firmware
|
|
return (is_updater and explicitly_building_updater) or (
|
|
not is_updater and not explicitly_building_updater
|
|
)
|