Martin Kutschker wrote:

> Hi!
>
> I need to add a file within the user directory (for my caluclator add-on
> package). I am doing this currently by finding the dir and then creating the
> file if necessary. But now I want to use a template file. It's annoying to
> have to write out the contents of the file in the package code.
>

What do you mean by "have to write out the contents of the file in the package
code"?  Are you saying that you are creating the file by writing it out via the
xpinstall's install script?  If so, you shouldn't need to do that.  You can just
install it.

>
> Is there a way in xpinstall to do this? I guess it would be possible to add
> a file to the default profile dir. But how do I ensure it's being copied
> from there when I try to access it? Do I need to do it myself or is there
> some kind of registry (of a service) for such a thing.
>

If you add a file to the default profile dir: ...\mozilla\defaults\profile
Your file will be copied to any newly created profile's user profile dir.  The
browser takes care of that.  But it will not affect profiles already created
prior to the installation of your calculator.

>
> If the above is not suitable, then how do I copy a file from a package
> (which may be a jar or a directory structure) into the profile directory?
>
> Thanx,
> Masi

Reply via email to