зеркало из https://github.com/mozilla/pjs.git
524 строки
24 KiB
Plaintext
524 строки
24 KiB
Plaintext
function registerProgramFolderKey(winreg, fFolderPath)
|
|
{
|
|
var subkey;
|
|
var err;
|
|
var szCurrentMozillaVersion;
|
|
|
|
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
|
|
winreg.createKey("SOFTWARE\\$CompanyName$","");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\Mozilla";
|
|
szCurrentMozillaVersion = winreg.getValueString(subkey, "CurrentVersion");
|
|
logComment("szCurrentMozillaVersion: " + szCurrentMozillaVersion);
|
|
|
|
if((szCurrentMozillaVersion == "") || (szCurrentMozillaVersion == null))
|
|
{
|
|
/* we *MUST* have a Mozilla CurrentVersion key for the Java plugin to work with Firebird - bug 229627 */
|
|
subkey = "SOFTWARE\\$CompanyName$\\Mozilla";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "CurrentVersion", "1.6");
|
|
}
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
|
|
winreg.createKey(subkey,"");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "Program Folder Path", fFolderPath);
|
|
}
|
|
|
|
function createShortcuts()
|
|
{
|
|
var subkey;
|
|
var valname;
|
|
var szStartMenuPrograms;
|
|
var szStartMenu;
|
|
var szFolderDesktop;
|
|
var szFolderQuickLaunch;
|
|
var szFolderAppData;
|
|
var winreg;
|
|
var fTemp;
|
|
var fProgram;
|
|
var fDefShortcuts;
|
|
var fileExe;
|
|
var scExeDesc;
|
|
var scFolderName;
|
|
var fFolderDesktop;
|
|
var fFolderPrograms;
|
|
var fFolderProgramsStr;
|
|
var fFolderQuickLaunch;
|
|
var is_winnt;
|
|
var szCurrentVersion;
|
|
var folderQuickLaunchExists;
|
|
|
|
winreg = getWinRegistry();
|
|
fProgram = getFolder("Program");
|
|
fDefShortcuts = getFolder("Program","defaults/shortcuts");
|
|
fTemp = fProgram + "$MainExeFile$";
|
|
fileExe = getFolder("file:///", fTemp);
|
|
scExeDesc = "$ProductName$";
|
|
scFolderName = "$ProductName$";
|
|
scSafeModeDesc = "$ProductName$ (No Extensions)";
|
|
scSafeModeParam = "-no-extensions";
|
|
|
|
if (winreg) {
|
|
// determine if the script is running under NT or not
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
|
|
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
|
|
logComment("szCurrentVersion: " + szCurrentVersion);
|
|
is_winnt = szCurrentVersion != "";
|
|
logComment("is_winnt value: " + is_winnt);
|
|
|
|
// Locate the various folders we're about to install shortcuts into.
|
|
if(!is_winnt || restrictedAccess) {
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
|
|
szStartMenuPrograms = winreg.getValueString(subkey, "Programs");
|
|
szStartMenu = winreg.getValueString(subkey, "Start Menu");
|
|
szFolderDesktop = winreg.getValueString(subkey, "Desktop");
|
|
}
|
|
else {
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
|
|
szStartMenuPrograms = winreg.getValueString(subkey, "Common Programs");
|
|
szStartMenu = winreg.getValueString(subkey, "Common Start Menu");
|
|
szFolderDesktop = winreg.getValueString(subkey, "Common Desktop");
|
|
}
|
|
|
|
// Locate the Start Menu Programs Folder
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
|
|
fFolderProgramsStr = winreg.getValueString(subkey, "Program Folder Path");
|
|
fFolderPrograms = getFolder("file:///", fFolderProgramsStr || szStartMenuPrograms);
|
|
|
|
// Locate the Desktop Folder
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
fFolderDesktop = getFolder("file:///", szFolderDesktop);
|
|
|
|
// Locate the Quick Launch folder
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
|
|
szFolderAppData = winreg.getValueString(subkey, "AppData");
|
|
szFolderQuickLaunch = szFolderAppData + "\\Microsoft\\Internet Explorer\\Quick Launch";
|
|
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
|
|
folderQuickLaunchExists = File.isDirectory(fFolderQuickLaunch);
|
|
if(!folderQuickLaunchExists) {
|
|
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
|
|
szFolderQuickLaunch = winreg.getValueString(subkey, "Quick Launch");
|
|
folderQuickLaunchExists = File.isDirectory(fFolderPrograms);
|
|
if(folderQuickLaunchExists)
|
|
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
|
|
}
|
|
logComment("folderQuickLaunchExists: " + folderQuickLaunchExists);
|
|
|
|
logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
|
|
logComment("Folder StartMenu : " + szStartMenu);
|
|
logComment("Folder FolderDesktop : " + szFolderDesktop);
|
|
logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
|
|
logComment("fileExe : " + fileExe);
|
|
logComment("fFolderPrograms : " + fFolderPrograms);
|
|
logComment("scExeDesc : " + scExeDesc);
|
|
logComment("fProgram : " + fProgram);
|
|
|
|
// Explicitly create the fFolderPrograms even though the windowsShortcut
|
|
// function creates the folder. This is so that the folder creation gets
|
|
// logged for uninstall to remove it.
|
|
if(!File.exists(fFolderPrograms))
|
|
File.dirCreate(fFolderPrograms);
|
|
if(!File.exists(fDefShortcuts))
|
|
File.dirCreate(fDefShortcuts);
|
|
|
|
// Create the Shortcuts
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
|
|
if (winreg.getValueNumber(subkey, "Create Desktop Shortcut") != 0)
|
|
File.windowsShortcut(fileExe, fFolderDesktop, scExeDesc, fProgram, "", fileExe, 0);
|
|
if (winreg.getValueNumber(subkey, "Create Start Menu Shortcut") != 0) {
|
|
File.windowsShortcut(fileExe, fFolderPrograms, scExeDesc, fProgram, "", fileExe, 0);
|
|
File.windowsShortcut(fileExe, fFolderPrograms, scSafeModeDesc, fProgram, scSafeModeParam, fileExe, 0);
|
|
}
|
|
if (winreg.getValueNumber(subkey, "Create Quick Launch Shortcut") != 0 && folderQuickLaunchExists) {
|
|
logComment("creating QuickLaunch in " + fFolderQuickLaunch);
|
|
File.windowsShortcut(fileExe, fFolderQuickLaunch, scExeDesc, fProgram, "", fileExe, 0);
|
|
}
|
|
// Always create the default shortcuts.
|
|
File.windowsShortcut(fileExe, fDefShortcuts, scExeDesc, fProgram, "", fileExe, 0);
|
|
File.windowsShortcut(fileExe, fDefShortcuts, scSafeModeDesc, fProgram, scSafeModeParam, fileExe, 0);
|
|
|
|
if(!restrictedAccess) {
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
registerProgramFolderKey(winreg, fFolderPrograms);
|
|
|
|
// This is so that Windows Media Player works with us
|
|
var subkey = "SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\$MainExeFile$";
|
|
winreg.createKey(subkey, "");
|
|
}
|
|
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
registerProgramFolderKey(winreg, fFolderPrograms);
|
|
}
|
|
else
|
|
logComment("winreg is null");
|
|
}
|
|
|
|
function IsWinnt()
|
|
{
|
|
/* Determines if the script is running under NT or not.
|
|
*
|
|
*/
|
|
var winreg = getWinRegistry();
|
|
var subkey;
|
|
var szCurrentVersion;
|
|
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
|
|
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
|
|
logComment("szCurrentVersion: " + szCurrentVersion);
|
|
if((szCurrentVersion == "") || (szCurrentVersion == null))
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
function registerMainKeys(winreg)
|
|
{
|
|
var subkey; //the name of the subkey you are poking around in
|
|
var data;
|
|
var err;
|
|
|
|
winreg.createKey("SOFTWARE\\$CompanyName$","");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
|
|
winreg.createKey(subkey,"");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
|
|
winreg.createKey(subkey,"");
|
|
|
|
err = winreg.setValueString(subkey, "Install Directory", fProgram);
|
|
|
|
// The following keys are required to be created to supply information
|
|
// about the location of the Gecko Embedded Client to 3rd party apps.
|
|
// "SOFTWARE\\Mozilla" must not be localized!
|
|
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "GeckoVer", "$GreVersion$");
|
|
|
|
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$\\Extensions";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "Components", fProgram + "Components");
|
|
err = winreg.setValueString(subkey, "Plugins", fProgram + "Plugins");
|
|
|
|
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$\\bin";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
|
|
|
|
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
|
|
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
|
|
|
|
// Register as a windows XP internet browser
|
|
if( IsWinnt() )
|
|
{
|
|
//!4sunbird subkey = "Software\\Clients\\StartMenuInternet\\$MainExeFile$";
|
|
//!4sunbird winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
|
|
winreg.createKey(subkey, "");
|
|
winreg.createKey(subkey + "\\DefaultIcon", "");
|
|
winreg.createKey(subkey + "\\shell", "");
|
|
winreg.createKey(subkey + "\\shell\\open", "");
|
|
winreg.createKey(subkey + "\\shell\\open\\command", "");
|
|
winreg.createKey(subkey + "\\InstallInfo", "");
|
|
winreg.setValueString(subkey, "", "$ProductNameInternal$");
|
|
|
|
// path does not need to be quoted per MS doc
|
|
data = fProgram + "$MainExeFile$,0";
|
|
winreg.setValueString(subkey + "\\DefaultIcon", "", data);
|
|
|
|
data = "\"" + fProgram + "$MainExeFile$\"";
|
|
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
|
|
|
|
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs calendar";
|
|
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
|
|
|
|
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 1);
|
|
|
|
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash ";
|
|
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
|
|
|
|
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss calendar";
|
|
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
|
|
}
|
|
}
|
|
|
|
function updateWinReg()
|
|
{
|
|
//Notes:
|
|
// can't use a double backslash before subkey - Windows already puts it in.
|
|
// subkeys have to exist before values can be put in.
|
|
var winreg = getWinRegistry();
|
|
var subkey; //the name of the subkey you are poking around in
|
|
var err;
|
|
var ikwDefined;
|
|
|
|
if(winreg != null)
|
|
{
|
|
/* This will check to see if the user has restricted access or not.
|
|
* It checks to see if HKEY_LOCALMACHINE\SOFTWARE is writable. If
|
|
* it is, then access is not restricted. This is only used to
|
|
* determine which Desktop, Programs, and Start Menu folders
|
|
* are to used: common or per user
|
|
*/
|
|
restrictedAccess = false;
|
|
ikwDefined = typeof(winreg.isKeyWritable);
|
|
logComment("winreg.isKeyWritable(): " + ikwDefined);
|
|
if(ikwDefined == "function")
|
|
{
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
if(!winreg.isKeyWritable("SOFTWARE"))
|
|
restrictedAccess = true;
|
|
}
|
|
|
|
logComment("restrictedAccess value: " + restrictedAccess);
|
|
if(!restrictedAccess)
|
|
{
|
|
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
|
|
registerMainKeys(winreg);
|
|
|
|
// set the App Paths key here
|
|
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\$MainExeFile$";
|
|
winreg.createKey(subkey,"");
|
|
err = winreg.setValueString(subkey, "", fProgram + "$MainExeFile$");
|
|
err = winreg.setValueString(subkey, "Path", fProgram);
|
|
|
|
// XPInstall content type mappings.
|
|
subkey = "SOFTWARE\\Classes\\MIME\\Database\\Content Type\\application/x-xpinstall;app=sunbird"
|
|
winreg.createKey(subkey, "");
|
|
winreg.setValueString(subkey, "Extension", ".xpi");
|
|
}
|
|
|
|
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
|
|
registerMainKeys(winreg);
|
|
}
|
|
}
|
|
|
|
function upgradeCleanup()
|
|
{
|
|
// Obsolete files from previous versions of Sunbird that
|
|
// need to be cleaned up.
|
|
deleteThisFile("Chrome", "US.jar");
|
|
deleteThisFile("Chrome", "en-win.jar");
|
|
deleteThisFile("Components", "compreg.dat");
|
|
deleteThisFile("Components", "xpti.dat");
|
|
deleteThisFile("Components", "nsBackgroundUpdateService.js");
|
|
deleteThisFile("Program", "defaults/pref/all.js");
|
|
deleteThisFile("Program", "defaults/pref/security-prefs.js");
|
|
deleteThisFile("Program", "defaults/pref/winpref.js");
|
|
deleteThisFile("Program", "defaults/pref/xpinstall.js");
|
|
deleteThisFolder("Program", "defaults/profile/US");
|
|
}
|
|
|
|
// main
|
|
var srDest;
|
|
var err;
|
|
var err2;
|
|
var fProgram;
|
|
var fWindowsSystem;
|
|
var fileComponentRegStr;
|
|
var fileComponentReg;
|
|
var restrictedAccess;
|
|
var fileToRegister;
|
|
var args;
|
|
var gGreLocal = false;
|
|
|
|
args = new String(Install.arguments);
|
|
logComment("args: " + args);
|
|
|
|
// If -gGreLocal is passed in, then we need to *not* cleanup GRE files if they
|
|
// exist in the browser dir.
|
|
// The default is to delete any GRE files because we default GRE will be global.
|
|
if(args == "-greLocal")
|
|
gGreLocal = true;
|
|
|
|
srDest = $SpaceRequired$:bin;
|
|
err = initInstall("$ProductName$", "Sunbird", "$Version$");
|
|
logComment("initInstall: " + err);
|
|
|
|
fProgram = getFolder("Program");
|
|
fWindowsSystem = getFolder("Win System");
|
|
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() of Program returned: " + err);
|
|
|
|
// check return value
|
|
if( err == SUCCESS )
|
|
{
|
|
fileToRegister = getFolder(fProgram, "AccessibleMarshal.dll");
|
|
err2 = File.windowsRegisterServer(fileToRegister);
|
|
logComment("windowsRegisterServer() returned: " + err2);
|
|
updateWinReg(); // Finish registering above marshalling dll's
|
|
|
|
createShortcuts();
|
|
|
|
// we don't want to fail on errors for the above two
|
|
resetError();
|
|
|
|
// register chrome
|
|
//!4sunbird registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "browser.jar"), "content/browser/");
|
|
//!4sunbird registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome", "classic.jar"), "skin/classic/browser/");
|
|
//!4sunbird registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "browser.jar"), "content/browser-region/");
|
|
//!4sunbird registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "browser.jar"), "content/browser-platform/");
|
|
registerChrome(PACKAGE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "content/calendar/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "skin/classic/calendar/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "skin/modern/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/en-US/calendar/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome", "classic.jar"), "skin/classic/calendar/");
|
|
|
|
/* registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/ca-AD/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/cs-CZ/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/cy-GB/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/de-AT/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/es-ES/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/fr-FR/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/hu-HU/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/it-IT/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/ja-JP/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/lt-LT/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/nl-NL/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/pl-PL/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/pt-BR/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/sk-SK/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/sl-SI/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/sv-SE/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/tr-TR/calendar/");
|
|
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", "calendar.jar"), "locale/wen-DE/calendar/");
|
|
*/
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "toolkit.jar"), "content/passwordmgr/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "toolkit.jar"), "content/mozapps/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome", "classic.jar"), "skin/classic/mozapps/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/autoconfig/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/necko/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/cookie/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/wallet/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/xbl-marquee/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-region/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-platform/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/global/");
|
|
|
|
// XXXben Stuff that will become obsolete
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-region/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-platform/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/navigator/");
|
|
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-region/");
|
|
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-platform/");
|
|
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/communicator/");
|
|
|
|
// Create the uninstall folder.
|
|
err = File.dirCreate(getFolder("Program", "uninstall"));
|
|
logComment("dirCreate() of Program/uninstall returned: " + err);
|
|
|
|
// We need to register the psm chrome files.
|
|
// We're checking to see if they exist first in case
|
|
// they were not built and packaged up.
|
|
var pki = getFolder("Chrome", "pippki.jar");
|
|
if(File.exists(pki))
|
|
registerChrome(CONTENT | DELAYED_CHROME, pki, "content/pippki/");
|
|
|
|
var nss = getFolder("Chrome", "pipnss.jar");
|
|
if(File.exists(nss))
|
|
registerChrome(CONTENT | DELAYED_CHROME, nss, "content/pipnss/");
|
|
|
|
/* Log files that are created after the installer is done, so they can be uninstalled */
|
|
logComment("Installing: " + fProgram + ".autoreg");
|
|
logComment("Installing: " + fProgram + "Xpcs Registry.dat");
|
|
logComment("Installing: " + fProgram + "xpcom.log");
|
|
logComment("Create Folder: " + fProgram + "components");
|
|
logComment("Installing: " + fProgram + "components\\xpti.dat");
|
|
logComment("Installing: " + fProgram + "components\\xptitemp.dat");
|
|
logComment("Installing: " + fProgram + "components\\compreg.dat");
|
|
logComment("Create Folder: " + fProgram + "components\\Netscape");
|
|
logComment("Create Folder: " + fProgram + "components\\Netscape\\MozillaTrunk");
|
|
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\manifest.ini");
|
|
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\permdata.box");
|
|
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\Talkback.ini");
|
|
logComment("Create Folder: " + fProgram + "chrome");
|
|
logComment("Installing: " + fProgram + "chrome\\installed-chrome.txt");
|
|
logComment("Installing: " + fProgram + "chrome\\chrome.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\cookie\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\inspector");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\inspector\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\inspector\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\communicator\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\editor\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\messenger\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\content");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\content\\overlays.rdf");
|
|
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\skin");
|
|
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\skin\\stylesheets.rdf");
|
|
logComment("Create Folder: " + fProgram + "uninstall");
|
|
|
|
err = getLastError();
|
|
if (err == SUCCESS)
|
|
{
|
|
err = performInstall();
|
|
logComment("performInstall() returned: " + err);
|
|
if (! ('buildID' in Install))
|
|
{
|
|
logComment("Running Pre-Mozilla 0.2+");
|
|
initInstall("Post-install Cleanup Utility", "Calendar/xpicleanup", "$Version$");
|
|
cleanupUtility = getFolder(fProgram, "xpicleanup.exe");
|
|
err = File.execute(cleanupUtility);
|
|
logComment("execute() returned: " + err);
|
|
err = performInstall();
|
|
}
|
|
}
|
|
else
|
|
cancelInstall(err);
|
|
}
|
|
else
|
|
cancelInstall(err);
|
|
}
|
|
else
|
|
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
|
|
|
|
// end main
|