Annotation of clock/install.js.jar.in, revision 1.2

1.1       petejc      1: /* -*- Mode: Javascript; tab-width: 2; c-basic-offset: 2; -*-
                      2:  * 
                      3:  *
                      4:  * The contents of this file are subject to the Mozilla Public
                      5:  * License Version 1.1 (the "License"); you may not use this file
                      6:  * except in compliance with the License. You may obtain a copy of
                      7:  * the License at http://www.mozilla.org/MPL/
                      8:  *
                      9:  * Software distributed under the License is distributed on an "AS
                     10:  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
                     11:  * implied. See the License for the specific language governing
                     12:  * rights and limitations under the License.
                     13:  *
                     14:  * The Original Code is jslib team code.
                     15:  * The Initial Developer of the Original Code is jslib team.
                     16:  *
                     17:  * Portions created by Mozdev Group, Inc. are
                     18:  * Copyright (C) 2003 Mozdev Group, Inc.  All
                     19:  * Rights Reserved.
                     20:  *
                     21:  * Original Author: Pete Collins <pete@mozdev.org>
                     22:  * Contributor(s):
                     23:  *
1.2     ! petejc     24:  *  $Id: install.js.jar.in,v 1.1 2003/12/20 02:56:23 petejc Exp $
1.1       petejc     25:  *  Last Edited by: $Author: petejc $
                     26:  *  $Revision: 1.1 $
1.2     ! petejc     27:  *  $Date: 2003/12/20 02:56:23 $
1.1       petejc     28:  *
                     29:  */
                     30: 
                     31: const G_VER             = "__VERSION__";
                     32: const G_MSG             = "__CODENAME__ v"+G_VER;
                     33: const G_NAME            = "__CODENAME__";
                     34: const G_CHROME          = "Chrome";
                     35: const G_USER            = "Current User";
                     36: const G_CONTENT         = "/";
                     37: 
                     38: const G_JAR_FILE        = "__CODENAME__.jar";
                     39: const G_CHROME_DIR      = getFolder(G_USER, "chrome");
                     40: 
                     41: const COMNT_1           = "Install for __CODENAME__ as a jar . . . \n\nInstall: ";
                     42: const COMNT_2           = "__CODENAME__ jar";
                     43: 
                     44: var err = initInstall(G_MSG, G_NAME, G_VER);
                     45: 
                     46: logComment(COMNT_1 + err);
                     47: 
                     48: addFile(COMNT_2, G_JAR_FILE, G_CHROME_DIR, "");
                     49: 
                     50: registerChrome(PACKAGE|CONTENT|DELAYED_CHROME, 
                     51:                 getFolder(G_CHROME_DIR, G_JAR_FILE),  G_CONTENT);
                     52: 
                     53: err = getLastError();
                     54: 
1.2     ! petejc     55: if (err==SUCCESS) {
        !            56:     err = performInstall();
        !            57:     if (err == SUCCESS || err == REBOOT_NEEDED) {
        !            58:       alert("Install complete. Please restart to enable.");
        !            59:       cancelInstall(SUCCESS);
        !            60:     }
        !            61:     cancelInstall(err);
        !            62: } else {
1.1       petejc     63:     cancelInstall(err);
1.2     ! petejc     64: }
1.1       petejc     65: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>