Checked in patch for bug 330963: install.js needs to be corrected for Calendar XPI. (Also removed deprecated install.* files r=mostafah

This commit is contained in:
mostafah%oeone.com 2006-03-21 12:19:05 +00:00
parent 7915c0f851
commit 5cbf2107cd
3 changed files with 1 additions and 262 deletions

View File

@ -1,100 +0,0 @@
/* ***************
Desc: Installation script
****************** */
const displayName = "Mozilla Calendar";
const name = "MozillaCalendar";
const version = "0.8";
const addLocales = new Array("ca-AD", "cs-CZ", "cy-GB", "de-AT", "es-ES", "fr-FR", "hu-HU", "it-IT", "ja-JP", "lt-LT",
"nl-NL", "pl-PL", "pt-BR", "sk-SK", "sl-SI", "sv-SE", "tr-TR", "wen-DE");
const default_lang = "en-US";
var err = initInstall(displayName, name, version);
logComment("initInstall returned: " + err);
calendarDir = getFolder("Chrome","calendar");
logComment("calendarDir is: " + calendarDir);
setPackageFolder(calendarDir);
err = addDirectory("", "components", getFolder( "Components" ), "" );
logComment("addDirectory() for components returned: " + err);
err = addDirectory( "", "", "other_stuff/icons", getFolder( "Chrome", "icons" ), "", true );
logComment("addDirectory() for icons returned: " + err);
err = addFile( "Calendar Chrome",
"chrome/calendar.jar", // jar source folder
getFolder("Chrome"), // target folder
"");
logComment("addFile() for calendar.jar returned: " + err);
var err = getLastError();
if ( err == SUCCESS ) {
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/"+default_lang+"/calendar/");
for (var i = 0; i < addLocales.length; i++) {
// Check Mozilla 1.x, Mozilla Firefox (Browser)
chkJarFileName = addLocales[i] + ".jar";
tmp_f = getFolder("Chrome", chkJarFileName);
if ( File.exists(tmp_f) ) {
err = addFile( "Calendar Chrome-"+addLocales[i],
"chrome/calendar-"+addLocales[i]+".jar", // jar source folder
getFolder("Chrome"), // target folder
"");
logComment("addFile() for locale " + addLocales[i] + " returned: " + err);
if( err != SUCCESS )
alert( "addFile() for locale " + addLocales[i] + " returned: " + err );
else
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","calendar-" +addLocales[i] + ".jar"),
"locale/" +addLocales[i] + "/calendar/");
}
// Check Mozilla Thunderbird (Mail/News)
chkJarFileName = addLocales[i] + "-mail.jar";
tmp_f = getFolder("Chrome", chkJarFileName);
if ( File.exists(tmp_f) ) {
err = addFile( "Calendar Chrome-"+addLocales[i],
"chrome/calendar-"+addLocales[i]+".jar", // jar source folder
getFolder("Chrome"), // target folder
"");
logComment("addFile() for locale " + addLocales[i] + " returned: " + err);
if( err != SUCCESS )
alert( "addFile() for locale " + addLocales[i] + " returned: " + err );
else
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","calendar-" + addLocales[i]+".jar"),
"locale/" + addLocales[i]+"/calendar/");
}
}
err = performInstall();
if ( err == SUCCESS || err == 999 ) {
alert("The Mozilla Calendar has been successfully installed. \n"
+"Please restart your application to continue.");
} else {
alert("performInstall() failed. \n"
+"_____________________________\nError code:" + err);
cancelInstall(err);
}
}
else {
alert("Failed to add some/all files. \n"
+"You probably don't have appropriate permissions \n"
+"(write access to <mozilla>/chrome directory). \n"
+"If you installed Mozilla as root then you need to install calendar as root as well.\n"
+"Or, you can change ownership of your Mozilla directory to yourself and install calendar."
+"_____________________________\nError code:" + err);
cancelInstall(err);
}

View File

