/[suikacvs]/www/mozilla/livehttpheaders/install.js
Suika

Contents of /www/mozilla/livehttpheaders/install.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download) (as text)
Sat Jan 14 07:46:31 2012 UTC (13 years, 3 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +99 -41 lines
File MIME type: application/javascript
Current

1 wakaba 1.4 /*
2     * This file is auto-generated (at 2004-07-10T07:33:50Z).
3     * Do not edit by hand!
4     */
5    
6     const PACKAGE_NAME = 'LiveHTTPHeaders 0.9 日本語パック';
7     const PACKAGE_VERSION = '1.4 (2004-07-10T07:33:50Z)';
8     const DISPLAY_NAME = 'LiveHTTPHeaders 0.9 日本語パック 1.4 (2004-07-10T07:33:50Z)';
9    
10     const PACKAGE_JAR_DIRECTORY = 'chrome/';
11     const PACKAGE_JAR_FILENAME = 'livehttpheaders-ja.jar';
12     var PACKAGE_CONTENT_DIR = new Array ();
13     var PACKAGE_LOCALE_DIR = new Array ("locale/ja-JP/livehttpheaders/");
14    
15     var err = initInstall (DISPLAY_NAME, PACKAGE_NAME, PACKAGE_VERSION);
16     var messages = loadResources ('install-res.en.inf');
17    
18     var contentFlag = CONTENT | DELAYED_CHROME;
19     var localeFlag = LOCALE | DELAYED_CHROME;
20     var UChrome = getFolder ('Chrome');
21     var existsInProfile = File.exists (getFolder (getFolder('Current User', 'chrome'), PACKAGE_JAR_DIRECTORY + PACKAGE_JAR_FILENAME));
22    
23     if (existsInProfile || !confirm (messages.installToChrome)) {
24     UChrome = getFolder ('Current User', 'chrome');
25     contentFlag = CONTENT | PROFILE_CHROME;
26     localeFlag = LOCALE | PROFILE_CHROME;
27     }
28     logComment('initInstall: ' + err);
29     setPackageFolder (UChrome);
30     var folder = getFolder (UChrome, PACKAGE_JAR_FILENAME);
31    
32     resetError ();
33     addFile (PACKAGE_NAME, PACKAGE_JAR_DIRECTORY + PACKAGE_JAR_FILENAME, UChrome, '');
34     err = getLastError ();
35     if (err == SUCCESS || err == REBOOT_NEEDED) {
36     for (var i = 0; i < PACKAGE_CONTENT_DIR.length; i++) {
37     registerChrome (contentFlag, folder, PACKAGE_CONTENT_DIR[i]);
38     }
39     for (var i = 0; i < PACKAGE_LOCALE_DIR.length; i++) {
40     registerChrome (localeFlag, folder, PACKAGE_LOCALE_DIR[i]);
41     }
42     }
43    
44     err = getLastError();
45     if (err == SUCCESS || err == REBOOT_NEEDED) {
46     performInstall();
47     err = getLastError();
48     if (err == SUCCESS || err == REBOOT_NEEDED) {
49     //alert("Please restart mozilla");
50     } else {
51     // Nothing to do, Mozilla will display an error message himself
52     }
53     } else {
54     cancelInstall();
55     if (err == -202) {
56     alert (messages.noPermission.replace (/%s/, folder));
57     } else if (err == -210) {
58     alert (messages.canceldByUser);
59     }else {
60     alert(messages.unknownError.replace (/%s/, err));
61     }
62     }
63    
64     /*
65     ***** BEGIN LICENSE BLOCK *****
66     Version: MPL 1.1/GPL 2.0/LGPL 2.1
67    
68     The contents of this file are subject to the Mozilla Public License Version
69     1.1 (the "License"); you may not use this file except in compliance with
70     the License. You may obtain a copy of the License at
71     <http://www.mozilla.org/MPL/>
72    
73     Software distributed under the License is distributed on an "AS IS" basis,
74     WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
75     for the specific language governing rights and limitations under the
76     License.
77    
78     The Initial Developer is Wakaba <w@suika.fam.cx>.
79     Portions created by the Initial Developer are Copyright (C) 2003
80     the Initial Developer. All Rights Reserved.
81    
82     Contributor(s):
83     Wakaba <w@suika.fam.cx> (original author)
84    
85     Alternatively, the contents of this file may be used under the terms of
86     either the GNU General Public License Version 2 or later (the "GPL"), or
87     the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
88     in which case the provisions of the GPL or the LGPL are applicable instead
89     of those above. If you wish to allow use of your version of this file only
90     under the terms of either the GPL or the LGPL, and not to allow others to
91     use your version of this file under the terms of the MPL, indicate your
92     decision by deleting the provisions above and replace them with the notice
93     and other provisions required by the GPL or the LGPL. If you do not delete
94     the provisions above, a recipient may use your version of this file under
95     the terms of any one of the MPL, the GPL or the LGPL.
96    
97     ***** END LICENSE BLOCK *****
98     */
99     /* $Date: 2004/07/10 06:47:26 $ */

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24  
Google Analytics is used in this page; Cookies are used. 忍者AdMax is used in this page; Cookies are used. Privacy policy.