<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>3. Binding Project File — GeneratorRunner v0.6.14 documentation</title> <link rel="stylesheet" href="_static/pysidedocs.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '0.6.14', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="GeneratorRunner v0.6.14 documentation" href="index.html" /> <link rel="prev" title="2. Command line options" href="commandlineoptions.html" /> </head> <body> <div id="container"> <div class="header"> <div class="header_container"> <div class="logo"><a href="http://www.pyside.org"><img alt="PySide" src="_static/pysidelogo.png" width="199" height="102" /></a></div> <div class="related"> <ul> <li><a href="index.html">GeneratorRunner v0.6.14 documentation</a></li> </ul> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="contents.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">3. Binding Project File</a><ul> <li><a class="reference internal" href="#the-project-file-structure">3.1. The project file structure</a></li> <li><a class="reference internal" href="#project-file-tags">3.2. Project file tags</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="commandlineoptions.html" title="previous chapter">2. Command line options</a></p> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" id="q" size="18" /> <input type="submit" value="Go" id="search_button" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="binding-project-file"> <span id="project-file"></span><h1>3. Binding Project File<a class="headerlink" href="#binding-project-file" title="Permalink to this headline">¶</a></h1> <p>Instead of directing the Generator behaviour via command line, the binding developer can write a text project file describing the same information, and avoid the hassle of a long stream of command line arguments.</p> <div class="section" id="the-project-file-structure"> <span id="project-file-structure"></span><h2>3.1. The project file structure<a class="headerlink" href="#the-project-file-structure" title="Permalink to this headline">¶</a></h2> <p>Here follows a comprehensive example of a generator project file.</p> <blockquote> <div><div class="highlight-ini"><pre>[generator-project] generator-set = path/to/generator/CHOICE_GENERATOR header-file = DIR/global.h" /> typesystem-file = DIR/typesystem_for_your_binding.xml output-directory location="OUTPUTDIR" /> include-path = path/to/library/being/wrapped/headers/1 include-path = path/to/library/being/wrapped/headers/2 typesystem-path = path/to/directory/containing/type/system/files/1 typesystem-path = path/to/directory/containing/type/system/files/2 enable-parent-ctor-heuristic</pre> </div> </div></blockquote> </div> <div class="section" id="project-file-tags"> <h2>3.2. Project file tags<a class="headerlink" href="#project-file-tags" title="Permalink to this headline">¶</a></h2> <p>The generator project file tags are in direct relation to the <a class="reference internal" href="commandlineoptions.html#command-line"><em>command line arguments</em></a>. All of the current command line options provided by GeneratorRunner were already seen on the <a class="reference internal" href="#project-file-structure"><em>The project file structure</em></a>, for new command line options provided by additional generator modules (e.g.: qtdoc, Shiboken) could also be used in the generator project file following simple conversion rules.</p> <p>For tags without options, just write as an empty tag without any attributes. Example:</p> <blockquote> <div><div class="highlight-bash"><div class="highlight"><pre>--BOOLEAN-ARGUMENT </pre></div> </div> </div></blockquote> <p>becomes</p> <blockquote> <div><div class="highlight-ini"><pre>BOOLEAN-ARGUMENT</pre> </div> </div></blockquote> <p>and</p> <blockquote> <div><div class="highlight-bash"><div class="highlight"><pre>--VALUE-ARGUMENT<span class="o">=</span>VALUE </pre></div> </div> </div></blockquote> <p>becomes</p> <blockquote> <div><div class="highlight-ini"><div class="highlight"><pre><span class="na">VALUE-ARGUMENT</span> <span class="o">=</span> <span class="s">VALUE</span> </pre></div> </div> </div></blockquote> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="footer"> <a href="http://www.indt.org.br"><img src="_static/logo_indt.jpg" alt="Indt" border="0" /></a> <a href="http://www.openbossa.org"><img src="_static/logo_openbossa.png" alt="Openbossa" border="0" /></a> <a href="http://qt.nokia.com/"><img src="_static/logo_qt.png" alt="Qt" border="0" /></a> <a href="http://www.python.org"><img src="_static/logo_python.jpg" alt="Python" border="0" /></a> </div> </div> </body> </html>