From 80c82083755369f997725f6cfd640265ef781786 Mon Sep 17 00:00:00 2001 From: "mostafah%oeone.com" Date: Fri, 10 Oct 2003 21:07:23 +0000 Subject: [PATCH] Improved install script --- calendar/linux/install.js | 24 +++++++++++++----------- calendar/windows/install.js | 24 +++++++++++++----------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/calendar/linux/install.js b/calendar/linux/install.js index 55b5af0379aa..ef13d6d89668 100644 --- a/calendar/linux/install.js +++ b/calendar/linux/install.js @@ -1,4 +1,12 @@ -initInstall("Mozilla Calendar", "Mozilla/Calendar", "0.8"); +/* *************** +Desc: Installation script +Last modified: October 2th, 2003 +****************** */ +const displayName = "Mozilla Calendar"; +const name = "Mozilla/Calendar"; +const version = "0.8"; + +initInstall(displayName, name, version); calendarDir = getFolder("Chrome","calendar"); @@ -25,16 +33,10 @@ if ( err == SUCCESS ) { err = performInstall(); - if ( err == SUCCESS ) { + if ( err == SUCCESS || err == 999 ) { alert("The Mozilla Calendar has been succesfully installed. \n" - +"Please restart your browser to continue."); - } - else if( err == "999" ) - { - alert("The Mozilla Calendar has been installed. \n Please restart your browser to continue."); - } - - else { + +"Please restart your application to continue."); + } else { alert("performInstall() failed. \n" +"_____________________________\nError code:" + err); cancelInstall(err); @@ -43,7 +45,7 @@ if ( err == SUCCESS ) { else { alert("Failed to create directory. \n" +"You probably don't have appropriate permissions \n" - +"(write access to mozilla/chrome directory). \n" + +"(write access to /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); diff --git a/calendar/windows/install.js b/calendar/windows/install.js index 55b5af0379aa..ef13d6d89668 100644 --- a/calendar/windows/install.js +++ b/calendar/windows/install.js @@ -1,4 +1,12 @@ -initInstall("Mozilla Calendar", "Mozilla/Calendar", "0.8"); +/* *************** +Desc: Installation script +Last modified: October 2th, 2003 +****************** */ +const displayName = "Mozilla Calendar"; +const name = "Mozilla/Calendar"; +const version = "0.8"; + +initInstall(displayName, name, version); calendarDir = getFolder("Chrome","calendar"); @@ -25,16 +33,10 @@ if ( err == SUCCESS ) { err = performInstall(); - if ( err == SUCCESS ) { + if ( err == SUCCESS || err == 999 ) { alert("The Mozilla Calendar has been succesfully installed. \n" - +"Please restart your browser to continue."); - } - else if( err == "999" ) - { - alert("The Mozilla Calendar has been installed. \n Please restart your browser to continue."); - } - - else { + +"Please restart your application to continue."); + } else { alert("performInstall() failed. \n" +"_____________________________\nError code:" + err); cancelInstall(err); @@ -43,7 +45,7 @@ if ( err == SUCCESS ) { else { alert("Failed to create directory. \n" +"You probably don't have appropriate permissions \n" - +"(write access to mozilla/chrome directory). \n" + +"(write access to /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);