On Wed 04-Feb-2009 at 18:08 +0100, Lukáš Jirkovský wrote:
>I've been working on bug #2036114 (pass TMPDIR to external programs)
>and I've created two possible ways how to fix it.
>
>The first one (the v0 one) changes createMakefile() to add tempdir
>parameter and then create necessary changes into generated makefile.
>This is the most straightforward way how to do it. But I don't like
>it. In my opinion it's ugly.

I haven't tested it, but this sounds right.  The process as I 
understand it is run by both hugin_stitch_project and PTBatcher:

1. Create a temporary folder and put a temporary .pto project and 
Makefile in it.

2. Then `make -f /path/to/makefile all clean` is run

3. This creates all the intermediate files in the temporary folder, 
writes the final output in a normal folder and deletes the 
intermediate files.

The problem is that in (1), the temporary folder is created in the 
default system tempdir and not in the tempdir that the hugin user 
can specify in the preferences.

>So I've made another patch (the v1). This one adds #hugin_tempdir to
>the pto file.

The temporary directory should definitely be a program preference 
rather than a project setting.  Setting it in the .pto files means 
they are not portable between machines.

>Anyway I need someone to test generated makefile on Mac OS X and
>Windows (you can change it manually, see example below). I've
>successfully tested it on GNU/Linux. There's problem that I'm not sure
>if Mac OS uses export to set environment variables or setenv. Windows
>version uses for setting environment variables set, but I don't know
>if it really works as I think it works.

As I understand 'export' in this case is a Makefile internal 
directive, so it would be 'export TMPDIR=/blah' for all OS's.

>The only change in makefile is that it adds:
>export TMPDIR=/path/to/temporary/directory

-- 
Bruno

--~--~---------~--~----~------------~-------~--~----~
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