mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
osx build script: fix building on travis
copy libs/headers required by qTox into `libs/`
This commit is contained in:
parent
0abeaa4b62
commit
3723f4b465
|
@ -21,18 +21,14 @@ echo Creating directories…
|
||||||
mkdir -p libs/lib
|
mkdir -p libs/lib
|
||||||
mkdir -p libs/include
|
mkdir -p libs/include
|
||||||
echo Copying libraries…
|
echo Copying libraries…
|
||||||
cp /usr/local/lib/libtox* libs/lib
|
|
||||||
cp /usr/local/lib/libsodium* libs/lib
|
cp /usr/local/lib/libsodium* libs/lib
|
||||||
cp /usr/local/lib/libvpx* libs/lib
|
cp /usr/local/lib/libvpx* libs/lib
|
||||||
cp /usr/local/lib/libopus* libs/lib
|
cp /usr/local/lib/libopus* libs/lib
|
||||||
cp /usr/local/lib/libav* libs/lib
|
cp /usr/local/lib/libav* libs/lib
|
||||||
cp /usr/local/lib/libswscale* libs/lib
|
cp /usr/local/lib/libswscale* libs/lib
|
||||||
cp /usr/local/lib/libqrencode* libs/lib
|
cp /usr/local/lib/libqrencode* libs/lib
|
||||||
cp /usr/local/lib/libfilteraudio* libs/lib
|
|
||||||
cp /usr/local/lib/libsqlcipher* libs/lib
|
cp /usr/local/lib/libsqlcipher* libs/lib
|
||||||
echo Copying include files...
|
echo Copying include files...
|
||||||
cp /usr/local/include/filter_audio* libs/include
|
|
||||||
cp -r /usr/local/include/tox* libs/include
|
|
||||||
cp -r /usr/local/include/vpx* libs/include
|
cp -r /usr/local/include/vpx* libs/include
|
||||||
cp -r /usr/local/include/sodium* libs/include
|
cp -r /usr/local/include/sodium* libs/include
|
||||||
cp -r /usr/local/include/qrencode* libs/include
|
cp -r /usr/local/include/qrencode* libs/include
|
||||||
|
|
|
@ -43,6 +43,10 @@ TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location
|
||||||
FA_DIR="${MAIN_DIR}/filter_audio"
|
FA_DIR="${MAIN_DIR}/filter_audio"
|
||||||
LIB_INSTALL_PREFIX="${QTOX_DIR}/libs"
|
LIB_INSTALL_PREFIX="${QTOX_DIR}/libs"
|
||||||
|
|
||||||
|
if [[ ! -e "${LIB_INSTALL_PREFIX}" ]]; then
|
||||||
|
mkdir -p "${LIB_INSTALL_PREFIX}"
|
||||||
|
fi
|
||||||
|
|
||||||
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build" # Change if needed
|
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build" # Change if needed
|
||||||
|
|
||||||
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed"
|
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed"
|
||||||
|
@ -68,16 +72,16 @@ function build-toxcore() {
|
||||||
fi
|
fi
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
autoreconf -i
|
autoreconf -if
|
||||||
|
|
||||||
#Make sure the correct version of libsodium is used
|
#Make sure the correct version of libsodium is used
|
||||||
./configure --with-libsodium-headers=/usr/local/Cellar/libsodium/1.0.8/include/ --with-libsodium-libs=/usr/local/Cellar/libsodium/1.0.8/lib/ --prefix="${LIB_INSTALL_PREFIX}"
|
./configure --with-libsodium-headers=/usr/local/Cellar/libsodium/1.0.8/include/ --with-libsodium-libs=/usr/local/Cellar/libsodium/1.0.8/lib/ --prefix="${LIB_INSTALL_PREFIX}"
|
||||||
|
|
||||||
sudo make clean
|
make clean &> /dev/null
|
||||||
make
|
fcho "Compiling toxcore."
|
||||||
echo "------------------------------"
|
make > /dev/null || exit 1
|
||||||
echo "Sudo required, please enter your password:"
|
fcho "Installing toxcore."
|
||||||
sudo make install
|
make install > /dev/null || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
|
@ -137,10 +141,7 @@ function install() {
|
||||||
git clone https://github.com/irungentoo/filter_audio.git
|
git clone https://github.com/irungentoo/filter_audio.git
|
||||||
cd $FA_DIR
|
cd $FA_DIR
|
||||||
fi
|
fi
|
||||||
if [ ! -e "$LIB_INSTALL_PREFIX" ]; then
|
fcho "Installing filter_audio."
|
||||||
mkdir "$LIB_INSTALL_PREFIX"
|
|
||||||
fi
|
|
||||||
fcho "Please enter your password to install Filter_Audio:"
|
|
||||||
make install PREFIX="${LIB_INSTALL_PREFIX}"
|
make install PREFIX="${LIB_INSTALL_PREFIX}"
|
||||||
# toxcore
|
# toxcore
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
|
@ -155,7 +156,9 @@ function install() {
|
||||||
fcho "You can simply use the -u command and say [Yes/n] when prompted"
|
fcho "You can simply use the -u command and say [Yes/n] when prompted"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$QTOX_DIR/bootstrap-osx.sh
|
# put required by qTox libs/headers in `libs/`
|
||||||
|
cd "${QTOX_DIR}"
|
||||||
|
./bootstrap-osx.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
@ -181,8 +184,7 @@ function update() {
|
||||||
read -r -p "Did qTox update from git? [y/N] " response
|
read -r -p "Did qTox update from git? [y/N] " response
|
||||||
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
fcho "Starting OSX bootstrap ..."
|
fcho "Starting OSX bootstrap ..."
|
||||||
fcho "Sudo required:"
|
./bootstrap-osx.sh
|
||||||
sudo bash ./bootstrap-osx.sh
|
|
||||||
else
|
else
|
||||||
fcho "Moving on!"
|
fcho "Moving on!"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user