About the Ant build script

Tools No Comments »

It’s not too bad (build.xml).

It has targets to do the two main things you need:

  • create (and delete) the pointer file in your Firefox profile/extension directory
  • create xpi files for releases

and it gets some of the information it needs from the project’s install.rdf.

You have to edit the build.xml project name and the path to your Firefox profile. Everything else comes from install.rdf. I used to get annoyed about manually updating version numbers and stuff in multiple places, and having different ant scripts for my projects so now it just works.

In the beginning…

Tutorial No Comments »

Today, I made the project files for BookSmarts.

You used to have to do lots of thinking and reading to make an extension; now a handy chap called Ted has written an extension wizard.

Ted’s wizard makes a perfectly structured base for starting extensions, all bundled up into a neat zip archive. He even includes shell scripts for packaging it all up into an extension file.

If you’re very new to Firefox extension development, then you would do well to read the Mozilla docs on the files in the extension package. They give a good overview and I’m much more interested in writing code than explaining things that have been explained over and over by people much better at it than me.

This isn’t a single page tutorial, it’s more of a log of the pain of extension development, a guide as to how “I” do it (it’s my way, not THE way) and, hopefully, a source of answers for common problems that tutorials won’t cover so well.

Anyway, I used Ted’s tool as a starting point for BookSmarts. I like to put my chrome in a chrome sub-directory (which helps with my Ant replace script later) so I made some changes to the chrome.manifest (I added “chrome/” in a couple of places).

If you download the folder and run ant, it should build an xpi for you to try in Firefox. It should all work.

An environmentalist.

Tutorial, Tools No Comments »

Today is a lazy Saturday and I’ve decided it’s a perfect day to start writing this extension. Luckily I don’t actually have to do that much to start. It’s all getting the file structure right and configuring the dev environment. Admin stuff really (the exciting stuff was getting the server to work for this website - you missed it).

Dev environment
I’m a Java developer by day (now working at an investment bank in London), so I have ways I like to do things that come from my Java life. You’ll find this in everything I do. It’s just how I am. I’d like to get into other languages (Ruby) but scripting languages don’t have the amazing refactoring tools that I love from Java. When they do, I’m there!

  1. I use Eclipse. It’s a choice and it’s probably overkill for extension development, but it’s what I use.
  2. I use the JSEclipse plugin to get semi-decent JavaScript development going from within Eclipse.
  3. I use Subversion to hold all of my stuff in source-control (normally on my local machine, but for this I’ll put it up on the website).
  4. I build my extensions using Ant. I have a script that works and I use it.

The SVN connection url is http://getbooksmarts.org/svn/booksmarts/. Anonymouse access is enabled. If anyone wants to contribute get in touch and we’ll see what we can do. You’d have to write about how you’re doing stuff on here too.

If you ever checkout the SVN repository, you’ll have my source, project and Ant scripts. It’ll all work without Eclipse, but it’s all integrated in there so I like it.

JSEclipse was recently bought by Adobe, so I don’t know what they’re going to do with it. Hopefully it means money will be there and they can make it REALLY good. Refactoring support for JavaScript would be really hard and REALLY awesome.

Firefox (post 1.5) lets you work on extensions in place, and tell it where to find the source using a pointer file in your profile. This is probably the most useful thing they added for extension developers. The only thing it requires is a special testing format chrome.manifest file. I use the testing chrome.manifest and then produce the package format (using Ant substitutions) when building a deployable. You shouldn’t have to think about it if you use my script.

There’s always a better way to do stuff. I just do what seems best and stick with it. Tell me if I’m being dumb.

Every site needs a layout…

Theme, Thanks No Comments »

This one is called FallSeason. It was designed by node thirty three and comes from WP ThemePark. Thank you.

I forgot to mention…

Justification No Comments »

This is also a long-running and continuous tutorial on extension development. There’s some reasonable starters out there, but there’s a lot of stuff that’s quite hard to do in ole Firefox, so I thought I might try and help some folks.

Anonymous SVN access will be granted and I’ll be sharing all of the build tools that I use for Screengrab! and thus, this (I use Ant by the way - damn the secret’s out).

What’s it all about?

Justification No Comments »

What an excellent question.

This blog is quite simply going to be the homepage of what I hope will end up being a very cool and useful Firefox extension. It’s the extension that I was going to make in 2004 when I got sidetracked by making Screengrab!. Screengrab was actually one very tiny component of this that ended up being so hard to do that I spent about a year getting it right. Some of that is because I didn’t really know what I was doing and some of that is because it is actually quite hard doing clever things with Firefox.

But I digress.

BookSmarts will initially be a much smarter bookmarks implementation than Firefox currently has. Essentially, it will analyse your usage patterns and have a constantly updated list of the places that you go to the most.

If it’s very clever it will be able to group them as portals (Slashdot & digg), or news sites (blogs, ArsTechnica).

It will also save a little picture of the site as it was when you last visited it.

That’s our mildly ambitious goal for the first real release.

The ultimate aim (and the full idea that I had back in early ‘04) was to create a replacement for bookmarks and history. A bookmark just represents a single item in your history and, rather than being static, it would give you a way to navigate that history. The history would be less linear, and more of a graph, showing all of the pages you went to from one single page, the backs and forwards, new tabs and windows and so on.

The even further aim I had from this was to, with user permission and ultimate security, create a server-side component that would receive updates of browser sessions in order to amalgamate data from all of the people using the extension. There would be a website attached that would be yet-another-news-site, but rather than having people nominate and vote for sites, it would show actual user preferences. And there would be NO COMMENTS (OMFG digg R0xz u loosr).

I’m actually convinced that this is Google’s plan with their synchronising extension, although I don’t think they’d make a news aggregator out of it somehow. Just more coal for the search boiler…

Anyway… come along. Let’s begin.

© 2007 Andy Mutton | WordPress Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login