- Successfully build FreeCAD
- Install sphinx: www.sphinx-doc.org/en/stable/usage/installation.html
- Install breathe: https://github.com/michaeljones/breathe
- Install gitpython: https://gitpython.readthedocs.io/en/stable/intro.html
- Install doxygen: http://www.doxygen.nl/manual/install.html
- (optional) Install entr, if you'd like to build the documentation automatically on changes: http://eradman.com/entrproject/
Edit the variables_file
and set the variables to their appropriate values,
suitable for your personal development environment.
They are, respectively:
- The command or script that builds FreeCAD from source;
- The absolute path to the root directory of the build location of FreeCAD;
- The absolute path to the root directory of the source code location of FreeCAD.
Now run these commands to build the entire documentation.
source variables_file
./build_scripts/build_all.sh
To auto-generate sphinx documentation when you make a source code change, edit
the variables_file
and set the variables to their appropriate values,
suitable for your personal development environment.
They are, respectively:
- The command or script that builds FreeCAD from source;
- The absolute path to the root directory of the build location of FreeCAD;
- The absolute path to the root directory of the source code location of FreeCAD.
Now run these commands to build the entire documentation.
source variables_file
./build_scripts/build_all.sh
Now run the following commands in separate terminals to regenerate the documentation whenever specific sections change. Feel free to exclude any if you don't intend to edit the relevant file types.
source variables_file
find ./source | entr ./build_scripts/change_sphinx.sh
source variables_file
find $FREECAD_SOURCE_LOCATION -name *.py | entr ./build_scripts/change_python.sh
This is more complicated. To bring compile times down to usable levels, each of
the major parts of the FreeCAD code, such as Arch, Draft, Main, or Gui are
processed seperately. You can see the different sections in the
doxygen_and_breathe
directory.
To process changes to the c++ code in each of these sections, export an
enviroment variable named section
, with the value being one of the
directories in the doxygen_and_breathe
directory. EG:
export section=Draft
Then run the following commands.
source variables_file
find $FREECAD_SOURCE_LOCATION -name *$section*.cpp -o -name *$section*.h -o -name *$section*.dox | entr ./build_scripts/change_cpp.sh $section
Create a new terminal and repeat for each of the sections of c++ code you are working on.