[ptx] Building hugin on Mac OS X 10.3

Ippei UKAI ippei_ukai at mac.com
Tue Jun 1 22:29:18 BST 2004


Thanks for your reply.

I realised that many parts of the source distinguish Mac and UNIX.
However, Mac OS X is a kind of UNIX as the core OS of Mac, Darwin is 
based on BSD.
With built-in X11 from Apple, ported distributions like Fink works just 
fine as many other distributions works.
For example, I got Ethereal from Fink, working in X11 from Apple with 
ported gtk+; all in binary thus takes only 5 mins to install.
There are still many different points, but Mac is one of unix based 
OSes at least.

Anyway, I already realised and fixed the temp dir problem, but the 
situation isn't very different.
Hugin isn't working yet. Windows does not come forward (active), and I 
cannot use it.
I do not know what is wrong, but I think it is better to first solve 
the stuff I commented out.
It is now like this:
#ifdef __WXMSW__
      DEBUG_DEBUG("figuring out windows temp dir");
      if (m_workDir == "") {
          /* added by Yili Zhao */
          char buffer[255];
          GetTempPath(255, buffer);
          m_workDir = buffer;
      }
  #else
      DEBUG_DEBUG("on unix..");
      if (m_workDir == "") {
          m_workDir = "/tmp";
      }
  #endif


First, I have to make it clear that I am using wxWindows 2.5.1 and gcc 
3.1
What compile error I got the most was wxImage::ConvertToBitmap().
However I found wxWin documents recommends to use 
wxBitmap::wxBitmap(wxImage), so I changed all like this:
    wxImage p;
    p.LoadFile("control.bmp");
//   control = p.ConvertToBitmap(); by Ippei
    control = (wxBitmap) p();

Actually this is the only one I got fixed.

Here is the List of points I got error, and commented out. (listing 
only in hugin/src/hugin/ )

<ImageCenter.cpp>
  OnPaint(...) is not receiving ...Event class

BEGIN_EVENT_TABLE(CenterCanvas, wxPanel)
     EVT_SIZE   ( CenterCanvas::Resize )
     EVT_MOUSE_EVENTS ( CenterCanvas::OnMouse )
//    EVT_PAINT ( CenterCanvas::OnPaint )
// by ippei
END_EVENT_TABLE()


<LensPanel.cpp>
  wxCheckBow::Clear() does not exist.

/* by Ippei
             XRCCTRL(*this, "lens_inherit_v", wxCheckBox)->Clear();
             XRCCTRL(*this, "lens_inherit_a", wxCheckBox)->Clear();
             XRCCTRL(*this, "lens_inherit_b", wxCheckBox)->Clear();
             XRCCTRL(*this, "lens_inherit_c", wxCheckBox)->Clear();
             XRCCTRL(*this, "lens_inherit_d", wxCheckBox)->Clear();
             XRCCTRL(*this, "lens_inherit_e", wxCheckBox)->Clear();
*/

<RunOptimizerFrame.cpp>
  "wxString::BeforeFirst(char) is not defined". (I don't know why this 
is happening but wx's documentation says "The usage of std::string 
compatible functions is strongly advised" for compatibility reason.)

/* Ippei
     while ( m_process->IsInputOpened() && m_process->IsInputAvailable() 
){
         line = m_in->ReadLine();
         wxString rest;
         if (!line.StartsWith("after ", &rest)) {
             continue;
         }

         bool ok;
         ok = rest.BeforeFirst(' ').ToLong(&iteration);
         assert(ok);
         size_t t = line.First(": ");
         wxString t2 = line.substr(t+2).BeforeFirst(' ');
         diff = utils::lexical_cast<double>(t2.c_str());

         DEBUG_DEBUG("iteration: " << iteration << " difference:" << 
diff);
     }
*/

Of course the toggle buttons etc. are already changed as the previous 
instruction as well as configure to wx-mac-2.5

By the way, why old copies of panorama tools header files are in 
src/PanoImage/?

  >>> 鵜飼 一平  (UKAI Ippei)  >>>>>>>>>>>>>>>>>>>>>>>>>
   My general e-mail and AIM:  ippei_ukai at mac.com
   Homepage:  http://homepage.mac.com/ippei_ukai/

On 1 Jun 2004, at 18:14, Bruno Postle wrote:

> On Mon 31-May-2004 at 15:59 +0100, Ippei UKAI wrote:
>
>> I'm very interested in, and googled "hugin on mac OS X" and found
>> http://www.email-lists.org/pipermail/ptx/2004-February/001375.html
>> Even though it is written for version 10.1, I proceed most of the
>> process with 10.3.
>
> This might be more successful than 10.1.
>
>> The app starts up, displays the main window, and error message.
>> Here is the screenshot
>> http://homepage.mac.com/ippei_ukai/temp/hugin1.pdf
>
> I got past this error when I changed these two lines in
> src/hugin/huginApp.cpp:
>
>      DEBUG_ERROR("don't know how to find the temp dir on mac");
>      m_workDir = "";
>
> ..so they looked like this:
>
>      //DEBUG_ERROR("don't know how to find the temp dir on mac");
>      m_workDir = "/tmp";
>
>> By the way, anyone tried to build hugin with wx-gtk from fink?
>> I think it is easier. (I am just following the instruction above)
>
> Would this involve installing all of XFree86 and gtk?  This might
> actually work better than trying to run it as a native mac
> application.
>
> -- 
> Bruno



More information about the ptX mailing list