9 changed files with 85 additions and 226 deletions
-
66CMakeLists.txt
-
35CMakeListsAARCH64.cmake
-
7CMakeListsPC.cmake
-
25TODO.md
-
2buildtools
-
64cmakepc.cmake
-
33sh/envsetup.sh
-
11sh/envsetuppc.sh
-
68sh/packet.sh
@ -0,0 +1,35 @@ |
|||||
|
|
||||
|
|
||||
|
# 添加编译的目标文件 |
||||
|
zadd_executable_simple( |
||||
|
TARGET |
||||
|
app.out |
||||
|
SRC |
||||
|
src/main.cpp |
||||
|
src/service/device_io_service.cpp |
||||
|
src/service/device_io_service_mock.cpp |
||||
|
src/service/main_control_service.cpp |
||||
|
src/service/light_control_service.cpp |
||||
|
src/service/report_service.cpp |
||||
|
src/service/voiceprocess/beforeasr_voiceprocesser.cpp |
||||
|
src/service/voiceprocess/beforewakeup_voiceprocesser.cpp |
||||
|
src/service/voiceprocess/wakeup_processer.cpp |
||||
|
src/service/voiceprocess/audio_recoder_service.cpp |
||||
|
src/service/voiceprocess/audio_logging_service.cpp |
||||
|
# aiui |
||||
|
) |
||||
|
|
||||
|
zadd_executable_simple(TARGET alsaplayer_main.out SRC |
||||
|
dep/zlinuxcomponents/alsaplayer/test_alsaplayer_main.cpp) |
||||
|
zadd_executable_simple(TARGET audio_recorder_main.out SRC |
||||
|
dep/zlinuxcomponents/audio/audio_recorder_main.cpp) |
||||
|
zadd_executable_simple(TARGET test_asr_main.out SRC |
||||
|
dep/zlinuxcomponents/aiui_ws/aiui_main.c) |
||||
|
zadd_executable_simple( |
||||
|
TARGET test_smart_soundbox_player.out SRC |
||||
|
dep/zlinuxcomponents/alsaplayer/test_smart_soundbox_player.cpp) |
||||
|
|
||||
|
zadd_executable_simple( |
||||
|
TARGET test_H8922S_gps_info_reader.out SRC |
||||
|
src/test/test_H8922S_gps_info_reader.cpp |
||||
|
src/service/H8922S_gps_Info_reader.cpp) |
@ -0,0 +1,7 @@ |
|||||
|
zadd_executable_simple(TARGET test_aiui_service.out SRC |
||||
|
dep/zlinuxcomponents/aiui_ws/test_aiui_service.cpp) |
||||
|
|
||||
|
zadd_executable_simple( |
||||
|
TARGET test_H8922S_gps_info_reader.out SRC |
||||
|
src/test/test_H8922S_gps_info_reader.cpp |
||||
|
src/service/H8922S_gps_Info_reader.cpp) |
@ -1 +1 @@ |
|||||
Subproject commit 2c5fa9ee781af8c21d16ecaf50bfbab8ba0e137b |
|
||||
|
Subproject commit 45b06ce5325ab6528de930d9b579ae447e12c26f |
@ -1,64 +0,0 @@ |
|||||
# 设置通用编译选项 |
|
||||
set(C_CPP_FLAGS "${C_CPP_FLAGS} ") |
|
||||
set(C_CPP_FLAGS |
|
||||
"${C_CPP_FLAGS} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-variable" |
|
||||
) |
|
||||
set(C_CPP_FLAGS |
|
||||
"${C_CPP_FLAGS} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-variable" |
|
||||
) |
|
||||
set(C_CPP_FLAGS |
|
||||
"${C_CPP_FLAGS} -Werror=return-type -Werror=parentheses -Wfatal-errors -Wno-comment" |
|
||||
) |
|
||||
set(C_CPP_FLAGS "${C_CPP_FLAGS} -Wno-format-overflow") |
|
||||
set(C_CPP_FLAGS "${C_CPP_FLAGS} -O0 -g3 -fPIC -Wall") |
|
||||
|
|
||||
# 设置C编译选项 |
|
||||
set(CMAKE_C_FLAGS "${C_CPP_FLAGS}") |
|
||||
message("CMAKE_C_FLAGS : ${CMAKE_C_FLAGS}") |
|
||||
|
|
||||
# 设置CPP编译选项 |
|
||||
set(CMAKE_CXX_FLAGS "${C_CPP_FLAGS}") |
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move -Wno-reorder") |
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") |
|
||||
message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") |
|
||||
message("PROJECT_NAME: ${PROJECT_NAME}") |
|
||||
message("PUBLIC_LINK_DIRECTORIES: ${PUBLIC_LINK_DIRECTORIES}") |
|
||||
message("PUBLIC_INCLUDE_DIRECTORIES: ${PUBLIC_INCLUDE_DIRECTORIES}") |
|
||||
|
|
||||
# 添加相应的依赖代码 |
|
||||
include(dep/iflytopcpp/module.cmake) |
|
||||
include(dep/asio1.12.2/module.cmake) |
|
||||
include(dep/websocketpp/module.cmake) |
|
||||
include(dep/zservice_container/module.cmake) |
|
||||
include(dep/zwebservice/module.cmake) |
|
||||
include(dep/zlinuxcomponents/alsaplayer/module.cmake) |
|
||||
include(dep/zlinuxcomponents/rootfs_auto_update/module.cmake) |
|
||||
include(dep/zlinuxcomponents/mycroft_precise/module.cmake) |
|
||||
include(dep/zlinuxcomponents/audio/module.cmake) |
|
||||
include(dep/zlinuxcomponents/aiui_ws/module.cmake) |
|
||||
|
|
||||
# 设置当前工程依赖的头文件路径和链接的库文件 |
|
||||
set(DEP_LINK_LIBRARIES |
|
||||
${DEP_LINK_LIBRARIES} |
|
||||
# ffmpeg |
|
||||
avcodec |
|
||||
avdevice |
|
||||
avfilter |
|
||||
avformat |
|
||||
avutil |
|
||||
swresample |
|
||||
swscale |
|
||||
m |
|
||||
# sys |
|
||||
asound |
|
||||
pthread |
|
||||
# |
|
||||
# curlpp curl |
|
||||
) |
|
||||
zadd_executable_simple(TARGET test_aiui_service.out SRC |
|
||||
dep/zlinuxcomponents/aiui_ws/test_aiui_service.cpp) |
|
||||
|
|
||||
zadd_executable_simple( |
|
||||
TARGET test_H8922S_gps_info_reader.out SRC |
|
||||
src/test/test_H8922S_gps_info_reader.cpp |
|
||||
src/service/H8922S_gps_Info_reader.cpp) |
|
@ -1,11 +0,0 @@ |
|||||
cd ${PROJECT_PATH}/buildpc |
|
||||
|
|
||||
wget -c "192.168.1.2:8021/sdk_firefly_rk3328_v2.5.1/buildtools/cmake-3.13.0-Linux-x86_64.tar.gz" |
|
||||
rm -rf cmake-3.13.0-Linux-x86_64 |
|
||||
tar -xvf cmake-3.13.0-Linux-x86_64.tar.gz |
|
||||
mv cmake-3.13.0-Linux-x86_64 cmake |
|
||||
CMAKE_BIN=${PROJECT_PATH}/buildpc/cmake/bin/cmake |
|
||||
|
|
||||
# 构造buildpc/build.sh |
|
||||
echo "${CMAKE_BIN} ../ -DBUILD_FOR_TEST_ON_PC=true " >${PROJECT_PATH}/buildpc/build.sh |
|
||||
chmod +x ${PROJECT_PATH}/buildpc/build.sh |
|
@ -1,75 +1,13 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
# |
# |
||||
# wget_and_unzip 解压后的文件名 url |
# wget_and_unzip 解压后的文件名 url |
||||
# |
# |
||||
function wget_and_unzip() { |
|
||||
# 下载压缩包,解压,并删除压缩包 |
|
||||
# cd $PACKET_DIR/ |
|
||||
mkdir -p $PROJECT_PATH/.cache |
|
||||
cd $PROJECT_PATH/.cache |
|
||||
# ftp://zftpuser:zftpzwsd@192.168.1.2/zwsd/manufacturer_mycroft/hotworld/xiaomaoxiaomao/xiaomaoxiaomao_module_20220519.tar.gz |
|
||||
wget -c $2 |
|
||||
tar -xvf $(basename $2) |
|
||||
mv $PROJECT_PATH/.cache/$1 $PACKET_DIR/ |
|
||||
} |
|
||||
|
|
||||
function wget_and_cpy() { |
|
||||
# 下载压缩包,解压,并删除压缩包 |
|
||||
# cd $PACKET_DIR/ |
|
||||
mkdir -p $PROJECT_PATH/.cache |
|
||||
cd $PROJECT_PATH/.cache |
|
||||
wget -c $1 |
|
||||
cp $PROJECT_PATH/.cache/$(basename $1) $PACKET_DIR/ |
|
||||
} |
|
||||
|
|
||||
set -e |
|
||||
set -x |
|
||||
export PROJECT_PATH=$(pwd) |
|
||||
source ${PROJECT_PATH}/build/buildenv |
|
||||
|
|
||||
#打包目录 |
|
||||
PACKET_DIR=$PROJECT_PATH/out/app |
|
||||
|
|
||||
# 删除打包目录,重新打包 |
|
||||
rm -rf ${PACKET_DIR} |
|
||||
mkdir -p ${PACKET_DIR} |
|
||||
######################################################################################## |
|
||||
################################根据需要修改下面的内容即可################################## |
|
||||
######################################################################################## |
|
||||
|
|
||||
#1. 编译 |
|
||||
cd $PROJECT_PATH/build |
|
||||
# ./build.sh && make -j8 && make install |
|
||||
|
|
||||
#2.打包APP |
|
||||
cp $PROJECT_PATH/build/app/*.out $PACKET_DIR/ |
|
||||
|
|
||||
#3.3 打包webapp |
|
||||
cp -rf $PROJECT_PATH/webapp $PACKET_DIR/ |
|
||||
|
|
||||
#4 拷贝配置文件 |
|
||||
cd $PROJECT_PATH/env/ && cp --path -rf ./* $PACKET_DIR/ |
|
||||
|
|
||||
#################################################################### |
#################################################################### |
||||
########################打包自定义的东西############################## |
########################打包自定义的东西############################## |
||||
#################################################################### |
#################################################################### |
||||
# 下载唤醒词模型 |
# 下载唤醒词模型 |
||||
wget_and_unzip xiaomaoxiaomao ftp://zftpuser:zftpzwsd@192.168.1.2/zwsd/manufacturer_mycroft/hotworld/xiaomaoxiaomao/xiaomaoxiaomao_module_20220609.tar.gz |
|
||||
|
wget_and_unzip_to_packet_dir xiaomaoxiaomao ftp://zftpuser:zftpzwsd@192.168.1.2/zwsd/manufacturer_mycroft/hotworld/xiaomaoxiaomao/xiaomaoxiaomao_module_20220609.tar.gz |
||||
# 下载唤醒词引擎 |
# 下载唤醒词引擎 |
||||
wget_and_unzip precise 192.168.1.2:8021/manufacturer_mycroft/mycroft-precise-release/precise-all_0.3.0_aarch64.tar.gz |
|
||||
|
wget_and_unzip_to_packet_dir precise 192.168.1.2:8021/manufacturer_mycroft/mycroft-precise-release/precise-all_0.3.0_aarch64.tar.gz |
||||
# 下载唤醒词语音 |
# 下载唤醒词语音 |
||||
wget_and_cpy 192.168.1.2:8021/manufacturer_mycroft/hotworld/xiaomaoxiaomao/test_xiaomaoxiaomao.wav |
|
||||
|
|
||||
#################################################################### |
|
||||
#################################################################### |
|
||||
|
|
||||
#5 打包 |
|
||||
cur_date="$(date +%Y%m%d)" |
|
||||
|
|
||||
cd $PACKET_DIR/../ |
|
||||
tar -czvf ${PACKET_DIR}_${cur_date}.tar.gz app |
|
||||
cp ${PACKET_DIR}_${cur_date}.tar.gz ${PACKET_DIR}.tar.gz |
|
||||
echo "Brief:" |
|
||||
echo "generate ${PACKET_DIR}_${cur_date}.tar.gz..................." |
|
||||
echo "generate ${PACKET_DIR}.tar.gz..................." |
|
||||
|
wget_and_cpy_to_packet_dir 192.168.1.2:8021/manufacturer_mycroft/hotworld/xiaomaoxiaomao/test_xiaomaoxiaomao.wav |
Write
Preview
Loading…
Cancel
Save
Reference in new issue