view OrthancServer/Resources/CodeModel/README.txt @ 6277:519b1e2af1a8

pystache is not needed to build the code model
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 Aug 2025 07:38:01 +0200
parents 43a7c599aace
children 1d6cf7bf92cc
line wrap: on
line source


Introduction
============

The "./GenerateCodeModel.py" Python script analyzes the header of the
Orthanc Plugin SDK using clang, and saves this code model as a JSON
file.

The code model can then be used to generate wrappers. It is notably
used by the "orthanc-java" (starting with its release 1.0) and
"orthanc-python" plugins (starting with its release 4.3).

NB: This file was originally part of the "orthanc-java" project.


Usage on Ubuntu 22.04 LTS
=========================

Executing with default parameters:

$ sudo apt install python3-clang-14
$ python3 ./GenerateCodeModel.py


Or, if you want to have more control:

$ python3 ./GenerateCodeModel.py \
          --libclang=libclang-14.so.1 \
          --source ../../Plugins/Include/orthanc/OrthancCPlugin.h \
          --target ../../Plugins/Include/orthanc/OrthancPluginCodeModel.json


Generation using Docker
=======================

$ ./docker-run.sh