From bc93670d3b2b69ea2cdd799444b57dce24b8be94 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Sun, 7 Dec 2003 21:11:49 +0000 Subject: [PATCH] corrected Unicode conversion when replacing shared library extension with ".rsrc" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 11 +++++++---- src/mac/carbon/app.cpp | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 788986f20e..0c8413941f 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -811,7 +811,11 @@ void wxStAppResource::OpenSharedLibraryResource(const void *initBlock) // allocate copy to replace .dylib.* extension with .rsrc if (theLibPath != NULL) { - theResPath = theLibPath; +#if wxUSE_UNICODE + theResPath = wxString(theLibPath, wxConvLocal); +#else + theResPath = wxString(theLibPath); +#endif // replace '_core' with '' in case of multi-lib build theResPath.Replace(wxT("_core"), wxEmptyString); // replace ".dylib" shared library extension with ".rsrc" @@ -837,9 +841,8 @@ void wxStAppResource::OpenSharedLibraryResource(const void *initBlock) } if (theErr != noErr) { #ifdef __WXDEBUG__ - fprintf(stderr, - wxT("unable to open wxMac resource file '%s'\n"), - theResPath.mb_str() ); + wxLogDebug( wxT("unable to open wxMac resource file '%s'\n"), + theResPath.mb_str() ); #endif // __WXDEBUG__ } diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 788986f20e..0c8413941f 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -811,7 +811,11 @@ void wxStAppResource::OpenSharedLibraryResource(const void *initBlock) // allocate copy to replace .dylib.* extension with .rsrc if (theLibPath != NULL) { - theResPath = theLibPath; +#if wxUSE_UNICODE + theResPath = wxString(theLibPath, wxConvLocal); +#else + theResPath = wxString(theLibPath); +#endif // replace '_core' with '' in case of multi-lib build theResPath.Replace(wxT("_core"), wxEmptyString); // replace ".dylib" shared library extension with ".rsrc" @@ -837,9 +841,8 @@ void wxStAppResource::OpenSharedLibraryResource(const void *initBlock) } if (theErr != noErr) { #ifdef __WXDEBUG__ - fprintf(stderr, - wxT("unable to open wxMac resource file '%s'\n"), - theResPath.mb_str() ); + wxLogDebug( wxT("unable to open wxMac resource file '%s'\n"), + theResPath.mb_str() ); #endif // __WXDEBUG__ } -- 2.49.0