From a14b319adafcb46af79e5ac627c593029c723b34 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 17 Apr 2021 17:37:22 +0200 Subject: [PATCH] Update the docs --- docs/source/setup_windows.rst | 33 +++++++++++++++++++++++++++++++++ setup/setup_windows.bat | 9 +++++++-- setup/uninstall_windows.bat | 13 +++++++++---- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/docs/source/setup_windows.rst b/docs/source/setup_windows.rst index a6130854..9fa7a0cf 100644 --- a/docs/source/setup_windows.rst +++ b/docs/source/setup_windows.rst @@ -79,6 +79,9 @@ Open the folder where you extracted the novelWriter source, and double-click the ``setup_windows.bat``. This should open a command line window and run the setup script to install dependencies, and add desktop and start menu icons. +.. note:: + If you downloaded the full source package, the file may be in the ``setup`` subfolder. + The script will also check that it can find Python on your system and alert you if it cannot run it. If you are sure you have installed it, but the script cannot find it, you probably didn't install it with the "Add Python to PATH" option mentioned in Step 1. @@ -108,3 +111,33 @@ and the second command will create a desktop icon and a start menu icon. That sh you need. .. _Python Package Index: https://pypi.org/ + + +Uninstalling +============ + +**Alternative A: By Script** + +Open the folder where you keep the novelWriter files, and double-click the file named +``uninstall_windows.bat``. This should open a command line window and run the setup script to +remove the main dependency packages and remove desktop and start menu icons. + +.. note:: + If you downloaded the full source package, the file may be in the ``setup`` subfolder. + +If you plan to also remove Python from your system, you must run this command first, as it needs +Python in order to run the commands. + +.. note:: + Due to limitations with the ``pip`` installer, dependencies of the dependencies will not be + removed, only the ones the setup script directly installed. + +**Alternative B: Manual Uninstallation** + +Like for the install process, the script just runs two commands. You can of course run them +yourself if you wish. They are: + +.. code-block:: console + + python setup.py win-uninstall + pip uninstall -r requirements.txt diff --git a/setup/setup_windows.bat b/setup/setup_windows.bat index eeb88fcf..3d0b16e0 100644 --- a/setup/setup_windows.bat +++ b/setup/setup_windows.bat @@ -6,13 +6,18 @@ echo Looking for Python python --version 2>NUL if errorlevel 1 goto errorNoPython echo Python found. OK. -echo. if exist setup.py ( echo setup.py found. OK. ) else ( - goto errorNoSetup + cd .. + if exist setup.py ( + echo setup.py found. OK. + ) else ( + goto errorNoSetup + ) ) +echo. :: Install the PyQt5, lxml and pyenchant dependencies python setup.py pip diff --git a/setup/uninstall_windows.bat b/setup/uninstall_windows.bat index 70ec59b0..a02f96d7 100644 --- a/setup/uninstall_windows.bat +++ b/setup/uninstall_windows.bat @@ -10,16 +10,21 @@ echo Python found. OK. if exist setup.py ( echo setup.py found. OK. ) else ( - goto errorNoSetup + cd .. + if exist setup.py ( + echo setup.py found. OK. + ) else ( + goto errorNoSetup + ) ) echo. -:: Remove the PyQt5, lxml and pyenchant dependencies -pip uninstall -r requirements.txt - :: Remove the desktop and start menu icons python setup.py win-uninstall +:: Remove the PyQt5, lxml and pyenchant dependencies +pip uninstall -r requirements.txt + pause goto:eof