Friday, March 6, 2009

Crossover, Bootcamp, and Steam

My latest endeavor has been trying to get CodeWeaver's Crossover to work well with Apple's Bootcamp. Unfortunately, it has been elusively difficult.

The Situation

The situation is like this: I have my (Windows) games stored on an external hard drive (namely Steam) to be accessed on my Bootcamp partition (for space reasons). This works fine; I boot into Windows, play my games from my external hard drive, and life is good. But booting into Windows every time I want to play a game is a little annoying. It would be nice if I could scarface a little quality to be able to play my games directly from OS X.

A little while ago I got Crossover through some promotional deal. Crossover is supposed to be a good solution to playing games from OS X, so I decided to put it to the test.

I want to try and access my external hard drive games in OS X via Crossover. Simple enough, eh? Well, not so much. I have tried for quite some time, and it's just not working. Maybe it's Steam, maybe it's Crossover, or maybe it's just a little of both; I don't really know.

Inductive Reasoning

Easy Does It

The first thing I tried to do was the most obvious one: simply run Steam from the external hard drive. Unsurprisingly, Steam complained about something and wouldn't work. I was expecting something like this, as Windows has some registry files it likes to play around with. These being on the OS itself, my Wine "bottle" did not have these.

Simple Installation

So, what seems like the next most obvious step? Well, install Steam in Crossover and see if it will work there! So, I did just that. I installed Steam through Crossover and then tried to run again from the external hard drive. Again, nothing but errors happened.

More Complex Installation

Now I'm starting to think that these registry files have something about file system paths in them. When you install something in Windows, they ask you a path of where you want to install it. If this location were to change without the application knowing, this could spell failure for the application. Of course, this depends on how the application functions. I guessed Steam would have this sort of pain in the ass "you can't move our executable" stuff, so I went ahead and tried to trick it.

I'm thinking, "Well, I installed Steam (in Bootcamp) to F:\games\. If I installed it there on Crossover, maybe the paths registries (if there are any) will line up and everything will be golden". I made myself a new bottle, told Crossover there was an F:\ drive, and then proceeded to install Steam on this "F:\ drive". It is important to note that Crossover treats all it's "drives" as merely mount points (or at least thats how I see it). So my C:\ drive is actually a directory called "drive_c", and my F:\ drive is a directory called "drive_f" somewhere on my hard drive. Continuing on, I then tried again to launch the executable from the external hard drive, and it still didn't work. Sadness.

False Hopes

While I was going through Crossover's preferences, I found one that lit up my heart. When you create drives, you can specify where it's "mount point" is (obviously). But what I found out is that you can assign this "mount point" to be anything you desire! This means that I can assign my real, external hard drive directly to my virtual F:\ drive; none of this external folder stuff. So after installing Steam on my fake (local) F:\ drive, I simply redirected the way Crossover sees the F:\ drive: instead of looking at the "drive_f" directory, it now looks at my real, external hard drive. This seemed like the ultimate solution. Crossover and Steam are now both unaware of my attacks; victory is assured...or not.

Turns out that didn't work either. Seeing my perfect plan fail like that showed me that I working on the wrong problem the entire time. The location and interpretation of the executable is not the problem, rather, the actual problem is accessing the external hard drive. It may seem weird, but it's probably the truth. Looking at the previous results makes everything make sense. Further, I have tried other approaches that supports this claim.

Epiphany

I discovered that Steam would only run locally, so I decided to link in the actual game files into the directory. This kind of worked, but Steam gave some sort of message about not being able to write to some file. I tried various methods of linking, but they all turned out in the same way; failure.

Afterward

So what is there to gain from all of this and what do I plan to do about it? Well, I believe since my external hard drive is formatted in NTFS is why I'm getting all of these problems. If it were in something more friendly, like FAT, it might actually work. I encourage one of you to try and see if that works, as I am curious to see if it will. I have read a few posts about Wine and Linux talking about how they just linked the SteamApps folder in and it worked flawlessly. Maybe that would work for me as well if my system had better support for NTFS file manipulation

