[Jslib] jslib on moz 1.5 osX 10.2.8

Stephen Knight stknight at ultralifebatteries.com
Wed Oct 22 15:04:52 EDT 2003


Matthew T Webb wrote:
> I'm wondering if anyone on this mailing list has gotten jslib working
> with Mozilla 1.5 on os 10.2.
> 
> I'm looking to revive a dormant mozdev project that uses jslib.
> 
> I used the XPinstall and I have not yet been able to get it to work.  It
> seems to install fine, except the files are put in the in the jslib
> directory, not a content su bdirectory.  I've tried moving them into a
> content directory manually, as well as removing all the references to the
> content dir in the jslib files.

I expect the original install was correct.

If you did the "development install" then you wouldn't see a "content" subdirectory in the jslib 
directory (you should get chrome/jslib/{files}.  You shouldn't need to remove the "content" 
references in the jslib files since this is automatically handled by mozilla.

(if I understand the process correctly)
When a "chrome" item is installed, "installed-chrome.txt" is updated with "skin", "locale" and 
"content" references.  If you're doing a "url,file" install (like the development install) then you 
provide the url to the directory holding the appropriate items.  You do _not_ have to name your 
subdirectories "skin", "locale" or "content" _and_ you can have all three groups mixed into the same 
subdirectory.

so, doing the url:  "chrome://jslib/content" is actually telling mozilla to:
. look in chrome
. find jslib
. using the "content" reference....

(you could probably do "chrome://mypackage/foo" as long as installed-chrome had the "foo" reference 
for "mypackage" setup...on the other hand, mozilla would probably choke on "foo").

> 
> I've never gotten the jslib test files to run, and running moz from the
> command line with the -chrome flag causes moz to crash.

Sorry, I haven't had a chance to do 1.5 yet on my MacOS X box.  Unfortunately, my MacOS X box lurks 
at the end of a dialup, so it's not an experiment I'd rush to try.

> 
> I believe that I have the installed chrome file set up consistently, but I
> am not so certain about the contents.rdf file.  I noticed after the
> xpinstall though, that the jslib portion looks different:
> 
> <RDF:Description about="urn:mozilla:package:jslib"
>                    c:baseURL="resource:/chrome/jslib/"
>                    c:locType="install"
>                    c:displayName="jslib"
>                    c:packageVersion="0.1.88"
>                    c:author="Pete Collins, Eric Plaster, Martin.T.Kutschker"
>                    c:name="jslib" />
> 
> all the other entries have a line like:
>    <c:package resource="urn:mozilla:package:messenger"/>
>   </RDF:Description>

they're a different type of install than the jslib.

> 
> would the lack of the closing tag and the package line cause jslib to
> fail?  When I manually add the lines, Mozilla fails to load.

(mozilla shouldn't have crashed but...) the RDF tags don't use a closing tag (at least in this case) 
but instead used "/>".

> 
> Anyone have ideas as to why this isn't working?

you shouldn't ever need to modify chrome.rdf yourself (unless you're trying to flush stuff 
out...been there...got the t-shirt).  that file is created/modified by Mozilla on startup by using 
the contents of installed-chrome.txt (where to look for stuff) and the "to be installed" contents.rdf.

My test for whether an install has worked correctly is:
. search your mozill-home chrome/contents.rdf for "foo" ("jslib" or whatever your package name is).
. if you don't find what you're looking for:  check your login account preferences for chrome.rdf

some hints:
Windows2000;  Mozilla keeps account-specific info in "D:\Documents and Settings\StKnight\Application 
Data\Mozilla\Profiles\{profile-here}\{ugly-number-here}.slt" (there is a "chrome" buried there). 
some info will be in account-specific, most in the mozilla folder chrome/contents.rdf

Red Hat Linux: so ~/.mozilla/{profile-here}/{ugly-number-here}.slt is used.

MacOS X: ...sorry, but I'm sure there's two places on that OS also.  "preferences" on MacOS X seem 
to be a little...ummm..."flexible" as to location (was it under "Library/Preferences" or 
"Preferences" or...) and I don't have my box right at hand.

hope this helps.

-- 
Stephen Knight
Ultralife Batteries, Inc.
315-332-7100x628



More information about the Jslib mailing list