Wednesday, July 16, 2008

Resumable Downloads, Commenting, Config editor

Resumable downloads are done, with the three things I mentioned in the last post now finished. I've spent some time adding more comments to the code to make it more readable.

Right now, I'm working on the config file editor. I'm playing around with Core Data, which will allow me to implement it very quickly and without a single line of code if I'm willing to change the file format a bit. I'm still undecided about whether to keep the old config format or not.

Wednesday, July 9, 2008

Resumable Downloads

After several dead ends, I've finally got resumable downloads minimally working.  There is now a Pause/Resume button on the installation tab.  The partial download is stored in ~/Application Support/Maclibre3 and metadata necessary to resume is stored in ~/Library/Preferences/com.maclibre.maclibre3.plist.

Still to do on this topic:
  • Download status does not display correctly after download resume
  • Automatically prepare for resuming if download fails
  • Start download from beginning if attempt to resume fails (for example, someone has deleted partial download file)

Tuesday, July 1, 2008

Preferences, and Miscellaneous Improvements

I've begun phasing out the use of the ~/.maclibre folder to store data. The fetching of the XML package list is now done synchronously (NSURLConnection) and not stored anywhere. The list of installed packages is now stored at ~/Library/Preferences/com.maclibre.maclibre3.plist , where it belongs. Downloads are still stored at ~/maclibre, but I will be moving them to ~/Library/Application Support soon.

I've also made a bunch of cosmetic and other miscellaneous changes as well. The quit button now terminates the program in the correct way, for example.

Wednesday, June 18, 2008

Threading done

It's been a long week, but the conversion to Cocoa threads is basically done.  The Downloader class has been rewritten, the new Downloader3 class uses NSUrlDownload instead of python libraries.  Among other things, this will allow downloads to become resumable.  Before I tackle this, however, my next task is to change from storing data in ~/.maclibre to ~/Library, by (for example) using NSUserDefaults to store preference info.

Friday, June 6, 2008

Code Uploaded

I've started using Google Code's SVN repository.  You can download the current source from http://code.google.com/p/maclibre/.  The basic features work right now (you can install packages), though there is still lots of polishing to do.  The tabs at the top are for developer convenience only and will be hidden in the final version.

I'm getting lots of memory leak warnings at the moment.  I suspect this is because I'm still using Python threads (from the v2 code) instead of Coca threads.

Wednesday, May 28, 2008

Python and Cocoa

The existing MacLibre2 codebase is in Python, and the Cocoa API is an Objective-C API.  Fortunately there's a bridge called PyObjC, which allows the Python and Objective-C objects to talk to each other.  This does cause some weirdness, such as requiring certain method names to end in an underscore.

Implementation of the Cocoa interface is going a bit more slowly than I had hoped.  The official tutorial uses Interface builder 2.X, which is significantly different from the current version.

Currently I'm trying to get an NSOutlineView (for the list of installable packages) working.

Introduction

This blog is for status updates and other information about my GSoC 2008 project, MacLibre v3.  An abstract can be found on the official site here.

The first stage of the project, which I started Monday, is to rewrite the interface to use the Cocoa API's.  More on that later today.