正在显示
2 个修改的文件
包含
7 行增加
和
4 行删除
@@ -93,12 +93,12 @@ SRS_LIBRTMP_OBJS="${LIBS_OBJS[@]}" && build_module_cpp | @@ -93,12 +93,12 @@ SRS_LIBRTMP_OBJS="${LIBS_OBJS[@]}" && build_module_cpp | ||
93 | 93 | ||
94 | # create example.cpp | 94 | # create example.cpp |
95 | FILE=$SRS_EXPORT_LIBRTMP_SINGLE/example.c | 95 | FILE=$SRS_EXPORT_LIBRTMP_SINGLE/example.c |
96 | -COMPILE='gcc example.c srs_librtmp.cpp -g -O0 -lstdc++ -o example' | 96 | +SRS_SINGLE_LIBRTMP_COMPILE='gcc example.c srs_librtmp.cpp -g -O0 -lstdc++ -o example' |
97 | cat << END >$FILE | 97 | cat << END >$FILE |
98 | /** | 98 | /** |
99 | # Example to use srs-librtmp | 99 | # Example to use srs-librtmp |
100 | # see: https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SrsLibrtmp | 100 | # see: https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_SrsLibrtmp |
101 | - ${COMPILE} | 101 | + ${SRS_SINGLE_LIBRTMP_COMPILE} |
102 | */ | 102 | */ |
103 | #include <stdio.h> | 103 | #include <stdio.h> |
104 | #include "srs_librtmp.h" | 104 | #include "srs_librtmp.h" |
@@ -119,9 +119,10 @@ int main(int argc, char** argv) | @@ -119,9 +119,10 @@ int main(int argc, char** argv) | ||
119 | END | 119 | END |
120 | 120 | ||
121 | # compile the example | 121 | # compile the example |
122 | -(cd $SRS_EXPORT_LIBRTMP_SINGLE && `${COMPILE}` && ./example && rm -f example) | 122 | +(cd $SRS_EXPORT_LIBRTMP_SINGLE && echo "${SRS_SINGLE_LIBRTMP_COMPILE}" && |
123 | +`${SRS_SINGLE_LIBRTMP_COMPILE}` && ./example && rm -f example) | ||
123 | ret=$?; if [[ $ret -ne 0 ]]; then | 124 | ret=$?; if [[ $ret -ne 0 ]]; then |
124 | - echo "(cd $SRS_EXPORT_LIBRTMP_SINGLE && ${COMPILE} && ./example && rm -f example)" | 125 | + echo "(cd $SRS_EXPORT_LIBRTMP_SINGLE && ${SRS_SINGLE_LIBRTMP_COMPILE} && ./example && rm -f example)" |
125 | echo -e "${RED}failed to compile example.${BLACK}" | 126 | echo -e "${RED}failed to compile example.${BLACK}" |
126 | exit $ret | 127 | exit $ret |
127 | fi | 128 | fi |
@@ -599,6 +599,8 @@ else | @@ -599,6 +599,8 @@ else | ||
599 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.h ${BLACK}" | 599 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.h ${BLACK}" |
600 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.cpp ${BLACK}" | 600 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/srs_librtmp.cpp ${BLACK}" |
601 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/example.c ${BLACK}" | 601 | echo -e "${GREEN} $SRS_EXPORT_LIBRTMP_PROJECT/example.c ${BLACK}" |
602 | + echo -e "${GREEN}To compile the example: ${BLACK}" | ||
603 | + echo -e "${GREEN} cd $SRS_EXPORT_LIBRTMP_PROJECT && $SRS_SINGLE_LIBRTMP_COMPILE ${BLACK}" | ||
602 | # for srs-librtmp project. | 604 | # for srs-librtmp project. |
603 | else | 605 | else |
604 | echo -e "${GREEN}Please use the srs-librtmp project: ${BLACK}" | 606 | echo -e "${GREEN}Please use the srs-librtmp project: ${BLACK}" |
-
请 注册 或 登录 后发表评论