1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix OS X compile, change instructions to use brew

This commit is contained in:
Daniel Hrabovcak 2015-06-29 10:04:19 -04:00 committed by TheSpiritXIII
parent 8d1a3b7357
commit cd5294c055
5 changed files with 58 additions and 28 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ qtox
*.orig *.orig
build-*-Release build-*-Release
build-*-Debug build-*-Debug
.DS_Store

View File

@ -233,37 +233,25 @@ packages necessary for building .debs, so be prepared to type your password for
<a name="osx" /> <a name="osx" />
##OS X ##OS X
Please be aware that if you've tried an earlier version of this set of instructions you may have
installed broken libraries and packages in the proces. Please delete them before continuing.
Also, if you want to use qTox and are an end user download it by clicking the download button on tox.im,
as the copy you'll make by following this guide is only suitable for testing.
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 tools ###Required Libraries
First, let's install the dependencies First, let's install the dependencies available via brew.
* ```brew install git wget``` * ```brew install git ffmpeg qrencode```
* ``git clone https://github.com/tux3/qTox``
Next, install [filter_audio](https://github.com/irungentoo/filter_audio) (you may delete the directory it creates afterwards):
* ```git clone https://github.com/irungentoo/filter_audio.git```
* ```cd filter_audio```
* ```sudo make install```
* ```cd ../```
Finally, clone qTox and copy all dependencies:
* ```git clone https://github.com/tux3/qTox``
* ```cd qTox``` * ```cd qTox```
###Libraries required to compile Finally, copy all required files. Whenever you update your brew packages, you may skip all of the above steps and simply run the following script:
* ```sudo bash bootstrap-osx.sh```
Now we are in the qTox folder and need our library dependencies to actually build it.
We've taken the time to prepare them automatically with our CI system so if you ever have issues redownload them.
* ```wget https://jenkins.libtoxcore.so/job/qTox%20OS%20X/lastSuccessfulBuild/artifact/dep.zip```
* ```unzip dep.zip```
If you do not want to download our binaries, you must compile [opencv2](http://opencv.org), [toxcore](https://github.com/irungentoo/toxcore), [opus](https://www.opus-codec.org), [vpx](http://www.webmproject.org/tools/), [filteraudio](https://github.com/irungentoo/filter_audio), and our fork of [openal](https://github.com/irungentoo/openal-soft-tox) yourself with the prefix to the libs folder.
Please be aware that no one has ever successfully got this working outside of on our CI system, but we encourage you to try and provide instructions on how you did so if you do.
Please be aware that you shouldn't do this on your main Mac, as it's fairly hard to successfully do this without ruining a bunch of things in the process.
Everything from opencv2 to filter_audio has now been installed in this library and is ready to go.
###Compiling ###Compiling

41
bootstrap-osx.sh Normal file
View File

@ -0,0 +1,41 @@
#!/usr/bin/env bash
# This script's purpose is to ease compiling qTox for users.
#
# NO AUTOMATED BUILDS SHOULD DEPEND ON IT.
#
# This script is and will be a subject to breaking changes, and at no time one
# should expect it to work - it's something that you could try to use but
# don't expect that it will work for sure.
#
# If script doesn't work, you should use instructions provided in INSTALL.md
# before reporting issues like “qTox doesn't compile”.
#
# With that being said, reporting that this script doesn't work would be nice.
#
# If you are contributing code to qTox that change its dependencies / the way
# it's being build, please keep in mind that changing just bootstrap.sh
# *IS NOT* and will not be sufficient - you should update INSTALL.md first.
echo Creating directories…
mkdir -p libs/lib
mkdir -p libs/include
echo Copying libraries…
cp /usr/local/lib/libtox* libs/lib
cp /usr/local/lib/libsodium* libs/lib
cp /usr/local/lib/libvpx* libs/lib
cp /usr/local/lib/libopus* libs/lib
cp /usr/local/lib/libav* libs/lib
cp /usr/local/lib/libswscale* libs/lib
cp /usr/local/lib/libqrencode* libs/lib
cp /usr/local/lib/libfilteraudio* libs/lib
cp /usr/local/include/filter_audio* libs/include
echo Copying include files...
cp -r /usr/local/include/tox* libs/include
cp -r /usr/local/include/vpx* libs/include
cp -r /usr/local/include/sodium* libs/include
cp -r /usr/local/include/qrencode* libs/include
cp -r /usr/local/include/libav* libs/include
cp -r /usr/local/include/libswscale* libs/include
echo Done.

View File

@ -53,7 +53,7 @@ public:
~GenericChatForm(); ~GenericChatForm();
void setName(const QString &newName); void setName(const QString &newName);
virtual void show() final = delete; virtual void show() final{}
virtual void show(Ui::MainWindow &ui); virtual void show(Ui::MainWindow &ui);
ChatMessage::Ptr addMessage(const ToxId& author, const QString &message, bool isAction, const QDateTime &datetime, bool isSent); ChatMessage::Ptr addMessage(const ToxId& author, const QString &message, bool isAction, const QDateTime &datetime, bool isSent);

View File

@ -53,7 +53,7 @@ class ProfileForm : public QWidget
public: public:
ProfileForm(QWidget *parent = nullptr); ProfileForm(QWidget *parent = nullptr);
~ProfileForm(); ~ProfileForm();
virtual void show() final = delete; virtual void show() final{}
void show(Ui::MainWindow &ui); void show(Ui::MainWindow &ui);
signals: signals: