Skip to content

Commit

Permalink
PLAT-5592: Updgrade Node to latest stable version (6.2.2) and modify …
Browse files Browse the repository at this point in the history
…name to LiveController
  • Loading branch information
Gad Yaari committed Jul 7, 2016
1 parent b529f13 commit 165b496
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
Binary file modified bin/linux/FormatConverter.node
Binary file not shown.
Binary file modified bin/linux/FormatConverter.node.debug
Binary file not shown.
40 changes: 26 additions & 14 deletions node_addons/FormatConverter/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# !/bin/bash

Release=${DEBUG:-1}
[ "$1" = "DEBUG" ] && build_conf=Debug || build_conf=Release

[ "$Release" != "" ] && echo "target config: release" || echo "target config: debug"
echo "build_conf = $build_conf"
[ "$build_conf" != "Debug" ] && echo "target config: release" || echo "target config: debug"

os_name=`uname`

Expand All @@ -16,7 +17,8 @@ function makeFFmpeg()

if [ ! -d "$ffmpegDir" ]
then
wget https://github.com/FFmpeg/FFmpeg/releases/download/n3.0/ffmpeg-3.0.tar.gz -O /var/tmp/ffmpeg-3.0.tar.gz
curl -OL https://github.com/FFmpeg/FFmpeg/releases/download/n3.0/ffmpeg-3.0.tar.gz
mv ./ffmpeg-3.0.tar.gz /var/tmp/ffmpeg-3.0.tar.gz
case $os_name in
'Linux')
devFFmpegDir=~/
Expand All @@ -40,10 +42,8 @@ function makeFFmpeg()



confCmd="./configure --disable-everything --disable-doc --enable-protocol=file \
--enable-demuxer=mpegts --enable-muxer=rtp_mpegts --enable-parser=h264 --enable-parser=aac \
--enable-muxer=mp4 --enable-zlib --enable-bsf=aac_adtstoasc --enable-decoder=aac --enable-decoder=h264 \
$debug_specifics"
confCmd="./configure --disable-everything --disable-doc --enable-protocol=file --enable-demuxer=mpegts --enable-muxer=rtp_mpegts --enable-parser=h264 --enable-parser=aac --enable-muxer=mp4 --enable-zlib --enable-bsf=aac_adtstoasc --enable-decoder=aac --enable-decoder=h264"
$debug_specifics

[ "$os_name" == "Linux" ] && confCmd="$confCmd --enable-pic"

Expand All @@ -53,14 +53,15 @@ function makeFFmpeg()

echo -e "actualCmd=\n<$actualCmd>"
echo -e "confCmd=\n<$confCmd>"

if [ "$actualCmd" != "$confCmd" ]
then
echo "configuring ffmpeg..."
eval "$confCmd"
else
echo "no need to run configure"
fi

echo $confCmd > $configFileName
echo "$confCmd" > $configFileName

make &> /dev/null

Expand All @@ -82,8 +83,6 @@ makeFFmpeg $path/build

cd $path



gyp_args=''

case $os_name in
Expand All @@ -100,6 +99,19 @@ npm install nan
echo "Start node-gyp configure"
node-gyp configure $gyp_args

gyp_debug=${Release:---debug}
echo "Start node-gyp build"
node-gyp build $gyp_debug -v
if [ "$build_conf" = "Debug" ]; then
gyp_debug="--debug"
debugExt=".debug"
fi
echo "Start node-gyp build. $gyp_debug"
node-gyp build $gyp_debug -v

case $os_name in
'Linux')
cp `pwd`/build/$build_conf/FormatConverter.so "`pwd`/../../bin/linux/FormatConverter.node$debugExt"
;;
'Darwin')
cp `pwd`/build/$build_conf/FormatConverter.dylib "`pwd`/../../bin/linux/FormatConverter.node$debugExt"
;;
*) ;;
esac

0 comments on commit 165b496

Please sign in to comment.