Friday, February 6, 2009

Vimperator: Mapping Command Key

Vimperator is a neat little addon I found for Firefox. I normally don't use Firefox, but thought it would be nice to break from Safari to see what else can be offered. I really miss the Cocoa feel, but having full keyboard access is really nice as well.

Of course, being a vi user myself, one of the first things I did after scouring the help files was get some customization going on. Naturally, I couldn't get vimperator to cooperate with my wishes, so I had to do some trial and error.

All I really wanted was to have a keypress to use the location bar instead of the little status bar at the bottom. The status bar is sleek, but the location bar has all that autocomplete stuff that I wanted to take some advantage of. Everyone knows you access the location bar with Command + L, but unfortunately, vimperator never gave me details on how to map to the command key.

MacVim uses D, but that didn't work. Turns out, the magic key is M. Heres an example of what I wanted to do, along with a few of my other customizations I find useful

"Make hints a bit easier to turn on.
map c f
map C F

"Make control-c act like escape
map <C-c> <ESC>
imap <c-c> <esc>

" have vimperator take advantage of FF3's features more
map o <M-l>
map t <M-t>

" easy way to search with vimperator (which was impossible without combining the location bar and the search bar)
map e <M-l><tab>

" Address bar etc
" As much as I like the minimalist approach, there are some things that won't change...
set guioptions+=mTb

" we don't like beeps
se vb
" separation of URL and search
se ds=

"just so you know when this file is sucessfully run
echoe "rc file sourced"

All in all, vimperator is really nice, and I feel comfortable being able to navigate with the keyboard only, especially with the jk keys. There are some sites it can't handle, and you can't interface with Java, of course, but other than that, actually selecting links is very intuitive and fast.

Monday, January 5, 2009

Partitioning Problems

