mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 12:15:51 +00:00
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
function upgradeCleanup()
|
|
{
|
|
// Obsolete files and generated files that
|
|
// need to be cleaned up.
|
|
deleteThisFile("Program", "component.reg");
|
|
deleteThisFile("Components", "compreg.dat");
|
|
deleteThisFile("Components", "xpti.dat");
|
|
deleteThisFile("Components", "xptitemp.dat");
|
|
|
|
deleteThisFile("Program", "mozrmi36.dll");
|
|
}
|
|
|
|
// main
|
|
var srDest;
|
|
var err;
|
|
var fProgram;
|
|
|
|
srDest = $SpaceRequired$:bin;
|
|
err = initInstall("XPCOM", "XPCOM", "$Version$");
|
|
logComment("initInstall: " + err);
|
|
|
|
fProgram = getFolder("Program");
|
|
logComment("fProgram: " + fProgram);
|
|
|
|
// Log component.reg file so it can be deleted by the uninstaller.
|
|
// These two files are created after installation is done, thus
|
|
// are normally not logged for uninstall.
|
|
logComment("Installing: " + fProgram + "component.reg");
|
|
|
|
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() of Program returned: " + err);
|
|
|
|
if( err == SUCCESS )
|
|
{
|
|
err = performInstall();
|
|
logComment("performInstall() returned: " + err);
|
|
}
|
|
else
|
|
cancelInstall(err);
|
|
}
|
|
else
|
|
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
|
|
|
|
// end main
|
|
|