On 20 Mai, 09:11, kfj <[email protected]> wrote:
> Hi all!
>
> I have updated the README for hsi/hpi and added two plugins to live
> with the hugin code base.

I had a look at the data that ended up in the repo and noticed that
parts of the README for hsi were deleted and some text was added. The
section (2.) affected gives some development background and explains
the changes I made to the hugin body of code to accomodate hsi/hpi and
my use of preprocessor directives to steer compilation with and
without the BUILD_HSI switch activated. I feel in a README file which
lives in a source directory such information is relevant and I don't
understand why it has been deleted. My main problem with hugin's body
of code is lack of documantation, not too much of it. Maybe it was a
mistake? Or has the code been modified so that my explanations have
been rendered obsolete? The deleted portion reads:

******* begin quote ************
Currently the only mode of distribution is source code, but this may
change now that the development branch (python_scripting) has been
merged into the default code line and compiling a version of hugin
with hsi/hpi capability is only a cmake define away. It is my hope
that compilation with this capability will become the default
eventually.

There are two levels of source you could start from. If you want to go
all the way from the interface definition file, you'll need SWIG - I
used SWIG 2.0.1 which I built from source; hugin's code is quite
complex C++ with lots of templates and STL use, so older versions of
SWIG will not be able to generate the interface. SWIG will generate
the source for the wrapper and a Python file to access it. Note that
readymade swig 2.0 packets may install the swig executable named
'swig2.0' in which case cmake may not find it and you have to add
something like -DSWIG_EXECUTABLE=/usr/bin/
swig2.0 to the cmake command line.

You might also just take the wrapper (hsiPYTHON_wrap.cxx, it's the C++
code which swig generates from the interface file), compile and link
it and omit the SWIG step. If you want to do this you'll have to edit
the cmake code accordingly by throwing out the references to hsi.i and
using hsiPYTHON_wrap.cxx as source for _hsi.so; you'll also have to
use the prefabricated version of hsi.py. Note that the latter approach
is meant as a last-resort route and isn't officially supported,
meaning that you won't get hsiPYTHON_wrap.cxx from official sources.

The remainder of this text assumes you have it all and you're going
all the way, and, at least for the time being, hsiPYTHON_wrap.cxx
isn't in the repo and use of SWIG is mandatory to enforce consistence
of the scripting interface with hugin, so that any change in the hugin
headers is reflected in a changed interface.

Before I continue, let me point out the minor changes I have made in
the existing body of hugin code to integrate my work. All the changes
are encapsulated in conditional compilation directives - If the change
affects C++ code, the relevant definition is HUGIN_HSI - this is
defined globally via cmake for all compilation of the python_scripting
branch. Some C++ header files are processed by SWIG and some code in
them isn't SWIGable, those bits are taken out by #ifndef SWIG
directives, but this doesn't affect their compilation as C++ code.
Finally, some C++ headers had to be C-preprocessed for use with SWIG.
In this situation it is desirable to exclude parts of these headers,
because their precompiled equivalent would introduce large amounts of
code into the interface which isn't wanted there. So these sections,
typically containing include directives for other header files, are
excluded by #ifndef _HSI_IGNORE_SECTION, which is only defined while
the actual C-preprocessing is done.

All code for hsi/hpi is in a separate folder called
hugin_script_interface in the src directory. The only additional code
outside this directory consists of the abovementioned compatible
changes and some cmake code to anchor hsi/hpi in the project.

************** end quote ***************

and this has been replaced by

************* begin quote **************
The Python support is a built time option. You need to activate the
Python support at built time, it can not activated at run time.
[sic]
************ end quote ****************

Some of the how-to-compile information was extended and put into the
next section, but a lot of the text is missing. What do you think?

Kay

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to