2002-01-30 18:22:19 +03:00
|
|
|
initInstall("Mozilla Calendar", "Mozilla/Calendar", "0.7");
|
2001-12-20 23:13:53 +03:00
|
|
|
|
|
|
|
calendarDir = getFolder("Chrome","calendar");
|
|
|
|
|
|
|
|
setPackageFolder(calendarDir);
|
|
|
|
|
2002-01-30 18:22:19 +03:00
|
|
|
addDirectory( "resources" );
|
2001-12-20 23:13:53 +03:00
|
|
|
|
|
|
|
addDirectory("", "components", getFolder( "Components" ), "" );
|
|
|
|
|
2002-01-30 18:22:19 +03:00
|
|
|
var err = getLastError();
|
|
|
|
|
2001-12-20 23:13:53 +03:00
|
|
|
if ( err == SUCCESS ) {
|
2002-01-30 18:22:19 +03:00
|
|
|
|
|
|
|
registerChrome(CONTENT, calendarDir, "content");
|
|
|
|
registerChrome(SKIN, calendarDir, "skin/modern");
|
|
|
|
registerChrome(LOCALE, calendarDir, "locale/en-US");
|
2001-12-20 23:13:53 +03:00
|
|
|
|
2002-01-30 18:22:19 +03:00
|
|
|
err = performInstall();
|
2001-12-20 23:13:53 +03:00
|
|
|
|
2002-01-30 18:22:19 +03:00
|
|
|
if ( err == SUCCESS ) {
|
|
|
|
refreshPlugins();
|
|
|
|
alert("The Mozilla Calendar has been succesfully installed. \n"
|
2001-12-20 23:13:53 +03:00
|
|
|
+"Please restart your browser to continue.");
|
2002-01-30 18:22:19 +03:00
|
|
|
}
|
|
|
|
else {
|
2001-12-20 23:13:53 +03:00
|
|
|
alert("performInstall() failed. \n"
|
|
|
|
+"_____________________________\nError code:" + err);
|
|
|
|
cancelInstall(err);
|
2002-01-30 18:22:19 +03:00
|
|
|
}
|
2001-12-20 23:13:53 +03:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
alert("Failed to create directory. \n"
|
|
|
|
+"You probably don't have appropriate permissions \n"
|
|
|
|
+"(write access to mozilla/chrome directory). \n"
|
|
|
|
+"_____________________________\nError code:" + err);
|
|
|
|
cancelInstall(err);
|
|
|
|
}
|
|
|
|
|
|
|
|
|