On trying to port the client to Mac

I've done almost nothing in the last few days except see how far I can get trying to port SoulseekQT to a Mac environment. I don't have a Mac, but a long while ago I managed to get Snow Leopard running in Virtual Box, and seeing as Qt had been ported to the Mac along with its accompanying development environment, Qt creator, it seemed as if my chances were pretty good. It took me a while to find my way back to a virtualized Mac desktop, requiring that I fool around with various VM settings and legacy loaders, and when I finally got there, Qt Creator emerged as all but unusable for my purposes. Anything as slight as trying to open a source file in the environment's editor would bring it to its knees. Debugging was completely out of the question. My prospects might have been better with the newly released Qt SDK 1.1 beta, but my box would not run a 64-bit program, and trying to force Snow Leopard into 64-bit mode was not getting me anywhere. Finally I had noticed that the Qt Creator portion of the 1.1 beta was being offered in standalone form, and in 32-bit to add. Until then I had no idea whether the gross instabilities I was experiencing were to blame on virtualization or on the current release version of Qt Creator. It seemed unlikely that the latter would be offered as current if that were the case. My doubts were laid to rest, there was nothing wrong with my virtual machine. Everything was now working properly.

Code incompatibilities were not plentiful, but I did have to pay special attention to anything that had to do with file paths, as the FreeBSD based Snow Leopard uses slashes to separate folder names as opposed to backslashes on Windows. I did enough to see that I could download files and folders off of search results, but I wouldn't expect anything else that's file-related to work. File sharing and uploading seems completely out of the question at this point, although I haven't even tried. It seems a bit wasteful to try to provide a perfect port of something that's as imperfect as it is in its current form. Also, Mac debugging is still a bit finicky and very, very slow in my virtual box, so I'm not sure how well I'd be able to perfect any future ports if any platform specific issues arise. While it seems impractical to try and provide a Mac port with every build I produce for Windows, I'm going to try and offer them for major developments. I tried running the compiled application in a clean, second virtual machine just to see if it would work properly off the bat. It doesn't exactly. I don't know how to bundle the required libraries, so you'll have to install the Qt SDK to get it to work, link provided below. It also has a really ugly default icon right now. Sorry!

SoulseekQT for Mac zipfile
Qt framework for Mac (Cocoa)

Good luck!

Comments

John Titor's picture

The Mac is a good platform and it is good to see Apple doing well lately! Petty scandals notwithstanding. That Soulseek now has an official client for the platform can only help!

I'm not a fan of Apple, but I'm happy to help out Mac users if I can.

We appreciate it Nir, thanks

Testing on a MacBook Air with OSX 10.6.7. Logins aren't working, and the application locks up if you try to exit after an unsuccessful login (which all logins currently are), but when exiting without trying to login to the network, it will exit cleanly. Otherwise, the application seems relatively stable (though without logging into the network my testing is rather incomplete). That said, it seems promising, and I am looking forward to being able to use SoulSeek again (since solar, soulseex, and ssx are all unusable on the latest builds of Snow Leopard).

Huh, it seems to be able to work in my Virtual Box, but I'll check again. I've been unsuccessfully trying to set up a hackintosh dual-boot solution on my PC for the last few days, but it appears my AMD CPU is a bad choice for that. Maybe I'll be able to get an Intel CPU/motherboard one of these days :)

i'm happy to test it, i'm bored and have snow leopard running on an x86 as well as a few actual macs around, also can we do something about bots please, especially in indie 77.100.235.78 is spamming like crazy and i don't have an IP block feature...been nmapping them to death till they die.

I'll try switching to raising the activity meter for room chat on a per-IP basis instead of per-user, hopefully this should register as a flood and ban the user if they're logged in under more than one account. This isn't the right thread for this discussion though, if you have any further comments or questions start a new forum topic and I'll approve it as soon as I see it. Thanks!

the build is working for me nir, just installed qt framework and it's up and running, chatrooms and all, i have to set the username and password everytime, it did crash once, but i can't duplicate it

Just a nitpicky remark: Mac OS X is based on NeXTSTeP, which derived from BSD before FreeBSD and NetBSD went apart. So it's a sister to FreeBSD rather than a child.

As for the file paths: doesn't Qt offer a way to abstract away from their syntax? It would make sense to abstract away from the markup, rather than change hard-coded backslashes from the Windows version into hard-coded forward slashes for the Mac version. That will help you to also provide versions for all other platforms that are supported by Qt (eventually). If Qt doesn't offer such a thing, which would really surprise me, Boost.Filesystem probably should do the trick.

It's great to hear that you did so much effort to support the mac even though you don't really like it! Keep up the good work.

Ah ok :) I wasn't a hundred percent sure what the relation between FreeBSD and Snow Leopard was. I stand corrected.

As for file paths, yes, Qt does have classes to abstract this sort of thing. I don't remember the specifics of my difficulty to be honest. I do remember though that Qt doesn't abstract things like root folders or user home folders. It's nothing a few compile directives can't fix though. It was just something I mentioned in passing.

Thanks, Nir

Good to hear that you made so much progress in the meanwhile you don't even remember exactly what was the problem. :)

I'm running slskQT nightly build 5/29 in Crossover, sharing, and uploading successful! This is the first client I have been able to achieve this with. ssX, Nicotine, iSoul all were not searchable, and couldn't upload.

Thanks for your hard work Nir!

How much longer do ya think until you'll pop out another .app :)

I'm dying to run this natively.

Enjoy your day,

That's really good to hear! I'm taking a few days to clear my head, then I want to get upload speed limiting going, and then I can look into doing ports for Mac and Linux. The only caveat is that I might not be able to deal with any serious platform-specific problems that may come up. I need to keep developing the Windows version so that, among other things, there are better versions of SoulseekQT to port to the other platforms.

Thanks, Nir

dennso's picture

Hi Nir!
First of all this is the best app to share music.
I used it since years in PC but now i have an apple computer.
I test the release but its very "alpha version".
I think that you can use the SolarSeek Code to create a Mac version. Its a good base.
They release the code to create a version.

So, i think that this help you to create a mac version of the best share music app.
Cheers.

Hi all.
I had trouble with the Mac Builds posted on the download page, and this present page explains why (64bit is also a requirement).

OSX 10.6.x Snow Leopard is in fact the last version version of the OS that supports single core processors ie. 32bit.

So for those with a 32bit Snow Leopard setup, try using SoulseekQT-PublicBuild4