SublimeText 2 on Mac OSX 10.5.x with Wine Bottler

Because I can never leave well enough alone, I installed a copy of OSX 10.5.7 on my Dell Latitude D531 via a copy of iATKOS v7 I had lying around.  Why Leopard and not Snow Leopard or Lion?  Well, first of all, by the time I got a couple moderately successful installs of Leopard (enough that I knew how to reproduce it), I was pretty satisfied to leave well enough alone, but also I wasn’t sure the Dell laptop could handle the newer software.  In going through and setting up software to make this a functional work machine, I realized that my IDE of choice SublimeText wouldn’t run natively on 10.5.  This had to be remedied.  SublimeText, as I’ve discussed before, is the best development environment (and possibly the best text editor, in general) there is, and I would not accept a lesser editor after embracing Sublime so fully.  And anyway, a solution was readily available.

First, download Wine Bottler.  Wine Bottler is an app that bundles Wine for OSX and will take care of setting up your Wine configuration so you don’t need to worry about it.  But, more than that, it allows you to create .app shortcuts that can then be redistributed (if you so desired) or installed into your Applications folder like a regular app.  (This is one of the annoying parts of using Wine — it installs in it’s own little isolated environment, which makes creating shortcuts that you actually can, you know, use, tedious and occasionally problematic.)  Wine Bottler will even bundle Wine into your .app file, so if you were going to redistribute the app, your users wouldn’t need to have Wine installed themselves.

Once Wine Bottler and Wine are installed (both are in the download bundle from the Wine Bottler page), you can download the Windows version of SublimeText.  I chose the 32-bit version because I didn’t really trust my laptop nor Wine to be able to handle the 64-bit architecture, even though the Dell has a 64-bit processor.  I didn’t want to try to push my luck.  (Note, this process could probably be applied to most other simple Windows apps.  I say “simple” because, although Wine 1.0 officially marks the milestone where Windows apps can actually be run natively within a Wine wrapper, there are still bugs with a lot of programs and it generally has to do with the complexity of the program  you’re trying to run (games, graphic applications like Photoshop, anything that involves rendering video might be a bit much to expect Wine to handle well — I tried running DVDShrink under  Wine and it failed miserably).)

You are about to open a Wine file

Double-clicking the SublimeText installer opened Wine Bottler automatically, and I was asked for some information about the app.  First it wanted to know if I should just run it as a Wine file or if I wanted to create an OSX application with WineBottler.  I chose the second, then immediately regretted it because I was running an install file — would the shortcut created be a shortcut to the installer?  Answer: no — the install ran through fine and at the end I was given a choice to pick the path (in the Wine /Program Files directory) for the app I wanted to create a shortcut for and where the .app file should go (I chose Documents then later moved it to Applications).

SublimeText 2 in Wine on OSX 10.5.7

Once Wine Bottler creates the shortcut, Sublime runs more or less the way you’d expect it to after a loading window pops up saying it’s preparing the file.  If you’re used to hitting the command key for everything, you’ll have to switch your thinking to using the control key (command+c vs. ctrl+c to copy, etc.), but otherwise it works the same as the native equivalents.


SublimeText 2 InfoNow, because this is vitally important, there is one last thing that must be done to fulling bring the SublimeText experience to OSX 10.5.x and that is the application shortcut icon.  I had a few, high resolution SublimeText png icons I had downloaded for my ObjectDock on my Windows machine that I found from the SublimeText forums in a Google search, but being a relatively new Mac user, I had to Google to figure out how to use those pngs as the icon for SublimeText to replace the generic app icon it was given automatically.  This is actually fairly ridiculously easy:

Open the png file in Preview, hit command+a to select all, then command+c to copy it.  Then go over to your Applications folder and either right-click and do More Info for the SublimeText shortcut or use command+i to open the application info screen.  Click on the small icon at the top left of the window (I was misled by the large icon at the bottom — don’t try to use that) so it is highlighted, then do command+v to paste your icon in and, voila new application shortcut icon.  Now you can drag this to your doc and it looks and acts like a regular, native version of SublimeText.

Again, this process could be used for other apps, too, but, since it’s Wine, your mileage may vary depending on the app.  Hopefully this was useful to someone other than me, let me know in the comments if you found this helpful.






4 responses to “SublimeText 2 on Mac OSX 10.5.x with Wine Bottler”

  1. Matt Avatar

    I couldn’t get it to work! I got Wine 1.4 (the latest version working for leopard) and Sublime Text 2 and followed the steps. After I installed it and chose “Run Sublime Text Now”, I got an error message saying “Sublime Text encountered a serious error”. Which version of Wine did you use for this?

    1. chris reynolds Avatar

      I don’t remember. I eventually reformatted that laptop and installed Linux Mint on it so now I use the native Linux version of Sublime Text 2 and haven’t tried it since then. I would check your Wine configuration settings, and/or the Wine Bottler settings when you are setting up the app, but that’s about as much help as I can be, unfortunately, since I haven’t messed with it in a long time. I remember the real key being getting Wine Bottler to do most of the work, but I would try to dig up more information on the error you’re getting and see if it can provide more detail into what’s throwing the error. Could be missing dlls or something that can be added when you create the Wine Bottler app.

  2. Andrej Pintar Avatar
    Andrej Pintar

    You forgot to install vcredist 2008. Without it it wont work. Essential install. Works ok.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.