From: <da...@us...> - 2008-01-23 11:49:02
|
Revision: 2689 http://hugin.svn.sourceforge.net/hugin/?rev=2689&view=rev Author: dangelo Date: 2008-01-23 03:49:01 -0800 (Wed, 23 Jan 2008) Log Message: ----------- applied only '[ 1876976 ] Fixes for non-self-contained Mac app to compile' by Wim Lewis Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.cpp hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/PanoPanel.cpp Modified: hugin/trunk/src/hugin1/base_wx/platform.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 11:49:01 UTC (rev 2689) @@ -41,14 +41,18 @@ } -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath) +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath) { wxString theResult = wxT(""); - CFURLRef bundleURL = CFURLCreateWithString(NULL,bundlePath,NULL); + CFStringRef cfBundlePath = MacCreateCFStringWithWxString(bundlePath); + + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(NULL, cfBundlePath, kCFURLPOSIXPathStyle, TRUE); + CFRelease (cfBundlePath); + if(bundleURL == NULL) { - DEBUG_ERROR("Mac: CFURL from string failed." ); + DEBUG_ERROR("Mac: CFURL from string (" << bundlePath << ") failed." ); return theResult; } @@ -97,7 +101,7 @@ #if defined MAC_SELF_CONTAINED_BUNDLE -wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename) +wxString MacGetPathToBundledAppMainExecutableFile(const wxString& unusedFilename) { wxString theResult = wxT(""); @@ -240,6 +244,7 @@ return theResult; } +#endif // MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToUserDomainTempDir() { @@ -263,6 +268,4 @@ return tmpDirPath; } -#endif // MAC_SELF_CONTAINED_BUNDLE - -#endif // __WXMAC__ \ No newline at end of file +#endif // __WXMAC__ Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 11:49:01 UTC (rev 2689) @@ -36,17 +36,19 @@ #include <wx/mac/private.h> CFStringRef MacCreateCFStringWithWxString(const wxString& string); -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath); +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath); + #if defined MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToBundledResourceFile(CFStringRef filename); wxString MacGetPathToBundledExecutableFile(CFStringRef filename); wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename); -wxString MacGetPathToUserDomainTempDir(); #endif // MAC_SELF_CONTAINED_BUNDLE +wxString MacGetPathToUserDomainTempDir(); + #endif //__WXMAC__ #endif Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 11:49:01 UTC (rev 2689) @@ -623,11 +623,9 @@ } #elif defined __WXMAC__ // HuginStitchProject installed in INSTALL_OSX_BUNDLE_DIR - wxString hugin_stitch_project(wxT(INSTALL_OSX_BUNDLE_DIR)); - hugin_stitch_project.append(wxT("HuginStitchProject.app")); - CFStringRef bundlePath = MacCreateCFStringWithWxString(hugin_stitch_project); - wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(bundlePath); - CFRelease(bundlePath); + wxFileName hugin_stitch_project_app(wxT(INSTALL_OSX_BUNDLE_DIR), wxEmptyString); + hugin_stitch_project_app.AppendDir(wxT("HuginStitchProject.app")); + wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(hugin_stitch_project_app.GetFullPath()); #else wxString hugin_stitch_project = wxT("hugin_stitch_project"); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |