mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore: Fix Mac OS X build.
- Add /usr/local to the search paths for includes and libs. - Build toxcore before updating homebrew. Updating homebrew somehow breaks the toxcore build.
This commit is contained in:
parent
fca278f334
commit
07ac196326
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -13,3 +13,5 @@ build-*-Profile
|
||||||
build-*-Debug
|
build-*-Debug
|
||||||
.DS_Store
|
.DS_Store
|
||||||
doc/html/*
|
doc/html/*
|
||||||
|
/.qmake.stash
|
||||||
|
/qtox.app
|
||||||
|
|
|
@ -16,5 +16,6 @@ then
|
||||||
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i
|
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i
|
||||||
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b
|
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b
|
||||||
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -d
|
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -d
|
||||||
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -dmg
|
# Disabled due to error: hdiutil: create failed - Resource busy
|
||||||
|
#bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -dmg
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
|
|
||||||
# Use: ./qTox-Mac-Deployer-ULTIMATE.sh -h
|
# Use: ./qTox-Mac-Deployer-ULTIMATE.sh -h
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# Your home DIR really (Most of this happens in it) {DONT USE: ~ }
|
# Your home DIR really (Most of this happens in it) {DONT USE: ~ }
|
||||||
SUBGIT="" #Change this to define a 'sub' git folder e.g. "-Patch"
|
SUBGIT="" #Change this to define a 'sub' git folder e.g. "-Patch"
|
||||||
#Applys to $QTOX_DIR, $BUILD_DIR, and $DEPLOY_DIR folders for organization puropses
|
#Applys to $QTOX_DIR, $BUILD_DIR, and $DEPLOY_DIR folders for organization puropses
|
||||||
|
@ -61,19 +63,21 @@ function build_toxcore() {
|
||||||
echo "Starting Toxcore build and install"
|
echo "Starting Toxcore build and install"
|
||||||
cd $TOXCORE_DIR
|
cd $TOXCORE_DIR
|
||||||
echo "Now working in: ${PWD}"
|
echo "Now working in: ${PWD}"
|
||||||
|
|
||||||
local LS_DIR="/usr/local/Cellar/libsodium/"
|
local LS_DIR="/usr/local/Cellar/libsodium/"
|
||||||
#Figure out latest version
|
#Figure out latest version
|
||||||
local LS_VER=($(ls ${LS_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
|
local LS_VER=($(ls ${LS_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
|
||||||
local LS_DIR_VER="${LS_DIR}/${LS_VER[1]}"
|
local LS_DIR_VER="${LS_DIR}/${LS_VER[1]}"
|
||||||
|
|
||||||
sleep 3
|
if [[ $TRAVIS != true ]]; then
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
|
||||||
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="${LS_DIR_VER}/include/" --with-libsodium-libs="${LS_DIR_VER}/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."
|
||||||
make > /dev/null || exit 1
|
make > /dev/null || exit 1
|
||||||
|
@ -88,37 +92,32 @@ function install() {
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
echo "Oh... It's just Travis...."
|
echo "Oh... It's just Travis...."
|
||||||
else
|
else
|
||||||
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
|
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#fcho "Installing x-code Command line tools ..."
|
||||||
|
#xcode-select --install
|
||||||
|
|
||||||
if [[ -e /usr/local/bin/brew ]]; then
|
if [[ -e /usr/local/bin/brew ]]; then
|
||||||
fcho "Homebrew already installed!"
|
fcho "Homebrew already installed!"
|
||||||
else
|
else
|
||||||
fcho "Installing homebrew ..."
|
fcho "Installing homebrew ..."
|
||||||
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 ..."
|
if [[ $TRAVIS != true ]]; then
|
||||||
if [[ $TRAVIS = true ]]; then
|
fcho "Updating brew formulas ..."
|
||||||
brew update > /dev/null
|
|
||||||
else
|
|
||||||
brew update
|
brew update
|
||||||
fi
|
fi
|
||||||
fcho "Getting home brew formulas ..."
|
fcho "Getting home brew formulas ..."
|
||||||
sleep 3
|
|
||||||
if [[ $TRAVIS != true ]]; then #travis check
|
if [[ $TRAVIS != true ]]; then #travis check
|
||||||
brew install wget libtool automake
|
sleep 3
|
||||||
|
brew install git wget libtool autoconf automake
|
||||||
fi
|
fi
|
||||||
brew install git ffmpeg qrencode autoconf check qt5 libvpx opus sqlcipher libsodium
|
brew install check libvpx opus 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 ..."
|
|
||||||
xcode-select --install
|
|
||||||
|
|
||||||
fcho "Starting git repo checks ..."
|
fcho "Starting git repo checks ..."
|
||||||
|
|
||||||
cd $MAIN_DIR # just in case
|
#cd $MAIN_DIR # just in case
|
||||||
# Toxcore
|
# Toxcore
|
||||||
if [[ -e $TOX_DIR/.git/index ]]; then # Check if this exists
|
if [[ -e $TOX_DIR/.git/index ]]; then # Check if this exists
|
||||||
fcho "Toxcore git repo already in place !"
|
fcho "Toxcore git repo already in place !"
|
||||||
|
@ -126,7 +125,7 @@ function install() {
|
||||||
git pull
|
git pull
|
||||||
else
|
else
|
||||||
fcho "Cloning Toxcore git ... "
|
fcho "Cloning Toxcore git ... "
|
||||||
git clone https://github.com/irungentoo/toxcore.git
|
git clone --depth=1 https://github.com/irungentoo/toxcore
|
||||||
fi
|
fi
|
||||||
# qTox
|
# qTox
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
|
@ -141,7 +140,7 @@ function install() {
|
||||||
git clone https://github.com/tux3/qTox.git
|
git clone https://github.com/tux3/qTox.git
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# toxcore build
|
# toxcore build
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
build_toxcore
|
build_toxcore
|
||||||
|
@ -150,11 +149,20 @@ function install() {
|
||||||
read -r -p "Would you like to install toxcore now? [y/N] " response
|
read -r -p "Would you like to install toxcore now? [y/N] " response
|
||||||
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
build_toxcore
|
build_toxcore
|
||||||
|
|
||||||
else
|
else
|
||||||
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
|
||||||
|
|
||||||
|
if [[ $TRAVIS = true ]]; then
|
||||||
|
fcho "Updating brew formulas ..."
|
||||||
|
brew update > /dev/null
|
||||||
|
fi
|
||||||
|
brew install ffmpeg qrencode qt5 sqlcipher
|
||||||
|
|
||||||
|
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]}"
|
||||||
|
|
||||||
# put required by qTox libs/headers in `libs/`
|
# put required by qTox libs/headers in `libs/`
|
||||||
cd "${QTOX_DIR}"
|
cd "${QTOX_DIR}"
|
||||||
sudo ./bootstrap-osx.sh
|
sudo ./bootstrap-osx.sh
|
||||||
|
@ -162,7 +170,7 @@ function install() {
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
fcho "------------------------------"
|
fcho "------------------------------"
|
||||||
fcho "Starting update process ..."
|
fcho "Starting update process ..."
|
||||||
#First update Toxcore from git
|
#First update Toxcore from git
|
||||||
cd $TOXCORE_DIR
|
cd $TOXCORE_DIR
|
||||||
fcho "Now in ${PWD}"
|
fcho "Now in ${PWD}"
|
||||||
|
@ -172,9 +180,9 @@ function update() {
|
||||||
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
build_toxcore
|
build_toxcore
|
||||||
else
|
else
|
||||||
fcho "Moving on!"
|
fcho "Moving on!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Now let's update qTox!
|
#Now let's update qTox!
|
||||||
cd $QTOX_DIR
|
cd $QTOX_DIR
|
||||||
fcho "Now in ${PWD}"
|
fcho "Now in ${PWD}"
|
||||||
|
@ -185,15 +193,15 @@ function update() {
|
||||||
fcho "Starting OSX bootstrap ..."
|
fcho "Starting OSX bootstrap ..."
|
||||||
sudo ./bootstrap-osx.sh
|
sudo ./bootstrap-osx.sh
|
||||||
else
|
else
|
||||||
fcho "Moving on!"
|
fcho "Moving on!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function build() {
|
function build() {
|
||||||
fcho "------------------------------"
|
fcho "------------------------------"
|
||||||
fcho "Starting build process ..."
|
fcho "Starting build process ..."
|
||||||
rm -r $BUILD_DIR
|
rm -rf $BUILD_DIR
|
||||||
rm -r $DEPLOY_DIR
|
rm -rf $DEPLOY_DIR
|
||||||
mkdir $BUILD_DIR
|
mkdir $BUILD_DIR
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
fcho "Now working in ${PWD}"
|
fcho "Now working in ${PWD}"
|
||||||
|
@ -220,10 +228,10 @@ function deploy() {
|
||||||
function bootstrap() {
|
function bootstrap() {
|
||||||
fcho "------------------------------"
|
fcho "------------------------------"
|
||||||
fcho "starting bootstrap process ..."
|
fcho "starting bootstrap process ..."
|
||||||
|
|
||||||
#Toxcore
|
#Toxcore
|
||||||
build_toxcore
|
build_toxcore
|
||||||
|
|
||||||
#Boot Strap
|
#Boot Strap
|
||||||
fcho "Running: sudo ${QTOX_DIR_VER}/bootstrap-osx.sh"
|
fcho "Running: sudo ${QTOX_DIR_VER}/bootstrap-osx.sh"
|
||||||
cd $QTOX_DIR
|
cd $QTOX_DIR
|
||||||
|
|
5
qtox.pro
5
qtox.pro
|
@ -234,6 +234,11 @@ macx {
|
||||||
src/platform/camera/avfoundation.mm
|
src/platform/camera/avfoundation.mm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macx {
|
||||||
|
INCLUDEPATH += /usr/local/include
|
||||||
|
LIBPATH += /usr/local/lib
|
||||||
|
}
|
||||||
|
|
||||||
RESOURCES += res.qrc \
|
RESOURCES += res.qrc \
|
||||||
smileys/smileys.qrc
|
smileys/smileys.qrc
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# Script for verifying conformance to commit message format of commits in commit
|
# Script for verifying conformance to commit message format of commits in commit
|
||||||
# range supplied.
|
# range supplied.
|
||||||
#
|
#
|
||||||
# Scrpt fails (non-zero exit status) if commit messages don't conform.
|
# Script fails (non-zero exit status) if commit messages don't conform.
|
||||||
|
|
||||||
# usage:
|
# usage:
|
||||||
# ./$script $commit_range
|
# ./$script $commit_range
|
||||||
|
@ -31,7 +31,7 @@ echo "" # ← formatting
|
||||||
|
|
||||||
# Conform, /OR ELSE/.
|
# Conform, /OR ELSE/.
|
||||||
if git log --format=format:'%s' "$ARG" | \
|
if git log --format=format:'%s' "$ARG" | \
|
||||||
grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.+\))?:.{1,68})|(Merge pull request #[[:digit:]]{4,10})$'
|
grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.+\))?:.{1,68})|(Merge pull request #[[:digit:]]{1,10})$'
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Above ↑ commits don't conform to commit message format:"
|
echo "Above ↑ commits don't conform to commit message format:"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user