2001-06-03 05:02:14 +04:00
|
|
|
function upgradeCleanup()
|
|
|
|
{
|
|
|
|
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
|
|
|
|
// need to be cleaned up.
|
|
|
|
deleteThisFile("Components", "libmozucth.so");
|
|
|
|
deleteThisFile("Components", "libpsmglue.so");
|
|
|
|
deleteThisFile("Components", "libsample.so");
|
|
|
|
deleteThisFile("Components", "nsSample.js");
|
2002-08-12 23:16:16 +04:00
|
|
|
deleteThisFile("Components", "libucvja.so");
|
|
|
|
deleteThisFile("Components", "libucvko.so");
|
|
|
|
deleteThisFile("Components", "libucvtw.so");
|
|
|
|
deleteThisFile("Components", "libucvtw2.so");
|
|
|
|
deleteThisFile("Components", "libucvlatin.so");
|
|
|
|
deleteThisFile("Components", "libucvcn.so");
|
|
|
|
deleteThisFile("Components", "libucvibm.so");
|
2002-08-23 02:08:36 +04:00
|
|
|
deleteThisFile("Components", "libtxtsvc.so");
|
2002-09-12 08:43:31 +04:00
|
|
|
deleteThisFile("Components", "libgfx2.so");
|
2002-09-19 22:29:56 +04:00
|
|
|
deleteThisFile("Components", "gfx2.xpt");
|
2002-09-18 03:05:27 +04:00
|
|
|
deleteThisFile("Components", "libimggif.so");
|
|
|
|
deleteThisFile("Components", "libimgjpeg.so");
|
|
|
|
deleteThisFile("Components", "libimgpng.so");
|
|
|
|
deleteThisFile("Components", "libimgbmp.so");
|
|
|
|
deleteThisFile("Components", "libimgppm.so");
|
|
|
|
deleteThisFile("Components", "libimgxbm.so");
|
2003-06-04 03:16:42 +04:00
|
|
|
deleteThisFile("Components", "libimgmng.so");
|
2002-09-25 01:50:05 +04:00
|
|
|
deleteThisFile("Components", "libunicharutil.so");
|
|
|
|
deleteThisFile("Components", "libchardet.so");
|
|
|
|
deleteThisFile("Components", "liblwbrk.so");
|
|
|
|
deleteThisFile("Components", "libnslocale.so");
|
|
|
|
deleteThisFile("Components", "libstrres.so");
|
2002-09-19 23:00:13 +04:00
|
|
|
deleteThisFile("Components", "libmozbrwsr.so");
|
2002-09-19 22:29:56 +04:00
|
|
|
deleteThisFile("Components", "libnkcache.so");
|
2002-09-27 22:33:02 +04:00
|
|
|
deleteThisFile("Components", "libjsloader.so");
|
2003-01-14 10:08:59 +03:00
|
|
|
deleteThisFile("Components", "libgkcontent.so");
|
2003-03-15 04:04:32 +03:00
|
|
|
deleteThisFile("Components", "libjsurl.so");
|
|
|
|
deleteThisFile("Components", "liburiloader.so");
|
|
|
|
deleteThisFile("Components", "libgkview.so");
|
|
|
|
deleteThisFile("Components", "libshistory.so");
|
2004-02-24 06:22:35 +03:00
|
|
|
deleteThisFile("Components", "libjsdom.so");
|
2003-05-17 09:59:28 +04:00
|
|
|
deleteThisFile("Components", "compreg.dat");
|
|
|
|
deleteThisFile("Components", "xpti.dat");
|
|
|
|
deleteThisFile("Components", "xptitemp.dat");
|
2002-04-16 22:48:19 +04:00
|
|
|
deleteThisFile("Program", "defaults/pref/config.js");
|
|
|
|
deleteThisFile("Program", "defaults/pref/initpref.js");
|
2001-06-03 05:02:14 +04:00
|
|
|
deleteThisFile("Program", "defaults/wallet/URLFieldSchema.tbl");
|
|
|
|
deleteThisFile("Program", "libcmt.so");
|
|
|
|
deleteThisFile("Program", "libjpeg.so");
|
|
|
|
deleteThisFile("Program", "libprotocol.so");
|
|
|
|
}
|
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
var srDest = $SpaceRequired$;
|
|
|
|
|
2005-04-11 21:06:40 +04:00
|
|
|
var err = initInstall("$AppDisplayName$ Navigator", "Browser", "$Version$");
|
2000-05-24 18:08:46 +04:00
|
|
|
logComment("initInstall: " + err);
|
1999-12-11 02:45:44 +03:00
|
|
|
|
2000-05-24 18:08:46 +04:00
|
|
|
var communicatorFolder = getFolder("Program");
|
1999-12-11 02:45:44 +03:00
|
|
|
logComment("communicatorFolder: " + communicatorFolder);
|
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
if (verifyDiskSpace(communicatorFolder, srDest))
|
|
|
|
{
|
2001-06-03 05:02:14 +04:00
|
|
|
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
|
|
|
// delete files that we happen to be also installing. This way, if we do,
|
|
|
|
// it will just get reinstalled. This is for safety measure.
|
|
|
|
upgradeCleanup();
|
2000-08-25 04:45:41 +04:00
|
|
|
err = addDirectory("Program",
|
|
|
|
"$Version$",
|
|
|
|
"bin", // jar source folder
|
|
|
|
communicatorFolder, // target folder
|
|
|
|
"", // target subdir
|
|
|
|
true ); // force flag
|
1999-12-11 02:45:44 +03:00
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
logComment("addDirectory() returned: " + err);
|
1999-12-11 02:45:44 +03:00
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
// create the plugins folder next to mozilla
|
|
|
|
var pluginsFolder = getFolder("Plugins");
|
|
|
|
var ignoreErr = dirCreate(pluginsFolder);
|
|
|
|
logComment("dirCreate() returned: " + ignoreErr);
|
1999-12-11 02:45:44 +03:00
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
var cf = getFolder("Chrome");
|
2001-03-06 05:34:34 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global-platform/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator-platform/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator-platform/");
|
|
|
|
|
2001-02-23 11:34:10 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global-region/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator-region/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/editor-region/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator-region/");
|
|
|
|
|
2000-09-20 23:35:24 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global/");
|
2002-06-12 22:52:46 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/autoconfig/");
|
2001-02-23 08:33:33 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/cookie/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/wallet/");
|
2001-07-05 11:22:43 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"content-packs.jar"),"content/content-packs/");
|
2000-09-20 23:35:24 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator/");
|
2005-03-10 07:38:35 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/branding/");
|
2000-09-20 23:35:24 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/editor/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator/");
|
2000-11-30 00:20:09 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/necko/");
|
2001-09-25 10:01:43 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/mozldap/");
|
2000-09-20 23:35:24 +04:00
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/communicator/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/editor/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/global/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/messenger/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/navigator/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/communicator/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/editor/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/global/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/messenger/");
|
|
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/navigator/");
|
2001-04-12 05:06:01 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"help.jar"),"content/help/");
|
2002-07-26 21:47:16 +04:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/xbl-marquee/");
|
2003-03-25 03:31:11 +03:00
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/p3p/");
|
2000-05-24 18:08:46 +04:00
|
|
|
|
2000-08-25 04:45:41 +04:00
|
|
|
if (err==SUCCESS)
|
|
|
|
{
|
|
|
|
err = performInstall();
|
|
|
|
logComment("performInstall() returned: " + err);
|
2001-05-23 03:38:12 +04:00
|
|
|
if (! ('buildID' in Install))
|
|
|
|
{
|
|
|
|
logComment("Running Pre-Mozilla 0.9.1");
|
2002-03-23 13:02:54 +03:00
|
|
|
initInstall("Post-install Cleanup Utility", "Browser/xpicleanup", "$Version$");
|
2001-05-23 03:38:12 +04:00
|
|
|
cleanupUtility = getFolder(communicatorFolder, "xpicleanup");
|
|
|
|
err = File.execute(cleanupUtility);
|
|
|
|
logComment("execute() returned: " + err);
|
|
|
|
err = performInstall();
|
|
|
|
}
|
2000-08-25 04:45:41 +04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cancelInstall(err);
|
|
|
|
logComment("cancelInstall() due to error: " + err);
|
|
|
|
}
|
1999-12-11 02:45:44 +03:00
|
|
|
}
|
|
|
|
else
|
2000-08-25 04:45:41 +04:00
|
|
|
cancelInstall(INSUFFICIENT_DISK_SPACE);
|