зеркало из https://github.com/mozilla/pjs.git
74 строки
2.2 KiB
Plaintext
74 строки
2.2 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");
|
|
}
|
|
|
|
// main
|
|
var srDest;
|
|
var err;
|
|
var fProgram;
|
|
|
|
srDest = $SpaceRequired$:bin;
|
|
err = initInstall("Mozilla 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
|