Compare commits
51 Commits
NETSCAPE_7
...
RDF_BRANCH
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
139eaaa4c2 | ||
|
|
cf255988b7 | ||
|
|
72c698bac1 | ||
|
|
fb2773f743 | ||
|
|
72ce2ad1ba | ||
|
|
c1eb0654d1 | ||
|
|
d6881f9f10 | ||
|
|
6734f54b28 | ||
|
|
b183bab4f0 | ||
|
|
ad5e0cfe71 | ||
|
|
2ef1f91e2f | ||
|
|
8da6b9b688 | ||
|
|
1fde916fd7 | ||
|
|
985dabdedb | ||
|
|
e8eab3cdb2 | ||
|
|
80ce7b63de | ||
|
|
4aa1961533 | ||
|
|
fbfc9a9680 | ||
|
|
941b202512 | ||
|
|
d576516c1b | ||
|
|
c40a32b5fd | ||
|
|
d746f28501 | ||
|
|
dc70b4359b | ||
|
|
62d5f8687f | ||
|
|
2fdccffaba | ||
|
|
cceb41a435 | ||
|
|
9d316fed5d | ||
|
|
40604c818a | ||
|
|
64b01da4b9 | ||
|
|
7a952f91c1 | ||
|
|
d5ba5d9ce9 | ||
|
|
3f014958b9 | ||
|
|
4b6fd66264 | ||
|
|
5c3a93910e | ||
|
|
8962bb2cd4 | ||
|
|
cc7996f567 | ||
|
|
732d0de668 | ||
|
|
7ddd026bcd | ||
|
|
4defbe5f9c | ||
|
|
bcd898b477 | ||
|
|
60f698d25c | ||
|
|
c6b462bdd4 | ||
|
|
ac8f62c23b | ||
|
|
8eedf92369 | ||
|
|
58f4e796d7 | ||
|
|
fbca553e41 | ||
|
|
46183a55ec | ||
|
|
26474df0aa | ||
|
|
6efc2b70b6 | ||
|
|
e091b3f9d7 | ||
|
|
36fafa10b8 |
2516
mozilla/CHANGES.html
Normal file
37
mozilla/LEGAL
Normal file
@@ -0,0 +1,37 @@
|
||||
Please be apprised of the following Legal Notices:
|
||||
|
||||
A) Wang contends that its U.S. Patent No. 4, 751,669 ("the '669
|
||||
Patent") disclosing a "video text" system, is infringed by the following
|
||||
functionality in the Netscape Navigator code: 1) the animated logo and
|
||||
status line indicators --See Claims 1,8 and 9; 2) the "File Save As"
|
||||
function --See Claims 23-27; 3) Bookmarks and Rename Bookmarks in the
|
||||
Properties window --See Claims 20-22; 4) storing HTML, GIF, and JPEG
|
||||
files and adding filename extensions based on mime types (performed in
|
||||
Windows OS) --See Claim 38. Netscape believes the '669 Patent is
|
||||
invalid and non-infringed. Netscape is vigorously defending against
|
||||
Wang's claims.
|
||||
|
||||
B) Intermind owns pending U.S. patent applications on communications
|
||||
systems which employ metadata ("channel objects") to define a control
|
||||
structure for information transfer. The Netscape code does not infringe
|
||||
as released; however, modifications which utilize channel objects as
|
||||
described by Intermind should be considered carefully. The following is
|
||||
a statement from Intermind: "Intermind's claims fundamentally involve
|
||||
the use of a control structure to automate communications. ...The
|
||||
essence of Intermind's top claim is that two devices sender and
|
||||
receiver have persistent storage, communicate over a network,
|
||||
and exchange a control structure including metadata which describes: 1)
|
||||
what information is to be updated, 2) when to update this information,
|
||||
and 3) how to transfer the updated information. In addition, at least
|
||||
the receiving device must be able to process the metadata in order to
|
||||
perform the update determination and transfer. Any digital
|
||||
communications system which incorporates all of these elements will be
|
||||
covered by Intermind's patents." See Intermind.com.
|
||||
|
||||
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
|
||||
disclose data compression methods implementing an LZS compression
|
||||
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
|
||||
Stac Patents"). The Netscape Communicator code does not perform
|
||||
compression. If you modify the Netscape source code to perform
|
||||
compression, please take notice of the Stac Patents.
|
||||
|
||||
421
mozilla/LICENSE
Normal file
@@ -0,0 +1,421 @@
|
||||
NETSCAPE PUBLIC LICENSE
|
||||
Version 1.0
|
||||
|
||||
----------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. ``Contributor'' means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. ``Contributor Version'' means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. ``Covered Code'' means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. ``Executable'' means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. ``Initial Developer'' means the individual or entity identified as
|
||||
the Initial Developer in the Source Code notice required by Exhibit A.
|
||||
|
||||
1.7. ``Larger Work'' means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. ``License'' means this document.
|
||||
|
||||
1.9. ``Modifications'' means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. ``Original Code'' means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this License
|
||||
is not already Covered Code governed by this License.
|
||||
|
||||
1.11. ``Source Code'' means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus any
|
||||
associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or a list of source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. ``You'' means an individual or a legal entity exercising rights
|
||||
under, and complying with all of the terms of, this License or a future
|
||||
version of this License issued under Section 6.1. For legal entities,
|
||||
``You'' includes any entity which controls, is controlled by, or is
|
||||
under common control with You. For purposes of this definition,
|
||||
``control'' means (a) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Original Code (or portions thereof) with or without
|
||||
Modifications, or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by Initial
|
||||
Developer, to make, have made, use and sell (``Utilize'') the
|
||||
Original Code (or portions thereof), but solely to the extent that
|
||||
any such patent is reasonably necessary to enable You to Utilize
|
||||
the Original Code (or portions thereof) and not to any greater
|
||||
extent that may be necessary to Utilize further Modifications or
|
||||
combinations.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Modifications created by such Contributor (or
|
||||
portions thereof) either on an unmodified basis, with other
|
||||
Modifications, as Covered Code or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by
|
||||
Contributor, to Utilize the Contributor Version (or portions
|
||||
thereof), but solely to the extent that any such patent is
|
||||
reasonably necessary to enable You to Utilize the Contributor
|
||||
Version (or portions thereof), and not to any greater extent that
|
||||
may be necessary to Utilize further Modifications or combinations.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be distributed
|
||||
only under the terms of this License or a future version of this
|
||||
License released under Section 6.1, and You must include a copy of this
|
||||
License with every copy of the Source Code You distribute. You may not
|
||||
offer or impose any terms on any Source Code version that alters or
|
||||
restricts the applicable version of this License or the recipients'
|
||||
rights hereunder. However, You may include an additional document
|
||||
offering the additional rights described in Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which you contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that the
|
||||
Modification is derived, directly or indirectly, from Original Code
|
||||
provided by the Initial Developer and including the name of the Initial
|
||||
Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
If You have knowledge that a party claims an intellectual property
|
||||
right in particular functionality or code (or its utilization
|
||||
under this License), you must include a text file with the source
|
||||
code distribution titled ``LEGAL'' which describes the claim and
|
||||
the party making the claim in sufficient detail that a recipient
|
||||
will know whom to contact. If you obtain such knowledge after You
|
||||
make Your Modification available as described in Section 3.2, You
|
||||
shall promptly modify the LEGAL file in all copies You make
|
||||
available thereafter and shall take other steps (such as notifying
|
||||
appropriate mailing lists or newsgroups) reasonably calculated to
|
||||
inform those who received the Covered Code that new knowledge has
|
||||
been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Your Modification is an application programming interface and
|
||||
You own or control patents which are reasonably necessary to
|
||||
implement that API, you must also include this information in the
|
||||
LEGAL file.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code, and this License in any documentation for the Source Code, where
|
||||
You describe recipients' rights relating to Covered Code. If You
|
||||
created one or more Modification(s), You may add your name as a
|
||||
Contributor to the notice described in Exhibit A. If it is not possible
|
||||
to put such notice in a particular Source Code file due to its
|
||||
structure, then you must include such notice in a location (such as a
|
||||
relevant directory file) where a user would be likely to look for such
|
||||
a notice. You may choose to offer, and to charge a fee for, warranty,
|
||||
support, indemnity or liability obligations to one or more recipients
|
||||
of Covered Code. However, You may do so only on Your own behalf, and
|
||||
not on behalf of the Initial Developer or any Contributor. You must
|
||||
make it absolutely clear than any such warranty, support, indemnity or
|
||||
liability obligation is offered by You alone, and You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
warranty, support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of the
|
||||
Covered Code is available under the terms of this License, including a
|
||||
description of how and where You have fulfilled the obligations of
|
||||
Section 3.2. The notice must be conspicuously included in any notice in
|
||||
an Executable version, related documentation or collateral in which You
|
||||
describe recipients' rights relating to the Covered Code. You may
|
||||
distribute the Executable version of Covered Code under a license of
|
||||
Your choice, which may contain terms different from this License,
|
||||
provided that You are in compliance with the terms of this License and
|
||||
that the license for the Executable version does not attempt to limit
|
||||
or alter the recipient's rights in the Source Code version from the
|
||||
rights set forth in this License. If You distribute the Executable
|
||||
version under a different license You must make it absolutely clear
|
||||
that any terms which differ from this License are offered by You alone,
|
||||
not by the Initial Developer or any Contributor. You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
any such terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to statute
|
||||
or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and
|
||||
the code they affect. Such description must be included in the LEGAL
|
||||
file described in Section 3.4 and must be included with all
|
||||
distributions of the Source Code. Except to the extent prohibited by
|
||||
statute or regulation, such description must be sufficiently detailed
|
||||
for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A, and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation (``Netscape'') may publish revised
|
||||
and/or new versions of the License from time to time. Each version will
|
||||
be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If you create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), you must (a) rename Your license so that the
|
||||
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
|
||||
any confusingly similar phrase do not appear anywhere in your license
|
||||
and (b) otherwise make it clear that your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial Developer,
|
||||
Original Code or Contributor in the notice described in Exhibit A shall
|
||||
not of themselves be deemed to be modifications of this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
|
||||
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
|
||||
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
|
||||
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
|
||||
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
|
||||
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a ``commercial item,'' as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
|
||||
software'' and ``commercial computer software documentation,'' as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if any,
|
||||
provides otherwise), excluding its conflict-of-law provisions. With
|
||||
respect to disputes in which at least one party is a citizen of, or an
|
||||
entity chartered or registered to do business in, the United States of
|
||||
America: (a) unless otherwise agreed in writing, all disputes relating
|
||||
to this License (excepting any dispute relating to intellectual
|
||||
property rights) shall be subject to final and binding arbitration,
|
||||
with the losing party paying all costs of arbitration; (b) any
|
||||
arbitration relating to this Agreement shall be held in Santa Clara
|
||||
County, California, under the auspices of JAMS/EndDispute; and (c) any
|
||||
litigation relating to this Agreement shall be subject to the
|
||||
jurisdiction of the Federal Courts of the Northern District of
|
||||
California, with venue lying in Santa Clara County, California, with
|
||||
the losing party responsible for costs, including without limitation,
|
||||
court costs and reasonable attorneys fees and expenses. The application
|
||||
of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any law or regulation which
|
||||
provides that the language of a contract shall be construed against the
|
||||
drafter shall not apply to this License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
Except in cases where another Contributor has failed to comply with
|
||||
Section 3.4, You are responsible for damages arising, directly or
|
||||
indirectly, out of Your utilization of rights under this License, based
|
||||
on the number of copies of Covered Code you made available, the
|
||||
revenues you received from utilizing such rights, and other relevant
|
||||
factors. You agree to work with affected parties to distribute
|
||||
responsibility on an equitable basis.
|
||||
|
||||
AMENDMENTS
|
||||
Additional Terms applicable to the Netscape Public License.
|
||||
|
||||
I. Effect.
|
||||
These additional terms described in this Netscape Public License --
|
||||
Amendments shall apply to the Mozilla Communicator client code and to
|
||||
all Covered Code under this License.
|
||||
|
||||
II. ``Netscape's Branded Code'' means Covered Code that Netscape
|
||||
distributes and/or permits others to distribute under one or more
|
||||
trademark(s) which are controlled by Netscape but which are not
|
||||
licensed for use under this License.
|
||||
|
||||
III. Netscape and logo.
|
||||
This License does not grant any rights to use the trademark
|
||||
``Netscape'', the ``Netscape N and horizon'' logo or the Netscape
|
||||
lighthouse logo, even if such marks are included in the Original Code.
|
||||
|
||||
IV. Inability to Comply Due to Contractual Obligation.
|
||||
Prior to licensing the Original Code under this License, Netscape has
|
||||
licensed third party code for use in Netscape's Branded Code. To the
|
||||
extent that Netscape is limited contractually from making such third
|
||||
party code available under this License, Netscape may choose to
|
||||
reintegrate such code into Covered Code without being required to
|
||||
distribute such code in Source Code form, even if such code would
|
||||
otherwise be considered ``Modifications'' under this License.
|
||||
|
||||
V. Use of Modifications and Covered Code by Initial Developer.
|
||||
|
||||
V.1. In General.
|
||||
The obligations of Section 3 apply to Netscape, except to the
|
||||
extent specified in this Amendment, Section V.2 and V.3.
|
||||
|
||||
V.2. Other Products.
|
||||
Netscape may include Covered Code in products other than the
|
||||
Netscape's Branded Code which are released by Netscape during the
|
||||
two (2) years following the release date of the Original Code,
|
||||
without such additional products becoming subject to the terms of
|
||||
this License, and may license such additional products on
|
||||
different terms from those contained in this License.
|
||||
|
||||
V.3. Alternative Licensing.
|
||||
Netscape may license the Source Code of Netscape's Branded Code,
|
||||
including Modifications incorporated therein, without such
|
||||
additional products becoming subject to the terms of this License,
|
||||
and may license such additional products on different terms from
|
||||
those contained in this License.
|
||||
|
||||
VI. Arbitration and Litigation.
|
||||
Notwithstanding the limitations of Section 11 above, the provisions
|
||||
regarding arbitration and litigation in Section 11(a), (b) and (c) of
|
||||
the License shall apply to all disputes relating to this License.
|
||||
|
||||
EXHIBIT A.
|
||||
|
||||
``The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (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/NPL/
|
||||
|
||||
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 Mozilla Communicator client code, released March
|
||||
31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape Communications
|
||||
Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
Netscape Communications Corporation. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.''
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. This is due
|
||||
to time constraints encountered in simultaneously finalizing the
|
||||
License and in preparing the Original Code for release. You should use
|
||||
the text of this Exhibit A rather than the text found in the Original
|
||||
Code Source Code for Your Modifications.]
|
||||
83
mozilla/Makefile
Normal file
@@ -0,0 +1,83 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = .
|
||||
|
||||
NSPRDIR = nsprpub
|
||||
NSPR20 = 1
|
||||
MOZILLA_CLIENT = 1
|
||||
|
||||
ifndef NO_MOCHA
|
||||
DIRS_JS = js
|
||||
endif
|
||||
|
||||
DIRS = config coreconf $(NSPRDIR) jpeg dbm xpcom network
|
||||
|
||||
ifdef MOZ_NETCAST
|
||||
DIRS += netcast
|
||||
endif
|
||||
|
||||
ifdef MOZ_JAVA
|
||||
DIRS += sun-java ldap ifc $(DIRS_JS) nav-java ifc/tools js/jsd
|
||||
else
|
||||
DIRS += sun-java nav-java $(DIRS_JS)
|
||||
endif
|
||||
|
||||
ifndef NO_SECURITY
|
||||
DIRS += security
|
||||
endif
|
||||
|
||||
DIRS += modules lib l10n cmd
|
||||
|
||||
ifeq ($(STAND_ALONE_JAVA),1)
|
||||
DIRS = config lib/xp $(NSPRDIR) jpeg modules/zlib sun-java ifc js ifc/tools sun-java/java
|
||||
endif
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
export:: $(OBJS)
|
||||
|
||||
# Running this rule assembles all the SDK source pieces into dist/sdk.
|
||||
# You'll need to run this rule on every platform to get all the
|
||||
# binaries (e.g. javah) copied there. You'll also have to do special
|
||||
# magic on a Mac.
|
||||
sdk-src::
|
||||
$(SDKINSTALL) include/npapi.h $(SDK)/include/
|
||||
$(SDKINSTALL) include/jri_md.h $(SDK)/include/
|
||||
$(SDKINSTALL) include/jritypes.h $(SDK)/include/
|
||||
$(SDKINSTALL) include/jri.h $(SDK)/include/
|
||||
$(SDKINSTALL) lib/plugin/npupp.h $(SDK)/include/
|
||||
$(SDKINSTALL) sdk/common/*.c* $(SDK)/common/
|
||||
$(SDKINSTALL) sun-java/classsrc/$(ZIP_NAME).x $(SDK)/classes/$(ZIP_NAME)
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/*.c $(SDK)/examples/simple/Source/
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/*.java $(SDK)/examples/simple/Source/
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/*.class $(SDK)/examples/simple/Source/
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/_gen/*.h $(SDK)/examples/simple/Source/_gen/
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/_stubs/*.c $(SDK)/examples/simple/Source/_stubs/
|
||||
$(SDKINSTALL) sdk/examples/simple/Unix/makefile.* $(SDK)/examples/simple/Unix/
|
||||
$(SDKINSTALL) sdk/examples/simple/Testing/SimpleExample.html $(SDK)/examples/simple/Testing/
|
||||
$(SDKINSTALL) sdk/examples/simple/readme.html $(SDK)/examples/simple/
|
||||
$(SDKINSTALL) sdk/examples/UnixTemplate/Source/*.c $(SDK)/examples/UnixTemplate/Source/
|
||||
$(SDKINSTALL) sdk/examples/UnixTemplate/Testing/Test.html $(SDK)/examples/UnixTemplate/Testing/
|
||||
$(SDKINSTALL) sdk/examples/UnixTemplate/Unix/makefile.* $(SDK)/examples/UnixTemplate/Unix/
|
||||
$(SDKINSTALL) sdk/examples/UnixTemplate/readme.html $(SDK)/examples/UnixTemplate/
|
||||
|
||||
sdk-bin::
|
||||
cd sdk; $(MAKE); cd ..
|
||||
$(SDKINSTALL) $(DIST)/bin/javah$(BIN_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/
|
||||
$(SDKINSTALL) sdk/examples/simple/Source/$(OBJDIR)/npsimple.$(DLL_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/
|
||||
$(SDKINSTALL) sdk/examples/UnixTemplate/Source/$(OBJDIR)/nptemplate.$(DLL_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/
|
||||
1
mozilla/build/build_number
Normal file
@@ -0,0 +1 @@
|
||||
5009808600
|
||||
25
mozilla/build/genrc.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DATATYPE="$1"
|
||||
INFILE="$2"
|
||||
|
||||
echo "${DATATYPE} RCDATA"
|
||||
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'
|
||||
|
||||
exit 0
|
||||
45
mozilla/build/hcc
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# Fix brain-damaged compilers that don't understand -o and -c together
|
||||
#
|
||||
DASH_C=0
|
||||
DASH_O=0
|
||||
for i in $*
|
||||
do
|
||||
case $i in
|
||||
-c) DASH_C=1;;
|
||||
-o) DASH_O=1;;
|
||||
*.c) C_SRC=$i;;
|
||||
*.s) S_SRC=$i;;
|
||||
*.o) OBJECT=$i;;
|
||||
esac
|
||||
done
|
||||
|
||||
cc $* || exit $?
|
||||
|
||||
# if there was no -c and -o we're done
|
||||
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
|
||||
|
||||
# cc always creates the .o from the .c name
|
||||
[ $C_SRC ] && OBJ=`basename $C_SRC .c`.o
|
||||
# or the .o from the .s name
|
||||
[ $S_SRC ] && OBJ=`basename $S_SRC .s`.o
|
||||
|
||||
[ -f $OBJECT ] || [ -f $OBJ ] && mv -f $OBJ $OBJECT
|
||||
86
mozilla/build/hcpp
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# Wrapper for brain-damaged compilers that don't understand -o and -c together.
|
||||
#
|
||||
|
||||
DUMMY="XxxXxxX"
|
||||
DASH_C=0
|
||||
DASH_O=0
|
||||
GET_OBJECT=0
|
||||
C_SRC="${DUMMY}"
|
||||
CC_SRC="${DUMMY}"
|
||||
CPP_SRC="${DUMMY}"
|
||||
S_SRC="${DUMMY}"
|
||||
OBJECT="${DUMMY}"
|
||||
|
||||
for i in $*
|
||||
do
|
||||
if [ ${GET_OBJECT} -eq 1 ]; then
|
||||
OBJECT="$i"
|
||||
GET_OBJECT=0
|
||||
fi
|
||||
case $i in
|
||||
-c)
|
||||
DASH_C=1
|
||||
;;
|
||||
-o)
|
||||
DASH_O=1
|
||||
GET_OBJECT=1
|
||||
;;
|
||||
*.c)
|
||||
C_SRC="$i"
|
||||
;;
|
||||
+.*)
|
||||
;;
|
||||
*.cpp)
|
||||
CPP_SRC="$i"
|
||||
;;
|
||||
*.cc)
|
||||
CC_SRC="$i"
|
||||
;;
|
||||
*.s)
|
||||
S_SRC="$i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
CC $* || exit $?
|
||||
|
||||
# LAME!!!
|
||||
if [ -f -O ]; then
|
||||
mv -f -- -O ${OBJECT}
|
||||
fi
|
||||
|
||||
# if there was no -c and -o we're done
|
||||
[ ${DASH_C} -eq 1 -a ${DASH_O} -eq 1 ] || exit 0
|
||||
|
||||
# cc always creates the .o from the .c name
|
||||
if [ "${C_SRC}" != "${DUMMY}" ]; then
|
||||
OBJ=`basename ${C_SRC} .c`.o
|
||||
elif [ "${CPP_SRC}" != "${DUMMY}" ]; then
|
||||
OBJ=`basename ${CPP_SRC} .cpp`.o
|
||||
elif [ "${CC_SRC}" != "${DUMMY}" ]; then
|
||||
OBJ=`basename ${CC_SRC} .cc`.o
|
||||
# or the .o from the .s name
|
||||
elif [ "${S_SRC}" != "${DUMMY}" ]; then
|
||||
OBJ=`basename ${S_SRC} .s`.o
|
||||
fi
|
||||
|
||||
[ -f ${OBJECT} ] || [ -f ${OBJ} ] && mv -f ${OBJ} ${OBJECT}
|
||||
58
mozilla/build/mac/BuildMozilla.pl
Normal file
@@ -0,0 +1,58 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
|
||||
|
||||
chdir("::::"); # assuming this script is in "...:mozilla:build:mac:", change dir to just above "mozilla"
|
||||
Moz::Configure(":Mozilla.Configuration");
|
||||
Moz::OpenErrorLog("::Mozilla.BuildLog");
|
||||
|
||||
|
||||
#
|
||||
# Build the appropriate target of each project
|
||||
#
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stub Library");
|
||||
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stub Library");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Stub Library");
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:restext:NavStringLibPPC.mcp");
|
||||
Moz::BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.prj");
|
||||
Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "PPC Shared Library");
|
||||
Moz::BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:lib:mac:PowerPlant:PowerPlant.mcp");
|
||||
Moz::BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:sun-java:stubs:macbuild:JavaStubs.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:js:jsj:macbuild:JSJ_PPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:js:macbuild:JavaScriptPPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:nav-java:stubs:macbuild:NavJavaStubs.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "PPC Shared Library +D -LDAP");
|
||||
Moz::BuildProject(":mozilla:modules:xml:macbuild:XML.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:modules:libfont:macbuild:FontBroker.mcp", "PPC Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:modules:schedulr:macbuild:Schedulr.mcp", "PPC Shared Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:network:macbuild:network.mcp", "PPC Library (Debug Moz)");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "PPC Library (Debug)");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Moz PPC App (Debug)");
|
||||
BIN
mozilla/build/mac/CodeWarriorLib
Normal file
88
mozilla/build/mac/IDE_Options.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*
|
||||
|
||||
This file overrides all option settings in the IDE. It is an attempt to allow all builds
|
||||
to have the same options.
|
||||
|
||||
Note: We can't use ConditionalMacros.h in this file because it will conflict with
|
||||
the PowerPlant precompiled headers.
|
||||
|
||||
*/
|
||||
|
||||
/* warning pragmas */
|
||||
#pragma warn_hidevirtual on
|
||||
|
||||
#pragma check_header_flags on
|
||||
|
||||
/* Language features that must be the same across libraries... */
|
||||
#pragma enumsalwaysint on
|
||||
#pragma unsigned_char off
|
||||
#pragma exceptions on
|
||||
#pragma bool on
|
||||
|
||||
|
||||
/* Save as much space as possible with strings... */
|
||||
#pragma pool_strings on
|
||||
#pragma dont_reuse_strings off
|
||||
|
||||
#pragma options align=native
|
||||
#pragma sym on /* Takes no memory. OK in non-debug. */
|
||||
|
||||
|
||||
|
||||
#ifdef powerc /* ...generating PowerPC */
|
||||
#pragma toc_data on
|
||||
#pragma fp_contract on
|
||||
#pragma readonly_strings on
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma traceback on
|
||||
#pragma global_optimizer off
|
||||
#pragma scheduling off
|
||||
#pragma peephole off
|
||||
#pragma optimize_for_size off
|
||||
#else
|
||||
#pragma traceback off
|
||||
#pragma global_optimizer on
|
||||
#pragma optimization_level 4
|
||||
#pragma scheduling 604
|
||||
#pragma peephole on
|
||||
#pragma optimize_for_size on
|
||||
#endif
|
||||
|
||||
#else /* ...generating 68k */
|
||||
#pragma code68020 on
|
||||
#pragma code68881 off
|
||||
|
||||
/* Far everything... */
|
||||
#pragma far_code
|
||||
#pragma far_data on
|
||||
#pragma far_strings on
|
||||
#pragma far_vtables on
|
||||
|
||||
#pragma fourbyteints on /* 4-byte ints */
|
||||
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma macsbug on
|
||||
#pragma oldstyle_symbols off
|
||||
#else
|
||||
#pragma macsbug off
|
||||
#endif
|
||||
#endif
|
||||
187
mozilla/build/mac/Moz.pm
Normal file
@@ -0,0 +1,187 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
package Moz;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(BuildProject,OpenErrorLog,CloseErrorLog,UseCodeWarriorLib,Configure,StopForErrors,DontStopForErrors);
|
||||
|
||||
use Cwd;
|
||||
|
||||
sub current_directory()
|
||||
{
|
||||
my $current_directory = cwd();
|
||||
chop($current_directory) if ( $current_directory =~ m/:$/ );
|
||||
return $current_directory;
|
||||
}
|
||||
|
||||
sub full_path_to($)
|
||||
{
|
||||
my ($path) = @_;
|
||||
if ( $path =~ m/^[^:]+$/ )
|
||||
{
|
||||
$path = ":" . $path;
|
||||
}
|
||||
|
||||
if ( $path =~ m/^:/ )
|
||||
{
|
||||
$path = current_directory() . $path;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
sub UseCodeWarriorLib($)
|
||||
{
|
||||
($CodeWarriorLib) = @_;
|
||||
$CodeWarriorLib = full_path_to($CodeWarriorLib);
|
||||
}
|
||||
|
||||
sub activate_CodeWarrior()
|
||||
{
|
||||
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
|
||||
END_OF_APPLESCRIPT
|
||||
}
|
||||
|
||||
BEGIN
|
||||
{
|
||||
UseCodeWarriorLib(":CodeWarriorLib");
|
||||
activate_CodeWarrior();
|
||||
}
|
||||
|
||||
sub Configure($)
|
||||
{
|
||||
my ($config_file) = @_;
|
||||
# read in the configuration file
|
||||
}
|
||||
|
||||
$logging = 0;
|
||||
$recent_errors_file = "";
|
||||
$stop_on_1st_error = 1;
|
||||
|
||||
sub CloseErrorLog()
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
close(ERROR_LOG);
|
||||
$logging = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sub OpenErrorLog($)
|
||||
{
|
||||
my ($log_file) = @_;
|
||||
|
||||
CloseErrorLog();
|
||||
if ( $log_file )
|
||||
{
|
||||
$log_file = full_path_to($log_file);
|
||||
|
||||
open(ERROR_LOG, ">$log_file");
|
||||
|
||||
$log_file =~ m/.+:(.+)/;
|
||||
$recent_errors_file = full_path_to("$1.part");
|
||||
$logging = 1;
|
||||
}
|
||||
}
|
||||
|
||||
sub StopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 1;
|
||||
}
|
||||
|
||||
sub DontStopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 0;
|
||||
}
|
||||
|
||||
sub log_message($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
print ERROR_LOG $message;
|
||||
}
|
||||
}
|
||||
|
||||
sub log_message_with_time($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
my $time_stamp = localtime();
|
||||
log_message("$message ($time_stamp)\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub log_recent_errors($)
|
||||
{
|
||||
my ($project_name) = @_;
|
||||
my $found_errors = 0;
|
||||
|
||||
if ( $logging )
|
||||
{
|
||||
open(RECENT_ERRORS, "<$recent_errors_file");
|
||||
|
||||
while( <RECENT_ERRORS> )
|
||||
{
|
||||
if ( $_ =~ m/^Error/ )
|
||||
{
|
||||
$found_errors = 1;
|
||||
}
|
||||
print ERROR_LOG $_;
|
||||
}
|
||||
|
||||
close(RECENT_ERRORS);
|
||||
unlink("$recent_errors_file");
|
||||
}
|
||||
|
||||
if ( $stop_on_1st_error && $found_errors )
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Errors encountered building \"$project_name\".\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub BuildProject($;$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
$project_path = full_path_to($project_path);
|
||||
|
||||
$project_path =~ m/.+:(.+)/;
|
||||
my $project_name = $1;
|
||||
|
||||
log_message_with_time("### Building \"$project_path\"");
|
||||
|
||||
$had_errors =
|
||||
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file")
|
||||
END_OF_APPLESCRIPT
|
||||
|
||||
# Append any errors to the globally accumulated log file
|
||||
if ( $had_errors )
|
||||
{
|
||||
log_recent_errors($project_path);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
38
mozilla/build/mac/NSCrossProductDefines.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#define XP_MAC 1
|
||||
#ifndef NSPR20
|
||||
#define NSPR20 1
|
||||
#endif
|
||||
#define _NSPR 1
|
||||
#define _NO_FAST_STRING_INLINES_ 1
|
||||
#define HAVE_BOOLEAN 1
|
||||
#define NETSCAPE 1
|
||||
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
|
||||
|
||||
/*
|
||||
This compiles in heap dumping utilities and other good stuff
|
||||
for developers -- maybe we only want it in for a special SDK
|
||||
nspr/java runtime(?):
|
||||
*/
|
||||
#define DEVELOPER_DEBUG 1
|
||||
|
||||
#define MAX(_a,_b) ((_a) < (_b) ? (_b) : (_a))
|
||||
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))
|
||||
BIN
mozilla/build/mac/RunTSScript
Normal file
@@ -1,80 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Simon Fraser <sfraser@netscape.com>
|
||||
#
|
||||
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
|
||||
use Cwd;
|
||||
use Moz::BuildUtils;
|
||||
use Moz::BuildCore;
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Where have the build options gone?
|
||||
#
|
||||
# The various build flags have been centralized into one place.
|
||||
# The master list of options is in MozBuildFlags.txt. However,
|
||||
# you should never need to edit that file, or this one.
|
||||
#
|
||||
# To customize what gets built, or where to start the build,
|
||||
# edit the $prefs_file_name file in
|
||||
# System Folder:Preferences:Mozilla build prefs:
|
||||
# Documentation is provided in that file.
|
||||
#-------------------------------------------------------------
|
||||
|
||||
my($prefs_file_name) = "Mozilla opt build prefs";
|
||||
my($config_header_file_name) = ":mozilla:config:mac:DefinesOptions.h";
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# hashes to hold build options
|
||||
#-------------------------------------------------------------
|
||||
my(%build);
|
||||
my(%options);
|
||||
my(%filepaths);
|
||||
my(%optiondefines);
|
||||
|
||||
# Hash of input files for this build. Eventually, there will be
|
||||
# input files for manifests, and projects too.
|
||||
my(%inputfiles) = (
|
||||
"buildflags", "MozillaBuildFlags.txt",
|
||||
"checkoutdata", "MozillaCheckoutList.txt",
|
||||
"buildprogress", "¥ Mozilla opt progress",
|
||||
"buildmodule", "MozillaBuildList.pm",
|
||||
"checkouttime", "Mozilla last checkout"
|
||||
);
|
||||
#-------------------------------------------------------------
|
||||
# end build hashes
|
||||
#-------------------------------------------------------------
|
||||
|
||||
# set the build root directory, which is the the dir above mozilla
|
||||
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
|
||||
|
||||
# Set up all the flags on $main::, like DEBUG, CARBON etc.
|
||||
# Override the defaults using the preferences files.
|
||||
SetupDefaultBuildOptions(0, ":mozilla:dist:viewer:", $config_header_file_name);
|
||||
|
||||
my($do_checkout) = 0;
|
||||
my($do_build) = 1;
|
||||
|
||||
RunBuild($do_checkout, $do_build, \%inputfiles, $prefs_file_name);
|
||||
@@ -1,80 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Simon Fraser <sfraser@netscape.com>
|
||||
#
|
||||
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
|
||||
use Cwd;
|
||||
use Moz::BuildUtils;
|
||||
use Moz::BuildCore;
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Where have the build options gone?
|
||||
#
|
||||
# The various build flags have been centralized into one place.
|
||||
# The master list of options is in MozBuildFlags.txt. However,
|
||||
# you should never need to edit that file, or this one.
|
||||
#
|
||||
# To customize what gets built, or where to start the build,
|
||||
# edit the $prefs_file_name file in
|
||||
# System Folder:Preferences:Mozilla build prefs:
|
||||
# Documentation is provided in that file.
|
||||
#-------------------------------------------------------------
|
||||
|
||||
my($prefs_file_name) = "Mozilla debug build prefs";
|
||||
my($config_header_file_name) = ":mozilla:config:mac:DefinesOptionsDebug.h";
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# hashes to hold build options
|
||||
#-------------------------------------------------------------
|
||||
my(%build);
|
||||
my(%options);
|
||||
my(%filepaths);
|
||||
my(%optiondefines);
|
||||
|
||||
# Hash of input files for this build. Eventually, there will be
|
||||
# input files for manifests, and projects too.
|
||||
my(%inputfiles) = (
|
||||
"buildflags", "MozillaBuildFlags.txt",
|
||||
"checkoutdata", "MozillaCheckoutList.txt",
|
||||
"buildprogress", "¥ Mozilla debug progress",
|
||||
"buildmodule", "MozillaBuildList.pm",
|
||||
"checkouttime", "Mozilla last checkout"
|
||||
);
|
||||
#-------------------------------------------------------------
|
||||
# end build hashes
|
||||
#-------------------------------------------------------------
|
||||
|
||||
# set the build root directory, which is the the dir above mozilla
|
||||
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
|
||||
|
||||
# Set up all the flags on $main::, like DEBUG, CARBON etc.
|
||||
# Override the defaults using the preferences files.
|
||||
SetupDefaultBuildOptions(1, ":mozilla:dist:viewer_debug:", $config_header_file_name);
|
||||
|
||||
my($do_pull) = 0; # overridden by flags and prefs
|
||||
my($do_build) = 1;
|
||||
|
||||
RunBuild($do_pull, $do_build, \%inputfiles, $prefs_file_name);
|
||||
@@ -1,595 +0,0 @@
|
||||
#!perl -w
|
||||
package Moz::BuildCore;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
use vars qw( @ISA @EXPORT );
|
||||
|
||||
# perl includes
|
||||
use Cwd;
|
||||
use POSIX;
|
||||
use Time::Local;
|
||||
use File::Basename;
|
||||
use LWP::Simple;
|
||||
|
||||
# homegrown
|
||||
use Moz::Moz;
|
||||
use Moz::Jar;
|
||||
use Moz::BuildFlags;
|
||||
use Moz::BuildUtils;
|
||||
use Moz::CodeWarriorLib;
|
||||
|
||||
# use MozillaBuildList; # eventually, this should go away, and be replaced by data input
|
||||
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
RunBuild
|
||||
);
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// DoPrebuildCheck
|
||||
#//
|
||||
#// Check the build tools etc before running the build.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub DoPrebuildCheck()
|
||||
{
|
||||
SanityCheckBuildOptions();
|
||||
|
||||
# launch codewarrior and persist its location. Have to call this before first
|
||||
# call to getCodeWarriorPath().
|
||||
my($ide_path_file) = $main::filepaths{"idepath"};
|
||||
$ide_path_file = full_path_to($ide_path_file);
|
||||
LaunchCodeWarrior($ide_path_file);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SanityCheckBuildOptions
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SanityCheckBuildOptions()
|
||||
{
|
||||
my($bad_options) = 0;
|
||||
|
||||
# Jar options
|
||||
if (!$main::options{chrome_jars} && !$main::options{chrome_files})
|
||||
{
|
||||
print "Warning: Both \$options{chrome_jars} and \$options{chrome_files} are off. You won't get any chrome.\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if (!$main::options{chrome_jars} && $main::options{use_jars})
|
||||
{
|
||||
print "Warning: \$options{chrome_jars} is off but \$options{use_jars} is on. Your build won't run (expects jars, got files).\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if (!$main::options{chrome_files} && !$main::options{use_jars})
|
||||
{
|
||||
print "Warning: \$options{chrome_jars} is off but \$options{chrome_files} is on. Your build won't run (expects files, got jars).\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if ($main::options{ldap_experimental} && !$main::options{ldap})
|
||||
{
|
||||
print "Warning: \$options{ldap_experimental} is on but \$options{ldap} is off. LDAP experimental features will not be built.\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if ($main::options{wsp} && !$main::options{xmlextras})
|
||||
{
|
||||
print "Warning: \$options{wsp} is on but \$options{xmlextras} is off. wsp will not be built.\n";
|
||||
$bad_options = 1;
|
||||
}
|
||||
|
||||
if ($bad_options) {
|
||||
print "Build will start in 5 seconds. Press command-. to stop\n";
|
||||
|
||||
DelayFor(5);
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GenBuildSystemInfo
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub GenBuildSystemInfo()
|
||||
{
|
||||
# always rebuild the configuration program.
|
||||
BuildProjectClean(":mozilla:build:mac:tools:BuildSystemInfo:BuildSystemInfo.mcp", "BuildSystemInfo");
|
||||
|
||||
# delete the configuration file.
|
||||
unlink(":mozilla:build:mac:BuildSystemInfo.pm");
|
||||
|
||||
# run the program.
|
||||
system(":mozilla:build:mac:BuildSystemInfo");
|
||||
|
||||
# wait for the file to be created.
|
||||
while (!(-e ":mozilla:build:mac:BuildSystemInfo.pm")) { WaitNextEvent(); }
|
||||
|
||||
# wait for BuildSystemInfo to finish, so that we see correct results.
|
||||
while (IsProcessRunning("BuildSystemInfo")) { WaitNextEvent(); }
|
||||
|
||||
# now, evaluate the contents of the file.
|
||||
open(F, ":mozilla:build:mac:BuildSystemInfo.pm");
|
||||
while (<F>) { eval; }
|
||||
close(F);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Make library aliases
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub MakeLibAliases()
|
||||
{
|
||||
my($dist_dir) = GetBinDirectory();
|
||||
|
||||
#// ProfilerLib
|
||||
if ($main::PROFILE)
|
||||
{
|
||||
my($profilerlibpath) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:Profiler:Profiler Common:ProfilerLib");
|
||||
MakeAlias("$profilerlibpath", "$dist_dir"."Essential Files:");
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ConfigureBuildSystem
|
||||
#//
|
||||
#// defines some build-system configuration variables.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ConfigureBuildSystem()
|
||||
{
|
||||
#// In the future, we may want to do configurations based on the actual build system itself.
|
||||
#// GenBuildSystemInfo();
|
||||
|
||||
#// For now, if we discover a newer header file than existed in Universal Interfaces 3.2,
|
||||
#// we'll assume that 3.3 or later is in use.
|
||||
my($universal_interfaces) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:Universal:Interfaces:CIncludes:");
|
||||
if (-e ($universal_interfaces . "ControlDefinitions.h")) {
|
||||
$main::UNIVERSAL_INTERFACES_VERSION = 0x0330;
|
||||
}
|
||||
|
||||
#// Rename IC SDK folder in the Mac OS Support folder
|
||||
my($ic_sdk_folder) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:ICProgKit2.0.2");
|
||||
if( -e $ic_sdk_folder)
|
||||
{
|
||||
my($new_ic_folder_name) = Moz::CodeWarriorLib::getCodeWarriorPath("MacOS Support:(ICProgKit2.0.2)");
|
||||
rename ($ic_sdk_folder, $new_ic_folder_name);
|
||||
# note that CodeWarrior doesn't descend into folders with () the name
|
||||
print "Mozilla no longer needs the Internet Config SDK to build:\n Renaming the 'ICProgKit2.0.2' folder to '(ICProgKit2.0.2)'\n";
|
||||
}
|
||||
|
||||
printf("UNIVERSAL_INTERFACES_VERSION = 0x%04X\n", $main::UNIVERSAL_INTERFACES_VERSION);
|
||||
|
||||
# alias required CodeWarrior libs into the Essential Files folder (only the Profiler lib now)
|
||||
MakeLibAliases();
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// CheckOutModule. Takes variable number of args; first two are required
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub CheckOutModule($$$$)
|
||||
{
|
||||
my($session, $module, $revision, $date) = @_;
|
||||
|
||||
my($result) = $session->checkout($module, $revision, $date);
|
||||
|
||||
# result of 1 is success
|
||||
if ($result) { return; }
|
||||
|
||||
my($checkout_err) = $session->getLastError();
|
||||
if ($checkout_err == 708) {
|
||||
die "Error: Checkout was cancelled.\n";
|
||||
} elsif ($checkout_err == 911) {
|
||||
die "Error: CVS session settings are incorrect. Check your password, and the CVS root settings.\n";
|
||||
} elsif ($checkout_err == 703) {
|
||||
die "Error: CVS checkout failed. Unknown module, unknown tag, bad username, or other CVS error.\n";
|
||||
} elsif ($checkout_err == 711) {
|
||||
print "Checkout of '$module' failed.\n";
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getScriptFolder
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getScriptFolder()
|
||||
{
|
||||
return dirname($0);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getScriptFolder
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub get_url_contents($)
|
||||
{
|
||||
my($url) = @_;
|
||||
|
||||
my($url_contents) = LWP::Simple::get($url);
|
||||
$url_contents =~ s/\r\n/\n/g; # normalize linebreaks
|
||||
$url_contents =~ s/\r/\n/g; # normalize linebreaks
|
||||
return $url_contents;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// get_files_from_content
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub uniq
|
||||
{
|
||||
my $lastval;
|
||||
grep(($_ ne $lastval, $lastval = $_)[$[], @_);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// get_files_from_content
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub get_files_from_content($)
|
||||
{
|
||||
my($content) = @_;
|
||||
|
||||
my(@jscalls) = grep (/return js_file_menu[^{]*/, split(/\n/, $content));
|
||||
my $i;
|
||||
|
||||
for ($i = 0; $i < @jscalls ; $i++)
|
||||
{
|
||||
$jscalls[$i] =~ s/.*\(|\).*//g;
|
||||
my(@callparams) = split(/,/, $jscalls[$i]);
|
||||
my ($repos, $dir, $file, $rev) = grep(s/['\s]//g, @callparams);
|
||||
$jscalls[$i] = "$dir/$file";
|
||||
}
|
||||
|
||||
&uniq(sort(@jscalls));
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getLastUpdateTime
|
||||
#//
|
||||
#// Get the last time we updated. Return 0 on failure
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getLastUpdateTime($)
|
||||
{
|
||||
my($timestamp_file) = @_;
|
||||
|
||||
my($time_string);
|
||||
|
||||
local(*TIMESTAMP_FILE);
|
||||
unless (open(TIMESTAMP_FILE, "< $timestamp_file")) { return 0; }
|
||||
|
||||
while (<TIMESTAMP_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
# ignore comments and empty lines
|
||||
if ($line =~ /^\#/ || $line =~ /^\s*$/) {
|
||||
next;
|
||||
}
|
||||
|
||||
$time_string = $line;
|
||||
}
|
||||
|
||||
# get the epoch seconds
|
||||
my($last_update_secs) = $time_string;
|
||||
$last_update_secs =~ s/\s#.+$//;
|
||||
|
||||
print "FAST_UPDATE found that you last updated at ".localtime($last_update_secs)."\n";
|
||||
|
||||
# how long ago was this, in hours?
|
||||
my($gm_now) = time();
|
||||
my($update_hours) = 1 + ceil(($gm_now - $last_update_secs) / (60 * 60));
|
||||
|
||||
return $update_hours;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// saveCheckoutTimestamp
|
||||
#//
|
||||
#// Create a file on disk containing the current time. Param is time(), which is an Epoch seconds
|
||||
#// (and therefore in GMT).
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub saveCheckoutTimestamp($$)
|
||||
{
|
||||
my($gm_secs, $timestamp_file) = @_;
|
||||
|
||||
local(*TIMESTAMP_FILE);
|
||||
open(TIMESTAMP_FILE, ">$timestamp_file") || die "Failed to open $timestamp_file\n";
|
||||
print(TIMESTAMP_FILE "# time of last checkout or update, in GMT. Used by FAST_UPDATE\n");
|
||||
print(TIMESTAMP_FILE "$gm_secs \# around ".localtime()." local time\n");
|
||||
close(TIMESTAMP_FILE);
|
||||
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// FastUpdate
|
||||
#//
|
||||
#// Use Bonsai url data to update only those dirs which have new files
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub FastUpdate($$)
|
||||
{
|
||||
my($modules, $timestamp_file) = @_; # list of modules to check out
|
||||
|
||||
my($num_hours) = getLastUpdateTime($timestamp_file);
|
||||
if ($num_hours == 0 || $num_hours > 170) {
|
||||
print "Can't fast_update; last update was too long ago, or never. Doing normal checkout.\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
print "Doing fast update, pulling files changed in the last $num_hours hours\n";
|
||||
|
||||
my($cvsfile) = AskAndPersistFile($main::filepaths{"sessionpath"});
|
||||
my($session) = Moz::MacCVS->new( $cvsfile );
|
||||
unless (defined($session)) { die "Error: Checkout aborted. Cannot create session file: $session" }
|
||||
|
||||
# activate MacCVS
|
||||
ActivateApplication('Mcvs');
|
||||
|
||||
my($checkout_start_time) = time();
|
||||
|
||||
#print "Time now is $checkout_start_time ($checkout_start_time + 0)\n";
|
||||
|
||||
my($this_co);
|
||||
foreach $this_co (@$modules)
|
||||
{
|
||||
my($module, $revision, $date) = ($this_co->[0], $this_co->[1], $this_co->[2]);
|
||||
|
||||
# assume that things pulled by date wont change
|
||||
if ($date ne "") {
|
||||
print "$module is pulled by date, so ignoring in FastUpdate.\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my($search_type) = "hours";
|
||||
my($min_date) = "";
|
||||
my($max_date) = "";
|
||||
my($url) = "http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=${module}&branch=${revision}&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=${num_hours}&date=${search_type}&mindate=${min_date}&maxdate=${max_date}&cvsroot=%2Fcvsroot";
|
||||
|
||||
if ($revision eq "") {
|
||||
print "Getting list of checkins to $module from Bonsai...\n";
|
||||
} else {
|
||||
print "Getting list of checkins to $module on branch $revision from Bonsai...\n";
|
||||
}
|
||||
my(@files) = &get_files_from_content(&get_url_contents($url));
|
||||
|
||||
if ($#files > 0)
|
||||
{
|
||||
my(@cvs_co_list);
|
||||
|
||||
my($co_file);
|
||||
foreach $co_file (@files)
|
||||
{
|
||||
print "Updating $co_file\n";
|
||||
push(@cvs_co_list, $co_file);
|
||||
}
|
||||
|
||||
my($result) = $session->update($revision, \@cvs_co_list);
|
||||
# result of 1 is success
|
||||
if (!$result) { die "Error: Fast update failed\n"; }
|
||||
} else {
|
||||
print "No files in this module changed\n";
|
||||
}
|
||||
}
|
||||
|
||||
saveCheckoutTimestamp($checkout_start_time, $timestamp_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Checkout
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub CheckoutModules($$$)
|
||||
{
|
||||
my($modules, $pull_date, $timestamp_file) = @_; # list of modules to check out
|
||||
|
||||
my($start_time) = TimeStart();
|
||||
|
||||
# assertRightDirectory();
|
||||
my($cvsfile) = AskAndPersistFile($main::filepaths{"sessionpath"});
|
||||
my($session) = Moz::MacCVS->new( $cvsfile );
|
||||
unless (defined($session)) { die "Error: Checkout aborted. Cannot create session file: $session" }
|
||||
|
||||
my($checkout_start_time) = time();
|
||||
|
||||
# activate MacCVS
|
||||
ActivateApplication('Mcvs');
|
||||
|
||||
my($this_co);
|
||||
foreach $this_co (@$modules)
|
||||
{
|
||||
my($module, $revision, $date) = ($this_co->[0], $this_co->[1], $this_co->[2]);
|
||||
if ($date eq "") {
|
||||
$date = $pull_date;
|
||||
}
|
||||
CheckOutModule($session, $module, $revision, $date);
|
||||
# print "Checking out $module with ref $revision, date $date\n";
|
||||
}
|
||||
|
||||
saveCheckoutTimestamp($checkout_start_time, $timestamp_file);
|
||||
TimeEnd($start_time, "Checkout");
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ReadCheckoutModulesFile
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ReadCheckoutModulesFile($$)
|
||||
{
|
||||
my($modules_file, $co_list) = @_;
|
||||
|
||||
my($checkout_file) = getScriptFolder().":".$modules_file;
|
||||
local(*CHECKOUT_FILE);
|
||||
open(CHECKOUT_FILE, "< $checkout_file") || die "Error: failed to open checkout list $checkout_file\n";
|
||||
while (<CHECKOUT_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
# ignore comments and empty lines
|
||||
if ($line =~ /^\#/ || $line =~ /^\s*$/) {
|
||||
next;
|
||||
}
|
||||
|
||||
my(@cvs_co) = ["", "", ""];
|
||||
|
||||
my($module, $revision, $date) = (0, 1, 2);
|
||||
|
||||
if ($line =~ /\s*([^#,\s]+)\s*\,\s*([^#,\s]+)\s*\,\s*([^#]+)/)
|
||||
{
|
||||
@cvs_co[$module] = $1;
|
||||
@cvs_co[$revision] = $2;
|
||||
@cvs_co[$date] = $3;
|
||||
}
|
||||
elsif ($line =~ /\s*([^#,\s]+)\s*\,\s*([^#,\s]+)\s*(#.+)?/)
|
||||
{
|
||||
@cvs_co[$module] = $1;
|
||||
@cvs_co[$revision] = $2;
|
||||
}
|
||||
elsif ($line =~ /\s*([^#,\s]+)\s*\,\s*,\s*([^#,]+)/)
|
||||
{
|
||||
@cvs_co[$module] = $1;
|
||||
@cvs_co[$date] = $2;
|
||||
}
|
||||
elsif ($line =~ /\s*([^#,\s]+)/)
|
||||
{
|
||||
@cvs_co[$module] = $1;
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Error: unrecognized line '$line' in $modules_file\n";
|
||||
}
|
||||
|
||||
# strip surrounding space from date
|
||||
@cvs_co[$date] =~ s/^\s*|\s*$//g;
|
||||
|
||||
# print "Going to check out '@cvs_co[$module]', '@cvs_co[$revision]', '@cvs_co[$date]'\n";
|
||||
push(@$co_list, \@cvs_co);
|
||||
}
|
||||
|
||||
close(CHECKOUT_FILE);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// PullFromCVS
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub PullFromCVS($$)
|
||||
{
|
||||
unless ( $main::build{pull} ) { return; }
|
||||
|
||||
my($modules_file, $timestamp_file) = @_;
|
||||
|
||||
StartBuildModule("pull");
|
||||
|
||||
my(@cvs_co_list);
|
||||
ReadCheckoutModulesFile($modules_file, \@cvs_co_list);
|
||||
|
||||
if ($main::FAST_UPDATE && $main::options{pull_by_date})
|
||||
{
|
||||
die "Error: you can't use FAST_UPDATE if you are pulling by date.\n";
|
||||
}
|
||||
|
||||
my($did_fast_update) = $main::FAST_UPDATE && FastUpdate(\@cvs_co_list, $timestamp_file);
|
||||
if (!$did_fast_update)
|
||||
{
|
||||
my($pull_date) = "";
|
||||
if ($main::options{pull_by_date})
|
||||
{
|
||||
# acceptable CVS date formats are (in local time):
|
||||
# ISO8601 (e.g. "1972-09-24 20:05") and Internet (e.g. "24 Sep 1972 20:05").
|
||||
# Perl's localtime() string format also seems to work.
|
||||
$pull_date = localtime().""; # force string interp.
|
||||
print "Pulling by date $pull_date\n";
|
||||
}
|
||||
|
||||
CheckoutModules(\@cvs_co_list, $pull_date, $timestamp_file);
|
||||
}
|
||||
|
||||
EndBuildModule("pull");
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// RunBuild
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub RunBuild($$$$)
|
||||
{
|
||||
my($do_pull, $do_build, $input_files, $build_prefs) = @_;
|
||||
|
||||
InitBuildProgress($input_files->{"buildprogress"});
|
||||
|
||||
# if we are pulling, we probably want to do a full build, so clear the build progress
|
||||
if ($do_pull) {
|
||||
ClearBuildProgress();
|
||||
}
|
||||
|
||||
# read local prefs, and the build progress file, and set flags to say what to build
|
||||
SetupBuildParams(\%main::build,
|
||||
\%main::options,
|
||||
\%main::optiondefines,
|
||||
\%main::filepaths,
|
||||
$input_files->{"buildflags"},
|
||||
$build_prefs);
|
||||
|
||||
# If we were told to pull, make sure we do, overriding prefs etc.
|
||||
if ($do_pull)
|
||||
{
|
||||
$main::build{"pull"} = 1;
|
||||
}
|
||||
|
||||
# transfer this flag
|
||||
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = $main::CLOSE_PROJECTS_FIRST;
|
||||
|
||||
# setup the build log
|
||||
SetupBuildLog($main::filepaths{"buildlogfilepath"}, $main::USE_TIMESTAMPED_LOGS);
|
||||
StopForErrors();
|
||||
|
||||
if ($main::LOG_TO_FILE) {
|
||||
RedirectOutputToFile($main::filepaths{"scriptlogfilepath"});
|
||||
}
|
||||
|
||||
# run a pre-build check to see that the tools etc are in order
|
||||
DoPrebuildCheck();
|
||||
|
||||
# do the pull
|
||||
PullFromCVS($input_files->{"checkoutdata"}, $input_files->{"checkouttime"});
|
||||
|
||||
unless ($do_build) { return; }
|
||||
|
||||
my($build_start) = TimeStart();
|
||||
|
||||
# check the build environment
|
||||
ConfigureBuildSystem();
|
||||
|
||||
# here we load and call methods in the build module indirectly.
|
||||
# we have to use indirection because the build module can be named
|
||||
# differently for different builds.
|
||||
chdir(dirname($0)); # change to the script dir
|
||||
my($build_module) = $input_files->{"buildmodule"};
|
||||
# load the build module
|
||||
require $build_module;
|
||||
{ # scope for no strict 'refs'
|
||||
no strict 'refs';
|
||||
|
||||
my($package_name) = $build_module;
|
||||
$package_name =~ s/\.pm$//;
|
||||
|
||||
chdir($main::MOZ_SRC);
|
||||
&{$package_name."::BuildDist"}();
|
||||
|
||||
chdir($main::MOZ_SRC);
|
||||
&{$package_name."::BuildProjects"}();
|
||||
}
|
||||
|
||||
# the build finished, so clear the build progress state
|
||||
ClearBuildProgress();
|
||||
|
||||
TimeEnd($build_start, "Build");
|
||||
print "Build complete\n";
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -1,425 +0,0 @@
|
||||
#!perl -w
|
||||
package Moz::BuildFlags;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
# Package that attempts to read a file from the Preferences folder,
|
||||
# and get build settings out of it
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use Moz::Moz;
|
||||
use Moz::Prefs;
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
SetupBuildParams
|
||||
InitBuildProgress
|
||||
WriteBuildProgress
|
||||
ClearBuildProgress
|
||||
ReadBuildProgress
|
||||
);
|
||||
|
||||
|
||||
my(@build_flags);
|
||||
my(@options_flags);
|
||||
my(@filepath_flags);
|
||||
|
||||
my(%arrays_list) = (
|
||||
"build_flags", \@build_flags,
|
||||
"options_flags", \@options_flags,
|
||||
"filepath_flags", \@filepath_flags
|
||||
);
|
||||
|
||||
my($progress_file) = "¥ÊBuild progress";
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# appendArrayFlag
|
||||
#
|
||||
# Set a flag in the array
|
||||
#-------------------------------------------------------------------------------
|
||||
sub appendArrayFlag(@)
|
||||
{
|
||||
my($array_name) = shift;
|
||||
my($setting) = shift;
|
||||
my($value) = shift;
|
||||
|
||||
my(@optional_values);
|
||||
foreach (@_) {
|
||||
push(@optional_values, $_);
|
||||
}
|
||||
|
||||
my(@this_flag) = [$setting, $value, @optional_values];
|
||||
my($flags_array) = $arrays_list{$array_name};
|
||||
if ($flags_array)
|
||||
{
|
||||
push(@{$flags_array}, @this_flag) || die "Failed to append\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Error: unknown build flags array $array_name\n";
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# readFlagsFile
|
||||
#
|
||||
# Read the file of build flags from disk. File path is relative to the
|
||||
# script directory.
|
||||
#-------------------------------------------------------------------------------
|
||||
sub readFlagsFile($)
|
||||
{
|
||||
my($flags_file) = @_;
|
||||
|
||||
my($file_path) = $0;
|
||||
$file_path =~ s/[^:]+$/$flags_file/;
|
||||
|
||||
print "Reading build flags from '$file_path'\n";
|
||||
|
||||
local(*FLAGS_FILE);
|
||||
open(FLAGS_FILE, "< $file_path") || die "Error: failed to open flags file $file_path\n";
|
||||
|
||||
my($cur_array) = "";
|
||||
|
||||
while(<FLAGS_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
# ignore comments and empty lines
|
||||
if ($line =~ /^\#/ || $line =~ /^\s*$/) {
|
||||
next;
|
||||
}
|
||||
|
||||
# 1-word line, probably array name
|
||||
if ($line =~ /^([^#\s]+)\s*$/)
|
||||
{
|
||||
$cur_array = $1;
|
||||
next;
|
||||
}
|
||||
elsif ($line =~ /^([^#\s]+)\s+\"(.+)\"(\s+#.+)?$/) # quoted option, possible comment
|
||||
{
|
||||
my($flag) = $1;
|
||||
my($setting) = $2;
|
||||
|
||||
appendArrayFlag($cur_array, $flag, $setting);
|
||||
}
|
||||
elsif ($line =~ /^([^#\s]+)((\s+[^#\s]+)+)(\s+#.+)?$/) # multiple word line, possible comment
|
||||
{
|
||||
my($flag) = $1;
|
||||
|
||||
appendArrayFlag($cur_array, $flag, split(' ', $2));
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Error: unknown build flag at '$line'\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(FLAGS_FILE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# flagsArrayToHash
|
||||
#
|
||||
# Utility routine to migrate flag from a 2D array to a hash, where
|
||||
# item[n][0] is the hash entry name, and item[n][1] is the hash entry value.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub flagsArrayToHash($$)
|
||||
{
|
||||
my($src_array, $dest_hash) = @_;
|
||||
|
||||
my($item);
|
||||
foreach $item (@$src_array)
|
||||
{
|
||||
$dest_hash->{$item->[0]} = $item->[1];
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------
|
||||
# printHash
|
||||
#
|
||||
# Utility routine to print a hash
|
||||
#-----------------------------------------------
|
||||
sub printHash($)
|
||||
{
|
||||
my($hash_ref) = @_;
|
||||
|
||||
print "Printing hash:\n";
|
||||
|
||||
my($key, $value);
|
||||
|
||||
while (($key, $value) = each (%$hash_ref))
|
||||
{
|
||||
print " $key $value\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-----------------------------------------------
|
||||
# printBuildArray
|
||||
#
|
||||
# Utility routine to print a 2D array
|
||||
#-----------------------------------------------
|
||||
sub printBuildArray($)
|
||||
{
|
||||
my($build_array) = @_;
|
||||
|
||||
my($entry);
|
||||
foreach $entry (@$build_array)
|
||||
{
|
||||
print "$entry->[0] = $entry->[1]\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SetBuildFlags
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetBuildFlags($)
|
||||
{
|
||||
my($build) = @_;
|
||||
|
||||
flagsArrayToHash(\@build_flags, $build);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SetBuildOptions
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetBuildOptions($)
|
||||
{
|
||||
my($options) = @_;
|
||||
|
||||
flagsArrayToHash(\@options_flags, $options);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SetFilepathFlags
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetFilepathFlags($)
|
||||
{
|
||||
my($filepath) = @_;
|
||||
|
||||
flagsArrayToHash(\@filepath_flags, $filepath);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SetOptionDefines
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetOptionDefines($)
|
||||
{
|
||||
my($optiondefines) = @_;
|
||||
|
||||
foreach my $entry (@options_flags)
|
||||
{
|
||||
if (defined($entry->[2])) {
|
||||
$optiondefines->{$entry->[0]}{$entry->[2]} = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# PropagateAllFlags
|
||||
#-------------------------------------------------------------------------------
|
||||
sub PropagateAllFlags($)
|
||||
{
|
||||
my($build_array) = @_;
|
||||
|
||||
# if "all" is set, set all the flags to 1
|
||||
unless ($build_array->[0][0] eq "all") { die "Error: 'all' must come first in the flags array\n"; }
|
||||
|
||||
if ($build_array->[0][1] == 1)
|
||||
{
|
||||
my($index);
|
||||
foreach $index (@$build_array)
|
||||
{
|
||||
$index->[1] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// _getBuildProgressFile
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub _getBuildProgressFile()
|
||||
{
|
||||
return $progress_file;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// setBuildProgressStart
|
||||
#//
|
||||
#// This automagically sets $build{"all"} to 0
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub setBuildProgressStart($$)
|
||||
{
|
||||
my($build_array, $name) = @_;
|
||||
|
||||
my($index);
|
||||
foreach $index (@$build_array)
|
||||
{
|
||||
$index->[1] = 0;
|
||||
if ($index->[0] eq $name) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
print "Building from module after $name, as specified by build progress\n";
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// InitBuildProgress
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub InitBuildProgress($)
|
||||
{
|
||||
my($prog_file) = @_;
|
||||
if ($prog_file ne "") {
|
||||
$progress_file = full_path_to($prog_file);
|
||||
print "Writing build progress to $progress_file\n";
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// WriteBuildProgress
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub WriteBuildProgress($)
|
||||
{
|
||||
my($module_built) = @_;
|
||||
|
||||
my($progress_file) = _getBuildProgressFile();
|
||||
|
||||
if ($progress_file ne "")
|
||||
{
|
||||
open(PROGRESS_FILE, ">>$progress_file") || die "Failed to open $progress_file\n";
|
||||
print(PROGRESS_FILE "$module_built\n");
|
||||
close(PROGRESS_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ClearBuildProgress
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ClearBuildProgress()
|
||||
{
|
||||
my($progress_file) = _getBuildProgressFile();
|
||||
if ($progress_file ne "") {
|
||||
unlink $progress_file;
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// WipeBuildProgress
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub WipeBuildProgress()
|
||||
{
|
||||
print "Ignoring build progress\n";
|
||||
ClearBuildProgress();
|
||||
$progress_file = "";
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ReadBuildProgress
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ReadBuildProgress($)
|
||||
{
|
||||
my($build_array) = @_;
|
||||
my($progress_file) = _getBuildProgressFile();
|
||||
|
||||
my($last_module);
|
||||
|
||||
if (open(PROGRESS_FILE, "< $progress_file"))
|
||||
{
|
||||
print "Getting build progress from $progress_file\n";
|
||||
|
||||
while (<PROGRESS_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
$last_module = $line;
|
||||
}
|
||||
|
||||
close(PROGRESS_FILE);
|
||||
}
|
||||
|
||||
if ($last_module)
|
||||
{
|
||||
setBuildProgressStart($build_array, $last_module);
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# clearOldBuildSettings
|
||||
#-------------------------------------------------------------------------------
|
||||
sub clearOldBuildSettings($$$$)
|
||||
{
|
||||
my($build, $options, $optiondefines, $filepaths) = @_;
|
||||
|
||||
# empty the arrays in case we're being called twice
|
||||
@build_flags = ();
|
||||
@options_flags = ();
|
||||
@filepath_flags = ();
|
||||
|
||||
# and empty the hashes
|
||||
%$build = ();
|
||||
%$options = ();
|
||||
%$optiondefines = ();
|
||||
%$filepaths = ();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SetupBuildParams
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetupBuildParams($$$$$$)
|
||||
{
|
||||
my($build, $options, $optiondefines, $filepaths, $flags_file, $prefs_file) = @_;
|
||||
|
||||
# Empty the hashes and arrays, to wipe out any stale data.
|
||||
# Needed because these structures persist across two build scripts
|
||||
# called using 'do' from a parent script.
|
||||
clearOldBuildSettings($build, $options, $optiondefines, $filepaths);
|
||||
|
||||
# Read from the flags file, which sets up the various arrays
|
||||
readFlagsFile($flags_file);
|
||||
|
||||
# If 'all' is set in the build array, propagate that to all entries
|
||||
PropagateAllFlags(\@build_flags);
|
||||
|
||||
# read the user pref file, that can change values in the array
|
||||
ReadMozUserPrefs($prefs_file, \@build_flags, \@options_flags, \@filepath_flags);
|
||||
|
||||
# If build progress exists, this clears flags in the array up to a certain point
|
||||
if ($main::USE_BUILD_PROGRESS) {
|
||||
ReadBuildProgress(\@build_flags);
|
||||
} else {
|
||||
WipeBuildProgress();
|
||||
}
|
||||
|
||||
# printBuildArray(\@build_flags);
|
||||
# printBuildArray(\@options_flags);
|
||||
|
||||
SetBuildFlags($build);
|
||||
SetBuildOptions($options);
|
||||
SetOptionDefines($optiondefines);
|
||||
SetFilepathFlags($filepaths);
|
||||
|
||||
# printHash($build);
|
||||
# printHash($options);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
@@ -1,786 +0,0 @@
|
||||
|
||||
package Moz::BuildUtils;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
# Package that contains build util functions specific to the Mozilla build
|
||||
# process.
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
|
||||
use Cwd;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
|
||||
use Mac::Events;
|
||||
use Mac::StandardFile;
|
||||
|
||||
use Moz::Moz;
|
||||
use Moz::BuildFlags;
|
||||
use Moz::MacCVS;
|
||||
#use Moz::ProjectXML; #optional; required for static build only
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
SetupDefaultBuildOptions
|
||||
SetupBuildRootDir
|
||||
StartBuildModule
|
||||
EndBuildModule
|
||||
GetBinDirectory
|
||||
BuildOneProjectWithOutput
|
||||
BuildOneProject
|
||||
BuildProject
|
||||
BuildProjectClean
|
||||
BuildIDLProject
|
||||
BuildFolderResourceAliases
|
||||
AskAndPersistFile
|
||||
DelayFor
|
||||
TimeStart
|
||||
TimeEnd
|
||||
EmptyTree
|
||||
SetupBuildLog
|
||||
SetBuildNumber
|
||||
SetTimeBomb
|
||||
UpdateConfigHeader
|
||||
);
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SetupDefaultBuildOptions
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SetupDefaultBuildOptions($$$)
|
||||
{
|
||||
my($debug, $bin_dir, $config_header_file_name) = @_;
|
||||
|
||||
# Here we set up defaults for the various build flags.
|
||||
# If you want to override any of these, it's best to do
|
||||
# so via the relevant preferences file, which lives in
|
||||
# System Folder:Preferences:Mozilla build prefs:{build prefs file}.
|
||||
# For the name of the prefs file, see the .pl script that you
|
||||
# run to start this build. The prefs files are created when
|
||||
# you run the build, and contain some documentation.
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# configuration variables that globally affect what is built
|
||||
#-------------------------------------------------------------
|
||||
$main::DEBUG = $debug;
|
||||
$main::PROFILE = 0;
|
||||
$main::RUNTIME = 0; # turn on to just build runtime support and NSPR projects
|
||||
$main::GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
|
||||
$main::MOZILLA_OFFICIAL = 0; # generate build number
|
||||
$main::LOG_TO_FILE = 0; # write perl output to a file
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# configuration variables that affect the manner of building,
|
||||
# but possibly affecting the outcome.
|
||||
#-------------------------------------------------------------
|
||||
$main::ALIAS_SYM_FILES = $main::DEBUG;
|
||||
$main::CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
|
||||
# building each project
|
||||
# The following two options will delete all dist files (if you have $main::build{dist} turned on),
|
||||
# but leave the directory structure intact.
|
||||
$main::CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
|
||||
$main::CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
|
||||
$main::CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
|
||||
$main::CLOBBER_PROJECTS = 0; # turn on to remove object code from each project before building it
|
||||
|
||||
$main::UNIVERSAL_INTERFACES_VERSION = 0x0320;
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# configuration variables that are preferences for the build,
|
||||
# style and do not affect what is built.
|
||||
#-------------------------------------------------------------
|
||||
$main::CLOSE_PROJECTS_FIRST = 0;
|
||||
# 1 = close then make (for development),
|
||||
# 0 = make then close (for tinderbox).
|
||||
$main::USE_TIMESTAMPED_LOGS = 0;
|
||||
$main::USE_BUILD_PROGRESS = 1; # track build progress for restartable builds
|
||||
#-------------------------------------------------------------
|
||||
# END OF CONFIG SWITCHES
|
||||
#-------------------------------------------------------------
|
||||
|
||||
$main::BIN_DIRECTORY = $bin_dir;
|
||||
$main::DEFINESOPTIONS_FILE = $config_header_file_name;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SetupBuildRootDir
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SetupBuildRootDir($)
|
||||
{
|
||||
my($rel_path_to_script) = @_;
|
||||
|
||||
my($cur_dir) = cwd();
|
||||
$cur_dir =~ s/$rel_path_to_script$//;
|
||||
chdir($cur_dir) || die "Error: failed to set build root directory to '$cur_dir'.\nYou probably need to put 'mozilla' one level down (in a folder).\n";
|
||||
$main::MOZ_SRC = cwd();
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// StartBuildModule
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub StartBuildModule($)
|
||||
{
|
||||
my($module) = @_;
|
||||
|
||||
print("---- Start of $module ----\n");
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// EndBuildModule
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub EndBuildModule($)
|
||||
{
|
||||
my($module) = @_;
|
||||
WriteBuildProgress($module);
|
||||
print("---- End of $module ----\n");
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# GetBinDirectory
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
sub GetBinDirectory()
|
||||
{
|
||||
if ($main::BIN_DIRECTORY eq "") { die "Dist directory not set\n"; }
|
||||
return $main::BIN_DIRECTORY;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# AskAndPersistFile stores the information about the user pick inside
|
||||
# the file $session_storage
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
sub AskAndPersistFile($)
|
||||
{
|
||||
my ($sessionStorage) = @_;
|
||||
my $cvsfile;
|
||||
|
||||
if (( -e $sessionStorage) &&
|
||||
open( SESSIONFILE, $sessionStorage ))
|
||||
{
|
||||
# Read in the path if available
|
||||
$cvsfile = <SESSIONFILE>;
|
||||
chomp $cvsfile;
|
||||
close SESSIONFILE;
|
||||
if ( ! -e $cvsfile )
|
||||
{
|
||||
print STDERR "$cvsfile has disappeared\n";
|
||||
undef $cvsfile;
|
||||
}
|
||||
}
|
||||
unless (defined ($cvsfile))
|
||||
{
|
||||
# make sure that MacPerl is a front process
|
||||
ActivateApplication('McPL');
|
||||
MacPerl::Answer("Could not find your MacCVS session file. Please choose one", "OK");
|
||||
|
||||
# prompt user for the file name, and store it
|
||||
my $macFile = StandardGetFile( 0, "McvD");
|
||||
if ( $macFile->sfGood() )
|
||||
{
|
||||
$cvsfile = $macFile->sfFile();
|
||||
# save the choice if we can
|
||||
if ( open (SESSIONFILE, ">" . $sessionStorage))
|
||||
{
|
||||
printf SESSIONFILE $cvsfile, "\n";
|
||||
close SESSIONFILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "Could not open storage file $sessionStorage for saving $cvsfile\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $cvsfile;
|
||||
}
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# BuildIDLProject
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildIDLProject($$)
|
||||
{
|
||||
my ($project_path, $module_name) = @_;
|
||||
|
||||
if ($main::CLOBBER_IDL_PROJECTS)
|
||||
{
|
||||
my (@suffix_list) = (".mcp", ".xml");
|
||||
my ($project_name, $project_dir, $suffix) = fileparse($project_path, @suffix_list);
|
||||
if ($suffix eq "") { die "Error: Project, $project_path must end in .xml or .mcp\n"; }
|
||||
|
||||
my($datafolder_path);
|
||||
if ($suffix eq ".xml")
|
||||
{
|
||||
$datafolder_path = $project_dir . "_" . $project_name . " Data:";
|
||||
}
|
||||
else {
|
||||
$datafolder_path = $project_dir . $project_name . " Data:";
|
||||
}
|
||||
|
||||
print STDERR "Deleting IDL data folder: $datafolder_path\n";
|
||||
EmptyTree($datafolder_path);
|
||||
}
|
||||
|
||||
BuildOneProject($project_path, "headers", 0, 0, 0);
|
||||
BuildOneProject($project_path, $module_name.".xpt", 1, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# CreateStaticLibTargets
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
sub CreateXMLStaticLibTargets($)
|
||||
{
|
||||
my($xml_path) = @_;
|
||||
|
||||
my (@suffix_list) = (".xml");
|
||||
my ($project_name, $project_dir, $suffix) = fileparse($xml_path, @suffix_list);
|
||||
if ($suffix eq "") { die "XML munging: $xml_path must end in .xml\n"; }
|
||||
|
||||
#sniff the file to see if we need to fix up broken Pro5-exported XML
|
||||
print "Parsing $xml_path\n";
|
||||
|
||||
my $ide_version = Moz::ProjectXML::SniffProjectXMLIDEVersion($xml_path);
|
||||
if ($ide_version eq "4.0")
|
||||
{
|
||||
my $new_file = $project_dir.$project_name."2.xml";
|
||||
|
||||
print "Cleaning up Pro 5 xml to $new_file\n";
|
||||
|
||||
Moz::ProjectXML::CleanupPro5XML($xml_path, $new_file);
|
||||
|
||||
unlink $xml_path;
|
||||
rename ($new_file, $xml_path);
|
||||
}
|
||||
|
||||
my $doc = Moz::ProjectXML::ParseXMLDocument($xml_path);
|
||||
my @target_list = Moz::ProjectXML::GetTargetsList($doc);
|
||||
my $target;
|
||||
|
||||
my %target_hash; # for easy lookups below
|
||||
foreach $target (@target_list) { $target_hash{$target} = 1; }
|
||||
|
||||
foreach $target (@target_list)
|
||||
{
|
||||
if ($target =~ /(.+).shlb$/) # if this is a shared lib target
|
||||
{
|
||||
my $target_base = $1;
|
||||
my $static_target = $target_base.".o";
|
||||
|
||||
# ensure that this does not exist already
|
||||
if ($target_hash{$static_target}) {
|
||||
print "Static target $static_target already exists in project. Not making\n";
|
||||
next;
|
||||
}
|
||||
|
||||
print "Making static target '$static_target' from target '$target'\n";
|
||||
|
||||
Moz::ProjectXML::CloneTarget($doc, $target, $static_target);
|
||||
Moz::ProjectXML::SetAsStaticLibraryTarget($doc, $static_target, $static_target);
|
||||
}
|
||||
}
|
||||
|
||||
print "Writing XML file to $xml_path\n";
|
||||
my $temp_path = $project_dir."_".$project_name.".xml";
|
||||
Moz::ProjectXML::WriteXMLDocument($doc, $temp_path, $ide_version);
|
||||
Moz::ProjectXML::DisposeXMLDocument($doc);
|
||||
|
||||
if (-e $temp_path)
|
||||
{
|
||||
unlink $xml_path;
|
||||
rename ($temp_path, $xml_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Error: Failed to add new targets to XML project\n";
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ProcessProjectXML
|
||||
#//
|
||||
#// Helper routine to allow for XML pre-processing. This should read in the XML, process it,
|
||||
#// and replace the original file with the processed version.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ProcessProjectXML($)
|
||||
{
|
||||
my($xml_path) = @_;
|
||||
|
||||
# we need to manually load Moz::ProjectXML, becaues not everyone will have the
|
||||
# required perl modules in their distro.
|
||||
my($cur_dir) = cwd();
|
||||
|
||||
chdir(dirname($0)); # change to the script dir
|
||||
eval "require Moz::ProjectXML";
|
||||
if ($@) { die "Error: could not do Project XML munging because you do not have the correct XML modules installed. Error is:\n################\n $@################"; }
|
||||
|
||||
chdir($cur_dir);
|
||||
|
||||
CreateXMLStaticLibTargets($xml_path);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Build one project, and make the alias. Parameters are project path, target name, shared library
|
||||
#// name, make shlb alias (boolean), make xSYM alias (boolean), and is component (boolean).
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildOneProjectWithOutput($$$$$$)
|
||||
{
|
||||
my ($project_path, $target_name, $output_name, $alias_lib, $alias_xSYM, $component) = @_;
|
||||
|
||||
unless ($project_path =~ m/^$main::BUILD_ROOT.+/) { return; }
|
||||
|
||||
my (@suffix_list) = (".mcp", ".xml");
|
||||
my ($project_name, $project_dir, $suffix) = fileparse($project_path, @suffix_list);
|
||||
if ($suffix eq "") { die "Error: Project, $project_path must end in .xml or .mcp\n"; }
|
||||
|
||||
my($dist_dir) = GetBinDirectory();
|
||||
|
||||
# Put libraries in "Essential Files" folder, Components in "Components" folder
|
||||
my($output_dir) = $component ? "Components:" : "Essential Files:";
|
||||
my($output_path) = $dist_dir.$output_dir;
|
||||
|
||||
if ($main::options{static_build})
|
||||
{
|
||||
if ($output_name =~ /\.o$/ || $output_name =~ /\.[Ll]ib$/)
|
||||
{
|
||||
$alias_xSYM = 0;
|
||||
$alias_lib = 1;
|
||||
$output_path = $main::DEBUG ? ":mozilla:dist:static_libs_debug:" : ":mozilla:dist:static_libs:";
|
||||
}
|
||||
}
|
||||
|
||||
# if the flag is on to export projects to XML, export and munge them
|
||||
if ($main::EXPORT_PROJECTS && !($project_path =~ /IDL\.mcp$/))
|
||||
{
|
||||
my $xml_out_path = $project_path;
|
||||
|
||||
$xml_out_path =~ s/\.mcp$/\.xml/;
|
||||
|
||||
# only do this if project is newer?
|
||||
if (! -e $xml_out_path)
|
||||
{
|
||||
ExportProjectToXML(full_path_to($project_path), full_path_to($xml_out_path));
|
||||
ProcessProjectXML($xml_out_path);
|
||||
}
|
||||
}
|
||||
|
||||
# if the flag is set to use XML projects, default to XML if the file
|
||||
# is present.
|
||||
if ($main::USE_XML_PROJECTS && !($project_path =~ /IDL\.mcp$/))
|
||||
{
|
||||
my $xml_project_path = $project_dir.$project_name.".xml";
|
||||
if (-e $xml_project_path)
|
||||
{
|
||||
$project_path = $xml_project_path;
|
||||
$suffix = ".xml";
|
||||
}
|
||||
}
|
||||
|
||||
if ($suffix eq ".xml")
|
||||
{
|
||||
my($xml_path) = $project_path;
|
||||
# Prepend an "_" onto the name of the generated project file so it doesn't conflict
|
||||
$project_path = $project_dir . "_" . $project_name . ".mcp";
|
||||
my($project_modtime) = (-e $project_path ? GetFileModDate($project_path) : 0);
|
||||
my($xml_modtime) = (-e $xml_path ? GetFileModDate($xml_path) : 0);
|
||||
|
||||
if ($xml_modtime > $project_modtime)
|
||||
{
|
||||
print("Importing $project_path from $project_name.xml.\n");
|
||||
unlink($project_path);
|
||||
# Might want to delete the "xxx.mcp Data" dir ???
|
||||
ImportXMLProject(full_path_to($xml_path), full_path_to($project_path));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($main::CLOBBER_LIBS)
|
||||
{
|
||||
unlink "$project_dir$output_name"; # it's OK if these fail
|
||||
unlink "$project_dir$output_name.xSYM";
|
||||
}
|
||||
|
||||
DoBuildProject($project_path, $target_name, $main::CLOBBER_PROJECTS);
|
||||
|
||||
$alias_lib ? MakeAlias("$project_dir$output_name", "$output_path") : 0;
|
||||
$alias_xSYM ? MakeAlias("$project_dir$output_name.xSYM", "$output_path") : 0;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// For compatiblity with existing scripts, BuildOneProject now just calls
|
||||
#// BuildOneProjectWithOutput, with the output name and target name identical.
|
||||
#// Note that this routine assumes that the target name and the shared libary name
|
||||
#// are the same.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildOneProject($$$$$)
|
||||
{
|
||||
my ($project_path, $target_name, $alias_lib, $alias_xSYM, $component) = @_;
|
||||
|
||||
BuildOneProjectWithOutput($project_path, $target_name, $target_name,
|
||||
$alias_lib, $alias_xSYM, $component);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// For compatiblity with existing scripts, BuildProject now just calls
|
||||
#// BuildOneProjectWithOutput, with the output name and target name identical.
|
||||
#// Note that this routine assumes that the target name and the shared libary name
|
||||
#// are the same. No aliases of the output are made.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildProject($$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
|
||||
BuildOneProjectWithOutput($project_path, $target_name, $target_name, 0, 0, 0);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Identical to BuildProject but clobbers the project before building it.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildProjectClean($$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
my ($save_clobber_flag) = $main::CLOBBER_PROJECTS;
|
||||
$main::CLOBBER_PROJECTS = 1;
|
||||
BuildOneProjectWithOutput($project_path, $target_name, $target_name, 0, 0, 0);
|
||||
$main::CLOBBER_PROJECTS = $save_clobber_flag;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Make resource aliases for one directory
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub BuildFolderResourceAliases($$)
|
||||
{
|
||||
my($src_dir, $dest_dir) = @_;
|
||||
|
||||
# get a list of all the resource files
|
||||
opendir(SRCDIR, $src_dir) || die("can't open $src_dir");
|
||||
my(@resource_files) = readdir(SRCDIR);
|
||||
closedir(SRCDIR);
|
||||
|
||||
# make aliases for each one into the dest directory
|
||||
print("Placing aliases to all files from $src_dir in $dest_dir\n");
|
||||
for ( @resource_files )
|
||||
{
|
||||
next if $_ eq "CVS";
|
||||
#print(" Doing $_\n");
|
||||
if (-l $src_dir.$_)
|
||||
{
|
||||
print(" $_ is an alias\n");
|
||||
next;
|
||||
}
|
||||
my($file_name) = $src_dir . $_;
|
||||
MakeAlias($file_name, $dest_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// DelayFor
|
||||
#//
|
||||
#// Delay for the given number of seconds, allowing the script to be cancelled
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub DelayFor($)
|
||||
{
|
||||
my($delay_secs) = @_;
|
||||
|
||||
STDOUT->autoflush(1);
|
||||
|
||||
my($end_time) = time() + $delay_secs;
|
||||
|
||||
my($last_time) = 0;
|
||||
my($cur_time) = time();
|
||||
|
||||
while ($cur_time < $end_time)
|
||||
{
|
||||
$cur_time = time();
|
||||
if ($cur_time > $last_time)
|
||||
{
|
||||
print ".";
|
||||
$last_time = $cur_time;
|
||||
}
|
||||
|
||||
WaitNextEvent();
|
||||
}
|
||||
|
||||
print "\n";
|
||||
STDOUT->autoflush(0);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// TimeStart
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub TimeStart()
|
||||
{
|
||||
return time();
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// TimeEnd
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub TimeEnd($$)
|
||||
{
|
||||
use integer;
|
||||
|
||||
my($start_time, $operation_name) = @_;
|
||||
my($end_time) = time();
|
||||
|
||||
my($tot_sec) = $end_time - $start_time;
|
||||
|
||||
my($seconds) = $tot_sec;
|
||||
|
||||
my($hours) = $seconds / (60 * 60);
|
||||
$seconds -= $hours * (60 * 60);
|
||||
|
||||
my($minutes) = $seconds / 60;
|
||||
$seconds -= $minutes * 60;
|
||||
|
||||
print "$operation_name took $hours hours $minutes minutes and $seconds seconds\n";
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Remove all files from a tree, leaving directories intact (except "CVS").
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub EmptyTree($)
|
||||
{
|
||||
my ($root) = @_;
|
||||
#print "EmptyTree($root)\n";
|
||||
opendir(DIR, $root);
|
||||
my $sub;
|
||||
foreach $sub (readdir(DIR))
|
||||
{
|
||||
my $fullpathname = $root.$sub; # -f, -d only work on full paths
|
||||
|
||||
# Don't call empty tree for the alias of a directory.
|
||||
# -d returns true for the alias of a directory, false for a broken alias)
|
||||
|
||||
if (-d $fullpathname)
|
||||
{
|
||||
if (-l $fullpathname) # delete aliases
|
||||
{
|
||||
unlink $fullpathname;
|
||||
next;
|
||||
}
|
||||
EmptyTree($fullpathname.":");
|
||||
if ($sub eq "CVS")
|
||||
{
|
||||
#print "rmdir $fullpathname\n";
|
||||
rmdir $fullpathname;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unless (unlink $fullpathname) { die "Failed to delete $fullpathname\n"; }
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Recurse through a directory hierarchy, looking for MANIFEST files.
|
||||
#// Currently unused.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub ScanForManifestFiles($$$$)
|
||||
{
|
||||
my($dir, $theme_root, $theme_name, $dist_dir) = @_;
|
||||
|
||||
opendir(DIR, $dir) or die "Cannot open dir $dir\n";
|
||||
my @files = readdir(DIR);
|
||||
closedir DIR;
|
||||
|
||||
my $file;
|
||||
|
||||
foreach $file (@files)
|
||||
{
|
||||
my $filepath = $dir.":".$file;
|
||||
|
||||
if (-d $filepath)
|
||||
{
|
||||
# print "Looking for MANIFEST files in $filepath\n";
|
||||
ScanForManifestFiles($filepath, $theme_root, $theme_name, $dist_dir);
|
||||
}
|
||||
elsif ($file eq "MANIFEST")
|
||||
{
|
||||
# print "Doing manifest file $filepath\n";
|
||||
|
||||
# Get the dest path from the first line of the file
|
||||
|
||||
open(MANIFEST, $filepath) || die "Could not open file $file";
|
||||
# Read in the path if available
|
||||
my($dest_line) = <MANIFEST>;
|
||||
chomp $dest_line;
|
||||
close MANIFEST;
|
||||
|
||||
$dest_line =~ s|^#!dest[\t ]+|| || die "No destination line found in $filepath\n";
|
||||
|
||||
my($dest_path) = $dist_dir."chrome:skins:$theme_name:$dest_line";
|
||||
# print " Destination is $dest_path\n";
|
||||
|
||||
InstallResources($filepath, "$dest_path", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-----------------------------------------------
|
||||
# SetupBuildLog
|
||||
#-----------------------------------------------
|
||||
sub SetupBuildLog($$)
|
||||
{
|
||||
my($logfile_path, $timestamped_log) = @_;
|
||||
|
||||
my($logdir) = "";
|
||||
my($logfile) = $logfile_path;
|
||||
|
||||
if ($logfile_path =~ /(.+?:)([^:]+)$/) # ? for non-greedy match
|
||||
{
|
||||
$logdir = $1;
|
||||
$logfile = $2;
|
||||
|
||||
mkpath($logdir);
|
||||
}
|
||||
|
||||
if ($timestamped_log)
|
||||
{
|
||||
#Use time-stamped names so that you don't clobber your previous log file!
|
||||
my $now = localtime();
|
||||
while ($now =~ s@:@.@) {} # replace all colons by periods
|
||||
OpenErrorLog("${logdir}${now}");
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenErrorLog("${logdir}${logfile}");
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------
|
||||
# SetBuildNumber
|
||||
#-----------------------------------------------
|
||||
sub SetBuildNumber($$)
|
||||
{
|
||||
my($build_num_file, $files_to_touch) = @_;
|
||||
|
||||
# Make sure we add the config dir to search, to pick up mozBDate.pm
|
||||
# Need to do this dynamically, because this module can be used before
|
||||
# mozilla/config has been checked out.
|
||||
|
||||
my ($inc_path) = $0; # $0 is the path to the parent script
|
||||
$inc_path =~ s/:build:mac:build_scripts:.+$/:config/;
|
||||
push(@INC, $inc_path);
|
||||
|
||||
require mozBDate;
|
||||
|
||||
mozBDate::UpdateBuildNumber($build_num_file, $main::MOZILLA_OFFICIAL);
|
||||
|
||||
my($file);
|
||||
foreach $file (@$files_to_touch)
|
||||
{
|
||||
print "Writing build number to $file from ${file}.in\n";
|
||||
mozBDate::SubstituteBuildNumber($file, $build_num_file, "${file}.in");
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------
|
||||
# SetTimeBomb
|
||||
#-----------------------------------------------
|
||||
sub SetTimeBomb($$)
|
||||
{
|
||||
my ($warn_days, $bomb_days) = @_;
|
||||
|
||||
system("perl :mozilla:config:mac-set-timebomb.pl $warn_days $bomb_days");
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Regenerate a configuration header file if necessary
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub UpdateConfigHeader($)
|
||||
{
|
||||
my($config_path) = @_;
|
||||
|
||||
my($config, $oldconfig) = ("", "");
|
||||
my($define, $definevalue, $defines);
|
||||
my($k, $l,);
|
||||
|
||||
foreach $k (keys(%main::options))
|
||||
{
|
||||
if ($main::options{$k})
|
||||
{
|
||||
foreach $l (keys(%{$main::optiondefines{$k}}))
|
||||
{
|
||||
$my::defines{$l} = $main::optiondefines{$k}{$l};
|
||||
print "Setting up my::defines{$l}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $config_headerfile = current_directory().$config_path;
|
||||
if (-e $config_headerfile)
|
||||
{
|
||||
open(CONFIG_HEADER, "< $config_headerfile") || die "$config_headerfile: $!\n";
|
||||
my($line);
|
||||
while ($line = <CONFIG_HEADER>)
|
||||
{
|
||||
if ($line =~ m/#define\s+([^\s]*)\s+([^\s]*)\s*\n/)
|
||||
{
|
||||
$define = $1;
|
||||
$definevalue = $2;
|
||||
|
||||
#canonicalize so that whitespace changes are not significant
|
||||
my $canon_value = "#define " . $define . " " . $definevalue . "\n";
|
||||
$oldconfig .= $canon_value;
|
||||
|
||||
if (exists ($my::defines{$define}) and ($my::defines{$define} == $definevalue))
|
||||
{
|
||||
delete $my::defines{$define};
|
||||
$config .= $canon_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(CONFIG_HEADER);
|
||||
}
|
||||
|
||||
if (%my::defines)
|
||||
{
|
||||
foreach $k (keys(%my::defines))
|
||||
{
|
||||
$config .= "#define " . $k . " " . $my::defines{$k} . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $file_name = basename($config_headerfile);
|
||||
if (($config ne $oldconfig) || (!-e $config_headerfile))
|
||||
{
|
||||
printf("Writing new configuration header $file_name\n");
|
||||
open(CONFIG_HEADER, "> $config_headerfile") || die "$config_headerfile: $!\n";
|
||||
print(CONFIG_HEADER "/* This file is auto-generated based on build options. Do not edit. */\n");
|
||||
print CONFIG_HEADER ($config);
|
||||
close(CONFIG_HEADER);
|
||||
|
||||
MacPerl::SetFileInfo("CWIE", "TEXT", $config_headerfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Configuration header $file_name is up-to-date\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,660 +0,0 @@
|
||||
#!perl
|
||||
package Moz::CodeWarriorLib;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CodeWarriorLib - supply interface to CodeWarrior
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#!perl
|
||||
use CodeWarriorLib;
|
||||
CodeWarriorLib::activate();
|
||||
$had_errors = CodeWarriorLib::build_project(
|
||||
$project_path, $target_name, $recent_errors_file, $clean_build
|
||||
);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Replaces the AppleScript library I<CodeWarriorLib>.
|
||||
|
||||
=over 4
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use Mac::Types;
|
||||
use Mac::Events;
|
||||
use Mac::AppleEvents;
|
||||
use Mac::AppleEvents::Simple;
|
||||
use Mac::Processes;
|
||||
use Mac::MoreFiles;
|
||||
use Mac::StandardFile;
|
||||
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '1.02';
|
||||
|
||||
my($app) = 'CWIE';
|
||||
my($scriptDir) = cwd(); # could use $0 for this
|
||||
my($ide_loc_file) = "";
|
||||
|
||||
# 0 == don't switch CWIE to front app in do_event(), 1 == do switch
|
||||
# note: activate() still switches when called
|
||||
$Mac::AppleEvents::Simple::SWITCH = 0;
|
||||
# $Mac::AppleEvents::Simple::WARN = 1;
|
||||
|
||||
# supply your own path to the source here
|
||||
#_test('PowerPudgeIV:mozilla:mozilla:');
|
||||
|
||||
# If you want to understand the gobbldeygook that's used to build Apple Events,
|
||||
# you should start by reading the AEGizmos documentation.
|
||||
|
||||
=pod
|
||||
|
||||
=item _get_project($full_path)
|
||||
|
||||
A private routine returning a reference to the open project with the given name,
|
||||
or else the empty string (when that project is not open)
|
||||
|
||||
full_path is a string identifying the project to be built and is of the form,
|
||||
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
|
||||
|
||||
=cut
|
||||
|
||||
sub _get_project ($) {
|
||||
my(
|
||||
$full_path, $candidate_projects
|
||||
) = @_;
|
||||
$candidate_projects = _doc_named(basename($full_path, '*'));
|
||||
if ($candidate_projects) {
|
||||
my($cps) = _get_dobj($candidate_projects);
|
||||
my($num) = AECountItems($cps);
|
||||
if ($num) { # is a list
|
||||
foreach (1 .. AECountItems($cps)) {
|
||||
my($cp) = AEGetNthDesc($cps, $_);
|
||||
if (lc $full_path eq lc _full_path($cp)) {
|
||||
return($cp);
|
||||
}
|
||||
}
|
||||
} else { # is only one, not a list
|
||||
if (lc $full_path eq lc _full_path($cps)) {
|
||||
return($cps);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item build_project
|
||||
|
||||
Build a selected target of a project, saving any errors to a file, if supplied.
|
||||
|
||||
full_path is a string identifying the project to be built and is of the form,
|
||||
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
|
||||
|
||||
If target_name is the empty string, the current target of the selected project
|
||||
will be built, else, target_name should be a string matching a target name in
|
||||
the selected project.
|
||||
|
||||
If error_path is the empty string, errors will not be saved to a file,
|
||||
else, error_path should be the full path of a file to save error messages into.
|
||||
|
||||
=cut
|
||||
|
||||
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = 0; # If true we close then make. If false, make then close.
|
||||
my $last_project_built = "";
|
||||
my $last_project_was_closed = 0;
|
||||
|
||||
sub build_project ($;$$$) {
|
||||
my(
|
||||
$full_path, $target_name, $error_path,
|
||||
$remove_object, $p, $project_was_closed, $had_errors
|
||||
) = @_;
|
||||
_close_errors_window();
|
||||
|
||||
if ($CodeWarriorLib::CLOSE_PROJECTS_FIRST && ($last_project_built ne $full_path))
|
||||
{
|
||||
# If we're in "close first" mode, we don't close if the current project
|
||||
# is the same as the previous one.
|
||||
if ($last_project_was_closed) {
|
||||
$p = _get_project($last_project_built);
|
||||
_close($p);
|
||||
}
|
||||
$last_project_built = $full_path;
|
||||
$last_project_was_closed = 0; # now refers to the new project
|
||||
}
|
||||
$project_was_closed = 0;
|
||||
while (1) {
|
||||
$p = _get_project($full_path);
|
||||
if (!$p) {
|
||||
if ($project_was_closed) {
|
||||
print "### Error - request for project document failed after opening\n";
|
||||
die "### possibly CW Pro 4 bug: be sure to close your Find window\n";
|
||||
}
|
||||
$project_was_closed = 1;
|
||||
$last_project_was_closed = 1;
|
||||
_open_file($full_path);
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
$had_errors = 0;
|
||||
if ($target_name eq '') {
|
||||
if ($remove_object) {_remove_object($p)}
|
||||
_build($p);
|
||||
} else {
|
||||
if ($remove_object) {_remove_object($p, $target_name)}
|
||||
_build($p, $target_name);
|
||||
}
|
||||
|
||||
if ($error_path ne '') {
|
||||
_save_errors_window($error_path);
|
||||
}
|
||||
$had_errors = _close_errors_window();
|
||||
|
||||
if (!$CodeWarriorLib::CLOSE_PROJECTS_FIRST)
|
||||
{
|
||||
if ($project_was_closed) {
|
||||
$p = _get_project($full_path);
|
||||
_close($p);
|
||||
}
|
||||
}
|
||||
|
||||
return($had_errors);
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item appIsRunning()
|
||||
|
||||
=cut
|
||||
sub _appIsRunning($)
|
||||
{
|
||||
my ($appSignature) = @_;
|
||||
my ($psi);
|
||||
my ($found) = 0;
|
||||
my ($appPSN);
|
||||
|
||||
foreach $psi (values(%Process))
|
||||
{
|
||||
if ($psi->processSignature() eq $appSignature)
|
||||
{
|
||||
$appPSN = $psi->processNumber();
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
return $found;
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item appIsFrontmost()
|
||||
|
||||
=cut
|
||||
sub _appIsFrontmost($)
|
||||
{
|
||||
my ($appSignature) = @_;
|
||||
my ($psi);
|
||||
my ($found) = 0;
|
||||
my ($appPSN);
|
||||
|
||||
foreach $psi (values(%Process))
|
||||
{
|
||||
if ($psi->processSignature() eq $appSignature)
|
||||
{
|
||||
$appPSN = $psi->processNumber();
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
return (GetFrontProcess() == $appPSN);
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=item activate()
|
||||
|
||||
Launches CodeWarrior and brings it to the front.
|
||||
|
||||
Once found, path will be saved in $idepath_file for future reference.
|
||||
Edit or delete this file to change the location of the IDE. If app is
|
||||
moved, C<activate()> will prompt for a new location.
|
||||
|
||||
First looks for an open CodeWarrior app. Second, tries to open previously
|
||||
saved location in ':idepath.txt'. Third, tries to find it and allow user
|
||||
to choose it with Navigation Services (if present). Fourth, uses good old
|
||||
GUSI routines built-in to MacPerl for a Choose Directory dialog box.
|
||||
|
||||
=cut
|
||||
|
||||
sub activate ($) {
|
||||
|
||||
$ide_loc_file = $_[0]; # save in global
|
||||
|
||||
my($filepath, $appath, $psi) = ($ide_loc_file);
|
||||
|
||||
foreach $psi (values(%Process)) {
|
||||
if ($psi->processSignature() eq $app) {
|
||||
$appath = $psi->processAppSpec();
|
||||
_save_appath($filepath, $appath);
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$appath || !-x $appath) {
|
||||
$appath = _read_appath($filepath);
|
||||
}
|
||||
|
||||
if (!$appath || ! -x $appath)
|
||||
{
|
||||
# make sure that MacPerl is a front process
|
||||
#ActivateApplication('McPL');
|
||||
MacPerl::Answer("Please locate the CodeWarrior application.", "OK");
|
||||
|
||||
# prompt user for the file name, and store it
|
||||
my $macFile = StandardGetFile( 0, "APPL");
|
||||
if ( $macFile->sfGood() )
|
||||
{
|
||||
$appath = $macFile->sfFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Operation canceled\n";
|
||||
}
|
||||
|
||||
# if (eval {require Mac::Navigation}) {
|
||||
# my($options, $nav);
|
||||
# Mac::Navigation->import();
|
||||
# $options = NavGetDefaultDialogOptions();
|
||||
# $options->message('Where is CodeWarrior IDE?');
|
||||
# $options->windowTitle('Find CodeWarrior IDE');
|
||||
# $nav = NavChooseObject($Application{$app}, $options);
|
||||
# die "CodeWarrior IDE not found.\n" if (!$nav || !$nav->file(1));
|
||||
# $appath = $nav->file(1);
|
||||
# } else {
|
||||
# local(*D);
|
||||
# my $cwd = `pwd`;
|
||||
# $appath = _get_folder(
|
||||
# 'Where is the CW IDE folder?',
|
||||
# dirname($Application{$app})
|
||||
# );
|
||||
# die "CodeWarrior IDE not found.\n" if !$appath;
|
||||
# opendir(D, $appath) or die $!;
|
||||
# chdir($appath);
|
||||
# foreach my $file (sort readdir (D)) {
|
||||
# my(@app) = MacPerl::GetFileInfo($file);
|
||||
# if ($app[0] && $app[1] &&
|
||||
# $app[1] eq 'APPL' && $app[0] eq $app
|
||||
# ) {
|
||||
# $appath .= $file;
|
||||
# last;
|
||||
# }
|
||||
# }
|
||||
# chomp($cwd);
|
||||
# chdir($cwd);
|
||||
# }
|
||||
_save_appath($filepath, $appath);
|
||||
}
|
||||
|
||||
my($lp) = LaunchParam->new(
|
||||
launchAppSpec => $appath,
|
||||
launchControlFlags => launchContinue() + launchNoFileFlags()
|
||||
);
|
||||
|
||||
unless (LaunchApplication($lp)) {
|
||||
unlink($filepath);
|
||||
die $^E;
|
||||
}
|
||||
|
||||
# wait for CodeWarrior to show up in the list of processes
|
||||
while (!_appIsRunning('CWIE'))
|
||||
{
|
||||
WaitNextEvent();
|
||||
}
|
||||
|
||||
# wait for CodeWarrior to come to the front
|
||||
while (!_appIsFrontmost('CWIE'))
|
||||
{
|
||||
WaitNextEvent();
|
||||
}
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item getCodeWarriorPath()
|
||||
|
||||
Returns a file path relative to the CodeWarrior folder
|
||||
|
||||
=cut
|
||||
|
||||
sub getCodeWarriorPath($)
|
||||
{
|
||||
my($subfolder)=@_;
|
||||
|
||||
my($app_path) = _read_appath($ide_loc_file);
|
||||
if ($app_path eq "") { die "Error: Failed to get CodeWarrior IDE path\n"; }
|
||||
|
||||
my($codewarrior_root) = $app_path;
|
||||
$codewarrior_root =~ s/[^:]*$//;
|
||||
return ($codewarrior_root . $subfolder);
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=item getCodeWarriorIDEName()
|
||||
|
||||
Returns the name of the CodeWarrior application
|
||||
|
||||
=cut
|
||||
|
||||
sub getCodeWarriorIDEName()
|
||||
{
|
||||
my($subfolder)=@_;
|
||||
|
||||
my($app_path) = _read_appath($ide_loc_file);
|
||||
if ($app_path eq "") { die "Error: Failed to get CodeWarrior IDE path\n"; }
|
||||
|
||||
my(@codewarrior_path) = split(/:/, $app_path);
|
||||
return pop(@codewarrior_path);
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=item quit()
|
||||
|
||||
Quits CodeWarrior.
|
||||
|
||||
=cut
|
||||
|
||||
sub quit() {
|
||||
|
||||
$last_project_built = "";
|
||||
$last_project_was_closed = 0;
|
||||
|
||||
my($evt) = do_event(qw/aevt quit/, $app);
|
||||
}
|
||||
|
||||
|
||||
sub _build ($;$) {
|
||||
my($evt);
|
||||
if ($_[1]) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
|
||||
AEPrint($_[0]) . '}';
|
||||
$evt = do_event(qw/CWIE MAKE/, $app, $prm, $_[1]);
|
||||
} else {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
$evt = do_event(qw/CWIE MAKE/, $app, $prm);
|
||||
}
|
||||
}
|
||||
|
||||
sub _remove_object ($;$) {
|
||||
my($evt);
|
||||
if ($_[1]) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
|
||||
AEPrint($_[0]) . '}';
|
||||
$evt = do_event(qw/CWIE RMOB/, $app, $prm, $_[1]);
|
||||
} else {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
$evt = do_event(qw/CWIE RMOB/, $app, $prm);
|
||||
}
|
||||
}
|
||||
|
||||
sub _open_file ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(alis), " .
|
||||
q"seld:TEXT(@), from:'null'()}";
|
||||
|
||||
do_event(qw/aevt odoc/, $app, $prm, $_[0]);
|
||||
}
|
||||
|
||||
sub import_project ($$) {
|
||||
my($xml_file, $project_path) = @_;
|
||||
|
||||
my($prm) = "kocl:type(PRJD), rtyp:TEXT(@), data:TEXT(@), &subj:'null'()";
|
||||
|
||||
my($evt) = do_event(qw/core crel/, $app, $prm, $project_path, $xml_file);
|
||||
my($result) = _get_event_result($evt);
|
||||
|
||||
if ($result eq "") {
|
||||
_close(_get_project($project_path));
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub export_project ($$) {
|
||||
my($project_path, $xml_out_path) = @_;
|
||||
my($p, $project_was_closed);
|
||||
|
||||
$project_was_closed = 0;
|
||||
while (1) {
|
||||
$p = _get_project($project_path);
|
||||
if (!$p) {
|
||||
if ($project_was_closed) {
|
||||
print "### Error - request for project document failed after opening\n";
|
||||
die "### possibly CW bug: be sure to close your Find window\n";
|
||||
}
|
||||
$project_was_closed = 1;
|
||||
_open_file($project_path);
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# avoid problems with the Project Messages window
|
||||
_close_named_window("Project Messages");
|
||||
|
||||
my($prm) =
|
||||
q"'----':obj {form:indx, want:type(PRJD), " .
|
||||
q"seld:1, from:'null'()}, kfil:TEXT(@)";
|
||||
|
||||
my($evt) = do_event(qw/CWIE EXPT/, $app, $prm, $xml_out_path);
|
||||
|
||||
if ($project_was_closed) {
|
||||
$p = _get_project($project_path);
|
||||
_close($p);
|
||||
}
|
||||
|
||||
return _get_event_result($evt);
|
||||
}
|
||||
|
||||
sub _doc_named ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:test, want:type(docu), from:'null'(), " .
|
||||
q"seld:cmpd{relo:'= ', 'obj1':obj {form:prop, want:type" .
|
||||
q"(prop), seld:type(pnam), from:'exmn'()}, 'obj2':TEXT(@)}}";
|
||||
|
||||
my($evt) = do_event(qw/core getd/, $app, $prm, $_[0]);
|
||||
return($evt->{REPLY} eq 'aevt\ansr{}' ? undef : $evt);
|
||||
}
|
||||
|
||||
sub _full_path ($) {
|
||||
my($obj) = $_[0];
|
||||
my($prm) =
|
||||
q"'----':obj {form:prop, want:type(prop), seld:type(FILE), " .
|
||||
q"from:" . AEPrint($_[0]) . q"}, rtyp:type(TEXT)";
|
||||
my($evt) = do_event(qw/core getd/, $app, $prm);
|
||||
|
||||
return MacPerl::MakePath(
|
||||
MacUnpack('fss ', (
|
||||
AEGetParamDesc($evt->{REP}, keyDirectObject()))->data()->get()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
sub _save_errors_window ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(alis), seld:TEXT(@), from:'null'()}";
|
||||
do_event(qw/MMPR SvMs/, $app, $prm, $_[0]);
|
||||
}
|
||||
|
||||
|
||||
sub _close_errors_window () {
|
||||
return _close_named_window('Errors & Warnings');
|
||||
}
|
||||
|
||||
|
||||
sub _close_named_window ($) {
|
||||
my($window_name) = @_;
|
||||
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(cwin), " .
|
||||
q"seld:TEXT(@), from:'null'()}";
|
||||
|
||||
my($evt) = do_event(qw/core clos/, $app, $prm, $window_name);
|
||||
return($evt->{REPLY} eq 'aevt\ansr{}' ? 1 : 0);
|
||||
}
|
||||
|
||||
sub _close () {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
do_event(qw/core clos/, $app, $prm);
|
||||
}
|
||||
|
||||
sub _get_dobj ($) {
|
||||
return(AEGetParamDesc($_[0]->{REP}, keyDirectObject()));
|
||||
}
|
||||
|
||||
sub _get_folder ($$) {
|
||||
require 'GUSI.ph';
|
||||
my($prompt, $default) = @_;
|
||||
MacPerl::Choose(
|
||||
GUSI::AF_FILE(), 0, $prompt, '',
|
||||
GUSI::CHOOSE_DIR() + ($default ? &GUSI::CHOOSE_DEFAULT : 0),
|
||||
$default
|
||||
);
|
||||
}
|
||||
|
||||
sub _get_event_result ($)
|
||||
{
|
||||
my($evt) = @_;
|
||||
|
||||
my($result) = $evt->{ERROR};
|
||||
|
||||
if ( $result eq "" && $evt->{ERRNO} != 0 )
|
||||
{
|
||||
$result = "unknown error (".$evt->{ERRNO}.")";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
sub _save_appath ($$) {
|
||||
|
||||
my($cwd) = cwd(); # remember the current working dir
|
||||
chdir($scriptDir); # change dir to the script dir
|
||||
|
||||
local(*F);
|
||||
open(F, '>' . $_[0]) or die $!;
|
||||
print F $_[1];
|
||||
close(F);
|
||||
|
||||
chdir($cwd); # restore the cwd
|
||||
}
|
||||
|
||||
sub _read_appath ($) {
|
||||
|
||||
my($filepath) = @_;
|
||||
|
||||
my($cwd) = cwd(); # remember the current working dir
|
||||
chdir($scriptDir); # change dir to the script dir
|
||||
|
||||
if (! -e $filepath) {
|
||||
return "";
|
||||
}
|
||||
|
||||
local(*F);
|
||||
open(F, $filepath);
|
||||
my($appath) = <F>;
|
||||
close(F);
|
||||
|
||||
chdir($cwd); # restore the cwd
|
||||
return($appath);
|
||||
}
|
||||
|
||||
|
||||
sub _test ($) {
|
||||
activate($ide_loc_file);
|
||||
my($path) = $_[0];
|
||||
build_project(
|
||||
"${path}modules:xml:macbuild:XML.mcp", '',
|
||||
"${path}build:mac:Mozilla.BuildLog.part"
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=back
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
=over 4
|
||||
|
||||
=item v1.02, September 23, 1998
|
||||
|
||||
Made fixes in finding and saving location of CodeWarrior IDE.
|
||||
|
||||
=item v1.01, June 1, 1998
|
||||
|
||||
Made fixes to C<chdir()> in C<activate()>, made C<activate()> more robust
|
||||
in finding CodeWarrior IDE, added global variable to NOT switch to IDE
|
||||
for each sent event, a few other fixes.
|
||||
|
||||
=item v1.00, May 30, 1998
|
||||
|
||||
First shot
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Chris Nandor F<E<lt>pudge@pobox.comE<gt>>, and the author of the
|
||||
original I<CodeWarriorLib>, Scott Collins F<E<lt>scc@netscape.comE<gt>>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
BuildProject L<Moz>.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape 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/NPL/
|
||||
|
||||
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 Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
=cut
|
||||
@@ -1,573 +0,0 @@
|
||||
#!perl -w
|
||||
package Moz::Jar;
|
||||
|
||||
#
|
||||
# Module for creating jar files, either using a jar manifest, or
|
||||
# simply jarring up folders on disk.
|
||||
#
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
use Archive::Zip;
|
||||
use File::Path;
|
||||
|
||||
use Mac::Files;
|
||||
|
||||
use Moz::Moz;
|
||||
|
||||
use vars qw( @ISA @EXPORT );
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
CreateJarFileFromDirectory
|
||||
CreateJarFromManifest
|
||||
WriteOutJarFiles
|
||||
SanityCheckJarOptions
|
||||
);
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Add the contents of a directory to the zip file
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub _addDirToJar($$$$)
|
||||
{
|
||||
my($dir, $jar_root, $zip, $compress) = @_;
|
||||
|
||||
opendir(DIR, $dir) or die "Error: Cannot open dir $dir\n";
|
||||
my @files = readdir(DIR);
|
||||
closedir DIR;
|
||||
|
||||
my $unix_jar_root = $jar_root;
|
||||
$unix_jar_root =~ s|:|/|g; # colon to slash conversion
|
||||
|
||||
my $file;
|
||||
|
||||
foreach $file (@files)
|
||||
{
|
||||
my $filepath = $dir.":".$file;
|
||||
|
||||
if (-d $filepath)
|
||||
{
|
||||
print "Adding files to jar from $filepath\n";
|
||||
_addDirToJar($filepath, $jar_root, $zip, $compress);
|
||||
}
|
||||
else
|
||||
{
|
||||
my $member = Archive::Zip::Member->newFromFile($filepath);
|
||||
die "Error: Failed to create zip file member $filepath\n" unless $member;
|
||||
|
||||
my $unixName = $filepath;
|
||||
$unixName =~ s|:|/|g; # colon to slash conversion
|
||||
$unixName =~ s|^$unix_jar_root||; # relativise
|
||||
|
||||
$member->fileName($unixName);
|
||||
|
||||
# print "Adding $file as $unixName\n";
|
||||
|
||||
if ($compress) {
|
||||
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
|
||||
} else {
|
||||
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
|
||||
}
|
||||
|
||||
$zip->addMember($member);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Add the contents of a directory to the zip file
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub CreateJarFileFromDirectory($$$)
|
||||
{
|
||||
my($srcdir, $jarpath, $compress) = @_;
|
||||
|
||||
my $zip = Archive::Zip->new();
|
||||
|
||||
_addDirToJar($srcdir, $srcdir, $zip, $compress);
|
||||
|
||||
print "Saving zip file...\n";
|
||||
my $status = $zip->writeToFileNamed($jarpath);
|
||||
if ($status == 0) {
|
||||
print "Zipping completed successfully\n";
|
||||
} else {
|
||||
print "Error saving zip file\n";
|
||||
}
|
||||
|
||||
# set the file type/creator to something reasonable
|
||||
MacPerl::SetFileInfo("ZIP ", "ZIP ", $jarpath);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# printZipContents
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub printZipContents($)
|
||||
{
|
||||
my($zip) = @_;
|
||||
|
||||
my(@members) = $zip->memberNames();
|
||||
|
||||
print "Zip contains:\n";
|
||||
|
||||
my($member);
|
||||
foreach $member (@members)
|
||||
{
|
||||
print " $member\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# safeSaveJarFile
|
||||
#
|
||||
# Archive::Zip has a problem where you cannot save a zip file on top of
|
||||
# an existing zip file that it has open, because it holds references
|
||||
# into that zip. So we have to save to a temp file, then do a swap.
|
||||
#
|
||||
# Note that the zip will become invalid after this operation.
|
||||
# If you want to do further operations on it, you'll have to reread it.
|
||||
#-------------------------------------------------------------------------------
|
||||
sub safeSaveJarFile($$)
|
||||
{
|
||||
my($zip, $full_dest_path) = @_;
|
||||
|
||||
my($temp_file_name) = $full_dest_path."_temp";
|
||||
|
||||
($zip->writeToFileNamed($temp_file_name) == Archive::Zip::AZ_OK) || die "Error: died writing jar to temp file $temp_file_name\n";
|
||||
|
||||
unlink $full_dest_path;
|
||||
|
||||
(rename $temp_file_name, $full_dest_path) || die "Error: Failed to rename $temp_file_name\n";
|
||||
|
||||
MacPerl::SetFileInfo("ZIP ", "ZIP ", $full_dest_path);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# addToJarFile
|
||||
#
|
||||
# Add a file to a jar file
|
||||
#
|
||||
# Parameters:
|
||||
# 1. Jar ID. Unix path of jar file inside chrome.
|
||||
# 2. Abs path to jar.mn file (i.e. source) (mac breaks)
|
||||
# 3. File source, relative to jar.mn path (mac breaks)
|
||||
# 4. Abs path to the resulting .jar file (mac breaks)
|
||||
# 5. Relative file path within the jar (unix breaks)
|
||||
# 6. Reference to hash of jar files
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub addToJarFile($$$$$$$)
|
||||
{
|
||||
my($jar_id, $jar_man_dir, $file_src, $jar_path, $file_jar_path, $override, $jars) = @_;
|
||||
|
||||
# print "addToJarFile with:\n $jar_man_dir\n $file_src\n $jar_path\n $file_jar_path\n";
|
||||
|
||||
unless ($jar_path =~ m/(.+:)([^:]+)$/) { die "Error: Bad jar path $jar_path\n"; }
|
||||
|
||||
my($target_dir) = $1;
|
||||
my($jar_name) = $2;
|
||||
|
||||
$target_dir =~ s/[^:]+$//;
|
||||
|
||||
# print "¥ $target_dir $jar_name\n";
|
||||
|
||||
# find the source file
|
||||
my($src) = $jar_man_dir.":".$file_src;
|
||||
if ((!-e $src) && ($file_src =~ m/.+:([^:]+)$/)) # src does not exist. Fall back to looking for src in jar.mn dir
|
||||
{
|
||||
$file_src = $1;
|
||||
$src = $jar_man_dir.":".$file_src;
|
||||
|
||||
if (!-e $src) {
|
||||
die "Error: Can't find chrome file $src\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($main::options{chrome_jars})
|
||||
{
|
||||
my($zip) = $jars->{$jar_id};
|
||||
unless ($zip) { die "Error: Can't find Zip entry for $jar_id\n"; }
|
||||
|
||||
# print "Adding $file_src to jar file $jar_path at $file_jar_path\n";
|
||||
my($member) = Archive::Zip::Member->newFromFile($src);
|
||||
unless ($member) { die "Error: Failed to create zip file member $src\n"; }
|
||||
|
||||
$member->fileName($file_jar_path);
|
||||
|
||||
my($compress) = 1;
|
||||
if ($compress) {
|
||||
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
|
||||
$member->desiredCompressionLevel(Archive::Zip::COMPRESSION_LEVEL_DEFAULT); # defaults to 6
|
||||
} else {
|
||||
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
|
||||
}
|
||||
|
||||
my($old_member) = $zip->memberNamed($file_jar_path);
|
||||
|
||||
if ($override)
|
||||
{
|
||||
if ($old_member)
|
||||
{
|
||||
# print "Overriding $file_jar_path in jar file $jar_id\n";
|
||||
# need to compare mod dates or use the + here
|
||||
$zip->removeMember($old_member);
|
||||
}
|
||||
|
||||
$zip->addMember($member);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($old_member)
|
||||
{
|
||||
#compare dates here
|
||||
my($member_moddate) = $old_member->lastModTime();
|
||||
my($file_moddate) = GetFileModDate($src);
|
||||
|
||||
if ($file_moddate > $member_moddate)
|
||||
{
|
||||
print "Updating older file $file_jar_path in $jar_id\n";
|
||||
$zip->removeMember($old_member);
|
||||
$zip->addMember($member);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "File $file_jar_path in $jar_id is more recent. Not updating.\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$zip->addMember($member);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($main::options{chrome_files}) # we install raw files too
|
||||
{
|
||||
my($rel_path) = $file_jar_path;
|
||||
$rel_path =~ s|/|:|g; # slash to colons
|
||||
|
||||
my($dir_name) = $jar_name;
|
||||
$dir_name =~ s/\.jar$//;
|
||||
|
||||
my($dst) = $target_dir.$dir_name.":".$rel_path;
|
||||
|
||||
# print "Aliassing $src\n to\n$dst\n";
|
||||
if ($override)
|
||||
{
|
||||
unlink $dst;
|
||||
MakeAlias($src, $dst); # don't check errors, otherwise we fail on replacement
|
||||
}
|
||||
else
|
||||
{
|
||||
if (-e $dst)
|
||||
{
|
||||
#compare dates here
|
||||
my($dst_moddate) = GetFileModDate($dst);
|
||||
my($file_moddate) = GetFileModDate($src);
|
||||
|
||||
if ($file_moddate > $dst_moddate)
|
||||
{
|
||||
print "Updating older file $rel_path in $dir_name\n";
|
||||
unlink $dst;
|
||||
MakeAlias($src, $dst);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "File $file_jar_path in $jar_id is more recent. Not updating.\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MakeAlias($src, $dst);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# setupJarFile
|
||||
#
|
||||
# setup a zip for writing
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub setupJarFile($$$)
|
||||
{
|
||||
my($jar_id, $dest_path, $jar_hash) = @_;
|
||||
|
||||
# print "Creating jar file $jar_id at $jar_path\n";
|
||||
|
||||
my($jar_file) = $jar_id;
|
||||
$jar_file =~ s|/|:|g; # slash to colons
|
||||
my($full_jar_path) = full_path_to($dest_path.":".$jar_file);
|
||||
|
||||
if ($main::options{chrome_jars})
|
||||
{
|
||||
my($zip) = $jar_hash->{$jar_id};
|
||||
if (!$zip) # if we haven't made it already, do so
|
||||
{
|
||||
my($zip) = Archive::Zip->new();
|
||||
$jar_hash->{$jar_id} = $zip;
|
||||
|
||||
# does the jar file exist already? If so, read it in
|
||||
if (-e $full_jar_path)
|
||||
{
|
||||
print "Reading in jar file $jar_id\n";
|
||||
if ($zip->read($full_jar_path) != Archive::Zip::AZ_OK) { die "Error: Failed to re-read $full_jar_path\n"; }
|
||||
|
||||
# printZipContents($zip);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# installing files.
|
||||
# nothing to do. MakeAlias creates dirs as needed.
|
||||
|
||||
# add this jar to the list
|
||||
$jar_hash->{$jar_id} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# closeJarFile
|
||||
#
|
||||
# We're done with this jar file _for this jar.mn_. We may add more entries
|
||||
# to it later, so keep it open in the hash.
|
||||
#-------------------------------------------------------------------------------
|
||||
sub closeJarFile($$)
|
||||
{
|
||||
my($jar_path, $jar_hash) = @_;
|
||||
|
||||
# print "Closing jar file $jar_path\n";
|
||||
|
||||
if ($main::options{chrome_jars})
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
# installing files.
|
||||
# nothing to do
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# WriteOutJarFiles
|
||||
#
|
||||
# Now we dump out the jars
|
||||
#-------------------------------------------------------------------------------
|
||||
sub WriteOutJarFiles($$)
|
||||
{
|
||||
my($chrome_dir, $jars) = @_;
|
||||
|
||||
unless ($main::options{chrome_jars}) { return; }
|
||||
|
||||
my($full_chrome_path) = full_path_to($chrome_dir);
|
||||
|
||||
my($key);
|
||||
foreach $key (keys %$jars)
|
||||
{
|
||||
my($zip) = $jars->{$key};
|
||||
|
||||
my($rel_path) = $key;
|
||||
$rel_path =~ s/\//:/g;
|
||||
|
||||
my($output_path) = $full_chrome_path.":".$rel_path;
|
||||
|
||||
print "Writing zip file $key to $output_path\n";
|
||||
|
||||
# ensure the target dirs exist
|
||||
my($path) = $output_path;
|
||||
$path =~ s/[^:]+$//;
|
||||
mkpath($path);
|
||||
|
||||
# unlink $output_path; # remove any existing jar
|
||||
safeSaveJarFile($zip, $output_path);
|
||||
# $zip is invalid after this operation, so nuke it here
|
||||
$jars->{$key} = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# registerChromePackage
|
||||
#
|
||||
# Enter a chrome package into the installed-chrome.txt file
|
||||
#-------------------------------------------------------------------------------
|
||||
sub registerChromePackage($$$$$$)
|
||||
{
|
||||
my($jar_file, $file_path, $chrome_dir, $jar_hash, $chrome_type, $pkg_name) = @_;
|
||||
|
||||
my($manifest_subdir) = $jar_file;
|
||||
$manifest_subdir =~ s/:/\//g;
|
||||
|
||||
my($chrome_entry);
|
||||
|
||||
if ($main::options{use_jars}) {
|
||||
$chrome_entry = "$chrome_type,install,url,jar:resource:/chrome/$manifest_subdir!/$chrome_type/$pkg_name";
|
||||
} else {
|
||||
$manifest_subdir =~ s/\.jar$//;
|
||||
$chrome_entry = "$chrome_type,install,url,resource:/chrome/$manifest_subdir/$chrome_type/$pkg_name";
|
||||
}
|
||||
|
||||
# print "Entering $chrome_entry in installed-chrome.txt\n";
|
||||
|
||||
# ensure chrome_dir exists
|
||||
mkpath($chrome_dir);
|
||||
|
||||
my($inst_chrome) = ${chrome_dir}.":installed-chrome.txt";
|
||||
|
||||
if (open(CHROMEFILE, "<$inst_chrome")) {
|
||||
while (<CHROMEFILE>) {
|
||||
chomp;
|
||||
if ($_ eq $chrome_entry) {
|
||||
# $chrome_entry already appears in installed-chrome.txt file
|
||||
# just update the mod date
|
||||
my $now = time;
|
||||
utime($now, $now, $inst_chrome) || die "Error: Couldn't touch $inst_chrome";
|
||||
print "+++ updating chrome $inst_chrome\n+++\t\t$chrome_entry\n";
|
||||
close(CHROMEFILE) || die "Error: can't close $inst_chrome: $!";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
close(CHROMEFILE) || die "Error: can't close $inst_chrome: $!";
|
||||
}
|
||||
open(CHROMEFILE, ">>${inst_chrome}") || die "Error: Failed to open $inst_chrome\n";
|
||||
print(CHROMEFILE "${chrome_entry}\n");
|
||||
close(CHROMEFILE) || die "Error: Failed to close $inst_chrome\n";
|
||||
print "+++ adding chrome $inst_chrome\n+++\t\t$chrome_entry\n";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Create or add to a jar file from a jar.mn file.
|
||||
# Both arguments are relative to the mozilla root dir.
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub CreateJarFromManifest($$$)
|
||||
{
|
||||
my($jar_man_path, $dest_path, $jars) = @_;
|
||||
|
||||
if ($main::options{chrome_jars}) {
|
||||
print "Jarring from $jar_man_path\n";
|
||||
}
|
||||
if ($main::options{chrome_files}) {
|
||||
print "Installing files from $jar_man_path\n";
|
||||
}
|
||||
|
||||
$jar_man_path = full_path_to($jar_man_path);
|
||||
$dest_path = full_path_to($dest_path);
|
||||
|
||||
# if the jars hash is empty, nuke installed-chrome.txt
|
||||
if (! scalar(%$jars))
|
||||
{
|
||||
print "Nuking installed-chrome.txt\n";
|
||||
my($installed_chrome) = $dest_path.":installed-chrome.txt";
|
||||
# unlink $installed_chrome;
|
||||
}
|
||||
|
||||
my $jar_man_dir = "";
|
||||
my $jar_man_file = "";
|
||||
|
||||
if ($jar_man_path =~ /(.+):([^:]+)$/)
|
||||
{
|
||||
$jar_man_dir = $1; # no trailing :
|
||||
$jar_man_file = $2;
|
||||
}
|
||||
|
||||
# Keep a hash of jar files, keyed on relative jar path (e.g. "packages/core.jar")
|
||||
# Entries are open Archive::Zips (if zipping), and installed-chrome entries.
|
||||
|
||||
my($jar_id) = ""; # Current foo/bar.jar from jar.mn file
|
||||
my($jar_file) = ""; # relative path to jar file (from $dest_path), with mac separators
|
||||
my($full_jar_path);
|
||||
|
||||
open(FILE, "<$jar_man_path") || die "Error: could not open \"$jar_man_path\": $!";
|
||||
while (<FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
# print "$line\n";
|
||||
|
||||
if ($line =~ /^\s*\#.*$/) { # skip comments
|
||||
next;
|
||||
}
|
||||
|
||||
if ($line =~/^([\w\d.\-\_\\\/]+)\:\s*$/) # line start jar file entries
|
||||
{
|
||||
$jar_id = $1;
|
||||
$jar_file = $jar_id;
|
||||
$jar_file =~ s|/|:|g; # slash to colons
|
||||
$full_jar_path = $dest_path.":".$jar_file;
|
||||
|
||||
setupJarFile($jar_id, $dest_path, $jars);
|
||||
|
||||
}
|
||||
elsif ($line =~ /^(\+?)\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) # jar file entry
|
||||
{
|
||||
my($override) = ($1 eq "+");
|
||||
my($file_dest) = $2;
|
||||
my($file_src) = $3;
|
||||
|
||||
if ($file_src) {
|
||||
$file_src = substr($file_src, 1, -1); #strip the ()
|
||||
} else {
|
||||
$file_src = $file_dest;
|
||||
}
|
||||
|
||||
$file_src =~ s|/|:|g;
|
||||
|
||||
if ($jar_file ne "") # if jar is open, add to jar
|
||||
{
|
||||
if ($file_dest =~ /([\w\d.\-\_]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
|
||||
{
|
||||
my $chrome_type = $1;
|
||||
my $pkg_name = $2;
|
||||
registerChromePackage($jar_file, $file_dest, $dest_path, $jars, $chrome_type, $pkg_name);
|
||||
}
|
||||
|
||||
addToJarFile($jar_id, $jar_man_dir, $file_src, $full_jar_path, $file_dest, $override, $jars);
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Error: bad jar.mn format at $line\n";
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /^\s*$/ ) # blank line
|
||||
{
|
||||
if ($jar_file ne "") #if a jar file is open, close it
|
||||
{
|
||||
closeJarFile($full_jar_path, $jars);
|
||||
|
||||
$jar_file = "";
|
||||
$full_jar_path = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close(FILE);
|
||||
|
||||
if ($jar_file ne "") #if a jar file is open, close it
|
||||
{
|
||||
closeJarFile($full_jar_path, $jars);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -1,228 +0,0 @@
|
||||
#!perl -w
|
||||
package Moz::MacCVS;
|
||||
|
||||
# package Mac::Apps::MacCVS; this should really be the name of the package
|
||||
# but due to our directory hierarchy in mozilla, I am not doing it
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT);
|
||||
|
||||
use Cwd;
|
||||
|
||||
use File::Basename;
|
||||
|
||||
use Mac::StandardFile;
|
||||
use Mac::AppleEvents;
|
||||
use Mac::AppleEvents::Simple;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(new describe checkout update);
|
||||
$VERSION = "1.00";
|
||||
|
||||
# If you want to understand the gobbldeygook that's used to build Apple Events,
|
||||
# you should start by reading the AEGizmos documentation.
|
||||
|
||||
|
||||
# Architecture:
|
||||
# cvs session object:
|
||||
# name - session name
|
||||
# session_file - session file
|
||||
#
|
||||
#
|
||||
|
||||
my($last_error) = 0;
|
||||
my($gAppSig) = 'Mcvs'; # MacCVS Pro
|
||||
|
||||
#
|
||||
# utility routines
|
||||
#
|
||||
|
||||
|
||||
sub _checkForEventError($)
|
||||
{
|
||||
my($evt) = @_;
|
||||
|
||||
if ($evt->{ERRNO} != 0)
|
||||
{
|
||||
print STDERR "Error. Script returned '$evt->{ERROR} (error $evt->{ERRNO})\n";
|
||||
$last_error = $evt->{ERRNO};
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1; # success
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Session object methods
|
||||
#
|
||||
|
||||
sub new
|
||||
{
|
||||
my ( $proto, $session_file) = @_;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
||||
if ( defined($session_file) && ( -e $session_file) )
|
||||
{
|
||||
$self->{"name"} = basename( $session_file );
|
||||
$self->{"session_file"} = $session_file;
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "MacCVS->new cvs file < $session_file > does not exist\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# makes sure that the session is open
|
||||
# assertSessionOpen()
|
||||
# returns 1 on success
|
||||
sub assertSessionOpen()
|
||||
{
|
||||
my ($self) = shift;
|
||||
|
||||
$last_error = 0;
|
||||
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(alis), seld:TEXT(@), from:'null'()}";
|
||||
|
||||
my($evt) = do_event(qw/aevt odoc/, $gAppSig, $prm, $self->{session_file});
|
||||
return _checkForEventError($evt);
|
||||
}
|
||||
|
||||
# prints the cvs object, used mostly for debugging
|
||||
sub describe
|
||||
{
|
||||
my($self) = shift;
|
||||
$last_error = 0;
|
||||
print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n";
|
||||
}
|
||||
|
||||
# checkout( self, module, revision, date)
|
||||
# MacCVS checkout command
|
||||
# returns 1 on success.
|
||||
sub checkout()
|
||||
{
|
||||
my($self, $module, $revision, $date ) = @_;
|
||||
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
|
||||
unless( defined ($revision) ) { $revision = ""; }
|
||||
unless( defined ($date) ) { $date = ""; }
|
||||
|
||||
$last_error = 0;
|
||||
|
||||
$self->assertSessionOpen() || die "Error: failed to open MacCVS session file at $self->{session_file}\n";
|
||||
|
||||
my($revstring) = ($revision ne "") ? $revision : "(none)";
|
||||
my($datestring) = ($date ne "") ? $date : "(none)";
|
||||
|
||||
print "Checking out $module with revision $revstring, date $datestring\n";
|
||||
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(docu), seld:TEXT(@), from:'null'()}, ".
|
||||
q"modl:'TEXT'(@), tagr:'TEXT'(@), tagd:'TEXT'(@) ";
|
||||
|
||||
my($evt) = do_event(qw/MCvs cout/, $gAppSig, $prm, $self->{name}, $module, $revision, $date);
|
||||
return _checkForEventError($evt);
|
||||
}
|
||||
|
||||
|
||||
# update( self, branch tag, list of paths)
|
||||
# MacCVS udate command
|
||||
# returns 1 on success.
|
||||
# NOTE: MacCVS Pro does not correctly support this stuff yet (as of version 2.7d5).
|
||||
sub update()
|
||||
{
|
||||
my($self, $branch, $paths ) = @_;
|
||||
|
||||
$last_error = 0;
|
||||
|
||||
$self->assertSessionOpen() || die "Error: failed to open MacCVS session file at $self->{session_file}\n";
|
||||
|
||||
if ($branch eq "HEAD") {
|
||||
$branch = "";
|
||||
}
|
||||
|
||||
my($paths_list) = "";
|
||||
|
||||
my($path);
|
||||
foreach $path (@$paths)
|
||||
{
|
||||
if ($paths_list ne "") {
|
||||
$paths_list = $paths_list.", ";
|
||||
}
|
||||
|
||||
$paths_list = $paths_list."Ò".$path."Ó";
|
||||
}
|
||||
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(docu), seld:TEXT(@), from:'null'()}, ".
|
||||
q"tagr:'TEXT'(@), tFls:[";
|
||||
|
||||
$prm = $prm.$paths_list."]";
|
||||
|
||||
my($evt) = do_event(qw/MCvs updt/, $gAppSig, $prm, $self->{name}, $branch);
|
||||
return _checkForEventError($evt);
|
||||
};
|
||||
|
||||
|
||||
sub getLastError()
|
||||
{
|
||||
return $last_error;
|
||||
}
|
||||
|
||||
1;
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MacCVS - Interface to MacCVS
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use MacCVS;
|
||||
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
|
||||
$session->checkout([module] [revision] [date]) || die "Could not check out";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a MacCVS interface for talking to MacCVS Pro client.
|
||||
MacCVSSession is the class used to manipulate the session
|
||||
|
||||
=item new
|
||||
MacCVS->new( <cvs session file path>);
|
||||
|
||||
Creates a new session. Returns undef on failure.
|
||||
|
||||
=item checkout( <module> [revision] [date] )
|
||||
|
||||
cvs checkout command. Revision and date are optional
|
||||
returns 0 on failure
|
||||
|
||||
=cut
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over
|
||||
|
||||
=item MacCVS Home Page
|
||||
|
||||
http://www.maccvs.org/
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Aleks Totic atotic@netscape.com
|
||||
Simon Fraser sfraser@netscape.com
|
||||
|
||||
=cut
|
||||
|
||||
__END__
|
||||
@@ -1,603 +0,0 @@
|
||||
=head1 NAME
|
||||
|
||||
B<Moz> - routines for automating CodeWarrior builds, and some extra-curricular
|
||||
activities related to building Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Moz;
|
||||
|
||||
OpenErrorLog(":::BuildLog");
|
||||
StopForErrors();
|
||||
|
||||
$Moz::QUIET = 1;
|
||||
InstallFromManifest(":projects:MANIFEST", $dist_dir);
|
||||
|
||||
BuildProjectClean(":projects:SomeProject.mcp", "SomeTarget");
|
||||
MakeAlias(":projects:SomeProject.shlb", $dist_dir);
|
||||
|
||||
DontStopForErrors();
|
||||
|
||||
BuildProject(":projects:SomeOtherProject.mcp", "SomeTarget");
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<Moz> comprises the routines needed to slap CodeWarrior around, force it
|
||||
to build a sequence of projects, report the results, and a few other things.
|
||||
This module should only contain functions that are generic to any build,
|
||||
not just the Mozilla build.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
package Moz::Moz;
|
||||
require Exporter;
|
||||
|
||||
use Cwd;
|
||||
|
||||
use File::Copy;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
|
||||
use Mac::Types;
|
||||
use Mac::Events;
|
||||
use Mac::Processes;
|
||||
|
||||
use ExtUtils::Manifest 'maniread';
|
||||
|
||||
use Moz::CodeWarriorLib;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
|
||||
@EXPORT = qw( LaunchCodeWarrior
|
||||
GetCodeWarriorRelativePath
|
||||
current_directory
|
||||
full_path_to
|
||||
DoBuildProject
|
||||
ImportXMLProject
|
||||
ExportProjectToXML
|
||||
OpenErrorLog
|
||||
MakeAlias
|
||||
GetFileModDate
|
||||
StopForErrors
|
||||
DontStopForErrors
|
||||
InstallFromManifest
|
||||
InstallResources
|
||||
RedirectOutputToFile
|
||||
Delay
|
||||
ActivateApplication
|
||||
IsProcessRunning);
|
||||
|
||||
@EXPORT_OK = qw(CloseErrorLog QUIET);
|
||||
|
||||
|
||||
sub current_directory()
|
||||
{
|
||||
my $current_directory = cwd();
|
||||
chop($current_directory) if ( $current_directory =~ m/:$/ );
|
||||
return $current_directory;
|
||||
}
|
||||
|
||||
sub full_path_to($)
|
||||
{
|
||||
my ($path) = @_;
|
||||
if ( $path =~ m/^[^:]+$/ )
|
||||
{
|
||||
$path = ":" . $path;
|
||||
}
|
||||
|
||||
if ( $path =~ m/^:/ )
|
||||
{
|
||||
$path = current_directory() . $path;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
$logging = 0;
|
||||
$recent_errors_file = "";
|
||||
$stop_on_1st_error = 1;
|
||||
$QUIET = 0;
|
||||
|
||||
|
||||
|
||||
=head2 Logging all the errors and warnings - C<OpenErrorLog($log_file)>, C<CloseErrorLog()>
|
||||
|
||||
The warnings and errors generated in the course of building projects can be logged to a file.
|
||||
Tinderbox uses this facility to show why a remote build failed.
|
||||
|
||||
Logging is off by default.
|
||||
Start logging at any point in your build process with C<OpenErrorLog($log_file)>.
|
||||
Stop with C<CloseErrorLog()>.
|
||||
You never need to close the log explicitly, unless you want to just log a couple of projects in the middle of a big list.
|
||||
C<CloseErrorLog()> is not exported by default.
|
||||
|
||||
=cut
|
||||
|
||||
sub CloseErrorLog()
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
close(ERROR_LOG);
|
||||
$logging = 0;
|
||||
StopForErrors() if $stop_on_1st_error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub OpenErrorLog($)
|
||||
{
|
||||
my ($log_file) = @_;
|
||||
|
||||
CloseErrorLog();
|
||||
if ( $log_file )
|
||||
{
|
||||
$log_file = full_path_to($log_file);
|
||||
|
||||
open(ERROR_LOG, ">$log_file") || die "Error: Can't open $log_file\n";
|
||||
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
|
||||
|
||||
$log_file =~ m/.+:(.+)/;
|
||||
$recent_errors_file = full_path_to("$1.part");
|
||||
$logging = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=head2 Stopping before it's too late - C<StopForErrors()>, C<DontStopForErrors()>
|
||||
|
||||
When building a long list of projects, you decide whether to continue building subsequent projects when one fails.
|
||||
By default, your build script will C<die> after the first project that generates an error while building.
|
||||
Change this behavior with C<DontStopForErrors()>.
|
||||
Re-enable it with C<StopForErrors()>.
|
||||
|
||||
=cut
|
||||
|
||||
sub StopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 1;
|
||||
|
||||
# Can't stop for errors unless we notice them.
|
||||
# Can't notice them unless we are logging.
|
||||
# If the user didn't explicitly request logging, log to a temporary file.
|
||||
|
||||
if ( ! $recent_errors_file )
|
||||
{
|
||||
OpenErrorLog("${TMPDIR}BuildResults");
|
||||
}
|
||||
}
|
||||
|
||||
sub DontStopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 0;
|
||||
}
|
||||
|
||||
sub log_message($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
print ERROR_LOG $message;
|
||||
}
|
||||
}
|
||||
|
||||
sub log_message_with_time($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
my $time_stamp = localtime();
|
||||
log_message("$message ($time_stamp)\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub log_recent_errors($)
|
||||
{
|
||||
my ($project_name) = @_;
|
||||
my $found_errors = 0;
|
||||
|
||||
if ( $logging )
|
||||
{
|
||||
open(RECENT_ERRORS, "<$recent_errors_file");
|
||||
|
||||
while( <RECENT_ERRORS> )
|
||||
{
|
||||
if ( /^Error/ || /^CouldnÕt find project file/ || /^Link Error/ )
|
||||
{
|
||||
# if (!$found_errors)
|
||||
# print $_;
|
||||
$found_errors = 1;
|
||||
}
|
||||
print ERROR_LOG $_;
|
||||
}
|
||||
|
||||
close(RECENT_ERRORS);
|
||||
unlink("$recent_errors_file");
|
||||
}
|
||||
|
||||
if ( $stop_on_1st_error && $found_errors )
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Errors encountered building \"$project_name\".\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub DoBuildProject($$$)
|
||||
{
|
||||
my ($project_path, $target_name, $clean_build) = @_;
|
||||
$project_path = full_path_to($project_path);
|
||||
|
||||
# $project_path =~ m/.+:(.+)/;
|
||||
# my $project_name = $1;
|
||||
|
||||
log_message_with_time("### Building \"$project_path\"");
|
||||
|
||||
# Check that the given project exists
|
||||
if (! -e $project_path)
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Can't find project file \"$project_path\".\n";
|
||||
}
|
||||
|
||||
print "Building \"$project_path\[$target_name\]\"\n";
|
||||
|
||||
$had_errors = Moz::CodeWarriorLib::build_project(
|
||||
$project_path, $target_name, $recent_errors_file, $clean_build
|
||||
);
|
||||
WaitNextEvent();
|
||||
|
||||
# $had_errors =
|
||||
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
# tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file", $clean_build)
|
||||
#END_OF_APPLESCRIPT
|
||||
|
||||
# Append any errors to the globally accumulated log file
|
||||
# if ( $had_errors ) # Removed this test, because we want warnings, too. -- jrm
|
||||
{
|
||||
log_recent_errors($project_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub ImportXMLProject($$)
|
||||
{
|
||||
my ($xml_path, $project_path) = @_;
|
||||
|
||||
# my ($codewarrior_ide_name) = Moz::CodeWarriorLib::getCodeWarriorIDEName();
|
||||
# my $ascript = <<EOS;
|
||||
# tell application "$codewarrior_ide_name"
|
||||
# make new (project document) as ("$project_path") with data ("$xml_path")
|
||||
# end tell
|
||||
#EOS
|
||||
# print $ascript."\n";
|
||||
# my($result) = MacPerl::DoAppleScript($ascript);
|
||||
# unless ($result) { die "Error: ImportXMLProject AppleScript failed $^E $result\n"; }
|
||||
#
|
||||
|
||||
my($import_error) = Moz::CodeWarriorLib::import_project($xml_path, $project_path);
|
||||
if ($import_error ne "") {
|
||||
die "Error: ImportXMLProject failed with error $import_error\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub ExportProjectToXML($$)
|
||||
{
|
||||
my ($project_path, $xml_path) = @_;
|
||||
|
||||
my (@suffix_list) = (".mcp");
|
||||
my ($project_name, $project_dir, $suffix) = fileparse($project_path, @suffix_list);
|
||||
if ($suffix eq "") { die "Project: $project_path doesn't look like a project file.\n"; }
|
||||
|
||||
if (-e $xml_path) {
|
||||
print "$xml_path exists - not exporting $project_path\n";
|
||||
}
|
||||
else {
|
||||
print "Exporting $project_path to $xml_path\n";
|
||||
my($export_error) = Moz::CodeWarriorLib::export_project($project_path, $xml_path);
|
||||
if ($export_error ne "") {
|
||||
die "Error: export_project failed with error '$export_error'\n";
|
||||
}
|
||||
|
||||
if (! -e $xml_path) {
|
||||
die "Error: XML export to $xml_path failed\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=head2 Miscellaneous
|
||||
|
||||
C<MakeAlias($old_file, $new_file)> functions like C<symlink()>, except with better argument defaulting and more explicit error messages.
|
||||
|
||||
=cut
|
||||
|
||||
sub MakeAlias($$)
|
||||
{
|
||||
my ($old_file, $new_file) = @_;
|
||||
|
||||
# if the directory to hold $new_file doesn't exist, create it
|
||||
if ( ($new_file =~ m/(.+:)/) && !-d $1 )
|
||||
{
|
||||
mkpath($1);
|
||||
}
|
||||
|
||||
# if a leaf name wasn't specified for $new_file, use the leaf from $old_file
|
||||
if ( ($new_file =~ m/:$/) && ($old_file =~ m/.+:(.+)/) )
|
||||
{
|
||||
$new_file .= $1;
|
||||
}
|
||||
|
||||
my $message = "Can't create a Finder alias (at \"$new_file\")\n for \"$old_file\"; because ";
|
||||
|
||||
die "Error: $message \"$old_file\" doesn't exist.\n" unless -e $old_file;
|
||||
die "Error: $message I won't replace an existing (non-alias) file with an alias.\n" if ( -e $new_file && ! -l $new_file );
|
||||
|
||||
# now: $old_file exists; $new_file doesn't (or else, is an alias already)
|
||||
|
||||
if ( -l $new_file )
|
||||
{
|
||||
# ...then see if it already points to $old_file
|
||||
my $current_target = full_path_to(readlink($new_file));
|
||||
my $new_target = full_path_to($old_file);
|
||||
|
||||
return if ( $current_target eq $new_target );
|
||||
# if the desired alias already exists and points to the right thing, then we're done
|
||||
|
||||
unlink $new_file;
|
||||
}
|
||||
|
||||
symlink($old_file, $new_file) || die "Error: $message symlink returned an unexpected error.\n";
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
C<InstallFromManifest()>
|
||||
|
||||
=cut
|
||||
|
||||
sub InstallFromManifest($;$$)
|
||||
{
|
||||
my ($manifest_file, $dest_dir, $flat) = @_;
|
||||
|
||||
$flat = 0 unless defined($flat); # if $flat, all rel. paths in MANIFEST get aliased to the root of $dest_dir
|
||||
|
||||
$dest_dir ||= ":";
|
||||
|
||||
$manifest_file =~ m/(.+):/;
|
||||
my $source_dir = $1;
|
||||
|
||||
chop($dest_dir) if $dest_dir =~ m/:$/;
|
||||
|
||||
#Mac::Events->import();
|
||||
WaitNextEvent();
|
||||
if ($flat)
|
||||
{
|
||||
print "Doing manifest on \"$manifest_file\" FLAT\n" unless $QUIET;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Doing manifest on \"$manifest_file\"\n" unless $QUIET;
|
||||
}
|
||||
|
||||
my $read = maniread(full_path_to($manifest_file));
|
||||
foreach $file (keys %$read)
|
||||
{
|
||||
next unless $file;
|
||||
|
||||
$subdir = ":";
|
||||
if (!$flat && ($file =~ /:.+:/ ))
|
||||
{
|
||||
$subdir = $&;
|
||||
}
|
||||
|
||||
$file = ":$file" unless $file =~ m/^:/;
|
||||
MakeAlias("$source_dir$file", "$dest_dir$subdir");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
C<InstallResources()>
|
||||
|
||||
=cut
|
||||
|
||||
# parameters are path to MANIFEST file, destination dir, true (to make copies) or false (to make aliases)
|
||||
sub InstallResources($;$;$)
|
||||
{
|
||||
my ($manifest_file, $dest_dir, $copy_files) = @_;
|
||||
|
||||
$dest_dir ||= ":";
|
||||
mkpath($dest_dir) if !-d $dest_dir;
|
||||
|
||||
$manifest_file =~ m/(.+):/;
|
||||
my $source_dir = $1;
|
||||
|
||||
chop($dest_dir) if $dest_dir =~ m/:$/;
|
||||
|
||||
WaitNextEvent();
|
||||
print "Installing resources from \"$manifest_file\"\n" unless $QUIET;
|
||||
|
||||
my $read = maniread(full_path_to($manifest_file));
|
||||
foreach $file (keys %$read)
|
||||
{
|
||||
next unless $file;
|
||||
|
||||
if ($copy_files)
|
||||
{
|
||||
copy("$source_dir:$file", "$dest_dir:$file");
|
||||
}
|
||||
else
|
||||
{
|
||||
MakeAlias("$source_dir:$file", "$dest_dir:$file");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// Delay
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub Delay($)
|
||||
{
|
||||
my ($delay_seconds) = @_;
|
||||
|
||||
$now = time;
|
||||
|
||||
$exit_time = $now + $delay_seconds;
|
||||
|
||||
while ($exit_time > $now) {
|
||||
$now = time;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetFileModDate
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetFileModDate($)
|
||||
{
|
||||
my($filePath)=@_;
|
||||
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
|
||||
return $mtime;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// LaunchCodeWarrior
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub LaunchCodeWarrior($)
|
||||
{
|
||||
my($idepath_file) = @_; # full path to IDE location file
|
||||
my($cur_dir) = cwd();
|
||||
|
||||
# this both launches and writes the IDE path file
|
||||
Moz::CodeWarriorLib::activate($idepath_file);
|
||||
|
||||
chdir($cur_dir);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetCodeWarriorRelativePath
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetCodeWarriorRelativePath($)
|
||||
{
|
||||
my($rel_path) = @_;
|
||||
return Moz::CodeWarriorLib::getCodeWarriorPath($rel_path);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// RedirectOutputToFile
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub RedirectOutputToFile($)
|
||||
{
|
||||
my($log_file) = @_;
|
||||
|
||||
# ensure that folders in the path exist
|
||||
my($logdir) = "";
|
||||
my($logfile) = $log_file;
|
||||
|
||||
if ($log_file =~ /(.+?:)([^:]+)$/) # ? for non-greedy match
|
||||
{
|
||||
$logdir = $1;
|
||||
$logfile = $2;
|
||||
|
||||
mkpath($logdir);
|
||||
}
|
||||
|
||||
print "Output is now being redirected to the file '$log_file'\n";
|
||||
|
||||
open(STDOUT, "> $log_file") || die "Can't redirect stdout";
|
||||
open(STDERR, ">&STDOUT") || die "Can't dup stdout";
|
||||
select(STDERR); $| = 1; # make unbuffered
|
||||
select(STDOUT); $| = 1; # make unbuffered
|
||||
|
||||
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ActivateApplication
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub ActivateApplication($)
|
||||
{
|
||||
my ($appSignature) = @_;
|
||||
my ($psi, $found);
|
||||
my ($appPSN);
|
||||
|
||||
$found = 0;
|
||||
|
||||
foreach $psi (values(%Process))
|
||||
{
|
||||
if ($psi->processSignature() eq $appSignature)
|
||||
{
|
||||
$appPSN = $psi->processNumber();
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found == 0 || SameProcess($appPSN, GetFrontProcess()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetFrontProcess($appPSN);
|
||||
|
||||
while (GetFrontProcess() != $appPSN)
|
||||
{
|
||||
WaitNextEvent();
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// IsProcessRunning
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub IsProcessRunning($)
|
||||
{
|
||||
my($processName, $psn, $psi) = @_;
|
||||
while ( ($psn, $psi) = each(%Process) ) {
|
||||
if ($psi->processName eq $processName) { return 1; }
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>, Chris Yeh <cyeh@netscape.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape 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/NPL/
|
||||
|
||||
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 Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
=cut
|
||||
@@ -1,272 +0,0 @@
|
||||
|
||||
package Moz::Prefs;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
# Package that attempts to read a file from the Preferences folder,
|
||||
# and get build settings out of it
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use File::Path;
|
||||
|
||||
use Mac::Files;
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(ReadMozUserPrefs);
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# GetPrefsFolder
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub GetPrefsFolder()
|
||||
{
|
||||
my($prefs_folder) = FindFolder(kOnSystemDisk, kPreferencesFolderType, 1);
|
||||
return $prefs_folder.":Mozilla build prefs";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# SetArrayValue
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub SetArrayValue($$$)
|
||||
{
|
||||
my($array_ref, $index1, $index2) = @_;
|
||||
|
||||
my($index);
|
||||
foreach $index (@$array_ref)
|
||||
{
|
||||
if ($index->[0] eq $index1)
|
||||
{
|
||||
$index->[1] = $index2;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# WriteDefaultPrefsFile
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub WriteDefaultPrefsFile($)
|
||||
{
|
||||
my($file_path) = @_;
|
||||
|
||||
my($file_contents);
|
||||
$file_contents = <<'EOS';
|
||||
% You can use this file to customize the Mozilla build system.
|
||||
% The following kinds of lines are allowable:
|
||||
% Comment lines, which start with a '%' in the first column
|
||||
% Lines which modify the default build settings. For the list of flags,
|
||||
% see MozBuildFlags.pm. Examples are:
|
||||
%
|
||||
% build pull 0 % don't pull
|
||||
% options mng 1 % turn mng on
|
||||
%
|
||||
% Line containing the special 'buildfrom' flag, which specifies
|
||||
% where to start the build. Example:
|
||||
%
|
||||
% buildfrom nglayout % where to start the build
|
||||
%
|
||||
% Lines which specify the location of the files used to store paths
|
||||
% to the CodeWarrior IDE, and the MacCVS Pro session file. Note quoting
|
||||
% of paths containing whitespace. Examples:
|
||||
%
|
||||
% filepath idepath ::codewarrior.txt
|
||||
% filepath sessionpath ":Some folder:MacCVS session path.txt"
|
||||
%
|
||||
% Lines which modify the build settings like %main::DEBUG.
|
||||
% Any lines which do not match either of the above are assumed
|
||||
% to set variables on $main::. Examples:
|
||||
%
|
||||
% MOZILLA_OFFICIAL 1
|
||||
%
|
||||
EOS
|
||||
|
||||
$file_contents =~ s/%/#/g;
|
||||
|
||||
local(*PREFS_FILE);
|
||||
|
||||
open(PREFS_FILE, "> $file_path") || die "Could not write default prefs file\n";
|
||||
print PREFS_FILE ($file_contents);
|
||||
close(PREFS_FILE);
|
||||
|
||||
MacPerl::SetFileInfo("McPL", "TEXT", $file_path);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# HandlePrefSet
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub HandlePrefSet($$$$)
|
||||
{
|
||||
my($flags, $name, $value, $desc) = @_;
|
||||
|
||||
if (SetArrayValue($flags, $name, $value)) {
|
||||
print "Prefs set $desc flag '$name' to '$value'\n";
|
||||
} else {
|
||||
die "$desc setting '$name' is not a valid option\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# HandleBuildFromPref
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
sub HandleBuildFromPref($$)
|
||||
{
|
||||
my($build_array, $name) = @_;
|
||||
|
||||
my($setting) = 0;
|
||||
my($index);
|
||||
foreach $index (@$build_array)
|
||||
{
|
||||
if ($index->[0] eq $name) {
|
||||
$setting = 1;
|
||||
}
|
||||
|
||||
$index->[1] = $setting;
|
||||
}
|
||||
|
||||
if ($setting == 1) {
|
||||
print "Building from $name onwards, as specified by prefs\n";
|
||||
} else {
|
||||
printf "Failed to find buildfrom setting '$name'\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# ReadPrefsFile
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub ReadPrefsFile($$$$$)
|
||||
{
|
||||
my($file_path, $build_flags, $options_flags, $filepath_flags, $create_if_missing) = @_;
|
||||
|
||||
local(*PREFS_FILE);
|
||||
|
||||
if (open(PREFS_FILE, "< $file_path"))
|
||||
{
|
||||
print "Reading build prefs from '$file_path'\n";
|
||||
|
||||
while (<PREFS_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
if ($line =~ /^\#/ || $line =~ /^\s*$/) { # ignore comments and empty lines
|
||||
next;
|
||||
}
|
||||
|
||||
if (($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+\"(.+)\"(\s+#.+)?/) ||
|
||||
($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+\'(.+)\'(\s+#.+)?/) ||
|
||||
($line =~ /^\s*([^#\s]+)\s+([^#\s]+)\s+([^#\s]+)(\s+#.+)?/))
|
||||
{
|
||||
my($array_name) = $1;
|
||||
my($option_name) = $2;
|
||||
my($option_value) = $3;
|
||||
|
||||
# print "Read '$array_name' '$option_name' '$option_value'\n";
|
||||
|
||||
if ($array_name eq "build")
|
||||
{
|
||||
HandlePrefSet($build_flags, $option_name, $option_value, "Build");
|
||||
}
|
||||
elsif ($array_name eq "options")
|
||||
{
|
||||
HandlePrefSet($options_flags, $option_name, $option_value, "Options");
|
||||
}
|
||||
elsif ($array_name eq "filepath" && $option_name && $option_value)
|
||||
{
|
||||
HandlePrefSet($filepath_flags, $option_name, $option_value, "Filepath");
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Unknown pref option at $line\n";
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /^\s*buildfrom\s+([^#\s]+)(\s+#.+)?/)
|
||||
{
|
||||
my($build_start) = $1;
|
||||
HandleBuildFromPref($build_flags, $build_start);
|
||||
}
|
||||
elsif ($line =~ /^\s*([^#\s]+)\s+([^#\s]+)(\s+#.+)?/)
|
||||
{
|
||||
my($build_var) = $1;
|
||||
my($var_setting) = $2;
|
||||
|
||||
print "Setting \$main::$build_var to $var_setting\n";
|
||||
eval "\$main::$build_var = \"$var_setting\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Unrecognized input line at $line\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(PREFS_FILE);
|
||||
}
|
||||
elsif ($create_if_missing)
|
||||
{
|
||||
print "No prefs file found at $file_path; using defaults\n";
|
||||
|
||||
my($folder_path) = $file_path;
|
||||
$folder_path =~ s/[^:]+$//;
|
||||
mkpath($folder_path);
|
||||
WriteDefaultPrefsFile($file_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# ReadMozUserPrefs
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub ReadMozUserPrefs($$$$)
|
||||
{
|
||||
my($prefs_file_name, $build_flags, $options_flags, $filepath_flags) = @_;
|
||||
|
||||
if ($prefs_file_name eq "") { return; }
|
||||
|
||||
# if local prefs exist, just use those. Othewise, look in the prefs folder
|
||||
if (-e $prefs_file_name)
|
||||
{
|
||||
# read local prefs
|
||||
ReadPrefsFile($prefs_file_name, $build_flags, $options_flags, $filepath_flags, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
# first read prefs folder prefs
|
||||
my($prefs_path) = GetPrefsFolder();
|
||||
$prefs_path .= ":$prefs_file_name";
|
||||
|
||||
ReadPrefsFile($prefs_path, $build_flags, $options_flags, $filepath_flags, 1);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -1,932 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Simon Fraser <sfraser@netscape.com>
|
||||
#
|
||||
|
||||
package Moz::ProjectXML;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
|
||||
use Cwd;
|
||||
use XML::DOM;
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
ParseXMLDocument
|
||||
DisposeXMLDocument
|
||||
WriteXMLDocument
|
||||
CleanupPro5XML
|
||||
GetTargetsList
|
||||
CloneTarget
|
||||
SetAsSharedLibraryTarget
|
||||
SetAsStaticLibraryTarget
|
||||
AddTarget
|
||||
RemoveTarget
|
||||
GetTargetSetting
|
||||
SetTargetSetting
|
||||
getChildElementTextContents
|
||||
);
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# A module for reading, manipulating, and writing XML-format CodeWarrior project files.
|
||||
#
|
||||
# Sample usage:
|
||||
#
|
||||
# use ProjectXML;
|
||||
#
|
||||
# my $doc = ProjectXML::ParseXMLDocument("Test.mcp.xml");
|
||||
# ProjectXML::CloneTarget($doc, "Test.shlb", "Test.lib");
|
||||
# ProjectXML::SetAsStaticLibraryTarget($doc, "Test.lib", "TestOutput.lib");
|
||||
# ProjectXML::WriteXMLDocument($doc, "Test_out.xml");
|
||||
# ProjectXML::DisposeXMLDocument($doc);
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ParseXMLDocument
|
||||
#// Note that the caller must call DisposeXMLDocument on the returned doc
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub ParseXMLDocument($)
|
||||
{
|
||||
my($doc_path) = @_;
|
||||
|
||||
my $parser = new XML::DOM::Parser(ErrorContext => 2);
|
||||
my $doc = $parser->parsefile($doc_path);
|
||||
|
||||
return $doc;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// DisposeXMLDocument
|
||||
#// Needed to avoid memory leaks - cleanup circular references for garbage collection
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub DisposeXMLDocument($)
|
||||
{
|
||||
my($doc) = @_;
|
||||
|
||||
$doc->dispose();
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// WriteXMLDocument
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
||||
sub _pro5_tag_compression($$)
|
||||
{
|
||||
return 1; # Pro 5 is broken and can't import XML with <foo/> style tags
|
||||
}
|
||||
|
||||
sub _pro6plus_tag_compression($$)
|
||||
{
|
||||
return 0; # Pro 6 can deal with empty XML tags like <foo/>
|
||||
}
|
||||
|
||||
sub WriteXMLDocument($$$)
|
||||
{
|
||||
my($doc, $file_path, $ide_version) = @_;
|
||||
|
||||
if ($ide_version eq "4.0")
|
||||
{
|
||||
XML::DOM::setTagCompression(\&_pro5_tag_compression);
|
||||
}
|
||||
else
|
||||
{
|
||||
XML::DOM::setTagCompression(\&_pro6plus_tag_compression);
|
||||
}
|
||||
|
||||
$doc->printToFile($file_path);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// CleanupPro5XML
|
||||
#// XML Projects exported by Pro 5 contain garbage data under the MWMerge_MacOS_skipResources
|
||||
#// setting. This routine cleans this up, saving the result to a new file
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub CleanupPro5XML($$)
|
||||
{
|
||||
my($xml_path, $out_path) = @_;
|
||||
|
||||
local(*XML_FILE);
|
||||
open(XML_FILE, "< $xml_path") || die "Error: failed to open file $xml_path\n";
|
||||
|
||||
local(*CLEANED_FILE);
|
||||
open(CLEANED_FILE, "> $out_path") || die "Error: failed to open file $out_path for writing\n";
|
||||
|
||||
my $in_skip_resources_settings = 0;
|
||||
|
||||
while(<XML_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
|
||||
if ($line =~ /^<\?codewarrior/) # is processing inst line
|
||||
{
|
||||
my $test_line = $line;
|
||||
chomp($test_line);
|
||||
|
||||
my $out_line = $test_line;
|
||||
if ($test_line =~ /^<\?codewarrior\s+exportversion=\"(.+)\"\s+ideversion=\"(.+)\"\s*\?>$/)
|
||||
{
|
||||
my $export_version = $1;
|
||||
my $ide_version = $2;
|
||||
|
||||
$ide_version = "4.0_mozilla"; # pseudo IDE version so we know we touched it
|
||||
$out_line = "<?codewarrior exportversion=\"".$export_version."\" ideversion=\"".$ide_version."\"?>";
|
||||
}
|
||||
|
||||
print CLEANED_FILE "$out_line\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($line =~ /MWMerge_MacOS_skipResources/)
|
||||
{
|
||||
$in_skip_resources_settings = 1;
|
||||
print CLEANED_FILE "$line";
|
||||
}
|
||||
elsif($in_skip_resources_settings && $line =~ /<!-- Settings for/)
|
||||
{
|
||||
# leaving bad settings lines. Write closing tag
|
||||
print CLEANED_FILE " <!-- Corrupted setting entries removed by script -->\n";
|
||||
print CLEANED_FILE " </SETTING>\n\n";
|
||||
|
||||
print CLEANED_FILE "$line";
|
||||
|
||||
$in_skip_resources_settings = 0;
|
||||
}
|
||||
elsif (!$in_skip_resources_settings)
|
||||
{
|
||||
print CLEANED_FILE "$line";
|
||||
}
|
||||
}
|
||||
|
||||
close(XML_FILE);
|
||||
close(CLEANED_FILE);
|
||||
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# SniffProjectXMLIDEVersion
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
sub SniffProjectXMLIDEVersion($)
|
||||
{
|
||||
my($xml_path) = @_;
|
||||
|
||||
my $found_version = "";
|
||||
|
||||
local(*XML_FILE);
|
||||
open(XML_FILE, "< $xml_path") || die "Error: failed to open file $xml_path\n";
|
||||
|
||||
while(<XML_FILE>)
|
||||
{
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
|
||||
if ($line =~ /^<\?codewarrior/) # is processing inst line
|
||||
{
|
||||
unless ($line =~ /^<\?codewarrior\s+exportversion=\"(.+)\"\s+ideversion=\"(.+)\"\s*\?>$/)
|
||||
{
|
||||
die "Error: Failed to find ideversion in $xml_path in line $line\n";
|
||||
}
|
||||
|
||||
my $export_version = $1;
|
||||
my $ide_version = $2;
|
||||
|
||||
$found_version = $ide_version;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
close(XML_FILE);
|
||||
|
||||
return $found_version;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetTargetsList
|
||||
#// Returns an array of target names
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetTargetsList($)
|
||||
{
|
||||
my($doc) = @_;
|
||||
|
||||
my $nodes = $doc->getElementsByTagName("TARGET");
|
||||
my $n = $nodes->getLength;
|
||||
|
||||
my @target_names;
|
||||
|
||||
for (my $i = 0; $i < $n; $i++)
|
||||
{
|
||||
my ($node) = $nodes->item($i);
|
||||
|
||||
my($target_name) = getChildElementTextContents($node, "NAME");
|
||||
push(@target_names, $target_name);
|
||||
}
|
||||
|
||||
return @target_names;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// CloneTarget
|
||||
#// Clone the named target, renaming it to 'new_name'
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub CloneTarget($$$)
|
||||
{
|
||||
my($doc, $target_name, $new_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
|
||||
# clone here
|
||||
my $target_clone = $target_node->cloneNode(1); # deep clone
|
||||
|
||||
# -- munge target settings --
|
||||
|
||||
# set the target name field
|
||||
setChildElementTextContents($doc, $target_clone, "NAME", $new_name);
|
||||
|
||||
# set the targetname pref
|
||||
setTargetNodeSetting($doc, $target_clone, "Targetname", $new_name);
|
||||
|
||||
# -- insert new target subtree --
|
||||
|
||||
my $target_list = $target_node->getParentNode();
|
||||
$target_list->appendChild($target_clone);
|
||||
|
||||
# -- now add to targetorder --
|
||||
my (@target_order_nodes) = getChildOfDocument($doc, "TARGETORDER");
|
||||
|
||||
my $target_order = @target_order_nodes[0];
|
||||
|
||||
my $new_order = $doc->createElement("ORDEREDTARGET");
|
||||
my $order_name = $doc->createElement("NAME");
|
||||
|
||||
$new_order->appendChild($order_name);
|
||||
|
||||
setChildElementTextContents($doc, $new_order, "NAME", $new_name);
|
||||
$target_order->appendChild($new_order);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SetAsSharedLibraryTarget
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SetAsSharedLibraryTarget($$$)
|
||||
{
|
||||
my($doc, $target_name, $output_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_type", "SharedLibrary");
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_filetype", "1936223330"); #'shlb'
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_outfile", $output_name);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// AddFileToTarget
|
||||
#//
|
||||
#// Add a file to the specified target(s).
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub AddFileToTarget($$$)
|
||||
{
|
||||
my($doc, $target_list, $file_name) = @_;
|
||||
|
||||
# the file must be added in 3 places:
|
||||
# 1. in <TARGET><FILELIST><FILE> (with linkage flags if necessary)
|
||||
# 2. in <TARGET><LINKORDER><FILEREF>
|
||||
# 3. in <GROUPLIST><GROUP><FILEREF>
|
||||
die "Write me\n";
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// RemoveFileFromTarget
|
||||
#//
|
||||
#// Remove a file from the specified target, removing it from the entire project
|
||||
#// if no other targets reference it.
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub RemoveFileFromTarget($$$)
|
||||
{
|
||||
my($doc, $target_node, $file_name) = @_;
|
||||
|
||||
# the file must be removed in 3 places:
|
||||
# 1. in <TARGET><FILELIST><FILE>
|
||||
# 2. in <TARGET><LINKORDER><FILEREF>
|
||||
# 3. in <GROUPLIST><GROUP><FILEREF>
|
||||
|
||||
# first, remove from <FILELIST>
|
||||
my $filelist_node = getFirstChildElement($target_node, "FILELIST");
|
||||
unless ($filelist_node) { die "Error: failed to find FILELIST node\n"; }
|
||||
|
||||
my $file_node = getChildNodeByGrandchildContents($doc, $filelist_node, "FILE", "PATH", $file_name);
|
||||
unless ($file_node) { return; }
|
||||
|
||||
$filelist_node->removeChild($file_node);
|
||||
|
||||
# next, remove from <LINKORDER>
|
||||
my $linkorder_node = getFirstChildElement($target_node, "LINKORDER");
|
||||
unless ($linkorder_node) { die "Error: failed to find LINKORDER node\n"; }
|
||||
|
||||
my $fileref_node = getChildNodeByGrandchildContents($doc, $linkorder_node, "FILEREF", "PATH", $file_name);
|
||||
unless ($fileref_node) { die "Error: link order node for file $file_name not found\n"; }
|
||||
|
||||
$linkorder_node->removeChild($fileref_node);
|
||||
|
||||
# last, remove from <GROUPLIST>
|
||||
# <GROUPLIST> is cross-target, so we have to be careful here.
|
||||
my $grouplist_node = getChildOfDocument($doc, "GROUPLIST");
|
||||
unless ($grouplist_node) { die "Error: failed to find GROUPLIST node\n"; }
|
||||
|
||||
# if the file isn't in any other targets, remove it from the groups
|
||||
if (!GetFileInUse($doc, $file_name))
|
||||
{
|
||||
print "File $file_name is in no other targest. Removing from project\n";
|
||||
|
||||
my @group_nodes;
|
||||
getChildElementsOfType($doc, $grouplist_node, "GROUP", \@group_nodes);
|
||||
my $group_node;
|
||||
foreach $group_node (@group_nodes)
|
||||
{
|
||||
my @fileref_nodes;
|
||||
getChildElementsOfType($doc, $group_node, "FILEREF", \@fileref_nodes);
|
||||
|
||||
my $fileref_node;
|
||||
foreach $fileref_node (@fileref_nodes)
|
||||
{
|
||||
my $path_name = getChildElementTextContents($fileref_node, "PATH");
|
||||
if ($path_name eq $file_name)
|
||||
{
|
||||
print "Removing $file_name from project group list\n";
|
||||
$group_node->removeChild($fileref_node);
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# can a file appear in more than one group?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SetAsStaticLibraryTarget
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SetAsStaticLibraryTarget($$$)
|
||||
{
|
||||
my($doc, $target_name, $output_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_type", "Library");
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_filetype", "1061109567"); #'????'
|
||||
setTargetNodeSetting($doc, $target_node, "MWProject_PPC_outfile", $output_name);
|
||||
|
||||
# static targets don't need any library linkage, so we can remove linkage
|
||||
# with all .shlb and .Lib files.
|
||||
|
||||
my(@obsolete_files) = ("NSStdLibStubs", "InterfacesStubs", "InterfaceLib", "InternetConfigLib");
|
||||
|
||||
print " Removing libraries etc. from target\n";
|
||||
|
||||
# get all files in target
|
||||
my @target_files = GetTargetFilesList($doc, $target_name);
|
||||
my $target_file;
|
||||
foreach $target_file (@target_files)
|
||||
{
|
||||
if ($target_file =~ /(\.shlb|\.lib|\.Lib|\.o|\.exp)$/)
|
||||
{
|
||||
RemoveFileFromTarget($doc, $target_node, $target_file);
|
||||
}
|
||||
}
|
||||
|
||||
print " Removing stub libraries from target\n";
|
||||
|
||||
# then remove files with known names
|
||||
my $obs_file;
|
||||
foreach $obs_file (@obsolete_files)
|
||||
{
|
||||
RemoveFileFromTarget($doc, $target_node, $obs_file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// AddTarget
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub AddTarget($$)
|
||||
{
|
||||
my($doc, $target_name) = @_;
|
||||
|
||||
die "Write me\n";
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// RemoveTarget
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub RemoveTarget($$)
|
||||
{
|
||||
my($doc, $target_name) = @_;
|
||||
|
||||
die "Write me\n";
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetTargetSetting
|
||||
#// Get the value for the specified setting in the specified target
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetTargetSetting($$$)
|
||||
{
|
||||
my($doc, $target_name, $setting_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
return getTargetNodeSetting($target_node, "VALUE");
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// SetTargetSetting
|
||||
#// Set the value for the specified setting in the specified target
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub SetTargetSetting($$$$)
|
||||
{
|
||||
my($doc, $target_name, $setting_name, $new_value) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
setTargetNodeSetting($doc, $target_node, "VALUE", $new_value);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetTargetFilesList
|
||||
#// Return an array of the files in the target (in filelist order)
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetTargetFilesList($$)
|
||||
{
|
||||
my($doc, $target_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
|
||||
my @files_list;
|
||||
|
||||
my $filelist_node = getFirstChildElement($target_node, "FILELIST");
|
||||
unless ($filelist_node) { die "Error: failed to find FILELIST node\n"; }
|
||||
|
||||
my @file_nodes;
|
||||
getChildElementsOfType($doc, $filelist_node, "FILE", \@file_nodes);
|
||||
|
||||
my $node;
|
||||
foreach $node (@file_nodes)
|
||||
{
|
||||
my $file_name = getChildElementTextContents($node, "PATH");
|
||||
push(@files_list, $file_name);
|
||||
}
|
||||
|
||||
return @files_list;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// FileIsInTarget
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub FileIsInTarget($$$)
|
||||
{
|
||||
my($doc, $file_name, $target_name) = @_;
|
||||
|
||||
my $target_node = getTargetNode($doc, $target_name);
|
||||
unless ($target_node) { die "Error: no target found called $target_name\n"; }
|
||||
|
||||
my $file_node = GetTargetFileNode($doc, $target_node, $file_name);
|
||||
if ($file_node) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetFileTargetsList
|
||||
#// Return an array of the targets that a file is in (expensive)
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetFileTargetsList($$)
|
||||
{
|
||||
my ($doc, $file_name) = @_;
|
||||
|
||||
my @target_list;
|
||||
|
||||
my @targets = GetTargetsList($doc);
|
||||
my $target;
|
||||
|
||||
foreach $target (@targets)
|
||||
{
|
||||
if (FileIsInTarget($doc, $file_name, $target))
|
||||
{
|
||||
push(@target_list, $target);
|
||||
}
|
||||
}
|
||||
|
||||
return @target_list;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetTargetFileNode
|
||||
#//
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetTargetFileNode($$$)
|
||||
{
|
||||
my($doc, $target_node, $file_name) = @_;
|
||||
|
||||
my $filelist_node = getFirstChildElement($target_node, "FILELIST");
|
||||
unless ($filelist_node) { die "Error: failed to find FILELIST node\n"; }
|
||||
|
||||
my $file_node = getChildNodeByGrandchildContents($doc, $filelist_node, "FILE", "PATH", $file_name);
|
||||
|
||||
return $file_node;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// GetFileInUse
|
||||
#// Return true if the file is used by any target
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub GetFileInUse($$)
|
||||
{
|
||||
my($doc, $file_name) = @_;
|
||||
|
||||
my $targetlist_node = getChildOfDocument($doc, "TARGETLIST");
|
||||
|
||||
my $target_node = $targetlist_node->getFirstChild();
|
||||
|
||||
while ($target_node)
|
||||
{
|
||||
if ($target_node->getNodeTypeName eq "ELEMENT_NODE" &&
|
||||
$target_node->getTagName() eq "TARGET")
|
||||
{
|
||||
# if this is a target node
|
||||
my $file_node = GetTargetFileNode($doc, $target_node, $file_name);
|
||||
if ($file_node) {
|
||||
return 1; # found it
|
||||
}
|
||||
}
|
||||
|
||||
$target_node = $target_node->getNextSibling();
|
||||
}
|
||||
|
||||
# not found
|
||||
return 0;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getChildOfDocument
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getChildOfDocument($$)
|
||||
{
|
||||
my($doc, $child_type) = @_;
|
||||
|
||||
return getFirstChildElement($doc->getDocumentElement(), $child_type);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getFirstChildElement
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getFirstChildElement($$)
|
||||
{
|
||||
my($node, $element_name) = @_;
|
||||
|
||||
my $found_node;
|
||||
|
||||
unless ($node) { die "getFirstChildElement called with empty node\n"; }
|
||||
|
||||
#look for the first "element_name" child
|
||||
|
||||
my $child_node = $node->getFirstChild();
|
||||
|
||||
while ($child_node)
|
||||
{
|
||||
if ($child_node->getNodeTypeName eq "ELEMENT_NODE" &&
|
||||
$child_node->getTagName() eq $element_name)
|
||||
{
|
||||
$found_node = $child_node;
|
||||
last;
|
||||
}
|
||||
|
||||
$child_node = $child_node->getNextSibling();
|
||||
}
|
||||
|
||||
return $found_node;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getChildElementsOfType
|
||||
#//
|
||||
#// Return an array of refs to child nodes of the given type
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getChildElementsOfType($$$$)
|
||||
{
|
||||
my($doc, $node, $child_type, $array_ref) = @_;
|
||||
|
||||
my $child_node = $node->getFirstChild();
|
||||
|
||||
while ($child_node)
|
||||
{
|
||||
if ($child_node->getNodeTypeName eq "ELEMENT_NODE" &&
|
||||
$child_node->getTagName() eq $child_type)
|
||||
{
|
||||
push(@$array_ref, $child_node);
|
||||
}
|
||||
|
||||
$child_node = $child_node->getNextSibling();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getChildElementTextContents
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Given <FOOPY><NERD>Hi!</NERD></FOOPY>, where $node is <FOOPY>,
|
||||
# returns "Hi!". If > 1 <NERD> node, returns the contents of the first.
|
||||
#
|
||||
sub getChildElementTextContents($$)
|
||||
{
|
||||
my($node, $tag_name) = @_;
|
||||
|
||||
my $first_element = getFirstChildElement($node, $tag_name);
|
||||
my $text_node = $first_element->getFirstChild();
|
||||
|
||||
my $text_contents = "";
|
||||
|
||||
# concat adjacent text nodes
|
||||
while ($text_node)
|
||||
{
|
||||
if ($text_node->getNodeTypeName() ne "TEXT_NODE")
|
||||
{
|
||||
last;
|
||||
}
|
||||
|
||||
$text_contents = $text_contents.$text_node->getData();
|
||||
$text_node = $text_node->getNextSibling();
|
||||
}
|
||||
|
||||
return $text_contents;
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// setChildElementTextContents
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub setChildElementTextContents($$$$)
|
||||
{
|
||||
my($doc, $node, $tag_name, $contents_text) = @_;
|
||||
|
||||
my $first_element = getFirstChildElement($node, $tag_name);
|
||||
my $new_text_node = $doc->createTextNode($contents_text);
|
||||
|
||||
# replace all child elements with a text element
|
||||
removeAllChildren($first_element);
|
||||
|
||||
$first_element->appendChild($new_text_node);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getChildNodeByContents
|
||||
#//
|
||||
#// Consider <foo><bar><baz>Foopy</baz></bar><bar><baz>Loopy</baz></bar></foo>
|
||||
#// This function, when called with getChildNodeByContents($foonode, "bar", "baz", "Loopy")
|
||||
#// returns the second <bar> node.
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getChildNodeByGrandchildContents($$$$$)
|
||||
{
|
||||
my($doc, $node, $child_type, $gc_type, $gc_contents) = @_; # gc = grandchild
|
||||
|
||||
my $found_node;
|
||||
my $child_node = $node->getFirstChild();
|
||||
while ($child_node)
|
||||
{
|
||||
if ($child_node->getNodeTypeName eq "ELEMENT_NODE" &&
|
||||
$child_node->getTagName() eq $child_type)
|
||||
{
|
||||
# check for a child of this node of type
|
||||
my $child_contents = getChildElementTextContents($child_node, $gc_type);
|
||||
|
||||
if ($child_contents eq $gc_contents)
|
||||
{
|
||||
$found_node = $child_node;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
$child_node = $child_node->getNextSibling();
|
||||
}
|
||||
|
||||
return $found_node;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getTargetNode
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getTargetNode($$)
|
||||
{
|
||||
my($doc, $target_name) = @_;
|
||||
|
||||
my $targetlist_node = getChildOfDocument($doc, "TARGETLIST");
|
||||
return getChildNodeByGrandchildContents($doc, $targetlist_node, "TARGET", "NAME", $target_name);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getTargetNamedSettingNode
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getTargetNamedSettingNode($$)
|
||||
{
|
||||
my($target_node, $setting_name) = @_;
|
||||
|
||||
my $setting_node;
|
||||
|
||||
my $settinglist_node = getFirstChildElement($target_node, "SETTINGLIST");
|
||||
my $child_node = $settinglist_node->getFirstChild();
|
||||
|
||||
while ($child_node)
|
||||
{
|
||||
if ($child_node->getNodeTypeName ne "ELEMENT_NODE")
|
||||
{
|
||||
$child_node = $child_node->getNextSibling();
|
||||
next;
|
||||
}
|
||||
|
||||
if ($child_node->getTagName() eq "SETTING")
|
||||
{
|
||||
my $set_name = getChildElementTextContents($child_node, "NAME");
|
||||
|
||||
if ($set_name eq $setting_name)
|
||||
{
|
||||
$setting_node = $child_node;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
$child_node = $child_node->getNextSibling();
|
||||
}
|
||||
|
||||
return $setting_node;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// getTargetNodeSetting
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub getTargetNodeSetting($$)
|
||||
{
|
||||
my($target_node, $setting_name) = @_;
|
||||
|
||||
my $setting_node = getTargetNamedSettingNode($target_node, $setting_name);
|
||||
return getChildElementTextContents($setting_node, "VALUE");
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// setTargetNodeSetting
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub setTargetNodeSetting($$$$)
|
||||
{
|
||||
my($doc, $target_node, $setting_name, $new_value) = @_;
|
||||
|
||||
my $setting_node = getTargetNamedSettingNode($target_node, $setting_name);
|
||||
|
||||
setChildElementTextContents($doc, $setting_node, "VALUE", $new_value);
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// elementInArray
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub elementInArray($$)
|
||||
{
|
||||
my($element, $array) = @_;
|
||||
my $test;
|
||||
foreach $test (@$array)
|
||||
{
|
||||
if ($test eq $element) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// removeAllChildren
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub removeAllChildren($)
|
||||
{
|
||||
my($node) = @_;
|
||||
|
||||
my $child_node = $node->getFirstChild();
|
||||
|
||||
while ($child_node)
|
||||
{
|
||||
$node->removeChild($child_node);
|
||||
$child_node = $node->getFirstChild();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// dumpNodeData
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub dumpNodeData($)
|
||||
{
|
||||
my($node) = @_;
|
||||
|
||||
unless ($node) { die "Null node passed to dumpNodeData\n"; }
|
||||
|
||||
print "Dumping node $node\n";
|
||||
|
||||
my($node_type) = $node->getNodeTypeName();
|
||||
|
||||
if ($node_type eq "ELEMENT_NODE")
|
||||
{
|
||||
my($node_name) = $node->getTagName();
|
||||
print "Element $node_name\n";
|
||||
}
|
||||
elsif ($node_type eq "TEXT_NODE")
|
||||
{
|
||||
my($node_data) = $node->getData;
|
||||
# my(@node_vals) = unpack("C*", $node_data);
|
||||
print "Text '$node_data'\n"; # may contain LF chars
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Node $node_type\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// dumpNodeTree
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub dumpNodeTree($)
|
||||
{
|
||||
my($node) = @_;
|
||||
|
||||
my($child_node) = $node->getFirstChild();
|
||||
|
||||
unless ($child_node) { return; }
|
||||
|
||||
# recurse
|
||||
dumpNodeData($child_node);
|
||||
|
||||
# then go through child nodes
|
||||
while ($child_node)
|
||||
{
|
||||
dumpNodeTree($child_node);
|
||||
|
||||
$child_node = $child_node->getNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# These 3 lists are the 'master lists' to control what gets built.
|
||||
#
|
||||
# Ordering in these arrays is important; it has to reflect the order in
|
||||
# which the build occurs.
|
||||
#
|
||||
# Setting containing spaces must be quoted with double quotes.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
build_flags
|
||||
all 1
|
||||
pull 0
|
||||
dist 0
|
||||
config 0
|
||||
xpidl 0
|
||||
idl 0
|
||||
stubs 0
|
||||
runtime 0
|
||||
common 0
|
||||
imglib 0
|
||||
libimg2 0
|
||||
necko 0
|
||||
security 0
|
||||
browserutils 0
|
||||
intl 0
|
||||
nglayout 0
|
||||
accessiblity 0
|
||||
editor 0
|
||||
embedding 0
|
||||
viewer 0
|
||||
xpapp 0
|
||||
extensions 0
|
||||
plugins 0
|
||||
mailnews 0
|
||||
apprunner 0
|
||||
resources 0
|
||||
|
||||
options_flags
|
||||
pull_by_date 0
|
||||
chrome_jars 1
|
||||
chrome_files 0
|
||||
use_jars 1
|
||||
transformiix 1
|
||||
mathml 0 MOZ_MATHML
|
||||
svg 0 MOZ_SVG
|
||||
# svg requires libart, which is an lgpl library. You need to pull it
|
||||
# explicitly.
|
||||
libart_lgpl 0
|
||||
mng 1
|
||||
ldap 1 MOZ_LDAP_XPCOM
|
||||
ldap_experimental 0 MOZ_LDAP_XPCOM_EXPERIMENTAL
|
||||
xmlextras 1
|
||||
wsp 0 MOZ_WSP
|
||||
inspector 1
|
||||
mailextras 1
|
||||
xptlink 0
|
||||
psm 0 MOZ_PSM
|
||||
embedding_test 1
|
||||
embedding_chrome 0
|
||||
embedding_xulprefs 0
|
||||
embedding_xulsecurity 0
|
||||
carbon 0 TARGET_CARBON
|
||||
useimg2 1 USE_IMG2
|
||||
lowmem 0 MOZ_MAC_LOWMEM
|
||||
accessible 1 ACCESSIBILITY
|
||||
bidi 1 IBMBIDI
|
||||
p3p 0
|
||||
jsd 1
|
||||
venkman 1
|
||||
moz_logging 1 MOZ_LOGGING
|
||||
chatzilla 1
|
||||
content_packs 1
|
||||
xml_rpc 1
|
||||
cview 1
|
||||
help 1
|
||||
timeline 0 MOZ_TIMELINE
|
||||
static_build 0 MOZ_STATIC_COMPONENT_LIBS
|
||||
string_debug 0 DEBUG_STRING
|
||||
string_stats 0 DEBUG_STRING_STATS
|
||||
xpctools 0 XPC_TOOLS_SUPPORT
|
||||
smime 1
|
||||
mdn 1
|
||||
print_preview 1 NS_PRINT_PREVIEW
|
||||
moz_xul 1 MOZ_XUL
|
||||
|
||||
filepath_flags
|
||||
idepath ":CodeWarrior IDE Path.txt"
|
||||
sessionpath ":Mozilla session path.txt"
|
||||
buildlogfilepath ":Build Logs:Mozilla build log.txt" # this is a path
|
||||
scriptlogfilepath ":Build Logs:Mozilla script log.txt"
|
||||
@@ -1,22 +0,0 @@
|
||||
# List of modules to check out. Format is
|
||||
# module, (tag), (date)
|
||||
# where tag and date are optional (non-trailing commas are required)
|
||||
#
|
||||
# Examples:
|
||||
# mozilla/nsprpub, NSPRPUB_CLIENT_TAG
|
||||
# mozilla/gc, , 10/25/2000 12:00:00
|
||||
#
|
||||
|
||||
mozilla/nsprpub, NETSCAPE_7_0_RTM
|
||||
mozilla/security/nss, NETSCAPE_7_0_RTM
|
||||
mozilla/security/manager, NETSCAPE_7_0_RTM
|
||||
mozilla/accessible, NETSCAPE_7_0_RTM
|
||||
mozilla/directory/c-sdk, NETSCAPE_7_0_RTM
|
||||
mozilla/lib/mac/Instrumentation, NETSCAPE_7_0_RTM
|
||||
mozilla/gfx2, NETSCAPE_7_0_RTM
|
||||
mozilla/modules/libpr0n, NETSCAPE_7_0_RTM
|
||||
SeaMonkeyAll, NETSCAPE_7_0_RTM
|
||||
|
||||
## You need this if you want to be able to use SVG
|
||||
## Note that this library is under the LGPL, not the MPL
|
||||
#mozilla/other-licenses/libart_lgpl
|
||||
@@ -1,79 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Simon Fraser <sfraser@netscape.com>
|
||||
#
|
||||
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
|
||||
use Cwd;
|
||||
use Moz::BuildUtils;
|
||||
use Moz::BuildCore;
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Where have the build options gone?
|
||||
#
|
||||
# The various build flags have been centralized into one place.
|
||||
# The master list of options is in MozBuildFlags.txt. However,
|
||||
# you should never need to edit that file, or this one.
|
||||
#
|
||||
# To customize what gets built, or where to start the build,
|
||||
# edit the $prefs_file_name file in
|
||||
# System Folder:Preferences:Mozilla build prefs:
|
||||
# Documentation is provided in that file.
|
||||
#-------------------------------------------------------------
|
||||
|
||||
my($prefs_file_name) = "Mozilla pull prefs";
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# hashes to hold build options
|
||||
#-------------------------------------------------------------
|
||||
my(%build);
|
||||
my(%options);
|
||||
my(%filepaths);
|
||||
my(%optiondefines);
|
||||
|
||||
# Hash of input files for this build. Eventually, there will be
|
||||
# input files for manifests, and projects too.
|
||||
my(%inputfiles) = (
|
||||
"buildflags", "MozillaBuildFlags.txt",
|
||||
"checkoutdata", "MozillaCheckoutList.txt",
|
||||
"buildprogress", "",
|
||||
"buildmodule", "MozillaBuildList.pm",
|
||||
"checkouttime", "Mozilla last checkout"
|
||||
);
|
||||
#-------------------------------------------------------------
|
||||
# end build hashes
|
||||
#-------------------------------------------------------------
|
||||
|
||||
# set the build root directory, which is the the dir above mozilla
|
||||
SetupBuildRootDir(":mozilla:build:mac:build_scripts");
|
||||
|
||||
# Set up all the flags on $main::, like DEBUG, CARBON etc.
|
||||
# Override the defaults using the preferences files.
|
||||
SetupDefaultBuildOptions(0, ":mozilla:dist:viewer:", "");
|
||||
|
||||
my($do_checkout) = 1;
|
||||
my($do_build) = 0;
|
||||
|
||||
RunBuild($do_checkout, $do_build, \%inputfiles, $prefs_file_name);
|
||||
@@ -1,447 +1,178 @@
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# 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.
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=.
|
||||
# Enable builds on any drive if defined.
|
||||
!if !defined(MOZ_SRC)
|
||||
MOZ_SRC=y:
|
||||
!endif
|
||||
|
||||
# Enable builds from user defined top level directory.
|
||||
!if !defined(MOZ_TOP)
|
||||
#enable builds from changed top level directories
|
||||
MOZ_TOP=mozilla
|
||||
!endif
|
||||
|
||||
MOZ_SRC_FLIPPED = $(MOZ_SRC:\=/)
|
||||
MOZ_DIST_FLIPPED = $(MOZ_SRC_FLIPPED)/mozilla/dist
|
||||
!ifdef MOZ_DEBUG
|
||||
MOZ_OBJDIR = WIN32_D.OBJ
|
||||
!else
|
||||
MOZ_OBJDIR = WIN32_O.OBJ
|
||||
#//------------------------------------------------------------------------
|
||||
#// Defines specific to MOZ_RAPTOR
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(MOZ_RAPTOR)
|
||||
RAPTOR_MAKEFILE=raptor.mak
|
||||
|
||||
CVSCO = cvs -q co -P
|
||||
|
||||
# Branch tags we use
|
||||
NETLIB_BRANCH = MODULAR_NETLIB_BRANCH
|
||||
MOZRAPTOR_BRANCH = RAPTOR_INTEGRATION0_BRANCH
|
||||
|
||||
# CVS commands to pull the appropriate branch versions
|
||||
CVSCO_NETLIB = $(CVSCO) -r $(NETLIB_BRANCH)
|
||||
CVSCO_CONFIG = $(CVSCO) -r $(MOZRAPTOR_BRANCH)
|
||||
|
||||
MOZ_BRANCH=$(MOZRAPTOR_BRANCH)
|
||||
!endif
|
||||
|
||||
#
|
||||
# Command macro defines
|
||||
#
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to do the pull.
|
||||
#//------------------------------------------------------------------------
|
||||
# uncomment these, modify branch tag, and check in to branch for milestones
|
||||
MOZ_BRANCH=NETSCAPE_7_0_RTM
|
||||
NSPR_CO_TAG=NETSCAPE_7_0_RTM
|
||||
PSM_CO_TAG=NETSCAPE_7_0_RTM
|
||||
NSS_CO_TAG=NETSCAPE_7_0_RTM
|
||||
LDAPCSDK_CO_TAG=NETSCAPE_7_0_RTM
|
||||
ACCESSIBLE_CO_TAG=NETSCAPE_7_0_RTM
|
||||
IMGLIB2_CO_TAG=NETSCAPE_7_0_RTM
|
||||
GFX2_CO_TAG=NETSCAPE_7_0_RTM
|
||||
|
||||
|
||||
!ifdef MOZ_BRANCH
|
||||
!if "$(MOZ_BRANCH)" != ""
|
||||
CVS_BRANCH=-r $(MOZ_BRANCH)
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_DATE
|
||||
CVS_BRANCH=$(CVS_BRANCH) -D "$(MOZ_DATE)"
|
||||
!endif
|
||||
|
||||
# default pull is "quiet" but it can be overridden with MOZ_CVS_VERBOSE
|
||||
!ifndef MOZ_CVS_VERBOSE
|
||||
CVS_FLAGS=-q
|
||||
!endif
|
||||
|
||||
# honor any user-defined CVS flags
|
||||
!ifdef MOZ_CVS_FLAGS
|
||||
CVS_FLAGS=$(CVS_FLAGS) $(MOZ_CVS_FLAGS)
|
||||
!endif
|
||||
|
||||
# let's be explicit about CVSROOT... some windows cvs clients
|
||||
# are too stupid to correctly work without the -d option
|
||||
#
|
||||
# if they are too stupid, they should fail. I am
|
||||
# commenting this out because this does not work
|
||||
# under 4nt. (%'s are evaluted differently)
|
||||
#
|
||||
# If it breaks you, mail dougt@netscape.com
|
||||
# and leaf@mozilla.org
|
||||
#
|
||||
!if 0
|
||||
!if defined(CVSROOT)
|
||||
CVS_FLAGS=$(CVS_FLAGS) -d "$(CVSROOT)"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifndef MOZ_CO_FLAGS
|
||||
MOZ_CO_FLAGS = -P
|
||||
!endif
|
||||
|
||||
CVSCO = cvs $(CVS_FLAGS) co $(MOZ_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull NSPR.
|
||||
#// If no NSPR_CO_TAG is specified, use the default static tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifndef NSPR_CO_FLAGS
|
||||
NSPR_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
NSPR_CO_FLAGS=$(NSPR_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
|
||||
CVSCO_NSPR = cvs $(CVS_FLAGS) co $(NSPR_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull NSS and PSM libs.
|
||||
#// If no NSS_CO_TAG or PSM_CO_TAG is specified, use the default static tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifndef NSS_CO_FLAGS
|
||||
NSS_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
NSS_CO_FLAGS=$(NSS_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_NSS = cvs $(CVS_FLAGS) co $(NSS_CO_FLAGS)
|
||||
|
||||
!ifndef PSM_CO_FLAGS
|
||||
PSM_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
PSM_CO_FLAGS=$(PSM_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_PSM = cvs $(CVS_FLAGS) co $(PSM_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull LDAP C SDK client libs.
|
||||
#// If no LDAPCSDK_CO_TAG is specified, use the default tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
!ifndef LDAPCSDK_CO_FLAGS
|
||||
LDAPCSDK_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
LDAPCSDK_CO_FLAGS=$(LDAPCSDK_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_LDAPCSDK = cvs $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull accessibility libs.
|
||||
#// If no ACCESSIBLE_CO_TAG is specified, use the default tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifndef ACCESSIBLE_CO_FLAGS
|
||||
ACCESSIBLE_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
ACCESSIBLE_CO_FLAGS=$(ACCESSIBLE_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_ACCESSIBLE = cvs $(CVS_FLAGS) co $(ACCESSIBLE_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull new image library.
|
||||
#// If no IMGLIB2_CO_TAG is specified, use the default tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifndef IMGLIB2_CO_FLAGS
|
||||
IMGLIB2_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
IMGLIB2_CO_FLAGS=$(IMGLIB2_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_IMGLIB2 = cvs $(CVS_FLAGS) co $(IMGLIB2_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull new image library.
|
||||
#// If no GFX2_CO_TAG is specified, use the default tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifndef GFX2_CO_FLAGS
|
||||
GFX2_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
GFX2_CO_FLAGS=$(GFX2_CO_FLAGS) $(CVS_BRANCH)
|
||||
|
||||
CVSCO_GFX2 = cvs $(CVS_FLAGS) co $(GFX2_CO_FLAGS)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to pull the internal libart
|
||||
#// (only pulled and built if MOZ_INTERNAL_LIBART_LGPL is set)
|
||||
#// If no MOZ_INTERNAL_LIBART_CO_TAG is specified, use the default tag
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!if defined(MOZ_SVG) && !defined(MOZ_INTERNAL_LIBART_LGPL)
|
||||
ERR_MESSAGE = ^
|
||||
You are trying to build Mozilla with SVG support (MOZ_SVG=1), but you ^
|
||||
haven not specified that mozilla/other-licenses/libart_lgpl should be ^
|
||||
pulled and built. At the moment Mozilla SVG builds need this patched ^
|
||||
version of libart. You either need to disable SVG support (unset MOZ_SVG) ^
|
||||
or enable pulling and building by setting MOZ_INTERNAL_LIBART_LGPL=1.^
|
||||
^
|
||||
If you choose to pull and build libart, note that it is only licensed^
|
||||
under the terms of the LGPL, not the MPL. (Which is why you have to opt^
|
||||
in explicitly.)
|
||||
!endif
|
||||
|
||||
!if defined(MOZ_INTERNAL_LIBART_LGPL)
|
||||
|
||||
!ifndef MOZ_INTERNAL_LIBART_CO_FLAGS
|
||||
MOZ_INTERNAL_LIBART_CO_FLAGS=$(MOZ_CO_FLAGS)
|
||||
!endif
|
||||
|
||||
!if "$(MOZ_INTERNAL_LIBART_CO_TAG)" != ""
|
||||
MOZ_INTERNAL_LIBART_CO_FLAGS=$(MOZ_INTERNAL_LIBART_CO_FLAGS) -r $(MOZ_INTERNAL_LIBART_CO_TAG)
|
||||
HAVE_BRANCH=1
|
||||
!else
|
||||
MOZ_INTERNAL_LIBART_CO_FLAGS=$(MOZ_INTERNAL_LIBART_CO_FLAGS) $(CVS_BRANCH)
|
||||
HAVE_BRANCH=0
|
||||
!endif
|
||||
|
||||
CVSCO_MOZ_INTERNAL_LIBART = cvs $(CVS_FLAGS) co $(MOZ_INTERNAL_LIBART_CO_FLAGS)
|
||||
|
||||
!endif
|
||||
|
||||
## The master target
|
||||
############################################################
|
||||
|
||||
pull_and_build_all: pull_all build_all_dep
|
||||
|
||||
|
||||
## Rules for pulling the source from the cvs repository
|
||||
############################################################
|
||||
|
||||
pull_clobber_and_build_all: pull_all clobber_all build_all
|
||||
|
||||
!if !defined(MOZ_INTERNAL_LIBART_LGPL)
|
||||
pull_all: pull_nspr pull_psm pull_ldapcsdk pull_accessible pull_gfx2 pull_imglib2 pull_seamonkey
|
||||
!if "$(MOZ_DATE)" != ""
|
||||
CVS_BRANCH=-D "$(MOZ_DATE)"
|
||||
HAVE_DATE=1
|
||||
!else
|
||||
pull_all: pull_nspr pull_psm pull_ldapcsdk pull_accessible pull_gfx2 pull_imglib2 pull_moz_internal_libart pull_seamonkey
|
||||
HAVE_DATE=0
|
||||
!endif
|
||||
|
||||
pull_nspr: pull_clientmak
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_NSPR) mozilla/nsprpub
|
||||
|
||||
pull_nss:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_NSS) mozilla/security/coreconf
|
||||
$(CVSCO_NSS) mozilla/security/nss
|
||||
|
||||
pull_psm: pull_nss
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_PSM) mozilla/security/manager
|
||||
$(CVSCO_PSM) mozilla/security/makefile.win
|
||||
|
||||
pull_ldapcsdk:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_LDAPCSDK) mozilla/directory/c-sdk
|
||||
|
||||
pull_accessible:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_ACCESSIBLE) mozilla/accessible
|
||||
|
||||
pull_gfx2:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_GFX2) mozilla/gfx2
|
||||
|
||||
pull_imglib2:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_IMGLIB2) mozilla/modules/libpr0n
|
||||
|
||||
!if defined(MOZ_INTERNAL_LIBART_LGPL)
|
||||
pull_moz_internal_libart:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO_MOZ_INTERNAL_LIBART) mozilla/other-licenses/libart_lgpl
|
||||
!if $(HAVE_DATE) && $(HAVE_BRANCH)
|
||||
ERR_MESSAGE=$(ERR_MESSAGE)^
|
||||
Cannot specify both MOZ_BRANCH and MOZ_DATE
|
||||
!endif
|
||||
|
||||
pull_xpconnect: pull_nspr
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO) mozilla/include
|
||||
$(CVSCO) mozilla/config
|
||||
$(CVSCO) -l mozilla/js
|
||||
$(CVSCO) -l mozilla/js/src
|
||||
$(CVSCO) mozilla/js/src/fdlibm
|
||||
$(CVSCO) mozilla/js/src/xpconnect
|
||||
$(CVSCO) mozilla/modules/libreg
|
||||
$(CVSCO) mozilla/xpcom
|
||||
$(CVSCO) mozilla/string
|
||||
NMAKE=@nmake -nologo -$(MAKEFLAGS)
|
||||
|
||||
# pull either layout only or seamonkey the browser
|
||||
pull_layout:
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO) RaptorWin
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Stuff a do complete pull and build
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
pull_seamonkey: pull_clientmak
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO) SeaMonkeyAll
|
||||
default:: build_all
|
||||
|
||||
pull_clientmak:
|
||||
pull_and_build_all:: pull_all \
|
||||
build_all
|
||||
|
||||
#// Do this when you pull a new tree, or else you will often get bugs
|
||||
#// when replaceing an old dist with a new dist.
|
||||
|
||||
pull_clobber_build_all:: pull_all \
|
||||
clobber_all \
|
||||
build_all
|
||||
|
||||
clobber_build_all:: clobber_all \
|
||||
build_all
|
||||
|
||||
!if defined(MOZ_RAPTOR)
|
||||
pull_all:: pull_client_source_product pull_raptor pull_netlib
|
||||
!else
|
||||
pull_all:: pull_client_source_product
|
||||
!endif
|
||||
|
||||
!if defined(MOZ_RAPTOR)
|
||||
pull_raptor:
|
||||
@cd $(MOZ_SRC)
|
||||
$(CVSCO) $(MOZ_TOP)/raptor.mak
|
||||
@cd $(MOZ_SRC)/$(MOZ_TOP)
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) pull_xpcom pull_imglib pull_raptor
|
||||
|
||||
pull_netlib:
|
||||
@cd $(MOZ_SRC)\.
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/xp
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/libnet
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/include/net.h $(MOZ_TOP)/include/npapi.h
|
||||
!endif
|
||||
|
||||
pull_client_source_product:
|
||||
@echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
|
||||
cd $(MOZ_SRC)\.
|
||||
$(CVSCO) mozilla/client.mak
|
||||
-cvs -q co $(CVS_BRANCH) MozillaSourceWin
|
||||
|
||||
############################################################
|
||||
|
||||
# nmake has to be hardcoded, or we have to depend on mozilla/config
|
||||
# being pulled already to figure out what $(NMAKE) should be.
|
||||
!if defined(MOZ_RAPTOR)
|
||||
build_all: build_raptor \
|
||||
build_dist \
|
||||
build_client
|
||||
!else
|
||||
build_all: build_dist \
|
||||
build_client
|
||||
!endif
|
||||
|
||||
clobber_all: clobber_nspr clobber_ldapcsdk clobber_psm clobber_seamonkey
|
||||
|
||||
build_all: build_nspr build_ldapcsdk build_seamonkey
|
||||
|
||||
build_all_dep: depend libs
|
||||
|
||||
distclean:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\directory\c-sdk
|
||||
gmake -f gmakefile.win distclean MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub
|
||||
gmake -f gmakefile.win distclean MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
nmake /f client.mak clobber_psm
|
||||
nmake /f client.mak clobber_seamonkey
|
||||
|
||||
clobber_ldapcsdk:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\directory\c-sdk
|
||||
gmake -f gmakefile.win clobber_all MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED) \
|
||||
SHELL=sh
|
||||
|
||||
clobber_nspr:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub
|
||||
gmake -f gmakefile.win clobber_all MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
|
||||
|
||||
clobber_psm:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\security
|
||||
nmake -f makefile.win clobber_all
|
||||
|
||||
clobber_xpconnect:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
-rd /s /q dist
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub
|
||||
gmake -f gmakefile.win clobber_all MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\include
|
||||
nmake -f makefile.win clobber_all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\modules\libreg
|
||||
nmake -f makefile.win clobber_all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\string
|
||||
nmake -f makefile.win clobber_all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom
|
||||
nmake -f makefile.win clobber_all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js
|
||||
nmake -f makefile.win clobber_all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js\src\xpconnect
|
||||
nmake -f makefile.win clobber_all
|
||||
|
||||
clobber_seamonkey:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
-rd /s /q dist
|
||||
nmake -f makefile.win clobber_all
|
||||
|
||||
depend: export
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
nmake -f makefile.win depend
|
||||
|
||||
depend_xpconnect:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\include
|
||||
nmake -f makefile.win depend
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\modules\libreg
|
||||
nmake -f makefile.win depend
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\string
|
||||
nmake -f makefile.win depend
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom
|
||||
nmake -f makefile.win depend
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js\src
|
||||
nmake -f makefile.win depend
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js\src\xpconnect
|
||||
nmake -f makefile.win depend
|
||||
|
||||
build_nspr:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub
|
||||
gmake -f gmakefile.win MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED)
|
||||
|
||||
build_ldapcsdk:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\directory\c-sdk
|
||||
gmake -f gmakefile.win MOZ_SRC_FLIPPED=$(MOZ_SRC_FLIPPED) SHELL=sh
|
||||
|
||||
build_psm:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\security
|
||||
nmake -f makefile.win
|
||||
|
||||
build_xpconnect: build_nspr
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\include
|
||||
nmake -f makefile.win all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\modules\libreg
|
||||
nmake -f makefile.win all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom
|
||||
nmake -f makefile.win export
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\string
|
||||
nmake -f makefile.win all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom
|
||||
nmake -f makefile.win libs
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js\src
|
||||
nmake -f makefile.win all
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\js\src\xpconnect
|
||||
nmake -f makefile.win all
|
||||
|
||||
build_seamonkey:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
nmake -f makefile.win all
|
||||
|
||||
build_client:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win all
|
||||
|
||||
build_layout:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win all
|
||||
!if defined(MOZ_RAPTOR)
|
||||
build_raptor:
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) STANDALONE_IMAGE_LIB=1 RAPTOR=1
|
||||
!endif
|
||||
|
||||
build_dist:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win all
|
||||
@echo +++ client.mak: building dist
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
$(NMAKE) -f makefile.win
|
||||
|
||||
libs:
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
nmake -f makefile.win libs
|
||||
|
||||
export: build_nspr build_ldapcsdk
|
||||
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
|
||||
nmake -f makefile.win export
|
||||
build_client:
|
||||
@echo +++ client.mak: building client
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)\cmd\winfe\mkfiles32
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
$(NMAKE) -f mozilla.mak exports
|
||||
!endif
|
||||
$(NMAKE) -f mozilla.mak DEPEND=1
|
||||
$(NMAKE) -f mozilla.mak
|
||||
|
||||
clobber_dist:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win clobber_all
|
||||
|
||||
clobber_client:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win clobber_all
|
||||
#
|
||||
# remove all source files from the tree and print a report of what was missed
|
||||
#
|
||||
!if defined(MOZ_RAPTOR)
|
||||
clobber_all:: clobber_moz clobber_raptor
|
||||
!else
|
||||
clobber_all:: clobber_moz
|
||||
!endif
|
||||
|
||||
clobber_layout:
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake -f makefile.win clobber_all
|
||||
clobber_moz:
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
$(NMAKE) -f makefile.win clobber_all
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)\cmd\winfe\mkfiles32
|
||||
$(NMAKE) -f mozilla.mak clobber_all
|
||||
!if !defined(MOZ_MEDIUM)
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)\netsite\ldap\libraries\msdos\winsock
|
||||
$(NMAKE) -f nsldap.mak clobber_all
|
||||
!endif
|
||||
|
||||
browse_info::
|
||||
!if defined(MOZ_RAPTOR)
|
||||
clobber_raptor:
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
-dir /s /b *.sbr > sbrlist.tmp
|
||||
-bscmake /Es /o mozilla.bsc @sbrlist.tmp
|
||||
-rm sbrlist.tmp
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) STANDALONE_IMAGE_LIB=1 RAPTOR=1 clobber
|
||||
!endif
|
||||
|
||||
regchrome::
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake /f makefile.win regchrome
|
||||
|
||||
deliver::
|
||||
@cd $(MOZ_SRC)\mozilla\.
|
||||
nmake /f makefile.win splitsymbols
|
||||
depend:
|
||||
-del /s /q make.dep
|
||||
$(NMAKE) -f makefile.win depend
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Utility stuff...
|
||||
@@ -450,11 +181,9 @@ deliver::
|
||||
#//------------------------------------------------------------------------
|
||||
# Verify that MOZ_SRC is set correctly
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
# Check to see if it is set at all
|
||||
!if "$(MOZ_SRC)"==""
|
||||
MOZ_SRC = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
!if "$(MOZ_SRC)"!=""
|
||||
|
||||
#
|
||||
# create a temp file at the root and make sure it is visible from MOZ_SRC
|
||||
@@ -462,14 +191,20 @@ MOZ_SRC = $(MAKEDIR)\..
|
||||
!if [copy $(MAKEDIR)\client.mak $(MAKEDIR)\xyzzy.tmp > NUL] == 0
|
||||
!endif
|
||||
|
||||
!if !EXIST( $(MOZ_SRC)\mozilla\xyzzy.tmp )
|
||||
!if !EXIST( $(MOZ_SRC)\$(MOZ_TOP)\xyzzy.tmp )
|
||||
ERR_MESSAGE=$(ERR_MESSAGE)^
|
||||
MOZ_SRC isn't set correctly: [$(MOZ_SRC)\mozilla]!=[$(MAKEDIR)]
|
||||
MOZ_SRC isn't set correctly: [$(MOZ_SRC)\$(MOZ_TOP)]!=[$(MAKEDIR)]
|
||||
!endif
|
||||
|
||||
!if [del $(MAKEDIR)\xyzzy.tmp]
|
||||
!endif
|
||||
|
||||
!else
|
||||
# MOZ_SRC isn't set at all
|
||||
ERR_MESSAGE=$(ERR_MESSAGE)^
|
||||
Environment variable MOZ_SRC isn't set.
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
# Verify that MOZ_BITS is set
|
||||
#//------------------------------------------------------------------------
|
||||
@@ -488,6 +223,7 @@ Environment variable MOZ_TOOLS isn't set.
|
||||
#// Display error
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
!if "$(ERR_MESSAGE)" != ""
|
||||
ERR_MESSAGE = ^
|
||||
client.mak: ^
|
||||
@@ -499,13 +235,23 @@ nmake -f client.mak [MOZ_BRANCH=<cvs_branch_name>] ^
|
||||
[MOZ_DATE=<cvs_date>]^
|
||||
[pull_and_build_all]^
|
||||
[pull_all]^
|
||||
[pull_dist]^
|
||||
[pull_client]^
|
||||
[build_all]^
|
||||
[build_dist]^
|
||||
[build_ldap]^
|
||||
[build_client]^
|
||||
^
|
||||
Environment variables:^
|
||||
^
|
||||
MOZ_BITS set to 32^
|
||||
MOZ_TOOLS set to the directory containing the needed tools ^
|
||||
MOZ_BITS set to either 32 or 16 ^
|
||||
MOZ_SRC set to the directory above $(MOZ_TOP) or "$(MAKEDIR)\.."^
|
||||
MOZ_TOOLS set to the directory containing the java compiler see ^
|
||||
http://warp/tools/nt^
|
||||
JAVA_HOME set to the same thing as MOZ_TOOLS^
|
||||
CVSROOT set to the public mozilla cvs server^
|
||||
|
||||
!ERROR $(ERR_MESSAGE)
|
||||
|
||||
!endif
|
||||
|
||||
|
||||
@@ -1,650 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm
|
||||
|
||||
# Build the Mozilla client.
|
||||
#
|
||||
# This needs CVSROOT set to work, e.g.,
|
||||
# setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
||||
# or
|
||||
# setenv CVSROOT :pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
|
||||
#
|
||||
# To checkout and build a tree,
|
||||
# 1. cvs co mozilla/client.mk
|
||||
# 2. cd mozilla
|
||||
# 3. gmake -f client.mk
|
||||
#
|
||||
# Other targets (gmake -f client.mk [targets...]),
|
||||
# checkout
|
||||
# build
|
||||
# clean (realclean is now the same as clean)
|
||||
# distclean
|
||||
#
|
||||
# See http://www.mozilla.org/build/unix.html for more information.
|
||||
#
|
||||
# Options:
|
||||
# MOZ_OBJDIR - Destination object directory
|
||||
# MOZ_CO_DATE - Date tag to use for checkout (default: none)
|
||||
# MOZ_CO_MODULE - Module to checkout (default: SeaMonkeyAll)
|
||||
# MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
|
||||
# MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
|
||||
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
|
||||
# MOZ_CO_BRANCH - Branch tag (Deprecated. Use MOZ_CO_TAG below.)
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Checkout Tags
|
||||
#
|
||||
# For branches, uncomment the MOZ_CO_TAG line with the proper tag,
|
||||
# and commit this file on that tag.
|
||||
MOZ_CO_TAG = NETSCAPE_7_0_RTM
|
||||
NSPR_CO_TAG = NETSCAPE_7_0_RTM
|
||||
PSM_CO_TAG = NETSCAPE_7_0_RTM
|
||||
NSS_CO_TAG = NETSCAPE_7_0_RTM
|
||||
LDAPCSDK_CO_TAG = NETSCAPE_7_0_RTM
|
||||
ACCESSIBLE_CO_TAG = NETSCAPE_7_0_RTM
|
||||
GFX2_CO_TAG = NETSCAPE_7_0_RTM
|
||||
IMGLIB2_CO_TAG = NETSCAPE_7_0_RTM
|
||||
BUILD_MODULES = all
|
||||
|
||||
#######################################################################
|
||||
# Defines
|
||||
#
|
||||
CVS = cvs
|
||||
|
||||
CWD := $(shell pwd)
|
||||
|
||||
ifeq "$(CWD)" "/"
|
||||
CWD := /.
|
||||
endif
|
||||
|
||||
ifneq (, $(wildcard client.mk))
|
||||
# Ran from mozilla directory
|
||||
ROOTDIR := $(shell dirname $(CWD))
|
||||
TOPSRCDIR := $(CWD)
|
||||
else
|
||||
# Ran from mozilla/.. directory (?)
|
||||
ROOTDIR := $(CWD)
|
||||
TOPSRCDIR := $(CWD)/mozilla
|
||||
endif
|
||||
|
||||
# on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't
|
||||
# work; replace first instance with one forward slash
|
||||
TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%')
|
||||
|
||||
ifndef TOPSRCDIR_MOZ
|
||||
TOPSRCDIR_MOZ=$(TOPSRCDIR)
|
||||
endif
|
||||
|
||||
# if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
|
||||
DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
|
||||
ifeq ($(DIRNAME),)
|
||||
ROOTDIR := /.
|
||||
endif
|
||||
|
||||
AUTOCONF := autoconf
|
||||
MKDIR := mkdir
|
||||
SH := /bin/sh
|
||||
ifndef MAKE
|
||||
MAKE := gmake
|
||||
endif
|
||||
|
||||
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
|
||||
ifdef CONFIG_GUESS_SCRIPT
|
||||
CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
|
||||
else
|
||||
_IS_FIRST_CHECKOUT := 1
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS
|
||||
|
||||
# Add the CVS root to CVS_FLAGS if needed
|
||||
CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
|
||||
ifneq ($(CVS_ROOT_IN_TREE),)
|
||||
ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
|
||||
CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
|
||||
endif
|
||||
endif
|
||||
|
||||
CVSCO = $(strip $(CVS) $(CVS_FLAGS) co $(CVS_CO_FLAGS))
|
||||
CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
|
||||
CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
|
||||
|
||||
ifdef MOZ_CO_TAG
|
||||
CVS_CO_FLAGS := -r $(MOZ_CO_TAG)
|
||||
endif
|
||||
|
||||
####################################
|
||||
# Load mozconfig Options
|
||||
|
||||
# See build pages, http://www.mozilla.org/build/unix.html,
|
||||
# for how to set up mozconfig.
|
||||
MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
|
||||
MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
|
||||
MOZCONFIG_MODULES := mozilla/build/unix/modules.mk
|
||||
run_for_side_effects := \
|
||||
$(shell cd $(ROOTDIR); \
|
||||
if test "$(_IS_FIRST_CHECKOUT)"; then \
|
||||
$(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \
|
||||
else true; \
|
||||
fi; \
|
||||
$(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out)
|
||||
include $(TOPSRCDIR)/.mozconfig.mk
|
||||
include $(TOPSRCDIR)/build/unix/modules.mk
|
||||
|
||||
####################################
|
||||
# Options that may come from mozconfig
|
||||
|
||||
# Change CVS flags if anonymous root is requested
|
||||
ifdef MOZ_CO_USE_MIRROR
|
||||
CVS_FLAGS := -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
||||
endif
|
||||
|
||||
# MOZ_CVS_FLAGS - Basic CVS flags
|
||||
ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
|
||||
CVS_FLAGS := $(CVS_FLAGS) -q -z 3
|
||||
else
|
||||
CVS_FLAGS := $(MOZ_CVS_FLAGS)
|
||||
endif
|
||||
|
||||
# This option is deprecated. The best way to have client.mk pull a tag
|
||||
# is to set MOZ_CO_TAG (see above) and commit that change on the tag.
|
||||
ifdef MOZ_CO_BRANCH
|
||||
$(warning Use MOZ_CO_TAG instead of MOZ_CO_BRANCH)
|
||||
CVS_CO_FLAGS := -r $(MOZ_CO_BRANCH)
|
||||
endif
|
||||
|
||||
# MOZ_CO_FLAGS - Anything that we should use on all checkouts
|
||||
ifeq "$(origin MOZ_CO_FLAGS)" "undefined"
|
||||
CVS_CO_FLAGS := $(CVS_CO_FLAGS) -P
|
||||
else
|
||||
CVS_CO_FLAGS := $(CVS_CO_FLAGS) $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_CO_DATE
|
||||
CVS_CO_DATE_FLAGS := -D "$(MOZ_CO_DATE)"
|
||||
endif
|
||||
|
||||
ifdef MOZ_OBJDIR
|
||||
OBJDIR := $(MOZ_OBJDIR)
|
||||
MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS) -C $(OBJDIR)
|
||||
else
|
||||
OBJDIR := $(TOPSRCDIR)
|
||||
MOZ_MAKE := $(MAKE) $(MOZ_MAKE_FLAGS)
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS defines for PSM
|
||||
#
|
||||
PSM_CO_MODULE= mozilla/security/manager
|
||||
PSM_CO_FLAGS := -P -A
|
||||
ifdef MOZ_CO_FLAGS
|
||||
PSM_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef PSM_CO_TAG
|
||||
PSM_CO_FLAGS := $(PSM_CO_FLAGS) -r $(PSM_CO_TAG)
|
||||
endif
|
||||
CVSCO_PSM = $(CVS) $(CVS_FLAGS) co $(PSM_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(PSM_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defines for NSS
|
||||
#
|
||||
NSS_CO_MODULE = mozilla/security/nss \
|
||||
mozilla/security/coreconf \
|
||||
$(NULL)
|
||||
|
||||
NSS_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
NSS_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef NSS_CO_TAG
|
||||
NSS_CO_FLAGS := $(NSS_CO_FLAGS) -r $(NSS_CO_TAG)
|
||||
endif
|
||||
# Cannot pull static tags by date
|
||||
ifeq ($(NSS_CO_TAG),NSS_CLIENT_TAG)
|
||||
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE)
|
||||
else
|
||||
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS defines for NSPR
|
||||
#
|
||||
NSPR_CO_MODULE = mozilla/nsprpub
|
||||
NSPR_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
NSPR_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef NSPR_CO_TAG
|
||||
NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) -r $(NSPR_CO_TAG)
|
||||
endif
|
||||
# Cannot pull static tags by date
|
||||
ifeq ($(NSPR_CO_TAG),NSPRPUB_CLIENT_TAG)
|
||||
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
|
||||
else
|
||||
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS defines for the C LDAP SDK
|
||||
#
|
||||
LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
|
||||
LDAPCSDK_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef LDAPCSDK_CO_TAG
|
||||
LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) -r $(LDAPCSDK_CO_TAG)
|
||||
endif
|
||||
CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defines for the C LDAP SDK
|
||||
#
|
||||
ACCESSIBLE_CO_MODULE = mozilla/accessible
|
||||
ACCESSIBLE_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
ACCESSIBLE_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef ACCESSIBLE_CO_TAG
|
||||
ACCESSIBLE_CO_FLAGS := $(ACCESSIBLE_CO_FLAGS) -r $(ACCESSIBLE_CO_TAG)
|
||||
endif
|
||||
CVSCO_ACCESSIBLE = $(CVS) $(CVS_FLAGS) co $(ACCESSIBLE_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(ACCESSIBLE_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defines for gfx2
|
||||
#
|
||||
GFX2_CO_MODULE = mozilla/gfx2
|
||||
GFX2_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
GFX2_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef GFX2_CO_TAG
|
||||
GFX2_CO_FLAGS := $(GFX2_CO_FLAGS) -r $(GFX2_CO_TAG)
|
||||
endif
|
||||
CVSCO_GFX2 = $(CVS) $(CVS_FLAGS) co $(GFX2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(GFX2_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defines for new image library
|
||||
#
|
||||
IMGLIB2_CO_MODULE = mozilla/modules/libpr0n
|
||||
IMGLIB2_CO_FLAGS := -P
|
||||
ifdef MOZ_CO_FLAGS
|
||||
IMGLIB2_CO_FLAGS := $(MOZ_CO_FLAGS)
|
||||
endif
|
||||
ifdef IMGLIB2_CO_TAG
|
||||
IMGLIB2_CO_FLAGS := $(IMGLIB2_CO_FLAGS) -r $(IMGLIB2_CO_TAG)
|
||||
endif
|
||||
CVSCO_IMGLIB2 = $(CVS) $(CVS_FLAGS) co $(IMGLIB2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(IMGLIB2_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defines for standalone modules
|
||||
#
|
||||
ifneq ($(BUILD_MODULES),all)
|
||||
MOZ_CO_MODULE := $(filter-out $(NSPRPUB_DIR) security directory/c-sdk, $(BUILD_MODULE_CVS))
|
||||
MOZ_CO_MODULE += allmakefiles.sh client.mk aclocal.m4 configure configure.in
|
||||
MOZ_CO_MODULE += Makefile.in
|
||||
MOZ_CO_MODULE := $(addprefix mozilla/, $(MOZ_CO_MODULE))
|
||||
|
||||
NOSUBDIRS_MODULE := $(addprefix mozilla/, $(BUILD_MODULE_CVS_NS))
|
||||
ifneq ($(NOSUBDIRS_MODULE),)
|
||||
CVSCO_NOSUBDIRS := $(CVSCO) -l $(CVS_CO_DATE_FLAGS) $(NOSUBDIRS_MODULE)
|
||||
endif
|
||||
|
||||
ifeq (,$(filter $(NSPRPUB_DIR), $(BUILD_MODULE_CVS)))
|
||||
CVSCO_NSPR :=
|
||||
endif
|
||||
ifeq (,$(filter security security/manager, $(BUILD_MODULE_CVS)))
|
||||
CVSCO_PSM :=
|
||||
CVSCO_NSS :=
|
||||
endif
|
||||
ifeq (,$(filter directory/c-sdk, $(BUILD_MODULE_CVS)))
|
||||
CVSCO_LDAPCSDK :=
|
||||
endif
|
||||
ifeq (,$(filter accessible, $(BUILD_MODULE_CVS)))
|
||||
CVSCO_ACCESSIBLE :=
|
||||
endif
|
||||
ifeq (,$(filter gfx2, $(BUILD_MODULE_CVS)))
|
||||
CVSCO_GFX2 :=
|
||||
endif
|
||||
ifeq (,$(filter modules/libpr0n, $(BUILD_MODULE_CVS)))
|
||||
CVSCO_IMGLIB2 :=
|
||||
endif
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS defines for SeaMonkey
|
||||
#
|
||||
ifeq ($(MOZ_CO_MODULE),)
|
||||
MOZ_CO_MODULE := SeaMonkeyAll
|
||||
endif
|
||||
CVSCO_SEAMONKEY := $(CVSCO) $(CVS_CO_DATE_FLAGS) $(MOZ_CO_MODULE)
|
||||
|
||||
####################################
|
||||
# CVS defined for libart (pulled and built if MOZ_INTERNAL_LIBART_LGPL is set)
|
||||
#
|
||||
CVSCO_LIBART := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/other-licenses/libart_lgpl
|
||||
|
||||
ifdef MOZ_INTERNAL_LIBART_LGPL
|
||||
FASTUPDATE_LIBART := fast_update $(CVSCO_LIBART)
|
||||
CHECKOUT_LIBART := cvs_co $(CVSCO_LIBART)
|
||||
else
|
||||
CHECKOUT_LIBART := true
|
||||
FASTUPDATE_LIBART := true
|
||||
endif
|
||||
|
||||
####################################
|
||||
# CVS defines for Calendar (pulled and built if MOZ_CALENDAR is set)
|
||||
#
|
||||
CVSCO_CALENDAR := $(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/calendar
|
||||
|
||||
ifdef MOZ_CALENDAR
|
||||
FASTUPDATE_CALENDAR := fast_update $(CVSCO_CALENDAR)
|
||||
CHECKOUT_CALENDAR := cvs_co $(CVSCO_CALENDAR)
|
||||
else
|
||||
CHECKOUT_CALENDAR := true
|
||||
FASTUPDATE_CALENDAR := true
|
||||
endif
|
||||
|
||||
|
||||
# because some cygwin tools can't handle native dos-drive paths & vice-versa
|
||||
# force configure to use a relative path for --srcdir
|
||||
# need a better check for win32
|
||||
# and we need to get OBJDIR earlier
|
||||
ifdef MOZ_TOOLS
|
||||
_tmpobjdir := $(shell cygpath -u $(OBJDIR))
|
||||
_abs2rel := $(shell cygpath -w $(TOPSRCDIR)/build/unix/abs2rel.pl | sed -e 's|\\|/|g')
|
||||
_OBJ2SRCPATH := $(shell $(_abs2rel) $(TOPSRCDIR) $(_tmpobjdir))
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# Rules
|
||||
#
|
||||
|
||||
# Print out any options loaded from mozconfig.
|
||||
all build checkout clean depend distclean export libs install realclean::
|
||||
@if test -f .mozconfig.out; then \
|
||||
cat .mozconfig.out; \
|
||||
rm -f .mozconfig.out; \
|
||||
else true; \
|
||||
fi
|
||||
|
||||
ifdef _IS_FIRST_CHECKOUT
|
||||
all:: checkout build
|
||||
else
|
||||
all:: checkout alldep
|
||||
endif
|
||||
|
||||
# Windows equivalents
|
||||
pull_all: checkout
|
||||
build_all: build
|
||||
build_all_dep: alldep
|
||||
build_all_depend: alldep
|
||||
clobber clobber_all: clean
|
||||
pull_and_build_all: checkout alldep
|
||||
|
||||
# Do everything from scratch
|
||||
everything: checkout clean build
|
||||
|
||||
####################################
|
||||
# CVS checkout
|
||||
#
|
||||
checkout::
|
||||
# @: Backup the last checkout log.
|
||||
@if test -f $(CVSCO_LOGFILE) ; then \
|
||||
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
|
||||
else true; \
|
||||
fi
|
||||
ifdef RUN_AUTOCONF_LOCALLY
|
||||
@echo "Removing local configures" ; \
|
||||
cd $(ROOTDIR) && \
|
||||
$(RM) -f mozilla/configure mozilla/nsprpub/configure \
|
||||
mozilla/directory/c-sdk/configure
|
||||
endif
|
||||
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
|
||||
@echo '$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk'; \
|
||||
cd $(ROOTDIR) && \
|
||||
$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk
|
||||
@cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout
|
||||
|
||||
real_checkout:
|
||||
# @: Start the checkout. Split the output to the tty and a log file. \
|
||||
# : If it fails, touch an error file because "tee" hides the error.
|
||||
@failed=.cvs-failed.tmp; rm -f $$failed*; \
|
||||
cvs_co() { echo "$$@" ; \
|
||||
("$$@" || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
|
||||
if test -f $$failed; then false; else true; fi; }; \
|
||||
cvs_co $(CVSCO_NSPR) && \
|
||||
cvs_co $(CVSCO_NSS) && \
|
||||
cvs_co $(CVSCO_PSM) && \
|
||||
cvs_co $(CVSCO_LDAPCSDK) && \
|
||||
cvs_co $(CVSCO_ACCESSIBLE) && \
|
||||
cvs_co $(CVSCO_GFX2) && \
|
||||
cvs_co $(CVSCO_IMGLIB2) && \
|
||||
$(CHECKOUT_CALENDAR) && \
|
||||
$(CHECKOUT_LIBART) && \
|
||||
cvs_co $(CVSCO_SEAMONKEY) && \
|
||||
cvs_co $(CVSCO_NOSUBDIRS)
|
||||
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
|
||||
# @: Check the log for conflicts. ;
|
||||
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
|
||||
if test "$$conflicts" ; then \
|
||||
echo "$(MAKE): *** Conflicts during checkout." ;\
|
||||
echo "$$conflicts" ;\
|
||||
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
|
||||
false; \
|
||||
else true; \
|
||||
fi
|
||||
ifdef RUN_AUTOCONF_LOCALLY
|
||||
@echo Generating configures using $(AUTOCONF) ; \
|
||||
cd $(TOPSRCDIR) && $(AUTOCONF) && \
|
||||
cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \
|
||||
cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF)
|
||||
endif
|
||||
|
||||
fast-update:
|
||||
# @: Backup the last checkout log.
|
||||
@if test -f $(CVSCO_LOGFILE) ; then \
|
||||
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
|
||||
else true; \
|
||||
fi
|
||||
ifdef RUN_AUTOCONF_LOCALLY
|
||||
@echo "Removing local configures" ; \
|
||||
cd $(ROOTDIR) && \
|
||||
$(RM) -f mozilla/configure mozilla/nsprpub/configure \
|
||||
mozilla/directory/c-sdk/configure
|
||||
endif
|
||||
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
|
||||
@echo '$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk'; \
|
||||
cd $(ROOTDIR) && \
|
||||
$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk
|
||||
@cd $(TOPSRCDIR) && \
|
||||
$(MAKE) -f client.mk real_fast-update
|
||||
|
||||
real_fast-update:
|
||||
# @: Start the update. Split the output to the tty and a log file. \
|
||||
# : If it fails, touch an error file because "tee" hides the error.
|
||||
@failed=.fast_update-failed.tmp; rm -f $$failed*; \
|
||||
fast_update() { (config/cvsco-fast-update.pl $$@ || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
|
||||
if test -f $$failed; then false; else true; fi; }; \
|
||||
cvs_co() { echo "$$@" ; \
|
||||
("$$@" || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
|
||||
if test -f $$failed; then false; else true; fi; }; \
|
||||
fast_update $(CVSCO_NSPR) && \
|
||||
cd $(ROOTDIR) && \
|
||||
failed=mozilla/.fast_update-failed.tmp && \
|
||||
cvs_co $(CVSCO_NSS) && \
|
||||
failed=.fast_update-failed.tmp && \
|
||||
cd mozilla && \
|
||||
fast_update $(CVSCO_PSM) && \
|
||||
fast_update $(CVSCO_LDAPCSDK) && \
|
||||
fast_update $(CVSCO_ACCESSIBLE) && \
|
||||
fast_update $(CVSCO_GFX2) && \
|
||||
fast_update $(CVSCO_IMGLIB2) && \
|
||||
$(FASTUPDATE_CALENDAR) && \
|
||||
$(FASTUPDATE_LIBART) && \
|
||||
fast_update $(CVSCO_SEAMONKEY) && \
|
||||
fast_update $(CVSCO_NOSUBDIRS)
|
||||
@echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE)
|
||||
# @: Check the log for conflicts. ;
|
||||
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
|
||||
if test "$$conflicts" ; then \
|
||||
echo "$(MAKE): *** Conflicts during fast-update." ;\
|
||||
echo "$$conflicts" ;\
|
||||
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
|
||||
false; \
|
||||
else true; \
|
||||
fi
|
||||
ifdef RUN_AUTOCONF_LOCALLY
|
||||
@echo Generating configures using $(AUTOCONF) ; \
|
||||
cd $(TOPSRCDIR) && $(AUTOCONF) && \
|
||||
cd $(TOPSRCDIR)/nsprpub && $(AUTOCONF) && \
|
||||
cd $(TOPSRCDIR)/directory/c-sdk && $(AUTOCONF)
|
||||
endif
|
||||
|
||||
####################################
|
||||
# Web configure
|
||||
|
||||
WEBCONFIG_FILE := $(HOME)/.mozconfig
|
||||
|
||||
MOZCONFIG2CONFIGURATOR := build/autoconf/mozconfig2configurator
|
||||
webconfig:
|
||||
@cd $(TOPSRCDIR); \
|
||||
url=`$(MOZCONFIG2CONFIGURATOR) $(TOPSRCDIR)`; \
|
||||
echo Running mozilla with the following url: ;\
|
||||
echo ;\
|
||||
echo $$url ;\
|
||||
mozilla -remote "openURL($$url)" || \
|
||||
netscape -remote "openURL($$url)" || \
|
||||
mozilla $$url || \
|
||||
netscape $$url ;\
|
||||
echo ;\
|
||||
echo 1. Fill out the form on the browser. ;\
|
||||
echo 2. Save the results to $(WEBCONFIG_FILE)
|
||||
|
||||
#####################################################
|
||||
# First Checkout
|
||||
|
||||
ifdef _IS_FIRST_CHECKOUT
|
||||
# First time, do build target in a new process to pick up new files.
|
||||
build::
|
||||
$(MAKE) -f $(TOPSRCDIR)/client.mk build
|
||||
else
|
||||
|
||||
#####################################################
|
||||
# After First Checkout
|
||||
|
||||
|
||||
####################################
|
||||
# Configure
|
||||
|
||||
CONFIG_STATUS := $(wildcard $(OBJDIR)/config.status)
|
||||
CONFIG_CACHE := $(wildcard $(OBJDIR)/config.cache)
|
||||
|
||||
ifdef RUN_AUTOCONF_LOCALLY
|
||||
EXTRA_CONFIG_DEPS := \
|
||||
$(TOPSRCDIR)/aclocal.m4 \
|
||||
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
|
||||
$(NULL)
|
||||
|
||||
$(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
|
||||
@echo Generating $@ using autoconf
|
||||
cd $(TOPSRCDIR); $(AUTOCONF)
|
||||
endif
|
||||
|
||||
CONFIG_STATUS_DEPS_L10N := $(wildcard $(TOPSRCDIR)/l10n/makefiles.all)
|
||||
|
||||
CONFIG_STATUS_DEPS := \
|
||||
$(TOPSRCDIR)/configure \
|
||||
$(TOPSRCDIR)/allmakefiles.sh \
|
||||
$(TOPSRCDIR)/.mozconfig.mk \
|
||||
$(wildcard $(TOPSRCDIR)/nsprpub/configure) \
|
||||
$(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \
|
||||
$(wildcard $(TOPSRCDIR)/mailnews/makefiles) \
|
||||
$(CONFIG_STATUS_DEPS_L10N) \
|
||||
$(wildcard $(TOPSRCDIR)/themes/makefiles) \
|
||||
$(NULL)
|
||||
|
||||
# configure uses the program name to determine @srcdir@. Calling it without
|
||||
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
|
||||
# path of $(TOPSRCDIR).
|
||||
ifeq ($(TOPSRCDIR),$(OBJDIR))
|
||||
CONFIGURE := ./configure
|
||||
else
|
||||
CONFIGURE := $(TOPSRCDIR)/configure
|
||||
endif
|
||||
|
||||
ifdef _OBJ2SRCPATH
|
||||
CONFIGURE_ARGS := --srcdir=$(_OBJ2SRCPATH) $(CONFIGURE_ARGS)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
|
||||
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
|
||||
@echo cd $(OBJDIR);
|
||||
@echo $(CONFIGURE) $(CONFIGURE_ARGS)
|
||||
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
|
||||
|| ( echo "*** Fix above errors and then restart with\
|
||||
\"$(MAKE) -f client.mk build\"" && exit 1 )
|
||||
@touch $(OBJDIR)/Makefile
|
||||
|
||||
ifdef CONFIG_STATUS
|
||||
$(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
|
||||
cd $(OBJDIR); \
|
||||
CONFIG_FILES=config/autoconf.mk ./config.status
|
||||
endif
|
||||
|
||||
|
||||
####################################
|
||||
# Depend
|
||||
|
||||
depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
||||
$(MOZ_MAKE) export && $(MOZ_MAKE) depend
|
||||
|
||||
####################################
|
||||
# Build it
|
||||
|
||||
build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
||||
$(MOZ_MAKE)
|
||||
|
||||
####################################
|
||||
# Other targets
|
||||
|
||||
# Pass these target onto the real build system
|
||||
install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
||||
$(MOZ_MAKE) $@
|
||||
|
||||
cleansrcdir:
|
||||
@cd $(TOPSRCDIR); \
|
||||
if [ -f webshell/embed/gtk/Makefile ]; then \
|
||||
$(MAKE) -C webshell/embed/gtk distclean; \
|
||||
fi; \
|
||||
if [ -f Makefile ]; then \
|
||||
$(MAKE) distclean ; \
|
||||
else \
|
||||
echo "Removing object files from srcdir..."; \
|
||||
rm -fr `find . -type d \( -name .deps -print -o -name CVS \
|
||||
-o -exec test ! -d {}/CVS \; \) -prune \
|
||||
-o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
|
||||
build/autoconf/clean-config.sh; \
|
||||
fi;
|
||||
|
||||
# (! IS_FIRST_CHECKOUT)
|
||||
endif
|
||||
|
||||
.PHONY: checkout real_checkout depend build export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything
|
||||
21
mozilla/cmd/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
DIRS = xfe patcher
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
57
mozilla/cmd/dialup/as_html/1step.htm
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="1step.js"></SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js"></LINK>
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="1step100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<P CLASS="title"><B>Connecting to the Internet <BR>account server...</B></P>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH=500>
|
||||
<TR>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=42>
|
||||
<APPLET ARCHIVE="asw.jar" CODE="netscape/asw/CPGeneratorProgress.class" HEIGHT=140 WIDTH=400></APPLET>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
242
mozilla/cmd/dialup/as_html/1step.js
Normal file
@@ -0,0 +1,242 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
var globals = parent.parent.globals;
|
||||
var plugin = globals.document.setupPlugin;
|
||||
var documentVars = globals.document.vars;
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
parent.parent.globals.debug( "1step go" );
|
||||
|
||||
if ( parent.parent.globals.document.vars.editMode.value == "yes" )
|
||||
return true;
|
||||
else
|
||||
return checkData();
|
||||
}
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function configureDialer( configFolder, acctSetupIni, regFile )
|
||||
{
|
||||
globals.debug( "Configuring dialer" );
|
||||
|
||||
var intlFlag = globals.GetNameValuePair( acctSetupIni, "Mode Selection", "IntlMode" );
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
// * determine name of scripting file
|
||||
var scriptEnabledFlag = "FALSE";
|
||||
var scriptFile = globals.GetNameValuePair( regFile, "Dial-In Configuration", "ScriptFileName" );
|
||||
if ( scriptFile != null && scriptFile != "" )
|
||||
{
|
||||
scriptFile = configFolder + scriptFile;
|
||||
scriptEnabledFlag = "TRUE";
|
||||
}
|
||||
else
|
||||
{
|
||||
scriptFile = "";
|
||||
scriptEnabledFlag = "FALSE";
|
||||
}
|
||||
|
||||
// * determine tty
|
||||
var ttyFlag = globals.GetNameValuePair( regFile, "Security", "SecurityDevice" );
|
||||
ttyFlag = ttyFlag.toLowerCase();
|
||||
if ( ttyFlag == "yes" )
|
||||
ttyFlag = "TRUE";
|
||||
else
|
||||
ttyFlag = "FALSE";
|
||||
|
||||
|
||||
// * determine outside line access string
|
||||
var outsideLineAccessStr = "";
|
||||
if ( documentVars.prefixData.value != "" )
|
||||
{
|
||||
outsideLineAccessStr = documentVars.prefixData.value;
|
||||
x = outsideLineAccessStr.indexOf( "," );
|
||||
if ( x < 0 )
|
||||
outsideLineAccessStr = outsideLineAccessStr + ",";
|
||||
}
|
||||
|
||||
|
||||
// * configure dialer for Registration Server
|
||||
dialerData = plugin.newStringArray( 28 ); // increment this # as new dialer strings are added
|
||||
dialerData[ 0 ] = "FileName=" + regFile;
|
||||
dialerData[ 1 ] = "AccountName=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "SiteName" );
|
||||
dialerData[ 2 ] = "ISPPhoneNum=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Phone" );
|
||||
dialerData[ 3 ] = "LoginName=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Name" );
|
||||
dialerData[ 4 ] = "Password=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Password" );
|
||||
dialerData[ 5 ] = "DNSAddress=" + globals.GetNameValuePair( regFile, "IP", "DNSAddress" );
|
||||
dialerData[ 6 ] = "DNSAddress2=" + globals.GetNameValuePair( regFile, "IP", "DNSAddress2" );
|
||||
dialerData[ 7 ] = "DomainName=" + globals.GetNameValuePair( regFile, "IP", "DomainName" );
|
||||
dialerData[ 8 ] = "IPAddress=" + globals.GetNameValuePair( regFile, "IP", "IPAddress" );
|
||||
dialerData[ 9 ] = "IntlMode=" + ( ( intlFlag == "yes" ) ? "TRUE" : "FALSE" );
|
||||
dialerData[ 10 ] = "DialOnDemand=TRUE";
|
||||
dialerData[ 11 ] = "ModemName=" + globals.document.vars.modem.value;
|
||||
dialerData[ 12 ] = "ModemType=" + plugin.GetModemType( documentVars.modem.value );
|
||||
dialerData[ 13 ] = "DialType=" + documentVars.dialMethod.value;
|
||||
dialerData[ 14 ] = "OutsideLineAccess=" + outsideLineAccessStr;
|
||||
dialerData[ 15 ] = "DisableCallWaiting=" + ( ( documentVars.cwData.value != "" ) ? "TRUE" : "FALSE" );
|
||||
dialerData[ 16 ] = "DisableCallWaitingCode=" + documentVars.cwData.value;
|
||||
dialerData[ 17 ] = "UserAreaCode=" + documentVars.modemAreaCode.value; // XXX what to do if international mode?
|
||||
dialerData[ 18 ] = "CountryCode=" + documentVars.countryCode.value;
|
||||
dialerData[ 19 ] = "LongDistanceAccess=1"; // XXX
|
||||
dialerData[ 20 ] = "DialAsLongDistance=TRUE"; // XXX
|
||||
dialerData[ 21 ] = "DialAreaCode=TRUE"; // XXX
|
||||
dialerData[ 22 ] = "ScriptEnabled=" + scriptEnabledFlag;
|
||||
dialerData[ 23 ] = "ScriptFileName=" + scriptFile;
|
||||
dialerData[ 24 ] = "NeedsTTYWindow=" + ttyFlag;
|
||||
dialerData[ 25 ] = "Location=Home";
|
||||
dialerData[ 26 ] = "DisconnectTime=" + globals.GetNameValuePair( acctSetupIni, "Mode Selection", "Dialer_Disconnect_After" );
|
||||
dialerData[ 27 ] = "Path=Server";
|
||||
|
||||
// * write out dialer data to Java Console
|
||||
if ( documentVars.debugMode.value.toLowerCase() == "yes" )
|
||||
{
|
||||
globals.debug( "\nDialer data (for Registration Server): " );
|
||||
var numElements = dialerData.length;
|
||||
for ( var x = 0; x < numElements; x++ )
|
||||
globals.debug( " " + x + ": " + dialerData[ x ] );
|
||||
}
|
||||
|
||||
// * configure the dialer
|
||||
plugin.DialerConfig( dialerData, true );
|
||||
|
||||
// * check if we need to reboot
|
||||
if ( plugin.NeedReboot() == true )
|
||||
{
|
||||
// XXX hardcode in name of next screen???
|
||||
globals.forceReboot( "1step.htm" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( plugin.DialerConnect() == false )
|
||||
{
|
||||
plugin.DialerHangup();
|
||||
// XXX hardcode in name of next screen???
|
||||
window.location.replace( "error.htm" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function loadData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
|
||||
// * only connect to reggie if editmode is off
|
||||
if ( documentVars.editMode.value != "yes" )
|
||||
{
|
||||
var configFolder = globals.getConfigFolder( self );
|
||||
var acctSetupIni = globals.getAcctSetupFilename( self );
|
||||
var regFile = configFolder + documentVars.regServer.value;
|
||||
|
||||
|
||||
var regSource = globals.GetNameValuePair( acctSetupIni, "Mode Selection", "RegSource" );
|
||||
|
||||
var localFlag = globals.GetNameValuePair( regFile, "Dial-In Configuration", "LocalMode" );
|
||||
localFlag = localFlag.toLowerCase();
|
||||
globals.debug( "localFlag:" + localFlag );
|
||||
if ( localFlag != "yes" )
|
||||
{
|
||||
globals.debug( "LocalMode==no" );
|
||||
var connectStatusFlag = plugin.IsDialerConnected();
|
||||
if ( connectStatusFlag == true )
|
||||
{
|
||||
if ( confirm( "Account Setup can't connect until you close your current connection. Close the connection now?" ) == false )
|
||||
return;
|
||||
plugin.DialerHangup();
|
||||
}
|
||||
|
||||
configureDialer( configFolder, acctSetupIni, regFile );
|
||||
}
|
||||
|
||||
regCGI = globals.GetNameValuePair( regFile, "IP", "RegCGI" );
|
||||
regRoot = globals.GetNameValuePair( regFile, "Configuration", "RegRoot" );
|
||||
metadataMode = globals.GetNameValuePair( regFile, "Configuration", "MetadataMode" );
|
||||
if ( metadataMode == "no" )
|
||||
globals.debug( "MetadataMode==no, you will not be downloading necessary metadata" );
|
||||
|
||||
if ( regCGI == null || regCGI == "" )
|
||||
{
|
||||
alert( "Internal problem determining the Registration Server." );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( regRoot == null )
|
||||
{
|
||||
alert( "Internal problem determining location of Registration Server data file repository (RegRoot)." );
|
||||
return;
|
||||
}
|
||||
/*
|
||||
// * write out reggie data to Java Console
|
||||
if ( documentVars.debugMode.value.toLowerCase() == "yes" )
|
||||
{
|
||||
globals.debug( "\nRegServer data: " + document.forms[ 0 ].action );
|
||||
var numElements = document.forms[ 0 ].length;
|
||||
for ( var x = 0; x < document.forms[ 0 ].length; x++ )
|
||||
globals.debug( " " + x + ": " + document.forms[ 0 ].elements[ x ].name + "=" + document.forms[ 0 ].elements[ x ].value );
|
||||
}
|
||||
*/
|
||||
|
||||
// * submit reggie data
|
||||
navigator.preference( "security.warn_submit_insecure", false );
|
||||
navigator.preference( "security.warn_entering_secure", false );
|
||||
navigator.preference( "security.warn_leaving_secure", false );
|
||||
|
||||
// * automatically submit form to registration server
|
||||
//document.forms[ 0 ].submit();
|
||||
|
||||
reggieData = plugin.newStringArray( 8 ); // increment this # as new dialer strings are added
|
||||
reggieData[ 0 ] = "CST_PHONE_NUMBER=" + documentVars.modemPhoneNumber.value;
|
||||
reggieData[ 1 ] = "REG_SOURCE=" + regSource;
|
||||
reggieData[ 2 ] = "CLIENT_LANGUAGE=" + navigator.language;
|
||||
reggieData[ 3 ] = "CST_AREA_CODE_1=" + documentVars.modemAreaCode.value;
|
||||
reggieData[ 4 ] = "CST_AREA_CODE_2=" + documentVars.altAreaCode1.value;
|
||||
reggieData[ 5 ] = "CST_AREA_CODE_3=" + documentVars.altAreaCode2.value;
|
||||
reggieData[ 6 ] = "CST_AREA_CODE_4=" + documentVars.altAreaCode3.value;
|
||||
reggieData[ 7 ] = "CST_COUNTRY_CODE=" + "1";
|
||||
|
||||
/*documentVars.countryCode.value;*/
|
||||
|
||||
//if ( localFlag != "yes" )
|
||||
// globals.set1StepMode( 1 );
|
||||
|
||||
var result = plugin.GenerateComparePage( globals.getFolder( self ), regCGI, regRoot, metadataMode, reggieData );
|
||||
|
||||
plugin.DialerHangup();
|
||||
//if ( localFlag != "yes" )
|
||||
// globals.oneStepSemaphore = true;
|
||||
|
||||
if ( result == true )
|
||||
window.location.replace( "compwrap.htm" );
|
||||
else
|
||||
window.location.replace( "error.htm" );
|
||||
}
|
||||
}
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
52
mozilla/cmd/dialup/as_html/2step.htm
Normal file
@@ -0,0 +1,52 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="2step.js"></SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js"></LINK>
|
||||
</HEAD>
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="2step100">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
<P CLASS="title"><B>Download</B></P>
|
||||
<P>Connect to Internet Service Provider for account creation</P>
|
||||
<CENTER>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ID="2step101">
|
||||
generatePopNumberList();
|
||||
</SCRIPT>
|
||||
</CENTER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
79
mozilla/cmd/dialup/as_html/2step.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
// * skip if we're in edit mode
|
||||
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
|
||||
{
|
||||
if ( document.forms && document.forms[ 0 ] && document.forms[ 0 ].popList )
|
||||
parent.parent.globals.document.setupPlugin.CreateConfigIAS(
|
||||
parent.parent.globals.selectedISP, document.forms[ 0 ].popList.selectedIndex );
|
||||
else
|
||||
parent.parent.globals.document.setupPlugin.CreateConfigIAS(
|
||||
parent.parent.globals.selectedISP, -1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
function generatePopNumberList()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var list = parent.parent.globals.document.setupPlugin.GetISPPopList(
|
||||
parent.parent.globals.selectedISP );
|
||||
|
||||
parent.parent.globals.debug( "generating pop list" );
|
||||
if ( list && list.length > 0 )
|
||||
{
|
||||
parent.parent.globals.debug( "emitting table" );
|
||||
document.writeln( "<TABLE CELLPADDING=2 CELLSPACING=0 ID='minspace'><TR><TD ALIGN=LEFT VALIGN=TOP HEIGHT=25><spacer type=vertical size=2><B>Pick a phone number from the following list to connect to:</B></TD><TD ALIGN=LEFT VALIGN=TOP><FORM><SELECT NAME='popList'>");
|
||||
for ( var x = 0; x < list.length; x++ )
|
||||
{
|
||||
var name = list[ x ];
|
||||
var selected = ( x == 0 ) ? " SELECTED" : "";
|
||||
document.writeln( "<OPTION VALUE='" + x + "'" + selected + ">" + name );
|
||||
}
|
||||
document.writeln( "</SELECT></FORM></TD></TR></TABLE>" );
|
||||
}
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
134
mozilla/cmd/dialup/as_html/aboutbox.htm
Normal file
@@ -0,0 +1,134 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="aboutbox.js">
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR=EEEEEE onLoad="loadData()" ID="aboutbox100">
|
||||
|
||||
<LAYER NAME="programName" VISIBILITY=hidden LEFT=-100 TOP=0 HEIGHT=100 WIDTH=100>
|
||||
<TABLE BORDER=0 WIDTH="100%">
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=top><STRONG>Account Setup</STRONG><BR>4.0</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="programDesc" VISIBILITY=hidden LEFT=250 TOP=-100 HEIGHT=100 WIDTH=100>
|
||||
<TABLE BORDER=0 WIDTH="100%">
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=top><STRONG>Internet<BR>Signup<BR>Program</STRONG></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="programCopyRight" VISIBILITY=hidden LEFT=740 TOP=0 HEIGHT=100 WIDTH=200>
|
||||
<TABLE BORDER=0 WIDTH="100%">
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=top>Copyright © 1996, 1997<BR>Netscape Communications Corp.<BR>All Rights Reserved.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="ProgramThanks" VISIBILITY=hidden LEFT=10 TOP=480 WIDTH=580>
|
||||
<CENTER>Brought to you by:</CENTER>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER=0 WIDTH="100%" BGCOLOR=CCCCCC>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Client Engineering</STRONG></TD>
|
||||
<TD>Robert John Churchill, Rex Lam, Tim McClarren, Arshad Tayyeb, Cathleen Wang, Stella Yun</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>FreePPP</STRONG></TD>
|
||||
<TD>Steve Dagley</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Server Engineering</STRONG></TD>
|
||||
<TD>Steve Elmer, Lucy Wu</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Documentation/Help</STRONG></TD>
|
||||
<TD>Dirk Dougherty, Robin Foster, Kate O'Day</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>User Experience</STRONG></TD>
|
||||
<TD>Jim Corban, Valerie Hunter</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Kwality Assurance</STRONG></TD>
|
||||
<TD>Aracely Areas, John Bennett, Bruce Gay, Sarah Groves, Vashti Holt, Brent Martin, Dylan Shea, John Unruh, Pascal Vin</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Release Engineering</STRONG></TD>
|
||||
<TD>Don Bragg, Doug Turner, Chris Yeh</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>International</STRONG></TD>
|
||||
<TD>David Yett</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Management</STRONG></TD>
|
||||
<TD>Leland Hambley, Nancy Wang, Monique Barbanson</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Marketing</STRONG></TD>
|
||||
<TD>Ken Hickman, Debra Evans, John Freeborg, Julie Herendeen</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Thanks!</STRONG></TD>
|
||||
<TD>The entire Communicator team!</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=center VALIGN=middle><STRONG>Thank Goodness for...</STRONG></TD>
|
||||
<TD>Mountain Dew!</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
</CENTER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="NetscapeIcon" VISIBILITY=hidden LEFT=250 TOP=90 WIDTH=100 HEIGHT=50>
|
||||
<CENTER>
|
||||
<IMG SRC="images/netscape.gif" WIDTH=32 HEIGHT=32 BORDER=0><BR>
|
||||
<LAYER NAME="NetscapeString" VISIBILITY=hidden LEFT=16>
|
||||
Go Netscape!
|
||||
</LAYER>
|
||||
</CENTER>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
113
mozilla/cmd/dialup/as_html/aboutbox.js
Normal file
@@ -0,0 +1,113 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
if ( msg=="Back" )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if ( parent && parent.controls && parent.controls.generateControls )
|
||||
{
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
document.layers[ "programName" ].visibility = "SHOW";
|
||||
animate1();
|
||||
}
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
function animate1()
|
||||
{
|
||||
if ( document.layers[ "programName" ].left < 100 )
|
||||
{
|
||||
document.layers[ "programName" ].moveBy( 10, 0 );
|
||||
setTimeout( "animate1()", 100 );
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "programDesc" ].visibility = "SHOW";
|
||||
animate2();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function animate2()
|
||||
{
|
||||
if ( document.layers[ "programDesc" ].top < 0 )
|
||||
{
|
||||
document.layers[ "programDesc" ].moveBy( 0, 10 );
|
||||
setTimeout( "animate2()", 100 );
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "programCopyRight" ].visibility = "SHOW";
|
||||
animate3();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function animate3()
|
||||
{
|
||||
if ( document.layers[ "programCopyRight" ].left > 380 )
|
||||
{
|
||||
document.layers[ "programCopyRight" ].moveBy( -10, 0);
|
||||
setTimeout( "animate3()", 100 );
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "NetscapeIcon" ].visibility = "SHOW";
|
||||
document.layers[ "ProgramThanks" ].visibility = "SHOW";
|
||||
animate4();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function animate4()
|
||||
{
|
||||
if ( document.layers[ "ProgramThanks" ].top > 50 )
|
||||
{
|
||||
document.layers[ "NetscapeIcon" ].moveBy( 0, 5 );
|
||||
document.layers[ "ProgramThanks" ].moveBy( 0, -10 );
|
||||
setTimeout( "animate4()", 100 );
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "NetscapeIcon" ].document.layers[ "NetscapeString" ].visibility = "SHOW";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
104
mozilla/cmd/dialup/as_html/accounts.htm
Normal file
@@ -0,0 +1,104 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="accounts.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" ONLOAD="loadData()" ID="accounts100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
|
||||
<P CLASS="title"><B>Welcome to Account Setup</B></P>
|
||||
|
||||
<!-- ÇSPACER TYPE=VERTICAL SIZE=16È -->
|
||||
|
||||
<P>Please click one of the buttons below to choose whether you would like to create a new Internet account or set up Communicator to access an account that you already have.</P>
|
||||
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="500">
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN="TOP" WIDTH="66" HEIGHT="54" ALIGN="LEFT">
|
||||
<A HREF="about:blank" ONCLICK="document.images['new'].src='images/str_dn.gif'; setPath('New Path'); return false" ONMOUSEOVER="document.images['new'].src='images/str_mo.gif'" ONMOUSEOUT="document.images['new'].src='images/start.gif'" ID="accounts101">
|
||||
<IMG NAME="new" SRC="images/start.gif" LOWSRC="images/str_dn.gif" BORDER=0 HEIGHT=53 WIDTH=54></A>
|
||||
</TD>
|
||||
|
||||
<TD ALIGN=LEFT WIDTH="358" VALIGN="TOP" CLASS="accounts">
|
||||
|
||||
<B>I want to create a new Internet account.</B>
|
||||
|
||||
<SPACER TYPE=VERTICAL SIZE=4>
|
||||
|
||||
If you're new to the Internet, Account Setup helps you create an Internet account that you can use right away. You can also choose this option if you want to create a second Internet account or change your Internet service provider.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><SPACER TYPE=VERTICAL SIZE=16>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="66" HEIGHT="54" ALIGN="LEFT">
|
||||
<A HREF="about:blank" ONCLICK="document.images['existing'].src='images/str_dn.gif'; setPath('Existing Path'); return false" ONMOUSEOVER="document.images['existing'].src='images/str_mo.gif'" ONMOUSEOUT="document.images['existing'].src='images/start.gif'" ID="accounts102">
|
||||
<IMG NAME="existing" SRC="images/start.gif" LOWSRC="images/str_dn.gif" BORDER=0 HEIGHT=53 WIDTH=54></A>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" WIDTH="358" VALIGN="TOP" CLASS="accounts">
|
||||
|
||||
<B>I already have an Internet account. I want to set up Communicator to access my account.</B>
|
||||
|
||||
<SPACER TYPE=VERTICAL SIZE=4>
|
||||
|
||||
If you already have an Internet account with an Internet service provider, Account Setup helps you quickly set up Communicator to access your account.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
67
mozilla/cmd/dialup/as_html/accounts.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (msg == parent.parent.globals.document.vars.path.value) {
|
||||
return(true);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function doGo()
|
||||
{
|
||||
parent.controls.go("Next");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setPath(msg)
|
||||
{
|
||||
parent.parent.globals.document.vars.path.value = msg;
|
||||
setTimeout("doGo()",1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
120
mozilla/cmd/dialup/as_html/acctInfo.htm
Normal file
@@ -0,0 +1,120 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 2; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="acctInfo.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="acctInfo100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Information About Yourself</B></P>
|
||||
|
||||
<P>Please enter your name and, optionally, you organization name below. Account Setup sets Communicator to add this information to the email you send and the web pages you create. </P>
|
||||
|
||||
<CENTER>
|
||||
|
||||
|
||||
<TABLE CELLPADDING="3" CELLSPACING="0" border="0" WIDTH=100>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD ALIGN="CENTER" VALIGN="BOTTOM" CLASS="tabletext">
|
||||
First:
|
||||
</TD>
|
||||
<TD ALIGN="CENTER" VALIGN="BOTTOM" CLASS="tabletext">
|
||||
Last:
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT" CLASS="tabletext">
|
||||
<B>Name:</B>
|
||||
<spacer type=vertical size=2>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" CLASS="tabletext">
|
||||
<INPUT NAME="first" TYPE="text" SIZE=25 MAXLENGTH=30>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" CLASS="tabletext">
|
||||
<INPUT NAME="last" TYPE="text" SIZE=26 MAXLENGTH=30>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT" CLASS="tabletext">
|
||||
<B>Organization:</B>
|
||||
<spacer type=vertical size=2>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2" CLASS="tabletext">
|
||||
<INPUT NAME="company" TYPE="text" SIZE=54 MAXLENGTH=30>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
</FORM>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
107
mozilla/cmd/dialup/as_html/acctInfo.js
Normal file
@@ -0,0 +1,107 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go()
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes")
|
||||
return true;
|
||||
else
|
||||
return(checkData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (document.forms[0].first.value == "") {
|
||||
alert("You must enter a first name.");
|
||||
document.forms[0].first.focus();
|
||||
document.forms[0].first.select();
|
||||
return false;
|
||||
}
|
||||
if (document.forms[0].last.value == "") {
|
||||
alert("You must enter a last name.");
|
||||
document.forms[0].last.focus();
|
||||
document.forms[0].last.select();
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if (document.forms[0].areaCode.value == "") {
|
||||
alert("You must enter an area code.");
|
||||
document.forms[0].areaCode.focus();
|
||||
document.forms[0].areaCode.select();
|
||||
return false;
|
||||
}
|
||||
if (document.forms[0].phoneNumber.value == "") {
|
||||
alert("You must enter a telephone number.");
|
||||
document.forms[0].phoneNumber.focus();
|
||||
document.forms[0].phoneNumber.select();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].first == "undefined") || (document.forms[0].first == "[object InputArray]")) ||
|
||||
((document.forms[0].last == "undefined") || (document.forms[0].last == "[object InputArray]")) ||
|
||||
((document.forms[0].company == "undefined") || (document.forms[0].company == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[0].first.value = parent.parent.globals.document.vars.first.value;
|
||||
document.forms[0].last.value = parent.parent.globals.document.vars.last.value;
|
||||
document.forms[0].company.value = parent.parent.globals.document.vars.company.value;
|
||||
// document.forms[0].areaCode.value = parent.parent.globals.document.vars.areaCode.value;
|
||||
// document.forms[0].phoneNumber.value = parent.parent.globals.document.vars.phoneNumber.value;
|
||||
parent.parent.globals.setFocus(document.forms[0].first);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].first == "undefined") || (document.forms[0].first == "[object InputArray]")) ||
|
||||
((document.forms[0].last == "undefined") || (document.forms[0].last == "[object InputArray]")) ||
|
||||
((document.forms[0].company == "undefined") || (document.forms[0].company == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
parent.parent.globals.document.vars.first.value = document.forms[0].first.value;
|
||||
parent.parent.globals.document.vars.last.value = document.forms[0].last.value;
|
||||
parent.parent.globals.document.vars.company.value = document.forms[0].company.value;
|
||||
// parent.parent.globals.document.vars.areaCode.value = document.forms[0].areaCode.value;
|
||||
// parent.parent.globals.document.vars.phoneNumber.value = document.forms[0].phoneNumber.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
175
mozilla/cmd/dialup/as_html/billing.htm
Normal file
@@ -0,0 +1,175 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="billing.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="billing100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Your Billing Information</B></P>
|
||||
|
||||
<P>Internet accounts are paid for by credit card. Please provide information about the credit card that you would like to use for billing. Account Setup forwards this information to your provider when you create your account. </P>
|
||||
|
||||
|
||||
|
||||
<CENTER>
|
||||
|
||||
<TABLE CELLPADDING="2" CELLSPACING="0" border="0">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>Name on Card:</B>
|
||||
<spacer type=vertical size=2>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<INPUT NAME="cardname" TYPE="text" SIZE=30 MAXLENGTH=30>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=6>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>Type of Card:</B>
|
||||
<spacer type=vertical size=4>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<SELECT NAME="cards">
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="billing101">
|
||||
generateCards();
|
||||
</SCRIPT>
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=3>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<spacer type=vertical size=6>
|
||||
<B>Card Number:</B>
|
||||
<spacer type=vertical size=2>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<spacer type=vertical size=4>
|
||||
<INPUT NAME="cardnumber" TYPE="text" SIZE=25 MAXLENGTH=25>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=6>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>Expiration Date:</B>
|
||||
<spacer type=vertical size=4>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
|
||||
<SELECT NAME="month">
|
||||
<OPTION VALUE="January">January
|
||||
<OPTION VALUE="February">February
|
||||
<OPTION VALUE="March">March
|
||||
<OPTION VALUE="April">April
|
||||
<OPTION VALUE="May">May
|
||||
<OPTION VALUE="June">June
|
||||
<OPTION VALUE="July">July
|
||||
<OPTION VALUE="August">August
|
||||
<OPTION VALUE="September">September
|
||||
<OPTION VALUE="October">October
|
||||
<OPTION VALUE="November">November
|
||||
<OPTION VALUE="December">December
|
||||
</SELECT>
|
||||
|
||||
<spacer type=horizontal size=2>
|
||||
|
||||
<SELECT NAME="year">
|
||||
<OPTION VALUE="1997">1997
|
||||
<OPTION VALUE="1998">1998
|
||||
<OPTION VALUE="1999">1999
|
||||
<OPTION VALUE="2000">2000
|
||||
<OPTION VALUE="2001">2001
|
||||
<OPTION VALUE="2002">2002
|
||||
<OPTION VALUE="2003">2003
|
||||
<OPTION VALUE="2004">2004
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</CENTER>
|
||||
|
||||
</FORM>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
319
mozilla/cmd/dialup/as_html/billing.js
Normal file
@@ -0,0 +1,319 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes")
|
||||
return true;
|
||||
else
|
||||
return(checkData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateCards()
|
||||
{
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theCards = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","CardTypes");
|
||||
if (theCards == null || theCards == "") {
|
||||
theCards = "AX,DC,MC,VI";
|
||||
}
|
||||
|
||||
if (theCards.indexOf("AX")>=0) {
|
||||
document.writeln("<OPTION VALUE='American Express'>American Express");
|
||||
}
|
||||
if (theCards.indexOf("DC")>=0) {
|
||||
document.writeln("<OPTION VALUE='Discover Card'>Discover Card");
|
||||
}
|
||||
if (theCards.indexOf("MC")>=0) {
|
||||
document.writeln("<OPTION VALUE='MasterCard'>MasterCard");
|
||||
}
|
||||
if (theCards.indexOf("VI")>=0) {
|
||||
document.writeln("<OPTION VALUE='VISA'>VISA");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].cardname == "undefined") || (document.forms[0].cardname == "[object InputArray]")) ||
|
||||
((document.forms[0].cards == "undefined") || (document.forms[0].cards == "[object InputArray]")) ||
|
||||
((document.forms[0].cardnumber == "undefined") || (document.forms[0].cardnumber == "[object InputArray]")) ||
|
||||
((document.forms[0].month == "undefined") || (document.forms[0].month == "[object InputArray]")) ||
|
||||
((document.forms[0].year == "undefined") || (document.forms[0].year == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[0].cardname.value = parent.parent.globals.document.vars.cardname.value;
|
||||
if (document.forms[0].cardname.value == "") {
|
||||
document.forms[0].cardname.value = parent.parent.globals.document.vars.first.value + " " + parent.parent.globals.document.vars.last.value;
|
||||
}
|
||||
for (var i = 0; i<document.forms[0].cards.length; i++) {
|
||||
if (parent.parent.globals.document.vars.cardtype.value == document.forms[0].cards[i].value) {
|
||||
document.forms[0].cards.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
document.forms[0].cardnumber.value = parent.parent.globals.document.vars.cardnumber.value;
|
||||
|
||||
var month = parent.parent.globals.document.vars.month.value;
|
||||
if (month == "") month = 0;
|
||||
document.forms[0].month.selectedIndex = month;
|
||||
|
||||
var found = false;
|
||||
var year = parent.parent.globals.document.vars.year.value;
|
||||
// if (year == "") year = document.forms[0].year[0].value;
|
||||
for (var i = 0; i<document.forms[0].year.length; i++) {
|
||||
if (year == document.forms[0].year[i].value) {
|
||||
document.forms[0].year.selectedIndex = i;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == false) {
|
||||
document.forms[0].year.selectedIndex = 0;
|
||||
}
|
||||
parent.parent.globals.setFocus(document.forms[0].cardname);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].cardname == "undefined") || (document.forms[0].cardname == "[object InputArray]")) ||
|
||||
((document.forms[0].cards == "undefined") || (document.forms[0].cards == "[object InputArray]")) ||
|
||||
((document.forms[0].cardnumber == "undefined") || (document.forms[0].cardnumber == "[object InputArray]")) ||
|
||||
((document.forms[0].month == "undefined") || (document.forms[0].month == "[object InputArray]")) ||
|
||||
((document.forms[0].year == "undefined") || (document.forms[0].year == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
parent.parent.globals.document.vars.cardname.value = document.forms[0].cardname.value;
|
||||
if (document.forms[0].cards.length>0 && document.forms[0].cards.selectedIndex >=0) {
|
||||
parent.parent.globals.document.vars.cardtype.value = document.forms[0].cards[document.forms[0].cards.selectedIndex].value;
|
||||
}
|
||||
else {
|
||||
parent.parent.globals.document.vars.cardtype.value="";
|
||||
}
|
||||
parent.parent.globals.document.vars.cardnumber.value = document.forms[0].cardnumber.value;
|
||||
parent.parent.globals.document.vars.month.value = document.forms[0].month.selectedIndex;
|
||||
parent.parent.globals.document.vars.year.value = document.forms[0].year[document.forms[0].year.selectedIndex].value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (document.forms[0].cardname.value == "") {
|
||||
alert("You must enter a cardholder name.");
|
||||
document.forms[0].cardname.focus();
|
||||
document.forms[0].cardname.select();
|
||||
return false;
|
||||
}
|
||||
if (document.forms[0].cardnumber.value == "") {
|
||||
alert("You must enter a credit card number.");
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return false;
|
||||
}
|
||||
|
||||
// check cardnumber validity here
|
||||
|
||||
var cardNumber=document.forms[0].cardnumber.value;
|
||||
for (var i=0; i<cardNumber.length; i++) {
|
||||
if ("1234567890 -".indexOf(cardNumber.substring(i,i+1)) == -1) {
|
||||
alert("'" + cardNumber + "' is not a valid card number.");
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
// do cardnumber check-digit validity here
|
||||
|
||||
var length=cardNumber.length;
|
||||
var checkDigit=cardNumber.substring(length-1,length);
|
||||
var tempCardNumber="";
|
||||
for (var i=0; i<cardNumber.length; i++) {
|
||||
if ("1234567890".indexOf(cardNumber.substring(i,i+1))>=0) {
|
||||
tempCardNumber+=cardNumber.substring(i,i+1);
|
||||
}
|
||||
}
|
||||
var length=tempCardNumber.length;
|
||||
var checkSum=0;
|
||||
for (var i=0; i<length-1; i++) {
|
||||
var digit=tempCardNumber.substring(length-i-2,length-i-1);
|
||||
var temp=digit * (1+((i+1)%2));
|
||||
if (temp<10) checkSum=checkSum+temp;
|
||||
else checkSum=checkSum+(temp-9);
|
||||
}
|
||||
checkSum=(10-(checkSum%10))%10;
|
||||
if (checkSum != checkDigit) {
|
||||
alert("'" + cardNumber + "' is not a valid card number.");
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return(false);
|
||||
}
|
||||
|
||||
// do cardtype check
|
||||
|
||||
var cardType="";
|
||||
|
||||
if (cardNumber.substring(0,1)=="3" && cardNumber.substring(1,2)=="7") {
|
||||
cardType="American Express";
|
||||
cardCode="AX";
|
||||
}
|
||||
/*
|
||||
else if (cardNumber.substring(0,1)=="5" && cardNumber.substring(1,2)=="6") {
|
||||
cardType="BankCard";
|
||||
cardCode="BC";
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
else if (cardNumber.substring(0,1)=="3") {
|
||||
cardType="Diner's Club";
|
||||
cardCode="DI";
|
||||
}
|
||||
*/
|
||||
else if (cardNumber.substring(0,1)=="5") {
|
||||
cardType="MasterCard";
|
||||
cardCode="MC";
|
||||
}
|
||||
else if (cardNumber.substring(0,1)=="4") {
|
||||
cardType="VISA";
|
||||
cardCode="VI";
|
||||
}
|
||||
else if (cardNumber.substring(0,1)=="6") {
|
||||
cardType="Discover Card";
|
||||
cardCode="DC";
|
||||
}
|
||||
// else cardType="unknown";
|
||||
|
||||
parent.parent.globals.document.vars.cardcode.value = cardCode;
|
||||
|
||||
if (document.forms[0].cards.length>0) {
|
||||
if (cardType != document.forms[0].cards[document.forms[0].cards.selectedIndex].value) {
|
||||
var found=false;
|
||||
var currentSelection = document.forms[0].cards.selectedIndex;
|
||||
if (cardType!="") {
|
||||
if (!confirm(cardNumber + " is a " + cardType + ". Correct?")) {
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return(false);
|
||||
}
|
||||
for (var i = 0; i < document.forms[0].cards.length; i++) {
|
||||
if (document.forms[0].cards[i].value==cardType) {
|
||||
document.forms[0].cards[i].selected=true;
|
||||
parent.parent.globals.document.vars.cardtype.value=cardType;
|
||||
found=true;
|
||||
}
|
||||
else {
|
||||
document.forms[0].cards[i].selected=false;
|
||||
}
|
||||
}
|
||||
if (found == false && currentSelection>=0) {
|
||||
document.forms[0].cards[currentSelection].selected=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (found==false) {
|
||||
|
||||
// is the card accepted?
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theCards = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","CardTypes");
|
||||
if (theCards == null || theCards == "") {
|
||||
theCards = "AX,DC,MC,VI";
|
||||
}
|
||||
|
||||
if (theCards.indexOf(cardCode)<0) {
|
||||
alert(cardType + " is not accepted for payment.");
|
||||
}
|
||||
else {
|
||||
alert("'" + cardNumber + "' is not a valid card number.");
|
||||
}
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
// check credit card lengths
|
||||
|
||||
var length=tempCardNumber.length;
|
||||
var validLength = false;
|
||||
if (cardCode != "") {
|
||||
if (cardCode == "AX") {
|
||||
if (length == 16) validLength=true;
|
||||
}
|
||||
else if (cardCode == "MC") {
|
||||
if (length == 16) validLength=true;
|
||||
}
|
||||
else if (cardCode == "VI") {
|
||||
if (length == 13 || length == 16) validLength=true;
|
||||
}
|
||||
else if (cardCode == "DC") {
|
||||
if (length == 16) validLength=true;
|
||||
}
|
||||
}
|
||||
if (validLength == false) {
|
||||
alert("'" + cardNumber + "' is not a valid card number. (Invalid length)");
|
||||
document.forms[0].cardnumber.focus();
|
||||
document.forms[0].cardnumber.select();
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
// check month and year
|
||||
|
||||
var today = new Date();
|
||||
var theMonth = today.getMonth();
|
||||
var theYear = today.getYear()+1900;
|
||||
|
||||
var expiredFlag = false;
|
||||
if (theYear > document.forms[0].year[document.forms[0].year.selectedIndex].value) {
|
||||
expiredFlag = true;
|
||||
}
|
||||
else if (theYear == document.forms[0].year[document.forms[0].year.selectedIndex].value) {
|
||||
if (theMonth > document.forms[0].month.selectedIndex) {
|
||||
expiredFlag = true;
|
||||
}
|
||||
}
|
||||
if (expiredFlag) {
|
||||
alert("'" + cardNumber + "' appears to have expired.");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
212
mozilla/cmd/dialup/as_html/clayer.htm
Normal file
@@ -0,0 +1,212 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="clayer1.js">
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="clayer2.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js" >
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/navbar.gif" onLoad="loadData()" ID="clayer100">
|
||||
|
||||
|
||||
|
||||
<NOSCRIPT>
|
||||
<CENTER><STRONG>
|
||||
JavaScript support is disabled!<P>
|
||||
Choose "Edit | Preferences | Advanced" and enable JavaScript, then reload this page.<P>
|
||||
</CENTER></STRONG>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
|
||||
<LAYER NAME="controls" WIDTH=620 HEIGHT=55 TOP=0 LEFT=0>
|
||||
|
||||
<LAYER NAME="help" LEFT=4 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['help'].src='images/hlp_down.gif';var flag=go('Help');document.images['help'].src='images/hlp_up.gif';return false"
|
||||
onMouseOver="document.images['help'].src='images/hlp_mo.gif'"
|
||||
onMouseOut="document.images['help'].src='images/hlp_up.gif'" ID="clayer101">
|
||||
<IMG NAME="help" SRC="images/hlp_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=12 TOP=43>
|
||||
<B CLASS="clayer">HELP</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="exit" LEFT=50 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['exit'].src='images/ext_down.gif';var flag=go('Exit');document.images['exit'].src='images/ext_up.gif';return false"
|
||||
onMouseOver="document.images['exit'].src='images/ext_mo.gif'"
|
||||
onMouseOut="document.images['exit'].src='images/ext_up.gif'" ID="clayer102">
|
||||
<IMG NAME="exit" SRC="images/ext_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=12 TOP=43>
|
||||
<B CLASS="clayer">EXIT</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="back" LEFT=260 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['back'].src='images/bk_down.gif';var flag=go('Back');document.images['back'].src='images/bk_up.gif';return false"
|
||||
onMouseOver="document.images['back'].src='images/bk_mo.gif'"
|
||||
onMouseOut="document.images['back'].src='images/bk_up.gif'" ID="clayer103">
|
||||
<IMG NAME="back" SRC="images/bk_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=4 TOP=43>
|
||||
<B CLASS="clayer">BACK</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="next" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['next'].src='images/nxt_down.gif';var flag=go('Next');document.images['next'].src='images/nxt_up.gif';return false"
|
||||
onMouseOver="document.images['next'].src='images/nxt_mo.gif'"
|
||||
onMouseOut="document.images['next'].src='images/nxt_up.gif'" ID="clayer104">
|
||||
<IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">NEXT</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="connectnow" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['connectnow'].src='images/cn_down.gif';var flag=go('Next');document.images['connectnow'].src='images/cn_up.gif';return false"
|
||||
onMouseOver="document.images['connectnow'].src='images/cn_mo.gif'"
|
||||
onMouseOut="document.images['connectnow'].src='images/cn_up.gif'" ID="clayer105">
|
||||
<IMG NAME="connectnow" SRC="images/cn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT NOW</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="download" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['download'].src='images/cn_down.gif';var flag=go('Next');document.images['download'].src='images/cn_up.gif';return false"
|
||||
onMouseOver="document.images['download'].src='images/cn_mo.gif'"
|
||||
onMouseOut="document.images['download'].src='images/cn_up.gif'" ID="clayer113">
|
||||
<IMG NAME="download" SRC="images/cn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT NOW</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="connectagain" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['connectagain'].src='images/nxt_down.gif';var flag=go('Next');document.images['connectagain'].src='images/nxt_up.gif';return false"
|
||||
onMouseOver="document.images['connectagain'].src='images/nxt_mo.gif'"
|
||||
onMouseOut="document.images['connectagain'].src='images/nxt_up.gif'" ID="clayer106">
|
||||
<IMG NAME="connectagain" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT AGAIN</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="connectserver" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['connectserver'].src='images/cn_down.gif';var flag=go('Next');document.images['connectserver'].src='images/cn_up.gif';return false"
|
||||
onMouseOver="document.images['connectserver'].src='images/cn_mo.gif'"
|
||||
onMouseOut="document.images['connectserver'].src='images/cn_up.gif'" ID="clayer107">
|
||||
<IMG NAME="connectserver" SRC="images/cn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT TO SERVER</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="done" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['done'].src='images/dn_down.gif';var flag=go('Done');document.images['done'].src='images/dn_up.gif';return false"
|
||||
onMouseOver="document.images['done'].src='images/dn_mo.gif'"
|
||||
onMouseOut="document.images['done'].src='images/dn_up.gif'" ID="clayer108">
|
||||
<IMG NAME="done" SRC="images/dn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=4 TOP=43>
|
||||
<B CLASS="clayer">DONE</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="restart" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['restart'].src='images/rb_down.gif';var flag=go('Restart');document.images['restart'].src='images/rb_up.gif';return false"
|
||||
onMouseOver="document.images['restart'].src='images/rb_mo.gif'"
|
||||
onMouseOut="document.images['restart'].src='images/rb_up.gif'" ID="clayer109">
|
||||
<IMG NAME="restart" SRC="images/rb_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">RESTART</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="setup" LEFT=500 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=30 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['setup'].src='images/ff_down.gif';var flag=go('Setup');document.images['setup'].src='images/ff_up.gif';return false"
|
||||
onMouseOver="document.images['setup'].src='images/ff_mo.gif'"
|
||||
onMouseOut="document.images['setup'].src='images/ff_up.gif'" ID="clayer110">
|
||||
<IMG NAME="setup" SRC="images/ff_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=0 TOP=43>
|
||||
<B CLASS="clayer">ACCOUNT SETUP</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="connectlater" LEFT=550 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['later'].src='images/dn_down.gif';var flag=go('Later');document.images['later'].src='images/dn_up.gif';return false"
|
||||
onMouseOver="document.images['later'].src='images/dn_mo.gif'"
|
||||
onMouseOut="document.images['later'].src='images/dn_up.gif'" ID="clayer111">
|
||||
<IMG NAME="later" SRC="images/dn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=10 TOP=43>
|
||||
<B CLASS="clayer">DONE</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
</LAYER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
948
mozilla/cmd/dialup/as_html/clayer1.js
Normal file
@@ -0,0 +1,948 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
compromisePrincipals();
|
||||
|
||||
|
||||
function page( file, section, variable )
|
||||
{
|
||||
this.type = "INFO";
|
||||
this.file = file;
|
||||
this.section = section;
|
||||
this.variable = variable;
|
||||
|
||||
this.fullhistory = false;
|
||||
this.top = false;
|
||||
}
|
||||
|
||||
// the following three functions make sense if you go look at the "Next" clause in the function
|
||||
// "go" below
|
||||
|
||||
// * a "condition" is read from the Account Setup init file (typically "Config\ACCTSET.INI"),
|
||||
// from the section "[section]" and the given variable name, and if the given "value" matches,
|
||||
// the "file" gets loaded
|
||||
function condition( file, section, variable, value )
|
||||
{
|
||||
this.type = "CONDITION";
|
||||
this.file = file;
|
||||
this.section = section;
|
||||
this.variable = variable;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// * a "method" is given in "method" (a JavaScript method), and if when evaluated, it's value
|
||||
// is "value", the given "file" gets loaded
|
||||
function method( file, method, value )
|
||||
{
|
||||
this.type = "METHOD";
|
||||
this.file = file;
|
||||
this.method = method;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// * an "action" simply loads the given "file"
|
||||
function action( file )
|
||||
{
|
||||
this.type = "ACTION";
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
function checkEditMode()
|
||||
{
|
||||
if ( parent.parent && parent.parent.globals && parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes" )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
pages=new Array();
|
||||
|
||||
pages[0]=new Array();
|
||||
pages[0][0]=new page("main.htm",null,null);
|
||||
pages[0][1]=new method("ipreview/inpvw1.htm","parent.content.go('Internet Preview')",true);
|
||||
pages[0][2]=new method("preview/duepvw1.htm","parent.content.go('Preview')",true);
|
||||
pages[0][3]=new method("intro/intro1.htm","parent.controls.checkShowIntroFlag('')",true);
|
||||
//pages[0][4]=new condition("intro/intro1.htm","Mode Selection","Show_Intro_Screens","yes");
|
||||
//pages[0][5]=new condition("needs1.htm","Mode Selection","ForceNew","yes");
|
||||
//pages[0][6]=new condition("useAcct.htm","Mode Selection","ForceExisting","yes");
|
||||
//pages[0][7]=new action("accounts.htm");
|
||||
|
||||
pages[1]=new Array();
|
||||
pages[1][0]=new page("accounts.htm",null,null);
|
||||
pages[1][1]=new method("needs1.htm","parent.content.go('New Path')",true);
|
||||
pages[1][2]=new method("useAcct.htm","parent.content.go('Existing Path')",true);
|
||||
|
||||
// New Account Path
|
||||
|
||||
pages[ 2 ] = new Array();
|
||||
pages[ 2 ][ 0 ] = new page( "needs1.htm", "New Acct Mode", "ShowNewPathInfo" );
|
||||
pages[ 2 ][ 1 ] = new condition( "newAcct.htm", "New Acct Mode", "ShowNewPathInfo", "no" );
|
||||
pages[ 2 ][ 2 ] = new method( "newAcct.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 3 ] = new Array();
|
||||
pages[ 3 ][ 0 ] = new page( "newAcct.htm", "New Acct Mode", "AskPersonalInfo" );
|
||||
pages[ 3 ][ 1 ] = new condition( "billing.htm", "New Acct Mode", "AskPersonalInfo", "no" );
|
||||
pages[ 3 ][ 2 ] = new method( "billing.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 4 ] = new Array();
|
||||
pages[ 4 ][ 0 ] = new page( "billing.htm", "New Acct Mode", "AskBillingInfo" );
|
||||
pages[ 4 ][ 1 ] = new condition( "modem1.htm", "New Acct Mode", "AskBillingInfo", "no" );
|
||||
pages[ 4 ][ 2 ] = new method( "modem1.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 5 ] = new Array();
|
||||
pages[ 5 ][ 0 ] = new page( "modem1.htm", null, null );
|
||||
pages[ 5 ][ 1 ] = new method( "dialinf1.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 6 ] = new Array();
|
||||
pages[ 6 ][ 0 ] = new page( "dialinf1.htm", null, null );
|
||||
pages[ 6 ][ 1 ] = new method( "dialinf2.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 7 ] = new Array();
|
||||
pages[ 7 ][ 0 ] = new page( "dialinf2.htm", null, null );
|
||||
pages[ 7 ][ 1 ] = new method( "download.htm", "parent.content.go('New Path')", true );
|
||||
pages[ 7 ][ 2 ] = new method( "connect2.htm", "parent.content.go('Existing Path')", true );
|
||||
|
||||
pages[ 53 ] = new Array();
|
||||
pages[ 53 ][ 0 ] = new page( "download.htm", null, null );
|
||||
pages[ 53 ][ 1 ] = new method( "1step.htm", "parent.content.go( '' )", true );
|
||||
|
||||
pages[ 54 ] = new Array();
|
||||
pages[ 54 ][ 0 ] = new page( "1step.htm", null, null );
|
||||
|
||||
pages[ 55 ] = new Array();
|
||||
pages[ 55 ][ 0 ] = new page( "compwrap.htm", null, null );
|
||||
pages[ 55 ][ 1 ] = new method( "moreinfo.htm", "parent.content.go( '' )", true );
|
||||
|
||||
pages[ 56 ] = new Array();
|
||||
pages[ 56 ][ 0 ] = new page( "moreinfo.htm", null, null );
|
||||
pages[ 56 ][ 1 ] = new method( "2step.htm", "parent.content.go( '' )", true );
|
||||
|
||||
pages[ 57 ] = new Array();
|
||||
pages[ 57 ][ 0 ] = new page( "2step.htm", null, null );
|
||||
pages[ 57 ][ 1 ] = new method( "register.htm", "parent.content.go( '' )", true );
|
||||
|
||||
pages[ 8 ] = new Array();
|
||||
pages[ 8 ][ 0 ] = new page( "connect1.htm", null, null );
|
||||
pages[ 8 ][ 1 ] = new method( "editfour.htm", "checkEditMode('')", true );
|
||||
pages[ 8 ][ 2 ] = new method( "register.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 9 ] = new Array();
|
||||
pages[ 9 ][ 0 ] = new page( "register.htm", null, null );
|
||||
|
||||
// Existing Account Path
|
||||
|
||||
pages[10]=new Array();
|
||||
pages[10][0]=new page("useAcct.htm",null,null);
|
||||
pages[10][1]=new condition("needs2.htm","Mode Selection","ExistingSRFile","...");
|
||||
pages[10][2]=new method("needs2.htm","parent.content.go('')",true);
|
||||
|
||||
pages[11]=new Array();
|
||||
pages[11][0]=new page("needs2.htm","Existing Acct Mode","ShowExistingPathInfo");
|
||||
pages[11][1]=new condition("acctInfo.htm","Existing Acct Mode","ShowExistingPathInfo","no");
|
||||
pages[11][2]=new method("acctInfo.htm","parent.content.go('')",true);
|
||||
|
||||
pages[12]=new Array();
|
||||
pages[12][0]=new page("acctInfo.htm","Existing Acct Mode","AskName");
|
||||
pages[12][1]=new condition("dial.htm","Existing Acct Mode","AskName","no");
|
||||
pages[12][2]=new method("dial.htm","parent.content.go('')",true);
|
||||
|
||||
pages[13]=new Array();
|
||||
pages[13][0]=new page("dial.htm","Existing Acct Mode","AskPhone");
|
||||
pages[13][1]=new condition("namepw.htm","Existing Acct Mode","AskPhone","no");
|
||||
pages[13][2]=new method("namepw.htm","parent.content.go('')",true);
|
||||
|
||||
pages[14]=new Array();
|
||||
pages[14][0]=new page("namepw.htm","Existing Acct Mode","AskLogin");
|
||||
pages[14][1]=new condition("email.htm","Existing Acct Mode","AskLogin","no");
|
||||
pages[14][2]=new method("email.htm","parent.content.go('')",true);
|
||||
|
||||
pages[15]=new Array();
|
||||
pages[15][0]=new page("email.htm","Existing Acct Mode","AskEmail");
|
||||
pages[15][1]=new condition("servers.htm","Existing Acct Mode","AskEmail","no");
|
||||
pages[15][2]=new method("servers.htm","parent.content.go('')",true);
|
||||
|
||||
pages[16]=new Array();
|
||||
pages[16][0]=new page("servers.htm","Existing Acct Mode","AskHosts");
|
||||
pages[16][1]=new condition("dns.htm","Existing Acct Mode","AskHosts","no");
|
||||
pages[16][2]=new method("dns.htm","parent.content.go('')",true);
|
||||
|
||||
pages[17]=new Array();
|
||||
pages[17][0]=new page("dns.htm","Existing Acct Mode","AskDNS");
|
||||
pages[17][1]=new condition("publish.htm","Existing Acct Mode","AskDNS","no");
|
||||
pages[17][2]=new method("publish.htm","parent.content.go('')",true);
|
||||
|
||||
pages[18]=new Array();
|
||||
pages[18][0]=new page("publish.htm","Existing Acct Mode","AskPublishing");
|
||||
pages[18][1]=new condition("modem1.htm","Existing Acct Mode","AskPublishing","no");
|
||||
pages[18][2]=new method("modem1.htm","parent.content.go('')",true);
|
||||
|
||||
pages[19]=new Array();
|
||||
pages[19][0]=new page("connect2.htm",null,null);
|
||||
pages[19][1]=new method(null,"parent.content.go('Connect Now')",true);
|
||||
pages[19][2]=new method("error.htm","parent.content.go('error.htm')",true);
|
||||
|
||||
// Final Screens
|
||||
|
||||
pages[20]=new Array();
|
||||
pages[20][0]=new page("ok.htm",null,null);
|
||||
|
||||
pages[21]=new Array();
|
||||
pages[21][0]=new page("okreboot.htm",null,null);
|
||||
|
||||
pages[22]=new Array();
|
||||
pages[22][0]=new page("error.htm",null,null);
|
||||
pages[22][1]=new method("register.htm","parent.content.go('New Path')",true);
|
||||
pages[22][2]=new method("connect2.htm","parent.content.go('Existing Path')",true);
|
||||
|
||||
pages[23]=new Array();
|
||||
pages[23][0]=new page("later.htm",null,null);
|
||||
pages[23][1]=new method("later.htm","parent.content.go('Done')",true);
|
||||
|
||||
// Settings
|
||||
|
||||
pages[24]=new Array();
|
||||
pages[24][0]=new page("settings.htm",null,null);
|
||||
|
||||
// About Box
|
||||
|
||||
pages[25]=new Array();
|
||||
pages[25][0]=new page("aboutbox.htm",null,null);
|
||||
|
||||
// Manage IAS Servers
|
||||
|
||||
pages[26]=new Array();
|
||||
pages[26][0]=new page("addias.htm",null,null);
|
||||
|
||||
// Manage NCI Servers
|
||||
|
||||
pages[27]=new Array();
|
||||
pages[27][0]=new page("addnci.htm",null,null);
|
||||
|
||||
// Dialup Edition Preview Screens
|
||||
|
||||
pages[28]=new Array();
|
||||
pages[28][0]=new page("preview/duepvw1.htm",null,null);
|
||||
//pages[28][0].fullhistory=true;
|
||||
pages[28][1]=new method("preview/duepvw2.htm","parent.content.go('')",true);
|
||||
|
||||
pages[29]=new Array();
|
||||
pages[29][0]=new page("preview/duepvw2.htm",null,null);
|
||||
pages[29][1]=new method("preview/duepvw3.htm","parent.content.go('')",true);
|
||||
|
||||
pages[30]=new Array();
|
||||
pages[30][0]=new page("preview/duepvw3.htm",null,null);
|
||||
pages[30][1]=new method("preview/duepvw4.htm","parent.content.go('')",true);
|
||||
|
||||
pages[31]=new Array();
|
||||
pages[31][0]=new page("preview/duepvw4.htm",null,null);
|
||||
pages[31][1]=new method("preview/duepvw5.htm","parent.content.go('')",true);
|
||||
|
||||
pages[32]=new Array();
|
||||
pages[32][0]=new page("preview/duepvw5.htm",null,null);
|
||||
pages[32][1]=new method("preview/duepvw7a.htm","parent.content.go('')",true);
|
||||
|
||||
//The following array is ignored as reference to Conference feature is removed
|
||||
pages[33]=new Array();
|
||||
pages[33][0]=new page("preview/duepvw6.htm",null,null);
|
||||
pages[33][1]=new method("preview/duepvw7.htm","parent.content.go('')",true);
|
||||
|
||||
//The following array is ignored as reference to Netcaster feature is removed
|
||||
pages[34]=new Array();
|
||||
pages[34][0]=new page("preview/duepvw7.htm",null,null);
|
||||
pages[34][1]=new method("preview/duepvw7a.htm","parent.content.go('')",true);
|
||||
|
||||
pages[35]=new Array();
|
||||
pages[35][0]=new page("preview/duepvw7a.htm",null,null);
|
||||
pages[35][1]=new method("preview/duepvw8.htm","parent.content.go('')",true);
|
||||
|
||||
pages[36]=new Array();
|
||||
pages[36][0]=new page("preview/duepvw8.htm",null,null);
|
||||
//pages[36][1]=new method("main.htm","parent.content.go('')",true);
|
||||
pages[36][1]=new action("main.htm");
|
||||
|
||||
// Internet Preview Screens
|
||||
|
||||
pages[37]=new Array();
|
||||
pages[37][0]=new page("ipreview/inpvw1.htm",null,null);
|
||||
//pages[37][0].fullhistory=true;
|
||||
pages[37][1]=new method("ipreview/inpvw2.htm","parent.content.go('')",true);
|
||||
|
||||
pages[38]=new Array();
|
||||
pages[38][0]=new page("ipreview/inpvw2.htm",null,null);
|
||||
pages[38][1]=new method("ipreview/inpvw3.htm","parent.content.go('')",true);
|
||||
|
||||
pages[39]=new Array();
|
||||
pages[39][0]=new page("ipreview/inpvw3.htm",null,null);
|
||||
pages[39][1]=new method("ipreview/inpvw4.htm","parent.content.go('')",true);
|
||||
|
||||
pages[40]=new Array();
|
||||
pages[40][0]=new page("ipreview/inpvw4.htm",null,null);
|
||||
pages[40][1]=new method("ipreview/inpvw5.htm","parent.content.go('')",true);
|
||||
|
||||
pages[41]=new Array();
|
||||
pages[41][0]=new page("ipreview/inpvw5.htm",null,null);
|
||||
pages[41][1]=new method("ipreview/inpvw5a.htm","parent.content.go('')",true);
|
||||
|
||||
pages[42]=new Array();
|
||||
pages[42][0]=new page("ipreview/inpvw6.htm",null,null);
|
||||
pages[42][1]=new method("ipreview/inpvw7.htm","parent.content.go('')",true);
|
||||
|
||||
pages[43]=new Array();
|
||||
pages[43][0]=new page("ipreview/ipreview/inpvw7.htm",null,null);
|
||||
//pages[43][1]=new method("main.htm","parent.content.go('')",true);
|
||||
pages[43][1]=new action("main.htm"); // XXX For Deluxe, change "main.htm" to "ipreview/inpvw8.htm"
|
||||
|
||||
pages[44]=new Array();
|
||||
pages[44][0]=new page("ipreview/inpvw8.htm",null,null);
|
||||
//pages[44][1]=new method("main.htm","parent.content.go('')",true);
|
||||
pages[44][1]=new action("main.htm");
|
||||
|
||||
// start screen
|
||||
|
||||
pages[45]=new Array();
|
||||
pages[45][0]=new page("start.htm",null,null);
|
||||
//pages[45][0].top=true;
|
||||
|
||||
// intro screens
|
||||
|
||||
pages[46]=new Array();
|
||||
pages[46][0]=new page("intro/intro1.htm",null,null);
|
||||
//pages[46][0].fullhistory=true;
|
||||
pages[46][1]=new method("intro/intro2.htm","parent.content.go('')",true);
|
||||
|
||||
pages[47]=new Array();
|
||||
pages[47][0]=new page("intro/intro2.htm",null,null);
|
||||
pages[47][1]=new method("intro/intro3.htm","parent.content.go('')",true);
|
||||
|
||||
pages[48]=new Array();
|
||||
pages[48][0]=new page("intro/intro3.htm",null,null);
|
||||
pages[48][1]=new method("intro/intro4.htm","parent.content.go('')",true);
|
||||
|
||||
pages[49]=new Array();
|
||||
pages[49][0]=new page("intro/intro4.htm",null,null);
|
||||
pages[49][1]=new method("intro/intro5.htm","parent.content.go('')",true);
|
||||
|
||||
pages[50]=new Array();
|
||||
pages[50][0]=new page("intro/intro5.htm",null,null);
|
||||
pages[50][1]=new method("intro/intro6.htm","parent.content.go('')",true);
|
||||
|
||||
pages[51]=new Array();
|
||||
pages[51][0]=new page("intro/intro6.htm",null,null);
|
||||
//pages[51][1]=new condition("needs1.htm","Mode Selection","ForceNew","yes");
|
||||
//pages[51][2]=new condition("useAcct.htm","Mode Selection","ForceExisting","yes");
|
||||
pages[51][1]=new action("main.htm");
|
||||
|
||||
pages[52]=new Array();
|
||||
pages[52][0]=new page("editfour.htm",null,null);
|
||||
pages[52][1]=new method("register.htm","parent.content.go('register.htm')",true);
|
||||
pages[52][2]=new method("ok.htm","parent.content.go('ok.htm')",true);
|
||||
pages[52][3]=new method("okreboot.htm","parent.content.go('okreboot.htm')",true);
|
||||
pages[52][4]=new method("error.htm","parent.content.go('error.htm')",true);
|
||||
|
||||
// 53 - 57 are used in the New Account path
|
||||
|
||||
// Added to accommodate Netcenter Screen
|
||||
pages[58]=new Array();
|
||||
pages[58][0]=new page("ipreview/inpvw5a.htm",null,null);
|
||||
pages[58][1]=new method("ipreview/inpvw6.htm","parent.content.go('')",true);
|
||||
|
||||
|
||||
// NB: if you add new pages here, make sure that the array indices are not already
|
||||
// being used
|
||||
|
||||
|
||||
function checkShowIntroFlag()
|
||||
{
|
||||
if ( parent && parent.parent && parent.parent.globals )
|
||||
{
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename( self );
|
||||
|
||||
var theFlag = parent.parent.globals.GetNameValuePair( theFile, "Mode Selection", "Show_Intro_Screens" );
|
||||
if ( theFlag != null )
|
||||
{
|
||||
theFlag = theFlag.toLowerCase();
|
||||
}
|
||||
return ( theFlag == "yes" );
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return the page number (according to ordinals along the path taken) of "file"
|
||||
function findPageOffset( file )
|
||||
{
|
||||
// * take off any path information preceeding file name
|
||||
if ( ( slashPos = file.lastIndexOf( "/" ) ) > 0 )
|
||||
{
|
||||
file = file.substring( slashPos + 1, file.length );
|
||||
}
|
||||
|
||||
// * loop through all the page information and attempt to find a page name matching
|
||||
// "file"
|
||||
var pageNum = -1;
|
||||
for ( var x = 0; x < pages.length; x++ )
|
||||
{
|
||||
for ( var y = 0; y < pages[ x ].length; y++ )
|
||||
{
|
||||
if ( pages[ x ][ y ].type== "INFO" )
|
||||
{
|
||||
var theName = pages[ x ][ y ].file;
|
||||
|
||||
// * again, remove any path
|
||||
if ( ( slashPos = theName.lastIndexOf( "/" ) ) > 0 )
|
||||
{
|
||||
theName = theName.substring( slashPos + 1, theName.length );
|
||||
}
|
||||
|
||||
// * pages[ x ][ y ].file
|
||||
if ( theName == file )
|
||||
{
|
||||
// * found it
|
||||
pageNum = x;
|
||||
}
|
||||
|
||||
// * break here so we don't keep testing all the rest of the array entries after
|
||||
// we've found the "INFO" entry
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// * break if we've found it
|
||||
if ( pageNum >= 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( parent && parent.parent && parent.parent.globals )
|
||||
{
|
||||
parent.parent.globals.debug( "\tfindPageOffset: '" +file+ "' is " + pageNum );
|
||||
}
|
||||
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
|
||||
// main navigational function in Account Setup, "msg" is typically the name of a button
|
||||
// that was pressed
|
||||
function go( msg )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var editMode = false;
|
||||
var globals = null;
|
||||
|
||||
if ( parent && parent.parent && parent.parent.globals )
|
||||
globals = parent.parent.globals;
|
||||
|
||||
if ( globals != null )
|
||||
editMode = ( globals.document.vars.editMode.value.toLowerCase() == "yes" ) ? true : false;
|
||||
|
||||
// var formName = new String(parent.content.location);
|
||||
var formName = "" + parent.content.location;
|
||||
|
||||
if ( ( x = formName.lastIndexOf( "/" ) ) > 0 )
|
||||
formName = formName.substring( x + 1, formName.length );
|
||||
|
||||
var pageNum = findPageOffset( formName );
|
||||
if ( pageNum >= 0 )
|
||||
formName = pages[ pageNum ][ 0 ].file;
|
||||
|
||||
// var startingPageName = parent.content.document.forms[0].name;
|
||||
var startingPageName = formName;
|
||||
var thePlatform = globals.getPlatform();
|
||||
var separatorString = ",";
|
||||
|
||||
// process messages
|
||||
|
||||
if ( msg == "Next" )
|
||||
{
|
||||
// * if something is wrong with the current page content, don't do anything
|
||||
if ( !parent || !parent.content )
|
||||
return;
|
||||
|
||||
// * if we're currently loading, don't do anything
|
||||
if ( parent.content.loading )
|
||||
return;
|
||||
|
||||
if ( editMode != true )
|
||||
{
|
||||
if ( parent.content.checkData && ( parent.content.checkData() == false ) )
|
||||
return;
|
||||
|
||||
// workaround for onunload handler bugs in 4.0b2; no longer using onunload handler
|
||||
if ( parent.content.saveData != null )
|
||||
parent.content.saveData();
|
||||
}
|
||||
|
||||
var pageName = startingPageName;
|
||||
|
||||
if ( globals != null )
|
||||
globals.debug("\ngo: Starting at page " +pageName);
|
||||
|
||||
var acctSetupFile = "";
|
||||
if ( globals != null )
|
||||
acctSetupFile = globals.getAcctSetupFilename( self );
|
||||
|
||||
var moved = false;
|
||||
var active = true;
|
||||
|
||||
while ( active )
|
||||
{
|
||||
active = false;
|
||||
var pageNum = findPageOffset( pageName );
|
||||
if ( pageNum < 0 )
|
||||
{
|
||||
alert( "The file '" + pageName + "' is unknown to Account Setup." );
|
||||
return;
|
||||
}
|
||||
|
||||
for ( var x = 0; x < pages[ pageNum ].length; x++ )
|
||||
{
|
||||
if ( editMode == false && pages[ pageNum ][ x ].type == "CONDITION" )
|
||||
{
|
||||
var theFlag = globals.GetNameValuePair( acctSetupFile, pages[ pageNum ][ x ].section,
|
||||
pages[ pageNum ][ x ].variable );
|
||||
theFlag = theFlag.toLowerCase();
|
||||
|
||||
if ( pages[ pageNum ][ x ].value == "..." )
|
||||
{
|
||||
if ( theFlag != null && theFlag != "" )
|
||||
{
|
||||
active = moved = true;
|
||||
pageName = pages[ pageNum ][ x ].file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( theFlag == pages[ pageNum ][ x ].value )
|
||||
{
|
||||
active = moved = true;
|
||||
pageName = pages[ pageNum ][ x ].file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if ( moved == false && pages[ pageNum ][ x ].type == "METHOD" )
|
||||
{
|
||||
var val = eval( pages[ pageNum ][ x ].method );
|
||||
|
||||
if ( globals != null )
|
||||
{
|
||||
globals.debug( "\tMethod: " + pages[ pageNum ][ x ].method );
|
||||
globals.debug( "\tReturned: " + val );
|
||||
}
|
||||
|
||||
if ( val == pages[ pageNum ][ x ].value )
|
||||
{
|
||||
active = moved = true;
|
||||
pageName = pages[ pageNum ][ x ].file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if ( moved == false && pages[ pageNum ][ x ].type == "ACTION" )
|
||||
{
|
||||
globals.debug( "\tAction: " + pages[ pageNum ][ x ].file );
|
||||
active = false;
|
||||
moved = true;
|
||||
pageName = pages[ pageNum ][ x ].file;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( pageName != startingPageName )
|
||||
{
|
||||
if ( globals != null )
|
||||
{
|
||||
if ( globals.document.setupPlugin.NeedReboot() == true )
|
||||
globals.forceReboot( pageName );
|
||||
else
|
||||
{
|
||||
if ( pageName == "main.htm" )
|
||||
globals.document.vars.pageHistory.value = "";
|
||||
else
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
|
||||
globals.debug( "go: Moving to page " + pageName );
|
||||
|
||||
pages.current = pageName;
|
||||
parent.content.location.replace( pageName );
|
||||
|
||||
if ( helpWindow && helpWindow != null )
|
||||
{
|
||||
if ( helpWindow.closed == false )
|
||||
{
|
||||
doHelp( pageName );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pages.current = pageName;
|
||||
|
||||
if ( pages[ pageNum ][ 0 ].top == true )
|
||||
{
|
||||
parent.location.replace( pageName );
|
||||
}
|
||||
else
|
||||
{
|
||||
var theLoc = "" + parent.content.location;
|
||||
if ( ( x = theLoc.lastIndexOf( "/" ) ) > 0 )
|
||||
{
|
||||
pageName = theLoc.substring( 0, x + 1 ) + pageName;
|
||||
}
|
||||
|
||||
parent.content.location.replace( pageName );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if ( msg == "Back" )
|
||||
{
|
||||
if ( parent.content.loading )
|
||||
return;
|
||||
|
||||
// workaround for onunload handler bugs in 4.0b2; no longer using onunload handler
|
||||
if ( parent.content.saveData !=null )
|
||||
parent.content.saveData();
|
||||
|
||||
// parent.content.history.back();
|
||||
|
||||
if ( parent.content.verifyData )
|
||||
{
|
||||
var verifyFlag = parent.content.verifyData();
|
||||
if ( verifyFlag != true )
|
||||
{
|
||||
generateControls();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( globals != null )
|
||||
{
|
||||
var historyCleanup = true;
|
||||
while ( historyCleanup == true )
|
||||
{
|
||||
historyCleanup = false;
|
||||
|
||||
var pageHistory = globals.document.vars.pageHistory.value;
|
||||
if ( pageHistory!="" )
|
||||
{
|
||||
var pageName="";
|
||||
x = pageHistory.lastIndexOf( separatorString );
|
||||
pageHistory = pageHistory.substring( 0, x );
|
||||
x = pageHistory.lastIndexOf( separatorString );
|
||||
if ( x >= 0 )
|
||||
{
|
||||
pageName = pageHistory.substring( x + 1, pageHistory.length );
|
||||
globals.document.vars.pageHistory.value = pageHistory.substring( 0, x + 1 );
|
||||
if ( ( pageName == "register.htm" ) || ( pageName == "error.htm" ) )
|
||||
historyCleanup = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pageName=pageHistory;
|
||||
globals.document.vars.pageHistory.value="";
|
||||
}
|
||||
}
|
||||
}
|
||||
globals.debug("go: Moving back to page " + pageName );
|
||||
|
||||
if ( pageName == "undefined" )
|
||||
return;
|
||||
|
||||
pages.current = pageName;
|
||||
if ( pageNum >= 0 && pages[ pageNum ][ 0 ].fullhistory == true )
|
||||
parent.parent.history.back();
|
||||
else
|
||||
parent.content.location.replace( pageName );
|
||||
|
||||
if ( helpWindow && helpWindow != null )
|
||||
{
|
||||
if ( helpWindow.closed == false )
|
||||
doHelp( pageName );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( pages[ pageNum ][ 0 ].fullhistory == true )
|
||||
parent.parent.history.back();
|
||||
else
|
||||
parent.content.history.back();
|
||||
}
|
||||
}
|
||||
else if ( msg == "Help" )
|
||||
{
|
||||
doHelp( formName );
|
||||
}
|
||||
else if ( msg == "Show Screen" )
|
||||
{
|
||||
var pageNum = findPageOffset( formName );
|
||||
if ( pageNum>=0 )
|
||||
{
|
||||
var section = pages[ pageNum ][ 0 ].section;
|
||||
var variable = pages[ pageNum ][ 0 ].variable;
|
||||
if ( section != null && section!="" && variable != null && variable!="" )
|
||||
{
|
||||
showScreenToggle = true;
|
||||
var acctSetupFile = globals.getAcctSetupFilename( self );
|
||||
var theFlag = globals.GetNameValuePair( acctSetupFile, section, variable);
|
||||
theFlag = theFlag.toLowerCase();
|
||||
if ( theFlag == "no" )
|
||||
theFlag="yes";
|
||||
else
|
||||
theFlag="no";
|
||||
|
||||
parent.parent.SetNameValuePair( acctSetupFile, section, variable, theFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( msg == "Later" )
|
||||
{
|
||||
if ( parent.content.go( "Later" ) == true )
|
||||
{
|
||||
|
||||
if ( ( globals.document.vars.editMode.value.toLowerCase() != "yes") ||
|
||||
( confirm( "Normally, this would complete the Account Setup process and quit Communicator. Would you like to quit now?" ) == true ) )
|
||||
{
|
||||
// parent.content.location.href = "later.htm";
|
||||
if ( globals != null )
|
||||
{
|
||||
if ( globals.document.vars.editMode.value.toLowerCase() != "yes")
|
||||
globals.saveGlobalData();
|
||||
globals.document.setupPlugin.QuitNavigator();
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( msg == "Done" )
|
||||
{
|
||||
if ( globals != null )
|
||||
{
|
||||
if ( globals.document.vars.editMode.value.toLowerCase() != "yes" )
|
||||
globals.saveGlobalData();
|
||||
if ( ( globals.document.vars.editMode.value.toLowerCase() != "yes") ||
|
||||
( confirm( "Normally, this would complete the Account Setup process and quit Communicator. Would you like to quit now?") == true ) )
|
||||
{
|
||||
globals.document.setupPlugin.QuitNavigator();
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( msg == "Exit" )
|
||||
{
|
||||
var longMsgFlag = true;
|
||||
var confirmFlag = false;
|
||||
|
||||
if ( formName.indexOf( "main.htm" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "aboutbox.htm" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if (formName.indexOf( "error.htm" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if (formName.indexOf( "intro/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if (formName.indexOf( "ipreview/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if (formName.indexOf( "preview/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
|
||||
if ( longMsgFlag == true )
|
||||
{
|
||||
if ( globals.document.vars.editMode.value.toLowerCase() != "yes" )
|
||||
confirmFlag = confirm( "Your haven't finished setting up your account. Are you sure you want to quit Account Setup?" );
|
||||
else // this is for the account setup editor
|
||||
confirmFlag = confirm( "Are you sure you want to quit the Account Setup Editor?" );
|
||||
}
|
||||
else
|
||||
confirmFlag = confirm( "Quit Account Setup?" );
|
||||
|
||||
if ( confirmFlag == true )
|
||||
{
|
||||
if ( globals != null )
|
||||
{
|
||||
globals.saveGlobalData();
|
||||
globals.document.setupPlugin.QuitNavigator();
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
else if ( msg == "Restart" )
|
||||
{
|
||||
if ( globals.document.vars.editMode.value.toLowerCase() != "yes" )
|
||||
{
|
||||
globals.saveGlobalData();
|
||||
globals.document.setupPlugin.Reboot( null );
|
||||
window.close();
|
||||
}
|
||||
else
|
||||
alert( "Cannot reboot in edit mode." );
|
||||
}
|
||||
else if ( msg == "About" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
pages.current = "aboutbox.htm";
|
||||
parent.content.location.replace( "aboutbox.htm" );
|
||||
}
|
||||
else if ( msg == "Setup" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
|
||||
var acctSetupFile = globals.getAcctSetupFilename( self );
|
||||
var newPathFlag = globals.GetNameValuePair( acctSetupFile, "Mode Selection", "ForceNew" );
|
||||
newPathFlag = newPathFlag.toLowerCase();
|
||||
var existingPathFlag = globals.GetNameValuePair( acctSetupFile, "Mode Selection", "ForceExisting" );
|
||||
existingPathFlag = existingPathFlag.toLowerCase();
|
||||
|
||||
var pageName="";
|
||||
if ( newPathFlag == "yes" && existingPathFlag != "yes")
|
||||
pageName = "needs1.htm";
|
||||
else if ( existingPathFlag == "yes" && newPathFlag != "yes" )
|
||||
pageName = "useAcct.htm";
|
||||
else
|
||||
pageName = "accounts.htm";
|
||||
parent.content.location.replace( pageName );
|
||||
if ( helpWindow && helpWindow != null )
|
||||
{
|
||||
if ( helpWindow.closed == false )
|
||||
doHelp( pageName );
|
||||
}
|
||||
}
|
||||
else if ( msg == "Edit Settings" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
pages.current = "settings.htm";
|
||||
parent.content.location.replace( "../CG/docs/settings.htm" );
|
||||
}
|
||||
else if ( msg == "Manage Servers" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
pages.current = "editregs.htm";
|
||||
parent.content.location.replace( "../CG/docs/editregs.htm" );
|
||||
}
|
||||
else if ( msg == "Manage Accounts" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
pages.current = "editisps.htm";
|
||||
parent.content.location.replace( "../CG/docs/editisps.htm" );
|
||||
}
|
||||
else if ( msg == "Edit IAS" )
|
||||
{
|
||||
if ( thePlatform == "Macintosh" )
|
||||
globals.document.vars.pageHistory.value += "../../Tools/CG/docs/" + startingPageName + separatorString;
|
||||
else
|
||||
globals.document.vars.pageHistory.value += "../../../AccountSetupTools/CG/docs/" + startingPageName + separatorString;
|
||||
|
||||
pages.current = "addias.htm";
|
||||
parent.content.location.replace("ias/addias.htm");
|
||||
}
|
||||
else if ( msg == "Edit NCI" )
|
||||
{
|
||||
if (thePlatform == "Macintosh")
|
||||
globals.document.vars.pageHistory.value += "../../Tools/CG/docs/" + startingPageName + separatorString;
|
||||
else
|
||||
globals.document.vars.pageHistory.value += "../../../AccountSetupTools/CG/docs/" + startingPageName + separatorString;
|
||||
pages.current = "addnci.htm";
|
||||
parent.content.location.replace( "nci/addnci.htm" );
|
||||
}
|
||||
else if ( msg == "Screen Options" )
|
||||
{
|
||||
globals.document.vars.pageHistory.value += startingPageName + separatorString;
|
||||
|
||||
if ( formName == "namepw.htm" )
|
||||
{
|
||||
pages.current = "asktty.htm";
|
||||
parent.content.location.replace( "../CG/docs/asktty.htm" );
|
||||
}
|
||||
//else if (formName == "servers.htm") {
|
||||
// pages.current = "askserv.htm";
|
||||
// parent.content.location.replace("../CG/docs/askserv.htm");
|
||||
// }
|
||||
else if ( formName == "ok.htm" )
|
||||
{
|
||||
pages.current = "asksvinf.htm";
|
||||
parent.content.location.replace( "../CG/docs/asksvinf.htm" );
|
||||
}
|
||||
else if ( formName == "okreboot.htm" )
|
||||
{
|
||||
pages.current = "asksvinf.htm";
|
||||
parent.content.location.replace( "../CG/docs/asksvinf.htm" );
|
||||
}
|
||||
else if ( formName == "billing.htm" )
|
||||
{
|
||||
pages.current = "editcc.htm";
|
||||
parent.content.location.replace( "../CG/docs/editcc.htm" );
|
||||
}
|
||||
else if ( formName == "main.htm" )
|
||||
{
|
||||
pages.current = "settings.htm";
|
||||
parent.content.location.replace( "../CG/docs/settings.htm" );
|
||||
}
|
||||
else if ( formName == "useAcct.htm" )
|
||||
{
|
||||
pages.current = "editisps.htm";
|
||||
parent.content.location.replace( "../CG/docs/editisps.htm" );
|
||||
}
|
||||
else if ( formName == "connect1.htm" )
|
||||
{
|
||||
pages.current = "editregs.htm";
|
||||
parent.content.location.replace( "../CG/docs/editregs.htm" );
|
||||
}
|
||||
|
||||
} //end screen options special casing
|
||||
|
||||
else
|
||||
parent.content.go( msg );
|
||||
// generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
var file="";
|
||||
|
||||
// preLoadImages();
|
||||
|
||||
if (parent && parent.parent && parent.parent.globals) {
|
||||
file = parent.parent.globals.document.vars.startupFile.value;
|
||||
}
|
||||
if (file != null && file != "") {
|
||||
if (parent && parent.parent && parent.parent.globals) {
|
||||
parent.parent.globals.document.vars.startupFile.value = "";
|
||||
}
|
||||
parent.content.location.replace(file);
|
||||
}
|
||||
generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
870
mozilla/cmd/dialup/as_html/clayer2.js
Normal file
@@ -0,0 +1,870 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
// globals
|
||||
var theToolBar = null; // a global pointer to our toolbar - should it exist
|
||||
var helpWindow = null;
|
||||
var preLoaded = false;
|
||||
|
||||
var backImages = null;
|
||||
var helpImages = null;
|
||||
var exitImages = null;
|
||||
var nextImages = null;
|
||||
var connectImages = null;
|
||||
var doneImages = null;
|
||||
var ffImages = null;
|
||||
var rebootImages = null;
|
||||
|
||||
|
||||
compromisePrincipals();
|
||||
|
||||
|
||||
function preLoadImages()
|
||||
{
|
||||
if ( preLoaded == false )
|
||||
{
|
||||
//img[0] is the normal image
|
||||
//img[1] is the mouseover
|
||||
//img[2] is the mousedown
|
||||
|
||||
backImages = new Array;
|
||||
helpImages = new Array;
|
||||
exitImages = new Array;
|
||||
nextImages = new Array;
|
||||
connectImages = new Array;
|
||||
doneImages = new Array;
|
||||
ffImages = new Array;
|
||||
rebootImages = new Array;
|
||||
|
||||
backImages[0] = new Image(32,32);
|
||||
backImages[0].src = "images/bk_up.gif";
|
||||
backImages[1] = new Image(32,32);
|
||||
backImages[1].src = "images/bk_mo.gif";
|
||||
backImages[2] = new Image(32,32);
|
||||
backImages[2].src = "images/bk_down.gif";
|
||||
|
||||
helpImages[0] = new Image(32,32);
|
||||
helpImages[0].src = "images/hlp_up.gif";
|
||||
helpImages[1] = new Image(32,32);
|
||||
helpImages[1].src = "images/hlp_mo.gif";
|
||||
helpImages[2] = new Image(32,32);
|
||||
helpImages[2].src = "images/hlp_down.gif";
|
||||
|
||||
exitImages[0] = new Image(32,32);
|
||||
exitImages[0].src = "images/ext_up.gif";
|
||||
exitImages[1] = new Image(32,32);
|
||||
exitImages[1].src = "images/ext_mo.gif";
|
||||
exitImages[2] = new Image(32,32);
|
||||
exitImages[2].src = "images/ext_down.gif";
|
||||
|
||||
nextImages[0] = new Image(32,32);
|
||||
nextImages[0].src = "images/nxt_up.gif";
|
||||
nextImages[1] = new Image(32,32);
|
||||
nextImages[1].src = "images/nxt_mo.gif";
|
||||
nextImages[2] = new Image(32,32);
|
||||
nextImages[2].src = "images/nxt_down.gif";
|
||||
|
||||
rebootImages[0] = new Image(32,32);
|
||||
rebootImages[0].src = "images/rb_up.gif";
|
||||
rebootImages[1] = new Image(32,32);
|
||||
rebootImages[1].src = "images/rb_mo.gif";
|
||||
rebootImages[2] = new Image(32,32);
|
||||
rebootImages[2].src = "images/rb_down.gif";
|
||||
|
||||
connectImages[0] = new Image(32,32);
|
||||
connectImages[0].src = "images/cn_up.gif";
|
||||
connectImages[1] = new Image(32,32);
|
||||
connectImages[1].src = "images/cn_mo.gif";
|
||||
connectImages[2] = new Image(32,32);
|
||||
connectImages[2].src = "images/cn_down.gif";
|
||||
|
||||
doneImages[0] = new Image(32,32);
|
||||
doneImages[0].src = "images/dn_up.gif";
|
||||
doneImages[1] = new Image(32,32);
|
||||
doneImages[1].src = "images/dn_mo.gif";
|
||||
doneImages[2] = new Image(32,32);
|
||||
doneImages[2].src = "images/dn_down.gif";
|
||||
|
||||
ffImages[0] = new Image(32,32);
|
||||
ffImages[0].src = "images/ff_up.gif";
|
||||
ffImages[1] = new Image(32,32);
|
||||
ffImages[1].src = "images/ff_mo.gif";
|
||||
ffImages[2] = new Image(32,32);
|
||||
ffImages[2].src = "images/ff_down.gif";
|
||||
|
||||
preLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateControls()
|
||||
{
|
||||
var editMode = false;
|
||||
var showAcctsetEdit = false;
|
||||
var showRegFileEdit = false;
|
||||
var showISPFileEdit = false;
|
||||
var showExit = true;
|
||||
var showHelp = true;
|
||||
var showBack = true;
|
||||
var showNext = true;
|
||||
var showConnectServer = false;
|
||||
var showConnectNow = false;
|
||||
var showDownload = false;
|
||||
var showConnectLater = false;
|
||||
var showAgain = false;
|
||||
var showDone = false;
|
||||
var showRestart = false;
|
||||
var showSetupShortcut = false;
|
||||
var showInternet = false;
|
||||
var showScreenToggle = false;
|
||||
var screenVisible = true;
|
||||
var showScreenOptions = false;
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
if ( parent && parent.parent && parent.parent.globals )
|
||||
{
|
||||
editMode = ( parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes" ) ? true : false;
|
||||
}
|
||||
|
||||
// var formName = parent.content.location.toString();
|
||||
var formName = "" + parent.content.location;
|
||||
if ( formName != null && formName != "" && formName != "about:blank" )
|
||||
{
|
||||
if ( ( x = formName.lastIndexOf( "/" ) ) > 0 )
|
||||
formName = formName.substring( x + 1, formName.length );
|
||||
|
||||
if ( editMode == true )
|
||||
{
|
||||
var section = null;
|
||||
var variable = null;
|
||||
var pageNum = findPageOffset( formName );
|
||||
if ( pageNum >= 0 )
|
||||
{
|
||||
section = pages[ pageNum ][ 0 ].section;
|
||||
variable = pages[ pageNum ][ 0 ].variable;
|
||||
if ( section!=null && section!="" && variable!=null && variable!="" )
|
||||
{
|
||||
showScreenToggle = true;
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename( self );
|
||||
var theFlag = parent.parent.globals.GetNameValuePair( theFile, section, variable );
|
||||
theFlag = theFlag.toLowerCase();
|
||||
if ( theFlag == "no" )
|
||||
screenVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( formName == "main.htm" )
|
||||
{
|
||||
showBack = false;
|
||||
showNext = false;
|
||||
if ( navigator.javaEnabled() == false )
|
||||
{
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
showAcctsetEdit = false;
|
||||
showISPFileEdit = false;
|
||||
showRegFileEdit = false;
|
||||
document.writeln( "<CENTER><STRONG>Java support is disabled!<P>\n" );
|
||||
document.writeln( "Choose Options | Network Preferences and enable Java, then try again.</STRONG></CENTER>\n" );
|
||||
}
|
||||
else if ( !navigator.mimeTypes[ "application/x-netscape-autoconfigure-dialer" ] )
|
||||
{
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
showAcctsetEdit = false;
|
||||
showISPFileEdit = false;
|
||||
showRegFileEdit = false;
|
||||
document.writeln( "<CENTER><STRONG>The 'Account Setup Plugin' is not installed!<P>\n" );
|
||||
document.writeln( "Please install the plugin, then run 'Account Setup' again.</STRONG></CENTER>\n" );
|
||||
}
|
||||
else if ( parent.parent.globals.document.setupPlugin == null )
|
||||
{
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
if ( editMode == true )
|
||||
{
|
||||
showAcctsetEdit = true;
|
||||
showScreenOptions = true;
|
||||
}
|
||||
}
|
||||
else if ( editMode == true && formName == "useAcct.htm" )
|
||||
{
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( editMode == true && formName == "servers.htm" )
|
||||
{
|
||||
showScreenOptions = false;
|
||||
}
|
||||
else if ( editMode == true && formName == "billing.htm" )
|
||||
{
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( formName == "accounts.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
}
|
||||
else if ( formName == "compare.htm" )
|
||||
{
|
||||
}
|
||||
else if ( formName == "connect1.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showConnectServer = true;
|
||||
if ( editMode == true )
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( formName == "download.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showConnectServer = true;
|
||||
if ( editMode == true )
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( formName == "connect2.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showExit = false;
|
||||
showConnectNow = true;
|
||||
showConnectLater = true;
|
||||
}
|
||||
else if ( formName == "1step.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showExit = false;
|
||||
showHelp = false;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "2step.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showConnectServer = true;
|
||||
if ( editMode == true )
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( formName == "register.htm" )
|
||||
{
|
||||
showHelp = false;
|
||||
showBack = false;
|
||||
showNext = false;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "ok.htm" )
|
||||
{
|
||||
showScreenOptions = true;
|
||||
showBack = false;
|
||||
showExit = false;
|
||||
showNext = false;
|
||||
showInternet = true;
|
||||
showDone = true;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "okreboot.htm" )
|
||||
{
|
||||
showScreenOptions = true;
|
||||
showBack = false;
|
||||
showNext = false;
|
||||
showExit = false;
|
||||
showDone = false;
|
||||
showRestart = true;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "error.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showExit = true;
|
||||
showNext = false;
|
||||
showAgain = true;
|
||||
showDone = false;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "later.htm" )
|
||||
{
|
||||
showBack = false;
|
||||
showExit = false;
|
||||
showNext = false;
|
||||
showDone = true;
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "intro1.htm" )
|
||||
{
|
||||
showSetupShortcut = false;
|
||||
}
|
||||
else if ( formName == "settings.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "editregs.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "editisps.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "aboutbox.htm" )
|
||||
{
|
||||
showHelp = false;
|
||||
showNext = false;
|
||||
showBack = true;
|
||||
}
|
||||
else if ( formName == "namepw.htm" )
|
||||
{
|
||||
showScreenOptions = true;
|
||||
}
|
||||
else if ( formName == "asktty.htm" )
|
||||
{
|
||||
showScreenOptions = false;
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "askserv.htm" )
|
||||
{
|
||||
showScreenOptions = false;
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "asksvinf.htm" )
|
||||
{
|
||||
showScreenOptions = false;
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "showphon.htm" )
|
||||
{
|
||||
showScreenOptions = false;
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "editcc.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "addnci.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "addias.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
else if ( formName == "editfour.htm" )
|
||||
{
|
||||
showBack = true;
|
||||
showNext = false;
|
||||
editMode = false;
|
||||
}
|
||||
|
||||
if ( document && document.layers && document.layers[ "controls" ] && document.layers[ "controls" ].document && document.layers[ "controls" ].document.layers && document.layers[ "controls" ].document.layers.length > 0 )
|
||||
{
|
||||
document.layers[ "controls" ].layers[ "help" ].visibility = ( ( showHelp == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "exit" ].visibility = ( ( showExit == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "back" ].visibility = ( ( showBack == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "next" ].visibility = ( ( showNext == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectnow" ].visibility = ( ( showConnectNow == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "download" ].visibility = ( ( showDownload == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectserver" ].visibility = ( ( showConnectServer == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectagain" ].visibility = ( ( showAgain == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "done" ].visibility = ( ( showDone == true) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "restart" ].visibility = ( ( showRestart == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectlater" ].visibility = ( ( showConnectLater == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "setup" ].visibility = ( ( showSetupShortcut == true ) ? "show" : "hide" );
|
||||
|
||||
//NEW - Generate the controls for the toolbar, if it exists
|
||||
if ( ( !theToolBar ) || ( theToolBar == null ) || ( !theToolBar.location ) || ( theToolBar.closed ) )
|
||||
{
|
||||
//alert("opening toolbar");
|
||||
theToolBar = openToolBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert("toolbar open, generating controls" + theToolBar);
|
||||
generateToolBarControls();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout( "generateControls()", 1000 );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout( "generateControls()", 1000 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function doHelp(formName)
|
||||
{
|
||||
var thePlatform;
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
helpFile = "./help/ashelp.htm";
|
||||
|
||||
var helpPath = "";
|
||||
if (parent && parent.parent && parent.parent.globals) {
|
||||
helpPath = "" + parent.parent.globals.getFolder(self);
|
||||
|
||||
thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
if (thePlatform == "Macintosh") { // Macintosh support
|
||||
helpPath = helpPath + "help:";
|
||||
}
|
||||
else { // Windows support
|
||||
helpPath = helpPath + "help/";
|
||||
}
|
||||
|
||||
if (thePlatform != "Macintosh") {
|
||||
|
||||
var hpath=unescape(location.pathname);
|
||||
hpath = hpath.substring(0, hpath.lastIndexOf('/'));
|
||||
helpFile = hpath + "/help/ashelp.htm";
|
||||
|
||||
// get rid of the return char at the end of .htm
|
||||
formName = formName.substring(0, formName.indexOf('.htm')+4);
|
||||
// next, get rid of sub folders in formName
|
||||
while (formName.indexOf('/') > 0)
|
||||
formName = formName.substring(formName.indexOf('/')+1, formName.length);
|
||||
}
|
||||
|
||||
var theList = parent.parent.globals.document.setupPlugin.GetFolderContents(helpPath,".htm");
|
||||
if (theList != null) {
|
||||
for (var i=0; i<theList.length; i++) {
|
||||
if (formName == theList[i]) {
|
||||
if (thePlatform != "Macintosh") {
|
||||
var currentpath=unescape(location.pathname);
|
||||
currentpath = currentpath.substring(0, currentpath.lastIndexOf('/'));
|
||||
helpFile = currentpath + "/help/" + formName;
|
||||
} else {
|
||||
helpFile = "./help/" + formName;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (helpFile != null && helpFile != "") {
|
||||
if (helpWindow == null || helpWindow.closed) {
|
||||
helpWindow=window.open("about:blank","Documentation","width=328,height=328,alwaysRaised=yes,dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
|
||||
}
|
||||
if (helpWindow && helpWindow != null) {
|
||||
helpWindow.focus();
|
||||
helpWindow.location = helpFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//here are a bunch of functions for the floating toolbar
|
||||
|
||||
|
||||
|
||||
function openToolBar()
|
||||
{
|
||||
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
var editMode = false;
|
||||
|
||||
if (parent && parent.parent && parent.parent.globals) {
|
||||
editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
|
||||
}
|
||||
|
||||
if (editMode == true)
|
||||
{
|
||||
if (!(theToolBar) || (theToolBar == null) || !(theToolBar.location))
|
||||
{
|
||||
if (thePlatform == "Macintosh")
|
||||
theToolBar = top.open("../../Tools/Kit/config.htm","Configurator","width=400,height=104,dependent=yes,alwaysraised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
|
||||
else
|
||||
theToolBar = top.open("../../../AccountSetupTools/Kit/config.htm","Configurator","width=400,height=104,dependent=yes,alwaysraised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
theToolBar = null;
|
||||
}
|
||||
return theToolBar;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showLayer(layerName, showIfTrue)
|
||||
{
|
||||
//alert("showLayer "+showIfTrue);
|
||||
//parent.parent.globals.debug("showing layer: " + layerName + " " + showIfTrue + " layers: " + theToolBar.document.layers.length + " " + theToolBar.document.layers[layerName]);
|
||||
if ((theToolBar) && (theToolBar!=null) && (theToolBar.location) && (theToolBar.finishedLoading()))
|
||||
{
|
||||
var gLayerName = "g_" + layerName;
|
||||
//var theLayer = eval("theToolBar.document.layers." + layerName);
|
||||
//parent.parent.globals.debug("theLayer: "+theLayer+ " but t.d.l.l: " + theToolBar.document.layers[layerName]);
|
||||
//var gLayer = eval("theToolBar.document.layers.g_" + layerName);
|
||||
|
||||
//if (theLayer)
|
||||
{
|
||||
if (showIfTrue == true)
|
||||
{
|
||||
//theToolBar.document.layers[layerName].visibility ="show";
|
||||
theToolBar.showlayer(layerName);
|
||||
theToolBar.hidelayer(gLayerName);
|
||||
//theLayer.visibility="show";
|
||||
//if (gLayer) gLayer.visibility="hide";
|
||||
}
|
||||
else
|
||||
{
|
||||
theToolBar.hidelayer(layerName);
|
||||
theToolBar.showlayer(gLayerName);
|
||||
//theToolBar.document.layers[layerName].visibility ="hide";
|
||||
//theLayer.visibility="hide";
|
||||
//if (gLayer) gLayer.visibility="show";
|
||||
}
|
||||
}
|
||||
//else
|
||||
//theToolBar.history.go(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function screenVisible()
|
||||
{
|
||||
var isVisible = true;
|
||||
var formName = parent.content.location.toString();
|
||||
if (formName!=null && formName!="") {
|
||||
if ((x=formName.lastIndexOf("/"))>0) {
|
||||
formName=formName.substring(x+1,formName.length);
|
||||
}
|
||||
var section=null;
|
||||
var variable=null;
|
||||
var pageNum=findPageOffset(formName);
|
||||
if (pageNum>=0) {
|
||||
section=pages[pageNum][0].section;
|
||||
variable=pages[pageNum][0].variable;
|
||||
if (section!=null && section!="" && variable!=null && variable!="") {
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
|
||||
theFlag = theFlag.toLowerCase();
|
||||
if (theFlag == "no")
|
||||
isVisible=false;
|
||||
}
|
||||
}
|
||||
//alert("clayer: screenVisible = : " + isVisible + "flag (" + variable + ") = " + theFlag);
|
||||
}
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
function showScreen(inValue)
|
||||
{
|
||||
//alert("in showscreen");
|
||||
var formName = parent.content.location.toString();
|
||||
|
||||
if (formName!=null && formName!="")
|
||||
{
|
||||
if ((x=formName.lastIndexOf("/"))>0) {
|
||||
formName=formName.substring(x+1,formName.length);
|
||||
}
|
||||
|
||||
//alert("formName: " + formName);
|
||||
var pageNum=findPageOffset(formName);
|
||||
if (pageNum>=0)
|
||||
{
|
||||
var section=pages[pageNum][0].section;
|
||||
var variable=pages[pageNum][0].variable;
|
||||
//alert("sec: " + section + " var: "+variable);
|
||||
if (section!=null && section!="" && variable!=null && variable!="") {
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theFlag; // = parent.parent.globals.GetNameValuePair(theFile,section, variable);
|
||||
|
||||
|
||||
//theFlag = theFlag.toLowerCase();
|
||||
//if (theFlag == "no") theFlag="yes";
|
||||
//else theFlag="no";
|
||||
|
||||
if (inValue == false)
|
||||
theFlag = "no";
|
||||
else
|
||||
theFlag = "yes";
|
||||
|
||||
//alert("Setting flag " + variable + " to " + theFlag + " invalue: " + inValue);
|
||||
parent.parent.globals.SetNameValuePair(theFile,section, variable,theFlag);
|
||||
return (theFlag == "yes");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("This screen cannot be suppressed");
|
||||
return true; //forces the checkbox back on
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function generateToolBarControls()
|
||||
{
|
||||
var editMode = false;
|
||||
// var editMode = parent.parent.editMode();
|
||||
var showScreenToggle = false;
|
||||
var showScreenOptions = false;
|
||||
var isScreenVisible = true;
|
||||
var showEditHelp = true;
|
||||
|
||||
//var showAcctsetEdit = false;
|
||||
//var showRegFileEdit = false;
|
||||
//var showISPFileEdit = false;
|
||||
|
||||
if (parent && parent.parent && parent.parent.globals) {
|
||||
editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
|
||||
}
|
||||
|
||||
// var formName = parent.content.location.toString();
|
||||
var formName = "" + parent.content.location;
|
||||
|
||||
if (formName!=null && formName!="")
|
||||
{
|
||||
if ((x=formName.lastIndexOf("/"))>0) {
|
||||
formName=formName.substring(x+1,formName.length);
|
||||
}
|
||||
|
||||
// this decides whether we should show the checkbox
|
||||
var pageNum=findPageOffset(formName);
|
||||
if (pageNum>=0)
|
||||
{
|
||||
section=pages[pageNum][0].section;
|
||||
variable=pages[pageNum][0].variable;
|
||||
if (section!=null && section!="" && variable!=null && variable!="") {
|
||||
showScreenToggle=true;
|
||||
//var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
//var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
|
||||
//theFlag = theFlag.toLowerCase();
|
||||
//if (theFlag == "no") screenVisible=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (formName == "main.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "useAcct.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "servers.htm")
|
||||
showScreenOptions=false;
|
||||
else if (formName == "billing.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "connect1.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "connect2.htm")
|
||||
;
|
||||
else if (formName == "register.htm")
|
||||
;
|
||||
else if (formName == "ok.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "okreboot.htm")
|
||||
showScreenOptions=true;
|
||||
else if (formName == "error.htm")
|
||||
;
|
||||
else if (formName == "later.htm")
|
||||
;
|
||||
else if (formName == "settings.htm")
|
||||
editMode = false;
|
||||
else if (formName == "editregs.htm")
|
||||
editMode=false;
|
||||
else if (formName == "editisps.htm")
|
||||
editMode=false;
|
||||
else if (formName == "aboutbox.htm")
|
||||
;
|
||||
else if (formName == "namepw.htm")
|
||||
showScreenOptions=true;
|
||||
|
||||
else if (formName == "asktty.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "askserv.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "asksvinf.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "showphon.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "editcc.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "addnci.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "addias.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
else if (formName == "editfour.htm")
|
||||
{
|
||||
showScreenOptions=false;
|
||||
editMode=false;
|
||||
}
|
||||
|
||||
|
||||
if (theToolBar && theToolBar != null && (theToolBar.location) && (theToolBar.document.layers) && !(theToolBar.closed)
|
||||
&& (theToolBar.ready) && (theToolBar.ready == true))
|
||||
{
|
||||
|
||||
if (theToolBar.finishedLoading())
|
||||
{
|
||||
showLayer("reload", editMode);
|
||||
showLayer("edit", editMode);
|
||||
showLayer("chooseed", editMode);
|
||||
showLayer("edithelp", editMode);
|
||||
showLayer("options", showScreenOptions);
|
||||
showLayer("showscreen", showScreenToggle);
|
||||
if (showScreenToggle == true)
|
||||
theToolBar.setShowScreenBox();
|
||||
|
||||
theToolBar.updateLayersLayer();
|
||||
//alert("found toolbar! - setting help location");
|
||||
theToolBar.setHelpLocation();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert("Found toolbar, without reloadlayer!");
|
||||
theToolBar.history.go(0);
|
||||
}
|
||||
}
|
||||
//else
|
||||
//alert("warning: toolbar not found");
|
||||
}
|
||||
}
|
||||
|
||||
function showDocumentLayer(inLayerName, inDoShow)
|
||||
{
|
||||
if (inDoShow == "hide")
|
||||
inDoShow = false;
|
||||
else if (inDoShow != false)
|
||||
inDoShow = true;
|
||||
|
||||
if (parent.content && parent.content.document.layers[inLayerName])
|
||||
{
|
||||
if (inDoShow == true)
|
||||
{
|
||||
parent.content.document.layers[inLayerName].visibility = "show";
|
||||
//alert("showing layer: " + inLayerName);
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.content.document.layers[inLayerName].visibility = "hide";
|
||||
//alert("hiding layer: " + inLayerName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function countDocumentLayers()
|
||||
{
|
||||
if (parent.content.document.layers)
|
||||
return parent.content.document.layers.length;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getLayerName(inIndex)
|
||||
{
|
||||
if (parent.content.document.layers && parent.content.document.layers[inIndex])
|
||||
return parent.content.document.layers[inIndex].name;
|
||||
return null;
|
||||
}
|
||||
|
||||
function getLayerSrc(inIndex)
|
||||
{
|
||||
if (parent.content.document.layers && parent.content.document.layers[inIndex])
|
||||
return parent.content.document.layers[inIndex].src;
|
||||
return null;
|
||||
}
|
||||
|
||||
function getDocumentLocation()
|
||||
{
|
||||
return parent.content.document.location;
|
||||
}
|
||||
|
||||
function getDocumentLayerVisibility(inLayerName)
|
||||
{
|
||||
if (parent.content.document.layers && parent.content.document.layers[inLayerName])
|
||||
return parent.content.document.layers[inLayerName].visibility;
|
||||
else
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
function reloadDocument()
|
||||
{
|
||||
top.globals.debug("RELOADING DOCUMENT!!!!" + parent.content.history);
|
||||
if (parent.content.history)
|
||||
parent.content.history.go(0);
|
||||
}
|
||||
// end hiding contents from old browsers -->
|
||||
44
mozilla/cmd/dialup/as_html/cmprehd.htm
Normal file
@@ -0,0 +1,44 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<SCRIPT LANGUAGE="JavaScript" ARCHIVE="asw.jar" SRC="cmprehd.js"></SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js"></LINK>
|
||||
</HEAD>
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" onLoad="loadData()" BGCOLOR="cccccc" ID="cmprehd001">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
<LAYER NAME="tagtext" LEFT=420 TOP=0 VISIBILITY=SHOW>
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
|
||||
<P CLASS="title"><B>Compare Internet Service Providers</B></P>
|
||||
<BR>
|
||||
<P CLASS="compare"><B>Provider Highlights: </B></P>
|
||||
<P CLASS="comparesmall">
|
||||
<IMG SRC="metadata/images/feature1.gif" HEIGHT=16 WIDTH=16><B>Free Account Time! </B>
|
||||
<IMG SRC="metadata/images/feature2.gif" HEIGHT=16 WIDTH=16>Phone Bill Billing
|
||||
<IMG SRC="metadata/images/feature3.gif" HEIGHT=16 WIDTH=16>Web Page Hosting
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
28
mozilla/cmd/dialup/as_html/cmprehd.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function loadData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
if ( parent.parent.controls.generateControls )
|
||||
parent.parent.controls.generateControls();
|
||||
}
|
||||
|
||||
// end hiding contents from old browers -->
|
||||
28
mozilla/cmd/dialup/as_html/compwrap.htm
Normal file
@@ -0,0 +1,28 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="compwrap.js"></SCRIPT>
|
||||
</HEAD>
|
||||
|
||||
<FRAMESET rows="120,*" BORDER=0 FRAMEBORDER="no">
|
||||
<FRAME NAME="compareheader" SRC="cmprehd.htm" NORESIZE SCROLLING="no">
|
||||
<FRAME NAME="compare" SRC="compare.htm" NORESIZE>
|
||||
</FRAMESET>
|
||||
</HTML>
|
||||
39
mozilla/cmd/dialup/as_html/compwrap.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
parent.parent.globals.debug( "compwrap go" );
|
||||
parent.parent.globals.debug( compare.ispRadio );
|
||||
|
||||
if ( compare.ispRadio != null && compare.ispRadio != "" )
|
||||
{
|
||||
parent.parent.globals.selectedISP = compare.ispRadio;
|
||||
return true;
|
||||
}
|
||||
alert( "You haven't selected an ISP" );
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// end hiding contents from old browers -->
|
||||
48
mozilla/cmd/dialup/as_html/config/ACCTSET.INI
Normal file
@@ -0,0 +1,48 @@
|
||||
; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
;
|
||||
; The contents of this file are subject to the Netscape Public License
|
||||
; Version 1.0 (the "NPL"); you may not use this file except in
|
||||
; compliance with the NPL. You may obtain a copy of the NPL at
|
||||
; http://www.mozilla.org/NPL/
|
||||
;
|
||||
; Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
; for the specific language governing rights and limitations under the
|
||||
; NPL.
|
||||
;
|
||||
; The Initial Developer of this code under the NPL is Netscape
|
||||
; Communications Corporation. Portions created by Netscape are
|
||||
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
; Reserved.
|
||||
;
|
||||
[Mode Selection]
|
||||
IntlMode=no
|
||||
ForceNew=no
|
||||
ForceExisting=no
|
||||
ExistingSRFile=
|
||||
Show_Intro_Screens=yes
|
||||
Dialer_Disconnect_After=
|
||||
RegSource=APL
|
||||
|
||||
[New Acct Mode]
|
||||
ShowNewPathInfo=yes
|
||||
AskPersonalInfo=yes
|
||||
AskBillingInfo=yes
|
||||
CardTypes="AX,DC,MC,VI"
|
||||
RegServer=
|
||||
SavePasswords=yes
|
||||
AskSaveAcctInfo=yes
|
||||
|
||||
[Existing Acct Mode]
|
||||
ShowNoneAbove=yes
|
||||
ShowExistingPathInfo=yes
|
||||
ShowPhones=no
|
||||
AskName=yes
|
||||
AskPhone=yes
|
||||
AskLogin=yes
|
||||
AskTTY=yes
|
||||
AskEmail=yes
|
||||
AskHosts=yes
|
||||
AskDNS=yes
|
||||
AskPublishing=yes
|
||||
RegPodURL=http://home.netscape.com/home/register.html
|
||||
45
mozilla/cmd/dialup/as_html/config/RegServ.IAS
Normal file
@@ -0,0 +1,45 @@
|
||||
; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
;
|
||||
; The contents of this file are subject to the Netscape Public License
|
||||
; Version 1.0 (the "NPL"); you may not use this file except in
|
||||
; compliance with the NPL. You may obtain a copy of the NPL at
|
||||
; http://www.mozilla.org/NPL/
|
||||
;
|
||||
; Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
; for the specific language governing rights and limitations under the
|
||||
; NPL.
|
||||
;
|
||||
; The Initial Developer of this code under the NPL is Netscape
|
||||
; Communications Corporation. Portions created by Netscape are
|
||||
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
; Reserved.
|
||||
;
|
||||
[Dial-In Configuration]
|
||||
ScriptFileName=
|
||||
Phone=+1 (800) 638-8290
|
||||
Password=YWg0ZrhvamYLZix1ADRvdWpttnp3
|
||||
Name=mozillarama
|
||||
Description=Netscape Internet Account Server
|
||||
SiteName=Netscape Internet Account Server
|
||||
|
||||
[IP]
|
||||
RegCGI=http://206.217.225.10/IAS5/docs/reg.cgi
|
||||
DNSAddress2=205.217.225.20
|
||||
DNSAddress=205.217.225.10
|
||||
DomainName=netscape.com
|
||||
IPAddress=0.0.0.0
|
||||
Enabled=Yes
|
||||
|
||||
[Configuration]
|
||||
REG_SCRIPTING=
|
||||
RegRoot=http://206.217.225.10/IAS5/docs/
|
||||
|
||||
[Security]
|
||||
SecurityDevice=No
|
||||
|
||||
; This is a sample registration file that logs into the
|
||||
; Netscape Internet Account Server.
|
||||
; New User Interface
|
||||
; This file should be replaced with registration file(s)
|
||||
; specific to your registration server.
|
||||
79
mozilla/cmd/dialup/as_html/connect1.htm
Normal file
@@ -0,0 +1,79 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="connect1.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="connect100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
|
||||
<P CLASS="title"><B>Connect to Server</B></P>
|
||||
|
||||
<P>Account Setup will now connect you to the Internet account server, where you can learn about the account plans available and create an account. After Account Setup dials your modem and makes a connection, the Internet account server screens are displayed here, in the Account Setup window.</P>
|
||||
|
||||
<P>When evaluating account plans, think about these questions:</P>
|
||||
|
||||
<UL>
|
||||
<LI>How much time do you think you'll spend on the Internet each month?</LI>
|
||||
<LI>What are the monthly or hourly rates?</LI>
|
||||
<LI>What technical support is offered?</LI>
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<P ID="nospace">Make sure your modem is properly connected and turned on, then click Connect to Server to begin.</P>
|
||||
|
||||
<CENTER>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ID="connect101">
|
||||
generateRegServerList();
|
||||
</SCRIPT>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
134
mozilla/cmd/dialup/as_html/connect1.js
Normal file
@@ -0,0 +1,134 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if (parent.parent.globals.document.vars.editMode.value != "yes") {
|
||||
// if RegServer specified in ACCTSET.INI, use it
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
var theRegFile = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","RegServer");
|
||||
|
||||
if (theRegFile != null && theRegFile != "") {
|
||||
parent.parent.globals.document.vars.regServer.value = theRegFile;
|
||||
}
|
||||
else {
|
||||
// otherwise, if multiple .IAS files exist, get list selection and determine appropriate .IAS file
|
||||
|
||||
var pathName = parent.parent.globals.getConfigFolder(self);
|
||||
var theList = parent.parent.globals.document.setupPlugin.GetFolderContents(pathName,".IAS");
|
||||
if (theList != null) {
|
||||
if (theList.length >1) {
|
||||
if (document.forms[0].regServerList.selectedIndex<0) {
|
||||
alert("Please select an Internet account server.");
|
||||
return(false);
|
||||
}
|
||||
for (var x=0; x<theList.length; x++) {
|
||||
var file = parent.parent.globals.getConfigFolder(self) + theList[x];
|
||||
var name = parent.parent.globals.document.setupPlugin.GetNameValuePair(file,"Dial-In Configuration","SiteName");
|
||||
|
||||
if (name == document.forms[0].regServerList.options[document.forms[0].regServerList.selectedIndex].text) {
|
||||
parent.parent.globals.document.vars.regServer.value = theList[x];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (parent.parent.globals.document.vars.regServer.value == "") {
|
||||
alert("Internal problem locating appropriate registration server file.");
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
else if (theList.length==1) {
|
||||
parent.parent.globals.document.vars.regServer.value = theList[0];
|
||||
}
|
||||
else {
|
||||
alert("Internal problem locating a registration server file.");
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert("Internal problem locating appropriate registration server file.");
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
else {
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateRegServerList()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
// if RegServer is not specified in ACCTSET.INI and multiple .IAS files exist, build list
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theRegFile = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","RegServer");
|
||||
|
||||
if (theRegFile == null || theRegFile == "") {
|
||||
var pathName = parent.parent.globals.getConfigFolder(self);
|
||||
var theList = parent.parent.globals.document.setupPlugin.GetFolderContents(pathName,".IAS");
|
||||
if (theList != null) {
|
||||
if (theList.length >1) {
|
||||
document.writeln("<TABLE CELLPADDING=2 CELLSPACING=0 ID='minspace'><TR><TD ALIGN=LEFT VALIGN=TOP HEIGHT=25><spacer type=vertical size=2><B>Select an Internet account server:</B></TD><TD ALIGN=LEFT VALIGN=TOP><FORM><SELECT NAME='regServerList'>");
|
||||
for (var x=0; x<theList.length; x++) {
|
||||
var file = parent.parent.globals.getConfigFolder(self) + theList[x];
|
||||
var name = parent.parent.globals.document.setupPlugin.GetNameValuePair(file,"Dial-In Configuration","SiteName");
|
||||
var selected=(x==0) ? " SELECTED":"";
|
||||
document.writeln("<OPTION VALUE='" + name + "'" + selected + ">" + name);
|
||||
}
|
||||
document.writeln("</SELECT></FORM></TD></TR></TABLE>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
63
mozilla/cmd/dialup/as_html/connect2.htm
Normal file
@@ -0,0 +1,63 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="connect2.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="connect200">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>You're Done!</B></P>
|
||||
|
||||
<P>You're now finished using Account Setup and can connect to the Internet after you click Connect Now or Done. </P>
|
||||
|
||||
<P>If you want to connect to the Internet now, click Connect Now. If you don't want to connect
|
||||
to the Internet now, click Done. When you want to use the Internet, all you have to do is launch Communicator from the Netscape Communicator folder or program group.</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
538
mozilla/cmd/dialup/as_html/connect2.js
Normal file
@@ -0,0 +1,538 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function configureDialer()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
|
||||
var theFolder = parent.parent.globals.getConfigFolder(self);
|
||||
theRegFile = theFolder + parent.parent.globals.document.vars.regServer.value;
|
||||
|
||||
|
||||
// platform check
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
|
||||
/*
|
||||
// determine name of scripting file
|
||||
var scriptEnabledFlag = parent.parent.globals.GetNameValuePair(theRegFile,"Script","ScriptEnabled");
|
||||
scriptEnabledFlag = scriptEnabledFlag.toLowerCase();
|
||||
var theScriptFile = "";
|
||||
if (scriptEnabledFlag == "yes") {
|
||||
theScriptFile = parent.parent.globals.GetNameValuePair(theRegFile,"Script","ScriptFileName");
|
||||
if (theScriptFile != null && theScriptFile != "") {
|
||||
theScriptFile = theFolder + theScriptFile;
|
||||
scriptEnabledFlag = "TRUE";
|
||||
}
|
||||
else {
|
||||
theScriptFile="";
|
||||
scriptEnabledFlag = "FALSE";
|
||||
}
|
||||
}
|
||||
else {
|
||||
scriptEnabledFlag = "FALSE";
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// determine outside line access string
|
||||
|
||||
var outsideLineAccessStr = "";
|
||||
if (parent.parent.globals.document.vars.prefixData.value != "") {
|
||||
outsideLineAccessStr = parent.parent.globals.document.vars.prefixData.value;
|
||||
x = outsideLineAccessStr.indexOf(",");
|
||||
if (x<0) outsideLineAccessStr = outsideLineAccessStr + ",";
|
||||
}
|
||||
|
||||
|
||||
// build TAPI phone number
|
||||
|
||||
if (intlFlag == "yes") {
|
||||
var thePhone = parent.parent.globals.document.vars.accountPhoneNumber.value;
|
||||
var theCountry = "";
|
||||
var theCountryCode=""; // XXX
|
||||
var longDistanceAccess="";
|
||||
var dialAsLongDistanceFlag="FALSE";
|
||||
var dialAreaCodeFlag="FALSE";
|
||||
var userAreaCode="";
|
||||
}
|
||||
else {
|
||||
var thePhone = "(" + parent.parent.globals.document.vars.accountAreaCode.value + ") " + parent.parent.globals.document.vars.accountPhoneNumber.value;
|
||||
var theCountry = "USA";
|
||||
var theCountryCode="1";
|
||||
var longDistanceAccess="1"; // XXX
|
||||
var dialAsLongDistanceFlag="TRUE";
|
||||
var dialAreaCodeFlag="TRUE";
|
||||
var userAreaCode=parent.parent.globals.document.vars.modemAreaCode.value;
|
||||
if (userAreaCode == parent.parent.globals.document.vars.accountAreaCode.value) {
|
||||
dialAsLongDistanceFlag="FALSE";
|
||||
dialAreaCodeFlag = "FALSE";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// determine new profile name (used for Account in dialer & profile name, save info default filename)
|
||||
|
||||
var newProfileName = parent.parent.globals.document.vars.accountName.value;
|
||||
if (newProfileName=="") {
|
||||
newProfileName = parent.parent.globals.document.vars.first.value;
|
||||
if (parent.parent.globals.document.vars.last.value != "") {
|
||||
newProfileName = newProfileName + " " + parent.parent.globals.document.vars.last.value;
|
||||
}
|
||||
}
|
||||
if (newProfileName!="") newProfileName = newProfileName + "'s";
|
||||
if (parent.parent.globals.document.vars.providername.value != "") {
|
||||
newProfileName = newProfileName + " " + parent.parent.globals.document.vars.providername.value;
|
||||
}
|
||||
newProfileName = newProfileName + " Account";
|
||||
if (newProfileName.length > 240) newProfileName=newProfileName.substring(0,240);
|
||||
|
||||
|
||||
if (thePlatform == "Win16") {
|
||||
if (newProfileName.length > 40) newProfileName=newProfileName.substring(0,40);
|
||||
}
|
||||
|
||||
|
||||
// On WIN32 platforms, check if newProfileName contains any invalid characters, such as '/'
|
||||
// On Mac, disallow invalid characters such as ':'
|
||||
|
||||
if ((thePlatform == "WinNT") || (thePlatform == "Win95")) {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('/');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('/');
|
||||
}
|
||||
x = newProfileName.indexOf('\\');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\\');
|
||||
}
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
x = newProfileName.indexOf('\"');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\"');
|
||||
}
|
||||
x = newProfileName.indexOf('?');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('?');
|
||||
}
|
||||
x = newProfileName.indexOf('<');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('<');
|
||||
}
|
||||
x = newProfileName.indexOf('>');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('>');
|
||||
}
|
||||
x = newProfileName.indexOf('|');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('|');
|
||||
}
|
||||
x = newProfileName.indexOf('&');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('&');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Macintosh") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Win31") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('(');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('(');
|
||||
}
|
||||
x = newProfileName.indexOf(')');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(')');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// configure dialer
|
||||
|
||||
dialerData = parent.parent.globals.document.setupPlugin.newStringArray(28); // increment this # as new dialer strings are added
|
||||
dialerData[0] = "FileName=" + theRegFile;
|
||||
dialerData[1] = "AccountName=" + newProfileName; // parent.parent.globals.document.vars.providername.value;
|
||||
dialerData[2] = "ISPPhoneNum=" + thePhone;
|
||||
dialerData[3] = "LoginName=" + parent.parent.globals.document.vars.accountName.value;
|
||||
dialerData[4] = "Password=" + parent.parent.globals.document.vars.accountPassword.value;
|
||||
dialerData[5] = "DNSAddress=" + parent.parent.globals.document.vars.primaryDNS.value;
|
||||
dialerData[6] = "DNSAddress2=" + parent.parent.globals.document.vars.secondaryDNS.value;
|
||||
dialerData[7] = "DomainName=" + parent.parent.globals.document.vars.domainName.value;
|
||||
dialerData[8] = "IPAddress=" + parent.parent.globals.document.vars.ipAddress.value;
|
||||
dialerData[9] = "IntlMode=" + ((intlFlag=="yes") ? "TRUE":"FALSE");
|
||||
dialerData[10] = "DialOnDemand=TRUE";
|
||||
dialerData[11] = "ModemName=" + parent.parent.globals.document.vars.modem.value;
|
||||
dialerData[12] = "ModemType=" + parent.parent.globals.document.setupPlugin.GetModemType(parent.parent.globals.document.vars.modem.value);
|
||||
dialerData[13] = "DialType=" + parent.parent.globals.document.vars.dialMethod.value;
|
||||
dialerData[14] = "OutsideLineAccess=" + outsideLineAccessStr;
|
||||
dialerData[15] = "DisableCallWaiting=" + ((parent.parent.globals.document.vars.cwData.value != "") ? "TRUE":"FALSE");
|
||||
dialerData[16] = "DisableCallWaitingCode=" + parent.parent.globals.document.vars.cwData.value;
|
||||
dialerData[17] = "UserAreaCode=" + userAreaCode;
|
||||
dialerData[18] = "CountryCode=" + theCountryCode;
|
||||
dialerData[19] = "LongDistanceAccess=" + longDistanceAccess;
|
||||
dialerData[20] = "DialAsLongDistance=" + dialAsLongDistanceFlag;
|
||||
dialerData[21] = "DialAreaCode=" + dialAreaCodeFlag;
|
||||
dialerData[22] = "ScriptEnabled=" + parent.parent.globals.document.vars.scriptEnabled.value;
|
||||
dialerData[23] = "ScriptFileName=" + parent.parent.globals.document.vars.scriptFile.value;
|
||||
dialerData[24] = "NeedsTTYWindow=" + (parent.parent.globals.document.vars.ttyWindow.checked ? "TRUE":"FALSE"); // XXX
|
||||
dialerData[25] = "Location=Home";
|
||||
dialerData[26] = "DisconnectTime=" + parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","Dialer_Disconnect_After");
|
||||
dialerData[27] = "Path=Existing";
|
||||
|
||||
|
||||
// write out dialer data to Java Console
|
||||
|
||||
if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes") {
|
||||
parent.parent.globals.debug("\nDialer data (ISP: '" + parent.parent.globals.document.vars.providername.value + "'): ");
|
||||
var numElements = dialerData.length;
|
||||
for (var x=0; x<numElements; x++) {
|
||||
parent.parent.globals.debug(" " + x + ": " + dialerData[x]);
|
||||
}
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.DialerConfig(dialerData,false);
|
||||
|
||||
|
||||
// configure desktop (Windows)
|
||||
|
||||
var fileName = parent.parent.globals.document.vars.providerFilename.value;
|
||||
var iconFilename = fileName.toUpperCase();
|
||||
if (iconFilename == "") {
|
||||
iconFilename = theFolder + "DEFAULT.ICO";
|
||||
}
|
||||
else {
|
||||
var x = iconFilename.lastIndexOf(".NCI");
|
||||
if (x>0) {
|
||||
iconFilename = iconFilename.substring(0,x) + ".ICO";
|
||||
}
|
||||
else {
|
||||
iconFilename = "";
|
||||
}
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.DesktopConfig(newProfileName, iconFilename, theFile);
|
||||
|
||||
|
||||
// set up Navigator preferences
|
||||
|
||||
var userName = parent.parent.globals.document.vars.first.value;
|
||||
if (parent.parent.globals.document.vars.last.value != "") {
|
||||
userName = userName + " " + parent.parent.globals.document.vars.last.value;
|
||||
}
|
||||
|
||||
navigator.preference("network.hosts.smtp_server", parent.parent.globals.document.vars.SMTP.value);
|
||||
navigator.preference("network.hosts.nntp_server", parent.parent.globals.document.vars.NNTP.value);
|
||||
|
||||
navigator.preference("network.hosts.pop_server", parent.parent.globals.document.vars.mailServer.value);
|
||||
if (parent.parent.globals.document.vars.mailProtocol.value.toUpperCase() == "IMAP") {
|
||||
navigator.preference("mail.server_type", 1);
|
||||
}
|
||||
else {
|
||||
navigator.preference("mail.server_type", 0);
|
||||
}
|
||||
|
||||
var mailID=""
|
||||
var mailAccount = parent.parent.globals.document.vars.emailName.value;
|
||||
x = mailAccount.indexOf("@");
|
||||
if (x>=0) {
|
||||
mailID=mailAccount.substring(0,x);
|
||||
}
|
||||
else {
|
||||
mailID=mailAccount;
|
||||
if (parent.parent.globals.document.vars.domainName.value != "") {
|
||||
mailAccount = mailID + "@" + parent.parent.globals.document.vars.domainName.value;
|
||||
}
|
||||
}
|
||||
|
||||
navigator.preference("mail.pop_name", mailID);
|
||||
navigator.preference("mail.identity.organization", parent.parent.globals.document.vars.company.value);
|
||||
navigator.preference("mail.identity.reply_to", mailAccount);
|
||||
navigator.preference("mail.identity.username", userName);
|
||||
navigator.preference("mail.identity.useremail", mailAccount);
|
||||
|
||||
navigator.preference("mail.remember_password", false);
|
||||
navigator.preference("mail.pop_password", "");
|
||||
var theMailPassword=parent.parent.globals.document.vars.emailPassword.value;
|
||||
if (theMailPassword != null && theMailPassword != "") {
|
||||
theMailPassword = parent.parent.globals.document.setupPlugin.EncryptString(theMailPassword);
|
||||
if (theMailPassword != null && theMailPassword != "") {
|
||||
navigator.preference("mail.remember_password", true);
|
||||
navigator.preference("mail.pop_password", theMailPassword);
|
||||
}
|
||||
}
|
||||
|
||||
navigator.preference("editor.author", userName);
|
||||
navigator.preference("editor.publish_username", parent.parent.globals.document.vars.accountName.value);
|
||||
navigator.preference("editor.publish_location", parent.parent.globals.document.vars.publishURL.value);
|
||||
navigator.preference("editor.publish_browse_location", parent.parent.globals.document.vars.viewURL.value);
|
||||
|
||||
navigator.preference("editor.publish_password", "");
|
||||
navigator.preference("editor.publish_save_password", false);
|
||||
var thePublishPassword=parent.parent.globals.document.vars.publishPassword.value;
|
||||
if (thePublishPassword != "") {
|
||||
thePublishPassword = parent.parent.globals.document.setupPlugin.EncryptString(thePublishPassword);
|
||||
if (thePublishPassword != null && thePublishPassword != "") {
|
||||
navigator.preference("editor.publish_password", thePublishPassword);
|
||||
navigator.preference("editor.publish_save_password", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
navigator.preference("browser.mac.use_internet_config", false);
|
||||
|
||||
|
||||
var profileDir = parent.parent.globals.document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (profileDir != null && profileDir != "") {
|
||||
|
||||
// write MUC Configuration file
|
||||
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
var configFile="";
|
||||
if (thePlatform == "Macintosh") { // Macintosh support
|
||||
configFile = profileDir + "Configuration";
|
||||
}
|
||||
else { // Windows support
|
||||
configFile = profileDir + "CONFIG.INI";
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Account", "Account", newProfileName); // parent.parent.globals.document.vars.providername.value);
|
||||
parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Modem", "Modem", parent.parent.globals.document.vars.modem.value);
|
||||
parent.parent.globals.document.setupPlugin.SetNameValuePair(configFile,"Location", "Location", "Home");
|
||||
|
||||
|
||||
// write out default Bookmark file (if one doesn't exist yet)
|
||||
|
||||
var currentBookmarkFilename="";
|
||||
if (thePlatform == "Macintosh") { // Macintosh support
|
||||
currentBookmarkFilename = profileDir + "Bookmarks.html";
|
||||
}
|
||||
else { // Windows support
|
||||
currentBookmarkFilename = profileDir + "BOOKMARK.HTM";
|
||||
}
|
||||
|
||||
var bookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(currentBookmarkFilename,null,null);
|
||||
if ((bookmarkData == null) || (bookmarkData == "") || (bookmarkData.indexOf("HREF")<0)) {
|
||||
var defaultBookmarkFilename = parent.parent.globals.getConfigFolder(self) + "bookmark.htm";
|
||||
bookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(defaultBookmarkFilename,null,null);
|
||||
if (bookmarkData != null && bookmarkData != "") {
|
||||
parent.parent.globals.document.setupPlugin.SaveTextToFile(currentBookmarkFilename,bookmarkData,false);
|
||||
}
|
||||
}
|
||||
|
||||
// copy profile lock file (if one is specified in selected .NCI file)
|
||||
|
||||
theProviderFilename = parent.parent.globals.document.vars.providerFilename.value;
|
||||
if (theProviderFilename != "") {
|
||||
var configLockFile = parent.parent.globals.document.setupPlugin.GetNameValuePair(theProviderFilename,"Configuration","ConfigurationFileName");
|
||||
if (configLockFile != null && configLockFile != "") {
|
||||
|
||||
// read in .CFG file (from Config folder)
|
||||
|
||||
configLockFile = theFolder + configLockFile;
|
||||
var cfgData = parent.parent.globals.document.setupPlugin.ReadFile(configLockFile);
|
||||
if (cfgData != null && cfgData != "") {
|
||||
|
||||
// write out PROFILE.CFG file (inside of current profile directory)
|
||||
|
||||
var profileLockfilename = profileDir + "PROFILE.CFG";
|
||||
parent.parent.globals.document.setupPlugin.WriteFile(profileLockfilename,cfgData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// rename profile
|
||||
|
||||
if (thePlatform == "Macintosh") {
|
||||
if (newProfileName.length > 31) newProfileName=newProfileName.substring(0,31);
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.SetCurrentProfileName(newProfileName);
|
||||
if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes") {
|
||||
parent.parent.globals.debug("\nSetting profile name: " + newProfileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showWindowBars()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
// check browser version
|
||||
var theAgent=navigator.userAgent;
|
||||
var x=theAgent.indexOf("/");
|
||||
if (x>=0) {
|
||||
theVersion=theAgent.substring(x+1,theAgent.length);
|
||||
x=theVersion.indexOf(".");
|
||||
if (x>0) {
|
||||
theVersion=theVersion.substring(0,x);
|
||||
}
|
||||
if (parseInt(theVersion)>=4) {
|
||||
top.statusbar.visible=true;
|
||||
top.scrollbars.visible=true;
|
||||
top.toolbar.visible=true;
|
||||
top.menubar.visible=true;
|
||||
top.locationbar.visible=true;
|
||||
top.personalbar.visible=true;
|
||||
}
|
||||
}
|
||||
parent.parent.globals.document.setupPlugin.SetKiosk(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setLocation(theURL)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
var theWindow=window.open(theURL,"__BLANK","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
|
||||
|
||||
// parent.parent.location.replace(theURL); // jumping to the URL
|
||||
top.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if (msg=="Connect Now") {
|
||||
|
||||
if (parent.parent.globals.document.vars.editMode.value != "yes") {
|
||||
configureDialer();
|
||||
|
||||
if (parent.parent.globals.document.setupPlugin.NeedReboot() == true) {
|
||||
parent.parent.globals.forceReboot("connect2.htm"); // XXX hardcode in name of next screen???
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (parent.parent.globals.document.setupPlugin.DialerConnect() == false) {
|
||||
window.location.replace("error.htm"); // XXX hardcode in name of next screen???
|
||||
return(false);
|
||||
}
|
||||
|
||||
// showWindowBars();
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var theURL = parent.parent.globals.GetNameValuePair(theFile,"Existing Acct Mode","RegPodURL");
|
||||
if (theURL == null || theURL == "") {
|
||||
theURL = "http://home.netscape.com/";
|
||||
}
|
||||
setTimeout("setLocation(\'" + theURL + "\')", 1000);
|
||||
}
|
||||
else {
|
||||
alert("You cannot connect while in edit mode.");
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
else if (msg == "error.htm") {
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes") { // only do this if editMode is false
|
||||
return (confirm("Since you are in edit mode, would you like to edit the error screen that users will see if the connection fails?"));
|
||||
}
|
||||
else {
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
else if ((msg=="Later") && (parent.parent.globals.document.vars.editMode.value != "yes")) {
|
||||
configureDialer();
|
||||
//showWindowBars();
|
||||
return(true);
|
||||
}
|
||||
else if (msg=="Back") {
|
||||
history.back();
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function doGo()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
parent.controls.go("Next");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if (parent.parent.globals.document.vars.tryAgain.value == "yes") {
|
||||
parent.parent.globals.document.vars.tryAgain.value = "no";
|
||||
setTimeout("doGo()",1);
|
||||
}
|
||||
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
98
mozilla/cmd/dialup/as_html/dial.htm
Normal file
@@ -0,0 +1,98 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="dial.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" ONLOAD="loadData()" ID="dial100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Your Account Access Phone Number</B></P>
|
||||
|
||||
<P>Enter the number you dial to connect to your Internet account.</P>
|
||||
|
||||
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Telephone Number:
|
||||
</B>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
<TD VALIGN="TOP" ALIGN="LEFT" COLSPAN="2">
|
||||
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" ID="nospace">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" VALIGN="BOTTOM">
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="dial101">
|
||||
writeLocalText("Area Code:");
|
||||
</SCRIPT>
|
||||
</TD>
|
||||
<TD ALIGN="CENTER" VALIGN="BOTTOM">
|
||||
Number:
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="MIDDLE" VALIGN="TOP">
|
||||
<INPUT NAME="accountAreaCode" TYPE="&{localString};" SIZE=3 MAXLENGTH=3>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP">
|
||||
<INPUT NAME="accountPhoneNumber" TYPE="text" SIZE=24 MAXLENGTH=24>
|
||||
</TD></TR></TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
128
mozilla/cmd/dialup/as_html/dial.js
Normal file
@@ -0,0 +1,128 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
var intlString = "";
|
||||
var localString = "";
|
||||
|
||||
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
if (intlFlag == "yes") {
|
||||
intlString = "text";
|
||||
localString = "hidden";
|
||||
}
|
||||
else {
|
||||
intlString = "hidden";
|
||||
localString = "text";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function writeLocalText(theString)
|
||||
{
|
||||
if (localString == "text") {
|
||||
document.write(theString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes")
|
||||
return true;
|
||||
else
|
||||
return(checkData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (intlFlag != "yes") {
|
||||
if (document.forms[0].accountAreaCode.value == "") {
|
||||
alert("You must enter an area code.");
|
||||
parent.parent.globals.setFocus(document.forms[0].accountAreaCode);
|
||||
return(false);
|
||||
}
|
||||
if (parent.parent.globals.verifyAreaCode(document.forms[0].accountAreaCode.value)==false) {
|
||||
alert("Please enter a valid area code.");
|
||||
parent.parent.globals.setFocus(document.forms[0].accountAreaCode);
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
if (document.forms[0].accountPhoneNumber.value == "") {
|
||||
alert("You must enter a telephone number.");
|
||||
parent.parent.globals.setFocus(document.forms[0].accountPhoneNumber);
|
||||
return(false);
|
||||
}
|
||||
if (parent.parent.globals.verifyPhoneNumber(document.forms[0].accountPhoneNumber.value)==false) {
|
||||
alert("Please enter a valid telephone number.");
|
||||
parent.parent.globals.setFocus(document.forms[0].accountPhoneNumber);
|
||||
return(false);
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].accountAreaCode == "undefined") || (document.forms[0].accountAreaCode == "[object InputArray]")) ||
|
||||
((document.forms[0].accountPhoneNumber == "undefined") || (document.forms[0].accountPhoneNumber == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
if (intlFlag != "yes") {
|
||||
document.forms[0].accountAreaCode.value = parent.parent.globals.document.vars.accountAreaCode.value;
|
||||
}
|
||||
document.forms[0].accountPhoneNumber.value = parent.parent.globals.document.vars.accountPhoneNumber.value;
|
||||
parent.parent.globals.setFocus(document.forms[0].accountAreaCode);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].accountAreaCode == "undefined") || (document.forms[0].accountAreaCode == "[object InputArray]")) ||
|
||||
((document.forms[0].accountPhoneNumber == "undefined") || (document.forms[0].accountPhoneNumber == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
if (intlFlag != "yes") {
|
||||
parent.parent.globals.document.vars.accountAreaCode.value = document.forms[0].accountAreaCode.value;
|
||||
}
|
||||
parent.parent.globals.document.vars.accountPhoneNumber.value = document.forms[0].accountPhoneNumber.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
154
mozilla/cmd/dialup/as_html/dialinf1.htm
Normal file
@@ -0,0 +1,154 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="dialinf1.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" ONLOAD="loadData()" ID="dialinf100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Dialing Settings for Your Location</B></P>
|
||||
|
||||
<P>Please specify any special dialing settings that apply to the location that you are connecting from.</P>
|
||||
|
||||
<P>If you have Call Waiting, you should turn it off before you connect. Select a code from the pop-up menu below, or enter one of your own in the text box.</P>
|
||||
|
||||
|
||||
<spacer type=horizontal size=72>
|
||||
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"ID="minspace">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
|
||||
<B>Turn off Call Waiting with: </B>
|
||||
|
||||
<SPACER TYPE=VERTICAL SIZE=2>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT VALIGN="MIDDLE" ALIGN="RIGHT">
|
||||
|
||||
<INPUT NAME="cwData" TYPE="text" SIZE=8 MAXLENGTH=8 ONCHANGE="updateCWOptions(document.forms[0].cwData)" ID="dialinf101">
|
||||
|
||||
<SPACER TYPE=HORIZONTAL SIZE=6>
|
||||
</TD>
|
||||
|
||||
<TD ALIGN=LEFT VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<SPACER TYPE=VERTICAL SIZE=1>
|
||||
<SELECT NAME="cwOptions" ONCHANGE="updateCWOptions(document.forms[0].cwOptions)" ID="dialinf102">
|
||||
<OPTION VALUE="">(Line Doesn't Have Call Waiting)
|
||||
<OPTION VALUE="*70,">*70,
|
||||
<OPTION VALUE="1170,">1170,
|
||||
<OPTION VALUE="70#,">70#,
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<SPACER TYPE=VERTICAL SIZE=16>
|
||||
|
||||
<P>If you are connecting from a building with an internal phone network--such as from an office or a hotel--you need to access an outside line before you can connect.</P>
|
||||
|
||||
|
||||
<spacer type=horizontal size=72>
|
||||
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" ID="minspace">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
|
||||
<B>Access an outside line by dialing: </B>
|
||||
|
||||
<SPACER TYPE=VERTICAL SIZE=2>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
|
||||
<INPUT NAME="prefixData" TYPE="text" SIZE=8 MAXLENGTH=20 ONCHANGE="updatePrefix(document.forms[0].prefixData)" ID="dialinf103">
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<!-- The layer below contains pulse and tone radio buttons --!>
|
||||
|
||||
<LAYER NAME = "dialingMethods" VISIBILITY = "hide">
|
||||
|
||||
<P ID="nospace">Which dialing method would you like to use?</P>
|
||||
|
||||
<spacer type=horizontal size=72>
|
||||
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" border="0" ID="minspace">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
<FORM>
|
||||
<INPUT NAME="dialMethod" TYPE="radio" VALUE="TONE" CHECKED>Tone
|
||||
<INPUT NAME="dialMethod" TYPE="radio" VALUE="PULSE">Pulse
|
||||
</FORM>
|
||||
</B>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="dialinf104">
|
||||
generateDialingMethods();
|
||||
updateCWOptions(document.forms[0].cwData);
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
|
||||
</FORM>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
275
mozilla/cmd/dialup/as_html/dialinf1.js
Normal file
@@ -0,0 +1,275 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function verifyCallWaiting(cwData)
|
||||
{
|
||||
var validFlag=true;
|
||||
|
||||
if (cwData.length > 0) {
|
||||
for (var x=0; x<cwData.length; x++) {
|
||||
if ("0123456789*#,".indexOf(cwData.charAt(x)) <0) {
|
||||
validFlag=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(validFlag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function verifyPrefix(prefixData)
|
||||
{
|
||||
var validFlag=true;
|
||||
|
||||
if (prefixData.length > 0) {
|
||||
for (var x=0; x<prefixData.length; x++) {
|
||||
if ("0123456789,".indexOf(prefixData.charAt(x)) <0) {
|
||||
validFlag=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(validFlag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (verifyCallWaiting(document.forms[0].cwData.value) == false) {
|
||||
alert("Please enter a valid call waiting string. (It may contain numbers, asterisks, pound signs and commas.)");
|
||||
parent.parent.globals.setFocus(document.forms[0].cwData);
|
||||
return(false);
|
||||
}
|
||||
if (verifyPrefix(document.forms[0].prefixData.value) == false) {
|
||||
alert("Please enter a valid outside line string. (It may contain numbers and commas.)");
|
||||
parent.parent.globals.setFocus(document.forms[0].prefixData);
|
||||
return(false);
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].cwData == "undefined") || (document.forms[0].cwData == "[object InputArray]")) ||
|
||||
((document.forms[0].cwOptions == "undefined") || (document.forms[0].cwOptions == "[object InputArray]")) ||
|
||||
((document.forms[0].prefixData == "undefined") || (document.forms[0].prefixData == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[0].cwData.value=parent.parent.globals.document.forms[0].cwData.value;
|
||||
// document.forms[0].cwOFF.checked=parent.parent.globals.document.forms[0].cwOFF.checked;
|
||||
// document.forms[0].cwOFF.checked=(document.forms[0].cwData.value=="") ? 0:1;
|
||||
|
||||
var found=false;
|
||||
for (var i = 0; i < document.forms[0].cwOptions.length; i++) {
|
||||
if (document.forms[0].cwOptions[i].value==parent.parent.globals.document.forms[0].cwData.value) {
|
||||
document.forms[0].cwOptions[i].selected=true;
|
||||
found=true;
|
||||
}
|
||||
else {
|
||||
document.forms[0].cwOptions[i].selected=false;
|
||||
}
|
||||
}
|
||||
if (found==false) {
|
||||
if (document.forms[0].cwData.value == "") {
|
||||
document.forms[0].cwOptions[0].text = "(Line Doesn't Have Call Waiting)";
|
||||
document.forms[0].cwOptions[0].value = "";
|
||||
}
|
||||
else {
|
||||
document.forms[0].cwOptions[0].text = document.forms[0].cwData.value;
|
||||
document.forms[0].cwOptions[0].value = document.forms[0].cwData.value;
|
||||
}
|
||||
document.forms[0].cwOptions[0].selected=true;
|
||||
}
|
||||
document.forms[0].prefixData.value=parent.parent.globals.document.forms[0].prefixData.value;
|
||||
// document.forms[0].prefix.checked=parent.parent.globals.document.forms[0].prefix.checked;
|
||||
// document.forms[0].prefix.checked=(document.forms[0].prefixData.value=="") ? 0:1;
|
||||
|
||||
var theModem = parent.parent.globals.document.vars.modem.value;
|
||||
var theModemType = parent.parent.globals.document.setupPlugin.GetModemType(theModem);
|
||||
if (theModemType != null) {
|
||||
theModemType = theModemType.toUpperCase();
|
||||
if (theModemType == "ISDN") {
|
||||
// do nothing
|
||||
}
|
||||
else {
|
||||
if (parent.parent.globals.document.forms[0].dialMethod.value == "PULSE") {
|
||||
document.layers["dialingMethods"].document.forms[0].dialMethod[0].checked=false;
|
||||
document.layers["dialingMethods"].document.forms[0].dialMethod[1].checked=true;
|
||||
}
|
||||
else {
|
||||
|
||||
document.layers["dialingMethods"].document.forms[0].dialMethod[0].checked=true;
|
||||
document.layers["dialingMethods"].document.forms[0].dialMethod[1].checked=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
parent.parent.globals.setFocus(document.forms[0].cwData);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].cwData == "undefined") || (document.forms[0].cwData == "[object InputArray]")) ||
|
||||
((document.forms[0].cwOptions == "undefined") || (document.forms[0].cwOptions == "[object InputArray]")) ||
|
||||
((document.forms[0].prefixData == "undefined") || (document.forms[0].prefixData == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
// parent.parent.globals.document.forms[0].cwOFF.checked = document.forms[0].cwOFF.checked;
|
||||
parent.parent.globals.document.forms[0].cwData.value = document.forms[0].cwData.value;
|
||||
// parent.parent.globals.document.forms[0].prefix.checked = document.forms[0].prefix.checked;
|
||||
parent.parent.globals.document.forms[0].prefixData.value = document.forms[0].prefixData.value;
|
||||
|
||||
var theModem = parent.parent.globals.document.vars.modem.value;
|
||||
var theModemType = parent.parent.globals.document.setupPlugin.GetModemType(theModem);
|
||||
if (theModemType != null) {
|
||||
theModemType = theModemType.toUpperCase();
|
||||
if (theModemType == "ISDN") {
|
||||
parent.parent.globals.document.forms[0].dialMethod.value = theModemType;
|
||||
}
|
||||
else {
|
||||
if (document.layers["dialingMethods"].document.forms[0].dialMethod[1].checked == true) {
|
||||
parent.parent.globals.document.forms[0].dialMethod.value = document.layers["dialingMethods"].document.forms[0].dialMethod[1].value;
|
||||
}
|
||||
else {
|
||||
parent.parent.globals.document.forms[0].dialMethod.value = document.layers["dialingMethods"].document.forms[0].dialMethod[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateCWOptions(theObject)
|
||||
{
|
||||
/*
|
||||
if (theObject.name=="cwOFF") {
|
||||
if (theObject.checked) {
|
||||
parent.parent.globals.setFocus(document.forms[0].cwData);
|
||||
}
|
||||
else {
|
||||
document.forms[0].cwData.value="";
|
||||
document.forms[0].cwOFF.checked=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
*/
|
||||
if (theObject.name=="cwData") {
|
||||
document.forms[0].cwOptions[0].text = "(Line Doesn't Have Call Waiting)";
|
||||
document.forms[0].cwOptions[0].value = "";
|
||||
if (document.forms[0].cwData.value=="") {
|
||||
document.forms[0].cwOptions.selectedIndex = 0;
|
||||
}
|
||||
else {
|
||||
var found=0;
|
||||
for (var x=1; x<document.forms[0].cwOptions.length; x++) {
|
||||
if (document.forms[0].cwOptions[x].text == document.forms[0].cwData.value) {
|
||||
found=x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found<1) {
|
||||
document.forms[0].cwOptions[0].text = document.forms[0].cwData.value;
|
||||
document.forms[0].cwOptions[0].value = document.forms[0].cwData.value;
|
||||
}
|
||||
document.forms[0].cwOptions.selectedIndex = found;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (theObject.name=="cwOptions") {
|
||||
document.forms[0].cwData.value=document.forms[0].cwOptions[document.forms[0].cwOptions.selectedIndex].value;
|
||||
parent.parent.globals.setFocus(document.forms[0].cwData);
|
||||
// document.forms[0].cwOFF.checked=1;
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updatePrefix(theObject)
|
||||
{
|
||||
/*
|
||||
if (theObject.name=="prefix") {
|
||||
if (theObject.checked) {
|
||||
parent.parent.globals.setFocus(document.forms[0].prefixData);
|
||||
}
|
||||
else {
|
||||
document.forms[0].prefixData.value="";
|
||||
document.forms[0].prefix.checked=0;
|
||||
}
|
||||
}
|
||||
else if (theObject.name=="prefixData") {
|
||||
if (document.forms[0].prefixData.value=="") {
|
||||
document.forms[0].prefix.checked=0;
|
||||
}
|
||||
else {
|
||||
document.forms[0].prefix.checked=1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateDialingMethods()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
var theModem = parent.parent.globals.document.vars.modem.value;
|
||||
var theModemType = parent.parent.globals.document.setupPlugin.GetModemType(theModem);
|
||||
if (theModemType != null && theModemType.toUpperCase() != "ISDN")
|
||||
{
|
||||
document.layers["dialingMethods"].visibility = "show";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers["dialingMethods"].visibility = "hide";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
112
mozilla/cmd/dialup/as_html/dialinf2.htm
Normal file
@@ -0,0 +1,112 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="dialinf2.js">
|
||||
</SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" ONLOAD="loadData()" ID="dialinf200">
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</LAYER>
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
<FORM>
|
||||
<P CLASS="title"><B>Phone Number of Your Location</B></P>
|
||||
<P>Please enter the phone number of the line that you are using to connect--the line that is now connected to your computer or modem. Account Setup uses this information to set up your connection software to access the Internet.</P>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Telephone Number:
|
||||
</B>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
<TD VALIGN="TOP" ALIGN="LEFT" COLSPAN="2">
|
||||
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" ID="nospace">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" VALIGN="BOTTOM">
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="dialinf202">
|
||||
writeLocalText("Area Code:");
|
||||
</SCRIPT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="MIDDLE" VALIGN="TOP">
|
||||
<INPUT NAME="modemAreaCode" TYPE="&{localString};" SIZE=3 MAXLENGTH=3>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP">
|
||||
<INPUT NAME="modemPhoneNumber" TYPE="text" SIZE=24 MAXLENGTH=24>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P>Please enter optional alternate area codes that you can call from your location to access and Internet service
|
||||
provider.</P>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
|
||||
<TR>
|
||||
<TD VALIGN="TOP" ALIGN="LEFT" COLSPAN="2">
|
||||
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" ID="nospace">
|
||||
<TR>
|
||||
<TD VALIGN="TOP" ALIGN="LEFT">
|
||||
<B>Alternate Area Code 1:</B>
|
||||
<SPACER TYPE=VERTICAL SIZE=2>
|
||||
</TD>
|
||||
<TD ALIGN="MIDDLE" VALIGN="TOP">
|
||||
<INPUT NAME="altAreaCode1" TYPE="text" SIZE=3 MAXLENGTH=3>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<B>Alternate Area Code 2:</B>
|
||||
<SPACER TYPE=VERTICAL SIZE=2>
|
||||
</TD>
|
||||
<TD ALIGN="MIDDLE" VALIGN="TOP">
|
||||
<INPUT NAME="altAreaCode2" TYPE="text" SIZE=3 MAXLENGTH=3>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="LEFT">
|
||||
<B>Alternate Area Code 3:</B>
|
||||
<SPACER TYPE=VERTICAL SIZE=2>
|
||||
</TD>
|
||||
<TD ALIGN="MIDDLE" VALIGN="TOP">
|
||||
<INPUT NAME="altAreaCode3" TYPE="text" SIZE=3 MAXLENGTH=3>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
171
mozilla/cmd/dialup/as_html/dialinf2.js
Normal file
@@ -0,0 +1,171 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
var intlString = "";
|
||||
var localString = "";
|
||||
|
||||
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
if ( intlFlag == "yes" )
|
||||
{
|
||||
intlString = "text";
|
||||
localString = "hidden";
|
||||
}
|
||||
else
|
||||
{
|
||||
intlString = "hidden";
|
||||
localString = "text";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function writeLocalText( theString )
|
||||
{
|
||||
if ( localString == "text" )
|
||||
{
|
||||
document.write( theString );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
if ( ( parent.parent.globals.document.vars.editMode.value == "yes" ) || checkData() )
|
||||
{
|
||||
if ( msg == parent.parent.globals.document.vars.path.value )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if ( intlFlag != "yes" )
|
||||
{
|
||||
if ( document.forms[ 0 ].modemAreaCode.value == "" )
|
||||
{
|
||||
alert( "You must enter an area code." );
|
||||
parent.parent.globals.setFocus( document.forms[ 0 ].modemAreaCode );
|
||||
return false;
|
||||
}
|
||||
if ( parent.parent.globals.verifyAreaCode( document.forms[ 0 ].modemAreaCode.value ) == false )
|
||||
{
|
||||
alert( "Please enter a valid area code." );
|
||||
parent.parent.globals.setFocus( document.forms[ 0 ].modemAreaCode );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( document.forms[ 0 ].modemPhoneNumber.value == "" )
|
||||
{
|
||||
alert( "You must enter a telephone number." );
|
||||
parent.parent.globals.setFocus( document.forms[ 0 ].modemPhoneNumber );
|
||||
return false;
|
||||
}
|
||||
if ( parent.parent.globals.verifyPhoneNumber( document.forms[ 0 ].modemPhoneNumber.value ) == false )
|
||||
{
|
||||
alert( "Please enter a valid telephone number." );
|
||||
parent.parent.globals.setFocus( document.forms[ 0 ].modemPhoneNumber );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// ¥ make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if ( ( ( document.forms[ 0 ].modemAreaCode == "undefined" ) ||
|
||||
( document.forms[ 0 ].modemAreaCode == "[object InputArray]" )
|
||||
) ||
|
||||
( ( document.forms[ 0 ].modemPhoneNumber == "undefined" ) ||
|
||||
( document.forms[ 0 ].modemPhoneNumber == "[object InputArray]" ) ) )
|
||||
{
|
||||
top.globals.debug( "FORM ELEMENT = " + document.forms[ 0 ].modemPhoneNumber );
|
||||
top.globals.debug( "SET FOCUS: " + document.forms[ 0 ].modemAreaCode + "BAD OBJECT!!!" );
|
||||
top.globals.debug( "HISTORY: " + parent.content.history );
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[ 0 ].modemAreaCode.value = parent.parent.globals.document.vars.modemAreaCode.value;
|
||||
|
||||
if ( intlFlag != "yes" )
|
||||
{
|
||||
if ( document.forms[ 0 ].modemAreaCode.value == "" )
|
||||
{
|
||||
document.forms[ 0 ].modemAreaCode.value = parent.parent.globals.document.vars.areaCode.value;
|
||||
}
|
||||
}
|
||||
|
||||
document.forms[ 0 ].modemPhoneNumber.value = parent.parent.globals.document.vars.modemPhoneNumber.value;
|
||||
if ( document.forms[ 0 ].modemPhoneNumber.value == "" )
|
||||
{
|
||||
document.forms[ 0 ].modemPhoneNumber.value = parent.parent.globals.document.vars.phoneNumber.value;
|
||||
}
|
||||
|
||||
document.forms[ 0 ].altAreaCode1.value = parent.parent.globals.document.vars.altAreaCode1.value;
|
||||
document.forms[ 0 ].altAreaCode2.value = parent.parent.globals.document.vars.altAreaCode2.value;
|
||||
document.forms[ 0 ].altAreaCode3.value = parent.parent.globals.document.vars.altAreaCode3.value;
|
||||
|
||||
parent.parent.globals.setFocus( document.forms[ 0 ].modemAreaCode );
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].modemAreaCode == "undefined") || (document.forms[0].modemAreaCode == "[object InputArray]")) ||
|
||||
((document.forms[0].modemPhoneNumber == "undefined") || (document.forms[0].modemPhoneNumber == "[object InputArray]")))
|
||||
{
|
||||
top.globals.debug("SAVE DATA ...");
|
||||
top.globals.debug("FORM ELEMENT = " + document.forms[0].modemPhoneNumber);
|
||||
top.globals.debug("SET FOCUS: " + document.forms[0].modemAreaCode + "BAD OBJECT!!!");
|
||||
top.globals.debug("HISTORY: " + parent.content.history);
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( intlFlag != "yes" )
|
||||
{
|
||||
parent.parent.globals.document.vars.modemAreaCode.value = document.forms[ 0 ].modemAreaCode.value;
|
||||
}
|
||||
parent.parent.globals.document.vars.modemPhoneNumber.value = document.forms[ 0 ].modemPhoneNumber.value;
|
||||
parent.parent.globals.document.vars.altAreaCode1.value = document.forms[ 0 ].altAreaCode1.value;
|
||||
parent.parent.globals.document.vars.altAreaCode2.value = document.forms[ 0 ].altAreaCode2.value;
|
||||
parent.parent.globals.document.vars.altAreaCode3.value = document.forms[ 0 ].altAreaCode3.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
133
mozilla/cmd/dialup/as_html/dns.htm
Normal file
@@ -0,0 +1,133 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="dns.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="dns100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Your Provider's Domain and DNS Servers</B></P>
|
||||
|
||||
<P>Enter your provider's domain name and DNS server addresses. Your provider might have given you this information when you created your account. If you don't have the information, call your provider's technical support office before continuing.</P>
|
||||
|
||||
<CENTER>
|
||||
<TABLE CELLPADDING="3" CELLSPACING="0" border="0">
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Domain name:
|
||||
</B>
|
||||
<spacer type=vertical size=8>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<INPUT NAME="domainName" TYPE="text" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
<TD VALIGN="BOTTOM" ALIGN="LEFT">
|
||||
<spacer type=horizontal size=3>(For example, <BR>
|
||||
<spacer type=horizontal size=3>providername.com)
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Primary DNS
|
||||
<BR>
|
||||
Server Address:
|
||||
</B>
|
||||
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="BOTTOM">
|
||||
<INPUT NAME="primaryDNS" TYPE="text" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
<TD VALIGN="BOTTOM" ALIGN="LEFT">
|
||||
<spacer type=horizontal size=3>(For example, 0.0.0.0)
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=0>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Secondary DNS
|
||||
<BR>
|
||||
Server Address:
|
||||
</B>
|
||||
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="BOTTOM">
|
||||
<INPUT NAME="secondaryDNS" TYPE="text" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
<TD VALIGN="BOTTOM" ALIGN="LEFT">
|
||||
<spacer type=horizontal size=3>(For example, 0.0.0.0)
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
</FORM>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
98
mozilla/cmd/dialup/as_html/dns.js
Normal file
@@ -0,0 +1,98 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes")
|
||||
return true;
|
||||
else
|
||||
return(checkData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (document.forms[0].primaryDNS.value == "" && document.forms[0].secondaryDNS.value != "") {
|
||||
document.forms[0].primaryDNS.value = document.forms[0].secondaryDNS.value;
|
||||
document.forms[0].secondaryDNS.value = "";
|
||||
}
|
||||
|
||||
if (document.forms[0].primaryDNS.value != "") {
|
||||
if (parent.parent.globals.verifyIPaddress(document.forms[0].primaryDNS.value)==false) {
|
||||
alert("The address of the primary DNS server is not valid. It should consist of digits separated by periods.");
|
||||
document.forms[0].primaryDNS.focus();
|
||||
document.forms[0].primaryDNS.select();
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
if (document.forms[0].secondaryDNS.value != "") {
|
||||
if (parent.parent.globals.verifyIPaddress(document.forms[0].secondaryDNS.value)==false) {
|
||||
alert("The address of the secondary DNS server is not valid. It should consist of digits separated by periods.");
|
||||
document.forms[0].secondaryDNS.focus();
|
||||
document.forms[0].secondaryDNS.select();
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].domainName == "undefined") || (document.forms[0].domainName == "[object InputArray]")) ||
|
||||
((document.forms[0].primaryDNS == "undefined") || (document.forms[0].primaryDNS == "[object InputArray]")) ||
|
||||
((document.forms[0].secondaryDNS == "undefined") || (document.forms[0].secondaryDNS == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[0].domainName.value = parent.parent.globals.document.vars.domainName.value;
|
||||
document.forms[0].primaryDNS.value = parent.parent.globals.document.vars.primaryDNS.value;
|
||||
document.forms[0].secondaryDNS.value = parent.parent.globals.document.vars.secondaryDNS.value;
|
||||
parent.parent.globals.setFocus(document.forms[0].domainName);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].domainName == "undefined") || (document.forms[0].domainName == "[object InputArray]")) ||
|
||||
((document.forms[0].primaryDNS == "undefined") || (document.forms[0].primaryDNS == "[object InputArray]")) ||
|
||||
((document.forms[0].secondaryDNS == "undefined") || (document.forms[0].secondaryDNS == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
parent.parent.globals.document.vars.domainName.value = document.forms[0].domainName.value;
|
||||
parent.parent.globals.document.vars.primaryDNS.value = document.forms[0].primaryDNS.value;
|
||||
parent.parent.globals.document.vars.secondaryDNS.value = document.forms[0].secondaryDNS.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
80
mozilla/cmd/dialup/as_html/download.htm
Normal file
@@ -0,0 +1,80 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="connect1.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="download100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
|
||||
<P CLASS="title"><B>Download</B></P>
|
||||
|
||||
<P>Account Setup will now connect you to the Internet account server, to download information about available account plans.
|
||||
It may take as long as two minutes for the information to be retrieved.</P>
|
||||
|
||||
<P>When evaluating account plans, think about these questions:</P>
|
||||
|
||||
<UL>
|
||||
<LI>How much time do you think you'll spend on the Internet each month?</LI>
|
||||
<LI>What are the monthly or hourly rates?</LI>
|
||||
<LI>What technical support is offered?</LI>
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<P ID="nospace">Make sure your modem is properly connected and turned on, then click Download to begin.</P>
|
||||
|
||||
<CENTER>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ID="connect101">
|
||||
generateRegServerList();
|
||||
</SCRIPT>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
155
mozilla/cmd/dialup/as_html/download.js
Normal file
@@ -0,0 +1,155 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
parent.parent.globals.debug( "download go" );
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
// * skip if we're in edit mode
|
||||
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
|
||||
{
|
||||
// * if "RegServer" specified in ACCTSET.INI, use it
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename( self );
|
||||
var intlFlag = parent.parent.globals.GetNameValuePair( theFile, "Mode Selection", "IntlMode" );
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
var theRegFile = parent.parent.globals.GetNameValuePair( theFile, "New Acct Mode", "RegServer" );
|
||||
|
||||
if ( theRegFile != null && theRegFile != "" )
|
||||
{
|
||||
parent.parent.globals.document.vars.regServer.value = theRegFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
// * otherwise, if multiple .IAS files exist, get list selection and determine appropriate .IAS file
|
||||
var pathName = parent.parent.globals.getConfigFolder( self );
|
||||
var theList = parent.parent.globals.document.setupPlugin.GetFolderContents( pathName,".IAS" );
|
||||
|
||||
if ( theList != null )
|
||||
{
|
||||
if ( theList.length > 1 )
|
||||
{
|
||||
if ( document.forms[ 0 ].regServerList.selectedIndex < 0 )
|
||||
{
|
||||
alert( "Please select an Internet account server." );
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( var x = 0; x < theList.length; x++ )
|
||||
{
|
||||
var file = parent.parent.globals.getConfigFolder( self ) + theList[ x ];
|
||||
var name = parent.parent.globals.document.setupPlugin.GetNameValuePair( file, "Dial-In Configuration", "SiteName" );
|
||||
|
||||
if ( name == document.forms[ 0 ].regServerList.options[ document.forms[ 0 ].regServerList.selectedIndex ].text )
|
||||
{
|
||||
parent.parent.globals.document.vars.regServer.value = theList[ x ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( parent.parent.globals.document.vars.regServer.value == "" )
|
||||
{
|
||||
alert( "Internal problem locating appropriate registration server file." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( theList.length == 1 )
|
||||
{
|
||||
parent.parent.globals.document.vars.regServer.value = theList[ 0 ];
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Internal problem locating a registration server file." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Internal problem locating appropriate registration server file." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateRegServerList()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
// if RegServer is not specified in ACCTSET.INI and multiple .IAS files exist, build list
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename( self );
|
||||
var theRegFile = parent.parent.globals.GetNameValuePair( theFile, "New Acct Mode", "RegServer" );
|
||||
|
||||
if ( theRegFile == null || theRegFile == "" )
|
||||
{
|
||||
var pathName = parent.parent.globals.getConfigFolder( self );
|
||||
var theList = parent.parent.globals.document.setupPlugin.GetFolderContents( pathName, ".IAS" );
|
||||
if ( theList != null )
|
||||
{
|
||||
if ( theList.length > 1 )
|
||||
{
|
||||
document.writeln( "<TABLE CELLPADDING=2 CELLSPACING=0 ID='minspace'><TR><TD ALIGN=LEFT VALIGN=TOP HEIGHT=25><spacer type=vertical size=2><B>Select an Internet account server:</B></TD><TD ALIGN=LEFT VALIGN=TOP><FORM><SELECT NAME='regServerList'>");
|
||||
for ( var x = 0; x < theList.length; x++ )
|
||||
{
|
||||
var file = parent.parent.globals.getConfigFolder( self ) + theList[ x ];
|
||||
var name = parent.parent.globals.document.setupPlugin.GetNameValuePair( file, "Dial-In Configuration", "SiteName" );
|
||||
var selected = ( x== 0 ) ? " SELECTED" : "";
|
||||
document.writeln( "<OPTION VALUE='" + name + "'" + selected + ">" + name );
|
||||
}
|
||||
document.writeln( "</SELECT></FORM></TD></TR></TABLE>" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
151
mozilla/cmd/dialup/as_html/editfour.htm
Normal file
@@ -0,0 +1,151 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<SCRIPT LANGUAGE="JavaScript" ARCHIVE="asw.jar" SRC="editfour.js">
|
||||
|
||||
</SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="editfour.js">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#000000" ALINK="#FF0000"
|
||||
onload="loadData()" ID="editfour100">
|
||||
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" WIDTH="100%" ID="nospace">
|
||||
<TR>
|
||||
<TD BGCOLOR="#CCCCFF">
|
||||
<spacer type=horizontal size=4>
|
||||
<P STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='12px';fontWeight='bold';lineHeight='1';marginTop='0';marginRight='40';marginLeft='0';
|
||||
">Other Account Setup Screens</P>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<spacer type=vertical size=6>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFFFFF" WIDTH="100%" ID="nospace">
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN=TOP>
|
||||
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" BGCOLOR="#FFFFFF" WIDTH="100%" ID="nospace">
|
||||
<TR>
|
||||
<TD VALIGN="TOP" WIDTH=468 ALIGN=LEFT>
|
||||
<FONT STYLE="marginLeft='6';fontSize='10px';fontFamily='PrimaSans BT,Helvetica,Arial';marginTop='6'
|
||||
">The last few screens of the Account Setup's IAS mode are listed below. Account Setup displays these screens only in the specific circumstances described. You can edit these screens just as you would other screens of Account Setup. To load one of the screens, click the arrow corresponding to the screen. </P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="#FFFFFF" WIDTH= ID="nospace">
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<A HREF="about:blank" onclick="setPath('register.htm');return false" ID="editfour101"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</TD>
|
||||
<TD><FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
<B>register.htm</B>
|
||||
</FONT>
|
||||
<spacer type=vertical size=8>
|
||||
<FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
Displayed by Account Setup while it is in the process of connecting to the Internet account server.
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<A HREF="about:blank" onclick="setPath('ok.htm');return false" ID="editfour102"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</TD>
|
||||
<TD><FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
<B>ok.htm</B>
|
||||
</FONT>
|
||||
<spacer type=vertical size=8>
|
||||
<FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
Displayed by Account Setup when the user has successfully completed the process of using your Internet account server to create an account. Account Setup receives the user's account information from your server, disconnects from the server, then loads this screen in the Account Setup window.
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<A HREF="about:blank" onclick="setPath('okreboot.htm');return false" ID="editfour103"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</TD>
|
||||
<TD><FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
<B>okreboot.htm</B>
|
||||
</FONT>
|
||||
<spacer type=vertical size=8>
|
||||
<FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
Displayed in the same circumstances as above, if the users must restart his or her computer before connecting to the Internet. This is a situation which
|
||||
will occur on Macintoshes running MacTCP only. Ignore this page if you are configuring for a Windows environment.
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<A HREF="about:blank" onclick="setPath('error.htm');return false" ID="editfour104"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</TD>
|
||||
<TD><FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
<B>error.htm</B>
|
||||
</FONT>
|
||||
<spacer type=vertical size=8>
|
||||
<FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
|
||||
">
|
||||
Displayed if Account Setup can't establish a connection with your Internet account server or the user connects to the Internet account server but exits without creating an account.
|
||||
</FONT><spacer type=vertical size=4>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
64
mozilla/cmd/dialup/as_html/editfour.js
Normal file
@@ -0,0 +1,64 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
var thePath = "";
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (msg == thePath) {
|
||||
return(checkData());
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
function doGo()
|
||||
{
|
||||
parent.controls.go("Next");
|
||||
}
|
||||
|
||||
function setPath(msg)
|
||||
{
|
||||
thePath = msg;
|
||||
setTimeout("doGo()",1);
|
||||
}
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
if (parent && parent.controls && parent.controls.generateControls) {
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
119
mozilla/cmd/dialup/as_html/email.htm
Normal file
@@ -0,0 +1,119 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="email.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="email100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
|
||||
<FORM>
|
||||
|
||||
<P CLASS="title"><B>Your Email Login and Password</B></P>
|
||||
|
||||
<P>Enter your email name and password, if they are different from your account login name and password. If you are not sure about your email login and password, call your provider's technical support office.</P>
|
||||
|
||||
<CENTER>
|
||||
<TABLE CELLPADDING="3" CELLSPACING="0" border="0">
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Email Login:
|
||||
</B>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP">
|
||||
<INPUT NAME="emailName" TYPE="text" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
<TD VALIGN="BOTTOM" ALIGN="LEFT">
|
||||
(For example, jsmith)
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=0>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Password:
|
||||
</B>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2">
|
||||
<INPUT NAME="emailPassword" TYPE="password" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD COLSPAN="3">
|
||||
<spacer type=vertical size=0>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="BOTTOM" ALIGN="RIGHT">
|
||||
<B>
|
||||
Type Password Again:
|
||||
</B>
|
||||
<spacer type=vertical size=2>
|
||||
</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2">
|
||||
<INPUT NAME="emailPasswordCheck" TYPE="password" SIZE=32 MAXLENGTH=32>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
</FORM>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
93
mozilla/cmd/dialup/as_html/email.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value == "yes")
|
||||
return true;
|
||||
else
|
||||
return(checkData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
if (document.forms[0].emailPassword.value != document.forms[0].emailPasswordCheck.value) {
|
||||
if (document.forms[0].emailPassword.value == "") {
|
||||
parent.parent.globals.setFocus(document.forms[0].emailPassword);
|
||||
}
|
||||
else {
|
||||
parent.parent.globals.setFocus(document.forms[0].emailPasswordCheck);
|
||||
}
|
||||
alert("The password you entered in 'Type Password Again' does not match the password you entered in 'Password'. Please re-enter your password.");
|
||||
return(false);
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
// make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
|
||||
if (((document.forms[0].emailName == "undefined") || (document.forms[0].emailName == "[object InputArray]")) ||
|
||||
((document.forms[0].emailPassword == "undefined") || (document.forms[0].emailPassword == "[object InputArray]")) ||
|
||||
((document.forms[0].emailPasswordCheck == "undefined") || (document.forms[0].emailPasswordCheck == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return;
|
||||
}
|
||||
|
||||
document.forms[0].emailName.value = parent.parent.globals.document.vars.emailName.value;
|
||||
document.forms[0].emailPassword.value = parent.parent.globals.document.vars.emailPassword.value;
|
||||
document.forms[0].emailPasswordCheck.value = parent.parent.globals.document.vars.emailPasswordCheck.value;
|
||||
if (document.forms[0].emailName.value == "" && document.forms[0].emailPassword.value == "" && document.forms[0].emailPasswordCheck.value == "") {
|
||||
document.forms[0].emailName.value = parent.parent.globals.document.vars.accountName.value;
|
||||
document.forms[0].emailPassword.value = parent.parent.globals.document.vars.accountPassword.value;
|
||||
document.forms[0].emailPasswordCheck.value = parent.parent.globals.document.vars.accountPasswordCheck.value;
|
||||
}
|
||||
parent.parent.globals.setFocus(document.forms[0].emailName);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
// make sure all form element are valid objects, otherwise just skip & return!
|
||||
if (((document.forms[0].emailName == "undefined") || (document.forms[0].emailName == "[object InputArray]")) ||
|
||||
((document.forms[0].emailPassword == "undefined") || (document.forms[0].emailPassword == "[object InputArray]")) ||
|
||||
((document.forms[0].emailPasswordCheck == "undefined") || (document.forms[0].emailPasswordCheck == "[object InputArray]")))
|
||||
{
|
||||
parent.controls.reloadDocument();
|
||||
return(true);
|
||||
}
|
||||
|
||||
parent.parent.globals.document.vars.emailName.value = document.forms[0].emailName.value;
|
||||
parent.parent.globals.document.vars.emailPassword.value = document.forms[0].emailPassword.value;
|
||||
parent.parent.globals.document.vars.emailPasswordCheck.value = document.forms[0].emailPasswordCheck.value;
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
106
mozilla/cmd/dialup/as_html/error.htm
Normal file
@@ -0,0 +1,106 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="error.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="error100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline of this screen -->
|
||||
|
||||
|
||||
<P CLASS="title"><B>Connection Error...</B></P>
|
||||
|
||||
|
||||
|
||||
<!-- The layer below contains the text displayed for errors encountered while the user
|
||||
is in IAS mode -->
|
||||
|
||||
<LAYER NAME="IAS Mode" VISIBILITY=HIDE>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE BORDER="0" CELLPADDING="6" CELLSPACING="0" WIDTH=470>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN=TOP BGCOLOR="FFFFFF">
|
||||
|
||||
<P ID="nomargins">Your connection to the Internet account server closed before you finished creating an account.</P>
|
||||
|
||||
<P ID="nomargins">If you exited the Internet account server before you were finished creating an account, you can reconnect to the server later by launching Account Setup from the Netscape Communicator folder.</P>
|
||||
|
||||
<P ID="nomargins">If Account Setup wasn't able to establish a connection with the Internet account server, make sure that your modem is installed properly, connected, and turned on. Also make sure that the telephone line you are using has an ordinary dial tone. When you're ready to try connecting again, click Connect Again.</P>
|
||||
|
||||
<P ID="nomargins">For more troubleshooting tips, click Help.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
|
||||
<!-- The layer below contains the text displayed for errors encountered while the user
|
||||
is in NCI mode -->
|
||||
|
||||
<LAYER NAME="NCI Mode" VISIBILITY=HIDE>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE BORDER="0" CELLPADDING="6" CELLSPACING="0" WIDTH=500>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN=TOP BGCOLOR="FFFFFF">
|
||||
|
||||
<P ID="nomargins">Account Setup wasn't able to establish a connection to your account. Make sure that your modem is installed properly, connected, and turned on. Also make sure that the telephone line you are using has an ordinary dial tone. When you're ready to try connecting again, click Connect Again.</P>
|
||||
|
||||
<P ID="nomargins">For more troubleshooting tips, click Help.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
82
mozilla/cmd/dialup/as_html/error.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if (parent.parent.globals.document.vars.editMode.value != "yes")
|
||||
{
|
||||
if (msg == parent.parent.globals.document.vars.path.value) {
|
||||
parent.parent.globals.document.vars.tryAgain.value = "yes";
|
||||
return(checkData());
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
else {
|
||||
if (msg == parent.parent.globals.document.vars.path.value)
|
||||
alert("Sorry, you cannot connect while in using the Account Setup Editor.");
|
||||
return(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showErrorLayer()
|
||||
{
|
||||
if (document.layers["IAS Mode"] && document.layers["NCI Mode"]) {
|
||||
if (parent.parent.globals.document.vars.path.value == "Existing Path") {
|
||||
document.layers["IAS Mode"].visibility = "hide";
|
||||
document.layers["NCI Mode"].visibility = "show";
|
||||
}
|
||||
else {
|
||||
document.layers["IAS Mode"].visibility = "show";
|
||||
document.layers["NCI Mode"].visibility = "hide";
|
||||
}
|
||||
}
|
||||
else {
|
||||
setTimeout("showErrorLayer()",1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
setTimeout("showErrorLayer()",1000);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
142
mozilla/cmd/dialup/as_html/globals.htm
Normal file
@@ -0,0 +1,142 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<EMBED NAME='setupPlugin' TYPE='application/x-netscape-autoconfigure-dialer' HIDDEN=true MAYSCRIPT></EMBED>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="globals1.js">
|
||||
</SCRIPT>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="globals2.js">
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR = #000066>
|
||||
|
||||
<PRE>
|
||||
<FORM NAME="vars">
|
||||
|
||||
Debug Mode: <INPUT NAME="debugMode" TYPE="Text" VALUE="yes"><BR>
|
||||
Edit Mode: <INPUT NAME="editMode" TYPE="Text" VALUE="no"><BR>
|
||||
QA Mode: <INPUT NAME="qaMode" TYPE="Text" VALUE="no"><BR>
|
||||
International Mode: <INPUT NAME="intlMode" TYPE="Text"><BR>
|
||||
Startup File: <INPUT NAME="startupFile" TYPE="Text"><BR>
|
||||
Registration server: <INPUT NAME="regServer" TYPE="text"><BR>
|
||||
Reg Data: <TEXTAREA ROWS=4 COLS=60 NAME="regData" TYPE="text"></TEXTAREA><BR>
|
||||
Reg Bookmark File: <TEXTAREA ROWS=4 COLS=60 NAME="regBookmark" TYPE="text"></TEXTAREA><BR>
|
||||
Reg Lock File: <TEXTAREA ROWS=4 COLS=60 NAME="lockFile" TYPE="text"></TEXTAREA><BR>
|
||||
RegMode Active: <INPUT NAME="regMode" TYPE="text"><P>
|
||||
Inited: <INPUT NAME="inited" TYPE="Text" VALUE="no"><BR>
|
||||
Offline Mode: <INPUT NAME="offlineMode" TYPE="Text"><BR>
|
||||
Warn on Cookies: <INPUT NAME="cookieWarning" TYPE="Text"><BR>
|
||||
Error, Try Again: <INPUT NAME="tryAgain" TYPE="Text" VALUE="no"><BR>
|
||||
Screen History: <TEXTAREA ROWS=3 COLS=40 NAME="pageHistory"></TEXTAREA><BR>
|
||||
|
||||
<P><CENTER><HR WIDTH="50%"></CENTER><P>
|
||||
|
||||
Path: <INPUT NAME="path" TYPE="text"><BR>
|
||||
|
||||
First: <INPUT NAME="first" TYPE="text"><BR>
|
||||
Last: <INPUT NAME="last" TYPE="text"><BR>
|
||||
Company: <INPUT NAME="company" TYPE="text"><BR>
|
||||
Address1: <INPUT NAME="address1" TYPE="text"><BR>
|
||||
Address2: <INPUT NAME="address2" TYPE="text"><BR>
|
||||
Address3: <INPUT NAME="address3" TYPE="text"><BR>
|
||||
City: <INPUT NAME="city" TYPE="text">
|
||||
State: <INPUT NAME="state" TYPE="text">
|
||||
Zip: <INPUT NAME="zip" TYPE="text"><BR>
|
||||
Areacode: <INPUT NAME="areaCode" TYPE="text">
|
||||
Phonenumber: <INPUT NAME="phoneNumber" TYPE="text"><BR>
|
||||
Country: <INPUT NAME="country" TYPE="text"><BR>
|
||||
CountryCode: <INPUT NAME="countryCode" TYPE="text"><BR>
|
||||
|
||||
Cardname: <INPUT NAME="cardname" TYPE="text"><BR>
|
||||
Cardtype: <INPUT NAME="cardtype" TYPE="text"><BR>
|
||||
Cardcode: <INPUT NAME="cardcode" TYPE="text"><BR>
|
||||
Cardnumber: <INPUT NAME="cardnumber" TYPE="text"><BR>
|
||||
Month: <INPUT NAME="month" TYPE="text"><BR>
|
||||
Year: <INPUT NAME="year" TYPE="text"><BR>
|
||||
|
||||
Modem: <INPUT NAME="modem" TYPE="text"><BR>
|
||||
|
||||
Manufacturer: <INPUT NAME="manufacturer" TYPE="text"><BR>
|
||||
Model: <INPUT NAME="model" TYPE="text"><BR>
|
||||
<INPUT NAME="port" TYPE="radio">Modem Port<BR>
|
||||
<INPUT NAME="port" TYPE="radio">Printer Port<BR>
|
||||
|
||||
Modem Areacode: <INPUT NAME="modemAreaCode" TYPE="text">
|
||||
Modem Phonenumber: <INPUT NAME="modemPhoneNumber" TYPE="text"><BR>
|
||||
|
||||
Accept Language: <INPUT NAME="acceptLanguage" TYPE="text">
|
||||
|
||||
Alternate Area Code 1: <INPUT NAME="altAreaCode1" TYPE="text">
|
||||
Alternate Area Code 2: <INPUT NAME="altAreaCode2" TYPE="text">
|
||||
Alternate Area Code 3: <INPUT NAME="altAreaCode3" TYPE="text"><BR>
|
||||
|
||||
<!INPUT NAME="cwOFF" TYPE="checkbox">
|
||||
CallWaiting: <INPUT NAME="cwData" TYPE="text"><BR>
|
||||
<!INPUT NAME="prefix" TYPE="checkbox">
|
||||
Prefix: <INPUT NAME="prefixData" TYPE="text"><BR>
|
||||
DialMethod: <INPUT NAME="dialMethod" TYPE="text"><BR>
|
||||
|
||||
Providername: <INPUT NAME="providername" TYPE="text"><BR>
|
||||
ProviderFilename: <INPUT NAME="providerFilename" TYPE="text"><BR>
|
||||
|
||||
Account Areacode: <INPUT NAME="accountAreaCode" TYPE="text">
|
||||
Account Phonenumber: <INPUT NAME="accountPhoneNumber" TYPE="text"><BR>
|
||||
|
||||
Login Name: <INPUT NAME="accountName" TYPE="text"><BR>
|
||||
Password: <INPUT NAME="accountPassword" TYPE="password"><BR>
|
||||
Password Check: <INPUT NAME="accountPasswordCheck" TYPE="password"><BR>
|
||||
TTY Window: <INPUT NAME="ttyWindow" TYPE="checkbox"><BR>
|
||||
|
||||
Email Name: <INPUT NAME="emailName" TYPE="text"><BR>
|
||||
Email Password: <INPUT NAME="emailPassword" TYPE="password"><BR>
|
||||
Email Password Check: <INPUT NAME="emailPasswordCheck" TYPE="password"><BR>
|
||||
|
||||
Publish URL: <INPUT NAME="publishURL" TYPE="text"><BR>
|
||||
Publish Password: <INPUT NAME="publishPassword" TYPE="password"><BR>
|
||||
Publish Password Check: <INPUT NAME="publishPasswordCheck" TYPE="password"><BR>
|
||||
View URL: <INPUT NAME="viewURL" TYPE="text"><BR>
|
||||
|
||||
SMTP server: <INPUT NAME="SMTP" TYPE="text"><BR>
|
||||
Mail server: <INPUT NAME="mailServer" TYPE="text"><BR>
|
||||
Mail protocol: <INPUT NAME="mailProtocol" TYPE="text"><BR>
|
||||
NNTP server: <INPUT NAME="NNTP" TYPE="text"><BR>
|
||||
LDAP server: <TEXTAREA NAME="LDAP" TYPE="text"></TEXTAREA><BR>
|
||||
|
||||
Domain name: <INPUT NAME="domainName" TYPE="text"><BR>
|
||||
Primary DNS server: <INPUT NAME="primaryDNS" TYPE="text"><P>
|
||||
Secondary DNS server: <INPUT NAME="secondaryDNS" TYPE="text"><P>
|
||||
Static IP address: <INPUT NAME="ipAddress" TYPE="text"><P>
|
||||
|
||||
Static IP address: <INPUT NAME="scriptEnabled" TYPE="text"><P>
|
||||
Static IP address: <INPUT NAME="scriptFile" TYPE="text"><P>
|
||||
|
||||
Profile Lockfilename: <INPUT NAME="lckFilename" TYPE="text"><P>
|
||||
|
||||
External Editor: <INPUT NAME="externalEditor" TYPE="text"><P>
|
||||
|
||||
</FORM>
|
||||
</PRE>
|
||||
|
||||
</BODY>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="globals100">
|
||||
loadGlobalData();
|
||||
</SCRIPT>
|
||||
|
||||
</HTML>
|
||||
942
mozilla/cmd/dialup/as_html/globals1.js
Normal file
@@ -0,0 +1,942 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
compromisePrincipals();
|
||||
enableExternalCapture(); // This requires UniversalBrowserWrite access
|
||||
parent.captureEvents( Event.MOUSEDOWN | Event.MOUSEUP | Event.DRAGDROP | Event.DBLCLICK );
|
||||
parent.onmousedown = cancelEvent;
|
||||
parent.onmouseup = cancelEvent;
|
||||
parent.ondragdrop = cancelEvent;
|
||||
parent.ondblclick = cancelEvent;
|
||||
|
||||
var oneStepSemaphore = false;
|
||||
var selectedISP = null;
|
||||
|
||||
function cancelEvent( e )
|
||||
{
|
||||
var retVal = false;
|
||||
|
||||
if ( ( e.which < 2 ) && ( e.type != "dragdrop" ) && ( e.type != "dblclick" ) )
|
||||
retVal = routeEvent( e );
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function debug( theString )
|
||||
{
|
||||
java.lang.System.out.println( theString );
|
||||
// netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
//
|
||||
// if ( document.vars.debugMode.value.toLowerCase() == "yes" )
|
||||
// document.setupPlugin.debug( theString );
|
||||
}
|
||||
|
||||
function GetNameValuePair( file, section, variable )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var value = parent.globals.document.setupPlugin.GetNameValuePair( file, section, variable );
|
||||
if ( value == null )
|
||||
value = "";
|
||||
return value;
|
||||
}
|
||||
|
||||
function SetNameValuePair( file, section, variable, data )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
parent.globals.document.setupPlugin.SetNameValuePair( file, section, variable, data );
|
||||
//debug( "\tSetNameValuePair: [" + section + "] " + variable + "=" + data );
|
||||
}
|
||||
|
||||
|
||||
// * returns a string representing the path to the folder named "Config" inside the folder "Data" that
|
||||
// is installed in the Communicator's home directory
|
||||
function getConfigFolder( object )
|
||||
{
|
||||
var pathName;
|
||||
pathName = getFolder( object ) + "Config" + "\\";
|
||||
|
||||
//debug( "getConfigFolder: " + pathName );
|
||||
|
||||
return pathName;
|
||||
}
|
||||
|
||||
// * returns a string representing the path to the file "ACCTSET.INI" inside the folder
|
||||
// returned from getConfigFolder
|
||||
function getAcctSetupFilename( object )
|
||||
{
|
||||
var file;
|
||||
file = getConfigFolder( object ) + "ACCTSET.INI";
|
||||
|
||||
//debug( "getAcctSetupFilename: " + file );
|
||||
return file;
|
||||
}
|
||||
|
||||
function getPlatform()
|
||||
{
|
||||
var platform = new String( navigator.userAgent );
|
||||
var x = platform.indexOf( "(" ) + 1;
|
||||
var y = platform.indexOf( ";", x + 1 );
|
||||
platform = platform.substring( x, y );
|
||||
return platform;
|
||||
}
|
||||
|
||||
// * returns a canoncial path to the folder containing the document representing the current contents of "window"
|
||||
function getFolder( window )
|
||||
{
|
||||
platform = getPlatform();
|
||||
|
||||
if ( platform == "Macintosh" )
|
||||
{ // Macintosh support
|
||||
var path = unescape( window.location.pathname );
|
||||
if ( ( x = path.lastIndexOf( "/" ) ) > 0 )
|
||||
path = path.substring( 0, x + 1 );
|
||||
|
||||
//var fileArray = path.split( "/" );
|
||||
//var newpath = fileArray.join( ":" ) + ":";
|
||||
|
||||
//if ( newpath.charAt( 0 ) == ':' )
|
||||
// newpath = newpath.substring( 1, newpath.length );
|
||||
|
||||
newpath = path;
|
||||
}
|
||||
else
|
||||
{ // Windows support
|
||||
|
||||
// note: JavaScript returns path with '/' instead of '\'
|
||||
var path = unescape( window.location.pathname );
|
||||
|
||||
var drive = "|";
|
||||
|
||||
// gets the drive letter and directory path
|
||||
if ( ( x = path.lastIndexOf( "|" ) ) > 0 )
|
||||
{
|
||||
drive = path.substring( path.indexOf( '/' ) + 1, path.indexOf( '|' ) );
|
||||
path = path.substring( path.indexOf( '|' ) + 1, path.lastIndexOf( '/' ) + 1 );
|
||||
}
|
||||
|
||||
var pathArray = path.split( "/" );
|
||||
path = pathArray.join( "\\" );
|
||||
|
||||
//debug( "drive: " + drive + " path: " + path );
|
||||
|
||||
// construct newpath
|
||||
|
||||
newpath = drive + ":" + path + "\\";
|
||||
debug( "path: " + newpath );
|
||||
}
|
||||
return newpath;
|
||||
}
|
||||
|
||||
function setFocus( theObject )
|
||||
{
|
||||
theObject.focus();
|
||||
theObject.select();
|
||||
}
|
||||
|
||||
function message( txt )
|
||||
{
|
||||
window.status = txt;
|
||||
setTimeout( "remove_message()", 10000 );
|
||||
}
|
||||
|
||||
function remove_message()
|
||||
{
|
||||
window.status = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkPluginExists( name, generateOutputFlag )
|
||||
{
|
||||
/*
|
||||
var myPlugin = navigator.plugins["name"];
|
||||
if (myPlugin) {
|
||||
// do something here
|
||||
}
|
||||
else {
|
||||
document.writeln("<CENTER><STRONG>Warning! The '" +name+ "' plug-in is not installed!</STRONG></CENTER>\n");
|
||||
}
|
||||
*/
|
||||
|
||||
if ( navigator.javaEnabled() )
|
||||
{
|
||||
var myMimetype = navigator.mimeTypes[ name ]
|
||||
if ( myMimetype )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( generateOutputFlag == true )
|
||||
{
|
||||
document.writeln( "<CENTER><STRONG>The 'Account Setup Plugin' is not installed!<P>\n" );
|
||||
document.writeln( "Please install the plugin, then run 'Account Setup' again.</STRONG></CENTER>\n" );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( generateOutputFlag==true )
|
||||
{
|
||||
document.writeln( "<CENTER><STRONG>Java support is disabled!<P>\n" );
|
||||
document.writeln( "Choose Options | Network Preferences and enable Java, then try again.</STRONG></CENTER>\n" );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function forceReboot(pageName)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
debug( "go: Reboot needed before move to page " + pageName );
|
||||
alert( "A reboot is needed. Account Setup will continue after the reboot." );
|
||||
navigator.preference( "mail.check_new_mail", false );
|
||||
document.vars.startupFile.value = pageName;
|
||||
saveGlobalData();
|
||||
|
||||
// if rebooting and using magic profile, rename it so that it won't be automatically deleted at next launch
|
||||
var profileName = parent.parent.globals.document.setupPlugin.GetCurrentProfileName();
|
||||
if ( profileName != null && profileName != "" )
|
||||
{
|
||||
profileName = profileName.toUpperCase();
|
||||
if ( profileName == '911' || profileName == 'USER1' )
|
||||
parent.parent.globals.document.setupPlugin.SetCurrentProfileName( "912" );
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.Reboot( getFolder( self ) + "start.htm" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
function findVariable( theVar )
|
||||
{
|
||||
var theValue = "";
|
||||
var regData = parent.parent.globals.document.vars.regData.value;
|
||||
var x = regData.indexOf( theVar + "=" );
|
||||
if ( x >= 0 )
|
||||
{
|
||||
x = x + theVar.length + 1;
|
||||
var y = regData.indexOf( "\r", x );
|
||||
if ( y > x )
|
||||
{
|
||||
theValue = regData.substring( x, y );
|
||||
debug( "findVariable: " + theVar + "=" + theValue );
|
||||
}
|
||||
}
|
||||
return theValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// contentFile = "main.htm";
|
||||
function getContentPage()
|
||||
{
|
||||
// var file = contentFile;
|
||||
// contentFile = null;
|
||||
var file = parent.parent.globals.document.vars.startupFile.value;
|
||||
parent.parent.globals.document.vars.startupFile.value = "";
|
||||
return file;
|
||||
}
|
||||
|
||||
function setContentPage( file )
|
||||
{
|
||||
// contentFile = file;
|
||||
parent.parent.globals.document.vars.startupFile.value = file;
|
||||
}
|
||||
|
||||
|
||||
function loadUserInput()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if (document.vars.inited.value != "yes") {
|
||||
document.vars.inited.value = "yes";
|
||||
|
||||
var cookieWarning = navigator.preference("network.cookie.warnAboutCookies");
|
||||
if (cookieWarning == true) {
|
||||
document.vars.cookieWarning.value = "yes";
|
||||
}
|
||||
else {
|
||||
document.vars.cookieWarning.value = "no";
|
||||
}
|
||||
navigator.preference("network.cookie.warnAboutCookies", false);
|
||||
|
||||
document.vars.offlineMode.value = navigator.preference("offline.startup_mode");
|
||||
navigator.preference("offline.startup_mode", 0); // online
|
||||
navigator.preference("network.online", true);
|
||||
|
||||
var acctSetupFile = getAcctSetupFilename(self);
|
||||
if (acctSetupFile != null && acctSetupFile != "") {
|
||||
var intlMode = parent.parent.globals.GetNameValuePair(acctSetupFile,"Mode Selection","IntlMode");
|
||||
if (intlMode != null && intlMode != "") {
|
||||
intlMode = intlMode.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (userInputFile != null && userInputFile != "") {
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection="Account Setup User Input";
|
||||
|
||||
var regServer = GetNameValuePair(userInputFile,theSection,"regServer");
|
||||
if (regServer != null && regServer != "") {
|
||||
document.vars.regServer.value = regServer;
|
||||
SetNameValuePair(userInputFile,theSection,"regServer", "");
|
||||
}
|
||||
document.vars.first.value = GetNameValuePair(userInputFile,theSection,"first");
|
||||
document.vars.last.value = GetNameValuePair(userInputFile,theSection,"last");
|
||||
document.vars.company.value = GetNameValuePair(userInputFile,theSection,"company");
|
||||
document.vars.address1.value = GetNameValuePair(userInputFile,theSection,"address1");
|
||||
document.vars.address2.value = GetNameValuePair(userInputFile,theSection,"address2");
|
||||
if (intlMode=="yes") {
|
||||
document.vars.address3.value = GetNameValuePair(userInputFile,theSection,"address3");
|
||||
document.vars.city.value="";
|
||||
document.vars.state.value="";
|
||||
document.vars.zip.value="";
|
||||
document.vars.areaCode.value="";
|
||||
}
|
||||
else {
|
||||
document.vars.address3.value="";
|
||||
document.vars.city.value = GetNameValuePair(userInputFile,theSection,"city");
|
||||
document.vars.state.value = GetNameValuePair(userInputFile,theSection,"state");
|
||||
document.vars.zip.value = GetNameValuePair(userInputFile,theSection,"zip");
|
||||
document.vars.areaCode.value = GetNameValuePair(userInputFile,theSection,"areaCode");
|
||||
}
|
||||
document.vars.phoneNumber.value = GetNameValuePair(userInputFile,theSection,"phoneNumber");
|
||||
document.vars.country.value = GetNameValuePair(userInputFile,theSection,"country");
|
||||
document.vars.countryCode.value = GetNameValuePair(userInputFile,theSection,"countryCode");
|
||||
|
||||
document.vars.cardname.value = GetNameValuePair(userInputFile,theSection,"cardname");
|
||||
document.vars.cardtype.value = GetNameValuePair(userInputFile,theSection,"cardtype");
|
||||
document.vars.cardcode.value = GetNameValuePair(userInputFile,theSection,"cardcode");
|
||||
document.vars.cardnumber.value = GetNameValuePair(userInputFile,theSection,"cardnumber");
|
||||
SetNameValuePair(userInputFile,theSection,"cardnumber", "");
|
||||
|
||||
document.vars.month.value = GetNameValuePair(userInputFile,theSection,"month");
|
||||
document.vars.year.value = GetNameValuePair(userInputFile,theSection,"year");
|
||||
|
||||
document.vars.modem.value = GetNameValuePair(userInputFile,theSection,"modem");
|
||||
document.vars.manufacturer.value = GetNameValuePair(userInputFile,theSection,"manufacturer");
|
||||
document.vars.model.value = GetNameValuePair(userInputFile,theSection,"model");
|
||||
|
||||
|
||||
document.vars.externalEditor.value = GetNameValuePair(userInputFile,theSection,"externalEditor");
|
||||
|
||||
|
||||
if (intlMode=="yes") {
|
||||
document.vars.modemAreaCode.value="";
|
||||
}
|
||||
else {
|
||||
document.vars.modemAreaCode.value = GetNameValuePair(userInputFile,theSection,"modemAreaCode");
|
||||
}
|
||||
document.vars.modemPhoneNumber.value = GetNameValuePair(userInputFile,theSection,"modemPhoneNumber");
|
||||
|
||||
document.vars.altAreaCode1.value = GetNameValuePair( userInputFile, theSection, "altAreaCode1" );
|
||||
document.vars.altAreaCode2.value = GetNameValuePair( userInputFile, theSection, "altAreaCode2" );
|
||||
document.vars.altAreaCode3.value = GetNameValuePair( userInputFile, theSection, "altAreaCode3" );
|
||||
|
||||
document.vars.cwData.value = GetNameValuePair(userInputFile,theSection,"cwData");
|
||||
if (document.vars.cwData.value != null && document.vars.cwData.value != "") {
|
||||
// document.vars.prefix.cwOFF=1;
|
||||
}
|
||||
else {
|
||||
// document.vars.prefix.cwOFF=0;
|
||||
}
|
||||
document.vars.prefixData.value = GetNameValuePair(userInputFile,theSection,"prefixData");
|
||||
if (document.vars.prefixData.value != null && document.vars.prefixData.value != "") {
|
||||
// document.vars.prefix.checked=1;
|
||||
}
|
||||
else {
|
||||
// document.vars.prefix.checked=0;
|
||||
}
|
||||
document.vars.dialMethod.value = GetNameValuePair(userInputFile,theSection,"dialMethod");
|
||||
|
||||
document.vars.providername.value = GetNameValuePair(userInputFile,theSection,"providername");
|
||||
if (intlMode=="yes") {
|
||||
document.vars.accountAreaCode.value="";
|
||||
}
|
||||
else {
|
||||
document.vars.accountAreaCode.value = GetNameValuePair(userInputFile,theSection,"accountAreaCode");
|
||||
}
|
||||
document.vars.accountPhoneNumber.value = GetNameValuePair(userInputFile,theSection,"accountPhoneNumber");
|
||||
|
||||
document.vars.accountName.value = GetNameValuePair(userInputFile,theSection,"accountName");
|
||||
document.vars.emailName.value = GetNameValuePair(userInputFile,theSection,"emailName");
|
||||
document.vars.publishURL.value = GetNameValuePair(userInputFile,theSection,"publishURL");
|
||||
document.vars.viewURL.value = GetNameValuePair(userInputFile,theSection,"viewURL");
|
||||
|
||||
document.vars.accountPassword.value = GetNameValuePair(userInputFile,theSection,"accountPassword"); // existing path
|
||||
document.vars.accountPasswordCheck.value = GetNameValuePair(userInputFile,theSection,"accountPasswordCheck");
|
||||
document.vars.emailPassword.value = GetNameValuePair(userInputFile,theSection,"emailPassword");
|
||||
document.vars.emailPasswordCheck.value = GetNameValuePair(userInputFile,theSection,"emailPasswordCheck");
|
||||
document.vars.publishPassword.value = GetNameValuePair(userInputFile,theSection,"publishPassword");
|
||||
document.vars.publishPasswordCheck.value = GetNameValuePair(userInputFile,theSection,"publishPasswordCheck");
|
||||
document.vars.SMTP.value = GetNameValuePair(userInputFile,theSection,"SMTP");
|
||||
document.vars.mailServer.value = GetNameValuePair(userInputFile,theSection,"mailServer");
|
||||
document.vars.mailProtocol.value = GetNameValuePair(userInputFile,theSection,"mailProtocol");
|
||||
document.vars.NNTP.value = GetNameValuePair(userInputFile,theSection,"NNTP");
|
||||
document.vars.domainName.value = GetNameValuePair(userInputFile,theSection,"domainName");
|
||||
document.vars.primaryDNS.value = GetNameValuePair(userInputFile,theSection,"primaryDNS");
|
||||
document.vars.secondaryDNS.value = GetNameValuePair(userInputFile,theSection,"secondaryDNS");
|
||||
document.vars.ipAddress.value = GetNameValuePair(userInputFile,theSection,"ipAddress");
|
||||
document.vars.scriptEnabled.value = GetNameValuePair(userInputFile,theSection,"scriptEnabled");
|
||||
document.vars.scriptFile.value = GetNameValuePair(userInputFile,theSection,"scriptFile");
|
||||
document.vars.lckFilename.value = GetNameValuePair(userInputFile,theSection,"lckFilename");
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"accountPassword", ""); // existing path
|
||||
SetNameValuePair(userInputFile,theSection,"accountPasswordCheck", "");
|
||||
SetNameValuePair(userInputFile,theSection,"emailPassword", "");
|
||||
SetNameValuePair(userInputFile,theSection,"emailPasswordCheck", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPassword", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPasswordCheck", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
loadGlobalData: checks for the plugin; reads in any saved user input from a previous session
|
||||
*/
|
||||
|
||||
function loadGlobalData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if ( document.setupPlugin == null )
|
||||
return;
|
||||
|
||||
if ( document.vars.inited.value != "yes" )
|
||||
{
|
||||
|
||||
// load globals here
|
||||
|
||||
var acctSetupFile = getAcctSetupFilename( self );
|
||||
if ( acctSetupFile != null && acctSetupFile != "" )
|
||||
{
|
||||
var intlMode = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "IntlMode" );
|
||||
if ( intlMode != null && intlMode != "" )
|
||||
{
|
||||
intlMode = intlMode.toLowerCase();
|
||||
document.vars.intlMode.value = intlMode;
|
||||
}
|
||||
|
||||
var editMode = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "EditMode" );
|
||||
if ( editMode != null && editMode != "" )
|
||||
{
|
||||
editMode = editMode.toLowerCase();
|
||||
document.vars.editMode.value = editMode;
|
||||
SetNameValuePair( acctSetupFile, "Mode Selection", "EditMode", "no" );
|
||||
}
|
||||
|
||||
// if not in editMode, ensure that OS support is available (networking,dialer,etc)
|
||||
if ( editMode != "yes" )
|
||||
{
|
||||
var installedFlag = document.setupPlugin.CheckEnvironment();
|
||||
if ( installedFlag != true )
|
||||
{
|
||||
document.setupPlugin.QuitNavigator();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// set appropriate path info (if not prompting user)
|
||||
|
||||
document.vars.path.value = "";
|
||||
var newPathFlag = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "ForceNew" );
|
||||
newPathFlag = newPathFlag.toLowerCase();
|
||||
var existingPathFlag = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "ForceExisting" );
|
||||
existingPathFlag = existingPathFlag.toLowerCase();
|
||||
|
||||
if ( newPathFlag == "yes" && existingPathFlag != "yes" )
|
||||
document.vars.path.value = "New Path";
|
||||
else if ( existingPathFlag == "yes" && newPathFlag != "yes" )
|
||||
document.vars.path.value = "Existing Path";
|
||||
|
||||
if ( document.vars.debugMode.value.toLowerCase() != "yes" && ( document.vars.editMode.value.toLowerCase() != "yes" ) )
|
||||
if (checkPluginExists( "application/x-netscape-autoconfigure-dialer", false ) )
|
||||
document.setupPlugin.SetKiosk( true );
|
||||
}
|
||||
|
||||
|
||||
// load in user input (if any)
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if ( userInputFile != null && userInputFile != "" )
|
||||
{
|
||||
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection = "Account Setup User Input";
|
||||
|
||||
document.vars.externalEditor.value = GetNameValuePair( userInputFile, theSection, "externalEditor" );
|
||||
|
||||
var startupFile = GetNameValuePair( userInputFile, theSection, "startupFile" );
|
||||
if ( startupFile != null && startupFile != "" )
|
||||
{
|
||||
document.vars.startupFile.value = startupFile;
|
||||
document.vars.path.value = GetNameValuePair( userInputFile, theSection, "path" );
|
||||
document.vars.pageHistory.value = GetNameValuePair( userInputFile, theSection, "pageHistory" );
|
||||
|
||||
SetNameValuePair( userInputFile, theSection, "startupFile", "" );
|
||||
SetNameValuePair( userInputFile, theSection, "path", "" );
|
||||
SetNameValuePair( userInputFile, theSection, "pageHistory", "" );
|
||||
|
||||
// if coming out of a reboot and using magic profile, rename it so that it won't be automatically deleted at next launch
|
||||
|
||||
var profileName = document.setupPlugin.GetCurrentProfileName();
|
||||
if ( profileName != null && profileName != "" )
|
||||
{
|
||||
profileName = profileName.toUpperCase();
|
||||
if ( profileName == '912' )
|
||||
document.setupPlugin.SetCurrentProfileName( "USER1" );
|
||||
}
|
||||
loadUserInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.vars.startupFile.value = "main.htm";
|
||||
// defer loading user input until after main screen has loaded (faster speedup)
|
||||
}
|
||||
parent.screen.location.replace( "screen.htm" );
|
||||
}
|
||||
|
||||
// QA support
|
||||
|
||||
var qaMode = document.vars.qaMode.value;
|
||||
if ( qaMode != null && qaMode != "" )
|
||||
{
|
||||
qaMode = qaMode.toLowerCase();
|
||||
if ( qaMode == "yes" )
|
||||
{
|
||||
if ( confirm( "Would you like to use a Milan data file to configure Communicator?" ) == true )
|
||||
{
|
||||
if ( document.setupPlugin.Milan( null, null, true, false ) == true )
|
||||
document.vars.regMode.value = "yes";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( document.vars.regMode.value == "yes" )
|
||||
setRegisterMode( 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveExternalEditor()
|
||||
{
|
||||
// Since we don't do a saveGlobalData in editMode, we need an alternate way to save the externalEditor
|
||||
// as a preference in ACCTSET.DAT. This is it.
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (userInputFile != null && userInputFile != "") {
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection="Account Setup User Input";
|
||||
SetNameValuePair(userInputFile,theSection,"externalEditor", document.vars.externalEditor.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function saveGlobalData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if (document.vars.editMode.value.toLowerCase() == "yes") return;
|
||||
|
||||
if (document.setupPlugin == null) return;
|
||||
/*
|
||||
if (document.vars.debugMode.value.toLowerCase() != "yes" && (document.vars.editMode.value.toLowerCase() != "yes")) {
|
||||
if (checkPluginExists("application/x-netscape-autoconfigure-dialer",false)) {
|
||||
document.setupPlugin.SetKiosk(false);
|
||||
}
|
||||
}
|
||||
top.statusbar.visible=true;
|
||||
top.scrollbars.visible=true;
|
||||
top.toolbar.visible=true;
|
||||
top.menubar.visible=true;
|
||||
top.locationbar.visible=true;
|
||||
top.personalbar.visible=true; // was directory
|
||||
*/
|
||||
|
||||
if (document.vars.cookieWarning.value == "yes") {
|
||||
navigator.preference("network.cookie.warnAboutCookies", true);
|
||||
}
|
||||
else {
|
||||
navigator.preference("network.cookie.warnAboutCookies", false);
|
||||
}
|
||||
|
||||
if (document.vars.offlineMode.value != "undefined") {
|
||||
navigator.preference("offline.startup_mode", document.vars.offlineMode.value);
|
||||
}
|
||||
|
||||
|
||||
// save user input (if any)
|
||||
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (userInputFile != null && userInputFile != "") {
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection="Account Setup User Input";
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"startupFile", document.vars.startupFile.value);
|
||||
SetNameValuePair(userInputFile,theSection,"regServer", document.vars.regServer.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"first", document.vars.first.value);
|
||||
SetNameValuePair(userInputFile,theSection,"last", document.vars.last.value);
|
||||
SetNameValuePair(userInputFile,theSection,"company", document.vars.company.value);
|
||||
SetNameValuePair(userInputFile,theSection,"address1", document.vars.address1.value);
|
||||
SetNameValuePair(userInputFile,theSection,"address2", document.vars.address2.value);
|
||||
SetNameValuePair(userInputFile,theSection,"address3", document.vars.address3.value);
|
||||
SetNameValuePair(userInputFile,theSection,"city", document.vars.city.value);
|
||||
SetNameValuePair(userInputFile,theSection,"state", document.vars.state.value);
|
||||
SetNameValuePair(userInputFile,theSection,"zip", document.vars.zip.value);
|
||||
SetNameValuePair(userInputFile,theSection,"areaCode", document.vars.areaCode.value);
|
||||
SetNameValuePair(userInputFile,theSection,"phoneNumber", document.vars.phoneNumber.value);
|
||||
SetNameValuePair(userInputFile,theSection,"country", document.vars.country.value);
|
||||
SetNameValuePair(userInputFile,theSection,"countryCode", document.vars.countryCode.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"cardname", document.vars.cardname.value);
|
||||
SetNameValuePair(userInputFile,theSection,"cardtype", document.vars.cardtype.value);
|
||||
SetNameValuePair(userInputFile,theSection,"cardcode", document.vars.cardcode.value);
|
||||
if (document.setupPlugin.NeedReboot() == true) {
|
||||
SetNameValuePair(userInputFile,theSection,"cardnumber", document.vars.cardnumber.value);
|
||||
SetNameValuePair(userInputFile,theSection,"path", document.vars.path.value);
|
||||
SetNameValuePair(userInputFile,theSection,"pageHistory", document.vars.pageHistory.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"accountPassword", document.vars.accountPassword.value); // existing path
|
||||
SetNameValuePair(userInputFile,theSection,"accountPasswordCheck", document.vars.accountPasswordCheck.value);
|
||||
SetNameValuePair(userInputFile,theSection,"emailPassword", document.vars.emailPassword.value);
|
||||
SetNameValuePair(userInputFile,theSection,"emailPasswordCheck", document.vars.emailPasswordCheck.value);
|
||||
SetNameValuePair(userInputFile,theSection,"publishPassword", document.vars.publishPassword.value);
|
||||
SetNameValuePair(userInputFile,theSection,"publishPasswordCheck", document.vars.publishPasswordCheck.value);
|
||||
SetNameValuePair(userInputFile,theSection,"SMTP", document.vars.SMTP.value);
|
||||
SetNameValuePair(userInputFile,theSection,"mailServer", document.vars.mailServer.value);
|
||||
SetNameValuePair(userInputFile,theSection,"mailProtocol", document.vars.mailProtocol.value);
|
||||
SetNameValuePair(userInputFile,theSection,"NNTP", document.vars.NNTP.value);
|
||||
SetNameValuePair(userInputFile,theSection,"domainName", document.vars.domainName.value);
|
||||
SetNameValuePair(userInputFile,theSection,"primaryDNS", document.vars.primaryDNS.value);
|
||||
SetNameValuePair(userInputFile,theSection,"secondaryDNS", document.vars.secondaryDNS.value);
|
||||
SetNameValuePair(userInputFile,theSection,"ipAddress", document.vars.ipAddress.value);
|
||||
SetNameValuePair(userInputFile,theSection,"scriptEnabled", document.vars.scriptEnabled.value);
|
||||
SetNameValuePair(userInputFile,theSection,"scriptFile", document.vars.scriptFile.value);
|
||||
SetNameValuePair(userInputFile,theSection,"lckFilename", document.vars.lckFilename.value);
|
||||
}
|
||||
else {
|
||||
SetNameValuePair(userInputFile,theSection,"cardnumber", "");
|
||||
SetNameValuePair(userInputFile,theSection,"path", "");
|
||||
SetNameValuePair(userInputFile,theSection,"pageHistory", "");
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"accountPassword", ""); // existing path
|
||||
SetNameValuePair(userInputFile,theSection,"accountPasswordCheck", "");
|
||||
SetNameValuePair(userInputFile,theSection,"emailPassword", "");
|
||||
SetNameValuePair(userInputFile,theSection,"emailPasswordCheck", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPassword", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPasswordCheck", "");
|
||||
}
|
||||
SetNameValuePair(userInputFile,theSection,"month", document.vars.month.value);
|
||||
SetNameValuePair(userInputFile,theSection,"year", document.vars.year.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"modem", document.vars.modem.value);
|
||||
SetNameValuePair(userInputFile,theSection,"manufacturer", document.vars.manufacturer.value);
|
||||
SetNameValuePair(userInputFile,theSection,"model", document.vars.model.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"modemAreaCode", document.vars.modemAreaCode.value);
|
||||
SetNameValuePair(userInputFile,theSection,"modemPhoneNumber", document.vars.modemPhoneNumber.value);
|
||||
SetNameValuePair(userInputFile,theSection,"altAreaCode1", document.vars.altAreaCode1.value);
|
||||
SetNameValuePair(userInputFile,theSection,"altAreaCode2", document.vars.altAreaCode2.value);
|
||||
SetNameValuePair(userInputFile,theSection,"altAreaCode3", document.vars.altAreaCode3.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"cwData", document.vars.cwData.value);
|
||||
SetNameValuePair(userInputFile,theSection,"prefixData", document.vars.prefixData.value);
|
||||
SetNameValuePair(userInputFile,theSection,"dialMethod", document.vars.dialMethod.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"providername", document.vars.providername.value);
|
||||
SetNameValuePair(userInputFile,theSection,"providerFilename", document.vars.providerFilename.value); // existing path
|
||||
SetNameValuePair(userInputFile,theSection,"accountAreaCode", document.vars.accountAreaCode.value);
|
||||
SetNameValuePair(userInputFile,theSection,"accountPhoneNumber", document.vars.accountPhoneNumber.value);
|
||||
|
||||
SetNameValuePair(userInputFile,theSection,"accountName", document.vars.accountName.value);
|
||||
SetNameValuePair(userInputFile,theSection,"emailName", document.vars.emailName.value);
|
||||
SetNameValuePair(userInputFile,theSection,"publishURL", document.vars.publishURL.value);
|
||||
SetNameValuePair(userInputFile,theSection,"viewURL", document.vars.viewURL.value);
|
||||
SetNameValuePair(userInputFile,theSection,"externalEditor", document.vars.externalEditor.value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
function monitorDialupConnection( numSecondsElapsed, monitorFunction,
|
||||
monitorEndpointSuccessFunction, monitorEndpointFailureFunction )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var connectStatusFlag = document.setupPlugin.IsDialerConnected();
|
||||
|
||||
// * give us 10 seconds to before we start to check the connection status
|
||||
if ( ( numSecondsElapsed < 10 ) || ( connectStatusFlag == true ) )
|
||||
{
|
||||
numSecondsElapsed = numSecondsElapsed + 1;
|
||||
|
||||
if ( eval ( monitorFunction ) == null )
|
||||
setTimeout( "setRegisterMode(" + numSecondsElapsed + ")", 1000 );
|
||||
else
|
||||
eval( monitorEndpointSuccessFunction );
|
||||
}
|
||||
else
|
||||
{
|
||||
// hang up (even if already disconnected, this will delete
|
||||
// the dialer's reference to the Registration Server)
|
||||
document.setupPlugin.DialerHangup();
|
||||
eval( monitorEndpointFailureFunction );
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
function set1StepMode( numSecondsElapsed )
|
||||
{
|
||||
|
||||
debug( "set1StepMode: " + numSecondsElapsed );
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var connectStatusFlag = document.setupPlugin.IsDialerConnected();
|
||||
|
||||
if ( ( numSecondsElapsed < 10 ) || ( connectStatusFlag == true ) )
|
||||
{
|
||||
//debug( "still connected" );
|
||||
numSecondsElapsed = numSecondsElapsed + 1;
|
||||
|
||||
if ( oneStepSemaphore == false )
|
||||
{
|
||||
setTimeout( "set1StepMode(" + numSecondsElapsed + ")", 1000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
oneStepSemphore = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.setupPlugin.DialerHangup();
|
||||
|
||||
// go to error screen
|
||||
setContentPage( "error.htm" );
|
||||
parent.screen.location.replace( "screen.htm" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setRegisterMode( numSecondsElapsed )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var connectStatusFlag = document.setupPlugin.IsDialerConnected();
|
||||
document.vars.regMode.value = "yes";
|
||||
var regData = document.setupPlugin.GetRegInfo( false );
|
||||
|
||||
if ( ( numSecondsElapsed < 10 ) || ( connectStatusFlag == true ) )
|
||||
{
|
||||
numSecondsElapsed = numSecondsElapsed + 1;
|
||||
|
||||
if ( regData == null )
|
||||
setTimeout( "setRegisterMode(" + numSecondsElapsed + ")", 1000 ); // check every second
|
||||
else
|
||||
{
|
||||
// handle multi-line data differently
|
||||
|
||||
var bookmarkTag = "BOOKMARK_FILE=";
|
||||
var bookmarkTagLen = bookmarkTag.length;
|
||||
|
||||
document.vars.regMode.value = "no";
|
||||
document.vars.regData.value = "";
|
||||
debug( "\nRegistration Complete: " + regData.length + " item(s)" );
|
||||
|
||||
for ( var x=0; x < regData.length; x++ )
|
||||
{
|
||||
var data = "" + regData[x];
|
||||
var dataLen = data.length;
|
||||
|
||||
if ( data.indexOf( bookmarkTag ) ==0 )
|
||||
{
|
||||
data = data.substring( bookmarkTagLen, dataLen );
|
||||
document.vars.regBookmark.value = data;
|
||||
}
|
||||
else
|
||||
document.vars.regData.value = document.vars.regData.value + regData[ x ] + "\r";
|
||||
|
||||
debug( " " + x + ": " + regData[ x ] );
|
||||
}
|
||||
|
||||
document.setupPlugin.GetRegInfo( true );
|
||||
|
||||
// hang up (this will delete the dialer's
|
||||
// reference to the Registration Server)
|
||||
document.setupPlugin.DialerHangup();
|
||||
|
||||
// check status and go to appropriate screen
|
||||
|
||||
var status = findVariable( "STATUS" );
|
||||
if ( status == "OK" )
|
||||
{
|
||||
configureNewAccount();
|
||||
|
||||
var rebootFlag = document.setupPlugin.NeedReboot();
|
||||
if ( rebootFlag == true )
|
||||
setContentPage( "okreboot.htm" );
|
||||
else
|
||||
setContentPage( "ok.htm" );
|
||||
|
||||
}
|
||||
else if ( status == "EXIT" )
|
||||
{
|
||||
saveGlobalData();
|
||||
document.setupPlugin.QuitNavigator();
|
||||
}
|
||||
else
|
||||
setContentPage( "error.htm" );
|
||||
|
||||
parent.frames[ 0 ].location.replace( "screen.htm" );
|
||||
|
||||
navigator.preference( "security.warn_submit_insecure", true );
|
||||
navigator.preference( "security.warn_entering_secure", true );
|
||||
navigator.preference( "security.warn_leaving_secure", true );
|
||||
}
|
||||
}
|
||||
|
||||
// * we've lost the connection
|
||||
else
|
||||
{
|
||||
document.vars.regMode.value = "no";
|
||||
|
||||
// hang up (even if already disconnected, this will delete
|
||||
// the dialer's reference to the Registration Server)
|
||||
document.setupPlugin.DialerHangup();
|
||||
|
||||
// go to error screen
|
||||
document.setupPlugin.GetRegInfo( true );
|
||||
setContentPage( "error.htm" );
|
||||
parent.screen.location.replace( "screen.htm" );
|
||||
|
||||
navigator.preference( "security.warn_submit_insecure", true );
|
||||
navigator.preference( "security.warn_entering_secure", true );
|
||||
navigator.preference( "security.warn_leaving_secure", true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function verifyIPaddress( address )
|
||||
{
|
||||
var dotCount = 0, dotIndex = 0, net, validFlag = false;
|
||||
|
||||
while ( dotIndex >= 0 )
|
||||
{
|
||||
net = "";
|
||||
dotIndex = address.indexOf( "." );
|
||||
if ( dotIndex >=0 )
|
||||
{
|
||||
net = address.substring( 0, dotIndex );
|
||||
address = address.substring( dotIndex + 1 );
|
||||
++dotCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
net = address;
|
||||
if ( net=="" )
|
||||
break;
|
||||
}
|
||||
|
||||
netValue = parseInt( net );
|
||||
if ( isNaN( netValue ) )
|
||||
break;
|
||||
if ( netValue < 0 || netValue > 255 )
|
||||
break;
|
||||
|
||||
if ( dotCount == 3 && dotIndex < 0 )
|
||||
validFlag = true;
|
||||
}
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
function verifyAreaCode( areaCode )
|
||||
{
|
||||
var validFlag = false;
|
||||
|
||||
if ( areaCode.length >= 3 )
|
||||
{
|
||||
validFlag = true;
|
||||
for ( var x = 0; x < areaCode.length; x++ )
|
||||
{
|
||||
if ( "0123456789".indexOf( areaCode.charAt( x ) ) < 0 )
|
||||
{
|
||||
validFlag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
function verifyZipCode( zipCode )
|
||||
{
|
||||
var validFlag = false;
|
||||
|
||||
if ( zipCode.length >= 5 )
|
||||
{
|
||||
validFlag = true;
|
||||
for ( var x = 0; x < zipCode.length; x++ )
|
||||
{
|
||||
if ( "0123456789-".indexOf( zipCode.charAt( x ) ) < 0 )
|
||||
{
|
||||
validFlag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
function verifyPhoneNumber( phoneNum )
|
||||
{
|
||||
var validFlag = false;
|
||||
|
||||
if ( phoneNum.length >= 7 )
|
||||
{
|
||||
validFlag = true;
|
||||
for ( var x=0; x < phoneNum.length; x++ )
|
||||
{
|
||||
if ( "0123456789().,-+ ".indexOf( phoneNum.charAt( x ) ) < 0 )
|
||||
{
|
||||
validFlag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
816
mozilla/cmd/dialup/as_html/globals2.js
Normal file
@@ -0,0 +1,816 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
|
||||
|
||||
compromisePrincipals();
|
||||
|
||||
|
||||
|
||||
function configureNewAccount()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
var theFile = getAcctSetupFilename(self);
|
||||
var intlFlag = GetNameValuePair(theFile,"Mode Selection","IntlMode");
|
||||
intlFlag = intlFlag.toLowerCase();
|
||||
|
||||
|
||||
var theScript = findVariable("LOGIN_SCRIPT");
|
||||
|
||||
|
||||
// determine outside line access string
|
||||
|
||||
var outsideLineAccessStr = "";
|
||||
if (document.vars.prefixData.value != "") {
|
||||
outsideLineAccessStr = document.vars.prefixData.value;
|
||||
x = outsideLineAccessStr.indexOf(",");
|
||||
if (x<0) outsideLineAccessStr = outsideLineAccessStr + ",";
|
||||
}
|
||||
|
||||
var dialAsLongDistance = findVariable("DIAL_AS_LONG_DISTANCE");
|
||||
if (dialAsLongDistance != null && dialAsLongDistance!="") {
|
||||
var dialAsLongDistanceFlag = (dialAsLongDistance=="NO") ? "FALSE":"TRUE";
|
||||
var dialAreaCode = findVariable("DIAL_AREA_CODE");
|
||||
var dialAreaCodeFlag = "FALSE";
|
||||
if (dialAreaCode != null && dialAreaCode != "") {
|
||||
dialAreaCodeFlag = (dialAreaCode == "NO") ? "FALSE":"TRUE";
|
||||
}
|
||||
}
|
||||
else if (intlFlag == "yes") {
|
||||
var dialAsLongDistanceFlag = "FALSE";
|
||||
var dialAreaCodeFlag = "FALSE";
|
||||
}
|
||||
else {
|
||||
var dialAsLongDistanceFlag = "TRUE";
|
||||
var dialAreaCodeFlag = "TRUE";
|
||||
|
||||
var ispAreaCode="";
|
||||
var ispPhoneNum = findVariable("PHONE_NUM");
|
||||
if (ispPhoneNum != null && ispPhoneNum!="") {
|
||||
var x=ispPhoneNum.indexOf("(");
|
||||
if (x>=0) {
|
||||
var y=ispPhoneNum.indexOf(")",x+1);
|
||||
ispAreaCode=ispPhoneNum.substring(x+1,y);
|
||||
}
|
||||
}
|
||||
if (ispAreaCode == document.vars.modemAreaCode.value) {
|
||||
dialAsLongDistanceFlag="FALSE";
|
||||
dialAreaCodeFlag = "FALSE";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// determine new profile name (used for Account in dialer & profile name)
|
||||
|
||||
var newProfileName = findVariable("LOGIN");
|
||||
if (newProfileName=="") {
|
||||
newProfileName = document.vars.first.value;
|
||||
if (document.vars.last.value != "") {
|
||||
newProfileName = newProfileName + " " + document.vars.last.value;
|
||||
}
|
||||
}
|
||||
if (newProfileName!="") newProfileName = newProfileName + "'s";
|
||||
if (findVariable("SITE_NAME") != "") {
|
||||
newProfileName = newProfileName + " " + findVariable("SITE_NAME");
|
||||
}
|
||||
newProfileName = newProfileName + " Account";
|
||||
if (newProfileName.length > 240) newProfileName=newProfileName.substring(0,240);
|
||||
|
||||
|
||||
// platform check
|
||||
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
if (thePlatform == "Win16") {
|
||||
if (newProfileName.length > 40) newProfileName=newProfileName.substring(0,40);
|
||||
}
|
||||
|
||||
|
||||
// On Win32 platforms, check if newProfileName contains any invalid characters, such as '/'
|
||||
// On Mac, disallow invalid characters such as ':'
|
||||
|
||||
if ((thePlatform == "WinNT") || (thePlatform == "Win95")) {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('/');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('/');
|
||||
}
|
||||
x = newProfileName.indexOf('\\');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\\');
|
||||
}
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
x = newProfileName.indexOf('\"');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\"');
|
||||
}
|
||||
x = newProfileName.indexOf('?');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('?');
|
||||
}
|
||||
x = newProfileName.indexOf('<');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('<');
|
||||
}
|
||||
x = newProfileName.indexOf('>');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('>');
|
||||
}
|
||||
x = newProfileName.indexOf('|');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('|');
|
||||
}
|
||||
x = newProfileName.indexOf('&');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('&');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Macintosh") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Win16") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('(');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('(');
|
||||
}
|
||||
x = newProfileName.indexOf(')');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(')');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// configure dialer for new account
|
||||
|
||||
dialerData = document.setupPlugin.newStringArray(24); // increment this # as new dialer strings are added
|
||||
dialerData[0] = "FileName=" + findVariable("SITE_FILE");
|
||||
dialerData[1] = "AccountName=" + newProfileName;
|
||||
dialerData[2] = "ISPPhoneNum=" + findVariable("PHONE_NUM");
|
||||
dialerData[3] = "LoginName=" + findVariable("LOGIN");
|
||||
dialerData[4] = "Password=" + findVariable("PASSWORD");
|
||||
dialerData[5] = "DNSAddress=" + findVariable("DNS_ADDR");
|
||||
dialerData[6] = "DNSAddress2=" + findVariable("DNS_ADDR_2");
|
||||
dialerData[7] = "DomainName=" + findVariable("DOMAIN_NAME");
|
||||
dialerData[8] = "IntlMode=" + ((intlFlag=="yes") ? "TRUE":"FALSE");
|
||||
dialerData[9] = "DialOnDemand=TRUE";
|
||||
dialerData[10] = "ModemName=" + document.vars.modem.value;
|
||||
dialerData[11] = "ModemType=" + document.setupPlugin.GetModemType(document.vars.modem.value);
|
||||
dialerData[12] = "DialType=" + document.vars.dialMethod.value;
|
||||
dialerData[13] = "OutsideLineAccess=" + outsideLineAccessStr;
|
||||
dialerData[14] = "DisableCallWaiting=" + ((parent.parent.globals.document.vars.cwData.value != "") ? "TRUE":"FALSE");
|
||||
dialerData[15] = "DisableCallWaitingCode=" + parent.parent.globals.document.vars.cwData.value;
|
||||
dialerData[16] = "DialAsLongDistance=" + dialAsLongDistanceFlag;
|
||||
dialerData[17] = "DialAreaCode=" + dialAreaCodeFlag;
|
||||
dialerData[18] = "ScriptEnabled=" + ((theScript==null || theScript=="") ? "FALSE":"TRUE");
|
||||
dialerData[19] = "Script=" + theScript;
|
||||
dialerData[20] = "AutoSend=" + findVariable("AUTO_SEND");
|
||||
dialerData[21] = "Location=Home";
|
||||
dialerData[22] = "DisconnectTime=" + GetNameValuePair(theFile,"Mode Selection","Dialer_Disconnect_After");
|
||||
dialerData[23] = "Path=New";
|
||||
|
||||
|
||||
// write out dialer data to Java Console
|
||||
|
||||
debug("\nNew Account for ISP: " + findVariable("SITE_NAME"));
|
||||
var numElements = dialerData.length;
|
||||
for (var x=0; x<numElements; x++) {
|
||||
debug(" " + x + ": " + dialerData[x]);
|
||||
}
|
||||
|
||||
parent.parent.globals.document.setupPlugin.DialerConfig(dialerData,false);
|
||||
|
||||
|
||||
// configure desktop (Windows)
|
||||
|
||||
parent.parent.globals.document.setupPlugin.DesktopConfig(newProfileName, null, theFile);
|
||||
|
||||
|
||||
// set up Navigator preferences
|
||||
|
||||
var userName = document.vars.first.value;
|
||||
if (document.vars.last.value != "") {
|
||||
userName = userName + " " + document.vars.last.value;
|
||||
}
|
||||
|
||||
navigator.preference("network.hosts.smtp_server", findVariable("SMTP_HOST"));
|
||||
navigator.preference("network.hosts.nntp_server", findVariable("NNTP_HOST"));
|
||||
|
||||
var mailID=""
|
||||
var mailAccount = findVariable("IMAP_HOST");
|
||||
if (mailAccount == "") {
|
||||
mailAccount = findVariable("POP_SERVER");
|
||||
}
|
||||
var mailServer="";
|
||||
|
||||
x = mailAccount.indexOf("@");
|
||||
if (x>=0) {
|
||||
mailID=mailAccount.substring(0,x);
|
||||
mailServer=mailAccount.substring(x+1,mailAccount.length);
|
||||
}
|
||||
else {
|
||||
mailID=mailAccount;
|
||||
mailServer=findVariable("DOMAIN_NAME");
|
||||
if (mailServer != "") {
|
||||
mailAccount = mailID + "@" + mailServer;
|
||||
}
|
||||
}
|
||||
|
||||
navigator.preference("network.hosts.pop_server", mailServer);
|
||||
if (findVariable("IMAP_HOST") != "") {
|
||||
navigator.preference("mail.server_type", 1);
|
||||
navigator.preference("mail.imap.server_sub_directory",findVariable("IMAP_SERVERPATH"));
|
||||
}
|
||||
else {
|
||||
navigator.preference("mail.server_type", 0);
|
||||
}
|
||||
|
||||
navigator.preference("mail.pop_name", mailID);
|
||||
navigator.preference("mail.identity.organization", document.vars.company.value);
|
||||
navigator.preference("mail.identity.reply_to", findVariable("EMAIL_ADDR"));
|
||||
navigator.preference("mail.identity.username", userName);
|
||||
navigator.preference("mail.identity.useremail", mailAccount);
|
||||
|
||||
navigator.preference("mail.remember_password", false);
|
||||
navigator.preference("mail.pop_password", "");
|
||||
var theMailPassword=findVariable("POP_PASSWORD");
|
||||
if (theMailPassword != null && theMailPassword != "") {
|
||||
theMailPassword = parent.parent.globals.document.setupPlugin.EncryptString(theMailPassword);
|
||||
if (theMailPassword != null && theMailPassword != "") {
|
||||
navigator.preference("mail.remember_password", true);
|
||||
navigator.preference("mail.pop_password", theMailPassword);
|
||||
}
|
||||
}
|
||||
|
||||
navigator.preference("editor.author", userName);
|
||||
navigator.preference("editor.publish_username", mailID);
|
||||
var pushURL = findVariable("PUBLISH_PUSH_URL");
|
||||
navigator.preference("editor.publish_location", pushURL);
|
||||
navigator.preference("editor.publish_browse_location", findVariable("PUBLISH_VIEW_URL"));
|
||||
|
||||
navigator.preference("editor.publish_password", "");
|
||||
navigator.preference("editor.publish_save_password", false);
|
||||
if (pushURL != null && pushURL != "") {
|
||||
var thePublishPassword=findVariable("PASSWORD");
|
||||
if (thePublishPassword != "") {
|
||||
thePublishPassword = parent.parent.globals.document.setupPlugin.EncryptString(thePublishPassword);
|
||||
if (thePublishPassword != null && thePublishPassword != "") {
|
||||
navigator.preference("editor.publish_save_password", true);
|
||||
navigator.preference("editor.publish_password", thePublishPassword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (findVariable("HOME_URL") != "") {
|
||||
navigator.preference("browser.startup.page", 1); // 0 blank, 1 homepage, 2 last visited
|
||||
navigator.preference("browser.startup.homepage", findVariable("HOME_URL"));
|
||||
}
|
||||
|
||||
|
||||
// look for LDAP data
|
||||
|
||||
var ldapNum = navigator.preference("ldap_1.number_of_directories");
|
||||
if (ldapNum == null || ldapNum == "") {
|
||||
// if # of directories isn't defined, count any existing LDAP entries
|
||||
ldapNum=1;
|
||||
while(true) {
|
||||
var ldapEntry = navigator.preference("ldap_1.directory" + ldapNum + ".filename");
|
||||
if (ldapEntry == null || ldapEntry == "") break;
|
||||
ldapNum = ldapNum + 1;
|
||||
}
|
||||
}
|
||||
ldapNum = 1 + ldapNum;
|
||||
|
||||
var ldapEntriesAddedFlag=false;
|
||||
var ldapIndex=1;
|
||||
while(true) {
|
||||
var ldapURL = findVariable("LDAP_HOST_" + ldapIndex);
|
||||
if (ldapURL == null || ldapURL == "") break;
|
||||
|
||||
var secureLDAP = false;
|
||||
var searchBase = "";
|
||||
var portNum = 389;
|
||||
|
||||
if (ldapURL.indexOf("ldaps://")==0) { // LDAP over SSL
|
||||
secureLDAP = true;
|
||||
portNum = 636;
|
||||
ldapURL = ldapURL.substring(8,ldapURL.length);
|
||||
}
|
||||
else if (ldapURL.indexOf("ldap://")==0) {
|
||||
ldapURL = ldapURL.substring(7,ldapURL.length);
|
||||
}
|
||||
var x = ldapURL.indexOf("/"); // find any search base
|
||||
if (x>0) {
|
||||
searchBase = ldapURL.substring(x+1,ldapURL.length);
|
||||
ldapURL = ldapURL.substring(0,x);
|
||||
}
|
||||
x = ldapURL.indexOf(":"); // find any port number
|
||||
if (x>0) {
|
||||
portNumString = ldapURL.substring(x+1,ldapURL.length);
|
||||
ldapURL = ldapURL.substring(0,x);
|
||||
if (portNumString != "") {
|
||||
portNum = parseInt(portNumString);
|
||||
}
|
||||
}
|
||||
|
||||
var ldapDesc = findVariable("LDAP_DESC_" + ldapIndex);
|
||||
if (ldapDesc == "") {
|
||||
ldapDesc = ldapURL;
|
||||
}
|
||||
|
||||
ldapEntriesAddedFlag = true;
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".filename", "");
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".description", ldapDesc);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".serverName", ldapURL);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".port", portNum);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".isSecure", secureLDAP);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".searchBase", searchBase);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".searchString", "");
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".dirType", 0);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".isOffline", false);
|
||||
navigator.preference("ldap_1.directory" + ldapNum + ".savePassword", false);
|
||||
|
||||
if (document.vars.debugMode.value.toLowerCase() == "yes") {
|
||||
debug("\tLDAP #" + ldapNum + " Desc: " + ldapDesc);
|
||||
debug("\tLDAP #" + ldapNum + " serverName: " + ldapURL);
|
||||
debug("\tLDAP #" + ldapNum + " port: " + portNum);
|
||||
debug("\tLDAP #" + ldapNum + " isSecure: " + secureLDAP);
|
||||
debug("\tLDAP #" + ldapNum + " searchBase: " + searchBase);
|
||||
}
|
||||
|
||||
ldapNum = ldapNum + 1;
|
||||
ldapIndex = ldapIndex + 1;
|
||||
}
|
||||
|
||||
if (ldapEntriesAddedFlag == true) {
|
||||
navigator.preference("ldap_1.number_of_directories", ldapNum);
|
||||
}
|
||||
|
||||
|
||||
// on Mac, prevent Internet Config from overriding new settings
|
||||
|
||||
navigator.preference("browser.mac.use_internet_config", false);
|
||||
|
||||
|
||||
var profileDir = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (profileDir != null && profileDir != "") {
|
||||
|
||||
// write MUC Configuration file
|
||||
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
var configFile="";
|
||||
if (thePlatform == "Macintosh") { // Macintosh support
|
||||
configFile = profileDir + "Configuration";
|
||||
}
|
||||
else { // Windows support
|
||||
configFile = profileDir + "CONFIG.INI";
|
||||
}
|
||||
|
||||
document.setupPlugin.SetNameValuePair(configFile,"Account", "Account", newProfileName); // findVariable("SITE_NAME")
|
||||
document.setupPlugin.SetNameValuePair(configFile,"Modem", "Modem", document.vars.modem.value);
|
||||
document.setupPlugin.SetNameValuePair(configFile,"Location", "Location", "Home");
|
||||
|
||||
|
||||
// write out Reggie bookmark file (if one was sent)
|
||||
|
||||
var currentBookmarkFilename="";
|
||||
var CRLF="";
|
||||
if (thePlatform == "Macintosh") { // Macintosh support
|
||||
currentBookmarkFilename = profileDir + "Bookmarks.html";
|
||||
CRLF = "\r";
|
||||
}
|
||||
else { // Windows support
|
||||
currentBookmarkFilename = profileDir + "BOOKMARK.HTM";
|
||||
CRLF = "\r\n";
|
||||
}
|
||||
|
||||
|
||||
// Mac only: on clean install, core Communicator doesn't copy over Bookmarks.html file from Defaults folder
|
||||
// so grab a copy from our Config folder
|
||||
|
||||
if (thePlatform == "Macintosh") {
|
||||
var theActiveProfileName = document.setupPlugin.GetCurrentProfileName();
|
||||
if (theActiveProfileName != null) {
|
||||
theActiveProfileName = theActiveProfileName.toUpperCase();
|
||||
if (theActiveProfileName == '911' || theActiveProfileName == 'USER1') {
|
||||
var theDefaultBookmarkFilename = parent.parent.globals.getConfigFolder(self) + "Bookmarks.html";
|
||||
var theBookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(theDefaultBookmarkFilename,null,null);
|
||||
if (theBookmarkData == null || theBookmarkData == "") {
|
||||
theDefaultBookmarkFilename = parent.parent.globals.getConfigFolder(self) + "bookmark.htm";
|
||||
theBookmarkData = parent.parent.globals.document.setupPlugin.GetNameValuePair(theDefaultBookmarkFilename,null,null);
|
||||
}
|
||||
if (theBookmarkData != null && theBookmarkData != "") {
|
||||
parent.parent.globals.document.setupPlugin.SaveTextToFile(currentBookmarkFilename,theBookmarkData,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var bookmarkData = "" + document.setupPlugin.GetNameValuePair(currentBookmarkFilename,null,null);
|
||||
if (bookmarkData != "") {
|
||||
if (bookmarkData.indexOf("<!DOCTYPE NETSCAPE-Bookmark-file-1>") ==0) { // check for valid bookmark file header
|
||||
|
||||
// build new bookmark title
|
||||
|
||||
var titleStr = "Bookmarks";
|
||||
var name = "";
|
||||
if (parent.parent.globals.document.vars.first.value != "" && parent.parent.globals.document.vars.last.value != "") {
|
||||
name = parent.parent.globals.document.vars.first.value + " " + parent.parent.globals.document.vars.last.value;
|
||||
}
|
||||
else {
|
||||
name = findVariable("LOGIN");
|
||||
}
|
||||
if (name != "") titleStr = titleStr + " for " + name;
|
||||
|
||||
// change TITLE section
|
||||
|
||||
var startTitleindex=bookmarkData.indexOf("<TITLE>");
|
||||
var endTitleindex=bookmarkData.indexOf("</TITLE>");
|
||||
if (startTitleindex>0 && endTitleindex>0) {
|
||||
startTitleindex = startTitleindex + "<TITLE>".length;
|
||||
var bookmarkDataLen = bookmarkData.length;
|
||||
bookmarkData = bookmarkData.substring(0,startTitleindex) + titleStr + bookmarkData.substring(endTitleindex,bookmarkDataLen);
|
||||
}
|
||||
|
||||
// change H1 section
|
||||
|
||||
var startTitleindex=bookmarkData.indexOf("<H1>");
|
||||
var endTitleindex=bookmarkData.indexOf("</H1>");
|
||||
if (startTitleindex>0 && endTitleindex>0) {
|
||||
startTitleindex = startTitleindex + "<H1>".length;
|
||||
var bookmarkDataLen = bookmarkData.length;
|
||||
bookmarkData = bookmarkData.substring(0,startTitleindex) + titleStr + bookmarkData.substring(endTitleindex,bookmarkDataLen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var regBookmarkData = document.vars.regBookmark.value;
|
||||
if (regBookmarkData != null && regBookmarkData != "") {
|
||||
if (regBookmarkData.indexOf("<!DOCTYPE NETSCAPE-Bookmark-file-1>") == 0 ) { // check for valid bookmark file header
|
||||
var cleanFlag = false;
|
||||
var activeProfileName = document.setupPlugin.GetCurrentProfileName();
|
||||
if (activeProfileName != null) {
|
||||
activeProfileName = activeProfileName.toUpperCase();
|
||||
if (activeProfileName == '911' || activeProfileName == 'USER1') {
|
||||
cleanFlag=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (cleanFlag == true) { // if magic profile, write out entire new bookmark file
|
||||
bookmarkData = regBookmarkData;
|
||||
}
|
||||
else { // else append onto end of bookmark file
|
||||
var headerStr = "<DL><p>" + CRLF;
|
||||
var startDLindex=regBookmarkData.indexOf(headerStr);
|
||||
if (startDLindex>0) {
|
||||
startDLindex = startDLindex + headerStr.length;
|
||||
}
|
||||
var lastDLindex = regBookmarkData.lastIndexOf("</DL>");
|
||||
if (startDLindex>0 && startDLindex>0) { // remove bookmark header/footer data
|
||||
var newBookmarkData = regBookmarkData.substring(startDLindex,lastDLindex);
|
||||
if (newBookmarkData != "") {
|
||||
if (bookmarkData.indexOf(newBookmarkData) <0) {
|
||||
var startDLindex=bookmarkData.indexOf(headerStr);
|
||||
if (startDLindex>0) {
|
||||
startDLindex = startDLindex + headerStr.length;
|
||||
}
|
||||
var lastDLindex = bookmarkData.lastIndexOf("</DL>");
|
||||
if (startDLindex>0 && startDLindex>0) { // merge into current bookmark file
|
||||
var bookmarkDataLen = bookmarkData.length;
|
||||
// append new bookmark data to bookmark file
|
||||
bookmarkData = bookmarkData.substring(0,lastDLindex) + newBookmarkData + bookmarkData.substring(lastDLindex,bookmarkDataLen);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // if invalid bookmark header, discard
|
||||
regBookmarkData = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (thePlatform == "Win16") {
|
||||
if (bookmarkData.length >= 16000) {
|
||||
bookmarkData = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (bookmarkData != "") {
|
||||
document.setupPlugin.SaveTextToFile(currentBookmarkFilename,bookmarkData,false);
|
||||
}
|
||||
|
||||
|
||||
// append ISP bookmark (if Reggie sends it down) to profile's bookmark file
|
||||
|
||||
var ISPurl = findVariable("ISP_URL");
|
||||
if (ISPurl != null && ISPurl != "") {
|
||||
bookmarkData = "" + document.setupPlugin.GetNameValuePair(currentBookmarkFilename, null, null);
|
||||
if (bookmarkData != null && bookmarkData != "") {
|
||||
var lastDLindex = bookmarkData.lastIndexOf("</DL>");
|
||||
if (lastDLindex >= 0) {
|
||||
var newData = bookmarkData.substring(0,lastDLindex);
|
||||
newData = newData + "\t<DT><A HREF=\"" + ISPurl + "\">" + findVariable("SITE_NAME") + "</A>" + CRLF;
|
||||
newData = newData + bookmarkData.substring(lastDLindex,bookmarkData.length);
|
||||
|
||||
if (thePlatform == "Win16") {
|
||||
if (newData.length >= 16000) {
|
||||
newData = "";
|
||||
}
|
||||
}
|
||||
if (newData != "") {
|
||||
document.setupPlugin.SaveTextToFile(currentBookmarkFilename,newData,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// rename profile
|
||||
|
||||
if (thePlatform == "Macintosh") {
|
||||
if (newProfileName.length > 31) newProfileName=newProfileName.substring(0,31);
|
||||
}
|
||||
|
||||
document.setupPlugin.SetCurrentProfileName(newProfileName);
|
||||
debug("\nSetting profile name: " + newProfileName);
|
||||
|
||||
|
||||
// set the default path to now be the existing path
|
||||
|
||||
document.vars.path.value = "Existing Path";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveAccountInfo(promptFlag)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
var thePlatform = new String(navigator.userAgent);
|
||||
var x=thePlatform.indexOf("(")+1;
|
||||
var y=thePlatform.indexOf(";",x+1);
|
||||
thePlatform=thePlatform.substring(x,y);
|
||||
|
||||
var CRLF;
|
||||
if (thePlatform == "Macintosh") {
|
||||
CRLF = "\r";
|
||||
}
|
||||
else {
|
||||
CRLF = "\r\n";
|
||||
}
|
||||
|
||||
// Determine the current date
|
||||
|
||||
var theFile = parent.parent.globals.getAcctSetupFilename(self);
|
||||
var savePasswordFlag = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","SavePasswords");
|
||||
|
||||
var now = new Date();
|
||||
theDate = now.getMonth()+1 + "/" + now.getDate() + "/" + (now.getYear()+1900);
|
||||
theDate += " ";
|
||||
var theHour = now.getHours();
|
||||
var theString = " AM";
|
||||
if (theHour >=12) {
|
||||
theHour = theHour-12;
|
||||
theString = " PM";
|
||||
}
|
||||
var theMinute = now.getMinutes();
|
||||
if (theMinute < 10) {
|
||||
theMinute="0" + theMinute;
|
||||
}
|
||||
theDate += theHour + ":" + theMinute + theString;
|
||||
|
||||
// Mangle the POP/IMAP server
|
||||
|
||||
var mailProtocol = "IMAP";
|
||||
var popIMAPServer = findVariable("IMAP_HOST");
|
||||
if (popIMAPServer == "") {
|
||||
mailProtocol = "POP";
|
||||
popIMAPServer = findVariable("POP_SERVER");
|
||||
}
|
||||
var atLocation = popIMAPServer.indexOf("@");
|
||||
if (atLocation>=0) {
|
||||
popIMAPServer = popIMAPServer.substring(atLocation+1);
|
||||
}
|
||||
|
||||
// Create the output string to save
|
||||
|
||||
var output = "Your Account Information " + theDate + CRLF;
|
||||
output += "______________________________________________________________" + CRLF + CRLF;
|
||||
output += "Name: " + parent.parent.globals.document.vars.first.value + " " + parent.parent.globals.document.vars.last.value + CRLF;
|
||||
output += "Provider: " + findVariable("SITE_NAME") + CRLF + CRLF;
|
||||
|
||||
output += "Dialup access number: " + findVariable("PHONE_NUM") + CRLF + CRLF;
|
||||
|
||||
output += "Login name: " + findVariable("LOGIN") + CRLF;
|
||||
|
||||
if (savePasswordFlag == "yes") {
|
||||
output += "Login password: " + findVariable("PASSWORD") + CRLF + CRLF;
|
||||
}
|
||||
|
||||
output += "Email address: " + findVariable("EMAIL_ADDR") + CRLF;
|
||||
|
||||
if (savePasswordFlag == "yes") {
|
||||
output += "Email password: " + findVariable("POP_PASSWORD") + CRLF + CRLF;
|
||||
}
|
||||
|
||||
output += "SMTP server: " + findVariable("SMTP_HOST") + CRLF;
|
||||
|
||||
if (mailProtocol == "IMAP") {
|
||||
output += "IMAP server: " + popIMAPServer + CRLF;
|
||||
|
||||
var imapDir = findVariable("IMAP_SERVERPATH");
|
||||
if (imapDir != "") {
|
||||
output += "IMAP server mailbox path: " + imapDir + CRLF;
|
||||
}
|
||||
}
|
||||
else {
|
||||
output += "POP server: " + popIMAPServer + CRLF;
|
||||
}
|
||||
output += "News (NNTP) server: " + findVariable("NNTP_HOST") + CRLF + CRLF;
|
||||
|
||||
output += "Domain name: " + findVariable("DOMAIN_NAME") + CRLF;
|
||||
output += "Primary DNS server: " + findVariable("DNS_ADDR") + CRLF;
|
||||
output += "Secondary DNS server: " + findVariable("DNS_ADDR_2") + CRLF + CRLF;
|
||||
|
||||
var viewURL = findVariable("PUBLISH_VIEW_URL");
|
||||
if (viewURL != "") {
|
||||
output += "Publishing View URL: " + viewURL + CRLF;
|
||||
}
|
||||
var pushURL = findVariable("PUBLISH_PUSH_URL");
|
||||
if (pushURL != "") {
|
||||
output += "Publishing Push URL: " + pushURL + CRLF;
|
||||
}
|
||||
|
||||
output += CRLF;
|
||||
|
||||
output += "Modem: " + parent.parent.globals.document.vars.modem.value + CRLF + CRLF;
|
||||
|
||||
output += "Other information:" + CRLF + CRLF;
|
||||
output += "Provider's technical support number: " + findVariable("ISP_SUPPORT") + CRLF;
|
||||
|
||||
|
||||
// determine new profile name (used for Account in dialer & profile name, save info default filename)
|
||||
|
||||
var newProfileName = findVariable("LOGIN");
|
||||
if (newProfileName=="") {
|
||||
newProfileName = document.vars.first.value;
|
||||
if (document.vars.last.value != "") {
|
||||
newProfileName = newProfileName + " " + document.vars.last.value;
|
||||
}
|
||||
}
|
||||
if (newProfileName!="") newProfileName = newProfileName + "'s";
|
||||
if (findVariable("SITE_NAME") != "") {
|
||||
newProfileName = newProfileName + " " + findVariable("SITE_NAME");
|
||||
}
|
||||
newProfileName = newProfileName + " Account Info";
|
||||
|
||||
if (thePlatform == "Macintosh") {
|
||||
if (newProfileName.length > 31) newProfileName=newProfileName.substring(0,31);
|
||||
}
|
||||
|
||||
|
||||
// On WIN32 platforms, check if newProfileName contains any invalid characters, such as '/'
|
||||
// On Mac, disallow invalid characters such as ':'
|
||||
|
||||
if ((thePlatform == "WinNT") || (thePlatform == "Win95")) {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('/');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('/');
|
||||
}
|
||||
x = newProfileName.indexOf('\\');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\\');
|
||||
}
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
x = newProfileName.indexOf('\"');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('\"');
|
||||
}
|
||||
x = newProfileName.indexOf('?');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('?');
|
||||
}
|
||||
x = newProfileName.indexOf('<');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('<');
|
||||
}
|
||||
x = newProfileName.indexOf('>');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('>');
|
||||
}
|
||||
x = newProfileName.indexOf('|');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('|');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Macintosh") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf(':');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(':');
|
||||
}
|
||||
}
|
||||
else if (thePlatform == "Win16") {
|
||||
var x=0;
|
||||
x = newProfileName.indexOf('(');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x-1) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf('(');
|
||||
}
|
||||
x = newProfileName.indexOf(')');
|
||||
while ((x >= 0) && (newProfileName.length != 0)) {
|
||||
newProfileName = newProfileName.substring(0, x-1) + newProfileName.substring(x+1, newProfileName.length);
|
||||
x = newProfileName.indexOf(')');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create the default filename to save output to
|
||||
/*
|
||||
var defaultFilename = findVariable("SITE_FILE");
|
||||
if (defaultFilename != "") defaultFilename=defaultFilename + " ";
|
||||
defaultFilename = defaultFilename + "Account Info";
|
||||
*/
|
||||
|
||||
var savedFlag=false;
|
||||
if (promptFlag==false) {
|
||||
var profileDir = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (profileDir != null && profileDir != "") {
|
||||
if (thePlatform == "Macintosh") {
|
||||
newProfileName = profileDir + "Account Info";
|
||||
}
|
||||
else {
|
||||
newProfileName = profileDir + "ACCTINFO.TXT";
|
||||
}
|
||||
savedFlag = parent.parent.globals.document.setupPlugin.SaveTextToFile(newProfileName,output,false); // defaultFilename
|
||||
}
|
||||
}
|
||||
else {
|
||||
savedFlag = parent.parent.globals.document.setupPlugin.SaveTextToFile(newProfileName,output,true); // defaultFilename
|
||||
}
|
||||
return(savedFlag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
89
mozilla/cmd/dialup/as_html/help/accounts.htm
Normal file
@@ -0,0 +1,89 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Welcome to Account Setup</B></P>
|
||||
|
||||
<P>Account Setup is a utility that helps you quickly set up Communicator to access
|
||||
the Internet. To use Account Setup properly, you must choose whether you want Account
|
||||
Setup to:</P>
|
||||
|
||||
<UL>
|
||||
<LI>Help you create a new Internet account with your Internet service provider, or
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Help you quickly set up Netscape Communicator and its connection software to
|
||||
access an account that you already have.
|
||||
</UL>
|
||||
|
||||
<P>Select the option "I want to create a new Internet account" if:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>You are new to the Internet, or
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>You want create a second or additional Internet account.
|
||||
</UL>
|
||||
|
||||
<P>Select the option "I already have an Internet account" if:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>You want to set up access to an Internet account that you already have. Your account must be provided by an Internet service provider and must offer access to Internet services such as the World Wide Web, email, and newsgroups.
|
||||
</UL>
|
||||
|
||||
<P>To select one of the options described above, click the button to the left of the option in the Account Setup screen.
|
||||
Then follow through the rest of the Account Setup screens, entering the appropriate information in each screen. </P>
|
||||
|
||||
<P>You can leave Account Setup at any time by clicking Exit in the Account Setup navigation bar.</P>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
57
mozilla/cmd/dialup/as_html/help/acctInfo.htm
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Your Name and Company</B></P>
|
||||
|
||||
<P>Type your full name and, optionally, your organization name into the text boxes on
|
||||
this screen. Account Setup then sets Communicator's Mail & Groups and Editor preferences
|
||||
accordingly.</P>
|
||||
|
||||
<P><FONT SIZE=2><A HREF="ashelp.htm">[CONTENTS]</A></FONT></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
1332
mozilla/cmd/dialup/as_html/help/ashelp.htm
Normal file
77
mozilla/cmd/dialup/as_html/help/billing.htm
Normal file
@@ -0,0 +1,77 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Your Billing Information</B></P>
|
||||
|
||||
<P>Internet accounts that you create using Account Setup must be paid for by credit card. Account Setup assists you by forwarding the credit card information you provide on the screen to your provider. This mechanism enables you to create an Internet account and use it right away.
|
||||
|
||||
<P>To ensure the privacy of your credit card information, Account Setup scrambles your credit card number before transmitting it to your provider. Your provider has a unique security key that allows it to read your credit card number. In addition, Account Setup does not store your credit card information anywhere on your computer.</P>
|
||||
|
||||
<P>Use the text boxes and pop-up menus to specify your credit card type, its number,
|
||||
and its expiration date:</P>
|
||||
|
||||
<UL>
|
||||
<LI>Name on card: Your name as it appears on your credit card.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Type of card: The type of card you're using. You can use American Express, Discover,
|
||||
MasterCard, or VISA.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Card number: The card number as it appears on the card.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Expiration date: The expiration date that appears on the card.
|
||||
</UL>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
74
mozilla/cmd/dialup/as_html/help/connect1.htm
Normal file
@@ -0,0 +1,74 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Connect to Server</B></P>
|
||||
|
||||
<P>You've finished entering the information that Account Setup needs to connect you to the Internet account server. Click Connect Now to connect to the Internet account server, where you can learn about the account plans available and
|
||||
create a new Internet account.</P>
|
||||
|
||||
<P>When you click Connect Now, Account Setup uses your modem, phone line, and the connection software installed with Communicator to initiate a connection with the Internet account server. For this reason, your modem must be properly installed and turned on, and your phone line must be available to Account Setup.</P>
|
||||
|
||||
<P>After Account Setup successfully connects, it loads the Internet account server screens in the Account Setup window. Follow the instructions on the Internet account server screens to learn about account plans available and create an account. Help is also available from the Internet account server screens.</P>
|
||||
|
||||
<P>When evaluating account plans, it helps to have some idea of how you will be using the Internet:
|
||||
<UL>
|
||||
<LI>Will you always connect from home or will you also connect while traveling? Some plans offer a toll-free access number for travelers. Others offer a selection of many local access points so that you can always connect, wherever you are. However, these services might cost extra.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>How many hours will you spend on the Internet each month? Some plans are designed for people who connect less often, letting you pay by the hour for Internet access. Other plans are designed for people who connect every day, giving you unlimited hours of connection time for a flat monthly fee.
|
||||
|
||||
</UL>
|
||||
|
||||
<P>Once you have chosen an account plan and created an account, Account Setup disconnects you from the Internet account server. It then automatically configures your computer to access your new account.
|
||||
|
||||
<P>If you don't want to connect to the Internet account server right now, you don't need to. Account Setup saves the information you provided (except your credit card number), so that when you are ready to create an account, all you have to do is launch Account Setup and move to this screen to connect.</P>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
61
mozilla/cmd/dialup/as_html/help/connect2.htm
Normal file
@@ -0,0 +1,61 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>You're Done!</B></P>
|
||||
|
||||
<P>You've finished entering all the information that Account Setup needs to set up access to your Internet account. Account Setup configures your computer to access your account when you click either Connect Now or Done. </P>
|
||||
|
||||
<P>If you want Account Setup to configure your computer and then connect you to the Internet right now, click Connect Now. </P>
|
||||
|
||||
<P>If you want Account Setup to configure your computer but don't want it to connect you to your account right now, click Done. When you are ready to connect to the Internet, all you have to do is launch Netscape Communicator by double-clicking its icon in the Netscape Communicator folder or program group.</P>
|
||||
|
||||
<P>When you have more questions about using Communicator, you can find the information you need in Communicator's Help system, available from the Help menu, in and the Reference Library, available in the Netscape Communicator folder or program group.</P>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
58
mozilla/cmd/dialup/as_html/help/dial.htm
Normal file
@@ -0,0 +1,58 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Your Account Access Number</B></P>
|
||||
|
||||
<P>Enter the phone number your computer dials to connect to your Internet account. If dialing within the United States and Canada, be sure to include the area code.</P>
|
||||
|
||||
<P>If Account Setup already displays an access number in this screen, it is the access number recommended by your Internet service provider. It is best to use this number.
|
||||
</UL>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
98
mozilla/cmd/dialup/as_html/help/dialinf1.htm
Normal file
@@ -0,0 +1,98 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Dialing Settings for Your Location</B></P>
|
||||
|
||||
<P>Enter any of the dialing settings listed on this screen to enable Account Setup to successfully connect with the Internet account server:</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>The code you dial to turn off Call Waiting</B> (optional):
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
If you have Call
|
||||
Waiting, you should turn it off while you are connected to the Internet. Calls that come
|
||||
in while you are connected might disturb the connection.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
From the pop-up menu on the screen, select the code you use to turn off Call Waiting during a call. If your code isn't listed, enter your code in the text box to the left of the menu. If you have Call Waiting but aren't sure what code to use to turn it off, call your telephone company.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
If you don't have Call Waiting, leave "Line Doesn't Have Call Waiting" selected in the
|
||||
pop-up menu.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI><B>The number you dial to access an outside line</B> (optional):
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
If you are connecting from within an internal phone network, such as from an office building or hotel, enter the number that you dial access an outside line.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
If you don't need to access an outside line before dialing, leave the text box blank.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI><B>Your telephone's dialing method</B> (if applicable):
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
Choose either tone or pulse
|
||||
dialing. Tone dialing, used by push-button telephones, is suitable for most phone
|
||||
lines. However, some phone lines still use pulse dialing, the older method used by
|
||||
rotary telephones.
|
||||
</UL>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
57
mozilla/cmd/dialup/as_html/help/dialinf2.htm
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Phone Number of Your Location</B></P>
|
||||
|
||||
<P>Enter the phone number of the line that is currently connected to your modem or computer. Account Setup uses this information to determine how to whether to dial an area code or other prefix. Therefore, don't enter your home phone number if you are connecting from another location.</P>
|
||||
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
67
mozilla/cmd/dialup/as_html/help/dns.htm
Normal file
@@ -0,0 +1,67 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Your Provider's Domain Name and DNS Servers</B></P>
|
||||
|
||||
<P>Enter your provider's domain name and the internet addresses of your provider's DNS servers into the text boxes:</P>
|
||||
|
||||
<UL>
|
||||
<LI>Domain Name: Your provider's domain name is the internet identity of your provider's network of computers. It often looks something like <TT>providername.com</TT> or <TT>providername.net</TT>.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Primary and Secondary DNS Servers: Your provider's Domain Name System (DNS) servers route your email, requests for web pages, and other Internet traffic to their proper destinations on the Internet. The secondary DNS server is a backup to the primary server, in case the primary server goes offline or a part of the network is unavailable for some reason.
|
||||
</UL>
|
||||
|
||||
<P>Unlike the mail and news server information on the previous screen, Account Setup <B>must</B> have your provider's domain name and DNS server address before you can access the Internet. If you don't have this information or are unsure about the information
|
||||
that you do have, call your provider before going on with Account Setup.</P>
|
||||
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
62
mozilla/cmd/dialup/as_html/help/email.htm
Normal file
@@ -0,0 +1,62 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Your Email Login and Password</B></P>
|
||||
|
||||
<P>Many Internet service providers let you use your account login name and
|
||||
password to access your email. That way, you only have a single login and password to remember. Other providers, though, ask you to use a different login
|
||||
and password for accessing email.</P>
|
||||
|
||||
<P>If your provider has given you a special login and password for email, enter them
|
||||
into the appropriate text boxes. Account Setup configures Communicator's Mail & Groups preferences with the information you enter on this screen. </P>
|
||||
|
||||
<P>Account Setup automatically enters your account login and password into the text boxes on this screen. If you use a different login and password for email, enter the information into this screen. If you aren't sure whether you need a special email login and password, or aren't sure what yours is, call your provider's technical support office.</P>
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
59
mozilla/cmd/dialup/as_html/help/error.htm
Normal file
@@ -0,0 +1,59 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 0 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="../images/tag.gif">
|
||||
<B CLASS="helptag">ACCOUNT SETUP</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
<spacer type=vertical size=36>
|
||||
|
||||
|
||||
<!-- The main text of this Help screen appears below. -->
|
||||
|
||||
<P><B>Connection Error...</B></P>
|
||||
|
||||
<P>If you are having trouble connecting, retrace your steps in Account Setup to make sure that you entered the information correctly, then try connecting again. </P>
|
||||
|
||||
<P>Also, make sure your modem is properly connected and turned on. If you want to try connecting again now, click Connect Again. </P>
|
||||
|
||||
<P>For troubleshooting tips, use this link: <A HREF="ashelp.htm#troubleshooting">Troubleshooting</A>.
|
||||
|
||||
<P><A HREF="ashelp.htm">[CONTENTS]</A></P>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
1812
mozilla/cmd/dialup/as_html/help/fppphlp.htm
Normal file
77
mozilla/cmd/dialup/as_html/help/hsheet.htm
Normal file
@@ -0,0 +1,77 @@
|
||||
/* -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
*/
|
||||
//TAGS FOR ACCOUNT SETUP HELP
|
||||
|
||||
tags.BODY.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
tags.BODY.borderWidths(0, 0, 0, 0);
|
||||
tags.BODY.paddings(0, 0, 0, 0);
|
||||
|
||||
tags.P.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
tags.P.fontSize="12";
|
||||
tags.P.lineHeight="1.1";
|
||||
tags.P.marginRight="3";
|
||||
tags.P.marginLeft="3";
|
||||
|
||||
|
||||
//Titles of Internet Preview screens
|
||||
|
||||
classes.title.all.fontSize="23";
|
||||
classes.title.all.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
classes.title.all.margins(34,0,0,43);
|
||||
|
||||
|
||||
//Tables (for forms inputs, etc.)
|
||||
|
||||
tags.TABLE.marginTop="6";
|
||||
|
||||
tags.TD.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
tags.TD.fontSize="12";
|
||||
tags.TD.lineHeight="1.1"
|
||||
|
||||
|
||||
|
||||
//the entries below are exceptions to the standard definition
|
||||
|
||||
ids.nospace.marginTop="0";
|
||||
ids.minspace.marginTop="6";
|
||||
ids.nomargins.margins(14,8,8,8);
|
||||
ids.buttontext.fontSize="12";
|
||||
|
||||
ids.smallleftmargin.margins(14,40,0,160);
|
||||
ids.mediumleftmargin.margins(14,40,0,265);
|
||||
ids.bulletssmallleftmargin.marginLeft="160";
|
||||
|
||||
|
||||
//Lists
|
||||
|
||||
tags.UL.listStyleType="disc";
|
||||
tags.UL.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
tags.UL.fontSize="12";
|
||||
tags.LI.fontSize="10";
|
||||
tags.OL.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
tags.OL.fontSize="12";
|
||||
|
||||
|
||||
//Account Setup tag
|
||||
|
||||
classes.helptag.all.fontSize="12";
|
||||
classes.helptag.all.paddingLeft="5";
|
||||
classes.helptag.all.color="white";
|
||||
classes.helptag.all.marginTop="0";
|
||||
|
||||
|
||||
BIN
mozilla/cmd/dialup/as_html/help/images/fppp1.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp10.gif
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp11.gif
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp12.gif
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp14.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp2.gif
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp3.gif
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp4.gif
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp5.gif
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
mozilla/cmd/dialup/as_html/help/images/fppp6.gif
Normal file
|
After Width: | Height: | Size: 5.1 KiB |