From 6a2f0a3dc92ee7644e639330d4ceb92bbc067d47 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 29 Jun 2014 10:50:58 +0800 Subject: [PATCH] add configure preset --demo --- trunk/auto/options.sh | 43 ++++++++++++++++++++++++++++++++++++------ trunk/scripts/build.sh | 2 +- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index aa350dc0f..8a9d0b606 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -62,6 +62,8 @@ SRS_MIPS_UBUNTU12=NO SRS_DEV=NO # dev, open main server feature for dev, no bwtc/utest/research/librtmp SRS_FAST_DEV=NO +# demo, for the demo of srs, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/SampleDemo +SRS_DEMO=NO # raspberry-pi, open hls/ssl/static SRS_PI=NO # cubieboard, donot open ffmpeg/nginx. @@ -154,6 +156,7 @@ Presets: --disable-all disable all features, only support vp6 RTMP. --dev for dev, open all features, no nginx/gperf/gprof/arm. --fast-dev for dev fast compile, the RTMP server, without bwtc/librtmp/utest/research. + --demo for srs demo, @see: https://github.com/winlinvip/simple-rtmp-server/wiki/SampleDemo --full enable all features, no gperf/gprof/arm. Conflicts: @@ -236,6 +239,7 @@ function parse_user_option() { --cubie) SRS_CUBIE=YES ;; --dev) SRS_DEV=YES ;; --fast-dev) SRS_FAST_DEV=YES ;; + --demo) SRS_DEMO=YES ;; --fast) SRS_FAST=YES ;; --disable-all) SRS_DISABLE_ALL=YES ;; --pure-rtmp) SRS_PURE_RTMP=YES ;; @@ -287,12 +291,14 @@ function apply_user_presets() { if [ $SRS_ENABLE_ALL = NO ]; then if [ $SRS_DEV = NO ]; then if [ $SRS_FAST_DEV = NO ]; then - if [ $SRS_ARM_UBUNTU12 = NO ]; then - if [ $SRS_MIPS_UBUNTU12 = NO ]; then - if [ $SRS_PI = NO ]; then - if [ $SRS_CUBIE = NO ]; then - if [ $SRS_X86_X64 = NO ]; then - SRS_X86_X64=YES; opt="--x86-x64 $opt"; + if [ $SRS_DEMO = NO ]; then + if [ $SRS_ARM_UBUNTU12 = NO ]; then + if [ $SRS_MIPS_UBUNTU12 = NO ]; then + if [ $SRS_PI = NO ]; then + if [ $SRS_CUBIE = NO ]; then + if [ $SRS_X86_X64 = NO ]; then + SRS_X86_X64=YES; opt="--x86-x64 $opt"; + fi fi fi fi @@ -565,6 +571,31 @@ function apply_user_presets() { SRS_STATIC=NO fi + # for srs demo + if [ $SRS_DEMO = YES ]; then + SRS_HLS=YES + SRS_DVR=YES + SRS_NGINX=NO + SRS_SSL=YES + SRS_FFMPEG_TOOL=YES + SRS_TRANSCODE=YES + SRS_INGEST=YES + SRS_HTTP_PARSER=YES + SRS_HTTP_CALLBACK=YES + SRS_HTTP_SERVER=YES + SRS_HTTP_API=YES + SRS_LIBRTMP=YES + SRS_BWTC=YES + SRS_RESEARCH=NO + SRS_UTEST=YES + SRS_GPERF=NO + SRS_GPERF_MC=NO + SRS_GPERF_MP=NO + SRS_GPERF_CP=NO + SRS_GPROF=NO + SRS_STATIC=NO + fi + # if raspberry-pi specified, open ssl/hls/static features if [ $SRS_PI = YES ]; then SRS_HLS=YES diff --git a/trunk/scripts/build.sh b/trunk/scripts/build.sh index 52a788f0f..34701fc9a 100755 --- a/trunk/scripts/build.sh +++ b/trunk/scripts/build.sh @@ -6,7 +6,7 @@ if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; # nginx is not needed, we use cherrypy to delivery hls. # demo needs ffmpeg to transcode the live stream. echo "编译SRS" -./configure --x86-x64 --with-ffmpeg && make +./configure --demo && make ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi echo "编译SRS成功"