29 #include <wx/stdpaths.h>
48 #if wxUSE_ON_FATAL_EXCEPTION
49 wxHandleFatalExceptions();
53 CheckConfigFilename();
59 wxFileName exeDir(wxStandardPaths::Get().GetExecutablePath());
60 exeDir.RemoveLastDir();
61 m_xrcPrefix = exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\hugin\\xrc\\";
63 locale.AddCatalogLookupPathPrefix(exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\locale");
64 #elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
66 wxString thePath = MacGetPathToBundledResourceFile(CFSTR(
"xrc"));
69 wxMessageBox(_(
"xrc directory not found in bundle"), _(
"Fatal Error"));
72 m_xrcPrefix = thePath +
"/";
73 #elif defined UNIX_SELF_CONTAINED_BUNDLE
76 wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
77 exePath.RemoveLastDir();
78 const wxString huginRoot=exePath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
80 m_xrcPrefix = huginRoot +
"share/hugin/xrc/";
81 locale.AddCatalogLookupPathPrefix(huginRoot +
"share/locale");
85 m_xrcPrefix = INSTALL_XRC_DIR;
86 locale.AddCatalogLookupPathPrefix(INSTALL_LOCALE_DIR);
89 if ( ! wxFile::Exists(m_xrcPrefix +
"/toolbox_panel.xrc") )
91 wxMessageBox(wxString::Format(_(
"xrc directory not found, hugin needs to be properly installed\nTried Path: %s"), m_xrcPrefix), _(
"Fatal Error"));
96 wxConfigBase * config = wxConfigBase::Get();
98 config->SetRecordDefaults(
false);
102 setlocale(LC_ALL,
"");
107 bool bLInit = locale.Init(localeID);
111 DEBUG_TRACE(
"System Locale: " << locale.GetSysName().mb_str(wxConvLocal));
112 DEBUG_TRACE(
"Canonical Locale: " << locale.GetCanonicalName().mb_str(wxConvLocal))
121 locale.AddCatalog(
"hugin");
124 wxInitAllImageHandlers();
127 wxXmlResource::Get()->InitAllHandlers();
129 wxXmlResource::Get()->Load(m_xrcPrefix +
"toolbox_panel.xrc");
133 SetTopWindow(m_frame);
138 TIFFSetWarningHandler(0);
143 #if wxUSE_ON_FATAL_EXCEPTION
144 void ToolboxApp::OnFatalException()
146 GenerateReport(wxDebugReport::Context_Exception);
void registerPTWXDlgFcn()
include file for the hugin project
include file for the hugin project
functions for interaction with the hugin configuration file