mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine typo
This commit is contained in:
parent
f6c8e02cca
commit
28517849ed
11 changed files with 271 additions and 315 deletions
|
@ -17,7 +17,7 @@ FILE=${SRS_OBJS}/${SRS_MAKEFILE}
|
|||
|
||||
APP_TARGET="${SRS_OBJS_DIR}/${APP_NAME}"
|
||||
|
||||
echo "generate app ${APP_NAME} depends...";
|
||||
echo "Generating app ${APP_NAME} depends.";
|
||||
|
||||
echo "# build ${APP_TARGET}" >> ${FILE}
|
||||
# generate the binary depends, for example:
|
||||
|
@ -52,7 +52,7 @@ for item in ${MODULE_OBJS[*]}; do
|
|||
done
|
||||
echo "" >> ${FILE}
|
||||
|
||||
echo "generate app ${APP_NAME} link...";
|
||||
echo "Generating app ${APP_NAME} link.";
|
||||
|
||||
# genereate the actual link command, for example:
|
||||
# $(LINK) -o objs/srs objs/src/core/srs_core.o -ldl
|
||||
|
@ -89,4 +89,4 @@ done
|
|||
echo -n "${LINK_OPTIONS}" >> ${FILE}
|
||||
echo "" >> ${FILE}
|
||||
|
||||
echo -n "generate app ${APP_NAME} ok"; echo '!';
|
||||
echo -n "Generate app ${APP_NAME} ok"; echo '!';
|
||||
|
|
|
@ -25,8 +25,8 @@ function require_sudoer()
|
|||
}
|
||||
|
||||
# TODO: check gcc/g++
|
||||
echo "check gcc/g++/gdb/make"
|
||||
echo "depends tools are ok"
|
||||
echo "Checking gcc/g++/gdb/make."
|
||||
echo "Required tools are ok."
|
||||
#####################################################################################
|
||||
# for Ubuntu, auto install tools by apt-get
|
||||
#####################################################################################
|
||||
|
@ -34,7 +34,7 @@ OS_IS_UBUNTU=NO
|
|||
function Ubuntu_prepare()
|
||||
{
|
||||
if [ $SRS_CUBIE = YES ]; then
|
||||
echo "for cubieboard, use ubuntu prepare"
|
||||
echo "For cubieboard, please use ubuntu prepare."
|
||||
else
|
||||
uname -v|grep Ubuntu >/dev/null 2>&1
|
||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
|
@ -49,97 +49,97 @@ function Ubuntu_prepare()
|
|||
# cross build for arm, install the cross build tool chain.
|
||||
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
||||
$SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi"
|
||||
echo "Installing gcc-arm-linux-gnueabi g++-arm-linux-gnueabi."
|
||||
require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi"
|
||||
sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi success"
|
||||
echo "The gcc-arm-linux-gnueabi g++-arm-linux-gnueabi are installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# cross build for mips, user must installed the tool chain.
|
||||
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
|
||||
$SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "user must install the tool chain: $SrsArmCC"
|
||||
echo "You must install the tool chain: $SrsArmCC"
|
||||
return 2
|
||||
fi
|
||||
fi
|
||||
|
||||
OS_IS_UBUNTU=YES
|
||||
echo "Ubuntu detected, install tools if needed"
|
||||
echo "Installing tools for Ubuntu."
|
||||
|
||||
gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc"
|
||||
echo "Installing gcc."
|
||||
require_sudoer "sudo apt-get install -y --force-yes gcc"
|
||||
sudo apt-get install -y --force-yes gcc; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc success"
|
||||
echo "The gcc is installed."
|
||||
fi
|
||||
|
||||
g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install g++"
|
||||
echo "Installing g++."
|
||||
require_sudoer "sudo apt-get install -y --force-yes g++"
|
||||
sudo apt-get install -y --force-yes g++; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install g++ success"
|
||||
echo "The g++ is installed."
|
||||
fi
|
||||
|
||||
make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install make"
|
||||
echo "Installing make."
|
||||
require_sudoer "sudo apt-get install -y --force-yes make"
|
||||
sudo apt-get install -y --force-yes make; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install make success"
|
||||
echo "The make is installed."
|
||||
fi
|
||||
|
||||
patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install patch"
|
||||
echo "Installing patch."
|
||||
require_sudoer "sudo apt-get install -y --force-yes patch"
|
||||
sudo apt-get install -y --force-yes patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install patch success"
|
||||
echo "The patch is installed."
|
||||
fi
|
||||
|
||||
unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install unzip"
|
||||
echo "Installing unzip."
|
||||
require_sudoer "sudo apt-get install -y --force-yes unzip"
|
||||
sudo apt-get install -y --force-yes unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install unzip success"
|
||||
echo "The unzip is installed."
|
||||
fi
|
||||
|
||||
if [ $SRS_NGINX = YES ]; then
|
||||
if [[ ! -f /usr/include/pcre.h ]]; then
|
||||
echo "install libpcre3-dev"
|
||||
echo "Installing libpcre3-dev."
|
||||
require_sudoer "sudo apt-get install -y --force-yes libpcre3-dev"
|
||||
sudo apt-get install -y --force-yes libpcre3-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install libpcre3-dev success"
|
||||
echo "The libpcre3-dev is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install autoconf"
|
||||
echo "Installing autoconf."
|
||||
require_sudoer "sudo apt-get install -y --force-yes autoconf"
|
||||
sudo apt-get install -y --force-yes autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install autoconf success"
|
||||
echo "The autoconf is installed."
|
||||
fi
|
||||
|
||||
libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install libtool"
|
||||
echo "Installing libtool."
|
||||
require_sudoer "sudo apt-get install -y --force-yes libtool"
|
||||
sudo apt-get install -y --force-yes libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install libtool success"
|
||||
echo "The libtool is installed."
|
||||
fi
|
||||
|
||||
if [[ ! -f /usr/include/zlib.h ]]; then
|
||||
echo "install zlib1g-dev"
|
||||
echo "Installing zlib1g-dev."
|
||||
require_sudoer "sudo apt-get install -y --force-yes zlib1g-dev"
|
||||
sudo apt-get install -y --force-yes zlib1g-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install zlib1g-dev success"
|
||||
echo "The zlib1g-dev is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Ubuntu install tools success"
|
||||
echo "Tools for Ubuntu are installed."
|
||||
return 0
|
||||
}
|
||||
# donot prepare tools, for srs-librtmp depends only gcc and g++.
|
||||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
Ubuntu_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "Ubuntu prepare failed, ret=$ret"; exit $ret; fi
|
||||
Ubuntu_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "Install tools for ubuntu failed, ret=$ret"; exit $ret; fi
|
||||
fi
|
||||
#####################################################################################
|
||||
# for Centos, auto install tools by yum
|
||||
|
@ -153,93 +153,93 @@ function Centos_prepare()
|
|||
|
||||
# cross build for arm, install the cross build tool chain.
|
||||
if [ $SRS_CROSS_BUILD = YES ]; then
|
||||
echo "embeded(arm/mips) is invalid for CentOS"
|
||||
echo "CentOS doesn't support crossbuild for arm/mips, please use Ubuntu instead."
|
||||
return 1
|
||||
fi
|
||||
|
||||
OS_IS_CENTOS=YES
|
||||
echo "Centos detected, install tools if needed"
|
||||
echo "Installing tools for Centos."
|
||||
|
||||
gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc"
|
||||
echo "Installing gcc."
|
||||
require_sudoer "sudo yum install -y gcc"
|
||||
sudo yum install -y gcc; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc success"
|
||||
echo "The gcc is installed."
|
||||
fi
|
||||
|
||||
g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc-c++"
|
||||
echo "Installing gcc-c++."
|
||||
require_sudoer "sudo yum install -y gcc-c++"
|
||||
sudo yum install -y gcc-c++; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc-c++ success"
|
||||
echo "The gcc-c++ is installed."
|
||||
fi
|
||||
|
||||
make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install make"
|
||||
echo "Installing make."
|
||||
require_sudoer "sudo yum install -y make"
|
||||
sudo yum install -y make; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install make success"
|
||||
echo "The make is installed."
|
||||
fi
|
||||
|
||||
patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install patch"
|
||||
echo "Installing patch."
|
||||
require_sudoer "sudo yum install -y patch"
|
||||
sudo yum install -y patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install patch success"
|
||||
echo "The patch is installed."
|
||||
fi
|
||||
|
||||
unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install unzip"
|
||||
echo "Installing unzip."
|
||||
require_sudoer "sudo yum install -y unzip"
|
||||
sudo yum install -y unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install unzip success"
|
||||
echo "The unzip is installed."
|
||||
fi
|
||||
|
||||
if [ $SRS_NGINX = YES ]; then
|
||||
if [[ ! -f /usr/include/pcre.h ]]; then
|
||||
echo "install pcre-devel"
|
||||
echo "Installing pcre-devel."
|
||||
require_sudoer "sudo yum install -y pcre-devel"
|
||||
sudo yum install -y pcre-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install pcre-devel success"
|
||||
echo "The pcre-devel is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||
automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install automake"
|
||||
echo "Installing automake."
|
||||
require_sudoer "sudo yum install -y automake"
|
||||
sudo yum install -y automake; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install automake success"
|
||||
echo "The automake is installed."
|
||||
fi
|
||||
|
||||
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install autoconf"
|
||||
echo "Installing autoconf."
|
||||
require_sudoer "sudo yum install -y autoconf"
|
||||
sudo yum install -y autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install autoconf success"
|
||||
echo "The autoconf is installed."
|
||||
fi
|
||||
|
||||
libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install libtool"
|
||||
echo "Installing libtool."
|
||||
require_sudoer "sudo yum install -y libtool"
|
||||
sudo yum install -y libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install libtool success"
|
||||
echo "The libtool is installed."
|
||||
fi
|
||||
|
||||
if [[ ! -f /usr/include/zlib.h ]]; then
|
||||
echo "install zlib-devel"
|
||||
echo "Installing zlib-devel."
|
||||
require_sudoer "sudo yum install -y zlib-devel"
|
||||
sudo yum install -y zlib-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install zlib-devel success"
|
||||
echo "The zlib-devel is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Centos install tools success"
|
||||
echo "Tools for Centos are installed."
|
||||
return 0
|
||||
}
|
||||
# donot prepare tools, for srs-librtmp depends only gcc and g++.
|
||||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "CentOS prepare failed, ret=$ret"; exit $ret; fi
|
||||
Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "Install tools for CentOS failed, ret=$ret"; exit $ret; fi
|
||||
fi
|
||||
#####################################################################################
|
||||
# for Centos, auto install tools by yum
|
||||
|
@ -250,7 +250,7 @@ function OSX_prepare()
|
|||
uname -s|grep Darwin >/dev/null 2>&1
|
||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
if [ $SRS_OSX = YES ]; then
|
||||
echo "OSX check failed, actual is `uname -s`"
|
||||
echo "Current OS `uname -s` is not OSX, please check your configure options."
|
||||
exit 1;
|
||||
fi
|
||||
return 0;
|
||||
|
@ -258,110 +258,110 @@ function OSX_prepare()
|
|||
|
||||
# cross build for arm, install the cross build tool chain.
|
||||
if [ $SRS_CROSS_BUILD = YES ]; then
|
||||
echo "embeded(arm/mips) is invalid for OSX"
|
||||
echo "OSX doesn't support crossbuild for arm/mips, please use Ubuntu instead."
|
||||
return 1
|
||||
fi
|
||||
|
||||
OS_IS_OSX=YES
|
||||
echo "OSX detected, install tools if needed"
|
||||
echo "Installing tools for OSX."
|
||||
# requires the osx when os
|
||||
if [ $OS_IS_OSX = YES ]; then
|
||||
if [ $SRS_OSX = NO ]; then
|
||||
echo "OSX detected, must specifies the --osx"
|
||||
echo "Invalid configure options for OSX, please specify --osx."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install brew"
|
||||
echo "Installing brew."
|
||||
echo "ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\""
|
||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install brew success"
|
||||
echo "The brew is installed."
|
||||
fi
|
||||
|
||||
gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc"
|
||||
echo "Installing gcc."
|
||||
echo "brew install gcc"
|
||||
brew install gcc; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc success"
|
||||
echo "The gcc is installed."
|
||||
fi
|
||||
|
||||
g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install gcc-c++"
|
||||
echo "Installing gcc-c++."
|
||||
echo "brew install gcc-c++"
|
||||
brew install gcc-c++; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install gcc-c++ success"
|
||||
echo "The gcc-c++ is installed."
|
||||
fi
|
||||
|
||||
make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install make"
|
||||
echo "Installing make."
|
||||
echo "brew install make"
|
||||
brew install make; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install make success"
|
||||
echo "The make is installed."
|
||||
fi
|
||||
|
||||
patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install patch"
|
||||
echo "Installing patch."
|
||||
echo "brew install patch"
|
||||
brew install patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install patch success"
|
||||
echo "The patch is installed."
|
||||
fi
|
||||
|
||||
unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install unzip"
|
||||
echo "Installing unzip."
|
||||
echo "brew install unzip"
|
||||
brew install unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install unzip success"
|
||||
echo "The unzip is installed."
|
||||
fi
|
||||
|
||||
if [ $SRS_NGINX = YES ]; then
|
||||
if [[ ! -f /usr/local/include/pcre.h ]]; then
|
||||
echo "install pcre"
|
||||
echo "Installing pcre."
|
||||
echo "brew install pcre"
|
||||
brew install pcre; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install pcre success"
|
||||
echo "The pcre is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||
automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install automake"
|
||||
echo "Installing automake."
|
||||
echo "brew install automake"
|
||||
brew install automake; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install automake success"
|
||||
echo "The automake is installed."
|
||||
fi
|
||||
|
||||
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install autoconf"
|
||||
echo "Installing autoconf."
|
||||
echo "brew install autoconf"
|
||||
brew install autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install autoconf success"
|
||||
echo "The autoconf is installed."
|
||||
fi
|
||||
|
||||
which libtool >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install libtool"
|
||||
echo "Installing libtool."
|
||||
echo "brew install libtool"
|
||||
brew install libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install libtool success"
|
||||
echo "The libtool is installed."
|
||||
fi
|
||||
|
||||
brew info zlib >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install zlib"
|
||||
echo "Installing zlib."
|
||||
echo "brew install zlib"
|
||||
brew install zlib; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install zlib success"
|
||||
echo "The zlib is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "OSX install tools success"
|
||||
echo "Tools for OSX are installed."
|
||||
return 0
|
||||
}
|
||||
# donot prepare tools, for srs-librtmp depends only gcc and g++.
|
||||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$ret"; exit $ret; fi
|
||||
OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "Install tools for OSX failed, ret=$ret"; exit $ret; fi
|
||||
fi
|
||||
|
||||
# the sed command
|
||||
# We must use a bash function instead of variable.
|
||||
function sed_utility() {
|
||||
if [ $OS_IS_OSX = YES ]; then
|
||||
sed -i '' "$@"
|
||||
|
@ -391,7 +391,7 @@ SED="sed_utility" && echo "SED is $SED"
|
|||
# others is invalid.
|
||||
if [[ $OS_IS_UBUNTU = NO && $OS_IS_CENTOS = NO && $OS_IS_OSX = NO && $SRS_EXPORT_LIBRTMP_PROJECT = NO ]]; then
|
||||
if [[ $SRS_PI = NO && $SRS_CUBIE = NO && $SRS_CROSS_BUILD = NO ]]; then
|
||||
echo "what a fuck, os not supported."
|
||||
echo "What a fuck, your OS `uname -s` is not supported."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -411,11 +411,11 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
if [ $SRS_CROSS_BUILD = YES ]; then
|
||||
# ok, arm specified, if the flag filed does not exists, need to rebuild.
|
||||
if [[ -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
|
||||
echo "st-1.9t for arm is ok.";
|
||||
echo "The st-1.9t for arm is ok.";
|
||||
else
|
||||
# TODO: FIXME: patch the bug.
|
||||
# patch st for arm, @see: https://github.com/ossrs/srs/wiki/v1_CN_SrsLinuxArm#st-arm-bug-fix
|
||||
echo "build st-1.9t for arm";
|
||||
echo "Building st-1.9t for arm.";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && chmod +w * &&
|
||||
|
@ -429,10 +429,10 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
fi
|
||||
else
|
||||
if [[ ! -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
|
||||
echo "st-1.9t is ok.";
|
||||
echo "The st-1.9t is ok.";
|
||||
else
|
||||
# patch st for arm, @see: https://github.com/ossrs/srs/wiki/v1_CN_SrsLinuxArm#st-arm-bug-fix
|
||||
echo "build st-1.9t";
|
||||
echo "Building st-1.9t.";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && chmod +w * &&
|
||||
|
@ -446,8 +446,8 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
fi
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build st-1.9 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "build st-1.9 static lib failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build st-1.9 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "Build st-1.9 static lib failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -455,7 +455,7 @@ fi
|
|||
#####################################################################################
|
||||
# check the cross build flag file, if flag changed, need to rebuild the st.
|
||||
if [ $SRS_HTTP_CORE = YES ]; then
|
||||
echo "http-parser is copied into srs_http_stack.*pp"
|
||||
echo "The http-parser is copied into srs_http_stack.*pp"
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -464,10 +464,8 @@ fi
|
|||
function write_nginx_html5()
|
||||
{
|
||||
cat<<END > ${html_file}
|
||||
<video width="640" height="360"
|
||||
autoplay controls autobuffer
|
||||
src="${hls_stream}"
|
||||
type="application/vnd.apple.mpegurl">
|
||||
<video "autoplay" "controls" "autobuffer" type="application/vnd.apple.mpegurl"
|
||||
src="${hls_stream}">
|
||||
</video>
|
||||
END
|
||||
}
|
||||
|
@ -479,9 +477,9 @@ fi
|
|||
__SRS_BUILD_NGINX=NO; if [ $SRS_CROSS_BUILD = NO ]; then if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi fi
|
||||
if [ $__SRS_BUILD_NGINX = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then
|
||||
echo "nginx-1.5.7 is ok.";
|
||||
echo "The nginx-1.5.7 is ok.";
|
||||
else
|
||||
echo "build nginx-1.5.7";
|
||||
echo "Building nginx-1.5.7";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/nginx-1.5.7 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/nginx-1.5.7.zip && cd nginx-1.5.7 &&
|
||||
|
@ -490,8 +488,8 @@ if [ $__SRS_BUILD_NGINX = YES ]; then
|
|||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build nginx-1.5.7 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "build nginx-1.5.7 failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build nginx-1.5.7 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "Build nginx-1.5.7 failed."; exit -1; fi
|
||||
|
||||
# use current user to config nginx,
|
||||
# srs will write ts/m3u8 file use current user,
|
||||
|
@ -526,7 +524,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
ln -sf `pwd`/research/api-server/static-dir/favicon.ico ${SRS_OBJS}/nginx/html/favicon.ico
|
||||
|
||||
# nginx.html to detect whether nginx is alive
|
||||
echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html
|
||||
echo "Nginx is ok." > ${SRS_OBJS}/nginx/html/nginx.html
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -537,7 +535,7 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then
|
|||
echo "CherryPy-3.2.4 is ok.";
|
||||
else
|
||||
require_sudoer "install CherryPy-3.2.4"
|
||||
echo "install CherryPy-3.2.4";
|
||||
echo "Installing CherryPy-3.2.4";
|
||||
(
|
||||
sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/CherryPy-3.2.4.zip && cd CherryPy-3.2.4 &&
|
||||
|
@ -550,7 +548,7 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then
|
|||
fi
|
||||
|
||||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
echo "link players to cherrypy static-dir"
|
||||
echo "Link players to cherrypy static-dir"
|
||||
rm -rf research/api-server/static-dir/players &&
|
||||
ln -sf `pwd`/research/players research/api-server/static-dir/players &&
|
||||
rm -f research/api-server/static-dir/crossdomain.xml &&
|
||||
|
@ -561,7 +559,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
rm -rf research/api-server/static-dir/forward &&
|
||||
mkdir -p `pwd`/${SRS_OBJS}/nginx/html/forward &&
|
||||
ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forward
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "[warn] link players to cherrypy static-dir failed"; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Warning: Ignore error to link players to cherrypy static-dir."; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -600,15 +598,15 @@ OPENSSL_HOTFIX="-DOPENSSL_NO_HEARTBEATS"
|
|||
# upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.
|
||||
if [ $SRS_SSL = YES ]; then
|
||||
if [ $SRS_USE_SYS_SSL = YES ]; then
|
||||
echo "warning: donot compile ssl, use system ssl"
|
||||
echo "Warning: Use system libssl, without compiling openssl."
|
||||
else
|
||||
# check the cross build flag file, if flag changed, need to rebuild the st.
|
||||
if [ $SRS_CROSS_BUILD = YES ]; then
|
||||
# ok, arm specified, if the flag filed does not exists, need to rebuild.
|
||||
if [[ -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
|
||||
echo "openssl-1.0.1f for arm is ok.";
|
||||
echo "The openssl-1.0.1f for arm is ok.";
|
||||
else
|
||||
echo "build openssl-1.0.1f for arm";
|
||||
echo "Building openssl-1.0.1f for ARM.";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
|
||||
|
@ -623,9 +621,9 @@ if [ $SRS_SSL = YES ]; then
|
|||
else
|
||||
# cross build not specified, if exists flag, need to rebuild for no-arm platform.
|
||||
if [[ ! -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
|
||||
echo "openssl-1.0.1f is ok.";
|
||||
echo "Openssl-1.0.1f is ok.";
|
||||
else
|
||||
echo "build openssl-1.0.1f";
|
||||
echo "Building openssl-1.0.1f.";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
|
||||
|
@ -637,8 +635,8 @@ if [ $SRS_SSL = YES ]; then
|
|||
fi
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "build openssl-1.0.1f failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "Build openssl-1.0.1f failed."; exit -1; fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -647,9 +645,9 @@ fi
|
|||
#####################################################################################
|
||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then
|
||||
echo "ffmpeg-2.1 is ok.";
|
||||
echo "The ffmpeg-2.1 is ok.";
|
||||
else
|
||||
echo "build ffmpeg-2.1";
|
||||
echo "Building ffmpeg-2.1.";
|
||||
(
|
||||
cd ${SRS_OBJS} && pwd_dir=`pwd` &&
|
||||
rm -rf ffmepg.src && mkdir -p ffmpeg.src && cd ffmpeg.src &&
|
||||
|
@ -658,8 +656,8 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then
|
|||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-2.1 failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build ffmpeg-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "Build ffmpeg-2.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -670,10 +668,10 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
mkdir -p ${SRS_OBJS}/research
|
||||
|
||||
(cd ${SRS_WORKDIR}/research/hls && make ${SRS_JOBS} && mv ts_info ../../${SRS_OBJS_DIR}/research)
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build research/hls failed, ret=$ret"; exit $ret; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build research/hls failed, ret=$ret"; exit $ret; fi
|
||||
|
||||
(cd research/ffempty && make ${SRS_JOBS} && mv ffempty ../../${SRS_OBJS_DIR}/research)
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build research/ffempty failed, ret=$ret"; exit $ret; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build research/ffempty failed, ret=$ret"; exit $ret; fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -682,7 +680,7 @@ if [ $SRS_LIBRTMP = YES ]; then
|
|||
|
||||
# librtmp
|
||||
(cd ${SRS_WORKDIR}/research/librtmp && mkdir -p objs && ln -sf `pwd`/objs ../../${SRS_OBJS_DIR}/research/librtmp)
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "link research/librtmp failed, ret=$ret"; exit $ret; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Link research/librtmp failed, ret=$ret"; exit $ret; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -690,9 +688,9 @@ fi
|
|||
#####################################################################################
|
||||
if [ $SRS_UTEST = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/gtest/include/gtest/gtest.h ]]; then
|
||||
echo "gtest-1.6.0 is ok.";
|
||||
echo "The gtest-1.6.0 is ok.";
|
||||
else
|
||||
echo "build gtest-1.6.0";
|
||||
echo "Build gtest-1.6.0";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/gtest-1.6.0 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/gtest-1.6.0.zip &&
|
||||
|
@ -700,8 +698,8 @@ if [ $SRS_UTEST = YES ]; then
|
|||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gtest-1.6.0 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gtest/include/gtest/gtest.h ]; then echo "build gtest-1.6.0 failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build gtest-1.6.0 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gtest/include/gtest/gtest.h ]; then echo "Build gtest-1.6.0 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
@ -709,9 +707,9 @@ fi
|
|||
#####################################################################################
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/gperf/bin/pprof ]]; then
|
||||
echo "gperftools-2.1 is ok.";
|
||||
echo "The gperftools-2.1 is ok.";
|
||||
else
|
||||
echo "build gperftools-2.1";
|
||||
echo "Build gperftools-2.1";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/gperftools-2.1 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/gperftools-2.1.zip && cd gperftools-2.1 &&
|
||||
|
@ -721,8 +719,8 @@ if [ $SRS_GPERF = YES ]; then
|
|||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gperftools-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "build gperftools-2.1 failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build gperftools-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "Build gperftools-2.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
|
|
@ -14,7 +14,7 @@ FILE=${SRS_OBJS}/${SRS_MAKEFILE}
|
|||
LIB_TARGET="${SRS_OBJS_DIR}/${LIB_NAME}"
|
||||
LIB_TAGET_STATIC="${LIB_TARGET}.a"
|
||||
|
||||
echo "generate lib ${LIB_NAME} depends..."
|
||||
echo "Generating lib ${LIB_NAME} depends."
|
||||
|
||||
echo "" >> ${FILE}
|
||||
echo "# archive library ${LIB_TAGET_STATIC}" >> ${FILE}
|
||||
|
@ -60,4 +60,4 @@ echo "" >> ${FILE}
|
|||
echo " @mkdir -p ${SRS_OBJS_DIR}/include" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
|
||||
echo " @mkdir -p ${SRS_OBJS_DIR}/lib" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
|
||||
|
||||
echo -n "generate lib ${LIB_NAME} ok"; echo '!';
|
||||
echo -n "Generate lib ${LIB_NAME} ok"; echo '!';
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
FILE=${SRS_OBJS}/${SRS_MAKEFILE}
|
||||
echo "#####################################################################################" >> ${FILE}
|
||||
echo "# the ${MODULE_ID} module." >> ${FILE}
|
||||
echo "# The module ${MODULE_ID}." >> ${FILE}
|
||||
echo "#####################################################################################" >> ${FILE}
|
||||
echo >> ${FILE}
|
||||
|
||||
|
@ -88,4 +88,4 @@ echo "" >> ${FILE}
|
|||
# parent Makefile, to create module output dir before compile it.
|
||||
echo " @mkdir -p ${SRS_OBJS_DIR}/${MODULE_DIR}" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
|
||||
|
||||
echo -n "generate module ${MODULE_ID} ok"; echo '!';
|
||||
echo -n "Generate modules ${MODULE_ID} ok"; echo '!';
|
||||
|
|
|
@ -892,7 +892,8 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
|
|||
if [ $SRS_LOG_VERBOSE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose"; fi
|
||||
if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi
|
||||
if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi
|
||||
echo "regenerate config: ${SRS_AUTO_CONFIGURE}"
|
||||
echo "User config: $SRS_AUTO_USER_CONFIGURE"
|
||||
echo "Detail config: ${SRS_AUTO_CONFIGURE}"
|
||||
}
|
||||
regenerate_options
|
||||
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# colorful summary
|
||||
SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi
|
||||
SrsDvrSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_DVR = YES ]; then SrsDvrSummaryColor="\${GREEN}"; fi
|
||||
SrsNginxSummaryColor="\${GREEN}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi
|
||||
SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi
|
||||
SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG_TOOL = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
|
||||
SrsTranscodeSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi
|
||||
SrsIngestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_INGEST = YES ]; then SrsIngestSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpServerSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpApiSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
|
||||
SrsStreamCasterSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_STREAM_CASTER = YES ]; then SrsStreamCasterSummaryColor="\${GREEN}"; fi
|
||||
SrsKafkaSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_KAFKA = YES ]; then SrsKafkaSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSSLSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi
|
||||
SrsResearchSummaryColor="\${GREEN}{disabled} "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\${GREEN}"; fi
|
||||
SrsUtestSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\${GREEN}"; fi
|
||||
SrsGperfSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\${GREEN}"; fi
|
||||
SrsGperfMCSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_MC = YES ]; then SrsGperfMCSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfMDSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_MD = YES ]; then SrsGperfMDSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfMPSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_MP = YES ]; then SrsGperfMPSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfCPSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPERF_CP = YES ]; then SrsGperfCPSummaryColor="\${YELLOW}"; fi
|
||||
SrsGprofSummaryColor="\${GREEN}{disabled} "; if [ $SRS_GPROF = YES ]; then SrsGprofSummaryColor="\${YELLOW}"; fi
|
||||
SrsHlsSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi
|
||||
SrsDvrSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_DVR = YES ]; then SrsDvrSummaryColor="\${GREEN}"; fi
|
||||
SrsNginxSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi
|
||||
SrsSslSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi
|
||||
SrsFfmpegSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_FFMPEG_TOOL = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
|
||||
SrsTranscodeSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_TRANSCODE = YES ]; then SrsTranscodeSummaryColor="\${GREEN}"; fi
|
||||
SrsIngestSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_INGEST = YES ]; then SrsIngestSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpCallbackSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpServerSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_HTTP_SERVER = YES ]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
|
||||
SrsHttpApiSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_HTTP_API = YES ]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
|
||||
SrsStreamCasterSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_STREAM_CASTER = YES ]; then SrsStreamCasterSummaryColor="\${GREEN}"; fi
|
||||
SrsKafkaSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_KAFKA = YES ]; then SrsKafkaSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\${GREEN}"; fi
|
||||
SrsLibrtmpSSLSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\${GREEN}"; fi fi
|
||||
SrsResearchSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\${GREEN}"; fi
|
||||
SrsUtestSummaryColor="\${YELLOW}(Disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\${GREEN}"; fi
|
||||
SrsGperfSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\${GREEN}"; fi
|
||||
SrsGperfMCSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPERF_MC = YES ]; then SrsGperfMCSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfMDSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPERF_MD = YES ]; then SrsGperfMDSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfMPSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPERF_MP = YES ]; then SrsGperfMPSummaryColor="\${YELLOW}"; fi
|
||||
SrsGperfCPSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPERF_CP = YES ]; then SrsGperfCPSummaryColor="\${YELLOW}"; fi
|
||||
SrsGprofSummaryColor="\${GREEN}(Disabled) "; if [ $SRS_GPROF = YES ]; then SrsGprofSummaryColor="\${YELLOW}"; fi
|
||||
|
||||
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
||||
cat <<END > ${SRS_OBJS}/${SRS_BUILD_SUMMARY}
|
||||
|
@ -35,81 +35,26 @@ GREEN="\\${GREEN}"
|
|||
YELLOW="\\${YELLOW}"
|
||||
BLACK="\\${BLACK}"
|
||||
|
||||
echo -e "\${GREEN}build summary:\${BLACK}"
|
||||
echo -e "\${GREEN}The build summary:\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsGperfSummaryColor}gperf @see: https://github.com/ossrs/srs/wiki/v1_CN_GPERF\${BLACK}"
|
||||
echo -e " | ${SrsGperfMDSummaryColor}gmd @see: http://blog.csdn.net/win_lin/article/details/50461709\${BLACK}"
|
||||
echo -e " | ${SrsGperfMDSummaryColor}gmd: gperf memory defense, or memory corrupt detect\${BLACK}"
|
||||
echo -e " | ${SrsGperfMDSummaryColor}env TCMALLOC_PAGE_FENCE=1 ./objs/srs -c conf/console.conf\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}gmc @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check, or memory leak detect\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/console.conf 2>gmc.log # start gmc\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}cat gmc.log # to analysis memory leak\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}gmp @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile, similar to gcp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}rm -f gperf.srs.gmp*; ./objs/srs -c conf/console.conf # start gmp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gmp* # to analysis memory profile\${BLACK}"
|
||||
echo -e " | ${SrsGperfCPSummaryColor}gcp @see: http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html\${BLACK}"
|
||||
echo -e " | ${SrsGperfCPSummaryColor}gcp: gperf cpu profile\${BLACK}"
|
||||
echo -e " | ${SrsGperfCPSummaryColor}rm -f gperf.srs.gcp*; ./objs/srs -c conf/console.conf # start gcp\${BLACK}"
|
||||
echo -e " | ${SrsGperfCPSummaryColor}killall -2 srs # or CTRL+C to stop gcp\${BLACK}"
|
||||
echo -e " | ${SrsGperfCPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gcp* # to analysis cpu profile\${BLACK}"
|
||||
echo -e " \${GREEN}For SRS benchmark, recomment the following tools:\${BLACK}"
|
||||
echo -e " \${GREEN} About gperf, gprof and valgrind, please read http://blog.csdn.net/win_lin/article/details/53503869\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsGprofSummaryColor}gprof @see: https://github.com/ossrs/srs/wiki/v1_CN_GPROF\${BLACK}"
|
||||
echo -e " |${SrsGprofSummaryColor}gprof: GNU profile tool, @see: http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html\${BLACK}"
|
||||
echo -e " | ${SrsGprofSummaryColor}rm -f gmon.out; ./objs/srs -c conf/console.conf # start gprof\${BLACK}"
|
||||
echo -e " | ${SrsGprofSummaryColor}killall -2 srs # or CTRL+C to stop gprof\${BLACK}"
|
||||
echo -e " | ${SrsGprofSummaryColor}gprof -b ./objs/srs gmon.out > gprof.srs.log && rm -f gmon.out # gprof report to gprof.srs.log\${BLACK}"
|
||||
echo -e " |\${GREEN}The main server usage: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}"
|
||||
echo -e " | ${SrsHlsSummaryColor}About HLS, please read https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS\${BLACK}"
|
||||
echo -e " | ${SrsDvrSummaryColor}About DVR, please read https://github.com/ossrs/srs/wiki/v2_CN_DVR\${BLACK}"
|
||||
echo -e " | ${SrsNginxSummaryColor}About NGINX, please read https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS\${BLACK}"
|
||||
echo -e " | ${SrsSslSummaryColor}About SSL, please read https://github.com/ossrs/srs/wiki/v1_CN_RTMPHandshake\${BLACK}"
|
||||
echo -e " | ${SrsFfmpegSummaryColor}About FFMPEG, please read https://github.com/ossrs/srs/wiki/v1_CN_FFMPEG\${BLACK}"
|
||||
echo -e " | ${SrsTranscodeSummaryColor}About transcoding, please read https://github.com/ossrs/srs/wiki/v1_CN_FFMPEG\${BLACK}"
|
||||
echo -e " | ${SrsIngestSummaryColor}About ingester, please read https://github.com/ossrs/srs/wiki/v1_CN_Ingest\${BLACK}"
|
||||
echo -e " | ${SrsHttpCallbackSummaryColor}About http-callback, please read https://github.com/ossrs/srs/wiki/v2_CN_HTTPCallback\${BLACK}"
|
||||
echo -e " | ${SrsHttpServerSummaryColor}Aoubt embeded http-server, please read https://github.com/ossrs/srs/wiki/v2_CN_HTTPServer\${BLACK}"
|
||||
echo -e " | ${SrsHttpApiSummaryColor}About http-api, please read https://github.com/ossrs/srs/wiki/v2_CN_HTTPApi\${BLACK}"
|
||||
echo -e " | ${SrsStreamCasterSummaryColor}About stream-caster, please read https://github.com/ossrs/srs/wiki/v2_CN_Streamer\${BLACK}"
|
||||
echo -e " | ${SrsKafkaSummaryColor}About kafka, please read https://github.com/ossrs/srs/wiki/v3_CN_Kafka\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsUtestSummaryColor}utest: ./objs/srs_utest, the utest for srs\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsLibrtmpSummaryColor}librtmp @see: https://github.com/ossrs/srs/wiki/v1_CN_SrsLibrtmp\${BLACK}"
|
||||
echo -e " |${SrsLibrtmpSummaryColor}librtmp: ./objs/include, ./objs/lib, the srs-librtmp library\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}simple handshake: publish/play stream with simple handshake to server\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSSLSummaryColor}complex handshake: it's not required for client, recommend disable it\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp, the srs-librtmp client sample\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp/objs/srs_ingest_flv\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp/objs/srs_ingest_rtmp\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp/objs/srs_detect_rtmp\${BLACK}"
|
||||
echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp/objs/srs_bandwidth_check\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsResearchSummaryColor}research: ./objs/research, api server, players, ts info, librtmp.\${BLACK}"
|
||||
echo -e " | ${SrsResearchSummaryColor} @see https://github.com/ossrs/srs/wiki/v2_CN_SrsLibrtmp#srs-librtmp-examples\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |\${GREEN}tools: important tool, others @see https://github.com/ossrs/srs/wiki/v2_CN_SrsLibrtmp#srs-librtmp-examples\${BLACK}"
|
||||
echo -e " | \${GREEN}./objs/srs_ingest_hls -i http://ossrs.net/live/livestream.m3u8 -y rtmp://127.0.0.1/live/livestream\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |\${GREEN}server: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}"
|
||||
echo -e " | ${SrsHlsSummaryColor}hls @see: https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS\${BLACK}"
|
||||
echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts from rtmp stream\${BLACK}"
|
||||
echo -e " | ${SrsDvrSummaryColor}dvr @see: https://github.com/ossrs/srs/wiki/v2_CN_DVR\${BLACK}"
|
||||
echo -e " | ${SrsDvrSummaryColor}dvr: record RTMP stream to flv files.\${BLACK}"
|
||||
echo -e " | ${SrsNginxSummaryColor}nginx @see: https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS\${BLACK}"
|
||||
echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\${BLACK}"
|
||||
echo -e " | ${SrsNginxSummaryColor}nginx: sudo ./objs/nginx/sbin/nginx\${BLACK}"
|
||||
echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/ossrs/srs/wiki/v1_CN_RTMPHandshake\${BLACK}"
|
||||
echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}"
|
||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/ossrs/srs/wiki/v1_CN_FFMPEG\${BLACK}"
|
||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: transcode, mux, ingest tool\${BLACK}"
|
||||
echo -e " | ${SrsFfmpegSummaryColor}ffmpeg: ./objs/ffmpeg/bin/ffmpeg\${BLACK}"
|
||||
echo -e " | ${SrsTranscodeSummaryColor}transcode @see: https://github.com/ossrs/srs/wiki/v1_CN_FFMPEG\${BLACK}"
|
||||
echo -e " | ${SrsTranscodeSummaryColor}transcode: support transcoding RTMP stream\${BLACK}"
|
||||
echo -e " | ${SrsIngestSummaryColor}ingest @see: https://github.com/ossrs/srs/wiki/v1_CN_Ingest\${BLACK}"
|
||||
echo -e " | ${SrsIngestSummaryColor}ingest: support ingest file/stream/device then push to SRS by RTMP stream\${BLACK}"
|
||||
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback @see: https://github.com/ossrs/srs/wiki/v2_CN_HTTPCallback\${BLACK}"
|
||||
echo -e " | ${SrsHttpCallbackSummaryColor}http-callback: support http callback for authentication and event injection\${BLACK}"
|
||||
echo -e " | ${SrsHttpServerSummaryColor}http-server @see: https://github.com/ossrs/srs/wiki/v2_CN_HTTPServer\${BLACK}"
|
||||
echo -e " | ${SrsHttpServerSummaryColor}http-server: support http server to delivery http stream\${BLACK}"
|
||||
echo -e " | ${SrsHttpApiSummaryColor}http-api @see: https://github.com/ossrs/srs/wiki/v2_CN_HTTPApi\${BLACK}"
|
||||
echo -e " | ${SrsHttpApiSummaryColor}http-api: support http api to manage server\${BLACK}"
|
||||
echo -e " | ${SrsStreamCasterSummaryColor}stream-caster @see: https://github.com/ossrs/srs/wiki/v2_CN_Streamer\${BLACK}"
|
||||
echo -e " | ${SrsStreamCasterSummaryColor}stream-caster: start server to cast stream over other protocols.\${BLACK}"
|
||||
echo -e " | ${SrsKafkaSummaryColor}kafka @see: https://github.com/ossrs/srs/wiki/v3_CN_Kafka\${BLACK}"
|
||||
echo -e " | ${SrsKafkaSummaryColor}kafka: start srs kafka producer to report to kafka.\${BLACK}"
|
||||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e "\${GREEN}binaries @see: https://github.com/ossrs/srs/wiki/v2_CN_Build\${BLACK}"
|
||||
echo -e "\${GREEN}binaries, please read https://github.com/ossrs/srs/wiki/v2_CN_Build\${BLACK}"
|
||||
|
||||
echo "You can:"
|
||||
echo " ./objs/srs -c conf/srs.conf"
|
||||
|
|
|
@ -187,4 +187,4 @@ END
|
|||
# parent Makefile, to create module output dir before compile it.
|
||||
echo " @mkdir -p ${SRS_OBJS_DIR}/utest" >> ${SRS_WORKDIR}/${SRS_MAKEFILE}
|
||||
|
||||
echo -n "generate utest ok"; echo '!';
|
||||
echo -n "Generate utest ok"; echo '!';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue