Compiling Double Commander

1) What you need?

Double Commander is developed with Free Pascal and Lazarus.
Current version requires at least FPC 3.2.2 and Lazarus 3.0 (4.8 under macOS).

2) Using the IDE to develop and build DC.

If you want to use Lazarus IDE to develop Double Commander, first you have to
install a few additional components all of which reside in components
directory of DC sources. You must open each .lpk package file:

- chsdet/chsdet.lpk
- multithreadprocs/multithreadprocslaz.lpk
- kascrypt/kascrypt.lpk
- doublecmd/doublecmd_common.lpk
- gifview/gifview.lpk
- KASToolBar/kascomp.lpk
- synunihighlighter/synuni.lpk
- viewer/viewerpackage.lpk
- virtualterminal/virtualterminal.lpk

and install it into Lazarus (menu: Package -> Open package file (.lpk) -> Browse
to needed .lpk file -> Press "Install", if "Install" disabled then press
"Compile" instead). Choose "No" when asked for rebuilding Lazarus after each
package then rebuild Lazarus when you have installed all of them.

After rebuilding Lazarus open the project file src/doublecmd.lpi.

Compile.

3) Building DC from command line.

From command line (Windows)

Use build.bat script to build DC on Windows.

First you need the lazbuild utility of Lazarus to be somewhere in your PATH or
you need to edit the build script and change the lazpath variable to point to
it.

Execute the script to start the build process. Make sure you use all parameter
if you're building for the first time, so that also components and plugins are
built:

> build.bat release

or alternatively without plugins

> build.bat components
> build.bat doublecmd

From command line (Linux)

Use build.sh script to build DC on Linux.

First you need the lazbuild utility of Lazarus to be somewhere in your PATH and
if you installed a Lazarus package it should already be there. Otherwise you
need to edit the build script and change the lazbuild variable to point to it.

On Linux three widgetsets are supported: GTK2, Qt4 and Qt5. You can choose one
by setting lcl environment variable before executing the script to either gtk2,
qt or qt5 for example:

$ lcl=qt ./build.sh

Execute the script to start the build process. Make sure you use all parameter
if you're building for the first time, so that also components and plugins are
built:

$ ./build.sh release

or alternatively without plugins

$ ./build.sh components
$ ./build.sh doublecmd
