Development - doublecmd/doublecmd Wiki
🚨 github-wiki-see.page does not render Mediawiki. Source for crawling below. Please visit the Original URL! 🚨
== Required tools == Double Commander is developed with [https://www.freepascal.org Free Pascal] and [https://www.lazarus-ide.org Lazarus]. === Free Pascal Compiler === It is always preferred to use latest [https://www.freepascal.org/download.html FPC release] to build Double Commander. Current development version requires at least FPC 3.2.0. === Lazarus === Each Double Commander release is usually built with latest stable version of Lazarus. Current development version requires Lazarus 2.0.12 or later. We tend to use latest development version of Lazarus from [https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main Git] 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 (<code>libxxx-dev</code> 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 libx11-dev libgtk2.0-dev (only GTK2) libqt4pas-dev (only Qt4) libqt5pas-dev (only Qt5) If you don't have <code>libQt4Pas</code> in your distribution you can download it from [http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html FPC Qt4 Binding page]. Then you'll also need these dependencies: libqt4-network libqt4-webkit libqtcore4 libqtgui4 If you don't have <code>libQt5Pas</code> in your distribution you can download it from [https://build.opensuse.org/package/show/home:Alexx2000/libqt5pas here]. Double Commander requires at least Qt 5.6.0. Then you'll also need these dependencies: qt5-qmake qt5-default qtbase5-dev libqt5x11extras5-dev == Getting the source code == Double Commander's source code is stored in a [https://github.com/doublecmd/doublecmd Git repository on GitHub]. To download the current development version use the following command: git clone https://github.com/doublecmd/doublecmd.git 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 <code>components</code> directory of DC sources. You must open each <code>.lpk</code> package file: chsdet/chsdet.lpk CmdLine/cmdbox.lpk multithreadprocs/multithreadprocslaz.lpk dcpcrypt/dcpcrypt.lpk doublecmd/doublecmd_common.lpk KASToolBar/kascomp.lpk gifanim/pkg_gifanim.lpk synunihighlighter/synuni.lpk (doublecmd >= 0.8) viewer/viewerpackage.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 <code>src/doublecmd.lpi</code>. === From command line (Windows) === Use <code>build.bat</code> script to build DC on Windows. First you need the <code>lazbuild</code> utility of Lazarus to be somewhere in your PATH or you need to have an environment variable <code>LAZARUS_HOME</code> pointing to it (e.g. <code>set LAZARUS_HOME=d:\path\to\my\Lazarus</code>). Execute the script to start the build process. Make sure you use <code>beta</code> parameter if you're building for the first time, so that also components and plugins are built: > build.bat beta or alternatively without plugins > build.bat components > build.bat default === From command line (Linux, FreeBSD, macOS) === Use <code>build.sh</code> script to build DC on Linux, FreeBSD or macOS. First you need the <code>lazbuild</code> 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 <code>lazbuild</code> variable to point to it. On Linux three widgetsets are supported: GTK2, Qt4 and Qt5 (only with DC 0.8 and Lazarus 1.8). You can choose one by setting <code>lcl</code> environment variable before executing the script to either <code>gtk2</code> or <code>qt</code> or <code>qt5</code>, for example: $ lcl=qt ./build.sh beta Execute the script to start the build process. Make sure you use <code>beta</code> parameter if you're building for the first time, so that also components and plugins are built: $ ./build.sh beta or alternatively without plugins $ ./build.sh components $ ./build.sh default == 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 <code>doublecmd.err</code> 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 [https://doublecmd.sourceforge.io/mantisbt/set_project.php?project_id=1 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 [https://doublecmd.sourceforge.io/forum forum] to discuss them or post them on the [https://sourceforge.net/p/doublecmd/mailman/doublecmd-devel mailing list].