aMule Forum

English => Compilation problems => Topic started by: branka on July 24, 2007, 05:09:25 PM

Title: pupnp library OS X
Post by: branka on July 24, 2007, 05:09:25 PM
I just started to successfully compile and install amule cvs builds on my macbook pro lately.

Here's my problem: i want to enable amule upnp on mac osx 10.4... Is there an equivalent of pupnp for osx or, as an alternative, how do i compile and install it to have the library available? I know it may have been asked before, but i tried googleing for this topic with no luck.

Thanks a lot and keep up with the good work.
Title: Re: pupnp library OS X
Post by: wuischke on July 24, 2007, 07:59:09 PM
Hi branka,

Frankly, I don't know a lot about Mac packaging, but I hope you'll figure everything out with the little hints I can give you.

To build libupnp:
download  libupnp-1.6.0 from pupnp.sf.net
./configure --disable-static
make

UPnP support will be compiled by default, you only have to put the libraries (libixml.so.2.0.4 and libupnp.so.3.0.0; you have to rename them or create a symlink to libixml.so.2 and libupnp.so.3 ) at the right place.
This should be aMule.app/Contents/Frameworks.

Now I don't know where Mac will look for the files, but you might try to hack aMule code:
UPnP.cpp
Code: [Select]
m_LibIXMLHandle("libixml.so.2"),
m_LibUPnPHandle2("libupnp.so.2"),
m_LibUPnPHandle3("libupnp.so.3"),
m_LibUPnPHandle(NULL)
to
Code: [Select]
m_LibIXMLHandle("../Frameworks/libixml.so.2"),
m_LibUPnPHandle2("../Frameworks/libupnp.so.2"),
m_LibUPnPHandle3("../Frameworks/libupnp.so.3"),
m_LibUPnPHandle(NULL)

Once again, I don't know if this will work with relative paths.
Title: Re: pupnp library OS X
Post by: kreegee on July 25, 2007, 12:41:58 AM
Try to build pupnp on mac first, i always had some problems (never really found out how to hack pupnp for osx-compilation - though i suceeded once)

next thing would be the proper (probably static)) linking with amule.
Title: Re: pupnp library OS X
Post by: branka on July 25, 2007, 01:10:53 AM
Thanks both of you; i'll try my best to get upnp to work in the next days. I'll keep you updated with my progresses.
Title: Re: pupnp library OS X
Post by: wuischke on July 25, 2007, 08:44:50 AM
I could cross-compile it without problems, so it should work fine. And it has to be dynamically linked or you have to change the aMule UPnP code.