comparison xul/install.js @ 203:bf945fcf9105

restarting with version control of xul sidebar/toolbar
author luginbue
date Fri, 27 Feb 2004 11:24:53 +0100
parents
children
comparison
equal deleted inserted replaced
202:7501034e54e1 203:bf945fcf9105
1 /*
2
3 Copyright (C) 2003 WTWG, Uni Bern
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18
19 Author: Christian Luginbuehl, 22.05.2003 , Version Alcatraz 0.5
20
21 */
22
23 var authorName = "ubern";
24
25
26 var appName = "ALCATRAZ";
27 var appVersion = "0.5.0";
28 var appChromeName = "alcatraz";
29 var appFile = "alcatraz.jar";
30
31 var jarAppPath = "content/";
32 var jarSkinPath = "skin/";
33 var jarLocalePath = "locale/en-US/";
34
35 var userChrome = getFolder("Profile", "chrome");
36
37 var successMessage = "The ALCATRAZ package has been successfully installed.\n\nRestart your browser to continue ...";
38 var errorMessage = "Installation failed! Well, I have no idea what to do now ... sorry :-(";
39
40
41 initInstall(appName, authorName + appChromeName, appVersion);
42
43 addFile(appName, appVersion, appFile, userChrome, '', true);
44
45 registerChrome(Install.CONTENT | Install.PROFILE_CHROME, getFolder(userChrome, appFile), jarAppPath);
46 registerChrome(Install.SKIN | Install.PROFILE_CHROME, getFolder(userChrome, appFile), jarSkinPath);
47 registerChrome(Install.LOCALE | Install.PROFILE_CHROME, getFolder(userChrome, appFile), jarLocalePath);
48
49 /**
50 * pretty simple error handling
51 */
52 var code = getLastError();
53
54 if (code == SUCCESS) {
55 code = performInstall();
56
57 if (code == SUCCESS ||code == REBOOT_NEEDED) {
58 alert(successMessage);
59 } else {
60 alert(errorMessage);
61 cancelInstall(code)
62 }
63 } else {
64 cancelInstall(code);
65 }