29 #include <wx/stdpaths.h>
50 #if wxUSE_ON_FATAL_EXCEPTION
51 wxHandleFatalExceptions();
54 #if defined __WXMSW__ && wxCHECK_VERSION(3,3,0)
56 SetAppearance(Appearance::System);
59 CheckConfigFilename();
65 wxFileName exeDir(wxStandardPaths::Get().GetExecutablePath());
66 exeDir.RemoveLastDir();
67 m_xrcPrefix = exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\hugin\\xrc\\";
69 locale.AddCatalogLookupPathPrefix(exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\locale");
70 #elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
72 wxString thePath = MacGetPathToBundledResourceFile(CFSTR(
"xrc"));
73 if (thePath == wxEmptyString) {
77 m_xrcPrefix = thePath +
"/";
78 #elif defined UNIX_SELF_CONTAINED_BUNDLE
81 wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
82 exePath.RemoveLastDir();
83 const wxString huginRoot=exePath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
85 m_xrcPrefix = huginRoot +
"share/hugin/xrc/";
86 locale.AddCatalogLookupPathPrefix(huginRoot +
"share/locale");
90 m_xrcPrefix = INSTALL_XRC_DIR;
91 locale.AddCatalogLookupPathPrefix(INSTALL_LOCALE_DIR);
94 if ( ! wxFile::Exists(m_xrcPrefix +
"/lenscal_frame.xrc") )
96 hugin_utils::HuginMessageBox(wxString::Format(_(
"xrc directory not found, hugin needs to be properly installed\nTried Path: %s"), m_xrcPrefix), _(
"Calibrate_lens_GUI"), wxOK | wxICON_ERROR, wxGetActiveWindow());
101 wxConfigBase * config = wxConfigBase::Get();
103 config->SetRecordDefaults(
false);
107 setlocale(LC_ALL,
"");
113 bLInit = locale.Init(localeID);
116 DEBUG_TRACE(
"System Locale: " << locale.GetSysName().mb_str(wxConvLocal))
117 DEBUG_TRACE(
"Canonical Locale: " << locale.GetCanonicalName().mb_str(wxConvLocal))
124 locale.AddCatalog(
"hugin");
127 wxInitAllImageHandlers();
130 wxXmlResource::Get()->InitAllHandlers();
133 wxXmlResource::Get()->Load(m_xrcPrefix +
"lenscal_frame.xrc");
134 wxXmlResource::Get()->Load(m_xrcPrefix +
"lensdb_dialogs.xrc");
135 wxXmlResource::Get()->Load(m_xrcPrefix +
"dlg_warning.xrc");
139 SetTopWindow(m_frame);
148 TIFFSetWarningHandler(0);
153 #if wxUSE_ON_FATAL_EXCEPTION
154 void LensCalApp::OnFatalException()
156 GenerateReport(wxDebugReport::Context_Exception);
xrc handler for LensCalImageCtrl
void registerPTWXDlgFcn()
include file for the hugin project
declaration of preview for lens calibration gui
include file for the hugin project
The application class for lens_calibrate_gui .
functions for interaction with the hugin configuration file
declaration of application class for lens calibrate application
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename)