Compare commits
768 Commits
CCK_PREFED
...
CCK_IB_BRA
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d529841640 | ||
|
|
0c09beeda9 | ||
|
|
1ed617f3d7 | ||
|
|
540b909e40 | ||
|
|
0d9ddf92d2 | ||
|
|
2f20cdebbd | ||
|
|
4c08064fc5 | ||
|
|
31bba7f5f5 | ||
|
|
ad4990980f | ||
|
|
a66876e04d | ||
|
|
4f3c37a8f4 | ||
|
|
8648ceec74 | ||
|
|
728c3dce49 | ||
|
|
4d6d20f598 | ||
|
|
c48d3817b7 | ||
|
|
905833d07b | ||
|
|
d8577654db | ||
|
|
b697033b55 | ||
|
|
0b3f2b23ac | ||
|
|
f3f4a77cb3 | ||
|
|
185487050b | ||
|
|
db356d2258 | ||
|
|
2a1af8e8ea | ||
|
|
7e92f8898a | ||
|
|
94afde533d | ||
|
|
a3951d6d94 | ||
|
|
e0cbebdd35 | ||
|
|
14197195c8 | ||
|
|
b74b9cb99d | ||
|
|
c9cdf3689d | ||
|
|
7875c9ce3d | ||
|
|
64edaa5d04 | ||
|
|
814ef934e4 | ||
|
|
1329c6fda1 | ||
|
|
3e9d190892 | ||
|
|
a1bfb55091 | ||
|
|
26a73785b5 | ||
|
|
6ec526afe4 | ||
|
|
ffce7fca63 | ||
|
|
ce49e4ab25 | ||
|
|
3463c29a58 | ||
|
|
0ff821f775 | ||
|
|
69ed7f1be6 | ||
|
|
fda087863c | ||
|
|
726adf65d5 | ||
|
|
33ac70ba1f | ||
|
|
b30b28256d | ||
|
|
3ab348d40b | ||
|
|
398c6e0681 | ||
|
|
adc56dcf3e | ||
|
|
86b02e8273 | ||
|
|
b6287bc6dd | ||
|
|
c07fd685c6 | ||
|
|
84fa36c883 | ||
|
|
9791b95d47 | ||
|
|
c303bf347b | ||
|
|
e7612e94ff | ||
|
|
15b6ce139b | ||
|
|
0537050ef1 | ||
|
|
3139904ead | ||
|
|
fb7351a45b | ||
|
|
7d6f186554 | ||
|
|
5b14773a85 | ||
|
|
fe65cc7a56 | ||
|
|
5250e26b16 | ||
|
|
50109aea37 | ||
|
|
f60b40a46b | ||
|
|
17005f81fa | ||
|
|
ece706d6b2 | ||
|
|
3a27d440a7 | ||
|
|
dd1d27c432 | ||
|
|
de3c786b8f | ||
|
|
e6e41c0ee7 | ||
|
|
d24c032ecf | ||
|
|
d99a4de19f | ||
|
|
e406c2a214 | ||
|
|
ce249cd65f | ||
|
|
9136ac3981 | ||
|
|
96d6777306 | ||
|
|
fd0bdbee9c | ||
|
|
0d49cdc68b | ||
|
|
9cd6fb5895 | ||
|
|
4c9d31f787 | ||
|
|
a1e097d98f | ||
|
|
1a34462861 | ||
|
|
8acf2a00cc | ||
|
|
84485e6671 | ||
|
|
7fc1be14d1 | ||
|
|
f33dba664d | ||
|
|
e8756b98a4 | ||
|
|
29fb01243a | ||
|
|
58e14b05c5 | ||
|
|
ba496b391d | ||
|
|
1eea1add0d | ||
|
|
8573bdbf70 | ||
|
|
01155e8e17 | ||
|
|
0634c586ca | ||
|
|
0e81591733 | ||
|
|
72b940e40b | ||
|
|
85ff6e56d5 | ||
|
|
5f6a5eb083 | ||
|
|
243faae056 | ||
|
|
cec284c094 | ||
|
|
3d2bf9bd35 | ||
|
|
b7fdefb5b7 | ||
|
|
49ffcb2809 | ||
|
|
ad9f77e996 | ||
|
|
db118e69ff | ||
|
|
c908e3640a | ||
|
|
f89b9276f3 | ||
|
|
81bdc1efc3 | ||
|
|
df1348df78 | ||
|
|
222d3cec48 | ||
|
|
96d29ca7e5 | ||
|
|
e3491ac654 | ||
|
|
2b3a8f3c2c | ||
|
|
7bdb55207b | ||
|
|
f4059b3f77 | ||
|
|
8a158c2416 | ||
|
|
bcc3a4a7b2 | ||
|
|
7eec0a3f53 | ||
|
|
f7e0f4664d | ||
|
|
3c61112ddf | ||
|
|
0a73081963 | ||
|
|
a54e57368c | ||
|
|
f78e55d4bf | ||
|
|
b9797ccf55 | ||
|
|
8fa91e0b3c | ||
|
|
464de07b60 | ||
|
|
e60d2990fc | ||
|
|
f50ce9655b | ||
|
|
437c2a45ff | ||
|
|
db6a4e2321 | ||
|
|
12c945e4ce | ||
|
|
3bbac1e159 | ||
|
|
b3c61f934a | ||
|
|
9f29e60d86 | ||
|
|
eeb8ec0a7c | ||
|
|
53e89a1022 | ||
|
|
854d7cedcf | ||
|
|
3350eafd6d | ||
|
|
1c16fa2e1f | ||
|
|
9854b8937b | ||
|
|
58c77fdc27 | ||
|
|
b744e4e636 | ||
|
|
c3ee2e7fac | ||
|
|
768e97d0b9 | ||
|
|
877bbb966f | ||
|
|
d29e0600ca | ||
|
|
abf674657c | ||
|
|
d3f3cc3a7b | ||
|
|
6bc63dedce | ||
|
|
cf951f3e5c | ||
|
|
6f2663e7a0 | ||
|
|
0d199adced | ||
|
|
039d50e5c0 | ||
|
|
aa356dcc20 | ||
|
|
c2a230651e | ||
|
|
298277c0a7 | ||
|
|
9a99e31f92 | ||
|
|
d8785ada2a | ||
|
|
7ce881ff6f | ||
|
|
3cd560b506 | ||
|
|
658a6267d2 | ||
|
|
b6c311a056 | ||
|
|
d594cf1085 | ||
|
|
365a380793 | ||
|
|
76ff2534f3 | ||
|
|
d4339da176 | ||
|
|
960c138f92 | ||
|
|
fe53a46374 | ||
|
|
95cb71d26d | ||
|
|
aa22abfbe1 | ||
|
|
f8727daf08 | ||
|
|
f3e4763baa | ||
|
|
00f8bb71ce | ||
|
|
d08a4b421b | ||
|
|
2c07b7962f | ||
|
|
3b43cfe09f | ||
|
|
009392e8e7 | ||
|
|
9537220a73 | ||
|
|
06cfff69e6 | ||
|
|
ad378cbe33 | ||
|
|
84d60cdec7 | ||
|
|
b0022a44a6 | ||
|
|
1084a56d2b | ||
|
|
2d5b449942 | ||
|
|
97a02fb21d | ||
|
|
1ac54d43da | ||
|
|
2c62c55420 | ||
|
|
3be8570947 | ||
|
|
bbfe427ba4 | ||
|
|
1e95a25e5a | ||
|
|
5751f746a4 | ||
|
|
21fb804398 | ||
|
|
dda7b49dc6 | ||
|
|
81bf1cf71f | ||
|
|
f346096920 | ||
|
|
218aedbf6a | ||
|
|
422f014366 | ||
|
|
4241c6967d | ||
|
|
727a6700d5 | ||
|
|
fd73913eed | ||
|
|
841f472b96 | ||
|
|
b86c705ef1 | ||
|
|
9e7ac15301 | ||
|
|
ce79c1719a | ||
|
|
938196bc94 | ||
|
|
a8c77bc7d0 | ||
|
|
148d11e201 | ||
|
|
b031c036c9 | ||
|
|
a2157bf525 | ||
|
|
f5d1db2c3e | ||
|
|
350ba3ac94 | ||
|
|
23933fa750 | ||
|
|
f3b3f9dcea | ||
|
|
d2700c2e78 | ||
|
|
3a3bff46ce | ||
|
|
3dc35c98bd | ||
|
|
8855009f3b | ||
|
|
0bceb23c11 | ||
|
|
267fabfb30 | ||
|
|
6c6f01e32e | ||
|
|
3654118f4f | ||
|
|
e76be1faae | ||
|
|
5e9e68b812 | ||
|
|
9d808ac08a | ||
|
|
9bba021e3a | ||
|
|
3714c963b9 | ||
|
|
e0e581b9c4 | ||
|
|
a0fc85e10d | ||
|
|
d8f7525c3c | ||
|
|
22e4b732a2 | ||
|
|
16d86f8daf | ||
|
|
d5087990d3 | ||
|
|
177ed7a96e | ||
|
|
f7a210fa16 | ||
|
|
f0d1a6f6ce | ||
|
|
516776e606 | ||
|
|
137ea46823 | ||
|
|
515e646658 | ||
|
|
af121ab737 | ||
|
|
d1e2b0f39a | ||
|
|
8210efd0ff | ||
|
|
d46348b3e0 | ||
|
|
10ed2bb310 | ||
|
|
f6aeb09b46 | ||
|
|
29cf6aaaab | ||
|
|
f2af8c8c71 | ||
|
|
86d7246074 | ||
|
|
7d35359334 | ||
|
|
91b3ad67e6 | ||
|
|
f4aed64695 | ||
|
|
03a05d59a3 | ||
|
|
df49844ca4 | ||
|
|
5e883b7a4f | ||
|
|
61533626e3 | ||
|
|
43115b71dd | ||
|
|
a67815f488 | ||
|
|
2f0739f441 | ||
|
|
8a05d35dfe | ||
|
|
aa05bf7a61 | ||
|
|
88f0b41339 | ||
|
|
cc45405ad0 | ||
|
|
30aab4d4f4 | ||
|
|
1204dc3c01 | ||
|
|
29732864f5 | ||
|
|
6e81240065 | ||
|
|
b35682051c | ||
|
|
be90a7433a | ||
|
|
92e34f3ed0 | ||
|
|
03f2a59c9a | ||
|
|
801573f381 | ||
|
|
822bcf2fdc | ||
|
|
92f061e800 | ||
|
|
89f6240468 | ||
|
|
bf455fb30b | ||
|
|
9ff2a72d72 | ||
|
|
7076292763 | ||
|
|
3b26228e2a | ||
|
|
da0316e4dd | ||
|
|
033fcb37fd | ||
|
|
a61c552cf3 | ||
|
|
dad7d0ce3f | ||
|
|
4267823c16 | ||
|
|
4915d6cd00 | ||
|
|
2750945184 | ||
|
|
ab2e1c19fc | ||
|
|
e3b68c249c | ||
|
|
55ff867745 | ||
|
|
8c7d49ce1e | ||
|
|
194ada1a53 | ||
|
|
685157368a | ||
|
|
3207e85edb | ||
|
|
4cb84da125 | ||
|
|
47ab7cc8da | ||
|
|
032de1c856 | ||
|
|
d6278cf4d9 | ||
|
|
a99ecbbd86 | ||
|
|
46e7a3b371 | ||
|
|
59fcb856a2 | ||
|
|
10d64daec7 | ||
|
|
5b1f02b594 | ||
|
|
8d5eb4bb86 | ||
|
|
a68d3b9fea | ||
|
|
bff01706d3 | ||
|
|
8f5e8157b7 | ||
|
|
02ab791fca | ||
|
|
9500bda665 | ||
|
|
fd266d4985 | ||
|
|
dc5e9b403a | ||
|
|
2358cf13a4 | ||
|
|
20b7ae1c79 | ||
|
|
1365aca89e | ||
|
|
4723ad814e | ||
|
|
5e76d0defd | ||
|
|
4a909a03a3 | ||
|
|
253a4c8acd | ||
|
|
fd7a016357 | ||
|
|
12d696038c | ||
|
|
5797bffb8a | ||
|
|
1a656d8aa7 | ||
|
|
2cd84b4cd7 | ||
|
|
5191e28056 | ||
|
|
06317c5623 | ||
|
|
cc6399b4d5 | ||
|
|
f45de1fede | ||
|
|
6a662c1a9d | ||
|
|
3849b124cf | ||
|
|
5c69640fe0 | ||
|
|
c8e9152cd4 | ||
|
|
7aa69e6261 | ||
|
|
4071dd6dc6 | ||
|
|
2f54fffc04 | ||
|
|
96d1d963f1 | ||
|
|
6361b1ba52 | ||
|
|
c0be791366 | ||
|
|
3b964af2a8 | ||
|
|
55466e06c9 | ||
|
|
1f28c5a550 | ||
|
|
a7e9b6c238 | ||
|
|
f5bf981bca | ||
|
|
728ab648ca | ||
|
|
374763776d | ||
|
|
2bad071cbe | ||
|
|
4c925905ac | ||
|
|
175c0d3676 | ||
|
|
172bb49781 | ||
|
|
ae0cb282f1 | ||
|
|
14973255e8 | ||
|
|
39cb7e9730 | ||
|
|
1d4713efc9 | ||
|
|
320cedffc0 | ||
|
|
d782fc61ca | ||
|
|
de780130e9 | ||
|
|
a30241ba05 | ||
|
|
bb79ca7948 | ||
|
|
f39fbdbc33 | ||
|
|
e5c8b10723 | ||
|
|
c03de93934 | ||
|
|
4252e86f6c | ||
|
|
5d67f9c327 | ||
|
|
3d4b21a62a | ||
|
|
6b044f6feb | ||
|
|
44121b5cef | ||
|
|
e047419c40 | ||
|
|
9e7b754c2c | ||
|
|
cba13e3d15 | ||
|
|
82e08e2088 | ||
|
|
b30aba8ec0 | ||
|
|
0739da3e8c | ||
|
|
033ce36ec4 | ||
|
|
e043336604 | ||
|
|
104971899d | ||
|
|
20b7eaa2ae | ||
|
|
11c92c480c | ||
|
|
c05b6f8783 | ||
|
|
9b8be7a4ae | ||
|
|
ae4c770fd9 | ||
|
|
8d95250074 | ||
|
|
24e139b3ca | ||
|
|
92e434cc59 | ||
|
|
c5c9195302 | ||
|
|
9fbe124ac0 | ||
|
|
6e7c6a9cc3 | ||
|
|
ae40875194 | ||
|
|
e52c4fd8a8 | ||
|
|
2d83e80dfc | ||
|
|
12ad231d6b | ||
|
|
b35960948e | ||
|
|
61a08b1a54 | ||
|
|
940286fb1c | ||
|
|
22c7490c4d | ||
|
|
87115e5a49 | ||
|
|
14ae8c3224 | ||
|
|
ffda9dbeeb | ||
|
|
4d536e38db | ||
|
|
fa08080ad9 | ||
|
|
6adfc6bfa6 | ||
|
|
918a4c91d9 | ||
|
|
da41d89803 | ||
|
|
5af218e201 | ||
|
|
8aaa83d975 | ||
|
|
fb5bd72174 | ||
|
|
e690e412bc | ||
|
|
afe4232ff0 | ||
|
|
34aa827bcd | ||
|
|
df9d89c579 | ||
|
|
072c304843 | ||
|
|
68f4d927c0 | ||
|
|
f914bb2f05 | ||
|
|
512af6dc98 | ||
|
|
3a6a5da964 | ||
|
|
06b1b51c97 | ||
|
|
c045d704f4 | ||
|
|
2ac4fb93a3 | ||
|
|
fc5cfdea80 | ||
|
|
77c606ffad | ||
|
|
9758414022 | ||
|
|
d415329519 | ||
|
|
5b91673b2e | ||
|
|
eb72fbb1a3 | ||
|
|
b09257b93a | ||
|
|
b80617f16a | ||
|
|
0daeecc032 | ||
|
|
bfb7e06d84 | ||
|
|
c3a0ae9bc7 | ||
|
|
8ee6615c9b | ||
|
|
90f701cee0 | ||
|
|
c88ac2817e | ||
|
|
645f530172 | ||
|
|
01dab956f2 | ||
|
|
f31e9e184a | ||
|
|
5076271f06 | ||
|
|
56fe984f6b | ||
|
|
bdccdab341 | ||
|
|
b5df37b8a6 | ||
|
|
d3e4ce05b3 | ||
|
|
cf0efed474 | ||
|
|
c607935314 | ||
|
|
f4920c741f | ||
|
|
cca2e5fcc9 | ||
|
|
c65adbaa24 | ||
|
|
8f4b30c5ce | ||
|
|
f5e32f2df1 | ||
|
|
a4490c1e80 | ||
|
|
3c194f9341 | ||
|
|
1eb1030073 | ||
|
|
d43ae7083a | ||
|
|
5905d6acc1 | ||
|
|
7a15a72b48 | ||
|
|
d414acca70 | ||
|
|
fab167e7ab | ||
|
|
bdbe12be37 | ||
|
|
38d080e8ca | ||
|
|
612b6a7c12 | ||
|
|
3b8c1ad96f | ||
|
|
7557fca3e3 | ||
|
|
72e98582f5 | ||
|
|
43e92a7e26 | ||
|
|
85f1209627 | ||
|
|
fe0a0ab52d | ||
|
|
acd5f7a6de | ||
|
|
3a97f35d33 | ||
|
|
c871243e84 | ||
|
|
864d999137 | ||
|
|
35e1d479ea | ||
|
|
ced02272fe | ||
|
|
388fec8b4d | ||
|
|
d53a7ab034 | ||
|
|
84182160c6 | ||
|
|
c424dc725c | ||
|
|
5499e2a236 | ||
|
|
8082ff2e04 | ||
|
|
0090b7de69 | ||
|
|
7978eda6a0 | ||
|
|
d4423fda70 | ||
|
|
b294f8c72f | ||
|
|
2d6a76a195 | ||
|
|
98e5ef46e1 | ||
|
|
ad4f27ab02 | ||
|
|
e0683c5b96 | ||
|
|
e66d81d179 | ||
|
|
b2d7bfcb3f | ||
|
|
3c64a584db | ||
|
|
5864394fd1 | ||
|
|
0fd39e383e | ||
|
|
0338c89237 | ||
|
|
b0ecf5191b | ||
|
|
e6d1d3a41d | ||
|
|
74fd5a7096 | ||
|
|
ce35be2ae4 | ||
|
|
2c85c3cfe2 | ||
|
|
724ee564ce | ||
|
|
d7d45166cb | ||
|
|
903636d139 | ||
|
|
460bff4c49 | ||
|
|
e1b00fa978 | ||
|
|
7149730967 | ||
|
|
b95acca2fe | ||
|
|
dd19aed169 | ||
|
|
a0aefcf642 | ||
|
|
955fa48f3d | ||
|
|
01d7dc1de2 | ||
|
|
a179cb995d | ||
|
|
08aa9eb651 | ||
|
|
72a3d81e33 | ||
|
|
6bb76f2ad1 | ||
|
|
1b28669e3b | ||
|
|
ff74724cba | ||
|
|
4e5aab32b8 | ||
|
|
7535dff25e | ||
|
|
bb79587d15 | ||
|
|
ad1ef60f63 | ||
|
|
9b9e6b8328 | ||
|
|
568582c0fc | ||
|
|
7d510d571d | ||
|
|
63cb208466 | ||
|
|
287688d772 | ||
|
|
456c9f8a82 | ||
|
|
eadbebad36 | ||
|
|
547df4c3e4 | ||
|
|
791ff8df84 | ||
|
|
6d091ec688 | ||
|
|
20ef036496 | ||
|
|
4defff2d32 | ||
|
|
3f17113145 | ||
|
|
60617f97d8 | ||
|
|
2faee254d0 | ||
|
|
5a413592bd | ||
|
|
db385a8bd7 | ||
|
|
761471061c | ||
|
|
25c6c4fd3c | ||
|
|
79ed9126ca | ||
|
|
7c297b316b | ||
|
|
e0604e6a44 | ||
|
|
4da245455d | ||
|
|
6a1f0c6ce3 | ||
|
|
bb7cbc0dc5 | ||
|
|
4ad9438062 | ||
|
|
495db0227d | ||
|
|
bda7e275dd | ||
|
|
1fde83c771 | ||
|
|
4d79330194 | ||
|
|
c34413af37 | ||
|
|
3db4a0e9ac | ||
|
|
4858a05464 | ||
|
|
0780022acc | ||
|
|
0ed7d1b0ca | ||
|
|
b1a1737850 | ||
|
|
f803585f96 | ||
|
|
d5ccc4ed9e | ||
|
|
9ea87b9464 | ||
|
|
10f906b791 | ||
|
|
5668befe73 | ||
|
|
f9dc3f03b9 | ||
|
|
9d60eadb89 | ||
|
|
1528f1d062 | ||
|
|
022734969c | ||
|
|
5a19c639ba | ||
|
|
299232dd6d | ||
|
|
662226b765 | ||
|
|
53f812c1af | ||
|
|
4cbd7a484c | ||
|
|
c517416200 | ||
|
|
3b00003c68 | ||
|
|
6d4c956f3f | ||
|
|
a517f0d2fa | ||
|
|
3bbe05e233 | ||
|
|
15f72e185c | ||
|
|
8dc19dba47 | ||
|
|
6a31a9a661 | ||
|
|
ec244f8044 | ||
|
|
f929dd8a3c | ||
|
|
181862eab6 | ||
|
|
fac515fed9 | ||
|
|
8ffb403866 | ||
|
|
69224826eb | ||
|
|
e0dc84b7d2 | ||
|
|
5c31397853 | ||
|
|
2648c43ca9 | ||
|
|
f975fa5699 | ||
|
|
766713789c | ||
|
|
b1eab7dd46 | ||
|
|
43ccc3908c | ||
|
|
a91bf4a68d | ||
|
|
303a5331d9 | ||
|
|
7c5142e62d | ||
|
|
54c25b59f5 | ||
|
|
fa863da1e2 | ||
|
|
aaaaa6eada | ||
|
|
f7e61b2f4d | ||
|
|
d73005ea74 | ||
|
|
bcb258b1cd | ||
|
|
7bf5d09c94 | ||
|
|
37ac07a0fd | ||
|
|
0b5099dd72 | ||
|
|
c9a247e9cb | ||
|
|
8e4767a26d | ||
|
|
065a782ee4 | ||
|
|
74891049b2 | ||
|
|
a692927a23 | ||
|
|
c42591d68f | ||
|
|
fed00f2d29 | ||
|
|
cc0f4274fb | ||
|
|
0a4fc62cec | ||
|
|
e2b3da1e6a | ||
|
|
60941822af | ||
|
|
b4ff2d0a9c | ||
|
|
467660d8e8 | ||
|
|
8f3fb51346 | ||
|
|
51bff52b51 | ||
|
|
a349c153c1 | ||
|
|
c52192895e | ||
|
|
b4c2e75b53 | ||
|
|
bf45a76495 | ||
|
|
4bcad7365e | ||
|
|
a8c5407a66 | ||
|
|
45bcef5504 | ||
|
|
d8ae0581db | ||
|
|
ce5cd24903 | ||
|
|
79b0d6b360 | ||
|
|
67cc82f61b | ||
|
|
d3046e16dd | ||
|
|
3fd8415aaa | ||
|
|
0984f9daba | ||
|
|
0d76157146 | ||
|
|
a89d2f4723 | ||
|
|
a6396f40ca | ||
|
|
f6fc5c5388 | ||
|
|
fe1bac57c6 | ||
|
|
b423daf3d1 | ||
|
|
cc2997bfa0 | ||
|
|
c971fc767e | ||
|
|
c4caa1b828 | ||
|
|
ddeef888b9 | ||
|
|
4e2d71768d | ||
|
|
6e10bce240 | ||
|
|
40d3a042e5 | ||
|
|
3f92a4a24f | ||
|
|
96ce0965ff | ||
|
|
8bc0b7e9bf | ||
|
|
54983a3e01 | ||
|
|
0d6b36df4c | ||
|
|
86339f8974 | ||
|
|
9d2575fcb5 | ||
|
|
f56674ebbb | ||
|
|
69c6ffd626 | ||
|
|
8072ba5aac | ||
|
|
8ac744782a | ||
|
|
03dbac5ec8 | ||
|
|
af2f1a5667 | ||
|
|
16e560771a | ||
|
|
f902ddb08d | ||
|
|
31d75d97c5 | ||
|
|
d8a790e7dd | ||
|
|
8dea82607b | ||
|
|
ffea25f59b | ||
|
|
65a4dcd29e | ||
|
|
ced7a9ce15 | ||
|
|
54677fad6a | ||
|
|
9e179ff639 | ||
|
|
bf73e67f74 | ||
|
|
e2e5db7900 | ||
|
|
d65266d7a4 | ||
|
|
83082e1254 | ||
|
|
7654dbfe76 | ||
|
|
b3e24127f2 | ||
|
|
52e1cbaf29 | ||
|
|
d937a9da5c | ||
|
|
9df1b887ce | ||
|
|
56be8b5ead | ||
|
|
dbbe382e38 | ||
|
|
852a3dbb95 | ||
|
|
b4980045e9 | ||
|
|
b775befe31 | ||
|
|
33ac3614b6 | ||
|
|
003e4215aa | ||
|
|
068170f445 | ||
|
|
1544df4261 | ||
|
|
ddb1f29d56 | ||
|
|
bc4ff100ea | ||
|
|
901ad8ab6a | ||
|
|
d1911c6d0a | ||
|
|
a57f896a19 | ||
|
|
43a79c95df | ||
|
|
8983dc7b3a | ||
|
|
b9fbe70f0d | ||
|
|
030f56d8b3 | ||
|
|
b6cbec2b01 | ||
|
|
533392f396 | ||
|
|
76d1ce8a02 | ||
|
|
c79bdc933a | ||
|
|
474493b5ff | ||
|
|
304a701c9b | ||
|
|
ae067511a4 | ||
|
|
e97e909b21 | ||
|
|
073a7fc430 | ||
|
|
fb258c2434 | ||
|
|
12ee36a26b | ||
|
|
a167a4f39d | ||
|
|
f3e223e230 | ||
|
|
fb84fd48e7 | ||
|
|
ef8d610587 | ||
|
|
378ca9ba32 | ||
|
|
be2baf922d | ||
|
|
6737b66f15 | ||
|
|
9dbb6356f3 | ||
|
|
1122aea9e8 | ||
|
|
f7d714738e | ||
|
|
fa9acfe976 | ||
|
|
360e8e2867 | ||
|
|
93341bca3c | ||
|
|
9aabc077d6 | ||
|
|
ad0a29b7ce | ||
|
|
831c4e6f2e | ||
|
|
9a5ab76543 | ||
|
|
ebd0276943 | ||
|
|
072b1c9990 | ||
|
|
a8b9ebcb99 | ||
|
|
700d0e8fd2 | ||
|
|
9e1fb89e0a | ||
|
|
3c10b47a80 | ||
|
|
afcb5dfeef | ||
|
|
6ca7a5e472 | ||
|
|
f93c8688bf | ||
|
|
a5b6f77038 | ||
|
|
c83f68dac3 | ||
|
|
dda492e80e | ||
|
|
a4fd12b258 | ||
|
|
1f6d513fde | ||
|
|
376734369d | ||
|
|
7451e69bbe | ||
|
|
b786fe257c | ||
|
|
ba062622a4 | ||
|
|
a3c240977c | ||
|
|
09781b2e2a | ||
|
|
af8a9989d9 | ||
|
|
47b0b5e410 | ||
|
|
e47c372e52 | ||
|
|
16001eccc7 | ||
|
|
f3dd37550b | ||
|
|
2921cd1a40 | ||
|
|
293eacef9a | ||
|
|
c8d9369bfa | ||
|
|
04ad2b7b2e | ||
|
|
7e7f80fab0 | ||
|
|
8a8c1296e8 | ||
|
|
5ed4e67154 | ||
|
|
a3cdf48282 | ||
|
|
ab64c3ccea | ||
|
|
7d0a856ad7 | ||
|
|
233b7897cf | ||
|
|
46b3aa6437 | ||
|
|
727438403c | ||
|
|
1cd5365b6e | ||
|
|
30897f54b4 | ||
|
|
38278b93b0 | ||
|
|
fd692cb08b | ||
|
|
861ac3345e | ||
|
|
6ef8928139 | ||
|
|
726dbae4d6 | ||
|
|
ff23b14240 | ||
|
|
3233bfeefd | ||
|
|
53db01d7f1 | ||
|
|
dcdbaa821c | ||
|
|
3b6c33c60c | ||
|
|
07fce6e351 |
@@ -27,7 +27,7 @@ Help=Online;%Root%CCKHelp\info.html
|
||||
|
||||
|
||||
[Navigation Controls]
|
||||
onNext=VerifySet(%OrganizationName%,User Agent String is required to proceed with custom build creation);
|
||||
onNext=VerifySet(%OrganizationName%,User Agent String is required to proceed with custom build creation,User Agent String should not contain spaces);
|
||||
|
||||
Help=InfoHelp.ini
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Help=Online;%Root%CCKHelp\buildpage1.html
|
||||
|
||||
|
||||
[Navigation Controls]
|
||||
onNext=Message(Are you ready to build your customized installer? [Yes]/[No]);IBEngine.StartIB();Msg(Installer creation is complete. The build is in %Root%Configs\%CustomizationList%\Output)
|
||||
onNext=Message(Are you ready to build your customized installer? [Yes]/[No]);RunIB();Msg(Installer creation is complete. The build is in %Root%Configs\%CustomizationList%\Output)
|
||||
Help=InstallerHelp.ini
|
||||
|
||||
[Image 1]
|
||||
@@ -93,7 +93,7 @@ target=CheckListDescription
|
||||
;opt7=Description of the Import Utility
|
||||
;opt8=Description of the Internet Setup
|
||||
;opt9=Description of the RealPlayer 5.0
|
||||
onInit=IBEngine.GenerateComponentList()
|
||||
onInit=globals.GenerateComponentList()
|
||||
|
||||
[Widget 2]
|
||||
Type=GlobalText
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
Binary file not shown.
@@ -115,8 +115,6 @@ BOOL CWizardMachineApp::InitInstance()
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need.
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
#ifdef _AFXDLL
|
||||
Enable3dControls(); // Call this when using MFC in a shared DLL
|
||||
#else
|
||||
@@ -1268,24 +1266,6 @@ BOOL CWizardMachineApp::IsFirstNode(NODE* treeNode)
|
||||
return firstNode;
|
||||
}
|
||||
|
||||
CString CWizardMachineApp::GetModulePath()
|
||||
{
|
||||
char currPath[MID_SIZE];
|
||||
int i,numBytes;
|
||||
|
||||
// Get the path of the file that was executed
|
||||
numBytes = GetModuleFileName(m_hInstance, currPath, MIN_SIZE);
|
||||
|
||||
// get the cmd path
|
||||
// Remove the filename from the path
|
||||
for (i=numBytes-1;i >= 0 && currPath[i] != '\\';i--);
|
||||
// Terminate command line with 0
|
||||
if (i >= 0)
|
||||
currPath[i+1]= '\0';
|
||||
|
||||
return CString(currPath);
|
||||
}
|
||||
|
||||
CString CWizardMachineApp::GetGlobalOptions(CString theName)
|
||||
{
|
||||
CString temp="";
|
||||
@@ -1482,10 +1462,3 @@ void CWizardMachineApp::HelpWiz()
|
||||
hlpdlg.DoModal();
|
||||
}
|
||||
}
|
||||
|
||||
int CWizardMachineApp::ExitInstance()
|
||||
{
|
||||
CoUninitialize();
|
||||
|
||||
return CWinApp::ExitInstance();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ public:
|
||||
void CreateNewCache();
|
||||
BOOL IsLastNode(NODE* treeNode);
|
||||
BOOL IsFirstNode(NODE* treeNode);
|
||||
CString GetModulePath();
|
||||
CString GetGlobalOptions(CString theName);
|
||||
void BuildWidget(WIDGET* aWidget, CString iniSection, CString iniFile, int pageBaseIndex, BOOL readValue);
|
||||
// void BuildHelpWidget(WIDGET* aWidget, CString iniSection, CString iniFile, int pageBaseIndex);
|
||||
@@ -79,7 +78,6 @@ public:
|
||||
//{{AFX_VIRTUAL(CWizardMachineApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
virtual int ExitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,6 @@
|
||||
#include "PropSheet.h"
|
||||
#include "WizardUI.h"
|
||||
#include "Interpret.h"
|
||||
#include "PrefEditView.h"
|
||||
|
||||
#include <direct.h>
|
||||
#include <sys/types.h>
|
||||
@@ -439,7 +438,6 @@ void CWizardUI::EnableWidget(WIDGET *curWidget)
|
||||
}
|
||||
}
|
||||
|
||||
// Copy values from the widget object to the Windows control UI element.
|
||||
void CWizardUI::UpdateScreenWidget(WIDGET *curWidget)
|
||||
{
|
||||
int selRv = CB_ERR;
|
||||
@@ -568,11 +566,6 @@ void CWizardUI::UpdateScreenWidget(WIDGET *curWidget)
|
||||
if (selRv == CB_ERR)
|
||||
selRv = ((CComboBox*)curWidget->control)->SetCurSel(0);
|
||||
}
|
||||
|
||||
else if(curWidget->type == "PrefsTree")
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CWizardUI::CreateControls()
|
||||
@@ -785,67 +778,9 @@ void CWizardUI::CreateControls()
|
||||
else if (widgetType == "ProgressBar") {
|
||||
curWidget->control = new CProgressCtrl;
|
||||
rv = ((CProgressCtrl*)curWidget->control)->Create(WS_TABSTOP, tmpRect, this, ID);
|
||||
}
|
||||
else if (widgetType == "PrefsTree") {
|
||||
/*
|
||||
A PrefsTree is a tree control for editing prefs. The ini file section should look like:
|
||||
|
||||
[Widget 1]
|
||||
Type=PrefsTree
|
||||
Name=PrefsTreeName
|
||||
Attrib=MetaPrefs.xml
|
||||
etc...
|
||||
|
||||
where...
|
||||
Attrib is the xml file which describes the tree control layout. It should
|
||||
not specifiy a path. If the file doesn't exist in the config directory,
|
||||
the default in the app Root directory is used. Then it is saved in the
|
||||
config directory with any modified pref values and used next time.
|
||||
See PrefsTree.html for prefs file format details.
|
||||
|
||||
You can also create buttons to act on the prefs tree. For example, the
|
||||
following button open the selected pref for editing, or expands the
|
||||
group if a group is selected instead of a pref.
|
||||
|
||||
[Widget 4203]
|
||||
Type=Button
|
||||
Name=Button4203
|
||||
Value=Open
|
||||
onCommand=OpenPrefTreeItem(PrefsTreeName)
|
||||
...
|
||||
|
||||
The other commands are:
|
||||
FindPrefTreeItem(PrefsTreeName) to open the search dialog
|
||||
FindNextPrefTreeItem(PrefsTreeName) to find the next matching item
|
||||
AddPrefTreeItem(PrefsTreeName) to open the add pref dialog
|
||||
|
||||
|
||||
PrefsTree is a little different from other widgets, in that it's not derived from a control--it's a CView.
|
||||
Also, it doesn't have a ->value like some widgets do. So be careful.
|
||||
|
||||
*/
|
||||
|
||||
// If the .XML file exists in the config directory, use it. Otherwise, use the
|
||||
// default file found at the Root.
|
||||
CString rootPath = GetGlobal("Root");
|
||||
CString configName = GetGlobal("CustomizationList");
|
||||
CString localPrefsFile = rootPath + "Configs\\" + configName + "\\" + curWidget->attrib;
|
||||
CString prefsFile;
|
||||
if (theApp.FileExists(localPrefsFile))
|
||||
prefsFile = localPrefsFile;
|
||||
else
|
||||
prefsFile = rootPath + curWidget->attrib;
|
||||
|
||||
curWidget->control = new CPrefEditView(prefsFile);
|
||||
|
||||
// Configure the PrefsTree with any existing globals
|
||||
//((CPrefEditView*)curWidget->control)->SetPrefValues(curWidget->value);
|
||||
|
||||
rv = ((CPrefEditView*)curWidget->control)->Create(NULL, NULL, WS_BORDER, tmpRect, this, ID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!rv)
|
||||
{
|
||||
CWnd myWnd;
|
||||
@@ -920,18 +855,15 @@ void CWizardUI::DestroyCurrentScreenWidgets()
|
||||
{
|
||||
curWidget = CurrentNode->pageWidgets[i];
|
||||
|
||||
if (curWidget->control)
|
||||
if (curWidget->control)
|
||||
{
|
||||
BOOL retFalg = curWidget->control->DestroyWindow();
|
||||
if (curWidget->type != "PrefsTree") // PrefsTree is a CView, not a control, and is destroyed automatically above
|
||||
delete curWidget->control;
|
||||
delete curWidget->control;
|
||||
curWidget->control = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Copies values from the Windows controls to the widgets objects.
|
||||
CString CWizardUI::GetScreenValue(WIDGET *curWidget)
|
||||
{
|
||||
//
|
||||
@@ -1144,12 +1076,6 @@ CString CWizardUI::GetScreenValue(WIDGET *curWidget)
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
else if (widgetType == "PrefsTree")
|
||||
{
|
||||
//rv = ((CPrefEditView*)curWidget->control)->GetModifiedPrefs();
|
||||
}
|
||||
|
||||
else
|
||||
rv = curWidget->value; // !!! Fix this so we're not copying strings all the time
|
||||
// Should be able to just pass in an "assign" boolean
|
||||
@@ -1169,17 +1095,6 @@ void CWizardUI::UpdateGlobals()
|
||||
{
|
||||
curWidget = CurrentNode->pageWidgets[i];
|
||||
curWidget->value = GetScreenValue(curWidget);
|
||||
|
||||
// Save the prefs tree in a file local to the config. This is
|
||||
// what gets read next time the prefs tree control is created.
|
||||
if (curWidget->type == "PrefsTree")
|
||||
{
|
||||
CString rootPath = GetGlobal("Root");
|
||||
CString configName = GetGlobal("CustomizationList");
|
||||
CString localPrefsFile = rootPath + "Configs\\" + configName + "\\" + curWidget->attrib;
|
||||
|
||||
((CPrefEditView*)curWidget->control)->DoSavePrefsTree(localPrefsFile);
|
||||
}
|
||||
}
|
||||
IsNewValue = TRUE;
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
// DlgAdd.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DlgAdd.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAdd dialog
|
||||
|
||||
|
||||
CDlgAdd::CDlgAdd(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgAdd::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgAdd)
|
||||
m_strPrefDesc = _T("");
|
||||
m_strPrefName = _T("");
|
||||
m_intPrefType = 0;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CDlgAdd::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgAdd)
|
||||
DDX_Text(pDX, IDC_PREFDESC, m_strPrefDesc);
|
||||
DDX_Text(pDX, IDC_PREFNAME, m_strPrefName);
|
||||
DDX_Radio(pDX, IDC_PREFTYPE_STRING, m_intPrefType);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgAdd, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgAdd)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAdd message handlers
|
||||
@@ -1,50 +0,0 @@
|
||||
#if !defined(AFX_DLGADD_H__55B7BFE0_C8B7_43FA_AFD2_BCB1AA18E820__INCLUDED_)
|
||||
#define AFX_DLGADD_H__55B7BFE0_C8B7_43FA_AFD2_BCB1AA18E820__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// DlgAdd.h : header file
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAdd dialog
|
||||
|
||||
class CDlgAdd : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CDlgAdd(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgAdd)
|
||||
enum { IDD = IDD_ADDPREF };
|
||||
CString m_strPrefDesc;
|
||||
CString m_strPrefName;
|
||||
int m_intPrefType;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgAdd)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgAdd)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGADD_H__55B7BFE0_C8B7_43FA_AFD2_BCB1AA18E820__INCLUDED_)
|
||||
@@ -1,152 +0,0 @@
|
||||
// DlgEditPrefStr.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DlgEditPrefStr.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgEditPrefStr dialog
|
||||
|
||||
|
||||
CDlgEditPrefStr::CDlgEditPrefStr(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgEditPrefStr::IDD, pParent), m_bChoose(FALSE)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgEditPrefStr)
|
||||
m_strDescription = _T("");
|
||||
m_strPrefName = _T("");
|
||||
m_strValue = _T("");
|
||||
m_bLocked = FALSE;
|
||||
m_bValue = FALSE;
|
||||
m_strInstallFile = _T("");
|
||||
m_strPrefFile = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CDlgEditPrefStr::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgEditPrefStr)
|
||||
DDX_Control(pDX, IDC_VALLIST, m_listValue);
|
||||
DDX_Control(pDX, IDC_VALCHECK, m_checkValue);
|
||||
DDX_Control(pDX, IDC_VALUE, m_editValue);
|
||||
DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription);
|
||||
DDX_Text(pDX, IDC_PREFNAME, m_strPrefName);
|
||||
DDX_Text(pDX, IDC_VALUE, m_strValue);
|
||||
DDX_Check(pDX, IDC_LOCKED, m_bLocked);
|
||||
DDX_Check(pDX, IDC_VALCHECK, m_bValue);
|
||||
DDX_Text(pDX, IDC_INSTALLFILE, m_strInstallFile);
|
||||
DDX_Text(pDX, IDC_PREFFILE, m_strPrefFile);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgEditPrefStr, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgEditPrefStr)
|
||||
ON_WM_CREATE()
|
||||
ON_WM_CANCELMODE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgEditPrefStr message handlers
|
||||
|
||||
int CDlgEditPrefStr::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
if (CDialog::OnCreate(lpCreateStruct) == -1)
|
||||
return -1;
|
||||
|
||||
SetWindowText(m_strTitle);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL CDlgEditPrefStr::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
BOOL retval = CDialog::PreCreateWindow(cs);
|
||||
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
BOOL CDlgEditPrefStr::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
if (m_bChoose)
|
||||
{
|
||||
m_editValue.ShowWindow(SW_HIDE);
|
||||
m_listValue.ShowWindow(SW_SHOW);
|
||||
m_checkValue.ShowWindow(SW_HIDE);
|
||||
|
||||
// The list of choices comes in as an array of CStrings,
|
||||
// terminated with an empty one.
|
||||
CString *pstrChoice = m_pstrChoices;
|
||||
while(pstrChoice->GetLength() > 0)
|
||||
{
|
||||
m_listValue.AddString(*pstrChoice);
|
||||
pstrChoice++;
|
||||
}
|
||||
|
||||
m_listValue.SelectString(0, m_strSelectedChoice);
|
||||
}
|
||||
|
||||
else if (m_strType.CompareNoCase("bool") == 0)
|
||||
{
|
||||
m_editValue.ShowWindow(SW_HIDE);
|
||||
m_listValue.ShowWindow(SW_HIDE);
|
||||
m_checkValue.ShowWindow(SW_SHOW);
|
||||
m_checkValue.SetWindowText(m_strTitle);
|
||||
|
||||
if (m_strValue.CompareNoCase("true") == 0)
|
||||
m_checkValue.SetCheck(TRUE);
|
||||
}
|
||||
|
||||
else // string or int type
|
||||
{
|
||||
m_editValue.ShowWindow(SW_SHOW);
|
||||
m_listValue.ShowWindow(SW_HIDE);
|
||||
m_checkValue.ShowWindow(SW_HIDE);
|
||||
}
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
// Caller only has to get value from m_strValue for all types.
|
||||
void CDlgEditPrefStr::OnOK()
|
||||
{
|
||||
// For bool types, convert back to the data string.
|
||||
if (m_strType.CompareNoCase("bool") == 0)
|
||||
{
|
||||
if (m_checkValue.GetCheck())
|
||||
m_editValue.SetWindowText("true");
|
||||
else
|
||||
m_editValue.SetWindowText("false");
|
||||
}
|
||||
// For choose, return the selected list string.
|
||||
else if (m_bChoose)
|
||||
{
|
||||
CString strSelectString;
|
||||
m_listValue.GetLBText(m_listValue.GetCurSel(), strSelectString);
|
||||
m_editValue.SetWindowText(strSelectString);
|
||||
}
|
||||
|
||||
else // string, int type
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
#if !defined(AFX_DLGEDITPREFSTR_H__EA62EAF1_9CF9_474F_AC2E_7AE66DCAF863__INCLUDED_)
|
||||
#define AFX_DLGEDITPREFSTR_H__EA62EAF1_9CF9_474F_AC2E_7AE66DCAF863__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// DlgEditPrefStr.h : header file
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgEditPrefStr dialog
|
||||
|
||||
class CDlgEditPrefStr : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CString m_strSelectedChoice;
|
||||
CString* m_pstrChoices;
|
||||
CString m_strType;
|
||||
CString m_strTitle;
|
||||
CDlgEditPrefStr(CWnd* pParent = NULL); // standard constructor
|
||||
BOOL m_bChoose;
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgEditPrefStr)
|
||||
enum { IDD = IDD_EDITPREF };
|
||||
CComboBox m_listValue;
|
||||
CButton m_checkValue;
|
||||
CEdit m_editValue;
|
||||
CString m_strDescription;
|
||||
CString m_strPrefName;
|
||||
CString m_strValue;
|
||||
CString m_strInstallFile;
|
||||
CString m_strPrefFile;
|
||||
BOOL m_bLocked;
|
||||
BOOL m_bValue;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgEditPrefStr)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgEditPrefStr)
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
virtual BOOL OnInitDialog();
|
||||
virtual void OnOK();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGEDITPREFSTR_H__EA62EAF1_9CF9_474F_AC2E_7AE66DCAF863__INCLUDED_)
|
||||
@@ -1,42 +0,0 @@
|
||||
// DlgFind.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DlgFind.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgFind dialog
|
||||
|
||||
|
||||
CDlgFind::CDlgFind(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgFind::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgFind)
|
||||
m_strFind = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CDlgFind::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgFind)
|
||||
DDX_Text(pDX, IDC_FIND, m_strFind);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgFind, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgFind)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgFind message handlers
|
||||
@@ -1,48 +0,0 @@
|
||||
#if !defined(AFX_DLGFIND_H__1A85D3AB_C7B1_4F91_A9A9_6A1DEECD13E2__INCLUDED_)
|
||||
#define AFX_DLGFIND_H__1A85D3AB_C7B1_4F91_A9A9_6A1DEECD13E2__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// DlgFind.h : header file
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgFind dialog
|
||||
|
||||
class CDlgFind : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CDlgFind(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgFind)
|
||||
enum { IDD = IDD_FIND };
|
||||
CString m_strFind;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgFind)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgFind)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGFIND_H__1A85D3AB_C7B1_4F91_A9A9_6A1DEECD13E2__INCLUDED_)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,6 @@ INCS = -I. \
|
||||
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\DlgEditPrefStr.obj \
|
||||
.\$(OBJDIR)\HelpDlg.obj \
|
||||
.\$(OBJDIR)\ImageDialog.obj \
|
||||
.\$(OBJDIR)\ImgDlg.obj \
|
||||
@@ -56,8 +55,6 @@ OBJS = \
|
||||
.\$(OBJDIR)\NavText.obj \
|
||||
.\$(OBJDIR)\NewConfigDialog.obj \
|
||||
.\$(OBJDIR)\NewDialog.obj \
|
||||
.\$(OBJDIR)\PrefEditView.obj \
|
||||
.\$(OBJDIR)\PrefElement.obj \
|
||||
.\$(OBJDIR)\ProgDlgThread.obj \
|
||||
.\$(OBJDIR)\ProgressDialog.obj \
|
||||
.\$(OBJDIR)\PropSheet.obj \
|
||||
@@ -68,10 +65,6 @@ OBJS = \
|
||||
.\$(OBJDIR)\WizardUI.obj \
|
||||
.\$(OBJDIR)\WizHelp.obj \
|
||||
.\$(OBJDIR)\wizshell.obj \
|
||||
.\$(OBJDIR)\XMLDOMHelper.obj \
|
||||
.\$(OBJDIR)\DlgFind.obj \
|
||||
.\$(OBJDIR)\DlgAdd.obj \
|
||||
.\$(OBJDIR)\PrefGroup.obj \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = $(LLIBS) \
|
||||
|
||||
@@ -1,715 +0,0 @@
|
||||
// PrefEditView.cpp : implementation of the CPrefEditView class
|
||||
//
|
||||
// In this code, the "tree control" is the just that which lives in the view,
|
||||
// and the "prefs tree" is an XML DOM tree representing the preferences and
|
||||
// their layout.
|
||||
//
|
||||
// The key to go from a tree control item to it's corresponding object in the
|
||||
// XML tree is the pref name, which is saved in the tree control item data
|
||||
// area. The code assumes the pref names are unique.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PrefElement.h"
|
||||
#include "PrefEditView.h"
|
||||
#include "DlgEditPrefStr.h"
|
||||
#include "DlgFind.h"
|
||||
#include "DlgAdd.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPrefEditView
|
||||
|
||||
IMPLEMENT_DYNCREATE(CPrefEditView, CTreeView)
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPrefEditView, CTreeView)
|
||||
//{{AFX_MSG_MAP(CPrefEditView)
|
||||
ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk)
|
||||
ON_NOTIFY_REFLECT(NM_RCLICK, OnRclick)
|
||||
ON_WM_CREATE()
|
||||
ON_WM_DESTROY()
|
||||
ON_COMMAND(ID_EDITPREFITEM, OnEditPrefItem)
|
||||
ON_COMMAND(ID_FINDPREF, OnFindPref)
|
||||
ON_COMMAND(ID_FINDNEXTPREF, OnFindNextPref)
|
||||
ON_COMMAND(ID_ADDPREF, OnAddPref)
|
||||
ON_WM_KEYDOWN()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPrefEditView construction/destruction
|
||||
|
||||
// Protected.
|
||||
CPrefEditView::CPrefEditView()
|
||||
: m_pPrefXMLTree(NULL), m_pPrefsList(NULL), m_iNextElement(-1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
CPrefEditView::CPrefEditView(CString strXMLFile)
|
||||
: m_pPrefXMLTree(NULL), m_strXMLFile(strXMLFile), m_pPrefsList(NULL), m_iNextElement(-1)
|
||||
{
|
||||
InitXMLTree();
|
||||
}
|
||||
|
||||
CPrefEditView::~CPrefEditView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOL CPrefEditView::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
|
||||
cs.style |= TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;
|
||||
return CTreeView::PreCreateWindow(cs);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPrefEditView public operations
|
||||
|
||||
// expand the tree, or open the selected item for edit
|
||||
void CPrefEditView::DoOpenItem()
|
||||
{
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hTreeCtrlItem = treeCtrl.GetSelectedItem();
|
||||
if (!treeCtrl.ItemHasChildren(hTreeCtrlItem)) // no children == leaf node == pref
|
||||
{
|
||||
EditSelectedPrefsItem();
|
||||
}
|
||||
else
|
||||
{
|
||||
treeCtrl.Expand(hTreeCtrlItem, TVE_TOGGLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// open the Find Pref dialog
|
||||
void CPrefEditView::DoFindFirst()
|
||||
{
|
||||
OnFindPref();
|
||||
}
|
||||
|
||||
// find next item
|
||||
void CPrefEditView::DoFindNext()
|
||||
{
|
||||
OnFindNextPref();
|
||||
}
|
||||
|
||||
// open the Add Pref dialog
|
||||
void CPrefEditView::DoAdd()
|
||||
{
|
||||
OnAddPref();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPrefEditView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CPrefEditView::AssertValid() const
|
||||
{
|
||||
CTreeView::AssertValid();
|
||||
}
|
||||
|
||||
void CPrefEditView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CTreeView::Dump(dc);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
|
||||
BOOL CPrefEditView::InitXMLTree()
|
||||
{
|
||||
// Create XML DOM instance.
|
||||
HRESULT hr = m_pPrefXMLTree.CreateInstance(__uuidof(DOMDocument));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBox("Error creating MS XML DOM.", "Error", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Load the prefs metadata. This is a representation of the prefs tree as
|
||||
// it should appear in the tree control.
|
||||
if (m_pPrefXMLTree)
|
||||
{
|
||||
CString strPrefsFileURL;
|
||||
strPrefsFileURL.Format("FILE://%s", m_strXMLFile);
|
||||
|
||||
if (!m_pPrefXMLTree->load(strPrefsFileURL.GetBuffer(0)))
|
||||
{
|
||||
CString strError;
|
||||
strError.Format("Error loading preferences metadata %s.", strPrefsFileURL);
|
||||
MessageBox(strError, "Error", MB_OK);
|
||||
m_pPrefXMLTree = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
if (m_pPrefXMLTree->parseError->errorCode != 0)
|
||||
{
|
||||
CString strError;
|
||||
strError.Format("Bad XML in %s.", strPrefsFileURL);
|
||||
MessageBox(strError, "Error", MB_OK);
|
||||
m_pPrefXMLTree = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ItemData in each tree control element was created with new, so we need to
|
||||
// delete it.
|
||||
void CPrefEditView::DeleteTreeCtrl(HTREEITEM hParent)
|
||||
{
|
||||
ASSERT(hParent);
|
||||
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
|
||||
// Delete the CString ojbect we created with new.
|
||||
CString* pstr = (CString*)treeCtrl.GetItemData(hParent);
|
||||
delete pstr;
|
||||
|
||||
// Now call recursively for all children.
|
||||
HTREEITEM hCurrent = treeCtrl.GetNextItem(hParent, TVGN_CHILD);
|
||||
while (hCurrent != NULL)
|
||||
{
|
||||
DeleteTreeCtrl(hCurrent);
|
||||
hCurrent = treeCtrl.GetNextItem(hCurrent, TVGN_NEXT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Given a pref node, add it to the tree ctrl. The pref name is
|
||||
// later used to search for the pref node when the name is selected
|
||||
// for edit.
|
||||
HTREEITEM CPrefEditView::AddNodeToTreeCtrl(IXMLDOMNodePtr prefsTreeNode, HTREEITEM hTreeCtrlParent)
|
||||
{
|
||||
ASSERT(prefsTreeNode != NULL);
|
||||
|
||||
HTREEITEM hNewItem = NULL;
|
||||
|
||||
//MessageBox(prefsTreeNode->xml, "XML", MB_OK);
|
||||
if (prefsTreeNode->nodeType == NODE_ELEMENT)
|
||||
{
|
||||
IXMLDOMElementPtr prefsTreeElement = (IXMLDOMElementPtr)prefsTreeNode;
|
||||
CElementNode elementNode(prefsTreeElement);
|
||||
CString strNodeName = elementNode.GetNodeName();
|
||||
|
||||
if ((strNodeName.CompareNoCase("PREFSGROUP") == 0) || (strNodeName.CompareNoCase("PREF") == 0))
|
||||
{
|
||||
// Will contain the pref name for pref elements, saved in the tree ctrl.
|
||||
CString* pstrPrefName = NULL;
|
||||
|
||||
// Put this element in the tree ctrl.
|
||||
CString strLabel = elementNode.GetAttribute("uiname");
|
||||
|
||||
int imageIndex = 0; // tree ctrl images
|
||||
int imageIndexSel = 0; // 0 is a closed folder
|
||||
|
||||
// If this is a PREF element, create tree ctrl text, and save with a
|
||||
// different image.
|
||||
if (strNodeName.CompareNoCase("PREF") == 0)
|
||||
{
|
||||
|
||||
CPrefElement prefElement(prefsTreeElement);
|
||||
strLabel = prefElement.CreateTreeCtrlLabel();
|
||||
|
||||
if (prefElement.IsLocked())
|
||||
imageIndexSel = imageIndex = 2; // a locked padlock
|
||||
else
|
||||
imageIndexSel = imageIndex = 3; // an unlocked padlock
|
||||
|
||||
|
||||
// This gets deleted in DeleteTreeCtrl(). This is how we get back to
|
||||
// pref node when a tree ctrl node is selected for editing.
|
||||
pstrPrefName = new CString(prefElement.GetAttribute("prefname"));
|
||||
|
||||
}
|
||||
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
hNewItem = treeCtrl.InsertItem( strLabel, imageIndex, imageIndexSel, hTreeCtrlParent, TVI_LAST);
|
||||
|
||||
// Save a pointer to the prefname string so we can find the node in the
|
||||
// pref tree from the tree ctrl when the item is selected for edit.
|
||||
treeCtrl.SetItemData(hNewItem, (DWORD)pstrPrefName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Recursively call for children.
|
||||
IXMLDOMNodeListPtr children = prefsTreeNode->GetchildNodes();
|
||||
if (children)
|
||||
{
|
||||
int numChildren = children->Getlength();
|
||||
for (int i = 0; i < numChildren; i++)
|
||||
{
|
||||
IXMLDOMNodePtr child = children->Getitem(i);
|
||||
AddNodeToTreeCtrl(child, hNewItem);
|
||||
}
|
||||
}
|
||||
|
||||
return hNewItem;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPrefEditView message handlers
|
||||
|
||||
|
||||
// Given the pref name, for example browser.general.example, returns the
|
||||
// prefs tree element for that pref.
|
||||
IXMLDOMElementPtr CPrefEditView::FindElementFromPrefname(CString& rstrPrefString)
|
||||
{
|
||||
ASSERT(rstrPrefString.GetLength() > 0);
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
IXMLDOMNodeListPtr prefsList = m_pPrefXMLTree->getElementsByTagName("PREF");
|
||||
for(int i = 0; i < prefsList->length; i++)
|
||||
{
|
||||
IXMLDOMElementPtr element = prefsList->Getitem(i);
|
||||
CPrefElement elementNode(element);
|
||||
if (rstrPrefString.CompareNoCase(elementNode.GetPrefName()) == 0)
|
||||
return element;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Given a pref element node, returns the tree control item for it.
|
||||
HTREEITEM CPrefEditView::FindTreeItemFromPrefname(HTREEITEM hItem, CString& rstrPrefName)
|
||||
{
|
||||
|
||||
if(!hItem)
|
||||
return NULL;
|
||||
|
||||
// Get the pref name associated with this tree ctrl item.
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
CString* pstrPrefName = (CString*)treeCtrl.GetItemData(hItem);
|
||||
|
||||
if (pstrPrefName && pstrPrefName->CompareNoCase(rstrPrefName) == 0)
|
||||
return hItem;
|
||||
|
||||
HTREEITEM hRet = NULL;
|
||||
HTREEITEM hChild = treeCtrl.GetChildItem(hItem);
|
||||
if(hChild)
|
||||
hRet = FindTreeItemFromPrefname(hChild, rstrPrefName);
|
||||
|
||||
if(hRet == NULL)
|
||||
{
|
||||
HTREEITEM hSibling = treeCtrl.GetNextSiblingItem(hItem);
|
||||
if(hSibling)
|
||||
hRet = FindTreeItemFromPrefname(hSibling, rstrPrefName);
|
||||
}
|
||||
|
||||
return hRet;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Open a dialog to edit the pref.
|
||||
void CPrefEditView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hTreeCtrlItem = treeCtrl.GetSelectedItem();
|
||||
if (!treeCtrl.ItemHasChildren(hTreeCtrlItem)) // no children == leaf node == pref
|
||||
{
|
||||
EditSelectedPrefsItem();
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int CPrefEditView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
// InitXMLTree() has to complete successfully first.
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
if (m_pPrefXMLTree == NULL)
|
||||
return -1;
|
||||
|
||||
if (CTreeView::OnCreate(lpCreateStruct) == -1)
|
||||
return -1;
|
||||
|
||||
// Get the tree control.
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
|
||||
// create the image list for the tree control
|
||||
m_imageList.Create(IDB_TREEIMAGES, 17, 1, RGB(0,255,255));
|
||||
treeCtrl.SetImageList (&m_imageList, TVSIL_NORMAL);
|
||||
|
||||
|
||||
HTREEITEM hRoot = treeCtrl.GetRootItem();
|
||||
if (hRoot)
|
||||
DeleteTreeCtrl(hRoot);
|
||||
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
|
||||
// Load the tree control so it matches the XML tree.
|
||||
AddNodeToTreeCtrl(m_pPrefXMLTree->documentElement, NULL);
|
||||
|
||||
treeCtrl.Expand(treeCtrl.GetRootItem(), TVE_EXPAND);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void CPrefEditView::OnDestroy()
|
||||
{
|
||||
// Clean up tree ctrl pref name memory allocations.
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hRoot = treeCtrl.GetRootItem();
|
||||
if (hRoot)
|
||||
DeleteTreeCtrl(hRoot);
|
||||
|
||||
CTreeView::OnDestroy();
|
||||
|
||||
}
|
||||
|
||||
// Find a pref containing a string in one of its fields.
|
||||
BOOL CPrefEditView::FindFirst(CString& rstrFind)
|
||||
{
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
m_pPrefsList = m_pPrefXMLTree->getElementsByTagName("PREF");
|
||||
m_iNextElement = 0;
|
||||
m_strFind = rstrFind;
|
||||
|
||||
return FindNext();
|
||||
}
|
||||
|
||||
|
||||
// Assumes FindFirst was called first.
|
||||
BOOL CPrefEditView::FindNext()
|
||||
{
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
if (m_pPrefsList == NULL || m_iNextElement == -1)
|
||||
return FALSE;
|
||||
|
||||
while (m_iNextElement < m_pPrefsList->length)
|
||||
{
|
||||
IXMLDOMElementPtr pElement = m_pPrefsList->Getitem(m_iNextElement);
|
||||
|
||||
CPrefElement elementNode(pElement);
|
||||
|
||||
// Find the string in any field (pref name, value, description, etc.)
|
||||
if (elementNode.FindString(m_strFind))
|
||||
{
|
||||
// Select this item.
|
||||
SelectPref(elementNode.GetPrefName());
|
||||
m_iNextElement++;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
m_iNextElement++;
|
||||
}
|
||||
|
||||
m_iNextElement = -1;
|
||||
|
||||
AfxMessageBox("No more matches.", MB_OK);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Save the XML to a file.
|
||||
BOOL CPrefEditView::DoSavePrefsTree(CString strFile)
|
||||
{
|
||||
ASSERT(m_pPrefXMLTree != NULL);
|
||||
|
||||
CElementNode root(m_pPrefXMLTree->documentElement);
|
||||
CString strXML = root.GetXML();
|
||||
|
||||
FILE* fp = fopen(strFile, "w");
|
||||
if (!fp)
|
||||
return FALSE;
|
||||
|
||||
CString strPreamble("<?xml version=\"1.0\"?>");
|
||||
if (!fwrite(strPreamble, strPreamble.GetLength(), 1, fp))
|
||||
return FALSE;
|
||||
|
||||
if (!fwrite(strXML, strXML.GetLength(), 1, fp))
|
||||
return FALSE;
|
||||
|
||||
fclose(fp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Pop up menu for Pref items.
|
||||
void CPrefEditView::ShowPopupMenu( CPoint& point, int submenu )
|
||||
{
|
||||
if (point.x == -1 && point.y == -1)
|
||||
{
|
||||
//keystroke invocation
|
||||
CRect rect;
|
||||
GetClientRect(rect);
|
||||
ClientToScreen(rect);
|
||||
|
||||
point = rect.TopLeft();
|
||||
point.Offset(5, 5);
|
||||
}
|
||||
|
||||
CMenu menu;
|
||||
VERIFY(menu.LoadMenu(IDR_POPUP_PREFTREE_MENU));
|
||||
|
||||
CMenu* pPopup = menu.GetSubMenu(submenu);
|
||||
ASSERT(pPopup != NULL);
|
||||
CWnd* pWndPopupOwner = this;
|
||||
|
||||
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, pWndPopupOwner);
|
||||
}
|
||||
|
||||
// "Edit Pref" context menu command selected.
|
||||
void CPrefEditView::OnEditPrefItem()
|
||||
{
|
||||
EditSelectedPrefsItem();
|
||||
}
|
||||
|
||||
// "Find Pref" context menu command selected.
|
||||
void CPrefEditView::OnFindPref()
|
||||
{
|
||||
CDlgFind dlg;
|
||||
if (dlg.DoModal() == IDOK)
|
||||
if (!dlg.m_strFind.IsEmpty())
|
||||
FindFirst(dlg.m_strFind);
|
||||
}
|
||||
|
||||
// "Find Next Pref" context menu command selected.
|
||||
void CPrefEditView::OnFindNextPref()
|
||||
{
|
||||
// If FindFirst not done before FindNext, call FindFirst first.
|
||||
if (m_iNextElement == -1)
|
||||
OnFindPref();
|
||||
else
|
||||
FindNext();
|
||||
}
|
||||
|
||||
|
||||
// User added prefs go into the root group.
|
||||
HTREEITEM CPrefEditView::AddPref(CString& rstrPrefName, CString& rstrPrefDesc, CString& rstrPrefType)
|
||||
{
|
||||
IXMLDOMNodePtr prefsTreeRootNode = m_pPrefXMLTree->documentElement;
|
||||
|
||||
// Make sure the node is the root node element.
|
||||
if (prefsTreeRootNode->nodeType == NODE_ELEMENT)
|
||||
{
|
||||
// and that it's a group.
|
||||
CElementNode group(prefsTreeRootNode);
|
||||
CString strNodeName = group.GetNodeName();
|
||||
if (strNodeName.CompareNoCase("PREFSGROUP") == 0)
|
||||
{
|
||||
|
||||
// Create an XML element node.
|
||||
IXMLDOMNodePtr newNode = group.AddNode("PREF");
|
||||
|
||||
// Modify it.
|
||||
CPrefElement newPref(newNode);
|
||||
newPref.Initialize(rstrPrefName, rstrPrefDesc, rstrPrefType);
|
||||
|
||||
// Add it to the tree.
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hRoot = treeCtrl.GetRootItem();
|
||||
ASSERT(hRoot);
|
||||
if (hRoot)
|
||||
{
|
||||
HTREEITEM hNewItem = AddNodeToTreeCtrl(newNode, hRoot);
|
||||
treeCtrl.SelectItem(hNewItem);
|
||||
|
||||
EditSelectedPrefsItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Open dialog to add a new pref, then open another to edit it.
|
||||
void CPrefEditView::OnAddPref()
|
||||
{
|
||||
CDlgAdd dlg;
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
if (dlg.m_strPrefName.IsEmpty())
|
||||
return;
|
||||
|
||||
CString strPrefType;
|
||||
if (dlg.m_intPrefType == 0)
|
||||
strPrefType = "string";
|
||||
else if (dlg.m_intPrefType == 1)
|
||||
strPrefType = "int";
|
||||
else
|
||||
strPrefType = "bool";
|
||||
|
||||
// Disallow if the pref name already exists.
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hRoot = treeCtrl.GetRootItem();
|
||||
HTREEITEM hTreeCtrlItem = FindTreeItemFromPrefname(hRoot, dlg.m_strPrefName);
|
||||
if (hTreeCtrlItem)
|
||||
{
|
||||
MessageBox("A pref of this name already exists.", MB_OK);
|
||||
treeCtrl.SelectItem(hTreeCtrlItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddPref(dlg.m_strPrefName, dlg.m_strPrefDesc, strPrefType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Open the edit dialog box for the selected pref item. A pref should be selected,
|
||||
// not a group.
|
||||
void CPrefEditView::EditSelectedPrefsItem()
|
||||
{
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hTreeCtrlItem = treeCtrl.GetSelectedItem();
|
||||
|
||||
ASSERT(!treeCtrl.ItemHasChildren(hTreeCtrlItem)); // no children == leaf node == pref
|
||||
|
||||
// Can't edit a pref group--only a pref (leaf).
|
||||
if (treeCtrl.ItemHasChildren(hTreeCtrlItem))
|
||||
return;
|
||||
|
||||
// Get the pref name associated with this tree ctrl item.
|
||||
CString* pstrPrefName = (CString*)treeCtrl.GetItemData(hTreeCtrlItem);
|
||||
|
||||
// All prefs should specify the prefname attribute in the XML pref element.
|
||||
// This assertion means that the pref's prefname attribute was not set, or
|
||||
// that perhaps a prefgroup doesn't have any children (if should, otherwise
|
||||
// it shouldn't be a group.)
|
||||
ASSERT(pstrPrefName);
|
||||
|
||||
if (!pstrPrefName)
|
||||
return;
|
||||
|
||||
// Get the pref tree node with that same pref name.
|
||||
IXMLDOMElementPtr prefsTreeElement = FindElementFromPrefname(*pstrPrefName);
|
||||
if (prefsTreeElement)
|
||||
{
|
||||
CPrefElement elementNode(prefsTreeElement);
|
||||
CString* pstrChoices = elementNode.MakeChoiceStringArray();
|
||||
|
||||
CDlgEditPrefStr dlg;
|
||||
dlg.m_strType = elementNode.GetPrefType();
|
||||
dlg.m_strTitle = elementNode.GetUIName();
|
||||
dlg.m_strDescription = elementNode.GetPrefDescription();
|
||||
dlg.m_strPrefName = *pstrPrefName;
|
||||
dlg.m_strValue = elementNode.GetPrefValue();
|
||||
dlg.m_bLocked = elementNode.IsLocked();
|
||||
dlg.m_pstrChoices = pstrChoices;
|
||||
dlg.m_strSelectedChoice = elementNode.GetSelectedChoiceString();
|
||||
dlg.m_strPrefFile = elementNode.GetPrefFile();
|
||||
dlg.m_strInstallFile = elementNode.GetInstallFile();
|
||||
dlg.m_bChoose = elementNode.IsChoose();
|
||||
|
||||
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
|
||||
// Adjust the prefs tree to reflect the changes. The dialog always
|
||||
// sets m_strValue to a string which can go directly into the prefs
|
||||
// tree element. For example, bools set 'true' or 'false' and choices
|
||||
// set '0' or '1' or whatever the value for the selected choice.
|
||||
elementNode.SetPrefValue(dlg.m_strValue);
|
||||
elementNode.SetLocked(dlg.m_bLocked);
|
||||
elementNode.SetPrefFile(dlg.m_strPrefFile);
|
||||
elementNode.SetInstallFile(dlg.m_strInstallFile);
|
||||
|
||||
// Adjust the tree control to reflect the changes.
|
||||
treeCtrl.SetItemText(hTreeCtrlItem, elementNode.CreateTreeCtrlLabel());
|
||||
treeCtrl.SetItemImage(hTreeCtrlItem, dlg.m_bLocked? 2 : 3, dlg.m_bLocked? 2 : 3);
|
||||
|
||||
}
|
||||
|
||||
delete [] pstrChoices;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// This is to make context menus work properly--there is a quirk in
|
||||
// CTreeView where you have to double-right click for context menus
|
||||
// to work.
|
||||
void CPrefEditView::OnRclick(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
CTreeCtrl & treeCtrl = GetTreeCtrl();
|
||||
|
||||
// Get the cursor position for this message
|
||||
DWORD dwPos = GetMessagePos();
|
||||
|
||||
// Convert the coords into a CPoint structure
|
||||
CPoint pt(LOWORD( dwPos ), HIWORD( dwPos ));
|
||||
CPoint spt;
|
||||
|
||||
spt = pt;
|
||||
|
||||
// convert to screen coords for the hittesting to work
|
||||
treeCtrl.ScreenToClient( &spt );
|
||||
|
||||
UINT test;
|
||||
HTREEITEM hTreeCtrlItem = treeCtrl.HitTest(spt, &test);
|
||||
|
||||
if (hTreeCtrlItem != NULL)
|
||||
{
|
||||
// Is the click actually *on* the item?
|
||||
if (test & TVHT_ONITEM)
|
||||
{
|
||||
// Select the item.
|
||||
treeCtrl.SelectItem(hTreeCtrlItem);
|
||||
|
||||
int submenu;
|
||||
if (!treeCtrl.ItemHasChildren(hTreeCtrlItem)) // no children == leaf node == pref
|
||||
submenu = 0;
|
||||
else
|
||||
submenu = 1;
|
||||
|
||||
ShowPopupMenu(pt, submenu);
|
||||
}
|
||||
}
|
||||
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
// Given a pref name, select the tree control item with that pref name.
|
||||
void CPrefEditView::SelectPref(CString& rstrPrefName)
|
||||
{
|
||||
CTreeCtrl &treeCtrl = GetTreeCtrl();
|
||||
HTREEITEM hRoot = treeCtrl.GetRootItem();
|
||||
|
||||
HTREEITEM hTreeCtrlItem = FindTreeItemFromPrefname(hRoot, rstrPrefName);
|
||||
treeCtrl.SelectItem(hTreeCtrlItem);
|
||||
}
|
||||
|
||||
void CPrefEditView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
|
||||
{
|
||||
if (nChar == VK_F3)
|
||||
{
|
||||
OnFindNextPref();
|
||||
}
|
||||
|
||||
else if ((nChar == 0x46) && GetAsyncKeyState(VK_CONTROL)) // Ctrl+F
|
||||
{
|
||||
OnFindPref();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
CTreeView::OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
// PrefEditView.h : interface of the CPrefEditView class
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_PREFEDITVIEW_H__6ACBEE69_AA14_43BA_B736_DF17EA66A7CE__INCLUDED_)
|
||||
#define AFX_PREFEDITVIEW_H__6ACBEE69_AA14_43BA_B736_DF17EA66A7CE__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#import "msxml.dll"
|
||||
using namespace MSXML;
|
||||
|
||||
#include <afxcview.h>
|
||||
#include "XMLDOMHelper.h"
|
||||
|
||||
|
||||
class CPrefEditView : public CTreeView
|
||||
{
|
||||
protected:
|
||||
CPrefEditView();
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
CPrefEditView(CString strXMLFile);
|
||||
DECLARE_DYNCREATE(CPrefEditView)
|
||||
|
||||
// Operations
|
||||
public:
|
||||
|
||||
BOOL DoSavePrefsTree(CString strFileName); // save the XML to a file
|
||||
void DoOpenItem(); // expand the tree, or open the selected item for edit
|
||||
void DoFindFirst(); // open the Find Pref dialog
|
||||
void DoFindNext(); // find next item
|
||||
void DoAdd(); // open the Add Pref dialog
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPrefEditView)
|
||||
public:
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
virtual ~CPrefEditView();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
protected:
|
||||
//{{AFX_MSG(CPrefEditView)
|
||||
afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnEditPrefItem();
|
||||
afx_msg void OnFindPref();
|
||||
afx_msg void OnFindNextPref();
|
||||
afx_msg void OnAddPref();
|
||||
afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
CImageList m_imageList; // padlocks to show which prefs are locked
|
||||
IXMLDOMDocumentPtr m_pPrefXMLTree; // the actual XML tree which describes the tree control contents
|
||||
CString m_strXMLFile; // the XML file used to load the m_pPrefXMLTree, and hence the tree control
|
||||
|
||||
// Stuff for Find and FindNext.
|
||||
IXMLDOMNodeListPtr m_pPrefsList;
|
||||
int m_iNextElement;
|
||||
CString m_strFind;
|
||||
BOOL FindFirst(CString& rstrFind);
|
||||
BOOL FindNext();
|
||||
|
||||
|
||||
BOOL InitXMLTree();
|
||||
HTREEITEM AddNodeToTreeCtrl(IXMLDOMNodePtr prefsTreeNode, HTREEITEM hTreeCtrlParent);
|
||||
HTREEITEM FindTreeItemFromPrefname(HTREEITEM hItem, CString& rstrPrefName);
|
||||
IXMLDOMElementPtr FindElementFromPrefname(CString& rstrPrefString);
|
||||
void SelectPref(CString& rstrPrefName);
|
||||
void DeleteTreeCtrl(HTREEITEM hParent);
|
||||
|
||||
HTREEITEM AddPref(CString& rstrPrefName, CString& rstrPrefDesc, CString& rstrPrefType);
|
||||
|
||||
void ShowPopupMenu( CPoint& point, int submenu );
|
||||
void EditSelectedPrefsItem();
|
||||
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_PREFEDITVIEW_H__6ACBEE69_AA14_43BA_B736_DF17EA66A7CE__INCLUDED_)
|
||||
@@ -1,292 +0,0 @@
|
||||
// PrefElement.cpp: implementation of the CPrefElement class.
|
||||
//
|
||||
// This is a class with helper functions for the preferences metadata
|
||||
// XML.
|
||||
//
|
||||
// XML Conventions:
|
||||
// Element tags are in CAPS.
|
||||
// Attribute names are in lower case.
|
||||
// When writing bools, use lower case "true" and "false".
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PrefElement.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CPrefElement::CPrefElement(IXMLDOMElementPtr element)
|
||||
: CElementNode(element)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CPrefElement::~CPrefElement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// For a newly created node, initialize it's settings.
|
||||
void CPrefElement::Initialize(CString strPrefName, CString strPrefDesc, CString strPrefType)
|
||||
{
|
||||
SetAttribute("uiname", strPrefName);
|
||||
SetAttribute("prefname", strPrefName);
|
||||
SetAttribute("description", strPrefDesc);
|
||||
SetAttribute("type", strPrefType);
|
||||
SetAttribute("lockable", "true");
|
||||
|
||||
SetLocked(FALSE);
|
||||
SetInstallFile("browser.xpi");
|
||||
SetPrefFile("bin/defaults/pref/all-ns.js");
|
||||
|
||||
if (strPrefType.CompareNoCase("int") == 0)
|
||||
SetPrefValue("0");
|
||||
else if (strPrefType.CompareNoCase("bool") == 0)
|
||||
SetPrefValue("true");
|
||||
else
|
||||
SetPrefValue("");
|
||||
}
|
||||
|
||||
// For a pref node element, returns a string which is used for the tree ctrl
|
||||
// label.
|
||||
CString CPrefElement::CreateTreeCtrlLabel()
|
||||
{
|
||||
CString strLabel = GetAttribute("uiname");
|
||||
CString strValue = GetChildElementValue("VALUE");
|
||||
|
||||
if (IsChoose())
|
||||
{
|
||||
strValue = GetSelectedChoiceString();
|
||||
}
|
||||
|
||||
CString strRetVal;
|
||||
|
||||
strRetVal.Format("%s [%s]", strLabel, strValue);
|
||||
|
||||
return strRetVal;
|
||||
}
|
||||
|
||||
// Check to see if the pref element is locked.
|
||||
BOOL CPrefElement::IsLocked()
|
||||
{
|
||||
CString strVal = GetChildElementValue("LOCKED");
|
||||
return (strVal.CompareNoCase("true") == 0);
|
||||
}
|
||||
|
||||
// Lock the pref element.
|
||||
void CPrefElement::SetLocked(BOOL bLocked)
|
||||
{
|
||||
SetChildElementValue("LOCKED", bLocked? "true": "false");
|
||||
}
|
||||
|
||||
|
||||
// Build a list of choices from the element to pass to the edit dialog.
|
||||
// Returns an array of CStrings. Caller must delete.
|
||||
CString* CPrefElement::MakeChoiceStringArray()
|
||||
{
|
||||
CString* choices = NULL;
|
||||
|
||||
IXMLDOMNodeListPtr choiceNodes = m_element->getElementsByTagName("CHOICE");
|
||||
if (choiceNodes)
|
||||
{
|
||||
// Create an array of CString pointers.
|
||||
int numChoices = choiceNodes->length;
|
||||
choices = new CString[numChoices + 1];
|
||||
for (int i = 0; i < numChoices; i++)
|
||||
{
|
||||
IXMLDOMElementPtr element = choiceNodes->Getitem(i);
|
||||
CElementNode elementNode(element);
|
||||
choices[i] = elementNode.GetAttribute("uiname");
|
||||
}
|
||||
choices[numChoices] = "";
|
||||
}
|
||||
|
||||
return choices;
|
||||
}
|
||||
|
||||
// Get the ui name of the selected choice for this pref.
|
||||
CString CPrefElement::GetSelectedChoiceString()
|
||||
{
|
||||
CString strVal = GetPrefValue();
|
||||
|
||||
IXMLDOMNodeListPtr choiceNodes = m_element->getElementsByTagName("CHOICE");
|
||||
if (choiceNodes)
|
||||
{
|
||||
int numChoices = choiceNodes->length;
|
||||
for (int i = 0; i < numChoices; i++)
|
||||
{
|
||||
IXMLDOMElementPtr element = choiceNodes->Getitem(i);
|
||||
CElementNode elementNode(element);
|
||||
if (strVal.CompareNoCase(elementNode.GetAttribute("value")) == 0)
|
||||
{
|
||||
return elementNode.GetAttribute("uiname");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
CString CPrefElement::GetValueFromChoiceString(CString strChoiceString)
|
||||
{
|
||||
IXMLDOMNodeListPtr choiceNodes = m_element->getElementsByTagName("CHOICE");
|
||||
if (choiceNodes)
|
||||
{
|
||||
int numChoices = choiceNodes->length;
|
||||
for (int i = 0; i < numChoices; i++)
|
||||
{
|
||||
IXMLDOMElementPtr element = choiceNodes->Getitem(i);
|
||||
CElementNode elementNode(element);
|
||||
if (strChoiceString.CompareNoCase(elementNode.GetAttribute("uiname")) == 0)
|
||||
{
|
||||
return elementNode.GetAttribute("value");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// Get the ui name of the pref.
|
||||
CString CPrefElement::GetUIName()
|
||||
{
|
||||
return GetAttribute("uiname");
|
||||
}
|
||||
|
||||
// Get the value of the pref.
|
||||
CString CPrefElement::GetPrefValue()
|
||||
{
|
||||
return GetChildElementValue("VALUE");
|
||||
}
|
||||
|
||||
// Set the value of the pref. For "choose", pass
|
||||
// the uiname string, and this fuction will convert
|
||||
// to the correct value.
|
||||
void CPrefElement::SetPrefValue(CString strValue)
|
||||
{
|
||||
if (IsChoose())
|
||||
{
|
||||
SetChildElementValue("VALUE", GetValueFromChoiceString(strValue));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
SetChildElementValue("VALUE", strValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Get the Mozilla name of the pref.
|
||||
CString CPrefElement::GetPrefName()
|
||||
{
|
||||
return GetAttribute("prefname");
|
||||
}
|
||||
|
||||
// Get the type of the pref. bool, string, int
|
||||
CString CPrefElement::GetPrefType()
|
||||
{
|
||||
return GetAttribute("type");
|
||||
}
|
||||
|
||||
// Get a long description of the pref.
|
||||
CString CPrefElement::GetPrefDescription()
|
||||
{
|
||||
return GetAttribute("description");
|
||||
}
|
||||
|
||||
|
||||
// Return name of installation file.
|
||||
CString CPrefElement::GetInstallFile()
|
||||
{
|
||||
return GetChildElementValue("INSTALLATIONFILE");
|
||||
}
|
||||
|
||||
// Set name of installation file.
|
||||
void CPrefElement::SetInstallFile(CString strInstallFile)
|
||||
{
|
||||
SetChildElementValue("INSTALLATIONFILE", strInstallFile);
|
||||
}
|
||||
|
||||
// Return name of pref file.
|
||||
CString CPrefElement::GetPrefFile()
|
||||
{
|
||||
return GetChildElementValue("PREFFILE");
|
||||
}
|
||||
|
||||
// Set name of pref file.
|
||||
void CPrefElement::SetPrefFile(CString strPrefFile)
|
||||
{
|
||||
SetChildElementValue("PREFFILE", strPrefFile);
|
||||
}
|
||||
|
||||
// Return true if this is a chooser type pref.
|
||||
BOOL CPrefElement::IsChoose()
|
||||
{
|
||||
return ChildExists("CHOICES");
|
||||
}
|
||||
|
||||
// Return TRUE if the search string exists in any
|
||||
// of the prefs fields.
|
||||
BOOL CPrefElement::FindString(CString strFind)
|
||||
{
|
||||
strFind.MakeUpper();
|
||||
|
||||
CString str = GetUIName();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetPrefValue();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetPrefName();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetPrefType();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetPrefDescription();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetInstallFile();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
str = GetPrefFile();
|
||||
str.MakeUpper();
|
||||
if (str.Find(strFind) >= 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CPrefElement::SetSelected(BOOL bSelected)
|
||||
{
|
||||
SetChildElementValue("SELECTED", bSelected?"true":"false");
|
||||
}
|
||||
|
||||
|
||||
BOOL CPrefElement::IsSelected()
|
||||
{
|
||||
CString strVal = GetChildElementValue("SELECTED");
|
||||
return (strVal.CompareNoCase("true") == 0);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// PrefElement.h: interface for the CPrefElement class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_PREFELEMENT_H__C93E84F5_104A_4218_972D_E2A384749B59__INCLUDED_)
|
||||
#define AFX_PREFELEMENT_H__C93E84F5_104A_4218_972D_E2A384749B59__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "XMLDOMHelper.h"
|
||||
|
||||
class CPrefElement : public CElementNode
|
||||
{
|
||||
public:
|
||||
CPrefElement(IXMLDOMElementPtr element);
|
||||
virtual ~CPrefElement();
|
||||
|
||||
void Initialize(CString strPrefName, CString strPrefDesc, CString strPrefType);
|
||||
CString CreateTreeCtrlLabel();
|
||||
BOOL IsLocked();
|
||||
void SetLocked(BOOL bLocked);
|
||||
CString* MakeChoiceStringArray();
|
||||
CString GetSelectedChoiceString();
|
||||
CString GetUIName();
|
||||
CString GetPrefValue();
|
||||
void SetPrefValue(CString strValue);
|
||||
CString GetPrefName();
|
||||
CString GetPrefType();
|
||||
CString GetPrefDescription();
|
||||
CString GetValueFromChoiceString(CString strChoiceString);
|
||||
CString GetInstallFile();
|
||||
void SetInstallFile(CString strInstallFile);
|
||||
CString GetPrefFile();
|
||||
void SetPrefFile(CString strPrefFile);
|
||||
BOOL IsChoose();
|
||||
BOOL FindString(CString strFind);
|
||||
void SetSelected(BOOL bExpanded);
|
||||
BOOL IsSelected();
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_PREFELEMENT_H__C93E84F5_104A_4218_972D_E2A384749B59__INCLUDED_)
|
||||
@@ -1,33 +0,0 @@
|
||||
// PrefGroup.cpp: implementation of the CPrefGroup class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PrefGroup.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CPrefGroup::CPrefGroup(IXMLDOMElementPtr element)
|
||||
: CElementNode(element)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CPrefGroup::~CPrefGroup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CString CPrefGroup::GetUIName()
|
||||
{
|
||||
return GetAttribute("uiname");
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// PrefGroup.h: interface for the CPrefGroup class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_PREFGROUP_H__D81DF6AF_427E_4AE4_84E8_86ACFEDBE6D3__INCLUDED_)
|
||||
#define AFX_PREFGROUP_H__D81DF6AF_427E_4AE4_84E8_86ACFEDBE6D3__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "XMLDOMHelper.h"
|
||||
|
||||
class CPrefGroup : public CElementNode
|
||||
{
|
||||
public:
|
||||
CPrefGroup(IXMLDOMElementPtr element);
|
||||
virtual ~CPrefGroup();
|
||||
|
||||
CString GetUIName();
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_PREFGROUP_H__D81DF6AF_427E_4AE4_84E8_86ACFEDBE6D3__INCLUDED_)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 1.2 KiB |
@@ -10,61 +10,37 @@
|
||||
#define IDS_STRING103 103
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_BASE_DIALOG 129
|
||||
#define IDD_EDITPREF 130
|
||||
#define IDB_TREEIMAGES 131
|
||||
#define IDD_IMAGE_DIALOG 136
|
||||
#define IDD_DIALOG1 137
|
||||
#define IDD_CREATE_DIALOG 138
|
||||
#define IDD_NEW_DIALOG 140
|
||||
#define IDD_IMG_DLG 141
|
||||
#define IDR_POPUP_PREFTREE_MENU 143
|
||||
#define IDD_FIND 144
|
||||
#define IDR_ACCELERATOR1 145
|
||||
#define IDD_PROGRESS_DLG 146
|
||||
#define IDD_ADDPREF 147
|
||||
#define IDD_DIALOG112 153
|
||||
#define IDD_NEWCONFIG_DIALOG 159
|
||||
#define IDD_DIALOG131 161
|
||||
#define IDC_VALUE 1000
|
||||
#define IDC_DESCRIPTION 1001
|
||||
#define IDC_EDIT1 1001
|
||||
#define IDC_PREFNAME 1002
|
||||
#define IDC_LOCKED 1003
|
||||
#define IDC_TITLE_TEXT 1003
|
||||
#define IDC_VALCHECK 1004
|
||||
#define IDC_BASE_TEXT 1004
|
||||
#define IDC_VALLIST 1005
|
||||
#define IDC_HELP_BUTTON 1005
|
||||
#define IDC_BUTTON1 1007
|
||||
#define ID_HELP_EDIT 1007
|
||||
#define IDC_STATIC1 1008
|
||||
#define IDC_STATIC2 1009
|
||||
#define IDC_INSTALLFILE 1010
|
||||
#define IDC_FIND 1011
|
||||
#define IDC_PREFFILE 1012
|
||||
#define IDC_PREFDESC 1014
|
||||
#define IDC_PREFTYPE_STRING 1015
|
||||
#define IDC_PREFTYPE_INT 1016
|
||||
#define IDC_PREFTYPE_BOOL 1017
|
||||
#define IDC_PREFTYPEGROUP 1018
|
||||
#define IDC_PROGRESS1 1036
|
||||
#define IDC_PROGESSTEXT_STATIC 1037
|
||||
#define IDD_HELP_DLG 1537
|
||||
#define IDD_SUMMARY 1538
|
||||
#define IDD_WIZ_HELP 1539
|
||||
#define IDC_FEEDBACK_BUTTON 0x02000
|
||||
#define ID_EDITPREFITEM 32773
|
||||
#define ID_FINDPREF 32774
|
||||
#define ID_FINDNEXTPREF 32776
|
||||
#define ID_ADDPREF 32777
|
||||
#define IDC_FEEDBACK_BUTTON 0x02000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 148
|
||||
#define _APS_NEXT_COMMAND_VALUE 32778
|
||||
#define _APS_NEXT_CONTROL_VALUE 1019
|
||||
#define _APS_NEXT_RESOURCE_VALUE 142
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1010
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "XMLDOMHelper.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
CElementNode::CElementNode(IXMLDOMElementPtr element)
|
||||
: m_element(element)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CElementNode::ChildExists(CString strTag)
|
||||
{
|
||||
IXMLDOMNodeListPtr prefValNodes = m_element->getElementsByTagName(strTag.GetBuffer(0));
|
||||
if (prefValNodes)
|
||||
return prefValNodes->Getlength() > 0;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CString CElementNode::GetChildElementValue(CString strTag)
|
||||
{
|
||||
_variant_t value;
|
||||
|
||||
IXMLDOMNodeListPtr prefValNodes = m_element->getElementsByTagName(strTag.GetBuffer(0));
|
||||
if (prefValNodes)
|
||||
{
|
||||
IXMLDOMNodePtr prefValNode = prefValNodes->Getitem(0); // should be only one
|
||||
if (prefValNode)
|
||||
{
|
||||
if (prefValNode->childNodes->Getlength() > 0)
|
||||
value = prefValNode->childNodes->Getitem(0)->GetnodeValue(); // get the text node child, which contains the text we want.
|
||||
}
|
||||
}
|
||||
|
||||
return (char*)_bstr_t(value);
|
||||
}
|
||||
|
||||
// Set the text of the child element with the tag strTag. Assumes only one child with this tag.
|
||||
void CElementNode::SetChildElementValue(CString strTag, CString strValue)
|
||||
{
|
||||
_variant_t value = strValue;
|
||||
|
||||
IXMLDOMNodeListPtr prefValNodes = m_element->getElementsByTagName(strTag.GetBuffer(0));
|
||||
if (prefValNodes)
|
||||
{
|
||||
IXMLDOMNodePtr prefValNode = prefValNodes->Getitem(0); // should be only one
|
||||
|
||||
if (prefValNode == NULL)
|
||||
{
|
||||
_variant_t tag = strTag;
|
||||
prefValNode = m_element->GetownerDocument()->createElement(_bstr_t(tag));
|
||||
m_element->appendChild(prefValNode);
|
||||
}
|
||||
|
||||
if (prefValNode)
|
||||
{
|
||||
if (prefValNode->childNodes->Getlength() == 0)
|
||||
{
|
||||
IXMLDOMNodePtr newNode = prefValNode->GetownerDocument()->createTextNode(_bstr_t(value));
|
||||
prefValNode->appendChild(newNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefValNode->childNodes->Getitem(0)->PutnodeValue(value); // get the text node child, which contains the text we want.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
IXMLDOMNodePtr CElementNode::AddNode(CString strTag)
|
||||
{
|
||||
_variant_t tag = strTag;
|
||||
IXMLDOMNodePtr newNode = m_element->GetownerDocument()->createElement(_bstr_t(tag));
|
||||
m_element->appendChild(newNode);
|
||||
return newNode;
|
||||
}
|
||||
|
||||
// Return the value of the specified attribute.
|
||||
CString CElementNode::GetAttribute(CString strAttributeName)
|
||||
{
|
||||
_variant_t attribValue = m_element->getAttribute(strAttributeName.GetBuffer(0));
|
||||
|
||||
if (attribValue.vt == VT_NULL)
|
||||
return "";
|
||||
else
|
||||
return (char*)_bstr_t(attribValue);
|
||||
}
|
||||
|
||||
void CElementNode::SetAttribute(CString strAttributeName, CString strAttributeValue)
|
||||
{
|
||||
_variant_t attributeName = strAttributeName;
|
||||
_variant_t attributeValue = strAttributeValue;
|
||||
|
||||
IXMLDOMAttributePtr attribNode = m_element->getAttributeNode(strAttributeName.GetBuffer(0));
|
||||
if (attribNode == NULL)
|
||||
{
|
||||
|
||||
attribNode = m_element->GetownerDocument()->createAttribute(_bstr_t(attributeName));
|
||||
m_element->setAttributeNode(attribNode);
|
||||
}
|
||||
|
||||
m_element->setAttribute(_bstr_t(attributeName), _bstr_t(attributeValue));
|
||||
}
|
||||
|
||||
// The name of the node.
|
||||
CString CElementNode::GetNodeName()
|
||||
{
|
||||
_bstr_t nodeName = m_element->GetnodeName();
|
||||
return (char*)nodeName;
|
||||
}
|
||||
|
||||
CString CElementNode::GetXML()
|
||||
{
|
||||
_bstr_t xml = m_element->xml;
|
||||
return (char*)xml;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#ifndef XMLDOMHELPER_H
|
||||
#define XMLDOMHELPER_H
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#import "msxml.dll"
|
||||
using namespace MSXML;
|
||||
|
||||
// This is a little class for helping to deal with the XML DOM elements.
|
||||
// It takes care of funny string types and returns everything as CString for
|
||||
// the class user.
|
||||
class CElementNode
|
||||
{
|
||||
public:
|
||||
CElementNode(IXMLDOMElementPtr element);
|
||||
|
||||
CString GetNodeName();
|
||||
CString GetChildElementValue(CString strTag);
|
||||
void SetChildElementValue(CString strTag, CString strValue);
|
||||
CString GetAttribute(CString strAttributeName);
|
||||
void SetAttribute(CString strAttributeName, CString strAttributeValue);
|
||||
CString GetXML();
|
||||
IXMLDOMNodePtr AddNode(CString strTag);
|
||||
BOOL ChildExists(CString strTag);
|
||||
|
||||
protected:
|
||||
IXMLDOMElementPtr m_element;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
198
mozilla/cck/globals/comp.cpp
Normal file
198
mozilla/cck/globals/comp.cpp
Normal file
@@ -0,0 +1,198 @@
|
||||
#include "stdafx.h"
|
||||
#include "globals.h"
|
||||
#include "comp.h"
|
||||
#include <direct.h>
|
||||
|
||||
#define MAX_SIZE 1024
|
||||
|
||||
CString rootPath;
|
||||
CString configName;
|
||||
CString configPath;
|
||||
CString workspacePath;
|
||||
CString cdPath;
|
||||
CString tempPath;
|
||||
CString iniSrcPath;
|
||||
CString iniDstPath;
|
||||
CString scriptPath;
|
||||
CString nscpxpiPath;
|
||||
|
||||
CString linuxOption;
|
||||
CString linuxblobPath;
|
||||
CString linuxDir;
|
||||
CString nsinstPath;
|
||||
CString xpiDir;
|
||||
CString tarfile;
|
||||
CString quotes;
|
||||
|
||||
COMPONENT Components[100];
|
||||
int numComponents;
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
||||
int invisibleCount)
|
||||
{
|
||||
*compNum = 0;
|
||||
int invNum = *compNum;
|
||||
CString componentstr;
|
||||
|
||||
// Get all the component info from each component section
|
||||
char component[MAX_SIZE];
|
||||
char archive[MAX_SIZE];
|
||||
char name[MAX_SIZE];
|
||||
char desc[MAX_SIZE];
|
||||
char attr[MAX_SIZE];
|
||||
char tempcomponentstr[MAX_SIZE];
|
||||
|
||||
componentstr.Format("C%d", *compNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "", component,
|
||||
MAX_SIZE, iniSrcPath);
|
||||
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
iniSrcPath);
|
||||
while (*archive)
|
||||
{
|
||||
GetPrivateProfileString(component, "Description Short", "",
|
||||
name, MAX_SIZE, iniSrcPath);
|
||||
GetPrivateProfileString(component, "Description Long", "",
|
||||
desc, MAX_SIZE, iniSrcPath);
|
||||
GetPrivateProfileString(component, "Attributes", "",
|
||||
attr, MAX_SIZE, iniSrcPath);
|
||||
|
||||
if (strcmp(component, "Component AOD") == 0)
|
||||
strcpy(attr, "SELECTED");
|
||||
|
||||
comps[*compNum].archive = CString(archive);
|
||||
comps[*compNum].compname = component;
|
||||
comps[*compNum].name = CString(name);
|
||||
comps[*compNum].desc = CString(desc);
|
||||
comps[*compNum].selected = (strstr(attr, "SELECTED") != NULL);
|
||||
comps[*compNum].invisible = (strstr(attr, "INVISIBLE") != NULL);
|
||||
comps[*compNum].launchapp = (strstr(attr, "LAUNCHAPP") != NULL);
|
||||
comps[*compNum].additional = (strstr(attr, "ADDITIONAL") != NULL);
|
||||
comps[*compNum].disabled = (strstr(attr, "DISABLED") != NULL);
|
||||
comps[*compNum].forceupgrade = (strstr(attr, "FORCE_UPGRADE") != NULL);
|
||||
comps[*compNum].uncompress = (strstr(attr, "UNCOMPRESS") != NULL);
|
||||
comps[*compNum].downloadonly = (strstr(attr, "DOWNLOAD_ONLY") != NULL);
|
||||
comps[*compNum].unselected = (strstr(attr, "UNSELECTED") != NULL);
|
||||
comps[*compNum].empty = strcmp(attr, "");
|
||||
|
||||
if (!(comps[*compNum].selected && comps[*compNum].invisible &&
|
||||
invisibleCount))
|
||||
{
|
||||
(*compNum)++;
|
||||
invNum++;
|
||||
componentstr.Format("C%d", invNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
component, MAX_SIZE, iniSrcPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
invNum++;
|
||||
componentstr.Format("C%d", invNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
component, MAX_SIZE, iniSrcPath);
|
||||
}
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
iniSrcPath);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int GenerateComponentList(CString parms, WIDGET *curWidget)
|
||||
{
|
||||
rootPath = GetGlobal("Root");
|
||||
configName = GetGlobal("CustomizationList");
|
||||
configPath = rootPath + "Configs\\" + configName;
|
||||
workspacePath = configPath + "\\Workspace";
|
||||
nscpxpiPath;
|
||||
|
||||
linuxOption = GetGlobal("lPlatform");
|
||||
if (linuxOption == "Linux")
|
||||
{
|
||||
linuxblobPath = GetGlobal("LinuxPath");
|
||||
linuxDir = "nscpxpiLinux";
|
||||
nsinstPath = "\\netscape-installer\\xpi";
|
||||
xpiDir = "\\xpi";
|
||||
CString tnscpxpilinuxPath = rootPath + linuxDir;
|
||||
CString nscpxpilinuxPath = tnscpxpilinuxPath;
|
||||
int pathlen = linuxblobPath.GetLength();
|
||||
int pos = linuxblobPath.ReverseFind('\\');
|
||||
pos += 1;
|
||||
CString linuxinstDirPath = linuxblobPath.Left(pos);
|
||||
tarfile = linuxblobPath.Right(pathlen-pos);
|
||||
|
||||
int direxist = GetFileAttributes(nscpxpilinuxPath);
|
||||
if ((direxist == -1) && (linuxblobPath != ""))
|
||||
// nscpxpiLinux directory does not exist
|
||||
{
|
||||
quotes = "\"";
|
||||
char currentdir[_MAX_PATH];
|
||||
_getcwd(currentdir, _MAX_PATH);
|
||||
_chdir(rootPath);
|
||||
_mkdir(linuxDir);
|
||||
_chdir(linuxinstDirPath);
|
||||
tnscpxpilinuxPath.Replace("\\","/");
|
||||
tnscpxpilinuxPath.Replace(":","");
|
||||
tnscpxpilinuxPath.Insert(0,"/cygdrive/");
|
||||
CString command = "tar -zxvf " + tarfile + " -C " + quotes + tnscpxpilinuxPath + quotes;
|
||||
ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE);
|
||||
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
CString tempxpiPath = nscpxpiPath;
|
||||
tempxpiPath.Replace(xpiDir,"");
|
||||
CopyFile(tempxpiPath+"\\Config.ini", nscpxpiPath+"\\Config.ini",
|
||||
FALSE);
|
||||
_chdir(currentdir);
|
||||
}
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL))
|
||||
nscpxpiPath = workspacePath + "\\NSCPXPI";
|
||||
else
|
||||
nscpxpiPath = rootPath + "NSCPXPI";
|
||||
}
|
||||
iniSrcPath = nscpxpiPath + "\\config.ini";
|
||||
|
||||
BuildComponentList(Components, &numComponents, iniSrcPath, 1);
|
||||
|
||||
int i;
|
||||
CString WidgetValue("");
|
||||
for (i=0; i<numComponents; i++)
|
||||
{
|
||||
curWidget->options.name[i] = new char[strlen(Components[i].compname)+1];
|
||||
strcpy(curWidget->options.name[i], Components[i].compname);
|
||||
|
||||
curWidget->options.value[i] = new char[strlen(Components[i].name)+1];
|
||||
strcpy(curWidget->options.value[i], Components[i].name);
|
||||
|
||||
curWidget->optDesc.name[i] = new char[strlen(Components[i].compname)+1];
|
||||
strcpy(curWidget->optDesc.name[i], Components[i].compname);
|
||||
|
||||
curWidget->optDesc.value[i] = new char[strlen(Components[i].desc)+1];
|
||||
strcpy(curWidget->optDesc.value[i], Components[i].desc);
|
||||
|
||||
// INVISIBLE just means not selected, let user decide whether to
|
||||
// include them again. SELECTED components get checkmarks.
|
||||
if (Components[i].selected)
|
||||
{
|
||||
WidgetValue += ",";
|
||||
WidgetValue += Components[i].name;
|
||||
}
|
||||
}
|
||||
|
||||
curWidget->numOfOptions = numComponents;
|
||||
curWidget->numOfOptDesc = numComponents;
|
||||
|
||||
if (curWidget->value.IsEmpty())
|
||||
curWidget->value = WidgetValue;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
20
mozilla/cck/globals/comp.h
Normal file
20
mozilla/cck/globals/comp.h
Normal file
@@ -0,0 +1,20 @@
|
||||
typedef struct s_component {
|
||||
CString archive;
|
||||
CString compname;
|
||||
CString name;
|
||||
CString desc;
|
||||
BOOL selected;
|
||||
BOOL invisible;
|
||||
BOOL launchapp;
|
||||
BOOL additional;
|
||||
BOOL disabled;
|
||||
BOOL forceupgrade;
|
||||
BOOL uncompress;
|
||||
BOOL downloadonly;
|
||||
BOOL unselected;
|
||||
BOOL empty;
|
||||
|
||||
} COMPONENT;
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,int invisibleCount);
|
||||
@@ -137,3 +137,43 @@ void ExecuteCommand(char *command, int showflag, DWORD wait)
|
||||
WaitForSingleObject(processInfo.hProcess, wait);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
void EraseDirectory(CString sPath)
|
||||
{
|
||||
CFileFind finder;
|
||||
CString sFullPath = sPath + "\\*.*";
|
||||
|
||||
BOOL bWorking = finder.FindFile(sFullPath);
|
||||
while (bWorking)
|
||||
{
|
||||
bWorking = finder.FindNextFile();
|
||||
if (finder.IsDots()) continue;
|
||||
if (finder.IsDirectory())
|
||||
{
|
||||
CString dirPath = finder.GetFilePath();
|
||||
EraseDirectory(dirPath);
|
||||
_rmdir(finder.GetFilePath());
|
||||
continue;
|
||||
}
|
||||
_unlink( finder.GetFilePath() );
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(dllexport)
|
||||
CString GetModulePath()
|
||||
{
|
||||
char currPath[MID_SIZE];
|
||||
int i,numBytes;
|
||||
|
||||
// Get the path of the file that was executed
|
||||
numBytes = GetModuleFileName(NULL, currPath, MIN_SIZE);
|
||||
|
||||
// get the cmd path
|
||||
// Remove the filename from the path
|
||||
for (i=numBytes-1;i >= 0 && currPath[i] != '\\';i--);
|
||||
// Terminate command line with 0
|
||||
if (i >= 0)
|
||||
currPath[i+1]= '\0';
|
||||
|
||||
return CString(currPath);
|
||||
}
|
||||
|
||||
@@ -12,3 +12,5 @@ extern "C" __declspec(dllimport) WIDGET* findWidget(CString theName);
|
||||
extern "C" __declspec(dllimport) void CopyDir(CString from, CString to, LPCTSTR extension, int overwrite);
|
||||
extern "C" __declspec(dllexport) void ExecuteCommand(char *command, int showflag, DWORD wait);
|
||||
extern "C" __declspec(dllimport) int GetAttrib(CString theValue, char* attribArray[]);
|
||||
extern "C" __declspec(dllimport) void EraseDirectory(CString sPath);
|
||||
__declspec(dllimport) CString GetModulePath();
|
||||
|
||||
@@ -31,6 +31,7 @@ IS_COMPONENT = 1
|
||||
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\globals.obj \
|
||||
.\$(OBJDIR)\comp.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS= $(LINCS) \
|
||||
@@ -70,8 +71,9 @@ include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
include <$(DEPTH)\cck\InitDist.win>
|
||||
|
||||
export:: $(DLLNAME).h
|
||||
$(MAKE_INSTALL) $(DLLNAME).h ..\include
|
||||
export::
|
||||
$(MAKE_INSTALL) globals.h ..\include
|
||||
$(MAKE_INSTALL) comp.h ..\include
|
||||
|
||||
libs:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib ..\lib
|
||||
|
||||
@@ -60,6 +60,9 @@ int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
||||
GetPrivateProfileString(component, "Attributes", "",
|
||||
attr, MAX_SIZE, iniSrcPath);
|
||||
|
||||
if (strcmp(component, "Component AOD") == 0)
|
||||
strcpy(attr, "SELECTED");
|
||||
|
||||
comps[*compNum].archive = CString(archive);
|
||||
comps[*compNum].compname = component;
|
||||
comps[*compNum].name = CString(name);
|
||||
|
||||
91
mozilla/cck/ib/engine.cpp
Normal file
91
mozilla/cck/ib/engine.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "stdafx.h"
|
||||
#include <Winbase.h>
|
||||
#include <direct.h>
|
||||
#include <stdio.h>
|
||||
#include "ib.h"
|
||||
#include "globals.h"
|
||||
#include "fstream.h"
|
||||
#include <afxtempl.h>
|
||||
#include <afxdisp.h>
|
||||
#include "resource.h"
|
||||
#include "NewDialog.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
CString configPath;
|
||||
CString rootPath;
|
||||
CString templateDir;
|
||||
CString configname;
|
||||
CString configpath;
|
||||
CString che_path;
|
||||
CString che_file;
|
||||
|
||||
|
||||
if(argc == 3)
|
||||
{
|
||||
configPath = argv[2];
|
||||
FillGlobalWidgetArray(configPath);
|
||||
|
||||
if(!strcmp(argv[1], "-c"))
|
||||
{
|
||||
//The option "-c" means that ibengine.exe
|
||||
//was called from wizardmachine.exe
|
||||
|
||||
StartIB();
|
||||
}
|
||||
else if(!strcmp(argv[1], "-u"))
|
||||
{
|
||||
//The option "-u" means that the user is
|
||||
//running ibengine.exe via command line
|
||||
|
||||
rootPath = GetModulePath();
|
||||
templateDir = rootPath + "WSTemplate";
|
||||
configname = GetGlobal("_NewConfigName");
|
||||
configpath = rootPath + "Configs\\" + configname;
|
||||
|
||||
//Grab exact name of the .che file from configPath
|
||||
che_file = configPath;
|
||||
int extractposition = che_file.ReverseFind('\\');
|
||||
extractposition++;
|
||||
extractposition = (che_file.GetLength()) - extractposition;
|
||||
che_file = che_file.Right(extractposition);
|
||||
|
||||
//These are some commands that we only want to run if
|
||||
//ibengine.exe is run at command line
|
||||
|
||||
//Create the config path
|
||||
_mkdir(configpath);
|
||||
|
||||
//Copy files and directories from WSTemplate
|
||||
//to new config directory
|
||||
CopyDir(templateDir, configpath, NULL, FALSE);
|
||||
|
||||
//Copy the .che file given on command line to the
|
||||
//appropriate directory
|
||||
che_path = configpath + "\\" + che_file;
|
||||
CopyFile(configPath, che_path, FALSE);
|
||||
|
||||
StartIB();
|
||||
|
||||
printf("\nInstaller creation is complete. The build is "
|
||||
"in %sConfigs\\%s\\Output\n", rootPath, configname);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\nYou have supplied incorrect command line options. \n"
|
||||
"Please, run either \"WizardMachine.exe\" "
|
||||
"or \"ibengine.exe -u <your_config_file_path>\"\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\nYou have supplied incorrect command line options. \n"
|
||||
"Please, run either \"WizardMachine.exe\" "
|
||||
"or \"ibengine.exe -u <your_config_file_path>\"\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
// Includes
|
||||
#include "stdafx.h"
|
||||
#include <Winbase.h>
|
||||
#include <direct.h>
|
||||
@@ -17,10 +15,6 @@
|
||||
#define CRVALUE 0x0D
|
||||
#define BUF_SIZE 4096
|
||||
|
||||
// for the xml parser used for PrefsTree
|
||||
#import "msxml.dll"
|
||||
using namespace MSXML;
|
||||
|
||||
// Required disk space for Win build
|
||||
#define WDISK_SPACE 27577549
|
||||
// Required disk space for Linux build
|
||||
@@ -696,122 +690,6 @@ int ModifyHashedPref(CString HashedPrefsFile, CString PrefName, CString NewPrefV
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// XML DOM helper. Returns the value of a specified child element.
|
||||
CString GetElementValue(IXMLDOMElementPtr element, CString strTag)
|
||||
{
|
||||
_variant_t value;
|
||||
|
||||
IXMLDOMNodeListPtr prefValNodes = element->getElementsByTagName(strTag.GetBuffer(0));
|
||||
if (prefValNodes)
|
||||
{
|
||||
IXMLDOMNodePtr prefValNode = prefValNodes->Getitem(0); // should be only one
|
||||
if (prefValNode)
|
||||
{
|
||||
if (prefValNode->childNodes->Getlength() > 0)
|
||||
value = prefValNode->childNodes->Getitem(0)->GetnodeValue(); // get the text node child, which contains the text we want.
|
||||
}
|
||||
}
|
||||
|
||||
return (char*)_bstr_t(value);
|
||||
}
|
||||
|
||||
// XML DOM helper. Returns the value of the specified attribute.
|
||||
CString GetAttribute(IXMLDOMElementPtr element, CString strAttributeName)
|
||||
{
|
||||
_variant_t attribValue = element->getAttribute(strAttributeName.GetBuffer(0));
|
||||
|
||||
if (attribValue.vt == VT_NULL)
|
||||
return "";
|
||||
else
|
||||
return (char*)_bstr_t(attribValue);
|
||||
}
|
||||
|
||||
// This processes a prefs tree XML file, adding preferences to install files
|
||||
// as specified in the prefs tree XML file. See PrefsTree.html for file
|
||||
// format details.
|
||||
//
|
||||
// This function can easily be rewriten to parse the XML file by hand if it
|
||||
// needs to be ported to a non-MS OS. The XML is pretty simple.
|
||||
BOOL ProcessPrefsTree(CString strPrefsTreeFile)
|
||||
{
|
||||
|
||||
// Create XML DOM instance.
|
||||
IXMLDOMDocumentPtr prefXMLTree;
|
||||
HRESULT hr = prefXMLTree.CreateInstance(__uuidof(DOMDocument));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
AfxMessageBox("Error creating MS XML DOM.", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Load the prefs metadata. This is a representation of the prefs tree as
|
||||
// it should appear in the tree control.
|
||||
if (prefXMLTree)
|
||||
{
|
||||
CString strPrefsFileURL;
|
||||
strPrefsFileURL.Format("FILE://%s", strPrefsTreeFile);
|
||||
|
||||
if (!prefXMLTree->load(strPrefsFileURL.GetBuffer(0)))
|
||||
{
|
||||
CString strError;
|
||||
strError.Format("Error loading preferences metadata %s.", strPrefsFileURL);
|
||||
AfxMessageBox(strError, MB_OK);
|
||||
prefXMLTree = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
if (prefXMLTree->parseError->errorCode != 0)
|
||||
{
|
||||
CString strError;
|
||||
strError.Format("Bad XML in %s.", strPrefsFileURL);
|
||||
AfxMessageBox(strError, MB_OK);
|
||||
prefXMLTree = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Go through the list of prefs in the xml and write to prefs file for each one.
|
||||
IXMLDOMNodeListPtr prefsList = prefXMLTree->getElementsByTagName("PREF");
|
||||
for(int i = 0; i < prefsList->length; i++)
|
||||
{
|
||||
IXMLDOMElementPtr element = prefsList->Getitem(i);
|
||||
|
||||
CString strPrefName = GetAttribute(element, "prefname");
|
||||
CString strPrefType = GetAttribute(element, "type");
|
||||
CString strPrefValue = GetElementValue(element, "VALUE");
|
||||
CString strLocked = GetElementValue(element, "LOCKED");
|
||||
CString strInstallFile = GetElementValue(element, "INSTALLATIONFILE");
|
||||
CString strPrefFile = GetElementValue(element, "PREFFILE");
|
||||
|
||||
if (strPrefName.IsEmpty() ||
|
||||
strPrefType.IsEmpty() ||
|
||||
strInstallFile.IsEmpty() ||
|
||||
strPrefFile.IsEmpty() )
|
||||
continue;
|
||||
|
||||
ExtractXPIFile(strInstallFile, strPrefFile);
|
||||
|
||||
BOOL bLocked = (strLocked == "true");
|
||||
|
||||
// Should go into a hashed file if prefs file is .cfg.
|
||||
if (strPrefFile.Find(".cfg") > 0)
|
||||
{
|
||||
// hashed
|
||||
ModifyHashedPref(strPrefFile, strPrefName, strPrefValue, strPrefType, bLocked);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// not hashed
|
||||
if ((strPrefType == "int") || (strPrefType == "bool") || (strPrefType == "choose"))
|
||||
ModifyJS2(strPrefFile, strPrefName, strPrefValue, bLocked);
|
||||
|
||||
else // string
|
||||
ModifyJS(strPrefFile, strPrefName, strPrefValue, bLocked);
|
||||
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
int interpret(char *cmd)
|
||||
@@ -992,7 +870,7 @@ int interpret(char *cmd)
|
||||
ModifyHashedPref(xpifile,entity,newvalue, "string", bLockPref);
|
||||
else if (strcmp(cmdname, "modifyHashedPrefInt") == 0)
|
||||
ModifyHashedPref(xpifile,entity,newvalue, "int", bLockPref);
|
||||
else if (strcmp(cmdname, "modifyHashedPrefBool") == 0)
|
||||
else if (strcmp(cmdname, "modifyHashedPrefInt") == 0)
|
||||
ModifyHashedPref(xpifile,entity,newvalue, "bool", bLockPref);
|
||||
else if (strcmp(cmdname, "modifyJS") == 0)
|
||||
ModifyJS(xpifile,entity,newvalue, bLockPref);
|
||||
@@ -1015,13 +893,6 @@ int interpret(char *cmd)
|
||||
else if (strcmp(cmdname, "wrapXPI") == 0)
|
||||
{
|
||||
}
|
||||
else if (strcmp(cmdname, "processPrefsTree") == 0)
|
||||
{
|
||||
|
||||
char *prefsTreeFile = strtok(NULL, ",)");
|
||||
CString fileWithPath = configPath + "\\" + prefsTreeFile;
|
||||
ProcessPrefsTree(fileWithPath);
|
||||
}
|
||||
else
|
||||
return FALSE;//*** We have to handle this condition better.
|
||||
|
||||
@@ -1095,13 +966,17 @@ void invisible()
|
||||
WritePrivateProfileString(Components[i].compname, "Attributes",
|
||||
"UNSELECTED|ADDITIONAL|FORCE_UPGRADE", iniDstPath);
|
||||
else if (!(Components[i].disabled) && !(Components[i].additional) &&
|
||||
!(Components[i].invisible))
|
||||
Components[i].forceupgrade && !(Components[i].invisible))
|
||||
WritePrivateProfileString(Components[i].compname, "Attributes",
|
||||
"SELECTED|FORCE_UPGRADE", iniDstPath);
|
||||
else if (Components[i].additional && Components[i].launchapp &&
|
||||
Components[i].uncompress && !(Components[i].invisible))
|
||||
WritePrivateProfileString(Components[i].compname, "Attributes",
|
||||
"SELECTED|UNCOMPRESS|LAUNCHAPP|ADDITIONAL", iniDstPath);
|
||||
else if (!(Components[i].additional) &&
|
||||
!(Components[i].forceupgrade) && !(Components[i].invisible))
|
||||
WritePrivateProfileString(Components[i].compname, "Attributes",
|
||||
"SELECTED|INVISIBLE", iniDstPath);
|
||||
componentOrder++;
|
||||
}
|
||||
else
|
||||
@@ -1364,28 +1239,6 @@ CString GetBrowser(void)
|
||||
return retflag;
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
void EraseDirectory(CString sPath)
|
||||
{
|
||||
CFileFind finder;
|
||||
CString sFullPath = sPath + "\\*.*";
|
||||
|
||||
BOOL bWorking = finder.FindFile(sFullPath);
|
||||
while (bWorking)
|
||||
{
|
||||
bWorking = finder.FindNextFile();
|
||||
if (finder.IsDots()) continue;
|
||||
if (finder.IsDirectory())
|
||||
{
|
||||
CString dirPath = finder.GetFilePath();
|
||||
EraseDirectory(dirPath);
|
||||
_rmdir(finder.GetFilePath());
|
||||
continue;
|
||||
}
|
||||
_unlink( finder.GetFilePath() );
|
||||
}
|
||||
}
|
||||
|
||||
void CopyDirectory(CString source, CString dest, BOOL subdir)
|
||||
// Copy files in subdirectories if the subdir flag is set (equal to 1).
|
||||
{
|
||||
@@ -1515,15 +1368,60 @@ void DiskSpaceAlert(ULONGLONG required, ULONGLONG available)
|
||||
AfxMessageBox("Not enough disk space. Required: "+requiredSpace+" bytes. Available: "+availableSpace+" bytes.", MB_OK);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int StartIB(CString parms, WIDGET *curWidget)
|
||||
|
||||
|
||||
BOOL FillGlobalWidgetArray(CString file)
|
||||
{
|
||||
char buffer[MAX_SIZE] = {'\0'};
|
||||
CString name = "";
|
||||
CString value = "";
|
||||
|
||||
FILE *globs = fopen(file, "r");
|
||||
if (!globs)
|
||||
return FALSE;
|
||||
|
||||
while(!feof(globs))
|
||||
{
|
||||
while(fgets(buffer, MAX_SIZE, globs))
|
||||
{
|
||||
if (strstr(buffer, "="))
|
||||
{
|
||||
name = CString(strtok(buffer,"="));
|
||||
value = CString(strtok(NULL,"="));
|
||||
value.TrimRight();
|
||||
if (value.Find("%") >= 0) {
|
||||
//We should never enter this condition via wizardmachine.exe
|
||||
AfxMessageBox("The current .che file called: "+file+" contains some unfilled parameters."
|
||||
"These parameters will appear between two percent (%) signs such as %Root%"
|
||||
"Please replace these parameters with their appropriate values and restart"
|
||||
"the program", MB_OK);
|
||||
// value=theInterpreter->replaceVars((char *) (LPCSTR) value,NULL);
|
||||
}
|
||||
|
||||
WIDGET* w = SetGlobal(name, value);
|
||||
if (w)
|
||||
w->cached = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(globs);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int StartIB(/*CString parms, WIDGET *curWidget*/)
|
||||
{
|
||||
char *fgetsrv;
|
||||
int rv = TRUE;
|
||||
char olddir[1024];
|
||||
componentOrder =0;
|
||||
rootPath = GetGlobal("Root");
|
||||
configName = GetGlobal("CustomizationList");
|
||||
rootPath = GetModulePath();
|
||||
SetGlobal("Root", rootPath);
|
||||
configName = GetGlobal("_NewConfigName");
|
||||
SetGlobal("CustomizationList", configName);
|
||||
configPath = rootPath + "Configs\\" + configName;
|
||||
outputPath = configPath + "\\Output";
|
||||
cdPath = configPath + "\\Output\\Core";
|
||||
@@ -1553,14 +1451,11 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
if (linuxOption == "Linux")
|
||||
{
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
char currentdir[_MAX_PATH];
|
||||
_getcwd(currentdir,_MAX_PATH);
|
||||
_mkdir(tempPath);
|
||||
_chdir(tempPath);
|
||||
_mkdir(templinuxDir);
|
||||
_chdir(templinuxDir);
|
||||
_mkdir(nsinstallerDir);
|
||||
_chdir(nsinstallerDir);
|
||||
|
||||
CString tPath = nscpxpiPath;
|
||||
tPath.Replace(xpiDir,"");
|
||||
@@ -1575,10 +1470,12 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
templinuxPath+"\\xpi\\recommended.start", FALSE);
|
||||
CopyFile(nscpxpiPath+"\\recommended.end",
|
||||
templinuxPath+"\\xpi\\recommended.end", FALSE);
|
||||
|
||||
_chdir(currentdir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
iniSrcPath = nscpxpiPath + "\\config.ini";
|
||||
|
||||
//Check for disk space before continuing
|
||||
|
||||
ULARGE_INTEGER nTotalBytes, nTotalFreeBytes, nTotalAvailable;
|
||||
@@ -1700,16 +1597,6 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
iniDstPath = outputPath + "\\config.ini";
|
||||
xpiDstPath = outputPath;
|
||||
}
|
||||
CNewDialog newprog;
|
||||
newprog.Create(IDD_NEW_DIALOG,NULL );
|
||||
newprog.ShowWindow(SW_SHOW);
|
||||
/////////////////////////////
|
||||
CWnd * dlg;
|
||||
CRect tmpRect = CRect(7,7,173,13);
|
||||
dlg = newprog.GetDlgItem(IDC_BASE_TEXT);
|
||||
CWnd* pwnd = newprog.GetDlgItem(IDD_NEW_DIALOG);
|
||||
dlg->SetWindowText(" Customization is in Progress");
|
||||
|
||||
/////////////////////////////
|
||||
_mkdir((char *)(LPCTSTR) tempPath);
|
||||
_mkdir((char *)(LPCTSTR) workspacePath);
|
||||
@@ -1757,16 +1644,13 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n |||||||||");
|
||||
|
||||
// Put all the extracted files back into their new XPI homes
|
||||
ReplaceJARFiles();
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||");
|
||||
|
||||
ReplaceXPIFiles();
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||");
|
||||
|
||||
// Copy remaining default installer files into config
|
||||
// preserving any existing files that we created already
|
||||
@@ -1835,30 +1719,23 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
}
|
||||
|
||||
// Didn't work...
|
||||
dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||");
|
||||
|
||||
if (linuxOption == "Linux")
|
||||
{
|
||||
LinuxInvisible();
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||");
|
||||
AddThirdParty();
|
||||
dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||");
|
||||
CreateLinuxInstaller();
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||||||||||||||||||||");
|
||||
}
|
||||
else
|
||||
{
|
||||
invisible();
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||");
|
||||
|
||||
AddThirdParty();
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||");
|
||||
|
||||
ReplaceINIFile();
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||||||||||||||||||||");
|
||||
}
|
||||
SetCurrentDirectory(olddir);
|
||||
CString TargetDir = GetGlobal("Root");
|
||||
@@ -1866,8 +1743,6 @@ int StartIB(CString parms, WIDGET *curWidget)
|
||||
CString MozBrowser = GetBrowser();
|
||||
// CreateShortcut(MozBrowser, TargetFile, "HelpLink", TargetDir, FALSE);
|
||||
|
||||
dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||");
|
||||
newprog.DestroyWindow();
|
||||
EraseDirectory(tempPath);
|
||||
_chdir(configPath);
|
||||
_rmdir("Temp");
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define MID_SIZE 512
|
||||
|
||||
typedef struct s_xpi {
|
||||
CString xpiname;
|
||||
CString filename;
|
||||
@@ -7,6 +9,8 @@ typedef struct s_jar {
|
||||
CString filename;
|
||||
} JAR;
|
||||
|
||||
int StartIB(void);
|
||||
BOOL FillGlobalWidgetArray(CString);
|
||||
void CreateRshell(void);
|
||||
void CreateHelpMenu(void);
|
||||
void CreateBuddyList(void);
|
||||
|
||||
@@ -35,9 +35,9 @@ OBJS= \
|
||||
.\$(OBJDIR)\NewDialog.obj \
|
||||
.\$(OBJDIR)\wizshell.obj \
|
||||
.\$(OBJDIR)\ib.obj \
|
||||
.\$(OBJDIR)\comp.obj \
|
||||
.\$(OBJDIR)\Helpmenu.obj \
|
||||
.\$(OBJDIR)\buddylist.obj \
|
||||
.\$(OBJDIR)\engine.obj \
|
||||
$(NULL)
|
||||
|
||||
# -I$(DEPTH)\xpinstall\wizard\windows\setup \
|
||||
@@ -47,9 +47,13 @@ LINCS= $(LINCS) \
|
||||
-I$(DIST)\$(OBJDIR)\include \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = ibengine
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = EXE
|
||||
EXENAME = ibengine
|
||||
MAPFILE = ib.map
|
||||
RESFILE = ib.res
|
||||
PDBFILE = $(EXENAME)
|
||||
|
||||
PROGRAM=.\$(OBJDIR)\$(EXENAME).exe
|
||||
|
||||
CFLAGS = \
|
||||
-W3 \
|
||||
@@ -80,15 +84,17 @@ include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
include <$(DEPTH)\cck\InitDist.win>
|
||||
|
||||
libs:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(CCKDIST)\CCKTool
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib ..\lib
|
||||
libs:: $(PROGRAM)
|
||||
$(MAKE_INSTALL) $(PROGRAM) $(CCKDIST)\CCKTool
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(EXENAME).lib ..\lib
|
||||
|
||||
export::
|
||||
$(MAKE_INSTALL) script.ib $(CCKDIST)\CCKTool
|
||||
$(MAKE_INSTALL) help1.txt $(CCKDIST)\CCKTool
|
||||
$(MAKE_INSTALL) help2.txt $(CCKDIST)\CCKTool
|
||||
|
||||
$(PROGRAM):: $(OBJDIR) $(OBJS) $(RESFILE)
|
||||
|
||||
#clobber::
|
||||
# rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
# rm -f $(DIST)\lib\$(DLLNAME).lib
|
||||
|
||||
@@ -72,7 +72,16 @@ BOOL Config(CString globalsName, CString DialogTitle, WIDGET* curWidget)
|
||||
|
||||
SetGlobal(globalsName, configField);
|
||||
SetGlobal(targetWid, configField);
|
||||
|
||||
|
||||
// Making custom config point to files in its own workspace
|
||||
SetGlobal("LargeAnimPath", newDir + "\\Workspace\\AnimLogo\\animlogo32.gif");
|
||||
SetGlobal("LargeStillPath", newDir + "\\Workspace\\AnimLogo\\staticlogo32.gif");
|
||||
SetGlobal("ReadMeFile", newDir + "\\Workspace\\readme.txt");
|
||||
SetGlobal("SidebarPath", newDir + "\\Workspace\\Sidebar\\panels.rdf");
|
||||
SetGlobal("CustomBookmarkFile", newDir + "\\Workspace\\Bkmarks\\bookmarks.html");
|
||||
SetGlobal("ShellBgBitmap", newDir + "\\Workspace\\Autorun\\Shell\\bmps\\install.bmp");
|
||||
SetGlobal("ShellInstallTextFile", newDir + "\\Workspace\\Autorun\\install.txt");
|
||||
|
||||
IsSameCache = FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:xpfe directory
|
||||
#
|
||||
|
||||
nsBuildID.h
|
||||
@@ -1,118 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef CROSS_COMPILE
|
||||
HOST_PROGRAM = nsinstall$(BIN_SUFFIX)
|
||||
else
|
||||
PROGRAM = nsinstall$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
PLSRCS = nfspwd.pl revdepth.pl
|
||||
ifdef CROSS_COMPILE
|
||||
HOST_CSRCS = nsinstall.c pathsub.c
|
||||
else
|
||||
CSRCS = nsinstall.c pathsub.c
|
||||
endif
|
||||
|
||||
TARGETS = $(HOST_PROGRAM) $(PROGRAM) $(PLSRCS:.pl=)
|
||||
|
||||
# Generate the build number on the fly.
|
||||
TARGETS += build_number nsBuildID.h
|
||||
|
||||
ifdef USE_ELF_DYNSTR_GC
|
||||
TARGETS += elf-dynstr-gc
|
||||
endif
|
||||
|
||||
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
|
||||
# a recursive rule for finding nsinstall and the Perl scripts.
|
||||
ifdef NSBUILDROOT
|
||||
override NSBUILDROOT :=
|
||||
endif
|
||||
|
||||
ifdef GNU_CC
|
||||
MODULE_OPTIMIZE_FLAGS = -O3
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
DEFINES += -D_BSD_SOURCE
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
LOCAL_INCLUDES += -I$(srcdir)/os2
|
||||
HSRCS += dirent.h
|
||||
endif
|
||||
|
||||
ifeq ($(OS_CONFIG),SunOS4.1)
|
||||
NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md
|
||||
endif
|
||||
|
||||
HEADERS = nsBuildID.h
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
HEADERS += $(srcdir)/os2/dirent.h
|
||||
endif
|
||||
|
||||
export:: $(TARGETS) $(HEADERS)
|
||||
$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
|
||||
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(PUBLIC)/.headerlist $(HEADERS)
|
||||
-rm -f $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
|
||||
-rm -f $(DIST)/bin/chrome/chromelist.txt
|
||||
|
||||
GARBAGE += build_number nsBuildID.h
|
||||
|
||||
ifneq ($(origin BUILD_OFFICIAL)_$(origin MOZILLA_OFFICIAL),undefined_undefined)
|
||||
_BN_OFFICIAL=1
|
||||
else
|
||||
_BN_OFFICIAL=
|
||||
endif
|
||||
|
||||
build_number: FORCE
|
||||
$(PERL) -I$(srcdir) $(srcdir)/bdate.pl $@ $(_BN_OFFICIAL)
|
||||
|
||||
nsBuildID.h: nsBuildID.h.in build_number
|
||||
$(RM) $@
|
||||
$(PERL) -I$(srcdir) $(srcdir)/aboutime.pl $@ build_number $<
|
||||
|
||||
elf-dynstr-gc: elf-dynstr-gc.c Makefile Makefile.in
|
||||
$(CC) $(COMPILE_CFLAGS) $(GLIB_CFLAGS) $(GLIB_LIBS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
ifdef USE_ELF_DYNSTR_GC
|
||||
export:: elf-dynstr-gc
|
||||
$(INSTALL) -m 555 elf-dynstr-gc $(DIST)/bin
|
||||
endif
|
||||
|
||||
FORCE:
|
||||
|
||||
ifdef MKDEPEND_DIR
|
||||
clean clobber realclean clobber_all::
|
||||
cd $(MKDEPEND_DIR); $(MAKE) $@
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# Even though we use AUTOCONF, there are just too many things that need
|
||||
# fixing up to do it any other way than via an architecture specific file.
|
||||
#
|
||||
# If we're not using NSBUILDROOT, then make sure we use multiple object
|
||||
# directories. We want this name to be relatively short, and to be different
|
||||
# from what NSPR uses (so that we can wipe out Mozilla objects without
|
||||
# wiping NSPR objects.
|
||||
|
||||
# We don't want -KPIC as it forces the compiler to generate a .i file.
|
||||
DSO_PIC_CFLAGS =
|
||||
|
||||
# We don't want the standard set of UNIX libraries.
|
||||
OS_LIBS =
|
||||
|
||||
# Define VMS
|
||||
OS_CFLAGS += -DVMS -DVMS_AS_IS -Wc,names=\(short,as\)
|
||||
OS_CXXFLAGS += -DVMS -DVMS_AS_IS -Wc,names=\(short,as\)
|
||||
|
||||
# If we are building POSIX images, then these HOST symbols get used.
|
||||
# We don't want to compile any POSIX image debug, so always remove -g.
|
||||
# xpild accvio's if built with -O, so don't.
|
||||
HOST_CC = c89
|
||||
HOST_CXX = cxx
|
||||
ifeq ($(PROGRAM),xpidl)
|
||||
HOST_CFLAGS = $(filter-out -g -O,$(OS_CFLAGS)) -DGETCWD_CANT_MALLOC
|
||||
else
|
||||
HOST_CFLAGS = $(filter-out -g -O,$(OS_CFLAGS)) -DGETCWD_CANT_MALLOC -O
|
||||
endif
|
||||
HOST_CXXFLAGS = $(filter-out -g -O,$(OS_CXXFLAGS)) -O
|
||||
|
||||
# In addition, we want to lose the OS_FLAGS for POSIX builds.
|
||||
ifdef INTERNAL_TOOLS
|
||||
OS_LDFLAGS =
|
||||
endif
|
||||
|
||||
# Although IS_COMPONENT is set in the Makefile, for xpconnect it is not set
|
||||
# until AFTER config.mk (and therefore this file) included, hence it appears
|
||||
# as unset. So for this module only, set IS_COMPONENT here.
|
||||
ifeq ($(MODULE),xpconnect)
|
||||
IS_COMPONENT = 1
|
||||
endif
|
||||
|
||||
# This is where our Sharable Image trickery goes.
|
||||
AS = vmsas $(OS_CFLAGS)
|
||||
ifdef IS_COMPONENT
|
||||
OS_LDFLAGS += IS_COMPONENT SRCDIR=$(srcdir)
|
||||
endif
|
||||
LD = vmsld $(OS_LDFLAGS)
|
||||
DSO_LDOPTS =
|
||||
MKSHLIB = $(LD)
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,99 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <process.h>
|
||||
|
||||
/*
|
||||
* A feeble attempt at recursive make on win95 - spider 1/98
|
||||
*
|
||||
* argv[1] == target
|
||||
* argv[2] == end directory (full)
|
||||
* argv[3...n] == list of source directories
|
||||
*
|
||||
*/
|
||||
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
char *args[7];
|
||||
int n = 0 ;
|
||||
int rc = 0 ;
|
||||
|
||||
/* Set up parameters to be sent: Sorry for the hardcode!*/
|
||||
args[0] = "-nologo";
|
||||
args[1] = "-nologo";
|
||||
args[2] = "-S";
|
||||
args[3] = "-f";
|
||||
args[4] = "makefile.win";
|
||||
args[5] = argv[1] ;
|
||||
args[6] = NULL ;
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "w95make: Not enough arguments, you figure it out\n");
|
||||
exit (666) ;
|
||||
}
|
||||
|
||||
|
||||
while(argv[n+3] != NULL) {
|
||||
|
||||
if (_chdir(argv[n+3]) != 0) {
|
||||
fprintf(stderr, "w95make: Could not change to directory %s ... skipping\n", argv[n+3]);
|
||||
} else {
|
||||
|
||||
fprintf(stdout, "w95make: Entering Directory %s\\%s with target %s\n", argv[2], argv[n+3], argv[1]);
|
||||
if ((rc = _spawnvp(_P_WAIT,"nmake", args)) != 0) {
|
||||
fprintf(stderr, "w95make: nmake failed in directory %s with error code %d\n", argv[n+3], rc);
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
if (_chdir(argv[2]) != 0) {
|
||||
fprintf(stderr, "w95make: Could not change back to directory %s\n", argv[2]);
|
||||
exit (666) ;
|
||||
}
|
||||
|
||||
fprintf(stdout, "w95make: Leaving Directory %s\\%s with target %s\n", argv[2], argv[n+3], argv[1]);
|
||||
|
||||
}
|
||||
|
||||
n++;
|
||||
}
|
||||
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <process.h>
|
||||
|
||||
/*
|
||||
* win95 mkdir that responds nicely if the directory already exists - spider 1/98
|
||||
*
|
||||
*/
|
||||
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
if (argc < 1) {
|
||||
fprintf(stderr, "w95mkdir: Not enough arguments, you figure it out\n");
|
||||
exit (666) ;
|
||||
}
|
||||
|
||||
|
||||
_mkdir(argv[1]);
|
||||
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Win16 Configuration file
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the OS dependent commands used by MAKE
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
CC=cl
|
||||
LD=$(MOZ_TOOLS)\bin\optlinks.exe
|
||||
AR=$(DEPTH)\CONFIG\TLIB.EXE /P64 /C
|
||||
#AR=lib /NOLOGO /BATCH /NOIGNORECASE
|
||||
RC=rc
|
||||
#RM=del /F /Q
|
||||
#RM_R=del /F /S /Q
|
||||
RM=rm -f
|
||||
RM_R=rm -fr
|
||||
CP=cp
|
||||
AWK=$(MOZ_TOOLS)\bin\gawk.exe
|
||||
RANLIB=$(DEPTH)\config\true.bat
|
||||
!ifndef MOZ_DEBUG
|
||||
JAVAH_PROG=$(DEPTH)\dist\$(DIST_PREFIX)32_o.obj\bin\javah.exe
|
||||
!else
|
||||
JAVAH_PROG=$(DEPTH)\dist\$(DIST_PREFIX)32_d.obj\bin\javah.exe
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define Debug and optimization flags
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!ifndef MOZ_DEBUG
|
||||
!ifndef OPTIMIZER
|
||||
OPTIMIZER=-Ox -Os -DDEVELOPER_DEBUG
|
||||
!endif
|
||||
OS_LFLAGS=
|
||||
!else
|
||||
!if defined(MOZ_FULL_DEBUG_INFO) || ("$(MAKE_OBJ_TYPE)" == "DLL")
|
||||
OPTIMIZER=-Z7
|
||||
!else if defined(MOZ_DEBUG_FLAG)
|
||||
OPTIMIZER=$(MOZ_DEBUG_FLAG)
|
||||
!else
|
||||
OPTIMIZER=-Zd
|
||||
!endif
|
||||
OPTIMIZER=$(OPTIMIZER) -Od -DDEBUG -UNDEBUG
|
||||
OS_LFLAGS=/CO
|
||||
!endif
|
||||
!if defined (MOZ_LITE)
|
||||
OPTIMIZER=$(OPTIMIZER) -DMOZ_LITE
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the OS dependent compiler flags, linker flags and libraries
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!ifdef 286_INSTRUCTIONS
|
||||
INSTRUCTIONS=-G2
|
||||
!else
|
||||
INSTRUCTIONS=-G3
|
||||
!endif
|
||||
OS_CFLAGS=$(INSTRUCTIONS) -AL -Gx- -Gf -Gd -Gs -W3 -nologo \
|
||||
!ifdef MOZ_JAVA
|
||||
-DSEG_ARRAY \
|
||||
!endif
|
||||
-D_X86_ -D_WINDOWS -DXP_PC -DSW_THREADS
|
||||
|
||||
|
||||
OS_LFLAGS=$(OS_LFLAGS) /NOE /NOD /NOI /XNOI \
|
||||
/ALIGN:16 /BYORDINAL /FARCALL \
|
||||
/PACKC:61440 /PACKD /REORDERSEGMENTS \
|
||||
/DETAILEDMAP /XREF /ONERROR:NOEXE /NOLOGO /WARNDUPS
|
||||
|
||||
OS_LIBS=LIBW.LIB TOOLHELP.LIB
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the special flags for creating EXEs
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
EXE_CFLAGS=/GA /Gt3
|
||||
EXE_LFLAGS=/STACK:20000
|
||||
EXE_LIBS=OLDNAMES.LIB LLIBCEW.LIB
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the special flags for creating DLLs
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!ifndef DLL_CFLAGS
|
||||
DLL_CFLAGS=/GD /D "_WINDLL"
|
||||
!endif
|
||||
DLL_LFLAGS=
|
||||
DLL_LIBS=OLDNAMES.LIB LDLLCEW.LIB
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Win32 Configuration file
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the OS dependent commands used by MAKE
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
CC=cl
|
||||
LD=link
|
||||
AR=lib
|
||||
RC=rc
|
||||
#RM=del /F /Q
|
||||
#RM_R=del /F /S /Q
|
||||
RM=rm -f
|
||||
RM_R=rm -fr
|
||||
CP=cp
|
||||
AWK=$(MOZ_TOOLS)\bin\gawk.exe
|
||||
RANLIB=$(DEPTH)\config\true.bat
|
||||
JAVAH=$(DIST)\bin\javah.exe
|
||||
JAVA=$(MOZ_TOOLS)\bin\java.exe
|
||||
|
||||
!ifndef JAVAH_IN_JAVA
|
||||
JAVAH_PROG = $(DIST)\bin\javah.exe
|
||||
!else
|
||||
JAVAH_PROG = $(JAVA) netscape.tools.jric.Main
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define Debug and optimization flags
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
#
|
||||
# Uncomment for MSVC debug malloc logging...
|
||||
#
|
||||
#OPTIMIZER=-Zi -DDEBUG -UNDEBUG -D_DEBUG -D_CRTDBG_MAP_ALLOC
|
||||
OPTIMIZER=-Zi -DDEBUG -UNDEBUG -D_DEBUG
|
||||
!if defined(GLOWCODE) && "$(MOZ_BITS)"=="32"
|
||||
OS_LFLAGS=/DEBUG /DEBUGTYPE:BOTH /INCLUDE:_GlowCode /PDB:NONE
|
||||
!else
|
||||
OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE)
|
||||
!endif
|
||||
|
||||
!else
|
||||
|
||||
# Initialize to non-profile, non-coverage optimization
|
||||
OPTIMIZER=-O1 -UDEBUG -DNDEBUG
|
||||
OS_LFLAGS=/OPT:nowin98
|
||||
|
||||
# if MOZ_DEBUG is not set and MOZ_PROFILE is set, then we generate
|
||||
# an optimized build with debugging symbols. Useful for debugging
|
||||
# compiler optimization bugs, as well as running with Quantify.
|
||||
|
||||
!if defined (MOZ_PROFILE)
|
||||
OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:NONE /OPT:REF /OPT:nowin98
|
||||
OPTIMIZER=-Zi -O1 -UDEBUG -DNDEBUG
|
||||
!endif
|
||||
# MOZ_PROFILE
|
||||
|
||||
# if MOZ_COVERAGE is set, we handle pdb files slightly differently
|
||||
!if defined(MOZ_COVERAGE)
|
||||
OS_LFLAGS=/DEBUG /DEBUGTYPE:CV /PDB:$(PDBFILE) /OPT:REF /OPT:nowin98
|
||||
OPTIMIZER=-Zi -O1 -UDEBUG -DNDEBUG
|
||||
!endif
|
||||
# MOZ_COVERAGE
|
||||
|
||||
!endif
|
||||
# MOZ_DEBUG
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Select the correct RTL to link...
|
||||
#//
|
||||
#// Currently, unless USE_STATIC_LIBS is defined, the multithreaded
|
||||
#// DLL version of the RTL is used...
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!ifdef USE_STATIC_LIBS
|
||||
RTL_FLAGS=-MT # Statically linked multithreaded RTL
|
||||
!ifdef MOZ_DEBUG
|
||||
RTL_FLAGS=-MTd # Statically linked multithreaded MSVC4.0 debug RTL
|
||||
!endif
|
||||
|
||||
!else ifdef USE_NON_MT_LIBS
|
||||
RTL_FLAGS=-ML # Statically linked non-multithreaded LIBC RTL
|
||||
!ifdef MOZ_DEBUG
|
||||
RTL_FLAGS=-MLd # Statically linked non-multithreaded LIBC debug RTL
|
||||
!endif
|
||||
|
||||
!else
|
||||
RTL_FLAGS=-MD # Dynamically linked, multithreaded RTL
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
!ifndef MOZ_NO_DEBUG_RTL
|
||||
RTL_FLAGS=-MDd # Dynamically linked, multithreaded MSVC4.0 debug RTL
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the OS dependent compiler flags, linker flags and libraries
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
OS_CFLAGS=$(OPTIMIZER) $(RTL_FLAGS) -W3 -nologo -D_X86_ -D_WINDOWS -DWIN32 \
|
||||
-DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS -DWINVER=0x400 -Gy
|
||||
|
||||
OS_CFLAGS=$(OS_CFLAGS) -DMSVC4
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
# Enable browse info in VC++
|
||||
!ifdef MOZ_BROWSE_INFO
|
||||
OS_CFLAGS=$(OS_CFLAGS) /FR
|
||||
!endif
|
||||
!endif
|
||||
|
||||
## Removed MOZ_LITE/MOZ_MEDIUM stuff from OS_CFLAGS
|
||||
|
||||
OS_LFLAGS=$(OS_LFLAGS)
|
||||
OS_LIBS=kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the special flags for creating EXEs
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(SWAPTUNER) || (defined(GLOWCODE) && defined(GLOWPROF) && "$(MOZ_BITS)"=="32")
|
||||
# this seems to get lost
|
||||
EXE_CFLAGS=/Gh
|
||||
!else
|
||||
EXE_CFLAGS=/Gy
|
||||
!endif
|
||||
!if defined(MOZ_PROFILE)
|
||||
EXE_LFLAGS=/FIXED:NO
|
||||
!else
|
||||
EXE_LFLAGS=
|
||||
!endif
|
||||
EXE_LIBS=
|
||||
|
||||
!if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)
|
||||
EXE_LIBS=$(EXE_LIBS) $(DIST)/lib/trace.lib
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the special flags for creating DLLs
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DLL_CFLAGS=
|
||||
DLL_LFLAGS=/SUBSYSTEM:WINDOWS
|
||||
DLL_LIBS=
|
||||
|
||||
!if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)
|
||||
DLL_LIBS=$(DLL_LIBS) $(DIST)/lib/trace.lib
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// rebase setting, msvc systems better have this
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
REBASE=rebase.exe
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
use strict;
|
||||
use mozBDate;
|
||||
|
||||
my $outfile = $ARGV[0];
|
||||
my $build_num_file = $ARGV[1];
|
||||
my $infile = "";
|
||||
|
||||
$infile = $ARGV[2] if ("$ARGV[2]" ne "");
|
||||
|
||||
&mozBDate::SubstituteBuildNumber($outfile, $build_num_file, $infile);
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
#!/perl
|
||||
|
||||
use File::Path;
|
||||
use Getopt::Std;
|
||||
use IO::File;
|
||||
use mozLock;
|
||||
|
||||
getopts("l");
|
||||
|
||||
my $installedChromeFile = $ARGV[0];
|
||||
my $disableJarPackaging = $ARGV[1];
|
||||
my $chromeType = $ARGV[2];
|
||||
my $pkgName = $ARGV[3];
|
||||
my $jarFileName = $ARGV[4];
|
||||
|
||||
#print "add-chrome $installedChromeFile $disableJarPackaging $chromeType $pkgName $jarFileName\n";
|
||||
|
||||
my $nofilelocks = 0;
|
||||
if (defined($::opt_l)) {
|
||||
$nofilelocks = 1;
|
||||
}
|
||||
|
||||
if ($jarFileName =~ /(.*)\.jar/) {
|
||||
$jarFileName = $1;
|
||||
}
|
||||
|
||||
my $line;
|
||||
if ($disableJarPackaging) {
|
||||
$line = "$chromeType,install,url,resource:/chrome/$jarFileName/$chromeType/$pkgName/";
|
||||
}
|
||||
else {
|
||||
$line = "$chromeType,install,url,jar:resource:/chrome/$jarFileName.jar!/$chromeType/$pkgName/";
|
||||
}
|
||||
|
||||
my $lockfile = "$installedChromeFile.lck";
|
||||
my $err;
|
||||
|
||||
mozLock($lockfile) if (!$nofilelocks);
|
||||
$err = 0;
|
||||
if (open(FILE, "<$installedChromeFile")) {
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
if ($_ =~ $line) {
|
||||
# line already appears in installed-chrome.txt file
|
||||
# just update the mod date
|
||||
close(FILE) or $err = 1;
|
||||
if ($err) {
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
die "error: can't close $installedChromeFile: $!";
|
||||
}
|
||||
my $now = time;
|
||||
utime($now, $now, $installedChromeFile) or $err = 1;
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
if ($err) {
|
||||
die "couldn't touch $installedChromeFile";
|
||||
}
|
||||
print "+++ updating chrome $installedChromeFile\n+++\t$line\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
close(FILE) or $err = 1;
|
||||
if ($err) {
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
die "error: can't close $installedChromeFile: $!";
|
||||
}
|
||||
}
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
|
||||
my $dir = $installedChromeFile;
|
||||
if ("$dir" =~ /([\w\d.\-\\\/]+)[\\\/]([\w\d.\-]+)/) {
|
||||
$dir = $1;
|
||||
}
|
||||
mkpath($dir, 0, 0755);
|
||||
|
||||
mozLock($lockfile) if (!$nofilelocks);
|
||||
$err = 0;
|
||||
open(FILE, ">>$installedChromeFile") or $err = 1;
|
||||
if ($err) {
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
die "can't open $installedChromeFile: $!";
|
||||
}
|
||||
print FILE "$line\n";
|
||||
close(FILE) or $err = 1;
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
if ($err) {
|
||||
die "error: can't close $installedChromeFile: $!";
|
||||
}
|
||||
print "+++ adding chrome $installedChromeFile\n+++\t$line\n";
|
||||
|
||||
@@ -1,344 +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 this file as it was released upon August 6, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Christopher
|
||||
# Seawood. Portions created by Christopher Seawood are
|
||||
# Copyright (C) 1998 Christopher Seawood. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
# A netscape style .mk file for autoconf builds
|
||||
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
USE_AUTOCONF = 1
|
||||
MOZILLA_CLIENT = 1
|
||||
NO_MDUPDATE = 1
|
||||
BUILD_MODULES = @BUILD_MODULES@
|
||||
|
||||
DIST = $(DEPTH)/dist
|
||||
|
||||
MOZ_CHROME_FILE_FORMAT = @MOZ_CHROME_FILE_FORMAT@
|
||||
|
||||
MOZ_WIDGET_TOOLKIT = @MOZ_WIDGET_TOOLKIT@
|
||||
MOZ_GFX_TOOLKIT = $(MOZ_WIDGET_TOOLKIT)
|
||||
|
||||
MOZ_JS_LIBS = @MOZ_JS_LIBS@
|
||||
|
||||
|
||||
MOZ_GFX_TOOLKIT_LDFLAGS = @MOZ_GFX_TOOLKIT_LDFLAGS@
|
||||
MOZ_WIDGET_TOOLKIT_LDFLAGS = @MOZ_WIDGET_TOOLKIT_LDFLAGS@
|
||||
|
||||
MOZ_DEBUG = @MOZ_DEBUG@
|
||||
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
|
||||
MOZ_PROFILE_MODULES = @MOZ_PROFILE_MODULES@
|
||||
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
|
||||
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
|
||||
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
|
||||
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
|
||||
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
|
||||
MOZ_JSDEBUGGER = @MOZ_JSDEBUGGER@
|
||||
MOZ_PERF_METRICS = @MOZ_PERF_METRICS@
|
||||
MOZ_LEAKY = @MOZ_LEAKY@
|
||||
MOZ_JPROF = @MOZ_JPROF@
|
||||
MOZ_XPCTOOLS = @MOZ_XPCTOOLS@
|
||||
ENABLE_EAZEL_PROFILER=@ENABLE_EAZEL_PROFILER@
|
||||
EAZEL_PROFILER_CFLAGS=@EAZEL_PROFILER_CFLAGS@
|
||||
EAZEL_PROFILER_LIBS=@EAZEL_PROFILER_LIBS@
|
||||
GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@
|
||||
NS_TRACE_MALLOC = @NS_TRACE_MALLOC@
|
||||
USE_ELF_DYNSTR_GC = @USE_ELF_DYNSTR_GC@
|
||||
MOZ_MAIL_NEWS = @MOZ_MAIL_NEWS@
|
||||
MOZ_CALENDAR = @MOZ_CALENDAR@
|
||||
MOZ_PLAINTEXT_EDITOR_ONLY = @MOZ_PLAINTEXT_EDITOR_ONLY@
|
||||
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
|
||||
BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@
|
||||
MOZ_STATIC_COMPONENTS = @MOZ_STATIC_COMPONENTS@
|
||||
MOZ_META_COMPONENTS = @MOZ_META_COMPONENTS@
|
||||
MOZ_STATIC_COMPONENT_LIBS = @MOZ_STATIC_COMPONENT_LIBS@
|
||||
ENABLE_TESTS = @ENABLE_TESTS@
|
||||
IBMBIDI = @IBMBIDI@
|
||||
SUNCTL = @SUNCTL@
|
||||
ACCESSIBILITY = @ACCESSIBILITY@
|
||||
MOZ_LDAP_XPCOM = @MOZ_LDAP_XPCOM@
|
||||
MOZ_LDAP_XPCOM_EXPERIMENTAL = @MOZ_LDAP_XPCOM_EXPERIMENTAL@
|
||||
XPCOM_USE_LEA = @XPCOM_USE_LEA@
|
||||
JS_ULTRASPARC_OPTS = @JS_ULTRASPARC_OPTS@
|
||||
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
|
||||
MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
|
||||
MOZ_COMPONENT_XPCOM_LIBS=@MOZ_COMPONENT_XPCOM_LIBS@
|
||||
XPCOM_LIBS=@XPCOM_LIBS@
|
||||
MOZ_REORDER=@MOZ_REORDER@
|
||||
MOZ_TIMELINE=@MOZ_TIMELINE@
|
||||
|
||||
ENABLE_STRIP = @ENABLE_STRIP@
|
||||
|
||||
ClientWallet=1
|
||||
CookieManagement=1
|
||||
SingleSignon=1
|
||||
|
||||
MOZ_OJI=1
|
||||
|
||||
MOZ_POST_DSO_LIB_COMMAND = @MOZ_POST_DSO_LIB_COMMAND@
|
||||
MOZ_POST_PROGRAM_COMMAND = @MOZ_POST_PROGRAM_COMMAND@
|
||||
|
||||
MOZ_BUILD_ROOT = @MOZ_BUILD_ROOT@
|
||||
|
||||
MOZ_GLE = @MOZ_GLE@
|
||||
|
||||
MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
|
||||
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
|
||||
MOZ_NATIVE_PNG = @SYSTEM_PNG@
|
||||
MOZ_NATIVE_MNG = @SYSTEM_MNG@
|
||||
|
||||
MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
|
||||
MOZ_MATHML = @MOZ_MATHML@
|
||||
MOZ_SVG = @MOZ_SVG@
|
||||
TX_EXE = @TX_EXE@
|
||||
|
||||
MOZ_INSURE = @MOZ_INSURE@
|
||||
MOZ_INSURIFYING = @MOZ_INSURIFYING@
|
||||
MOZ_INSURE_DIRS = @MOZ_INSURE_DIRS@
|
||||
MOZ_INSURE_EXCLUDE_DIRS = @MOZ_INSURE_EXCLUDE_DIRS@
|
||||
|
||||
MOZ_NATIVE_NSPR = @MOZ_NATIVE_NSPR@
|
||||
|
||||
CROSS_COMPILE = @CROSS_COMPILE@
|
||||
|
||||
OS_CPPFLAGS = @CPPFLAGS@
|
||||
OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@
|
||||
OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@
|
||||
OS_LDFLAGS = @LDFLAGS@
|
||||
|
||||
OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@
|
||||
OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@
|
||||
|
||||
OS_INCLUDES = $(NSPR_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(MNG_CFLAGS) $(ZLIB_CFLAGS)
|
||||
OS_LIBS = @LIBS@
|
||||
ACDEFINES = @DEFS@
|
||||
|
||||
MOZ_OPTIMIZE = @MOZ_OPTIMIZE@
|
||||
MOZ_OPTIMIZE_FLAGS = @MOZ_OPTIMIZE_FLAGS@
|
||||
MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@
|
||||
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
|
||||
AIX_SHLIB_BIN = @AIX_SHLIB_BIN@
|
||||
AR = @AR@
|
||||
AR_FLAGS = @AR_FLAGS@
|
||||
AR_EXTRACT = @AR_EXTRACT@
|
||||
AR_LIST = @AR_LIST@
|
||||
AR_DELETE = @AR_DELETE@
|
||||
AS = @AS@
|
||||
ASFLAGS = @ASFLAGS@
|
||||
AS_DASH_C_FLAG = @AS_DASH_C_FLAG@
|
||||
LD = @LD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
WINDRES = @WINDRES@
|
||||
USE_SHORT_LIBNAME = @USE_SHORT_LIBNAME@
|
||||
IMPLIB = @IMPLIB@
|
||||
FILTER = @FILTER@
|
||||
BIN_FLAGS = @BIN_FLAGS@
|
||||
|
||||
OBJ_SUFFIX = @OBJ_SUFFIX@
|
||||
LIB_SUFFIX = @LIB_SUFFIX@
|
||||
DLL_SUFFIX = @DLL_SUFFIX@
|
||||
BIN_SUFFIX = @BIN_SUFFIX@
|
||||
ASM_SUFFIX = @ASM_SUFFIX@
|
||||
USE_N32 = @USE_N32@
|
||||
HAVE_64BIT_OS = @HAVE_64BIT_OS@
|
||||
|
||||
# Temp hack. It is not my intention to leave this crap in here for ever.
|
||||
# Im talking to fur right now to solve the problem without introducing
|
||||
# NS_USE_NATIVE to the build system -ramiro.
|
||||
NS_USE_NATIVE = @NS_USE_NATIVE@
|
||||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
|
||||
GNU_AS = @GNU_AS@
|
||||
GNU_LD = @GNU_LD@
|
||||
GNU_CC = @GNU_CC@
|
||||
GNU_CXX = @GNU_CXX@
|
||||
HAVE_GCC3_ABI = @HAVE_GCC3_ABI@
|
||||
|
||||
HOST_CC = @HOST_CC@
|
||||
HOST_CXX = @HOST_CXX@
|
||||
HOST_CFLAGS = @HOST_CFLAGS@
|
||||
HOST_CXXFLAGS = @HOST_CXXFLAGS@
|
||||
HOST_NSPR_MDCPUCFG = @HOST_NSPR_MDCPUCFG@
|
||||
HOST_AR = @HOST_AR@
|
||||
HOST_RANLIB = @HOST_RANLIB@
|
||||
|
||||
HOST_LIBIDL_CONFIG = @HOST_LIBIDL_CONFIG@
|
||||
HOST_LIBIDL_CFLAGS = @HOST_LIBIDL_CFLAGS@
|
||||
HOST_LIBIDL_LIBS = @HOST_LIBIDL_LIBS@
|
||||
|
||||
TARGET_NSPR_MDCPUCFG = @TARGET_NSPR_MDCPUCFG@
|
||||
TARGET_CPU = @TARGET_CPU@
|
||||
TARGET_VENDOR = @TARGET_VENDOR@
|
||||
TARGET_OS = @TARGET_OS@
|
||||
TARGET_MD_ARCH = @TARGET_MD_ARCH@
|
||||
|
||||
AUTOCONF = @AUTOCONF@
|
||||
EMACS = @EMACS@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
WHOAMI = @WHOAMI@
|
||||
UNZIP_PROG = @UNZIP@
|
||||
ZIP_PROG = @ZIP@
|
||||
XARGS = @XARGS@
|
||||
STRIP = @STRIP@
|
||||
|
||||
ifdef MOZ_NATIVE_JPEG
|
||||
JPEG_CFLAGS = @JPEG_CFLAGS@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
JPEG_REQUIRES =
|
||||
else
|
||||
JPEG_CFLAGS = @MOZ_JPEG_CFLAGS@
|
||||
JPEG_LIBS = @MOZ_JPEG_LIBS@
|
||||
JPEG_REQUIRES = jpeg
|
||||
endif
|
||||
|
||||
ifdef MOZ_NATIVE_ZLIB
|
||||
ZLIB_CFLAGS = @ZLIB_CFLAGS@
|
||||
ZLIB_LIBS = @ZLIB_LIBS@
|
||||
ZLIB_REQUIRES =
|
||||
else
|
||||
ZLIB_CFLAGS = @MOZ_ZLIB_CFLAGS@
|
||||
ZLIB_LIBS = @MOZ_ZLIB_LIBS@
|
||||
ZLIB_REQUIRES = zlib
|
||||
endif
|
||||
|
||||
ifdef MOZ_NATIVE_PNG
|
||||
PNG_CFLAGS = @PNG_CFLAGS@
|
||||
PNG_LIBS = @PNG_LIBS@
|
||||
PNG_REQUIRES =
|
||||
else
|
||||
PNG_CFLAGS = @MOZ_PNG_CFLAGS@
|
||||
PNG_LIBS = @MOZ_PNG_LIBS@
|
||||
PNG_REQUIRES = png
|
||||
endif
|
||||
|
||||
ifdef MOZ_NATIVE_MNG
|
||||
MNG_CFLAGS = @MNG_CFLAGS@
|
||||
MNG_LIBS = @MNG_LIBS@
|
||||
MNG_REQUIRES =
|
||||
else
|
||||
MNG_CFLAGS = @MOZ_MNG_CFLAGS@
|
||||
MNG_LIBS = @MOZ_MNG_LIBS@
|
||||
MNG_REQUIRES = mng
|
||||
endif
|
||||
|
||||
NSPR_CFLAGS = @NSPR_CFLAGS@
|
||||
NSPR_LIBS = @NSPR_LIBS@
|
||||
|
||||
LDAP_CFLAGS = @LDAP_CFLAGS@
|
||||
LDAP_LIBS = @LDAP_LIBS@
|
||||
|
||||
# MKSHLIB_FORCE_ALL is used to force the linker to include all object
|
||||
# files present in an archive. MKSHLIB_UNFORCE_ALL reverts the linker
|
||||
# to normal behavior. Makefile's that create shared libraries out of
|
||||
# archives use these flags to force in all of the .o files in the
|
||||
# archives into the shared library.
|
||||
WRAP_MALLOC_LIB = @WRAP_MALLOC_LIB@
|
||||
WRAP_MALLOC_CFLAGS = @WRAP_MALLOC_CFLAGS@
|
||||
DSO_CFLAGS = @DSO_CFLAGS@
|
||||
DSO_PIC_CFLAGS = @DSO_PIC_CFLAGS@
|
||||
MKSHLIB = @MKSHLIB@
|
||||
MKCSHLIB = @MKCSHLIB@
|
||||
MKSHLIB_FORCE_ALL = @MKSHLIB_FORCE_ALL@
|
||||
MKSHLIB_UNFORCE_ALL = @MKSHLIB_UNFORCE_ALL@
|
||||
DSO_LDOPTS = @DSO_LDOPTS@
|
||||
DLL_SUFFIX = @DLL_SUFFIX@
|
||||
|
||||
NO_LD_ARCHIVE_FLAGS = @NO_LD_ARCHIVE_FLAGS@
|
||||
|
||||
GTK_CONFIG = @GTK_CONFIG@
|
||||
TK_CFLAGS = @TK_CFLAGS@
|
||||
TK_LIBS = @TK_LIBS@
|
||||
|
||||
MOZ_TOOLKIT_REGISTRY_CFLAGS = \
|
||||
-DWIDGET_DLL=@WIDGET_DLL@ \
|
||||
-DGFXWIN_DLL=@GFXWIN_DLL@ \
|
||||
$(TK_CFLAGS)
|
||||
|
||||
MOZ_ENABLE_GTK = @MOZ_ENABLE_GTK@
|
||||
MOZ_ENABLE_GTK2 = @MOZ_ENABLE_GTK2@
|
||||
MOZ_ENABLE_XLIB = @MOZ_ENABLE_XLIB@
|
||||
MOZ_ENABLE_QT = @MOZ_ENABLE_QT@
|
||||
MOZ_ENABLE_PHOTON = @MOZ_ENABLE_PHOTON@
|
||||
MOZ_ENABLE_XREMOTE = @MOZ_ENABLE_XREMOTE@
|
||||
|
||||
MOZ_GTK_CFLAGS = @MOZ_GTK_CFLAGS@
|
||||
MOZ_GTK_LDFLAGS = @MOZ_GTK_LDFLAGS@
|
||||
|
||||
MOZ_GTK2_CFLAGS = @MOZ_GTK2_CFLAGS@
|
||||
MOZ_GTK2_LIBS = @MOZ_GTK2_LIBS@
|
||||
|
||||
MOZ_XLIB_CFLAGS = @MOZ_XLIB_CFLAGS@
|
||||
MOZ_XLIB_LDFLAGS = @MOZ_XLIB_LDFLAGS@
|
||||
|
||||
MOZ_QT_CFLAGS = @MOZ_QT_CFLAGS@
|
||||
MOZ_QT_LDFLAGS = @MOZ_QT_LDFLAGS@
|
||||
|
||||
MOZ_XPRINT_CFLAGS = @MOZ_XPRINT_CFLAGS@
|
||||
MOZ_XPRINT_LDFLAGS = @MOZ_XPRINT_LDFLAGS@
|
||||
MOZ_ENABLE_XPRINT = @MOZ_ENABLE_XPRINT@
|
||||
|
||||
MOZ_ENABLE_XINERAMA = @MOZ_ENABLE_XINERAMA@
|
||||
MOZ_XINERAMA_LIBS = @MOZ_XINERAMA_LIBS@
|
||||
|
||||
MOZ_XIE_LIBS = @MOZ_XIE_LIBS@
|
||||
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
|
||||
LIBIDL_LIBS = @LIBIDL_LIBS@
|
||||
|
||||
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
|
||||
|
||||
# Used for LD_LIBRARY_PATH
|
||||
LIBS_PATH = @LIBS_PATH@
|
||||
|
||||
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
|
||||
COMPILER_DEPEND = @COMPILER_DEPEND@
|
||||
MDDEPDIR := @MDDEPDIR@
|
||||
|
||||
MOZ_DISABLE_DTD_DEBUG = @MOZ_DISABLE_DTD_DEBUG@
|
||||
|
||||
MOZ_DEMANGLE_SYMBOLS = @MOZ_DEMANGLE_SYMBOLS@
|
||||
|
||||
# XXX - these need to be cleaned up and have real checks added -cls
|
||||
CM_BLDTYPE=dbg
|
||||
AWT_11=1
|
||||
MOZ_BITS=32
|
||||
OS_TARGET=@OS_TARGET@
|
||||
OS_ARCH=@OS_ARCH@
|
||||
OS_RELEASE=@OS_RELEASE@
|
||||
OS_TEST=@OS_TEST@
|
||||
|
||||
# For OS/2 build
|
||||
MOZ_OS2_TOOLS = @MOZ_OS2_TOOLS@
|
||||
MOZ_OS2_EMX_OBJECTFORMAT = @MOZ_OS2_EMX_OBJECTFORMAT@
|
||||
|
||||
HAVE_XIE=@HAVE_XIE@
|
||||
|
||||
MOZ_MOVEMAIL=@MOZ_MOVEMAIL@
|
||||
MOZ_PSM=@MOZ_PSM@
|
||||
|
||||
# for Qt build
|
||||
MOC=@MOC@
|
||||
@@ -1,64 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
/*
|
||||
**
|
||||
** bdate.c: Possibly cross-platform date-based build number
|
||||
** generator. Output is YYJJJ, where YY == 2-digit
|
||||
** year, and JJJ is the Julian date (day of the year).
|
||||
**
|
||||
** Author: briano@netscape.com
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef SUNOS4
|
||||
#include "sunos4.h"
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
struct tm *tms;
|
||||
|
||||
tms = localtime(&t);
|
||||
printf("500%02d%03d%02d\n", tms->tm_year, 1+tms->tm_yday, tms->tm_hour);
|
||||
exit(0);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
use mozBDate;
|
||||
|
||||
# Both "generate" args are optional
|
||||
$file = $ARGV[0] if ("$ARGV[0]" ne "");
|
||||
$official = 1 if ("$ARGV[1]" ne "");
|
||||
&mozBDate::UpdateBuildNumber($file, $official);
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
#include <stdio.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
int main(int iArgc, char **ppArgv) {
|
||||
int iRetval = 1;
|
||||
|
||||
/* First argument, the filename to convert.
|
||||
* Output to stdout, redirect to save.
|
||||
*/
|
||||
char *pFileName = ppArgv[1];
|
||||
if(pFileName) {
|
||||
FILE *pFile = fopen(pFileName, "rb");
|
||||
if(pFile) {
|
||||
struct stat sInfo;
|
||||
|
||||
/* Stat the file for size.
|
||||
*/
|
||||
if(!fstat(fileno(pFile), &sInfo)) {
|
||||
int iChar;
|
||||
int iX = 0;
|
||||
int iFirsttime = 1;
|
||||
|
||||
/* Begin RCDATA
|
||||
*/
|
||||
printf("BEGIN\n");
|
||||
|
||||
/* First string identifies created via bin2rc.
|
||||
* Users of the RCDATA must check for this to
|
||||
* assume the format of the remainder of
|
||||
* the data.
|
||||
*/
|
||||
printf("\t\"bin2rc generated resource\\0\",\t// bin2rc identity string\n");
|
||||
|
||||
/* Next string is optional parameter on command
|
||||
* line. If not present, an empty string.
|
||||
* Users of the RCDATA must understand this is
|
||||
* the optional string that can be used for
|
||||
* about any purpose they desire.
|
||||
*/
|
||||
printf("\t\"%s\\0\",\t// optional command line string\n", ppArgv[2] ? ppArgv[2] : "");
|
||||
|
||||
/* Next string is the size of the original file.
|
||||
* Users of the RCDATA must understand that this
|
||||
* is the size of the file's actual contents.
|
||||
*/
|
||||
printf("\t\"%ld\\0\"\t// data size header\n", sInfo.st_size);
|
||||
|
||||
while(EOF != (iChar = fgetc(pFile))) {
|
||||
/* Comma?
|
||||
*/
|
||||
if(0 == iFirsttime) {
|
||||
iX += printf(",");
|
||||
}
|
||||
else {
|
||||
iFirsttime = 0;
|
||||
}
|
||||
|
||||
/* Newline?
|
||||
*/
|
||||
if(iX >= 72) {
|
||||
printf("\n");
|
||||
iX = 0;
|
||||
}
|
||||
|
||||
/* Tab?
|
||||
*/
|
||||
if(0 == iX) {
|
||||
printf("\t");
|
||||
iX += 8;
|
||||
}
|
||||
|
||||
/* Octal byte.
|
||||
*/
|
||||
iX += printf("\"\\%.3o\"", iChar);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* End RCDATA
|
||||
*/
|
||||
if(0 != iX) {
|
||||
printf("\n");
|
||||
}
|
||||
printf("END\n");
|
||||
|
||||
/* All is well.
|
||||
*/
|
||||
iRetval = 0;
|
||||
}
|
||||
fclose(pFile);
|
||||
pFile = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return(iRetval);
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,95 +0,0 @@
|
||||
#!env perl
|
||||
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 2001 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Christopher Seawood <cls@seawood.org>
|
||||
|
||||
#
|
||||
# A generic script to add entries to a file
|
||||
# if the entry does not already exist
|
||||
#
|
||||
# Usage: $0 [-l] <filename> <entry> [<entry> <entry>]
|
||||
#
|
||||
# -l do not attempt flock the file.
|
||||
|
||||
use Fcntl qw(:DEFAULT :flock);
|
||||
use Getopt::Std;
|
||||
use mozLock;
|
||||
|
||||
sub usage() {
|
||||
print "$0 [-l] <filename> <entry>\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$nofilelocks = 0;
|
||||
|
||||
getopts("l");
|
||||
|
||||
$nofilelocks = 1 if defined($::opt_l);
|
||||
|
||||
$file = shift;
|
||||
|
||||
undef @entrylist;
|
||||
while ($entry = shift) {
|
||||
push @entrylist, $entry;
|
||||
}
|
||||
|
||||
$lockfile = $file . ".lck";
|
||||
|
||||
# touch the file if it doesn't exist
|
||||
if ( ! -e "$file") {
|
||||
$now = time;
|
||||
utime $now, $now, $file;
|
||||
}
|
||||
|
||||
# This needs to be atomic
|
||||
mozLock($lockfile) unless $nofilelocks;
|
||||
|
||||
# Read entire file into mem
|
||||
undef @inbuf;
|
||||
if ( -e "$file" ) {
|
||||
open(IN, "$file") || die ("$file: $!\n");
|
||||
while ($tmp = <IN>) {
|
||||
chomp($tmp);
|
||||
push @inbuf, $tmp;
|
||||
}
|
||||
close(IN);
|
||||
}
|
||||
|
||||
undef @outbuf;
|
||||
# Add each entry to file if it's not already there
|
||||
foreach $entry (@entrylist) {
|
||||
push @outbuf, $entry if (!grep(/^$entry$/, @inbuf));
|
||||
}
|
||||
|
||||
$count = $#outbuf + 1;
|
||||
|
||||
# Append new entry to file
|
||||
if ($count) {
|
||||
open(OUT, ">>$file") || die ("$file: $!\n");
|
||||
foreach $entry (@outbuf) {
|
||||
print OUT "$entry\n";
|
||||
}
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
mozUnlock($lockfile) unless $nofilelocks;
|
||||
|
||||
exit(0);
|
||||
@@ -1,37 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client 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):
|
||||
|
||||
my $progname = $0;
|
||||
my $contents;
|
||||
|
||||
# this script needs to be run in config
|
||||
my $numberfile = "build_number";
|
||||
|
||||
# This is the preferences file that gets read and written.
|
||||
|
||||
open(NUMBER, "<$numberfile") || die "no build_number file\n";
|
||||
|
||||
while ( <NUMBER> ) {
|
||||
$build_number = $_
|
||||
}
|
||||
close (NUMBER);
|
||||
|
||||
chop($build_number);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
open INFILE, "<$ARGV[1]";
|
||||
$build = <INFILE>;
|
||||
close INFILE;
|
||||
chop $build;
|
||||
open OUTFILE, ">$ARGV[0]" || die;
|
||||
|
||||
print OUTFILE "/* THIS IS A GENERATED FILE!\n*\n";
|
||||
print OUTFILE "* See mozilla/config/build_header.pl */\n*\n*/";
|
||||
print OUTFILE "\n\#define NS_BUILD_ID " . $build . "\n";
|
||||
|
||||
close OUTFILE;
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
@echo off
|
||||
rem The contents of this file are subject to the Netscape Public
|
||||
rem License Version 1.1 (the "License"); you may not use this file
|
||||
rem except in compliance with the License. You may obtain a copy of
|
||||
rem the License at http://www.mozilla.org/NPL/
|
||||
rem
|
||||
rem Software distributed under the License is distributed on an "AS
|
||||
rem IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
rem implied. See the License for the specific language governing
|
||||
rem rights and limitations under the License.
|
||||
rem
|
||||
rem The Original Code is mozilla.org code.
|
||||
rem
|
||||
rem The Initial Developer of the Original Code is Netscape
|
||||
rem Communications Corporation. Portions created by Netscape are
|
||||
rem Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
rem Rights Reserved.
|
||||
rem
|
||||
rem Contributor(s):
|
||||
@echo on
|
||||
|
||||
@echo off
|
||||
if not exist %2\NUL echo Warning: %2 does not exist! (you may need to check it out)
|
||||
if not exist %2\NUL exit 1
|
||||
|
||||
cd %2
|
||||
|
||||
goto NO_CAFE
|
||||
|
||||
if "%MOZ_CAFE%"=="" goto NO_CAFE
|
||||
|
||||
mkdir %MOZ_SRC%\mozilla\dist\classes\%2
|
||||
%MOZ_TOOLS%\bin\sj.exe -classpath %MOZ_SRC%\mozilla\dist\classes;%MOZ_SRC%\mozilla\sun-java\classsrc -d %MOZ_SRC%\mozilla\dist\classes *.java
|
||||
goto END
|
||||
|
||||
:NO_CAFE
|
||||
|
||||
perl.exe %MOZ_SRC%\mozilla\config\outofdate.pl -d %MOZ_SRC%\mozilla\dist\classes\%2 -cfg %1 *.java > doit.bat
|
||||
call doit.bat
|
||||
del doit.bat
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
#!perl5
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
|
||||
#
|
||||
# Searches the tree for unclobbered files
|
||||
# should be relatively cross platform
|
||||
#
|
||||
|
||||
$start_dir = $ENV{"MOZ_SRC"};
|
||||
@ignore_list = ("make.dep","manifest.mnw");
|
||||
|
||||
$missed = 0;
|
||||
|
||||
print "\n\nChecking for unclobbered files\n" .
|
||||
"------------------------------\n";
|
||||
|
||||
GoDir("ns");
|
||||
GoDir("mozilla");
|
||||
|
||||
if( $missed ){
|
||||
die "\nError: $missed files or directories unclobbered\n";
|
||||
}
|
||||
else {
|
||||
print "No unclobbered files found\n";
|
||||
}
|
||||
|
||||
sub GoDir {
|
||||
local($dir) = @_;
|
||||
local(%filelist,$iscvsdir);
|
||||
local($k,$v,$d,$fn,$rev, $mod_time);
|
||||
local($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks);
|
||||
|
||||
if(! chdir "$start_dir/$dir" ){
|
||||
return;
|
||||
}
|
||||
|
||||
while(<*.*> ){
|
||||
if( $_ ne '.' && $_ ne '..' && $_ ne 'CVS'
|
||||
&& $_ ne 'nuke' ){
|
||||
$filelist{$_} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( -r "CVS/Entries" ){
|
||||
$iscvsdir=1;
|
||||
open(ENT, "CVS/Entries" ) ||
|
||||
die "Cannot open CVS/Entries for reading\n";
|
||||
while(<ENT>){
|
||||
chop;
|
||||
($d,$fn,$rev,$mod_time) = split(/\//);
|
||||
|
||||
if( $fn ne "" ){
|
||||
if( $d eq "D" ){
|
||||
$filelist{$fn} = 3;
|
||||
}
|
||||
else {
|
||||
$filelist{$fn} = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(ENT);
|
||||
}
|
||||
|
||||
while( ($k,$v) = each %filelist ){
|
||||
if( $v == 1 && $iscvsdir && !IgnoreFile( $k ) ){
|
||||
if( ! -d $k ){
|
||||
print " file: $dir/$k\n";
|
||||
$missed++;
|
||||
}
|
||||
else {
|
||||
if( ! -r "$k/CVS/Entries" ){
|
||||
print "directory: $dir/$k\n";
|
||||
$missed++;
|
||||
}
|
||||
else {
|
||||
$filelist{$k} = 3;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while( ($k,$v) = each %filelist ){
|
||||
if( $v == 3 ){
|
||||
GoDir("$dir/$k");
|
||||
}
|
||||
}
|
||||
|
||||
# while( ($k,$v) = each %filelist ){
|
||||
# print "$k: $v\n";
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
sub IgnoreFile {
|
||||
local($fn) = @_;
|
||||
local($i);
|
||||
|
||||
for $i (@ignore_list){
|
||||
if( $fn eq $i ){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
INCLUDED_COMMON_MK = 1
|
||||
|
||||
######################################################################
|
||||
# Cross-platform defines used on all platforms (in theory)
|
||||
######################################################################
|
||||
|
||||
#
|
||||
# The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
|
||||
# Since the longest of these is 5 characters without the suffix,
|
||||
# be sure to not set VERSION_NUMBER to anything longer than 3
|
||||
# characters for Win16's sake.
|
||||
#
|
||||
# Also... If you change this value, there are several other places
|
||||
# you'll need to change (because they're not reached by this
|
||||
# variable):
|
||||
# sun-java/nsjava/nsjava32.def
|
||||
# sun-java/nsjava/nsjava16.def
|
||||
# sun-java/classsrc/sun/audio/AudioDevice.java
|
||||
# sun-java/classsrc/sun/awt/windows/WToolkit.java
|
||||
#
|
||||
VERSION_NUMBER = 50
|
||||
|
||||
# jar for core java classes:
|
||||
JAR_NAME = java$(VERSION_NUMBER).jar
|
||||
|
||||
# jar for navigator-specific java code:
|
||||
NAV_JAR_NAME = nav$(VERSION_NUMBER).jar
|
||||
|
||||
######################################################################
|
||||
# Cross-Platform Java Stuff
|
||||
######################################################################
|
||||
# java interpreter
|
||||
|
||||
# get class files from the directory they are compiled to
|
||||
JAVA_CLASSPATH = $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)
|
||||
|
||||
JAVA_FLAGS = -classpath $(JAVA_CLASSPATH) -ms8m
|
||||
JAVA = $(JAVA_PROG) $(JAVA_FLAGS)
|
||||
|
||||
#
|
||||
# NOTE: If a new DLL is being added to this define you will have to update
|
||||
# ns/sun-java/include/javadefs.h in order not to break win16.
|
||||
#
|
||||
JAVA_DEFINES = -DJAR_NAME=\"$(JAR_NAME)\" -DJRTDLL=\"$(JRTDLL)\" -DMMDLL=\"$(MMDLL)\" \
|
||||
-DAWTDLL=\"$(AWTDLL)\" -DJITDLL=\"$(JITDLL)\" -DJPWDLL=\"$(JPWDLL)\"
|
||||
|
||||
######################################################################
|
||||
# javac
|
||||
|
||||
#
|
||||
# java wants '-ms8m' and kaffe wants '-ms 8m', so this needs to be
|
||||
# overridable.
|
||||
#
|
||||
JINT_FLAGS = -ms8m
|
||||
|
||||
# to run the compiler in the interpreter
|
||||
JAVAC_PROG = $(JINT_FLAGS) $(PDJAVA_FLAGS) -classpath $(JAVAC_ZIP) sun.tools.javac.Main
|
||||
JAVAC = $(JAVA_PROG) $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
||||
# std set of options passed to the compiler
|
||||
JAVAC_FLAGS = -classpath $(JAVAC_CLASSPATH) $(JAVAC_OPTIMIZER) -d $(JAVA_DESTPATH)
|
||||
|
||||
#
|
||||
# The canonical Java classpath is:
|
||||
# JAVA_DESTPATH, JAVA_SOURCEPATH, JAVA_LIBS
|
||||
#
|
||||
# appropriately delimited, in that order
|
||||
#
|
||||
JAVAC_CLASSPATH = $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)
|
||||
|
||||
######################################################################
|
||||
# javadoc
|
||||
|
||||
# Rules to build java .html files from java source files
|
||||
|
||||
JAVADOC_PROG = $(JAVA) sun.tools.javadoc.Main
|
||||
JAVADOC_FLAGS = -classpath $(JAVAC_CLASSPATH)
|
||||
JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# javah
|
||||
|
||||
JAVAH_FLAGS = -classpath $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)
|
||||
JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# jmc
|
||||
|
||||
JMCSRCDIR = $(DIST)/_jmc
|
||||
JMC_PROG = $(JAVA) netscape.tools.jmc.Main
|
||||
JMC_CLASSPATH = $(JMCSRCDIR)$(PATH_SEPARATOR)$(JAVAC_CLASSPATH)
|
||||
JMC_FLAGS = -classpath $(JMC_CLASSPATH) -verbose
|
||||
JMC = $(JMC_PROG) $(JMC_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# zip
|
||||
|
||||
ZIP = $(ZIP_PROG) $(ZIP_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# idl2java
|
||||
|
||||
ORBTOOLS = $(DEPTH)/modules/iiop/tools/orbtools.zip
|
||||
ORB_CLASSPATH = $(ORBTOOLS)$(PATH_SEPARATOR)$(JAVA_CLASSPATH)
|
||||
|
||||
IDL2JAVA_PROG = $(JAVA_PROG)
|
||||
IDL2JAVA_FLAGS = -classpath $(ORB_CLASSPATH) pomoco.tools.idl2java
|
||||
IDL2JAVA = $(IDL2JAVA_PROG) $(IDL2JAVA_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# lex and yacc
|
||||
|
||||
JAVALEX_PROG = $(JAVA_PROG) -classpath $(ORB_CLASSPATH) sbktech.tools.jax.driver
|
||||
JAVALEX_FLAGS =
|
||||
JAVALEX = $(JAVALEX_PROG) $(JAVALEX_FLAGS)
|
||||
|
||||
JAVACUP_PROG = $(JAVA_PROG) -classpath $(ORB_CLASSPATH) java_cup.Main
|
||||
JAVACUP_FLAGS =
|
||||
JAVACUP = $(JAVACUP_PROG) $(JAVACUP_FLAGS)
|
||||
|
||||
@@ -1,605 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
!if !defined(CONFIG_CONFIG_MAK)
|
||||
CONFIG_CONFIG_MAK=1
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define public make variables:
|
||||
#//
|
||||
#// OBJDIR - Specifies the location of intermediate files (ie. objs...)
|
||||
#// Currently, the names are WINxx_O.OBJ or WINxx_D.OBJ for
|
||||
#// optimized and debug builds respectively.
|
||||
#//
|
||||
#// DIST - Specifies the location of the distribution directory where
|
||||
#// all targets are delivered.
|
||||
#//
|
||||
#// CFGFILE - Specifies the name of the temporary configuration file
|
||||
#// containing the arguments to the current command.
|
||||
#//
|
||||
#// INCS - Default include paths.
|
||||
#//
|
||||
#// CFLAGS - Default compiler options.
|
||||
#//
|
||||
#// LFLAGS - Default linker options.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// Detect WinNT vs. Win9x and set WINOS appropriately.
|
||||
#//
|
||||
#// Set WINOS in your environment to avoid the timewasting uname call
|
||||
#//
|
||||
#//-----------------------------------------------------------------------
|
||||
!if !defined(WINOS)
|
||||
!if [$(MOZ_TOOLS)\bin\uname > osuname.inc]
|
||||
!endif
|
||||
WINOS=\
|
||||
!include "osuname.inc"
|
||||
WINOS=$(WINOS: =)^
|
||||
|
||||
!if [del osuname.inc]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// DIST DEFINITION
|
||||
#//
|
||||
#//-----------------------------------------------------------------------
|
||||
|
||||
XPDIST=$(DEPTH)\dist
|
||||
!ifdef MODULE
|
||||
PUBLIC=$(XPDIST)\include\$(MODULE)
|
||||
!else
|
||||
PUBLIC=$(XPDIST)\include
|
||||
!endif
|
||||
|
||||
!ifdef NGLAYOUT_BUILD_PREFIX
|
||||
DIST_PREFIX=NGL
|
||||
!else
|
||||
!ifdef MOZ_NAV_BUILD_PREFIX
|
||||
DIST_PREFIX=NAV
|
||||
!else
|
||||
DIST_PREFIX=WIN
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifndef MOZ_DEBUG
|
||||
OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_O.OBJ
|
||||
JAVA_OPTIMIZER = -O
|
||||
!ifdef NO_CAFE
|
||||
JAVAC_OPTIMIZER =
|
||||
!else
|
||||
#JAVAC_OPTIMIZER= -O -noinline
|
||||
JAVAC_OPTIMIZER =
|
||||
!endif
|
||||
!else
|
||||
OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_D.OBJ
|
||||
JAVA_OPTIMIZER = -g
|
||||
JAVAC_OPTIMIZER = -g
|
||||
!endif
|
||||
|
||||
#//
|
||||
#// DIST DEFINES SHOULD NEVER BE COMPONENT SPECIFIC.
|
||||
#//
|
||||
!ifndef MOZ_DEBUG
|
||||
DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_O.OBJ
|
||||
!else
|
||||
DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_D.OBJ
|
||||
!endif
|
||||
|
||||
# This will always give the location of NGLayout's dist, even if "NGLAYOUT_BUILD_PREFIX" is not defined.
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
!ifndef MOZ_DEBUG
|
||||
NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_O.OBJ
|
||||
!else
|
||||
NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_D.OBJ
|
||||
!endif
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// Basic configuration settings
|
||||
#//
|
||||
#//-----------------------------------------------------------------------
|
||||
|
||||
!ifndef DISABLE_LDAP
|
||||
LDAP_CFLAGS=-I$(XPDIST)\include\ldap
|
||||
!endif
|
||||
|
||||
CFGFILE=$(OBJDIR)\cmd.cfg
|
||||
INCS=$(INCS) -I$(PUBLIC) -I$(DIST)\include -I$(XPDIST)\include\nspr
|
||||
|
||||
|
||||
!ifdef REQUIRES
|
||||
|
||||
!if "$(WINOS)" == "WIN95"
|
||||
|
||||
# use perl to translate REQUIRES into a proper include line
|
||||
# using \1 instead of $1 because nmake barfs on $1
|
||||
!if [echo $(REQUIRES) | perl -pe "s/(\w+)/-I$(XPDIST:\=\/)\\\include\\\\\1/g; print \"REQINCS=$_\";" > reqincs.inc]
|
||||
!endif
|
||||
|
||||
!else
|
||||
|
||||
REQINCS1=REQINCS=-I $(XPDIST)/include/$(REQUIRES: = -I$(XPDIST^)/include/)
|
||||
|
||||
!if [echo $(REQINCS1) > reqincs.inc]
|
||||
!endif
|
||||
|
||||
!endif
|
||||
|
||||
!include reqincs.inc
|
||||
|
||||
!if [del reqincs.inc]
|
||||
!endif
|
||||
|
||||
!endif
|
||||
|
||||
INCS=$(INCS) -I$(XPDIST)\include $(REQINCS)
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
CFLAGS=$(MOZ_JAVA_FLAG) -DEDITOR $(OS_CFLAGS) $(MOZ_CFLAGS)
|
||||
!else
|
||||
CFLAGS=$(MOZ_JAVA_FLAG) $(OS_CFLAGS) $(MOZ_CFLAGS)
|
||||
!endif
|
||||
|
||||
IBMBIDI=1
|
||||
CFLAGS=$(CFLAGS) -DIBMBIDI
|
||||
|
||||
!if "$(DISABLE_ACCESSIBILITY)" == "1"
|
||||
!undef ACCESSIBILITY
|
||||
!else
|
||||
ACCESSIBILITY=1
|
||||
CFLAGS=$(CFLAGS) -DACCESSIBILITY
|
||||
!endif
|
||||
|
||||
LFLAGS=$(OS_LFLAGS) $(LLFLAGS) $(MOZ_LFLAGS)
|
||||
|
||||
# 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(?):
|
||||
!if "$(MOZ_BITS)"=="32" || defined(MOZ_DEBUG)
|
||||
CFLAGS = $(CFLAGS) -DDEVELOPER_DEBUG
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_BSCFILE
|
||||
CFLAGS = $(CFLAGS) -FR
|
||||
!endif
|
||||
|
||||
!ifdef NO_LOGGING
|
||||
CFLAGS=$(CFLAGS) -DNS_DISABLE_LOGGING
|
||||
!else
|
||||
CFLAGS=$(CFLAGS) -DMOZ_LOGGING
|
||||
!endif
|
||||
|
||||
FINAL_LINK_COMPS=$(DIST)\final-link-comps
|
||||
FINAL_LINK_COMP_NAMES=$(DIST)\final-link-comp-names
|
||||
FINAL_LINK_LIBS=$(DIST)\final-link-libs
|
||||
|
||||
!ifdef MOZ_STATIC_COMPONENT_LIBS
|
||||
# Force _all_ exported methods to be |_declspec(dllexport)| when we're
|
||||
# building them into the executable.
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_APPSHELL
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_COOKIE
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_DOM
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_GFX
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_HTML
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_HTMLPARS
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_INTL
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_LAYOUT
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_MSG_BASE
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_NET
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_PICS
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_PLUGIN
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_RDF
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_VIEW
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_WEB
|
||||
CFLAGS=$(CFLAGS) -D_IMPL_NS_WIDGET
|
||||
!endif
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// feature-specific configuration settings
|
||||
#//
|
||||
#//-----------------------------------------------------------------------
|
||||
|
||||
# For modular netlib support.
|
||||
CFLAGS=$(CFLAGS) -DNS_MT_SUPPORTED -DNETLIB_THREAD -DNS_NET_FILE
|
||||
|
||||
# Defines for cookie management feature...
|
||||
CFLAGS=$(CFLAGS) -DCookieManagement
|
||||
|
||||
# Defines for single signon and client wallet features...
|
||||
!ifndef MOZ_NO_WALLET_HACK
|
||||
CFLAGS=$(CFLAGS) -DSingleSignon -DClientWallet
|
||||
!endif
|
||||
|
||||
# TODO Cleanup later -Gagan
|
||||
!ifdef NU_CACHE
|
||||
CFLAGS=$(CFLAGS) -DNU_CACHE
|
||||
!endif
|
||||
|
||||
# always need these:
|
||||
CFLAGS = $(CFLAGS) -DNETSCAPE
|
||||
|
||||
# Specify that we are building a client.
|
||||
# This will instruct the cross platform libraries to
|
||||
# include all the client specific cruft.
|
||||
!if defined(SERVER_BUILD)
|
||||
CFLAGS = $(CFLAGS) -DSERVER_BUILD
|
||||
!elseif defined(LIVEWIRE)
|
||||
CFLAGS = $(CFLAGS) -DLIVEWIRE
|
||||
!else
|
||||
CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT
|
||||
!endif
|
||||
|
||||
# need this everywhere jsapi.h might be included
|
||||
CFLAGS=$(CFLAGS) -DJS_THREADSAFE
|
||||
|
||||
!if "$(STAND_ALONE_JAVA)" == "1"
|
||||
CFLAGS=$(CFLAGS) -DSTAND_ALONE_JAVA
|
||||
!endif
|
||||
|
||||
NECKO=1
|
||||
CFLAGS=$(CFLAGS) -DNECKO
|
||||
|
||||
|
||||
!if defined(XPCOM_STANDALONE)
|
||||
CFLAGS=$(CFLAGS) -DXPCOM_STANDALONE
|
||||
!endif
|
||||
|
||||
!if defined(XPCONNECT_STANDALONE)
|
||||
CFLAGS=$(CFLAGS) -DXPCONNECT_STANDALONE
|
||||
!endif
|
||||
|
||||
# Enable output of performance metrics if MOZ_PERF is set
|
||||
!ifdef MOZ_PERF
|
||||
CFLAGS=$(CFLAGS) -DMOZ_PERF_METRICS
|
||||
!endif
|
||||
|
||||
# Enable timeline service if MOZ_TIMELINE is set
|
||||
!ifdef MOZ_TIMELINE
|
||||
CFLAGS=$(CFLAGS) -DMOZ_TIMELINE
|
||||
!endif
|
||||
|
||||
!ifndef MOZ_JAVA
|
||||
MOZ_OJI = 1 # on by default now
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_LIBTEST
|
||||
MOZ_LIBTEST = 1
|
||||
CFLAGS=$(CFLAGS) -DLAYPROBE_API
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_JAVA
|
||||
MOZ_JAVA_FLAG=-DJAVA
|
||||
!ifdef MOZ_OJI
|
||||
!error You can't define both MOZ_JAVA and MOZ_OJI anymore.
|
||||
!endif
|
||||
JAVA_OR_OJI = 1
|
||||
JAVA_OR_NSJVM = 1
|
||||
!endif
|
||||
|
||||
!ifdef NSJVM
|
||||
JAVA_OR_NSJVM = 1
|
||||
AWT_11 = 1 # always build awt 1.1 with nsjvm now
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_OJI
|
||||
CFLAGS=$(CFLAGS) -DOJI
|
||||
JAVA_OR_OJI=1
|
||||
!endif
|
||||
|
||||
!ifdef SMART_MAIL
|
||||
CFLAGS=$(CFLAGS) -DSMART_MAIL
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_TRACE_XPCOM_REFCNT
|
||||
CFLAGS=$(CFLAGS) -DMOZ_TRACE_XPCOM_REFCNT
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_TRACE_MALLOC
|
||||
CFLAGS=$(CFLAGS) -DNS_TRACE_MALLOC
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_SMOOTH_PROGRESS
|
||||
CFLAGS=$(CFLAGS) -DSMOOTH_PROGRESS
|
||||
!endif
|
||||
|
||||
!if defined(USE_STRING2)
|
||||
CFLAGS = $(CFLAGS) -DUSE_STRING2
|
||||
!endif
|
||||
|
||||
#!ifdef MOZ_XUL
|
||||
MOZ_XUL=1
|
||||
CFLAGS=$(CFLAGS) -DINCLUDE_XUL -DMOZ_XUL
|
||||
#!endif
|
||||
|
||||
!ifdef MOZ_MATHML
|
||||
CFLAGS=$(CFLAGS) -DMOZ_MATHML
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_SVG
|
||||
CFLAGS=$(CFLAGS) -DMOZ_SVG
|
||||
!endif
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
CFLAGS=$(CFLAGS) -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP
|
||||
!endif
|
||||
|
||||
CFLAGS=$(CFLAGS) -DUSE_IMG2 -DNS_PRINT_PREVIEW
|
||||
|
||||
!ifdef MOZ_STATIC_COMPONENT_LIBS
|
||||
CFLAGS=$(CFLAGS) -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT -DMOZ_STATIC_COMPONENT_LIBS
|
||||
!endif
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// build tools
|
||||
#//
|
||||
#//-----------------------------------------------------------------------
|
||||
|
||||
NMAKE=nmake -nologo -$(MAKEFLAGS)
|
||||
|
||||
# grab the perl from the user's path (probably need 5.005)
|
||||
PERL = perl.exe
|
||||
|
||||
#if MOZILLA_OFFICIAL is set, then define splitsym
|
||||
!if defined (MOZILLA_OFFICIAL)
|
||||
SPLITSYM = $(MOZ_TOOLS)\bin\splitsym
|
||||
!endif
|
||||
|
||||
# use find
|
||||
!ifndef FIND
|
||||
FIND = find.exe
|
||||
!endif
|
||||
|
||||
MASM = $(MOZ_TOOLS)\bin\ml.exe
|
||||
|
||||
!if "$(WINOS)" == "WIN95"
|
||||
MKDIR = $(DEPTH)\config\w95mkdir
|
||||
QUIET =
|
||||
!else
|
||||
MKDIR = mkdir
|
||||
QUIET=@
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the OS dependent configuration information
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/WIN$(MOZ_BITS)>
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
!ifdef USERNAME
|
||||
CFLAGS = $(CFLAGS) -DDEBUG_$(USERNAME)
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if (defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)) || (defined(GLOWCODE) && defined(GLOWPROF) && "$(MOZ_BITS)"=="32")
|
||||
CFLAGS = $(CFLAGS) /Gh
|
||||
!endif
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the global make commands.
|
||||
#//
|
||||
#// MAKE_INSTALL - Copy a target to the distribution directory.
|
||||
#//
|
||||
#// MAKE_OBJDIRS - Create an object directory (if necessary).
|
||||
#//
|
||||
#// MAKE_MANGLE - Convert all long filenames into 8.3 names
|
||||
#//
|
||||
#// MAKE_UNMANGLE - Restore all long filenames
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if !defined(MOZ_SRC)
|
||||
#enable builds on any drive if defined.
|
||||
MOZ_SRC=y:
|
||||
!endif
|
||||
MAKE_INSTALL=$(QUIET)$(DEPTH)\config\makecopy.exe
|
||||
MAKE_MANGLE=$(DEPTH)\config\mangle.exe
|
||||
MAKE_UNMANGLE=if exist unmangle.bat call unmangle.bat
|
||||
|
||||
!if defined(MOZ_PURIFY)
|
||||
# add #line directive to header files for purify
|
||||
MKCPYFLAGS= -i
|
||||
!endif
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Common Libraries
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
NSPR_VERSION=4
|
||||
LIBNSPR=$(DIST)\lib\nspr$(NSPR_VERSION).lib $(DIST)\lib\plds$(NSPR_VERSION).lib $(DIST)\lib\plc$(NSPR_VERSION).lib
|
||||
LIBPLC=$(DIST)\lib\plc$(NSPR_VERSION).lib
|
||||
|
||||
NSPRDIR = nsprpub
|
||||
CFLAGS = $(CFLAGS) -DNSPR20
|
||||
|
||||
LIBJPEG=$(DIST)\lib\jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Windows-Specific Java Stuff
|
||||
#//
|
||||
#// (Is this used anymore? Even if it is should it be in config.mak?)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
PATH_SEPARATOR = ;
|
||||
|
||||
!ifndef JAVA_HOME
|
||||
JAVA_HOME=$(JDKHOME)
|
||||
!endif
|
||||
|
||||
# where the bytecode will go
|
||||
!if "$(AWT_11)" == "1"
|
||||
JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes11
|
||||
!else
|
||||
JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes
|
||||
!endif
|
||||
|
||||
# where the source are
|
||||
DEFAULT_JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc
|
||||
!ifndef JAVA_SOURCEPATH
|
||||
!if "$(AWT_11)" == "1"
|
||||
JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH)
|
||||
!else
|
||||
JAVA_SOURCEPATH = $(DEFAULT_JAVA_SOURCEPATH)
|
||||
!endif
|
||||
!endif
|
||||
|
||||
JAVA_PROG=$(MOZ_TOOLS)\bin\java.exe
|
||||
#JAVA_PROG=$(DIST)\bin\java
|
||||
|
||||
JAVAC_ZIP=$(JAVA_HOME)\lib\classes.zip
|
||||
|
||||
ZIP_PROG = $(MOZ_TOOLS)\bin\zip
|
||||
UNZIP_PROG = $(MOZ_TOOLS)\bin\unzip
|
||||
ZIP_COMPR = 9
|
||||
ZIP_FLAGS = -$(ZIP_COMPR)r
|
||||
|
||||
CFLAGS = $(CFLAGS) -DOS_HAS_DLL
|
||||
|
||||
DLL_SUFFIX = dll
|
||||
LIB_SUFFIX = lib
|
||||
|
||||
!if "$(STAND_ALONE_JAVA)" == "1"
|
||||
STAND_ALONE_JAVA_DLL_SUFFIX=s
|
||||
!else
|
||||
STAND_ALONE_JAVA_DLL_SUFFIX=
|
||||
!endif
|
||||
|
||||
MOD_JRT=jrt$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_MM =mm$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_AWT=awt$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_AWTS=awt$(MOZ_BITS)$(VERSION_NUMBER)$(STAND_ALONE_JAVA_DLL_SUFFIX)
|
||||
MOD_JIT=jit$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_JSJ=jsj$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_NET=net$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_JBN=jbn$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_NSC=nsc$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_JPW=jpw$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_JDB=jdb$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_ZPW=zpw$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_CON=con$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
MOD_NPJ=npj$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
|
||||
JRTDLL=$(MOD_JRT).$(DLL_SUFFIX)
|
||||
MMDLL =$(MOD_MM).$(DLL_SUFFIX)
|
||||
AWTDLL=$(MOD_AWT).$(DLL_SUFFIX)
|
||||
AWTSDLL=$(MOD_AWT)$(STAND_ALONE_JAVA_DLL_SUFFIX).$(DLL_SUFFIX)
|
||||
JITDLL=$(MOD_JIT).$(DLL_SUFFIX)
|
||||
JSJDLL=$(MOD_JSJ).$(DLL_SUFFIX)
|
||||
NETDLL=$(MOD_NET).$(DLL_SUFFIX)
|
||||
JBNDLL=$(MOD_JBN).$(DLL_SUFFIX)
|
||||
NSCDLL=$(MOD_NSC).$(DLL_SUFFIX)
|
||||
JPWDLL=$(MOD_JPW).$(DLL_SUFFIX)
|
||||
JDBDLL=$(MOD_JDB).$(DLL_SUFFIX)
|
||||
ZPWDLL=$(MOD_ZPW).$(DLL_SUFFIX)
|
||||
CONDLL=$(MOD_CON).$(DLL_SUFFIX)
|
||||
NPJDLL=$(MOD_NPJ).$(DLL_SUFFIX)
|
||||
|
||||
AWTLIB=$(DIST)\lib\$(MOD_AWT).$(LIB_SUFFIX)
|
||||
|
||||
######################################################################
|
||||
|
||||
include <$(DEPTH)/config/common.mk>
|
||||
|
||||
JAVA_DEFINES = \
|
||||
-DJAR_NAME=\"$(JAR_NAME)\" \
|
||||
-DJRTDLL=\"$(JRTDLL)\" \
|
||||
-DMMDLL=\"$(MMDLL)\" \
|
||||
-DAWTDLL=\"$(AWTDLL)\" \
|
||||
-DAWTSDLL=\"$(AWTSDLL)\" \
|
||||
-DJSJDLL=\"$(JSJDLL)\" \
|
||||
-DJITDLL=\"$(JITDLL)\" \
|
||||
-DNETDLL=\"$(NETDLL)\" \
|
||||
-DJBNDLL=\"$(JBNDLL)\" \
|
||||
-DNSCDLL=\"$(NSCDLL)\" \
|
||||
-DJDBDLL=\"$(JDBDLL)\" \
|
||||
-DJPWDLL=\"$(JPWDLL)\" \
|
||||
-DZPWDLL=\"$(ZPWDLL)\" \
|
||||
-DCONDLL=\"$(CONDLL)\"
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
|
||||
# Override JAVA_DEFINES to make command line short for win16.
|
||||
# Put any new defines into javadefs.h in ns/sun-java/include.
|
||||
# This is to shorten the command line in order not to break Win16.
|
||||
|
||||
JAVA_DEFINES = -DJAR_NAME=\"$(JAR_NAME)\" -DMOZ_BITS=\"$(MOZ_BITS)\" -DVERSION_NUMBER=\"$(VERSION_NUMBER)\" -DDLL_SUFFIX=\".$(DLL_SUFFIX)\"
|
||||
|
||||
!endif
|
||||
|
||||
!if "$(AWT_11)" == "1"
|
||||
JAVA_DEFINES = $(JAVA_DEFINES) -DAWT_11
|
||||
!else
|
||||
JAVA_DEFINES = $(JAVA_DEFINES) -DAWT_102
|
||||
!endif
|
||||
|
||||
|
||||
#JAVA_CLASSPATH = $(JAVA_CLASSPATH:/=\)
|
||||
JMCSRCDIR = $(JMCSRCDIR:/=\)
|
||||
JAVA_BOOT_CLASSPATH = $(JAVA_BOOT_CLASSPATH:/=\)
|
||||
|
||||
|
||||
########
|
||||
# Get the cwd to prepend to all compiled source
|
||||
# files. Will allow debugger to automatically find sources
|
||||
# instead of asking for the path info.
|
||||
# Win16 will break if enabled, guess we continue to live in pain
|
||||
# therein.
|
||||
########
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
CURDIR=$(MAKEDIR)^\
|
||||
!endif
|
||||
|
||||
XPIDL_PROG=$(DIST)\bin\xpidl.exe
|
||||
XPTLINK_PROG=$(DIST)\bin\xpt_link.exe
|
||||
|
||||
# XXX If you change this name, be _sure_ to update rules.mak;
|
||||
# specifically, the rules that compute XPIDL_HEADERS and
|
||||
# XPIDL_TYPELIBS. 'nmake' is too dumb to allow recursive macro
|
||||
# substitution.
|
||||
|
||||
XPIDL_GEN_DIR=.\_xpidlgen
|
||||
|
||||
#MOZ_DISABLE_JAR_PACKAGING=1 # temporary
|
||||
|
||||
!endif # CONFIG_CONFIG_MAK
|
||||
|
||||
@@ -1,694 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
#
|
||||
# config.mk
|
||||
#
|
||||
# Determines the platform and builds the macros needed to load the
|
||||
# appropriate platform-specific .mk file, then defines all (most?)
|
||||
# of the generic macros.
|
||||
#
|
||||
|
||||
# Define an include-at-most-once flag
|
||||
INCLUDED_CONFIG_MK = 1
|
||||
|
||||
ifndef topsrcdir
|
||||
topsrcdir = $(DEPTH)
|
||||
endif
|
||||
|
||||
ifndef INCLUDED_AUTOCONF_MK
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
endif
|
||||
ifndef INCLUDED_INSURE_MK
|
||||
ifdef MOZ_INSURIFYING
|
||||
include $(topsrcdir)/config/insure.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef INCLUDED_COMMON_MK
|
||||
include $(topsrcdir)/config/common.mk
|
||||
endif
|
||||
|
||||
BUILD_TOOLS = $(topsrcdir)/build/unix
|
||||
CONFIG_TOOLS = $(DEPTH)/config
|
||||
AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf
|
||||
|
||||
#
|
||||
# Tweak the default OS_ARCH and OS_RELEASE macros as needed.
|
||||
#
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
OS_RELEASE := $(shell uname -v).$(shell uname -r)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),BSD_386)
|
||||
OS_ARCH := BSD_OS
|
||||
endif
|
||||
ifeq ($(OS_ARCH),dgux)
|
||||
OS_ARCH := DGUX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),IRIX64)
|
||||
OS_ARCH := IRIX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UNIX_SV)
|
||||
ifneq ($(findstring NCR,$(shell grep NCR /etc/bcheckrc | head -1 )),)
|
||||
OS_ARCH := NCR
|
||||
else
|
||||
OS_ARCH := UNIXWARE
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH),ncr)
|
||||
OS_ARCH := NCR
|
||||
endif
|
||||
# This is the only way to correctly determine the actual OS version on NCR boxes.
|
||||
ifeq ($(OS_ARCH),NCR)
|
||||
OS_RELEASE := $(shell awk '{print $$3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$$/\2.\3/')
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UNIX_System_V)
|
||||
OS_ARCH := NEC
|
||||
endif
|
||||
ifeq ($(OS_ARCH),OSF1)
|
||||
OS_SUB := $(shell uname -v)
|
||||
# Until I know the other possibilities, or an easier way to compute them, this is all there's gonna be.
|
||||
#ifeq ($(OS_SUB),240)
|
||||
#OS_RELEASE := V2.0
|
||||
#endif
|
||||
ifeq ($(OS_SUB),148)
|
||||
OS_RELEASE := V3.2C
|
||||
endif
|
||||
ifeq ($(OS_SUB),564)
|
||||
OS_RELEASE := V4.0B
|
||||
endif
|
||||
ifeq ($(OS_SUB),878)
|
||||
OS_RELEASE := V4.0D
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring OpenVMS,$(OS_ARCH)))
|
||||
OS_ARCH := OpenVMS
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
CPU_ARCH := $(shell uname -Wh)
|
||||
CPU_ARCH_TAG := _$(CPU_ARCH)
|
||||
PERL := perl
|
||||
endif
|
||||
ifeq ($(OS_ARCH),QNX)
|
||||
ifeq ($(OS_TARGET),NTO)
|
||||
LD := qcc -Vgcc_ntox86 -nostdlib
|
||||
else
|
||||
OS_RELEASE := $(shell uname -v | sed 's/^\([0-9]\)\([0-9]*\)$$/\1.\2/')
|
||||
LD := $(CC)
|
||||
endif
|
||||
OS_TEST := x86
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SCO_SV)
|
||||
OS_ARCH := SCOOS
|
||||
OS_RELEASE := 5.0
|
||||
endif
|
||||
ifneq (,$(filter SINIX-N SINIX-Y SINIX-Z ReliantUNIX-M,$(OS_ARCH)))
|
||||
OS_ARCH := SINIX
|
||||
OS_TEST := $(shell uname -p)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UnixWare)
|
||||
OS_ARCH := UNIXWARE
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),OS_2)
|
||||
OS_ARCH := OS2
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),BeOS)
|
||||
BEOS_ADDON_WORKAROUND = 1
|
||||
endif
|
||||
|
||||
#
|
||||
# Strip off the excessively long version numbers on these platforms,
|
||||
# but save the version to allow multiple versions of the same base
|
||||
# platform to be built in the same tree.
|
||||
#
|
||||
ifneq (,$(filter FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
|
||||
OS_RELEASE := $(basename $(OS_RELEASE))
|
||||
|
||||
# Allow the user to ignore the OS_VERSION, which is usually irrelevant.
|
||||
ifdef WANT_MOZILLA_CONFIG_OS_VERSION
|
||||
OS_VERS := $(suffix $(OS_RELEASE))
|
||||
OS_VERSION := $(shell echo $(OS_VERS) | sed 's/-.*//')
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
OS_CONFIG := $(OS_ARCH)$(OS_RELEASE)
|
||||
|
||||
FINAL_LINK_LIBS = $(DEPTH)/config/final-link-libs
|
||||
FINAL_LINK_COMPS = $(DEPTH)/config/final-link-comps
|
||||
FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
|
||||
|
||||
#
|
||||
# NSS libs needed for final link in static build
|
||||
#
|
||||
NSS_LIBS = \
|
||||
$(DIST)/lib/libsmime.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libcrmf.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libssl.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libnss.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libssl.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libpkcs12.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libpkcs7.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libcerthi.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libcryptohi.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libcerthi.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libsoftoken.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libcertdb.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libfreebl.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libsecutil.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libdbm.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/libunicharutil_s.$(LIB_SUFFIX)
|
||||
MOZ_REGISTRY_LIBS = $(DIST)/lib/libmozreg_s.$(LIB_SUFFIX)
|
||||
MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/libwidgetsupport_s.$(LIB_SUFFIX)
|
||||
|
||||
# determine debug-related options
|
||||
DEBUG_FLAGS :=
|
||||
|
||||
ifndef MOZ_DEBUG
|
||||
# global debugging is disabled
|
||||
# check if it was explicitly enabled for this module
|
||||
ifneq (, $(findstring $(MODULE), $(MOZ_DEBUG_MODULES)))
|
||||
MOZ_DEBUG:=1
|
||||
endif
|
||||
else
|
||||
# global debugging is enabled
|
||||
# check if it was explicitly disabled for this module
|
||||
ifneq (, $(findstring ^$(MODULE), $(MOZ_DEBUG_MODULES)))
|
||||
MOZ_DEBUG:=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
DEBUG_FLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
|
||||
else
|
||||
DEBUG_FLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
|
||||
endif
|
||||
|
||||
# determine if -g should be passed to the compiler, based on
|
||||
# the current module, and the value of MOZ_DBGRINFO_MODULES
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
MOZ_DBGRINFO_MODULES += ALL_MODULES
|
||||
pattern := ALL_MODULES ^ALL_MODULES
|
||||
else
|
||||
MOZ_DBGRINFO_MODULES += ^ALL_MODULES
|
||||
pattern := ^ALL_MODULES
|
||||
endif
|
||||
|
||||
ifdef MODULE
|
||||
# our current Makefile specifies a module name - add it to our pattern
|
||||
pattern += $(MODULE) ^$(MODULE)
|
||||
endif
|
||||
|
||||
# start by finding the first relevant module name
|
||||
# (remember that the order of the module names in MOZ_DBGRINFO_MODULES
|
||||
# is reversed from the order the user specified to configure -
|
||||
# this allows the user to put general names at the beginning
|
||||
# of the list, and to override them with explicit module names later
|
||||
# in the list)
|
||||
|
||||
first_match:=$(firstword $(filter $(pattern), $(MOZ_DBGRINFO_MODULES)))
|
||||
|
||||
ifeq ($(first_match), $(MODULE))
|
||||
# the user specified explicitly that
|
||||
# this module should be compiled with -g
|
||||
DEBUG_FLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
else
|
||||
ifeq ($(first_match), ^$(MODULE))
|
||||
# the user specified explicitly that this module
|
||||
# should not be compiled with -g (nothing to do)
|
||||
else
|
||||
ifeq ($(first_match), ALL_MODULES)
|
||||
# the user didn't mention this module explicitly,
|
||||
# but wanted all modules to be compiled with -g
|
||||
DEBUG_FLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
else
|
||||
ifeq ($(first_match), ^ALL_MODULES)
|
||||
# the user didn't mention this module explicitly,
|
||||
# but wanted all modules to be compiled without -g (nothing to do)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# append debug flags
|
||||
# (these might have been above when processing MOZ_DBGRINFO_MODULES)
|
||||
OS_CFLAGS += $(DEBUG_FLAGS)
|
||||
OS_CXXFLAGS += $(DEBUG_FLAGS)
|
||||
|
||||
#
|
||||
# -ffunction-sections is needed to reorder functions using a GNU ld
|
||||
# script.
|
||||
#
|
||||
ifeq ($(MOZ_REORDER),1)
|
||||
OS_CFLAGS += -ffunction-sections
|
||||
OS_CXXFLAGS += -ffunction-sections
|
||||
endif
|
||||
|
||||
#
|
||||
# List known meta modules and their dependent libs
|
||||
#
|
||||
_ALL_META_COMPONENTS=mail crypto
|
||||
|
||||
MOZ_META_COMPONENTS_mail = nsMsgBaseModule IMAP_factory nsVCardModule mime_services nsMimeEmitterModule nsMsgNewsModule nsMsgComposeModule local_mail_services nsAbSyncModule nsImportServiceModule nsTextImportModule nsAbModule nsMsgDBModule
|
||||
MOZ_META_COMPONENTS_mail_comps = mailnews msgimap mime mimeemitter msgnews msgcompose localmail absyncsvc import addrbook impText vcard msgdb
|
||||
MOZ_META_COMPONENTS_mail_libs = msgbaseutil mimecthglue_s
|
||||
ifdef MOZ_PSM
|
||||
MOZ_META_COMPONENTS_mail += nsMsgSMIMEModule
|
||||
MOZ_META_COMPONENTS_mail_comps += msgsmime
|
||||
else
|
||||
MOZ_META_COMPONENTS_mail += nsSMIMEModule
|
||||
MOZ_META_COMPONENTS_mail_comps += smimestb
|
||||
endif
|
||||
|
||||
MOZ_META_COMPONENTS_crypto = PKI NSS
|
||||
MOZ_META_COMPONENTS_crypto_comps = pippki pipnss
|
||||
|
||||
#
|
||||
# Build using PIC by default
|
||||
# Do not use PIC if not building a shared lib (see exceptions below)
|
||||
#
|
||||
ifneq (,$(BUILD_SHARED_LIBS)$(FORCE_SHARED_LIB)$(FORCE_USE_PIC))
|
||||
_ENABLE_PIC=1
|
||||
endif
|
||||
|
||||
# If module is going to be merged into the nsStaticModule,
|
||||
# make sure that the entry points are translated and
|
||||
# the module is built static.
|
||||
|
||||
ifdef IS_COMPONENT
|
||||
ifneq (,$(MOZ_STATIC_COMPONENT_LIBS)$(findstring $(LIBRARY_NAME), $(MOZ_STATIC_COMPONENTS)))
|
||||
ifdef MODULE_NAME
|
||||
DEFINES += -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1
|
||||
FORCE_STATIC_LIB=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Determine if module being compiled is destined
|
||||
# to be merged into a meta module in the future
|
||||
|
||||
ifneq (, $(findstring $(META_COMPONENT), $(MOZ_META_COMPONENTS)))
|
||||
ifdef IS_COMPONENT
|
||||
ifdef MODULE_NAME
|
||||
DEFINES += -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1
|
||||
endif
|
||||
endif
|
||||
EXPORT_LIBRARY=
|
||||
FORCE_STATIC_LIB=1
|
||||
_ENABLE_PIC=1
|
||||
endif
|
||||
|
||||
#
|
||||
# Disable PIC if necessary
|
||||
#
|
||||
|
||||
ifndef _ENABLE_PIC
|
||||
DSO_CFLAGS=
|
||||
DSO_PIC_CFLAGS=
|
||||
MKSHLIB=
|
||||
endif
|
||||
|
||||
#
|
||||
# Personal makefile customizations go in these optional make include files.
|
||||
#
|
||||
MY_CONFIG := $(DEPTH)/config/myconfig.mk
|
||||
MY_RULES := $(DEPTH)/config/myrules.mk
|
||||
|
||||
#
|
||||
# Relative pathname from top-of-tree to current source directory
|
||||
#
|
||||
ifneq ($(OS_ARCH),OS2)
|
||||
REVDEPTH = $(CONFIG_TOOLS)/revdepth
|
||||
endif
|
||||
|
||||
#
|
||||
# Provide the means to easily override our tool directory locations.
|
||||
#
|
||||
ifdef NETSCAPE_HIERARCHY
|
||||
CONTRIB_BIN := /tools/contrib/bin/
|
||||
JAVA_BIN := /usr/local/java/bin/
|
||||
LOCAL_BIN := /usr/local/bin/
|
||||
LOCAL_SUN4 := /usr/local/sun4/bin/
|
||||
NS_BIN := /tools/ns/bin/
|
||||
NS_LIB := /tools/ns/lib
|
||||
JAVA_LIB := /usr/local/netscape/java/lib
|
||||
else
|
||||
NS_LIB := .
|
||||
JAVA_LIB := .
|
||||
endif
|
||||
|
||||
# Allow NETSCAPE_COMMERCIAL to include XFEPRIVDIR
|
||||
ifdef NETSCAPE_COMMERCIAL
|
||||
XFEPRIVDIR := $(DEPTH)/../ns/cmd/xfe/
|
||||
endif
|
||||
|
||||
#
|
||||
# Default command macros; can be overridden in <arch>.mk.
|
||||
#
|
||||
CCC = $(CXX)
|
||||
CCF = $(CC) $(CFLAGS)
|
||||
LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS)
|
||||
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
|
||||
NFSPWD = $(CONFIG_TOOLS)/nfspwd
|
||||
PURIFY = purify $(PURIFYOPTIONS)
|
||||
QUANTIFY = quantify $(QUANTIFYOPTIONS)
|
||||
ifdef CROSS_COMPILE
|
||||
XPIDL_COMPILE = $(DIST)/host/bin/host_xpidl$(BIN_SUFFIX)
|
||||
XPIDL_LINK = $(DIST)/host/bin/host_xpt_link$(BIN_SUFFIX)
|
||||
else
|
||||
XPIDL_COMPILE = $(DIST)/bin/xpidl$(BIN_SUFFIX)
|
||||
XPIDL_LINK = $(DIST)/bin/xpt_link$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
PATH_SEPARATOR := \;
|
||||
else
|
||||
PATH_SEPARATOR := :
|
||||
ifeq ($(AWT_11),1)
|
||||
JAVA_PROG = $(NS_BIN)java
|
||||
JAVAC_ZIP = $(NS_LIB)/classes.zip
|
||||
else
|
||||
JAVA_PROG = $(LOCAL_BIN)java
|
||||
ifdef JDKHOME
|
||||
JAVAC_ZIP = $(JAVA_LIB)/classes.zip
|
||||
else
|
||||
JAVAC_ZIP = $(JAVA_LIB)/javac.zip
|
||||
endif
|
||||
endif
|
||||
TAR = tar
|
||||
endif # OS2
|
||||
|
||||
ifeq ($(OS_ARCH),OpenVMS)
|
||||
include $(topsrcdir)/config/$(OS_ARCH).mk
|
||||
endif
|
||||
|
||||
XBCFLAGS =
|
||||
ifdef MOZ_DEBUG
|
||||
JAVA_OPTIMIZER = -g
|
||||
XBCFLAGS = -FR$*
|
||||
endif
|
||||
|
||||
REQ_INCLUDES = $(foreach d,$(REQUIRES),-I$(DIST)/include/$d)
|
||||
|
||||
INCLUDES = $(LOCAL_INCLUDES) $(REQ_INCLUDES) -I$(PUBLIC) -I$(DIST)/include $(OS_INCLUDES)
|
||||
|
||||
LIBNT = $(DIST)/lib/libnt.$(LIB_SUFFIX)
|
||||
LIBAWT = $(DIST)/lib/libawt.$(LIB_SUFFIX)
|
||||
LIBMMEDIA = $(DIST)/lib/libmmedia.$(LIB_SUFFIX)
|
||||
|
||||
NSPRDIR = nsprpub
|
||||
LIBNSPR = $(DIST)/lib/libplds3.$(LIB_SUFFIX) $(DIST)/lib/libnspr3.$(LIB_SUFFIX)
|
||||
PURELIBNSPR = $(DIST)/lib/purelibplds3.$(LIB_SUFFIX) $(DIST)/lib/purelibnspr3.$(LIB_SUFFIX)
|
||||
|
||||
ifdef DBMALLOC
|
||||
LIBNSPR += $(DIST)/lib/libdbmalloc.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
ifneq ($(MOZ_WIDGET_TOOLKIT), os2)
|
||||
LIBNSJAVA = $(DIST)/lib/jrt$(MOZ_BITS)$(VERSION_NUMBER).$(LIB_SUFFIX)
|
||||
LIBMD = $(DIST)/lib/libjmd.$(LIB_SUFFIX)
|
||||
LIBJAVA = $(DIST)/lib/libjrt.$(LIB_SUFFIX)
|
||||
LIBNSPR = $(DIST)/lib/pr$(MOZ_BITS)$(VERSION_NUMBER).$(LIB_SUFFIX)
|
||||
LIBXP = $(DIST)/lib/libxp.$(LIB_SUFFIX)
|
||||
endif
|
||||
else
|
||||
LIBNSJAVA = $(DIST)/lib/nsjava32.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
CFLAGS = $(OS_CFLAGS)
|
||||
CXXFLAGS = $(OS_CXXFLAGS)
|
||||
LDFLAGS = $(OS_LDFLAGS)
|
||||
|
||||
# Allow each module to override the *default* optimization settings
|
||||
# by setting MODULE_OPTIMIZE_FLAGS iff the developer has not given
|
||||
# arguments to --enable-optimize
|
||||
ifdef MOZ_OPTIMIZE
|
||||
ifeq (1,$(MOZ_OPTIMIZE))
|
||||
ifdef MODULE_OPTIMIZE_FLAGS
|
||||
CFLAGS += $(MODULE_OPTIMIZE_FLAGS)
|
||||
CXXFLAGS += $(MODULE_OPTIMIZE_FLAGS)
|
||||
else
|
||||
CFLAGS += $(MOZ_OPTIMIZE_FLAGS)
|
||||
CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS)
|
||||
endif # MODULE_OPTIMIZE_FLAGS
|
||||
else
|
||||
CFLAGS += $(MOZ_OPTIMIZE_FLAGS)
|
||||
CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS)
|
||||
endif # MOZ_OPTIMIZE == 1
|
||||
LDFLAGS += $(MOZ_OPTIMIZE_LDFLAGS)
|
||||
endif # MOZ_OPTIMIZE
|
||||
|
||||
COMPILE_CFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(OS_COMPILE_CFLAGS)
|
||||
COMPILE_CXXFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(OS_COMPILE_CXXFLAGS)
|
||||
|
||||
#
|
||||
# Some platforms (Solaris) might require builds using either
|
||||
# (or both) compiler(s).
|
||||
#
|
||||
ifdef SHOW_CC_TYPE
|
||||
COMPILER = _$(notdir $(CC))
|
||||
endif
|
||||
|
||||
#
|
||||
# Name of the binary code directories
|
||||
#
|
||||
# Override defaults
|
||||
|
||||
# We need to know where to find the libraries we
|
||||
# put on the link line for binaries, and should
|
||||
# we link statically or dynamic? Assuming dynamic for now.
|
||||
LIBS_DIR = -L$(DIST)/bin -L$(DIST)/lib
|
||||
|
||||
# Default location of include files
|
||||
ifdef MODULE
|
||||
PUBLIC = $(DIST)/include/$(MODULE)
|
||||
else
|
||||
PUBLIC = $(DIST)/include
|
||||
endif
|
||||
|
||||
DEPENDENCIES = .md
|
||||
|
||||
MOZ_COMPONENT_LIBS=$(MOZ_COMPONENT_XPCOM_LIBS) $(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
ifdef GC_LEAK_DETECTOR
|
||||
MOZ_COMPONENT_XPCOM_LIBS += -lboehm
|
||||
XPCOM_LIBS += -lboehm
|
||||
endif
|
||||
|
||||
ifdef MOZ_DEMANGLE_SYMBOLS
|
||||
MOZ_COMPONENT_XPCOM_LIBS += -liberty
|
||||
XPCOM_LIBS += -liberty
|
||||
endif
|
||||
|
||||
ifeq (xpconnect, $(findstring xpconnect, $(BUILD_MODULES)))
|
||||
DEFINES += -DXPCONNECT_STANDALONE
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
ELF_DYNSTR_GC = echo
|
||||
else
|
||||
ELF_DYNSTR_GC = :
|
||||
endif
|
||||
|
||||
ifndef CROSS_COMPILE
|
||||
ifdef USE_ELF_DYNSTR_GC
|
||||
ifdef MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
|
||||
ELF_DYNSTR_GC = $(DIST)/bin/elf-dynstr-gc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
|
||||
ifdef MOZ_NATIVE_MAKEDEPEND
|
||||
MKDEPEND_DIR =
|
||||
MKDEPEND = $(MOZ_NATIVE_MAKEDEPEND)
|
||||
else
|
||||
MKDEPEND_DIR = $(CONFIG_TOOLS)/mkdepend
|
||||
MKDEPEND = $(MKDEPEND_DIR)/mkdepend
|
||||
ifndef COMPILER_DEPEND
|
||||
ifneq ($(OS_ARCH),OS2)
|
||||
MKDEPEND_BUILTIN = $(MKDEPEND_DIR)/mkdepend
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Include any personal overrides the user might think are needed.
|
||||
#
|
||||
-include $(MY_CONFIG)
|
||||
|
||||
######################################################################
|
||||
# Now test variables that might have been set or overridden by $(MY_CONFIG).
|
||||
|
||||
DEFINES += -DOSTYPE=\"$(OS_CONFIG)\"
|
||||
DEFINES += -DOSARCH=\"$(OS_ARCH)\"
|
||||
|
||||
#
|
||||
# Platform dependent switching off of JAVA
|
||||
#
|
||||
ifdef MOZ_JAVA
|
||||
DEFINES += -DJAVA
|
||||
ifdef MOZ_OJI
|
||||
error You can't define both MOZ_JAVA and MOZ_OJI anymore.
|
||||
endif
|
||||
JAVA_OR_OJI = 1
|
||||
JAVA_OR_NSJVM = 1
|
||||
endif
|
||||
|
||||
ifdef NSJVM
|
||||
JAVA_OR_NSJVM = 1
|
||||
endif
|
||||
|
||||
ifdef MOZ_OJI
|
||||
DEFINES += -DOJI
|
||||
JAVA_OR_OJI = 1
|
||||
endif
|
||||
|
||||
ifdef JAVA_OR_NSJVM # XXX fix -- su can't depend on java
|
||||
MOZ_SMARTUPDATE = 1
|
||||
endif
|
||||
|
||||
ifdef FORTEZZA
|
||||
DEFINES += -DFORTEZZA
|
||||
endif
|
||||
|
||||
# For profiling
|
||||
ifdef ENABLE_EAZEL_PROFILER
|
||||
ifndef INTERNAL_TOOLS
|
||||
ifneq ($(LIBRARY_NAME), xpt)
|
||||
ifneq (, $(findstring $(shell $(topsrcdir)/build/unix/print-depth-path.sh | awk -F/ '{ print $$2; }'), $(MOZ_PROFILE_MODULES)))
|
||||
PROFILER_CFLAGS = $(EAZEL_PROFILER_CFLAGS) -DENABLE_EAZEL_PROFILER
|
||||
PROFILER_LIBS = $(EAZEL_PROFILER_LIBS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
|
||||
GARBAGE += $(DEPENDENCIES) $(MKDEPENDENCIES) $(MKDEPENDENCIES).bak core $(wildcard core.[0-9]*) $(wildcard *.err) $(wildcard *.pure) $(wildcard *_pure_*.o) Templates.DB
|
||||
|
||||
ifneq (,$(filter-out WINNT, $(OS_ARCH)))
|
||||
NSINSTALL = $(CONFIG_TOOLS)/nsinstall
|
||||
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
# copy files, but preserve source mtime
|
||||
INSTALL = $(NSINSTALL) -t
|
||||
else
|
||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
||||
# install using absolute symbolic links
|
||||
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
|
||||
else
|
||||
# install using relative symbolic links
|
||||
INSTALL = $(NSINSTALL) -R
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
### Java Stuff - see common.mk
|
||||
######################################################################
|
||||
|
||||
# where the bytecode will go
|
||||
JAVA_DESTPATH = $(DIST)/classes
|
||||
|
||||
# where the sources for the module you are compiling are
|
||||
# default is sun-java/classsrc, override for other modules
|
||||
ifndef JAVA_SOURCEPATH
|
||||
JAVA_SOURCEPATH = $(DEPTH)/sun-java/classsrc
|
||||
endif
|
||||
|
||||
ifndef JAVAH_IN_JAVA
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
JAVAH_PROG = flipper $(DIST)/bin/javah
|
||||
else
|
||||
JAVAH_PROG = $(DIST)/bin/javah
|
||||
endif
|
||||
else
|
||||
JAVAH_PROG = $(JAVA) netscape.tools.jric.Main
|
||||
endif
|
||||
|
||||
ifneq ($(JDKHOME),)
|
||||
JAVAH_PROG = $(JDKHOME)/bin/javah
|
||||
JAVAC_PROG = $(JDKHOME)/bin/javac $(JAVAC_FLAGS)
|
||||
JAVAC = $(JAVAC_PROG)
|
||||
endif
|
||||
|
||||
ifeq ($(STAND_ALONE_JAVA),1)
|
||||
STAND_ALONE_JAVA_DLL_SUFFIX = s
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),OLD_IBM_BUILD) # These DLL names are no longer valid for OS/2
|
||||
AWTDLL = awt$(MOZ_BITS)$(VERSION_NUMBER).$(DLL_SUFFIX)
|
||||
AWTSDLL = awt$(MOZ_BITS)$(VERSION_NUMBER)$(STAND_ALONE_JAVA_DLL_SUFFIX).$(DLL_SUFFIX)
|
||||
CONDLL = con.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
JBNDLL = jbn.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
JDBCDLL = jdb.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
JITDLL = jit.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
JPWDLL = jpw.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
JRTDLL = jrt$(MOZ_BITS)$(VERSION_NUMBER).$(DLL_SUFFIX)
|
||||
JSJDLL = jsj.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
MMDLL = mm$(MOZ_BITS)$(VERSION_NUMBER).$(DLL_SUFFIX)
|
||||
NETDLL = net.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
NSCDLL = nsc.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
ZIPDLL = zip.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
ZPWDLL = zpw.$(MOZ_BITS)$(VERSION_NUMBER)(DLL_SUFFIX)
|
||||
else
|
||||
AWTDLL = libawt.$(DLL_SUFFIX)
|
||||
AWTSDLL = libawt$(STAND_ALONE_JAVA_DLL_SUFFIX).$(DLL_SUFFIX)
|
||||
CONDLL = libcon.$(DLL_SUFFIX)
|
||||
JBNDLL = libjbn.$(DLL_SUFFIX)
|
||||
JDBCDLL = libjdb.$(DLL_SUFFIX)
|
||||
JITDLL = libjit.$(DLL_SUFFIX)
|
||||
JPWDLL = libjpw.$(DLL_SUFFIX)
|
||||
JRTDLL = libjrt.$(DLL_SUFFIX)
|
||||
JSJDLL = libjsj.$(DLL_SUFFIX)
|
||||
MMDLL = libmm.$(DLL_SUFFIX)
|
||||
NETDLL = libnet.$(DLL_SUFFIX)
|
||||
NSCDLL = libnsc.$(DLL_SUFFIX)
|
||||
ZIPDLL = libzip.$(DLL_SUFFIX)
|
||||
ZPWDLL = libzpw.$(DLL_SUFFIX)
|
||||
endif
|
||||
|
||||
JAVA_DEFINES += -DAWTSDLL=\"$(AWTSDLL)\" -DCONDLL=\"$(CONDLL)\" -DJBNDLL=\"$(JBNDLL)\" -DJDBDLL=\"$(JDBDLL)\" \
|
||||
-DJSJDLL=\"$(JSJDLL)\" -DNETDLL=\"$(NETDLL)\" -DNSCDLL=\"$(NSCDLL)\" -DZPWDLL=\"$(ZPWDLL)\" \
|
||||
-DJAR_NAME=\"$(JAR_NAME)\"
|
||||
|
||||
ifeq ($(AWT_11),1)
|
||||
JAVA_DEFINES += -DAWT_11
|
||||
else
|
||||
JAVA_DEFINES += -DAWT_102
|
||||
endif
|
||||
|
||||
#caca:
|
||||
# @echo $(PROFILER_CFLAGS)
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# cvsco-fast-update.pl cvs co ...
|
||||
#
|
||||
# This command parses a "cvs co ..." command and converts it to
|
||||
# fast-update.pl commands
|
||||
#
|
||||
use Getopt::Long;
|
||||
|
||||
my $filename = ".fast-update";
|
||||
my $start_time = time();
|
||||
|
||||
my $branch;
|
||||
my @modules;
|
||||
my @dirs;
|
||||
|
||||
print "$0: (".join(')(',@ARGV).")\n";
|
||||
while (scalar(@ARGV)) {
|
||||
my $val = shift(@ARGV);
|
||||
if ( ($val eq '-A') || ($val eq 'co') || ($val eq 'cvs')
|
||||
|| ($val eq '-P') || ($val eq '-q')) {
|
||||
#print "ignore $val\n";
|
||||
next;
|
||||
}
|
||||
elsif (($val eq '-d') || ($val eq '-q') || ($val eq '-z')) {
|
||||
my $tmp = shift @ARGV;
|
||||
#print "ignore $val $tmp\n";
|
||||
next;
|
||||
}
|
||||
elsif ($val eq '-r') {
|
||||
$branch = shift @ARGV;
|
||||
#print "branch = $branch\n";
|
||||
next;
|
||||
}
|
||||
elsif ($val =~ /^-/) {
|
||||
print "*** unknown switch: $val\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($val =~ /\//) {
|
||||
push @dirs, $val;
|
||||
#print "dir = $val\n";
|
||||
}
|
||||
else {
|
||||
push @modules, $val;
|
||||
#print "module = $val\n";
|
||||
}
|
||||
}
|
||||
|
||||
#print "dir = (".join(')(', @dirs)."), "
|
||||
# . "module = (".join(')(', @modules)."), "
|
||||
# . "branch = ($branch)\n";
|
||||
|
||||
if (!$branch) {
|
||||
$branch = 'HEAD';
|
||||
}
|
||||
|
||||
my $status = 0;
|
||||
foreach my $mod (@modules) {
|
||||
my $cmd = "config/fast-update.pl -r $branch -m $mod";
|
||||
#print "system \"$cmd\"\n";
|
||||
$status |= system $cmd;
|
||||
}
|
||||
foreach my $d (@dirs) {
|
||||
my $cmd = "config/fast-update.pl -r $branch -d $d -m all";
|
||||
#print "system \"$cmd\"\n";
|
||||
$status |= system $cmd;
|
||||
}
|
||||
|
||||
exit $status;
|
||||
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Stephen Lamm
|
||||
#
|
||||
|
||||
sub usage {
|
||||
warn "usage: cvsco.pl <checkout_command>\n"
|
||||
." <checkout_command> is the entire cvs co command\n"
|
||||
." (e.g. cvs -q -z3 co SeaMonkeyAll).\n";
|
||||
}
|
||||
|
||||
usage(), die "Error: Not enough arguments\n" if $#ARGV < 0;
|
||||
usage(), die "Error: Wrong cwd. Must chdir to mozilla/..\n"
|
||||
unless -r 'mozilla/config/cvsco.pl';
|
||||
|
||||
$co_command = join ' ', @ARGV;
|
||||
|
||||
$logfile = 'cvslog.txt';
|
||||
$old_logfile = 'cvslog-old.txt';
|
||||
|
||||
sub dblprint {
|
||||
print LOG @_;
|
||||
print STDERR @_;
|
||||
}
|
||||
|
||||
if (-r $logfile) {
|
||||
rename $logfile, $old_logfile;
|
||||
print "rename $logfile, $old_logfile\n";
|
||||
}
|
||||
|
||||
open LOG, ">$logfile";
|
||||
open CVSCO, "$co_command|";
|
||||
|
||||
dblprint "\ncheckout start: ".scalar(localtime)."\n";
|
||||
dblprint "$co_command | tee cvslog.txt\n";
|
||||
|
||||
while (<CVSCO>) {
|
||||
dblprint $_;
|
||||
push @conflicts, $_ if /^C /;
|
||||
}
|
||||
|
||||
if (@conflicts) {
|
||||
print "Error: cvs conflicts during checkout:\n";
|
||||
die join('', @conflicts);
|
||||
}
|
||||
|
||||
close(CVSCO) or die "cvs error.\n";
|
||||
dblprint 'checkout finish: '.scalar(localtime)."\n";
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
!if !defined(VERBOSE)
|
||||
.SILENT:
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// This makefile contains all of the rules necessary to build 16 and 32 bit
|
||||
#// DLLs.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(DLL) && !defined(CONFIG_DLL_INC)
|
||||
CONFIG_DLL_INC=1
|
||||
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 16-bit DLL using the DLL target
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(DLL): $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(MISCDEP) makefile.win $(DEPTH)\config\dll.inc
|
||||
echo +++ make: Creating DLL: $@
|
||||
# //
|
||||
# // create response file for the command. The format is:
|
||||
# // Object files, Output file, Map file, Libraries, DEF file, RES file
|
||||
# //
|
||||
echo $(LFLAGS) > $(CFGFILE)
|
||||
echo /implib:$*.lib >> $(CFGFILE)
|
||||
for %%d in ($(OBJS)) do echo %%d + >> $(CFGFILE)
|
||||
echo. >> $(CFGFILE)
|
||||
echo $(OBJDIR)\$(*B).dll, >> $(CFGFILE)
|
||||
!ifdef MAPFILE
|
||||
echo $(MAPFILE), >> $(CFGFILE)
|
||||
!endif
|
||||
echo $(LLIBS) $(WIN_LIBS) $(OS_LIBS) >> $(CFGFILE)
|
||||
!ifdef DEFFILE
|
||||
echo $(DEFFILE), >> $(CFGFILE)
|
||||
!else
|
||||
echo. >> $(CFGFILE)
|
||||
!endif
|
||||
!ifdef RESFILE
|
||||
echo $(RESFILE), >> $(CFGFILE)
|
||||
!else
|
||||
echo. >> $(CFGFILE)
|
||||
!endif
|
||||
# //
|
||||
# // execute the commands
|
||||
# //
|
||||
$(LD) @$(CFGFILE)
|
||||
|
||||
!else
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 32-bit DLL using the DLL target
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(DLL): $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(EXTRA_LIBS_LIST_FILE) $(MISCDEP) makefile.win $(DEPTH)\config\dll.inc
|
||||
echo +++ make: Creating DLL: $@
|
||||
cat << $(EXTRA_LIBS_LIST_FILE) << >$(CFGFILE)
|
||||
/NOLOGO /DLL /OUT:$@ /PDB:$(PDBFILE)
|
||||
!ifdef DEFFILE
|
||||
/DEF:$(DEFFILE)
|
||||
!endif
|
||||
!ifdef MAPFILE
|
||||
/MAP:$(MAPFILE)
|
||||
!endif
|
||||
!if exist(win32.order) && !defined(MOZ_DEBUG) && defined(MOZ_COVERAGE)
|
||||
/ORDER:@win32.order
|
||||
!endif
|
||||
$(LFLAGS)
|
||||
$(OBJS)
|
||||
$(RESFILE)
|
||||
<<NOKEEP
|
||||
$(LLIBS) $(WIN_LIBS) $(OS_LIBS)
|
||||
<<NOKEEP
|
||||
$(LD) @$(CFGFILE)
|
||||
!endif
|
||||
|
||||
!endif # DLL && ! CONFIG_DLL_INC
|
||||
@@ -1,808 +0,0 @@
|
||||
# Doxyfile 1.2.8.1
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = "Mozilla"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./dist/docs
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
|
||||
# German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
|
||||
# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a class diagram (in Html and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful is your file systems
|
||||
# doesn't support long names like on DOS, Mac, or CD-ROM.
|
||||
|
||||
SHORT_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 4
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_BUGLIST = NO
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consist of for it to appear in
|
||||
# the documentation. If the initializer consists of more lines than specified
|
||||
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||
# The appearance of the initializer of individual variables and defines in the
|
||||
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||
# command in the documentation regardless of this setting.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C.
|
||||
# For instance some of the names that are used will be different. The list
|
||||
# of all members will be omitted, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT =
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = ./dist/include ./dist/idl
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
FILE_PATTERNS = *.idl *.cpp *.h
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE =
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS = nsI*.h
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse.
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT =
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members
|
||||
# to the contents of the Html help documentation and to the tree view.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Netscape 4.0+
|
||||
# or Internet explorer 4.0+).
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT =
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT =
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using WORD or other
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an rtf document.
|
||||
# Syntax is similar to doxygen's config file.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT =
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION =
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
|
||||
# then it will generate one additional man file for each entity
|
||||
# documented in the real man page(s). These additional files
|
||||
# only source the real man page, but without them the man command
|
||||
# would be unable to find the correct page. The default is NO.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = NO
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH = ./dist/include ./dist/include/nspr
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||
# tags are set to YES then doxygen will generate a graph for each documented
|
||||
# file showing the direct and indirect include dependencies of the file with
|
||||
# other documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||
# documented header file showing the documented files that directly or
|
||||
# indirectly include this file.
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||
# remove the intermedate dot files that are used to generate
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME =
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH =
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,91 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
!if !defined(VERBOSE)
|
||||
.SILENT:
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// This makefile contains all of the rules necessary to build 16 and 32 bit
|
||||
#// executables.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(PROGRAM) && !defined(CONFIG_EXE_INC)
|
||||
CONFIG_EXE_INC=1
|
||||
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 16-bit executable using the PROGRAM target
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(PROGRAM):: $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(MISCDEP) makefile.win $(DEPTH)\config\exe.inc
|
||||
echo +++ make: Creating EXE: $@
|
||||
# //
|
||||
# // create response file for the command. The format is:
|
||||
# // Object files, Output file, Map file, Libraries, DEF file, RES file
|
||||
# //
|
||||
echo $(LFLAGS) > $(CFGFILE)
|
||||
for %%d in ($(OBJS)) do echo %%d + >> $(CFGFILE)
|
||||
echo. >> $(CFGFILE)
|
||||
echo $(OBJDIR)\$(*B).exe, >> $(CFGFILE)
|
||||
echo $(MAPFILE), >> $(CFGFILE)
|
||||
echo $(LLIBS) $(WIN_LIBS) $(OS_LIBS)>> $(CFGFILE)
|
||||
!ifdef DEFFILE
|
||||
echo $(DEFFILE), >> $(CFGFILE)
|
||||
!else
|
||||
echo. >> $(CFGFILE)
|
||||
!endif
|
||||
!ifdef RESFILE
|
||||
echo $(RESFILE), >> $(CFGFILE)
|
||||
!else
|
||||
echo. >> $(CFGFILE)
|
||||
!endif
|
||||
# //
|
||||
# // execute the command
|
||||
# //
|
||||
$(LD) /ST:8192 @$(CFGFILE)
|
||||
|
||||
!else
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 32-bit executable using the PROGRAM target
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(PROGRAM):: $(OBJDIR) $(OBJS) $(LLIBS) $(RESFILE) $(DEFFILE) $(EXTRA_LIBS_LIST_FILE) $(MISCDEP) makefile.win $(DEPTH)\config\exe.inc
|
||||
echo +++ make: Creating EXE: $@
|
||||
cat << $(EXTRA_LIBS_LIST_FILE) << >$(CFGFILE)
|
||||
/NOLOGO /OUT:$@ /PDB:$(PDBFILE)
|
||||
!ifdef DEFFILE
|
||||
/DEF:$(DEFFILE)
|
||||
!endif
|
||||
!ifdef MAPFILE
|
||||
/MAP:$(MAPFILE)
|
||||
!endif
|
||||
$(LFLAGS)
|
||||
$(OBJS)
|
||||
$(RESFILE)
|
||||
<<NOKEEP
|
||||
$(LLIBS) $(WIN_LIBS) $(OS_LIBS)
|
||||
<<NOKEEP
|
||||
$(LD) @$(CFGFILE)
|
||||
!endif
|
||||
|
||||
!endif # PROGRAM && ! CONFIG_EXE_INC
|
||||
@@ -1,290 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# fast-update.pl [-h hours] [-m module] [-r branch]
|
||||
#
|
||||
# This command, fast-update.pl, does a (fast) cvs update of the current
|
||||
# directory. It is fast because the cvs up command is only run on those
|
||||
# directories / sub-directories where changes have occured since the
|
||||
# last fast-update.
|
||||
#
|
||||
# The last update time is stored in a ".fast-update" file in the current
|
||||
# directory. Thus one can choose to only fast-update a branch of the tree
|
||||
# and then fast-update the whole tree later.
|
||||
#
|
||||
# The first time this command is run in a directory the last cvs update
|
||||
# time is assumed to be the timestamp of the CVS/Entries file.
|
||||
#
|
||||
use Getopt::Long;
|
||||
|
||||
my $filename = ".fast-update";
|
||||
my $start_time = time();
|
||||
|
||||
my $branch;
|
||||
my $module="SeaMonkeyAll";
|
||||
my $maxdirs=5;
|
||||
my $rootdir = "";
|
||||
my $hours = 0;
|
||||
my $dir = '';
|
||||
|
||||
&GetOptions('d=s' => \$dir, 'h=s' => \$hours, 'm=s' => \$module, 'r=s' => \$branch);
|
||||
|
||||
#print "dir = ($dir), hours = ($hours), module = ($module), branch = ($branch)\n";
|
||||
if ($dir) {
|
||||
chdir '..';
|
||||
chdir $dir;
|
||||
}
|
||||
|
||||
if (!$hours) {
|
||||
$hours = get_hours_since_last_update();
|
||||
}
|
||||
if (!$hours) {
|
||||
$hours = 24;
|
||||
}
|
||||
|
||||
|
||||
# pull out the current directory
|
||||
# if there is no such file, this will all just fail, which is ok
|
||||
open REPOSITORY, "<CVS/Repository";
|
||||
$rootdir = <REPOSITORY>;
|
||||
chop $rootdir;
|
||||
close REPOSITORY;
|
||||
|
||||
# try to guess the current branch by looking at all the
|
||||
# files in CVS/Entries
|
||||
if (!$branch) {
|
||||
my $foundbranch =0;
|
||||
|
||||
open ENTRIES, "<CVS/Entries";
|
||||
while (<ENTRIES>) {
|
||||
chop;
|
||||
@entry = split(/\//);
|
||||
my ($type, $file, $ver, $date, $unknown, $tag) = @entry;
|
||||
|
||||
# the tag usually starts with "T"
|
||||
$thisbranch = substr($tag, 1);
|
||||
|
||||
# look for more than one branch
|
||||
if ($type eq "") {
|
||||
|
||||
if ($foundbranch and ($lastbranch ne $thisbranch)) {
|
||||
die "Multiple branches in this directory, cannot determine branch\n";
|
||||
}
|
||||
$foundbranch = 1;
|
||||
$lastbranch = $thisbranch;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$branch = $lastbranch if ($foundbranch);
|
||||
|
||||
close ENTRIES;
|
||||
}
|
||||
|
||||
# check for a static Tag
|
||||
# (at least that is what I think this does)
|
||||
# (bonsai does not report changes when the Tag starts with 'N')
|
||||
# (I do not really understand all this)
|
||||
if ($branch) {
|
||||
open TAG, "<CVS/Tag";
|
||||
my $line = <TAG>;
|
||||
if ($line =~ /^N/) {
|
||||
print "static tag, ignore branch\n";
|
||||
$branch = '';
|
||||
}
|
||||
close TAG;
|
||||
}
|
||||
|
||||
|
||||
my $url = "http://bonsai.mozilla.org/cvsquery.cgi?module=${module}&branch=${branch}&branchtype=match&sortby=File&date=hours&hours=${hours}&cvsroot=%2Fcvsroot";
|
||||
|
||||
my $esc_dir = escape($dir);
|
||||
if ($dir) {
|
||||
$url .= "&dir=$esc_dir";
|
||||
}
|
||||
|
||||
print "Contacting bonsai for updates to ${module} ";
|
||||
print "on the ${branch} branch " if ($branch);
|
||||
print "in the last ${hours} hours ";
|
||||
print "within the $rootdir directory..\n" if ($rootdir);
|
||||
#print "url = $url\n";
|
||||
|
||||
# first try wget, then try lynx
|
||||
|
||||
# this is my lame way of checking if a command succeeded AND getting
|
||||
# output from it. I'd love a better way. -alecf@netscape.com
|
||||
my $have_checkins = 0;
|
||||
@args = ("wget", "--quiet", "--output-document=-", "\"$url\"");
|
||||
open CHECKINS,"wget --quiet --output-document=- \"$url\"|" or
|
||||
die "Error opening wget: $!\n";
|
||||
|
||||
$header = <CHECKINS> and $have_checkins=1;
|
||||
|
||||
if (!$have_checkins) {
|
||||
|
||||
open CHECKINS, "lynx -source '$url'|" or die "Error opening lynx: $!\n";
|
||||
|
||||
$header = <CHECKINS> and $have_checkins = 1;
|
||||
}
|
||||
|
||||
$have_checkins || die "Couldn't get checkins\n";
|
||||
|
||||
open REALOUT, ">.fast-update.bonsai.html" || die "argh $!\n";
|
||||
print "Processing checkins...";
|
||||
while (<CHECKINS>) {
|
||||
print REALOUT $_;
|
||||
|
||||
if (/js_file_menu\((.*),\s*\'(.*)\'\s*,\s*(.*),\s*(.*),\s*(.*),\s*(.*)\)/) {
|
||||
my ($repos, $dir, $file, $rev, $branch, $event) =
|
||||
($1, $2, $3, $4, $5, $6);
|
||||
push @dirlist, $dir;
|
||||
}
|
||||
}
|
||||
|
||||
print "done.\n";
|
||||
close REALOUT;
|
||||
unlink '.fast-update.bonsai.html';
|
||||
|
||||
my $lastdir = "";
|
||||
my @uniquedirs;
|
||||
|
||||
foreach $dir (sort @dirlist) {
|
||||
next if ($lastdir eq $dir);
|
||||
|
||||
my $strippeddir = "";
|
||||
$lastdir = $dir;
|
||||
|
||||
# now strip out $rootdir
|
||||
if ($rootdir) {
|
||||
|
||||
# only deal with directories that start with $rootdir
|
||||
if (substr($dir, 0, (length $rootdir)) eq $rootdir) {
|
||||
|
||||
if ($dir eq $rootdir) {
|
||||
$strippeddir = ".";
|
||||
} else {
|
||||
$strippeddir = substr($dir,(length $rootdir) + 1 );
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$strippeddir = $dir;
|
||||
}
|
||||
|
||||
if ($strippeddir) {
|
||||
push @uniquedirs, $strippeddir;
|
||||
}
|
||||
}
|
||||
|
||||
my $status = 0;
|
||||
if (scalar(@uniquedirs)) {
|
||||
print "Updating tree..($#uniquedirs directories)\n";
|
||||
my $i=0;
|
||||
my $dirlist = "";
|
||||
foreach $dir (sort @uniquedirs) {
|
||||
if (!-d $dir) {
|
||||
cvs_up_parent($dir);
|
||||
}
|
||||
$dirlist .= "\"$dir\" ";
|
||||
$i++;
|
||||
if ($i == 5) {
|
||||
$status |= spawn("cvs up -l -d $dirlist\n");
|
||||
$dirlist = "";
|
||||
$i=0;
|
||||
}
|
||||
}
|
||||
if ($i) {
|
||||
$status |= spawn("cvs up -l -d $dirlist\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
print "No directories to update.\n";
|
||||
}
|
||||
|
||||
close CHECKINS;
|
||||
if ($status == 0) {
|
||||
set_last_update_time($filename, $start_time);
|
||||
print "successfully updated $module/$dir\n";
|
||||
}
|
||||
else {
|
||||
print "error while updating $module/$dir\n";
|
||||
}
|
||||
|
||||
exit $status;
|
||||
|
||||
sub cvs_up_parent {
|
||||
my ($dir) = @_;
|
||||
my $pdir = $dir;
|
||||
$pdir =~ s|/*[^/]*/*$||;
|
||||
#$pdir =~ s|/$||;
|
||||
#$pdir =~ s|[^/]*$||;
|
||||
#$pdir =~ s|/$||;
|
||||
if (!$pdir) {
|
||||
$pdir = '.';
|
||||
}
|
||||
if (!-d $pdir) {
|
||||
cvs_up_parent($pdir);
|
||||
}
|
||||
$status |= system "cvs up -d -l $pdir\n";
|
||||
}
|
||||
|
||||
sub get_hours_since_last_update {
|
||||
# get the last time this command was run
|
||||
my $last_time = get_last_update_time($filename);
|
||||
if (!defined($last_time)) {
|
||||
#
|
||||
# This must be the first use of fast-update.pl so use the timestamp
|
||||
# of a file that:
|
||||
# 1) is managed by cvs
|
||||
# 2) the user should not be tampering with
|
||||
# 3) that gets updated fairly frequently.
|
||||
#
|
||||
$last_time = (stat "CVS/Entries")[9];
|
||||
if (defined($last_time)) {
|
||||
$last_time -= 3600*24; # for safety go back a bit
|
||||
print "use fallback time of ".localtime($last_time)."\n";
|
||||
}
|
||||
}
|
||||
if(!defined($last_time)) {
|
||||
print "last_time not defined\n";
|
||||
}
|
||||
|
||||
# figure the hours (rounded up) since the last fast-update
|
||||
my $hours = int(($start_time - $last_time + 3600)/3600);
|
||||
print "last updated $hours hour(s) ago at ".localtime($last_time)."\n";
|
||||
return $hours;
|
||||
}
|
||||
|
||||
# returns time of last update if known
|
||||
sub get_last_update_time {
|
||||
my ($filename) = @_;
|
||||
if (!-r $filename) {
|
||||
return undef;
|
||||
}
|
||||
open FILE, "<$filename";
|
||||
my $line = <FILE>;
|
||||
if (!defined(line)) {
|
||||
return undef;
|
||||
}
|
||||
# print "line = $line";
|
||||
$line =~ /^(\d+):/;
|
||||
return $1;
|
||||
}
|
||||
|
||||
sub set_last_update_time {
|
||||
my ($filename, $time) = @_;
|
||||
my $time_str = localtime($time);
|
||||
open FILE, ">$filename";
|
||||
print FILE "$time: last fast-update.pl at ".localtime($time)."\n";
|
||||
}
|
||||
|
||||
# URL-encode data
|
||||
sub escape {
|
||||
my ($toencode) = @_;
|
||||
$toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg;
|
||||
return $toencode;
|
||||
}
|
||||
|
||||
sub spawn {
|
||||
my ($procname) = @_;
|
||||
return system "$procname";
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
#!perl5
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
# By John Bazik
|
||||
#
|
||||
# Usage: $cwd = &fastcwd;
|
||||
#
|
||||
# This is a faster version of getcwd. It's also more dangerous because
|
||||
# you might chdir out of a directory that you can't chdir back into.
|
||||
#
|
||||
|
||||
sub fastcwd {
|
||||
local($odev, $oino, $cdev, $cino, $tdev, $tino);
|
||||
local(@path, $path);
|
||||
local(*DIR);
|
||||
|
||||
($cdev, $cino) = stat('.');
|
||||
for (;;) {
|
||||
($odev, $oino) = ($cdev, $cino);
|
||||
chdir('..');
|
||||
($cdev, $cino) = stat('.');
|
||||
last if $odev == $cdev && $oino == $cino;
|
||||
opendir(DIR, '.');
|
||||
for (;;) {
|
||||
$_ = readdir(DIR);
|
||||
next if $_ eq '.';
|
||||
next if $_ eq '..';
|
||||
|
||||
last unless $_;
|
||||
($tdev, $tino) = lstat($_);
|
||||
last unless $tdev != $odev || $tino != $oino;
|
||||
}
|
||||
closedir(DIR);
|
||||
unshift(@path, $_);
|
||||
}
|
||||
chdir($path = '/' . join('/', @path));
|
||||
$path;
|
||||
}
|
||||
1;
|
||||
@@ -1,218 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Name: glibcversion.sh - Print __GLIBC__ version if gnu libc 2 is
|
||||
## found.
|
||||
##
|
||||
## Description: This script is needed by the mozilla build system. It needs
|
||||
## to determine whether the current platform (mostly the
|
||||
## various linux "platforms") are based on the gnu libc2. This
|
||||
## information is later used in mozilla to determine whether
|
||||
## gnu libc 2 specific "features" need to be handled, such
|
||||
## as broken locales.
|
||||
##
|
||||
## Author: Ramiro Estrugo <ramiro@netscape.com>
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
##
|
||||
## Command Line Flags Supported:
|
||||
##
|
||||
## -g | --is-glibc2: Print True/False if detected __GLIBC__.
|
||||
##
|
||||
## -v | --print-version: Print value of __GLIBC__ if found, or none.
|
||||
##
|
||||
## -o | --set-object-name: Set object name for current system.
|
||||
## -cc | --set-compiler: Set compiler for building test program.
|
||||
##
|
||||
|
||||
|
||||
##
|
||||
## Constants
|
||||
##
|
||||
GLIBC_PROG_PREFIX=./get_glibc_info
|
||||
|
||||
##
|
||||
## Defaults
|
||||
##
|
||||
GLIBC_PRINT_IS_GLIBC2=False
|
||||
|
||||
GLIBC_PRINT_VERSION=False
|
||||
|
||||
GLIBC_OBJECT_NAME=`uname`-`uname -r`
|
||||
GLIBC_CC=cc
|
||||
|
||||
function glibc_usage()
|
||||
{
|
||||
echo
|
||||
echo "Usage: `basename $0` [options]"
|
||||
echo
|
||||
echo " -g, --is-glibc2: Print True/False if detected __GLIBC__."
|
||||
echo
|
||||
echo " -v, --print-version: Print value of __GLIBC__ if found, or none."
|
||||
echo
|
||||
echo " -o, --set-object-name: Set object name for current system."
|
||||
echo " -cc, --set-compiler: Set compiler for building test program."
|
||||
echo
|
||||
echo " -h, --help: Print this blurb."
|
||||
echo
|
||||
echo "The default is '-v' if no options are given."
|
||||
echo
|
||||
}
|
||||
|
||||
##
|
||||
## Parse the command line
|
||||
##
|
||||
while [ "$*" ]; do
|
||||
case $1 in
|
||||
-h | --help)
|
||||
shift
|
||||
glibc_usage
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-g | --is-glibc2)
|
||||
shift
|
||||
GLIBC_PRINT_IS_GLIBC2=True
|
||||
;;
|
||||
|
||||
-v | --print-version)
|
||||
shift
|
||||
GLIBC_PRINT_VERSION=True
|
||||
;;
|
||||
|
||||
-o | --set-object-name)
|
||||
shift
|
||||
GLIBC_OBJECT_NAME="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
-cc | --set-compiler)
|
||||
shift
|
||||
GLIBC_CC="$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo "`basename $0`: invalid option '$1'"
|
||||
shift
|
||||
glibc_usage
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
##
|
||||
## Motif info program name
|
||||
##
|
||||
GLIBC_PROG="$GLIBC_PROG_PREFIX"_"$GLIBC_OBJECT_NAME"
|
||||
GLIBC_SRC="$GLIBC_PROG_PREFIX"_"$GLIBC_OBJECT_NAME.c"
|
||||
|
||||
##
|
||||
## Cleanup the dummy test source/program
|
||||
##
|
||||
function glibc_cleanup()
|
||||
{
|
||||
true
|
||||
|
||||
# rm -f $GLIBC_PROG
|
||||
# rm -f $GLIBC_SRC
|
||||
|
||||
}
|
||||
|
||||
glibc_cleanup
|
||||
|
||||
if [ ! -f $GLIBC_SRC ]
|
||||
then
|
||||
cat << EOF > $GLIBC_SRC
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc,char ** argv)
|
||||
{
|
||||
#ifdef __GLIBC__
|
||||
fprintf(stdout,"%d\n",__GLIBC__);
|
||||
#else
|
||||
fprintf(stdout,"none\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ ! -f $GLIBC_SRC ]
|
||||
then
|
||||
echo
|
||||
echo "Could not create test program source $GLIBC_SRC."
|
||||
echo
|
||||
|
||||
glibc_cleanup
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
##
|
||||
## Compile the dummy test program if needed
|
||||
##
|
||||
if [ ! -x $GLIBC_PROG ]
|
||||
then
|
||||
$GLIBC_CC -o $GLIBC_PROG $GLIBC_SRC
|
||||
fi
|
||||
|
||||
if [ ! -x $GLIBC_PROG ]
|
||||
then
|
||||
echo
|
||||
echo "Could not create test program $GLIBC_PROG."
|
||||
echo
|
||||
|
||||
glibc_cleanup
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
##
|
||||
## Execute the dummy test program
|
||||
##
|
||||
GLIBC_PROG_OUTPUT=`$GLIBC_PROG`
|
||||
|
||||
##
|
||||
## -g | --is-glibc2
|
||||
##
|
||||
if [ "$GLIBC_PRINT_IS_GLIBC2" = "True" ]
|
||||
then
|
||||
if [ "$GLIBC_PROG_OUTPUT" = "2" ]
|
||||
then
|
||||
echo True
|
||||
else
|
||||
echo False
|
||||
fi
|
||||
|
||||
glibc_cleanup
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo $GLIBC_PROG_OUTPUT
|
||||
|
||||
glibc_cleanup
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
@echo off
|
||||
rem The contents of this file are subject to the Netscape Public
|
||||
rem License Version 1.1 (the "License"); you may not use this file
|
||||
rem except in compliance with the License. You may obtain a copy of
|
||||
rem the License at http://www.mozilla.org/NPL/
|
||||
rem
|
||||
rem Software distributed under the License is distributed on an "AS
|
||||
rem IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
rem implied. See the License for the specific language governing
|
||||
rem rights and limitations under the License.
|
||||
rem
|
||||
rem The Original Code is mozilla.org code.
|
||||
rem
|
||||
rem The Initial Developer of the Original Code is Netscape
|
||||
rem Communications Corporation. Portions created by Netscape are
|
||||
rem Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
rem Rights Reserved.
|
||||
rem
|
||||
rem Contributor(s):
|
||||
@echo on
|
||||
|
||||
@if not exist %2\nul mkdir %2
|
||||
@rm -f %2\%1
|
||||
@cp %1 %2
|
||||
@@ -1,175 +0,0 @@
|
||||
#!perl -w
|
||||
#
|
||||
# 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):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
|
||||
use Cwd;
|
||||
return(1);
|
||||
|
||||
sub InstallChrome()
|
||||
{
|
||||
# inOsType - type of OS being run under
|
||||
# inType - type of reg file to create (jar or resource)
|
||||
# inTargetPath - path to where the bin\chrome dir
|
||||
($inOsType, $inType, $inTargetPath) = @_;
|
||||
my($mOutFilenameTmp) = "installed-chrome_tmp.txt";
|
||||
my($mFinalFilename) = "installed-chrome.txt";
|
||||
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
$gPathDelimiter="\\";
|
||||
}
|
||||
elsif($inOsType =~ /mac/i)
|
||||
{
|
||||
$gPathDelimiter=":";
|
||||
}
|
||||
elsif($inOsType =~ /unix/i)
|
||||
{
|
||||
$gPathDelimiter="/";
|
||||
}
|
||||
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
# Convert all '/' to '\\' or else win32 will have problems
|
||||
$inTargetPath =~ s/\//\\/g;
|
||||
}
|
||||
|
||||
# Make sure $inTargetPath exists
|
||||
if(!(-e "$inTargetPath"))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
open(fpOutFileTmp, ">$inTargetPath$gPathDelimiter$mOutFilenameTmp") || die "\nCould not open $inTargetPath$gPathDelimiter$mOutFilenameTmp: $!\n";
|
||||
|
||||
CreateChromeTextFile($inType, $inTargetPath, "locales", "loc");
|
||||
CreateChromeTextFile($inType, $inTargetPath, "packages", "pkg");
|
||||
CreateChromeTextFile($inType, $inTargetPath, "skins", "skn");
|
||||
|
||||
if(-e "$inTargetPath$gPathDelimiter$mFinalFilename")
|
||||
{
|
||||
open(fpInFile, "$inTargetPath$gPathDelimiter$mFinalFilename") || die "\nCould not open $inTargetPath$gPathDelimiter$mFinalFilename: $!\n";
|
||||
while($line = <fpInFile>)
|
||||
{
|
||||
print fpOutFileTmp "$line";
|
||||
}
|
||||
|
||||
close(fpInFile);
|
||||
unlink "$inTargetPath$gPathDelimiter$mFinalFilename";
|
||||
}
|
||||
close(fpOutFileTmp);
|
||||
|
||||
if(!rename("$inTargetPath$gPathDelimiter$mOutFilenameTmp", "$inTargetPath$gPathDelimiter$mFinalFilename"))
|
||||
{
|
||||
die "\n Error $!: rename (\"$inTargetPath$gPathDelimiter$mOutFilenameTmp\", \"$inTargetPath$gPathDelimiter$mFinalFilename\")\n";
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub CreateChromeTextFile()
|
||||
{
|
||||
my($inType, $inTargetPath, $inChromeDir, $inExt) = @_;
|
||||
|
||||
@dlChromeDir = <$inTargetPath\\$inChromeDir\\*>;
|
||||
foreach $dir (@dlChromeDir)
|
||||
{
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
# Convert all '/' to '\\' or else win32 will have problems
|
||||
$dir =~ s/\//\\/g;
|
||||
}
|
||||
|
||||
# Get the leaf dir name from full path
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
@dirItem = split(/\\/, $dir);
|
||||
}
|
||||
elsif($inOsType =~ /mac/i)
|
||||
{
|
||||
@dirItem = split(/:/, $dir);
|
||||
}
|
||||
elsif($inOsType =~ /unix/i)
|
||||
{
|
||||
@dirItem = split(/\//, $dir);
|
||||
}
|
||||
$dirName = $dirItem[$#dirItem];
|
||||
|
||||
# Make sure the path is valid
|
||||
if(-d "$dir")
|
||||
{
|
||||
if($inType =~ /jar/i)
|
||||
{
|
||||
if(CheckDir("content", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "content,install,url,jar:resource:/chrome/$dirName.$inExt!/\n";
|
||||
}
|
||||
if(CheckDir("locale", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "locale,install,url,jar:resource:/chrome/$dirName.$inExt!/\n";
|
||||
}
|
||||
if(CheckDir("skin", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "skin,install,url,jar:resource:/chrome/$dirName.$inExt!/\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(CheckDir("content", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "content,install,url,resource:/chrome/$inChromeDir/$dirName/\n";
|
||||
}
|
||||
if(CheckDir("locale", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "locale,install,url,resource:/chrome/$inChromeDir/$dirName/\n";
|
||||
}
|
||||
if(CheckDir("skin", "$dir"))
|
||||
{
|
||||
print fpOutFileTmp "skin,install,url,resource:/chrome/$inChromeDir/$dirName/\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub CheckDir()
|
||||
{
|
||||
my($dirType, $inPath) = @_;
|
||||
|
||||
@dlDirType = <$inPath$gPathDelimiter*>;
|
||||
foreach $dir (@dlDirType)
|
||||
{
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
# Convert all '/' to '\\' or else win32 will have problems
|
||||
$dir =~ s/\//\\/g;
|
||||
}
|
||||
|
||||
if(-d "$dir$gPathDelimiter$dirType")
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!perl -w
|
||||
#
|
||||
# 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):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
|
||||
# Make sure there are at least two arguments
|
||||
if($#ARGV < 1)
|
||||
{
|
||||
die "usage: $0 <os> <type> <target path>
|
||||
|
||||
os : mac, unix, win32
|
||||
type : jar or resource
|
||||
target path: path to where the chrome dir is at
|
||||
|
||||
ie: $0 win32 resource $ENV{MOZ_SRC}\\mozilla\\dist\\win32_d.obj\\bin\\chrome
|
||||
\n";
|
||||
}
|
||||
|
||||
require "$ENV{MOZ_SRC}/mozilla/config/installcfunc.pl";
|
||||
|
||||
if(&InstallChrome($ARGV[0], $ARGV[1], $ARGV[2]) != 0)
|
||||
{
|
||||
die "\n Error: InstallChrome($ARGV[0], $ARGV[1], $ARGV[2]): $!\n";
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
INCLUDED_INSURE_MK = 1
|
||||
|
||||
INSURE_MATCH_SCRIPT=$(topsrcdir)/build/autoconf/match-dir.sh
|
||||
|
||||
INSURE_EXCLUDE=$(shell $(INSURE_MATCH_SCRIPT) $(MOZ_INSURE_EXCLUDE_DIRS))
|
||||
|
||||
INSURE_INCLUDE=$(shell $(INSURE_MATCH_SCRIPT) $(MOZ_INSURE_DIRS))
|
||||
|
||||
ifeq ($(INSURE_EXCLUDE),0)
|
||||
|
||||
ifeq ($(INSURE_INCLUDE),1)
|
||||
CC := $(MOZ_INSURE)
|
||||
CXX := $(MOZ_INSURE)
|
||||
endif # INSURE_INCLUDE == 1
|
||||
|
||||
endif # INSURE_EXCLUDE == 0
|
||||
@@ -1,238 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
!if !defined(VERBOSE)
|
||||
.SILENT:
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// This makefile contains all of the rules necessary to build Java Header
|
||||
#// and Stub files
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if !defined(CONFIG_JAVA_INC)
|
||||
CONFIG_JAVA_INC=1
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Setup to generate Mac java headers (checkout ns/lib/mac/Java
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
MAC_JAVA_HEADERS_DIR = $(DEPTH)/lib/mac/Java
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Figure out how to do the pull.
|
||||
#//------------------------------------------------------------------------
|
||||
!if "$(MOZ_BRANCH)" != ""
|
||||
CVS_BRANCH=-r $(MOZ_BRANCH)
|
||||
HAVE_BRANCH=1
|
||||
!else
|
||||
HAVE_BRANCH=0
|
||||
!endif
|
||||
|
||||
!if "$(MOZ_TIP)" != ""
|
||||
CVS_BRANCH=-A
|
||||
!endif
|
||||
|
||||
|
||||
!if "$(MOZ_DATE)" != ""
|
||||
CVS_BRANCH=-D "$(MOZ_DATE)"
|
||||
HAVE_DATE=1
|
||||
!else
|
||||
HAVE_DATE=0
|
||||
!endif
|
||||
|
||||
!if $(HAVE_DATE) && $(HAVE_BRANCH)
|
||||
ERR_MESSAGE=$(ERR_MESSAGE)^
|
||||
Cannot specify both MOZ_BRANCH and MOZ_DATE
|
||||
!endif
|
||||
|
||||
$(MAC_JAVA_HEADERS_DIR):
|
||||
@echo +++ Checking out $(MAC_JAVA_HEADERS_DIR) +++
|
||||
$(PERL) $(DEPTH)/config/cvsco.pl $(CVS_BRANCH) ns/lib/mac/Java
|
||||
@echo +++ Done Checking out $(MAC_JAVA_HEADERS_DIR) +++
|
||||
!endif
|
||||
|
||||
!ifdef JDK_GEN
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to generate Java header files using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(JDK_GEN):: display_java_header_msg
|
||||
!$(JAVAH) -d _gen $@
|
||||
|
||||
!ifdef NSBUILDROOT
|
||||
LINCS = $(LINCS) -I$(JDK_GEN_DIR) -I$(XPDIST)
|
||||
!else
|
||||
LINCS = $(LINCS) -I$(JDK_GEN_DIR)
|
||||
!endif
|
||||
|
||||
display_java_header_msg:
|
||||
echo +++ make: Generating java header files...
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
$(JDK_GEN)::display_java_header_msg_mac $(MAC_JAVA_HEADERS_DIR)
|
||||
echo +++ make: creating JDK header for $@
|
||||
!$(JAVAH) -mac -d $(MAC_JAVA_HEADERS_DIR)/_gen $@
|
||||
|
||||
display_java_header_msg_mac:
|
||||
echo +++ make: Generating Macintosh JDK header files +++
|
||||
!endif
|
||||
!endif # JAVA_OR_OJI
|
||||
!endif
|
||||
|
||||
|
||||
!ifdef JDK_GEN
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rules to generate Java stub files using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(JDK_GEN)::display_java_stub_msg
|
||||
!$(JAVAH) -stubs -d _stubs $@
|
||||
|
||||
display_java_stub_msg:
|
||||
echo +++ make: Generating java stub files...
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
$(JDK_GEN)::display_java_stub_msg_mac $(MAC_JAVA_HEADERS_DIR)
|
||||
echo +++ make: creating JDK stub for $@
|
||||
!$(JAVAH) -mac -stubs -d $(MAC_JAVA_HEADERS_DIR)/_stubs $@
|
||||
|
||||
display_java_stub_msg_mac:
|
||||
echo +++ make: Generating Macintosh JDK stub files +++
|
||||
!endif
|
||||
|
||||
export:: $(JDK_GEN)
|
||||
|
||||
!endif # JAVA_OR_OJI
|
||||
!endif
|
||||
|
||||
!ifdef JAVA_LIBSTUB_FILES
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rules to generate libstubs.c using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
libstubs.c::$(JAVA_LIBSTUB_FILES)
|
||||
echo +++ make: Generating libstubs.c...
|
||||
$(JAVAH) -o libstubs.c -stubs $**
|
||||
|
||||
stubs$(MOZ_BITS).c::$(JAVA_LIBSTUB_FILES)
|
||||
echo +++ make: Generating stubs$(MOZ_BITS).c...
|
||||
$(JAVAH) -o stubs$(MOZ_BITS).c -stubs $**
|
||||
|
||||
!endif # JAVA_OR_OJI
|
||||
!endif
|
||||
|
||||
!ifdef JRI_GEN
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to generate JRI header files using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(JRI_GEN):: display_jri_header_msg
|
||||
!$(JAVAH) -jri -d _jri $@
|
||||
|
||||
!ifdef NSBUILDROOT
|
||||
LINCS = $(LINCS) -I$(JRI_GEN_DIR) -I$(XPDIST)
|
||||
!else
|
||||
LINCS = $(LINCS) -I$(JRI_GEN_DIR)
|
||||
!endif
|
||||
|
||||
display_jri_header_msg:
|
||||
echo +++ make: Generating JRI header files...
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
$(JRI_GEN)::display_jri_header_msg_mac $(MAC_JAVA_HEADERS_DIR)
|
||||
echo +++ make: creating JRI header for $@
|
||||
!$(JAVAH) -mac -jri -d $(MAC_JAVA_HEADERS_DIR)/_jri $@
|
||||
|
||||
display_jri_header_msg_mac:
|
||||
echo +++ make: Generating Macintosh java JRI header files +++
|
||||
!endif
|
||||
!endif # JAVA_OR_OJI
|
||||
!endif
|
||||
|
||||
!ifdef JRI_GEN
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rules to generate JRI stub files using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(JRI_GEN)::display_jri_stub_msg
|
||||
!$(JAVAH) -stubs -jri -d _jri $@
|
||||
|
||||
display_jri_stub_msg:
|
||||
echo +++ make: Generating JRI stub files...
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
$(JRI_GEN)::display_jri_stub_msg_mac $(MAC_JAVA_HEADERS_DIR)
|
||||
echo +++ make: creating JRI stub for $@
|
||||
!$(JAVAH) -mac -jri -stubs -d $(MAC_JAVA_HEADERS_DIR)/_jri $@
|
||||
|
||||
display_jri_stub_msg_mac:
|
||||
echo +++ make: Generating Macintosh java JRI stub files +++
|
||||
!endif
|
||||
|
||||
export:: $(JRI_GEN)
|
||||
|
||||
!endif # JAVA_OR_OJI
|
||||
!endif
|
||||
|
||||
|
||||
!ifdef JNI_GEN
|
||||
!ifdef JAVA_OR_OJI
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to generate JNI header files using javah.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(JNI_GEN):: display_jni_header_msg
|
||||
!echo $(JAVAH) -jni -d _jni $@
|
||||
!$(JAVAH) -jni -d _jni $@
|
||||
|
||||
!ifdef NSBUILDROOT
|
||||
LINCS = $(LINCS) -I$(JNI_GEN_DIR) -I$(XPDIST)
|
||||
!else
|
||||
LINCS = $(LINCS) -I$(JNI_GEN_DIR)
|
||||
!endif
|
||||
|
||||
display_jni_header_msg:
|
||||
echo +++ make: Generating JNI header files...
|
||||
|
||||
!ifdef MOZ_GENMAC
|
||||
$(JNI_GEN)::display_jni_header_msg_mac $(MAC_JAVA_HEADERS_DIR)
|
||||
echo +++ make: creating JRI header for $@
|
||||
!$(JAVAH) -mac -jni -d $(MAC_JAVA_HEADERS_DIR)/_jni $@
|
||||
|
||||
display_jni_header_msg_mac:
|
||||
echo +++ make: Generating Macintosh java JNI header files +++
|
||||
!endif
|
||||
!endif # JAVA_OR_OJI
|
||||
export:: $(JNI_GEN)
|
||||
!endif # JNI_GEN
|
||||
|
||||
!endif # CONFIG_JAVA_INC
|
||||
@@ -1,168 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
# This file contains make rules for building java files using mozilla's
|
||||
# make system. To use this file, you must include this file before
|
||||
# including rules.mak. Like this:
|
||||
|
||||
# include <$(DEPTH)\config\javarules.mak>
|
||||
# include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
|
||||
!ifdef JDIRS
|
||||
!if defined(JAVA_OR_NSJVM)
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to recursively make all subdirectories specified by the JDIRS target
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
export:: $(JAVA_DESTPATH) $(JDIRS)
|
||||
|
||||
$(JDIRS):: $(JAVA_DESTPATH) $(TMPDIR)
|
||||
|
||||
!if "$(WINOS)" == "WIN95"
|
||||
JDIRS = $(JDIRS:/=\)
|
||||
!endif
|
||||
|
||||
!if defined(NO_CAFE)
|
||||
|
||||
$(JDIRS)::
|
||||
@echo +++ make: building package: $@
|
||||
@echo $(JAVAC_PROG) $(JAVAC_FLAGS) > $(TMPDIR)\javac.cfg
|
||||
-@$(DEPTH)\config\buildpkg $(TMPDIR)\javac.cfg $@
|
||||
@$(RM) $(TMPDIR)\javac.cfg
|
||||
@$(DEPTH)\config\buildpkg $@ $(DEPTH)\dist\classes
|
||||
|
||||
!else
|
||||
|
||||
# compile using symantec cafe's super-speedy compiler!
|
||||
$(JDIRS)::
|
||||
@echo +++ make: building package $@
|
||||
!if "$(WINOS)" == "WIN95"
|
||||
-@$(MKDIR) $(DEPTH)\dist\classes\$(@:/=\)
|
||||
!else
|
||||
-@$(MKDIR) $(DEPTH)\dist\classes\$@ 2> NUL
|
||||
!endif
|
||||
$(MOZ_TOOLS)\bin\sj -classpath $(JAVA_DESTPATH);$(JAVA_SOURCEPATH) \
|
||||
-d $(JAVA_DESTPATH) $(JAVAC_OPTIMIZER) $@\*.java
|
||||
|
||||
|
||||
!endif # NO_CAFE
|
||||
|
||||
clobber clobber_all::
|
||||
-for %g in ($(JDIRS)) do $(RM_R) $(XPDIST:/=\)/classes/%g
|
||||
|
||||
!endif # JAVA_OR_NSJVM
|
||||
!endif # JDIRS
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// JMC
|
||||
#//
|
||||
#// JSRCS .java files to be compiled (.java extension included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(JAVA_OR_NSJVM)
|
||||
!if defined(JSRCS)
|
||||
|
||||
JSRCS_DEPS = $(JAVA_DESTPATH) $(JAVA_DESTPATH)\$(PACKAGE) $(TMPDIR)
|
||||
|
||||
# Can't get moz cafe to compile a single file
|
||||
!if defined(NO_CAFE)
|
||||
|
||||
export:: $(JSRCS_DEPS)
|
||||
@echo +++ make: building package: $(PACKAGE)
|
||||
$(PERL) $(DEPTH)\config\outofdate.pl \
|
||||
-d $(JAVA_DESTPATH)\$(PACKAGE) $(JSRCS) >> $(TMPDIR)\javac.cfg
|
||||
-$(JAVAC_PROG) -argfile $(TMPDIR)\javac.cfg
|
||||
@echo $(TMPDIR)
|
||||
# @$(RM) $(TMPDIR)\javac.cfg
|
||||
!else
|
||||
|
||||
# compile using symantec cafe's super-speedy compiler!
|
||||
export:: $(JSRC_DEPS)
|
||||
@echo +++ make: building package: $(PACKAGE)
|
||||
@echo -d $(JAVA_DESTPATH) $(JAVAC_OPTIMIZER) \
|
||||
-classpath $(JAVA_DESTPATH);$(JAVA_SOURCEPATH) > $(TMPDIR)\javac.cfg
|
||||
@$(PERL) $(DEPTH)\config\sj.pl \
|
||||
$(JAVA_DESTPATH)\$(PACKAGE)\ $(TMPDIR)\javac.cfg <<
|
||||
$(JSRCS)
|
||||
<<
|
||||
|
||||
!endif #NO_CAFE
|
||||
|
||||
clobber::
|
||||
-for %g in ($(JSRCS:.java=.class)) do $(RM) $(XPDIST:/=\)/classes/$(PACKAGE:/=\)/%g
|
||||
|
||||
!endif # JSRCS
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// JMC
|
||||
#//
|
||||
#// JMC_EXPORT .class files to be copied from XPDIST/classes/PACKAGE to
|
||||
#// XPDIST/jmc (without the .class extension)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(JMC_EXPORT)
|
||||
export:: $(JMCSRCDIR)
|
||||
for %g in ($(JMC_EXPORT)) do $(MAKE_INSTALL:/=\) $(JAVA_DESTPATH)\$(PACKAGE:/=\)\%g.class $(JMCSRCDIR)
|
||||
|
||||
clobber::
|
||||
-for %f in ($(JMC_EXPORT)) do $(RM) $(JMCSRCDIR:/=\)\%f.class
|
||||
!endif # JMC_EXPORT
|
||||
!endif # JAVA_OR_NSJVM
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// JMC
|
||||
#//
|
||||
#// JMC_GEN Names of classes to be run through JMC
|
||||
#// Generated .h and .c files go to JMC_GEN_DIR
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(JAVA_OR_NSJVM)
|
||||
|
||||
!if defined(JMC_GEN)
|
||||
export:: $(JMC_HEADERS)
|
||||
|
||||
# Don't delete them if they don't compile (makes it hard to debug)
|
||||
.PRECIOUS: $(JMC_HEADERS) $(JMC_STUBS)
|
||||
|
||||
|
||||
# They may want to generate/compile the stubs
|
||||
!if defined(CCJMC)
|
||||
{$(JMC_GEN_DIR)\}.c{$(OBJDIR)\}.obj:
|
||||
@$(CC) @<<$(CFGFILE)
|
||||
-c $(CFLAGS)
|
||||
-I. -I$(JMC_GEN_DIR)
|
||||
-Fd$(PDBFILE)
|
||||
-Fo.\$(OBJDIR)\
|
||||
$(JMC_GEN_DIR)\$(*B).c
|
||||
<<KEEP
|
||||
|
||||
export:: $(JMC_STUBS) $(OBJDIR) $(JMC_OBJS)
|
||||
|
||||
!endif # CCJMC
|
||||
!endif # JMC_GEN
|
||||
!endif # JAVA_OR_NSJVM
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
!if !defined(VERBOSE)
|
||||
.SILENT:
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// This makefile contains all of the rules necessary to build 16 and 32 bit
|
||||
#// libraries.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(LIBRARY) && !defined(CONFIG_LIB_INC)
|
||||
CONFIG_LIB_INC=1
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 16-bit Library
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(LIBRARY):: $(OBJDIR) $(OBJS) makefile.win $(DEPTH)\config\lib.inc
|
||||
# //
|
||||
# // create response file for the command. The format is:
|
||||
# // LIBNAME, -+foo.obj -+bar.obj , LISTFILE, NEWLIB
|
||||
# //
|
||||
rm -f $(CFGFILE)
|
||||
!if "$(OS)" == "Windows_NT"
|
||||
for %%d in ($(OBJS)) do echo -+%%d ^& >> $(CFGFILE)
|
||||
!else
|
||||
for %%d in ($(OBJS)) do echo -+%%d & >> $(CFGFILE)
|
||||
!endif
|
||||
echo * >> $(CFGFILE)
|
||||
# //
|
||||
# // execute the commands
|
||||
# //
|
||||
$(RM) $@
|
||||
$(AR) $@ @$(CFGFILE)
|
||||
$(RANLIB) $@
|
||||
!else
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Rule to build a 32-bit Library
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
$(LIBRARY):: $(OBJDIR) $(OBJS) $(SUB_LIBRARIES) makefile.win $(DEPTH)\config\lib.inc
|
||||
$(RM) $@ 2> NUL
|
||||
$(AR) @<<$(CFGFILE)
|
||||
-NOLOGO -OUT:$@
|
||||
$(OBJS)
|
||||
$(SUB_LIBRARIES)
|
||||
<<
|
||||
$(RANLIB) $@
|
||||
!endif
|
||||
|
||||
!endif # LIBRARY && ! CONFIG_LIB_INC
|
||||
@@ -1,170 +0,0 @@
|
||||
#!/usr/local/bin/perl5 -w
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
# set-timebomb.pl --- set the timebomb to N days from today's date.
|
||||
#
|
||||
# Modified: Chris Yeh <cyeh@netscape.com>, 31-Aug-98
|
||||
# Created: Jamie Zawinski <jwz@mozilla.org>, 24-Aug-98.
|
||||
|
||||
my $progname = $0;
|
||||
my $contents;
|
||||
|
||||
# This is the preferences file that gets read and written.
|
||||
# So run this script with src/mozilla/build/ as the current directory.
|
||||
#
|
||||
my $prefs = ":mozilla:modules:libpref:src:init:all.js";
|
||||
|
||||
|
||||
# from noah, who should be shot
|
||||
sub ctime {
|
||||
local (@weekday, @month, $time, $TZ);
|
||||
local ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
|
||||
|
||||
@weekday = ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
|
||||
@month = ("Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
|
||||
|
||||
$time = (length (@_) > 0)? $_[0] : time() ;
|
||||
$TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'UTC' ) : '';
|
||||
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
|
||||
($TZ eq 'UTC') ? gmtime($time) : localtime($time);
|
||||
if ($TZ =~ /^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/o)
|
||||
{
|
||||
$TZ = $isdst ? $4 : $1;
|
||||
}
|
||||
|
||||
if ($TZ ne "") { $TZ .= " "; }
|
||||
$year += ($year < 70) ? 2000 : 1900;
|
||||
return sprintf ("%s %s %02d %02d:%02d:%02d %s%4d",
|
||||
$weekday[$wday], $month[$mon], $mday, $hour, $min, $sec,
|
||||
$TZ, $year);
|
||||
}
|
||||
|
||||
sub read_file {
|
||||
$contents = "";
|
||||
open(IN, "<$prefs");
|
||||
while (<IN>) {
|
||||
$contents .= $_;
|
||||
}
|
||||
close(IN);
|
||||
}
|
||||
|
||||
sub write_file {
|
||||
open(OUT, ">$prefs");
|
||||
print OUT $contents;
|
||||
close(OUT);
|
||||
# print STDERR "$progname: wrote $prefs\n";
|
||||
}
|
||||
|
||||
sub get_pref {
|
||||
my ($lvalue) = @_;
|
||||
$_ = $contents;
|
||||
die ("$lvalue unset?\n") unless m@^config\("$lvalue","(.*)"\);@m;
|
||||
return $1;
|
||||
}
|
||||
|
||||
sub set_pref {
|
||||
my ($lvalue,$rvalue) = @_;
|
||||
$_ = $contents;
|
||||
# die("$lvalue unset?\n") unless (m@^(pref|config)\("$lvalue",@m);
|
||||
die("$lvalue unset?\n")
|
||||
unless s@^(pref|config)(\("$lvalue",)(.*)(\).*)$@$1$2$rvalue$4@m;
|
||||
$contents = $_;
|
||||
}
|
||||
|
||||
# no longer used?
|
||||
sub set_indirected_bomb {
|
||||
my ($bomb) = @_;
|
||||
my ($secret) = get_pref("timebomb.relative_timebomb_secret_name");
|
||||
set_pref($secret, $bomb);
|
||||
}
|
||||
|
||||
sub time_diff {
|
||||
use Time::Local;
|
||||
my($time, $result) = @_;
|
||||
my $diff = 2082830400 - (timegm(localtime) - time);
|
||||
return $result =~ /mac/ ?
|
||||
$time + $diff : $time - $diff;
|
||||
}
|
||||
|
||||
sub set_bomb {
|
||||
my ($warning_days, $bomb_days) = @_;
|
||||
|
||||
# die("warning_days ($warning_days) must be greater than 0.")
|
||||
# unless ($warning_days > 0);
|
||||
|
||||
die("bomb_days ($bomb_days) must be greater than 0.")
|
||||
unless ($bomb_days > 0);
|
||||
die("warning_days ($warning_days) must be less than " .
|
||||
"bomb_days ($bomb_days)\n")
|
||||
unless ($warning_days < $bomb_days);
|
||||
|
||||
my $mactime = time;
|
||||
|
||||
# MacPerl stores date and times from 1904 instead of 1970
|
||||
# Conversion routine thanks to Chris Nandor (pudge@pobox.com)
|
||||
|
||||
$now = time_diff($mactime, 'unix');
|
||||
|
||||
my $bomb = $now + ($bomb_days * 24 * 60 * 60);
|
||||
my $warn = $now + ($warning_days * 24 * 60 * 60);
|
||||
|
||||
set_pref("timebomb.expiration_time", $bomb);
|
||||
set_pref("timebomb.warning_time", $warn);
|
||||
set_pref("timebomb.relative_timebomb_days", -1);
|
||||
set_pref("timebomb.relative_timebomb_warning_days", -1);
|
||||
|
||||
set_indirected_bomb(0);
|
||||
|
||||
# print STDERR sprintf("%s: timebomb goes off in %2d days (%s)\n",
|
||||
# $progname, $bomb_days, ctime($bomb));
|
||||
# print STDERR sprintf("%s: warning goes off in %2d days (%s)\n",
|
||||
# $progname, $warning_days, ctime($warn));
|
||||
}
|
||||
|
||||
sub main {
|
||||
my ($warning_days, $bomb_days) = @_;
|
||||
die ("usage: $progname [ days-until-warning [ days-until-timebomb ]]\n")
|
||||
if ($#_ >= 2);
|
||||
|
||||
if ($#_ == 0) {
|
||||
$bomb_days = $warning_days;
|
||||
$warning_days = -1;
|
||||
}
|
||||
if (!$bomb_days || $bomb_days <= 0) {
|
||||
$bomb_days = 30;
|
||||
}
|
||||
if ($warning_days < 0) {
|
||||
$warning_days = $bomb_days - int($bomb_days / 3);
|
||||
if ($warning_days < $bomb_days - 10) {
|
||||
$warning_days = $bomb_days - 10;
|
||||
}
|
||||
}
|
||||
|
||||
read_file();
|
||||
set_bomb($warning_days, $bomb_days);
|
||||
write_file();
|
||||
return 0;
|
||||
}
|
||||
|
||||
exit(&main(@ARGV));
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#ifndef DefinesMac_h_
|
||||
#define DefinesMac_h_
|
||||
|
||||
/*
|
||||
This is a common prefix file, included for both projects like
|
||||
NSStdLib and Mozilla.
|
||||
*/
|
||||
|
||||
/* enable to start building for Carbon */
|
||||
#if TARGET_CARBON
|
||||
#define PP_Target_Carbon 1
|
||||
#define OLDP2C 1
|
||||
#endif
|
||||
|
||||
/* Some build-wide Mac-related defines */
|
||||
#define macintosh /* macintosh is defined for GUSI */
|
||||
#define XP_MAC 1
|
||||
|
||||
/* We have to do this here because ConditionalMacros.h will be included from
|
||||
* within OpenTptInternet.h and will stupidly define these to 1 if they
|
||||
* have not been previously defined. The new PowerPlant (CWPro1) requires that
|
||||
* this be set to 0. (pinkerton)
|
||||
*/
|
||||
#define OLDROUTINENAMES 0
|
||||
#ifndef OLDROUTINELOCATIONS
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#endif
|
||||
|
||||
/* OpenTransport.h has changed to not include the error messages we need from
|
||||
* it unless this is defined. Why? dunnno...(pinkerton)
|
||||
*/
|
||||
#define OTUNIXERRORS 1
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEVELOPER_DEBUG 1
|
||||
#else
|
||||
#define NDEBUG
|
||||
#endif
|
||||
|
||||
/* Some other random defines */
|
||||
#define _NO_FAST_STRING_INLINES_ 1
|
||||
#define _PR_NO_PREEMPT 1
|
||||
///#define HAVE_BOOLEAN 1 // used by JPEG lib
|
||||
|
||||
#endif /* DefinesMac_h_ */
|
||||
@@ -1,88 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#ifndef DefinesMozilla_h_
|
||||
#define DefinesMozilla_h_
|
||||
|
||||
// *** Security
|
||||
//#define NADA_VERSION
|
||||
//#define EXPORT_VERSION
|
||||
#define US_VERSION
|
||||
|
||||
// Cookies/SingleSignon/Wallet
|
||||
#define CookieManagement 1
|
||||
#define SingleSignon 1
|
||||
#define ClientWallet 1
|
||||
|
||||
// 98-09-25 mlm - turn on javascript thread safety
|
||||
#define JS_THREADSAFE 1
|
||||
|
||||
#define USE_NSREG 1
|
||||
|
||||
// External DTD support for XML
|
||||
#define XML_DTD
|
||||
|
||||
//#define MOZ_PERF_METRICS 1 // Uncomment to get metrics in layout, parser and webshell.
|
||||
// You also need to define __TIMESIZE_DOUBLE__ in <timesize.mac.h>
|
||||
|
||||
// reflow counters, enabled in debug builds and visible via a pref
|
||||
#ifdef DEBUG
|
||||
#define MOZ_REFLOW_PERF 1
|
||||
#define MOZ_REFLOW_PERF_DSP 1
|
||||
#endif
|
||||
|
||||
// ***************************************************************************
|
||||
// • You typically will not need to change things below here
|
||||
// ***************************************************************************
|
||||
|
||||
#define MOCHA
|
||||
#define MOZILLA_CLIENT 1
|
||||
#ifndef NETSCAPE
|
||||
#define NETSCAPE 1
|
||||
#endif
|
||||
|
||||
#define OJI 1
|
||||
|
||||
#ifdef JAVA
|
||||
#define UNICODE_FONTLIST 1
|
||||
#endif
|
||||
|
||||
#define NECKO 1
|
||||
|
||||
|
||||
#endif /* DefinesMozilla_h_ */
|
||||
@@ -1,45 +0,0 @@
|
||||
/* -*- 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 is included from the nav-java and sun-java projects */
|
||||
|
||||
#define MOCHAFILE 1
|
||||
#define COMPILER 0
|
||||
|
||||
#define VERSION_NUMBER "40"
|
||||
#define JAR_NAME "java"##VERSION_NUMBER##".jar"
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
DefinesMac.h
|
||||
DefinesMozilla.h
|
||||
|
||||
JavaDefines.h
|
||||
|
||||
MacConfigInclude.h
|
||||
|
||||
MacPrefix.h
|
||||
MacPrefix_debug.h
|
||||
|
||||
MacStaticPrefix.h
|
||||
MacStaticPrefix_debug.h
|
||||
MacSharedPrefix.h
|
||||
MacSharedPrefix_debug.h
|
||||
@@ -1,66 +0,0 @@
|
||||
/* -*- 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 is included as a prefix file in all Mac projects. It ensures that
|
||||
the correct #defines are set up for this build.
|
||||
|
||||
Since this is included from C files, comments should be C-style.
|
||||
|
||||
Order below does matter.
|
||||
*/
|
||||
|
||||
#ifndef MacConfigInclude_h_
|
||||
#define MacConfigInclude_h_
|
||||
|
||||
/* Read compiler options */
|
||||
#ifndef IDE_Options_h_
|
||||
#include "IDE_Options.h"
|
||||
#endif
|
||||
|
||||
/* Read file of defines global to the Mac build */
|
||||
#ifndef DefinesMac_h_
|
||||
#include "DefinesMac.h"
|
||||
#endif
|
||||
|
||||
/* Read build-wide defines (e.g. MOZILLA_CLIENT) */
|
||||
#ifndef DefinesMozilla_h_
|
||||
#include "DefinesMozilla.h"
|
||||
#endif
|
||||
|
||||
#endif /* MacConfigInclude_h_ */
|
||||
@@ -1,47 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#undef DEBUG
|
||||
#undef Debug_Throw
|
||||
#undef Debug_Signal
|
||||
#undef txtnDebug
|
||||
|
||||
/* Read the common configuration file */
|
||||
#ifndef MacConfigInclude_h_
|
||||
#include "MacConfigInclude.h"
|
||||
#endif
|
||||
@@ -1,47 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#define DEBUG 1
|
||||
#define Debug_Throw
|
||||
#define Debug_Signal
|
||||
#define txtnDebug
|
||||
|
||||
/* Read the common configuration file */
|
||||
#ifndef MacConfigInclude_h_
|
||||
#include "MacConfigInclude.h"
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; 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 ***** */
|
||||
|
||||
#define MAC_SHARED 1
|
||||
|
||||
#include "MacPrefix.h"
|
||||
@@ -1,41 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; 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 ***** */
|
||||
|
||||
#define MAC_SHARED 1
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
@@ -1,41 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; 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 ***** */
|
||||
|
||||
#define MAC_STATIC 1
|
||||
|
||||
#include "MacPrefix.h"
|
||||
@@ -1,41 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; 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 ***** */
|
||||
|
||||
#define MAC_STATIC 1
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
@@ -1,69 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
This is included as a prefix file in all Mac projects. It ensures that
|
||||
the correct #defines are set up for this build.
|
||||
|
||||
Since this is included from C files, comments should be C-style.
|
||||
|
||||
Order below does matter.
|
||||
*/
|
||||
|
||||
/* Read compiler options */
|
||||
#include "IDE_Options.h"
|
||||
|
||||
/* Read generated build options (written at build time). */
|
||||
#ifdef DEBUG
|
||||
#include "DefinesOptionsDebug.h"
|
||||
#else
|
||||
#include "DefinesOptions.h"
|
||||
#endif
|
||||
|
||||
/* Read file of defines global to the Mac build */
|
||||
#include "DefinesMac.h"
|
||||
|
||||
/* Read build-wide defines (e.g. MOZILLA_CLIENT) */
|
||||
#include "DefinesMozilla.h"
|
||||
|
||||
/* ...then undefine the Mozilla specific stuff */
|
||||
|
||||
/* ...and define the Raptor specific things */
|
||||
#define MOZ_NGLAYOUT
|
||||
@@ -1,143 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# 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 Chrome/CVS Location Matcher.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Gervase Markham.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# 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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Version 0.5
|
||||
#
|
||||
# This file creates a large list of the mappings between chrome path and CVS
|
||||
# paths which are recorded in the jar.mn files throughout the tree. This list
|
||||
# is shipped with builds to make it easier for people to create chrome patches
|
||||
# using them.
|
||||
|
||||
use Fcntl qw(:DEFAULT :flock);
|
||||
use File::Basename;
|
||||
use Cwd;
|
||||
use mozLock;
|
||||
|
||||
# This is necessary because this module is not present in Perl versions less
|
||||
# than 5.004_05.
|
||||
eval q{use File::Spec};
|
||||
exit if $@;
|
||||
|
||||
# This file takes two parameters - the jar file to process, and the chrome
|
||||
# directory we are compiling into.
|
||||
my ($chrome, $jar, $flock) = @ARGV;
|
||||
|
||||
my $nofilelocks = $flock ? ($flock eq "-l") : 0;
|
||||
|
||||
# OS setup - which chrome does your OS use?
|
||||
#
|
||||
# The $^O variable contains some representation of what OS you are on.
|
||||
# Find its value on your platform by running the following command:
|
||||
# perl -e 'print $^O . "\n";'
|
||||
# and set the relevant booleans accordingly depending on what
|
||||
# chrome your platform uses. There are currently three sorts of chrome:
|
||||
# win, mac, and unix.
|
||||
|
||||
my $win32 = ($^O =~ /((MS)?win32)|os2/i) ? 1 : 0;
|
||||
my $unix = ($^O =~ /linux/i) ? 1 : 0;
|
||||
my $macos = ($^O =~ /MacOS|darwin/i) ? 1 : 0;
|
||||
|
||||
# Testing only - generate chromelist.txt for other platforms
|
||||
# $macos = 1;
|
||||
# $unix = 0;
|
||||
|
||||
my $chromelist = File::Spec->catfile("$chrome", "chromelist.txt");
|
||||
my $lockfile = $chromelist . ".lck";
|
||||
|
||||
mozLock($lockfile) unless $nofilelocks;
|
||||
|
||||
open(BIGLIST, ">>" . $chromelist) or die "Can't open chromelist.txt";
|
||||
open(JARFILE, "<$jar");
|
||||
|
||||
# Find the absolute directory the jar.mn file is in
|
||||
my $stub = File::Spec->catdir(getcwd(), dirname($jar));
|
||||
|
||||
# Convert back to Unix-style directory names for the CVS version
|
||||
if ($macos) { $stub =~ tr|:|/|; }
|
||||
if ($win32) { $stub =~ tr|\\|/|; }
|
||||
|
||||
# Turn the absolute path into a relative path inside the CVS tree
|
||||
$stub =~ s|.*mozilla/?||;
|
||||
|
||||
while (<JARFILE>)
|
||||
{
|
||||
# Tidy up the line
|
||||
chomp;
|
||||
s/^[\s|\+]+//; # Some lines have a + sign before them
|
||||
s/\s+$//;
|
||||
|
||||
# There's loads of things we aren't interested in
|
||||
next if m/:/; # e.g. "comm.jar:"
|
||||
next if m/^\s*#/; # Comments
|
||||
next if m/^$/; # Blank lines
|
||||
next if m/\.gif\)\s*$/i; # Graphics
|
||||
next if m/\.png\)\s*$/i;
|
||||
next if m/\.jpe?g\)\s*$/i;
|
||||
next if ($stub =~ m|/win/|) and !$win32;
|
||||
next if ($stub =~ m|/unix/|) and !$unix;
|
||||
next if ($stub =~ m|/mac/|) and !$macos;
|
||||
|
||||
# Split up the common format, which is:
|
||||
# skin/fred/foo.xul (xpfe/barney/wilma/foo.xul)
|
||||
m/(.*)\s+\((.*)\)/;
|
||||
my $chromefile = $1;
|
||||
my $cvsfile = $2;
|
||||
|
||||
# Deal with those jar.mns which have just a single line,
|
||||
# implying that the file is in the current directory.
|
||||
if (!$1 || $1 eq "")
|
||||
{
|
||||
$chromefile = $_;
|
||||
$_ =~ /.*\/(.*?)$/;
|
||||
$cvsfile = $1;
|
||||
}
|
||||
|
||||
# Convert to platform-specific separator for the chrome version.
|
||||
# This permits easy grepping of the file for a given path.
|
||||
if ($macos) { $chromefile =~ tr|/|:|; }
|
||||
if ($win32) { $chromefile =~ tr|/|\\|; }
|
||||
|
||||
$cvsfile = File::Spec::Unix->catfile($stub, $cvsfile);
|
||||
|
||||
print BIGLIST "$chromefile ($cvsfile)\n";
|
||||
}
|
||||
|
||||
mozUnlock($lockfile) unless $nofilelocks;
|
||||
|
||||
exit(0);
|
||||
|
||||
@@ -1,263 +0,0 @@
|
||||
#!/perl
|
||||
|
||||
# make-jars [-f] [-v] [-l] [-d <chromeDir>] [-s <srcdir>] < <jar.mn>
|
||||
|
||||
use strict;
|
||||
|
||||
use Getopt::Std;
|
||||
use Cwd;
|
||||
use File::stat;
|
||||
use Time::localtime;
|
||||
use Cwd;
|
||||
use File::Copy;
|
||||
use File::Path;
|
||||
use IO::File;
|
||||
use mozLock;
|
||||
|
||||
my $objdir = getcwd;
|
||||
|
||||
getopts("d:s:f:vl");
|
||||
|
||||
my $baseFilesDir = ".";
|
||||
if (defined($::opt_s)) {
|
||||
$baseFilesDir = $::opt_s;
|
||||
}
|
||||
|
||||
my $chromeDir = ".";
|
||||
if (defined($::opt_d)) {
|
||||
$chromeDir = $::opt_d;
|
||||
}
|
||||
|
||||
my $verbose = 0;
|
||||
if (defined($::opt_v)) {
|
||||
$verbose = 1;
|
||||
}
|
||||
|
||||
my $fileformat = "jar";
|
||||
if (defined($::opt_f)) {
|
||||
($fileformat = $::opt_f) =~ tr/A-Z/a-z/;
|
||||
}
|
||||
|
||||
if ("$fileformat" ne "jar" &&
|
||||
"$fileformat" ne "flat" &&
|
||||
"$fileformat" ne "both") {
|
||||
print "File format specified by -f option must be one of: jar, flat, or both.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
my $zipmoveopt = "";
|
||||
if ("$fileformat" eq "jar") {
|
||||
$zipmoveopt = "-m";
|
||||
}
|
||||
|
||||
my $nofilelocks = 0;
|
||||
if (defined($::opt_l)) {
|
||||
$nofilelocks = 1;
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
print "make-jars "
|
||||
. "-v -d $chromeDir "
|
||||
. ($fileformat ? "-f $fileformat " : "")
|
||||
. ($nofilelocks ? "-l " : "")
|
||||
. ($baseFilesDir ? "-s $baseFilesDir " : "")
|
||||
. "\n";
|
||||
}
|
||||
|
||||
sub zipErrorCheck($$)
|
||||
{
|
||||
my ($err,$lockfile) = @_;
|
||||
return if ($err == 0 || $err == 12);
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
die ("Error invoking zip: $err");
|
||||
}
|
||||
|
||||
sub JarIt
|
||||
{
|
||||
my ($destPath, $jarfile, $args, $overrides) = @_;
|
||||
my $oldDir = cwd();
|
||||
chdir("$destPath/$jarfile");
|
||||
|
||||
if ("$fileformat" eq "flat") {
|
||||
unlink("../$jarfile.jar") if ( -e "../$jarfile.jar");
|
||||
chdir($oldDir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#print "cd $destPath/$jarfile\n";
|
||||
|
||||
my $lockfile = "../$jarfile.lck";
|
||||
|
||||
mozLock($lockfile) if (!$nofilelocks);
|
||||
|
||||
if (!($args eq "")) {
|
||||
my $cwd = getcwd;
|
||||
my $err = 0;
|
||||
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $args\n";
|
||||
|
||||
# Handle posix cmdline limits (4096)
|
||||
while (length($args) > 4000) {
|
||||
#print "Exceeding POSIX cmdline limit: " . length($args) . "\n";
|
||||
my $subargs = substr($args, 0, 3999);
|
||||
my $pos = rindex($subargs, " ");
|
||||
$subargs = substr($args, 0, $pos);
|
||||
$args = substr($args, $pos);
|
||||
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $subargs\n";
|
||||
#print "Length of subargs: " . length($subargs) . "\n";
|
||||
system("zip $zipmoveopt -u ../$jarfile.jar $subargs") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile);
|
||||
}
|
||||
#print "Length of args: " . length($args) . "\n";
|
||||
#print "zip $zipmoveopt -u ../$jarfile.jar $args\n";
|
||||
system("zip $zipmoveopt -u ../$jarfile.jar $args") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile);
|
||||
}
|
||||
|
||||
if (!($overrides eq "")) {
|
||||
my $err = 0;
|
||||
print "+++ overriding $overrides\n";
|
||||
|
||||
while (length($args) > 4000) {
|
||||
#print "Exceeding POSIX cmdline limit: " . length($args) . "\n";
|
||||
my $subargs = substr($args, 0, 3999);
|
||||
my $pos = rindex($subargs, " ");
|
||||
$subargs = substr($args, 0, $pos);
|
||||
$args = substr($args, $pos);
|
||||
|
||||
#print "zip $zipmoveopt ../$jarfile.jar $subargs\n";
|
||||
#print "Length of subargs: " . length($subargs) . "\n";
|
||||
system("zip $zipmoveopt ../$jarfile.jar $subargs") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile);
|
||||
}
|
||||
#print "zip $zipmoveopt ../$jarfile.jar $overrides\n";
|
||||
system("zip $zipmoveopt ../$jarfile.jar $overrides\n") == 0 or
|
||||
$err = $? >> 8;
|
||||
zipErrorCheck($err,$lockfile);
|
||||
}
|
||||
mozUnlock($lockfile) if (!$nofilelocks);
|
||||
chdir($oldDir);
|
||||
#print "cd $oldDir\n";
|
||||
}
|
||||
|
||||
sub EnsureFileInDir
|
||||
{
|
||||
my ($destPath, $srcPath, $destFile, $srcFile, $override) = @_;
|
||||
|
||||
#print "EnsureFileInDir($destPath, $srcPath, $destFile, $srcFile, $override)\n";
|
||||
|
||||
my $src = $srcFile;
|
||||
if (defined($src)) {
|
||||
if (! -e $src ) {
|
||||
$src = "$srcPath/$srcFile";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$src = "$srcPath/$destFile";
|
||||
# check for the complete jar path in the dest dir
|
||||
if (!-e $src) {
|
||||
#else check for just the file name in the dest dir
|
||||
my $dir = "";
|
||||
my $file;
|
||||
if ($destFile =~ /([\w\d.\-\_\\\/]+)[\\\/]([\w\d.\-\_]+)/) {
|
||||
$dir = $1;
|
||||
$file = $2;
|
||||
}
|
||||
else {
|
||||
die "file not found: $srcPath/$destFile";
|
||||
}
|
||||
$src = "$srcPath/$file";
|
||||
if (!-e $src) {
|
||||
die "file not found: $srcPath/$destFile";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$srcPath = $src;
|
||||
$destPath = "$destPath/$destFile";
|
||||
|
||||
my $srcStat = stat($srcPath);
|
||||
my $srcMtime = $srcStat ? $srcStat->mtime : 0;
|
||||
|
||||
my $destStat = stat($destPath);
|
||||
my $destMtime = $destStat ? $destStat->mtime : 0;
|
||||
#print "destMtime = $destMtime, srcMtime = $srcMtime\n";
|
||||
|
||||
if (!-e $destPath || $destMtime < $srcMtime || $override) {
|
||||
#print "copying $destPath, from $srcPath\n";
|
||||
my $dir = "";
|
||||
my $file;
|
||||
if ($destPath =~ /([\w\d.\-\_\\\/]+)[\\\/]([\w\d.\-\_]+)/) {
|
||||
$dir = $1;
|
||||
$file = $2;
|
||||
}
|
||||
else {
|
||||
$file = $destPath;
|
||||
}
|
||||
|
||||
if ($srcPath) {
|
||||
$file = $srcPath;
|
||||
}
|
||||
|
||||
if (!-e $file) {
|
||||
die "error: file '$file' doesn't exist";
|
||||
}
|
||||
if (!-e $dir) {
|
||||
mkpath($dir, 0, 0775) || die "can't mkpath $dir: $!";
|
||||
}
|
||||
unlink $destPath; # in case we had a symlink on unix
|
||||
copy($file, $destPath) || die "copy($file, $destPath) failed: $!";
|
||||
|
||||
# fix the mod date so we don't jar everything (is this faster than just jarring everything?)
|
||||
my $atime = stat($file)->atime || die $!;
|
||||
my $mtime = stat($file)->mtime || die $!;
|
||||
utime($atime, $mtime, $destPath);
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (<STDIN>) {
|
||||
chomp;
|
||||
start:
|
||||
if (/^([\w\d.\-\_\\\/]+).jar\:\s*$/) {
|
||||
my $jarfile = $1;
|
||||
my $args = "";
|
||||
my $overrides = "";
|
||||
my $cwd = cwd();
|
||||
print "+++ making chrome $cwd => $chromeDir/$jarfile.jar\n";
|
||||
while (<STDIN>) {
|
||||
if (/^\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
|
||||
my $dest = $1;
|
||||
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
|
||||
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0);
|
||||
$args = "$args$dest ";
|
||||
} elsif (/^\+\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
|
||||
my $dest = $1;
|
||||
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
|
||||
EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1);
|
||||
$overrides = "$overrides$dest ";
|
||||
} elsif (/^\s*$/) {
|
||||
# end with blank line
|
||||
last;
|
||||
} else {
|
||||
JarIt($chromeDir, $jarfile, $args, $overrides);
|
||||
goto start;
|
||||
}
|
||||
}
|
||||
JarIt($chromeDir, $jarfile, $args, $overrides);
|
||||
|
||||
} elsif (/^\s*\#.*$/) {
|
||||
# skip comments
|
||||
} elsif (/^\s*$/) {
|
||||
# skip blank lines
|
||||
} else {
|
||||
close;
|
||||
die "bad jar rule head at: $_";
|
||||
}
|
||||
}
|
||||
@@ -1,603 +0,0 @@
|
||||
/* -*- 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):
|
||||
* Modified by David.Gardiner@unisa.edu.au
|
||||
*
|
||||
*
|
||||
* 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 ***** */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <direct.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/utime.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/*
|
||||
Unicode calls are linked at run-time, so that the application can run under
|
||||
Windows NT and 95 (which doesn't support the Unicode calls)
|
||||
|
||||
The following APIs are linked:
|
||||
BackupWrite
|
||||
CreateFileW
|
||||
GetFullPathNameW
|
||||
*/
|
||||
|
||||
//static const char *prog;
|
||||
|
||||
BOOL insertHashLine = FALSE;
|
||||
BOOL trySymlink = FALSE;
|
||||
BOOL recurse = FALSE;
|
||||
|
||||
typedef WINBASEAPI BOOL (WINAPI* LPFNBackupWrite)(HANDLE, LPBYTE, DWORD, LPDWORD, BOOL, BOOL, LPVOID *);
|
||||
typedef WINBASEAPI HANDLE (WINAPI* LPFNCreateFileW)(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
|
||||
typedef WINBASEAPI DWORD (WINAPI* LPFNGetFullPathNameW)(LPCWSTR, DWORD, LPWSTR, LPWSTR *);
|
||||
|
||||
// Function pointers (used for NTFS hard links)
|
||||
LPFNBackupWrite lpfnDllBackupWrite = NULL;
|
||||
LPFNCreateFileW lpfnDllCreateFileW = NULL;
|
||||
LPFNGetFullPathNameW lpfnDllGetFullPathNameW = NULL;
|
||||
|
||||
// Handle to DLL
|
||||
HINSTANCE hDLL = NULL;
|
||||
|
||||
/*
|
||||
** Flip any "unix style slashes" into "dos style backslashes"
|
||||
*/
|
||||
inline void FlipSlashes(char *name)
|
||||
{
|
||||
for( int i=0; name[i]; i++ ) {
|
||||
if( name[i] == '/' ) name[i] = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Flip any "dos style backslashes" into "unix style slashes"
|
||||
*/
|
||||
inline void UnflipSlashes(char *name)
|
||||
{
|
||||
for( int i=0; name[i]; i++ ) {
|
||||
if( name[i] == '\\' ) name[i] = '/';
|
||||
}
|
||||
}
|
||||
|
||||
int MakeDir( char *path )
|
||||
{
|
||||
char *cp, *pstr;
|
||||
struct stat sb;
|
||||
|
||||
pstr = path;
|
||||
while( cp = strchr(pstr, '\\') ) {
|
||||
*cp = '\0';
|
||||
|
||||
if( !(stat(path, &sb) == 0 && (sb.st_mode & _S_IFDIR) )) {
|
||||
/* create the new sub-directory */
|
||||
printf("+++ makecopy: creating directory %s\n", path);
|
||||
if( mkdir(path) < 0 ) {
|
||||
return -1;
|
||||
}
|
||||
} /* else sub-directory already exists.... */
|
||||
|
||||
*cp = '\\';
|
||||
pstr = cp+1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display error code and message for last error
|
||||
*/
|
||||
int ReportError()
|
||||
{
|
||||
LPVOID lpMsgBuf = NULL;
|
||||
|
||||
DWORD err = GetLastError();
|
||||
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
NULL,
|
||||
err,
|
||||
0,
|
||||
(LPTSTR) &lpMsgBuf,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
fprintf(stderr, "%u, %s\n", err, (LPCTSTR) lpMsgBuf ) ;
|
||||
|
||||
LocalFree( lpMsgBuf );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ReportError(const char* msg)
|
||||
{
|
||||
fprintf(stderr, "%Error: s\n", msg);
|
||||
return ReportError();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Creates an NTFS hard link of src at dest.
|
||||
NT5 will have a CreateHardLink API which will do the same thing, but a lot simpler
|
||||
This is based on the MSDN code sample Q153181
|
||||
|
||||
*/
|
||||
BOOL hardSymLink(LPCSTR src, LPCSTR dest)
|
||||
{
|
||||
WCHAR FileLink[ MAX_PATH + 1 ];
|
||||
WCHAR FileSource[ MAX_PATH + 1 ];
|
||||
WCHAR FileDest[ MAX_PATH + 1 ];
|
||||
LPWSTR FilePart;
|
||||
|
||||
WIN32_STREAM_ID StreamId;
|
||||
DWORD dwBytesWritten;
|
||||
DWORD cbPathLen;
|
||||
|
||||
BOOL bSuccess;
|
||||
|
||||
// Convert src and dest to Unicode
|
||||
if (!MultiByteToWideChar(CP_ACP, 0, src, -1, FileSource, MAX_PATH)) {
|
||||
ReportError("Convert to WCHAR (source)");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!MultiByteToWideChar(CP_ACP, 0, dest, -1, FileDest, MAX_PATH)) {
|
||||
ReportError("Convert to WCHAR (destination)");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// open existing file that we link to
|
||||
//
|
||||
|
||||
HANDLE hFileSource = lpfnDllCreateFileW(
|
||||
FileSource,
|
||||
FILE_WRITE_ATTRIBUTES,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
NULL, // sa
|
||||
OPEN_EXISTING,
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
|
||||
if(hFileSource == INVALID_HANDLE_VALUE) {
|
||||
ReportError("CreateFile (source)");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// validate and sanitize supplied link path and use the result
|
||||
// the full path MUST be Unicode for BackupWrite
|
||||
//
|
||||
|
||||
cbPathLen = lpfnDllGetFullPathNameW( FileDest, MAX_PATH, FileLink, &FilePart);
|
||||
|
||||
if(cbPathLen == 0) {
|
||||
ReportError("GetFullPathName");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cbPathLen = (cbPathLen + 1) * sizeof(WCHAR); // adjust for byte count
|
||||
|
||||
//
|
||||
// it might also be a good idea to verify the existence of the link,
|
||||
// (and possibly bail), as the file specified in FileLink will be
|
||||
// overwritten if it already exists
|
||||
//
|
||||
|
||||
//
|
||||
// prepare and write the WIN32_STREAM_ID out
|
||||
//
|
||||
|
||||
LPVOID lpContext = NULL;
|
||||
|
||||
StreamId.dwStreamId = BACKUP_LINK;
|
||||
StreamId.dwStreamAttributes = 0;
|
||||
StreamId.dwStreamNameSize = 0;
|
||||
StreamId.Size.HighPart = 0;
|
||||
StreamId.Size.LowPart = cbPathLen;
|
||||
|
||||
//
|
||||
// compute length of variable size WIN32_STREAM_ID
|
||||
//
|
||||
|
||||
DWORD StreamHeaderSize = (LPBYTE)&StreamId.cStreamName - (LPBYTE)&
|
||||
StreamId+ StreamId.dwStreamNameSize ;
|
||||
|
||||
bSuccess = lpfnDllBackupWrite(
|
||||
hFileSource,
|
||||
(LPBYTE)&StreamId, // buffer to write
|
||||
StreamHeaderSize, // number of bytes to write
|
||||
&dwBytesWritten,
|
||||
FALSE, // don't abort yet
|
||||
FALSE, // don't process security
|
||||
&lpContext
|
||||
);
|
||||
|
||||
if(bSuccess) {
|
||||
|
||||
//
|
||||
// write out the buffer containing the path
|
||||
//
|
||||
|
||||
bSuccess = lpfnDllBackupWrite(
|
||||
hFileSource,
|
||||
(LPBYTE)FileLink, // buffer to write
|
||||
cbPathLen, // number of bytes to write
|
||||
&dwBytesWritten,
|
||||
FALSE, // don't abort yet
|
||||
FALSE, // don't process security
|
||||
&lpContext
|
||||
);
|
||||
|
||||
//
|
||||
// free context
|
||||
//
|
||||
|
||||
lpfnDllBackupWrite(
|
||||
hFileSource,
|
||||
NULL, // buffer to write
|
||||
0, // number of bytes to write
|
||||
&dwBytesWritten,
|
||||
TRUE, // abort
|
||||
FALSE, // don't process security
|
||||
&lpContext
|
||||
);
|
||||
}
|
||||
|
||||
CloseHandle( hFileSource );
|
||||
|
||||
if(!bSuccess) {
|
||||
ReportError("BackupWrite");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int CopyIfNecessary(char *oldFile, char *newFile)
|
||||
{
|
||||
struct stat newsb;
|
||||
struct stat oldsb;
|
||||
|
||||
// Use stat to find file details
|
||||
if (stat(oldFile, &oldsb)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// skip directories unless recursion flag is set
|
||||
if ( oldsb.st_mode & _S_IFDIR ) {
|
||||
if (!recurse) {
|
||||
printf(" Skipping directory %s\n", oldFile);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
char *lastDir;
|
||||
char *oldFileName; // points to where file name starts in oldFile
|
||||
char *newFileName; // points to where file name starts in newFile
|
||||
WIN32_FIND_DATA findFileData;
|
||||
|
||||
// weed out special "." and ".." directories
|
||||
lastDir = strrchr(oldFile, '\\');
|
||||
if ( lastDir )
|
||||
++lastDir;
|
||||
else
|
||||
lastDir = oldFile;
|
||||
if ( strcmp( lastDir, "." ) == 0 || strcmp( lastDir, ".." ) == 0 )
|
||||
return 0;
|
||||
|
||||
// find and process the contents of the directory
|
||||
oldFileName = oldFile + strlen(oldFile);
|
||||
strcpy(oldFileName, "\\*");
|
||||
++oldFileName;
|
||||
|
||||
newFileName = newFile + strlen(newFile);
|
||||
strcpy(newFileName, "\\");
|
||||
++newFileName;
|
||||
|
||||
if( MakeDir(newFile) < 0 ) {
|
||||
fprintf(stderr, "\n+++ makecopy: unable to create directory %s\n", newFile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
HANDLE hFindFile = FindFirstFile(oldFile, &findFileData);
|
||||
if (hFindFile != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
strcpy(oldFileName, findFileData.cFileName);
|
||||
strcpy(newFileName, findFileData.cFileName);
|
||||
CopyIfNecessary(oldFile, newFile);
|
||||
} while (FindNextFile(hFindFile, &findFileData) != 0);
|
||||
} else {
|
||||
fprintf(stderr, "\n+++ makecopy: no such file: %s\n", oldFile);
|
||||
}
|
||||
FindClose(hFindFile);
|
||||
}
|
||||
// nothing more we can do with a directory
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!stat(newFile, &newsb)) {
|
||||
// If file times are equal, don't copy
|
||||
if (newsb.st_mtime == oldsb.st_mtime) {
|
||||
#if 0
|
||||
printf("+++ makecopy: %s is up to date\n", newFile);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char fullPathName[ MAX_PATH + 1 ];
|
||||
LPTSTR filenamePart = NULL;
|
||||
|
||||
char buffer[8192];
|
||||
DWORD bytesRead = 0;
|
||||
DWORD bytesWritten = 0;
|
||||
|
||||
// find out required size
|
||||
GetFullPathName(oldFile, MAX_PATH, fullPathName, &filenamePart);
|
||||
|
||||
// If we need to insert #line, the copying is a bit involved.
|
||||
if (insertHashLine == TRUE) {
|
||||
struct _utimbuf utim;
|
||||
|
||||
printf(" #Installing %s into %s\n", oldFile, newFile);
|
||||
|
||||
utim.actime = oldsb.st_atime;
|
||||
utim.modtime = oldsb.st_mtime; // modification time
|
||||
|
||||
HANDLE hNewFile = CreateFile(newFile, GENERIC_WRITE, FILE_SHARE_WRITE, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
if (hNewFile == INVALID_HANDLE_VALUE) {
|
||||
return ReportError("CreateFile");
|
||||
}
|
||||
|
||||
HANDLE hOldFile = CreateFile(oldFile, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
if (hOldFile == INVALID_HANDLE_VALUE) {
|
||||
return ReportError("CreateFile");
|
||||
}
|
||||
|
||||
// Insert first line.
|
||||
sprintf(buffer, "#line 1 \"%s\"\r\n", fullPathName);
|
||||
|
||||
// convert to unix.
|
||||
UnflipSlashes(buffer);
|
||||
|
||||
WriteFile(hNewFile, buffer, strlen(buffer), &bytesWritten, NULL);
|
||||
|
||||
// Copy file.
|
||||
do {
|
||||
if (!ReadFile(hOldFile, buffer, sizeof(buffer), &bytesRead, NULL)) {
|
||||
return ReportError("ReadFile");
|
||||
}
|
||||
|
||||
if (!WriteFile(hNewFile, buffer, bytesRead, &bytesWritten, NULL)) {
|
||||
return ReportError("WriteFile");
|
||||
}
|
||||
|
||||
} while (bytesRead > 0);
|
||||
|
||||
CloseHandle(hNewFile);
|
||||
CloseHandle(hOldFile);
|
||||
|
||||
// make copy have same time
|
||||
_utime(newFile, &utim);
|
||||
|
||||
// If we don't need to do a #line, use an API to copy the file..
|
||||
} else {
|
||||
|
||||
BOOL isNTFS = FALSE;
|
||||
|
||||
// Find out what kind of volume this is.
|
||||
if ( trySymlink ) {
|
||||
char rootPathName[MAX_PATH];
|
||||
char *c = strchr(fullPathName, '\\');
|
||||
|
||||
if (c != NULL) {
|
||||
TCHAR fileSystemName[50];
|
||||
|
||||
strncpy(rootPathName, fullPathName, (c - fullPathName) + 1);
|
||||
|
||||
if (!GetVolumeInformation(rootPathName, NULL, 0, NULL, NULL, NULL, fileSystemName, sizeof(rootPathName))) {
|
||||
return ReportError("GetVolumeInformation");
|
||||
}
|
||||
|
||||
isNTFS = (strcmp(fileSystemName, "NTFS") == 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (isNTFS) {
|
||||
printf(" Symlinking %s into %s\n", oldFile, newFile);
|
||||
|
||||
if (! hardSymLink(oldFile, newFile) ) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
printf(" Installing %s into %s\n", oldFile, newFile);
|
||||
|
||||
if( ! CopyFile(oldFile, newFile, FALSE) ) {
|
||||
ReportError("CopyFile");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Usage(void)
|
||||
{
|
||||
fprintf(stderr, "makecopy: [-cisx] <file1> [file2 ... fileN] <dir-path>\n");
|
||||
fprintf(stderr, " -c copy [default], cancels -s\n");
|
||||
fprintf(stderr, " -i add #line directive\n");
|
||||
fprintf(stderr, " -r recurse subdirectories\n");
|
||||
fprintf(stderr, " -s use symlinks on NT when possible\n");
|
||||
fprintf(stderr, " -x cancel -i\n");
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
char old_path[4096];
|
||||
char new_path[4096];
|
||||
char *oldFileName; // points to where file name starts in old_path
|
||||
char *newFileName; // points to where file name starts in new_path
|
||||
WIN32_FIND_DATA findFileData;
|
||||
int rv = 0;
|
||||
int i = 1;
|
||||
|
||||
if (argc < 3) {
|
||||
Usage();
|
||||
return 2;
|
||||
}
|
||||
|
||||
// parse option flags
|
||||
for ( ; *argv[i] == '-' ; ++i) {
|
||||
char *opt = argv[i]+1;
|
||||
for ( ; *opt; ++opt) {
|
||||
switch (*opt) {
|
||||
case 'c':
|
||||
trySymlink = FALSE;
|
||||
break;
|
||||
case 'i':
|
||||
insertHashLine = TRUE;
|
||||
break;
|
||||
case 'r':
|
||||
recurse = TRUE;
|
||||
break;
|
||||
case 's':
|
||||
trySymlink = TRUE;
|
||||
break;
|
||||
case 'x':
|
||||
insertHashLine = FALSE;
|
||||
break;
|
||||
default:
|
||||
Usage();
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( trySymlink ) {
|
||||
OSVERSIONINFO osvi;
|
||||
|
||||
// Symlinking supported only on WinNT, not Win9x
|
||||
// Is this Windows NT?
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
|
||||
if (!GetVersionEx(&osvi)) {
|
||||
return ReportError();
|
||||
}
|
||||
|
||||
trySymlink = (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||
|
||||
if ( trySymlink ) {
|
||||
|
||||
hDLL = LoadLibrary("Kernel32");
|
||||
if (hDLL != NULL)
|
||||
{
|
||||
lpfnDllBackupWrite = (LPFNBackupWrite)GetProcAddress(hDLL, "BackupWrite");
|
||||
lpfnDllCreateFileW = (LPFNCreateFileW)GetProcAddress(hDLL, "CreateFileW");
|
||||
lpfnDllGetFullPathNameW = (LPFNGetFullPathNameW) GetProcAddress(hDLL, "GetFullPathNameW");
|
||||
|
||||
if ((!lpfnDllBackupWrite) || (!lpfnDllCreateFileW) || (!lpfnDllGetFullPathNameW))
|
||||
{
|
||||
// handle the error
|
||||
int r = ReportError("GetProcAddress");
|
||||
|
||||
FreeLibrary(hDLL);
|
||||
return r;
|
||||
}
|
||||
} else {
|
||||
return ReportError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// destination path is last argument
|
||||
strcpy(new_path, argv[argc-1]);
|
||||
|
||||
// append backslash to path if not already there
|
||||
if (new_path[strlen(new_path)] != '\\') {
|
||||
strcat(new_path, "\\");
|
||||
}
|
||||
|
||||
//sprintf(new_path, "%s\\", argv[i+1]);
|
||||
FlipSlashes(new_path);
|
||||
newFileName = new_path + strlen(new_path);
|
||||
|
||||
if( MakeDir(new_path) < 0 ) {
|
||||
fprintf(stderr, "\n+++ makecopy: unable to create directory %s\n", new_path);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// copy all named source files
|
||||
while (i < (argc - 1)) {
|
||||
strcpy(old_path, argv[i]);
|
||||
|
||||
FlipSlashes(old_path);
|
||||
oldFileName = strrchr(old_path, '\\');
|
||||
if (oldFileName) {
|
||||
oldFileName++;
|
||||
} else {
|
||||
oldFileName = old_path;
|
||||
}
|
||||
|
||||
HANDLE hFindFile = FindFirstFile(old_path, &findFileData);
|
||||
|
||||
if (hFindFile != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
strcpy(oldFileName, findFileData.cFileName);
|
||||
strcpy(newFileName, findFileData.cFileName);
|
||||
rv = CopyIfNecessary(old_path, new_path);
|
||||
|
||||
} while (FindNextFile(hFindFile, &findFileData) != 0);
|
||||
} else {
|
||||
fprintf(stderr, "\n+++ makecopy: no such file: %s\n", old_path);
|
||||
}
|
||||
|
||||
FindClose(hFindFile);
|
||||
i++;
|
||||
}
|
||||
if ( trySymlink ) {
|
||||
FreeLibrary(hDLL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
@@ -1,887 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
// Dependency building hack
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <afxcoll.h>
|
||||
#include <afxtempl.h>
|
||||
|
||||
int mainReturn = 0;
|
||||
BOOL b16 = FALSE;
|
||||
BOOL bSimple = FALSE;
|
||||
|
||||
// freopen won't work on stdout in win16
|
||||
FILE *pAltFile = stdout;
|
||||
|
||||
CStringArray includeDirectories;
|
||||
|
||||
// turn a file, relative path or other into an absolute path
|
||||
// This function copied from MFC 1.52
|
||||
BOOL PASCAL _AfxFullPath(LPSTR lpszPathOut, LPCSTR lpszFileIn)
|
||||
// lpszPathOut = buffer of _MAX_PATH
|
||||
// lpszFileIn = file, relative path or absolute path
|
||||
// (both in ANSI character set)
|
||||
{
|
||||
OFSTRUCT of;
|
||||
if (OpenFile(lpszFileIn, &of, OF_PARSE) != HFILE_ERROR)
|
||||
{
|
||||
// of.szPathName is in the OEM character set
|
||||
OemToAnsi(of.szPathName, lpszPathOut);
|
||||
AnsiUpper(lpszPathOut); // paths in upper case just to be sure
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE1("Warning: could not parse the path %Fs\n", lpszFileIn);
|
||||
lstrcpy(lpszPathOut, lpszFileIn); // take it literally
|
||||
AnsiUpper(lpszPathOut); // paths in upper case just to be sure
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void AddIncludeDirectory( char *pString ){
|
||||
CString s = pString;
|
||||
int len = s.GetLength();
|
||||
if(len > 0 && s[len - 1] != '\\' ){
|
||||
s += "\\";
|
||||
}
|
||||
includeDirectories.Add(s);
|
||||
}
|
||||
|
||||
BOOL FileExists( const char *pString ){
|
||||
struct _stat buf;
|
||||
int result;
|
||||
|
||||
result = _stat( pString, &buf );
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
void FixPathName(CString& str) {
|
||||
str.MakeUpper(); // all upper case
|
||||
|
||||
// now switch all forward slashes to back slashes
|
||||
int index;
|
||||
while ((index = str.Find('/')) != -1) {
|
||||
str.SetAt(index, '\\');
|
||||
}
|
||||
}
|
||||
|
||||
void FATName(CString& csLONGName)
|
||||
{
|
||||
// Only relevant for 16 bits.
|
||||
if(b16) {
|
||||
// Convert filename to FAT (8.3) equivalent.
|
||||
char aBuffer[2048];
|
||||
|
||||
if(GetShortPathName(csLONGName, aBuffer, 2048)) {
|
||||
csLONGName = aBuffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CFileRecord {
|
||||
public:
|
||||
CString m_shortName;
|
||||
CString m_pathName;
|
||||
CPtrArray m_includes; // pointers to CFileRecords in fileMap
|
||||
BOOL m_bVisited;
|
||||
BOOL m_bSystem;
|
||||
BOOL m_bSource;
|
||||
static CMapStringToPtr fileMap; // contains all allocated CFileRecords
|
||||
static CStringArray orderedFileNames;
|
||||
static CMapStringToPtr includeMap; // pointer to CFileRecords in fileMap
|
||||
static CMapStringToPtr noDependMap;
|
||||
|
||||
CFileRecord( const char *shortName, const char* pFullName, BOOL bSystem, BOOL bSource):
|
||||
m_shortName( shortName ),
|
||||
m_pathName(),
|
||||
m_includes(),
|
||||
m_bVisited(FALSE),
|
||||
m_bSource( bSource ),
|
||||
m_bSystem(bSystem){
|
||||
|
||||
m_pathName = pFullName;
|
||||
FixPathName(m_pathName); // all upper case for consistency
|
||||
ASSERT(FindFileRecord(m_pathName) == NULL); // make sure it's not already in the map
|
||||
fileMap[m_pathName] = this; // add this to the filemap, using the appropriate name as the key
|
||||
if (bSource) {
|
||||
orderedFileNames.Add(m_pathName); // remember the order we saw source files in
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// open the file and grab all the includes.
|
||||
//
|
||||
void ProcessFile(){
|
||||
FILE *f;
|
||||
CString fullName;
|
||||
BOOL bSystem;
|
||||
DWORD lineCntr = 0;
|
||||
char *a = new char[2048];
|
||||
memset(a, 0, 2048);
|
||||
char srcPath[_MAX_PATH];
|
||||
|
||||
// construct the full path
|
||||
if (!_AfxFullPath(srcPath, m_pathName)) {
|
||||
strcpy(srcPath, m_pathName);
|
||||
}
|
||||
|
||||
// strip off the source filename to end up with just the path
|
||||
LPSTR pTemp = strrchr(srcPath, '\\');
|
||||
if (pTemp) {
|
||||
*(pTemp + 1) = 0;
|
||||
}
|
||||
|
||||
f = fopen(m_pathName, "r");
|
||||
if(f != NULL && f != (FILE *)-1) {
|
||||
setvbuf(f, NULL, _IOFBF, 32768); // use a large file buffer
|
||||
while(fgets(a, 2047, f)) {
|
||||
// if the string "//{{NO_DEPENDENCIES}}" is at the start of one of the
|
||||
// first 10 lines of a file, don't build dependencies on it or any
|
||||
// of the files it includes
|
||||
if (lineCntr < 10) {
|
||||
static char* pDependStr = "//{{NO_DEPENDENCIES}}";
|
||||
if (strncmp(a, pDependStr, strlen(pDependStr)) == 0) {
|
||||
noDependMap[m_pathName] = 0; // add it to the noDependMap
|
||||
break; // no need for further processing of this file
|
||||
}
|
||||
}
|
||||
++lineCntr;
|
||||
// have to handle a variety of legal syntaxes that we find in our source files:
|
||||
// #include
|
||||
// # include
|
||||
// #include
|
||||
// if the first non-whitespace char is a '#', consider this line
|
||||
pTemp = a;
|
||||
pTemp += strspn(pTemp, " \t"); // skip whitespace
|
||||
if (*pTemp == '#') {
|
||||
++pTemp; // skip the '#'
|
||||
pTemp += strspn(pTemp, " \t"); // skip more whitespace
|
||||
if( !strncmp(pTemp, "include", 7) ){
|
||||
pTemp += 7; // skip the "include"
|
||||
pTemp += strspn(pTemp, " \t"); // skip more whitespace
|
||||
bSystem = (*pTemp == '<'); // mark if it's a system include or not
|
||||
// forget system files -- we just have to search all the paths
|
||||
// every time and never find them! This change alone speeds a full
|
||||
// depend run on my system from 5 minutes to 3:15
|
||||
// if (bSystem || (*pTemp == '"')) {
|
||||
if (*pTemp == '"') {
|
||||
LPSTR pStart = pTemp + 1; // mark the start of the string
|
||||
pTemp = pStart + strcspn(pStart, ">\" "); // find the end of the string
|
||||
*pTemp = 0; // terminate the string
|
||||
|
||||
// construct the full pathname from the path part of the
|
||||
// source file and the name listed here
|
||||
fullName = srcPath;
|
||||
fullName += pStart;
|
||||
CFileRecord *pAddMe = AddFile( pStart, fullName, bSystem );
|
||||
if (pAddMe) {
|
||||
m_includes.Add(pAddMe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
delete [] a;
|
||||
}
|
||||
|
||||
void PrintIncludes(){
|
||||
int i = 0;
|
||||
while( i < m_includes.GetSize() ){
|
||||
CFileRecord *pRec = (CFileRecord*) m_includes[i];
|
||||
|
||||
// Don't write out files that don't exist or are not in the namespace
|
||||
// of the programs using it (netscape_AppletMozillaContext.h doesn't
|
||||
// mix well with 16 bits).
|
||||
// Also don't write out files that are in the noDependMap
|
||||
void* lookupJunk;
|
||||
if( !pRec->m_bVisited && pRec->m_pathName.GetLength() != 0 && !noDependMap.Lookup(pRec->m_pathName, lookupJunk)) {
|
||||
|
||||
// not supposed to have a file in the list that doesn't exist
|
||||
ASSERT(FileExists(pRec->m_pathName));
|
||||
|
||||
CString csOutput;
|
||||
csOutput = pRec->m_pathName;
|
||||
FATName(csOutput);
|
||||
|
||||
fprintf(pAltFile, "\\\n %s ", (const char *) csOutput );
|
||||
|
||||
// mark this one as done so we don't do it more than once
|
||||
pRec->m_bVisited = TRUE;
|
||||
|
||||
pRec->PrintIncludes();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void PrintDepend(){
|
||||
CFileRecord *pRec;
|
||||
BOOL bFound;
|
||||
POSITION next;
|
||||
CString name;
|
||||
|
||||
// clear all the m_bVisisted flags so we can use it to keep track
|
||||
// of whether we've already output this file as a dependency
|
||||
next = fileMap.GetStartPosition();
|
||||
while( next ){
|
||||
fileMap.GetNextAssoc( next, name, *(void**)&pRec );
|
||||
pRec->m_bVisited = FALSE;
|
||||
}
|
||||
|
||||
char fname[_MAX_FNAME];
|
||||
|
||||
if (pRec->m_pathName.GetLength() != 0) {
|
||||
if( bSimple ){
|
||||
fprintf(pAltFile, "\n\n\n%s:\t", m_pathName );
|
||||
}
|
||||
else {
|
||||
CString csOutput;
|
||||
csOutput = m_pathName;
|
||||
FATName(csOutput);
|
||||
|
||||
_splitpath( csOutput, NULL, NULL, fname, NULL );
|
||||
|
||||
fprintf(pAltFile, "\n\n\n$(OUTDIR)\\%s.obj: %s ", fname, (const char*) csOutput );
|
||||
}
|
||||
m_bVisited = TRUE; // mark it as done so we won't do it again
|
||||
PrintIncludes();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static CString NormalizeFileName( const char* pName ){
|
||||
return CString(pName);
|
||||
}
|
||||
|
||||
static CFileRecord* FindFileRecord( const char *pName ){
|
||||
CFileRecord* pRec = NULL;
|
||||
CString name(pName);
|
||||
FixPathName(name);
|
||||
fileMap.Lookup(name, (void*&)pRec);
|
||||
return(pRec);
|
||||
}
|
||||
public:
|
||||
static CFileRecord* AddFile( const char* pShortName, const char* pFullName, BOOL bSystem = FALSE,
|
||||
BOOL bSource = FALSE ){
|
||||
|
||||
char fullName[_MAX_PATH];
|
||||
BOOL bFound = FALSE;
|
||||
CString foundName;
|
||||
CString fixedShortName;
|
||||
CString s;
|
||||
|
||||
// normalize the name
|
||||
fixedShortName = pShortName;
|
||||
FixPathName(fixedShortName);
|
||||
pShortName = fixedShortName;
|
||||
|
||||
// if it is source, we might be getting an obj file. If we do,
|
||||
// convert it to a c or c++ file.
|
||||
if( bSource && (strcmp(GetExt(pShortName),".obj") == 0) ){
|
||||
char path_buffer[_MAX_PATH];
|
||||
char fname[_MAX_FNAME] = "";
|
||||
CString s;
|
||||
|
||||
_splitpath( pShortName, NULL, NULL, fname, NULL );
|
||||
if( FileExists( s = CString(fname) + ".cpp") ){
|
||||
pShortName = s;
|
||||
pFullName = s;
|
||||
}
|
||||
else if( FileExists( s = CString(fname) + ".c" ) ){
|
||||
pShortName = s;
|
||||
pFullName = s;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// if pFullName was not constructed, construct it here based on the current directory
|
||||
if (!pFullName) {
|
||||
_AfxFullPath(fullName, pShortName);
|
||||
pFullName = fullName;
|
||||
}
|
||||
|
||||
// first check to see if we already have this exact file
|
||||
CFileRecord *pRec = FindFileRecord(pFullName);
|
||||
|
||||
// if not found and not a source file check the header list --
|
||||
// all files we've found in include directories are in the includeMap.
|
||||
// we can save gobs of time by getting it from there
|
||||
if (!pRec && !bSource)
|
||||
includeMap.Lookup(fixedShortName, (void*&)pRec);
|
||||
|
||||
if (!pRec) {
|
||||
// not in one of our lists, start scrounging on disk
|
||||
|
||||
// check the fullname first
|
||||
if (FileExists(pFullName)) {
|
||||
foundName = pFullName;
|
||||
bFound = TRUE;
|
||||
}
|
||||
else {
|
||||
// if still not found, search the include paths
|
||||
int i = 0;
|
||||
while( i < includeDirectories.GetSize() ){
|
||||
if( FileExists( includeDirectories[i] + pShortName ) ){
|
||||
foundName = includeDirectories[i] + pShortName;
|
||||
bFound = TRUE;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// we found it
|
||||
bFound = TRUE;
|
||||
}
|
||||
|
||||
// source files are not allowed to be missing
|
||||
if (bSource && !pRec && !bFound) {
|
||||
fprintf(stderr, "Source file: %s doesn't exist\n", pFullName);
|
||||
mainReturn = -1; // exit with an error, don't write out the results
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (!pRec && !bFound && !bSystem) {
|
||||
fprintf(stderr, "Header not found: %s (%s)\n", pShortName, pFullName);
|
||||
}
|
||||
#endif
|
||||
|
||||
// if none of the above logic found it already in the list,
|
||||
// must be a new file, add it to the list
|
||||
if (bFound && (pRec == NULL)) {
|
||||
pRec = new CFileRecord( pShortName, foundName, bSystem, bSource);
|
||||
|
||||
// if this one isn't a source file add it to the includeMap
|
||||
// for performance reasons (so we can find it there next time rather
|
||||
// than having to search the file system again)
|
||||
if (!bSource) {
|
||||
includeMap[pShortName] = pRec;
|
||||
}
|
||||
}
|
||||
return pRec;
|
||||
}
|
||||
|
||||
|
||||
static void PrintDependancies(){
|
||||
CFileRecord *pRec;
|
||||
BOOL bFound;
|
||||
POSITION next;
|
||||
CString name;
|
||||
|
||||
// use orderedFileNames to preserve order
|
||||
for (int pos = 0; pos < orderedFileNames.GetSize(); pos++) {
|
||||
pRec = FindFileRecord(orderedFileNames[pos]);
|
||||
if(pRec && pRec->m_bSource ){
|
||||
pRec->PrintDepend();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PrintDepend2(){
|
||||
CFileRecord *pRec;
|
||||
int i;
|
||||
|
||||
if( m_includes.GetSize() != 0 ){
|
||||
fprintf(pAltFile, "\n\n\n%s: \\\n",m_pathName );
|
||||
i = 0;
|
||||
while( i < m_includes.GetSize() ){
|
||||
pRec = (CFileRecord*) m_includes[i];
|
||||
fprintf(pAltFile, "\t\t\t%s\t\\\n",pRec->m_pathName );
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintDependancies2(){
|
||||
CFileRecord *pRec;
|
||||
BOOL bFound;
|
||||
POSITION next;
|
||||
CString name;
|
||||
|
||||
next = fileMap.GetStartPosition();
|
||||
while( next ){
|
||||
fileMap.GetNextAssoc( next, name, *(void**)&pRec );
|
||||
pRec->PrintDepend2();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void PrintTargets(const char *pMacroName, const char *pDelimeter){
|
||||
CFileRecord *pRec;
|
||||
BOOL bFound;
|
||||
POSITION next;
|
||||
CString name;
|
||||
|
||||
BOOL bNeedDelimeter = FALSE;
|
||||
fprintf(pAltFile, "%s = ", pMacroName);
|
||||
|
||||
// use orderedFileNames to preserve target order
|
||||
for (int pos = 0; pos < orderedFileNames.GetSize(); pos++) {
|
||||
pRec = FindFileRecord(orderedFileNames[pos]);
|
||||
ASSERT(pRec);
|
||||
|
||||
if( pRec && pRec->m_bSource && pRec->m_pathName.GetLength() != 0){
|
||||
char fname[_MAX_FNAME];
|
||||
|
||||
CString csOutput;
|
||||
csOutput = pRec->m_pathName;
|
||||
FATName(csOutput);
|
||||
|
||||
_splitpath( csOutput, NULL, NULL, fname, NULL );
|
||||
|
||||
if(bNeedDelimeter) {
|
||||
fprintf(pAltFile, "%s\n", pDelimeter);
|
||||
bNeedDelimeter = FALSE;
|
||||
}
|
||||
|
||||
fprintf(pAltFile, " $(OUTDIR)\\%s.obj ", fname );
|
||||
bNeedDelimeter = TRUE;
|
||||
}
|
||||
}
|
||||
fprintf(pAltFile, "\n\n\n");
|
||||
}
|
||||
|
||||
static CString DirDefine( const char *pPath ){
|
||||
char path_buffer[_MAX_PATH];
|
||||
char dir[_MAX_DIR] = "";
|
||||
char dir2[_MAX_DIR] = "";
|
||||
char fname[_MAX_FNAME] = "";
|
||||
char ext[_MAX_EXT] = "";
|
||||
CString s;
|
||||
|
||||
_splitpath( pPath, 0, dir, 0, ext );
|
||||
|
||||
BOOL bDone = FALSE;
|
||||
|
||||
while( dir && !bDone){
|
||||
// remove the trailing slash
|
||||
dir[ strlen(dir)-1] = 0;
|
||||
_splitpath( dir, 0, dir2, fname, 0 );
|
||||
if( strcmp( fname, "SRC" ) == 0 ){
|
||||
strcpy( dir, dir2 );
|
||||
}
|
||||
else {
|
||||
bDone = TRUE;
|
||||
}
|
||||
}
|
||||
s = CString(fname) + "_" + (ext+1);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
static void PrintSources(){
|
||||
int i;
|
||||
CString dirName, newDirName;
|
||||
|
||||
for( i=0; i< orderedFileNames.GetSize(); i++ ){
|
||||
newDirName= DirDefine( orderedFileNames[i] );
|
||||
if( newDirName != dirName ){
|
||||
fprintf( pAltFile, "\n\n\nFILES_%s= $(FILES_%s) \\",
|
||||
(const char*)newDirName, (const char*)newDirName );
|
||||
dirName = newDirName;
|
||||
}
|
||||
fprintf( pAltFile, "\n\t%s^", (const char*)orderedFileNames[i] );
|
||||
}
|
||||
}
|
||||
|
||||
static CString SourceDirName( const char *pPath, BOOL bFileName){
|
||||
char path_buffer[_MAX_PATH];
|
||||
char drive[_MAX_DRIVE] = "";
|
||||
char dir[_MAX_DIR] = "";
|
||||
char fname[_MAX_FNAME] = "";
|
||||
char ext[_MAX_EXT] = "";
|
||||
CString s;
|
||||
|
||||
_splitpath( pPath, drive, dir, fname, ext );
|
||||
|
||||
s = CString(drive) + dir;
|
||||
if( bFileName ){
|
||||
s += CString("FNAME") + ext;
|
||||
}
|
||||
else {
|
||||
// remove the trailing slash
|
||||
s = s.Left( s.GetLength() - 1 );
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
static CString GetExt( const char *pPath){
|
||||
char ext[_MAX_EXT] = "";
|
||||
|
||||
_splitpath( pPath, 0,0,0, ext );
|
||||
|
||||
CString s = CString(ext);
|
||||
s.MakeLower();
|
||||
return s;
|
||||
}
|
||||
|
||||
static void PrintBuildRules(){
|
||||
int i;
|
||||
CString dirName;
|
||||
|
||||
CMapStringToPtr dirList;
|
||||
|
||||
for( i=0; i< orderedFileNames.GetSize(); i++ ){
|
||||
dirList[ SourceDirName(orderedFileNames[i], TRUE) ]= 0;
|
||||
}
|
||||
|
||||
POSITION next;
|
||||
CString name;
|
||||
void *pVal;
|
||||
|
||||
next = dirList.GetStartPosition();
|
||||
while( next ){
|
||||
dirList.GetNextAssoc( next, name, pVal);
|
||||
CString dirDefine = DirDefine( name );
|
||||
CString ext = GetExt( name );
|
||||
name = SourceDirName( name, FALSE );
|
||||
CString response = dirDefine.Left(8);
|
||||
|
||||
fprintf( pAltFile,
|
||||
"\n\n\n{%s}%s{$(OUTDIR)}.obj:\n"
|
||||
"\t@rem <<$(OUTDIR)\\%s.cl\n"
|
||||
"\t$(CFILEFLAGS)\n"
|
||||
"\t$(CFLAGS_%s)\n"
|
||||
"<<KEEP\n"
|
||||
"\t$(CPP) @$(OUTDIR)\\%s.cl %%s\n",
|
||||
(const char*)name,
|
||||
(const char*)ext,
|
||||
(const char*)response,
|
||||
(const char*)dirDefine,
|
||||
(const char*)response
|
||||
);
|
||||
|
||||
fprintf( pAltFile,
|
||||
"\n\n\nBATCH_%s:\n"
|
||||
"\t@rem <<$(OUTDIR)\\%s.cl\n"
|
||||
"\t$(CFILEFLAGS)\n"
|
||||
"\t$(CFLAGS_%s)\n"
|
||||
"\t$(FILES_%s)\n"
|
||||
"<<KEEP\n"
|
||||
"\t$(TIMESTART)\n"
|
||||
"\t$(CPP) @$(OUTDIR)\\%s.cl\n"
|
||||
"\t$(TIMESTOP)\n",
|
||||
(const char*)dirDefine,
|
||||
(const char*)response,
|
||||
(const char*)dirDefine,
|
||||
(const char*)dirDefine,
|
||||
(const char*)response
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Loop through one more time and build the final batch build
|
||||
// rule
|
||||
//
|
||||
fprintf( pAltFile,
|
||||
"\n\n\nBATCH_BUILD_OBJECTS:\t\t\\\n");
|
||||
|
||||
next = dirList.GetStartPosition();
|
||||
while( next ){
|
||||
dirList.GetNextAssoc( next, name, pVal);
|
||||
CString dirDefine = DirDefine( name );
|
||||
|
||||
fprintf( pAltFile,
|
||||
"\tBATCH_%s\t\t\\\n", dirDefine );
|
||||
}
|
||||
|
||||
fprintf( pAltFile,
|
||||
"\n\n");
|
||||
}
|
||||
|
||||
|
||||
static void ProcessFiles(){
|
||||
CFileRecord *pRec;
|
||||
BOOL bFound;
|
||||
POSITION next;
|
||||
CString name;
|
||||
|
||||
// search all the files for headers, adding each one to the list when found
|
||||
// rather than do it recursively, it simple marks each one it's done
|
||||
// and starts over, stopping only when all are marked as done
|
||||
|
||||
next = fileMap.GetStartPosition();
|
||||
while( next ){
|
||||
fileMap.GetNextAssoc( next, name, *(void**)&pRec );
|
||||
if( pRec->m_bVisited == FALSE && pRec->m_bSystem == FALSE ){
|
||||
// mark this file as already done so we don't read it again
|
||||
// to find its headers
|
||||
pRec->m_bVisited = TRUE;
|
||||
pRec->ProcessFile();
|
||||
// Start searching from the beginning again
|
||||
// because ProcessFile may have added new files
|
||||
// and changed the GetNextAssoc order
|
||||
next = fileMap.GetStartPosition();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
CMapStringToPtr CFileRecord::fileMap; // contains all allocated CFileRecords
|
||||
CStringArray CFileRecord::orderedFileNames;
|
||||
CMapStringToPtr CFileRecord::includeMap; // pointers to CFileRecords in fileMap
|
||||
CMapStringToPtr CFileRecord::noDependMap; // no data, just an index
|
||||
|
||||
int main( int argc, char** argv ){
|
||||
int i = 1;
|
||||
char *pStr;
|
||||
static int iRecursion = 0; // Track levels of recursion.
|
||||
static CString outputFileName;
|
||||
|
||||
// Entering.
|
||||
iRecursion++;
|
||||
|
||||
while( i < argc ){
|
||||
if( argv[i][0] == '-' || argv[i][0] == '/' ){
|
||||
switch( argv[i][1] ){
|
||||
|
||||
case 'i':
|
||||
case 'I':
|
||||
if( argv[i][2] != 0 ){
|
||||
pStr = &(argv[i][2]);
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
pStr = argv[i];
|
||||
}
|
||||
if( pStr == 0 || *pStr == '-' || *pStr == '/' ){
|
||||
goto usage;
|
||||
}
|
||||
else {
|
||||
AddIncludeDirectory( pStr );
|
||||
}
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
case 'F':
|
||||
if( argv[i][2] != 0 ){
|
||||
pStr = &(argv[i][2]);
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
pStr = argv[i];
|
||||
}
|
||||
if( pStr == 0 || *pStr == '-' || *pStr == '/'){
|
||||
goto usage;
|
||||
}
|
||||
else {
|
||||
CStdioFile f;
|
||||
CString s;
|
||||
if( f.Open( pStr, CFile::modeRead ) ){
|
||||
while(f.ReadString(s)){
|
||||
s.TrimLeft();
|
||||
s.TrimRight();
|
||||
if( s.GetLength() ){
|
||||
CFileRecord::AddFile( s, NULL, FALSE, TRUE );
|
||||
}
|
||||
}
|
||||
f.Close();
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"makedep: file not found: %s", pStr );
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
if( argv[i][2] != 0 ){
|
||||
pStr = &(argv[i][2]);
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
pStr = argv[i];
|
||||
}
|
||||
if( pStr == 0 || *pStr == '-' || *pStr == '/'){
|
||||
goto usage;
|
||||
}
|
||||
else {
|
||||
CStdioFile f;
|
||||
CString s;
|
||||
outputFileName = pStr;
|
||||
if(!(pAltFile = fopen(pStr, "w+"))) {
|
||||
fprintf(stderr, "makedep: file not found: %s", pStr );
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case '1':
|
||||
if( argv[i][2] == '6') {
|
||||
b16 = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 's':
|
||||
case 'S':
|
||||
bSimple = TRUE;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case 'h':
|
||||
case 'H':
|
||||
case '?':
|
||||
usage:
|
||||
fprintf(stderr, "usage: makedep -I <dirname> -F <filelist> <filename>\n"
|
||||
" -I <dirname> Directory name, can be repeated\n"
|
||||
" -F <filelist> List of files to scan, one per line\n"
|
||||
" -O <outputFile> File to write output, default stdout\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
else if( argv[i][0] == '@' ){
|
||||
// file contains our commands.
|
||||
CStdioFile f;
|
||||
CString s;
|
||||
int iNewArgc = 0;
|
||||
char **apNewArgv = new char*[5000];
|
||||
memset(apNewArgv, 0, sizeof(apNewArgv));
|
||||
|
||||
// First one is always the name of the exe.
|
||||
apNewArgv[0] = argv[0];
|
||||
iNewArgc++;
|
||||
|
||||
const char *pTraverse;
|
||||
const char *pBeginArg;
|
||||
if( f.Open( &argv[i][1], CFile::modeRead ) ){
|
||||
while( iNewArgc < 5000 && f.ReadString(s) ) {
|
||||
// Scan the string for args, and do the right thing.
|
||||
pTraverse = (const char *)s;
|
||||
while(iNewArgc < 5000 && *pTraverse) {
|
||||
if(isspace(*pTraverse)) {
|
||||
pTraverse++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Extract to next space.
|
||||
pBeginArg = pTraverse;
|
||||
do {
|
||||
pTraverse++;
|
||||
}
|
||||
while(*pTraverse && !isspace(*pTraverse));
|
||||
apNewArgv[iNewArgc] = new char[pTraverse - pBeginArg + 1];
|
||||
memset(apNewArgv[iNewArgc], 0, pTraverse - pBeginArg + 1);
|
||||
strncpy(apNewArgv[iNewArgc], pBeginArg, pTraverse - pBeginArg);
|
||||
iNewArgc++;
|
||||
}
|
||||
}
|
||||
f.Close();
|
||||
}
|
||||
|
||||
// Recurse if needed.
|
||||
if(iNewArgc > 1) {
|
||||
main(iNewArgc, apNewArgv);
|
||||
}
|
||||
|
||||
// Free off the argvs (but not the very first one which we didn't allocate).
|
||||
while(iNewArgc > 1) {
|
||||
iNewArgc--;
|
||||
delete [] apNewArgv[iNewArgc];
|
||||
}
|
||||
delete [] apNewArgv;
|
||||
}
|
||||
else {
|
||||
CFileRecord::AddFile( argv[i], NULL, FALSE, TRUE );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
// Only of the very bottom level of recursion do we do this.
|
||||
if(iRecursion == 1) {
|
||||
|
||||
// only write the results out if no errors encountered
|
||||
if (mainReturn == 0) {
|
||||
CFileRecord::ProcessFiles();
|
||||
if( !bSimple ){
|
||||
CFileRecord::PrintTargets("OBJ_FILES", "\\");
|
||||
if(b16) {
|
||||
CFileRecord::PrintTargets("LINK_OBJS", "+\\");
|
||||
}
|
||||
else {
|
||||
CFileRecord::PrintTargets("LINK_OBJS", "^");
|
||||
}
|
||||
CFileRecord::PrintSources();
|
||||
CFileRecord::PrintBuildRules();
|
||||
}
|
||||
CFileRecord::PrintDependancies();
|
||||
}
|
||||
|
||||
if(pAltFile != stdout) {
|
||||
fclose(pAltFile);
|
||||
if (mainReturn != 0) {
|
||||
remove(outputFileName); // kill output file if returning an error
|
||||
}
|
||||
}
|
||||
}
|
||||
iRecursion--;
|
||||
|
||||
if (iRecursion == 0 )
|
||||
{
|
||||
// last time through -- clean up allocated CFileRecords!
|
||||
CFileRecord *pFRec;
|
||||
CString name;
|
||||
POSITION next;
|
||||
|
||||
next = CFileRecord::fileMap.GetStartPosition();
|
||||
while( next ){
|
||||
CFileRecord::fileMap.GetNextAssoc( next, name, *(void**)&pFRec );
|
||||
delete pFRec;
|
||||
}
|
||||
}
|
||||
|
||||
return mainReturn;
|
||||
}
|
||||
Binary file not shown.
@@ -1,137 +0,0 @@
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile for MOZILLA/CONFIG - various commands used by other makefiles
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
!error This makefile must be build using 32-bit tools
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of MOZILLA
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..
|
||||
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There is a subdirectory to process
|
||||
#// INSTALL_FILES - Files to be installed in the distribution area
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
GARBAGE = *.obj *.sbr *.pdb build_number nsBuildID.h
|
||||
|
||||
!ifdef MOZ_COVERAGE
|
||||
GARBAGE = $(GARBAGE) trace.dll trace.lib trace.exp
|
||||
!endif
|
||||
|
||||
EXPORTS = nsBuildID.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
!ifdef MOZILLA_OFFICIAL
|
||||
_BN_OFFICIAL=1
|
||||
!else
|
||||
_BN_OFFICIAL=
|
||||
!endif
|
||||
|
||||
# update build number from within make script
|
||||
build_number:
|
||||
$(PERL) -I. bdate.pl $@ $(_BN_OFFICIAL)
|
||||
|
||||
nsBuildID.h: build_number nsBuildID.h.in
|
||||
$(RM) $@
|
||||
$(PERL) -I. aboutime.pl $@ build_number nsBuildID.h.in
|
||||
|
||||
#// Rule to set the timebomb on official mozilla builds
|
||||
|
||||
|
||||
#//
|
||||
#// Rules to build make utils
|
||||
#//
|
||||
|
||||
#CFLAGS = /FR /Zi -MDd /W4
|
||||
CFLAGS = /O2 /GB /MD
|
||||
|
||||
makecopy.exe:: makecopy.cpp
|
||||
$(CC) $(CFLAGS) $**
|
||||
|
||||
mangle.exe:: mangle.c
|
||||
$(CC) $(CFLAGS) $**
|
||||
|
||||
mantomak.exe:: mantomak.c
|
||||
$(CC) $(CFLAGS) $**
|
||||
|
||||
bin2rc.exe:: bin2rc.c
|
||||
$(CC) $(CFLAGS) $**
|
||||
|
||||
makedep.exe:: makedep.cpp
|
||||
$(CC) -MT /O2 /GB $**
|
||||
|
||||
!ifdef MOZ_COVERAGE
|
||||
trace.dll:: trace.obj pldhash.obj
|
||||
$(LD) /nologo /debug /libpath:$(DIST)/lib /dll /out:$@ $** nspr4.lib imagehlp.lib
|
||||
|
||||
pldhash.obj:: $(DEPTH)/xpcom/ds/pldhash.c
|
||||
$(CC) /c /nologo /Od /Z7 /I$(DEPTH)/xpcom/ds /I$(DEPTH)/dist/include/nspr $**
|
||||
|
||||
trace.obj:: trace.cpp
|
||||
$(CC) /c /nologo /Od /Z7 /DMOZ_SRC=\"$(MOZ_SRC)\" /I$(DEPTH)/xpcom/ds /I$(DEPTH)/dist/include/nspr $**
|
||||
!endif
|
||||
|
||||
export:: \
|
||||
makecopy.exe \
|
||||
mangle.exe \
|
||||
mantomak.exe \
|
||||
bin2rc.exe \
|
||||
!ifndef NO_MFC
|
||||
makedep.exe \
|
||||
!endif
|
||||
build_number \
|
||||
nsBuildID.h \
|
||||
!ifdef MOZ_COVERAGE
|
||||
trace.dll \
|
||||
!endif
|
||||
$(NULL)
|
||||
!ifdef MOZ_COVERAGE
|
||||
$(MAKE_INSTALL) trace.dll $(DIST)/bin
|
||||
$(MAKE_INSTALL) trace.lib $(DIST)/lib
|
||||
$(MAKE_INSTALL) trace.dll $(DIST)/install
|
||||
$(MAKE_INSTALL) $(DIST)/bin/nspr4.dll $(DIST)/install
|
||||
!endif
|
||||
$(RM) $(DIST)\bin\chrome\chromelist.txt
|
||||
|
||||
#install::
|
||||
# $(RM) $(DIST)\bin\chrome\installed-chrome.txt
|
||||
|
||||
FORCE::
|
||||
@@ -1,140 +0,0 @@
|
||||
/* -*- 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 ***** */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
HANDLE hMangleFile;
|
||||
|
||||
void Usage(void)
|
||||
{
|
||||
fprintf(stderr, "MANGLE: <file>\n");
|
||||
}
|
||||
|
||||
BOOL MangleFile( const char *real_name, const char *mangle_name )
|
||||
{
|
||||
int len;
|
||||
DWORD dwWritten;
|
||||
char buffer[2048];
|
||||
|
||||
if( mangle_name && *mangle_name && strcmpi(real_name, mangle_name) ) {
|
||||
printf("Mangle: renaming %s to %s\n", real_name, mangle_name);
|
||||
|
||||
if( ! MoveFile(real_name, "X_MANGLE.TMP") ) {
|
||||
fprintf(stderr, "MANGLE: cannot rename %s to X_MANGLE.TMP\n",
|
||||
real_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( ! MoveFile("X_MANGLE.TMP", mangle_name) ) {
|
||||
MoveFile("X_MANGLE.TMP", real_name);
|
||||
fprintf(stderr, "MANGLE: cannot rename X_MANGLE.TMP to %s\n",
|
||||
mangle_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
len = sprintf(buffer, "mv %s %s\r\n", mangle_name, real_name);
|
||||
|
||||
if( (WriteFile( hMangleFile, buffer, len, &dwWritten, NULL ) == FALSE) ||
|
||||
(dwWritten != len) ) {
|
||||
fprintf(stderr, "MANGLE: error writing to UNMANGLE.BAT\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
WIN32_FIND_DATA find_data;
|
||||
HANDLE hFoundFile;
|
||||
|
||||
if( argc != 1 ) {
|
||||
Usage();
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
hMangleFile = CreateFile("unmangle.bat", /* name */
|
||||
GENERIC_READ|GENERIC_WRITE, /* access mode */
|
||||
0, /* share mode */
|
||||
NULL, /* security descriptor */
|
||||
CREATE_NEW, /* how to create */
|
||||
FILE_ATTRIBUTE_NORMAL, /* file attributes */
|
||||
NULL ); /* template file */
|
||||
|
||||
if( hMangleFile == INVALID_HANDLE_VALUE ) {
|
||||
if( GetLastError() == ERROR_FILE_EXISTS ) {
|
||||
fprintf(stderr, "MANGLE: UNMANGLE.BAT already exists\n");
|
||||
} else {
|
||||
fprintf(stderr, "MANGLE: cannot open UNMANGLE.BAT\n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if( (hFoundFile = FindFirstFile("*.*", &find_data)) == INVALID_HANDLE_VALUE ) {
|
||||
fprintf(stderr, "MANGLE: cannot read directory\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
do {
|
||||
if( !MangleFile(find_data.cFileName, find_data.cAlternateFileName) ) {
|
||||
fprintf(stderr, "MANGLE: cannot rename %s to %s\n",
|
||||
find_data.cFileName, find_data.cAlternateFileName );
|
||||
|
||||
FindClose( hFoundFile );
|
||||
CloseHandle( hMangleFile );
|
||||
return 1;
|
||||
}
|
||||
} while( FindNextFile(hFoundFile, &find_data) );
|
||||
FindClose( hFoundFile );
|
||||
|
||||
{
|
||||
int len;
|
||||
DWORD dwWritten;
|
||||
char buffer[255];
|
||||
|
||||
len = sprintf(buffer, "del unmangle.bat\r\n");
|
||||
WriteFile ( hMangleFile, buffer, len, &dwWritten, NULL );
|
||||
}
|
||||
CloseHandle( hMangleFile );
|
||||
|
||||
return 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user