29 #include <wx/stdpaths.h>
48 #if wxUSE_ON_FATAL_EXCEPTION
49 wxHandleFatalExceptions();
52 #if defined __WXMSW__ && wxCHECK_VERSION(3,3,0)
54 SetAppearance(Appearance::System);
57 CheckConfigFilename();
63 wxFileName exeDir(wxStandardPaths::Get().GetExecutablePath());
64 exeDir.RemoveLastDir();
65 m_xrcPrefix = exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\hugin\\xrc\\";
67 locale.AddCatalogLookupPathPrefix(exeDir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) +
"share\\locale");
68 #elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
70 wxString thePath = MacGetPathToBundledResourceFile(CFSTR(
"xrc"));
76 m_xrcPrefix = thePath +
"/";
77 #elif defined UNIX_SELF_CONTAINED_BUNDLE
80 wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
81 exePath.RemoveLastDir();
82 const wxString huginRoot=exePath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
84 m_xrcPrefix = huginRoot +
"share/hugin/xrc/";
85 locale.AddCatalogLookupPathPrefix(huginRoot +
"share/locale");
89 m_xrcPrefix = INSTALL_XRC_DIR;
90 locale.AddCatalogLookupPathPrefix(INSTALL_LOCALE_DIR);
93 if ( ! wxFile::Exists(m_xrcPrefix +
"/toolbox_panel.xrc") )
95 hugin_utils::HuginMessageBox(wxString::Format(_(
"xrc directory not found, hugin needs to be properly installed\nTried Path: %s"), m_xrcPrefix), _(
"Hugin toolbox"), wxOK | wxICON_ERROR, wxGetActiveWindow());
100 wxConfigBase * config = wxConfigBase::Get();
102 config->SetRecordDefaults(
false);
106 setlocale(LC_ALL,
"");
111 bool bLInit = locale.Init(localeID);
115 DEBUG_TRACE(
"System Locale: " << locale.GetSysName().mb_str(wxConvLocal));
116 DEBUG_TRACE(
"Canonical Locale: " << locale.GetCanonicalName().mb_str(wxConvLocal))
125 locale.AddCatalog(
"hugin");
128 wxInitAllImageHandlers();
131 wxXmlResource::Get()->InitAllHandlers();
133 wxXmlResource::Get()->Load(m_xrcPrefix +
"toolbox_panel.xrc");
137 SetTopWindow(m_frame);
142 TIFFSetWarningHandler(0);
147 #if wxUSE_ON_FATAL_EXCEPTION
148 void ToolboxApp::OnFatalException()
150 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
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)