mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr2905'
This commit is contained in:
commit
b1731baadc
86
INSTALL.md
86
INSTALL.md
|
@ -456,13 +456,53 @@ packages necessary for building .debs, so be prepared to type your password for
|
||||||
|
|
||||||
<a name="osx" />
|
<a name="osx" />
|
||||||
## OS X
|
## OS X
|
||||||
|
|
||||||
Compiling qTox on OS X for development requires 3 tools, [Xcode](https://developer.apple.com/xcode/) and [Qt 5.4+](http://www.qt.io/qt5-4/), and [homebrew](http://brew.sh).
|
Compiling qTox on OS X for development requires 3 tools, [Xcode](https://developer.apple.com/xcode/) and [Qt 5.4+](http://www.qt.io/qt5-4/), and [homebrew](http://brew.sh).
|
||||||
|
|
||||||
### Required Libraries
|
### Automated Script
|
||||||
|
You can now set up your OS X system to compile qTox automatically thanks to the script in:
|
||||||
|
`./osx/qTox-Mac-Deployer-ULTIMATE.sh`
|
||||||
|
|
||||||
|
This script can be run independently of the qTox repo and is all that's needed to build from scratch on OS X.
|
||||||
|
|
||||||
|
To use this script you must launch terminal which can be found: `Applications > Utilities > Terminal.app`
|
||||||
|
|
||||||
|
If you wish to lean more you can run `./qTox-Mac-Deployer-ULTIMATE.sh -h`
|
||||||
|
|
||||||
|
#### First Run / Install
|
||||||
|
If you are running the script for the first time you will want to makesure your system is ready.
|
||||||
|
To do this simply run `./qTox-Mac-Deployer-ULTIMATE.sh -i` to run you through the automated install set up.
|
||||||
|
|
||||||
|
After running the installation setup you are now ready to build qTox from source, to do this simply run:
|
||||||
|
`./qTox-Mac-Deployer-ULTIMATE.sh -b`
|
||||||
|
|
||||||
|
If there aren't any errors then you'll find a locally working qTox application in your home folder under
|
||||||
|
`~/qTox-Mac_Build`
|
||||||
|
|
||||||
|
#### Updating
|
||||||
|
If you want to update your application for testing purposes or you want to run a nightly build setup then run:
|
||||||
|
`./qTox-Mac-Deployer-ULTIMATE.sh -u` and follow the prompts.
|
||||||
|
(NOTE: If you know you updated the repos before running this hit Y)
|
||||||
|
followed by
|
||||||
|
`./qTox-Mac-Deployer-ULTIMATE.sh -b`
|
||||||
|
to build the application once more. (NOTE: This will delete your previous build.)
|
||||||
|
|
||||||
|
#### Deploying
|
||||||
|
OS X requires an extra step to make the `qTox.app` file shareable on a system that doesn't have the required libraries installed already.
|
||||||
|
|
||||||
|
If you want to share the build you've made with your other friends who use OS X then simply run:
|
||||||
|
`./qTox-Mac-Deployer-ULTIMATE.sh -d`
|
||||||
|
|
||||||
|
### Manual Compiling
|
||||||
|
#### Required Libraries
|
||||||
|
Install homebrew if you don't have it:
|
||||||
|
```bash
|
||||||
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
```
|
||||||
|
|
||||||
First, let's install the dependencies available via brew.
|
First, let's install the dependencies available via brew.
|
||||||
```bash
|
```bash
|
||||||
brew install git ffmpeg qrencode
|
brew install git ffmpeg qrencode libtool automake autoconf check qt5 libvpx opus sqlcipher libsodium
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, install [filter_audio](https://github.com/irungentoo/filter_audio) (you may delete the directory it creates afterwards):
|
Next, install [filter_audio](https://github.com/irungentoo/filter_audio) (you may delete the directory it creates afterwards):
|
||||||
|
@ -473,6 +513,8 @@ sudo make install
|
||||||
cd ../
|
cd ../
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Next, install [Toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md#osx)
|
||||||
|
|
||||||
Then, clone qTox:
|
Then, clone qTox:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/tux3/qTox``
|
git clone https://github.com/tux3/qTox``
|
||||||
|
@ -480,38 +522,36 @@ git clone https://github.com/tux3/qTox``
|
||||||
|
|
||||||
Finally, copy all required files. Whenever you update your brew packages, you may skip all of the above steps and simply run the following commands:
|
Finally, copy all required files. Whenever you update your brew packages, you may skip all of the above steps and simply run the following commands:
|
||||||
```bash
|
```bash
|
||||||
cd qTox
|
cd ./git/qTox
|
||||||
sudo bash bootstrap-osx.sh
|
sudo bash bootstrap-osx.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
###Compiling
|
#### Compiling
|
||||||
|
You can build qTox with Qt Creator [seperate download](http://www.qt.io/download-open-source/#section-6) or you can hunt down the version of home brew qt5 your using in the `/usr/local/Cellar/qt5/` directory.
|
||||||
|
e.g. `/usr/local/Cellar/qt5/5.5.1_2/bin/qmake` with `5.5.1_2` being the version of Qt5 that's been installed.
|
||||||
|
|
||||||
Either open Qt creator and hit build or run ```qmake && make``` in your qTox folder and it'll just work™.
|
With that; in your terminal you can compile qTox in the git dir:
|
||||||
|
|
||||||
Note that if you use the CLI to build you'll need to add Qt5's bins to your path.
|
|
||||||
```bash
|
```bash
|
||||||
export PATH=$PATH:~/Qt/5.4/clang_64/bin/
|
/usr/local/Cellar/qt5/5.5.1_2/bin/qmake ./qtox.pro
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fixing things up
|
Or a cleaner method would be to:
|
||||||
|
|
||||||
The bad news is that Qt breaks our linker paths so we need to fix those. First cd in to your qtox.app directory, if you used Qt Creator it's in ```~/build-qtox-Desktop_Qt_5_4_1_clang_64bit-Release``` most likely, otherwise it's in your qTox folder.
|
|
||||||
|
|
||||||
Install qTox so we can copy its libraries and shove the following in a script somewhere:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
~macdeployqt qtox.app
|
cd ./git/dir/qTox
|
||||||
cp -r /Applications/qtox.app qtox_old.app
|
mkdir ./build
|
||||||
cp qtox.app/Contents/MacOS/qtox qtox_old.app/Contents/MacOS/qtox
|
cd build
|
||||||
rm -rf qtox.app
|
/usr/local/Cellar/qt5/5.5.1_2/bin/qmake ../qtox.pro
|
||||||
mv qtox_old.app qtox.app
|
|
||||||
```
|
```
|
||||||
* Give it a name like ~/deploy.qtox.sh
|
|
||||||
* cd in to the folder with qtox.app
|
|
||||||
* run ```bash ~/deploy.qtox.sh```
|
|
||||||
|
|
||||||
|
#### Deploying
|
||||||
|
If you compiled qTox properly you can now deploy the `qTox.app` that's created where you built qTox so you can distribute the package.
|
||||||
|
|
||||||
### Running qTox
|
Using your qt5 homebrew installation from the build directory:
|
||||||
|
```bash
|
||||||
|
/usr/local/Cellar/qt5/5.5.1_2/bin/macdeployqt ./qTox.app
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Running qTox
|
||||||
You've got 2 choices, either click on the qTox app that suddenly exists, or do the following:
|
You've got 2 choices, either click on the qTox app that suddenly exists, or do the following:
|
||||||
```bash
|
```bash
|
||||||
qtox.app/Contents/MacOS/qtox
|
qtox.app/Contents/MacOS/qtox
|
||||||
|
|
|
@ -57,7 +57,7 @@ function fcho() {
|
||||||
printf "\n$msg\n" "$@"
|
printf "\n$msg\n" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-toxcore() {
|
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}"
|
||||||
|
@ -81,13 +81,13 @@ function build-toxcore() {
|
||||||
fcho "Compiling toxcore."
|
fcho "Compiling toxcore."
|
||||||
make > /dev/null || exit 1
|
make > /dev/null || exit 1
|
||||||
fcho "Installing toxcore."
|
fcho "Installing toxcore."
|
||||||
make install > /dev/null || exit 1
|
sudo make install > /dev/null || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
fcho "=============================="
|
fcho "=============================="
|
||||||
fcho "This script will install the nessicarry applications and libraries needed to compile qTox properly."
|
fcho "This script will install the necessary applications and libraries needed to compile qTox properly."
|
||||||
fcho "Note that this is not a 100 percent automated install it just helps simplfiy the process for less experianced or lazy users."
|
fcho "Note that this is not a 100 percent automated install it just helps simplify the process for less experienced or lazy users."
|
||||||
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
|
||||||
|
@ -109,12 +109,13 @@ 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
|
||||||
|
|
||||||
fcho "Installing x-code Comand line tools ..."
|
fcho "Installing x-code Command line tools ..."
|
||||||
xcode-select --install
|
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
|
||||||
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 !"
|
||||||
cd $TOX_DIR
|
cd $TOX_DIR
|
||||||
|
@ -123,6 +124,7 @@ function install() {
|
||||||
fcho "Cloning Toxcore git ... "
|
fcho "Cloning Toxcore git ... "
|
||||||
git clone https://github.com/irungentoo/toxcore.git
|
git clone https://github.com/irungentoo/toxcore.git
|
||||||
fi
|
fi
|
||||||
|
# qTox
|
||||||
if [[ -e $QTOX_DIR/.git/index ]]; then # Check if this exists
|
if [[ -e $QTOX_DIR/.git/index ]]; then # Check if this exists
|
||||||
fcho "qTox git repo already in place !"
|
fcho "qTox git repo already in place !"
|
||||||
cd $QTOX_DIR
|
cd $QTOX_DIR
|
||||||
|
@ -142,10 +144,11 @@ function install() {
|
||||||
cd $FA_DIR
|
cd $FA_DIR
|
||||||
fi
|
fi
|
||||||
fcho "Installing filter_audio."
|
fcho "Installing filter_audio."
|
||||||
make install PREFIX="${LIB_INSTALL_PREFIX}"
|
sudo make install PREFIX="${LIB_INSTALL_PREFIX}"
|
||||||
# toxcore
|
|
||||||
|
# toxcore build
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
build-toxcore
|
build_toxcore
|
||||||
else
|
else
|
||||||
fcho "If all went well you should now have all the tools needed to compile qTox!"
|
fcho "If all went well you should now have all the tools needed to compile qTox!"
|
||||||
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
|
||||||
|
@ -158,7 +161,7 @@ function install() {
|
||||||
fi
|
fi
|
||||||
# put required by qTox libs/headers in `libs/`
|
# put required by qTox libs/headers in `libs/`
|
||||||
cd "${QTOX_DIR}"
|
cd "${QTOX_DIR}"
|
||||||
./bootstrap-osx.sh
|
sudo ./bootstrap-osx.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
@ -184,7 +187,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 ..."
|
||||||
./bootstrap-osx.sh
|
sudo ./bootstrap-osx.sh
|
||||||
else
|
else
|
||||||
fcho "Moving on!"
|
fcho "Moving on!"
|
||||||
fi
|
fi
|
||||||
|
@ -247,17 +250,19 @@ if [[ "$1" == "-ubd" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "-h" ]]; then
|
if [[ "$1" == "-h" ]]; then
|
||||||
echo "This script was created to help ease the process of compiling and creating a distribuable qTox package for OSX systems."
|
echo "This script was created to help ease the process of compiling and creating a distributable qTox package for OSX systems."
|
||||||
echo "The avilable commands are:"
|
echo "The available commands are:"
|
||||||
echo "-h -- This help text."
|
echo "-h -- This help text."
|
||||||
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 "-d -- Makes a distributeable 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"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fcho "Oh dear! You seemed to of started this script improperly! Use -h to get avilable commands and information!"
|
fcho "Oh dear! You seemed to of started this script improperly! Use -h to get available commands and information!"
|
||||||
|
echo " "
|
||||||
|
say -v Kathy -r 255 "Oh dear! You seemed to of started this script improperly! Use -h to get available commands and information!"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user