~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/build/unix/vms/mozilla.com

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$! Command file to run Mozilla.
 
2
$! This command file must exist in the root Mozilla directory (where the main
 
3
$! images and shareables reside).
 
4
$!
 
5
$ moz_self = f$envir("procedure")
 
6
$ moz_dir = f$parse(moz_self,,,"device") + f$parse(moz_self,,,"directory")
 
7
$!
 
8
$ moz_user = f$edit(f$getjpi("","username"),"trim")
 
9
$ moz_cwd = f$environment("default")
 
10
$ moz_image = f$trnlnm("MOZILLA_IMAGE")
 
11
$ if moz_image .eqs. ""
 
12
$ then
 
13
$   moz_image = f$search("''moz_dir'*-bin.;") 
 
14
$   if moz_image .nes. ""
 
15
$   then
 
16
$     moz_image = f$parse(moz_image,,,"name")
 
17
$   else
 
18
$     moz_image = "mozilla-bin"
 
19
$   endif
 
20
$ endif
 
21
$!
 
22
$ moz_gblpages_needed = (336 * 120/100)
 
23
$ moz_gblsects_needed = (1 * 120/100) 
 
24
$ moz_gblpages_actual = f$getsyi("free_gblpages")
 
25
$ moz_gblsects_actual = f$getsyi("free_gblsects")
 
26
$ moz_wait = 0
 
27
$ if moz_gblpages_actual .lt. moz_gblpages_needed
 
28
$ then
 
29
$   write sys$output -
 
30
        f$fao("WARNING, estimated global pages needed=!UL, available=!UL",-
 
31
                        moz_gblpages_needed, moz_gblpages_actual)
 
32
$   moz_wait = 1
 
33
$ endif
 
34
$ if moz_gblsects_actual .lt. moz_gblsects_needed
 
35
$ then
 
36
$   write sys$output -
 
37
        f$fao("WARNING, estimated global sections needed=!UL, available=!UL",-
 
38
                        moz_gblsects_needed, moz_gblsects_actual)
 
39
$   moz_wait = 1
 
40
$ endif
 
41
$ if moz_wait .and. (f$mode() .eqs. "INTERACTIVE")
 
42
$ then
 
43
$   type sys$input
 
44
 
 
45
    The above system parameter(s) may not be sufficient to
 
46
    successfully run Mozilla. 
 
47
 
 
48
$   read/prompt="Do you wish to continue [NO]: " sys$command moz_ans
 
49
$   if .not. moz_ans then exit
 
50
$ endif
 
51
$!
 
52
$! We need the directory as a unix-style spec.
 
53
$!
 
54
$ moz_unix = "/" + f$parse(moz_self,,,"device") - ":" 
 
55
$ moz_self_dir = f$parse(moz_self,,,"directory") - "[" - "]" - "<" - ">"
 
56
$ i=0
 
57
$uloop:
 
58
$ e=f$element(i,".",moz_self_dir)
 
59
$ if e .nes. "."
 
60
$ then
 
61
$   moz_unix = moz_unix + "/" + e
 
62
$   i=i+1
 
63
$   goto uloop
 
64
$ endif
 
65
$ moz_unix = f$edit(moz_unix,"lowercase")
 
66
$!
 
67
$ moz_found_one = 0
 
68
$so_loop:
 
69
$ moz_so_file = f$search("''moz_dir'*.so")
 
70
$ if moz_so_file .nes. ""
 
71
$ then
 
72
$   name = f$parse(moz_so_file,,,"name")
 
73
$   define /user 'name' 'moz_dir''name'.so
 
74
$   moz_found_one = 1
 
75
$   goto so_loop
 
76
$ endif
 
77
$ if .not. moz_found_one
 
78
$ then
 
79
$   write sys$output "Unable to locate Mozilla images. Most likely reason is"
 
80
$   write sys$output "because the protection on the directory"
 
81
$   write sys$output moz_dir
 
82
$   write sys$output "does not allow you READ access."
 
83
$   exit
 
84
$ endif
 
85
$!
 
86
$ ipc_shr = f$trnlnm("ucx$ipc_shr") - ".EXE" + ".EXE"
 
87
$ if (f$locate("MULTINET",ipc_shr) .ne. f$length(ipc_shr)) .or. -
 
88
     (f$locate("TCPWARE",ipc_shr) .ne. f$length(ipc_shr))
 
89
$ then
 
90
$    define /user VMS_NULL_DL_NAME 'ipc_shr'
 
91
$ else
 
92
$    define /user VMS_NULL_DL_NAME SYS$SHARE:TCPIP$IPC_SHR.EXE
 
93
$ endif
 
94
$ define /user GETADDRINFO     TCPIP$GETADDRINFO
 
95
$ define /user FREEADDRINFO    TCPIP$FREEADDRINFO
 
