mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3039
RowenStipe (4): Auto ver finding for lib sodium & qt + attempt to make brew less noisy Make update silent for travis Make Brew quitter: Round 3 Applied ductile to home-brew's mouth on update
This commit is contained in:
commit
4ce3bf1290
|
@ -30,9 +30,12 @@ else
|
||||||
QTOX_DIR="${MAIN_DIR}/qTox"
|
QTOX_DIR="${MAIN_DIR}/qTox"
|
||||||
fi
|
fi
|
||||||
QT_DIR="/usr/local/Cellar/qt5" # Folder name of QT install
|
QT_DIR="/usr/local/Cellar/qt5" # Folder name of QT install
|
||||||
VER="${QT_DIR}/5.6.0" # Potential future proffing for version testing
|
# Figure out latest version
|
||||||
QMAKE="${VER}/bin/qmake" # Don't change
|
QT_VER=($(ls ${QT_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
|
||||||
MACDEPLOYQT="${VER}/bin/macdeployqt" # Don't change
|
QT_DIR_VER="${QT_DIR}/${QT_VER[1]}"
|
||||||
|
|
||||||
|
QMAKE="${QT_DIR_VER}/bin/qmake" # Don't change
|
||||||
|
MACDEPLOYQT="${QT_DIR_VER}/bin/macdeployqt" # Don't change
|
||||||
|
|
||||||
TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location
|
TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location
|
||||||
|
|
||||||
|
@ -43,8 +46,7 @@ if [[ ! -e "${LIB_INSTALL_PREFIX}" ]]; then
|
||||||
mkdir -p "${LIB_INSTALL_PREFIX}"
|
mkdir -p "${LIB_INSTALL_PREFIX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build" # Change if needed
|
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build"
|
||||||
|
|
||||||
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed"
|
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed"
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,20 +60,17 @@ function build_toxcore() {
|
||||||
cd $TOXCORE_DIR
|
cd $TOXCORE_DIR
|
||||||
echo "Now working in: ${PWD}"
|
echo "Now working in: ${PWD}"
|
||||||
|
|
||||||
#Check if libsodium is correct version
|
local LS_DIR="/usr/local/Cellar/libsodium/"
|
||||||
if [[ -e /usr/local/opt/libsodium/lib/libsodium.18.dylib ]]; then
|
#Figure out latest version
|
||||||
fcho " Beginnning Toxcore compile "
|
local LS_VER=($(ls ${LS_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
|
||||||
else
|
local LS_DIR_VER="${LS_DIR}/${LS_VER[1]}"
|
||||||
echo "Error: libsodium.18.dylib not found! Unable to build!"
|
|
||||||
echo "Please make sure your Homebrew packages are up to date before retrying."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
autoreconf -if
|
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="${LS_DIR_VER}/include/" --with-libsodium-libs="${LS_DIR_VER}/lib/" --prefix="${LIB_INSTALL_PREFIX}"
|
||||||
|
|
||||||
make clean &> /dev/null
|
make clean &> /dev/null
|
||||||
fcho "Compiling toxcore."
|
fcho "Compiling toxcore."
|
||||||
|
@ -97,7 +96,11 @@ function install() {
|
||||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
fi
|
fi
|
||||||
fcho "Updating brew formulas ..."
|
fcho "Updating brew formulas ..."
|
||||||
brew update
|
if [[ $TRAVIS = true ]]; then
|
||||||
|
brew update > /dev/null
|
||||||
|
else
|
||||||
|
brew update
|
||||||
|
fi
|
||||||
fcho "Getting home brew formulas ..."
|
fcho "Getting home brew formulas ..."
|
||||||
sleep 3
|
sleep 3
|
||||||
if [[ $TRAVIS != true ]]; then #travis check
|
if [[ $TRAVIS != true ]]; then #travis check
|
||||||
|
@ -105,6 +108,9 @@ function install() {
|
||||||
fi
|
fi
|
||||||
brew install git ffmpeg qrencode autoconf check qt5 libvpx opus sqlcipher libsodium
|
brew install git ffmpeg qrencode autoconf check qt5 libvpx opus sqlcipher libsodium
|
||||||
|
|
||||||
|
QT_VER=($(ls ${QT_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
|
||||||
|
QT_DIR_VER="${QT_DIR}/${QT_VER[1]}"
|
||||||
|
|
||||||
fcho "Installing x-code Command line tools ..."
|
fcho "Installing x-code Command line tools ..."
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
|
|
||||||
|
@ -221,6 +227,24 @@ function deploy() {
|
||||||
$MACDEPLOYQT qTox.app
|
$MACDEPLOYQT qTox.app
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bootstrap() {
|
||||||
|
fcho "------------------------------"
|
||||||
|
fcho "starting bootstrap process ..."
|
||||||
|
|
||||||
|
# filter_audio
|
||||||
|
cd $FA_DIR
|
||||||
|
fcho "Installing filter_audio."
|
||||||
|
make install PREFIX="${LIB_INSTALL_PREFIX}"
|
||||||
|
|
||||||
|
#Toxcore
|
||||||
|
build_toxcore
|
||||||
|
|
||||||
|
#Boot Strap
|
||||||
|
fcho "Running: sudo ${QTOX_DIR_VER}/bootstrap-osx.sh"
|
||||||
|
cd $QTOX_DIR
|
||||||
|
sudo ./bootstrap-osx.sh
|
||||||
|
}
|
||||||
|
|
||||||
# The commands
|
# The commands
|
||||||
if [[ "$1" == "-i" ]]; then
|
if [[ "$1" == "-i" ]]; then
|
||||||
install
|
install
|
||||||
|
@ -237,6 +261,11 @@ if [[ "$1" == "-b" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$1" == "-boot" ]]; then
|
||||||
|
bootstrap
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "-d" ]]; then
|
if [[ "$1" == "-d" ]]; then
|
||||||
deploy
|
deploy
|
||||||
exit
|
exit
|
||||||
|
@ -256,6 +285,7 @@ if [[ "$1" == "-h" ]]; then
|
||||||
echo "-i -- A slightly automated process for getting an OSX machine ready to build Toxcore and qTox."
|
echo "-i -- A slightly automated process for getting an OSX machine ready to build Toxcore and qTox."
|
||||||
echo "-u -- Check for updates and build Toxcore from git & update qTox from git."
|
echo "-u -- Check for updates and build Toxcore from git & update qTox from git."
|
||||||
echo "-b -- Builds qTox in: ${BUILD_DIR}"
|
echo "-b -- Builds qTox in: ${BUILD_DIR}"
|
||||||
|
echo "-boot -- Performs bootstrap steps."
|
||||||
echo "-d -- Makes a distributable qTox.app file in: ${DEPLOY_DIR}"
|
echo "-d -- Makes a distributable qTox.app file in: ${DEPLOY_DIR}"
|
||||||
echo "-ubd -- Does -u, -b, and -d sequentially"
|
echo "-ubd -- Does -u, -b, and -d sequentially"
|
||||||
fcho "Issues with Toxcore or qTox should be reported to their respective repos: https://github.com/irungentoo/toxcore | https://github.com/tux3/qTox"
|
fcho "Issues with Toxcore or qTox should be reported to their respective repos: https://github.com/irungentoo/toxcore | https://github.com/tux3/qTox"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user