RetroZilla/xpinstall/packager/os2/xpcom.jst

66 lines
1.9 KiB
Plaintext
Raw Normal View History

2015-10-21 05:03:22 +02:00
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");
// extra files shipped in enhanced builds distributed by Peter Weilbacher
deleteThisFile("Program", "RWSCLI07.DLL");
deleteThisFile("Program", "RWSSRV07.DLL");
deleteThisFile("Program", "RWSUTIL07.CMD");
deleteThisFile("Program", "RWSUTIL.CMD");
deleteThisFile("Program", "RWS08.CMD");
deleteThisFile("Components", "rwsos2.dll");
deleteThisFile("Components", "rwsos2.xpt");
}
// 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