libpurple chat libs here to help out Arminius, here was how it all started :)

        23:09 -!- Irssi: Starting query in iphone with Arminius
        23:09 [Arminius] You've gotten gettext and glib working, critical parts of libpurple, 
        but I'm going to be honest, I don't think I can do it and I think that 
        maybe - just maybe - you could

We have a great chat client up here at: apolloim
A project that was worth helping out with, they are doing some amazing things.
Hope this helps guys!

(p.s. this code probably will only work for them)



APOLLOIM V1.0.0 Released @ http://www.apolloapp.com/ (23rd Sept 2007)

Great job team!


UPDATE 7-09-2007

ApolloIM first login call backs completed!

DNS is still sickly - here is the hack:

# grep login /etc/hosts
64.12.161.153 login.oscar.aol.com


# ./ApolloIM
2007-09-07 12:23:03.542 ApolloIM[5116:d03] ApolloIMApp.m>> Loading..
2007-09-07 12:23:03.551 ApolloIM[5116:d03] ApolloIMApp.m>> Initing _window...
2007-09-07 12:23:03.559 ApolloIM[5116:d03] ApolloIMApp.m>> Initing startView...
2007-09-07 12:23:03.563 ApolloIM[5116:d03] !!!!!!!!!!!!!!!!!!!!!!!!!!!!Loading Preferences...
2007-09-07 12:23:03.565 ApolloIM[5116:d03] Reading...
2007-09-07 12:23:03.568 ApolloIM[5116:d03] Setting...
2007-09-07 12:23:03.570 ApolloIM[5116:d03] Green means go.

[snip]

(12:23:10) account: Connecting to account ********
(12:23:10) prefs: /purple/savedstatus/default changed, scheduling save.
(12:23:10) prefs: /purple/savedstatus/idleaway changed, scheduling save.
(12:23:10) prefs: /purple/savedstatus/isidleaway changed, scheduling save.

[snip]

(12:23:11) blist: Updating buddy status for ********** (AIM)
(12:23:11) oscar: unknown short capability: {f007}
(12:23:11) oscar: unknown short capability: {f008}
(12:23:11) oscar: unknown short capability: {0104}
(12:23:11) proxy: Connected to 205.188.13.40:5190.
(12:23:11) oscar: connected to FLAP server of type 0x0010
(12:23:11) oscar: FLAP connection of type 0x0007 is now fully connected
(12:23:11) oscar: connected to admin
(12:23:11) oscar: formatting screen name
(12:23:11) oscar: FLAP connection of type 0x0018 is now fully connected
(12:23:11) oscar: FLAP connection of type 0x000d is now fully connected
(12:23:11) oscar: FLAP connection of type 0x0010 is now fully connected
(12:23:11) oscar: no more icons to request
(12:23:11) oscar: account info: because of change, perms=0x0003, err=0x0000, url=(null), sn=********, email=(null)
(12:23:11) oscar: chat info: Chat Rights:
(12:23:11) oscar: chat info:    Max Concurrent Rooms: 10
(12:23:11) oscar: chat info:    Exchange List: (15 total)
(12:23:11) oscar: chat info:            2    
(12:23:11) oscar: chat info:            4    
(12:23:11) oscar: chat info:            5    
(12:23:11) oscar: chat info:            6    




UPDATE 6-09-2007

SSL fixed.  The required libs are above ssl.v3.so.tgz, they need to go in ~/.purple/plugins

# pwd
/private/var/root/.purple
# ls -ltra plugins/
total 3260
-rw-r--r-- 1 root wheel 2178320 Sep  6 14:20 ssl-gnutls.so
-rw-r--r-- 1 root wheel 1156880 Sep  6 14:20 ssl.so

For now edit /etc/hosts and add the following (yes I know this is an *evil* hack):

65.54.179.216 nexus.passport.com

then MSN can connect, resolver is still poorly for CNAMES, can't work it out yet,
but for now this hack shows that we can connect to MSN w/o any issues so far:


