Mike Potter wrote:

> I have a bunch of questions about how I go about creating an XPInstall 
> for the calendar.
> First of all, I've got it working under Linux.  That was OK, a 
> relatively painless experience but I got through it.  Now I need to make 
> it work under Windows as well.


The idea behind XPInstall is that the same script should work for all
platforms unless you're doing platform-specific things. Post your working
Linux script and we'll tweak it into shape for the other platforms.

> Here's what I've got:
> 
> the .xpi file contains the install.js file and the zip of two directories:
> components/  and
> resources/ which has:
>       content/
>       skin/
>       locale/


Should work fine.

> Components/ has two files which I need to put in the components/ 
> directory of the Mozilla build.
> 
> Now I've got some windows dll files that go in the root of the Mozilla 
> install ( windows equivalent of /usr/local/mozilla ), and some other 
> dlls that go in components.


So the structure of the windows version is different? That is, on Linux
they're all in components but on windows some need to be up a level? Might
be worth fixing, but doesn't really matter to the install.

Create a third directory ("bin" or something) and install those libraries to
the getFolder() target "Program". If you structure the others as
subdirectories of "bin" then you can install everything with one
addDirectory() call.

> I need to know a few things:
> 1. What does Install.platform return for the different platforms?


Why do you need to know? There are a very few cases where checking
Install.platform is appropriate; in most cases it's a hack that can be
handled a better way.

In any case, the value is supposed to match the relevant fields of the
default user agent comment. If the default user agent is

   Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7+) ...

then the platform value will be
   Windows; Windows NT 5.0


> 2. What is the best directory structure to contain all this stuff, and 
> what would the install.js file look like?


Rather than start from scratch let's start with what you've got. The best
directory structure is one which allows you to use the same script (or
nearly the same) for all platform-specific binaries.

> If anyone can help me out with this, please cc: me at mikep AT oeone.com 
> or join irc.mozilla.org #calendar and have a look for me.


Happy to help, but would prefer to keep things in this newsgroup. Unlike IRC
newsgroups don't depend on people being available at the same time, and
unlike mail the answers get archived in public to help others with similar
questions.

-Dan Veditz


Reply via email to