getting comix to work on windows

Comix is a freeware comic book reader, a great piece of software i came across on ubuntu. It's entirely written in python (since v 4.0) and it's got a professional, somehow 'solid' feeling i can't find in most of its windows counterparts. Furthermore I already got used to comix hotkeys so, being quite lazy, it would be unconfortable not finding the right keys every time i switch from windows to ubuntu and vice versa. So i decided to bite the bullet and get the thing to work under windows!

The following procedure was successfully tested under win Xp SP3. I make a vast use of quotation marks to indicate commands or paths. Just ignore unless otherwise specified.
Now off we go to the tutorial itself!

You will need to download and install the following packages, in the specified order. Also you'll need to download 'em before installing =P.

Note: don't attempt the same operation with the previous revision of the package set (I'm talking about the one built around python 2.5). Despite of being referred as more stable it contained a bug (more specifically in pygtk) that prevented the whole thing from running. I warned you :D

As we want to run python directly from the command line, we'll have to add python's directory to the %path% environment variable. This particular variable sets the path(s) where the default commands, the kind of you can run in the command prompt, are stored. To permanently set our %path% variable we have to open the system properties (found in the control panel or, more easily, right clicking on "my computer" and then choosing properties). The button labeled "environment variables" placed at the bottom of the "advanced" tab is what we're looking for. Edit the "path" line, add ";C:\Python26" at the end of the existing line and we're all set! Typing the command "python" in the command prompt should now launch the python console. Yay!

The next thing comix expects to find once launched is something to extracts an archive. This is specially important as the great majority of comics out there are conveniently packaged in archives, be they *.cbz/*.cbr or their less exotic counterparts *.zip/*.rar. At this purpose let's download unrar for windows from rarlabs. Extract the content of the self extracting archive and place the file called "unrar.exe" in the python directory "C:\Python26". Note that the self extracting archive will want to place its content under "C:\program files\unrar". You can either let it do as it pleases and then retrieve the precious executable off the said directory or manually extract with an external archive manager. As we just added this folder to the %path% variable, unrar will now be recognized as a command. Try and run unrar from the command line ;)

Now that a solid base is laid we may move on to the main part of the install. But fear not my friends, for the deed it's almost done!
Time do download comix itself: comix-4.0.4.tar.gz

Extract the tarball you just downloaded with your favourite software (7-zip or win-rar to name a few). Now you'll need to execute a command prompt from the location where you extracted the archive. To do so simply start the console by executing "cmd" (in the start menu select run, type "cmd" in there and hit enter. Now you've got to work your way to your folder the good ol' command-line way. By default cmd points to "C:\Document and Settings\[username]" on start, so, assuming you placed your files in a folder inside your "My documents" folder, you'll have to type in the following command (leave the quotes):

cd "my documents"

and then again
cd [comixfolder]

where [comixfolder] is replaced with the actual name of the folder containing the extracted files from the tarball.
Tip:when typing in difficult paths you can resort to the TAB key. Just type the beginning of the folder's name and then press TAB to autocomplete it. Note that it will only work correctly if you enter enough of the filename to univocally identify it.

When you will get inside the desired folder execute:

If all went right you should be able to find a new folder labeled "usr" in your "C:\" root.

Ok, we're almost finished. At this point you should be able to launch manually comix from the command line with
python C:\usr\local\share\comix\src

That works, but it's not really a confortable choice for daily use. We could instead set up a batch file to run the script in our place, but that leaves an unfashionable open console window that we can't get rid of. But we'd sure want to.

The only not-so-dirty workaround i found to this problem was to write a small c++ application that launches in our place.
Enjoy Comix Launcher 0.1!
For it to work correctly it must be placed it in the same directory as, that would be "C:\usr\local\share\comix\src\" From there you can link it anywhere you fancy. That's cool! :D

Have a good time reading your comix! See ya!

0 commenti: