添加编译脚本

This commit is contained in:
xiongziliang 2017-05-11 22:55:29 +08:00
parent d619296fe5
commit 42c26e6201
3 changed files with 52 additions and 0 deletions

13
build_for_ios.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
path=`pwd`
wget https://raw.githubusercontent.com/xiongziliang/ZLToolKit/master/build_for_ios.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
cd ZLMediaKit
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/iOS.cmake -DIOS_PLATFORM=OS
make -j4

20
build_for_linux.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
path=`pwd`
wget https://github.com/xiongziliang/ZLToolKit/blob/master/build_for_linux.sh -o ./toolkit_build.sh
sudo chmod +x ./toolkit_build.sh
./toolkit_build.sh
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 build
cd build
cmake ..
make -j4
sudo make install

19
build_for_mac.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
path=`pwd`
wget https://raw.githubusercontent.com/xiongziliang/ZLToolKit/master/build_for_mac.sh -O toolkit_build.sh
sudo chmod +x ./toolkit_build.sh
./toolkit_build.sh
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 build
cd build
cmake .. -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/
make -j4
sudo make install