The Java locations made sense when Netscape came with its own JVM -- we knew
where the base classes were, and we supported a special download location
where we'd recognize user-installed java archives. In N6 Java may or may not
be present, and if it is present it could be one of several JVM's with
different ways of discovering where they are installed. There was just no
reasonable way to implement these special locations at this time so they
were dropped.

If you ever want to know the real unfiltered dirt on which folder targets
are supported go to the source:
http://lxr.mozilla.org/seamonkey/source/xpinstall/src/nsInstallFolder.cpp#51

The docs are wrong about getVersionInfo(), the name is actually
getVersion(). Some of the older forms--like updateEnabled()--are being
supported for now to give people time to switch their sites over. I guess I
really should make these older forms spit out javascript warnings that
they're going away. For supported InstallTrigger methods see
http://lxr.mozilla.org/seamonkey/source/xpinstall/src/nsJSInstallTriggerGlobal.cpp#522

The newsgroup news://news.mozilla.org/netscape.public.mozilla.xpinstall is a
good resource for questions like this. Answers can then be archived and
benefit more than one person at a time.

-Dan Veditz


Ian Oeschger wrote:
> 
> Hi Darren
> In the description for getFolder() in the new docs, there is a list of
> both platform-specific and platform-independent keywords that are
> supported. The particular locations you mention, "Java Download",
> "Netscape Java Bin", and "Netscape Java Classes" are, I think, gone now
> because the installer is not the Java-based SmartUpdate it was but the
> native XPInstall. XPInstall doesn't know about Java, I guess is what I
> mean to say. But there are a host of keywords you can use to get to the
> directories you want, and you can always name the directory explicitly
> (per platform).
> 
> enabled and versionInfo: These methods are the same, I think. Dan, enabled
> is read-only isn't it? Was updateEnabled() also read-only? Many of the
> methods were renamed to use the JavaScript style (i.e., lowercase first,
> upper back, atttribute-like names instead of getters) Not sure what our
> plans are regarding deprecated methods (Dan?), but I would encourage you
> to use the new versions if you can.
> 
> -ian
> 
> Darren Nelsen wrote:
> 
> > In the 'old' SmartUpdate API, there is a a
> > SoftwareUpdate.GetFolder(folderName) method that accepted
> > platform-independent locations such as "Java Download", "Netscape Java
> > Bin", and "Netscape Java Classes".  In the documentation for XPI, those
> > are not listed.  Do you happen to know if they are still supported?
> > I'll be testing here in the next day or so myself to see if it will
> > work.
> >
> > Also, the InstallTrigger object appears to accept two methods that are
> > not listed in the documentation.  I've used methods called
> > updateEnabled() and getVersion() successfully.  In the documentation
> > the listed methods are enabled() and getVersionInfo().  I assume they do
> > the same things.  Is it still safe to use the ones I'm using... are they
> > being phased out or are they just not listed?  I'll try using the ones
> > listed in the doc.
> >
> > Thanks.
> > -darren

Reply via email to