kazu-yamamoto / Firemacs

An extension to add Emacs's editing features to Firefox
http://www.mew.org/~kazu/proj/firemacs/
107 stars 12 forks source link

FF4 betas xul registration #7

Closed diegov closed 13 years ago

diegov commented 13 years ago

It seems that FF's version sorting works in a weird way to cater for pre-release versions. From https://developer.mozilla.org/en/Toolkit_version_format: "A string-part that exists is always less-then a nonexisting string-part (1.6a is less than 1.6)."

This means with the new appversion flag in chrome.manifest the xul won't get registered for the FF4 betas, since, for example, 4.0b13pre < 4.0.*.

This commit adds a second appversion flag to allow the xul to be registered in the betas. In theory since 4.0b < 4.0 there's no need for the two, but having no FF4.0 to try it against I left the 4.0.* appversion flag there as it was, since according to https://developer.mozilla.org/en/chrome_registration "Multiple appversion flags may be included on a single line, in which case the line is applied if any of the flags match". That way we can be sure that it'll still work once FF4.0 is released.

Cheers Diego

kazu-yamamoto commented 13 years ago

Do you use 4.0bX? And can't you upgrade to FF4.0?

diegov commented 13 years ago

I hadn't realised the RC from firefox.com already has 4.0 as its version number. I'm using nightly builds from this ppa for ubuntu: https://launchpad.net/~ubuntu-mozilla-daily/+archive/ppa ...which still have the 4.0b13pre version. I'll post a message there see what's the story with the version numbers since that PPA has later builds than the 4.0 RC.

Anyway I've no idea how many people could be using that PPA and firemacs, but this shouldn't be a problem for long since we should be getting deb packages with versions 4.0.* soon from there so maybe there's no point in you pulling my change.

Cheers Diego

kazu-yamamoto commented 13 years ago

I have push a commit which contains another way to fix this problem. Please test.

diegov commented 13 years ago

That still doesn't work I'm afraid, and to confirm I ran this:

var versionComparator = Components.classes["@mozilla.org/xpcom/version-comparator;1"] .getService(Components.interfaces.nsIVersionComparator); versionComparator.compare('4', '4.0b13pre');

Which still returns 1. Since 4 == 4.0.0.0 and 4.0.* > 4.0b.* then I guess it makes sense. I've asked in IRC about debs with v. > 4.*, I'll post back when I get some more information.

Cheers Diego

diegov commented 13 years ago

Ok, according to one of the ubuntu ppl in #ubuntu-mozillateam, the version of the daily builds will be incremented soon, so I'll close this and use my own build in the mean time. Thanks for having taken the time to have a look at this, I hope I didn't waste much of your time.

Diego