A new way to create calendar.xpi. bug 296390, r=mostafah.

For more cvs history of install.js and .rdf, check calendar/install.(js|rdf)
This commit is contained in:
mvl%exedo.nl 2005-06-02 15:01:35 +00:00
Родитель 1bca01575b
Коммит e409a48d76
4 изменённых файлов: 260 добавлений и 1 удалений

Просмотреть файл

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
MODULE = calendar MODULE = calendar
DIRS = libical resources base providers DIRS = libical resources base providers xpi
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

0
calendar/xpi/Makefile.in Normal file
Просмотреть файл

100
calendar/xpi/install.js Normal file
Просмотреть файл

@ -0,0 +1,100 @@
/* ***************
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);
}

159
calendar/xpi/install.rdf Normal file
Просмотреть файл

@ -0,0 +1,159 @@
<?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>