gecko-dev/xpinstall/packager/windows/mail.jst

56 lines
1.8 KiB
Plaintext

// main
var srDest;
var err;
var fProgram;
// This list contains filenames that are long filenames ( > 8.3) critical during installation time.
// Unfortunately, it is statically created. If there are new files that are suspected to be
// locked in memory during installation of this .xpi file, then they should be listed here.
// The filenames should include paths relative to the Netscape 6 folder.
// '/' must be used as path delimiters regardless of platform.
var listLongFilePaths = ["components/nsAB4xUpgrader.dll",
"chrome/messenger.jar"];
srDest = $SpaceRequired$:bin;
err = initInstall("Mozilla Mail", "Mail", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
// Ren8dot3 process needs to be done before any files have been installed
// (this includes the temp files during the prepare phase)
prepareRen8dot3(listLongFilePaths);
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() returned: " + err);
// register chrome
err = registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger/");
logComment("registerChrome() returned: "+err);
// check return value
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main