Amule (P2P) for Haiku

Summarized:

Need to patch 3 files

src/Types.h
src/amule.cpp
libs/common/MuleDebug.cpp

Files already patched, just untar and overwrite
https://krakenfiles.com/view/gji9Qy4nZs/file.html

Or a single patch

And then compile a new version of the wxwidgets adding the flag --disable-debug_flag if not the gui fails giving this error

In my case i compiled the library in static mode and embeded the wxwidgets in the amule binary, bigger files but less dependencies

8 Likes

Is it still a thing in 2023?

Yes, more than ever?

Peer to Peer networks like Kademlia and Gnutella don’t rely on any central authority. No DNS servers, no big company like Google being the entry point to pretty much everything. We should do more of that!

Bittorrent is more popular but it doesn’t include any search features by itself, and so it is dependant on the web (or some other way) to get your torrent files or magnet links, while these network do include a search function, and as such, they are completely standalone.

4 Likes

Mine was more a practical question about its adoption rate. The raise of BitTorrent and the various file sharing sites sunset eMule/aMule also for technical reasons. I’m surprised to see a client still working these days.

@johna After looking at the AMule wiki, it seems that wxWidgets and libCrypto++ are the only nonstandard dependencies. Did you use the GTK3 version of the wxWidgets wrapper?

There’s also boost, libintl, libupnp :slight_smile:

pkgman install libunpnp_devel boost-devel ccache wxgtk_devel gettext_devel gettext_libintl crypto++_devel

I complied the wxwidgets in static mode using this version
https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.2.1/wxWidgets-3.2.2.1.tar.bz2

This is how i compiled the wxwidgets

./configure --prefix=$(pwd) --with-gtk=3 --enable-monolithic --disable-shared --enable-unicode --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --enable-largefile --with-sdl –disable-debug_flag

Then the amule after patches
./configure --prefix=/boot/home/amule/ --with-wx-config=/boot/home/wx_3/wx-config

And then, make

wx_3=name where you unpacked and compiled the wxwidgets

Mainline DHT is the name given to the Kademlia-based distributed hash table (DHT) used by BitTorrent clients to find peers via the BitTorrent protocol.

Nice thing, reminds me of the old days :slight_smile:

Did a local build with our wxgtk, that worked out ok (also used cmake for the build).

1 Like

Why use both?

Well in my case building the release and the git version in cmake with it crashes

/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/13.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/NetworkFunctionsTest.dir/__/__/src/LibSocket.cpp.o: in function `boost::asio::detail::socket_ops::close(int, unsigned char&, bool, boost::system::error_code&) [clone .isra.0]':
LibSocket.cpp:(.text+0x340): undefined reference to `setsockopt'

Was just testing

Add “-DCMAKE_EXE_LINKER_FLAGS=”-lbsd -lnetwork" when you run cmake … (fixes linking errors)

This silences the deprcated warnings when put in the top CMakeList.txt “add_definitions(-Wno-deprecated-declarations)”

For the int errors there are some patches around at haikuports, I did it like this:

#ifdef __HAIKU__
#include <SupportDefs.h>
#else
typedef uint8_t		int8;
typedef uint16_t	int16;
typedef uint32_t	int32;
typedef uint64_t	int64;
#endif
typedef uint8_t		uint8;
typedef uint16_t	uint16;
typedef uint32_t	uint32;
typedef uint64_t	uint64;
typedef int8_t		sint8;
typedef int16_t		sint16;
typedef int32_t		sint32;
typedef int64_t		sint64;
1 Like

Now compiles great and solves the wxwigets problem, no need to recompile with a special flag, using the installed wxgtk works fine

2 Likes

For the second part of your patch there is something mentioned upstream :slight_smile:

3 Likes

New version of the patches, thanks to Begasus

2 Likes

If I could find a nice SVG icon to convert to rdef (or someone with skills to create an IOM one) I could add this to haikuports :slight_smile:

EDIT If someone want to go ahead and create a PR for this we could guide you to get this integrated into haikuports, happy to help where we can :smiley:

2 Likes

The wikipedia page has an SVG of the mascot

1 Like

That worked, thanks! :slight_smile:

EDIT: As it stands it builds OK, I’m still strugling with cmake not doing the translations and installing them, using autotools doesn’t seem to work when running it with haikuporter (in Terminal it works though).

EDIT2: Fixed building with autotools, translations are installed, but not picked up in the app. :confused:

1 Like