Compare commits
1640 Commits
XMLTO_Docu
...
NETSCAPE_7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3293a60c3c | ||
|
|
491cca7387 | ||
|
|
dfa8c6f86e | ||
|
|
95568f7f6c | ||
|
|
9e8212e87c | ||
|
|
835db046b3 | ||
|
|
f3f23982f7 | ||
|
|
cbc1d68832 | ||
|
|
891ff56586 | ||
|
|
5dc878b30c | ||
|
|
715acf04b4 | ||
|
|
5b849ee543 | ||
|
|
c2a4989a09 | ||
|
|
4c7844ee93 | ||
|
|
6d8a4d5b3e | ||
|
|
4f54d75685 | ||
|
|
69f28efb74 | ||
|
|
2d857b89d4 | ||
|
|
f79343a4fb | ||
|
|
55433fdc5a | ||
|
|
6a2d401bf4 | ||
|
|
4c1b38605a | ||
|
|
24d9e943f2 | ||
|
|
00b2f23625 | ||
|
|
316833dcb0 | ||
|
|
89bf3093f9 | ||
|
|
d23ad2a655 | ||
|
|
affc998e47 | ||
|
|
c8ed6d408a | ||
|
|
59f7944824 | ||
|
|
e23174a81c | ||
|
|
0cc0ffae77 | ||
|
|
3d38871d04 | ||
|
|
5bebf21ae6 | ||
|
|
45ebb0480f | ||
|
|
a4938dfaba | ||
|
|
931891d08a | ||
|
|
617073babe | ||
|
|
ccdeff9a22 | ||
|
|
0a4ca85593 | ||
|
|
8a3d8a5d95 | ||
|
|
2e3f19f3a8 | ||
|
|
4f30ae79e3 | ||
|
|
457cb25646 | ||
|
|
358b717d94 | ||
|
|
285bb2dfd5 | ||
|
|
984252a3ca | ||
|
|
dd1a1a49b3 | ||
|
|
709509fd15 | ||
|
|
36da25c43e | ||
|
|
34cfc1a3e4 | ||
|
|
e9a2d8c01a | ||
|
|
ff70d62e5a | ||
|
|
af9249ef04 | ||
|
|
75700356ca | ||
|
|
7b272ad3aa | ||
|
|
4d0af44652 | ||
|
|
c31b92b894 | ||
|
|
42831eb44b | ||
|
|
d6722475ca | ||
|
|
044063fb66 | ||
|
|
d7158d18a1 | ||
|
|
a3b8660d79 | ||
|
|
281d61b5eb | ||
|
|
9e8f767b56 | ||
|
|
59e561ca4d | ||
|
|
2de6db2be6 | ||
|
|
37d02f25e7 | ||
|
|
6a2866c46f | ||
|
|
f915f7506b | ||
|
|
d467a55f72 | ||
|
|
6476a68e42 | ||
|
|
483f69e2fd | ||
|
|
a36501afb8 | ||
|
|
40405bcc78 | ||
|
|
0002ab0955 | ||
|
|
b864807765 | ||
|
|
920e9e494c | ||
|
|
4772048140 | ||
|
|
511639a860 | ||
|
|
8ad284afc5 | ||
|
|
0c68d5fce1 | ||
|
|
03a0d0c951 | ||
|
|
bfff01a497 | ||
|
|
9784c0a456 | ||
|
|
5888a9563d | ||
|
|
df48be254c | ||
|
|
342a2e9737 | ||
|
|
61e86fe725 | ||
|
|
9288edfd08 | ||
|
|
5d5db79f7b | ||
|
|
eb3dce191e | ||
|
|
e252d45c54 | ||
|
|
5eabc6556d | ||
|
|
c8431a1c2d | ||
|
|
8a4f3c2b0e | ||
|
|
682db95daa | ||
|
|
0144166907 | ||
|
|
a9616a0ca1 | ||
|
|
6e179e596c | ||
|
|
b1a3e2a620 | ||
|
|
3d5a2b4af0 | ||
|
|
94dd9c8333 | ||
|
|
800b1a4696 | ||
|
|
fb3cadc94a | ||
|
|
3dcf39ccd4 | ||
|
|
5598521fb3 | ||
|
|
b1a4916e76 | ||
|
|
21ad91ddd0 | ||
|
|
bfa6d9a346 | ||
|
|
db9d15b0db | ||
|
|
d98370f0e3 | ||
|
|
4db6393558 | ||
|
|
87936510e8 | ||
|
|
9732d10297 | ||
|
|
5f53ccac3b | ||
|
|
20cce8ad8b | ||
|
|
d05a65ee2b | ||
|
|
01d0f5d48a | ||
|
|
f86d301fe7 | ||
|
|
c1377636bb | ||
|
|
af905fb0cf | ||
|
|
7a7fcabcca | ||
|
|
e3a0ace815 | ||
|
|
4ca5fbaa54 | ||
|
|
2ac6bd0cce | ||
|
|
bcf21e26a5 | ||
|
|
deb9bad8e0 | ||
|
|
7861730db0 | ||
|
|
90e229ebb8 | ||
|
|
b2fbc6f6a8 | ||
|
|
aff66455d3 | ||
|
|
e1dd7c3a6e | ||
|
|
464ef37bfe | ||
|
|
3fa461dddf | ||
|
|
060b29f892 | ||
|
|
a2952a3278 | ||
|
|
7f15cdb2f9 | ||
|
|
05327735d6 | ||
|
|
703a40f096 | ||
|
|
fd4401ea3a | ||
|
|
9f60ee00ed | ||
|
|
fa7107e8a1 | ||
|
|
d65cefde11 | ||
|
|
daf7f72251 | ||
|
|
c67e224e13 | ||
|
|
95d2f59301 | ||
|
|
9a9299fe8e | ||
|
|
b6a48ebabe | ||
|
|
7e7360ead0 | ||
|
|
df9ca779c4 | ||
|
|
b7e6d2b2f1 | ||
|
|
bb57889ebe | ||
|
|
1406d0810c | ||
|
|
2e762cff2b | ||
|
|
55f79f3b63 | ||
|
|
060a0196ac | ||
|
|
5680af36f7 | ||
|
|
65e85ccc14 | ||
|
|
76ce3d6bdd | ||
|
|
22677d5796 | ||
|
|
016a9556b5 | ||
|
|
69a00dc5b1 | ||
|
|
f9fb281ca6 | ||
|
|
04f45957e8 | ||
|
|
7d90be2f8f | ||
|
|
5cb2869231 | ||
|
|
03e0b54faa | ||
|
|
f716653de7 | ||
|
|
c87cdcf046 | ||
|
|
11f30067e3 | ||
|
|
b0d76ec9b7 | ||
|
|
4506ae6ca4 | ||
|
|
ed3ccc1c71 | ||
|
|
c251af12c6 | ||
|
|
dd78defeb7 | ||
|
|
f3e5faac05 | ||
|
|
86f44a2085 | ||
|
|
426b359079 | ||
|
|
e66f9ca801 | ||
|
|
b7ea04ce8b | ||
|
|
9e54950fbd | ||
|
|
e6092f51d0 | ||
|
|
276a005cbd | ||
|
|
f72ce23b89 | ||
|
|
73f96ecdee | ||
|
|
a2b77085c1 | ||
|
|
136a9eec51 | ||
|
|
fc63250d61 | ||
|
|
cf673fb745 | ||
|
|
d19c1282b5 | ||
|
|
3d3e456164 | ||
|
|
7f3dce7065 | ||
|
|
e8b0ecc655 | ||
|
|
b7bc2344e1 | ||
|
|
64141faf87 | ||
|
|
36cd476646 | ||
|
|
bd619db50a | ||
|
|
45e468dd7e | ||
|
|
5e1beb41e7 | ||
|
|
19b8fcac95 | ||
|
|
f97652aeeb | ||
|
|
991665428e | ||
|
|
3846a62b05 | ||
|
|
a86e65afeb | ||
|
|
eb12e9b09a | ||
|
|
90c7fa925b | ||
|
|
0053fb82ed | ||
|
|
76a93c8a0a | ||
|
|
9c5678426f | ||
|
|
981b50b562 | ||
|
|
a4ef939166 | ||
|
|
f525e8dabc | ||
|
|
90f4059f76 | ||
|
|
d009686c98 | ||
|
|
03eb56a634 | ||
|
|
5356201762 | ||
|
|
21e6cdfc22 | ||
|
|
06d5b2f721 | ||
|
|
353a8d83b0 | ||
|
|
90cb0a3012 | ||
|
|
ab80f34626 | ||
|
|
5792019dc5 | ||
|
|
afe75f08ff | ||
|
|
e59651f970 | ||
|
|
d06ea0bab4 | ||
|
|
2356edcb03 | ||
|
|
6351f151a2 | ||
|
|
0687171596 | ||
|
|
1b62c84f11 | ||
|
|
36243168a8 | ||
|
|
80a5e93c41 | ||
|
|
03289ddf9e | ||
|
|
94b82b9b34 | ||
|
|
9661fc1a6f | ||
|
|
5a97e6e1b0 | ||
|
|
147785fd14 | ||
|
|
cd627b7b21 | ||
|
|
9a5cbe31f0 | ||
|
|
65a4d64ab4 | ||
|
|
72b9189612 | ||
|
|
be416db9fc | ||
|
|
9890d34680 | ||
|
|
c5e949ee05 | ||
|
|
0e066b63f4 | ||
|
|
9f18d5c122 | ||
|
|
9b59e2db3f | ||
|
|
e60118f3bf | ||
|
|
aa17d59e79 | ||
|
|
10ae5a6282 | ||
|
|
e6ae73f9f0 | ||
|
|
d5031a8aef | ||
|
|
95d0d37196 | ||
|
|
74cab2329e | ||
|
|
0dedc35ab2 | ||
|
|
f2278f43c8 | ||
|
|
a3ec84f29e | ||
|
|
272f0cdff1 | ||
|
|
4e45b1229b | ||
|
|
677515217e | ||
|
|
b024b7b966 | ||
|
|
e426696a61 | ||
|
|
353c943969 | ||
|
|
c7f4d2143b | ||
|
|
ae544884a8 | ||
|
|
bac8a2e954 | ||
|
|
264bed2362 | ||
|
|
8aa8ecf518 | ||
|
|
771dce7edb | ||
|
|
349f4a6b8d | ||
|
|
9dabd83bf4 | ||
|
|
45a622cb72 | ||
|
|
ca8249f841 | ||
|
|
00ce8402e3 | ||
|
|
66342c6a59 | ||
|
|
5d25e03a26 | ||
|
|
69b31d008b | ||
|
|
d59df3769a | ||
|
|
4f6ada6fdd | ||
|
|
e3de493e7f | ||
|
|
79e2c79078 | ||
|
|
353ffb4a99 | ||
|
|
4b444ea78d | ||
|
|
2c47e8bf69 | ||
|
|
68d49e4a49 | ||
|
|
148c6b76df | ||
|
|
241692a655 | ||
|
|
43be988a2e | ||
|
|
d95ca38926 | ||
|
|
59ad949615 | ||
|
|
e1d31b52f2 | ||
|
|
122962f241 | ||
|
|
ec4d65f5e9 | ||
|
|
3a35be5840 | ||
|
|
918de790d5 | ||
|
|
b588ad7abb | ||
|
|
6d2beab5f0 | ||
|
|
484c0bffbf | ||
|
|
d093302786 | ||
|
|
454a094105 | ||
|
|
3dd881e4eb | ||
|
|
e9685da5ad | ||
|
|
d550f7da85 | ||
|
|
b18105a673 | ||
|
|
b8e0da4c99 | ||
|
|
cebbf97ddf | ||
|
|
c3e6ac982b | ||
|
|
4d3789a510 | ||
|
|
cac9370e7e | ||
|
|
7e6052e43a | ||
|
|
5c9f6ba852 | ||
|
|
adc5ea66d1 | ||
|
|
f6a2d615ee | ||
|
|
935bccd809 | ||
|
|
11fe7c9c82 | ||
|
|
8dc8007734 | ||
|
|
52510b1a61 | ||
|
|
4136782b8e | ||
|
|
16bf0837e9 | ||
|
|
ee1c750ef3 | ||
|
|
24582d244c | ||
|
|
15600e9cc9 | ||
|
|
e2be3f623e | ||
|
|
360da12882 | ||
|
|
45232b694d | ||
|
|
11557cd4cd | ||
|
|
af1ab5cd9a | ||
|
|
1b3ae36bfa | ||
|
|
8b33852684 | ||
|
|
e695b6ea1b | ||
|
|
bd34e4a9a6 | ||
|
|
902c609a39 | ||
|
|
e6ce4cecd3 | ||
|
|
1dd6ca0bf2 | ||
|
|
38307cf9a3 | ||
|
|
2dbf05edde | ||
|
|
dc7f020878 | ||
|
|
ef3496fef8 | ||
|
|
f2b5f60354 | ||
|
|
6d7c54437c | ||
|
|
640a950f34 | ||
|
|
5cec851236 | ||
|
|
26c36cf57f | ||
|
|
f2042f5fed | ||
|
|
411f2bcd84 | ||
|
|
7dbf267463 | ||
|
|
384e1cac18 | ||
|
|
2aed97ba78 | ||
|
|
193e733bfc | ||
|
|
fa426c3455 | ||
|
|
72e5b38215 | ||
|
|
3a8a360848 | ||
|
|
73fe2c170b | ||
|
|
1500211a00 | ||
|
|
f510f3c40f | ||
|
|
79241cbf70 | ||
|
|
4722528d28 | ||
|
|
ad609ac775 | ||
|
|
854492cb27 | ||
|
|
bc9da123c9 | ||
|
|
57c1713df6 | ||
|
|
f7e01beec6 | ||
|
|
fdeb12057d | ||
|
|
8622949487 | ||
|
|
c8a3883144 | ||
|
|
615ded5cba | ||
|
|
53fbb8a4ab | ||
|
|
dd4a48af0d | ||
|
|
334bb84b34 | ||
|
|
6ea542727d | ||
|
|
2c819ea8fa | ||
|
|
8276dd65a0 | ||
|
|
f59687321c | ||
|
|
51cafd0876 | ||
|
|
b200f2abe5 | ||
|
|
99cd8efa51 | ||
|
|
71a1b018b2 | ||
|
|
3adbf31222 | ||
|
|
79c43413c5 | ||
|
|
234d339b8f | ||
|
|
1ea10514a6 | ||
|
|
1377350cdc | ||
|
|
a07b2410b5 | ||
|
|
66b816aec1 | ||
|
|
a5499898ab | ||
|
|
fb6cf5001c | ||
|
|
c06c1c81c1 | ||
|
|
7379db6d0f | ||
|
|
8dfd0be2f4 | ||
|
|
d31db38e1b | ||
|
|
c7e7547ac6 | ||
|
|
07cd809b3c | ||
|
|
c63941f459 | ||
|
|
447244b1b8 | ||
|
|
da5dcb0a53 | ||
|
|
5381e01d9e | ||
|
|
9a8046b3bc | ||
|
|
6c82147405 | ||
|
|
723215b09c | ||
|
|
bbb08f932f | ||
|
|
aaccceee2b | ||
|
|
ba88c2a01f | ||
|
|
f8ecb38366 | ||
|
|
8f768a393f | ||
|
|
b41feead2f | ||
|
|
0c65f033df | ||
|
|
fb016f49df | ||
|
|
c8176f72e4 | ||
|
|
4ac1389355 | ||
|
|
82aaad64fd | ||
|
|
27b63a8651 | ||
|
|
3c9a1c48a9 | ||
|
|
9e81647dfb | ||
|
|
c02c587d59 | ||
|
|
59abfcd74a | ||
|
|
8a9fe70b5f | ||
|
|
287eecfb21 | ||
|
|
47ab7a80c9 | ||
|
|
8210c82fbf | ||
|
|
ccfd0b4ed3 | ||
|
|
9f7559c26f | ||
|
|
96af7cd26d | ||
|
|
365c00df70 | ||
|
|
ff19348c83 | ||
|
|
3dcf34cddb | ||
|
|
461e0fabb2 | ||
|
|
ab6df0d151 | ||
|
|
bfb453b032 | ||
|
|
96d04c8a88 | ||
|
|
8138f9f75d | ||
|
|
253808b572 | ||
|
|
838efbaffc | ||
|
|
d0dc76f1cd | ||
|
|
d784760253 | ||
|
|
4ecba27f46 | ||
|
|
737a2983d9 | ||
|
|
8988f6da45 | ||
|
|
f21b437b1c | ||
|
|
d3e6e4734a | ||
|
|
66853862b5 | ||
|
|
3b36f91f6d | ||
|
|
8a6110386c | ||
|
|
9c664d18c0 | ||
|
|
9d6f298def | ||
|
|
3555d6cf63 | ||
|
|
9148e88703 | ||
|
|
29313725bb | ||
|
|
1ca5f2df20 | ||
|
|
c103108810 | ||
|
|
5ca9ccb8b5 | ||
|
|
05118109bc | ||
|
|
ee2f062637 | ||
|
|
6fb5cd2313 | ||
|
|
cf00b52da2 | ||
|
|
8023d5b6a3 | ||
|
|
3caa15fea0 | ||
|
|
51a8ec8ac7 | ||
|
|
2a8076c485 | ||
|
|
90d90b777c | ||
|
|
d027b325ef | ||
|
|
148c919829 | ||
|
|
17ce578faa | ||
|
|
654d90b6b8 | ||
|
|
92f366df0e | ||
|
|
859b9bf284 | ||
|
|
ce0af0ef4e | ||
|
|
8bbe93efd9 | ||
|
|
25b4c3389a | ||
|
|
06d700b8d4 | ||
|
|
639474a89e | ||
|
|
ce1e3c03b5 | ||
|
|
239db03a1d | ||
|
|
9dcf945f94 | ||
|
|
098a6b94b7 | ||
|
|
fb6cc8e082 | ||
|
|
b3b11437a8 | ||
|
|
306252b88f | ||
|
|
3e3feeebb2 | ||
|
|
ef5e271ffd | ||
|
|
71eb38c4d9 | ||
|
|
e23dff8f91 | ||
|
|
3d08029c45 | ||
|
|
6a02131f6c | ||
|
|
4df00a3088 | ||
|
|
e6af590601 | ||
|
|
44d41aa222 | ||
|
|
93b7ef8f0c | ||
|
|
5ada44a604 | ||
|
|
f1e23fb653 | ||
|
|
10ecd2cb1c | ||
|
|
62eda89c24 | ||
|
|
c1df55f01b | ||
|
|
8ee6840c00 | ||
|
|
1fdfd53ba4 | ||
|
|
4cc53df442 | ||
|
|
3e06338d30 | ||
|
|
5ec9d0dafa | ||
|
|
6c54fb56fc | ||
|
|
608973612d | ||
|
|
10ce09d738 | ||
|
|
a92f30d9c3 | ||
|
|
88346339f0 | ||
|
|
77698771ed | ||
|
|
ff93b8dcda | ||
|
|
be0bcee8f3 | ||
|
|
f5057e6483 | ||
|
|
09049016ea | ||
|
|
eafd14d1f0 | ||
|
|
6033805e92 | ||
|
|
2b5c8e9cbd | ||
|
|
58e659e1e9 | ||
|
|
46d05f5f74 | ||
|
|
f3996f782c | ||
|
|
2d45da0f14 | ||
|
|
8c8adeec08 | ||
|
|
9371bccc37 | ||
|
|
a1f63a989a | ||
|
|
49ac50f0c2 | ||
|
|
e1b79228fa | ||
|
|
d9a050b6c1 | ||
|
|
0335eb8910 | ||
|
|
204e2b5863 | ||
|
|
a0bc28a6f0 | ||
|
|
20f52a464a | ||
|
|
99e1cc2ee7 | ||
|
|
7a453fda9c | ||
|
|
42936b4b40 | ||
|
|
ff1b8f2964 | ||
|
|
15ab5b9a2e | ||
|
|
c374ea8952 | ||
|
|
f97c54d160 | ||
|
|
f07bfa94eb | ||
|
|
c64b227676 | ||
|
|
8176e540c2 | ||
|
|
a025d90adb | ||
|
|
48933113ab | ||
|
|
99dd57db43 | ||
|
|
4656a50b00 | ||
|
|
27d41038fa | ||
|
|
08fcc4efa9 | ||
|
|
1c43d58ca0 | ||
|
|
d35f1c396d | ||
|
|
6798a8a496 | ||
|
|
073f0dcac1 | ||
|
|
e54f9a1948 | ||
|
|
ad7d6a84eb | ||
|
|
2607c79153 | ||
|
|
498e49324c | ||
|
|
ac467dfb2f | ||
|
|
f12373b8d5 | ||
|
|
0a50be934d | ||
|
|
f9c5aa5879 | ||
|
|
205be5ebc7 | ||
|
|
3f782d2982 | ||
|
|
dedb6e44a9 | ||
|
|
01d73157aa | ||
|
|
9bcf6107c1 | ||
|
|
b0100e4d87 | ||
|
|
75a1d85212 | ||
|
|
6b3f3a6e88 | ||
|
|
9f5554c942 | ||
|
|
7a969df31e | ||
|
|
73e99cd734 | ||
|
|
48b621a0d7 | ||
|
|
034c7403c1 | ||
|
|
8a24b2305c | ||
|
|
8f8d06a1fe | ||
|
|
463bf075db | ||
|
|
418629f9d5 | ||
|
|
b5d5402be6 | ||
|
|
b4a2bbf3f2 | ||
|
|
f28341d7b8 | ||
|
|
f565d2710a | ||
|
|
1ab282c09c | ||
|
|
b413625b22 | ||
|
|
6dd25d57b7 | ||
|
|
7ca15ca9f9 | ||
|
|
d8d51f3fc0 | ||
|
|
c30c45478b | ||
|
|
b473eb7b46 | ||
|
|
c94b3e468f | ||
|
|
dd891e72f6 | ||
|
|
7bba6c9005 | ||
|
|
6ae72b82cb | ||
|
|
99beaa40ee | ||
|
|
09abd13db8 | ||
|
|
96e7c17494 | ||
|
|
a401e3ecba | ||
|
|
6c0f61c5a2 | ||
|
|
170660efc8 | ||
|
|
d56b6fd084 | ||
|
|
18f184a211 | ||
|
|
150f8f03e3 | ||
|
|
8ed155c7ba | ||
|
|
cc36111653 | ||
|
|
a66b9d84db | ||
|
|
57d568048a | ||
|
|
9a471b1f2f | ||
|
|
106d1530e9 | ||
|
|
4cf91c1b48 | ||
|
|
15c656b10b | ||
|
|
7cb24c9de3 | ||
|
|
527788efa4 | ||
|
|
cac2e2c5d4 | ||
|
|
0865ca0b65 | ||
|
|
168b1d9d62 | ||
|
|
87c57eb05c | ||
|
|
88dbfb8ef3 | ||
|
|
2b4245627a | ||
|
|
d3b53fc01e | ||
|
|
b8d2b60148 | ||
|
|
e974827d29 | ||
|
|
8d58c6c22a | ||
|
|
812ae457cb | ||
|
|
e5ed010bad | ||
|
|
b091abdb95 | ||
|
|
d8344db317 | ||
|
|
a3b6cbfd26 | ||
|
|
2639e2de42 | ||
|
|
148b9b56d7 | ||
|
|
30aaf9a866 | ||
|
|
d03db64f78 | ||
|
|
162e114cdd | ||
|
|
50e9a1cd12 | ||
|
|
aad7e440e1 | ||
|
|
485d22cd1c | ||
|
|
27b1c3bc88 | ||
|
|
c95102f0f0 | ||
|
|
70385b3718 | ||
|
|
e0192c396e | ||
|
|
8fb90c754e | ||
|
|
9a512b60f0 | ||
|
|
fff521cbd6 | ||
|
|
39375575a6 | ||
|
|
d23a86c5c3 | ||
|
|
087a8d3d50 | ||
|
|
246c3064c1 | ||
|
|
2ea2d4de49 | ||
|
|
0e2ab4c13f | ||
|
|
5cb1e89f42 | ||
|
|
7d244ddadf | ||
|
|
f7aa411272 | ||
|
|
b6f33143fe | ||
|
|
23938e1717 | ||
|
|
ed6d2aba83 | ||
|
|
1170c07f03 | ||
|
|
15f32e23c9 | ||
|
|
284c90077f | ||
|
|
53e7ffd9da | ||
|
|
fc905321c3 | ||
|
|
364c30f59a | ||
|
|
bece21038b | ||
|
|
88de7c2871 | ||
|
|
3d229b7740 | ||
|
|
cbc343bcad | ||
|
|
f8110798ca | ||
|
|
0a0fbe2b15 | ||
|
|
55a8e79021 | ||
|
|
7cb0d3f5dc | ||
|
|
6204f58f95 | ||
|
|
7a35619362 | ||
|
|
69fdcdef0c | ||
|
|
3afe010889 | ||
|
|
d8d07f6235 | ||
|
|
642c729f4e | ||
|
|
2ff622ca46 | ||
|
|
a733dd87e2 | ||
|
|
843fa93fba | ||
|
|
93ea8d41f1 | ||
|
|
ebadae9792 | ||
|
|
2637ca49a6 | ||
|
|
22b4aee6eb | ||
|
|
0b3c166594 | ||
|
|
ff060bf719 | ||
|
|
2ff8ef790d | ||
|
|
b903fd496a | ||
|
|
e497d8f399 | ||
|
|
d717db1875 | ||
|
|
4fcf400300 | ||
|
|
295383061e | ||
|
|
d0f40241a4 | ||
|
|
dfd5d6c9ec | ||
|
|
e6ddc2474b | ||
|
|
93cdc87a79 | ||
|
|
12ecf6bcb0 | ||
|
|
b4d784f8d8 | ||
|
|
0a404730ea | ||
|
|
9f22569679 | ||
|
|
3aadc3f62c | ||
|
|
b3565ee5a2 | ||
|
|
685a627533 | ||
|
|
cca1a6a27b | ||
|
|
8c1ce051a9 | ||
|
|
3cf2173b4a | ||
|
|
529f8521a0 | ||
|
|
b3362334e8 | ||
|
|
f8dc8bd65b | ||
|
|
8f7826ad96 | ||
|
|
c1c82a4bf0 | ||
|
|
754ab85e59 | ||
|
|
9165c56436 | ||
|
|
ae6ef0fdcb | ||
|
|
f9a16cd243 | ||
|
|
fa11ccfde9 | ||
|
|
86f432ff5d | ||
|
|
3f7e61ce94 | ||
|
|
71868732bb | ||
|
|
d392c2ff2f | ||
|
|
625fbbe83b | ||
|
|
c1f2efd43e | ||
|
|
0ef43da159 | ||
|
|
3b19241611 | ||
|
|
66b707f9ce | ||
|
|
2ffecc5625 | ||
|
|
9d6c62d59b | ||
|
|
b7b4b2f45b | ||
|
|
8d3089dd17 | ||
|
|
256d2ce004 | ||
|
|
780d805419 | ||
|
|
c469567b9a | ||
|
|
a4de0a2603 | ||
|
|
36574a7556 | ||
|
|
be6ce362bd | ||
|
|
bc06dc9fd9 | ||
|
|
b0d670a1bc | ||
|
|
ccf19469e2 | ||
|
|
809492f2af | ||
|
|
baf10331b3 | ||
|
|
1bca56362e | ||
|
|
ea000b5701 | ||
|
|
ab1fa0d555 | ||
|
|
0d09ea3339 | ||
|
|
37ec5826d5 | ||
|
|
e25c13eb4a | ||
|
|
bd61327cdd | ||
|
|
71c13892eb | ||
|
|
8a3ae50022 | ||
|
|
5e7a7f7db5 | ||
|
|
1e502bbf38 | ||
|
|
fd8db7de55 | ||
|
|
641c28f51e | ||
|
|
71fb0333e3 | ||
|
|
46fdd2e57c | ||
|
|
73b3c9ec10 | ||
|
|
e772c6a373 | ||
|
|
d49716cc16 | ||
|
|
bfd72020ce | ||
|
|
45d310c534 | ||
|
|
443455d190 | ||
|
|
6b7774434c | ||
|
|
afd9eb05a3 | ||
|
|
79b9d48b8a | ||
|
|
da914522df | ||
|
|
31126db321 | ||
|
|
4a14b96c8e | ||
|
|
f2462d5e0b | ||
|
|
61eb91d637 | ||
|
|
faa2be8068 | ||
|
|
4811d76344 | ||
|
|
0489976ef5 | ||
|
|
80b1c385f2 | ||
|
|
694206f300 | ||
|
|
5ff90e973b | ||
|
|
128e42c9dd | ||
|
|
641f4eb20b | ||
|
|
a14d66bb1f | ||
|
|
a8bcd7ecec | ||
|
|
bd5650ab43 | ||
|
|
79ac763969 | ||
|
|
6218a087c3 | ||
|
|
6c076d2bd5 | ||
|
|
0fe0c70ad3 | ||
|
|
2aa0bfec52 | ||
|
|
77f1f8f1df | ||
|
|
3f71f67714 | ||
|
|
6122646715 | ||
|
|
27640dbd20 | ||
|
|
06234068c2 | ||
|
|
09df9a43cd | ||
|
|
4f01124326 | ||
|
|
9ab4d01371 | ||
|
|
8556706ac2 | ||
|
|
113fc7d204 | ||
|
|
6b608c92ae | ||
|
|
b2b18152d1 | ||
|
|
dbd893968e | ||
|
|
1c3f5eac5b | ||
|
|
70ff3fdd2c | ||
|
|
2f7cfac5a6 | ||
|
|
ed50252be8 | ||
|
|
7d6679d157 | ||
|
|
6f8c6a62b9 | ||
|
|
e2747f8c64 | ||
|
|
f25a0d5a5c | ||
|
|
70a1b8abe7 | ||
|
|
8af267ad6a | ||
|
|
a6b0dcd241 | ||
|
|
623e2a09c2 | ||
|
|
c8f1a5e385 | ||
|
|
f699f6b31d | ||
|
|
4a62f540f1 | ||
|
|
70eae9b6d2 | ||
|
|
af3c3a24e3 | ||
|
|
0db2ffc3af | ||
|
|
b440081fa2 | ||
|
|
1f286b0218 | ||
|
|
ef3972ac83 | ||
|
|
8394ac5fb2 | ||
|
|
db5ef2f455 | ||
|
|
b7e98f8495 | ||
|
|
60b9930469 | ||
|
|
eac3e2e9aa | ||
|
|
1acf8aa761 | ||
|
|
5d51407505 | ||
|
|
e63bb9d794 | ||
|
|
eb15ad393e | ||
|
|
8232e89286 | ||
|
|
c698a87201 | ||
|
|
619380c3c0 | ||
|
|
231f605b15 | ||
|
|
f715a3b168 | ||
|
|
2b3cc7e607 | ||
|
|
a0b5cde66a | ||
|
|
20cb6cb693 | ||
|
|
168886b9ad | ||
|
|
0399e58fdf | ||
|
|
06d29ea249 | ||
|
|
7e5c288be8 | ||
|
|
6fb3b48978 | ||
|
|
61e874fa84 | ||
|
|
7d78857470 | ||
|
|
619bc7e159 | ||
|
|
69e6810d1e | ||
|
|
75ba7f14e5 | ||
|
|
cce7fdff34 | ||
|
|
bf6cc01b52 | ||
|
|
bcb095f8a9 | ||
|
|
bd7dff22a8 | ||
|
|
972cceb99c | ||
|
|
7e1e6c7215 | ||
|
|
4b60d7372d | ||
|
|
57052515de | ||
|
|
dff5676e1b | ||
|
|
8b6b478b81 | ||
|
|
6756ed03f7 | ||
|
|
b762f8fe07 | ||
|
|
3a341d46ca | ||
|
|
106518fe50 | ||
|
|
cc7cfafe27 | ||
|
|
8503fd95ac | ||
|
|
d7c55ba002 | ||
|
|
3c981d26f8 | ||
|
|
d6ac34c459 | ||
|
|
8bff0a3a2c | ||
|
|
ad80341982 | ||
|
|
5729030ee1 | ||
|
|
d314cdc629 | ||
|
|
a22348496f | ||
|
|
a46e91bf0d | ||
|
|
4f992a26fb | ||
|
|
eaa2ea31bd | ||
|
|
12293d26da | ||
|
|
a1a530fb8d | ||
|
|
f93de378fe | ||
|
|
84f47ba861 | ||
|
|
c0b0d51402 | ||
|
|
b8e76d926a | ||
|
|
92d7706b2f | ||
|
|
cae49d7651 | ||
|
|
ff07968863 | ||
|
|
0aa9d241d4 | ||
|
|
2a7aacb79b | ||
|
|
1122710c52 | ||
|
|
964142a3a3 | ||
|
|
eb31acfa17 | ||
|
|
58f9ceadcb | ||
|
|
b82e3dd3d7 | ||
|
|
9a2febfed4 | ||
|
|
963096e847 | ||
|
|
d0734c2a24 | ||
|
|
7d08b37835 | ||
|
|
eddc65a611 | ||
|
|
2deeb9d762 | ||
|
|
b904c4673f | ||
|
|
28dc3cc184 | ||
|
|
968f595848 | ||
|
|
c25de96b99 | ||
|
|
1ad8ee4834 | ||
|
|
dd826b760f | ||
|
|
8c45a0d797 | ||
|
|
c3218394e4 | ||
|
|
4a8b42df43 | ||
|
|
cdae846961 | ||
|
|
01f6ba274d | ||
|
|
1361e7e34c | ||
|
|
5b3948723c | ||
|
|
7359ab3a7a | ||
|
|
27f4fc61c4 | ||
|
|
00521a78a1 | ||
|
|
c058e66325 | ||
|
|
f2d72b7f87 | ||
|
|
978551c1f7 | ||
|
|
de87376b96 | ||
|
|
c57068e4c1 | ||
|
|
a623ac4e0e | ||
|
|
9afb0e7d74 | ||
|
|
e0b2480d0e | ||
|
|
b5bebe6668 | ||
|
|
d945ef7ecf | ||
|
|
225f0aa962 | ||
|
|
e43da87623 | ||
|
|
dfab04f55c | ||
|
|
458ff6f480 | ||
|
|
3c64131dd8 | ||
|
|
a1f4627d40 | ||
|
|
17138832e5 | ||
|
|
17531efb1a | ||
|
|
41e6f47bfa | ||
|
|
2c9614fb10 | ||
|
|
6afd739cf1 | ||
|
|
2457823369 | ||
|
|
aeaefb716d | ||
|
|
d4beef1773 | ||
|
|
928f583b71 | ||
|
|
0282fc286e | ||
|
|
04cc039c07 | ||
|
|
7f1f83e834 | ||
|
|
b423f4baff | ||
|
|
4a96596e09 | ||
|
|
ad33f31373 | ||
|
|
080e80a637 | ||
|
|
53d656a9a1 | ||
|
|
89b0d7af2c | ||
|
|
1c4cdfade6 | ||
|
|
63f6028c4e | ||
|
|
246b3f7e9f | ||
|
|
e45a686be7 | ||
|
|
1dce744290 | ||
|
|
5df1afe6e6 | ||
|
|
da482534b3 | ||
|
|
be64be1dfd | ||
|
|
afe8df3d75 | ||
|
|
3ee011d02b | ||
|
|
bd5ddb70ea | ||
|
|
d6c39cca3a | ||
|
|
2fe6680b3f | ||
|
|
1347bd1e96 | ||
|
|
b9c5c653e6 | ||
|
|
d6b4715e32 | ||
|
|
ecbe515d79 | ||
|
|
44cab4adea | ||
|
|
a2dc91d683 | ||
|
|
9607a311ed | ||
|
|
804ae553c3 | ||
|
|
be7d4fdde0 | ||
|
|
6aed6f697f | ||
|
|
624fe1566b | ||
|
|
ec1577308a | ||
|
|
e3aa3a71cb | ||
|
|
90dcf11081 | ||
|
|
132e190048 | ||
|
|
dc9928eb7c | ||
|
|
428ff1c549 | ||
|
|
c61baaa999 | ||
|
|
edee1b6680 | ||
|
|
885c533ef0 | ||
|
|
de0519cd67 | ||
|
|
c5ac50d5e2 | ||
|
|
4cb5382fca | ||
|
|
0bc0799597 | ||
|
|
9e0f7ffb8a | ||
|
|
cfa280641e | ||
|
|
a911b0b748 | ||
|
|
be9c8fa239 | ||
|
|
0d32d05921 | ||
|
|
bf7b44d54f | ||
|
|
a2b5d31397 | ||
|
|
6d0476c328 | ||
|
|
2cd31bb596 | ||
|
|
637548fb10 | ||
|
|
26949a54c9 | ||
|
|
3c7053730f | ||
|
|
ee3c3f96d7 | ||
|
|
9039f3c7b0 | ||
|
|
a000b7234a | ||
|
|
218651a65b | ||
|
|
423460521b | ||
|
|
732eb22602 | ||
|
|
28a1c909e4 | ||
|
|
da24b92c2a | ||
|
|
204f826da0 | ||
|
|
4516f9102e | ||
|
|
ab56848021 | ||
|
|
69d2a48ff1 | ||
|
|
c5b72f03a1 | ||
|
|
d455161f02 | ||
|
|
764bd4bf65 | ||
|
|
5a4cd2828d | ||
|
|
303b3fe0e3 | ||
|
|
cb4a0b5b63 | ||
|
|
80b989b275 | ||
|
|
5dbd73bf67 | ||
|
|
0481dc4c6e | ||
|
|
d525363520 | ||
|
|
748665aa52 | ||
|
|
c4da75c128 | ||
|
|
2795a668d6 | ||
|
|
1b6ec3d818 | ||
|
|
83d6027167 | ||
|
|
5c6d280101 | ||
|
|
3528882472 | ||
|
|
d630028f35 | ||
|
|
3b629c5fe4 | ||
|
|
21346b8835 | ||
|
|
cdca1f405a | ||
|
|
ce1fd5d84c | ||
|
|
5f87a200ec | ||
|
|
66d54a8b6d | ||
|
|
5f02b8269b | ||
|
|
b4fff11fed | ||
|
|
3243c72cb2 | ||
|
|
0c5d530ffc | ||
|
|
2fcaf0e746 | ||
|
|
2f87640ce4 | ||
|
|
be372b62a6 | ||
|
|
76c08bd2ed | ||
|
|
da5d212dfc | ||
|
|
5c41eb1716 | ||
|
|
91b9b7e794 | ||
|
|
4da30258e7 | ||
|
|
295058cc41 | ||
|
|
7774ce5dcf | ||
|
|
5f60368f08 | ||
|
|
ca60e23706 | ||
|
|
bf883ac38d | ||
|
|
cfa1d71b55 | ||
|
|
3a72186992 | ||
|
|
af6aa2ea05 | ||
|
|
114aae699d | ||
|
|
f9848fb7b1 | ||
|
|
856aebbbd6 | ||
|
|
526ec82985 | ||
|
|
67a384bafa | ||
|
|
d7a3ed9aa3 | ||
|
|
77a9c7a763 | ||
|
|
9065957d3d | ||
|
|
9188b6c365 | ||
|
|
fe32f8706e | ||
|
|
e79695d563 | ||
|
|
ed20e5e6fd | ||
|
|
612499e4d0 | ||
|
|
d41a137af5 | ||
|
|
6692771666 | ||
|
|
5f0ca989b0 | ||
|
|
cbc76df7dc | ||
|
|
68df67103c | ||
|
|
5980efcab5 | ||
|
|
7452c85b9c | ||
|
|
1e1f13f227 | ||
|
|
1bfdcafcb0 | ||
|
|
b78558faa1 | ||
|
|
9861f30e1d | ||
|
|
ed501b059e | ||
|
|
5204f1360e | ||
|
|
b07b40ca0e | ||
|
|
4ad7f1e776 | ||
|
|
f2459da232 | ||
|
|
55b08dd44e | ||
|
|
ffbc7660a6 | ||
|
|
cf51d1ad90 | ||
|
|
fe7fca9da1 | ||
|
|
cd24c92cb2 | ||
|
|
be65bb26c2 | ||
|
|
90ddac64b6 | ||
|
|
e6f6feeecc | ||
|
|
b4e1ea9f95 | ||
|
|
2c7a49f756 | ||
|
|
f6370ccef4 | ||
|
|
8fb0709493 | ||
|
|
07160b3d82 | ||
|
|
dda6dbadfe | ||
|
|
26aaabc693 | ||
|
|
52844744bf | ||
|
|
006631235e | ||
|
|
678f5fafba | ||
|
|
e20087bf71 | ||
|
|
7d4fc36816 | ||
|
|
8a4bb68747 | ||
|
|
4e211fa8a0 | ||
|
|
4618d9b438 | ||
|
|
c0a5bc3dda | ||
|
|
a02f3f6976 | ||
|
|
6cd2d41b36 | ||
|
|
93608b2018 | ||
|
|
fab25ee31b | ||
|
|
d8ef8c6365 | ||
|
|
cb972e1f0e | ||
|
|
af14ded3fc | ||
|
|
6aa16322cb | ||
|
|
5a0d585550 | ||
|
|
447d10c73f | ||
|
|
a514b9a490 | ||
|
|
2dac4a584c | ||
|
|
2d65aaeb5c | ||
|
|
81cfb6b041 | ||
|
|
658d17a08a | ||
|
|
7ed400413d | ||
|
|
8f84341661 | ||
|
|
f4b6547ce1 | ||
|
|
fba63e7c60 | ||
|
|
8514da82d2 | ||
|
|
2e5b4e7927 | ||
|
|
47d9eca542 | ||
|
|
eaeb0298a2 | ||
|
|
327ecc2f83 | ||
|
|
63384d1830 | ||
|
|
9349315a9a | ||
|
|
6927396daf | ||
|
|
072579ba85 | ||
|
|
a76e8d6662 | ||
|
|
0810edec5f | ||
|
|
e952bcd424 | ||
|
|
6884165424 | ||
|
|
a521a1b0e2 | ||
|
|
72a95558c8 | ||
|
|
050a707758 | ||
|
|
052d83d570 | ||
|
|
682e0c7c38 | ||
|
|
c399a0d6b1 | ||
|
|
213e72aaf3 | ||
|
|
919dac4da6 | ||
|
|
022fbb7508 | ||
|
|
5e3510d4b1 | ||
|
|
ae1a1cd55d | ||
|
|
d44e782fba | ||
|
|
21b640baee | ||
|
|
aa9bee63fc | ||
|
|
35b56c75c2 | ||
|
|
6991439448 | ||
|
|
7bee723d56 | ||
|
|
df2a5275d4 | ||
|
|
aff4e0bb2f | ||
|
|
b81d803390 | ||
|
|
ab6ac0a31d | ||
|
|
472d6e0cfb | ||
|
|
d0c0a6a921 | ||
|
|
72900e0edb | ||
|
|
cbe2249b39 | ||
|
|
ab0aa7118c | ||
|
|
a4c3785f50 | ||
|
|
28fea7fe7d | ||
|
|
ba98c54594 | ||
|
|
2250ff40dc | ||
|
|
e2b8fd356a | ||
|
|
a33ccabd1e | ||
|
|
3c96562702 | ||
|
|
80bafa48f9 | ||
|
|
ef779b7b11 | ||
|
|
b1ac5dd228 | ||
|
|
db876e378d | ||
|
|
ea4c27d979 | ||
|
|
9bed9c8290 | ||
|
|
6d752f5d9b | ||
|
|
8fc073e52b | ||
|
|
5a31496eb0 | ||
|
|
3519bd22cf | ||
|
|
cb38baf4c8 | ||
|
|
dd53284abb | ||
|
|
0b3df0b317 | ||
|
|
fd5e4b32c1 | ||
|
|
b8ed7d5184 | ||
|
|
6c88206d50 | ||
|
|
6300150636 | ||
|
|
fa48dfcca2 | ||
|
|
8ae38475b0 | ||
|
|
d8b7e7f848 | ||
|
|
89fbc40586 | ||
|
|
3fca8a4975 | ||
|
|
e9031b6800 | ||
|
|
efbd75a0b3 | ||
|
|
cb74781241 | ||
|
|
62ca5a2c59 | ||
|
|
bb399b0937 | ||
|
|
1bff3d0f84 | ||
|
|
a672bca9fe | ||
|
|
8b85480c73 | ||
|
|
c22abfef1a | ||
|
|
a65215f7d3 | ||
|
|
4c2e366f9b | ||
|
|
fcc1b296a8 | ||
|
|
954a04b866 | ||
|
|
2b62bd490c | ||
|
|
969733934b | ||
|
|
92504d633b | ||
|
|
6345f05f54 | ||
|
|
aaef08a0d4 | ||
|
|
bc513f36aa | ||
|
|
344a2a950f | ||
|
|
afd9deff38 | ||
|
|
21c1975abf | ||
|
|
f01bb5c354 | ||
|
|
5738f2de70 | ||
|
|
b1bcc03db3 | ||
|
|
f57bfe8089 | ||
|
|
9696b2257b | ||
|
|
6308211d36 | ||
|
|
087b513af8 | ||
|
|
55781765c2 | ||
|
|
0b880c3f33 | ||
|
|
07c3528f53 | ||
|
|
433f63c85f | ||
|
|
2c9d5ffb80 | ||
|
|
57359a5752 | ||
|
|
dd0a7ce7ea | ||
|
|
0d02bd205a | ||
|
|
8cf733bbc1 | ||
|
|
b5cb98b819 | ||
|
|
90402b9a8c | ||
|
|
6423619c8f | ||
|
|
9209ff62fe | ||
|
|
a0d1145f8e | ||
|
|
74e73e10f3 | ||
|
|
238feddbd6 | ||
|
|
a978be0193 | ||
|
|
cb5b4b1b01 | ||
|
|
3ec439a1fd | ||
|
|
c16ff0faf0 | ||
|
|
506b99572b | ||
|
|
4679a340c1 | ||
|
|
9bc7ddddf4 | ||
|
|
a9d5b91669 | ||
|
|
64a4b4e041 | ||
|
|
bb57de0d36 | ||
|
|
ade3fc802f | ||
|
|
c478573816 | ||
|
|
6d80075884 | ||
|
|
3eb34b884b | ||
|
|
4353adcf44 | ||
|
|
8ce8efd86e | ||
|
|
22af3d19b0 | ||
|
|
3e667aeba3 | ||
|
|
9717ee655a | ||
|
|
8bf0331753 | ||
|
|
131bb3f6bb | ||
|
|
b0533dc7a4 | ||
|
|
2464767a0e | ||
|
|
b3ff479e57 | ||
|
|
8edc1bfe80 | ||
|
|
9151441b62 | ||
|
|
e90f36f1ba | ||
|
|
b085bafb64 | ||
|
|
ab66163d40 | ||
|
|
f72164b69a | ||
|
|
0a3fb441b8 | ||
|
|
ace6774c42 | ||
|
|
90cc2ae2ad | ||
|
|
486c6118e2 | ||
|
|
84438fad56 | ||
|
|
c9db4ed2fd | ||
|
|
0dd4d12051 | ||
|
|
584cad73f4 | ||
|
|
e851fcf629 | ||
|
|
c8cd4c0142 | ||
|
|
eed8ea112d | ||
|
|
0cdefef72b | ||
|
|
7bc93da4c9 | ||
|
|
6505f6ae3f | ||
|
|
327e48530d | ||
|
|
ecc5bf01f7 | ||
|
|
56e1aee489 | ||
|
|
01f4d66b6b | ||
|
|
e5e4f0b26c | ||
|
|
a792c0ba44 | ||
|
|
9f7c157dc0 | ||
|
|
a1c5d620cf | ||
|
|
647489f91d | ||
|
|
79017aee7c | ||
|
|
7093aeefa2 | ||
|
|
9187ea31c1 | ||
|
|
959b0bd890 | ||
|
|
e9b4d1c37e | ||
|
|
4de9db38fa | ||
|
|
95537ada6b | ||
|
|
c7287e9c01 | ||
|
|
d096ea5ef8 | ||
|
|
5cff0b49e8 | ||
|
|
1986167e81 | ||
|
|
16c69a134c | ||
|
|
1baf46f180 | ||
|
|
9e403beae8 | ||
|
|
888df6e957 | ||
|
|
05920ee992 | ||
|
|
0194225d8b | ||
|
|
97c9c1ece8 | ||
|
|
50d2799bf8 | ||
|
|
509866e746 | ||
|
|
11f00a6636 | ||
|
|
00c4fb82f8 | ||
|
|
b73ef7a9df | ||
|
|
484eac2e03 | ||
|
|
edc01d68be | ||
|
|
c863d44ace | ||
|
|
e418971eda | ||
|
|
dd7b6b45f5 | ||
|
|
a1721de603 | ||
|
|
a696f04d4d | ||
|
|
c3af0047a7 | ||
|
|
f4637ef0de | ||
|
|
cb3a2e0996 | ||
|
|
a5212f8062 | ||
|
|
9c851a6d41 | ||
|
|
9ff0d77979 | ||
|
|
72108100e8 | ||
|
|
e3a4480ddc | ||
|
|
4a76d52d77 | ||
|
|
256c0c9094 | ||
|
|
02d880cb36 | ||
|
|
1b3fa859b9 | ||
|
|
a6bb24d4c8 | ||
|
|
7c9a240e91 | ||
|
|
5cee5838bf | ||
|
|
0726835c64 | ||
|
|
320ca6ca28 | ||
|
|
4072445f12 | ||
|
|
3f8bb42c7e | ||
|
|
44eccf3e99 | ||
|
|
bca9d10196 | ||
|
|
5d265597f7 | ||
|
|
533e58886e | ||
|
|
afd1e054ec | ||
|
|
42f8892aeb | ||
|
|
c6b05ab2a7 | ||
|
|
8d79ab9138 | ||
|
|
8a331877f7 | ||
|
|
bf5f91136e | ||
|
|
92dc132e55 | ||
|
|
6320031aac | ||
|
|
324d0ddc3b | ||
|
|
95cb3a686d | ||
|
|
51fa48e028 | ||
|
|
030dc46ba9 | ||
|
|
a3ae03ad37 | ||
|
|
514f134015 | ||
|
|
8a410b6fe1 | ||
|
|
509d393ae1 | ||
|
|
1f51267cb5 | ||
|
|
2e507a2491 | ||
|
|
17d4973104 | ||
|
|
8da15e1c80 | ||
|
|
19e0851b35 | ||
|
|
3106d5e24d | ||
|
|
ff9eb3391c | ||
|
|
ee124649b2 | ||
|
|
902cd5e269 | ||
|
|
40e5a9d113 | ||
|
|
8df34cd68e | ||
|
|
8e808c44ee | ||
|
|
cfcaa9c909 | ||
|
|
4023b25ccc | ||
|
|
168b044abc | ||
|
|
01a5f01e3f | ||
|
|
93cb40a1c2 | ||
|
|
e33240dbef | ||
|
|
5c8009f90e | ||
|
|
812bb1716c | ||
|
|
dd51cc7727 | ||
|
|
9b5a6028f2 | ||
|
|
83f74adbed | ||
|
|
6d7ba532c9 | ||
|
|
719f6148dd | ||
|
|
5d62c3cc6a | ||
|
|
aae80b929a | ||
|
|
c3c7fa242d | ||
|
|
8d102035fa | ||
|
|
aa91314590 | ||
|
|
f1d171d635 | ||
|
|
b3068b50ef | ||
|
|
7579ba6446 | ||
|
|
eaa65c0868 | ||
|
|
09e6ecc483 | ||
|
|
cbe5acd88b | ||
|
|
44309b6b69 | ||
|
|
e232ba020c | ||
|
|
aaf2e134b8 | ||
|
|
29c0a861b1 | ||
|
|
699a315d5e | ||
|
|
6e2c371544 | ||
|
|
6c1e42594e | ||
|
|
45b43ac004 | ||
|
|
b502b8efc1 | ||
|
|
52bc62de79 | ||
|
|
7beecd0046 | ||
|
|
959f48bb82 | ||
|
|
9392bde1e3 | ||
|
|
d4bc26bd24 | ||
|
|
aa4c21982b | ||
|
|
9820819552 | ||
|
|
880f61a67c | ||
|
|
521e7835df | ||
|
|
c5bd386711 | ||
|
|
e85e0624e7 | ||
|
|
9821e88608 | ||
|
|
b4b60272e8 | ||
|
|
fc89f1262e | ||
|
|
3e5989752f | ||
|
|
a40574c03f | ||
|
|
f6cf35ca4e | ||
|
|
33244035e4 | ||
|
|
1071f10c04 | ||
|
|
e6328bd509 | ||
|
|
d86149a289 | ||
|
|
14eda85230 | ||
|
|
57e6b9c547 | ||
|
|
82d1070192 | ||
|
|
c0392aee23 | ||
|
|
02822617db | ||
|
|
172fc515a3 | ||
|
|
eac3008773 | ||
|
|
52cca6ed36 | ||
|
|
02f579ce4a | ||
|
|
9ed956dcca | ||
|
|
96d8a8ece0 | ||
|
|
bf9337f3d8 | ||
|
|
4ce66d0295 | ||
|
|
5b7d330067 | ||
|
|
9c4bd18276 | ||
|
|
36ca27b46a | ||
|
|
998811395f | ||
|
|
e7acea9915 | ||
|
|
65d1906f81 | ||
|
|
fce95b6677 | ||
|
|
2ec240eb5c | ||
|
|
21202829f3 | ||
|
|
df8ed489af | ||
|
|
759cc84ac4 | ||
|
|
5e7aa6a1c8 | ||
|
|
943efc9e9f | ||
|
|
b7b3e572b6 | ||
|
|
2b12789fbf | ||
|
|
aaa9ecf79b | ||
|
|
9ac4527500 | ||
|
|
d9d21ee90f | ||
|
|
0068546bf3 | ||
|
|
0d8ecd0d21 | ||
|
|
a41a9d2a9e | ||
|
|
39b506ab01 | ||
|
|
bd004663da | ||
|
|
6ee8dd438a | ||
|
|
a8674b4e10 | ||
|
|
31f63c43ed | ||
|
|
4eb038a1c4 | ||
|
|
094f94cb44 | ||
|
|
82b127ba0b | ||
|
|
93d7608437 | ||
|
|
efe7a90161 | ||
|
|
3c852822ad | ||
|
|
195ec35e03 | ||
|
|
ffc3fedbde | ||
|
|
70903d0a21 | ||
|
|
ce8692fe97 | ||
|
|
a41718dcc7 | ||
|
|
133c46acb5 | ||
|
|
a7ee21f18d | ||
|
|
ea39f306d9 | ||
|
|
c71efb01ce | ||
|
|
e0a60c50f5 | ||
|
|
efec05ce41 | ||
|
|
b5d53cbfd1 | ||
|
|
07e496302c | ||
|
|
329777865b | ||
|
|
bde5680d10 | ||
|
|
60f04d9ed1 | ||
|
|
a44296e6f4 | ||
|
|
4fd072f9b3 | ||
|
|
02d6beada3 | ||
|
|
cf4ae53af2 | ||
|
|
c5bcf9cb2d | ||
|
|
31012ea782 | ||
|
|
3045303bda | ||
|
|
664f7b6ba9 | ||
|
|
ae1c53e386 | ||
|
|
0b3bab9d61 | ||
|
|
7234c2c8d4 | ||
|
|
a86b530963 | ||
|
|
7798a03d15 | ||
|
|
bc50d32b62 | ||
|
|
8fa83f72eb | ||
|
|
c27c3fcdcc | ||
|
|
735a2536da | ||
|
|
f24f902979 | ||
|
|
64dd27f57c | ||
|
|
33ecf1d294 | ||
|
|
918dad7488 | ||
|
|
0d3b70b536 | ||
|
|
6ebf49f699 | ||
|
|
b1df11336d | ||
|
|
6497384abd | ||
|
|
af6d4e6058 | ||
|
|
d0ddeb0ea7 | ||
|
|
177c560d03 | ||
|
|
b5137cca5b | ||
|
|
5b4d8f10d0 | ||
|
|
15861e0899 | ||
|
|
459491e786 | ||
|
|
a25e0f514e | ||
|
|
c5eb29c591 | ||
|
|
5551933833 | ||
|
|
6f7df30dbe | ||
|
|
c7bae18605 | ||
|
|
cbac461555 | ||
|
|
e7af3755e5 | ||
|
|
cf1554a393 | ||
|
|
45fcc528e6 | ||
|
|
6fb703b7e6 | ||
|
|
c90c704127 | ||
|
|
bc2f5778ac | ||
|
|
5820b9d970 | ||
|
|
26432dcb35 | ||
|
|
a060ea6240 | ||
|
|
fdfe478178 | ||
|
|
cea9c992fa | ||
|
|
e510dfda65 | ||
|
|
3349bf4f6c | ||
|
|
50de85c1f1 | ||
|
|
f5acf31b44 | ||
|
|
9a5c5ad50c | ||
|
|
bd887d65a7 | ||
|
|
dfc2a9baa4 | ||
|
|
785b3a8b97 | ||
|
|
e089b55ded | ||
|
|
56eaff5f89 | ||
|
|
b1b0b5e26f | ||
|
|
5f9959cb6a | ||
|
|
d0d165e336 | ||
|
|
673fac74ae | ||
|
|
849a03fcf4 | ||
|
|
43b89a87c3 | ||
|
|
2b462d89ac | ||
|
|
7f02e46de6 | ||
|
|
6ea3a5d455 | ||
|
|
6fd3021383 | ||
|
|
75ffa9f160 | ||
|
|
ae776da105 | ||
|
|
add60686df | ||
|
|
318c4d4e32 | ||
|
|
e93a97fc87 | ||
|
|
758b75177d | ||
|
|
045bea67fd | ||
|
|
d78f3e282e | ||
|
|
f6400c0959 | ||
|
|
9507ed70ae | ||
|
|
358d670381 | ||
|
|
76ee3df50c | ||
|
|
d37950ff50 | ||
|
|
a31ba917d3 | ||
|
|
72cf8919f4 | ||
|
|
a533e6f79e | ||
|
|
e8755c4945 | ||
|
|
e661aff94e | ||
|
|
11af650b54 | ||
|
|
7bdf727629 | ||
|
|
804d8b6a74 | ||
|
|
4699ab09d6 | ||
|
|
a7ec286d93 | ||
|
|
10b1eb2d72 | ||
|
|
f9b23c4cbf | ||
|
|
8a360f6c9d | ||
|
|
b3f041a340 | ||
|
|
f1ccc4dde2 | ||
|
|
42d216f822 | ||
|
|
9e65ef69a5 | ||
|
|
36cdd5f3ff | ||
|
|
d0f31fb261 | ||
|
|
f8e3cddf0a | ||
|
|
4604325dfc | ||
|
|
34ed215e04 | ||
|
|
fa5c5eeb7d | ||
|
|
3317bd174a | ||
|
|
04958e3f9b | ||
|
|
92ff2b7272 | ||
|
|
58150531b4 | ||
|
|
0869043d48 | ||
|
|
c8e259b919 | ||
|
|
c74d723da4 | ||
|
|
d3fb5163a2 | ||
|
|
4ce3a9d36f | ||
|
|
e629278774 | ||
|
|
22d56d374f | ||
|
|
587635d6b6 | ||
|
|
551965e5db | ||
|
|
1e111acc39 | ||
|
|
c461ca32b7 | ||
|
|
a0bac4e516 | ||
|
|
8e4140b79c | ||
|
|
7f3448f68f | ||
|
|
0ee3a71577 | ||
|
|
b1e2b1e3bf | ||
|
|
2ade79cfe2 | ||
|
|
f57fa35533 | ||
|
|
c89366eb3e | ||
|
|
204c694be1 | ||
|
|
b148ba5407 | ||
|
|
9090496ade | ||
|
|
1d66a32348 | ||
|
|
d8a4df2f50 | ||
|
|
daca085785 | ||
|
|
992e77fb04 | ||
|
|
fbe8d4409c | ||
|
|
4743655549 | ||
|
|
08b55a8c92 | ||
|
|
358a7fceee | ||
|
|
6f907b6f81 | ||
|
|
be52de925f | ||
|
|
d7072a40f3 | ||
|
|
7d36c6511d | ||
|
|
9d9d6d8619 | ||
|
|
239695399c | ||
|
|
c1b3007458 | ||
|
|
731717a2fe | ||
|
|
c92d888b06 | ||
|
|
3722e59eaa | ||
|
|
7341a8a72f | ||
|
|
d87745cb1f | ||
|
|
26fe20452e | ||
|
|
fa18c05f79 | ||
|
|
a48dbb8e4c | ||
|
|
e317dd137f | ||
|
|
8946cfe8c2 | ||
|
|
4a01af29d0 | ||
|
|
c14766db45 | ||
|
|
e885f1dd15 | ||
|
|
bab75062ce | ||
|
|
49443b5f2c | ||
|
|
895a74da95 | ||
|
|
446b07e818 | ||
|
|
7fbc9919c2 | ||
|
|
6320f9759f | ||
|
|
72b6ef5cdc | ||
|
|
024577fbad | ||
|
|
6e8bb30a03 |
132
mozilla/build/mac/IDE_Options.h
Normal file
132
mozilla/build/mac/IDE_Options.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
/*
|
||||
|
||||
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 warn_emptydecl on
|
||||
#pragma warn_unusedvar on
|
||||
#pragma warn_extracomma on
|
||||
#pragma warn_illpragma on
|
||||
#pragma warn_possunwant on
|
||||
#pragma warn_unusedarg off /* turned off to reduce warnings */
|
||||
|
||||
#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
|
||||
#pragma wchar_type on
|
||||
#pragma RTTI 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 profile off /* Turn this on to profile the application. */
|
||||
/* Look for more details about profiling in nsMacMessagePump.cpp. */
|
||||
#pragma traceback on
|
||||
#pragma global_optimizer off
|
||||
#pragma scheduling off
|
||||
#pragma peephole off
|
||||
#pragma optimize_for_size off
|
||||
#else
|
||||
|
||||
#if TARGET_CARBON
|
||||
#pragma traceback on /* should always be ON for Carbon builds */
|
||||
#else
|
||||
#pragma traceback off /* leave on until the final release, so MacsBug logs are interpretable */
|
||||
#endif
|
||||
|
||||
#pragma global_optimizer on
|
||||
#pragma optimization_level 4
|
||||
#pragma scheduling 603
|
||||
#pragma peephole on
|
||||
#pragma optimize_for_size on
|
||||
|
||||
#pragma opt_strength_reduction on
|
||||
#pragma opt_propagation on
|
||||
#pragma opt_loop_invariants on
|
||||
#pragma opt_lifetimes on
|
||||
#pragma opt_dead_code on
|
||||
#pragma opt_dead_assignments on
|
||||
#pragma opt_common_subs 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
|
||||
5
mozilla/build/mac/MANIFEST
Normal file
5
mozilla/build/mac/MANIFEST
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
IDE_Options.h
|
||||
59
mozilla/build/mac/NSCrossProductDefines.h
Normal file
59
mozilla/build/mac/NSCrossProductDefines.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#error "DonÕt use me!"
|
||||
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#define XP_MAC 1
|
||||
#define NSPR20 1
|
||||
#define _NO_FAST_STRING_INLINES_ 1
|
||||
#define HAVE_BOOLEAN 1
|
||||
#define NETSCAPE 1
|
||||
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
|
||||
|
||||
#define OJI 1
|
||||
|
||||
/*
|
||||
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
BIN
mozilla/build/mac/RunTSScript
Normal file
Binary file not shown.
80
mozilla/build/mac/build_scripts/BuildMozilla.pl
Normal file
80
mozilla/build/mac/build_scripts/BuildMozilla.pl
Normal file
@@ -0,0 +1,80 @@
|
||||
#!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);
|
||||
80
mozilla/build/mac/build_scripts/BuildMozillaDebug.pl
Normal file
80
mozilla/build/mac/build_scripts/BuildMozillaDebug.pl
Normal file
@@ -0,0 +1,80 @@
|
||||
#!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);
|
||||
595
mozilla/build/mac/build_scripts/Moz/BuildCore.pm
Normal file
595
mozilla/build/mac/build_scripts/Moz/BuildCore.pm
Normal file
@@ -0,0 +1,595 @@
|
||||
#!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;
|
||||
425
mozilla/build/mac/build_scripts/Moz/BuildFlags.pm
Normal file
425
mozilla/build/mac/build_scripts/Moz/BuildFlags.pm
Normal file
@@ -0,0 +1,425 @@
|
||||
#!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;
|
||||
786
mozilla/build/mac/build_scripts/Moz/BuildUtils.pm
Normal file
786
mozilla/build/mac/build_scripts/Moz/BuildUtils.pm
Normal file
@@ -0,0 +1,786 @@
|
||||
|
||||
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;
|
||||
|
||||
660
mozilla/build/mac/build_scripts/Moz/CodeWarriorLib.pm
Normal file
660
mozilla/build/mac/build_scripts/Moz/CodeWarriorLib.pm
Normal file
@@ -0,0 +1,660 @@
|
||||
#!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
|
||||
576
mozilla/build/mac/build_scripts/Moz/Jar.pm
Normal file
576
mozilla/build/mac/build_scripts/Moz/Jar.pm
Normal file
@@ -0,0 +1,576 @@
|
||||
#!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;
|
||||
|
||||
if (index($manifest_subdir, "-unix") == -1 && index($manifest_subdir, "-win") == -1) {
|
||||
|
||||
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;
|
||||
228
mozilla/build/mac/build_scripts/Moz/MacCVS.pm
Normal file
228
mozilla/build/mac/build_scripts/Moz/MacCVS.pm
Normal file
@@ -0,0 +1,228 @@
|
||||
#!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__
|
||||
603
mozilla/build/mac/build_scripts/Moz/Moz.pm
Normal file
603
mozilla/build/mac/build_scripts/Moz/Moz.pm
Normal file
@@ -0,0 +1,603 @@
|
||||
=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
|
||||
272
mozilla/build/mac/build_scripts/Moz/Prefs.pm
Normal file
272
mozilla/build/mac/build_scripts/Moz/Prefs.pm
Normal file
@@ -0,0 +1,272 @@
|
||||
|
||||
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;
|
||||
932
mozilla/build/mac/build_scripts/Moz/ProjectXML.pm
Normal file
932
mozilla/build/mac/build_scripts/Moz/ProjectXML.pm
Normal file
@@ -0,0 +1,932 @@
|
||||
#!/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;
|
||||
|
||||
90
mozilla/build/mac/build_scripts/MozillaBuildFlags.txt
Normal file
90
mozilla/build/mac/build_scripts/MozillaBuildFlags.txt
Normal file
@@ -0,0 +1,90 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# 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"
|
||||
2536
mozilla/build/mac/build_scripts/MozillaBuildList.pm
Normal file
2536
mozilla/build/mac/build_scripts/MozillaBuildList.pm
Normal file
File diff suppressed because it is too large
Load Diff
22
mozilla/build/mac/build_scripts/MozillaCheckoutList.txt
Normal file
22
mozilla/build/mac/build_scripts/MozillaCheckoutList.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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_02_RELEASE
|
||||
mozilla/security/nss, NETSCAPE_7_02_RELEASE
|
||||
mozilla/security/manager, NETSCAPE_7_02_RELEASE
|
||||
mozilla/accessible, NETSCAPE_7_02_RELEASE
|
||||
mozilla/directory/c-sdk, NETSCAPE_7_02_RELEASE
|
||||
mozilla/lib/mac/Instrumentation, NETSCAPE_7_02_RELEASE
|
||||
mozilla/gfx2, NETSCAPE_7_02_RELEASE
|
||||
mozilla/modules/libpr0n, NETSCAPE_7_02_RELEASE
|
||||
SeaMonkeyAll, NETSCAPE_7_02_RELEASE
|
||||
|
||||
## 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
|
||||
79
mozilla/build/mac/build_scripts/PullMozilla.pl
Normal file
79
mozilla/build/mac/build_scripts/PullMozilla.pl
Normal file
@@ -0,0 +1,79 @@
|
||||
#!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);
|
||||
4
mozilla/build/mac/test/README
Normal file
4
mozilla/build/mac/test/README
Normal file
@@ -0,0 +1,4 @@
|
||||
This directory is merely here to test the project editor server. It will go away after
|
||||
it is validated. For more information, see http://camelot.
|
||||
|
||||
Testing watchers.
|
||||
BIN
mozilla/build/mac/test/scriptmenu
Normal file
BIN
mozilla/build/mac/test/scriptmenu
Normal file
Binary file not shown.
BIN
mozilla/build/mac/test/test.mcp
Normal file
BIN
mozilla/build/mac/test/test.mcp
Normal file
Binary file not shown.
1
mozilla/build/mac/test/test1.cpp
Normal file
1
mozilla/build/mac/test/test1.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// test1.cpp
|
||||
1
mozilla/build/mac/test/test2.cpp
Normal file
1
mozilla/build/mac/test/test2.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// test2.cpp
|
||||
BIN
mozilla/build/mac/test/test2.mcp
Normal file
BIN
mozilla/build/mac/test/test2.mcp
Normal file
Binary file not shown.
1
mozilla/build/mac/test/test3.cpp
Normal file
1
mozilla/build/mac/test/test3.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// test2.cpp
|
||||
BIN
mozilla/build/mac/test/test3.mcp
Normal file
BIN
mozilla/build/mac/test/test3.mcp
Normal file
Binary file not shown.
BIN
mozilla/build/mac/test/test4.mcp
Normal file
BIN
mozilla/build/mac/test/test4.mcp
Normal file
Binary file not shown.
4
mozilla/build/mac/test/test5.cpp
Normal file
4
mozilla/build/mac/test/test5.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// test2.cpp
|
||||
|
||||
as
|
||||
dfasdf
|
||||
12
mozilla/build/mac/tools/BuildSystemInfo/BuildSystemInfo.cpp
Normal file
12
mozilla/build/mac/tools/BuildSystemInfo/BuildSystemInfo.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ConditionalMacros.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* file = fopen("BuildSystemInfo.pm", "w");
|
||||
if (file != NULL) {
|
||||
fprintf(file, "$UNIVERSAL_INTERFACES_VERSION=0x%04X;\n", UNIVERSAL_INTERFACES_VERSION);
|
||||
fclose(file);
|
||||
}
|
||||
}
|
||||
BIN
mozilla/build/mac/tools/BuildSystemInfo/BuildSystemInfo.mcp
Normal file
BIN
mozilla/build/mac/tools/BuildSystemInfo/BuildSystemInfo.mcp
Normal file
Binary file not shown.
650
mozilla/client.mk
Normal file
650
mozilla/client.mk
Normal file
@@ -0,0 +1,650 @@
|
||||
# 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_02_RELEASE
|
||||
NSPR_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
PSM_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
NSS_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
LDAPCSDK_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
ACCESSIBLE_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
GFX2_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
IMGLIB2_CO_TAG = NETSCAPE_7_02_RELEASE
|
||||
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
|
||||
@@ -1,135 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
|
||||
]>
|
||||
|
||||
|
||||
<!-- Coding standards for this document
|
||||
|
||||
* Other than the GFDL, please use the "section" tag instead of "sect1",
|
||||
"sect2", etc.
|
||||
* Use Entities to include files for new chapters in Bugzilla-Guide.xml.
|
||||
* Try to use Entities for frequently-used passages of text as well.
|
||||
* Ensure all documents compile cleanly to HTML after modification.
|
||||
The warning, "DTDDECL catalog types not supported" is normal.
|
||||
* Try to index important terms wherever possible.
|
||||
* Use "glossterm" whenever you introduce a new term.
|
||||
* Follow coding standards at http://www.tldp.org, and
|
||||
check out the KDE guidelines (they are nice, too)
|
||||
http://i18n.kde.org/doc/markup.html
|
||||
* All tags should be lowercase.
|
||||
* Please use sensible spacing. The comments at the very end of each
|
||||
file define reasonable defaults for PSGML mode in EMACS.
|
||||
* Double-indent tags, use double spacing whenever possible, and
|
||||
try to avoid clutter and feel free to waste space in the code to make it
|
||||
more readable.
|
||||
|
||||
-->
|
||||
|
||||
<book id="index">
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
<bookinfo>
|
||||
<title>The Bugzilla Guide - &bz-ver;
|
||||
<!-- BZ-DEVEL -->Development <!-- /BZ-DEVEL -->
|
||||
Release</title>
|
||||
|
||||
<authorgroup>
|
||||
<corpauthor>The Bugzilla Team</corpauthor>
|
||||
</authorgroup>
|
||||
|
||||
<pubdate>&bz-date;</pubdate>
|
||||
|
||||
<abstract>
|
||||
<para>
|
||||
This is the documentation for Bugzilla, a
|
||||
bug-tracking system from mozilla.org.
|
||||
Bugzilla is an enterprise-class piece of software
|
||||
that tracks millions of bugs and issues for hundreds of
|
||||
organizations around the world.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The most current version of this document can always be found on the
|
||||
<ulink url="http://www.bugzilla.org/docs/">Bugzilla
|
||||
Documentation Page</ulink>.
|
||||
</para>
|
||||
|
||||
</abstract>
|
||||
|
||||
<keywordset>
|
||||
<keyword>Bugzilla</keyword>
|
||||
<keyword>Guide</keyword>
|
||||
<keyword>installation</keyword>
|
||||
<keyword>FAQ</keyword>
|
||||
<keyword>administration</keyword>
|
||||
<keyword>integration</keyword>
|
||||
<keyword>MySQL</keyword>
|
||||
<keyword>Mozilla</keyword>
|
||||
<keyword>webtools</keyword>
|
||||
</keywordset>
|
||||
</bookinfo>
|
||||
|
||||
<!-- About This Guide -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="about.xml" />
|
||||
|
||||
<!-- Installing Bugzilla -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installation.xml" />
|
||||
|
||||
<!-- Administering Bugzilla -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="administration.xml" />
|
||||
|
||||
<!-- Securing Bugzilla -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="security.xml" />
|
||||
|
||||
<!-- Customizing Bugzilla -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="customization.xml" />
|
||||
|
||||
<!-- Using Bugzilla -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="using.xml" />
|
||||
|
||||
<!-- Appendix: Troubleshooting -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="troubleshooting.xml" />
|
||||
|
||||
<!-- Appendix: Custom Patches -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patches.xml" />
|
||||
|
||||
<!-- Appendix: Manually Installing Perl Modules -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules.xml" />
|
||||
|
||||
<!-- Appendix: GNU Free Documentation License -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gfdl.xml" />
|
||||
|
||||
<!-- Glossary -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glossary.xml" />
|
||||
|
||||
<!-- Index -->
|
||||
<!--xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="index.xml" /-->
|
||||
|
||||
</book>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<!-- $Id: about.xml,v 1.26.4.1 2008-07-13 16:44:28 mozilla%colinogilvie.co.uk Exp $ -->
|
||||
|
||||
<chapter id="about">
|
||||
<title>About This Guide</title>
|
||||
|
||||
<section id="copyright">
|
||||
<title>Copyright Information</title>
|
||||
|
||||
<para>This document is copyright (c) 2000-¤t-year; by the various
|
||||
Bugzilla contributors who wrote it.</para>
|
||||
|
||||
<blockquote>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation
|
||||
License, Version 1.1 or any later version published by the
|
||||
Free Software Foundation; with no Invariant Sections, no
|
||||
Front-Cover Texts, and with no Back-Cover Texts. A copy of
|
||||
the license is included in <xref linkend="gfdl"/>.
|
||||
</para>
|
||||
</blockquote>
|
||||
<para>
|
||||
If you have any questions regarding this document, its
|
||||
copyright, or publishing this document in non-electronic form,
|
||||
please contact the Bugzilla Team.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="disclaimer">
|
||||
<title>Disclaimer</title>
|
||||
<para>
|
||||
No liability for the contents of this document can be accepted.
|
||||
Follow the instructions herein at your own risk.
|
||||
This document may contain errors
|
||||
and inaccuracies that may damage your system, cause your partner
|
||||
to leave you, your boss to fire you, your cats to
|
||||
pee on your furniture and clothing, and global thermonuclear
|
||||
war. Proceed with caution.
|
||||
</para>
|
||||
<para>
|
||||
Naming of particular products or brands should not be seen as
|
||||
endorsements, with the exception of the term "GNU/Linux". We
|
||||
wholeheartedly endorse the use of GNU/Linux; it is an extremely
|
||||
versatile, stable,
|
||||
and robust operating system that offers an ideal operating
|
||||
environment for Bugzilla.
|
||||
</para>
|
||||
<para>
|
||||
Although the Bugzilla development team has taken great care to
|
||||
ensure that all exploitable bugs have been fixed, security holes surely
|
||||
exist in any piece of code. Great care should be taken both in
|
||||
the installation and usage of this software. The Bugzilla development
|
||||
team members assume no liability for your use of Bugzilla. You have
|
||||
the source code, and are responsible for auditing it yourself to ensure
|
||||
your security needs are met.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- Section 2: New Versions -->
|
||||
|
||||
<section id="newversions">
|
||||
<title>New Versions</title>
|
||||
<para>
|
||||
This is the &bz-ver; version of The Bugzilla Guide. It is so named
|
||||
to match the current version of Bugzilla.
|
||||
<!-- BZ-DEVEL --> This version of the guide, like its associated Bugzilla version, is a
|
||||
development version.<!-- /BZ-DEVEL -->
|
||||
</para>
|
||||
<para>
|
||||
The latest version of this guide can always be found at <ulink
|
||||
url="http://www.bugzilla.org"/>, or checked out via CVS by
|
||||
following the <ulink url="http://www.mozilla.org/cvs.html">Mozilla
|
||||
CVS</ulink> instructions and check out the
|
||||
<filename>mozilla/webtools/bugzilla/docs/</filename>
|
||||
subtree. However, you should read the version
|
||||
which came with the Bugzilla release you are using.
|
||||
</para>
|
||||
<para>
|
||||
The Bugzilla Guide, or a section of it, is also available in
|
||||
the following languages:
|
||||
<ulink url="http://www.traduc.org/docs/guides/lecture/bugzilla/">French</ulink>,
|
||||
<ulink url="http://bugzilla-de.sourceforge.net/docs/html/">German</ulink>,
|
||||
<ulink url="http://www.bugzilla.jp/docs/2.18/">Japanese</ulink>.
|
||||
Note that these may be outdated or not up to date.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition, there are Bugzilla template localization projects in
|
||||
the following languages. They may have translated documentation
|
||||
available:
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-ar/">Arabic</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-be/">Belarusian</ulink>,
|
||||
<ulink url="http://openfmi.net/projects/mozilla-bg/">Bulgarian</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-br/">Brazilian Portuguese</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-cn/">Chinese</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-fr/">French</ulink>,
|
||||
<ulink url="http://germzilla.ganderbay.net/">German</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-it/">Italian</ulink>,
|
||||
<ulink url="http://www.bugzilla.jp/about/jp.html">Japanese</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-kr/">Korean</ulink>,
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-ru/">Russian</ulink> and
|
||||
<ulink url="http://sourceforge.net/projects/bugzilla-es/">Spanish</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you would like to volunteer to translate the Guide into additional
|
||||
languages, please contact
|
||||
<ulink url="mailto:justdave@bugzilla.org">Dave Miller</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="credits">
|
||||
<title>Credits</title>
|
||||
<para>
|
||||
The people listed below have made enormous contributions to the
|
||||
creation of this Guide, through their writing, dedicated hacking efforts,
|
||||
numerous e-mail and IRC support sessions, and overall excellent
|
||||
contribution to the Bugzilla community:
|
||||
</para>
|
||||
|
||||
<!-- TODO: This is evil... there has to be a valid way to get this look -->
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Matthew P. Barnson <email>mbarnson@sisna.com</email></term>
|
||||
<listitem>
|
||||
<para>for the Herculean task of pulling together the Bugzilla Guide
|
||||
and shepherding it to 2.14.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Terry Weissman <email>terry@mozilla.org</email></term>
|
||||
<listitem>
|
||||
<para>for initially writing Bugzilla and creating the README upon
|
||||
which the UNIX installation documentation is largely based.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Tara Hernandez <email>tara@tequilarists.org</email></term>
|
||||
<listitem>
|
||||
<para>for keeping Bugzilla development going strong after Terry left
|
||||
mozilla.org and for running landfill.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Dave Lawrence <email>dkl@redhat.com</email></term>
|
||||
<listitem>
|
||||
<para>for providing insight into the key differences between Red
|
||||
Hat's customized Bugzilla.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Dawn Endico <email>endico@mozilla.org</email></term>
|
||||
<listitem>
|
||||
<para>for being a hacker extraordinaire and putting up with Matthew's
|
||||
incessant questions and arguments on irc.mozilla.org in #mozwebtools
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Jacob Steenhagen <email>jake@bugzilla.org</email></term>
|
||||
<listitem>
|
||||
<para>for taking over documentation during the 2.17 development
|
||||
period.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>Dave Miller <email>justdave@bugzilla.org</email></term>
|
||||
<listitem>
|
||||
<para>for taking over as project lead when Tara stepped down and
|
||||
continually pushing for the documentation to be the best it can be.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
|
||||
<para>
|
||||
Thanks also go to the following people for significant contributions
|
||||
to this documentation:
|
||||
<simplelist type="inline">
|
||||
<member>Kevin Brannen</member>
|
||||
<member>Vlad Dascalu</member>
|
||||
<member>Ben FrantzDale</member>
|
||||
<member>Eric Hanson</member>
|
||||
<member>Zach Lipton</member>
|
||||
<member>Gervase Markham</member>
|
||||
<member>Andrew Pearson</member>
|
||||
<member>Joe Robins</member>
|
||||
<member>Spencer Smith</member>
|
||||
<member>Ron Teitelbaum</member>
|
||||
<member>Shane Travis</member>
|
||||
<member>Martin Wulffeld</member>
|
||||
</simplelist>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also, thanks are due to the members of the
|
||||
<ulink url="news://news.mozilla.org/mozilla.support.bugzilla">
|
||||
mozilla.support.bugzilla</ulink>
|
||||
newsgroup (and its predecessor, netscape.public.mozilla.webtools).
|
||||
Without your discussions, insight, suggestions, and patches,
|
||||
this could never have happened.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- conventions used here (didn't want to give it a chapter of its own) -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="conventions.xml" />
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End: -->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,168 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<section id="conventions">
|
||||
<title>Document Conventions</title>
|
||||
|
||||
<indexterm zone="conventions">
|
||||
<primary>conventions</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>This document uses the following conventions:</para>
|
||||
|
||||
<informaltable frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Descriptions</entry>
|
||||
|
||||
<entry>Appearance</entry>
|
||||
</row>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Caution</entry>
|
||||
|
||||
<entry>
|
||||
<caution>
|
||||
<para>Don't run with scissors!</para>
|
||||
</caution>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Hint or Tip</entry>
|
||||
|
||||
<entry>
|
||||
<tip>
|
||||
<para>For best results... </para>
|
||||
</tip>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Note</entry>
|
||||
|
||||
<entry>
|
||||
<note>
|
||||
<para>Dear John...</para>
|
||||
</note>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Warning</entry>
|
||||
|
||||
<entry>
|
||||
<warning>
|
||||
<para>Read this or the cat gets it.</para>
|
||||
</warning>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>File or directory name</entry>
|
||||
|
||||
<entry>
|
||||
<filename>filename</filename>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Command to be typed</entry>
|
||||
|
||||
<entry>
|
||||
<command>command</command>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Application name</entry>
|
||||
|
||||
<entry>
|
||||
<application>application</application>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>
|
||||
Normal user's prompt under bash shell</entry>
|
||||
|
||||
<entry>bash$</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>
|
||||
Root user's prompt under bash shell</entry>
|
||||
|
||||
<entry>bash#</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>
|
||||
Normal user's prompt under tcsh shell</entry>
|
||||
|
||||
<entry>tcsh$</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Environment variables</entry>
|
||||
|
||||
<entry>
|
||||
<envar>VARIABLE</envar>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Term found in the glossary</entry>
|
||||
|
||||
<entry>
|
||||
<glossterm linkend="gloss-bugzilla">Bugzilla</glossterm>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Code example</entry>
|
||||
|
||||
<entry>
|
||||
<programlisting><sgmltag class="starttag">para</sgmltag>
|
||||
Beginning and end of paragraph
|
||||
<sgmltag class="endtag">para</sgmltag></programlisting>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
<para>
|
||||
This documentation is maintained in DocBook 4.1.2 XML format.
|
||||
Changes are best submitted as plain text or XML diffs, attached
|
||||
to a bug filed in the &bzg-bugs; component.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,821 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<chapter id="customization">
|
||||
<title>Customizing Bugzilla</title>
|
||||
|
||||
<section id="cust-skins">
|
||||
<title>Custom Skins</title>
|
||||
|
||||
<para>
|
||||
Bugzilla allows you to have multiple skins. These are custom CSS and possibly
|
||||
also custom images for Bugzilla. To create a new custom skin, you have two
|
||||
choices:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Make a single CSS file, and put it in the
|
||||
<filename>skins/contrib</filename> directory.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Make a directory that contains all the same CSS file
|
||||
names as <filename>skins/standard/</filename>, and put
|
||||
your directory in <filename>skins/contrib/</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After you put the file or the directory there, make sure to run checksetup.pl
|
||||
so that it can reset the file permissions correctly.
|
||||
</para>
|
||||
<para>
|
||||
After you have installed the new skin, it will show up as an option in the
|
||||
user's General Preferences. If you would like to force a particular skin on all
|
||||
users, just select it in the Default Preferences and then uncheck "Enabled" on
|
||||
the preference.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="cust-templates">
|
||||
<title>Template Customization</title>
|
||||
|
||||
<para>
|
||||
Administrators can configure the look and feel of Bugzilla without
|
||||
having to edit Perl files or face the nightmare of massive merge
|
||||
conflicts when they upgrade to a newer version in the future.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Templatization also makes localized versions of Bugzilla possible,
|
||||
for the first time. It's possible to have Bugzilla's UI language
|
||||
determined by the user's browser. More information is available in
|
||||
<xref linkend="template-http-accept"/>.
|
||||
</para>
|
||||
|
||||
<section id="template-directory">
|
||||
<title>Template Directory Structure</title>
|
||||
<para>
|
||||
The template directory structure starts with top level directory
|
||||
named <filename>template</filename>, which contains a directory
|
||||
for each installed localization. The next level defines the
|
||||
language used in the templates. Bugzilla comes with English
|
||||
templates, so the directory name is <filename>en</filename>,
|
||||
and we will discuss <filename>template/en</filename> throughout
|
||||
the documentation. Below <filename>template/en</filename> is the
|
||||
<filename>default</filename> directory, which contains all the
|
||||
standard templates shipped with Bugzilla.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
A directory <filename>data/templates</filename> also exists;
|
||||
this is where Template Toolkit puts the compiled versions of
|
||||
the templates from either the default or custom directories.
|
||||
<emphasis>Do not</emphasis> directly edit the files in this
|
||||
directory, or all your changes will be lost the next time
|
||||
Template Toolkit recompiles the templates.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section id="template-method">
|
||||
<title>Choosing a Customization Method</title>
|
||||
<para>
|
||||
If you want to edit Bugzilla's templates, the first decision
|
||||
you must make is how you want to go about doing so. There are two
|
||||
choices, and which you use depends mainly on the scope of your
|
||||
modifications, and the method you plan to use to upgrade Bugzilla.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The first method of making customizations is to directly edit the
|
||||
templates found in <filename>template/en/default</filename>.
|
||||
This is probably the best way to go about it if you are going to
|
||||
be upgrading Bugzilla through CVS, because if you then execute
|
||||
a <command>cvs update</command>, any changes you have made will
|
||||
be merged automagically with the updated versions.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
If you use this method, and CVS conflicts occur during an
|
||||
update, the conflicted templates (and possibly other parts
|
||||
of your installation) will not work until they are resolved.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
The second method is to copy the templates to be modified
|
||||
into a mirrored directory structure under
|
||||
<filename>template/en/custom</filename>. Templates in this
|
||||
directory structure automatically override any identically-named
|
||||
and identically-located templates in the
|
||||
<filename>default</filename> directory.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
The <filename>custom</filename> directory does not exist
|
||||
at first and must be created if you want to use it.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
The second method of customization should be used if you
|
||||
use the overwriting method of upgrade, because otherwise
|
||||
your changes will be lost. This method may also be better if
|
||||
you are using the CVS method of upgrading and are going to make major
|
||||
changes, because it is guaranteed that the contents of this directory
|
||||
will not be touched during an upgrade, and you can then decide whether
|
||||
to continue using your own templates, or make the effort to merge your
|
||||
changes into the new versions by hand.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Using this method, your installation may break if incompatible
|
||||
changes are made to the template interface. Such changes should
|
||||
be documented in the release notes, provided you are using a
|
||||
stable release of Bugzilla. If you use using unstable code, you will
|
||||
need to deal with this one yourself, although if possible the changes
|
||||
will be mentioned before they occur in the deprecations section of the
|
||||
previous stable release's release notes.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Regardless of which method you choose, it is recommended that
|
||||
you run <command>./checksetup.pl</command> after creating or
|
||||
editing any templates in the <filename>template/en/default</filename>
|
||||
directory, and after editing any templates in the
|
||||
<filename>custom</filename> directory.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
It is <emphasis>required</emphasis> that you run
|
||||
<command>./checksetup.pl</command> after creating a new
|
||||
template in the <filename>custom</filename> directory. Failure
|
||||
to do so will raise an incomprehensible error message.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section id="template-edit">
|
||||
<title>How To Edit Templates</title>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
If you are making template changes that you intend on submitting back
|
||||
for inclusion in standard Bugzilla, you should read the relevant
|
||||
sections of the
|
||||
<ulink url="http://www.bugzilla.org/docs/developer.html">Developers'
|
||||
Guide</ulink>.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
The syntax of the Template Toolkit language is beyond the scope of
|
||||
this guide. It's reasonably easy to pick up by looking at the current
|
||||
templates; or, you can read the manual, available on the
|
||||
<ulink url="http://www.template-toolkit.org">Template Toolkit home
|
||||
page</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One thing you should take particular care about is the need
|
||||
to properly HTML filter data that has been passed into the template.
|
||||
This means that if the data can possibly contain special HTML characters
|
||||
such as <, and the data was not intended to be HTML, they need to be
|
||||
converted to entity form, i.e. &lt;. You use the 'html' filter in the
|
||||
Template Toolkit to do this. If you forget, you may open up
|
||||
your installation to cross-site scripting attacks.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also note that Bugzilla adds a few filters of its own, that are not
|
||||
in standard Template Toolkit. In particular, the 'url_quote' filter
|
||||
can convert characters that are illegal or have special meaning in URLs,
|
||||
such as &, to the encoded form, i.e. %26. This actually encodes most
|
||||
characters (but not the common ones such as letters and numbers and so
|
||||
on), including the HTML-special characters, so there's never a need to
|
||||
HTML filter afterwards.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Editing templates is a good way of doing a <quote>poor man's custom
|
||||
fields</quote>.
|
||||
For example, if you don't use the Status Whiteboard, but want to have
|
||||
a free-form text entry box for <quote>Build Identifier</quote>,
|
||||
then you can just
|
||||
edit the templates to change the field labels. It's still be called
|
||||
status_whiteboard internally, but your users don't need to know that.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section id="template-formats">
|
||||
<title>Template Formats and Types</title>
|
||||
|
||||
<para>
|
||||
Some CGI's have the ability to use more than one template. For example,
|
||||
<filename>buglist.cgi</filename> can output itself as RDF, or as two
|
||||
formats of HTML (complex and simple). The mechanism that provides this
|
||||
feature is extensible.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Bugzilla can support different types of output, which again can have
|
||||
multiple formats. In order to request a certain type, you can append
|
||||
the &ctype=<contenttype> (such as rdf or html) to the
|
||||
<filename><cginame>.cgi</filename> URL. If you would like to
|
||||
retrieve a certain format, you can use the &format=<format>
|
||||
(such as simple or complex) in the URL.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To see if a CGI supports multiple output formats and types, grep the
|
||||
CGI for <quote>get_format</quote>. If it's not present, adding
|
||||
multiple format/type support isn't too hard - see how it's done in
|
||||
other CGIs, e.g. config.cgi.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To make a new format template for a CGI which supports this,
|
||||
open a current template for
|
||||
that CGI and take note of the INTERFACE comment (if present.) This
|
||||
comment defines what variables are passed into this template. If
|
||||
there isn't one, I'm afraid you'll have to read the template and
|
||||
the code to find out what information you get.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Write your template in whatever markup or text style is appropriate.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You now need to decide what content type you want your template
|
||||
served as. The content types are defined in the
|
||||
<filename>Bugzilla/Constants.pm</filename> file in the
|
||||
<filename>contenttypes</filename>
|
||||
constant. If your content type is not there, add it. Remember
|
||||
the three- or four-letter tag assigned to your content type.
|
||||
This tag will be part of the template filename.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
After adding or changing a content type, it's suitable to edit
|
||||
<filename>Bugzilla/Constants.pm</filename> in order to reflect
|
||||
the changes. Also, the file should be kept up to date after an
|
||||
upgrade if content types have been customized in the past.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Save the template as <filename><stubname>-<formatname>.<contenttypetag>.tmpl</filename>.
|
||||
Try out the template by calling the CGI as
|
||||
<filename><cginame>.cgi?format=<formatname>&ctype=<type></filename> .
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="template-specific">
|
||||
<title>Particular Templates</title>
|
||||
|
||||
<para>
|
||||
There are a few templates you may be particularly interested in
|
||||
customizing for your installation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>index.html.tmpl</command>:
|
||||
This is the Bugzilla front page.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>global/header.html.tmpl</command>:
|
||||
This defines the header that goes on all Bugzilla pages.
|
||||
The header includes the banner, which is what appears to users
|
||||
and is probably what you want to edit instead. However the
|
||||
header also includes the HTML HEAD section, so you could for
|
||||
example add a stylesheet or META tag by editing the header.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>global/banner.html.tmpl</command>:
|
||||
This contains the <quote>banner</quote>, the part of the header
|
||||
that appears
|
||||
at the top of all Bugzilla pages. The default banner is reasonably
|
||||
barren, so you'll probably want to customize this to give your
|
||||
installation a distinctive look and feel. It is recommended you
|
||||
preserve the Bugzilla version number in some form so the version
|
||||
you are running can be determined, and users know what docs to read.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>global/footer.html.tmpl</command>:
|
||||
This defines the footer that goes on all Bugzilla pages. Editing
|
||||
this is another way to quickly get a distinctive look and feel for
|
||||
your Bugzilla installation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>global/variables.none.tmpl</command>:
|
||||
This defines a list of terms that may be changed in order to
|
||||
<quote>brand</quote> the Bugzilla instance In this way, terms
|
||||
like <quote>bugs</quote> can be replaced with <quote>issues</quote>
|
||||
across the whole Bugzilla installation. The name
|
||||
<quote>Bugzilla</quote> and other words can be customized as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>list/table.html.tmpl</command>:
|
||||
This template controls the appearance of the bug lists created
|
||||
by Bugzilla. Editing this template allows per-column control of
|
||||
the width and title of a column, the maximum display length of
|
||||
each entry, and the wrap behaviour of long entries.
|
||||
For long bug lists, Bugzilla inserts a 'break' every 100 bugs by
|
||||
default; this behaviour is also controlled by this template, and
|
||||
that value can be modified here.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>bug/create/user-message.html.tmpl</command>:
|
||||
This is a message that appears near the top of the bug reporting page.
|
||||
By modifying this, you can tell your users how they should report
|
||||
bugs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>bug/process/midair.html.tmpl</command>:
|
||||
This is the page used if two people submit simultaneous changes to the
|
||||
same bug. The second person to submit their changes will get this page
|
||||
to tell them what the first person did, and ask if they wish to
|
||||
overwrite those changes or go back and revisit the bug. The default
|
||||
title and header on this page read "Mid-air collision detected!" If
|
||||
you work in the aviation industry, or other environment where this
|
||||
might be found offensive (yes, we have true stories of this happening)
|
||||
you'll want to change this to something more appropriate for your
|
||||
environment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>bug/create/create.html.tmpl</command> and
|
||||
<command>bug/create/comment.txt.tmpl</command>:
|
||||
You may not wish to go to the effort of creating custom fields in
|
||||
Bugzilla, yet you want to make sure that each bug report contains
|
||||
a number of pieces of important information for which there is not
|
||||
a special field. The bug entry system has been designed in an
|
||||
extensible fashion to enable you to add arbitrary HTML widgets,
|
||||
such as drop-down lists or textboxes, to the bug entry page
|
||||
and have their values appear formatted in the initial comment.
|
||||
A hidden field that indicates the format should be added inside
|
||||
the form in order to make the template functional. Its value should
|
||||
be the suffix of the template filename. For example, if the file
|
||||
is called <filename>create-cust.html.tmpl</filename>, then
|
||||
<programlisting><input type="hidden" name="format" value="cust"></programlisting>
|
||||
should be used inside the form.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
An example of this is the mozilla.org
|
||||
<ulink url="http://landfill.bugzilla.org/bugzilla-tip/enter_bug.cgi?product=WorldControl&format=guided">guided
|
||||
bug submission form</ulink>. The code for this comes with the Bugzilla
|
||||
distribution as an example for you to copy. It can be found in the
|
||||
files
|
||||
<filename>create-guided.html.tmpl</filename> and
|
||||
<filename>comment-guided.html.tmpl</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
So to use this feature, create a custom template for
|
||||
<filename>enter_bug.cgi</filename>. The default template, on which you
|
||||
could base it, is
|
||||
<filename>custom/bug/create/create.html.tmpl</filename>.
|
||||
Call it <filename>create-<formatname>.html.tmpl</filename>, and
|
||||
in it, add widgets for each piece of information you'd like
|
||||
collected - such as a build number, or set of steps to reproduce.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Then, create a template like
|
||||
<filename>custom/bug/create/comment.txt.tmpl</filename>, and call it
|
||||
<filename>comment-<formatname>.txt.tmpl</filename>. This
|
||||
template should reference the form fields you have created using
|
||||
the syntax <filename>[% form.<fieldname> %]</filename>. When a
|
||||
bug report is
|
||||
submitted, the initial comment attached to the bug report will be
|
||||
formatted according to the layout of this template.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, if your custom enter_bug template had a field
|
||||
<programlisting><input type="text" name="buildid" size="30"></programlisting>
|
||||
and then your comment.txt.tmpl had
|
||||
<programlisting>BuildID: [% form.buildid %]</programlisting>
|
||||
then something like
|
||||
<programlisting>BuildID: 20020303</programlisting>
|
||||
would appear in the initial comment.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="template-http-accept">
|
||||
<title>Configuring Bugzilla to Detect the User's Language</title>
|
||||
|
||||
<para>Bugzilla honours the user's Accept: HTTP header. You can install
|
||||
templates in other languages, and Bugzilla will pick the most appropriate
|
||||
according to a priority order defined by you. Many
|
||||
language templates can be obtained from <ulink
|
||||
url="http://www.bugzilla.org/download.html#localizations"/>. Instructions
|
||||
for submitting new languages are also available from that location.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="cust-hooks">
|
||||
<title>The Bugzilla Extension Mechanism</title>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
Note that the below paths are inconsistent and confusing. They will
|
||||
likely be changed in Bugzilla 4.0.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<para>
|
||||
Extensions are a way for extensions to Bugzilla to insert code
|
||||
into the standard Bugzilla templates and source files
|
||||
without modifying these files themselves. The extension mechanism
|
||||
defines a consistent API for extending the standard templates and source files
|
||||
in a way that cleanly separates standard code from extension code.
|
||||
Hooks reduce merge conflicts and make it easier to write extensions that work
|
||||
across multiple versions of Bugzilla, making upgrading a Bugzilla installation
|
||||
with installed extensions easier. Furthermore, they make it easy to install
|
||||
and remove extensions as each extension is nothing more than a
|
||||
simple directory structure.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are two main types of hooks: code hooks and template hooks. Code
|
||||
hooks allow extensions to invoke code at specific points in various
|
||||
source files, while template hooks allow extensions to add elements to
|
||||
the Bugzilla user interface.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A hook is just a named place in a standard source or template file
|
||||
where extension source code or template files for that hook get processed.
|
||||
Each extension has a corresponding directory in the Bugzilla directory
|
||||
tree (<filename>BUGZILLA_ROOT/extensions/extension_name</filename>). Hooking
|
||||
an extension source file or template to a hook is as simple as putting
|
||||
the extension file into extension's template or code directory.
|
||||
When Bugzilla processes the source file or template and reaches the hook,
|
||||
it will process all extension files in the hook's directory.
|
||||
The hooks themselves can be added into any source file or standard template
|
||||
upon request by extension authors.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use hooks to extend Bugzilla, first make sure there is
|
||||
a hook at the appropriate place within the source file or template you
|
||||
want to extend. The exact appearance of a hook depends on if the hook
|
||||
is a code hook or a template hook.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Code hooks appear in Bugzilla source files as a single method call
|
||||
in the format <literal role="code">Bugzilla::Hook->process("<varname>name</varname>");</literal>.
|
||||
For instance, <filename>enter_bug.cgi</filename> may invoke the hook
|
||||
"<varname>enter_bug-entrydefaultvars</varname>". Thus, a source file at
|
||||
<filename>BUGZILLA_ROOT/extensions/EXTENSION_NAME/code/enter_bug-entrydefaultvars.pl</filename>
|
||||
will be automatically invoked when the code hook is reached.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Template hooks appear in the standard Bugzilla templates as a
|
||||
single directive in the format
|
||||
<literal role="code">[% Hook.process("<varname>name</varname>") %]</literal>,
|
||||
where <varname>name</varname> is the unique name of the hook.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you aren't sure what you want to extend or just want to browse the
|
||||
available hooks, either use your favorite multi-file search
|
||||
tool (e.g. <command>grep</command>) to search the standard templates
|
||||
for occurrences of <methodname>Hook.process</methodname> or the source
|
||||
files for occurrences of <methodname>Bugzilla::Hook::process</methodname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If there is no hook at the appropriate place within the Bugzilla
|
||||
source file or template you want to extend,
|
||||
<ulink url="http://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&component=User%20Interface">file
|
||||
a bug requesting one</ulink>, specifying:
|
||||
</para>
|
||||
|
||||
<simplelist>
|
||||
<member>the source or template file for which you are
|
||||
requesting a hook;</member>
|
||||
<member>
|
||||
where in the file you would like the hook to be placed
|
||||
(line number/position for latest version of the file in CVS
|
||||
or description of location);
|
||||
</member>
|
||||
<member>the purpose of the hook;</member>
|
||||
<member>a link to information about your extension, if any.</member>
|
||||
</simplelist>
|
||||
|
||||
<para>
|
||||
The Bugzilla reviewers will promptly review each hook request,
|
||||
name the hook, add it to the template or source file, and check
|
||||
the new version of the template into CVS.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may optionally attach a patch to the bug which implements the hook
|
||||
and check it in yourself after receiving approval from a Bugzilla
|
||||
reviewer. The developers may suggest changes to the location of the
|
||||
hook based on their analysis of your needs or so the hook can satisfy
|
||||
the needs of multiple extensions, but the process of getting hooks
|
||||
approved and checked in is not as stringent as the process for general
|
||||
changes to Bugzilla, and any extension, whether released or still in
|
||||
development, can have hooks added to meet their needs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After making sure the hook you need exists (or getting it added if not),
|
||||
add your extension to the directory within the Bugzilla
|
||||
extensions tree corresponding to the hook.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
That's it! Now, when the source file or template containing the hook
|
||||
is processed, your extension file will be processed at the point
|
||||
where the hook appears.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, let's say you have an extension named Projman that adds
|
||||
project management capabilities to Bugzilla. Projman has an
|
||||
administration interface <filename>edit-projects.cgi</filename>,
|
||||
and you want to add a link to it into the navigation bar at the bottom
|
||||
of every Bugzilla page for those users who are authorized
|
||||
to administer projects.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The navigation bar is generated by the template file
|
||||
<filename>useful-links.html.tmpl</filename>, which is located in
|
||||
the <filename>global/</filename> subdirectory on the standard Bugzilla
|
||||
template path
|
||||
<filename>BUGZILLA_ROOT/template/en/default/</filename>.
|
||||
Looking in <filename>useful-links.html.tmpl</filename>, you find
|
||||
the following hook at the end of the list of standard Bugzilla
|
||||
administration links:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[...
|
||||
[% ', <a href="editkeywords.cgi">keywords</a>'
|
||||
IF user.groups.editkeywords %]
|
||||
[% Hook.process("edit") %]
|
||||
...]]></programlisting>
|
||||
|
||||
<para>
|
||||
The corresponding extension file for this hook is
|
||||
<filename>BUGZILLA_ROOT/extensions/projman/template/en/global/useful-links-edit.html.tmpl</filename>.
|
||||
You then create that template file and add the following constant:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[...[% ', <a href="edit-projects.cgi">projects</a>' IF user.groups.projman_admins %]]]></programlisting>
|
||||
|
||||
<para>
|
||||
Voila! The link now appears after the other administration links in the
|
||||
navigation bar for users in the <literal>projman_admins</literal> group.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now, let us say your extension adds a custom "project_manager" field
|
||||
to enter_bug.cgi. You want to modify the CGI script to set the default
|
||||
project manager to be productname@company.com. Looking at
|
||||
<filename>enter_bug.cgi</filename>, you see the enter_bug-entrydefaultvars
|
||||
hook near the bottom of the file before the default form values are set.
|
||||
The corresponding extension source file for this hook is located at
|
||||
<filename>BUGZILLA_ROOT/extensions/projman/code/enter_bug-entrydefaultvars.pl</filename>.
|
||||
You then create that file and add the following:
|
||||
</para>
|
||||
|
||||
<programlisting>$default{'project_manager'} = $product.'@company.com';</programlisting>
|
||||
|
||||
<para>
|
||||
This code will be invoked whenever enter_bug.cgi is executed.
|
||||
Assuming that the rest of the customization was completed (e.g. the
|
||||
custom field was added to the enter_bug template and the required hooks
|
||||
were used in process_bug.cgi), the new field will now have this
|
||||
default value.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Notes:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
If your extension includes entirely new templates in addition to
|
||||
extensions of standard templates, it should store those new
|
||||
templates in its
|
||||
<filename>BUGZILLA_ROOT/extensions/template/en/</filename>
|
||||
directory. Extension template directories, like the
|
||||
<filename>default/</filename> and <filename>custom/</filename>
|
||||
directories, are part of the template search path, so putting templates
|
||||
there enables them to be found by the template processor.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The template processor looks for templates first in the
|
||||
<filename>custom/</filename> directory (i.e. templates added by the
|
||||
specific installation), then in the <filename>extensions/</filename>
|
||||
directory (i.e. templates added by extensions), and finally in the
|
||||
<filename>default/</filename> directory (i.e. the standard Bugzilla
|
||||
templates). Thus, installation-specific templates override both
|
||||
default and extension templates.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
If you are looking to customize Bugzilla, you can also take advantage
|
||||
of template hooks. To do so, create a directory in
|
||||
<filename>BUGZILLA_ROOT/template/en/custom/hook/</filename>
|
||||
that corresponds to the hook you wish to use, then place your
|
||||
customization templates into those directories. For example,
|
||||
if you wanted to use the hook "end" in
|
||||
<filename>global/useful-links.html.tmpl</filename>, you would
|
||||
create the directory <filename>BUGZILLA_ROOT/template/en/custom/hook/
|
||||
global/useful-links.html.tmpl/end/</filename> and add your customization
|
||||
template to this directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Obviously this method of customizing Bugzilla only lets you add code
|
||||
to the standard source files and templates; you cannot change the
|
||||
existing code. Nevertheless, for those customizations that only add
|
||||
code, this method can reduce conflicts when merging changes,
|
||||
making upgrading your customized Bugzilla installation easier.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
<section id="cust-change-permissions">
|
||||
<title>Customizing Who Can Change What</title>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
This feature should be considered experimental; the Bugzilla code you
|
||||
will be changing is not stable, and could change or move between
|
||||
versions. Be aware that if you make modifications as outlined here,
|
||||
you may have
|
||||
to re-make them or port them if Bugzilla changes internally between
|
||||
versions, and you upgrade.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<para>
|
||||
Companies often have rules about which employees, or classes of employees,
|
||||
are allowed to change certain things in the bug system. For example,
|
||||
only the bug's designated QA Contact may be allowed to VERIFY the bug.
|
||||
Bugzilla has been
|
||||
designed to make it easy for you to write your own custom rules to define
|
||||
who is allowed to make what sorts of value transition.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, assignees, QA owners and users
|
||||
with <emphasis>editbugs</emphasis> privileges can edit all fields of bugs,
|
||||
except group restrictions (unless they are members of the groups they
|
||||
are trying to change). Bug reporters also have the ability to edit some
|
||||
fields, but in a more restrictive manner. Other users, without
|
||||
<emphasis>editbugs</emphasis> privileges, can not edit
|
||||
bugs, except to comment and add themselves to the CC list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For maximum flexibility, customizing this means editing Bugzilla's Perl
|
||||
code. This gives the administrator complete control over exactly who is
|
||||
allowed to do what. The relevant method is called
|
||||
<filename>check_can_change_field()</filename>,
|
||||
and is found in <filename>Bug.pm</filename> in your
|
||||
Bugzilla/ directory. If you open that file and search for
|
||||
<quote>sub check_can_change_field</quote>, you'll find it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This function has been carefully commented to allow you to see exactly
|
||||
how it works, and give you an idea of how to make changes to it.
|
||||
Certain marked sections should not be changed - these are
|
||||
the <quote>plumbing</quote> which makes the rest of the function work.
|
||||
In between those sections, you'll find snippets of code like:
|
||||
<programlisting> # Allow the assignee to change anything.
|
||||
if ($ownerid eq $whoid) {
|
||||
return 1;
|
||||
}</programlisting>
|
||||
It's fairly obvious what this piece of code does.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
So, how does one go about changing this function? Well, simple changes
|
||||
can be made just by removing pieces - for example, if you wanted to
|
||||
prevent any user adding a comment to a bug, just remove the lines marked
|
||||
<quote>Allow anyone to change comments.</quote> If you don't want the
|
||||
Reporter to have any special rights on bugs they have filed, just
|
||||
remove the entire section that deals with the Reporter.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
More complex customizations are not much harder. Basically, you add
|
||||
a check in the right place in the function, i.e. after all the variables
|
||||
you are using have been set up. So, don't look at $ownerid before
|
||||
$ownerid has been obtained from the database. You can either add a
|
||||
positive check, which returns 1 (allow) if certain conditions are true,
|
||||
or a negative check, which returns 0 (deny.) E.g.:
|
||||
<programlisting> if ($field eq "qacontact") {
|
||||
if (Bugzilla->user->groups("quality_assurance")) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}</programlisting>
|
||||
This says that only users in the group "quality_assurance" can change
|
||||
the QA Contact field of a bug.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Getting more weird:
|
||||
<programlisting><![CDATA[ if (($field eq "priority") &&
|
||||
(Bugzilla->user->email =~ /.*\@example\.com$/))
|
||||
{
|
||||
if ($oldvalue eq "P1") {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}]]></programlisting>
|
||||
This says that if the user is trying to change the priority field,
|
||||
and their email address is @example.com, they can only do so if the
|
||||
old value of the field was "P1". Not very useful, but illustrative.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
If you are modifying <filename>process_bug.cgi</filename> in any
|
||||
way, do not change the code that is bounded by DO_NOT_CHANGE blocks.
|
||||
Doing so could compromise security, or cause your installation to
|
||||
stop working entirely.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<para>
|
||||
For a list of possible field names, look at the bugs table in the
|
||||
database. If you need help writing custom rules for your organization,
|
||||
ask in the newsgroup.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- Integrating Bugzilla with Third-Party Tools -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="integration.xml" />
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,449 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<appendix id="gfdl">
|
||||
<title>GNU Free Documentation License</title>
|
||||
|
||||
<!-- - GNU Project - Free Software Foundation (FSF) -->
|
||||
<!-- LINK REV="made" HREF="mailto:webmasters@gnu.org" -->
|
||||
<!-- section>
|
||||
<title>GNU Free Documentation License</title -->
|
||||
<para>Version 1.1, March 2000</para>
|
||||
|
||||
<blockquote>
|
||||
<para>Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place,
|
||||
Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and
|
||||
distribute verbatim copies of this license document, but changing it is
|
||||
not allowed.</para>
|
||||
</blockquote>
|
||||
|
||||
<section label="0" id="gfdl-0">
|
||||
<title>Preamble</title>
|
||||
|
||||
<para>The purpose of this License is to make a manual, textbook, or other
|
||||
written document "free" in the sense of freedom: to assure everyone the
|
||||
effective freedom to copy and redistribute it, with or without modifying
|
||||
it, either commercially or noncommercially. Secondarily, this License
|
||||
preserves for the author and publisher a way to get credit for their
|
||||
work, while not being considered responsible for modifications made by
|
||||
others.</para>
|
||||
|
||||
<para>This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft license
|
||||
designed for free software.</para>
|
||||
|
||||
<para>We have designed this License in order to use it for manuals for
|
||||
free software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals; it
|
||||
can be used for any textual work, regardless of subject matter or whether
|
||||
it is published as a printed book. We recommend this License principally
|
||||
for works whose purpose is instruction or reference.</para>
|
||||
</section>
|
||||
|
||||
<section label="1" id="gfdl-1">
|
||||
<title>Applicability and Definition</title>
|
||||
|
||||
<para>This License applies to any manual or other work that contains a
|
||||
notice placed by the copyright holder saying it can be distributed under
|
||||
the terms of this License. The "Document", below, refers to any such
|
||||
manual or work. Any member of the public is a licensee, and is addressed
|
||||
as "you".</para>
|
||||
|
||||
<para>A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.</para>
|
||||
|
||||
<para>A "Secondary Section" is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (For example, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical connection
|
||||
with the subject or with related matters, or of legal, commercial,
|
||||
philosophical, ethical or political position regarding them.</para>
|
||||
|
||||
<para>The "Invariant Sections" are certain Secondary Sections whose
|
||||
titles are designated, as being those of Invariant Sections, in the
|
||||
notice that says that the Document is released under this License.</para>
|
||||
|
||||
<para>The "Cover Texts" are certain short passages of text that are
|
||||
listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says
|
||||
that the Document is released under this License.</para>
|
||||
|
||||
<para>A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the general
|
||||
public, whose contents can be viewed and edited directly and
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or for
|
||||
automatic translation to a variety of formats suitable for input to text
|
||||
formatters. A copy made in an otherwise Transparent file format whose
|
||||
markup has been designed to thwart or discourage subsequent modification
|
||||
by readers is not Transparent. A copy that is not "Transparent" is called
|
||||
"Opaque".</para>
|
||||
|
||||
<para>Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML or
|
||||
XML using a publicly available DTD, and standard-conforming simple HTML
|
||||
designed for human modification. Opaque formats include PostScript, PDF,
|
||||
proprietary formats that can be read and edited only by proprietary word
|
||||
processors, SGML or XML for which the DTD and/or processing tools are not
|
||||
generally available, and the machine-generated HTML produced by some word
|
||||
processors for output purposes only.</para>
|
||||
|
||||
<para>The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in formats
|
||||
which do not have any title page as such, "Title Page" means the text
|
||||
near the most prominent appearance of the work's title, preceding the
|
||||
beginning of the body of the text.</para>
|
||||
</section>
|
||||
|
||||
<section label="2" id="gfdl-2">
|
||||
<title>Verbatim Copying</title>
|
||||
|
||||
<para>You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies to
|
||||
the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use technical
|
||||
measures to obstruct or control the reading or further copying of the
|
||||
copies you make or distribute. However, you may accept compensation in
|
||||
exchange for copies. If you distribute a large enough number of copies
|
||||
you must also follow the conditions in section 3.</para>
|
||||
|
||||
<para>You may also lend copies, under the same conditions stated above,
|
||||
and you may publicly display copies.</para>
|
||||
</section>
|
||||
|
||||
<section label="3" id="gfdl-3">
|
||||
<title>Copying in Quantity</title>
|
||||
|
||||
<para>If you publish printed copies of the Document numbering more than
|
||||
100, and the Document's license notice requires Cover Texts, you must
|
||||
enclose the copies in covers that carry, clearly and legibly, all these
|
||||
Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts
|
||||
on the back cover. Both covers must also clearly and legibly identify you
|
||||
as the publisher of these copies. The front cover must present the full
|
||||
title with all words of the title equally prominent and visible. You may
|
||||
add other material on the covers in addition. Copying with changes
|
||||
limited to the covers, as long as they preserve the title of the Document
|
||||
and satisfy these conditions, can be treated as verbatim copying in other
|
||||
respects.</para>
|
||||
|
||||
<para>If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit reasonably)
|
||||
on the actual cover, and continue the rest onto adjacent pages.</para>
|
||||
|
||||
<para>If you publish or distribute Opaque copies of the Document
|
||||
numbering more than 100, you must either include a machine-readable
|
||||
Transparent copy along with each Opaque copy, or state in or with each
|
||||
Opaque copy a publicly-accessible computer-network location containing a
|
||||
complete Transparent copy of the Document, free of added material, which
|
||||
the general network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the latter
|
||||
option, you must take reasonably prudent steps, when you begin
|
||||
distribution of Opaque copies in quantity, to ensure that this
|
||||
Transparent copy will remain thus accessible at the stated location until
|
||||
at least one year after the last time you distribute an Opaque copy
|
||||
(directly or through your agents or retailers) of that edition to the
|
||||
public.</para>
|
||||
|
||||
<para>It is requested, but not required, that you contact the authors of
|
||||
the Document well before redistributing any large number of copies, to
|
||||
give them a chance to provide you with an updated version of the
|
||||
Document.</para>
|
||||
</section>
|
||||
|
||||
<section label="4" id="gfdl-4">
|
||||
<title>Modifications</title>
|
||||
|
||||
<para>You may copy and distribute a Modified Version of the Document
|
||||
under the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution and
|
||||
modification of the Modified Version to whoever possesses a copy of it.
|
||||
In addition, you must do these things in the Modified Version:</para>
|
||||
|
||||
<orderedlist numeration="upperalpha">
|
||||
<listitem>
|
||||
<para>Use in the Title Page (and on the covers, if any) a title
|
||||
distinct from that of the Document, and from those of previous
|
||||
versions (which should, if there were any, be listed in the History
|
||||
section of the Document). You may use the same title as a previous
|
||||
version if the original publisher of that version gives
|
||||
permission.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>List on the Title Page, as authors, one or more persons or
|
||||
entities responsible for authorship of the modifications in the
|
||||
Modified Version, together with at least five of the principal
|
||||
authors of the Document (all of its principal authors, if it has less
|
||||
than five).</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Preserve all the copyright notices of the Document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Include, immediately after the copyright notices, a license
|
||||
notice giving the public permission to use the Modified Version under
|
||||
the terms of this License, in the form shown in the Addendum
|
||||
below.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Preserve in that license notice the full lists of Invariant
|
||||
Sections and required Cover Texts given in the Document's license
|
||||
notice.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Include an unaltered copy of this License.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Preserve the section entitled "History", and its title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section entitled "History" in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Preserve the network location, if any, given in the Document
|
||||
for public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions it
|
||||
was based on. These may be placed in the "History" section. You may
|
||||
omit a network location for a work that was published at least four
|
||||
years before the Document itself, or if the original publisher of the
|
||||
version it refers to gives permission.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In any section entitled "Acknowledgements" or "Dedications",
|
||||
preserve the section's title, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Preserve all the Invariant Sections of the Document, unaltered
|
||||
in their text and in their titles. Section numbers or the equivalent
|
||||
are not considered part of the section titles.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Delete any section entitled "Endorsements". Such a section may
|
||||
not be included in the Modified Version.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Do not retitle any existing section as "Endorsements" or to
|
||||
conflict in title with any Invariant Section.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all of
|
||||
these sections as invariant. To do this, add their titles to the list of
|
||||
Invariant Sections in the Modified Version's license notice. These titles
|
||||
must be distinct from any other section titles.</para>
|
||||
|
||||
<para>You may add a section entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various parties--for
|
||||
example, statements of peer review or that the text has been approved by
|
||||
an organization as the authoritative definition of a standard.</para>
|
||||
|
||||
<para>You may add a passage of up to five words as a Front-Cover Text,
|
||||
and a passage of up to 25 words as a Back-Cover Text, to the end of the
|
||||
list of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or through
|
||||
arrangements made by) any one entity. If the Document already includes a
|
||||
cover text for the same cover, previously added by you or by arrangement
|
||||
made by the same entity you are acting on behalf of, you may not add
|
||||
another; but you may replace the old one, on explicit permission from the
|
||||
previous publisher that added the old one.</para>
|
||||
|
||||
<para>The author(s) and publisher(s) of the Document do not by this
|
||||
License give permission to use their names for publicity for or to assert
|
||||
or imply endorsement of any Modified Version.</para>
|
||||
</section>
|
||||
|
||||
<section label="5" id="gfdl-5">
|
||||
<title>Combining Documents</title>
|
||||
|
||||
<para>You may combine the Document with other documents released under
|
||||
this License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and list
|
||||
them all as Invariant Sections of your combined work in its license
|
||||
notice.</para>
|
||||
|
||||
<para>The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single copy.
|
||||
If there are multiple Invariant Sections with the same name but different
|
||||
contents, make the title of each such section unique by adding at the end
|
||||
of it, in parentheses, the name of the original author or publisher of
|
||||
that section if known, or else a unique number. Make the same adjustment
|
||||
to the section titles in the list of Invariant Sections in the license
|
||||
notice of the combined work.</para>
|
||||
|
||||
<para>In the combination, you must combine any sections entitled
|
||||
"History" in the various original documents, forming one section entitled
|
||||
"History"; likewise combine any sections entitled "Acknowledgements", and
|
||||
any sections entitled "Dedications". You must delete all sections
|
||||
entitled "Endorsements."</para>
|
||||
</section>
|
||||
|
||||
<section label="6" id="gfdl-6">
|
||||
<title>Collections of Documents</title>
|
||||
|
||||
<para>You may make a collection consisting of the Document and other
|
||||
documents released under this License, and replace the individual copies
|
||||
of this License in the various documents with a single copy that is
|
||||
included in the collection, provided that you follow the rules of this
|
||||
License for verbatim copying of each of the documents in all other
|
||||
respects.</para>
|
||||
|
||||
<para>You may extract a single document from such a collection, and
|
||||
distribute it individually under this License, provided you insert a copy
|
||||
of this License into the extracted document, and follow this License in
|
||||
all other respects regarding verbatim copying of that document.</para>
|
||||
</section>
|
||||
|
||||
<section label="7" id="gfdl-7">
|
||||
<title>Aggregation with Independent Works</title>
|
||||
|
||||
<para>A compilation of the Document or its derivatives with other
|
||||
separate and independent documents or works, in or on a volume of a
|
||||
storage or distribution medium, does not as a whole count as a Modified
|
||||
Version of the Document, provided no compilation copyright is claimed for
|
||||
the compilation. Such a compilation is called an "aggregate", and this
|
||||
License does not apply to the other self-contained works thus compiled
|
||||
with the Document, on account of their being thus compiled, if they are
|
||||
not themselves derivative works of the Document.</para>
|
||||
|
||||
<para>If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one quarter of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on covers
|
||||
that surround only the Document within the aggregate. Otherwise they must
|
||||
appear on covers around the whole aggregate.</para>
|
||||
</section>
|
||||
|
||||
<section label="8" id="gfdl-8">
|
||||
<title>Translation</title>
|
||||
|
||||
<para>Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include translations
|
||||
of some or all Invariant Sections in addition to the original versions of
|
||||
these Invariant Sections. You may include a translation of this License
|
||||
provided that you also include the original English version of this
|
||||
License. In case of a disagreement between the translation and the
|
||||
original English version of this License, the original English version
|
||||
will prevail.</para>
|
||||
</section>
|
||||
|
||||
<section label="9" id="gfdl-9">
|
||||
<title>Termination</title>
|
||||
|
||||
<para>You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However, parties
|
||||
who have received copies, or rights, from you under this License will not
|
||||
have their licenses terminated so long as such parties remain in full
|
||||
compliance.</para>
|
||||
</section>
|
||||
|
||||
<section label="10" id="gfdl-10">
|
||||
<title>Future Revisions of this License</title>
|
||||
|
||||
<para>The Free Software Foundation may publish new, revised versions of
|
||||
the GNU Free Documentation License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns. See
|
||||
<ulink url="http://www.gnu.org/copyleft/"/>.</para>
|
||||
|
||||
<para>Each version of the License is given a distinguishing version
|
||||
number. If the Document specifies that a particular numbered version of
|
||||
this License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or of
|
||||
any later version that has been published (not as a draft) by the Free
|
||||
Software Foundation. If the Document does not specify a version number of
|
||||
this License, you may choose any version ever published (not as a draft)
|
||||
by the Free Software Foundation.</para>
|
||||
</section>
|
||||
|
||||
<section label="" id="gfdl-howto">
|
||||
<title>How to use this License for your documents</title>
|
||||
|
||||
<para>To use this License in a document you have written, include a copy
|
||||
of the License in the document and put the following copyright and
|
||||
license notices just after the title page:</para>
|
||||
|
||||
<blockquote>
|
||||
<para>Copyright (c) YEAR YOUR NAME. Permission is granted to copy,
|
||||
distribute and/or modify this document under the terms of the GNU Free
|
||||
Documentation License, Version 1.1 or any later version published by
|
||||
the Free Software Foundation; with the Invariant Sections being LIST
|
||||
THEIR TITLES, with the Front-Cover Texts being LIST, and with the
|
||||
Back-Cover Texts being LIST. A copy of the license is included in the
|
||||
section entitled "GNU Free Documentation License".</para>
|
||||
</blockquote>
|
||||
|
||||
<para>If you have no Invariant Sections, write "with no Invariant
|
||||
Sections" instead of saying which ones are invariant. If you have no
|
||||
Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover
|
||||
Texts being LIST"; likewise for Back-Cover Texts.</para>
|
||||
|
||||
<para>If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of free
|
||||
software license, such as the GNU General Public License, to permit their
|
||||
use in free software.</para>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,555 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<glossary id="glossary">
|
||||
<glossdiv>
|
||||
<title>0-9, high ascii</title>
|
||||
|
||||
<glossentry id="gloss-htaccess">
|
||||
<glossterm>.htaccess</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>Apache web server, and other NCSA-compliant web servers,
|
||||
observe the convention of using files in directories called
|
||||
<filename>.htaccess</filename>
|
||||
|
||||
to restrict access to certain files. In Bugzilla, they are used
|
||||
to keep secret files which would otherwise
|
||||
compromise your installation - e.g. the
|
||||
<filename>localconfig</filename>
|
||||
file contains the password to your database.
|
||||
curious.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-a">
|
||||
<title>A</title>
|
||||
|
||||
<glossentry id="gloss-apache">
|
||||
<glossterm>Apache</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>In this context, Apache is the web server most commonly used
|
||||
for serving up Bugzilla
|
||||
pages. Contrary to popular belief, the apache web server has nothing
|
||||
to do with the ancient and noble Native American tribe, but instead
|
||||
derived its name from the fact that it was
|
||||
<quote>a patchy</quote>
|
||||
version of the original
|
||||
<acronym>NCSA</acronym>
|
||||
world-wide-web server.</para>
|
||||
|
||||
<variablelist>
|
||||
<title>Useful Directives when configuring Bugzilla</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><computeroutput><ulink url="http://httpd.apache.org/docs-2.0/mod/core.html#addhandler">AddHandler</ulink></computeroutput></term>
|
||||
<listitem>
|
||||
<para>Tell Apache that it's OK to run CGI scripts.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><computeroutput><ulink url="http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride">AllowOverride</ulink></computeroutput></term>
|
||||
<term><computeroutput><ulink url="http://httpd.apache.org/docs-2.0/mod/core.html#options">Options</ulink></computeroutput></term>
|
||||
<listitem>
|
||||
<para>These directives are used to tell Apache many things about
|
||||
the directory they apply to. For Bugzilla's purposes, we need
|
||||
them to allow script execution and <filename>.htaccess</filename>
|
||||
overrides.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><computeroutput><ulink url="http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex">DirectoryIndex</ulink></computeroutput></term>
|
||||
<listitem>
|
||||
<para>Used to tell Apache what files are indexes. If you can
|
||||
not add <filename>index.cgi</filename> to the list of valid files,
|
||||
you'll need to set <computeroutput>$index_html</computeroutput> to
|
||||
1 in <filename>localconfig</filename> so
|
||||
<command>./checksetup.pl</command> will create an
|
||||
<filename>index.html</filename> that redirects to
|
||||
<filename>index.cgi</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><computeroutput><ulink url="http://httpd.apache.org/docs-2.0/mod/core.html#scriptinterpretersource">ScriptInterpreterSource</ulink></computeroutput></term>
|
||||
<listitem>
|
||||
<para>Used when running Apache on windows so the shebang line
|
||||
doesn't have to be changed in every Bugzilla script.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>For more information about how to configure Apache for Bugzilla,
|
||||
see <xref linkend="http-apache"/>.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-b">
|
||||
<title>B</title>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>Bug</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>A
|
||||
<quote>bug</quote>
|
||||
|
||||
in Bugzilla refers to an issue entered into the database which has an
|
||||
associated number, assignments, comments, etc. Some also refer to a
|
||||
<quote>tickets</quote>
|
||||
or
|
||||
<quote>issues</quote>;
|
||||
in the context of Bugzilla, they are synonymous.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>Bug Number</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>Each Bugzilla bug is assigned a number that uniquely identifies
|
||||
that bug. The bug associated with a bug number can be pulled up via a
|
||||
query, or easily from the very front page by typing the number in the
|
||||
"Find" box.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-bugzilla">
|
||||
<glossterm>Bugzilla</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>Bugzilla is the world-leading free software bug tracking system.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-c">
|
||||
<title>C</title>
|
||||
|
||||
<glossentry id="gloss-cgi">
|
||||
<glossterm>Common Gateway Interface</glossterm>
|
||||
<acronym>CGI</acronym>
|
||||
<glossdef>
|
||||
<para><acronym>CGI</acronym> is an acronym for Common Gateway Interface. This is
|
||||
a standard for interfacing an external application with a web server. Bugzilla
|
||||
is an example of a <acronym>CGI</acronym> application.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-component">
|
||||
<glossterm>Component</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>A Component is a subsection of a Product. It should be a narrow
|
||||
category, tailored to your organization. All Products must contain at
|
||||
least one Component (and, as a matter of fact, creating a Product
|
||||
with no Components will create an error in Bugzilla).</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-cpan">
|
||||
<glossterm>Comprehensive Perl Archive Network</glossterm>
|
||||
<acronym>CPAN</acronym>
|
||||
|
||||
<!-- TODO: Rewrite def for CPAN -->
|
||||
<glossdef>
|
||||
<para>
|
||||
<acronym>CPAN</acronym>
|
||||
|
||||
stands for the
|
||||
<quote>Comprehensive Perl Archive Network</quote>.
|
||||
CPAN maintains a large number of extremely useful
|
||||
<glossterm>Perl</glossterm>
|
||||
modules - encapsulated chunks of code for performing a
|
||||
particular task.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-contrib">
|
||||
<glossterm><filename class="directory">contrib</filename></glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>The <filename class="directory">contrib</filename> directory is
|
||||
a location to put scripts that have been contributed to Bugzilla but
|
||||
are not a part of the official distribution. These scripts are written
|
||||
by third parties and may be in languages other than perl. For those
|
||||
that are in perl, there may be additional modules or other requirements
|
||||
than those of the official distribution.
|
||||
<note>
|
||||
<para>Scripts in the <filename class="directory">contrib</filename>
|
||||
directory are not officially supported by the Bugzilla team and may
|
||||
break in between versions.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-d">
|
||||
<title>D</title>
|
||||
|
||||
<glossentry id="gloss-daemon">
|
||||
<glossterm>daemon</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>A daemon is a computer program which runs in the background. In
|
||||
general, most daemons are started at boot time via System V init
|
||||
scripts, or through RC scripts on BSD-based systems.
|
||||
<glossterm>mysqld</glossterm>,
|
||||
the MySQL server, and
|
||||
<glossterm>apache</glossterm>,
|
||||
a web server, are generally run as daemons.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-dos">
|
||||
<glossterm>DOS Attack</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>A DOS, or Denial of Service attack, is when a user attempts to
|
||||
deny access to a web server by repeatedly accessing a page or sending
|
||||
malformed requests to a webserver. A D-DOS, or
|
||||
Distributed Denial of Service attack, is when these requests come
|
||||
from multiple sources at the same time. Unfortunately, these are much
|
||||
more difficult to defend against.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-g">
|
||||
<title>G</title>
|
||||
|
||||
<glossentry id="gloss-groups">
|
||||
<glossterm>Groups</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>The word
|
||||
<quote>Groups</quote>
|
||||
|
||||
has a very special meaning to Bugzilla. Bugzilla's main security
|
||||
mechanism comes by placing users in groups, and assigning those
|
||||
groups certain privileges to view bugs in particular
|
||||
<glossterm>Products</glossterm>
|
||||
in the
|
||||
<glossterm>Bugzilla</glossterm>
|
||||
database.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-j">
|
||||
<title>J</title>
|
||||
|
||||
<glossentry id="gloss-javascript">
|
||||
<glossterm>JavaScript</glossterm>
|
||||
<glossdef>
|
||||
<para>JavaScript is cool, we should talk about it.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-m">
|
||||
<title>M</title>
|
||||
|
||||
<glossentry id="gloss-mta">
|
||||
<glossterm>Message Transport Agent</glossterm>
|
||||
<acronym>MTA</acronym>
|
||||
|
||||
<glossdef>
|
||||
<para>A Message Transport Agent is used to control the flow of email on a system.
|
||||
The <ulink url="http://search.cpan.org/dist/Email-Send/lib/Email/Send.pm">Email::Send</ulink>
|
||||
Perl module, which Bugzilla uses to send email, can be configured to
|
||||
use many different underlying implementations for actually sending the
|
||||
mail using the <option>mail_delivery_method</option> parameter.
|
||||
Implementations other than <literal>sendmail</literal> require that the
|
||||
<option>sendmailnow</option> param be set to <literal>on</literal>.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-mysql">
|
||||
<glossterm>MySQL</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>MySQL is currently the required
|
||||
<glossterm linkend="gloss-rdbms">RDBMS</glossterm> for Bugzilla. MySQL
|
||||
can be downloaded from <ulink url="http://www.mysql.com"/>. While you
|
||||
should familiarize yourself with all of the documentation, some high
|
||||
points are:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><ulink url="http://www.mysql.com/doc/en/Backup.html">Backup</ulink></term>
|
||||
<listitem>
|
||||
<para>Methods for backing up your Bugzilla database.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><ulink url="http://www.mysql.com/doc/en/Option_files.html">Option Files</ulink></term>
|
||||
<listitem>
|
||||
<para>Information about how to configure MySQL using
|
||||
<filename>my.cnf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><ulink url="http://www.mysql.com/doc/en/Privilege_system.html">Privilege System</ulink></term>
|
||||
<listitem>
|
||||
<para>Much more detailed information about the suggestions in
|
||||
<xref linkend="security-mysql"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-p">
|
||||
<title>P</title>
|
||||
|
||||
<glossentry id="gloss-ppm">
|
||||
<glossterm>Perl Package Manager</glossterm>
|
||||
<acronym>PPM</acronym>
|
||||
|
||||
<glossdef>
|
||||
<para><ulink url="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/"/>
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm id="gloss-product">Product</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>A Product is a broad category of types of bugs, normally
|
||||
representing a single piece of software or entity. In general,
|
||||
there are several Components to a Product. A Product may define a
|
||||
group (used for security) for all bugs entered into
|
||||
its Components.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>Perl</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>First written by Larry Wall, Perl is a remarkable program
|
||||
language. It has the benefits of the flexibility of an interpreted
|
||||
scripting language (such as shell script), combined with the speed
|
||||
and power of a compiled language, such as C.
|
||||
<glossterm>Bugzilla</glossterm>
|
||||
|
||||
is maintained in Perl.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-q">
|
||||
<title>Q</title>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>QA</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>
|
||||
<quote>QA</quote>,
|
||||
<quote>Q/A</quote>, and
|
||||
<quote>Q.A.</quote>
|
||||
are short for
|
||||
<quote>Quality Assurance</quote>.
|
||||
In most large software development organizations, there is a team
|
||||
devoted to ensuring the product meets minimum standards before
|
||||
shipping. This team will also generally want to track the progress of
|
||||
bugs over their life cycle, thus the need for the
|
||||
<quote>QA Contact</quote>
|
||||
|
||||
field in a bug.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-r">
|
||||
<title>R</title>
|
||||
|
||||
<glossentry id="gloss-rdbms">
|
||||
<glossterm>Relational DataBase Management System</glossterm>
|
||||
<acronym>RDBMS</acronym>
|
||||
|
||||
<glossdef>
|
||||
<para>A relational database management system is a database system
|
||||
that stores information in tables that are related to each other.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-regexp">
|
||||
<glossterm>Regular Expression</glossterm>
|
||||
<acronym>regexp</acronym>
|
||||
|
||||
<glossdef>
|
||||
<para>A regular expression is an expression used for pattern matching.
|
||||
<ulink url="http://perldoc.com/perl5.6/pod/perlre.html#Regular-Expressions">Documentation</ulink>
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-s">
|
||||
<title>S</title>
|
||||
|
||||
<glossentry id="gloss-service">
|
||||
<glossterm>Service</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>In Windows NT environment, a boot-time background application
|
||||
is referred to as a service. These are generally managed through the
|
||||
control panel while logged in as an account with
|
||||
<quote>Administrator</quote> level capabilities. For more
|
||||
information, consult your Windows manual or the MSKB.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>
|
||||
<acronym>SGML</acronym>
|
||||
</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>
|
||||
<acronym>SGML</acronym>
|
||||
|
||||
stands for
|
||||
<quote>Standard Generalized Markup Language</quote>.
|
||||
Created in the 1980's to provide an extensible means to maintain
|
||||
documentation based upon content instead of presentation,
|
||||
<acronym>SGML</acronym>
|
||||
|
||||
has withstood the test of time as a robust, powerful language.
|
||||
<glossterm>
|
||||
<acronym>XML</acronym>
|
||||
</glossterm>
|
||||
|
||||
is the
|
||||
<quote>baby brother</quote>
|
||||
|
||||
of SGML; any valid
|
||||
<acronym>XML</acronym>
|
||||
|
||||
document it, by definition, a valid
|
||||
<acronym>SGML</acronym>
|
||||
|
||||
document. The document you are reading is written and maintained in
|
||||
<acronym>SGML</acronym>,
|
||||
and is also valid
|
||||
<acronym>XML</acronym>
|
||||
|
||||
if you modify the Document Type Definition.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-t">
|
||||
<title>T</title>
|
||||
|
||||
<glossentry id="gloss-target-milestone" xreflabel="Target Milestone">
|
||||
<glossterm>Target Milestone</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>Target Milestones are Product goals. They are configurable on a
|
||||
per-Product basis. Most software development houses have a concept of
|
||||
|
||||
<quote>milestones</quote>
|
||||
|
||||
where the people funding a project expect certain functionality on
|
||||
certain dates. Bugzilla facilitates meeting these milestones by
|
||||
giving you the ability to declare by which milestone a bug will be
|
||||
fixed, or an enhancement will be implemented.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry id="gloss-tcl">
|
||||
<glossterm>Tool Command Language</glossterm>
|
||||
<acronym>TCL</acronym>
|
||||
<glossdef>
|
||||
<para>TCL is an open source scripting language available for Windows,
|
||||
Macintosh, and Unix based systems. Bugzilla 1.0 was written in TCL but
|
||||
never released. The first release of Bugzilla was 2.0, which was when
|
||||
it was ported to perl.
|
||||
</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
|
||||
<glossdiv id="gloss-z">
|
||||
<title>Z</title>
|
||||
|
||||
<glossentry id="gloss-zarro">
|
||||
<glossterm>Zarro Boogs Found</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is just a goofy way of saying that there were no bugs
|
||||
found matching your query. When asked to explain this message,
|
||||
Terry had the following to say:
|
||||
</para>
|
||||
|
||||
<blockquote>
|
||||
<attribution>Terry Weissman</attribution>
|
||||
<para>I've been asked to explain this ... way back when, when
|
||||
Netscape released version 4.0 of its browser, we had a release
|
||||
party. Naturally, there had been a big push to try and fix every
|
||||
known bug before the release. Naturally, that hadn't actually
|
||||
happened. (This is not unique to Netscape or to 4.0; the same thing
|
||||
has happened with every software project I've ever seen.) Anyway,
|
||||
at the release party, T-shirts were handed out that said something
|
||||
like "Netscape 4.0: Zarro Boogs". Just like the software, the
|
||||
T-shirt had no known bugs. Uh-huh.
|
||||
</para>
|
||||
|
||||
<para>So, when you query for a list of bugs, and it gets no results,
|
||||
you can think of this as a friendly reminder. Of *course* there are
|
||||
bugs matching your query, they just aren't in the bugsystem yet...
|
||||
</para>
|
||||
</blockquote>
|
||||
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glossdiv>
|
||||
</glossary>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
@@ -1,21 +0,0 @@
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,124 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<!-- Keep these tools listings in alphabetical order please. -MPB -->
|
||||
<section id="integration">
|
||||
<title>Integrating Bugzilla with Third-Party Tools</title>
|
||||
|
||||
<section id="bonsai"
|
||||
xreflabel="Bonsai, the Mozilla automated CVS management system">
|
||||
<title>Bonsai</title>
|
||||
|
||||
<para>Bonsai is a web-based tool for managing
|
||||
<xref linkend="cvs" />
|
||||
|
||||
. Using Bonsai, administrators can control open/closed status of trees,
|
||||
query a fast relational database back-end for change, branch, and comment
|
||||
information, and view changes made since the last time the tree was
|
||||
closed. Bonsai
|
||||
also integrates with
|
||||
<xref linkend="tinderbox" />.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="cvs" xreflabel="CVS, the Concurrent Versioning System">
|
||||
<title>CVS</title>
|
||||
|
||||
<para>CVS integration is best accomplished, at this point, using the
|
||||
Bugzilla Email Gateway.</para>
|
||||
|
||||
<para>Follow the instructions in this Guide for enabling Bugzilla e-mail
|
||||
integration. Ensure that your check-in script sends an email to your
|
||||
Bugzilla e-mail gateway with the subject of
|
||||
<quote>[Bug XXXX]</quote>,
|
||||
and you can have CVS check-in comments append to your Bugzilla bug. If
|
||||
you want to have the bug be closed automatically, you'll have to modify
|
||||
the <filename>contrib/bugzilla_email_append.pl</filename> script.
|
||||
</para>
|
||||
|
||||
<para>There is also a CVSZilla project, based upon somewhat dated
|
||||
Bugzilla code, to integrate CVS and Bugzilla through CVS' ability to
|
||||
email. Check it out at: <ulink url="http://www.cvszilla.org/"/>.
|
||||
</para>
|
||||
|
||||
<para>Another system capable of CVS integration with Bugzilla is
|
||||
Scmbug. This system provides generic integration of Source code
|
||||
Configuration Management with Bugtracking. Check it out at: <ulink
|
||||
url="http://freshmeat.net/projects/scmbug/"/>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="scm"
|
||||
xreflabel="Perforce SCM (Fast Software Configuration Management System, a powerful commercial alternative to CVS">
|
||||
|
||||
<title>Perforce SCM</title>
|
||||
|
||||
<para>You can find the project page for Bugzilla and Teamtrack Perforce
|
||||
integration (p4dti) at:
|
||||
<ulink url="http://www.ravenbrook.com/project/p4dti/"/>
|
||||
|
||||
.
|
||||
<quote>p4dti</quote>
|
||||
|
||||
is now an officially supported product from Perforce, and you can find
|
||||
the "Perforce Public Depot" p4dti page at
|
||||
<ulink url="http://public.perforce.com/public/perforce/p4dti/index.html"/>
|
||||
|
||||
.</para>
|
||||
|
||||
<para>Integration of Perforce with Bugzilla, once patches are applied, is
|
||||
seamless. Perforce replication information will appear below the comments
|
||||
of each bug. Be certain you have a matching set of patches for the
|
||||
Bugzilla version you are installing. p4dti is designed to support
|
||||
multiple defect trackers, and maintains its own documentation for it.
|
||||
Please consult the pages linked above for further information.</para>
|
||||
</section>
|
||||
|
||||
<section id="svn"
|
||||
xreflabel="Subversion, a compelling replacement for CVS">
|
||||
<title>Subversion</title>
|
||||
<para>Subversion is a free/open-source version control system,
|
||||
designed to overcome various limitations of CVS. Integration of
|
||||
Subversion with Bugzilla is possible using Scmbug, a system
|
||||
providing generic integration of Source Code Configuration
|
||||
Management with Bugtracking. Scmbug is available at <ulink
|
||||
url="http://freshmeat.net/projects/scmbug/"/>.</para>
|
||||
</section>
|
||||
|
||||
<section id="tinderbox"
|
||||
xreflabel="Tinderbox, the Mozilla automated build management system">
|
||||
<title>Tinderbox/Tinderbox2</title>
|
||||
|
||||
<para>Tinderbox is a continuous-build system which can integrate with
|
||||
Bugzilla - see
|
||||
<ulink url="http://www.mozilla.org/projects/tinderbox"/> for details
|
||||
of Tinderbox, and
|
||||
<ulink url="http://tinderbox.mozilla.org/showbuilds.cgi"/> to see it
|
||||
in action.</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
<chapter id="introduction">
|
||||
<title>Introduction</title>
|
||||
|
||||
<section id="what-is-bugzilla">
|
||||
<title>What is Bugzilla?</title>
|
||||
|
||||
<para>
|
||||
Bugzilla is a bug- or issue-tracking system. Bug-tracking
|
||||
systems allow individual or groups of developers effectively to keep track
|
||||
of outstanding problems with their products.
|
||||
</para>
|
||||
|
||||
<para><emphasis>Do we need more here?</emphasis></para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="why-tracking">
|
||||
<title>Why use a bug-tracking system?</title>
|
||||
|
||||
<para>Those who do not use a bug-tracking system tend to rely on
|
||||
shared lists, email, spreadsheets and/or Post-It notes to monitor the
|
||||
status of defects. This procedure
|
||||
is usually error-prone and tends to cause those bugs judged least
|
||||
significant by developers to be dropped or ignored.</para>
|
||||
|
||||
<para>Integrated defect-tracking systems make sure that nothing gets
|
||||
swept under the carpet; they provide a method of creating, storing,
|
||||
arranging and processing defect reports and enhancement requests.</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="why-bugzilla">
|
||||
<title>Why use Bugzilla?</title>
|
||||
|
||||
<para>Bugzilla is the leading open-source/free software bug tracking
|
||||
system. It boasts many advanced features, including:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Powerful searching</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>User-configurable email notifications of bug changes</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Full change history</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Inter-bug dependency tracking and graphing</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Excellent attachment management</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Integrated, product-based, granular security schema</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Fully security-audited, and runs under Perl's taint mode</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>A robust, stable RDBMS back-end</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Completely customizable and/or localizable web user
|
||||
interface</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Additional XML, email and console interfaces</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Extensive configurability</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Smooth upgrade pathway between versions</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>Bugzilla is very adaptable to various situations. Known uses
|
||||
currently include IT support queues, Systems Administration deployment
|
||||
management, chip design and development problem tracking (both
|
||||
pre-and-post fabrication), and software and hardware bug tracking for
|
||||
luminaries such as Redhat, NASA, Linux-Mandrake, and VA Systems.
|
||||
Combined with systems such as
|
||||
<ulink url="http://www.cvshome.org">CVS</ulink>,
|
||||
<ulink url="http://www.mozilla.org/bonsai.html">Bonsai</ulink>, or
|
||||
<ulink url="http://www.perforce.com">Perforce SCM</ulink>, Bugzilla
|
||||
provides a powerful, easy-to-use configuration management solution.</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
@@ -1,197 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<appendix id="install-perlmodules-manual">
|
||||
<title>Manual Installation of Perl Modules</title>
|
||||
|
||||
<section id="modules-manual-instructions">
|
||||
<title>Instructions</title>
|
||||
<para>
|
||||
If you need to install Perl modules manually, here's how it's done.
|
||||
Download the module using the link given in the next section, and then
|
||||
apply this magic incantation, as root:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen><prompt>bash#</prompt> tar -xzvf <module>.tar.gz
|
||||
<prompt>bash#</prompt> cd <module>
|
||||
<prompt>bash#</prompt> perl Makefile.PL
|
||||
<prompt>bash#</prompt> make
|
||||
<prompt>bash#</prompt> make test
|
||||
<prompt>bash#</prompt> make install</screen>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
In order to compile source code under Windows you will need to obtain
|
||||
a 'make' utility. The <command>nmake</command> utility provided with
|
||||
Microsoft Visual C++ may be used. As an alternative, there is a
|
||||
utility called <command>dmake</command> available from CPAN which is
|
||||
written entirely in Perl.
|
||||
</para>
|
||||
<para>
|
||||
As described in <xref linkend="modules-manual-download" />, however, most
|
||||
packages already exist and are available from ActiveState or theory58S.
|
||||
We highly recommend that you install them using the ppm GUI available with
|
||||
ActiveState and to add the theory58S repository to your list of repositories.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section id="modules-manual-download">
|
||||
<title>Download Locations</title>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Running Bugzilla on Windows requires the use of ActiveState
|
||||
Perl 5.8.1 or higher. Many modules already exist in the core
|
||||
distribution of ActiveState Perl. Additional modules can be downloaded
|
||||
from <ulink url="http://theoryx5.uwinnipeg.ca/ppms/" /> if you use
|
||||
Perl 5.8.x or from <ulink url="http://cpan.uwinnipeg.ca/PPMPackages/10xx/" />
|
||||
if you use Perl 5.10.x.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
CGI:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/CGI.pm/"/>
|
||||
Documentation: <ulink url="http://perldoc.perl.org/CGI.html"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Data-Dumper:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Data-Dumper/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/Data-Dumper/Dumper.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Date::Format (part of TimeDate):
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/TimeDate/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/TimeDate/lib/Date/Format.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
DBI:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBI/"/>
|
||||
Documentation: <ulink url="http://dbi.perl.org/docs/"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
DBD::mysql:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBD-mysql/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
DBD::Pg:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBD-Pg/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/DBD-Pg/Pg.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
File::Spec:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/File-Spec/"/>
|
||||
Documentation: <ulink url="http://perldoc.perl.org/File/Spec.html"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Template-Toolkit:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Template-Toolkit/"/>
|
||||
Documentation: <ulink url="http://www.template-toolkit.org/docs.html"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GD:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GD/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/GD/GD.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Template::Plugin::GD:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Template-GD/" />
|
||||
Documentation: <ulink url="http://www.template-toolkit.org/docs/aqua/Modules/index.html" />
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
MIME::Parser (part of MIME-tools):
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/MIME-tools/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="modules-manual-optional">
|
||||
<title>Optional Modules</title>
|
||||
|
||||
<para>
|
||||
Chart::Base:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Chart/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/Chart/Chart.pod"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GD::Graph:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GDGraph/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/GDGraph/Graph.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GD::Text::Align (part of GD::Text::Util):
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GDTextUtil/"/>
|
||||
Documentation: <ulink url="http://search.cpan.org/dist/GDTextUtil/Text/Align.pm"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
XML::Twig:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/XML-Twig/"/>
|
||||
Documentation: <ulink url="http://standards.ieee.org/resources/spasystem/twig/twig_stable.html"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
PatchReader:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/author/JKEISER/PatchReader/"/>
|
||||
Documentation: <ulink url="http://www.johnkeiser.com/mozilla/Patch_Viewer.html"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Image::Magick:
|
||||
<literallayout>
|
||||
CPAN Download Page: <ulink url="http://search.cpan.org/dist/PerlMagick/"/>
|
||||
Documentation: <ulink url="http://www.imagemagick.org/script/resources.php"/>
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
</appendix>
|
||||
@@ -1,135 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<appendix id="patches" xreflabel="Useful Patches and Utilities for Bugzilla">
|
||||
<title>Contrib</title>
|
||||
|
||||
<para>
|
||||
There are a number of unofficial Bugzilla add-ons in the
|
||||
<filename class="directory">$BUGZILLA_ROOT/contrib/</filename>
|
||||
directory. This section documents them.
|
||||
</para>
|
||||
|
||||
<section id="cmdline">
|
||||
<title>Command-line Search Interface</title>
|
||||
|
||||
<para>
|
||||
There are a suite of Unix utilities for searching Bugzilla from the
|
||||
command line. They live in the
|
||||
<filename class="directory">contrib/cmdline</filename> directory.
|
||||
There are three files - <filename>query.conf</filename>,
|
||||
<filename>buglist</filename> and <filename>bugs</filename>.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
These files pre-date the templatization work done as part of the
|
||||
2.16 release, and have not been updated.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<para>
|
||||
<filename>query.conf</filename> contains the mapping from
|
||||
options to field names and comparison types. Quoted option names
|
||||
are <quote>grepped</quote> for, so it should be easy to edit this
|
||||
file. Comments (#) have no effect; you must make sure these lines
|
||||
do not contain any quoted <quote>option</quote>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>buglist</filename> is a shell script that submits a
|
||||
Bugzilla query and writes the resulting HTML page to stdout.
|
||||
It supports both short options, (such as <quote>-Afoo</quote>
|
||||
or <quote>-Rbar</quote>) and long options (such
|
||||
as <quote>--assignedto=foo</quote> or <quote>--reporter=bar</quote>).
|
||||
If the first character of an option is not <quote>-</quote>, it is
|
||||
treated as if it were prefixed with <quote>--default=</quote>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The column list is taken from the COLUMNLIST environment variable.
|
||||
This is equivalent to the <quote>Change Columns</quote> option
|
||||
that is available when you list bugs in buglist.cgi. If you have
|
||||
already used Bugzilla, grep for COLUMNLIST in your cookies file
|
||||
to see your current COLUMNLIST setting.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>bugs</filename> is a simple shell script which calls
|
||||
<filename>buglist</filename> and extracts the
|
||||
bug numbers from the output. Adding the prefix
|
||||
<quote>http://bugzilla.mozilla.org/buglist.cgi?bug_id=</quote>
|
||||
turns the bug list into a working link if any bugs are found.
|
||||
Counting bugs is easy. Pipe the results through
|
||||
<command>sed -e 's/,/ /g' | wc | awk '{printf $2 "\n"}'</command>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Akkana Peck says she has good results piping
|
||||
<filename>buglist</filename> output through
|
||||
<command>w3m -T text/html -dump</command>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="cmdline-bugmail">
|
||||
<title>Command-line 'Send Unsent Bug-mail' tool</title>
|
||||
|
||||
<para>
|
||||
Within the <filename class="directory">contrib</filename> directory
|
||||
exists a utility with the descriptive (if compact) name
|
||||
of <filename>sendunsentbugmail.pl</filename>. The purpose of this
|
||||
script is, simply, to send out any bug-related mail that should
|
||||
have been sent by now, but for one reason or another has not.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To accomplish this task, <filename>sendunsentbugmail.pl</filename> uses
|
||||
the same mechanism as the <filename>sanitycheck.cgi</filename> script;
|
||||
it scans through the entire database looking for bugs with changes that
|
||||
were made more than 30 minutes ago, but where there is no record of
|
||||
anyone related to that bug having been sent mail. Having compiled a list,
|
||||
it then uses the standard rules to determine who gets mail, and sends it
|
||||
out.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As the script runs, it indicates the bug for which it is currently
|
||||
sending mail; when it has finished, it gives a numerical count of how
|
||||
many mails were sent and how many people were excluded. (Individual
|
||||
user names are not recorded or displayed.) If the script produces
|
||||
no output, that means no unsent mail was detected.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<emphasis>Usage</emphasis>: move the sendunsentbugmail.pl script
|
||||
up into the main directory, ensure it has execute permission, and run it
|
||||
from the command line (or from a cron job) with no parameters.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<!-- <!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> -->
|
||||
<appendix id="downloadlinks">
|
||||
<title>Software Download Links</title>
|
||||
|
||||
<para>All of these sites are current as of April, 2001. Hopefully they'll
|
||||
stay current for a while.</para>
|
||||
|
||||
<para>Apache Web Server:
|
||||
<ulink url="http://www.apache.org/"/>
|
||||
|
||||
Optional web server for Bugzilla, but recommended because of broad user
|
||||
base and support.</para>
|
||||
|
||||
<para>Bugzilla:
|
||||
<ulink url="http://www.bugzilla.org/"/>
|
||||
</para>
|
||||
|
||||
<para>MySQL:
|
||||
<ulink url="http://www.mysql.com/"/>
|
||||
</para>
|
||||
|
||||
<para>Perl:
|
||||
<ulink url="http://www.perl.org/"/>
|
||||
</para>
|
||||
|
||||
<para>CPAN:
|
||||
<ulink url="http://www.cpan.org/"/>
|
||||
</para>
|
||||
|
||||
<para>DBI Perl module:
|
||||
<ulink url="http://www.cpan.org/modules/by-module/DBI/"/>
|
||||
</para>
|
||||
|
||||
<para>MySQL related Perl modules:
|
||||
<ulink url="http://www.cpan.org/modules/by-module/Mysql/"/>
|
||||
</para>
|
||||
|
||||
<para>TimeDate Perl module collection:
|
||||
<ulink url="http://www.cpan.org/modules/by-module/Date/"/>
|
||||
</para>
|
||||
|
||||
<para>GD Perl module:
|
||||
<ulink url="http://www.cpan.org/modules/by-module/GD/"/>
|
||||
|
||||
Alternately, you should be able to find the latest version of GD at
|
||||
<ulink url="http://www.boutell.com/gd/"/>
|
||||
</para>
|
||||
|
||||
<para>Chart::Base module:
|
||||
<ulink url="http://www.cpan.org/modules/by-module/Chart/"/>
|
||||
</para>
|
||||
|
||||
<para>(But remember, Bundle::Bugzilla will install all the modules for you.)
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End:
|
||||
-->
|
||||
|
||||
@@ -1,364 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<!-- $Id: security.xml,v 1.19.2.1 2008-07-13 16:44:28 mozilla%colinogilvie.co.uk Exp $ -->
|
||||
|
||||
<chapter id="security">
|
||||
<title>Bugzilla Security</title>
|
||||
|
||||
<para>While some of the items in this chapter are related to the operating
|
||||
system Bugzilla is running on or some of the support software required to
|
||||
run Bugzilla, it is all related to protecting your data. This is not
|
||||
intended to be a comprehensive guide to securing Linux, Apache, MySQL, or
|
||||
any other piece of software mentioned. There is no substitute for active
|
||||
administration and monitoring of a machine. The key to good security is
|
||||
actually right in the middle of the word: <emphasis>U R It</emphasis>.
|
||||
</para>
|
||||
|
||||
<para>While programmers in general always strive to write secure code,
|
||||
accidents can and do happen. The best approach to security is to always
|
||||
assume that the program you are working with isn't 100% secure and restrict
|
||||
its access to other parts of your machine as much as possible.
|
||||
</para>
|
||||
|
||||
<section id="security-os">
|
||||
<title>Operating System</title>
|
||||
|
||||
<section id="security-os-ports">
|
||||
<title>TCP/IP Ports</title>
|
||||
|
||||
<!-- TODO: Get exact number of ports -->
|
||||
<para>The TCP/IP standard defines more than 65,000 ports for sending
|
||||
and receiving traffic. Of those, Bugzilla needs exactly one to operate
|
||||
(different configurations and options may require up to 3). You should
|
||||
audit your server and make sure that you aren't listening on any ports
|
||||
you don't need to be. It's also highly recommended that the server
|
||||
Bugzilla resides on, along with any other machines you administer, be
|
||||
placed behind some kind of firewall.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="security-os-accounts">
|
||||
<title>System User Accounts</title>
|
||||
|
||||
<para>Many <glossterm linkend="gloss-daemon">daemons</glossterm>, such
|
||||
as Apache's <filename>httpd</filename> or MySQL's
|
||||
<filename>mysqld</filename>, run as either <quote>root</quote> or
|
||||
<quote>nobody</quote>. This is even worse on Windows machines where the
|
||||
majority of <glossterm linkend="gloss-service">services</glossterm>
|
||||
run as <quote>SYSTEM</quote>. While running as <quote>root</quote> or
|
||||
<quote>SYSTEM</quote> introduces obvious security concerns, the
|
||||
problems introduced by running everything as <quote>nobody</quote> may
|
||||
not be so obvious. Basically, if you run every daemon as
|
||||
<quote>nobody</quote> and one of them gets compromised it can
|
||||
compromise every other daemon running as <quote>nobody</quote> on your
|
||||
machine. For this reason, it is recommended that you create a user
|
||||
account for each daemon.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>You will need to set the <option>webservergroup</option> option
|
||||
in <filename>localconfig</filename> to the group your web server runs
|
||||
as. This will allow <filename>./checksetup.pl</filename> to set file
|
||||
permissions on Unix systems so that nothing is world-writable.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="security-os-chroot">
|
||||
<title>The <filename>chroot</filename> Jail</title>
|
||||
|
||||
<para>
|
||||
If your system supports it, you may wish to consider running
|
||||
Bugzilla inside of a <filename>chroot</filename> jail. This option
|
||||
provides unprecedented security by restricting anything running
|
||||
inside the jail from accessing any information outside of it. If you
|
||||
wish to use this option, please consult the documentation that came
|
||||
with your system.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="security-mysql">
|
||||
<title>MySQL</title>
|
||||
|
||||
<section id="security-mysql-account">
|
||||
<title>The MySQL System Account</title>
|
||||
|
||||
<para>As mentioned in <xref linkend="security-os-accounts"/>, the MySQL
|
||||
daemon should run as a non-privileged, unique user. Be sure to consult
|
||||
the MySQL documentation or the documentation that came with your system
|
||||
for instructions.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="security-mysql-root">
|
||||
<title>The MySQL <quote>root</quote> and <quote>anonymous</quote> Users</title>
|
||||
|
||||
<para>By default, MySQL comes with a <quote>root</quote> user with a
|
||||
blank password and an <quote>anonymous</quote> user, also with a blank
|
||||
password. In order to protect your data, the <quote>root</quote> user
|
||||
should be given a password and the anonymous user should be disabled.
|
||||
</para>
|
||||
|
||||
<example id="security-mysql-account-root">
|
||||
<title>Assigning the MySQL <quote>root</quote> User a Password</title>
|
||||
|
||||
<screen>
|
||||
<prompt>bash$</prompt> mysql mysql
|
||||
<prompt>mysql></prompt> UPDATE user SET password = password('<replaceable>new_password</replaceable>') WHERE user = 'root';
|
||||
<prompt>mysql></prompt> FLUSH PRIVILEGES;
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<example id="security-mysql-account-anonymous">
|
||||
<title>Disabling the MySQL <quote>anonymous</quote> User</title>
|
||||
<screen>
|
||||
<prompt>bash$</prompt> mysql -u root -p mysql <co id="security-mysql-account-anonymous-mysql"/>
|
||||
<prompt>Enter Password:</prompt> <replaceable>new_password</replaceable>
|
||||
<prompt>mysql></prompt> DELETE FROM user WHERE user = '';
|
||||
<prompt>mysql></prompt> FLUSH PRIVILEGES;
|
||||
</screen>
|
||||
<calloutlist>
|
||||
<callout arearefs="security-mysql-account-anonymous-mysql">
|
||||
<para>This command assumes that you have already completed
|
||||
<xref linkend="security-mysql-account-root"/>.
|
||||
</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
</example>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="security-mysql-network">
|
||||
<title>Network Access</title>
|
||||
|
||||
<para>If MySQL and your web server both run on the same machine and you
|
||||
have no other reason to access MySQL remotely, then you should disable
|
||||
the network access. This, along with the suggestion in
|
||||
<xref linkend="security-os-ports"/>, will help protect your system from
|
||||
any remote vulnerabilities in MySQL.
|
||||
</para>
|
||||
|
||||
<example id="security-mysql-network-ex">
|
||||
<title>Disabling Networking in MySQL</title>
|
||||
|
||||
<para>Simply enter the following in <filename>/etc/my.cnf</filename>:
|
||||
<screen>
|
||||
[mysqld]
|
||||
# Prevent network access to MySQL.
|
||||
skip-networking
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!-- For possible addition in the future: How to better control the bugs user
|
||||
<section id="security-mysql-bugs">
|
||||
<title>The bugs User</title>
|
||||
|
||||
</section>
|
||||
-->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="security-webserver">
|
||||
<title>Web server</title>
|
||||
|
||||
<section id="security-webserver-access">
|
||||
<title>Disabling Remote Access to Bugzilla Configuration Files</title>
|
||||
|
||||
<para>
|
||||
There are many files that are placed in the Bugzilla directory
|
||||
area that should not be accessible from the web server. Because of the way
|
||||
Bugzilla is currently layed out, the list of what should and should not
|
||||
be accessible is rather complicated. A quick way is to run
|
||||
<filename>testserver.pl</filename> to check if your web server serves
|
||||
Bugzilla files as expected. If not, you may want to follow the few
|
||||
steps below.
|
||||
</para>
|
||||
|
||||
<tip>
|
||||
<para>Bugzilla ships with the ability to create
|
||||
<glossterm linkend="gloss-htaccess"><filename>.htaccess</filename></glossterm>
|
||||
files that enforce these rules. Instructions for enabling these
|
||||
directives in Apache can be found in <xref linkend="http-apache"/>
|
||||
</para>
|
||||
</tip>
|
||||
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>In the main Bugzilla directory, you should:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block:
|
||||
<simplelist type="inline">
|
||||
<member><filename>*.pl</filename></member>
|
||||
<member><filename>*localconfig*</filename></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In <filename class="directory">data</filename>:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In <filename class="directory">data/webdot</filename>:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>If you use a remote webdot server:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>But allow
|
||||
<simplelist type="inline">
|
||||
<member><filename>*.dot</filename></member>
|
||||
</simplelist>
|
||||
only for the remote webdot server</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Otherwise, if you use a local GraphViz:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>But allow:
|
||||
<simplelist type="inline">
|
||||
<member><filename>*.png</filename></member>
|
||||
<member><filename>*.gif</filename></member>
|
||||
<member><filename>*.jpg</filename></member>
|
||||
<member><filename>*.map</filename></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>And if you don't use any dot:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In <filename class="directory">Bugzilla</filename>:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In <filename class="directory">template</filename>:</para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Block everything</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Be sure to test that data that should not be accessed remotely is
|
||||
properly blocked. Of particular interest is the localconfig file which
|
||||
contains your database password. Also, be aware that many editors
|
||||
create temporary and backup files in the working directory and that
|
||||
those should also not be accessible. For more information, see
|
||||
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=186383">bug 186383</ulink>
|
||||
or
|
||||
<ulink url="http://online.securityfocus.com/bid/6501">Bugtraq ID 6501</ulink>.
|
||||
To test, simply run <filename>testserver.pl</filename>, as said above.
|
||||
</para>
|
||||
|
||||
<tip>
|
||||
<para>Be sure to check <xref linkend="http"/> for instructions
|
||||
specific to the web server you use.
|
||||
</para>
|
||||
</tip>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section id="security-bugzilla">
|
||||
<title>Bugzilla</title>
|
||||
|
||||
<section id="security-bugzilla-charset">
|
||||
<title>Prevent users injecting malicious Javascript</title>
|
||||
|
||||
<para>If you installed Bugzilla version 2.22 or later from scratch,
|
||||
then the <emphasis>utf8</emphasis> parameter is switched on by default.
|
||||
This makes Bugzilla explicitly set the character encoding, following
|
||||
<ulink
|
||||
url="http://www.cert.org/tech_tips/malicious_code_mitigation.html#3">a
|
||||
CERT advisory</ulink> recommending exactly this.
|
||||
The following therefore does not apply to you; just keep
|
||||
<emphasis>utf8</emphasis> turned on.
|
||||
</para>
|
||||
|
||||
<para>If you've upgraded from an older version, then it may be possible
|
||||
for a Bugzilla user to take advantage of character set encoding
|
||||
ambiguities to inject HTML into Bugzilla comments.
|
||||
This could include malicious scripts.
|
||||
This is because due to internationalization concerns, we are unable to
|
||||
turn the <emphasis>utf8</emphasis> parameter on by default for upgraded
|
||||
installations.
|
||||
Turning it on manually will prevent this problem.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End: -->
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % myents SYSTEM "bugzilla.ent">
|
||||
%myents;
|
||||
]>
|
||||
<!-- $Id: troubleshooting.xml,v 1.13.4.1 2008-07-13 16:44:28 mozilla%colinogilvie.co.uk Exp $ -->
|
||||
|
||||
<appendix id="troubleshooting">
|
||||
<title>Troubleshooting</title>
|
||||
|
||||
<para>This section gives solutions to common Bugzilla installation
|
||||
problems. If none of the section headings seems to match your
|
||||
problem, read the general advice.
|
||||
</para>
|
||||
|
||||
<section id="general-advice">
|
||||
<title>General Advice</title>
|
||||
<para>If you can't get <filename>checksetup.pl</filename> to run to
|
||||
completion, it normally explains what's wrong and how to fix it.
|
||||
If you can't work it out, or if it's being uncommunicative, post
|
||||
the errors in the
|
||||
<ulink url="news://news.mozilla.org/mozilla.support.bugzilla">mozilla.support.bugzilla</ulink>
|
||||
newsgroup.
|
||||
</para>
|
||||
|
||||
<para>If you have made it all the way through
|
||||
<xref linkend="installation"/> (Installation) and
|
||||
<xref linkend="configuration"/> (Configuration) but accessing the Bugzilla
|
||||
URL doesn't work, the first thing to do is to check your web server error
|
||||
log. For Apache, this is often located at
|
||||
<filename>/etc/logs/httpd/error_log</filename>. The error messages
|
||||
you see may be self-explanatory enough to enable you to diagnose and
|
||||
fix the problem. If not, see below for some commonly-encountered
|
||||
errors. If that doesn't help, post the errors to the newsgroup.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Bugzilla can also log all user-based errors (and many code-based errors)
|
||||
that occur, without polluting the web server's error log. To enable
|
||||
Bugzilla error logging, create a file that Bugzilla can write to, named
|
||||
<filename>errorlog</filename>, in the Bugzilla <filename>data</filename>
|
||||
directory. Errors will be logged as they occur, and will include the type
|
||||
of the error, the IP address and username (if available) of the user who
|
||||
triggered the error, and the values of all environment variables; if a
|
||||
form was being submitted, the data in the form will also be included.
|
||||
To disable error logging, delete or rename the
|
||||
<filename>errorlog</filename> file.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="trbl-testserver">
|
||||
<title>The Apache web server is not serving Bugzilla pages</title>
|
||||
<para>After you have run <command>checksetup.pl</command> twice,
|
||||
run <command>testserver.pl http://yoursite.yourdomain/yoururl</command>
|
||||
to confirm that your web server is configured properly for
|
||||
Bugzilla.
|
||||
</para>
|
||||
<programlisting>
|
||||
<prompt>bash$</prompt> ./testserver.pl http://landfill.bugzilla.org/bugzilla-tip
|
||||
TEST-OK Webserver is running under group id in $webservergroup.
|
||||
TEST-OK Got ant picture.
|
||||
TEST-OK Webserver is executing CGIs.
|
||||
TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-tip/localconfig.
|
||||
</programlisting>
|
||||
</section>
|
||||
|
||||
<section id="trbl-perlmodule">
|
||||
<title>I installed a Perl module, but
|
||||
<filename>checksetup.pl</filename> claims it's not installed!</title>
|
||||
|
||||
<para>This could be caused by one of two things:</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>You have two versions of Perl on your machine. You are installing
|
||||
modules into one, and Bugzilla is using the other. Rerun the CPAN
|
||||
commands (or manual compile) using the full path to Perl from the
|
||||
top of <filename>checksetup.pl</filename>. This will make sure you
|
||||
are installing the modules in the right place.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The permissions on your library directories are set incorrectly.
|
||||
They must, at the very least, be readable by the web server user or
|
||||
group. It is recommended that they be world readable.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
|
||||
<section id="trbl-dbdSponge">
|
||||
<title>DBD::Sponge::db prepare failed</title>
|
||||
|
||||
<para>The following error message may appear due to a bug in DBD::mysql
|
||||
(over which the Bugzilla team have no control):
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[ DBD::Sponge::db prepare failed: Cannot determine NUM_OF_FIELDS at D:/Perl/site/lib/DBD/mysql.pm line 248.
|
||||
SV = NULL(0x0) at 0x20fc444
|
||||
REFCNT = 1
|
||||
FLAGS = (PADBUSY,PADMY)
|
||||
]]></programlisting>
|
||||
|
||||
<para>To fix this, go to
|
||||
<filename><path-to-perl>/lib/DBD/sponge.pm</filename>
|
||||
in your Perl installation and replace
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[ my $numFields;
|
||||
if ($attribs->{'NUM_OF_FIELDS'}) {
|
||||
$numFields = $attribs->{'NUM_OF_FIELDS'};
|
||||
} elsif ($attribs->{'NAME'}) {
|
||||
$numFields = @{$attribs->{NAME}};
|
||||
]]></programlisting>
|
||||
|
||||
<para>with</para>
|
||||
|
||||
<programlisting><![CDATA[ my $numFields;
|
||||
if ($attribs->{'NUM_OF_FIELDS'}) {
|
||||
$numFields = $attribs->{'NUM_OF_FIELDS'};
|
||||
} elsif ($attribs->{'NAMES'}) {
|
||||
$numFields = @{$attribs->{NAMES}};
|
||||
]]></programlisting>
|
||||
|
||||
<para>(note the S added to NAME.)</para>
|
||||
</section>
|
||||
|
||||
<section id="paranoid-security">
|
||||
<title>cannot chdir(/var/spool/mqueue)</title>
|
||||
|
||||
<para>If you are installing Bugzilla on SuSE Linux, or some other
|
||||
distributions with <quote>paranoid</quote> security options, it is
|
||||
possible that the checksetup.pl script may fail with the error:
|
||||
<programlisting><![CDATA[cannot chdir(/var/spool/mqueue): Permission denied
|
||||
]]></programlisting>
|
||||
</para>
|
||||
|
||||
<para>This is because your <filename>/var/spool/mqueue</filename>
|
||||
directory has a mode of <computeroutput>drwx------</computeroutput>.
|
||||
Type <command>chmod 755 <filename>/var/spool/mqueue</filename></command>
|
||||
as root to fix this problem. This will allow any process running on your
|
||||
machine the ability to <emphasis>read</emphasis> the
|
||||
<filename>/var/spool/mqueue</filename> directory.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="trbl-relogin-everyone">
|
||||
<title>Everybody is constantly being forced to relogin</title>
|
||||
|
||||
<para>The most-likely cause is that the <quote>cookiepath</quote> parameter
|
||||
is not set correctly in the Bugzilla configuration. You can change this (if
|
||||
you're a Bugzilla administrator) from the editparams.cgi page via the web interface.
|
||||
</para>
|
||||
|
||||
<para>The value of the cookiepath parameter should be the actual directory
|
||||
containing your Bugzilla installation, <emphasis>as seen by the end-user's
|
||||
web browser</emphasis>. Leading and trailing slashes are mandatory. You can
|
||||
also set the cookiepath to any directory which is a parent of the Bugzilla
|
||||
directory (such as '/', the root directory). But you can't put something
|
||||
that isn't at least a partial match or it won't work. What you're actually
|
||||
doing is restricting the end-user's browser to sending the cookies back only
|
||||
to that directory.
|
||||
</para>
|
||||
|
||||
<para>How do you know if you want your specific Bugzilla directory or the
|
||||
whole site?
|
||||
</para>
|
||||
|
||||
<para>If you have only one Bugzilla running on the server, and you don't
|
||||
mind having other applications on the same server with it being able to see
|
||||
the cookies (you might be doing this on purpose if you have other things on
|
||||
your site that share authentication with Bugzilla), then you'll want to have
|
||||
the cookiepath set to "/", or to a sufficiently-high enough directory that
|
||||
all of the involved apps can see the cookies.
|
||||
</para>
|
||||
|
||||
<example id="trbl-relogin-everyone-share">
|
||||
<title>Examples of urlbase/cookiepath pairs for sharing login cookies</title>
|
||||
|
||||
<blockquote>
|
||||
<literallayout>
|
||||
urlbase is <ulink url="http://bugzilla.mozilla.org/"/>
|
||||
cookiepath is /
|
||||
|
||||
urlbase is <ulink url="http://tools.mysite.tld/bugzilla/"/>
|
||||
but you have http://tools.mysite.tld/someotherapp/ which shares
|
||||
authentication with your Bugzilla
|
||||
cookiepath is /
|
||||
</literallayout>
|
||||
</blockquote>
|
||||
</example>
|
||||
|
||||
<para>On the other hand, if you have more than one Bugzilla running on the
|
||||
server (some people do - we do on landfill) then you need to have the
|
||||
cookiepath restricted enough so that the different Bugzillas don't
|
||||
confuse their cookies with one another.
|
||||
</para>
|
||||
|
||||
|
||||
<example id="trbl-relogin-everyone-restrict">
|
||||
<title>Examples of urlbase/cookiepath pairs to restrict the login cookie</title>
|
||||
<blockquote>
|
||||
<literallayout>
|
||||
urlbase is <ulink url="http://landfill.bugzilla.org/bugzilla-tip/"/>
|
||||
cookiepath is /bugzilla-tip/
|
||||
|
||||
urlbase is <ulink url="http://landfill.bugzilla.org/bugzilla-2.16-branch/"/>
|
||||
cookiepath is /bugzilla-2.16-branch/
|
||||
</literallayout>
|
||||
</blockquote>
|
||||
</example>
|
||||
|
||||
<para>If you had cookiepath set to <quote>/</quote> at any point in the
|
||||
past and need to set it to something more restrictive
|
||||
(i.e. <quote>/bugzilla/</quote>), you can safely do this without
|
||||
requiring users to delete their Bugzilla-related cookies in their
|
||||
browser (this is true starting with Bugzilla 2.18 and Bugzilla 2.16.5).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="trbl-relogin-some">
|
||||
<title>Some users are constantly being forced to relogin</title>
|
||||
|
||||
<para>First, make sure cookies are enabled in the user's browser.
|
||||
</para>
|
||||
|
||||
<para>If that doesn't fix the problem, it may be that the user's ISP
|
||||
implements a rotating proxy server. This causes the user's effective IP
|
||||
address (the address which the Bugzilla server perceives him coming from)
|
||||
to change periodically. Since Bugzilla cookies are tied to a specific IP
|
||||
address, each time the effective address changes, the user will have to
|
||||
log in again.
|
||||
</para>
|
||||
|
||||
<para>If you are using 2.18 (or later), there is a
|
||||
parameter called <quote>loginnetmask</quote>, which you can use to set
|
||||
the number of bits of the user's IP address to require to be matched when
|
||||
authenticating the cookies. If you set this to something less than 32,
|
||||
then the user will be given a checkbox for <quote>Restrict this login to
|
||||
my IP address</quote> on the login screen, which defaults to checked. If
|
||||
they leave the box checked, Bugzilla will behave the same as it did
|
||||
before, requiring an exact match on their IP address to remain logged in.
|
||||
If they uncheck the box, then only the left side of their IP address (up
|
||||
to the number of bits you specified in the parameter) has to match to
|
||||
remain logged in.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="trbl-index">
|
||||
<title><filename>index.cgi</filename> doesn't show up unless specified in the URL</title>
|
||||
<para>
|
||||
You probably need to set up your web server in such a way that it
|
||||
will serve the index.cgi page as an index page.
|
||||
</para>
|
||||
<para>
|
||||
If you are using Apache, you can do this by adding
|
||||
<filename>index.cgi</filename> to the end of the
|
||||
<computeroutput>DirectoryIndex</computeroutput> line
|
||||
as mentioned in <xref linkend="http-apache"/>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="trbl-passwd-encryption">
|
||||
<title>
|
||||
checksetup.pl reports "Client does not support authentication protocol
|
||||
requested by server..."
|
||||
</title>
|
||||
|
||||
<para>
|
||||
This error is occurring because you are using the new password
|
||||
encryption that comes with MySQL 4.1, while your
|
||||
<filename>DBD::mysql</filename> module was compiled against an
|
||||
older version of MySQL. If you recompile <filename>DBD::mysql</filename>
|
||||
against the current MySQL libraries (or just obtain a newer version
|
||||
of this module) then the error may go away.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If that does not fix the problem, or if you cannot recompile the
|
||||
existing module (e.g. you're running Windows) and/or don't want to
|
||||
replace it (e.g. you want to keep using a packaged version), then a
|
||||
workaround is available from the MySQL docs:
|
||||
<ulink url="http://dev.mysql.com/doc/mysql/en/Old_client.html"/>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-auto-insert-required-elements:t
|
||||
sgml-balanced-tag-edit:t
|
||||
sgml-exposed-tags:nil
|
||||
sgml-general-insert-case:lower
|
||||
sgml-indent-data:t
|
||||
sgml-indent-step:2
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-namecase-general:t
|
||||
sgml-omittag:t
|
||||
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
|
||||
sgml-shorttag:t
|
||||
sgml-tag-region-if-active:t
|
||||
End: -->
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,217 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# 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): Matthew Tuck <matty@chariot.net.au>
|
||||
# Jacob Steenhagen <jake@bugzilla.org>
|
||||
# Colin Ogilvie <colin.ogilvie@gmail.com>
|
||||
# Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
# This script compiles all the documentation.
|
||||
|
||||
use strict;
|
||||
use Cwd;
|
||||
|
||||
# We need to be in this directory to use our libraries.
|
||||
BEGIN {
|
||||
require File::Basename;
|
||||
import File::Basename qw(dirname);
|
||||
chdir dirname($0);
|
||||
}
|
||||
|
||||
use lib qw(.. ../lib lib);
|
||||
|
||||
# We only compile our POD if Pod::Simple is installed. We do the checks
|
||||
# this way so that if there's a compile error in Pod::Simple::HTML::Bugzilla,
|
||||
# makedocs doesn't just silently fail, but instead actually tells us there's
|
||||
# a compile error.
|
||||
my $pod_simple;
|
||||
if (eval { require Pod::Simple }) {
|
||||
require Pod::Simple::HTMLBatch::Bugzilla;
|
||||
require Pod::Simple::HTML::Bugzilla;
|
||||
$pod_simple = 1;
|
||||
};
|
||||
|
||||
use Bugzilla::Install::Requirements
|
||||
qw(REQUIRED_MODULES OPTIONAL_MODULES);
|
||||
use Bugzilla::Constants qw(DB_MODULE BUGZILLA_VERSION);
|
||||
|
||||
###############################################################################
|
||||
# Generate minimum version list
|
||||
###############################################################################
|
||||
|
||||
my $modules = REQUIRED_MODULES;
|
||||
my $opt_modules = OPTIONAL_MODULES;
|
||||
|
||||
open(ENTITIES, '>', 'bugzilla.ent') or die('Could not open bugzilla.ent: ' . $!);
|
||||
print ENTITIES <<END_ENTITIES;
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!ENTITY bz-ver "3.3">
|
||||
<!ENTITY bz-nextver "4.0">
|
||||
<!ENTITY bz-date "2008-05-20">
|
||||
<!ENTITY current-year "2008">
|
||||
|
||||
<!ENTITY landfillbase "http://landfill.bugzilla.org/bugzilla-tip/">
|
||||
<!ENTITY bz "http://www.bugzilla.org/">
|
||||
<!ENTITY bzg-bugs "<ulink url='https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&component=Documentation'>Bugzilla Documentation</ulink>">
|
||||
<!ENTITY mysql "http://www.mysql.com/">
|
||||
|
||||
<!ENTITY min-perl-ver "5.8.1">
|
||||
|
||||
|
||||
<!-- Module Versions -->
|
||||
END_ENTITIES
|
||||
foreach my $module (@$modules, @$opt_modules)
|
||||
{
|
||||
my $name = $module->{'module'};
|
||||
$name =~ s/::/-/g;
|
||||
$name = lc($name);
|
||||
#This needs to be a string comparison, due to the modules having
|
||||
#version numbers like 0.9.4
|
||||
my $version = $module->{'version'} eq 0 ? 'any' : $module->{'version'};
|
||||
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
|
||||
}
|
||||
|
||||
# CGI is a special case, because for Perl versions below 5.10, it has an
|
||||
# optional version *and* a required version.
|
||||
# We check @opt_modules first, then @modules, and pick the first we get.
|
||||
# We'll get the optional one then, if it is given, otherwise the required one.
|
||||
my ($cgi_opt) = grep($_->{module} eq 'CGI', @$opt_modules, @$modules);
|
||||
print ENTITIES '<!ENTITY min-mp-cgi-ver "' . $cgi_opt->{version} . '">' . "\n";
|
||||
|
||||
print ENTITIES "\n <!-- Database Versions --> \n";
|
||||
|
||||
my $db_modules = DB_MODULE;
|
||||
foreach my $db (keys %$db_modules) {
|
||||
my $dbd = $db_modules->{$db}->{dbd};
|
||||
my $name = $dbd->{module};
|
||||
$name =~ s/::/-/g;
|
||||
$name = lc($name);
|
||||
my $version = $dbd->{version} || 'any';
|
||||
my $db_version = $db_modules->{$db}->{'db_version'};
|
||||
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
|
||||
print ENTITIES '<!ENTITY min-' . lc($db) . '-ver "'.$db_version.'">' . "\n";
|
||||
}
|
||||
close(ENTITIES);
|
||||
|
||||
###############################################################################
|
||||
# Subs
|
||||
###############################################################################
|
||||
|
||||
sub MakeDocs {
|
||||
|
||||
my ($name, $cmdline) = @_;
|
||||
|
||||
print "Creating $name documentation ...\n" if defined $name;
|
||||
print "$cmdline\n\n";
|
||||
system $cmdline;
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
sub make_pod {
|
||||
|
||||
print "Creating API documentation...\n";
|
||||
|
||||
my $converter = Pod::Simple::HTMLBatch::Bugzilla->new;
|
||||
# Don't output progress information.
|
||||
$converter->verbose(0);
|
||||
$converter->html_render_class('Pod::Simple::HTML::Bugzilla');
|
||||
|
||||
my $doctype = Pod::Simple::HTML::Bugzilla->DOCTYPE;
|
||||
my $content_type = Pod::Simple::HTML::Bugzilla->META_CT;
|
||||
my $bz_version = BUGZILLA_VERSION;
|
||||
|
||||
my $contents_start = <<END_HTML;
|
||||
$doctype
|
||||
<html>
|
||||
<head>
|
||||
$content_type
|
||||
<title>Bugzilla $bz_version API Documentation</title>
|
||||
</head>
|
||||
<body class="contentspage">
|
||||
<h1>Bugzilla $bz_version API Documentation</h1>
|
||||
END_HTML
|
||||
|
||||
$converter->contents_page_start($contents_start);
|
||||
$converter->contents_page_end("</body></html>");
|
||||
$converter->add_css('./../../../style.css');
|
||||
$converter->javascript_flurry(0);
|
||||
$converter->css_flurry(0);
|
||||
$converter->batch_convert(['../../'], 'html/api/');
|
||||
|
||||
print "\n";
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Make the docs ...
|
||||
###############################################################################
|
||||
|
||||
my @langs;
|
||||
# search for sub directories which have a 'xml' sub-directory
|
||||
opendir(LANGS, './');
|
||||
foreach my $dir (readdir(LANGS)) {
|
||||
next if (($dir eq '.') || ($dir eq '..') || (! -d $dir));
|
||||
if (-d "$dir/xml") {
|
||||
push(@langs, $dir);
|
||||
}
|
||||
}
|
||||
closedir(LANGS);
|
||||
|
||||
my $docparent = getcwd();
|
||||
foreach my $lang (@langs) {
|
||||
chdir "$docparent/$lang";
|
||||
MakeDocs(undef, 'cp ../bugzilla.ent ./xml/');
|
||||
|
||||
if (!-d 'txt') {
|
||||
unlink 'txt';
|
||||
mkdir 'txt', 0755;
|
||||
}
|
||||
if (!-d 'pdf') {
|
||||
unlink 'pdf';
|
||||
mkdir 'pdf', 0755;
|
||||
}
|
||||
if (!-d 'html') {
|
||||
unlink 'html';
|
||||
mkdir 'html', 0755;
|
||||
}
|
||||
if (!-d 'html/api') {
|
||||
unlink 'html/api';
|
||||
mkdir 'html/api', 0755;
|
||||
}
|
||||
|
||||
MakeDocs(undef, 'cp ../style.css html/api/');
|
||||
|
||||
make_pod() if $pod_simple;
|
||||
|
||||
MakeDocs('separate HTML', 'xmlto -m ../xsl/chunks.xsl -o html html ' .
|
||||
'xml/Bugzilla-Guide.xml');
|
||||
MakeDocs('big HTML', 'xmlto -m ../xsl/nochunks.xsl -o html html-nochunks ' .
|
||||
'xml/Bugzilla-Guide.xml');
|
||||
MakeDocs('big text', "lynx -dump -justify=off -nolist html/Bugzilla-Guide.html " .
|
||||
"> txt/Bugzilla-Guide.txt");
|
||||
|
||||
if (! grep($_ eq "--with-pdf", @ARGV)) {
|
||||
next;
|
||||
}
|
||||
|
||||
MakeDocs('PDF', 'xmlto -m ../xsl/pdf.xsl -o pdf pdf xml/Bugzilla-Guide.xml');
|
||||
}
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
/* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Bugzilla Bug Tracking System.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Everything Solved.
|
||||
* Portions created by Everything Solved are Copyright (C) 2006
|
||||
* Everything Solved. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
*/
|
||||
|
||||
body {
|
||||
background: white;
|
||||
color: #111;
|
||||
padding: 0 1em;
|
||||
margin: 0;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
td, th {
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
a:link, a:active { color: #36415c; }
|
||||
a:visited { color: #666; }
|
||||
a:hover { color: #888; }
|
||||
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
border-bottom: 2px solid #ccc;
|
||||
}
|
||||
h2 {
|
||||
font-size: 125%;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 115%;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* This makes Description/Params/Returns look nice. */
|
||||
dd { margin-top: .2em; }
|
||||
dd p { margin-top: 0; }
|
||||
dl { margin-bottom: 1em; }
|
||||
|
||||
/* This makes the names of functions slightly larger, in Gecko. */
|
||||
body > dl > dt code { font-size: 1.35em; }
|
||||
|
||||
#pod h1 a, #pod h2 a, #pod h3 a {
|
||||
color: #36415c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre, code, tt, kbd, samp {
|
||||
/* Unfortunately, the default monospace fonts on most browsers
|
||||
look odd with relative sizing. */
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.code {
|
||||
background: #eed;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
pre.code {
|
||||
margin-left: 10px;
|
||||
width: 90%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* Special styles for the Contents page */
|
||||
|
||||
.contentspage dt {
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pod_desc_table {
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.pod_desc_table th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.pod_desc_table td, .pod_desc_table th {
|
||||
padding: .25em;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.pod_desc_table .odd th, .pod_desc_table .odd td {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.pod_desc_table
|
||||
@@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<!-- Nicer Filenames -->
|
||||
<xsl:param name="use.id.as.filename" select="1"/>
|
||||
|
||||
<!-- Label sections if they aren't automatically labeled -->
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
|
||||
<!-- Table of Contents Depth -->
|
||||
<xsl:param name="toc.section.depth">1</xsl:param>
|
||||
|
||||
<!-- Set chunk parameters -->
|
||||
<xsl:param name="chunk.section.depth" select="1"/>
|
||||
<xsl:param name="chunk.first.sections" select="1"/>
|
||||
<xsl:param name="chunker.output.encoding" select="UTF-8"/>
|
||||
|
||||
<!-- Show titles of next/previous page -->
|
||||
<xsl:param name="navig.showtitles">1</xsl:param>
|
||||
|
||||
<!-- Tidy up the HTML a bit... -->
|
||||
<xsl:param name="html.cleanup" select="1"/>
|
||||
<xsl:param name="make.valid.html" select="1"/>
|
||||
<xsl:param name="html.stylesheet">api/style.css</xsl:param>
|
||||
<!-- make links nicer... -->
|
||||
<xsl:param name="refentry.generate.title" select="1"/>
|
||||
<xsl:param name="refentry.generate.name" select="0"/>
|
||||
|
||||
<!-- Use Graphics, specify their Path and Extension -->
|
||||
<xsl:param name="admon.graphics" select="1"/>
|
||||
<xsl:param name="admon.graphics.path">../images/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.gif</xsl:param>
|
||||
|
||||
<xsl:param name="qanda.inherit.numeration" select="0" />
|
||||
|
||||
<!--
|
||||
****
|
||||
CODE BELOW HERE IS EXTRACTED AND EDITED FROM THE DOCBOOK XSL SOURCES
|
||||
****
|
||||
-->
|
||||
|
||||
<xsl:template match="simplelist[@type='inline']/member">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
To generate valid HTML, we need to redefine this section... Code extracted from
|
||||
http://cvs.sourceforge.net/viewcvs.py/docbook/xsl/html/qandaset.xsl?rev=1.19&view=log
|
||||
|
||||
and modified below. Basic change: Remove the colspan attribute of the tr tags - no
|
||||
other changes have been made to the document.
|
||||
-->
|
||||
|
||||
<xsl:template match="qandadiv">
|
||||
<xsl:variable name="preamble" select="*[name(.) != 'title'
|
||||
and name(.) != 'titleabbrev'
|
||||
and name(.) != 'qandadiv'
|
||||
and name(.) != 'qandaentry']"/>
|
||||
|
||||
<xsl:if test="blockinfo/title|title">
|
||||
<tr class="qandadiv">
|
||||
<td align="left" valign="top" colspan="2">
|
||||
<xsl:call-template name="anchor">
|
||||
<xsl:with-param name="conditional" select="0"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="(blockinfo/title|title)[1]"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="toc">
|
||||
<xsl:call-template name="dbhtml-attribute">
|
||||
<xsl:with-param name="pis"
|
||||
select="processing-instruction('dbhtml')"/>
|
||||
<xsl:with-param name="attribute" select="'toc'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="toc.params">
|
||||
<xsl:call-template name="find.path.params">
|
||||
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
|
||||
<tr class="toc">
|
||||
<td align="left" valign="top" colspan="2">
|
||||
<xsl:call-template name="process.qanda.toc"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="$preamble">
|
||||
<tr class="toc" >
|
||||
<td align="left" valign="top" colspan="2">
|
||||
<xsl:apply-templates select="$preamble"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="qandadiv|qandaentry"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<!-- Include default bugzilla XSL -->
|
||||
<xsl:include href="bugzilla-docs.xsl"/>
|
||||
<!-- Set Chunk Specific XSL Params -->
|
||||
<xsl:param name="chunker.output.doctype-public">-//W3C//DTD HTML 4.01 Transitional//EN</xsl:param>
|
||||
<xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/html4/loose.dtd</xsl:param>
|
||||
<xsl:param name="chunk.section.depth" select="1"/>
|
||||
<xsl:param name="chunk.first.sections" select="1"/>
|
||||
<!-- Don't output filename list - mimic old behaviour-->
|
||||
<xsl:param name="chunk.quietly" select="0" />
|
||||
</xsl:stylesheet>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<!-- Include default bugzilla XSL -->
|
||||
<xsl:include href="bugzilla-docs.xsl"/>
|
||||
<!-- No other params necessary -->
|
||||
</xsl:stylesheet>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<!-- Enable passivetex extensions -->
|
||||
<xsl:param name="passivetex.extensions" select="1"/>
|
||||
<xsl:param name="tablecolumns.extensions" select="1"/>
|
||||
|
||||
<!-- Show <ulink>s as footnotes -->
|
||||
<xsl:param name="ulink.footnotes" select="1" />
|
||||
<xsl:param name="ulink.show" select="1" />
|
||||
|
||||
<!-- Don't use Graphics -->
|
||||
<xsl:param name="admon.graphics" select="0"/>
|
||||
<xsl:param name="callout.graphics" select="'0'"/>
|
||||
|
||||
<xsl:template match="simplelist[@type='inline']/member">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user