aMule Forum

English => Multiplatform => Mac OSX => Topic started by: littleb2005 on September 04, 2010, 01:23:35 PM

Title: Compiling Wxmac issues
Post by: littleb2005 on September 04, 2010, 01:23:35 PM
patch wxMac-2.8.11/src/mac/carbon/textctrl.cpp textctrl_optimization.diff
patching file wxMac-2.8.11/src/mac/carbon/textctrl.cpp
Hunk #1 FAILED at 1991.
1 out of 1 hunk FAILED -- saving rejects to file wxMac-2.8.11/src/mac/carbon/textctrl.cpp.rej

is this meant to happen wxmac wise

also what version of wxmac is required if you want to build amule from svn
Title: Re: Compiling Wxmac issues
Post by: littleb2005 on September 04, 2010, 02:25:49 PM
Index: src/mac/carbon/textctrl.cpp
===================================================================
--- src/mac/carbon/textctrl.cpp   (revision 51672)
+++ src/mac/carbon/textctrl.cpp   (working copy)
@@ -1991,17 +1991,26 @@
 
 wxTextPos wxMacMLTEControl::GetLastPosition() const
 {
-    wxTextPos actualsize = 0 ;
+    wxTextPos actualsize = 0;
 
     Handle theText ;
+#if wxUSE_UNICODE
+    OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNUnicodeTextData );
+    // all done
+    if ( err == noErr )
+    {
+        actualsize = GetHandleSize( theText )/sizeof(UniChar);
+        DisposeHandle( theText ) ;
+    }
+#else
     OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNTextData );
-
     // all done
     if ( err == noErr )
     {
         actualsize = GetHandleSize( theText ) ;
         DisposeHandle( theText ) ;
     }
+#endif
     else
     {
         actualsize = 0 ;

i have a funny feeling all i got to do is remove the 1991 line

also after reading http://trac.wxwidgets.org/ticket/9012 does that mean the patch is nolonger needed
Title: Re: Compiling Wxmac issues
Post by: littleb2005 on September 05, 2010, 05:01:14 PM
ok why didn't someone tell me the patch is no longer need man the wiki is out of date no bad feeling to anyone i hope
Title: Re: Compiling Wxmac issues
Post by: Kry on September 06, 2010, 01:08:44 AM
I didn't happen to read your thread, I guess. Did you correct the wiki?
Title: Re: Compiling Wxmac issues
Post by: littleb2005 on September 06, 2010, 09:44:38 PM
I didn't happen to read your thread, I guess. Did you correct the wiki?

no i want to try and get a working universual build from svn before i even attempt to edit the wiki
Title: Re: Compiling Wxmac issues
Post by: GonoszTopi on September 07, 2010, 08:49:45 PM
Universal build might not be possible. Did you read http://forum.amule.org/index.php?topic=17284.msg93101#msg93101 ?
Title: Re: Compiling Wxmac issues
Post by: littleb2005 on September 08, 2010, 07:11:25 AM
Universal build might not be possible. Did you read http://forum.amule.org/index.php?topic=17284.msg93101#msg93101 ?

nothing stoping me from trying  ;)
Title: Re: Compiling Wxmac issues
Post by: Kry on September 08, 2010, 09:23:30 AM
Do try. It's very much possible.