About 2 years ago, I tried to install linux on my computer (Macbook Pro). The way Mac works, it's a little complex to get this to work properly, especially the partitions (in my case). I didn't want to partition my boot HD again because of space and personal reasons (which I tried to do anyway despite my reasons, and as such, almost lost all my data, but that's another story), so I tried on an external HD, which happened to be my 1 TB backup HD. Needless to say, I screwed up bad somehow, leaving me linuxless and with broken partition tables. Disk Utility hated the partitioning, since it was in a format that it didn't recognize (among other things). But I have returned, armed with tools and knowledge to try and fix this beast.

Gparted is an excellent tool for pulling yourself out of any hole you may find yourself in. If you need something partitioned, gparted will do it for you correctly. Better yet, you can put it on a live CD and boot straight into it, making internal drive repairs relatively easy. Unfortunately, it could not make the partitions fine enough to Disk Utility's liking.

But a while ago, I found TestDisk. I was a little skeptical at first, but I went ahead and tried it anyway. So I launched it, analyzed the disk, and rewrote the table. It was that easy! At first, it found only 2 partitions, but after a quick search, it found my 2 partitions along with the EFI partition table at the front of the disk. After that, Disk Utility liked the way it was seeing things, displaying the partitions in a proper.

In gparted, I went ahead and partitioned some empty space at the end of my drive (something DU wouldn't do) with HFS+ (but non-journaled, as the option does not exist). After the TD repair, DU was able to see both partitions and able to delete the one gparted made.

But all stories can't end happily ever after. I tried to partition this drive twice, and both ended sadly. It was a simple procedure, shrink my original partition, and put in an 80 gig. Both took about an hour (drive half full). One, I woke up to find my machine unresponsive in a deep sleep. Had to force restart and Mac told me something bad happened when I rebooted. Everything was fine, my data was still there, but my drive was still unpartitioned.

I tried to partition a second time, this time with slightly different settings. I opted to sit and watch the thing run it's course, since I like to watch grass grow. And again, somewhere around the hour mark, something happened. This was a bit more interesting than waking up to a broken computer, because I got to see the fireworks first hand. Turns out the darn think breaks into a kernel panic, which is resolvable only through a forced restart. Fortunately though, everything was the way it was before the crash, even the partitioning.

So I'm just about done with this mess. There are a few other things I can try, but they would probably be in vain. Plus, partitioning all these times is going to leave me with a heart attack once my data is gone (since I'm partitioning my backup drive). The true way to fix something like this is to transfer your data temporarily to something and then nuke the drive from orbit. Eradicate everything on it and rebuild some firm partitions. Unfortunately, I don't have 500 gigs of contiguous space, and my need for the partition was not all that important anyway.

Some other things I forgot to mention I did was do multiple repairs with Disk Utility. Not that it helped with anything, but it was something I did.

Sunday, December 14, 2008

Compiling slash'em in OS X

Downloads:
binary
src

This has been about the upteenth time I've done this, and I have to reremember how to do it every time, so now I'm making a note of it:

How to compile Slash'em:

  • navigate to sys/unix
  • `sh setup.sh`
  • win/tty/termcap.c
    • add && !defined(OSX) on tparm ifdefs line
  • src/Makefile
    • use -ltermcap
  • includes/config.h
    • use gzip compression isntead of compress
    • make sure you change the path to whatever `which gzip` gives you
    • change the wizard name to your name

If you understand the above, you should find it helpful. If you are entirely lost and have no clue what I'm talking about, chances are you shouldn't be trying to compile slashem yourself. I'll post a binary for download if you guys want it. I currently just have the statuscolors on, but it's kind of buggy when you start getting lots of statuses (like HP disappears).

Wednesday, November 19, 2008

Generic news

Well, I've still been working on my website, but I'm getting sidetracked with other things. Most importantly (and excitingly), I am taking up (again) my efforts to help out with Quicksilver and Geektool. I first updated my QS code, and it's just as unintelligable as it was when I first checked it out.

Geektool, on the other hand, is a heck of a lot easier to understand what is going on, sort of. The code seems old fashion with a lot of reinventing of wheels, but all should go pretty easy. QS on the other hand, well, we will see what I can do with that beast. If I can just get a little foothold on how it works, I should be able to take right off. But as it stands, I'm groping at smooth, slightly curved, vertical walls (with lots of broken things behind them). Any hints are welcome.

For Breakaway, it's going on the backburner for now. It works, and it does it's job. I don't want to bloat it out with unncessary features, but maybe in the future I'll include some checks for playing sound. I've already done a bit on that, but it's crude (read, easy) and doesn't work in most cases. The more complex version involves reading sound pipes(?) and checking for data flow through those, because, a "pipe" can be open and no sound flows through it. I envision a future where Breakaway could play/pause for you when you work with different players (VLC) or watch a video online.

Oh, and MacVim is on my hitlist too. I just accomplish everything I've speculated first...

Saturday, November 1, 2008

Website movement imminent

My good friend DarkRaver helped me with my lame server problem by giving me a bit of good webspace to work with. Unrestricted freedom and database support will help bring my site out of 1999 and into modern bliss. I might even get fancy rollover tabs or rounded boxes. But pay no attention to be hopeless attempts at web development. Unlike me, DarkRaver can put together a fluid and coherent website, so if you want to see the Right Way™ of doing things, look at his stuff; you'll be glad you did.

I'll try to move over and upgrade this weekend. The new URL will be Balthamos.DarkRaver.net, but I'll still have my AwardSpace URL up for redirection.

WoW Watcher Update

WoW Watcher has just been updated to version 0.8. No new features per say, just updated some code so it will work with the changing formats of the server lists. Code is still very delicate and will not survive another major change, but it will work for now. Modularized the way the checking of servers is done so support for different trackers can be added more easily in the future.