From cd5294c0557a37da1c670ccaa4f4fa8568c55062 Mon Sep 17 00:00:00 2001 From: Daniel Hrabovcak Date: Mon, 29 Jun 2015 10:04:19 -0400 Subject: [PATCH] Fix OS X compile, change instructions to use brew --- .gitignore | 1 + INSTALL.md | 40 +++++++++++------------------- bootstrap-osx.sh | 41 +++++++++++++++++++++++++++++++ src/widget/form/genericchatform.h | 2 +- src/widget/form/profileform.h | 2 +- 5 files changed, 58 insertions(+), 28 deletions(-) create mode 100644 bootstrap-osx.sh diff --git a/.gitignore b/.gitignore index db82797c5..f16982ed3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ qtox *.orig build-*-Release build-*-Debug +.DS_Store \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index 72e42257f..8d16f376e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -233,37 +233,25 @@ packages necessary for building .debs, so be prepared to type your password for ##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). -###Required tools +###Required Libraries -First, let's install the dependencies -* ```brew install git wget``` -* ``git clone https://github.com/tux3/qTox`` +First, let's install the dependencies available via brew. +* ```brew install git ffmpeg qrencode``` + +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``` -###Libraries required to compile - -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. +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``` ###Compiling diff --git a/bootstrap-osx.sh b/bootstrap-osx.sh new file mode 100644 index 000000000..a962e1044 --- /dev/null +++ b/bootstrap-osx.sh @@ -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. + diff --git a/src/widget/form/genericchatform.h b/src/widget/form/genericchatform.h index 836abb058..573d6757a 100644 --- a/src/widget/form/genericchatform.h +++ b/src/widget/form/genericchatform.h @@ -53,7 +53,7 @@ public: ~GenericChatForm(); void setName(const QString &newName); - virtual void show() final = delete; + virtual void show() final{} virtual void show(Ui::MainWindow &ui); ChatMessage::Ptr addMessage(const ToxId& author, const QString &message, bool isAction, const QDateTime &datetime, bool isSent); diff --git a/src/widget/form/profileform.h b/src/widget/form/profileform.h index e79aeaf40..f1d442fc6 100644 --- a/src/widget/form/profileform.h +++ b/src/widget/form/profileform.h @@ -53,7 +53,7 @@ class ProfileForm : public QWidget public: ProfileForm(QWidget *parent = nullptr); ~ProfileForm(); - virtual void show() final = delete; + virtual void show() final{} void show(Ui::MainWindow &ui); signals: