mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr1665'
This commit is contained in:
commit
2c48b76ffc
13
INSTALL.md
13
INSTALL.md
|
@ -78,8 +78,8 @@ sudo apt-get install build-essential qt5-qmake qt5-default qttools5-dev-tools li
|
|||
|
||||
Fedora:
|
||||
```bash
|
||||
dnf group install "Development Tools"
|
||||
dnf install qt-devel qt-doc qt-creator qt5-qtsvg opencv-devel openal-soft-devel libXScrnSaver-devel qrencode-devel
|
||||
sudo dnf group install "Development Tools"
|
||||
sudo dnf install qt-devel qt-doc qt-creator qt5-qtsvg opencv-devel openal-soft-devel libXScrnSaver-devel qrencode-devel
|
||||
```
|
||||
|
||||
openSUSE:
|
||||
|
@ -113,17 +113,17 @@ First of all install the dependencies of Tox Core.
|
|||
|
||||
Arch Linux:
|
||||
```bash
|
||||
sudo pacman -S --needed opus libvpx
|
||||
sudo pacman -S --needed opus libvpx libsodium
|
||||
```
|
||||
|
||||
Debian / Ubuntu:
|
||||
```bash
|
||||
sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev
|
||||
sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev libsodium-dev
|
||||
```
|
||||
|
||||
Fedora:
|
||||
```bash
|
||||
sudo dnf install libtool autoconf automake check check-devel
|
||||
sudo dnf install libtool autoconf automake check check-devel libsodium-devel
|
||||
```
|
||||
|
||||
openSUSE:
|
||||
|
@ -137,10 +137,11 @@ You can grab SlackBuilds of the needed dependencies here:
|
|||
|
||||
http://slackbuilds.org/repository/14.1/audio/opus/
|
||||
http://slackbuilds.org/repository/14.1/libraries/libvpx/
|
||||
http://slackbuilds.org/repository/14.1/libraries/libsodium/
|
||||
```
|
||||
|
||||
Now you can either follow the instructions at https://github.com/irungentoo/toxcore/blob/master/INSTALL.md#unix or use the "bootstrap.sh" script located at "/home/user/qTox".
|
||||
The script will automatically download and install Tox Core and libsodium to "/home/user/qTox/libs":
|
||||
The script will automatically download and install Tox Core and libfilteraudio:
|
||||
```bash
|
||||
cd /home/user/qTox
|
||||
./bootstrap.sh # use -h or --help for more information
|
||||
|
|
79
bootstrap.sh
79
bootstrap.sh
|
@ -2,11 +2,12 @@
|
|||
|
||||
WINDOWS_VERSION=$(cmd.exe /c ver 2>/dev/null | grep "Microsoft Windows")
|
||||
if [ ! -z "$WINDOWS_VERSION" ]; then
|
||||
cd windows
|
||||
./bootstrap.sh
|
||||
exit $?
|
||||
cd windows
|
||||
./bootstrap.sh
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
||||
################ parameters ################
|
||||
# directory where the script is located
|
||||
SCRIPT_DIR=$( cd $(dirname $0); pwd -P)
|
||||
|
@ -23,19 +24,19 @@ FILTER_AUDIO_DIR=libfilteraudio-latest
|
|||
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "BASE_DIR should not be empty... aborting"
|
||||
echo "BASE_DIR should not be empty. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$TOX_CORE_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "TOX_CORE_DIR should not be empty... aborting"
|
||||
echo "TOX_CORE_DIR should not be empty. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$FILTER_AUDIO_DIR" ]; then
|
||||
echo "internal error detected!"
|
||||
echo "FILTER_AUDIO_DIR should not be empty... aborting"
|
||||
echo "FILTER_AUDIO_DIR should not be empty. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -45,9 +46,10 @@ INSTALL_FILTER_AUDIO=true
|
|||
SYSTEM_WIDE=true
|
||||
KEEP_BUILD_FILES=false
|
||||
|
||||
|
||||
########## parse input parameters ##########
|
||||
while [ $# -ge 1 ] ; do
|
||||
if [ ${1} = "--with-tox" ] ; then
|
||||
if [ ${1} = "--with-tox" ] ; then
|
||||
INSTALL_TOX=true
|
||||
shift
|
||||
elif [ ${1} = "--without-tox" ] ; then
|
||||
|
@ -89,11 +91,11 @@ if [ ${1} = "--with-tox" ] ; then
|
|||
echo "example usages:"
|
||||
echo " ${0} -- install libtoxcore and libfilteraudio"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
########## print debug output ##########
|
||||
############ print debug output ############
|
||||
echo "with tox : ${INSTALL_TOX}"
|
||||
echo "with filter-audio : ${INSTALL_FILTER_AUDIO}"
|
||||
echo "install into ${INSTALL_DIR} : ${SYSTEM_WIDE}"
|
||||
|
@ -110,19 +112,36 @@ mkdir -p ${BASE_DIR}
|
|||
rm -rf ${BASE_DIR}/${TOX_CORE_DIR}
|
||||
rm -rf ${BASE_DIR}/${FILTER_AUDIO_DIR}
|
||||
|
||||
|
||||
############### install step ###############
|
||||
#install libtoxcore
|
||||
if [[ $INSTALL_TOX = "true" ]]; then
|
||||
git clone https://github.com/irungentoo/toxcore.git ${BASE_DIR}/${TOX_CORE_DIR} --depth 1
|
||||
pushd ${BASE_DIR}/${TOX_CORE_DIR}
|
||||
./autogen.sh
|
||||
|
||||
if [[ $SYSTEM_WIDE = "false" ]]; then
|
||||
git clone https://github.com/irungentoo/toxcore.git ${BASE_DIR}/${TOX_CORE_DIR} --depth 1
|
||||
pushd ${BASE_DIR}/${TOX_CORE_DIR}
|
||||
./autogen.sh
|
||||
|
||||
# configure
|
||||
if [[ $SYSTEM_WIDE = "false" ]]; then
|
||||
./configure --prefix=${BASE_DIR}
|
||||
make -j2
|
||||
make install
|
||||
else
|
||||
./configure
|
||||
make -j2
|
||||
fi
|
||||
|
||||
# ensure A/V support is enabled
|
||||
if ! grep -Fxq "BUILD_AV_TRUE=''" config.log
|
||||
then
|
||||
echo "A/V support of libtoxcore is disabled but required by qTox. Aborting."
|
||||
echo "Maybe the dev-packages of libopus and libvpx are not installed?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# compile
|
||||
make -j 2
|
||||
|
||||
# install
|
||||
if [[ $SYSTEM_WIDE = "false" ]]; then
|
||||
make install
|
||||
else
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
fi
|
||||
|
@ -132,19 +151,19 @@ fi
|
|||
|
||||
#install libfilteraudio
|
||||
if [[ $INSTALL_FILTER_AUDIO = "true" ]]; then
|
||||
git clone https://github.com/irungentoo/filter_audio.git ${BASE_DIR}/${FILTER_AUDIO_DIR} --depth 1
|
||||
pushd ${BASE_DIR}/${FILTER_AUDIO_DIR}
|
||||
|
||||
if [[ $SYSTEM_WIDE = "false" ]]; then
|
||||
PREFIX=${BASE_DIR} make -j2
|
||||
PREFIX=${BASE_DIR} make install
|
||||
else
|
||||
make -j2
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
fi
|
||||
|
||||
popd
|
||||
git clone https://github.com/irungentoo/filter_audio.git ${BASE_DIR}/${FILTER_AUDIO_DIR} --depth 1
|
||||
pushd ${BASE_DIR}/${FILTER_AUDIO_DIR}
|
||||
|
||||
if [[ $SYSTEM_WIDE = "false" ]]; then
|
||||
PREFIX=${BASE_DIR} make -j2
|
||||
PREFIX=${BASE_DIR} make install
|
||||
else
|
||||
make -j2
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
fi
|
||||
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if which apt-get; then
|
||||
sudo apt-get install build-essential qt5-qmake qt5-default libopenal-dev libopencv-dev \
|
||||
libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev \
|
||||
qttools5-dev-tools qtchooser libxss-dev libqt5svg5* libqrencode-dev \
|
||||
libqt5opengl5-dev
|
||||
sudo apt-get install \
|
||||
git build-essential qt5-qmake qt5-default qttools5-dev-tools \
|
||||
libqt5opengl5-dev libqt5svg5-dev libopenal-dev libopencv-dev \
|
||||
libxss-dev qrencode libqrencode-dev libtool autotools-dev \
|
||||
automake checkinstall check libopus-dev libvpx-dev libsodium-dev
|
||||
elif which pacman; then
|
||||
sudo pacman -S --needed base-devel qt5 opencv openal opus libvpx libxss qt5-svg qrencode
|
||||
elif which yum; then
|
||||
sudo yum groupinstall "Development Tools"
|
||||
sudo yum install qt-devel qt-doc qt-creator opencv-devel openal-soft-devel libtool autoconf automake check check-devel libXScrnSaver-devel qt5-qtsvg qrencode
|
||||
sudo pacman -S --needed \
|
||||
git base-devel qt5 opencv openal libxss qrencode opus libvpx \
|
||||
libsodium
|
||||
elif which dnf; then
|
||||
sudo dnf group install \
|
||||
"Development Tools"
|
||||
sudo dnf install \
|
||||
git qt-devel qt-doc qt-creator qt5-qtsvg opencv-devel \
|
||||
openal-soft-devel libXScrnSaver-devel qrencode-devel
|
||||
else
|
||||
echo "Unknown package manager, attempting to compile anyways"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user