diff --git a/build_for_android.sh b/build_for_android.sh index d3306324..e669cfe8 100755 --- a/build_for_android.sh +++ b/build_for_android.sh @@ -1,16 +1,15 @@ #!/bin/bash path=`pwd` -wget https://raw.githubusercontent.com/xiongziliang/ZLToolKit/develop/build_for_android.sh -O toolkit_build.sh -sudo chmod +x ./toolkit_build.sh -./toolkit_build.sh -cd $path cd .. -git clone --depth=50 https://github.com/xiongziliang/ZLMediaKit.git +git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git +cd $path cd ZLMediaKit +git submodule init +git submodule update + mkdir -p android_build rm -rf ./build ln -s ./android_build build cd android_build cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_NDK=$ANDROID_NDK_ROOT -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi" -DANDROID_NATIVE_API_LEVEL=android-9 make -j4 -sudo make install diff --git a/build_for_ios.sh b/build_for_ios.sh index 7105bff5..3e58e8c9 100755 --- a/build_for_ios.sh +++ b/build_for_ios.sh @@ -1,4 +1,11 @@ #!/bin/bash +path=`pwd` +cd .. +git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git +cd $path +cd ZLMediaKit +git submodule init +git submodule update mkdir -p ios_build rm -rf ./build @@ -6,4 +13,3 @@ ln -s ./ios_build build cd ios_build cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/iOS.cmake -DIOS_PLATFORM=OS make -j4 -sudo make install diff --git a/build_for_linux.sh b/build_for_linux.sh index ad23f45f..0feb3f43 100755 --- a/build_for_linux.sh +++ b/build_for_linux.sh @@ -1,18 +1,22 @@ #!/bin/bash path=`pwd` -wget https://raw.githubusercontent.com/xiongziliang/ZLToolKit/develop/build_for_linux.sh -O ./toolkit_build.sh -sudo chmod +x ./toolkit_build.sh -./toolkit_build.sh +cd .. +git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git +cd $path +cd ZLMediaKit +git submodule init +git submodule update + +sudo apt-get install cmake +sudo apt-get install libmysqlclient-dev +sudo apt-get install libssl-dev sudo apt-get install libx264-dev sudo apt-get install libfaac-dev sudo apt-get install libmp4v2-dev #sudo apt-get install libsdl-dev #sudo apt-get install libavcodec-dev #sudo apt-get install libavutil-dev -cd $path -cd .. -git clone --depth=50 https://github.com/xiongziliang/ZLMediaKit.git -cd ZLMediaKit + mkdir -p linux_build rm -rf ./build ln -s ./linux_build build @@ -20,4 +24,3 @@ cd linux_build cmake .. make -j4 -sudo make install diff --git a/build_for_mac.sh b/build_for_mac.sh index d97c92e3..8f5e0003 100755 --- a/build_for_mac.sh +++ b/build_for_mac.sh @@ -1,21 +1,24 @@ #!/bin/bash path=`pwd` -wget https://raw.githubusercontent.com/xiongziliang/ZLToolKit/develop/build_for_mac.sh -O toolkit_build.sh -sudo chmod +x ./toolkit_build.sh -./toolkit_build.sh +cd .. +git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git +cd $path +cd ZLMediaKit +git submodule init +git submodule update + +brew install cmake +brew install mysql +brew install openssl brew install x264 brew install faac brew install mp4v2 brew install sdl brew install ffmpeg -cd $path -cd .. -git clone --depth=50 https://github.com/xiongziliang/ZLMediaKit.git -cd ZLMediaKit + mkdir -p mac_build rm -rf ./build ln -s ./mac_build build cd mac_build cmake .. -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/ make -j4 -sudo make install