x 15:38:38 dns: Successfully sent DNS request to child 7416   x
x 15:38:39 dns: Got response for 'login.live.com'             x
x 15:38:39 dnsquery: IP resolved for login.live.com           x
x 15:38:39 proxy: Attempting connection to 65.54.183.203      x
x 15:38:39 proxy: Connecting to login.live.com:443 with no    x
x proxy                                                       x
x 15:38:39 proxy: Connection in progress                      x
x 15:38:39 proxy: Connected to login.live.com:443.            x
x 15:38:39 gnutls: Handshaking                                x
x 15:38:40 gnutls: Handshaking                                x
x 15:38:40 gnutls: Handshaking                                x
x 15:38:40 gnutls: Handshaking                                x
x 15:38:40 gnutls: Handshake complete                         x
x 15:38:40 msn: Sending: {GET /login2.srf HTTP/1.1            x
x Authorization: Passport1.4                                  x
---------------------------------------------------------------


Even managed an online chat with pumpkin - cheers mate!



UPDATE [0.7] 3-09-2007

File xfer of a netstat binary between two iphones, each running native finch,
one in Boston, one in Austin, Tx:


x (23:08:06) You canceled the transfer of netstat                      x
x (23:08:39) Offering to send netstat to nsgn-iphone                   x
x (23:08:56) core-boston: ok proxy off - trying to send again          x
x (23:09:46) Transfer of file netstat complete                         x
x (23:09:56) core-boston: RESULT!!!!                                   x
x (23:09:58) nsgn-iphone: YEAH                                         x 
x______________________________________________________________________x


and the binary worked on the iphone in Texas :))

Thanks nsgn!


UPDATE [0.6] 3-09-2007

Native AIM session via finch on iphone - I think my work here is done :)

