Development

From Double Commander Wiki
Revision as of 13:30, 7 March 2016 by Alexx2000 (Talk | contribs)

Jump to: navigation, search

Contents

Required tools

Double Commander is developed with Free Pascal and Lazarus.

Free Pascal Compiler

It is always preferred to use latest FPC release to build Double Commander.

Current development version 0.8.0 alpha requires at least FPC 2.6.4.

Note
Double Commander < 0.7.0 is not compatible with FPC 3.0.x.

Lazarus

Each Double Commander release is usually built with latest stable version of Lazarus.

Current development version 0.8.0 alpha requires Lazarus 1.4.2 or later.

We tend to use latest development version of Lazarus from trunk so that any regressions that affect Double Commander can be discovered, reported and fixed before next stable Lazarus release and to adapt earlier to any changes in Lazarus. This way you also keep up-to-date with latest bug fixes in Lazarus.

Required libraries

Linux

To build Double Commander on Linux you need to have development versions of a few libraries installed (libxxx-dev packages). If you get linking errors make sure you have all needed libraries. The following is the list of direct dependencies (packages names are from Ubuntu 10.04). If you use a package manager in your Linux distribution it should pull all of the indirect dependencies for you.

libdbus-1-dev
libglib2.0-dev
libncurses5-dev
libx11-dev
libgtk-2.0-dev     (only GTK2)
libqt4pas-dev      (only QT4)

If you don't have libQt4Pas in your distribution you can download it from FPC Qt4 Binding page. Then you'll also need these dependencies:

libqt4-network
libqt4-webkit
libqtcore4
libqtgui4

Getting the source code

Double Commander's source code is stored in a Subversion repository on Sourceforge.

To download the current development version use the following command:

svn co https://svn.code.sf.net/p/doublecmd/code/trunk doublecmd

To download the latest release use:

svn co https://svn.code.sf.net/p/doublecmd/code/branches/0.7 doublecmd

If you want to download everything, including all branches and tags, use:

svn co https://svn.code.sf.net/p/doublecmd/code doublecmd

Building from source

Using Lazarus IDE

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
CmdLine/cmdbox.lpk
multithreadprocs/multithreadprocslaz.lpk (doublecmd >= 0.7)
dcpcrypt/dcpcrypt.lpk
doublecmd/doublecmd_common.lpk
KASToolBar/kascomp.lpk
gifanim/pkg_gifanim.lpk
viewer/viewerpackage.lpk
ZVDateTimeCtrls/zvdatetimectrls.lpk (doublecmd < 0.7)

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.

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 all

or alternatively without plugins

> build.bat components
> build.bat

From command line (Linux)

Use build.sh script to build DC on Windows.

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 two widgetsets are supported: GTK2 or QT4. You can choose one by setting lcl environment variable before executing the script to either gtk2 or qt, 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 all

or alternatively without plugins

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

Supported platforms/operating systems

Double Commander supports several platforms and operating systems. See Supported platforms page for a complete list.

Known issues with FPC, Lazarus

There are sometimes issues in Double Commander which come from bugs in FPC or Lazarus. Some of them may affect development, debugging, etc. Check the Issues with FPC, Lazarus page for the list of currently known bugs.

Guidelines for developers

If you intend to write code for Double Commander please check the Guidelines for developers page for pointers, hints, etc., so that you are consistent with other developers.

How to help in development

Currently there is no specific goals list, but some ways you can help:

  • Test and report bugs. Most important are crashes that can be reproduced or that generate a backtrace in doublecmd.err file. There are sometimes bugs only exhibited on x86_64 but not on i386 and since we don't have much access to x86_64 they usually are not caught. See Making a bug report page for guidelines on how to make a good bug report.
  • Look at the bugtracker for bugs you could fix or help fixing. Especially looking for fixing bugs on x86_64-Linux, Windows Vista, 7 64-bit, MacOSX.
  • If you want to translate Double Commander to your language check the Translation page.
  • If you have ideas for new features or changing existing features head to our forum to discuss them or post them on the mailing list.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox