[Pidgin] #15980: Patch for compiling on Windows

Pidgin trac at pidgin.im
Wed Feb 12 19:40:02 EST 2014


#15980: Patch for compiling on Windows
---------------------+--------------------------
 Reporter:  Skylark  |      Owner:  EionRobb
     Type:  patch    |     Status:  new
Milestone:  3.0.0    |  Component:  unclassified
  Version:  2.10.9   |   Keywords:
---------------------+--------------------------
 Hello,

 Here is a patch for compiling the main branch (pidgin-main, aka
 3.0.0-devel) on Windows. (There is no 3.0.0 or main in the version field,
 sorry)

 I used Tomasz's prepare-workspace.sh script (which I modified slightly,
 more below) and then worked through the compile errors (surprisingly few
 considering I get the feeling no one compiles on Windows lately).

 Here is the rationale of each diff in order.

 == 1. libpurple/protocols/gg/keymapper.h ==

 uint16_t was not declared - other headers using uint16_t in the gg
 directory all included libgadu.h so I expect that should be fine.

 == 2. libpurple/protocols/mxit/markup.c ==

 uint8_t was not declared - in this case I declared it directly there since
 no other files in the mxit directory used that type so I couldn't figure
 out if there was an appropriate header to include from there.

 == 3. libpurple/win32/global.mak ==

 Tomasz's script downloads nss-3.14 into the win32-dev/nss-3.14 directory,
 if the intent is really to use nss-3.15-nspr-4.10.2 then change the
 prepare-workspace.sh script instead to match.

 == 4. pidgin/gtk3compat.h ==

 Using GTK_CHECK_VERSION without including any gtk header... Again other
 places that used GTK_CHECK_VERSION included pidgin.h (which includes
 gtk.h) so I think that's fine.

 == 5. pidgin/libpidgin.c, pidgin/pidgin.h and pidgin/pidgin.c ==

 in libpidgin.c there is a call to winpidgin_init(hint); inside an ifdef
 _WIN32. However the hint variable does not exist. Going back in the
 history of these files, I found that the pidgin_start() function used to
 be pidgin_main() and had an additional HINSTANCE hint argument. Seeing
 that main in pidgin.c is ifdeffed _WIN32 to have that additional argument
 too, I modified the pidgin_start() function and declaration if _WIN32 is
 declared, to be able to pass it the HINSTANCE hint parameter. It's a bit
 ugly but it works.

 == 6. pidgin/plugins/Makefile.mingw ==

 Removed the convcolors.dll plugin, there is no file
 pidgin/plugins/convcolors.c (it probably used to exist?). Remove the
 commented out line, I just wanted it to be clear that I was removing it.

 == 7. pidgin/win32/nsis/pidgin-installer.nsi ==

 NSIS 3.0+ seems to have two sets of plugins, x86-ansi and x86-unicode in
 its Plugins directory. I chose x86-unicode (as I think Windows 7 is
 unicode-only anyways) and it seemed to work... But I don't know any more
 than that about this.

 == 8. pidgin/win32/prepare-workspace.sh ==

 The first change is probably not wanted, I just didn't want to keep the
 Bonjour SDK installed on my system (why you'd want an installer for an SDK
 on Windows is beyond me, give me a zip or tar.gz and I'm happy, I'm
 oldskool like that). So I copied the files out into some directory and
 then uninstalled it.

 The second change is that I had a recent perl installed in my Cygwin
 environment so I chose to use that instead of ActivePerl. I think that may
 be the easiest - tell people to install Perl during Cygwin setup and use
 that.

 If you have any questions just let me know.

 Jean-Sébastien Guay

-- 
Ticket URL: <https://developer.pidgin.im/ticket/15980>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list