Skip to content

Commit

Permalink
doc: Improve get started page [Documentation]
Browse files Browse the repository at this point in the history
  • Loading branch information
schuhschuh committed Apr 8, 2018
1 parent 7274033 commit e3b039d
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions Documentation/getstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,51 @@ Get Started
Install the software
--------------------

**Custom build**

Before you can start using the MIRTK or develop your own MIRTK applications,
you have to install the desired modules and available applications on your
system including their prerequisites. For a manual installation of the MIRTK,
please follow the :doc:`download` and :doc:`install` instructions which
list the third-party libraries required by each module and describe how to
build the MIRTK from its publicly available source code.


**Using Docker**

Instead of manually installing the MIRTK locally on your system, you can use
the pre-made `biomedia/mirtk <https://hub.docker.com/r/biomedia/mirtk/>`_
Docker image to run the :doc:`commands` inside a `Docker container`_.
For a guide to install and use Docker_, see the `official docs <https://docs.docker.com>`__.


**AppImage for Linux**

For Linux users, the easiest way to get started with MIRTK without the need for the Docker
runtime environment is the AppImage_ available on Bintray_. An MIRTK AppImage contains
runtime environment is the `MIRTK AppImage`_ available on Bintray_. An AppImage_ contains
all the required shared libraries and pre-built MIRTK commands. It can be executed on any
Linux system with a compatible minimum glibc version (>=2.15). With this AppImage, there is no
actual need for any installation. Simply download the file, make it executable, and copy it to
actual need for an installation. Simply download the file, make it executable, and copy it to
a directory that is in your PATH, e.g.,::

wget -O mirtk https://bintray.com/schuhschuh/AppImages/download_file?file_path=MIRTK%2Bview-latest-x86_64-glibc2.15.AppImage
chmod a+x mirtk
sudo mv mirtk /usr/bin

This AppImage is updated automatically when a change is committed to the ``master`` branch of
the GitHub repository.
This AppImage is updated automatically when a change is committed to the master branch.


.. _BashCompletion:

Bash completion
---------------
Enable Bash completion
----------------------

**Custom built**
**Custom build**

For information on how to enable auto-completion_ when running ``mirtk`` commands of
a manual MIRTK installation in the Bash_ shell, see the :doc:`install` instructions.


**Using AppImage**

To enable Bash completion for running the MIRTK commands on Linux using the AppImage,
copy the `completion script <https://raw.githubusercontent.com/BioMedIA/MIRTK/master/Scripts/mirtk_bash_completion.sh>`__
available in the GitHub repository to ``/etc/bash_completion.d/``.

This can be done with the following Terminal command::

sudo curl -L https://raw.githubusercontent.com/BioMedIA/MIRTK/master/Scripts/mirtk_bash_completion.sh > /etc/bash_completion.d/mirtk

Alternatively, save the file to your home directory at, for example, ``$HOME/bash_completion/``,
rename it to ``mirtk``, and add the following line to your ``.bashrc`` file::

[ ! -f "$HOME/bash_completion/mirtk" ] || . "$HOME/bash_completion/mirtk"


**Using Docker**

To enable Bash completion for running the MIRTK commands with Docker,
Expand Down Expand Up @@ -90,6 +81,22 @@ and add the following lines to your ``.bashrc`` (Linux) or ``.bash_profile`` (OS
[ ! -f "$HOME/bash_completion/docker-mirtk" ] || . "$HOME/bash_completion/docker-mirtk"


**Using AppImage**

To enable Bash completion for running the MIRTK commands in Bash using the AppImage for Linux,
copy `this file <https://raw.githubusercontent.com/BioMedIA/MIRTK/master/Scripts/mirtk_bash_completion.sh>`__
to ``/etc/bash_completion.d/``.

This can be done with the following Terminal command::

sudo curl -L https://raw.githubusercontent.com/BioMedIA/MIRTK/master/Scripts/mirtk_bash_completion.sh > /etc/bash_completion.d/mirtk

Alternatively, save the file to your home directory at, for example, ``$HOME/bash_completion/``,
rename it to ``mirtk``, and add the following line to your ``.bashrc`` file::

[ ! -f "$HOME/bash_completion/mirtk" ] || . "$HOME/bash_completion/mirtk"


Run the commands
----------------

Expand Down Expand Up @@ -150,6 +157,7 @@ or develop your own MIRTK Package.


.. _AppImage: https://appimage.org/
.. _MIRTK AppImage: https://bintray.com/schuhschuh/AppImages/MIRTK/master
.. _Bintray: https://bintray.com/schuhschuh/AppImages/MIRTK/master
.. _Bash: https://www.gnu.org/software/bash/
.. _auto-completion: https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html
Expand Down

0 comments on commit e3b039d

Please sign in to comment.