annotate xul/install.js @ 472:f8ca069517a2

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