[Digikam-devel] the new pano tool

bkn bkn at ithryn.net
Thu Oct 13 15:48:30 BST 2011


Benjamin and Devs List,

Just want to give a update to the PATHs problem on OS X. Just to re-cap, there 
are two two ways to install Hugin, 

H-1) User can install Hugin through macports, in which case the binaries would 
be in /opt/local/bin (or to put it in a non-hardcoded fashion, 
KStandardDirs::installPath("exe") ).

H-2) User can install Hugin through the standalone Hugin package directly from 
Hugin's website, in which case the binaries would be in 
/Applications/Hugin/HuginTools/

Also, there are also two scenarios of launching digikam on OS X. 

D-1) User can launch digikam from the command line by executing the binary 
explicitly, in which case PATHs that a found in .profile, .bashrc et al are 
loaded into QProcess::systemEnvironment() as well as paths from /etc/path, 
which you mentioned previously. 

D-2) User can launch digikam from Finder.app, which is how most people launch 
applications in OS X. This means the user navigates to the application and 
double clicks on it to run it. The same affect applies when launching from the 
OS X Dock Bar. In this case, no paths are loaded from any shell environment; 
so anything in /etc/path, .profile, .bashrc et al is not used. This scenario is 
the most difficult to handle, but it is the likeliest of scenarios.

If the user installed Hugin using method H-1, it is straightforward to set up 
paths since we know these binaries live in the kde prefix, but the environment 
still needs to be setup after calling KProcess::clearEnvironment, which can be 
done by calling QProcess.setProcessEnvironment( 
QProcess::systemEnvironment()). It also might be necessary to add the kde 
prefix to the env too.

If the user installed Hugin using method H-2, things are more difficult, and I 
haven't found a good solution yet (even simply adding 
/Applications/Hugin/HuginTools/ to the path in the KProcess instance didn't 
seem to work). 

I think a decent solution is if the plugin can't find autooptimiser (the frist 
Hugin binary it tried to find), an option is given to the user to navigate 
where Hugin is installed and set up PATHs based on that information. 

I'm going to try a few things. It is likely going to take a couple of weeks. 
I'll report back when i have some kind of solution in place. I also have a 
hunch that a very similar problem will exist on windows when using the 
panorama tool. 

Cheers,
 -- brad





More information about the Digikam-devel mailing list