gecko-dev/xpinstall/packager/mac/langenus.jst
2001-05-02 23:55:19 +00:00

73 lines
2.3 KiB
Plaintext

var srDest = $SpaceRequired$;
var err;
var fProgram;
// OS type detection
// which platform?
var platformStr = new String(Install.platform);
var platformNode;
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else
platformNode = 'unix';
logComment("initInstall: platformNode=" + platformNode);
// end
// end - OS type detection
// --- LOCALIZATION NOTE: translate only these ---
var prettyName = "English (US) Language Pack";
var langcode = "en";
var chromeNode = langcode + "-US";
// --- END LOCALIZABLE RESOURCES ---
var regName = "locales/mozilla/" + chromeNode;
var chromeName = chromeNode + ".jar";
var platformName = langcode + "-" + platformNode + ".jar";
var localeName = "locale/" + chromeNode + "/";
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if (verifyDiskSpace(fProgram, srDest))
{
err = addDirectory("",
"$Version$",
"viewer",
fProgram,
"",
true);
logComment("addDirectory() returned: " + err);
var cf = getFolder("Chrome");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "global/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "communicator/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "messenger/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "editor/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "navigator/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "necko/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "cookie/");
registerChrome(LOCALE, getFolder(cf, chromeName), localeName + "wallet/");
registerChrome(LOCALE, getFolder(cf, platformName), localeName + "global-platform/");
registerChrome(LOCALE, getFolder(cf, platformName), localeName + "communicator-platform/");
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
{
cancelInstall(err);
logComment("cancelInstall due to error: " + err);
}
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);