mirror of
https://github.com/eez-open/lvgl-template-web.git
synced 2026-11-17 05:58:55 +01:00
added template folder
This commit is contained in:
parent
ec61d3402e
commit
21c3b245de
@ -1,5 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
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_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")
|
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")
|
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||||
target_link_libraries(index
|
target_link_libraries(index
|
||||||
lvgl
|
lvgl
|
||||||
lvgl_examples
|
|
||||||
lvgl_demos
|
|
||||||
lv_drivers
|
lv_drivers
|
||||||
)
|
)
|
||||||
set_target_properties(index PROPERTIES LINK_FLAGS "--shell-file ${PROJECT_SOURCE_DIR}/lvgl_shell.html -s SINGLE_FILE=1")
|
set_target_properties(index PROPERTIES LINK_FLAGS "--shell-file ${PROJECT_SOURCE_DIR}/lvgl_shell.html -s SINGLE_FILE=1")
|
||||||
|
|||||||
BIN
template/image.png
Normal file
BIN
template/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
4
template/manifest.json
Normal file
4
template/manifest.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"eez-framework-location": "eez",
|
||||||
|
"eez-project-path": "lvgl-template-web.eez-project"
|
||||||
|
}
|
||||||
36
template/post.js
Normal file
36
template/post.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* @callback RenameFile
|
||||||
|
* @param {string} fileSrcRelativePath
|
||||||
|
* @param {string} fileDstRelativePath
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @callback ReplaceInFile
|
||||||
|
* @param {string} fileRelativePath
|
||||||
|
* @param {string} searchValue
|
||||||
|
* @param {string} newValue
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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;
|
||||||
Loading…
Reference in New Issue
Block a user