From 21c3b245deec9dc04ef079518463b3e7d55646dc Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Sat, 29 Oct 2022 13:55:20 +0200 Subject: [PATCH] added template folder --- CMakeLists.txt | 4 +-- ui.eez-project => lvgl-template-web.eez-project | 0 template/image.png | Bin 0 -> 6743 bytes template/manifest.json | 4 +++ template/post.js | 36 ++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) rename ui.eez-project => lvgl-template-web.eez-project (100%) create mode 100644 template/image.png create mode 100644 template/manifest.json create mode 100644 template/post.js diff --git a/CMakeLists.txt b/CMakeLists.txt index fdb3dd9..6b03193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.12) -project (lv_emscripten) +project (lvgl-template-web) set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -O2 -s USE_SDL=2") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s INITIAL_MEMORY=83886080 -sLLD_REPORT_UNDEFINED") @@ -111,8 +111,6 @@ set_source_files_properties(main.c PROPERTIES COMPILE_FLAGS -DCHOSEN_DEMO=${LVGL set(CMAKE_EXECUTABLE_SUFFIX ".html") target_link_libraries(index lvgl - lvgl_examples - lvgl_demos lv_drivers ) set_target_properties(index PROPERTIES LINK_FLAGS "--shell-file ${PROJECT_SOURCE_DIR}/lvgl_shell.html -s SINGLE_FILE=1") diff --git a/ui.eez-project b/lvgl-template-web.eez-project similarity index 100% rename from ui.eez-project rename to lvgl-template-web.eez-project diff --git a/template/image.png b/template/image.png new file mode 100644 index 0000000000000000000000000000000000000000..26e5a48a0b1de3643f265ea8575c63c143d0a896 GIT binary patch literal 6743 zcmcIp2UJtp)}|v!Zz44WP+CZG(?iiTnt)QISV@IINJ0{ts6&x%0S6I5Mn%9v5d=pW zP(e^pL2M{0O+ZjY5f~Ay|Hby^y*D%etbeUPYbE#O+`Yg3?Y+Nqa_&mz8gExsWdmg?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bXJDpB3>pr4P} + */ + +/** + * @callback ReplaceInFile + * @param {string} fileRelativePath + * @param {string} searchValue + * @param {string} newValue + * @returns {Promise} + */ + +/** + * @typedef {Object} WizardContext + * @property {string} projectDirPath + * @property {string} projectName + * @property {RenameFile} renameFile + * @property {ReplaceInFile} replaceInFile + */ + +/** + * @param {WizardContext} context + */ +async function postProcessing(context) { + await context.replaceInFile("CMakeLists.txt", "lvgl-template-web", context.projectName); + + await context.replaceInFile("README.md", "{{projectDirPath}}", context.projectDirPath); + await context.replaceInFile("README.md", "{{projectName}}", context.projectName); + + await context.renameFile("lvgl-template-web.eez-project", context.projectName + ".eez-project"); +} + +module.exports = postProcessing; \ No newline at end of file