File:  [mozdev] / clock / install.js.jar.in
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Wed May 25 21:57:39 2005 UTC (12 years, 5 months ago) by petejc
Branches: MAIN
CVS tags: HEAD
install tweaks

/* -*- Mode: Javascript; tab-width: 2; c-basic-offset: 2; -*-
 * 
 *
 * The contents of this file are subject to the Mozilla Public
 * License Version 1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of
 * the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * rights and limitations under the License.
 *
 * The Original Code is jslib team code.
 * The Initial Developer of the Original Code is jslib team.
 *
 * Portions created by Mozdev Group, Inc. are
 * Copyright (C) 2003 Mozdev Group, Inc.  All
 * Rights Reserved.
 *
 * Original Author: Pete Collins <pete@mozdev.org>
 * Contributor(s):
 *
 *  $Id: install.js.jar.in,v 1.2 2005/05/25 21:57:39 petejc Exp $
 *  Last Edited by: $Author: petejc $
 *  $Revision: 1.2 $
 *  $Date: 2005/05/25 21:57:39 $
 *
 */

const G_VER             = "__VERSION__";
const G_MSG             = "__CODENAME__ v"+G_VER;
const G_NAME            = "__CODENAME__";
const G_CHROME          = "Chrome";
const G_USER            = "Current User";
const G_CONTENT         = "/";

const G_JAR_FILE        = "__CODENAME__.jar";
const G_CHROME_DIR      = getFolder(G_USER, "chrome");

const COMNT_1           = "Install for __CODENAME__ as a jar . . . \n\nInstall: ";
const COMNT_2           = "__CODENAME__ jar";

var err = initInstall(G_MSG, G_NAME, G_VER);

logComment(COMNT_1 + err);

addFile(COMNT_2, G_JAR_FILE, G_CHROME_DIR, "");

registerChrome(PACKAGE|CONTENT|DELAYED_CHROME, 
                getFolder(G_CHROME_DIR, G_JAR_FILE),  G_CONTENT);

err = getLastError();

if (err==SUCCESS) {
    err = performInstall();
    if (err == SUCCESS || err == REBOOT_NEEDED) {
      alert("Install complete. Please restart to enable.");
      cancelInstall(SUCCESS);
    }
    cancelInstall(err);
} else {
    cancelInstall(err);
}


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