qutebrowser/doc/INSTALL.asciidoc
2014-12-16 22:06:04 +01:00

157 lines
5.2 KiB
Plaintext

Installing qutebrowser
======================
On Debian / Ubuntu
------------------
qutebrowser should run on these systems:
* Debian jessie or newer
* Ubuntu Trusty (14.04 LTS) or newer
* Any other distribution based on these (e.g. Linux Mint)
Install the dependencies via apt-get:
----
# apt-get install python3-pyqt5 python3-pyqt5.qtwebkit python-virtualenv
----
To generate the documentation for the `:help` command, when using the git
repository (rather than a release):
----
# apt-get install asciidoc
# python3 scripts/asciidoc2html.py
----
Then run the supplied script to run qutebrowser inside a
https://virtualenv.pypa.io/en/latest/virtualenv.html[virtualenv]:
----
# python3 scripts/init_venv.py
----
This installs all needed Python dependencies in a `.venv` subfolder. The
system-wide Qt5/PyQt5 installations are symlinked into the virtualenv.
You can then create a simple wrapper script to start qutebrowser somewhere in
your `$PATH` (e.g. `/usr/local/bin/qutebrowser` or `~/bin/qutebrowser`):
----
#!/bin/bash
~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser
----
On Archlinux
------------
There are two Archlinux packages available in the AUR:
https://aur.archlinux.org/packages/qutebrowser/[qutebrowser] and
https://aur.archlinux.org/packages/qutebrowser-git/[qutebrowser-git].
You can install them like this:
----
$ mkdir qutebrowser
$ cd qutebrowser
$ wget https://aur.archlinux.org/packages/qu/qutebrowser-git/PKGBUILD
$ makepkg -si
----
or you could use an AUR helper, e.g. `yaourt -S qutebrowser-git`.
On Gentoo
---------
A dedicated overlay is available on
https://github.com/posativ/qutebrowser-overlay[GitHub]. To install it, add the
overlay with http://wiki.gentoo.org/wiki/Layman[layman]:
----
# wget https://raw.githubusercontent.com/posativ/qutebrowser-overlay/master/overlays.xml -O /etc/layman/overlays/qutebrowser.xml
# layman -a qutebrowser
----
Note, that Qt5 is available in the portage tree, but masked. You may need to do
a lot of keywording to install qutebrowser. Also make sure you have `python3_4`
in your `PYTHON_TARGETS` (`/etc/portage/make.conf`) and rebuild your system
(`emerge -uDNav @world`). Afterwards, you can install qutebrowser:
----
# emerge -av qutebrowser
----
On Windows
----------
You can either use one of the
https://github.com/The-Compiler/qutebrowser/releases[prebuilt standalone
packages or MSI installers], or install manually:
* Use the installer from http://www.python.org/downloads[python.org] to get
Python 3 (be sure to install pip).
* Use the installer from
http://www.riverbankcomputing.com/software/pyqt/download5[Riverbank computing]
to get Qt and PyQt5.
* Run `pip install virtualenv` or
http://www.lfd.uci.edu/~gohlke/pythonlibs/#virtualenv[the installer from here]
to install virtualenv.
Then run the supplied script to run qutebrowser inside a
https://virtualenv.pypa.io/en/latest/virtualenv.html[virtualenv]:
----
# python3 scripts/init_venv.py
----
This installs all needed Python dependencies in a `.venv` subfolder. The
system-wide Qt5/PyQt5 installations are used in the virtualenv.
On OS X
-------
Running qutebrowser on OS X requires compiling PyQt5 by hand. These steps have
been tested on OS X Mavericks:
* Install XCode from the Appstore
* Open a Terminal
* Run `xcode-select --install`
* Install the XCode commandline tools
* Run `sudo /usr/bin/xcodebuild` and accept the license.
* http://www.qt.io/download-open-source/[Download] and run the Qt5 installer.
If you want, you can deselect Android/iOS when selecting the components to be
installed.
* http://www.python.org/downloads/[Download] and run the Python 3
installer.
* Download http://www.riverbankcomputing.com/software/sip/download[SIP] and
http://www.riverbankcomputing.com/software/pyqt/download5[PyQt5] from Riverbank Computing
* Open a Terminal and use `cd ~/Downloads` to get to the download directory.
* Use `tar xzvf sip-*.tar` to extract SIP and `cd sip-*` to change into the
SIP directory
* Run `python3 configure.py`, `make` and `sudo make install`.
* Use `cd ~/Downloads` to get back to the download directory.
* Use `tar xvf PyQt-*.tar` to extract PyQt and `cd PyQt-*` to change into the
PyQt directory.
* Run `sed -i -e "s/qmake_QT=\['webkit', 'network'\]/qmake_QT=['webkit',
'network', 'printsupport']/" configure.py`
* Run `sed -i -e "s/qmake_QT=\['webkitwidgets'\]/qmake_QT=['webkitwidgets',
'printsupport']/" configure.py`
* Run `python3 configure.py --qmake ~/Qt/5.4/clang_64/bin/qmake --sip
/Library/Frameworks/Python.framework/Versions/3.4/bin/sip` and accept
the license. If you manage your Python installation with http://brew.sh[Homebrew]
this step will be something like `python3 configure.py --qmake ~/Qt/5.4/clang_64/bin/qmake
--sip /usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/bin/sip`...
watch where the sip install (above) puts its components.
* Run `make` and `sudo make install`.
* Run `python3 setup.py install` to install all other dependencies
Packagers
---------
There are example .desktop and icon files provided. They would go in the
standard location for your distro (`/usr/share/applications` and
`/usr/share/pixmaps` for example).
The normal `setup.py install` doesn't install these files, so you'll have to do
it as part of the packaging process.