            ----------------------------------
            Krusader installation instructions
            ----------------------------------


--- Note

Krusader-2.5.0 versions and higher use libraries like Qt5 and KF5, and will not
work anymore on KDE Plasma 4 or older.

--- Supported Platforms

* All POSIX (Linux®/BSD/UNIX®-like OSes), Solaris™

At the moment, for some libraries like KF5, there are no full ports for Windows
or Mac® OS X, which means these platforms are not supported.


========================================
Installation on Linux® and BSD platforms
========================================


--- Preliminary steps if Krusader was already installed

If Krusader was already installed: it's better to backup its settings before
uninstalling Krusader and installing a new version. Those folders can be
backed up (just in case):
        ~/.local
        ~/.kde
        ~/.config


--- Krusader dependencies

The next packages are needed when running the Krusader binary.

This is a list of the package names that Kubuntu/Ubuntu 18.04 (LTS) use, other
Linux distros will probably use similar names:

- plasma-framework      Plasma Runtime components
- libc6                 GNU C Library: Shared libraries
- libgcc1               GCC support library
- libqt5dbus5           Qt 5 D-Bus module
- libqt5xml5            Qt 5 XML module
- libqt5core5           Qt 5 core module
- libqt5gui5            Qt 5 GUI module
- libqt5printsupport5   Qt 5 print support module
- libstdc++6            The GNU Standard C++ Library v3
- zlib1g                compression library - runtime


--- Suggested packages

The next packages are optional but they will make Krusader much more powerful and useful.

This is a list of the package names that Debian/Ubuntu/Kubuntu 16.04 use, other Linux
distros will probably use similar names:

- arj                   archiver for .arj files
- ark                   archive utility by KDE
- bzip2                 high-quality block-sorting file compressor - utilities
- cpio                  GNU cpio -- a program to manage archives of files

- kate                  Powerful Text Editor

- kde-cli-tools         tools required to edit file types from Properties dialog
                        or run Krusader in root mode

- keditbookmarks        Bookmark manager used for editing bookmarks

- kio-extras            Enables transparent handling of various archive types
                        such as .tar and network protocols like SFTP

- kmail                 KDE Email client

- kdiff3                compares and merges 2 or 3 files or directories
                        (at moment of writing: no version available)
or kompare              file difference viewer
or xxdiff               a graphical file and directories comparison and merge tool

- konsole               X terminal emulator
- krename               Powerful batch renamer by KDE
- lhasa                 lzh archiver

- md5deep               enhanced message digest calculator
or cfv                  versatile file checksum creator and verifier

- p7zip                 7zr file archiver with high compression ratio
- rpm                   Red Hat package manager
- unace                 extract, test and view .ace archives

- unrar                 Unarchiver for .rar files (non-free version)
or unrar-free           Unarchiver for .rar files
or rar                  Archiver for .rar files

- unzip                 De-archiver for .zip files
- zip                   Archiver for .zip files


--- Compilation requirements

The next packages are needed for compiling the Krusader sourcecode, if you only
run the Krusader binary you don't need to install these packages.

- build-essential        a group of packages needed to compile source code
- cmake                  a cross-platform, open-source make system
- extra-cmake-modules    extra cmake modules for compiling KDE Frameworks
- qt5-default            development files for the Qt5 libraries
- gettext                GNU Internationalization utilities
- plasma-framework-dev   development files for plasma-framework
- zlib1g-dev             in order to make building easier (https://stackoverflow.com/a/49072832)

The following packages should install (through dependencies) all the packages
you need to compile KF5 software:
- kio-dev                resource and network access abstraction
- libkf5archive-dev      development files for karchive
- libkf5parts-dev        development files for kparts
- libkf5wallet-dev       development files for kwallet-framework
- libkf5xmlgui-dev       user configurable main windows
- kdoctools-dev          development files for kdoctools5


--- Krusader development download

Krusader is developed in KDE Extragear. If someone wants to download and use
the latest available Krusader sourcecode with git:
$ git clone http://anongit.kde.org/krusader

Otherwise, if someone wants to use the .tar.xz package:
$ tar xvf krusader-xx.xx.tar.xz


--- Some CMake options. CMake execution

-DCMAKE_INSTALL_PREFIX=/usr
  is the location where Krusader will be installed with the make command.
  Another example is: -DCMAKE_INSTALL_PRFIX=/opt/krusader
  to install the compiled Krusader in an other directory to not overwrite
  the Krusader version installed by your package manager.

-DCMAKE_CXX_FLAGS="-O2 -fPIC"
  this flag is required if you have a 64 bit system

-DQT_PLUGIN_INSTALL_DIR=
  many system force this path to keep kde4 plugins separated from the kde5 ones

-DKDESU_PATH=/foo/bar/kdesu
  this needs to be set on distributions that override default kdesu installation
  path (libexec/kf5/kdesu) or if your install prefix doesn't match KDE's.

-DENABLE_SYNCHRONIZER=OFF
  disables building the Synchronizer module. This module caused data loss, now
  it is fixed, but we treat it as the thin ice.

In order to make sure that the present folder is the parent directory of the "krusader" source code folder, this command can be executed:
    ls krusader/krusader
and it should answer something like:
    abstractpanelmanager.h  Dialogs     kicons.h           KrJS            krusaderlisterui.rc
    [...]
then CMake can be executed this way:
$ mkdir krusader-build
$ cd krusader-build
$ cmake ../krusader -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_C_FLAGS="-O2 -fPIC" -DCMAKE_CXX_FLAGS="-O2 -fPIC"

Note: An example of an output of cmake can be seen in https://phabricator.kde.org/w/krusader/cmake-output/


--- Compilation and installation

Compilation will take about 5 to 10 minutes depending on your CPU speed.

Execute:
# Note: On a multi cpu/core system you might want to speed up the compile process by increasing the number of jobs (e.g. `make -j4`)
$ make

# At the beginning of the following command: `sudo` must be added if Kubuntu, Ubuntu, Debian, or similar is being used
$ su -c "make install"

Note: An example of an output of make can be seen in https://phabricator.kde.org/w/krusader/make-output/


--- To achieve that Krusader uses another language

There is a list of translation files in the [10n.kde.org Krusader page](https://l10n.kde.org/stats/gui/trunk-kf5/po/krusader.po/index.html).
In that list anyone can look for his desired translation file, hover the mouse cursor over its link, see its tooltip to look up the
appropriate LANGUAGE_CODE (which is shown between parentheses, e.g. if on the tooltip it's seen "German (de)" that means that
LANGUAGE_CODE is: de), click on the link (in order to download the proper krusader.po file), and execute:

    # Transform the downloaded file
    msgfmt krusader.po -o krusader.mo

    # At the beginning of the following command: `sudo` must be added if Kubuntu, Ubuntu, Debian, or similar is being used.
    # In the following command, the text XXXXXXX must be replaced by the LANGUAGE_CODE that was previously found
    su -c "cp -a krusader.mo /usr/share/locale/XXXXXXX/LC_MESSAGES/"

Note: If, in the future, someone would need to automate the downloading of a krusader.po file, he could use:
    # In the following command, the text XXXXXXX must be replaced by the LANGUAGE_CODE that was previously found
    $ wget -U "Mozilla/5.0" https://websvn.kde.org/*checkout*/trunk/l10n-kf5/XXXXXXX/messages/extragear-utils/krusader.po


--- Execution

Finally, Krusader can be executed this way:
$ krusader


--- Uninstall

# At the beginning of the following command: `sudo` must be added if Kubuntu, Ubuntu, Debian, or similar is being used
$ su -c "make uninstall"
