Revert extmainapp stuff

This commit is contained in:
Willy-JL
2023-06-25 20:35:40 +01:00
parent 21d23f5430
commit 99cd94f39f
5 changed files with 6 additions and 24 deletions
+5 -14
View File
@@ -20,7 +20,6 @@ class FlipperAppType(Enum):
EXTERNAL = "External"
METAPACKAGE = "Package"
PLUGIN = "Plugin"
EXTMAINAPP = "ExtMainApp"
@dataclass
@@ -375,14 +374,6 @@ class ApplicationsCGenerator:
def get_app_descr(self, app: FlipperApplication):
if app.apptype == FlipperAppType.STARTUP:
return app.entry_point
if app.apptype == FlipperAppType.EXTMAINAPP:
return f"""
{{.app = NULL,
.name = "{app.name}",
.appid = "/ext/apps/.Main/{app.appid}.fap",
.stack_size = 0,
.icon = {f"&{app.icon}" if app.icon else "NULL"},
.flags = {'|'.join(f"FlipperApplicationFlag{flag}" for flag in app.flags)}}}"""
return f"""
{{.app = {app.entry_point},
.name = "{app.name}",
@@ -403,11 +394,11 @@ class ApplicationsCGenerator:
)
entry_type, entry_block = self.APP_TYPE_MAP[apptype]
contents.append(f"const {entry_type} {entry_block}[] = {{")
apps = self.buildset.get_apps_of_type(apptype)
if apptype is FlipperAppType.APP:
apps += self.buildset.get_apps_of_type(FlipperAppType.EXTMAINAPP)
apps.sort(key=lambda app: app.order)
contents.append(",\n".join(map(self.get_app_descr, apps)))
contents.append(
",\n".join(
map(self.get_app_descr, self.buildset.get_apps_of_type(apptype))
)
)
contents.append("};")
contents.append(
f"const size_t {entry_block}_COUNT = COUNT_OF({entry_block});"
+1 -1
View File
@@ -179,7 +179,7 @@ class AppBuilder:
deployable = False
app_artifacts.dist_entries.append((deployable, fal_path))
else:
fap_path = f"apps/{'.Main' if self.app.apptype == FlipperAppType.EXTMAINAPP else self.app.fap_category}/{app_artifacts.compact.name}"
fap_path = f"apps/{self.app.fap_category}/{app_artifacts.compact.name}"
app_artifacts.dist_entries.append(
(self.app.is_default_deployable, fap_path)
)