96
$ define /user GETNAMEINFO     TCPIP$GETNAMEINFO
 
97
$ define /user GETIPNODEBYNAME TCPIP$GETIPNODEBYNAME
 
98
$ define /user GETIPNODEBYADDR TCPIP$GETIPNODEBYADDR
 
99
$ define /user FREEHOSTENT     TCPIP$FREEHOSTENT
 
100
$!
 
101
$! A networking problem which is still unresolved means that by default
 
102
$! the IPv6 support is disabled. If you want to turn it back on define
 
103
$! the logical MOZILLA_IPV6 (to anything), but beware that you may 
 
104
$! encounter hangs.
 
105
$!
 
106
$ if f$trnlnm("MOZILLA_IPV6") .eqs. ""
 
107
$ then
 
108
$   define /user /nolog GETIPNODEBYNAME NO_SUCH_NAME
 
109
$ endif
 
110
$!
 
111
$! These logicals define how files are created/opened.
 
112
$! The old code used: "shr=get,put", "rfm=stmlf", "deq=500", "fop=dfw,tef"
 
113
$!
 
114
$! Executables
 
115
$ define /user VMS_OPEN_ARGS_1 ".EXE.SO.SFX_AXPEXE.SFX_VAXEXE", -
 
116
        "ctx=stm", "rfm=fix", "rat=none", "mrs=512"
 
117
$!
 
118
$! VMS savesets
 
119
$ define /user VMS_OPEN_ARGS_2 ".BCK.SAV", -
 
120
        "ctx=stm", "rfm=fix", "rat=none", "mrs=32256"
 
121
$!
 
122
$! Binary files. STM doesn't work, needs to be STMLF.
 
123
$ define /user VMS_OPEN_ARGS_3 "..DB.GIF.JAR.JPG.MAB.MFASL.MSF.WAV.XPM.XPT", -
 
124
        "ctx=stm", "rfm=stmlf", "rat=none"
 
125
$!
 
126
$! Text files - covered by the catchall
 
127
$! ".BAK.COM.CSS.DAT.DTD.HTM.HTML.JS.RDF.NET.ORG.SH.SRC.TBL.TXT.XML.XUL"
 
128
$!
 
129
$ define /user VMS_OPEN_ARGS_4 " ",-
 
130
        "rfm=stmlf", "rat=cr"
 
131
$!
 
132
$ if f$trnlnm("USER") .eqs. "" then define /user user "''moz_user'"
 
133
$ if f$trnlnm("LOGNAME") .eqs. "" then define /user logname "''moz_user'"
 
134
$ define /user MOZILLA_FIVE_HOME "''moz_unix'"
 
135
$ define /user VMS_USE_VMS_DEF_PROT 1
 
136
$ define /user VMS_ACCESS_FIX_WOK 1
 
137
$! define /user VMS_FILE_OPEN_MODE 3
 
138
$! define /user VMS_POLL_TIMER_MIN  10
 
139
$! define /user VMS_POLL_TIMER_DELTA 0
 
140
$! define /user VMS_POLL_TIMER_MAX 200
 
141
$! define /user NSPR_LOG_MODULES "all:5"
 
142
$! define /user NSPR_LOG_FILE dkb100:[work]log.log
 
143
$! define /user VMS_TRACE_FILENAMES 1
 
144
$!
 
145
$ define /user DECC$EFS_CASE_PRESERVE 0
 
146
$!
 
147
$! GTK key mapping mode: 0=none, 1=LK, 2=PC
 
148
$ if f$trnlnm("GTK_KEY_MAPPING_MODE") .eqs. "" then -
 
149
    define /user GTK_KEY_MAPPING_MODE 1
 
150
$!
 
151
$ write sys$output "Starting ''moz_image'..."
 
152
$ mcr 'moz_dir''moz_image'. 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'
 
153
$ set default 'moz_dir'
 
154
$ if f$search("[.chrome]*.*;-1") .nes. ""
 
155
$ then
 
156
$   set default [.chrome]
 
157
$   moz_chrome = f$environment("default")
 
158
$   purge 'moz_chrome'
 
159
$   moz_ver = f$parse(f$search("''moz_chrome'all-skins.rdf"),,,"version") - ";"
 
160
$   if moz_ver .gt. 10000 then rename 'moz_chrome'*.rdf *.*;1
 
161
$ endif
 
162
$!
 
163
$ moz_keep = f$trnlnm("MOZILLA_PURGE_KEEP")
 
164
$ if moz_keep .eqs. "" then moz_keep = "5"
 
165
$ set default sys$login
 
166
$ if f$search("[._MOZILLA.*]*.*") .nes. ""
 
167
$ then
 
168
$   purge /keep='moz_keep' [._mozilla.*...]
 
169
$ endif
 
170
$ set default 'moz_cwd'
 
171
$!
 
172
$ exit