mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-23 01:18:12 -07:00
[FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601)
* ufbt: added "dolphin_ext" target (expects "external" subfolder in cwd with dolphin assets); cleaned up unused code * ufbt: codestyle fixes * scripts: fixed style according to ruff linter * scripts: additional cleanup & codestyle fixes * github: pass target hw code when installing local SDK with ufbt * ufbt: added error message for missing folder in dolphin builder * scripts: more linter fixes * sdk: added flipper_format_stream; ufbt: support for --extra-define * fbt: reduced amount of global defines * scripts, fbt: rearranged imports Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List, Optional, Tuple, Callable
|
||||
from enum import Enum
|
||||
import os
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
from typing import Callable, List, Optional, Tuple
|
||||
|
||||
|
||||
class FlipperManifestException(Exception):
|
||||
@@ -93,7 +93,7 @@ class AppManager:
|
||||
def get(self, appname: str):
|
||||
try:
|
||||
return self.known_apps[appname]
|
||||
except KeyError as _:
|
||||
except KeyError:
|
||||
raise FlipperManifestException(
|
||||
f"Missing application manifest for '{appname}'"
|
||||
)
|
||||
@@ -223,6 +223,7 @@ class AppBuildset:
|
||||
return self.appmgr.get(app_name).supports_hardware_target(self.hw_target)
|
||||
|
||||
def _get_app_depends(self, app_name: str) -> List[str]:
|
||||
app_def = self.appmgr.get(app_name)
|
||||
# Skip app if its target is not supported by the target we are building for
|
||||
if not self._check_if_app_target_supported(app_name):
|
||||
self._writer(
|
||||
@@ -230,7 +231,6 @@ class AppBuildset:
|
||||
)
|
||||
return []
|
||||
|
||||
app_def = self.appmgr.get(app_name)
|
||||
return list(
|
||||
filter(
|
||||
self._check_if_app_target_supported,
|
||||
@@ -296,7 +296,7 @@ class AppBuildset:
|
||||
try:
|
||||
parent_app = self.appmgr.get(parent_app_id)
|
||||
parent_app._plugins.append(extension_app)
|
||||
except FlipperManifestException as e:
|
||||
except FlipperManifestException:
|
||||
self._writer(
|
||||
f"Module {extension_app.appid} has unknown parent {parent_app_id}"
|
||||
)
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
from dataclasses import dataclass
|
||||
import os
|
||||
|
||||
import struct
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from .appmanifest import FlipperApplication
|
||||
from flipper.assets.icon import file2image
|
||||
|
||||
from .appmanifest import FlipperApplication
|
||||
|
||||
_MANIFEST_MAGIC = 0x52474448
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import hashlib
|
||||
import os
|
||||
import struct
|
||||
from typing import TypedDict
|
||||
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
import operator
|
||||
import os
|
||||
import csv
|
||||
import operator
|
||||
|
||||
from enum import Enum, auto
|
||||
from typing import Set, ClassVar, Any
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum, auto
|
||||
from typing import Any, ClassVar, Set
|
||||
|
||||
from ansi.color import fg
|
||||
|
||||
from . import (
|
||||
ApiEntries,
|
||||
ApiEntryFunction,
|
||||
ApiEntryVariable,
|
||||
ApiHeader,
|
||||
)
|
||||
from . import ApiEntries, ApiEntryFunction, ApiEntryVariable, ApiHeader
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -137,7 +130,7 @@ class SdkCache:
|
||||
f"API version is still WIP: {self.version}. Review the changes and re-run command."
|
||||
)
|
||||
)
|
||||
print(f"CSV file entries to mark up:")
|
||||
print("CSV file entries to mark up:")
|
||||
print(
|
||||
fg.yellow(
|
||||
"\n".join(
|
||||
|
||||
+4
-5
@@ -1,10 +1,9 @@
|
||||
import SCons
|
||||
from SCons.Subst import quote_spaces
|
||||
from SCons.Errors import StopError
|
||||
|
||||
import re
|
||||
import os
|
||||
import re
|
||||
|
||||
import SCons
|
||||
from SCons.Errors import StopError
|
||||
from SCons.Subst import quote_spaces
|
||||
|
||||
WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import subprocess
|
||||
import datetime
|
||||
import subprocess
|
||||
from functools import cache
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user