Jason Bassford wrote:
> initInstall("Test Run","TestRun","1.0");
I'd pick a better registry name than "TestRun" -- to avoid name clashes I
recommend the format <author>/<package> where author could be you or your
company name.
> err = execute("edit.com", "test.txt");
>
> This works so long as I include "edit.com" in the XPI.
If you want to execute a file on disk use File.execute(), but you'll need to
construct a file object (that is, use getFolder()) that contains a full path
to the thing to be executed.
> However, I now have another problem. The 2nd parameter passed to
> execute() is *not* referencing the also included "test.txt" file that
> I've compressed into the XPI. Instead, when I install the XPI, it
> loads as if I'd typed "edit c:\program files\mozilla\test.txt".
More precisely it loads as if you had typed "edit text.txt", but the current
directory for the OS is the one in which Mozilla is executing. The argument
is just a string, could be -options or other things that have nothing to do
with filenames.
> How can I get the execute() command's argument parameter to refer to
> the contents of the XPI?
>
> (This is all so I can include a ZIP utility, along with .gif files, to
> replace existing .jar images...)
You can't directly, you'll need to "install" your .gif files, run the zip
command, then delete the installed files if you wish. You might have to
experiment with multiple initInstall-performInstall blocks in the same
script -- actions don't officially take place until during performInstall(),
although you could take advantage of some prep stages. Experiment.
-Dan Veditz