UPDATE [0.5] 3-09-2007 First AIM chat held today via purple. I needed to map keys for F10 and F11 in OSX Terminal.app like this: Then I could get my buddy list going: How can I add a buddy, or a chat, or a group? * Select a group in the buddylist. * Press F11 to bring out the context menu. Select "Add Buddy" or "Add Chat". UPDATE [0.4] 3-09-2007 Finch IRC working, now I have arrow keys. Takes a while to join and puts cpu at 100% for a few seconds ;-) 14:45 [ctcp(corepurple)] VERSION 14:45 CTCP VERSION reply from corepurple: Purple IRC
UPDATE [0.3] 3-09-2007 Arrow keys are now working! this is a great resource! I needed this from the page above: My arrow keys are not working. What can I do? * Make sure there is a correct terminfo setting for your terminal. For example, try setting $TERM to "screen" screen worked for me. Now I can use the arrow keys! UPDATE [0.2] 3-09-2007 Note for finch and Terminal.app: You need to enter Terminal's Window Settings, then select Keyboard. Make sure the "Use option key as meta key" checkbox is enabled. On a Mac keyboard, the ALT key is the OPTION key, so this will properly map the meta key strokes Result! - AIM connected using finch!: (dns resolution is still broken) - hard code server name to login.messaging.aol.com again same cname issues as I've seen before - will fix/hack this up later on # ./netstat -n Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.1.130.49229 205.188.13.16.5190 ESTABLISHED tcp4 0 0 192.168.1.130.49228 64.12.201.42.5190 ESTABLISHED tcp4 0 0 192.168.1.130.49227 205.188.248.134.5190 ESTABLISHED tcp4 0 0 192.168.1.130.49226 205.188.153.2.5190 ESTABLISHED tcp4 0 0 192.168.1.130.49225 205.188.9.9.5190 ESTABLISHED
and populates buddy info: # cat blist.xml <?xml version='1.0' encoding='UTF-8' > <purple version='1.0'> <blist> <group name='Buddies'> <contact> <buddy account='someaolaccount' proto='prpl-aim'> <name>mybuddynumber1</name> </buddy> </contact> </group> </blist> <privacy> <account proto='prpl-aim' name='someaolaccount' mode='5'/> </privacy> </purple> UPDATE [0.1] 3-09-2007 Native finch up - needs more work though:
UPDATE 2-09-2007 Libpurple connecting just fine to IRC: 19:25 -!- corepurple [root@freedom-C5381EC5.wickedpsyched.net] 19:25 -!- ircname : iPhone irc.osx86.hu :purple 19:25 -!- channels : #hackint0sh 19:25 -!- server : fusion.osx86.hu [Freedom Main Hub] Threading fixed (I think) IRC now working on toolchain v1.0 see purple-02-09-2007.tar.gz above Looks like this so far: # ./nullclient libpurple initialized. 0: AIM 1: ICQ 2: IRC 3: XMPP Select the protocol [0-3]: 2 Username: purplecore@irc.osx86.hu Password: Account connected: purplecore@irc.osx86.hu prpl-irc (#hackint0sh) (19:40:02) #hackint0sh: The topic for #hackint0sh is: Welcome to #hackint0sh! | IPHONE DISCUSSION IN #iphone | App leTV is in #AppleTV | The official home of the OSx86 development community. | Kernel discussion or download, see #kernel | 10.4. 10 news see #10.4.10 | iphone discussion is not welcome in this channel (#hackint0sh) (19:40:11) core: purplecore: can you hear me? Used the following configs: pidgin-2.1.1 $ ./configure --host=arm-apple-darwin --prefix=/Developer/SDKs/iPhone/ --disable-gtkui --disable-perl --with-static-prpls=oscar,irc,jabber --enable-static --disable-shared --enable-consoleui --enable-debug --enable-mcheck glib-2.6.1 $ ./configure --host=arm-apple-darwin --prefix=/Developer/SDKs/iPhone/ --enable-static --disable-shared --cache-file=cachefile --enable-threads=no Added this to gthread.c: #define GLIB_SIZEOF_SYSTEM_THREAD 4 and this cachefile: glib_cv_stack_grows=no glib_cv_working_bcopy=yes glib_cv_sane_realloc=yes glib_cv_have_strlcpy=no glib_cv_va_val_copy=yes glib_cv_rtldglobal_broken=no glib_cv_uscore=no glib_cv_use_pid_surrogate=yes ac_cv_func_posix_getpwuid_r=no ac_cv_func_nonposix_getpwuid_r=no ac_cv_func_printf_unix98=yes ac_cv_func_vsnprintf_c99=no ac_cv_func_poll=no ac_cv_header_sys_poll_h=no and the other fixes below for dns and these notes for pkg-config related to building all of this DNS update (need to patch this for DNS to work): diff dnssrv.c.orig dnssrv.c 22a23,25 > #define BIND_8_COMPAT 1 > #include <nameser8_compat.h> > 24a28 > #include <nameser8_compat.h> 30c34 < #include <arpa/nameser_compat.h> --- > //#include <arpa/nameser_compat.h> nullclient issues dynamic libs on the phone for libjabber et. al. clearly don't work: # ./nullclient libpurple initialized. Select the protocol [0-1]: with static they do as they should on the iphone: # ./nullclient libpurple initialized. 0: AIM 1: ICQ 2: IRC 3: XMPP Select the protocol [0-3]: we need to build as follows after the regular build fails: [imac:pidgin-2.1.1/libpurple/example] % /usr/local/arm-apple-darwin/bin/gcc -g -I/opt/local/include -Wl,-syslibroot,/Users/core/toolchain/heavenly/ -L/usr/local/arm-apple-darwin/lib -o nullclient nullclient.o -L/usr/local/arm-apple-darwin/lib -lintl -liconv -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -lxml2 -lpthread -lz -liconv -lm ../../libpurple/.libs/libpurple.a -lresolv -framework IOKit -framework CoreFoundation ../protocols/oscar/liboscar.a ../protocols/irc/libirc.a ../protocols/jabber/libjabber.a however we are still fighting with glib versions working hard on 2.6.1 glib, and 1.4.1 gettext, as they seem to be in the codebase. svn co svn://svn.adiumx.com/libgaim/trunk libpurple Sadly with 2.6.1 and new compiler we produce broken nullclients as above. That binary is no good... -bash-3.2# ./nullclient Bus error will need to revert the toolchain tomorrow!