Add PPA support (#880)
* Clean up a few things in various setup function * Add Launchpad-related setting to Debian build function * Add signature feature to package builder and fix error in debian/copyright * Update documentation * Update README
This commit is contained in:
committed by
GitHub
parent
a9cd0b29d4
commit
50d0c1eb29
@@ -4,7 +4,7 @@ novelWriter |release|
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. image:: https://github.com/vkbo/novelWriter/workflows/python%203.8/badge.svg?branch=main
|
||||
.. image:: https://github.com/vkbo/novelWriter/actions/workflows/test_linux.yml/badge.svg?branch=main
|
||||
:target: https://github.com/vkbo/novelWriter/actions
|
||||
:alt: Python Tests
|
||||
|
||||
@@ -12,10 +12,6 @@ novelWriter |release|
|
||||
:target: https://codecov.io/gh/vkbo/novelWriter
|
||||
:alt: Code Coverage
|
||||
|
||||
.. image:: https://readthedocs.org/projects/novelwriter/badge/?version=latest
|
||||
:target: https://novelwriter.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation
|
||||
|
||||
.. image:: https://img.shields.io/github/v/release/vkbo/novelwriter
|
||||
:target: https://github.com/vkbo/novelWriter/releases
|
||||
:alt: GitHub Release
|
||||
@@ -47,8 +43,8 @@ too. novelWriter can be run directly from the Python source, installed from the
|
||||
|
||||
You can also download a minimal archive package of novelWriter tailored for your operating system.
|
||||
This package can be extracted anywhere on your computer, and a setup script can be run to create
|
||||
the necessary icons and file associations. See :ref:`a_started`, or one or the setup instructions
|
||||
for your operating system for further details.
|
||||
the necessary icons and file associations. See the setup instructions for your operating system for
|
||||
further details.
|
||||
|
||||
.. note::
|
||||
Version 1.5 introduces a few changes that will require you to make a few minor modifications to
|
||||
@@ -71,10 +67,10 @@ for your operating system for further details.
|
||||
:caption: Introduction
|
||||
|
||||
int_introduction
|
||||
int_started
|
||||
setup_linux
|
||||
setup_mac
|
||||
setup_windows
|
||||
setup_other
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
+81
-60
@@ -6,19 +6,77 @@ Setup on Linux
|
||||
|
||||
.. _GitHub: https://github.com/vkbo/novelWriter/releases
|
||||
.. _main website: https://novelwriter.io
|
||||
.. _PPA: https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter
|
||||
.. _Pre-Release PPA: https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter-pre
|
||||
|
||||
This is a brief guide to how you can get novelWriter running on a Linux computer. There are
|
||||
currently no install package of novelWriter for Linux, so it is recommended that you download
|
||||
either the full source or minimal package and extract it to a practical location on your system and
|
||||
run the ``setup.py`` script.
|
||||
This is a brief guide to how you can get novelWriter running on a Linux computer.
|
||||
|
||||
There are currently install packages available for Ubuntu and Debian. For other distros it is
|
||||
recommended that you download either the full source or minimal package and extract it to a
|
||||
practical location on your system and run the ``setup.py`` script.
|
||||
|
||||
|
||||
Running from Source
|
||||
===================
|
||||
Debian or Ubuntu
|
||||
================
|
||||
|
||||
To run novelWriter from source, download the latest source package from the release page on
|
||||
GitHub_ or the `main website`_, or if you have git running on your computer, you can also clone the
|
||||
repository.
|
||||
A general Debian package can be downloaded from the `main website`_. This package should work on
|
||||
both Debian and Ubuntu.
|
||||
|
||||
If you prefer, you can also add the novelWriter repository on Launchpad to your package manager.
|
||||
|
||||
|
||||
Ubuntu
|
||||
------
|
||||
|
||||
You can add the Ubuntu PPA_ and install novelWriter with the following commands.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo add-apt-repository ppa:vkbo/novelwriter
|
||||
sudo apt update
|
||||
sudo apt install novelwriter
|
||||
|
||||
|
||||
Debian
|
||||
------
|
||||
|
||||
Since this is a pure Python package, the Launchpad PPA can in principle also be used on Debian.
|
||||
However, the above command will fail to add the signing key.
|
||||
|
||||
Instead, run the following commands to add the repository and key:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo mkdir -p /usr/local/share/keyrings/
|
||||
sudo gpg --no-default-keyring --keyring /usr/local/share/novelwriter-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F19F1FCE50043114
|
||||
echo "deb [signed-by=/usr/local/share/keyrings/novelwriter-keyring.gpg] http://ppa.launchpad.net/vkbo/novelwriter/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/novelwriter.list
|
||||
|
||||
Then run the update and install command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt update
|
||||
sudo apt install novelwriter
|
||||
|
||||
|
||||
Pre-Releases
|
||||
------------
|
||||
|
||||
There is also a `Pre-Release PPA`_ available beta releases and release candidates.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo add-apt-repository ppa:vkbo/novelwriter-pre
|
||||
sudo apt update
|
||||
sudo apt install novelwriter
|
||||
|
||||
|
||||
Minimal Zip File
|
||||
================
|
||||
|
||||
A minimal zip file is provided for Linux. You can download the latest zip file from the release
|
||||
page on GitHub_, or from the `main website`_. This zip file contains only the main files needed to
|
||||
run novelWriter. You can extract the file to wherever you want, and run the steps below.
|
||||
|
||||
|
||||
Step 1: Installing Dependencies
|
||||
@@ -39,72 +97,35 @@ can install them with:
|
||||
pip3 install --user -r requirements.txt
|
||||
|
||||
|
||||
Step 2: Install Package (Optional)
|
||||
----------------------------------
|
||||
|
||||
You can install novelWriter to the default location for Python packages using ``setuptools``. This
|
||||
step is optional as you can also just put the novelWriter program folder wherever you like
|
||||
yourself. For instance in ``/opt/novelWriter``, and then run Step 3 to set up icons and launcher.
|
||||
|
||||
To install novelWriter to the default location requires that you have ``setuptools`` installed on
|
||||
your system. If you don't have it installed, it can usually be installed from your distro's
|
||||
repository. For Debian and Ubuntu this is achieved with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt install python3-setuptools
|
||||
|
||||
The package is also available from PyPi:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
pip3 install --user setuptools
|
||||
|
||||
With ``setuptools`` in place, novelWriter can be installed to the user space with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./setup.py install --user
|
||||
|
||||
This should install novelWriter as ``~/.local/bin/novelWriter``. If you instead want to install for
|
||||
all users, i.e. as ``/usr/local/bin/novelWriter``, run:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo ./setup.py install
|
||||
|
||||
This is equivalent to what the ``pip`` installer does. It puts novelWriter in the location on your
|
||||
system where Python packages are usually kept. This is not really the best suited location for a
|
||||
GUI application like novelWriter, so you may instead copy the entire source to a suiteable location
|
||||
yourself.
|
||||
|
||||
|
||||
Step 3: Create Launcher Icons
|
||||
Step 2: Create Launcher Icons
|
||||
-----------------------------
|
||||
|
||||
Regardless of where you extract or install the source files, you can set up a standard icon and a
|
||||
launcher. To set up this desktop launcher, the needed icons, and the project file association,
|
||||
run the following from inside the novelWriter folder at the installed or final location:
|
||||
A standard desktop launcher can be installed via the main setup script. It will create the needed
|
||||
desktop file and add it to the Applications menu. The necessary icons will also be installed, and a
|
||||
file association with ``.nwx`` files added.
|
||||
|
||||
To set this up, run the following from inside the novelWriter folder at the final location:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./setup.py xdg-install
|
||||
python3 setup.py xdg-install
|
||||
|
||||
By default, this command installs the launcher and icons for the current user only. To install for
|
||||
all users, run the script with the ``sudo`` command.
|
||||
This will only install the launcher and icons for the current user. To set up novelWriter for all
|
||||
users, run:
|
||||
|
||||
.. tip::
|
||||
All options of the setup script can be listed with: ``./setup.py help``.
|
||||
.. code-block:: console
|
||||
|
||||
sudo python3 setup.py xdg-install
|
||||
|
||||
|
||||
Uninstalling Icons
|
||||
==================
|
||||
------------------
|
||||
|
||||
The steps taken by the ``xdg-install`` step can be reversed by running:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./setup.py xdg-uninstall
|
||||
python3 setup.py xdg-uninstall
|
||||
|
||||
This will remove the desktop launcher and icons from the system. As above, whether this is done on
|
||||
the current user, or system wide, depends on whether this command is called with ``sudo`` or not.
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
.. _a_started:
|
||||
.. _a_other:
|
||||
|
||||
***************
|
||||
Getting Started
|
||||
***************
|
||||
*******************
|
||||
Other Setup Methods
|
||||
*******************
|
||||
|
||||
.. _main website: https://novelwriter.io
|
||||
.. _GitHub: https://github.com/vkbo/novelWriter/releases
|
||||
.. _PyPi: https://pypi.org/project/novelWriter/
|
||||
.. _Sphinx Docs: https://www.sphinx-doc.org/
|
||||
|
||||
This section contains brief guides to how you can get novelWriter running on your computer. These
|
||||
are the methods currently supported by the developer. Packages may also be available in other
|
||||
package managers, but those are not managed by the developer. No installers are provided at this
|
||||
time, but it is fairly straightforward to set up novelWriter with the provided install scripts.
|
||||
|
||||
As novelWriter matures, more options for how to install it and get it running will be added. For
|
||||
non-Windows users the install process is at the present time best suited for people used to working
|
||||
with the command line. But even if you're not, the install process is fairly straightforward.
|
||||
|
||||
The next pages have specific install instructions for the various operating systems novelWriter can
|
||||
run on. The instructions below are supplementary information, instructions for alterbative methods,
|
||||
and additional build options.
|
||||
This section describes various other setup methods, and instructions for building needed files
|
||||
when running novelWriter from the source code directly.
|
||||
|
||||
.. note::
|
||||
The text below assumes the command ``python`` corresponds to a Python 3 executable. Python 2 is
|
||||
@@ -28,7 +19,7 @@ and additional build options.
|
||||
without the ``python`` command. Likewise, ``pip`` may need to be replaced with ``pip3``.
|
||||
|
||||
|
||||
.. _a_started_depend:
|
||||
.. _a_other_depend:
|
||||
|
||||
Dependencies
|
||||
============
|
||||
@@ -41,7 +32,7 @@ The following Python packages are needed to run novelWriter:
|
||||
|
||||
* ``PyQt5`` – needed for connecting with the Qt5 libraries.
|
||||
* ``lxml`` – needed for full XML support.
|
||||
* ``PyEnchant`` – needed for efficient spell checking (optional).
|
||||
* ``PyEnchant`` – needed for spell checking (optional).
|
||||
|
||||
PyQt/Qt should be at least 5.3, but ideally 5.10 or higher for nearly all features to work. For
|
||||
instance, searching using regular expressions with full Unicode support requires 5.13. There is no
|
||||
@@ -59,23 +50,17 @@ source, dependencies can still be installed from PyPi with:
|
||||
pip install -r requirements.txt
|
||||
|
||||
|
||||
.. _a_started_install:
|
||||
.. _a_other_pip:
|
||||
|
||||
Installing from Source or PyPi
|
||||
==============================
|
||||
Installing from PyPi
|
||||
====================
|
||||
|
||||
You can download the latest version of novelWriter from the source repository on GitHub_. You can
|
||||
also install novelWriter from PyPi_.
|
||||
|
||||
If you're running novelWriter from source, the main setup script has a number of options that may
|
||||
be useful to you. You can list them by running:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
python setup.py --help
|
||||
novelWriter is available on the Python Package Index, or PyPi_.
|
||||
|
||||
To install from PyPi you must first have the ``python`` and ``pip`` commands available on your
|
||||
system. If you don't, see specific instructions for your operating system in this documentation.
|
||||
system. If you don't, see specific instructions for your operating system in this documentation on
|
||||
how to get the Python environment set up.
|
||||
|
||||
To install novelWriter from PyPi, use the following command:
|
||||
|
||||
.. code-block:: console
|
||||
@@ -98,7 +83,42 @@ Make sure the install location for pip is in your PATH variable. This is not alw
|
||||
default.
|
||||
|
||||
|
||||
.. _a_started_i18n:
|
||||
.. _a_other_source:
|
||||
|
||||
Installing from Source
|
||||
======================
|
||||
|
||||
You can download the latest version of novelWriter from the source repository on GitHub_ and run
|
||||
the setup manually. It is equivalent to what the ``pip install`` command does, and it installs
|
||||
novelWriter to the default location for Python packages.
|
||||
|
||||
This step requires that you have ``setuptools`` installed on your system. If you don't have it
|
||||
installed, it can usually be installed from your distro's repository. For Debian and Ubuntu this is
|
||||
achieved with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt install python3-setuptools
|
||||
|
||||
The package is also available from PyPi:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
pip install --user setuptools
|
||||
|
||||
With ``setuptools`` in place, novelWriter can be installed to the user space with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
python setup.py install --user
|
||||
|
||||
.. tip::
|
||||
|
||||
The main setup script has a number of options that may be useful to you. You can list them by
|
||||
running ``python setup.py --help``.
|
||||
|
||||
|
||||
.. _a_other_i18n:
|
||||
|
||||
Building the Translation Files
|
||||
==============================
|
||||
@@ -112,7 +132,7 @@ You can build the ``.qm`` files with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
python3 setup.py qtlrelease
|
||||
python setup.py qtlrelease
|
||||
|
||||
This requires that the Qt Linguist tool is installed on your system. On Ubuntu and Debian, the
|
||||
needed package is called `qttools5-dev-tools`.
|
||||
@@ -123,14 +143,13 @@ needed package is called `qttools5-dev-tools`.
|
||||
the ``i18n`` folder of the source code.
|
||||
|
||||
|
||||
.. _a_started_docs:
|
||||
.. _a_other_docs:
|
||||
|
||||
Building the Documentation
|
||||
==========================
|
||||
|
||||
If you installed novelWriter from a package, the documentation should be pre-built and included. If
|
||||
you're running novelWriter from the source code, a local copy of this documentation can be
|
||||
generated. It requires the following Python packages on Debian and Ubuntu.
|
||||
A local copy of this documentation can be generated as HTML. This requires the following Python
|
||||
packages on Debian and Ubuntu.
|
||||
|
||||
* ``python3-sphinx``
|
||||
* ``python3-sphinx-rtd-theme``
|
||||
@@ -150,15 +169,13 @@ The documentation can then be built from the ``docs`` folder in the source code
|
||||
If successful, the documentation should be available in the ``docs/build/html`` folder and you can
|
||||
open the ``index.html`` file in your browser.
|
||||
|
||||
You can also build the PDF documentation locally using the setup script:
|
||||
You can also build a PDF manual from the documentation using the setup script:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
python setup.py pdfdocs
|
||||
python setup.py manual
|
||||
|
||||
This will build the documentation as a PDF using LaTeX. The file will then be copied into the
|
||||
assets folder and made available in the :guilabel:`Help` menu in novelWriter. The Sphinx build
|
||||
system has a few extra dependencies when building the PDF. Please check the `Sphinx Docs`_ if you
|
||||
have any issues.
|
||||
|
||||
.. _Sphinx Docs: https://www.sphinx-doc.org/
|
||||
system has a few extra dependencies when building the PDF. Please check the `Sphinx Docs`_ for more
|
||||
details.
|
||||
Reference in New Issue
Block a user