
Installation
============

Windows
-------

On Windows, using the official Windows installation program is recommended.
If you want to build your own installer, see :ref:`win32_installer`.

Install on OSX
--------------

We are not currently distributing an installer for OSX. Instead, you must
install Exaile via Homebrew. For more details, see the
`homebrew-exaile <https://github.com/exaile/homebrew-exaile>` repo.

Linux/\*nix
-----------

.. note:: First you should install dependencies that are listed in the
          :ref:`DEPS file <deps>`.

On \*nix-based systems (but not OSX), run the following command from the
source code directory to install:

.. code-block:: sh

    $ make
    # make install

The "make" step is optional and only compiles the modules and translations.

You can run `make all_no_locale` and `make install_no_locale` instead if you
wish to build and install without translations.

To uninstall exaile please run:

.. code-block:: sh

    # make uninstall

from the same directory.

Environment Variables
^^^^^^^^^^^^^^^^^^^^^

Note: normally it should be enough to set ``PREFIX``, and potentially
``LIBINSTALLDIR`` on a 64-bit system.  The additional variables can provide
further installation customization.

Environment variables that affect "make install":

  LIBINSTALLDIR
    The full path to the lib directory.
    Default: ``EPREFIX/lib``
  DATADIR
    The full path to non-architecture dependent data files.
    Default: ``PREFIX/share``
  MANPREFIX
    The full path to the parent of the man page installation directory (same
    as system DATADIR)
    Default: ``PREFIX/share``
  EPREFIX
    The executable installation prefix.
    Default: ``PREFIX``
  PREFIX
    The main installation prefix.
    Default: ``/usr/local``
    **Note**: If this default is changed, you may need to set the LIBINSTALLDIR or
    XDG_DATA_DIRS environment variables to include the changed path. See [1].
  XDGCONFDIR
    The directory to install system-wide config files in, following xdg spec.
    Default: ``/etc/xdg``
    **Note**: If this default is changed, you may need to set the XDG_CONFIG_DIRS
    environment variable to include the changed path. See [1].
  DESTDIR
    Destination directory to put the file structure under. Mainly of use for
    packagers.
    Default: not set (``/``)
  DEFAULTARGS
    Default arguments that the 'exaile' launcher script (installed to
    ``$PREFIX/bin/exaile``) will pass to exaile on startup

Additional Resources:
1. `XDG Base Directory Specification <https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_
