JS: C define to move JS runner to flash (still external for now)

This commit is contained in:
Willy-JL
2024-10-18 02:56:06 +01:00
parent d26bed5c58
commit ba74e953c4
3 changed files with 10 additions and 0 deletions

View File

@@ -42,7 +42,11 @@ const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
case ArchiveFileTypeDiskImage: case ArchiveFileTypeDiskImage:
return EXT_PATH("apps/USB/mass_storage.fap"); return EXT_PATH("apps/USB/mass_storage.fap");
case ArchiveFileTypeJS: case ArchiveFileTypeJS:
#ifdef JS_RUNNER_FAP
return EXT_PATH("apps/assets/js_app.fap"); return EXT_PATH("apps/assets/js_app.fap");
#else
return "JS Runner";
#endif
default: default:
return NULL; return NULL;
} }

View File

@@ -11,7 +11,11 @@
#define TAG "LoaderApplications" #define TAG "LoaderApplications"
#ifdef JS_RUNNER_FAP
#define JS_RUNNER_APP EXT_PATH("apps/assets/js_app.fap") #define JS_RUNNER_APP EXT_PATH("apps/assets/js_app.fap")
#else
#define JS_RUNNER_APP "JS Runner"
#endif
struct LoaderApplications { struct LoaderApplications {
FuriThread* thread; FuriThread* thread;

View File

@@ -3,6 +3,8 @@ App(
name="JS Runner", name="JS Runner",
apptype=FlipperAppType.EXTERNAL, apptype=FlipperAppType.EXTERNAL,
entry_point="js_app", entry_point="js_app",
cdefines=["JS_RUNNER_FAP"],
# Sources separation breaks linking when internal, comment as needed
sources=[ sources=[
"*.c*", "*.c*",
"!modules", "!modules",