gecko/xpinstall/packager/os2/mail.jst

91 lines
2.9 KiB
Plaintext

function upgradeCleanup()
{
// Obsolete files and generated files that
// need to be cleaned up.
deleteThisFile("Program", "msgMapi.dll");
deleteThisFile("Components", "signed.dll");
deleteThisFile("Components", "smimestb.dll");
deleteThisFile("Components", "nsMapiRegistry.dll");
deleteThisFile("Components", "absyncsv.dll");
deleteThisFile("Components", "addrbook.xpt");
deleteThisFile("Components", "impComm4xMail.xpt");
deleteThisFile("Components", "import.xpt");
deleteThisFile("Components", "mailnews.xpt");
deleteThisFile("Components", "mailview.xpt");
deleteThisFile("Components", "mime.xpt");
deleteThisFile("Components", "msgbase.xpt");
deleteThisFile("Components", "msgcompose.xpt");
deleteThisFile("Components", "msgdb.xpt");
deleteThisFile("Components", "msgimap.xpt");
deleteThisFile("Components", "msglocal.xpt");
deleteThisFile("Components", "msgnews.xpt");
deleteThisFile("Components", "msgsearch.xpt");
deleteThisFile("Components", "msgsmime.xpt");
deleteThisFile("Components", "impText.dll");
deleteThisFile("Components", "imp4Mail.dll");
}
// main
var srDest;
var err;
var fProgram;
srDest = $SpaceRequired$:bin;
err = initInstall("SeaMonkey Mail", "Mail", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
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);
// check return value
if( err == SUCCESS )
{
// register chrome
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-region/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-smime/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-mdn/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-views/");
// check return value
err = getLastError();
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main