mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
ufbt: fixed FAP_SRC_DIR (#2970)
* fbt, ufbt: fixed "_appdir" internal property and FAP_SRC_DIR not working in ufbt environment * fbt, ufbt: reworked CompileIcons(); added app's own root to app's #include path * fbt: cleaner resolve_real_dir_node Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
from SCons.Platform import TempFileMunge
|
||||
from SCons.Node import FS
|
||||
from SCons.Errors import UserError
|
||||
|
||||
|
||||
import os
|
||||
import multiprocessing
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
from SCons.Errors import UserError
|
||||
from SCons.Node import FS
|
||||
from SCons.Platform import TempFileMunge
|
||||
|
||||
SetOption("num_jobs", multiprocessing.cpu_count())
|
||||
SetOption("max_drift", 1)
|
||||
# SetOption("silent", False)
|
||||
@@ -67,16 +66,15 @@ core_env.Append(CPPDEFINES=GetOption("extra_defines"))
|
||||
|
||||
# Now we can import stuff bundled with SDK - it was added to sys.path by ufbt_state
|
||||
|
||||
from fbt.util import (
|
||||
tempfile_arg_esc_func,
|
||||
single_quote,
|
||||
extract_abs_dir,
|
||||
extract_abs_dir_path,
|
||||
wrap_tempfile,
|
||||
path_as_posix,
|
||||
)
|
||||
from fbt.appmanifest import FlipperAppType, FlipperApplication
|
||||
from fbt.appmanifest import FlipperApplication, FlipperAppType
|
||||
from fbt.sdk.cache import SdkCache
|
||||
from fbt.util import (
|
||||
path_as_posix,
|
||||
resolve_real_dir_node,
|
||||
single_quote,
|
||||
tempfile_arg_esc_func,
|
||||
wrap_tempfile,
|
||||
)
|
||||
|
||||
# Base environment with all tools loaded from SDK
|
||||
env = core_env.Clone(
|
||||
@@ -107,7 +105,7 @@ env = core_env.Clone(
|
||||
PROGSUFFIX=".elf",
|
||||
TEMPFILEARGESCFUNC=tempfile_arg_esc_func,
|
||||
SINGLEQUOTEFUNC=single_quote,
|
||||
ABSPATHGETTERFUNC=extract_abs_dir_path,
|
||||
ABSPATHGETTERFUNC=resolve_real_dir_node,
|
||||
APPS=[],
|
||||
UFBT_API_VERSION=SdkCache(
|
||||
core_env.subst("$SDK_DEFINITION"), load_version_only=True
|
||||
@@ -277,7 +275,7 @@ for app in known_extapps:
|
||||
continue
|
||||
|
||||
app_artifacts = appenv.BuildAppElf(app)
|
||||
app_src_dir = extract_abs_dir(app_artifacts.app._appdir)
|
||||
app_src_dir = resolve_real_dir_node(app_artifacts.app._appdir)
|
||||
app_artifacts.installer = [
|
||||
appenv.Install(app_src_dir.Dir("dist"), app_artifacts.compact),
|
||||
appenv.Install(app_src_dir.Dir("dist").Dir("debug"), app_artifacts.debug),
|
||||
|
||||
Reference in New Issue
Block a user