- Table of contents
- Dependencies
- Preparation
- Code and test
- Package
- Wrapup
Dependencies¶
Base environment¶
This project is managed with GNU Autotools (the magic behind "./configure && make all install
"). It needs a unix-like shell command line which is native with all linux distributions, with MacOS, but not with Microsoft Windows.
For windows developpers, install either MinGW with MSYS2 or Cygwin. I recommend the first one because Cygwin needs runtime dependencies which needs to be packaged with the builds. Whatever the choice, I will not document here how to install the installations processes, please read the related install docs.
I assume that MacOS developers already have HomeBrew installed.
Development repository¶
The project uses the Mercurial:https://www.mercurial-scm.org Version Control System and publish the reporitory on the internet. The first step is to download and install Mercurial.
Debian based distributions (Ubuntu, Mint, ...)¶
apt-get install -y mercurial
RedHat based distributions (Fedora, Rocky, Centos, RHEL, ...)¶
yum install mercurial
MacOS¶
brew install mercurial
Windows¶
A whole Cygwin or MinGW development environment is needed, thus I recommend to install a commandline mercurial client. And, given that Windows users prefer mouse over keyboard, TortoiseHg can be also installed to integrate Mercurial features in Windows file explorer.
Compiler¶
Compilation toolchain¶
Debian¶
apt-get install -y build-essential
RedHat¶
MacOS¶
xcode-select --install
Windows MinGW/MSYS2¶
Autotools¶
Autotools generates files such as configure which are distributed with the sources to compile them. This project does not store generated files in the repository. Thus, starting from the repository means to have autotools installed, to generate all the files needed to compile the project.
apt-get install -y autoconf autogen libtool pkg-config
brew install autoconf autogen libtool pkg-config
Build libraries¶
Debian¶
apt-get install -y libssl-dev
RedHat¶
MacOS¶
brew install openssl@3
Windows¶
Coding helpers (optional)¶
CppCheck (code static analysis)¶
AStyle (code formatting)¶
Preparation¶
Get sources¶
Generate autotools files¶
Library mandatory dependencies¶
For the developers, libopt was already installed with autogen and is available system-wide. For the maintainers, to avoid the need for autogen, a copy of libopts in automatically distributed in the source package.
The mandatory libssl-dev and libssl libraries should already be installed previously to allow configure
to be executed.
Library optional dependencies¶
Optionaly, the check library can be installed to allow unittesting.
Debian¶
apt-get install -y check
RedHat¶
MacOS¶
brew install check
Windows¶
Code and test¶
From here, all the development specific dependencies are installed, but the project also have build dependencies (libraries).
Configure¶
./configure
Reformat the code¶
make astyle
Analyze the code¶
make cppcheck
xdg-open cppcheck/index.html
make cppcheck-clean
API and Source documentation¶
Included by default in make all
target
make html
make pdf
make -C doc clean
Compilation and tests (unit and functional)¶
make all check
make clean
Installation and check¶
make DESTDIR=`pwd`/_inst install installcheck
make DESTDIR=`pwd`/_inst uninstall
Package¶
Source distribution and check¶
make dist distcheck
make distclean
Linux AppImage¶
make linux-appimage
make linux-clean
Linux Debian/Ubuntu¶
make debian-deb
make debian-clean
Linux RedHat/Fedora/CentOS/Rocky¶
apt-get install rpm
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
make redhat-rpm
make redhat-clean
Windows ZIP/Installer¶
make windows-zip
make windows-exe
make windows-clean
MacOS ZIP/DMG/PKG¶
make macos-zip
make macos-dmg
make macos-pkg
make macos-clean
Wrapup¶