启动后播放开机声音完成
This commit is contained in:
@@ -52,11 +52,15 @@ idf_component_register(
|
||||
)
|
||||
|
||||
set(platform_lvgl_animation_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/lvgl_animations")
|
||||
set(platform_audio_prompt_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/assets/audio_prompts")
|
||||
set(platform_lvgl_animation_image_dir "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image")
|
||||
set(platform_lvgl_animation_stage_stamp "${CMAKE_CURRENT_BINARY_DIR}/lvgl_animations_image.stamp")
|
||||
file(GLOB_RECURSE platform_lvgl_animation_bin_files CONFIGURE_DEPENDS
|
||||
"${platform_lvgl_animation_src_dir}/*.bin"
|
||||
)
|
||||
file(GLOB_RECURSE platform_audio_prompt_files CONFIGURE_DEPENDS
|
||||
"${platform_audio_prompt_src_dir}/*.opus"
|
||||
)
|
||||
|
||||
set(platform_lvgl_animation_stage_commands)
|
||||
foreach(animation_file IN LISTS platform_lvgl_animation_bin_files)
|
||||
@@ -69,6 +73,15 @@ foreach(animation_file IN LISTS platform_lvgl_animation_bin_files)
|
||||
"${platform_lvgl_animation_image_dir}/${animation_rel_path}"
|
||||
)
|
||||
endforeach()
|
||||
foreach(audio_file IN LISTS platform_audio_prompt_files)
|
||||
file(RELATIVE_PATH audio_rel_path "${platform_audio_prompt_src_dir}" "${audio_file}")
|
||||
list(APPEND platform_lvgl_animation_stage_commands
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}/audio_prompts"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${audio_file}"
|
||||
"${platform_lvgl_animation_image_dir}/audio_prompts/${audio_rel_path}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${platform_lvgl_animation_stage_stamp}"
|
||||
@@ -76,7 +89,7 @@ add_custom_command(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${platform_lvgl_animation_image_dir}"
|
||||
${platform_lvgl_animation_stage_commands}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${platform_lvgl_animation_stage_stamp}"
|
||||
DEPENDS ${platform_lvgl_animation_bin_files}
|
||||
DEPENDS ${platform_lvgl_animation_bin_files} ${platform_audio_prompt_files}
|
||||
)
|
||||
|
||||
littlefs_create_partition_image(
|
||||
|
||||
Reference in New Issue
Block a user