Monday, September 12, 2011

pidgin sipe win32 compiles w/ pidgin 2.10 (libpurple 2.10.0 & sipe-1.12.0)

UPDATE: The sipe project appears to have official builds now:

http://sourceforge.net/projects/sipe/files/sipe/

UPDATE/EDIT: As some of you have figured out from the config.h blurb below, this is actually pidgin-sipe 1.12.0.  I just re-upped to dropbox with a name change on the .zip.   I guess I was trying to brain dump to this blog too fast so I wouldn't forget the steps to compiling it.

Well I did it.



What  a mess it is to compile some of these programs on win32.

I followed the basic instructions on compile pidgin and got that all working.    These instructions are actually pretty good.  They are begging to be automated similar to a FreeBSD port build:

http://developer.pidgin.im/wiki/BuildingWinPidgin

Then I tried to follow the pidgin sipe wiki entry for windows:

http://sourceforge.net/apps/mediawiki/sipe/index.php?title=Windows_Build

These are a bit out of date.   The good thing is that if you're building post 2.7.0 then most dependencies are already there.

There were a couple things broken at this point preventing success:

  • one file was missing an include for glib.h -- already fixed in the sipe git rep
  • you need gmime installed in your pidgin-devel/win32-dev directory (linked on the sipe wiki)
  • you need the rest of libiconv installed in your pidgin-devel/win32-dev directory (grab libiconv-1.13.1-1-mingw32-dev.tar.lzma from the mingw site)
  • libxml2 needed the libs renamed to libxml2-2.lib in their win32-dev directory.
  • sipe-core.c wouldn't compile with several entries from config.h which are only generated when running configure.   Since running configure correctly in this setup would be a veritable pain, I managed to get what it wanted figured out:
config.h

#define PACKAGE_NAME "pidgin-sipe"
#define PACKAGE_TARNAME "pidgin-sipe"
#define PACKAGE_VERSION "1.12.0"
#define PACKAGE_STRING "pidgin-sipe 1.12.0"
#define PACKAGE_BUGREPORT "https://sourceforge.net/tracker/?atid=949931&group_id=194563"
#define PACKAGE_URL "http://sipe.sourceforge.net/"
#define SIPE_TRANSLATIONS_URL "https://www.transifex.net/projects/p/pidgin-sipe/r/mob/"



Save this as config.h and plop it in src/core and delete the #ifdef HAVE_CONFIG_H stanza in sipe-core.c to allow it to be included.  This will allow sipe_core_about() to compile.

Successful compile.   Yay.

After this I copied libxml2-2.dll and libiconv-2.dll to my pidgin-2.10.0/win32-install-dir directory and src/core/libsipe.dll to the win32-install-dir/plugins directory.   Viola, it worked.

You can download it here win32 libpurple 2.10.0 pidgin-sipe-1.12.0

Thursday, July 7, 2011

moved from livejournal...

Not sure that it requires any explanation (all you have to do is look at livejournal's front page).   


Used google-blog-converters to grab all the posts and convert them to blogger.xml.   Then used the import feature here on the settings tab.   Worked great!

I then promptly deleted my livejournal account.

Monday, April 11, 2011

konsole tabs with dbus in kde4.6

In the continuing automation saga with konsole at my job, KDE has come far enough with the dbus interface in 4.6 to allow me to bring up tabs again and perform actions in them with a script.

For this I created the following shell functions:


# konsole dbus functions
newtab()
{
dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply /konsole/MainWindow_1 org.kde.KMainWindow.activateAction string:"new-tab"
}

renametab()
{
sessionno=$1
tabname=$2
session="/Sessions/${sessionno}"
dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${session} org.kde.konsole.Session.setTabTitleFormat int32:0 string:"$tabname"
dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${session} org.kde.konsole.Session.setTabTitleFormat int32:1 string:"$tabname"
dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${session} org.kde.konsole.Session.setTitle int32:1 string:"$tabname"
}

sendtab()
{
sessionno=$1
cmd=$2
session="/Sessions/${sessionno}"
" dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${session} org.kde.konsole.Session.sendText string:"$cmd
}

closetab()
{
dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call --print-reply ${KONSOLE_DBUS_SESSION} org.kde.konsole.Session.close
}



In scripts that I want automation, I include these functions:


# konsole functions
. ~/bin/kons-fn.sh



I can then open a whole bunch of tabs at once and send them a command:



PORTS=( 2022 2021 )

SESSIONS="
A_FU
B_BAR
"

command="telnet ${CONSOLE_SERVER}"

j=1
index=0
for i in ${SESSIONS}
do
newtab
let index=$j-1
let j=$j+1
renametab $j $i
sendtab $j "${command} ${PORTS[${index}]}"
done

closetab
exit 0



However I haven't gotten this to work from starting 'konsole -script' from a shortcut. Launching a script like this creates an infinite number of tabs launching the script in sequence. Very weird stuff.

For now, just start a konsole session and launch the script within the first tab. As you can deduce from the functions, it has to be the first tab you launch konsole with.