@ -1,159 +0,0 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<!-- calendars uuid -->
<em:id>{8e117890-a33f-424b-a2ea-deb272731365}</em:id>
<!-- Our current version -->
<em:version>0.8.1+</em:version>
<em:targetApplication>
<Description>
<!-- Firefox -->
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>0.8</em:minVersion>
<em:maxVersion>1.0+</em:maxVersion>
</Description>
</em:targetApplication>
<em:targetApplication>
<Description>
<!-- Thunderbird -->
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>0.7</em:minVersion>
<em:maxVersion>1.0+</em:maxVersion>
</Description>
</em:targetApplication>
<em:name>Mozilla Calendar</em:name>
<em:description>A calendar client based on iCal standard</em:description>
<em:creator>Axentra Corp. and Mozilla</em:creator>
<em:iconURL>chrome://calendar/content/sunbird_small.png</em:iconURL>
<em:homepageURL>http://www.mozilla.org/projects/calendar/</em:homepageURL>
<em:optionsURL>chrome://calendar/content/pref/prefBird.xul</em:optionsURL>
<em:aboutURL>chrome://calendar/content/about.xul</em:aboutURL>
<em:file>
<Description about="urn:mozilla:extension:file:calendar.jar">
<em:package>content/calendar/</em:package>
<em:locale>locale/en-US/calendar/</em:locale>
<em:skin>skin/classic/calendar/</em:skin>
<em:skin>skin/modern/calendar/</em:skin>
</Description>
</em:file>
<!-- locale files -->
<em:file>
<Description about="urn:mozilla:extension:file:calendar-ca-AD.jar">
<em:locale>locale/ca-AD/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-cs-CZ.jar">
<em:locale>locale/cs-CZ/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-cy-GB.jar">
<em:locale>locale/cy-GB/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-de-AT.jar">
<em:locale>locale/de-AT/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-es-ES.jar">
<em:locale>locale/es-ES/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-fr-FR.jar">
<em:locale>locale/fr-FR/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-hu-HU.jar">
<em:locale>locale/hu-HU/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-it-IT.jar">
<em:locale>locale/it-IT/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-ja-JP.jar">
<em:locale>locale/ja-JP/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-lt-LT.jar">
<em:locale>locale/lt-LT/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-nl-NL.jar">
<em:locale>locale/nl-NL/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-pl-PL.jar">
<em:locale>locale/pl-PL/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-pt-BR.jar">
<em:locale>locale/pt-BR/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-sk-SK.jar">
<em:locale>locale/sk-SK/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-sl-SI.jar">
<em:locale>locale/sl-SI/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-sv-SE.jar">
<em:locale>locale/sv-SE/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-tr-TR.jar">
<em:locale>locale/tr-TR/calendar/</em:locale>
</Description>
</em:file>
<em:file>
<Description about="urn:mozilla:extension:file:calendar-wen-DE.jar">
<em:locale>locale/wen-DE/calendar/</em:locale>
</Description>
</em:file>
</Description>
</RDF>

View File

@ -4,9 +4,8 @@ Desc: Installation script
const displayName = "Mozilla Calendar";
const name = "MozillaCalendar";
const version = "0.8";
const addLocales = new Array("ca-AD", "cs-CZ", "cy-GB", "de-AT", "es-ES", "fr-FR", "hu-HU", "it-IT", "ja-JP", "lt-LT",
const addLocales = new Array("ca-AD", "cs-CZ", "cy-GB", "de-AT", "en-US", "es-ES", "fr-FR", "hu-HU", "it-IT", "ja-JP", "lt-LT",
"nl-NL", "pl-PL", "pt-BR", "sk-SK", "sl-SI", "sv-SE", "tr-TR", "wen-DE");
const default_lang = "en-US";
var err = initInstall(displayName, name, version);
@ -40,7 +39,6 @@ if ( err == SUCCESS ) {
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/"+default_lang+"/calendar/");
for (var i = 0; i < addLocales.length; i++) {