Calendar

April 2017
Mo Tu We Th Fr Sa Su
<< >>
12
3456789
10111213141516
17181920212223
24252627282930

Langs

Few Reasons I hate OSX

Posted on Aug 02 2008

I hate OSX. Really.

Don't take it personally if you're a Mac fan, I don't have anything against Mac (as hardware - expect French keyboard layout maybe) but OSX is another story.

I'm an open source software developer and supporter of "available everywhere" software. I think that everybody have the right to choose the tool that suit him the most, and that - especially for OS - you should use the one you're comfortable with. That's why I want to provide proper releases of my softwares (Haxe, Neko, ...) for most popular OS : Windows, Linux, and - sadly - OSX.

Since I don't work on a Mac on a daily basis, I'm trying to automate things as much as possible in order not to have to switch computer for each release I want to build (remember : release early, release often !) . And that's where the nightmare starts...

For Windows/Linux, things are pretty much easy. After building the small xCross Neko Library, I am able to open a small message window that display the log messages. It was quite easy to do on Windows, since there is a lot of documentation available. On Linux, I used GTK2 and although I didn't know at all about it, I could make it work. But on OSX, it took me almost one full day to have a small window with auto-scrolling text to work ! Thanks to the very poor Apple OSX C API documentation... And trust me on this one, I'm usually quite able to understand how things works without documentation, but this was really hard.

Ok, back to the subject. Once the crossplatform xCross neko library written, it was then possible to write my software directly in Haxe. Since I wanted to automate things at best, I wanted to be able to directly build binaries on Windows for Windows, OSX and Linux, without having to switch OS ! This is pretty easy to do with xCross : since it's a Neko runtime with statically linked standard libraries, all you have to do is to append the neko bytecode that Haxe compiler outputs to the original binary, plus a small header to tell that the VM should start the bytecode. That's exactly what the nekotools boot command is doing, so I reused this behavior but this time with the xCross runtime.

Now, with one single command I could compile my Haxe code, then produce 3 binaries for Windows, Linux and OSX. Everything crossplatform, perfect ! But the last step was the end of my success...

Once the application is built, you have to distribute it (so people can easily download + install it). On Windows, you can either directly distribute the exe, or zip it first. On Linux, gziping the binary is quite common and users know how to do anyway. On OSX, there are several ways to package applications, but first you have to put your binary inside a .app directory (with some additional XML) so it's recognized as an "application" and can receive user input : running a binary from commandline will NOT enable you to get ANY kind of interactivity : the window will not even gain focus ! And once this is done, the most "easy" way to package your .app directory is to use a DMG.

For not Mac users that might not know that, DMG is a proprietary image format similar to ISO. There are two DMG2ISO software available : one in Perl - which doesn't seem to work with latest DMG format - and one is the hdiutil software which is only available on Mac. But I didn't care about DMG2ISO : all I wanted to do was the ability to create a DMG either on Windows or Linux. The answer is : you can't ! The only tool I found to create DMG is on Mac. And worse : it doesn't seem to be able to be run from commandline ! So for every release, you'll have to select the directory, select your options blablabla, click click click then finally you get your DMG...

That's not automated as I wanted it to be, but back then when I built the Haxe Installer, I choose to stop there. My current setup was then to use the MacBook (on which I have dual Boot OSX/Ubuntu).

A few days ago, something caught my attention : VirtualBox is a virtual machine that can run Ubuntu and Windows very nicely on your PC. And even better, it's GPL software, and it's only 20MB installer on Windows ! (as a side note, I always tend to prefer small software since it often means it's not bloated)

With VirtualBox, I was able to install a Virtual Ubuntu on my Windows machine (note : I need Windows for daily Flash work), and compile Haxe+Neko on it : perfect for testing / building releases ! Of course my first thoughts were to be able to run OSX as well ! That would be soooo nice, and I don't care buying an additional OSX license for it since it would save so much trouble switching computers. Actually, I would even put my Virtual Ubuntu and Virtual OSX (and why not one additional WinXP) on one of these USB 16GB keys to carry everywhere with me my fully configured OS ! That would be cool !

Sadly, VirtualBox does not support OSX so far. Well, there are some issues with it, like SSE2/SSE3 emulation I guess, but more importantly : the OSX EULA doesn't allow you to virtualize it ! It MUST run on Mac hardware ! There's something wrong with this EULA, and not only from a moral point of view... I'm not a lawyer, but I'm pretty sure that this kind of thing is illegal in Europe, since it force you to buy two distinct products as a whole (OSX and Mac hardware). Anyway.

Giving up VirtualBox right now, my next step is to try installing + running OSX on free VMWare Server, since it seems some people (Google for osx86) managed to do it. I really hope that VirtualBox (which is owned by Sun BTW) will be successful in supporting OSX in the future, since it's a really good piece of software.

As a conclusion, it looks to me that OSX is an even more closed platform than Windows is ! Or maybe that's not it. Maybe simply OpenSource programmer are making their software available on Windows because it's the mainstream OS, while Mac is filled with companies selling you text editors for almost $50 ! And that will be the last thing I say I hate about OSX... at least for now.

5 comments
  • Sep 22, 2008 at 23:10

    DMG's are actually just slightly modified HFS images. You can create them from unix based systems with some of Apple's public source code.
    Here is a post that talks about it.

    However, I'm not sure about redistributing it as a file format handler for Haxe (as you've mentioned recently).

  • Sep 23, 2008 at 00:28

    Hello Nicolas,

    You can use Virtualbox to try BSD systems, too.

    Haxe can compile with a few tweaks on BSD, and it runs fine. But Neko is still broken on BSD systems (OpenBSD, FreeBSD, DragonflyBSD, NetBSD: Neko works properly on none).

  • Sep 24, 2008 at 18:52

    hi nicholas,

    i'm not at all an expert on the DMG format, but i think that there are different types, and that ISO images (without a HFS filesystem) are actually a valid form of DMGS as well. at least i havn't had any problems yet with ISO files renamend to DMG, they mount and behave just the same.
    if you like, check out
    http://dasdeck.de/staff/valentin/tmp/myapp.dmg
    it was created on a windows pc using mkisofs and the follwoing command:
    mkisofs.exe -iso-level 3 -J -V "myapp" -o "myapp.dmg" "c:\myapp"
    at least on my macs the image mounts just find, and the contained start.app has a correct icon and can be started from the finder without problems.

  • bob
    Oct 07, 2008 at 15:04

    1)a small window with auto-scrolling text to work
    xterm -e <your command> will works on both Linux and OSx

    2) ZIP is common to the three oses.

  • Thomas
    Oct 12, 2008 at 18:55

    Honestly, $50 for the best text editor on the planet, is not expensive. This piece of software can save you so much time and frustration.

Name : Email : Website : Message :