#!/bin/bash #====================================================================== # Builds CHM and HTML help files for the LazControls package using the fpdoc utility. # Requires chm and xct files for rtl, fcl, lcl, and lazutils in the Lazarus docs/chm directory. # fpdoc will fail if they are not present. # Requires git command line client to get the commit hash for the repository. #====================================================================== #======================================= # SET THE CORRECT PATHS FOR YOUR SYSTEM #======================================= # lazarus documentation directory docdir="../../../docs" # fpdoc executable directory fpcdir="../../../../lazarus-2.2.0-RC2/fpc/3.2.2/bin/x86_64-win64" # directory with lazarus git repository gitdir="../../../../usr/work/git-lazarus" # values used in the footer pkgtitle="Lazarus Controls Package (LazControls)" # CHANGE THIS BEFORE BUILDING version="2.3.0" # commit SHA commit=`git -C "$gitdir" describe --all --long | cut -d "-" -f 3 | cut -b "2-"` # date stamp in YYYY-MM-DD format dtstamp=`date +"%Y-%m-%d"` echo -e "\n\e[7m $pkgtitle $version—$commit $dtstamp \e[0m"; # generate footer with title, version, commit SHA, date stamp # footer is included using the fpdoc project file cat << EOT > lazcontrols-footer.xml
$pkgtitle | Version $version-$commit | Generated $dtstamp |