From 415ba487d96f8170f9f1c0cbb9b71d9d2b190c09 Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Thu, 10 Oct 2024 14:14:49 +0200 Subject: [PATCH] #472 --- packages/project-editor/lvgl/build.ts | 8 ++++++++ packages/project-editor/project/project.tsx | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/project-editor/lvgl/build.ts b/packages/project-editor/lvgl/build.ts index 022ba3b8..65716c51 100644 --- a/packages/project-editor/lvgl/build.ts +++ b/packages/project-editor/lvgl/build.ts @@ -1397,6 +1397,10 @@ ${source}`; destinationFolder ) + "/" + + (this.project.settings.build + .separateFolderForImagesAndFonts + ? "images/" + : "") + output + ".c", source @@ -1435,6 +1439,10 @@ ${source}`; destinationFolder ) + "/" + + (this.project.settings.build + .separateFolderForImagesAndFonts + ? "fonts/" + : "") + output + ".c", font.lvglSourceFile diff --git a/packages/project-editor/project/project.tsx b/packages/project-editor/project/project.tsx index 30a37e2f..69235805 100644 --- a/packages/project-editor/project/project.tsx +++ b/packages/project-editor/project/project.tsx @@ -270,6 +270,7 @@ export class Build extends EezObject { configurations: BuildConfiguration[]; files: BuildFile[]; destinationFolder?: string; + separateFolderForImagesAndFonts?: boolean; lvglInclude: string; generateSourceCodeForEezFramework: boolean; compressFlowDefinition: boolean; @@ -299,6 +300,13 @@ export class Build extends EezObject { name: "destinationFolder", type: PropertyType.RelativeFolder }, + { + name: "separateFolderForImagesAndFonts", + displayName: "Store image and font files in a separate folder", + checkboxStyleSwitch: true, + type: PropertyType.Boolean, + disabled: isNotLVGLProject + }, { name: "lvglInclude", displayName: "LVGL include", @@ -362,6 +370,10 @@ export class Build extends EezObject { if (jsObject.expressionEvaluatorStackSize == undefined) { jsObject.expressionEvaluatorStackSize = 20; } + + if (jsObject.separateFolderForImagesAndFonts == undefined) { + jsObject.separateFolderForImagesAndFonts = false; + } }, updateObjectValueHook: (build: Build, values: Partial) => { @@ -387,6 +399,7 @@ export class Build extends EezObject { configurations: observable, files: observable, destinationFolder: observable, + separateFolderForImagesAndFonts: observable, lvglInclude: observable, generateSourceCodeForEezFramework: observable, compressFlowDefinition: observable,