mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-10 18:00:15 +01:00
66 lines
1.9 KiB
Plaintext
66 lines
1.9 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");
|
|
|
|
// 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
|
|
|