Compare commits
890 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
142427b3e1 | ||
|
|
9c4d50eda3 | ||
|
|
f3c8419de8 | ||
|
|
d6524fbd26 | ||
|
|
4446b0fbad | ||
|
|
58ea5f88dc | ||
|
|
8ce30e9ff7 | ||
|
|
67230a3290 | ||
|
|
c413d62536 | ||
|
|
d1b19aa389 | ||
|
|
06048ae818 | ||
|
|
18e5b94615 | ||
|
|
df3d30acd9 | ||
|
|
02b58694bb | ||
|
|
4987bceb61 | ||
|
|
ae0196e2c3 | ||
|
|
04828032f6 | ||
|
|
e432943781 | ||
|
|
4a910a8037 | ||
|
|
0130423d93 | ||
|
|
ca757ff1b2 | ||
|
|
61777e9b8c | ||
|
|
dd672ae5cb | ||
|
|
3ac01ee6c4 | ||
|
|
c9e40f666d | ||
|
|
d6d8681874 | ||
|
|
41a305f52b | ||
|
|
af74766ead | ||
|
|
7bbbfd9a9b | ||
|
|
956868327c | ||
|
|
008bebd817 | ||
|
|
4963a064f1 | ||
|
|
d7e5c4054f | ||
|
|
6941fbaaf6 | ||
|
|
dbad00ae66 | ||
|
|
36e0f667d5 | ||
|
|
cfd154d46d | ||
|
|
efa4d17b92 | ||
|
|
92f0549dca | ||
|
|
d73c6d84bf | ||
|
|
a3aec92396 | ||
|
|
c9d480a6bf | ||
|
|
f356a574e7 | ||
|
|
69e733ea86 | ||
|
|
080407d92f | ||
|
|
819fc39f1e | ||
|
|
d40dcfa1cd | ||
|
|
fc3ba78aed | ||
|
|
c99aabf17c | ||
|
|
50e750d2e9 | ||
|
|
591610f211 | ||
|
|
7c53fec576 | ||
|
|
851a80d266 | ||
|
|
ff0c7a1925 | ||
|
|
afc91b76b0 | ||
|
|
88df12ddb6 | ||
|
|
9194d5bfcd | ||
|
|
d9d3ff0057 | ||
|
|
01e10b5087 | ||
|
|
464b16e621 | ||
|
|
4b08f52332 | ||
|
|
42938abf9b | ||
|
|
5e829b7a3a | ||
|
|
418d80197e | ||
|
|
bf0bb8d59a | ||
|
|
02c2283e11 | ||
|
|
85cbc8acda | ||
|
|
76eacbdc43 | ||
|
|
4358e7d827 | ||
|
|
0fd157fd16 | ||
|
|
346629f6e0 | ||
|
|
bb572efed4 | ||
|
|
619748ed1e | ||
|
|
df7f37d0eb | ||
|
|
ed8fad3fd9 | ||
|
|
00196ca439 | ||
|
|
b3826181db | ||
|
|
5ef79d571b | ||
|
|
e849458c1d | ||
|
|
6b4823429e | ||
|
|
d58df6445c | ||
|
|
4a14b75452 | ||
|
|
6590172641 | ||
|
|
ee9649bf2a | ||
|
|
07165f014f | ||
|
|
6841b0cf47 | ||
|
|
13e13ca862 | ||
|
|
d7c2701773 | ||
|
|
0a9c611dfd | ||
|
|
2cba3c45bd | ||
|
|
30a95e7f45 | ||
|
|
84a301c81a | ||
|
|
cd86b3a69b | ||
|
|
9ac2c07f52 | ||
|
|
74dc875a27 | ||
|
|
a1628abec3 | ||
|
|
3c758a06a3 | ||
|
|
344df747d5 | ||
|
|
21f39471f1 | ||
|
|
00699801d2 | ||
|
|
9b0723ec8d | ||
|
|
7f934f34f1 | ||
|
|
c621cb7719 | ||
|
|
c466b9a91a | ||
|
|
381ef6fe70 | ||
|
|
2b69eb9902 | ||
|
|
587a687ac6 | ||
|
|
cce1395876 | ||
|
|
244e30297f | ||
|
|
d917bf6b06 | ||
|
|
0ace809572 | ||
|
|
a9b8712aa5 | ||
|
|
aed345b2ff | ||
|
|
fb1b221378 | ||
|
|
7424bcee4b | ||
|
|
1fb1ba05ce | ||
|
|
3ba4861a3b | ||
|
|
36600462d1 | ||
|
|
87bada69fa | ||
|
|
e5448533bf | ||
|
|
3b435fe056 | ||
|
|
417f5084b4 | ||
|
|
7b2aa741aa | ||
|
|
39b8abc4cf | ||
|
|
f36e1d23ea | ||
|
|
d7370d23d2 | ||
|
|
992319f667 | ||
|
|
3c4f012480 | ||
|
|
443d4e9f56 | ||
|
|
91cb401324 | ||
|
|
5d21e676c6 | ||
|
|
2d0b2a82ef | ||
|
|
fd317a4092 | ||
|
|
8d23a7d1d4 | ||
|
|
baddb47c44 | ||
|
|
c129a1a923 | ||
|
|
09fa7edc8d | ||
|
|
aaa6417fb7 | ||
|
|
2ff52baa20 | ||
|
|
60c122ee15 | ||
|
|
59d50f3062 | ||
|
|
c66065b688 | ||
|
|
7e9f8c7bf8 | ||
|
|
174c1800cc | ||
|
|
2e8b363899 | ||
|
|
1f187b09ee | ||
|
|
4c88b328be | ||
|
|
863ab7fa6b | ||
|
|
13e0359c6e | ||
|
|
ce4729d8e9 | ||
|
|
9d40820937 | ||
|
|
7f2e96f0a3 | ||
|
|
73d4722706 | ||
|
|
e4b640887a | ||
|
|
6b60fe40c6 | ||
|
|
9d05a11ef0 | ||
|
|
b8cd305f89 | ||
|
|
8fc875cee8 | ||
|
|
d84140ead9 | ||
|
|
3fa0ef5129 | ||
|
|
8e5c8a0f10 | ||
|
|
05c132c342 | ||
|
|
923c8d32ef | ||
|
|
39b18cd2ca | ||
|
|
e70bc6b800 | ||
|
|
3bde58d970 | ||
|
|
a43f1ee299 | ||
|
|
f297068ec0 | ||
|
|
2ceebebb49 | ||
|
|
dfa10281ea | ||
|
|
7a739f4915 | ||
|
|
6aff0002fa | ||
|
|
d2ae02a855 | ||
|
|
210e9ed78b | ||
|
|
48abb8280f | ||
|
|
ecce8ad23a | ||
|
|
ca99f5d2e5 | ||
|
|
20ef149dcb | ||
|
|
7f0662a1ac | ||
|
|
978424ced0 | ||
|
|
1c38d016d5 | ||
|
|
88df625096 | ||
|
|
3213170d32 | ||
|
|
f551294e66 | ||
|
|
fb05f258e4 | ||
|
|
e1f89bf22e | ||
|
|
8aed7eb909 | ||
|
|
f10aeaad31 | ||
|
|
8e1c70dcaa | ||
|
|
8d242f24dd | ||
|
|
c9860f7b66 | ||
|
|
b65da876f7 | ||
|
|
4683fb4907 | ||
|
|
6ac2d342b3 | ||
|
|
4d2447d764 | ||
|
|
e6de1e0d5a | ||
|
|
c6e0c2f323 | ||
|
|
06615a580e | ||
|
|
e9777f25a4 | ||
|
|
23c5d5dd48 | ||
|
|
ca328aec72 | ||
|
|
896b7146e7 | ||
|
|
c918384805 | ||
|
|
bff63ac682 | ||
|
|
04ea6a967e | ||
|
|
9bda97786f | ||
|
|
3853d50eec | ||
|
|
2cb0dedbd1 | ||
|
|
5f4328767b | ||
|
|
2e88db37ad | ||
|
|
ab41bf00c4 | ||
|
|
1c6d890a5a | ||
|
|
3d1863c1b5 | ||
|
|
1e7415095c | ||
|
|
a5f38565fa | ||
|
|
9aa26648c9 | ||
|
|
f1759e0a96 | ||
|
|
f9bcbab5f3 | ||
|
|
4dd888353d | ||
|
|
550fa0a160 | ||
|
|
7bcd259821 | ||
|
|
5005f4aa1d | ||
|
|
7e7a238255 | ||
|
|
9cc398e939 | ||
|
|
b75a28ec15 | ||
|
|
881d065220 | ||
|
|
fc839cb2ff | ||
|
|
20d2012fc3 | ||
|
|
174a33beb3 | ||
|
|
2c489d7741 | ||
|
|
8d72f6f516 | ||
|
|
8787d37d5c | ||
|
|
f65624b242 | ||
|
|
d255bfa6f7 | ||
|
|
393ee9d3eb | ||
|
|
87070be7e3 | ||
|
|
27c91e2571 | ||
|
|
4f8186b17e | ||
|
|
414666ec90 | ||
|
|
f54ca35d1b | ||
|
|
258fe82db7 | ||
|
|
a2313b026c | ||
|
|
53182cc4cb | ||
|
|
a45de10024 | ||
|
|
f3d6931fc3 | ||
|
|
bcc541f3f2 | ||
|
|
3b168065d5 | ||
|
|
5009b0544e | ||
|
|
4b98d69c2f | ||
|
|
9ec40dbcac | ||
|
|
a9028b5c17 | ||
|
|
82fc160abe | ||
|
|
3b97a575d1 | ||
|
|
f5915ab83c | ||
|
|
04b507d286 | ||
|
|
45c87257ed | ||
|
|
ef6737d0cd | ||
|
|
13be594651 | ||
|
|
313e008f61 | ||
|
|
d828f858c9 | ||
|
|
6cfaecf972 | ||
|
|
aa469d860f | ||
|
|
fcd37f3a45 | ||
|
|
0bd444de5f | ||
|
|
2aa4aa78e2 | ||
|
|
5e9cec2cc5 | ||
|
|
3c244e6df0 | ||
|
|
17bb0799e0 | ||
|
|
40d644e432 | ||
|
|
e21c9637ae | ||
|
|
fd50e54a7d | ||
|
|
28568add4c | ||
|
|
d397513840 | ||
|
|
4034c3464b | ||
|
|
62d0be964d | ||
|
|
b258b71e07 | ||
|
|
c081efa460 | ||
|
|
ba5caa6d51 | ||
|
|
a237cb9cad | ||
|
|
057a154a6d | ||
|
|
4b9ab10527 | ||
|
|
ee9b689cb4 | ||
|
|
5314f76803 | ||
|
|
2f571a0393 | ||
|
|
dece627991 | ||
|
|
1e92e734d8 | ||
|
|
179193d173 | ||
|
|
07c892480a | ||
|
|
7e98a939fc | ||
|
|
48ef9904c1 | ||
|
|
cc19a4c2da | ||
|
|
dfa850931a | ||
|
|
a399452d20 | ||
|
|
f30c284063 | ||
|
|
2dd733cbaa | ||
|
|
fe0cd9f702 | ||
|
|
f2f4542c63 | ||
|
|
bc221a573e | ||
|
|
0c82921504 | ||
|
|
ddb70568e1 | ||
|
|
a994df7265 | ||
|
|
d018bf99c7 | ||
|
|
35e0b9b6ff | ||
|
|
7a689f5ccb | ||
|
|
179c1bcc0c | ||
|
|
25be08f236 | ||
|
|
52570a7f61 | ||
|
|
fd35e86ddb | ||
|
|
9e061d5e35 | ||
|
|
3e9c23e43b | ||
|
|
66336e8151 | ||
|
|
330bf08c9b | ||
|
|
a8fb423e44 | ||
|
|
5b072b030b | ||
|
|
5beccac1d2 | ||
|
|
6ad9367c24 | ||
|
|
5ec3795716 | ||
|
|
2870d44824 | ||
|
|
04ff884c5f | ||
|
|
b6d5743ccb | ||
|
|
f00038918c | ||
|
|
3fbfeb2de5 | ||
|
|
7e0ee6bb71 | ||
|
|
ce064f5af2 | ||
|
|
459f00ccb8 | ||
|
|
aa526e0314 | ||
|
|
684484fd76 | ||
|
|
7fa2a62103 | ||
|
|
e2112fa8d5 | ||
|
|
4753d65076 | ||
|
|
ecbb40b092 | ||
|
|
0fa9eef4b2 | ||
|
|
144d96f78c | ||
|
|
3e84087d50 | ||
|
|
2430c189fa | ||
|
|
4f8f24921f | ||
|
|
bad84aa608 | ||
|
|
317b8d4ca1 | ||
|
|
2eb64525ae | ||
|
|
a59f93266b | ||
|
|
f93bcae65b | ||
|
|
8fde48bcb2 | ||
|
|
cae99f6cc8 | ||
|
|
cf81a4457e | ||
|
|
379f4c63ec | ||
|
|
62780b0787 | ||
|
|
c320429f41 | ||
|
|
47b7fdb5e0 | ||
|
|
e80cff77f0 | ||
|
|
59ec4eba2a | ||
|
|
1899784afa | ||
|
|
c8e2bdb816 | ||
|
|
715f112bad | ||
|
|
ef02c08d4d | ||
|
|
7cfb41e9a0 | ||
|
|
1907883e02 | ||
|
|
08589058c2 | ||
|
|
f2a9dbe065 | ||
|
|
62f840adc3 | ||
|
|
c30fb72669 | ||
|
|
73fd876423 | ||
|
|
41f5739fba | ||
|
|
af9259e626 | ||
|
|
5cdcf0d237 | ||
|
|
c3ccdeed1d | ||
|
|
0e8be5ff43 | ||
|
|
5bf3647f46 | ||
|
|
388df73ac2 | ||
|
|
fa790523d9 | ||
|
|
3e7cd53cdc | ||
|
|
9ab700e4d6 | ||
|
|
d72cc065e2 | ||
|
|
48fb61d303 | ||
|
|
a7952d0929 | ||
|
|
cf889eed44 | ||
|
|
47ddc0d626 | ||
|
|
7bac3d2c1f | ||
|
|
40aa48f075 | ||
|
|
aec0d41b83 | ||
|
|
9c971ac4e7 | ||
|
|
fae8f7803e | ||
|
|
bab33cf034 | ||
|
|
d476daba71 | ||
|
|
378053bd48 | ||
|
|
046bbf52f9 | ||
|
|
6348635d3f | ||
|
|
69b608bbe4 | ||
|
|
0663a3f028 | ||
|
|
9a224f2b5c | ||
|
|
5d8ac68d3a | ||
|
|
a5522c204e | ||
|
|
b852a77a79 | ||
|
|
04e41002c5 | ||
|
|
db2f409ef4 | ||
|
|
839418991e | ||
|
|
ac00c9b62e | ||
|
|
79ed0bcff0 | ||
|
|
67e1a53ed3 | ||
|
|
3f6db319a7 | ||
|
|
ab5bc33585 | ||
|
|
424b2be50f | ||
|
|
74d42ec740 | ||
|
|
b73a9b9a34 | ||
|
|
102ceaadfe | ||
|
|
cfcc0a946d | ||
|
|
24e2e7f0d3 | ||
|
|
ed51cdfb57 | ||
|
|
a6e29b5c5e | ||
|
|
6d9b7b14ad | ||
|
|
7ba9e0baca | ||
|
|
6b033b78f5 | ||
|
|
d1cb6d3335 | ||
|
|
0d0e9bec5e | ||
|
|
5206d36a91 | ||
|
|
45a1b33f96 | ||
|
|
a4c60dbf42 | ||
|
|
e956487dd8 | ||
|
|
c82cf613a6 | ||
|
|
9d57163479 | ||
|
|
63285a2039 | ||
|
|
e7ed9b5b91 | ||
|
|
bc1c3dc2e4 | ||
|
|
07a34f7be5 | ||
|
|
a8d71f2550 | ||
|
|
e42277a2c2 | ||
|
|
a777f293e3 | ||
|
|
26848e99e4 | ||
|
|
42f60042eb | ||
|
|
9e662e50d1 | ||
|
|
101fe0ed01 | ||
|
|
28098c79d2 | ||
|
|
43fd687b7c | ||
|
|
ded24bfe2d | ||
|
|
ac363d5b54 | ||
|
|
bbc6f9d4c3 | ||
|
|
a6dfe7837a | ||
|
|
96a506a1d5 | ||
|
|
25bb20046b | ||
|
|
977ee9d8ea | ||
|
|
d06ea4d211 | ||
|
|
8bf88bd7da | ||
|
|
bde4826c24 | ||
|
|
b64bd9c74f | ||
|
|
2bde195c77 | ||
|
|
425e1581ae | ||
|
|
41a910d1b5 | ||
|
|
c57b97c8df | ||
|
|
858f4d1487 | ||
|
|
ec9da17ed0 | ||
|
|
b691e2b286 | ||
|
|
9746f7cc27 | ||
|
|
1434051f4e | ||
|
|
a07e399801 | ||
|
|
5d87098bd0 | ||
|
|
630059a74f | ||
|
|
1473486f23 | ||
|
|
37f8a6e00b | ||
|
|
ab5b0592a8 | ||
|
|
b31dd134f6 | ||
|
|
08f2724481 | ||
|
|
278cfbdb67 | ||
|
|
50ce0c4183 | ||
|
|
55f1d00c3b | ||
|
|
76db455351 | ||
|
|
fb39ac046e | ||
|
|
613c6755e9 | ||
|
|
fed8951e00 | ||
|
|
fef7ce9f76 | ||
|
|
a1942ebc94 | ||
|
|
b7a697bcf9 | ||
|
|
abf5f09a46 | ||
|
|
3813ccb15a | ||
|
|
95ea174d43 | ||
|
|
aede4d80e8 | ||
|
|
da23cd1f42 | ||
|
|
566b3f162e | ||
|
|
49b893c806 | ||
|
|
7851a6f38d | ||
|
|
1bc0c5e795 | ||
|
|
799fe056a8 | ||
|
|
71eec1caed | ||
|
|
2f3a8fb6c0 | ||
|
|
139a3d35bb | ||
|
|
e41fd0d978 | ||
|
|
f8c3617540 | ||
|
|
e3742734f0 | ||
|
|
45d84f88ab | ||
|
|
4ee4d52b2f | ||
|
|
b82c94383b | ||
|
|
d27abe5ed8 | ||
|
|
34f252f52e | ||
|
|
8ee4ed96b7 | ||
|
|
820337f75b | ||
|
|
13560e292e | ||
|
|
21498e0486 | ||
|
|
7a907c4448 | ||
|
|
0785d392e3 | ||
|
|
127dd659fa | ||
|
|
c029f00e12 | ||
|
|
285c19090e | ||
|
|
9a29428b39 | ||
|
|
77f09744ab | ||
|
|
dff4e97c80 | ||
|
|
cf6668cb7a | ||
|
|
179885d120 | ||
|
|
6c3cd6d428 | ||
|
|
8562fae08b | ||
|
|
cc60a94af6 | ||
|
|
1bb009dcf7 | ||
|
|
503b99c54e | ||
|
|
754bb38169 | ||
|
|
7ba10207a4 | ||
|
|
147afb922d | ||
|
|
4663b605ef | ||
|
|
a4b7bbd031 | ||
|
|
0193173e46 | ||
|
|
90c0ea63b1 | ||
|
|
5f6fc78706 | ||
|
|
62e3aa10c1 | ||
|
|
1327c80dd7 | ||
|
|
e1fb1fa6b7 | ||
|
|
b314172533 | ||
|
|
4eb87268bd | ||
|
|
3dff6922c2 | ||
|
|
c3a38c1704 | ||
|
|
2b412bffec | ||
|
|
3656939269 | ||
|
|
addb7a559e | ||
|
|
10af185abc | ||
|
|
14dd55a035 | ||
|
|
1a2d75fbe6 | ||
|
|
fe372028dc | ||
|
|
51338470b5 | ||
|
|
e3435d7ef9 | ||
|
|
37c5016c2f | ||
|
|
990fe86438 | ||
|
|
742ecf395f | ||
|
|
9706141b8f | ||
|
|
adeba18356 | ||
|
|
00f8c35614 | ||
|
|
1c21b2c18a | ||
|
|
93fdc2c89e | ||
|
|
3abc778f2c | ||
|
|
bd153fc68f | ||
|
|
461ddb2ca9 | ||
|
|
3926d2d30a | ||
|
|
4e68f5878a | ||
|
|
697f0ad054 | ||
|
|
2d648c1da0 | ||
|
|
66c9e3e1b4 | ||
|
|
fb14aff1f6 | ||
|
|
9f3c4c1021 | ||
|
|
4e47446be1 | ||
|
|
1bc876542c | ||
|
|
32594cd651 | ||
|
|
dc9465a521 | ||
|
|
74b58b7b3c | ||
|
|
675ef17d92 | ||
|
|
4c9d9d44a4 | ||
|
|
41f13dbf46 | ||
|
|
8df737b488 | ||
|
|
ea2cc3e0de | ||
|
|
ea31271ac1 | ||
|
|
72a502eee4 | ||
|
|
5aa145cc02 | ||
|
|
def7d1052c | ||
|
|
a3ac5a43b3 | ||
|
|
40d813699b | ||
|
|
ccce2a0641 | ||
|
|
632a0b3e1f | ||
|
|
8ac9da7bc8 | ||
|
|
534e1ae733 | ||
|
|
9e2db6bc40 | ||
|
|
9cac5233af | ||
|
|
0b25aa8ed5 | ||
|
|
f45c3e2b1f | ||
|
|
3774547367 | ||
|
|
2c1a46c70d | ||
|
|
b6446cad10 | ||
|
|
4d9e7fa8c1 | ||
|
|
3a60326ad5 | ||
|
|
e098ec7d46 | ||
|
|
e2a220ac3c | ||
|
|
3f426fcb67 | ||
|
|
3fbc4a1dba | ||
|
|
5f72cbb103 | ||
|
|
ebe7053526 | ||
|
|
981e4f39b2 | ||
|
|
6d5d90bd92 | ||
|
|
636ef25eef | ||
|
|
ba8e62841f | ||
|
|
d1d6994419 | ||
|
|
f83c10208e | ||
|
|
50310ba263 | ||
|
|
b3847fdeed | ||
|
|
29feeccf0d | ||
|
|
6b61e2dd2a | ||
|
|
38b33328e6 | ||
|
|
a6cb676d4a | ||
|
|
b61b0ca932 | ||
|
|
b81cfb2c4f | ||
|
|
eeeb44755a | ||
|
|
fa51d52578 | ||
|
|
133391be90 | ||
|
|
e0b0fa4f58 | ||
|
|
107c3cb70a | ||
|
|
81550aa6de | ||
|
|
8227efcaf1 | ||
|
|
005507c891 | ||
|
|
2ca4d1bf64 | ||
|
|
e371c2e93d | ||
|
|
8d2b56b1eb | ||
|
|
2529644e90 | ||
|
|
1a099167ae | ||
|
|
0638fafe66 | ||
|
|
e2e576e550 | ||
|
|
75ff0fc04d | ||
|
|
80bbf5d083 | ||
|
|
c46c86ca4b | ||
|
|
16cd4c5c4b | ||
|
|
784fdd4f37 | ||
|
|
e89d6d9d66 | ||
|
|
f6b57d956d | ||
|
|
474acdbff9 | ||
|
|
3a1d753344 | ||
|
|
111c671a21 | ||
|
|
7e75a897ca | ||
|
|
de1a86004d | ||
|
|
205a11d44b | ||
|
|
faf86fdf24 | ||
|
|
c5917d79c7 | ||
|
|
63b0bf0f30 | ||
|
|
82478d4ef2 | ||
|
|
2a9e7ec5f7 | ||
|
|
7e16e0624a | ||
|
|
e3f9b4dbbe | ||
|
|
0903241b8f | ||
|
|
779fe9cfaa | ||
|
|
f052915f54 | ||
|
|
0fa396938b | ||
|
|
92696623e0 | ||
|
|
e6db03054b | ||
|
|
eedc1f79ec | ||
|
|
5b36f29b76 | ||
|
|
96f400eb4c | ||
|
|
86a19e8e91 | ||
|
|
8cc6092a1c | ||
|
|
4d932d5e2d | ||
|
|
fbb1425ef5 | ||
|
|
5b08560047 | ||
|
|
4666e29fb7 | ||
|
|
f2199a504b | ||
|
|
ab5915c16c | ||
|
|
ccaa494e85 | ||
|
|
8983f4a186 | ||
|
|
03c98452be | ||
|
|
e50aa5ab88 | ||
|
|
d611f6b741 | ||
|
|
44cf222104 | ||
|
|
90c22d8edf | ||
|
|
7d417faaf4 | ||
|
|
c2f0aa53af | ||
|
|
1a2663c124 | ||
|
|
9ea3032fee | ||
|
|
3dff32d2ab | ||
|
|
65c2a46121 | ||
|
|
6848c2df6f | ||
|
|
c0c786b39f | ||
|
|
1ced64e0b4 | ||
|
|
094587aefd | ||
|
|
1b4ae2e3b5 | ||
|
|
b7aaef7e91 | ||
|
|
b5a0d80cd7 | ||
|
|
9bcc08df1a | ||
|
|
1510d5ff5a | ||
|
|
5246fc9cdd | ||
|
|
5fd1312ae0 | ||
|
|
b57c3fd6e5 | ||
|
|
0cbb9a7078 | ||
|
|
2cf645e8e8 | ||
|
|
50f6d7b677 | ||
|
|
65199d103a | ||
|
|
2ba1dbf9da | ||
|
|
38849c1328 | ||
|
|
26c40255aa | ||
|
|
7edb98743d | ||
|
|
6b8a12dd06 | ||
|
|
56c357911e | ||
|
|
d8caa6a980 | ||
|
|
ea10825c27 | ||
|
|
a8f4b3ed4a | ||
|
|
09133307a1 | ||
|
|
ae50fc4404 | ||
|
|
cff618f67d | ||
|
|
1d90b8624b | ||
|
|
6cf9c3b4ed | ||
|
|
226de66b81 | ||
|
|
89c6f11072 | ||
|
|
41dc9f9751 | ||
|
|
ee2508274e | ||
|
|
4bb68e5a34 | ||
|
|
e3b328a115 | ||
|
|
0dd3e189fc | ||
|
|
a694742522 | ||
|
|
d2f66f9bd0 | ||
|
|
8b12d794c5 | ||
|
|
2dff12433c | ||
|
|
332cfdb532 | ||
|
|
722a1dda04 | ||
|
|
0909a4ddbe | ||
|
|
9a8a28ee1a | ||
|
|
ab35a07f0e | ||
|
|
51133c3894 | ||
|
|
0f0d506928 | ||
|
|
8cf8814f8b | ||
|
|
06f14eae42 | ||
|
|
4f264f0359 | ||
|
|
80db7f58c7 | ||
|
|
04b3dee767 | ||
|
|
b6c0436c1b | ||
|
|
5954e0d71c | ||
|
|
50540049c1 | ||
|
|
2d882e527f | ||
|
|
ac12349a8a | ||
|
|
f7a5394904 | ||
|
|
af203533b3 | ||
|
|
41f42fc741 | ||
|
|
c694d12c93 | ||
|
|
f190644464 | ||
|
|
0b1b7c6618 | ||
|
|
98c2b7e11f | ||
|
|
a0441619dd | ||
|
|
7b1736ea9d | ||
|
|
673a338bf5 | ||
|
|
d3c91698bf | ||
|
|
ab20e881ce | ||
|
|
41fe5f47e1 | ||
|
|
73cf43cbc9 | ||
|
|
26058999b3 | ||
|
|
8f09dedb1e | ||
|
|
955ca21298 | ||
|
|
25b4452a12 | ||
|
|
5d5231fe8c | ||
|
|
d2291b5903 | ||
|
|
4c068a4a85 | ||
|
|
eded2546fc | ||
|
|
0c2ea7cc9b | ||
|
|
0b9a44a842 | ||
|
|
e81f2ea3be | ||
|
|
cacf87e962 | ||
|
|
c816d25e68 | ||
|
|
f318880898 | ||
|
|
2afa251b64 | ||
|
|
a6c802bd86 | ||
|
|
d32f820903 | ||
|
|
c38a47ea48 | ||
|
|
ad19c0209b | ||
|
|
3901893a3a | ||
|
|
d2d53fec7f | ||
|
|
8204ec5565 | ||
|
|
48538fe182 | ||
|
|
2abece1819 | ||
|
|
8018a8842f | ||
|
|
68a95b5b1a | ||
|
|
ef43a87ac0 | ||
|
|
0c2765511e | ||
|
|
1a0387f918 | ||
|
|
b9203e487a | ||
|
|
4f9b8443e2 | ||
|
|
dbd26ddee1 | ||
|
|
4d2dde73d7 | ||
|
|
6cbbe493dd | ||
|
|
8ff0a29f9d | ||
|
|
f30dc32503 | ||
|
|
a35a59d56b | ||
|
|
4d4c49cd24 | ||
|
|
aa1167e4d5 | ||
|
|
9e4bc6754a | ||
|
|
c6fa0be39b | ||
|
|
15a8a86b15 | ||
|
|
125a90e46b | ||
|
|
e9147cb7fb | ||
|
|
db5ba95f58 | ||
|
|
6666972bf4 | ||
|
|
ab8656d5d8 | ||
|
|
711a4fdacd | ||
|
|
156bb5415d | ||
|
|
0e7dd54081 | ||
|
|
88fe5d6979 | ||
|
|
4e3501d034 | ||
|
|
b390d74b9c | ||
|
|
fcc98ffe46 | ||
|
|
fd8866c411 | ||
|
|
0d3c91269b | ||
|
|
b952d3f4e6 | ||
|
|
186bd80ba0 | ||
|
|
e6b5811e7e | ||
|
|
344cafcb1b | ||
|
|
3a3805fd18 | ||
|
|
58102daf94 | ||
|
|
a717d959aa | ||
|
|
753c0b9285 | ||
|
|
ad4d974812 | ||
|
|
3fca56df23 | ||
|
|
b7cc1932f1 | ||
|
|
ff78e24ee3 | ||
|
|
c17b67399b | ||
|
|
284a9c4366 | ||
|
|
cd7b1e434d | ||
|
|
f9e0b122ae | ||
|
|
7e895d4590 | ||
|
|
6dd9212d16 | ||
|
|
0f038bbffc | ||
|
|
6e437d4188 | ||
|
|
b92dec7530 | ||
|
|
8b54d6503a | ||
|
|
2abb801f3e | ||
|
|
05102e98ab | ||
|
|
758c5bbfeb | ||
|
|
b3593f0ffe | ||
|
|
b34d9fb88e | ||
|
|
4b4096857f | ||
|
|
497e63bfb6 | ||
|
|
e756140e1d | ||
|
|
a028c4edba | ||
|
|
1b3e0e6478 | ||
|
|
6b693d7571 | ||
|
|
838c2851da | ||
|
|
b4237a8200 | ||
|
|
de109f9f97 | ||
|
|
acf31bb885 | ||
|
|
74659e6121 | ||
|
|
dc62c29af0 | ||
|
|
18af6baedd | ||
|
|
8323a701e8 | ||
|
|
9435671d8d | ||
|
|
1054ea2519 | ||
|
|
ba9bd7d41e | ||
|
|
18b10638be | ||
|
|
2298aee369 | ||
|
|
b6b18b0693 | ||
|
|
b887d3147e | ||
|
|
459deb4288 | ||
|
|
f73c666f0e | ||
|
|
86f7987e13 | ||
|
|
82667f5618 | ||
|
|
179f4ddabb | ||
|
|
39af56c6f7 | ||
|
|
0150bac422 | ||
|
|
23e1521a6b | ||
|
|
e4df5c7fd0 | ||
|
|
ad91dcc6e1 | ||
|
|
d4b6ece24b | ||
|
|
67915fe8c8 | ||
|
|
611b8f48d6 | ||
|
|
15c01ed310 | ||
|
|
baac16b5d2 | ||
|
|
e70a91311f | ||
|
|
472dade93a | ||
|
|
3b567d3eae | ||
|
|
4ce89f203d | ||
|
|
1166db3436 | ||
|
|
77b5ac28e6 | ||
|
|
919d321d4a | ||
|
|
689337eb8c | ||
|
|
40c0a8d210 | ||
|
|
bdd4f911e9 | ||
|
|
ee60606a04 | ||
|
|
34fe62ba53 | ||
|
|
5882ea5643 | ||
|
|
7b98e5f2f1 | ||
|
|
387e8ed756 | ||
|
|
1c33889762 | ||
|
|
0eab7bd2a5 | ||
|
|
ef4c050e35 | ||
|
|
62d7f3d59f | ||
|
|
6ee243d0d5 | ||
|
|
e29d969631 | ||
|
|
b06dcb45c0 | ||
|
|
a8ef46888e | ||
|
|
343bb22b5c | ||
|
|
81174cffa7 | ||
|
|
580054380c | ||
|
|
564f7067f7 | ||
|
|
862ce4807c | ||
|
|
ef90cc74e4 | ||
|
|
1b039a1be6 | ||
|
|
60f3104eb6 | ||
|
|
4c3a73658c | ||
|
|
996aaf6345 |
@@ -1,22 +0,0 @@
|
||||
Mesa 3-D graphics library
|
||||
Version: 6.2
|
||||
|
||||
Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
|
||||
The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
Copyright 2000-2004 The Apache Software Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
diff -rc ../boost-coroutine/boost/coroutine/coroutine.hpp boost-coroutine/boost/coroutine/coroutine.hpp
|
||||
*** ../boost-coroutine/boost/coroutine/coroutine.hpp Wed Apr 29 14:41:05 2009
|
||||
--- boost-coroutine/boost/coroutine/coroutine.hpp Wed Apr 22 09:35:22 2009
|
||||
***************
|
||||
*** 28,33 ****
|
||||
--- 28,36 ----
|
||||
|
||||
#ifndef BOOST_COROUTINE_COROUTINE_HPP_20060512
|
||||
#define BOOST_COROUTINE_COROUTINE_HPP_20060512
|
||||
+ // On Linux systems, use native swapcontext() et al. rather than
|
||||
+ // Boost.Coroutine homebrew assembler
|
||||
+ #define BOOST_COROUTINE_NO_ASM
|
||||
// default_context_impl.hpp must be first for weird Apple bug
|
||||
#include <boost/coroutine/detail/default_context_impl.hpp>
|
||||
#include <cstddef>
|
||||
diff -rc ../boost-coroutine/boost/coroutine/future.hpp boost-coroutine/boost/coroutine/future.hpp
|
||||
*** ../boost-coroutine/boost/coroutine/future.hpp Wed Apr 29 14:41:05 2009
|
||||
--- boost-coroutine/boost/coroutine/future.hpp Wed Apr 22 09:35:26 2009
|
||||
***************
|
||||
*** 33,38 ****
|
||||
--- 33,41 ----
|
||||
#ifndef BOOST_COROUTINE_WAIT_MAX
|
||||
#define BOOST_COROUTINE_WAIT_MAX 10
|
||||
#endif
|
||||
+ // On Linux systems, use native swapcontext() et al. rather than
|
||||
+ // Boost.Coroutine homebrew assembler
|
||||
+ #define BOOST_COROUTINE_NO_ASM
|
||||
// default_context_impl.hpp must be first for weird Apple bug
|
||||
#include <boost/coroutine/detail/default_context_impl.hpp>
|
||||
#include <boost/none.hpp>
|
||||
diff -u -r old/boost/coroutine/detail/coroutine_impl.hpp new/boost/coroutine/detail/coroutine_impl.hpp
|
||||
--- old/boost/coroutine/detail/coroutine_impl.hpp 2009-10-20 17:10:02.000000000 +0100
|
||||
+++ new/boost/coroutine/detail/coroutine_impl.hpp 2009-10-20 19:22:11.000000000 +0100
|
||||
@@ -56,7 +56,7 @@
|
||||
typedef ContextImpl context_impl;
|
||||
typedef CoroutineType coroutine_type;
|
||||
typedef coroutine_impl<coroutine_type, context_impl> type;
|
||||
- typedef context_base<context_impl> context_base;
|
||||
+ typedef context_base<context_impl> context_base_type;
|
||||
typedef typename coroutine_type::arg_slot_type arg_slot_type;
|
||||
typedef typename coroutine_type::result_type result_type;
|
||||
typedef typename coroutine_type::result_slot_type result_slot_type;
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
template<typename DerivedType>
|
||||
coroutine_impl(DerivedType * this_, std::ptrdiff_t stack_size) :
|
||||
- context_base(*this_, stack_size),
|
||||
+ context_base_type(*this_, stack_size),
|
||||
m_arg(0),
|
||||
m_result(0){}
|
||||
|
||||
diff -u -r old/boost/coroutine/detail/posix_utility.hpp new/boost/coroutine/detail/posix_utility.hpp
|
||||
--- old/boost/coroutine/detail/posix_utility.hpp 2009-04-24 21:30:44.000000000 +0100
|
||||
+++ new/boost/coroutine/detail/posix_utility.hpp 2009-10-20 19:21:27.000000000 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
+#include <cstring>
|
||||
#include <boost/type_traits.hpp>
|
||||
#if defined(_POSIX_MAPPED_FILES) && _POSIX_MAPPED_FILES > 0
|
||||
#include <sys/mman.h>
|
||||
@@ -1,21 +0,0 @@
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Portions of this software are copyright (c) 2003 The FreeType
|
||||
Project (www.freetype.org). All rights reserved.
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
http://www.gnu.org/copyleft/lgpl.html
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, .this License. refers to version 3 of the GNU Lesser General Public License, and the .GNU GPL. refers to version 3 of the GNU General Public License.
|
||||
|
||||
.The Library. refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
|
||||
|
||||
An .Application. is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
|
||||
|
||||
A .Combined Work. is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the .Linked Version..
|
||||
|
||||
The .Minimal Corresponding Source. for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
|
||||
|
||||
The .Corresponding Application Code. for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
|
||||
|
||||
* a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
|
||||
* b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
|
||||
|
||||
* a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
|
||||
* b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
|
||||
|
||||
* a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
|
||||
* b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
||||
* c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
|
||||
* d) Do one of the following:
|
||||
o 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||
o 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
|
||||
* e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
|
||||
|
||||
* a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
|
||||
* b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License .or any later version. applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
||||
|
||||
LGPL v 2.1
|
||||
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
* a) The modified work must itself be a software library.
|
||||
* b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
|
||||
* c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
|
||||
* d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
* a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
|
||||
* b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
|
||||
* c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
|
||||
* d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
|
||||
* e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
|
||||
|
||||
* a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
|
||||
* b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the library's name and an idea of what it does.
|
||||
Copyright (C) year name of author
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in
|
||||
the library `Frob' (a library for tweaking knobs) written
|
||||
by James Random Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
http://nyctergatis.com/jpeglib/
|
||||
|
||||
The license below is known as the modified BSD license, with an additional reference to the Independent JPEG Group to comply with its terms. It applies to the source code written specifically for the Palm, not to the work of the Independent JPEG Group (see the remark below).
|
||||
|
||||
Copyright (c) 2003, Yves Piguet.
|
||||
All rights reserved.
|
||||
Based on the work of the Independent JPEG Group.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Yves Piguet nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
The json-cpp library and this documentation are in Public Domain.
|
||||
Retrieved from http://jsoncpp.sourceforge.net/ on 2009-09-04.
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
This copy of the libpng notices is provided for your convenience. In case of
|
||||
any discrepancy between this copy and the notices in the file png.h that is
|
||||
included in the libpng distribution, the latter shall prevail.
|
||||
|
||||
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.35, February 14, 2009, are
|
||||
Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
|
||||
Cosmin Truta
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
|
||||
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
|
||||
Simon-Pierre Cadieux
|
||||
Eric S. Raymond
|
||||
Gilles Vollant
|
||||
|
||||
and with the following additions to the disclaimer:
|
||||
|
||||
There is no warranty against interference with your enjoyment of the
|
||||
library or against infringement. There is no warranty that our
|
||||
efforts or the library will fulfill any of your particular purposes
|
||||
or needs. This library is provided with all faults, and the entire
|
||||
risk of satisfactory quality, performance, accuracy, and effort is with
|
||||
the user.
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
||||
Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-0.96,
|
||||
with the following individuals added to the list of Contributing Authors:
|
||||
|
||||
Tom Lane
|
||||
Glenn Randers-Pehrson
|
||||
Willem van Schaik
|
||||
|
||||
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
||||
Copyright (c) 1996, 1997 Andreas Dilger
|
||||
Distributed according to the same disclaimer and license as libpng-0.88,
|
||||
with the following individuals added to the list of Contributing Authors:
|
||||
|
||||
John Bowler
|
||||
Kevin Bracey
|
||||
Sam Bushell
|
||||
Magnus Holmgren
|
||||
Greg Roelofs
|
||||
Tom Tanner
|
||||
|
||||
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
||||
Andreas Dilger
|
||||
Dave Martindale
|
||||
Guy Eric Schalnat
|
||||
Paul Schmidt
|
||||
Tim Wegner
|
||||
|
||||
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
including, without limitation, the warranties of merchantability and of
|
||||
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||
assume no liability for direct, indirect, incidental, special, exemplary,
|
||||
or consequential damages, which may result from the use of the PNG
|
||||
Reference Library, even if advised of the possibility of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
source code, or portions hereof, for any purpose, without fee, subject
|
||||
to the following restrictions:
|
||||
|
||||
1. The origin of this source code must not be misrepresented.
|
||||
|
||||
2. Altered versions must be plainly marked as such and must not
|
||||
be misrepresented as being the original source.
|
||||
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||
fee, and encourage the use of this source code as a component to
|
||||
supporting the PNG file format in commercial products. If you use this
|
||||
source code in a product, acknowledgment is not required but would be
|
||||
appreciated.
|
||||
|
||||
|
||||
A "png_get_copyright" function is available, for convenient use in "about"
|
||||
boxes and the like:
|
||||
|
||||
printf("%s",png_get_copyright(NULL));
|
||||
|
||||
Also, the PNG logo (in PNG format, of course) is supplied in the
|
||||
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
|
||||
|
||||
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
|
||||
certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
February 14, 2009
|
||||
@@ -1,58 +0,0 @@
|
||||
http://www.mesa3d.org/license.html
|
||||
|
||||
License / Copyright Information
|
||||
|
||||
The Mesa distribution consists of several components. Different copyrights and licenses apply to different components. For example, GLUT is copyrighted by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa device drivers are copyrighted by their authors. See below for a list of Mesa's main components and the license for each.
|
||||
|
||||
The core Mesa library is licensed according to the terms of the MIT license. This allows integration with the XFree86, Xorg and DRI projects.
|
||||
|
||||
The default Mesa license is as follows:
|
||||
|
||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Attention, Contributors
|
||||
|
||||
When contributing to the Mesa project you must agree to the licensing terms of the component to which you're contributing. The following section lists the primary components of the Mesa distribution and their respective licenses.
|
||||
Mesa Component Licenses
|
||||
|
||||
Component Location Primary Author License
|
||||
----------------------------------------------------------------------------
|
||||
Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
|
||||
|
||||
Device drivers src/mesa/drivers/* See drivers See drivers
|
||||
|
||||
Ext headers include/GL/glext.h SGI SGI Free B
|
||||
include/GL/glxext.h
|
||||
|
||||
GLUT src/glut/ Mark Kilgard Mark's copyright
|
||||
|
||||
Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
|
||||
|
||||
SGI GLU library src/glu/sgi/ SGI SGI Free B
|
||||
|
||||
demo programs progs/demos/ various see source files
|
||||
|
||||
X demos progs/xdemos/ Brian Paul see source files
|
||||
|
||||
SGI demos progs/samples/ SGI SGI copyright
|
||||
|
||||
RedBook demos progs/redbook/ SGI SGI copyright
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
* Copyright (c) 2008, Jan Ciger (jan.ciger (at) gmail.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * The name of its contributors may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Jan Ciger ''AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL Jan Ciger BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,29 +0,0 @@
|
||||
Copyright (c) 2001, Xiphophorus
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiphophorus nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
All rights reserved.
|
||||
|
||||
This package is an SSL implementation written
|
||||
by Eric Young (eay@cryptsoft.com).
|
||||
The implementation was written so as to conform with Netscapes SSL.
|
||||
|
||||
This library is free for commercial and non-commercial use as long as
|
||||
the following conditions are aheared to. The following conditions
|
||||
apply to all code found in this distribution, be it the RC4, RSA,
|
||||
lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
included with this distribution is covered by the same copyright terms
|
||||
except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
|
||||
Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
the code are not to be removed.
|
||||
If this package is used in a product, Eric Young should be given attribution
|
||||
as the author of the parts of the library used.
|
||||
This can be in the form of a textual message at program startup or
|
||||
in documentation (online or textual) provided with the package.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. All advertising materials mentioning features or use of this software
|
||||
must display the following acknowledgement:
|
||||
"This product includes cryptographic software written by
|
||||
Eric Young (eay@cryptsoft.com)"
|
||||
The word 'cryptographic' can be left out if the rouines from the library
|
||||
being used are not cryptographic related :-).
|
||||
4. If you include any Windows specific code (or a derivative thereof) from
|
||||
the apps directory (application code) you must include an acknowledgement:
|
||||
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
The licence and distribution terms for any publically available version or
|
||||
derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
copied and put under another distribution licence
|
||||
[including the GNU Public Licence.]
|
||||
|
||||
****************
|
||||
* SSLeay
|
||||
****************
|
||||
|
||||
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
All rights reserved.
|
||||
|
||||
This package is an SSL implementation written
|
||||
by Eric Young (eay@cryptsoft.com).
|
||||
The implementation was written so as to conform with Netscapes SSL.
|
||||
|
||||
This library is free for commercial and non-commercial use as long as
|
||||
the following conditions are aheared to. The following conditions
|
||||
apply to all code found in this distribution, be it the RC4, RSA,
|
||||
lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
included with this distribution is covered by the same copyright terms
|
||||
except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
|
||||
Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
the code are not to be removed.
|
||||
If this package is used in a product, Eric Young should be given attribution
|
||||
as the author of the parts of the library used.
|
||||
This can be in the form of a textual message at program startup or
|
||||
in documentation (online or textual) provided with the package.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. All advertising materials mentioning features or use of this software
|
||||
must display the following acknowledgement:
|
||||
"This product includes cryptographic software written by
|
||||
Eric Young (eay@cryptsoft.com)"
|
||||
The word 'cryptographic' can be left out if the rouines from the library
|
||||
being used are not cryptographic related :-).
|
||||
4. If you include any Windows specific code (or a derivative thereof) from
|
||||
the apps directory (application code) you must include an acknowledgement:
|
||||
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
The licence and distribution terms for any publically available version or
|
||||
derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
copied and put under another distribution licence
|
||||
[including the GNU Public Licence.]
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Copyright 2002-2006 Vladimir Dyuzhev
|
||||
Copyright 2007 Denis Kononenko
|
||||
Copyright 2008 Micha? Rzechonek
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,180 +0,0 @@
|
||||
=================
|
||||
Vivox SDK License
|
||||
=================
|
||||
|
||||
RSA Data Security, Inc. MD5 Message-Digest Algorithm
|
||||
|
||||
Audio coding: Polycom<6F> Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
|
||||
Open Source Software Licensing
|
||||
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
|
||||
|
||||
|
||||
*************************************************************
|
||||
*************************************************************
|
||||
|
||||
/**
|
||||
* OpenAL cross platform audio library
|
||||
* Copyright (C) 1999-2000 by authors.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Or go to http://www.gnu.org/copyleft/lgpl.html
|
||||
*/
|
||||
|
||||
*************************************************************
|
||||
*************************************************************
|
||||
RTP code under Lesser General Public License
|
||||
|
||||
/*
|
||||
The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack.
|
||||
Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
************************************************************
|
||||
*************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The Vovida Software License, Version 1.0
|
||||
*
|
||||
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
|
||||
* and "Vovida Open Communication Application Library (VOCAL)" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact vocal@vovida.org.
|
||||
*
|
||||
* 4. Products derived from this software may not be called "VOCAL", nor
|
||||
* may "VOCAL" appear in their name, without prior written
|
||||
* permission of Vovida Networks, Inc.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
||||
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
|
||||
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
|
||||
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
*
|
||||
* This software consists of voluntary contributions made by Vovida
|
||||
* Networks, Inc. and many individuals on behalf of Vovida Networks,
|
||||
* Inc. For more information on Vovida Networks, Inc., please see
|
||||
*
|
||||
*
|
||||
*/
|
||||
*************************************************************
|
||||
*************************************************************
|
||||
|
||||
Internet Software Consortium code
|
||||
|
||||
/* This is from the BIND 4.9.4 release, modified to compile by itself*/
|
||||
/* Copyright (c) 1996 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
*************************************************************
|
||||
|
||||
*************************************************************
|
||||
|
||||
************************************************************
|
||||
|
||||
http://tinyxpath.sourceforge.net/
|
||||
|
||||
TinyXPath is covered by the zlib license :
|
||||
|
||||
www.sourceforge.net/projects/tinyxpath
|
||||
Copyright (c) 2002-2006 Yves Berquin (yvesb@users.sourceforge.net)
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
|
||||
************************************************************
|
||||
************************************************************
|
||||
|
||||
THE FREE SOFTWARE FOUNDATION
|
||||
|
||||
Any customer may request the source code for all open source portions of this product which are covered by the Free Software Foundation's General Public License (GPL), for a period of three years from purchase. Please contact the vendor from whom you obtained this product for instructions. A fee equivalent to the cost of making the code available may be charged. Alternatively, customers may choose to download desired GPL components directly from their original vendors. Specifically, this product contains the following GPL-licensed components:
|
||||
|
||||
From Vivox:
|
||||
- Assorted software components. To request source, contact Vivox at:
|
||||
Vivox, Inc.
|
||||
Attn: customer support
|
||||
40 Speen Street Suite 402
|
||||
Framingham, MA 01701
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Copyright 2000 Epinions, Inc.
|
||||
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free of charge, to (a) use, copy, distribute, modify, perform and display this software and associated documentation files (the "Software"), and (b) permit others to whom the Software is furnished to do so as well.
|
||||
|
||||
1) The above copyright notice and this permission notice shall be included without modification in all copies or substantial portions of the Software.
|
||||
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
|
||||
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
'zlib' general purpose compression library version 1.1.4, March 11th, 2002
|
||||
|
||||
Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the
|
||||
use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
The origin of this software must not be misrepresented; you must not claim
|
||||
that you wrote the original software. If you use this software in a product,
|
||||
an acknowledgment in the product documentation would be appreciated but is
|
||||
not required.
|
||||
|
||||
Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly
|
||||
jloup@gzip.org
|
||||
|
||||
Mark Adler
|
||||
madler@alumni.caltech.edu
|
||||
|
||||
@@ -4,6 +4,10 @@ along with the issue identifier corresponding to the patches we've
|
||||
received from them. To see more about these contributions, visit the
|
||||
browsable version: http://wiki.secondlife.com/wiki/Source_contributions
|
||||
|
||||
Entries are related to URLs as follows:
|
||||
IMP-xxx: http://redmine.kokuaviewer.org/issues/xxx
|
||||
Everything else ([VWR|SNOW|CT|SVC|WEB]-xxx): https://jira.secondlife.com/browse/KEY-xxx
|
||||
|
||||
Able Whitman
|
||||
VWR-650
|
||||
VWR-1460
|
||||
@@ -58,12 +62,20 @@ Aimee Trescothick
|
||||
Alejandro Rosenthal
|
||||
VWR-1184
|
||||
Aleric Inglewood
|
||||
VWR-10579 (IMP-552)
|
||||
VWR-10759
|
||||
VWR-10837
|
||||
VWR-12984
|
||||
VWR-13040 (IMP-575)
|
||||
VWR-13996
|
||||
VWR-14426
|
||||
VWR-14914
|
||||
VWR-24247
|
||||
VWR-24312
|
||||
VWR-24315
|
||||
VWR-24320
|
||||
VWR-24333
|
||||
VWR-24334
|
||||
SNOW-47
|
||||
SNOW-84
|
||||
SNOW-86
|
||||
@@ -72,18 +84,39 @@ Aleric Inglewood
|
||||
SNOW-129
|
||||
SNOW-196
|
||||
SNOW-203
|
||||
SNOW-240
|
||||
SNOW-408
|
||||
SNOW-415
|
||||
SNOW-415 (IMP-576)
|
||||
SNOW-477 (IMP-577)
|
||||
SNOW-479
|
||||
SNOW-626
|
||||
SNOW-713
|
||||
SNOW-744
|
||||
SNOW-751
|
||||
SNOW-713 (IMP-692)
|
||||
SNOW-744 (IMP-578)
|
||||
SNOW-752
|
||||
SNOW-753
|
||||
SNOW-766 (IMP-553)
|
||||
SNOW-772
|
||||
SNOW-793
|
||||
SNOW-796 (IMP-581)
|
||||
SNOW-800 (IMP-556)
|
||||
SNOW-806
|
||||
IMP-429
|
||||
IMP-561
|
||||
IMP-565
|
||||
IMP-566
|
||||
IMP-567
|
||||
IMP-573
|
||||
IMP-590
|
||||
IMP-660
|
||||
IMP-661
|
||||
IMP-662
|
||||
IMP-663
|
||||
IMP-664
|
||||
IMP-670
|
||||
IMP-701
|
||||
IMP-702
|
||||
IMP-734
|
||||
IMP-735
|
||||
Alissa Sabre
|
||||
VWR-81
|
||||
VWR-83
|
||||
@@ -105,7 +138,7 @@ Alissa Sabre
|
||||
VWR-1351
|
||||
VWR-1353
|
||||
VWR-1410
|
||||
VWR-1843
|
||||
VWR-1843
|
||||
VWR-2116
|
||||
VWR-2826
|
||||
VWR-3290
|
||||
@@ -113,17 +146,17 @@ Alissa Sabre
|
||||
VWR-3857
|
||||
VWR-4010
|
||||
VWR-5575
|
||||
VWR-5929
|
||||
VWR-6384
|
||||
VWR-6385
|
||||
VWR-5929
|
||||
VWR-6384
|
||||
VWR-6385
|
||||
VWR-6386
|
||||
VWR-6430
|
||||
VWR-6430
|
||||
VWR-6858
|
||||
VWR-6668
|
||||
VWR-7086
|
||||
VWR-7087
|
||||
VWR-7153
|
||||
VWR-7168
|
||||
VWR-6668
|
||||
VWR-7086
|
||||
VWR-7087
|
||||
VWR-7153
|
||||
VWR-7168
|
||||
VWR-9190
|
||||
VWR-10728
|
||||
VWR-12620
|
||||
@@ -181,6 +214,7 @@ Boroondas Gupte
|
||||
SNOW-201
|
||||
SNOW-396
|
||||
SNOW-589
|
||||
SNOW-623 (IMP-554)
|
||||
SNOW-624
|
||||
VWR-233
|
||||
WEB-262
|
||||
@@ -549,7 +583,7 @@ Pf Shan
|
||||
CT-321
|
||||
princess niven
|
||||
VWR-5733
|
||||
CT-85
|
||||
CT-85
|
||||
CT-320
|
||||
CT-352
|
||||
Renault Clio
|
||||
@@ -590,6 +624,7 @@ Robin Cornelius
|
||||
VWR-11128
|
||||
VWR-12758
|
||||
VWR-12686
|
||||
VWR-12838
|
||||
Ryozu Kojima
|
||||
VWR-53
|
||||
VWR-287
|
||||
@@ -788,4 +823,3 @@ Zi Ree
|
||||
Zipherius Turas
|
||||
VWR-76
|
||||
VWR-77
|
||||
|
||||
|
||||
@@ -672,10 +672,10 @@
|
||||
|
||||
<key>FetchInventoryDescendents</key>
|
||||
<boolean>false</boolean>
|
||||
|
||||
|
||||
<key>WebFetchInventoryDescendents</key>
|
||||
<boolean>true</boolean>
|
||||
|
||||
<boolean>false</boolean>
|
||||
|
||||
<key>FetchInventory</key>
|
||||
<boolean>true</boolean>
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ include(Versions)
|
||||
|
||||
include(UnixInstall)
|
||||
|
||||
set (GCC_DISABLE_FATAL_WARNINGS TRUE)
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ReleaseSSE2 CACHE STRING
|
||||
"Build type. One of: Debug Release ReleaseSSE2 RelWithDebInfo" FORCE)
|
||||
@@ -44,6 +46,7 @@ endif(NOT STANDALONE)
|
||||
add_custom_target(prepare DEPENDS ${prepare_depends})
|
||||
|
||||
add_subdirectory(cmake)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}cwdebug)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
|
||||
@@ -75,8 +78,8 @@ if (VIEWER)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
|
||||
# viewer media plugins
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
|
||||
# viewer plugins directory
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
||||
|
||||
# llplugin testbed code (is this the right way to include it?)
|
||||
#if (NOT LINUX)
|
||||
@@ -87,7 +90,7 @@ if (VIEWER)
|
||||
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (DARWIN)
|
||||
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
|
||||
add_dependencies(viewer mac-crash-logger)
|
||||
#add_dependencies(viewer mac-updater)
|
||||
@@ -105,6 +108,7 @@ if (VIEWER)
|
||||
add_dependencies(viewer solaris-crash-logger)
|
||||
endif (LINUX)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||
add_dependencies(viewer secondlife-bin)
|
||||
endif (VIEWER)
|
||||
@@ -132,27 +136,25 @@ endif (SERVER)
|
||||
|
||||
# Configure prebuilt binary download. This must be done last so that
|
||||
# all subdirectories have a chance to list the packages they need.
|
||||
if(NOT STANDALONE)
|
||||
# We need scp for proprietary downloads.
|
||||
if(INSTALL_PROPRIETARY)
|
||||
include(FindSCP)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
# We need scp for proprietary downloads.
|
||||
if(INSTALL_PROPRIETARY)
|
||||
include(FindSCP)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
|
||||
# packages in the PREBUILT property of the 'prepare' target.
|
||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
||||
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
|
||||
# packages in the PREBUILT property of the 'prepare' target.
|
||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
||||
|
||||
# Create a script to download the needed binaries.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/DownloadPrebuilt.cmake.in
|
||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake @ONLY)
|
||||
# Create a script to download the needed binaries.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/DownloadPrebuilt.cmake.in
|
||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake @ONLY)
|
||||
|
||||
# Drive the download script at build time. Depend on 'install.xml'
|
||||
# to aqcuire new binaries when needed.
|
||||
add_custom_command(
|
||||
COMMENT "Obtaining prebuilt binaries..."
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/prepare/prebuilt
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
|
||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||
)
|
||||
endif(NOT STANDALONE)
|
||||
# Drive the download script at build time. Depend on 'install.xml'
|
||||
# to aqcuire new binaries when needed.
|
||||
add_custom_command(
|
||||
COMMENT "Obtaining prebuilt binaries..."
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/prepare/prebuilt
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
|
||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||
)
|
||||
|
||||
@@ -1,291 +1,317 @@
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# Compilation options shared by all Second Life components.
|
||||
|
||||
include(Variables)
|
||||
|
||||
|
||||
# Portable compilation flags.
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
|
||||
#llimage now requires this (?)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||
|
||||
# Don't bother with a MinSizeRel build.
|
||||
|
||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;ReleaseSSE2;Debug" CACHE STRING
|
||||
"Supported build types." FORCE)
|
||||
|
||||
# Platform-specific compilation flags.
|
||||
|
||||
if (WINDOWS)
|
||||
# Don't build DLLs.
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd"
|
||||
CACHE STRING "C++ compiler debug options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP"
|
||||
CACHE STRING "C++ compiler release-with-debug options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /arch:SSE /fp:fast"
|
||||
CACHE STRING "C++ compiler release options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /arch:SSE /fp:fast"
|
||||
CACHE STRING "C compiler release options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /arch:SSE2 /fp:fast"
|
||||
CACHE STRING "C++ compiler release-SSE2 options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_C_FLAGS_RELEASESSE2} ${LL_C_FLAGS} /O2 /Zi /MD /MP /arch:SSE2 /fp:fast"
|
||||
CACHE STRING "C compiler release-SSE2 options" FORCE)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LARGEADDRESSAWARE")
|
||||
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "")
|
||||
|
||||
add_definitions(
|
||||
/DLL_WINDOWS=1
|
||||
/DUNICODE
|
||||
/D_UNICODE
|
||||
/GS
|
||||
/TP
|
||||
/W3
|
||||
/c
|
||||
/Zc:forScope
|
||||
/nologo
|
||||
/Oy-
|
||||
)
|
||||
|
||||
if(MSVC80 OR MSVC90 OR MSVC100)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C++ compiler release options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C++ compiler release-SSE2 options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C compiler release-SSE2 options" FORCE)
|
||||
add_definitions(
|
||||
/Zc:wchar_t-
|
||||
)
|
||||
endif (MSVC80 OR MSVC90 OR MSVC100)
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
if (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
add_definitions(/WX)
|
||||
endif (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
|
||||
# Various libs are compiler specific, generate some variables here we can just use
|
||||
# when we require them instead of reimplementing the test each time.
|
||||
|
||||
if (MSVC71)
|
||||
set(MSVC_DIR 7.1)
|
||||
set(MSVC_SUFFIX 71)
|
||||
elseif (MSVC80)
|
||||
set(MSVC_DIR 8.0)
|
||||
set(MSVC_SUFFIX 80)
|
||||
elseif (MSVC90)
|
||||
set(MSVC_DIR 9.0)
|
||||
set(MSVC_SUFFIX 90)
|
||||
elseif (MSVC100)
|
||||
set(MSVC_DIR 10.0)
|
||||
set(MSVC_SUFFIX 100)
|
||||
endif (MSVC71)
|
||||
|
||||
endif (WINDOWS)
|
||||
|
||||
set (GCC_EXTRA_OPTIMIZATION "-ffast-math -frounding-math")
|
||||
|
||||
if (LINUX)
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
|
||||
# Here's a giant hack for Fedora 8, where we can't use
|
||||
# _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1.
|
||||
|
||||
find_program(GXX g++)
|
||||
mark_as_advanced(GXX)
|
||||
|
||||
if (GXX)
|
||||
execute_process(
|
||||
COMMAND ${GXX} --version
|
||||
COMMAND sed "s/^[gc+ ]*//"
|
||||
COMMAND head -1
|
||||
OUTPUT_VARIABLE GXX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else (GXX)
|
||||
set(GXX_VERSION x)
|
||||
endif (GXX)
|
||||
|
||||
# The quoting hack here is necessary in case we're using distcc or
|
||||
# ccache as our compiler. CMake doesn't pass the command line
|
||||
# through the shell by default, so we end up trying to run "distcc"
|
||||
# " g++" - notice the leading space. Ugh.
|
||||
|
||||
execute_process(
|
||||
COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version"
|
||||
COMMAND sed "s/^[gc+ ]*//"
|
||||
COMMAND head -1
|
||||
OUTPUT_VARIABLE CXX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
|
||||
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
|
||||
#Lets actualy get a numerical version of gxx's version
|
||||
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION})
|
||||
|
||||
#gcc 4.3 and above don't like the LL boost
|
||||
if(${CXX_VERSION} GREATER 429)
|
||||
add_definitions(-Wno-parentheses)
|
||||
endif (${CXX_VERSION} GREATER 429)
|
||||
|
||||
# End of hacks.
|
||||
|
||||
add_definitions(
|
||||
-DLL_LINUX=1
|
||||
-D_REENTRANT
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-g
|
||||
-pthread
|
||||
)
|
||||
|
||||
if (SERVER)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-60")
|
||||
if (EXISTS /etc/debian_version)
|
||||
FILE(READ /etc/debian_version DEBIAN_VERSION)
|
||||
else (EXISTS /etc/debian_version)
|
||||
set(DEBIAN_VERSION "")
|
||||
endif (EXISTS /etc/debian_version)
|
||||
|
||||
if (NOT DEBIAN_VERSION STREQUAL "3.1")
|
||||
add_definitions(-DCTYPE_WORKAROUND)
|
||||
endif (NOT DEBIAN_VERSION STREQUAL "3.1")
|
||||
|
||||
if (EXISTS /usr/lib/mysql4/mysql)
|
||||
link_directories(/usr/lib/mysql4/mysql)
|
||||
endif (EXISTS /usr/lib/mysql4/mysql)
|
||||
|
||||
add_definitions(
|
||||
-msse2
|
||||
-mfpmath=sse
|
||||
)
|
||||
endif (SERVER)
|
||||
|
||||
if (VIEWER)
|
||||
add_definitions(-DAPPID=secondlife)
|
||||
add_definitions(-fvisibility=hidden)
|
||||
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
if (NOT STANDALONE)
|
||||
# this stops us requiring a really recent glibc at runtime
|
||||
add_definitions(-fno-stack-protector)
|
||||
endif (NOT STANDALONE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -march=pentium4 -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -march=pentium4 -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
|
||||
endif (VIEWER)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "-O3 ${CMAKE_CXX_FLAGS_RELEASESSE2}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "-O3 ${CMAKE_C_FLAGS_RELEASESSE2}")
|
||||
endif (LINUX)
|
||||
|
||||
|
||||
if (DARWIN)
|
||||
add_definitions(-DLL_DARWIN=1)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -O3 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -03 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor -Woverloaded-virtual")
|
||||
|
||||
if (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
|
||||
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
|
||||
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder")
|
||||
|
||||
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (LINUX OR DARWIN)
|
||||
|
||||
|
||||
if (STANDALONE)
|
||||
add_definitions(-DLL_STANDALONE=1)
|
||||
|
||||
if (LINUX AND ${ARCH} STREQUAL "i686")
|
||||
add_definitions(-march=pentiumpro)
|
||||
endif (LINUX AND ${ARCH} STREQUAL "i686")
|
||||
|
||||
else (STANDALONE)
|
||||
set(${ARCH}_linux_INCLUDES
|
||||
ELFIO
|
||||
atk-1.0
|
||||
glib-2.0
|
||||
gstreamer-0.10
|
||||
gtk-2.0
|
||||
llfreetype2
|
||||
pango-1.0
|
||||
)
|
||||
endif (STANDALONE)
|
||||
|
||||
if(1 EQUAL 1)
|
||||
add_definitions(-DOPENSIM_RULES=1)
|
||||
endif(1 EQUAL 1)
|
||||
|
||||
if(SERVER)
|
||||
include_directories(${LIBS_PREBUILT_DIR}/include/havok)
|
||||
endif(SERVER)
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
|
||||
"${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING
|
||||
"Flags used for linking binaries under SSE2 build."
|
||||
FORCE )
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2
|
||||
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" CACHE STRING
|
||||
"Flags used by the shared libraries linker under SSE2 build."
|
||||
FORCE )
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
CMAKE_C_FLAGS_RELEASESSE2
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2 )
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# Compilation options shared by all Second Life components.
|
||||
|
||||
include(Variables)
|
||||
|
||||
|
||||
# Portable compilation flags.
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
|
||||
#llimage now requires this (?)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||
|
||||
# Don't bother with a MinSizeRel build.
|
||||
|
||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;ReleaseSSE2;Debug" CACHE STRING
|
||||
"Supported build types." FORCE)
|
||||
|
||||
# Platform-specific compilation flags.
|
||||
|
||||
if (WINDOWS)
|
||||
# Don't build DLLs.
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /arch:SSE2"
|
||||
CACHE STRING "C++ compiler debug options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /arch:SSE2"
|
||||
CACHE STRING "C++ compiler release-with-debug options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /arch:SSE /fp:fast"
|
||||
CACHE STRING "C++ compiler release options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /arch:SSE /fp:fast"
|
||||
CACHE STRING "C compiler release options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /arch:SSE2 /fp:fast"
|
||||
CACHE STRING "C++ compiler release-SSE2 options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_C_FLAGS_RELEASESSE2} ${LL_C_FLAGS} /O2 /Zi /MD /MP /arch:SSE2 /fp:fast"
|
||||
CACHE STRING "C compiler release-SSE2 options" FORCE)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LARGEADDRESSAWARE")
|
||||
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "")
|
||||
|
||||
add_definitions(
|
||||
/DLL_WINDOWS=1
|
||||
/DUNICODE
|
||||
/D_UNICODE
|
||||
/GS
|
||||
/TP
|
||||
/W3
|
||||
/c
|
||||
/Zc:forScope
|
||||
/nologo
|
||||
/Oy-
|
||||
)
|
||||
|
||||
if(MSVC80 OR MSVC90 OR MSVC10)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C++ compiler release options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C++ compiler release-SSE2 options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2
|
||||
"${CMAKE_CXX_FLAGS_RELEASESSE2} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C compiler release-SSE2 options" FORCE)
|
||||
add_definitions(
|
||||
/Zc:wchar_t-
|
||||
)
|
||||
endif (MSVC80 OR MSVC90 OR MSVC10)
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
if (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
add_definitions(/WX)
|
||||
endif (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
|
||||
# Various libs are compiler specific, generate some variables here we can just use
|
||||
# when we require them instead of reimplementing the test each time.
|
||||
|
||||
if (MSVC71)
|
||||
set(MSVC_DIR 7.1)
|
||||
set(MSVC_SUFFIX 71)
|
||||
elseif (MSVC80)
|
||||
set(MSVC_DIR 8.0)
|
||||
set(MSVC_SUFFIX 80)
|
||||
elseif (MSVC90)
|
||||
set(MSVC_DIR 9.0)
|
||||
set(MSVC_SUFFIX 90)
|
||||
elseif (MSVC10)
|
||||
set(MSVC_DIR 10.0)
|
||||
set(MSVC_SUFFIX 100)
|
||||
endif (MSVC71)
|
||||
|
||||
if (MSVC10)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
endif(MSVC10)
|
||||
|
||||
|
||||
endif (WINDOWS)
|
||||
|
||||
set (GCC_EXTRA_OPTIMIZATION "-ffast-math -frounding-math")
|
||||
|
||||
if (LINUX)
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
|
||||
# Here's a giant hack for Fedora 8, where we can't use
|
||||
# _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1.
|
||||
|
||||
find_program(GXX g++)
|
||||
mark_as_advanced(GXX)
|
||||
|
||||
if (GXX)
|
||||
execute_process(
|
||||
COMMAND ${GXX} --version
|
||||
COMMAND sed "s/^[gc+ ]*//"
|
||||
COMMAND head -1
|
||||
OUTPUT_VARIABLE GXX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else (GXX)
|
||||
set(GXX_VERSION x)
|
||||
endif (GXX)
|
||||
|
||||
# The quoting hack here is necessary in case we're using distcc or
|
||||
# ccache as our compiler. CMake doesn't pass the command line
|
||||
# through the shell by default, so we end up trying to run "distcc"
|
||||
# " g++" - notice the leading space. Ugh.
|
||||
|
||||
execute_process(
|
||||
COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version"
|
||||
COMMAND sed "s/^[gc+ ]*//"
|
||||
COMMAND head -1
|
||||
OUTPUT_VARIABLE CXX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
|
||||
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
|
||||
#Lets actualy get a numerical version of gxx's version
|
||||
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION})
|
||||
|
||||
#gcc 4.3 and above don't like the LL boost
|
||||
if(${CXX_VERSION} GREATER 429)
|
||||
add_definitions(-Wno-parentheses)
|
||||
endif (${CXX_VERSION} GREATER 429)
|
||||
|
||||
#gcc 4.6 has a new spammy warning
|
||||
if(NOT ${CXX_VERSION} LESS 460)
|
||||
add_definitions(-Wno-unused-but-set-variable)
|
||||
endif (NOT ${CXX_VERSION} LESS 460)
|
||||
|
||||
# End of hacks.
|
||||
|
||||
add_definitions(
|
||||
-DLL_LINUX=1
|
||||
-D_REENTRANT
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-g
|
||||
-pthread
|
||||
)
|
||||
|
||||
if (SERVER)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-60")
|
||||
if (EXISTS /etc/debian_version)
|
||||
FILE(READ /etc/debian_version DEBIAN_VERSION)
|
||||
else (EXISTS /etc/debian_version)
|
||||
set(DEBIAN_VERSION "")
|
||||
endif (EXISTS /etc/debian_version)
|
||||
|
||||
if (NOT DEBIAN_VERSION STREQUAL "3.1")
|
||||
add_definitions(-DCTYPE_WORKAROUND)
|
||||
endif (NOT DEBIAN_VERSION STREQUAL "3.1")
|
||||
|
||||
if (EXISTS /usr/lib/mysql4/mysql)
|
||||
link_directories(/usr/lib/mysql4/mysql)
|
||||
endif (EXISTS /usr/lib/mysql4/mysql)
|
||||
|
||||
add_definitions(
|
||||
-msse2
|
||||
-mfpmath=sse
|
||||
)
|
||||
endif (SERVER)
|
||||
|
||||
if (VIEWER)
|
||||
add_definitions(-DAPPID=secondlife)
|
||||
add_definitions(-fvisibility=hidden)
|
||||
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
if (NOT STANDALONE)
|
||||
# this stops us requiring a really recent glibc at runtime
|
||||
add_definitions(-fno-stack-protector)
|
||||
endif (NOT STANDALONE)
|
||||
if (${ARCH} STREQUAL "x86_64")
|
||||
add_definitions(-DLINUX64=1 -pipe)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
|
||||
else (${ARCH} STREQUAL "x86_64")
|
||||
if (NOT STANDALONE)
|
||||
set(MARCH_FLAG " -march=pentium4")
|
||||
endif (NOT STANDALONE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
|
||||
endif (${ARCH} STREQUAL "x86_64")
|
||||
endif (VIEWER)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG} -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "-O3 ${CMAKE_CXX_FLAGS_RELEASESSE2}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "-O3 ${CMAKE_C_FLAGS_RELEASESSE2}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
endif (LINUX)
|
||||
|
||||
|
||||
if (DARWIN)
|
||||
add_definitions(-DLL_DARWIN=1)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -O3 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -03 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor -Woverloaded-virtual")
|
||||
|
||||
if (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
|
||||
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
|
||||
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder")
|
||||
|
||||
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (LINUX OR DARWIN)
|
||||
|
||||
|
||||
if (STANDALONE)
|
||||
add_definitions(-DLL_STANDALONE=1)
|
||||
else (STANDALONE)
|
||||
set(${ARCH}_linux_INCLUDES
|
||||
ELFIO
|
||||
atk-1.0
|
||||
glib-2.0
|
||||
gstreamer-0.10
|
||||
gtk-2.0
|
||||
llfreetype2
|
||||
pango-1.0
|
||||
)
|
||||
endif (STANDALONE)
|
||||
|
||||
if(1 EQUAL 1)
|
||||
add_definitions(-DOPENSIM_RULES=1)
|
||||
add_definitions(-DMESH_ENABLED=1)
|
||||
endif(1 EQUAL 1)
|
||||
|
||||
if(SERVER)
|
||||
include_directories(${LIBS_PREBUILT_DIR}/include/havok)
|
||||
endif(SERVER)
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
|
||||
"${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING
|
||||
"Flags used for linking binaries under SSE2 build."
|
||||
FORCE )
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2
|
||||
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" CACHE STRING
|
||||
"Flags used by the shared libraries linker under SSE2 build."
|
||||
FORCE )
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_RELEASESSE2
|
||||
CMAKE_C_FLAGS_RELEASESSE2
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2 )
|
||||
|
||||
4
indra/cmake/AIStateMachine.cmake
Normal file
4
indra/cmake/AIStateMachine.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
set(AISTATEMACHINE_INCLUDE_DIRS statemachine)
|
||||
set(AISTATEMACHINE_LIBRARIES statemachine)
|
||||
@@ -14,16 +14,18 @@ else (STANDALONE)
|
||||
use_prebuilt_binary(apr_suite)
|
||||
if (WINDOWS)
|
||||
set(APR_LIBRARIES
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
|
||||
)
|
||||
set(APRICONV_LIBRARIES
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
|
||||
)
|
||||
# Doesn't need to link with iconv.dll
|
||||
set(APRICONV_LIBRARIES "")
|
||||
set(APRUTIL_LIBRARIES
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
|
||||
)
|
||||
elseif (DARWIN)
|
||||
set(APR_LIBRARIES
|
||||
@@ -41,9 +43,8 @@ else (STANDALONE)
|
||||
set(APRICONV_LIBRARIES iconv)
|
||||
endif (WINDOWS)
|
||||
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
|
||||
set(APRUTIL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
|
||||
|
||||
if (LINUX AND VIEWER)
|
||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
|
||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
|
||||
endif (LINUX AND VIEWER)
|
||||
endif (STANDALONE)
|
||||
|
||||
8
indra/cmake/BasicPluginBase.cmake
Normal file
8
indra/cmake/BasicPluginBase.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
|
||||
set(BASIC_PLUGIN_BASE_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/plugins/base_basic/
|
||||
)
|
||||
|
||||
set(BASIC_PLUGIN_BASE_LIBRARIES basic_plugin_base)
|
||||
@@ -1,59 +1,53 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(Boost_FIND_QUIETLY ON)
|
||||
set(Boost_FIND_REQUIRED ON)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindBoost)
|
||||
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
|
||||
if (WINDOWS)
|
||||
set(BOOST_VERSION 1_39)
|
||||
|
||||
# SNOW-788
|
||||
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
|
||||
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
|
||||
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
|
||||
# boost libs are avaiable - RC.
|
||||
|
||||
if (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt-s)
|
||||
set(BOOST_DEBUG_SUFFIX mt-sgd)
|
||||
else (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt)
|
||||
set(BOOST_DEBUG_SUFFIX mt-gd)
|
||||
endif (MSVC71)
|
||||
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_signals-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
elseif (DARWIN)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
elseif (LINUX)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(Boost_FIND_QUIETLY ON)
|
||||
set(Boost_FIND_REQUIRED ON)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindBoost)
|
||||
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
|
||||
if (WINDOWS)
|
||||
set(BOOST_VERSION 1_45)
|
||||
|
||||
# SNOW-788
|
||||
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
|
||||
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
|
||||
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
|
||||
# boost libs are avaiable - RC.
|
||||
|
||||
if (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt-s)
|
||||
set(BOOST_DEBUG_SUFFIX mt-sgd)
|
||||
else (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt)
|
||||
set(BOOST_DEBUG_SUFFIX mt-gd)
|
||||
endif (MSVC71)
|
||||
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
elseif (DARWIN)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
elseif (LINUX)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -28,17 +28,18 @@ set(cmake_SOURCE_FILES
|
||||
FindCARes.cmake
|
||||
FindELFIO.cmake
|
||||
FindGooglePerfTools.cmake
|
||||
FindHunSpell.cmake
|
||||
FindMono.cmake
|
||||
FindMT.cmake
|
||||
FindMySQL.cmake
|
||||
FindNDOF.cmake
|
||||
FindOpenJPEG.cmake
|
||||
FindXmlRpcEpi.cmake
|
||||
FindZLIB.cmake
|
||||
FMOD.cmake
|
||||
FreeType.cmake
|
||||
GStreamer010Plugin.cmake
|
||||
GooglePerfTools.cmake
|
||||
HUNSPELL.cmake
|
||||
JPEG.cmake
|
||||
LLAddBuildTest.cmake
|
||||
LLAudio.cmake
|
||||
|
||||
@@ -1,487 +1,489 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# The copy_win_libs folder contains file lists and a script used to
|
||||
# copy dlls, exes and such needed to run the SecondLife from within
|
||||
# VisualStudio.
|
||||
|
||||
include(CMakeCopyIfDifferent)
|
||||
|
||||
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
|
||||
set(vivox_files
|
||||
SLVoice.exe
|
||||
alut.dll
|
||||
vivoxsdk.dll
|
||||
ortp.dll
|
||||
wrap_oal.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
|
||||
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(debug_files
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugin test mule
|
||||
set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(plugintest_debug_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
qtcored4.dll
|
||||
qtguid4.dll
|
||||
qtnetworkd4.dll
|
||||
qtopengld4.dll
|
||||
qtwebkitd4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/imageformats")
|
||||
set(plugintest_debug_files
|
||||
qgifd4.dll
|
||||
qicod4.dll
|
||||
qjpegd4.dll
|
||||
qmngd4.dll
|
||||
qsvgd4.dll
|
||||
qtiffd4.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug/imageformats"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule
|
||||
set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(plugintest_release_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
# llkdu.dll (not required for plugin test)
|
||||
qtcore4.dll
|
||||
qtgui4.dll
|
||||
qtnetwork4.dll
|
||||
qtopengl4.dll
|
||||
qtwebkit4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
|
||||
set(plugintest_release_files
|
||||
qgif4.dll
|
||||
qico4.dll
|
||||
qjpeg4.dll
|
||||
qmng4.dll
|
||||
qsvg4.dll
|
||||
qtiff4.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugins
|
||||
set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(plugins_debug_files
|
||||
libeay32.dll
|
||||
qtcored4.dll
|
||||
qtguid4.dll
|
||||
qtnetworkd4.dll
|
||||
qtopengld4.dll
|
||||
qtwebkitd4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugins_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
|
||||
out_targets
|
||||
${plugins_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugins
|
||||
set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(plugins_release_files
|
||||
libeay32.dll
|
||||
qtcore4.dll
|
||||
qtgui4.dll
|
||||
qtnetwork4.dll
|
||||
qtopengl4.dll
|
||||
qtwebkit4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(release_files
|
||||
libtcmalloc_minimal.dll
|
||||
fmod.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
|
||||
if(EXISTS ${internal_llkdu_path})
|
||||
set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
|
||||
set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
|
||||
DEPENDS ${internal_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
|
||||
)
|
||||
set(all_targets ${all_targets} ${llkdu_dst})
|
||||
else(EXISTS ${internal_llkdu_path})
|
||||
if (EXISTS "${debug_src_dir}/llkdu.dll")
|
||||
set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
|
||||
set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${debug_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
|
||||
DEPENDS ${debug_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
)
|
||||
set(all_targets ${all_targets} ${debug_llkdu_dst})
|
||||
endif (EXISTS "${debug_src_dir}/llkdu.dll")
|
||||
|
||||
if (EXISTS "${release_src_dir}/llkdu.dll")
|
||||
set(release_llkdu_src "${release_src_dir}/llkdu.dll")
|
||||
set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${release_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
)
|
||||
set(all_targets ${all_targets} ${release_llkdu_dst})
|
||||
|
||||
set(releasesse2_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${releasesse2_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${releasesse2_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
)
|
||||
set(all_targets ${all_targets} ${releasesse2_llkdu_dst})
|
||||
|
||||
set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${relwithdebinfo_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
)
|
||||
set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
|
||||
endif (EXISTS "${release_src_dir}/llkdu.dll")
|
||||
|
||||
endif (EXISTS ${internal_llkdu_path})
|
||||
|
||||
# Copy MS C runtime dlls, required for packaging.
|
||||
# *TODO - Adapt this to support VC9
|
||||
if (MSVC80)
|
||||
FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
|
||||
NO_DEFAULT_PATH
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(EXISTS ${debug_msvc8_redist_path})
|
||||
set(debug_msvc8_files
|
||||
msvcr80d.dll
|
||||
msvcp80d.dll
|
||||
Microsoft.VC80.DebugCRT.manifest
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${debug_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${debug_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(debug_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Debug/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${debug_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLifeDebug.exe.config
|
||||
${debug_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
|
||||
COMMENT "Creating debug app config file"
|
||||
)
|
||||
|
||||
endif (EXISTS ${debug_msvc8_redist_path})
|
||||
|
||||
FIND_PATH(release_msvc8_redist_path msvcr80.dll
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
|
||||
NO_DEFAULT_PATH
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(EXISTS ${release_msvc8_redist_path})
|
||||
set(release_msvc8_files
|
||||
msvcr80.dll
|
||||
msvcp80.dll
|
||||
Microsoft.VC80.CRT.manifest
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(release_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Release/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${release_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${release_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating release app config file"
|
||||
)
|
||||
|
||||
set(releasesse2_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${releasesse2_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${releasesse2_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating release-sse2 app config file"
|
||||
)
|
||||
|
||||
set(relwithdebinfo_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${relwithdebinfo_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${relwithdebinfo_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating relwithdebinfo app config file"
|
||||
)
|
||||
|
||||
endif (EXISTS ${release_msvc8_redist_path})
|
||||
endif (MSVC80)
|
||||
|
||||
add_custom_target(copy_win_libs ALL
|
||||
DEPENDS
|
||||
${all_targets}
|
||||
${release_appconfig_file}
|
||||
${releasesse2_appconfig_file}
|
||||
${relwithdebinfo_appconfig_file}
|
||||
${debug_appconfig_file}
|
||||
)
|
||||
add_dependencies(copy_win_libs prepare)
|
||||
|
||||
if(EXISTS ${internal_llkdu_path})
|
||||
add_dependencies(copy_win_libs llkdu)
|
||||
endif(EXISTS ${internal_llkdu_path})
|
||||
# -*- cmake -*-
|
||||
|
||||
# The copy_win_libs folder contains file lists and a script used to
|
||||
# copy dlls, exes and such needed to run the SecondLife from within
|
||||
# VisualStudio.
|
||||
|
||||
include(CMakeCopyIfDifferent)
|
||||
|
||||
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
|
||||
set(vivox_files
|
||||
SLVoice.exe
|
||||
alut.dll
|
||||
vivoxsdk.dll
|
||||
ortp.dll
|
||||
wrap_oal.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
|
||||
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(debug_files
|
||||
libhunspell.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugin test mule
|
||||
set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(plugintest_debug_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
qtcored4.dll
|
||||
qtguid4.dll
|
||||
qtnetworkd4.dll
|
||||
qtopengld4.dll
|
||||
qtwebkitd4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/imageformats")
|
||||
set(plugintest_debug_files
|
||||
qgifd4.dll
|
||||
qicod4.dll
|
||||
qjpegd4.dll
|
||||
qmngd4.dll
|
||||
qsvgd4.dll
|
||||
qtiffd4.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug/imageformats"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule
|
||||
set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(plugintest_release_files
|
||||
libeay32.dll
|
||||
libglib-2.0-0.dll
|
||||
libgmodule-2.0-0.dll
|
||||
libgobject-2.0-0.dll
|
||||
libgthread-2.0-0.dll
|
||||
# llkdu.dll (not required for plugin test)
|
||||
qtcore4.dll
|
||||
qtgui4.dll
|
||||
qtnetwork4.dll
|
||||
qtopengl4.dll
|
||||
qtwebkit4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
|
||||
set(plugintest_release_files
|
||||
qgif4.dll
|
||||
qico4.dll
|
||||
qjpeg4.dll
|
||||
qmng4.dll
|
||||
qsvg4.dll
|
||||
qtiff4.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugintest_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin/imageformats"
|
||||
out_targets
|
||||
${plugintest_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Debug config runtime files required for the plugins
|
||||
set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(plugins_debug_files
|
||||
libeay32.dll
|
||||
qtcored4.dll
|
||||
qtguid4.dll
|
||||
qtnetworkd4.dll
|
||||
qtopengld4.dll
|
||||
qtwebkitd4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugins_debug_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
|
||||
out_targets
|
||||
${plugins_debug_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugins
|
||||
set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(plugins_release_files
|
||||
libeay32.dll
|
||||
qtcore4.dll
|
||||
qtgui4.dll
|
||||
qtnetwork4.dll
|
||||
qtopengl4.dll
|
||||
qtwebkit4.dll
|
||||
ssleay32.dll
|
||||
)
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${plugins_release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
|
||||
out_targets
|
||||
${plugins_release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(release_files
|
||||
libtcmalloc_minimal.dll
|
||||
fmod.dll
|
||||
libhunspell.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
|
||||
if(EXISTS ${internal_llkdu_path})
|
||||
set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
|
||||
set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
|
||||
DEPENDS ${internal_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
|
||||
)
|
||||
set(all_targets ${all_targets} ${llkdu_dst})
|
||||
else(EXISTS ${internal_llkdu_path})
|
||||
if (EXISTS "${debug_src_dir}/llkdu.dll")
|
||||
set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
|
||||
set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${debug_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
|
||||
DEPENDS ${debug_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
)
|
||||
set(all_targets ${all_targets} ${debug_llkdu_dst})
|
||||
endif (EXISTS "${debug_src_dir}/llkdu.dll")
|
||||
|
||||
if (EXISTS "${release_src_dir}/llkdu.dll")
|
||||
set(release_llkdu_src "${release_src_dir}/llkdu.dll")
|
||||
set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${release_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
)
|
||||
set(all_targets ${all_targets} ${release_llkdu_dst})
|
||||
|
||||
set(releasesse2_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${releasesse2_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${releasesse2_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
)
|
||||
set(all_targets ${all_targets} ${releasesse2_llkdu_dst})
|
||||
|
||||
set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${relwithdebinfo_llkdu_dst}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
|
||||
DEPENDS ${release_llkdu_src}
|
||||
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
)
|
||||
set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
|
||||
endif (EXISTS "${release_src_dir}/llkdu.dll")
|
||||
|
||||
endif (EXISTS ${internal_llkdu_path})
|
||||
|
||||
# Copy MS C runtime dlls, required for packaging.
|
||||
# *TODO - Adapt this to support VC9
|
||||
if (MSVC80)
|
||||
FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
|
||||
NO_DEFAULT_PATH
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(EXISTS ${debug_msvc8_redist_path})
|
||||
set(debug_msvc8_files
|
||||
msvcr80d.dll
|
||||
msvcp80d.dll
|
||||
Microsoft.VC80.DebugCRT.manifest
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${debug_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
|
||||
out_targets
|
||||
${debug_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(debug_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Debug/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${debug_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLifeDebug.exe.config
|
||||
${debug_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
|
||||
COMMENT "Creating debug app config file"
|
||||
)
|
||||
|
||||
endif (EXISTS ${debug_msvc8_redist_path})
|
||||
|
||||
FIND_PATH(release_msvc8_redist_path msvcr80.dll
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
|
||||
NO_DEFAULT_PATH
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(EXISTS ${release_msvc8_redist_path})
|
||||
set(release_msvc8_files
|
||||
msvcr80.dll
|
||||
msvcp80.dll
|
||||
Microsoft.VC80.CRT.manifest
|
||||
)
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Release"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_msvc8_redist_path}
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
|
||||
out_targets
|
||||
${release_msvc8_files}
|
||||
)
|
||||
set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(release_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Release/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${release_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${release_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating release app config file"
|
||||
)
|
||||
|
||||
set(releasesse2_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${releasesse2_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${releasesse2_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating release-sse2 app config file"
|
||||
)
|
||||
|
||||
set(relwithdebinfo_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${VIEWER_BINARY_NAME}.exe.config)
|
||||
add_custom_command(
|
||||
OUTPUT ${relwithdebinfo_appconfig_file}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
|
||||
${relwithdebinfo_appconfig_file}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
|
||||
COMMENT "Creating relwithdebinfo app config file"
|
||||
)
|
||||
|
||||
endif (EXISTS ${release_msvc8_redist_path})
|
||||
endif (MSVC80)
|
||||
|
||||
add_custom_target(copy_win_libs ALL
|
||||
DEPENDS
|
||||
${all_targets}
|
||||
${release_appconfig_file}
|
||||
${releasesse2_appconfig_file}
|
||||
${relwithdebinfo_appconfig_file}
|
||||
${debug_appconfig_file}
|
||||
)
|
||||
add_dependencies(copy_win_libs prepare)
|
||||
|
||||
if(EXISTS ${internal_llkdu_path})
|
||||
add_dependencies(copy_win_libs llkdu)
|
||||
endif(EXISTS ${internal_llkdu_path})
|
||||
|
||||
1
indra/cmake/Cwdebug.cmake
Normal file
1
indra/cmake/Cwdebug.cmake
Normal file
@@ -0,0 +1 @@
|
||||
set(CWDEBUG_LIBRARIES cwdebug)
|
||||
@@ -43,6 +43,7 @@ endif (NOT FMOD_LIBRARY)
|
||||
|
||||
find_path(FMOD_INCLUDE_DIR fmod.h
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
|
||||
${FMOD_SDK_DIR}/api/inc
|
||||
${FMOD_SDK_DIR}/inc
|
||||
${FMOD_SDK_DIR}
|
||||
|
||||
34
indra/cmake/FindHunSpell.cmake
Normal file
34
indra/cmake/FindHunSpell.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
|
||||
/usr/local/include/hunspell
|
||||
/usr/local/include
|
||||
/usr/include/hunspell
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
|
||||
FIND_LIBRARY(HUNSPELL_LIBRARY
|
||||
NAMES ${HUNSPELL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
SET(HUNSPELL_LIBRARIES ${HUNSPELL_LIBRARY})
|
||||
SET(HUNSPELL_FOUND "YES")
|
||||
ELSE(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
SET(HUNSPELL_FOUND "NO")
|
||||
ENDIF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
|
||||
IF(HUNSPELL_FOUND)
|
||||
IF(NOT HUNSPELL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Hunspell: ${HUNSPELL_LIBRARIES}")
|
||||
ENDIF(NOT HUNSPELL_FIND_QUIETLY)
|
||||
ELSE(HUNSPELL_FOUND)
|
||||
IF(HUNSPELL_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find HunSpell library")
|
||||
ENDIF(HUNSPELL_FIND_REQUIRED)
|
||||
ENDIF(HUNSPELL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
HUNSPELL_LIBRARY
|
||||
HUNSPELL_INCLUDE_DIR
|
||||
)
|
||||
62
indra/cmake/FindLLQtWebkit.cmake
Normal file
62
indra/cmake/FindLLQtWebkit.cmake
Normal file
@@ -0,0 +1,62 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# - Find llqtwebkit
|
||||
# Find the llqtwebkit includes and library
|
||||
# This module defines
|
||||
# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
|
||||
# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
|
||||
# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
|
||||
# also defined, but not for general use are
|
||||
# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
|
||||
# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
|
||||
# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
|
||||
# before compiling code that includes llqtwebkit library files.
|
||||
|
||||
# Try to use pkg-config first.
|
||||
# This allows to have two different libllqtwebkit packages installed:
|
||||
# one for viewer 2.x and one for viewer 1.x.
|
||||
include(FindPkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
||||
set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
|
||||
else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
||||
set(_PACKAGE_ARGS libllqtwebkit)
|
||||
endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
||||
if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
|
||||
# As virtually nobody will have a pkg-config file for this, do this check always quiet.
|
||||
# Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
|
||||
set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
|
||||
endif ()
|
||||
pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
|
||||
|
||||
find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
|
||||
|
||||
find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
|
||||
|
||||
if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
|
||||
set(LLQTWEBKIT_LIBRARIES llqtwebkit)
|
||||
get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
|
||||
endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LLQTWEBKIT
|
||||
DEFAULT_MSG
|
||||
LLQTWEBKIT_LIBRARY
|
||||
LLQTWEBKIT_INCLUDE_DIR
|
||||
LLQTWEBKIT_LIBRARIES
|
||||
LLQTWEBKIT_LIBRARY_DIRS
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
LLQTWEBKIT_LIBRARY
|
||||
LLQTWEBKIT_INCLUDE_DIR
|
||||
LLQTWEBKIT_LIBRARIES
|
||||
LLQTWEBKIT_LIBRARY_DIRS
|
||||
LLQTWEBKIT_DEFINITIONS
|
||||
)
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
#Find the windows manifest tool.
|
||||
|
||||
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
|
||||
IF(HAVE_MANIFEST_TOOL)
|
||||
MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
|
||||
ELSE(HAVE_MANIFEST_TOOL)
|
||||
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
|
||||
ENDIF(HAVE_MANIFEST_TOOL)
|
||||
|
||||
STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
|
||||
${CMAKE_EXE_LINKER_FLAGS})
|
||||
#Find the windows manifest tool.
|
||||
if (MSVC80)
|
||||
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
|
||||
PATHS
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
|
||||
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
|
||||
IF(HAVE_MANIFEST_TOOL)
|
||||
MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
|
||||
ELSE(HAVE_MANIFEST_TOOL)
|
||||
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
|
||||
ENDIF(HAVE_MANIFEST_TOOL)
|
||||
|
||||
STRING(REPLACE "/MANIFEST " "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
|
||||
${CMAKE_EXE_LINKER_FLAGS})
|
||||
|
||||
endif (MSVC80)
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# - Find zlib
|
||||
# Find the ZLIB includes and library
|
||||
# This module defines
|
||||
# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES, the libraries needed to use zlib.
|
||||
# ZLIB_FOUND, If false, do not try to use zlib.
|
||||
#
|
||||
# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
|
||||
# because it doesn't look up the version of zlib, resulting in a dramatic
|
||||
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
|
||||
#
|
||||
# Note: Since this file is only used for standalone, the windows
|
||||
# specific parts were left out.
|
||||
|
||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ZLIB_LIBRARY z)
|
||||
|
||||
if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
SET(ZLIB_FOUND "YES")
|
||||
else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
SET(ZLIB_FOUND "NO")
|
||||
endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
if (NOT ZLIB_FIND_QUIETLY)
|
||||
message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
|
||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
endif (NOT ZLIB_FIND_QUIETLY)
|
||||
else (ZLIB_FOUND)
|
||||
if (ZLIB_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find ZLIB library")
|
||||
endif (ZLIB_FIND_REQUIRED)
|
||||
endif (ZLIB_FOUND)
|
||||
|
||||
mark_as_advanced(
|
||||
ZLIB_LIBRARY
|
||||
ZLIB_INCLUDE_DIR
|
||||
)
|
||||
|
||||
@@ -6,11 +6,13 @@ if (STANDALONE)
|
||||
|
||||
pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
|
||||
pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
|
||||
elseif (LINUX)
|
||||
|
||||
else (STANDALONE)
|
||||
|
||||
# Possibly libxml and glib should have their own .cmake file instead...
|
||||
use_prebuilt_binary(glib) # gstreamer needs glib
|
||||
use_prebuilt_binary(gstreamer)
|
||||
# possible libxml should have its own .cmake file instead
|
||||
use_prebuilt_binary(libxml)
|
||||
use_prebuilt_binary(gstreamer)
|
||||
set(GSTREAMER010_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER010_INCLUDE_DIRS
|
||||
@@ -18,23 +20,47 @@ elseif (LINUX)
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
|
||||
)
|
||||
|
||||
endif (STANDALONE)
|
||||
|
||||
if (WINDOWS)
|
||||
# We don't need to explicitly link against gstreamer itself, because
|
||||
# LLMediaImplGStreamer probes for the system's copy at runtime.
|
||||
set(GSTREAMER010_LIBRARIES
|
||||
gobject-2.0
|
||||
gmodule-2.0
|
||||
dl
|
||||
gthread-2.0
|
||||
rt
|
||||
glib-2.0
|
||||
)
|
||||
endif (STANDALONE)
|
||||
set(GSTREAMER010_LIBRARIES
|
||||
libgstvideo
|
||||
libgstaudio
|
||||
libgstbase-0.10
|
||||
libgstreamer-0.10
|
||||
gobject-2.0
|
||||
gmodule-2.0
|
||||
gthread-2.0
|
||||
glib-2.0
|
||||
)
|
||||
else (WINDOWS)
|
||||
# We don't need to explicitly link against gstreamer itself, because
|
||||
# LLMediaImplGStreamer probes for the system's copy at runtime.
|
||||
set(GSTREAMER010_LIBRARIES
|
||||
gstvideo-0.10
|
||||
gstaudio-0.10
|
||||
gstbase-0.10
|
||||
gstreamer-0.10
|
||||
gobject-2.0
|
||||
gmodule-2.0
|
||||
dl
|
||||
gthread-2.0
|
||||
rt
|
||||
glib-2.0
|
||||
)
|
||||
|
||||
|
||||
endif (WINDOWS)
|
||||
|
||||
|
||||
if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
|
||||
set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
|
||||
add_definitions(-DLL_GSTREAMER010_ENABLED=1)
|
||||
endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
|
||||
|
||||
if (GSTREAMER010)
|
||||
add_definitions(-DLL_GSTREAMER010_ENABLED=1)
|
||||
endif (GSTREAMER010)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,50 +1,51 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindGooglePerfTools)
|
||||
else (STANDALONE)
|
||||
if (LINUX OR WINDOWS)
|
||||
use_prebuilt_binary(google)
|
||||
endif (LINUX OR WINDOWS)
|
||||
if (WINDOWS)
|
||||
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
|
||||
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")
|
||||
endif (WINDOWS)
|
||||
if (LINUX)
|
||||
if(USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_LIBRARIES tcmalloc)
|
||||
set(STACKTRACE_LIBRARIES stacktrace)
|
||||
set(PROFILER_LIBRARIES profiler)
|
||||
else()
|
||||
set(TCMALLOC_LIBRARIES tcmalloc_minimal)
|
||||
endif()
|
||||
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
set(GOOGLE_PERFTOOLS_FOUND "YES")
|
||||
endif (LINUX)
|
||||
endif (STANDALONE)
|
||||
|
||||
#if (GOOGLE_PERFTOOLS_FOUND)
|
||||
# set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
|
||||
#endif (GOOGLE_PERFTOOLS_FOUND)
|
||||
|
||||
# XXX Disable temporarily, until we have compilation issues on 64-bit
|
||||
# Etch sorted.
|
||||
#set(USE_GOOGLE_PERFTOOLS OFF)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
|
||||
else (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
||||
if (NOT(DISABLE_TCMALLOC OR USE_GOOGLE_PERFTOOLS))
|
||||
message(STATUS "Building with Google TCMalloc")
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1_)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES})
|
||||
set(GOOGLE_PERFTOOLS_LINKER_FLAGS ${TCMALLOC_LINKER_FLAGS})
|
||||
endif()
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindGooglePerfTools)
|
||||
else (STANDALONE)
|
||||
if (LINUX OR WINDOWS)
|
||||
use_prebuilt_binary(google)
|
||||
endif (LINUX OR WINDOWS)
|
||||
if (WINDOWS)
|
||||
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
|
||||
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")
|
||||
endif (WINDOWS)
|
||||
if (LINUX)
|
||||
if(USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_LIBRARIES tcmalloc)
|
||||
set(STACKTRACE_LIBRARIES stacktrace)
|
||||
set(PROFILER_LIBRARIES profiler)
|
||||
else()
|
||||
set(TCMALLOC_LIBRARIES tcmalloc_minimal)
|
||||
endif()
|
||||
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
endif (LINUX)
|
||||
endif (STANDALONE)
|
||||
|
||||
if (GOOGLE_PERFTOOLS_FOUND AND STANDALONE)
|
||||
set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
|
||||
else ()
|
||||
set(USE_GOOGLE_PERFTOOLS OFF)
|
||||
endif ()
|
||||
|
||||
# XXX Disable temporarily, until we have compilation issues on 64-bit
|
||||
# Etch sorted.
|
||||
#set(USE_GOOGLE_PERFTOOLS OFF)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
|
||||
else (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
||||
if (NOT(DISABLE_TCMALLOC OR USE_GOOGLE_PERFTOOLS OR STANDALONE))
|
||||
message(STATUS "Building with Google TCMalloc")
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES})
|
||||
set(GOOGLE_PERFTOOLS_LINKER_FLAGS ${TCMALLOC_LINKER_FLAGS})
|
||||
endif()
|
||||
|
||||
16
indra/cmake/HUNSPELL.cmake
Normal file
16
indra/cmake/HUNSPELL.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindHunSpell)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(hunspell)
|
||||
|
||||
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY hunspell-1.2)
|
||||
else (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY libhunspell)
|
||||
endif (LINUX OR DARWIN)
|
||||
endif (STANDALONE)
|
||||
@@ -3,6 +3,7 @@
|
||||
INCLUDE(APR)
|
||||
INCLUDE(LLMath)
|
||||
INCLUDE(Tut)
|
||||
INCLUDE(Cwdebug)
|
||||
|
||||
MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
|
||||
# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
|
||||
|
||||
@@ -5,11 +5,22 @@ include(Boost)
|
||||
include(EXPAT)
|
||||
include(ZLIB)
|
||||
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(CORESERVICES_LIBRARY CoreServices)
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
set(LLCOMMON_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/cwdebug
|
||||
${LIBS_OPEN_DIR}/llcommon
|
||||
${APRUTIL_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(LLCOMMON_LIBRARIES llcommon)
|
||||
|
||||
set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
add_definitions(-DLL_COMMON_LINK_SHARED=1)
|
||||
endif(LLCOMMON_LINK_SHARED)
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
include(Boost)
|
||||
|
||||
set(LLVFS_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llvfs
|
||||
)
|
||||
|
||||
set(LLVFS_LIBRARIES llvfs)
|
||||
set(LLVFS_LIBRARIES
|
||||
llvfs
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -13,11 +13,11 @@ if (STANDALONE)
|
||||
SDL_LIBRARY
|
||||
)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(SDL)
|
||||
if (NOT DARWIN)
|
||||
use_prebuilt_binary(mesa)
|
||||
endif (NOT DARWIN)
|
||||
if (LINUX AND VIEWER)
|
||||
use_prebuilt_binary(SDL)
|
||||
set (SDL_FOUND TRUE)
|
||||
set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux)
|
||||
set (SDL_LIBRARY SDL)
|
||||
|
||||
@@ -42,6 +42,7 @@ if (WINDOWS)
|
||||
wldap32
|
||||
gdi32
|
||||
user32
|
||||
dbghelp
|
||||
)
|
||||
else (WINDOWS)
|
||||
set(WINDOWS_LIBRARIES "")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
include(BasicPluginBase)
|
||||
|
||||
set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/media_plugins/base/
|
||||
)
|
||||
|
||||
set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
|
||||
set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS ${LIBS_OPEN_DIR}/plugins/base_media ${BASIC_PLUGIN_BASE_INCLUDE_DIRS})
|
||||
set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base ${BASIC_PLUGIN_BASE_LIBRARIES})
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
include(Prebuilt)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
use_prebuilt_binary(GL)
|
||||
use_prebuilt_binary(glext)
|
||||
# possible glh_linear should have its own .cmake file instead
|
||||
use_prebuilt_binary(glh_linear)
|
||||
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
#use_prebuilt_binary(glh_linear)
|
||||
# actually... not any longer, it's now in git -SG
|
||||
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
@@ -8,6 +8,10 @@ if (STANDALONE)
|
||||
include(FindPNG)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(libpng)
|
||||
set(PNG_LIBRARIES png12)
|
||||
if (WINDOWS)
|
||||
set(PNG_LIBRARIES libpng15)
|
||||
else (WINDOWS)
|
||||
set(PNG_LIBRARIES png12)
|
||||
endif (WINDOWS)
|
||||
set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
set(PYTHONINTERP_FOUND)
|
||||
|
||||
if (WINDOWS)
|
||||
# On Windows, explicitly avoid Cygwin Python.
|
||||
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python25.exe python23.exe python.exe
|
||||
NO_DEFAULT_PATH # added so that cmake does not find cygwin python
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||
|
||||
)
|
||||
elseif (EXISTS /etc/debian_version)
|
||||
# On Debian and Ubuntu, avoid Python 2.4 if possible.
|
||||
|
||||
find_program(PYTHON_EXECUTABLE python2.5 python2.3 python PATHS /usr/bin)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# On MAC OS X be sure to search standard locations first
|
||||
|
||||
string(REPLACE ":" ";" PATH_LIST "$ENV{PATH}")
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python python25 python24 python23
|
||||
NO_DEFAULT_PATH # Avoid searching non-standard locations first
|
||||
PATHS
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
${PATH_LIST}
|
||||
)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
else (WINDOWS)
|
||||
include(FindPythonInterp)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (NOT PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "No Python interpreter found")
|
||||
endif (NOT PYTHON_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
||||
# -*- cmake -*-
|
||||
|
||||
set(PYTHONINTERP_FOUND)
|
||||
|
||||
if (WINDOWS)
|
||||
# On Windows, explicitly avoid Cygwin Python.
|
||||
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python25.exe python23.exe python.exe
|
||||
NO_DEFAULT_PATH # added so that cmake does not find cygwin python
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
|
||||
|
||||
)
|
||||
elseif (EXISTS /etc/debian_version)
|
||||
# On Debian and Ubuntu, avoid Python 2.4 if possible.
|
||||
|
||||
find_program(PYTHON_EXECUTABLE python2.5 python2.3 python PATHS /usr/bin)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# On MAC OS X be sure to search standard locations first
|
||||
|
||||
string(REPLACE ":" ";" PATH_LIST "$ENV{PATH}")
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python python25 python24 python23
|
||||
NO_DEFAULT_PATH # Avoid searching non-standard locations first
|
||||
PATHS
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
${PATH_LIST}
|
||||
)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
else (WINDOWS)
|
||||
include(FindPythonInterp)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (NOT PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "No Python interpreter found")
|
||||
endif (NOT PYTHON_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
||||
|
||||
@@ -42,6 +42,7 @@ else (STANDALONE)
|
||||
gdk_pixbuf-2.0
|
||||
Xinerama
|
||||
glib-2.0
|
||||
gio-2.0
|
||||
gmodule-2.0
|
||||
gobject-2.0
|
||||
gthread-2.0
|
||||
|
||||
@@ -30,7 +30,7 @@ set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
|
||||
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
|
||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
||||
set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
|
||||
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
|
||||
set(VISTA_ICON OFF CACHE BOOL "Allow vista icon with pre 2008 Visual Studio IDEs. (Assumes replacement old rcdll.dll with new rcdll.dll from win sdk 7.0 or later)")
|
||||
|
||||
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
|
||||
|
||||
@@ -3,9 +3,24 @@ include(Prebuilt)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
use_prebuilt_binary(vivox)
|
||||
if (LINUX)
|
||||
#use_prebuilt_binary(libuuid)
|
||||
if(LINUX)
|
||||
use_prebuilt_binary(libuuid)
|
||||
if (${ARCH} STREQUAL "x86_64")
|
||||
use_prebuilt_binary(32bitcompatibilitylibs)
|
||||
endif (${ARCH} STREQUAL "x86_64")
|
||||
use_prebuilt_binary(fontconfig)
|
||||
endif (LINUX)
|
||||
endif(LINUX)
|
||||
else (NOT STANDALONE)
|
||||
# Download there even when using standalone.
|
||||
set(STANDALONE OFF)
|
||||
use_prebuilt_binary(vivox)
|
||||
if(LINUX AND ${ARCH} STREQUAL "x86_64")
|
||||
use_prebuilt_binary(32bitcompatibilitylibs)
|
||||
endif(LINUX AND ${ARCH} STREQUAL "x86_64")
|
||||
set(STANDALONE ON)
|
||||
endif(NOT STANDALONE)
|
||||
|
||||
if (WINDOWS)
|
||||
use_prebuilt_binary(dbghelp)
|
||||
endif (WINDOWS)
|
||||
|
||||
|
||||
@@ -3,7 +3,29 @@ include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
find_package(LLQtWebkit REQUIRED)
|
||||
# The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny.
|
||||
find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
set(QTDIR $ENV{QTDIR})
|
||||
if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
|
||||
message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
|
||||
"Qt is found by looking for qmake in your PATH. "
|
||||
"Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
|
||||
"or unset QTDIR if the found Qt is correct.")
|
||||
endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
|
||||
find_package(LLQtWebkit REQUIRED QUIET)
|
||||
# Add the plugins.
|
||||
set(QT_PLUGIN_LIBRARIES)
|
||||
foreach(qlibname qgif qjpeg)
|
||||
find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
|
||||
if (QT_PLUGIN_${qlibname})
|
||||
list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
|
||||
else (QT_PLUGIN_${qtlibname})
|
||||
message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
|
||||
endif (QT_PLUGIN_${qlibname})
|
||||
endforeach(qlibname)
|
||||
# qjpeg depends on libjpeg
|
||||
list(APPEND QT_PLUGIN_LIBRARIES jpeg)
|
||||
set(WEBKITLIBPLUGIN OFF CACHE BOOL
|
||||
"WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
|
||||
else (STANDALONE)
|
||||
@@ -32,25 +54,25 @@ if (WINDOWS)
|
||||
elseif (DARWIN)
|
||||
set(WEBKIT_PLUGIN_LIBRARIES
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
|
||||
debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllqtwebkit.dylib
|
||||
)
|
||||
elseif (LINUX)
|
||||
if (STANDALONE)
|
||||
set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY})
|
||||
else (STANDALONE)
|
||||
if (STANDALONE)
|
||||
set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
|
||||
else (STANDALONE)
|
||||
set(WEBKIT_PLUGIN_LIBRARIES
|
||||
llqtwebkit
|
||||
qgif
|
||||
qjpeg
|
||||
QtWebKit
|
||||
QtOpenGL
|
||||
QtNetwork
|
||||
QtGui
|
||||
QtCore
|
||||
fontconfig
|
||||
X11
|
||||
Xrender
|
||||
GL
|
||||
)
|
||||
endif (STANDALONE)
|
||||
llqtwebkit
|
||||
QtWebKit
|
||||
QtOpenGL
|
||||
QtNetwork
|
||||
QtGui
|
||||
QtCore
|
||||
jscore
|
||||
jpeg
|
||||
fontconfig
|
||||
X11
|
||||
Xrender
|
||||
GL
|
||||
)
|
||||
endif (STANDALONE)
|
||||
endif (WINDOWS)
|
||||
|
||||
@@ -8,10 +8,6 @@ if (STANDALONE)
|
||||
include(FindXmlRpcEpi)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(xmlrpc-epi)
|
||||
if (WINDOWS)
|
||||
set(XMLRPCEPI_LIBRARIES xmlrpcepi)
|
||||
else (WINDOWS)
|
||||
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
|
||||
endif (WINDOWS)
|
||||
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
|
||||
set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE)
|
||||
|
||||
39
indra/cwdebug/CMakeLists.txt
Normal file
39
indra/cwdebug/CMakeLists.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(cwdebug)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(cwdebug_SOURCE_FILES
|
||||
debug.cc
|
||||
)
|
||||
|
||||
set(cwdebug_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
cwdebug.h
|
||||
sys.h
|
||||
debug.h
|
||||
debug_ostream_operators.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${cwdebug_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
if(NOT WORD_SIZE EQUAL 32)
|
||||
if(WINDOWS)
|
||||
add_definitions(/FIXED:NO)
|
||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
||||
add_definitions(-fPIC)
|
||||
endif(WINDOWS)
|
||||
endif (NOT WORD_SIZE EQUAL 32)
|
||||
|
||||
list(APPEND cwdebug_SOURCE_FILES ${cwdebug_HEADER_FILES})
|
||||
|
||||
add_library (cwdebug ${cwdebug_SOURCE_FILES})
|
||||
9
indra/cwdebug/cwdebug.h
Normal file
9
indra/cwdebug/cwdebug.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// We support compiling C++ source files that are not
|
||||
// thread-safe, but in that case we assume that they
|
||||
// will not be linked with libcwd_r.
|
||||
#if !defined(_REENTRANT) || !defined(__linux__)
|
||||
#undef CWDEBUG
|
||||
#endif
|
||||
|
||||
#include "sys.h"
|
||||
#include "debug.h"
|
||||
413
indra/cwdebug/debug.cc
Normal file
413
indra/cwdebug/debug.cc
Normal file
@@ -0,0 +1,413 @@
|
||||
// slviewer -- Second Life Viewer Source Code
|
||||
//
|
||||
//! @file debug.cc
|
||||
//! @brief This file contains the definitions of debug related objects and functions.
|
||||
//
|
||||
// Copyright (C) 2008, by
|
||||
//
|
||||
// Carlo Wood, Run on IRC <carlo@alinoe.com>
|
||||
// RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
|
||||
// Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef USE_PCH
|
||||
#include "sys.h" // Needed for platform-specific code
|
||||
#endif
|
||||
|
||||
#ifdef CWDEBUG
|
||||
|
||||
#ifndef USE_PCH
|
||||
#include <cctype> // Needed for std::isprint
|
||||
#include <iomanip> // Needed for setfill and setw
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include "debug.h"
|
||||
#ifdef USE_LIBCW
|
||||
#include <libcw/memleak.h> // memleak_filter
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif // USE_PCH
|
||||
|
||||
#define BACKTRACE_AQUIRE_LOCK libcwd::_private_::mutex_tct<libcwd::_private_::backtrace_instance>::lock()
|
||||
#define BACKTRACE_RELEASE_LOCK libcwd::_private_::mutex_tct<libcwd::_private_::backtrace_instance>::unlock()
|
||||
|
||||
namespace debug {
|
||||
|
||||
#if CWDEBUG_LOCATION
|
||||
void BackTrace::dump_backtrace(void) const
|
||||
{
|
||||
for (int frame = 0; frame < frames(); ++frame)
|
||||
{
|
||||
libcwd::location_ct loc((char*)buffer()[frame] + libcwd::builtin_return_address_offset);
|
||||
Dout(dc::notice|continued_cf, '#' << std::left << std::setw(3) << frame <<
|
||||
std::left << std::setw(16) << buffer()[frame] << ' ' << loc << "\n in ");
|
||||
char const* mangled_function_name = loc.mangled_function_name();
|
||||
if (mangled_function_name != libcwd::unknown_function_c)
|
||||
{
|
||||
std::string demangled_function_name;
|
||||
libcwd::demangle_symbol(mangled_function_name, demangled_function_name);
|
||||
Dout(dc::finish, demangled_function_name);
|
||||
}
|
||||
else
|
||||
Dout(dc::finish, mangled_function_name);
|
||||
}
|
||||
}
|
||||
#endif // CWDEBUG_LOCATION
|
||||
|
||||
#if CWDEBUG_ALLOC && CWDEBUG_LOCATION
|
||||
typedef std::map<BackTrace, int, std::less<BackTrace>, libcwd::_private_::internal_allocator> backtrace_map_t;
|
||||
backtrace_map_t* backtrace_map;
|
||||
static int total_calls = 0;
|
||||
static int number_of_stack_traces = 0;
|
||||
|
||||
void my_backtrace_hook(void** buffer, int frames LIBCWD_COMMA_TSD_PARAM)
|
||||
{
|
||||
++total_calls;
|
||||
|
||||
backtrace_map_t::iterator iter;
|
||||
|
||||
set_alloc_checking_off(__libcwd_tsd);
|
||||
{
|
||||
BackTrace backtrace(buffer, frames);
|
||||
std::pair<backtrace_map_t::iterator, bool> res = backtrace_map->insert(backtrace_map_t::value_type(backtrace, 0));
|
||||
if (res.second)
|
||||
++number_of_stack_traces;
|
||||
++res.first->second;
|
||||
iter = res.first;
|
||||
}
|
||||
set_alloc_checking_on(__libcwd_tsd);
|
||||
#if 0
|
||||
// Dump the stack trace.
|
||||
iter->first.dump_backtrace();
|
||||
#endif
|
||||
}
|
||||
|
||||
void start_recording_backtraces(void)
|
||||
{
|
||||
BACKTRACE_AQUIRE_LOCK;
|
||||
libcwd::backtrace_hook = my_backtrace_hook;
|
||||
BACKTRACE_RELEASE_LOCK;
|
||||
//Debug(dc::malloc.on());
|
||||
LIBCWD_TSD_DECLARATION;
|
||||
set_alloc_checking_off(__libcwd_tsd);
|
||||
backtrace_map = new backtrace_map_t;
|
||||
set_alloc_checking_on(__libcwd_tsd);
|
||||
}
|
||||
|
||||
struct Compare {
|
||||
bool operator()(backtrace_map_t::const_iterator const& iter1, backtrace_map_t::const_iterator const& iter2)
|
||||
{
|
||||
return iter1->second > iter2->second;
|
||||
}
|
||||
};
|
||||
|
||||
void stop_recording_backtraces(void)
|
||||
{
|
||||
//Debug(dc::malloc.off());
|
||||
BACKTRACE_AQUIRE_LOCK;
|
||||
libcwd::backtrace_hook = NULL;
|
||||
|
||||
if (!backtrace_map)
|
||||
{
|
||||
Dout(dc::notice, "Not recording; call cwdebug_start() first.");
|
||||
return;
|
||||
}
|
||||
|
||||
Dout(dc::notice, "Total number of calls: " << total_calls);
|
||||
Dout(dc::notice, "Number of different stack traces: " << number_of_stack_traces);
|
||||
Dout(dc::notice, "First 10 stack traces:");
|
||||
std::list<backtrace_map_t::const_iterator> entries;
|
||||
for (backtrace_map_t::const_iterator iter = backtrace_map->begin(); iter != backtrace_map->end(); ++iter)
|
||||
entries.push_back(iter);
|
||||
entries.sort(Compare());
|
||||
int count = 0;
|
||||
for (std::list<backtrace_map_t::const_iterator>::iterator iter = entries.begin(); iter != entries.end(); ++iter, ++count)
|
||||
{
|
||||
Dout(dc::notice, "Used: " << (*iter)->second);
|
||||
// Dump the stack trace.
|
||||
(*iter)->first.dump_backtrace();
|
||||
if (count == 10)
|
||||
break;
|
||||
}
|
||||
|
||||
// Clear all data.
|
||||
LIBCWD_TSD_DECLARATION;
|
||||
set_alloc_checking_off(__libcwd_tsd);
|
||||
delete backtrace_map;
|
||||
set_alloc_checking_on(__libcwd_tsd);
|
||||
backtrace_map = NULL;
|
||||
total_calls = 0;
|
||||
number_of_stack_traces = 0;
|
||||
|
||||
BACKTRACE_RELEASE_LOCK;
|
||||
}
|
||||
#endif // CWDEBUG_ALLOC && CWDEBUG_LOCATION
|
||||
|
||||
namespace channels { // namespace DEBUGCHANNELS
|
||||
namespace dc {
|
||||
|
||||
#ifndef DOXYGEN
|
||||
#define DDCN(x) (x)
|
||||
#endif
|
||||
// Add new debug channels here.
|
||||
|
||||
channel_ct viewer DDCN("VIEWER"); //!< This debug channel is used for the normal debugging out of the viewer.
|
||||
channel_ct primbackup DDCN("PRIMBACKUP"); //!< This debug channel is used for output related to primbackup.
|
||||
channel_ct gtk DDCN("GTK"); //!< This debug channel is used for output related to gtk.
|
||||
channel_ct sdl DDCN("SDL"); //!< This debug channel is used for output related to sdl locking.
|
||||
channel_ct backtrace DDCN("BACKTRACE"); //!< This debug channel is used for backtraces.
|
||||
channel_ct statemachine DDCN("STATEMACHINE"); //!< This debug channel is used class AIStateMachine.
|
||||
|
||||
} // namespace dc
|
||||
} // namespace DEBUGCHANNELS
|
||||
|
||||
// Anonymous namespace, this map and its initialization functions are private to this file
|
||||
// for Thead-safeness reasons.
|
||||
namespace {
|
||||
|
||||
/*! @brief The type of rcfile_dc_states.
|
||||
* @internal
|
||||
*/
|
||||
typedef std::map<std::string, bool> rcfile_dc_states_type;
|
||||
|
||||
/*! @brief Map containing the default debug channel states used at the start of each new thread.
|
||||
* @internal
|
||||
*
|
||||
* The first thread calls main, which calls debug::init which will initialize this
|
||||
* map with all debug channel labels and whether or not they were turned on in the
|
||||
* rcfile or not.
|
||||
*/
|
||||
rcfile_dc_states_type rcfile_dc_states;
|
||||
|
||||
/*! @brief Set the default state of debug channel \a dc_label.
|
||||
* @internal
|
||||
*
|
||||
* This function is called once for each debug channel.
|
||||
*/
|
||||
void set_state(char const* dc_label, bool is_on)
|
||||
{
|
||||
std::pair<rcfile_dc_states_type::iterator, bool> res =
|
||||
rcfile_dc_states.insert(rcfile_dc_states_type::value_type(std::string(dc_label), is_on));
|
||||
if (!res.second)
|
||||
Dout(dc::warning, "Calling set_state() more than once for the same label!");
|
||||
return;
|
||||
}
|
||||
|
||||
/*! @brief Save debug channel states.
|
||||
* @internal
|
||||
*
|
||||
* One time initialization function of rcfile_dc_state.
|
||||
* This must be called from debug::init after reading the rcfile.
|
||||
*/
|
||||
void save_dc_states(void)
|
||||
{
|
||||
// We may only call this function once: it reflects the states as stored
|
||||
// in the rcfile and that won't change. Therefore it is not needed to
|
||||
// lock `rcfile_dc_states', it is only written to by the first thread
|
||||
// (once, via main -> init) when there are no other threads yet.
|
||||
static bool second_time = false;
|
||||
if (second_time)
|
||||
{
|
||||
Dout(dc::warning, "Calling save_dc_states() more than once!");
|
||||
return;
|
||||
}
|
||||
second_time = true;
|
||||
ForAllDebugChannels( set_state(debugChannel.get_label(), debugChannel.is_on()) );
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
/*! @brief Returns the the original state of a debug channel.
|
||||
* @internal
|
||||
*
|
||||
* For a given \a dc_label, which must be the exact name (<tt>channel_ct::get_label</tt>) of an
|
||||
* existing debug channel, this function returns \c true when the corresponding debug channel was
|
||||
* <em>on</em> at the startup of the application, directly after reading the libcwd runtime
|
||||
* configuration file (.libcwdrc).
|
||||
*
|
||||
* If the label/channel did not exist at the start of the application, it will return \c false
|
||||
* (note that libcwd disallows adding debug channels to modules - so this would probably
|
||||
* a bug).
|
||||
*/
|
||||
bool is_on_in_rcfile(char const* dc_label)
|
||||
{
|
||||
rcfile_dc_states_type::const_iterator iter = rcfile_dc_states.find(std::string(dc_label));
|
||||
if (iter == rcfile_dc_states.end())
|
||||
{
|
||||
Dout(dc::warning, "is_on_in_rcfile(\"" << dc_label << "\"): \"" << dc_label << "\" is an unknown label!");
|
||||
return false;
|
||||
}
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
#if LIBCWD_THREAD_SAFE
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
// I can cause I'm the maintainer of libcwd ;).
|
||||
libcwd::_private_::pthread_lock_interface_ct cout_mutex(&mutex);
|
||||
libcwd::_private_::lock_interface_base_ct* cout_mutex_ptr(&cout_mutex);
|
||||
#endif
|
||||
|
||||
/*! @brief Initialize debugging code from new threads.
|
||||
*
|
||||
* This function needs to be called at the start of each new thread,
|
||||
* because a new thread starts in a completely reset state.
|
||||
*
|
||||
* The function turns on all debug channels that were turned on
|
||||
* after reading the rcfile at the start of the application.
|
||||
* Furthermore it initializes the debug ostream, its mutex and the
|
||||
* margin of the default debug object (Dout).
|
||||
*/
|
||||
void init_thread(void)
|
||||
{
|
||||
// Turn on all debug channels that are turned on as per rcfile configuration.
|
||||
ForAllDebugChannels(
|
||||
if (!debugChannel.is_on() && is_on_in_rcfile(debugChannel.get_label()))
|
||||
debugChannel.on();
|
||||
);
|
||||
|
||||
// Turn on debug output.
|
||||
Debug( libcw_do.on() );
|
||||
static std::ofstream debug_file;
|
||||
static bool debug_out_opened = false;
|
||||
if (!debug_out_opened)
|
||||
{
|
||||
debug_out_opened = true; // Thread-safe, cause the main thread calls this first while it's still alone.
|
||||
std::ostringstream os;
|
||||
os << "debug.out." << getpid();
|
||||
debug_file.open(os.str().c_str());
|
||||
}
|
||||
static debug::TeeStream debug_stream(std::cout, debug_file);
|
||||
#if LIBCWD_THREAD_SAFE
|
||||
Debug( libcw_do.set_ostream(&debug_stream, cout_mutex_ptr) );
|
||||
#else
|
||||
Debug( libcw_do.set_ostream(&debug_stream) );
|
||||
#endif
|
||||
|
||||
static bool first_thread = true;
|
||||
if (!first_thread) // So far, the application has only one thread. So don't add a thread id.
|
||||
{
|
||||
// Set the thread id in the margin.
|
||||
char margin[18];
|
||||
sprintf(margin, "0x%-14lx ", pthread_self());
|
||||
Debug( libcw_do.margin().assign(margin, 17) );
|
||||
}
|
||||
first_thread = false;
|
||||
}
|
||||
|
||||
/*! @brief Initialize debugging code from main.
|
||||
*
|
||||
* This function initializes the debug code.
|
||||
*/
|
||||
void init(void)
|
||||
{
|
||||
#if CWDEBUG_ALLOC && defined(USE_LIBCW)
|
||||
// Tell the memory leak detector which parts of the code are
|
||||
// expected to leak so that we won't get an alarm for those.
|
||||
{
|
||||
std::vector<std::pair<std::string, std::string> > hide_list;
|
||||
hide_list.push_back(std::pair<std::string, std::string>("libdl.so.2", "_dlerror_run"));
|
||||
hide_list.push_back(std::pair<std::string, std::string>("libstdc++.so.6", "__cxa_get_globals"));
|
||||
// The following is actually necessary because of a bug in glibc
|
||||
// (see http://sources.redhat.com/bugzilla/show_bug.cgi?id=311).
|
||||
hide_list.push_back(std::pair<std::string, std::string>("libc.so.6", "dl_open_worker"));
|
||||
memleak_filter().hide_functions_matching(hide_list);
|
||||
}
|
||||
{
|
||||
std::vector<std::string> hide_list;
|
||||
// Also because of http://sources.redhat.com/bugzilla/show_bug.cgi?id=311
|
||||
hide_list.push_back(std::string("ld-linux.so.2"));
|
||||
memleak_filter().hide_objectfiles_matching(hide_list);
|
||||
}
|
||||
memleak_filter().set_flags(libcwd::show_objectfile|libcwd::show_function);
|
||||
#endif
|
||||
|
||||
// The following call allocated the filebuf's of cin, cout, cerr, wcin, wcout and wcerr.
|
||||
// Because this causes a memory leak being reported, make them invisible.
|
||||
Debug(set_invisible_on());
|
||||
|
||||
// You want this, unless you mix streams output with C output.
|
||||
// Read http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8 for an explanation.
|
||||
//std::ios::sync_with_stdio(false);
|
||||
|
||||
// Cancel previous call to set_invisible_on.
|
||||
Debug(set_invisible_off());
|
||||
|
||||
// This will warn you when you are using header files that do not belong to the
|
||||
// shared libcwd object that you linked with.
|
||||
Debug( check_configuration() );
|
||||
|
||||
Debug(
|
||||
libcw_do.on(); // Show which rcfile we are reading!
|
||||
ForAllDebugChannels(
|
||||
while (debugChannel.is_on())
|
||||
debugChannel.off() // Print as little as possible though.
|
||||
);
|
||||
read_rcfile(); // Put 'silent = on' in the rcfile to suppress most of the output here.
|
||||
libcw_do.off()
|
||||
);
|
||||
save_dc_states();
|
||||
|
||||
init_thread();
|
||||
}
|
||||
|
||||
#if CWDEBUG_LOCATION
|
||||
/*! @brief Return call location.
|
||||
*
|
||||
* @param return_addr The return address of the call.
|
||||
*/
|
||||
std::string call_location(void const* return_addr)
|
||||
{
|
||||
libcwd::location_ct loc((char*)return_addr + libcwd::builtin_return_address_offset);
|
||||
std::ostringstream convert;
|
||||
convert << loc;
|
||||
return convert.str();
|
||||
}
|
||||
|
||||
std::vector<BackTrace> __attribute__ ((visibility("default"))) backtraces;
|
||||
pthread_mutex_t __attribute__ ((visibility("default"))) backtrace_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
} // namespace debug
|
||||
|
||||
#if CWDEBUG_ALLOC
|
||||
// These can be called from gdb.
|
||||
void cwdebug_start()
|
||||
{
|
||||
debug::start_recording_backtraces();
|
||||
}
|
||||
|
||||
void cwdebug_stop()
|
||||
{
|
||||
debug::stop_recording_backtraces();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CWDEBUG_LOCATION
|
||||
void cwdebug_backtrace(int n)
|
||||
{
|
||||
if (0 < n && n <= debug::backtraces.size())
|
||||
{
|
||||
Dout(dc::backtrace, "Backtrace #" << n << ":");
|
||||
debug::backtraces[n - 1].dump_backtrace();
|
||||
}
|
||||
else
|
||||
std::cout << "No such backtrace nr. Max is " << debug::backtraces.size() << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CWDEBUG
|
||||
257
indra/cwdebug/debug.h
Normal file
257
indra/cwdebug/debug.h
Normal file
@@ -0,0 +1,257 @@
|
||||
// slviewer -- Second Life Viewer Source Code
|
||||
//
|
||||
//! @file debug.h
|
||||
//! @brief This file contains the declaration of debug related macros, objects and functions.
|
||||
//
|
||||
// Copyright (C) 2008, by
|
||||
//
|
||||
// Carlo Wood, Run on IRC <carlo@alinoe.com>
|
||||
// RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
|
||||
// Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#ifndef CWDEBUG
|
||||
|
||||
#ifndef DOXYGEN // No need to document this. See http://libcwd.sourceforge.net/ for more info.
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib> // std::exit, EXIT_FAILURE
|
||||
|
||||
#define AllocTag1(p)
|
||||
#define AllocTag2(p, desc)
|
||||
#define AllocTag_dynamic_description(p, x)
|
||||
#define AllocTag(p, x)
|
||||
#define Debug(x)
|
||||
#define Dout(a, b)
|
||||
#define DoutEntering(a, b)
|
||||
#define DoutFatal(a, b) LibcwDoutFatal(::std, , a, b)
|
||||
#define ForAllDebugChannels(STATEMENT)
|
||||
#define ForAllDebugObjects(STATEMENT)
|
||||
#define LibcwDebug(dc_namespace, x)
|
||||
#define LibcwDout(a, b, c, d)
|
||||
#define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(EXIT_FAILURE); } while (1)
|
||||
#define NEW(x) new x
|
||||
#define CWDEBUG_ALLOC 0
|
||||
#define CWDEBUG_MAGIC 0
|
||||
#define CWDEBUG_LOCATION 0
|
||||
#define CWDEBUG_LIBBFD 0
|
||||
#define CWDEBUG_DEBUG 0
|
||||
#define CWDEBUG_DEBUGOUTPUT 0
|
||||
#define CWDEBUG_DEBUGM 0
|
||||
#define CWDEBUG_DEBUGT 0
|
||||
#define CWDEBUG_MARKER 0
|
||||
|
||||
#define BACKTRACE do { } while(0)
|
||||
|
||||
#endif // !DOXYGEN
|
||||
|
||||
#include <cassert>
|
||||
#ifdef DEBUG
|
||||
#define ASSERT(x) assert(x)
|
||||
#else
|
||||
#define ASSERT(x)
|
||||
#endif
|
||||
|
||||
#else // CWDEBUG
|
||||
|
||||
//! Assert \a x, if debugging is turned on.
|
||||
#define ASSERT(x) LIBCWD_ASSERT(x)
|
||||
#define builtin_return_address(addr) ((char*)__builtin_return_address(addr) + libcwd::builtin_return_address_offset)
|
||||
|
||||
#ifndef DEBUGCHANNELS
|
||||
//! @brief The namespace in which the \c dc namespace is declared.
|
||||
//
|
||||
// <A HREF="http://libcwd.sourceforge.net/">Libcwd</A> demands that this macro is defined
|
||||
// before <libcwd/debug.h> is included and must be the name of the namespace containing
|
||||
// the \c dc (Debug Channels) namespace.
|
||||
//
|
||||
// @sa debug::channels::dc
|
||||
|
||||
#define DEBUGCHANNELS ::debug::channels
|
||||
#endif
|
||||
#include <libcwd/debug.h>
|
||||
#include <boost/shared_array.hpp>
|
||||
#if CWDEBUG_LOCATION
|
||||
#include <execinfo.h> // Needed for 'backtrace'.
|
||||
#endif
|
||||
|
||||
#define CWD_API __attribute__ ((visibility("default")))
|
||||
|
||||
//! Debug specific code.
|
||||
namespace debug {
|
||||
|
||||
void CWD_API init(void); // Initialize debugging code, called once from main.
|
||||
void CWD_API init_thread(void); // Initialize debugging code, called once for each thread.
|
||||
|
||||
//! @brief Debug Channels (dc) namespace.
|
||||
//
|
||||
// @sa debug::channels::dc
|
||||
namespace channels { // namespace DEBUGCHANNELS
|
||||
|
||||
//! The namespace containing the actual debug channels.
|
||||
namespace dc {
|
||||
using namespace libcwd::channels::dc;
|
||||
using libcwd::channel_ct;
|
||||
|
||||
#ifndef DOXYGEN // Doxygen bug causes a warning here.
|
||||
// Add the declaration of new debug channels here
|
||||
// and add their definition in a custom debug.cc file.
|
||||
extern CWD_API channel_ct viewer; // The normal logging output of the viewer (normally to stderr).
|
||||
extern CWD_API channel_ct primbackup;
|
||||
extern CWD_API channel_ct gtk;
|
||||
extern CWD_API channel_ct sdl;
|
||||
extern CWD_API channel_ct backtrace;
|
||||
extern CWD_API channel_ct statemachine;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace dc
|
||||
} // namespace DEBUGCHANNELS
|
||||
|
||||
#if CWDEBUG_LOCATION
|
||||
std::string call_location(void const* return_addr);
|
||||
#endif
|
||||
|
||||
//! @brief Interface for marking scopes of invisible memory allocations.
|
||||
//
|
||||
// Creation of the object does nothing, you have to explicitly call
|
||||
// InvisibleAllocations::on. Destruction of the object automatically
|
||||
// cancels any call to \c on of this object. This makes it exception-
|
||||
// (stack unwinding) and recursive-safe.
|
||||
struct InvisibleAllocations {
|
||||
int M_on; //!< The number of times that InvisibleAllocations::on() was called.
|
||||
//! Constructor.
|
||||
InvisibleAllocations() : M_on(0) { }
|
||||
//! Destructor.
|
||||
~InvisibleAllocations() { while (M_on > 0) off(); }
|
||||
//! Set invisible allocations on. Can be called recursively.
|
||||
void on(void) { libcwd::set_invisible_on(); ++M_on; }
|
||||
//! Cancel one call to on().
|
||||
void off(void) { assert(M_on > 0); --M_on; libcwd::set_invisible_off(); }
|
||||
};
|
||||
|
||||
//! @brief Interface for marking scopes with indented debug output.
|
||||
//
|
||||
// Creation of the object increments the debug indentation. Destruction
|
||||
// of the object automatically decrements the indentation again.
|
||||
struct Indent {
|
||||
int M_indent; //!< The extra number of spaces that were added to the indentation.
|
||||
//! Construct an Indent object.
|
||||
Indent(int indent) : M_indent(indent) { if (M_indent > 0) libcwd::libcw_do.inc_indent(M_indent); }
|
||||
//! Destructor.
|
||||
~Indent() { if (M_indent > 0) libcwd::libcw_do.dec_indent(M_indent); }
|
||||
};
|
||||
|
||||
// A class streambuf that splits what is written to two streambufs.
|
||||
class TeeBuf : public std::streambuf {
|
||||
private:
|
||||
std::streambuf* M_sb1;
|
||||
std::streambuf* M_sb2;
|
||||
|
||||
public:
|
||||
TeeBuf(std::streambuf* sb1, std::streambuf* sb2) : M_sb1(sb1), M_sb2(sb2) { }
|
||||
|
||||
protected:
|
||||
virtual int sync(void) { M_sb2->pubsync(); return M_sb1->pubsync(); }
|
||||
virtual std::streamsize xsputn(char_type const* p, std::streamsize n) { M_sb2->sputn(p, n); return M_sb1->sputn(p, n); }
|
||||
virtual int_type overflow(int_type c = traits_type::eof()) { M_sb2->sputc(c); return M_sb1->sputc(c); }
|
||||
};
|
||||
|
||||
// An ostream that passes what is written to it on to two other ostreams.
|
||||
class TeeStream : public std::ostream {
|
||||
private:
|
||||
TeeBuf M_teebuf;
|
||||
public:
|
||||
TeeStream(std::ostream& os1, std::ostream& os2) : std::ostream(&M_teebuf), M_teebuf(os1.rdbuf(), os2.rdbuf()) { }
|
||||
};
|
||||
|
||||
#if CWDEBUG_LOCATION
|
||||
class BackTrace {
|
||||
private:
|
||||
boost::shared_array<void*> M_buffer;
|
||||
int M_frames;
|
||||
public:
|
||||
BackTrace(void** buffer, int frames) : M_buffer(new void* [frames]), M_frames(frames) { std::memcpy(M_buffer.get(), buffer, sizeof(void*) * frames); }
|
||||
|
||||
friend bool operator<(BackTrace const& bt1, BackTrace const& bt2)
|
||||
{
|
||||
if (bt1.M_frames != bt2.M_frames)
|
||||
return bt1.M_frames < bt2.M_frames;
|
||||
for (int frame = 0; frame < bt1.M_frames; ++frame)
|
||||
if (bt1.M_buffer[frame] < bt2.M_buffer[frame])
|
||||
return true;
|
||||
else if (bt1.M_buffer[frame] > bt2.M_buffer[frame])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void dump_backtrace(void) const;
|
||||
|
||||
int frames(void) const { return M_frames; }
|
||||
boost::shared_array<void*> const& buffer(void) const { return M_buffer; }
|
||||
};
|
||||
extern std::vector<BackTrace> backtraces;
|
||||
extern pthread_mutex_t backtrace_mutex;
|
||||
#define BACKTRACE do { \
|
||||
using namespace debug; \
|
||||
void* buffer[32]; \
|
||||
int frames = backtrace(buffer, 32); \
|
||||
size_t size; \
|
||||
{ \
|
||||
pthread_mutex_lock(&backtrace_mutex); \
|
||||
backtraces.push_back(BackTrace(buffer, frames)); \
|
||||
size = backtraces.size(); \
|
||||
pthread_mutex_unlock(&backtrace_mutex); \
|
||||
} \
|
||||
Dout(dc::backtrace, "Stored backtrace #" << size); \
|
||||
} while(0)
|
||||
#else
|
||||
#define BACKTRACE do { } while(0)
|
||||
#endif // CWDEBUG_LOCATION
|
||||
|
||||
} // namespace debug
|
||||
|
||||
//! Debugging macro.
|
||||
//
|
||||
// Print "Entering " << \a data to channel \a cntrl and increment
|
||||
// debugging output indentation until the end of the current scope.
|
||||
#define DoutEntering(cntrl, data) \
|
||||
int __slviewer_debug_indentation = 2; \
|
||||
{ \
|
||||
LIBCWD_TSD_DECLARATION; \
|
||||
if (LIBCWD_DO_TSD_MEMBER_OFF(::libcwd::libcw_do) < 0) \
|
||||
{ \
|
||||
::libcwd::channel_set_bootstrap_st __libcwd_channel_set(LIBCWD_DO_TSD(::libcwd::libcw_do) LIBCWD_COMMA_TSD); \
|
||||
bool on; \
|
||||
{ \
|
||||
using namespace LIBCWD_DEBUGCHANNELS; \
|
||||
on = (__libcwd_channel_set|cntrl).on; \
|
||||
} \
|
||||
if (on) \
|
||||
Dout(cntrl, "Entering " << data); \
|
||||
else \
|
||||
__slviewer_debug_indentation = 0; \
|
||||
} \
|
||||
} \
|
||||
debug::Indent __slviewer_debug_indent(__slviewer_debug_indentation);
|
||||
|
||||
#endif // CWDEBUG
|
||||
|
||||
#include "debug_ostream_operators.h"
|
||||
|
||||
#endif // DEBUG_H
|
||||
1
indra/cwdebug/debug_ostream_operators.h
Normal file
1
indra/cwdebug/debug_ostream_operators.h
Normal file
@@ -0,0 +1 @@
|
||||
// Empty so far...
|
||||
9
indra/cwdebug/sys.h
Normal file
9
indra/cwdebug/sys.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// The following is the libcwd related mandatory part.
|
||||
// It must be included before any system header file is included.
|
||||
#ifdef CWDEBUG
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <libcwd/sys.h>
|
||||
#endif
|
||||
|
||||
@@ -518,9 +518,16 @@ class WindowsSetup(PlatformSetup):
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
else:
|
||||
for version in 'vc80 vc90 vc100 vc71'.split():
|
||||
if self.find_visual_studio_express_single(version):
|
||||
self._generator = version
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
return self._generator
|
||||
|
||||
def _set_generator(self, gen):
|
||||
@@ -605,6 +612,28 @@ class WindowsSetup(PlatformSetup):
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def find_visual_studio_express_single(self, gen=None):
|
||||
if gen is None:
|
||||
gen = self._generator
|
||||
gen = gen.lower()
|
||||
try:
|
||||
import _winreg
|
||||
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
|
||||
self.gens[gen]['ver'])
|
||||
value_str = (r'ProductDir')
|
||||
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
|
||||
(key_str, value_str))
|
||||
print key_str
|
||||
|
||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
|
||||
key = _winreg.OpenKey(reg, key_str)
|
||||
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
|
||||
print 'Found: %s' % value
|
||||
return value
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def get_build_cmd(self):
|
||||
if self.incredibuild:
|
||||
@@ -617,13 +646,15 @@ class WindowsSetup(PlatformSetup):
|
||||
if environment == '':
|
||||
environment = self.find_visual_studio_express()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
environment = self.find_visual_studio_express_single()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
|
||||
# devenv.com is CLI friendly, devenv.exe... not so much.
|
||||
return ('"%sdevenv.com" %s.sln /build %s' %
|
||||
@@ -718,6 +749,7 @@ class CygwinSetup(WindowsSetup):
|
||||
setup_platform = {
|
||||
'darwin': DarwinSetup,
|
||||
'linux2': LinuxSetup,
|
||||
'linux3': LinuxSetup,
|
||||
'win32' : WindowsSetup,
|
||||
'cygwin' : CygwinSetup
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -156,6 +156,9 @@ ARGUMENTS=[
|
||||
dict(name='source',
|
||||
description='Source directory.',
|
||||
default=DEFAULT_SRCTREE),
|
||||
dict(name='standalone',
|
||||
description='Set to ON if this is a standalone build.',
|
||||
default="OFF"),
|
||||
dict(name='artwork', description='Artwork directory.', default=DEFAULT_SRCTREE),
|
||||
dict(name='touch',
|
||||
description="""File to touch when action is finished. Touch file will
|
||||
@@ -634,9 +637,9 @@ class LLManifest(object):
|
||||
is_glob = False
|
||||
|
||||
# look under each prefix for matching paths
|
||||
paths = [os.path.join(self.get_src_prefix(), src),
|
||||
paths = set([os.path.join(self.get_src_prefix(), src),
|
||||
os.path.join(self.get_artwork_prefix(), src),
|
||||
os.path.join(self.get_build_prefix(), src)]
|
||||
os.path.join(self.get_build_prefix(), src)])
|
||||
for path in paths:
|
||||
if self.wildcard_pattern.search(path):
|
||||
is_glob = True
|
||||
|
||||
@@ -249,7 +249,7 @@ BOOL LLVorbisDecodeState::initDecode()
|
||||
llwarns << "Bad sound caught by zmagic" << llendl;
|
||||
abort_decode = true;
|
||||
}
|
||||
else
|
||||
else if(!gAudiop->getAllowLargeSounds())
|
||||
{
|
||||
// </edit>
|
||||
//Much more restrictive than zmagic. Perhaps make toggleable.
|
||||
@@ -723,4 +723,4 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,8 @@ void LLAudioEngine::setDefaults()
|
||||
|
||||
for (U32 i = 0; i < LLAudioEngine::AUDIO_TYPE_COUNT; i++)
|
||||
mSecondaryGain[i] = 1.0f;
|
||||
|
||||
mAllowLargeSounds = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1336,16 +1338,17 @@ LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32
|
||||
|
||||
LLAudioSource::~LLAudioSource()
|
||||
{
|
||||
// <edit>
|
||||
// Record destruction of LLAudioSource object.
|
||||
if(mType != LLAudioEngine::AUDIO_TYPE_UI)
|
||||
logSoundStop(mLogID, true);
|
||||
// </edit>
|
||||
if (mChannelp)
|
||||
{
|
||||
// Stop playback of this sound
|
||||
mChannelp->setSource(NULL);
|
||||
mChannelp = NULL;
|
||||
setChannel(NULL);
|
||||
}
|
||||
// <edit>
|
||||
if(mType != LLAudioEngine::AUDIO_TYPE_UI) // && mSourceID.notNull())
|
||||
logSoundStop(mLogID);
|
||||
// </edit>
|
||||
}
|
||||
|
||||
|
||||
@@ -1356,10 +1359,17 @@ void LLAudioSource::setChannel(LLAudioChannel *channelp)
|
||||
return;
|
||||
}
|
||||
|
||||
// <edit>
|
||||
if (!channelp)
|
||||
{
|
||||
if(mType != LLAudioEngine::AUDIO_TYPE_UI)
|
||||
logSoundStop(mLogID, false);
|
||||
}
|
||||
// </edit>
|
||||
|
||||
mChannelp = channelp;
|
||||
}
|
||||
|
||||
|
||||
void LLAudioSource::update()
|
||||
{
|
||||
if (!getCurrentBuffer())
|
||||
@@ -1434,10 +1444,6 @@ bool LLAudioSource::setupChannel()
|
||||
|
||||
bool LLAudioSource::play(const LLUUID &audio_uuid)
|
||||
{
|
||||
// <edit>
|
||||
if(mType != LLAudioEngine::AUDIO_TYPE_UI) //&& mSourceID.notNull())
|
||||
logSoundPlay(mLogID, this, mPositionGlobal, mType, audio_uuid, mOwnerID, mSourceID, mIsTrigger, mLoop); // is mID okay for source id?
|
||||
// </edit>
|
||||
// Special abuse of play(); don't play a sound, but kill it.
|
||||
if (audio_uuid.isNull())
|
||||
{
|
||||
@@ -1453,6 +1459,11 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
|
||||
return false;
|
||||
}
|
||||
|
||||
// <edit>
|
||||
if(mType != LLAudioEngine::AUDIO_TYPE_UI) //&& mSourceID.notNull())
|
||||
logSoundPlay(this, audio_uuid);
|
||||
// </edit>
|
||||
|
||||
// Reset our age timeout if someone attempts to play the source.
|
||||
mAgeTimer.reset();
|
||||
|
||||
@@ -1846,36 +1857,38 @@ bool LLAudioData::load()
|
||||
std::map<LLUUID, LLSoundHistoryItem> gSoundHistory;
|
||||
|
||||
// static
|
||||
void logSoundPlay(LLUUID id, LLAudioSource* audio_source, LLVector3d position, S32 type, LLUUID assetid, LLUUID ownerid, LLUUID sourceid, bool is_trigger, bool is_looped)
|
||||
void logSoundPlay(LLAudioSource* audio_source, LLUUID const& assetid)
|
||||
{
|
||||
LLSoundHistoryItem item;
|
||||
item.mID = id;
|
||||
item.mID = audio_source->getLogID();
|
||||
item.mAudioSource = audio_source;
|
||||
item.mPosition = position;
|
||||
item.mType = type;
|
||||
item.mPosition = audio_source->getPositionGlobal();
|
||||
item.mType = audio_source->getType();
|
||||
item.mAssetID = assetid;
|
||||
item.mOwnerID = ownerid;
|
||||
item.mSourceID = sourceid;
|
||||
item.mOwnerID = audio_source->getOwnerID();
|
||||
item.mSourceID = audio_source->getSourceID();
|
||||
item.mPlaying = true;
|
||||
item.mTimeStarted = LLTimer::getElapsedSeconds();
|
||||
item.mTimeStopped = F64_MAX;
|
||||
item.mIsTrigger = is_trigger;
|
||||
item.mIsLooped = is_looped;
|
||||
item.mIsTrigger = audio_source->getIsTrigger();
|
||||
item.mIsLooped = audio_source->isLoop();
|
||||
|
||||
item.mReviewed = false;
|
||||
item.mReviewedCollision = false;
|
||||
|
||||
gSoundHistory[id] = item;
|
||||
gSoundHistory[item.mID] = item;
|
||||
}
|
||||
|
||||
//static
|
||||
void logSoundStop(LLUUID id)
|
||||
void logSoundStop(LLUUID const& id, bool destructed)
|
||||
{
|
||||
if(gSoundHistory.find(id) != gSoundHistory.end())
|
||||
std::map<LLUUID, LLSoundHistoryItem>::iterator iter = gSoundHistory.find(id);
|
||||
if(iter != gSoundHistory.end() && iter->second.mAudioSource)
|
||||
{
|
||||
gSoundHistory[id].mPlaying = false;
|
||||
gSoundHistory[id].mTimeStopped = LLTimer::getElapsedSeconds();
|
||||
gSoundHistory[id].mAudioSource = NULL; // just in case
|
||||
iter->second.mPlaying = false;
|
||||
iter->second.mTimeStopped = LLTimer::getElapsedSeconds();
|
||||
if (destructed)
|
||||
iter->second.mAudioSource = NULL;
|
||||
pruneSoundLog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,8 @@ public:
|
||||
|
||||
bool updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid = LLUUID::null);
|
||||
|
||||
void setAllowLargeSounds(bool allow) { mAllowLargeSounds = allow ;}
|
||||
bool getAllowLargeSounds() const {return mAllowLargeSounds;}
|
||||
|
||||
// Asset callback when we're retrieved a sound from the asset server.
|
||||
void startNextTransfer();
|
||||
@@ -260,6 +262,8 @@ protected:
|
||||
private:
|
||||
void setDefaults();
|
||||
LLStreamingAudioInterface *mStreamingAudioImpl;
|
||||
|
||||
bool mAllowLargeSounds;
|
||||
};
|
||||
|
||||
|
||||
@@ -306,7 +310,11 @@ public:
|
||||
void setPlayedOnce(const bool played_once) { mPlayedOnce = played_once; }
|
||||
|
||||
void setType(S32 type) { mType = type; }
|
||||
S32 getType() { return mType; }
|
||||
S32 getType(void) const { return mType; }
|
||||
|
||||
LLUUID const& getOwnerID(void) const { return mOwnerID; }
|
||||
LLUUID const& getSourceID(void) const { return mSourceID; }
|
||||
bool getIsTrigger(void) const { return mIsTrigger; }
|
||||
|
||||
void setPositionGlobal(const LLVector3d &position_global) { mPositionGlobal = position_global; }
|
||||
LLVector3d getPositionGlobal() const { return mPositionGlobal; }
|
||||
@@ -337,6 +345,7 @@ public:
|
||||
friend class LLAudioChannel;
|
||||
protected:
|
||||
void setChannel(LLAudioChannel *channelp);
|
||||
public:
|
||||
LLAudioChannel *getChannel() const { return mChannelp; }
|
||||
|
||||
protected:
|
||||
@@ -430,17 +439,22 @@ public:
|
||||
|
||||
friend class LLAudioEngine;
|
||||
friend class LLAudioSource;
|
||||
|
||||
protected:
|
||||
virtual void play() = 0;
|
||||
virtual void playSynced(LLAudioChannel *channelp) = 0;
|
||||
virtual void cleanup() = 0;
|
||||
void setWaiting(bool waiting) { mWaiting = waiting; }
|
||||
|
||||
public:
|
||||
virtual bool isPlaying() = 0;
|
||||
void setWaiting(const bool waiting) { mWaiting = waiting; }
|
||||
bool isWaiting() const { return mWaiting; }
|
||||
|
||||
protected:
|
||||
virtual bool updateBuffer(); // Check to see if the buffer associated with the source changed, and update if necessary.
|
||||
virtual void update3DPosition() = 0;
|
||||
virtual void updateLoop() = 0; // Update your loop/completion status, for use by queueing/syncing.
|
||||
|
||||
protected:
|
||||
LLAudioSource *mCurrentSourcep;
|
||||
LLAudioBuffer *mCurrentBufferp;
|
||||
@@ -478,7 +492,7 @@ protected:
|
||||
extern LLAudioEngine* gAudiop;
|
||||
|
||||
// <edit>
|
||||
typedef struct
|
||||
struct LLSoundHistoryItem
|
||||
{
|
||||
LLUUID mID;
|
||||
LLVector3d mPosition;
|
||||
@@ -494,12 +508,27 @@ typedef struct
|
||||
bool mReviewed;
|
||||
bool mReviewedCollision;
|
||||
LLAudioSource* mAudioSource;
|
||||
} LLSoundHistoryItem;
|
||||
|
||||
LLSoundHistoryItem() : mType(0), mPlaying(false), mIsTrigger(false),
|
||||
mIsLooped(false), mReviewed(false), mReviewedCollision(false),
|
||||
mTimeStarted(0), mTimeStopped(0), mAudioSource(0) {}
|
||||
|
||||
bool isPlaying(void) const
|
||||
{
|
||||
return mPlaying && mAudioSource && mAudioSource->getChannel()
|
||||
// It's only REALLY playing if the following also returns true,
|
||||
// but it's too hard detect when that part is starting/stopping,
|
||||
// so in the sound explorer we call "playing" (or "looping")
|
||||
// those audio source that have a channel assigned and call
|
||||
// it a day.
|
||||
/*&& mAudioSource->getChannel()->isPlaying()*/ ;
|
||||
}
|
||||
};
|
||||
|
||||
extern std::map<LLUUID, LLSoundHistoryItem> gSoundHistory;
|
||||
|
||||
extern void logSoundPlay(LLUUID id, LLAudioSource* audio_source, LLVector3d position, S32 type, LLUUID assetid, LLUUID ownerid, LLUUID sourceid, bool is_trigger, bool is_looped);
|
||||
extern void logSoundStop(LLUUID id);
|
||||
extern void logSoundPlay(LLAudioSource* audio_source, LLUUID const& assetid);
|
||||
extern void logSoundStop(LLUUID const& id, bool destructed);
|
||||
extern void pruneSoundLog();
|
||||
extern int gSoundHistoryPruneCounter;
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ bool LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
|
||||
// This means we also try to play audio when minimized,
|
||||
// so we manually handle muting in that case. JC
|
||||
fmod_flags |= FSOUND_INIT_GLOBALFOCUS;
|
||||
fmod_flags |= FSOUND_INIT_DSOUND_HRTF_FULL;
|
||||
#endif
|
||||
|
||||
#if LL_LINUX
|
||||
|
||||
@@ -89,7 +89,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
|
||||
|
||||
//********************************
|
||||
LLAPRFile infile ;
|
||||
infile.open(in_fname,LL_APR_RB, LLAPRFile::global);
|
||||
infile.open(in_fname,LL_APR_RB);
|
||||
//********************************
|
||||
if (!infile.getFileHandle())
|
||||
{
|
||||
@@ -240,7 +240,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
|
||||
S32 data_left = 0;
|
||||
|
||||
LLAPRFile infile ;
|
||||
infile.open(in_fname,LL_APR_RB, LLAPRFile::global);
|
||||
infile.open(in_fname,LL_APR_RB);
|
||||
if (!infile.getFileHandle())
|
||||
{
|
||||
llwarns << "Couldn't open temporary ogg file for writing: " << in_fname
|
||||
@@ -249,7 +249,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
|
||||
}
|
||||
|
||||
LLAPRFile outfile ;
|
||||
outfile.open(out_fname,LL_APR_WPB, LLAPRFile::global);
|
||||
outfile.open(out_fname,LL_APR_WPB);
|
||||
if (!outfile.getFileHandle())
|
||||
{
|
||||
llwarns << "Couldn't open upload sound file for reading: " << in_fname
|
||||
|
||||
@@ -48,10 +48,10 @@ using namespace std;
|
||||
|
||||
#define INCHES_TO_METERS 0.02540005f
|
||||
|
||||
const F32 POSITION_KEYFRAME_THRESHOLD = 0.03f;
|
||||
const F32 POSITION_KEYFRAME_THRESHOLD_SQUARED = 0.03f * 0.03f;
|
||||
const F32 ROTATION_KEYFRAME_THRESHOLD = 0.01f;
|
||||
|
||||
const F32 POSITION_MOTION_THRESHOLD = 0.001f;
|
||||
const F32 POSITION_MOTION_THRESHOLD_SQUARED = 0.001f * 0.001f;
|
||||
const F32 ROTATION_MOTION_THRESHOLD = 0.001f;
|
||||
|
||||
char gInFile[1024]; /* Flawfinder: ignore */
|
||||
@@ -225,8 +225,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
|
||||
//--------------------------------------------------------------------
|
||||
std::string path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,fileName);
|
||||
|
||||
LLAPRFile infile ;
|
||||
infile.open(path, LL_APR_R, LLAPRFile::global);
|
||||
LLAPRFile infile(path, LL_APR_R);
|
||||
apr_file_t *fp = infile.getFileHandle();
|
||||
if (!fp)
|
||||
return E_ST_NO_XLT_FILE;
|
||||
@@ -1202,7 +1201,7 @@ void LLBVHLoader::optimize()
|
||||
if (ki_prev == ki_last_good_pos)
|
||||
{
|
||||
joint->mNumPosKeys++;
|
||||
if (dist_vec(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD)
|
||||
if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
|
||||
{
|
||||
pos_changed = TRUE;
|
||||
}
|
||||
@@ -1215,12 +1214,12 @@ void LLBVHLoader::optimize()
|
||||
LLVector3 current_pos(ki->mPos);
|
||||
LLVector3 interp_pos = lerp(current_pos, last_good_pos, 1.f / (F32)numPosFramesConsidered);
|
||||
|
||||
if (dist_vec(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD)
|
||||
if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
|
||||
{
|
||||
pos_changed = TRUE;
|
||||
}
|
||||
|
||||
if (dist_vec(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD)
|
||||
if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD_SQUARED)
|
||||
{
|
||||
ki_prev->mIgnorePos = TRUE;
|
||||
numPosFramesConsidered++;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
LLStringTable LLCharacter::sVisualParamNames(1024);
|
||||
|
||||
std::vector< LLCharacter* > LLCharacter::sInstances;
|
||||
|
||||
BOOL LLCharacter::sAllowInstancesChange = TRUE ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLCharacter()
|
||||
@@ -59,8 +59,10 @@ LLCharacter::LLCharacter()
|
||||
mSkeletonSerialNum( 0 ),
|
||||
mInAppearance( false )
|
||||
{
|
||||
mMotionController.setCharacter( this );
|
||||
llassert_always(sAllowInstancesChange) ;
|
||||
sInstances.push_back(this);
|
||||
|
||||
mMotionController.setCharacter( this );
|
||||
mPauseRequest = new LLPauseRequestHandle();
|
||||
}
|
||||
|
||||
@@ -77,11 +79,22 @@ LLCharacter::~LLCharacter()
|
||||
{
|
||||
delete param;
|
||||
}
|
||||
std::vector<LLCharacter*>::iterator iter = std::find(sInstances.begin(), sInstances.end(), this);
|
||||
if (iter != sInstances.end())
|
||||
|
||||
U32 i ;
|
||||
U32 size = sInstances.size() ;
|
||||
for(i = 0 ; i < size ; i++)
|
||||
{
|
||||
sInstances.erase(iter);
|
||||
if(sInstances[i] == this)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
llassert_always(i < size) ;
|
||||
|
||||
llassert_always(sAllowInstancesChange) ;
|
||||
sInstances[i] = sInstances[size - 1] ;
|
||||
sInstances.pop_back() ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "llmotioncontroller.h"
|
||||
#include "llvisualparam.h"
|
||||
#include "string_table.h"
|
||||
#include "llmemory.h"
|
||||
#include "llpointer.h"
|
||||
#include "llthread.h"
|
||||
|
||||
class LLPolyMesh;
|
||||
@@ -246,9 +246,9 @@ public:
|
||||
return rtn;
|
||||
}
|
||||
|
||||
LLVisualParam* getVisualParam(S32 id)
|
||||
LLVisualParam* getVisualParam(S32 id) const
|
||||
{
|
||||
visual_param_index_map_t::iterator iter = mVisualParamIndexMap.find(id);
|
||||
visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.find(id);
|
||||
return (iter == mVisualParamIndexMap.end()) ? 0 : iter->second;
|
||||
}
|
||||
S32 getVisualParamID(LLVisualParam *id)
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
S32 getVisualParamCount() { return (S32)mVisualParamIndexMap.size(); }
|
||||
S32 getVisualParamCount() const { return (S32)mVisualParamIndexMap.size(); }
|
||||
LLVisualParam* getVisualParam(const char *name);
|
||||
|
||||
|
||||
@@ -279,6 +279,7 @@ public:
|
||||
void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
|
||||
|
||||
static std::vector< LLCharacter* > sInstances;
|
||||
static BOOL sAllowInstancesChange ; //debug use
|
||||
|
||||
protected:
|
||||
LLMotionController mMotionController;
|
||||
|
||||
@@ -56,6 +56,9 @@ LLJoint::LLJoint()
|
||||
mUpdateXform = TRUE;
|
||||
mJointNum = -1;
|
||||
touch();
|
||||
#if MESH_ENABLED
|
||||
mResetAfterRestoreOldXform = false;
|
||||
#endif //MESH_ENABLED
|
||||
}
|
||||
|
||||
|
||||
@@ -239,6 +242,43 @@ void LLJoint::setPosition( const LLVector3& pos )
|
||||
}
|
||||
}
|
||||
|
||||
#if MESH_ENABLED
|
||||
//--------------------------------------------------------------------
|
||||
// setPosition()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::setDefaultFromCurrentXform( void )
|
||||
{
|
||||
mDefaultXform = mXform;
|
||||
touch(MATRIX_DIRTY | POSITION_DIRTY);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// storeCurrentXform()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::storeCurrentXform( const LLVector3& pos )
|
||||
{
|
||||
mOldXform = mXform;
|
||||
mResetAfterRestoreOldXform = true;
|
||||
setPosition( pos );
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
// restoreOldXform()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::restoreOldXform( void )
|
||||
{
|
||||
mResetAfterRestoreOldXform = false;
|
||||
mXform = mOldXform;
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
// restoreOldXform()
|
||||
//--------------------------------------------------------------------
|
||||
void LLJoint::restoreToDefaultXform( void )
|
||||
{
|
||||
mXform = mDefaultXform;
|
||||
setPosition( mXform.getPosition() );
|
||||
}
|
||||
#endif //MESH_ENABLED
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// getWorldPosition()
|
||||
|
||||
@@ -86,10 +86,19 @@ protected:
|
||||
|
||||
// explicit transformation members
|
||||
LLXformMatrix mXform;
|
||||
#if MESH_ENABLED
|
||||
LLXformMatrix mOldXform;
|
||||
LLXformMatrix mDefaultXform;
|
||||
|
||||
LLUUID mId;
|
||||
#endif //MESH_ENABLED
|
||||
public:
|
||||
U32 mDirtyFlags;
|
||||
BOOL mUpdateXform;
|
||||
|
||||
#if MESH_ENABLED
|
||||
BOOL mResetAfterRestoreOldXform;
|
||||
#endif //MESH_ENABLED
|
||||
|
||||
// describes the skin binding pose
|
||||
LLVector3 mSkinOffset;
|
||||
@@ -179,6 +188,24 @@ public:
|
||||
S32 getJointNum() const { return mJointNum; }
|
||||
void setJointNum(S32 joint_num) { mJointNum = joint_num; }
|
||||
|
||||
#if MESH_ENABLED
|
||||
|
||||
void restoreOldXform( void );
|
||||
void restoreToDefaultXform( void );
|
||||
void setDefaultFromCurrentXform( void );
|
||||
void storeCurrentXform( const LLVector3& pos );
|
||||
|
||||
//Accessor for the joint id
|
||||
LLUUID getId( void ) { return mId; }
|
||||
//Setter for the joints id
|
||||
void setId( const LLUUID& id ) { mId = id;}
|
||||
|
||||
//If the old transform flag has been set, then the reset logic in avatar needs to be aware(test) of it
|
||||
const BOOL doesJointNeedToBeReset( void ) const { return mResetAfterRestoreOldXform; }
|
||||
//Setter for joint reset flag
|
||||
void setJointToBeReset( BOOL val ) { mResetAfterRestoreOldXform = val; }
|
||||
#endif //MESH_ENABLED
|
||||
|
||||
// <edit>
|
||||
std::string exportString(U32 tabs = 0);
|
||||
// </edit>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
// Header Files
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "lljoint.h"
|
||||
#include "llmemory.h"
|
||||
#include "llrefcount.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// class LLJointState
|
||||
|
||||
@@ -838,7 +838,11 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint)
|
||||
S32 joint_num;
|
||||
LLVector3 source_pos = mCharacter->getVolumePos(shared_data->mSourceConstraintVolume, shared_data->mSourceConstraintOffset);
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[0]);
|
||||
|
||||
if ( !cur_joint )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
F32 source_pos_offset = dist_vec(source_pos, cur_joint->getWorldPosition());
|
||||
|
||||
constraint->mTotalLength = constraint->mJointLengths[0] = dist_vec(cur_joint->getParent()->getWorldPosition(), source_pos);
|
||||
@@ -889,6 +893,10 @@ void LLKeyframeMotion::activateConstraint(JointConstraint* constraint)
|
||||
for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++)
|
||||
{
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
|
||||
if ( !cur_joint )
|
||||
{
|
||||
return;
|
||||
}
|
||||
constraint->mPositions[joint_num] = (cur_joint->getWorldPosition() - mPelvisp->getWorldPosition()) * ~mPelvisp->getWorldRotation();
|
||||
}
|
||||
|
||||
@@ -949,6 +957,10 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
}
|
||||
|
||||
LLJoint* root_joint = getJoint(shared_data->mJointStateIndices[shared_data->mChainLength]);
|
||||
if (! root_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVector3 root_pos = root_joint->getWorldPosition();
|
||||
// LLQuaternion root_rot =
|
||||
root_joint->getParent()->getWorldRotation();
|
||||
@@ -960,6 +972,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++)
|
||||
{
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
|
||||
if (!cur_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (joint_mask[cur_joint->getJointNum()] >= (0xff >> (7 - getPriority())))
|
||||
{
|
||||
// skip constraint
|
||||
@@ -1050,7 +1067,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
|
||||
if (shared_data->mChainLength)
|
||||
{
|
||||
LLQuaternion end_rot = getJoint(shared_data->mJointStateIndices[0])->getWorldRotation();
|
||||
LLJoint* end_joint = getJoint(shared_data->mJointStateIndices[0]);
|
||||
|
||||
if (!end_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLQuaternion end_rot = end_joint->getWorldRotation();
|
||||
|
||||
// slam start and end of chain to the proper positions (rest of chain stays put)
|
||||
positions[0] = lerp(keyframe_source_pos, target_pos, weight);
|
||||
@@ -1059,7 +1083,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
// grab keyframe-specified positions of joints
|
||||
for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++)
|
||||
{
|
||||
LLVector3 kinematic_position = getJoint(shared_data->mJointStateIndices[joint_num])->getWorldPosition() +
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
|
||||
|
||||
if (!cur_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector3 kinematic_position = cur_joint->getWorldPosition() +
|
||||
(source_to_target * constraint->mJointLengthFractions[joint_num]);
|
||||
|
||||
// convert intermediate joint positions to world coordinates
|
||||
@@ -1105,7 +1136,17 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
for (joint_num = shared_data->mChainLength; joint_num > 0; joint_num--)
|
||||
{
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
|
||||
|
||||
if (!cur_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLJoint* child_joint = getJoint(shared_data->mJointStateIndices[joint_num - 1]);
|
||||
if (!child_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLQuaternion parent_rot = cur_joint->getParent()->getWorldRotation();
|
||||
|
||||
LLQuaternion cur_rot = cur_joint->getWorldRotation();
|
||||
@@ -1139,7 +1180,6 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
cur_joint->setRotation(target_rot);
|
||||
}
|
||||
|
||||
LLJoint* end_joint = getJoint(shared_data->mJointStateIndices[0]);
|
||||
LLQuaternion end_local_rot = end_rot * ~end_joint->getParent()->getWorldRotation();
|
||||
|
||||
if (weight == 1.f)
|
||||
@@ -1162,12 +1202,18 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
||||
constraint->mPositions[joint_num] = new_pos;
|
||||
}
|
||||
constraint->mFixupDistanceRMS *= 1.f / (constraint->mTotalLength * (F32)(shared_data->mChainLength - 1));
|
||||
constraint->mFixupDistanceRMS = fsqrtf(constraint->mFixupDistanceRMS);
|
||||
constraint->mFixupDistanceRMS = (F32) sqrt(constraint->mFixupDistanceRMS);
|
||||
|
||||
//reset old joint rots
|
||||
for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++)
|
||||
{
|
||||
getJoint(shared_data->mJointStateIndices[joint_num])->setRotation(old_rots[joint_num]);
|
||||
LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]);
|
||||
if (!cur_joint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
cur_joint->setRotation(old_rots[joint_num]);
|
||||
}
|
||||
}
|
||||
// simple positional constraint (pelvis only)
|
||||
@@ -1816,7 +1862,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
||||
constraintp->mJointStateIndices[i] = -1;
|
||||
for (U32 j = 0; j < mJointMotionList->getNumJointMotions(); j++)
|
||||
{
|
||||
if(getJoint(j) == joint)
|
||||
LLJoint* constraint_joint = getJoint(j);
|
||||
|
||||
if ( !constraint_joint )
|
||||
{
|
||||
llwarns << "Invalid joint " << j << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(constraint_joint == joint)
|
||||
{
|
||||
constraintp->mJointStateIndices[i] = (S32)j;
|
||||
break;
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "llquaternion.h"
|
||||
#include "v3dmath.h"
|
||||
#include "v3math.h"
|
||||
#include "llapr.h"
|
||||
#include "llbvhconsts.h"
|
||||
|
||||
class LLKeyframeDataCache;
|
||||
|
||||
@@ -357,8 +357,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
|
||||
// open the file
|
||||
//-------------------------------------------------------------------------
|
||||
S32 fileSize = 0;
|
||||
LLAPRFile infile ;
|
||||
infile.open(path, LL_APR_R, LLAPRFile::global, &fileSize);
|
||||
LLAPRFile infile(path, LL_APR_R, &fileSize);
|
||||
apr_file_t* fp = infile.getFileHandle() ;
|
||||
if (!fp || fileSize == 0)
|
||||
{
|
||||
|
||||
@@ -190,7 +190,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
if (dot(mPelvisState->getJoint()->getWorldRotation(), mLastGoodPelvisRotation) < ROTATION_THRESHOLD)
|
||||
{
|
||||
mLastGoodPelvisRotation = mPelvisState->getJoint()->getWorldRotation();
|
||||
mLastGoodPelvisRotation.normQuat();
|
||||
mLastGoodPelvisRotation.normalize();
|
||||
mTrackAnkles = TRUE;
|
||||
}
|
||||
else if ((mCharacter->getCharacterPosition() - mLastGoodPosition).magVecSquared() > POSITION_THRESHOLD)
|
||||
|
||||
@@ -49,7 +49,7 @@ const F32 MAX_WALK_PLAYBACK_SPEED = 8.f; // max m/s for which we adjust walk cy
|
||||
const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for down foot detection
|
||||
const F32 TIME_EPSILON = 0.001f; // minumum frame time
|
||||
const F32 MAX_TIME_DELTA = 2.f; // max two seconds a frame for calculating interpolation
|
||||
F32 SPEED_ADJUST_MAX_SEC = 2.f; // maximum adjustment to walk animation playback speed for a second
|
||||
const F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second
|
||||
F32 ANIM_SPEED_MAX = 1.5f; // absolute upper limit on animation speed
|
||||
const F32 DRIFT_COMP_MAX_TOTAL = 0.1f; // maximum drift compensation overall, in any direction
|
||||
const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out
|
||||
|
||||
@@ -89,6 +89,7 @@ LLJointState *LLPose::getNextJointState()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
|
||||
{
|
||||
llassert_always(jointState.notNull());
|
||||
if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end())
|
||||
{
|
||||
mJointMap[jointState->getJoint()->getName()] = jointState;
|
||||
@@ -161,6 +162,7 @@ void LLPose::setWeight(F32 weight)
|
||||
// <edit>
|
||||
// there was a crash here
|
||||
// </edit>
|
||||
llassert_always(iter->second.notNull());
|
||||
iter->second->setWeight(weight);
|
||||
}
|
||||
mWeight = weight;
|
||||
|
||||
@@ -36,12 +36,14 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Header Files
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <string>
|
||||
|
||||
#include "llmap.h"
|
||||
#include "lljointstate.h"
|
||||
#include "lljoint.h"
|
||||
#include "llmap.h"
|
||||
#include "llpointer.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -210,8 +210,7 @@ LLFSMState* LLStateDiagram::getState(U32 state_id)
|
||||
|
||||
BOOL LLStateDiagram::saveDotFile(const std::string& filename)
|
||||
{
|
||||
LLAPRFile outfile ;
|
||||
outfile.open(filename, LL_APR_W, LLAPRFile::global);
|
||||
LLAPRFile outfile(filename, LL_APR_W);
|
||||
apr_file_t* dot_file = outfile.getFileHandle() ;
|
||||
|
||||
if (!dot_file)
|
||||
|
||||
@@ -1,212 +1,257 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(llcommon)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(Linking)
|
||||
|
||||
include_directories(
|
||||
${EXPAT_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llcommon_SOURCE_FILES
|
||||
imageids.cpp
|
||||
indra_constants.cpp
|
||||
llapp.cpp
|
||||
llapr.cpp
|
||||
llassettype.cpp
|
||||
llavatarname.cpp
|
||||
llbase32.cpp
|
||||
llbase64.cpp
|
||||
llcommon.cpp
|
||||
llcommonutils.cpp
|
||||
llcrc.cpp
|
||||
llcriticaldamp.cpp
|
||||
llcursortypes.cpp
|
||||
lldate.cpp
|
||||
llerror.cpp
|
||||
llerrorthread.cpp
|
||||
llevent.cpp
|
||||
llfasttimer.cpp
|
||||
llfile.cpp
|
||||
llfindlocale.cpp
|
||||
llfixedbuffer.cpp
|
||||
llformat.cpp
|
||||
llframetimer.cpp
|
||||
llheartbeat.cpp
|
||||
llindraconfigfile.cpp
|
||||
llliveappconfig.cpp
|
||||
lllivefile.cpp
|
||||
lllog.cpp
|
||||
llmd5.cpp
|
||||
llmemory.cpp
|
||||
llmemorystream.cpp
|
||||
llmetrics.cpp
|
||||
llmortician.cpp
|
||||
lloptioninterface.cpp
|
||||
llprocesslauncher.cpp
|
||||
llprocessor.cpp
|
||||
llqueuedthread.cpp
|
||||
llrand.cpp
|
||||
llrun.cpp
|
||||
llsd.cpp
|
||||
llsdserialize.cpp
|
||||
llsdserialize_xml.cpp
|
||||
llsdutil.cpp
|
||||
llsecondlifeurls.cpp
|
||||
llstat.cpp
|
||||
llstreamtools.cpp
|
||||
llstring.cpp
|
||||
llstringtable.cpp
|
||||
llsys.cpp
|
||||
llthread.cpp
|
||||
lltimer.cpp
|
||||
lluri.cpp
|
||||
lluuid.cpp
|
||||
llworkerthread.cpp
|
||||
metaclass.cpp
|
||||
metaproperty.cpp
|
||||
reflective.cpp
|
||||
timing.cpp
|
||||
u64.cpp
|
||||
)
|
||||
|
||||
set(llcommon_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
bitpack.h
|
||||
ctype_workaround.h
|
||||
doublelinkedlist.h
|
||||
imageids.h
|
||||
indra_constants.h
|
||||
linden_common.h
|
||||
linked_lists.h
|
||||
llagentconstants.h
|
||||
llapp.h
|
||||
llapr.h
|
||||
llassettype.h
|
||||
llassoclist.h
|
||||
llavatarconstants.h
|
||||
llavatarname.h
|
||||
llbase32.h
|
||||
llbase64.h
|
||||
llboost.h
|
||||
llchat.h
|
||||
llclickaction.h
|
||||
llcommon.h
|
||||
llcommonutils.h
|
||||
llcrc.h
|
||||
llcriticaldamp.h
|
||||
llcursortypes.h
|
||||
lldarray.h
|
||||
lldarrayptr.h
|
||||
lldate.h
|
||||
lldefs.h
|
||||
lldepthstack.h
|
||||
lldlinked.h
|
||||
lldqueueptr.h
|
||||
llendianswizzle.h
|
||||
llenum.h
|
||||
llerror.h
|
||||
llerrorcontrol.h
|
||||
llerrorlegacy.h
|
||||
llerrorthread.h
|
||||
llevent.h
|
||||
lleventemitter.h
|
||||
llextendedstatus.h
|
||||
llfasttimer.h
|
||||
llfile.h
|
||||
llfindlocale.h
|
||||
llfixedbuffer.h
|
||||
llformat.h
|
||||
llframetimer.h
|
||||
llhash.h
|
||||
llheartbeat.h
|
||||
llhttpstatuscodes.h
|
||||
llindexedqueue.h
|
||||
llindraconfigfile.h
|
||||
llkeythrottle.h
|
||||
lllinkedqueue.h
|
||||
llliveappconfig.h
|
||||
lllivefile.h
|
||||
lllocalidhashmap.h
|
||||
lllog.h
|
||||
lllslconstants.h
|
||||
llmap.h
|
||||
llmd5.h
|
||||
llmemory.h
|
||||
llmemorystream.h
|
||||
llmemtype.h
|
||||
llmetrics.h
|
||||
llmortician.h
|
||||
llnametable.h
|
||||
lloptioninterface.h
|
||||
llpreprocessor.h
|
||||
llpriqueuemap.h
|
||||
llprocesslauncher.h
|
||||
llprocessor.h
|
||||
llptrskiplist.h
|
||||
llptrskipmap.h
|
||||
llqueuedthread.h
|
||||
llrand.h
|
||||
llrun.h
|
||||
llsd.h
|
||||
llsdserialize.h
|
||||
llsdserialize_xml.h
|
||||
llsdutil.h
|
||||
llsecondlifeurls.h
|
||||
llsimplehash.h
|
||||
llskiplist.h
|
||||
llskipmap.h
|
||||
llstack.h
|
||||
llstat.h
|
||||
llstatenums.h
|
||||
llstl.h
|
||||
llstreamtools.h
|
||||
llstrider.h
|
||||
llstring.h
|
||||
llstringtable.h
|
||||
llsys.h
|
||||
llthread.h
|
||||
lltimer.h
|
||||
lluri.h
|
||||
lluuid.h
|
||||
lluuidhashmap.h
|
||||
llversionserver.h
|
||||
llversionviewer.h
|
||||
llworkerthread.h
|
||||
metaclass.h
|
||||
metaclasst.h
|
||||
metaproperty.h
|
||||
metapropertyt.h
|
||||
processor.h
|
||||
reflective.h
|
||||
reflectivet.h
|
||||
roles_constants.h
|
||||
stdenums.h
|
||||
stdtypes.h
|
||||
string_table.h
|
||||
timer.h
|
||||
timing.h
|
||||
u64.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llcommon_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||
|
||||
add_library (llcommon ${llcommon_SOURCE_FILES})
|
||||
add_dependencies(llcommon prepare)
|
||||
target_link_libraries(
|
||||
llcommon
|
||||
${APRUTIL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
)
|
||||
|
||||
# -*- cmake -*-
|
||||
|
||||
project(llcommon)
|
||||
|
||||
include(Cwdebug)
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(APR)
|
||||
include(Linking)
|
||||
|
||||
include_directories(
|
||||
${EXPAT_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llcommon_SOURCE_FILES
|
||||
imageids.cpp
|
||||
indra_constants.cpp
|
||||
llapp.cpp
|
||||
llapr.cpp
|
||||
llaprpool.cpp
|
||||
llassettype.cpp
|
||||
llavatarname.cpp
|
||||
llbase32.cpp
|
||||
llbase64.cpp
|
||||
llcommon.cpp
|
||||
llcommonutils.cpp
|
||||
llcrc.cpp
|
||||
llcriticaldamp.cpp
|
||||
llcursortypes.cpp
|
||||
lldate.cpp
|
||||
lldictionary.cpp
|
||||
llerror.cpp
|
||||
llerrorthread.cpp
|
||||
llevent.cpp
|
||||
lleventtimer.cpp
|
||||
llfasttimer.cpp
|
||||
llfile.cpp
|
||||
llfindlocale.cpp
|
||||
llfixedbuffer.cpp
|
||||
llfoldertype.cpp
|
||||
llformat.cpp
|
||||
llframetimer.cpp
|
||||
llheartbeat.cpp
|
||||
llinstancetracker.cpp
|
||||
llindraconfigfile.cpp
|
||||
llliveappconfig.cpp
|
||||
lllivefile.cpp
|
||||
lllog.cpp
|
||||
llmd5.cpp
|
||||
llmemory.cpp
|
||||
llmemorystream.cpp
|
||||
llmetrics.cpp
|
||||
llmortician.cpp
|
||||
lloptioninterface.cpp
|
||||
llprocesslauncher.cpp
|
||||
llprocessor.cpp
|
||||
llqueuedthread.cpp
|
||||
llrand.cpp
|
||||
llrefcount.cpp
|
||||
llrun.cpp
|
||||
llscopedvolatileaprpool.h
|
||||
llsd.cpp
|
||||
llsdserialize.cpp
|
||||
llsdserialize_xml.cpp
|
||||
llsdutil.cpp
|
||||
llsecondlifeurls.cpp
|
||||
llsingleton.cpp
|
||||
llstat.cpp
|
||||
llstacktrace.cpp
|
||||
llstreamtools.cpp
|
||||
llstring.cpp
|
||||
llstringtable.cpp
|
||||
llsys.cpp
|
||||
llthread.cpp
|
||||
llthreadsafequeue.cpp
|
||||
lltimer.cpp
|
||||
lluri.cpp
|
||||
lluuid.cpp
|
||||
llworkerthread.cpp
|
||||
metaclass.cpp
|
||||
metaproperty.cpp
|
||||
reflective.cpp
|
||||
timing.cpp
|
||||
u64.cpp
|
||||
)
|
||||
|
||||
set(llcommon_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
aithreadsafe.h
|
||||
bitpack.h
|
||||
ctype_workaround.h
|
||||
doublelinkedlist.h
|
||||
imageids.h
|
||||
indra_constants.h
|
||||
linden_common.h
|
||||
linked_lists.h
|
||||
llaccountingcost.h
|
||||
llagentconstants.h
|
||||
llavatarname.h
|
||||
llapp.h
|
||||
llapr.h
|
||||
llaprpool.h
|
||||
llassettype.h
|
||||
llassoclist.h
|
||||
llavatarconstants.h
|
||||
llbase32.h
|
||||
llbase64.h
|
||||
llboost.h
|
||||
llchat.h
|
||||
llclickaction.h
|
||||
llcommon.h
|
||||
llcommonutils.h
|
||||
llcrc.h
|
||||
llcriticaldamp.h
|
||||
llcursortypes.h
|
||||
lldarray.h
|
||||
lldarrayptr.h
|
||||
lldate.h
|
||||
lldefs.h
|
||||
lldeleteutils.h
|
||||
lldepthstack.h
|
||||
lldictionary.h
|
||||
lldlinked.h
|
||||
lldqueueptr.h
|
||||
llendianswizzle.h
|
||||
llenum.h
|
||||
llerror.h
|
||||
llerrorcontrol.h
|
||||
llerrorlegacy.h
|
||||
llerrorthread.h
|
||||
llevent.h
|
||||
lleventemitter.h
|
||||
llextendedstatus.h
|
||||
lleventtimer.h
|
||||
llfasttimer.h
|
||||
llfile.h
|
||||
llfindlocale.h
|
||||
llfixedbuffer.h
|
||||
llfoldertype.h
|
||||
llformat.h
|
||||
llframetimer.h
|
||||
llhash.h
|
||||
llheartbeat.h
|
||||
llhttpstatuscodes.h
|
||||
llindexedqueue.h
|
||||
llinstancetracker.h
|
||||
llindraconfigfile.h
|
||||
llkeythrottle.h
|
||||
lllinkedqueue.h
|
||||
llliveappconfig.h
|
||||
lllivefile.h
|
||||
lllocalidhashmap.h
|
||||
lllog.h
|
||||
lllslconstants.h
|
||||
llmap.h
|
||||
llmd5.h
|
||||
llmemory.h
|
||||
llmemorystream.h
|
||||
llmemtype.h
|
||||
llmetrics.h
|
||||
llmortician.h
|
||||
llnametable.h
|
||||
lloptioninterface.h
|
||||
llpointer.h
|
||||
llpreprocessor.h
|
||||
llpriqueuemap.h
|
||||
llprocesslauncher.h
|
||||
llprocessor.h
|
||||
llptrskiplist.h
|
||||
llptrskipmap.h
|
||||
llqueuedthread.h
|
||||
llrand.h
|
||||
llrefcount.h
|
||||
llrun.h
|
||||
llrefcount.h
|
||||
llsafehandle.h
|
||||
llsd.h
|
||||
llsdserialize.h
|
||||
llsdserialize_xml.h
|
||||
llsdutil.h
|
||||
llsecondlifeurls.h
|
||||
llsimplehash.h
|
||||
llsingleton.h
|
||||
llskiplist.h
|
||||
llskipmap.h
|
||||
llstack.h
|
||||
llstacktrace.h
|
||||
llstat.h
|
||||
llstatenums.h
|
||||
llstl.h
|
||||
llstreamtools.h
|
||||
llstrider.h
|
||||
llstring.h
|
||||
llstringtable.h
|
||||
llsys.h
|
||||
llthread.h
|
||||
llthreadsafequeue.h
|
||||
lltimer.h
|
||||
lltreeiterators.h
|
||||
lluri.h
|
||||
lluuid.h
|
||||
lluuidhashmap.h
|
||||
llversionserver.h
|
||||
llversionviewer.h
|
||||
llworkerthread.h
|
||||
metaclass.h
|
||||
metaclasst.h
|
||||
metaproperty.h
|
||||
metapropertyt.h
|
||||
reflective.h
|
||||
reflectivet.h
|
||||
roles_constants.h
|
||||
stdenums.h
|
||||
stdtypes.h
|
||||
string_table.h
|
||||
stringize.h
|
||||
timer.h
|
||||
timing.h
|
||||
u64.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llcommon_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||
|
||||
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
||||
add_dependencies(llcommon prepare)
|
||||
target_link_libraries(
|
||||
llcommon
|
||||
${APRUTIL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${CWDEBUG_LIBRARIES}
|
||||
${CORESERVICES_LIBRARY}
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
# When linking with llcommon later, we do not want to link with cwdebug.a again.
|
||||
set_property(TARGET llcommon PROPERTY LINK_INTERFACE_LIBRARIES "-lapr-1 -laprutil-1 -lz")
|
||||
endif (LINUX)
|
||||
|
||||
if (DARWIN)
|
||||
# Don't embed a full path in the library's install name
|
||||
set_target_properties(
|
||||
llcommon
|
||||
PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@executable_path/../Resources"
|
||||
)
|
||||
endif (DARWIN)
|
||||
|
||||
554
indra/llcommon/aithreadsafe.h
Normal file
554
indra/llcommon/aithreadsafe.h
Normal file
@@ -0,0 +1,554 @@
|
||||
/**
|
||||
* @file aithreadsafe.h
|
||||
* @brief Implementation of AIThreadSafe, AIReadAccessConst, AIReadAccess and AIWriteAccess.
|
||||
*
|
||||
* Copyright (c) 2010, Aleric Inglewood.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution.
|
||||
*
|
||||
* CHANGELOG
|
||||
* and additional copyright holders.
|
||||
*
|
||||
* 31/03/2010
|
||||
* Initial version, written by Aleric Inglewood @ SL
|
||||
*/
|
||||
|
||||
#ifndef AITHREADSAFE_H
|
||||
#define AITHREADSAFE_H
|
||||
|
||||
#include <new>
|
||||
|
||||
#include "llthread.h"
|
||||
#include "llerror.h"
|
||||
|
||||
// g++ 4.2.x (and before?) have the bug that when you try to pass a temporary
|
||||
// to a function taking a const reference, it still calls the copy constructor.
|
||||
// Define this to hack around that.
|
||||
// Note that the chosen solution ONLY works for copying an AI*Access object that
|
||||
// is passed to a function: the lifetime of the copied object must not be longer
|
||||
// than the original (or at least, it shouldn't be used anymore after the
|
||||
// original is destructed). This will be guaranteed if the code also compiles
|
||||
// on a compiler that doesn't need this hack.
|
||||
#define AI_NEED_ACCESS_CC (defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)) || (__GNUC__ < 4)))
|
||||
|
||||
template<typename T> struct AIReadAccessConst;
|
||||
template<typename T> struct AIReadAccess;
|
||||
template<typename T> struct AIWriteAccess;
|
||||
template<typename T> struct AIAccess;
|
||||
|
||||
#if LL_WINDOWS
|
||||
template<typename T> class AIThreadSafeBits;
|
||||
template<typename T>
|
||||
struct AIThreadSafeWindowsHack {
|
||||
AIThreadSafeWindowsHack(AIThreadSafeBits<T>& var, T* object);
|
||||
};
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
class AIThreadSafeBits
|
||||
{
|
||||
private:
|
||||
// AIThreadSafe is a wrapper around an instance of T.
|
||||
// Because T might not have a default constructor, it is constructed
|
||||
// 'in place', with placement new, in the memory reserved here.
|
||||
//
|
||||
// Make sure that the memory that T will be placed in is properly
|
||||
// aligned by using an array of long's.
|
||||
long mMemory[(sizeof(T) + sizeof(long) - 1) / sizeof(long)];
|
||||
|
||||
public:
|
||||
// The wrapped objects are constructed in-place with placement new *outside*
|
||||
// of this object (by AITHREADSAFE macro(s) or derived classes).
|
||||
// However, we are responsible for the destruction of the wrapped object.
|
||||
~AIThreadSafeBits() { ptr()->~T(); }
|
||||
|
||||
// Only for use by AITHREADSAFE, see below.
|
||||
void* memory() const { return const_cast<long*>(&mMemory[0]); }
|
||||
|
||||
protected:
|
||||
#if LL_WINDOWS
|
||||
template<typename T2> friend struct AIThreadSafeWindowsHack;
|
||||
#endif
|
||||
// Accessors.
|
||||
T const* ptr() const { return reinterpret_cast<T const*>(mMemory); }
|
||||
T* ptr() { return reinterpret_cast<T*>(mMemory); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread, allowing concurrent readers.
|
||||
*
|
||||
* Use AITHREADSAFE to define instances of any type, and use AIReadAccessConst,
|
||||
* AIReadAccess and AIWriteAccess to get access to the instance.
|
||||
*
|
||||
* For example,
|
||||
*
|
||||
* <code>
|
||||
* class Foo { public: Foo(int, int); };
|
||||
*
|
||||
* AITHREADSAFE(Foo, foo, (2, 3));
|
||||
*
|
||||
* AIReadAccess<Foo> foo_r(foo);
|
||||
* // Use foo_r-> for read access.
|
||||
*
|
||||
* AIWriteAccess<Foo> foo_w(foo);
|
||||
* // Use foo_w-> for write access.
|
||||
* </code>
|
||||
*
|
||||
* If <code>foo</code> is constant, you have to use <code>AIReadAccessConst<Foo></code>.
|
||||
*
|
||||
* It is possible to pass access objects to a function that
|
||||
* downgrades the access, for example:
|
||||
*
|
||||
* <code>
|
||||
* void readfunc(AIReadAccess const& access);
|
||||
*
|
||||
* AIWriteAccess<Foo> foo_w(foo);
|
||||
* readfunc(foo_w); // readfunc will perform read access to foo_w.
|
||||
* </code>
|
||||
*
|
||||
* If <code>AIReadAccess</code> is non-const, you can upgrade the access by creating
|
||||
* an <code>AIWriteAccess</code> object from it. For example:
|
||||
*
|
||||
* <code>
|
||||
* AIWriteAccess<Foo> foo_w(foo_r);
|
||||
* </code>
|
||||
*
|
||||
* This API is Robust(tm). If you try anything that could result in problems,
|
||||
* it simply won't compile. The only mistake you can still easily make is
|
||||
* to obtain write access to an object when it is not needed, or to unlock
|
||||
* an object in between accesses while the state of the object should be
|
||||
* preserved. For example:
|
||||
*
|
||||
* <code>
|
||||
* // This resets foo to point to the first file and then returns that.
|
||||
* std::string filename = AIWriteAccess<Foo>(foo)->get_first_filename();
|
||||
*
|
||||
* // WRONG! The state between calling get_first_filename and get_next_filename should be preserved!
|
||||
*
|
||||
* AIWriteAccess<Foo> foo_w(foo); // Wrong. The code below only needs read-access.
|
||||
* while (!filename.empty())
|
||||
* {
|
||||
* something(filename);
|
||||
* filename = foo_w->next_filename();
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* Correct would be
|
||||
*
|
||||
* <code>
|
||||
* AIReadAccess<Foo> foo_r(foo);
|
||||
* std::string filename = AIWriteAccess<Foo>(foo_r)->get_first_filename();
|
||||
* while (!filename.empty())
|
||||
* {
|
||||
* something(filename);
|
||||
* filename = foo_r->next_filename();
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafe : public AIThreadSafeBits<T>
|
||||
{
|
||||
protected:
|
||||
// Only these may access the object (through ptr()).
|
||||
friend struct AIReadAccessConst<T>;
|
||||
friend struct AIReadAccess<T>;
|
||||
friend struct AIWriteAccess<T>;
|
||||
|
||||
// Locking control.
|
||||
AIRWLock mRWLock;
|
||||
|
||||
// For use by AIThreadSafeDC
|
||||
AIThreadSafe(void) { }
|
||||
AIThreadSafe(LLAPRPool& parent) : mRWLock(parent) { }
|
||||
|
||||
public:
|
||||
// Only for use by AITHREADSAFE, see below.
|
||||
AIThreadSafe(T* object)
|
||||
{
|
||||
#if !LL_WINDOWS
|
||||
llassert(object == AIThreadSafeBits<T>::ptr());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Instantiate an static, global or local object of a given type wrapped in AIThreadSafe, using an arbitrary constructor.
|
||||
*
|
||||
* For example, instead of doing
|
||||
*
|
||||
* <code>
|
||||
* Foo foo(x, y);
|
||||
* static Bar bar;
|
||||
* </code>
|
||||
*
|
||||
* One can instantiate a thread-safe instance with
|
||||
*
|
||||
* <code>
|
||||
* AITHREADSAFE(Foo, foo, (x, y));
|
||||
* static AITHREADSAFE(Bar, bar, );
|
||||
* </code>
|
||||
*
|
||||
* Note: This macro does not allow to allocate such object on the heap.
|
||||
* If that is needed, have a look at AIThreadSafeDC.
|
||||
*/
|
||||
#if LL_WINDOWS
|
||||
template<typename T>
|
||||
AIThreadSafeWindowsHack<T>::AIThreadSafeWindowsHack(AIThreadSafeBits<T>& var, T* object)
|
||||
{
|
||||
llassert(object == var.ptr());
|
||||
}
|
||||
#define AITHREADSAFE(type, var, paramlist) \
|
||||
AIThreadSafe<type> var(NULL); \
|
||||
AIThreadSafeWindowsHack<type> dummy_##var(var, new (var.memory()) type paramlist)
|
||||
#else
|
||||
#define AITHREADSAFE(type, var, paramlist) AIThreadSafe<type> var(new (var.memory()) type paramlist)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* This class is the same as an AIThreadSafe wrapper, except that it can only
|
||||
* be used for default constructed objects.
|
||||
*
|
||||
* For example, instead of
|
||||
*
|
||||
* <code>
|
||||
* Foo foo;
|
||||
* </code>
|
||||
*
|
||||
* One would use
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeDC<Foo> foo;
|
||||
* </code>
|
||||
*
|
||||
* The advantage over AITHREADSAFE is that this object can be allocated with
|
||||
* new on the heap. For example:
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeDC<Foo>* ptr = new AIThreadSafeDC<Foo>;
|
||||
* </code>
|
||||
*
|
||||
* which is not possible with AITHREADSAFE.
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeDC : public AIThreadSafe<T>
|
||||
{
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object.
|
||||
AIThreadSafeDC(void) { new (AIThreadSafe<T>::ptr()) T; }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Read lock object and provide read access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIReadAccessConst
|
||||
{
|
||||
//! Internal enum for the lock-type of the AI*Access object.
|
||||
enum state_type
|
||||
{
|
||||
readlocked, //!< A AIReadAccessConst or AIReadAccess.
|
||||
read2writelocked, //!< A AIWriteAccess constructed from a AIReadAccess.
|
||||
writelocked, //!< A AIWriteAccess constructed from a AIThreadSafe.
|
||||
write2writelocked //!< A AIWriteAccess constructed from (the AIReadAccess base class of) a AIWriteAccess.
|
||||
};
|
||||
|
||||
//! Construct a AIReadAccessConst from a constant AIThreadSafe.
|
||||
AIReadAccessConst(AIThreadSafe<T> const& wrapper)
|
||||
: mWrapper(const_cast<AIThreadSafe<T>&>(wrapper)),
|
||||
mState(readlocked)
|
||||
#if AI_NEED_ACCESS_CC
|
||||
, mIsCopyConstructed(false)
|
||||
#endif
|
||||
{
|
||||
mWrapper.mRWLock.rdlock();
|
||||
}
|
||||
|
||||
//! Destruct the AI*Access object.
|
||||
// These should never be dynamically allocated, so there is no need to make this virtual.
|
||||
~AIReadAccessConst()
|
||||
{
|
||||
#if AI_NEED_ACCESS_CC
|
||||
if (mIsCopyConstructed) return;
|
||||
#endif
|
||||
if (mState == readlocked)
|
||||
mWrapper.mRWLock.rdunlock();
|
||||
else if (mState == writelocked)
|
||||
mWrapper.mRWLock.wrunlock();
|
||||
else if (mState == read2writelocked)
|
||||
mWrapper.mRWLock.wr2rdlock();
|
||||
}
|
||||
|
||||
//! Access the underlaying object for read access.
|
||||
T const* operator->() const { return mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for read access.
|
||||
T const& operator*() const { return *mWrapper.ptr(); }
|
||||
|
||||
protected:
|
||||
//! Constructor used by AIReadAccess.
|
||||
AIReadAccessConst(AIThreadSafe<T>& wrapper, state_type state)
|
||||
: mWrapper(wrapper), mState(state)
|
||||
#if AI_NEED_ACCESS_CC
|
||||
, mIsCopyConstructed(false)
|
||||
#endif
|
||||
{ }
|
||||
|
||||
AIThreadSafe<T>& mWrapper; //!< Reference to the object that we provide access to.
|
||||
state_type const mState; //!< The lock state that mWrapper is in.
|
||||
|
||||
#if AI_NEED_ACCESS_CC
|
||||
bool mIsCopyConstructed;
|
||||
public:
|
||||
AIReadAccessConst(AIReadAccessConst const& orig) : mWrapper(orig.mWrapper), mState(orig.mState), mIsCopyConstructed(true) { }
|
||||
#else
|
||||
private:
|
||||
// Disallow copy constructing directly.
|
||||
AIReadAccessConst(AIReadAccessConst const&);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Read lock object and provide read access, with possible promotion to write access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIReadAccess : public AIReadAccessConst<T>
|
||||
{
|
||||
typedef typename AIReadAccessConst<T>::state_type state_type;
|
||||
using AIReadAccessConst<T>::readlocked;
|
||||
|
||||
//! Construct a AIReadAccess from a non-constant AIThreadSafe.
|
||||
AIReadAccess(AIThreadSafe<T>& wrapper) : AIReadAccessConst<T>(wrapper, readlocked) { this->mWrapper.mRWLock.rdlock(); }
|
||||
|
||||
protected:
|
||||
//! Constructor used by AIWriteAccess.
|
||||
AIReadAccess(AIThreadSafe<T>& wrapper, state_type state) : AIReadAccessConst<T>(wrapper, state) { }
|
||||
|
||||
friend struct AIWriteAccess<T>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Write lock object and provide read/write access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIWriteAccess : public AIReadAccess<T>
|
||||
{
|
||||
using AIReadAccessConst<T>::readlocked;
|
||||
using AIReadAccessConst<T>::read2writelocked;
|
||||
using AIReadAccessConst<T>::writelocked;
|
||||
using AIReadAccessConst<T>::write2writelocked;
|
||||
|
||||
//! Construct a AIWriteAccess from a non-constant AIThreadSafe.
|
||||
AIWriteAccess(AIThreadSafe<T>& wrapper) : AIReadAccess<T>(wrapper, writelocked) { this->mWrapper.mRWLock.wrlock();}
|
||||
|
||||
//! Promote read access to write access.
|
||||
explicit AIWriteAccess(AIReadAccess<T>& access)
|
||||
: AIReadAccess<T>(access.mWrapper, (access.mState == readlocked) ? read2writelocked : write2writelocked)
|
||||
{
|
||||
if (this->mState == read2writelocked)
|
||||
{
|
||||
this->mWrapper.mRWLock.rd2wrlock();
|
||||
}
|
||||
}
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T& operator*() const { return *this->mWrapper.ptr(); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* Use AITHREADSAFESIMPLE to define instances of any type, and use AIAccess
|
||||
* to get access to the instance.
|
||||
*
|
||||
* For example,
|
||||
*
|
||||
* <code>
|
||||
* class Foo { public: Foo(int, int); };
|
||||
*
|
||||
* AITHREADSAFESIMPLE(Foo, foo, (2, 3));
|
||||
*
|
||||
* AIAccess<Foo> foo_w(foo);
|
||||
* // Use foo_w-> for read and write access.
|
||||
*
|
||||
* See also AIThreadSafe
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeSimple : public AIThreadSafeBits<T>
|
||||
{
|
||||
protected:
|
||||
// Only this one may access the object (through ptr()).
|
||||
friend struct AIAccess<T>;
|
||||
|
||||
// Locking control.
|
||||
LLMutex mMutex;
|
||||
|
||||
friend struct AIRegisteredStateMachinesList;
|
||||
// For use by AIThreadSafeSimpleDC and AIRegisteredStateMachinesList.
|
||||
AIThreadSafeSimple(void) { }
|
||||
AIThreadSafeSimple(LLAPRPool& parent) : mMutex(parent) { }
|
||||
|
||||
public:
|
||||
// Only for use by AITHREADSAFESIMPLE, see below.
|
||||
AIThreadSafeSimple(T* object) { llassert(object == AIThreadSafeBits<T>::ptr()); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Instantiate an static, global or local object of a given type wrapped in AIThreadSafeSimple, using an arbitrary constructor.
|
||||
*
|
||||
* For example, instead of doing
|
||||
*
|
||||
* <code>
|
||||
* Foo foo(x, y);
|
||||
* static Bar bar;
|
||||
* </code>
|
||||
*
|
||||
* One can instantiate a thread-safe instance with
|
||||
*
|
||||
* <code>
|
||||
* AITHREADSAFESIMPLE(Foo, foo, (x, y));
|
||||
* static AITHREADSAFESIMPLE(Bar, bar, );
|
||||
* </code>
|
||||
*
|
||||
* Note: This macro does not allow to allocate such object on the heap.
|
||||
* If that is needed, have a look at AIThreadSafeSimpleDC.
|
||||
*/
|
||||
#define AITHREADSAFESIMPLE(type, var, paramlist) AIThreadSafeSimple<type> var(new (var.memory()) type paramlist)
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* This class is the same as an AIThreadSafeSimple wrapper, except that it can only
|
||||
* be used for default constructed objects.
|
||||
*
|
||||
* For example, instead of
|
||||
*
|
||||
* <code>
|
||||
* Foo foo;
|
||||
* </code>
|
||||
*
|
||||
* One would use
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeSimpleDC<Foo> foo;
|
||||
* </code>
|
||||
*
|
||||
* The advantage over AITHREADSAFESIMPLE is that this object can be allocated with
|
||||
* new on the heap. For example:
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeSimpleDC<Foo>* ptr = new AIThreadSafeSimpleDC<Foo>;
|
||||
* </code>
|
||||
*
|
||||
* which is not possible with AITHREADSAFESIMPLE.
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeSimpleDC : public AIThreadSafeSimple<T>
|
||||
{
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object.
|
||||
AIThreadSafeSimpleDC(void) { new (AIThreadSafeSimple<T>::ptr()) T; }
|
||||
|
||||
protected:
|
||||
// For use by AIThreadSafeSimpleDCRootPool
|
||||
AIThreadSafeSimpleDC(LLAPRPool& parent) : AIThreadSafeSimple<T>(parent) { new (AIThreadSafeSimple<T>::ptr()) T; }
|
||||
};
|
||||
|
||||
// Helper class for AIThreadSafeSimpleDCRootPool to assure initialization of
|
||||
// the root pool before constructing AIThreadSafeSimpleDC.
|
||||
class AIThreadSafeSimpleDCRootPool_pbase
|
||||
{
|
||||
protected:
|
||||
LLAPRRootPool mRootPool;
|
||||
|
||||
private:
|
||||
template<typename T> friend class AIThreadSafeSimpleDCRootPool;
|
||||
AIThreadSafeSimpleDCRootPool_pbase(void) { }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* The same as AIThreadSafeSimpleDC except that this class creates its own LLAPRRootPool
|
||||
* for the internally used mutexes and condition, instead of using the current threads
|
||||
* root pool. The advantage of this is that it can be used for objects that need to
|
||||
* be accessed from the destructors of global objects (after main). The disadvantage
|
||||
* is that it's less efficient to use your own root pool, therefore it's use should be
|
||||
* restricted to those cases where it is absolutely necessary.
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeSimpleDCRootPool : private AIThreadSafeSimpleDCRootPool_pbase, public AIThreadSafeSimpleDC<T>
|
||||
{
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object, using memory allocated
|
||||
// from the operating system for the internal APR objects (mutexes and conditional),
|
||||
// as opposed to allocated from the current threads root pool.
|
||||
AIThreadSafeSimpleDCRootPool(void) :
|
||||
AIThreadSafeSimpleDCRootPool_pbase(),
|
||||
AIThreadSafeSimpleDC<T>(mRootPool) { }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Write lock object and provide read/write access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIAccess
|
||||
{
|
||||
//! Construct a AIAccess from a non-constant AIThreadSafeSimple.
|
||||
AIAccess(AIThreadSafeSimple<T>& wrapper) : mWrapper(wrapper)
|
||||
#if AI_NEED_ACCESS_CC
|
||||
, mIsCopyConstructed(false)
|
||||
#endif
|
||||
{
|
||||
this->mWrapper.mMutex.lock();
|
||||
}
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T& operator*() const { return *this->mWrapper.ptr(); }
|
||||
|
||||
~AIAccess()
|
||||
{
|
||||
#if AI_NEED_ACCESS_CC
|
||||
if (mIsCopyConstructed) return;
|
||||
#endif
|
||||
this->mWrapper.mMutex.unlock();
|
||||
}
|
||||
|
||||
protected:
|
||||
AIThreadSafeSimple<T>& mWrapper; //!< Reference to the object that we provide access to.
|
||||
|
||||
#if AI_NEED_ACCESS_CC
|
||||
bool mIsCopyConstructed;
|
||||
public:
|
||||
AIAccess(AIAccess const& orig) : mWrapper(orig.mWrapper), mIsCopyConstructed(true) { }
|
||||
#else
|
||||
private:
|
||||
// Disallow copy constructing directly.
|
||||
AIAccess(AIAccess const&);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -48,7 +48,7 @@ class LLUUID;
|
||||
#define PHYSICS_TIMESTEP (1.f / 45.f)
|
||||
|
||||
const F32 COLLISION_TOLERANCE = 0.1f;
|
||||
const F32 HALF_COLLISION_TOLERANCE = COLLISION_TOLERANCE * 0.5f;
|
||||
const F32 HALF_COLLISION_TOLERANCE = 0.05f;
|
||||
|
||||
// Time constants
|
||||
const U32 HOURS_PER_LINDEN_DAY = 4;
|
||||
@@ -99,9 +99,9 @@ const F32 MIN_AGENT_WIDTH = 0.40f;
|
||||
const F32 DEFAULT_AGENT_WIDTH = 0.60f;
|
||||
const F32 MAX_AGENT_WIDTH = 0.80f;
|
||||
|
||||
const F32 MIN_AGENT_HEIGHT = 1.3f - 2.0f * COLLISION_TOLERANCE;
|
||||
const F32 MIN_AGENT_HEIGHT = 1.1f;
|
||||
const F32 DEFAULT_AGENT_HEIGHT = 1.9f;
|
||||
const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE;
|
||||
const F32 MAX_AGENT_HEIGHT = 2.45f;
|
||||
|
||||
// For linked sets
|
||||
const S32 MAX_CHILDREN_PER_TASK = 255;
|
||||
@@ -153,6 +153,11 @@ const char LAND_LAYER_CODE = 'L';
|
||||
const char WATER_LAYER_CODE = 'W';
|
||||
const char WIND_LAYER_CODE = '7';
|
||||
const char CLOUD_LAYER_CODE = '8';
|
||||
// Extended land layer for Aurora Sim
|
||||
const char AURORA_LAND_LAYER_CODE = 'M';
|
||||
const char AURORA_WATER_LAYER_CODE = 'X';
|
||||
const char AURORA_WIND_LAYER_CODE = '9';
|
||||
const char AURORA_CLOUD_LAYER_CODE = ':';
|
||||
|
||||
// keys
|
||||
// Bit masks for various keyboard modifier keys.
|
||||
@@ -252,9 +257,6 @@ const U8 SIM_ACCESS_ADULT = 42; // Seriously Adult Only
|
||||
const U8 SIM_ACCESS_DOWN = 254;
|
||||
const U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT;
|
||||
|
||||
// group constants
|
||||
const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
|
||||
|
||||
// attachment constants
|
||||
const S32 MAX_AGENT_ATTACHMENTS = 38;
|
||||
const U8 ATTACHMENT_ADD = 0x80;
|
||||
@@ -293,6 +295,7 @@ const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE
|
||||
// Agent Update Flags (U8)
|
||||
const U8 AU_FLAGS_NONE = 0x00;
|
||||
const U8 AU_FLAGS_HIDETITLE = 0x01;
|
||||
const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02;
|
||||
|
||||
// start location constants
|
||||
const U32 START_LOCATION_ID_LAST = 0;
|
||||
@@ -306,6 +309,14 @@ const U32 START_LOCATION_ID_COUNT = 6;
|
||||
// group constants
|
||||
const U32 GROUP_MIN_SIZE = 2;
|
||||
|
||||
// gMaxAgentGroups is now sent by login.cgi, which
|
||||
// looks it up from globals.xml.
|
||||
//
|
||||
// For now we need an old default value however,
|
||||
// so the viewer can be deployed ahead of login.cgi.
|
||||
//
|
||||
const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
|
||||
|
||||
// radius within which a chat message is fully audible
|
||||
const F32 CHAT_WHISPER_RADIUS = 10.f;
|
||||
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
||||
@@ -313,6 +324,14 @@ const F32 CHAT_SHOUT_RADIUS = 100.f;
|
||||
const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS;
|
||||
const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f;
|
||||
|
||||
// squared editions of the above for distance checks
|
||||
const F32 CHAT_WHISPER_RADIUS_SQUARED = CHAT_WHISPER_RADIUS * CHAT_WHISPER_RADIUS;
|
||||
const F32 CHAT_NORMAL_RADIUS_SQUARED = CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS;
|
||||
const F32 CHAT_SHOUT_RADIUS_SQUARED = CHAT_SHOUT_RADIUS * CHAT_SHOUT_RADIUS;
|
||||
const F32 CHAT_MAX_RADIUS_SQUARED = CHAT_SHOUT_RADIUS_SQUARED;
|
||||
const F32 CHAT_MAX_RADIUS_BY_TWO_SQUARED = CHAT_MAX_RADIUS_BY_TWO * CHAT_MAX_RADIUS_BY_TWO;
|
||||
|
||||
|
||||
// this times above gives barely audible radius
|
||||
const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f;
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#ifndef LL_LINDEN_COMMON_H
|
||||
#define LL_LINDEN_COMMON_H
|
||||
|
||||
#include "cwdebug.h"
|
||||
|
||||
#if defined(LL_WINDOWS) && defined(_DEBUG)
|
||||
# if _MSC_VER >= 1400 // Visual C++ 2005 or later
|
||||
# define _CRTDBG_MAP_ALLOC
|
||||
|
||||
86
indra/llcommon/llaccountingcost.h
Normal file
86
indra/llcommon/llaccountingcost.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* @file llaccountingcost.h
|
||||
* @
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_ACCOUNTINGQUOTA_H
|
||||
#define LL_ACCOUNTINGQUOTA_H
|
||||
|
||||
struct ParcelQuota
|
||||
{
|
||||
ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost,
|
||||
F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost,
|
||||
F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost,
|
||||
F32 tempRenderCost, F32 tempPhysicsCost, F32 tempNetworkCost, F32 tempSimulationCost,
|
||||
F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost,
|
||||
F32 parcelCapacity )
|
||||
: mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost )
|
||||
, mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost )
|
||||
, mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost )
|
||||
, mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost )
|
||||
, mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost )
|
||||
, mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost )
|
||||
, mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost )
|
||||
, mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost )
|
||||
, mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost )
|
||||
, mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost )
|
||||
, mParcelCapacity( parcelCapacity )
|
||||
{
|
||||
}
|
||||
|
||||
ParcelQuota(){}
|
||||
F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost;
|
||||
F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost;
|
||||
F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost;
|
||||
F32 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost;
|
||||
F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost;
|
||||
F32 mParcelCapacity;
|
||||
};
|
||||
|
||||
//SelectionQuota atm does not require a id
|
||||
struct SelectionCost
|
||||
{
|
||||
SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost )
|
||||
//: mTransactionId( transactionId)
|
||||
: mPhysicsCost( physicsCost )
|
||||
, mNetworkCost( networkCost )
|
||||
, mSimulationCost( simulationCost )
|
||||
{
|
||||
}
|
||||
SelectionCost()
|
||||
: mPhysicsCost( 0.0f )
|
||||
, mNetworkCost( 0.0f )
|
||||
, mSimulationCost( 0.0f )
|
||||
{}
|
||||
|
||||
F32 mPhysicsCost, mNetworkCost, mSimulationCost;
|
||||
//LLTransactionID mTransactionId;
|
||||
};
|
||||
|
||||
typedef enum { Roots = 0 , Prims } eSelectionType;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
#include "llerrorcontrol.h"
|
||||
#include "llerrorthread.h"
|
||||
#include "llframetimer.h"
|
||||
#include "lllivefile.h"
|
||||
#include "llmemory.h"
|
||||
#include "lltimer.h"
|
||||
#include "llstl.h" // for DeletePointer()
|
||||
#include "lleventtimer.h"
|
||||
|
||||
//
|
||||
// Signal handling
|
||||
@@ -95,7 +97,6 @@ LLAppChildCallback LLApp::sDefaultChildCallback = NULL;
|
||||
LLApp::LLApp() : mThreadErrorp(NULL)
|
||||
{
|
||||
commonCtor();
|
||||
startErrorThread();
|
||||
}
|
||||
|
||||
void LLApp::commonCtor()
|
||||
@@ -123,13 +124,8 @@ void LLApp::commonCtor()
|
||||
mOptions.append(sd);
|
||||
}
|
||||
|
||||
// Make sure we clean up APR when we exit
|
||||
// Don't need to do this if we're cleaning up APR in the destructor
|
||||
//atexit(ll_cleanup_apr);
|
||||
|
||||
// Set the application to this instance.
|
||||
sApplication = this;
|
||||
|
||||
}
|
||||
|
||||
LLApp::LLApp(LLErrorThread *error_thread) :
|
||||
@@ -145,6 +141,11 @@ LLApp::~LLApp()
|
||||
delete sSigChildCount;
|
||||
sSigChildCount = NULL;
|
||||
#endif
|
||||
|
||||
// reclaim live file memory
|
||||
std::for_each(mLiveFiles.begin(), mLiveFiles.end(), DeletePointer());
|
||||
mLiveFiles.clear();
|
||||
|
||||
setStopped();
|
||||
// HACK: wait for the error thread to clean itself
|
||||
ms_sleep(20);
|
||||
@@ -218,6 +219,15 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void LLApp::manageLiveFile(LLLiveFile* livefile)
|
||||
{
|
||||
if(!livefile) return;
|
||||
livefile->checkAndReload();
|
||||
livefile->addToEventTimer();
|
||||
mLiveFiles.push_back(livefile);
|
||||
}
|
||||
|
||||
bool LLApp::setOptionData(OptionPriority level, LLSD data)
|
||||
{
|
||||
if((level < 0)
|
||||
@@ -239,15 +249,6 @@ LLSD LLApp::getOptionData(OptionPriority level)
|
||||
return mOptions[level];
|
||||
}
|
||||
|
||||
void LLApp::stepFrame()
|
||||
{
|
||||
LLFrameTimer::updateFrameTime();
|
||||
LLFrameTimer::updateFrameCount();
|
||||
LLEventTimer::updateClass();
|
||||
mRunner.run();
|
||||
}
|
||||
|
||||
|
||||
void LLApp::setupErrorHandling()
|
||||
{
|
||||
// Error handling is done by starting up an error handling thread, which just sleeps and
|
||||
@@ -287,10 +288,13 @@ void LLApp::startErrorThread()
|
||||
// Start the error handling thread, which is responsible for taking action
|
||||
// when the app goes into the APP_STATUS_ERROR state
|
||||
//
|
||||
llinfos << "Starting error thread" << llendl;
|
||||
mThreadErrorp = new LLErrorThread();
|
||||
mThreadErrorp->setUserData((void *) this);
|
||||
mThreadErrorp->start();
|
||||
if(!mThreadErrorp)
|
||||
{
|
||||
llinfos << "Starting error thread" << llendl;
|
||||
mThreadErrorp = new LLErrorThread();
|
||||
mThreadErrorp->setUserData((void *) this);
|
||||
mThreadErrorp->start();
|
||||
}
|
||||
}
|
||||
|
||||
void LLApp::setErrorHandler(LLAppErrorHandler handler)
|
||||
|
||||
@@ -131,6 +131,19 @@ public:
|
||||
*/
|
||||
bool parseCommandOptions(int argc, char** argv);
|
||||
|
||||
/**
|
||||
* @brief Keep track of live files automatically.
|
||||
*
|
||||
* *TODO: it currently uses the <code>addToEventTimer()</code> API
|
||||
* instead of the runner. I should probalby use the runner.
|
||||
*
|
||||
* *NOTE: DO NOT add the livefile instance to any kind of check loop.
|
||||
*
|
||||
* @param livefile A valid instance of an LLLiveFile. This LLApp
|
||||
* instance will delete the livefile instance.
|
||||
*/
|
||||
void manageLiveFile(LLLiveFile* livefile);
|
||||
|
||||
/**
|
||||
* @brief Set the options at the specified priority.
|
||||
*
|
||||
@@ -223,17 +236,6 @@ public:
|
||||
pid_t fork();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get a reference to the application runner
|
||||
*
|
||||
* Please use the runner with caution. Since the Runner usage
|
||||
* pattern is not yet clear, this method just gives access to it
|
||||
* to add and remove runnables.
|
||||
* @return Returns the application runner. Do not save the
|
||||
* pointer past the caller's stack frame.
|
||||
*/
|
||||
LLRunner& getRunner() { return mRunner; }
|
||||
|
||||
public:
|
||||
typedef std::map<std::string, std::string> string_map;
|
||||
string_map mOptionMap; // Contains all command-line options and arguments in a map
|
||||
@@ -252,13 +254,11 @@ protected:
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This method is called once a frame to do once a frame tasks.
|
||||
*/
|
||||
void stepFrame();
|
||||
* @ brief This method is called once as soon as logging is initialized.
|
||||
*/
|
||||
void startErrorThread();
|
||||
|
||||
private:
|
||||
void startErrorThread();
|
||||
|
||||
void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions)
|
||||
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
||||
static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread.
|
||||
@@ -273,15 +273,14 @@ private:
|
||||
// Default application threads
|
||||
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback
|
||||
|
||||
// This is the application level runnable scheduler.
|
||||
LLRunner mRunner;
|
||||
|
||||
/** @name Runtime option implementation */
|
||||
//@{
|
||||
|
||||
// The application options.
|
||||
LLSD mOptions;
|
||||
|
||||
// The live files for this application
|
||||
std::vector<LLLiveFile*> mLiveFiles;
|
||||
//@}
|
||||
|
||||
private:
|
||||
|
||||
@@ -34,219 +34,7 @@
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llapr.h"
|
||||
|
||||
apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool
|
||||
apr_thread_mutex_t *gLogMutexp = NULL;
|
||||
apr_thread_mutex_t *gCallStacksLogMutexp = NULL;
|
||||
|
||||
const S32 FULL_VOLATILE_APR_POOL = 1024 ; //number of references to LLVolatileAPRPool
|
||||
|
||||
void ll_init_apr()
|
||||
{
|
||||
if (!gAPRPoolp)
|
||||
{
|
||||
// Initialize APR and create the global pool
|
||||
apr_initialize();
|
||||
apr_pool_create(&gAPRPoolp, NULL);
|
||||
|
||||
// Initialize the logging mutex
|
||||
apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp);
|
||||
apr_thread_mutex_create(&gCallStacksLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp);
|
||||
|
||||
// Initialize thread-local APR pool support.
|
||||
LLVolatileAPRPool::initLocalAPRFilePool();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ll_cleanup_apr()
|
||||
{
|
||||
LL_INFOS("APR") << "Cleaning up APR" << LL_ENDL;
|
||||
|
||||
if (gLogMutexp)
|
||||
{
|
||||
// Clean up the logging mutex
|
||||
|
||||
// All other threads NEED to be done before we clean up APR, so this is okay.
|
||||
apr_thread_mutex_destroy(gLogMutexp);
|
||||
gLogMutexp = NULL;
|
||||
}
|
||||
if (gCallStacksLogMutexp)
|
||||
{
|
||||
// Clean up the logging mutex
|
||||
|
||||
// All other threads NEED to be done before we clean up APR, so this is okay.
|
||||
apr_thread_mutex_destroy(gCallStacksLogMutexp);
|
||||
gCallStacksLogMutexp = NULL;
|
||||
}
|
||||
if (gAPRPoolp)
|
||||
{
|
||||
apr_pool_destroy(gAPRPoolp);
|
||||
gAPRPoolp = NULL;
|
||||
}
|
||||
apr_terminate();
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//LLAPRPool
|
||||
//
|
||||
LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size, BOOL releasePoolFlag)
|
||||
: mParent(parent),
|
||||
mReleasePoolFlag(releasePoolFlag),
|
||||
mMaxSize(size),
|
||||
mPool(NULL)
|
||||
{
|
||||
createAPRPool() ;
|
||||
}
|
||||
|
||||
LLAPRPool::~LLAPRPool()
|
||||
{
|
||||
releaseAPRPool() ;
|
||||
}
|
||||
|
||||
void LLAPRPool::createAPRPool()
|
||||
{
|
||||
if(mPool)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
mStatus = apr_pool_create(&mPool, mParent);
|
||||
ll_apr_warn_status(mStatus) ;
|
||||
|
||||
if(mMaxSize > 0) //size is the number of blocks (which is usually 4K), NOT bytes.
|
||||
{
|
||||
apr_allocator_t *allocator = apr_pool_allocator_get(mPool);
|
||||
if (allocator)
|
||||
{
|
||||
apr_allocator_max_free_set(allocator, mMaxSize) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLAPRPool::releaseAPRPool()
|
||||
{
|
||||
if(!mPool)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
if(!mParent || mReleasePoolFlag)
|
||||
{
|
||||
apr_pool_destroy(mPool) ;
|
||||
mPool = NULL ;
|
||||
}
|
||||
}
|
||||
|
||||
apr_pool_t* LLAPRPool::getAPRPool()
|
||||
{
|
||||
if(!mPool)
|
||||
{
|
||||
createAPRPool() ;
|
||||
}
|
||||
|
||||
return mPool ;
|
||||
}
|
||||
LLVolatileAPRPool::LLVolatileAPRPool(apr_pool_t *parent, apr_size_t size, BOOL releasePoolFlag)
|
||||
: LLAPRPool(parent, size, releasePoolFlag)
|
||||
{
|
||||
mNumActiveRef = 0 ;
|
||||
mNumTotalRef = 0 ;
|
||||
}
|
||||
|
||||
apr_pool_t* LLVolatileAPRPool::getVolatileAPRPool()
|
||||
{
|
||||
mNumTotalRef++ ;
|
||||
mNumActiveRef++ ;
|
||||
return getAPRPool() ;
|
||||
}
|
||||
|
||||
void LLVolatileAPRPool::clearVolatileAPRPool()
|
||||
{
|
||||
if(mNumActiveRef > 0)
|
||||
{
|
||||
mNumActiveRef--;
|
||||
if(mNumActiveRef < 1)
|
||||
{
|
||||
if(isFull())
|
||||
{
|
||||
mNumTotalRef = 0 ;
|
||||
|
||||
//destroy the apr_pool.
|
||||
releaseAPRPool() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
//This does not actually free the memory,
|
||||
//it just allows the pool to re-use this memory for the next allocation.
|
||||
apr_pool_clear(mPool) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert_always(mNumActiveRef > 0) ;
|
||||
}
|
||||
|
||||
//paranoia check if the pool is jammed.
|
||||
//will remove the check before going to release.
|
||||
llassert_always(mNumTotalRef < (FULL_VOLATILE_APR_POOL << 2)) ;
|
||||
}
|
||||
|
||||
BOOL LLVolatileAPRPool::isFull()
|
||||
{
|
||||
return mNumTotalRef > FULL_VOLATILE_APR_POOL ;
|
||||
}
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
// This allows the use of llassert(is_main_thread()) to assure the current thread is the main thread.
|
||||
static void* gIsMainThread;
|
||||
bool is_main_thread() { return gIsMainThread == LLVolatileAPRPool::getLocalAPRFilePool(); }
|
||||
#endif
|
||||
|
||||
// The thread private handle to access the LocalAPRFilePool.
|
||||
apr_threadkey_t* LLVolatileAPRPool::sLocalAPRFilePoolKey;
|
||||
|
||||
// This should be called exactly once, before the first call to createLocalAPRFilePool.
|
||||
// static
|
||||
void LLVolatileAPRPool::initLocalAPRFilePool()
|
||||
{
|
||||
apr_status_t status = apr_threadkey_private_create(&sLocalAPRFilePoolKey, &destroyLocalAPRFilePool, gAPRPoolp);
|
||||
ll_apr_assert_status(status); // Or out of memory, or system-imposed limit on the
|
||||
// total number of keys per process {PTHREAD_KEYS_MAX}
|
||||
// has been exceeded.
|
||||
// Create the thread-local pool for the main thread (this function is called by the main thread).
|
||||
createLocalAPRFilePool();
|
||||
#ifdef SHOW_ASSERT
|
||||
gIsMainThread = getLocalAPRFilePool();
|
||||
#endif
|
||||
}
|
||||
|
||||
// This should be called once for every thread, before it uses getLocalAPRFilePool.
|
||||
// static
|
||||
void LLVolatileAPRPool::createLocalAPRFilePool()
|
||||
{
|
||||
void* thread_local_data = new LLVolatileAPRPool;
|
||||
apr_status_t status = apr_threadkey_private_set(thread_local_data, sLocalAPRFilePoolKey);
|
||||
llassert_always(status == APR_SUCCESS);
|
||||
}
|
||||
|
||||
// This is called once for every thread when the thread is destructed.
|
||||
// static
|
||||
void LLVolatileAPRPool::destroyLocalAPRFilePool(void* thread_local_data)
|
||||
{
|
||||
delete reinterpret_cast<LLVolatileAPRPool*>(thread_local_data);
|
||||
}
|
||||
|
||||
// static
|
||||
LLVolatileAPRPool* LLVolatileAPRPool::getLocalAPRFilePool()
|
||||
{
|
||||
void* thread_local_data;
|
||||
apr_status_t status = apr_threadkey_private_get(&thread_local_data, sLocalAPRFilePoolKey);
|
||||
llassert_always(status == APR_SUCCESS);
|
||||
return reinterpret_cast<LLVolatileAPRPool*>(thread_local_data);
|
||||
}
|
||||
#include "llscopedvolatileaprpool.h"
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
@@ -293,7 +81,7 @@ bool ll_apr_warn_status(apr_status_t status)
|
||||
{
|
||||
if(APR_SUCCESS == status) return false;
|
||||
char buf[MAX_STRING]; /* Flawfinder: ignore */
|
||||
apr_strerror(status, buf, MAX_STRING);
|
||||
apr_strerror(status, buf, sizeof(buf));
|
||||
LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
@@ -309,15 +97,17 @@ void ll_apr_assert_status(apr_status_t status)
|
||||
//
|
||||
LLAPRFile::LLAPRFile()
|
||||
: mFile(NULL),
|
||||
mCurrentFilePoolp(NULL)
|
||||
mVolatileFilePoolp(NULL),
|
||||
mRegularFilePoolp(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
LLAPRFile::LLAPRFile(const std::string& filename, apr_int32_t flags, access_t access_type)
|
||||
LLAPRFile::LLAPRFile(const std::string& filename, apr_int32_t flags, S32* sizep, access_t access_type)
|
||||
: mFile(NULL),
|
||||
mCurrentFilePoolp(NULL)
|
||||
mVolatileFilePoolp(NULL),
|
||||
mRegularFilePoolp(NULL)
|
||||
{
|
||||
open(filename, flags, access_type);
|
||||
open(filename, flags, access_type, sizep);
|
||||
}
|
||||
|
||||
LLAPRFile::~LLAPRFile()
|
||||
@@ -334,10 +124,16 @@ apr_status_t LLAPRFile::close()
|
||||
mFile = NULL ;
|
||||
}
|
||||
|
||||
if(mCurrentFilePoolp)
|
||||
if (mVolatileFilePoolp)
|
||||
{
|
||||
mCurrentFilePoolp->clearVolatileAPRPool() ;
|
||||
mCurrentFilePoolp = NULL ;
|
||||
mVolatileFilePoolp->clearVolatileAPRPool() ;
|
||||
mVolatileFilePoolp = NULL ;
|
||||
}
|
||||
|
||||
if (mRegularFilePoolp)
|
||||
{
|
||||
delete mRegularFilePoolp;
|
||||
mRegularFilePoolp = NULL;
|
||||
}
|
||||
|
||||
return ret ;
|
||||
@@ -346,25 +142,29 @@ apr_status_t LLAPRFile::close()
|
||||
apr_status_t LLAPRFile::open(std::string const& filename, apr_int32_t flags, access_t access_type, S32* sizep)
|
||||
{
|
||||
llassert_always(!mFile);
|
||||
llassert_always(!mCurrentFilePoolp);
|
||||
llassert_always(!mVolatileFilePoolp && !mRegularFilePoolp);
|
||||
|
||||
// Access the pool and increment it's reference count.
|
||||
// The reference count of LLVolatileAPRPool objects will be decremented
|
||||
// again in LLAPRFile::close by calling mCurrentFilePoolp->clearVolatileAPRPool().
|
||||
apr_pool_t* pool;
|
||||
if (access_type == local)
|
||||
apr_status_t status;
|
||||
{
|
||||
// Use a "volatile" thread-local pool.
|
||||
mCurrentFilePoolp = LLVolatileAPRPool::getLocalAPRFilePool();
|
||||
pool = mCurrentFilePoolp->getVolatileAPRPool();
|
||||
apr_pool_t* apr_file_open_pool;
|
||||
// This is a temporary variable for a pool that is passed directly to apr_file_open below.
|
||||
if (access_type == short_lived)
|
||||
{
|
||||
// Use a "volatile" thread-local pool.
|
||||
mVolatileFilePoolp = &LLThreadLocalData::tldata().mVolatileAPRPool;
|
||||
// Access the pool and increment it's reference count.
|
||||
// The reference count of LLVolatileAPRPool objects will be decremented
|
||||
// again in LLAPRFile::close by calling mVolatileFilePoolp->clearVolatileAPRPool().
|
||||
apr_file_open_pool = mVolatileFilePoolp->getVolatileAPRPool();
|
||||
}
|
||||
else
|
||||
{
|
||||
mRegularFilePoolp = new LLAPRPool(LLThreadLocalData::tldata().mRootPool);
|
||||
apr_file_open_pool = (*mRegularFilePoolp)();
|
||||
}
|
||||
status = apr_file_open(&mFile, filename.c_str(), flags, APR_OS_DEFAULT, apr_file_open_pool);
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(is_main_thread());
|
||||
pool = gAPRPoolp;
|
||||
}
|
||||
apr_status_t s = apr_file_open(&mFile, filename.c_str(), flags, APR_OS_DEFAULT, pool);
|
||||
if (s != APR_SUCCESS || !mFile)
|
||||
if (status != APR_SUCCESS || !mFile)
|
||||
{
|
||||
mFile = NULL ;
|
||||
close() ;
|
||||
@@ -372,7 +172,7 @@ apr_status_t LLAPRFile::open(std::string const& filename, apr_int32_t flags, acc
|
||||
{
|
||||
*sizep = 0;
|
||||
}
|
||||
return s;
|
||||
return status;
|
||||
}
|
||||
|
||||
if (sizep)
|
||||
@@ -389,9 +189,13 @@ apr_status_t LLAPRFile::open(std::string const& filename, apr_int32_t flags, acc
|
||||
*sizep = file_size;
|
||||
}
|
||||
|
||||
return s;
|
||||
return status;
|
||||
}
|
||||
|
||||
apr_status_t LLAPRFile::open(const std::string& filename, apr_int32_t flags, BOOL use_global_pool)
|
||||
{
|
||||
return open(filename, flags, use_global_pool ? LLAPRFile::long_lived : LLAPRFile::short_lived);
|
||||
}
|
||||
// File I/O
|
||||
S32 LLAPRFile::read(void *buf, S32 nbytes)
|
||||
{
|
||||
@@ -449,17 +253,6 @@ S32 LLAPRFile::seek(apr_seek_where_t where, S32 offset)
|
||||
//static components of LLAPRFile
|
||||
//
|
||||
|
||||
// Used in the static functions below.
|
||||
class LLScopedVolatileAPRFilePool {
|
||||
private:
|
||||
LLVolatileAPRPool* mPool;
|
||||
apr_pool_t* apr_pool;
|
||||
public:
|
||||
LLScopedVolatileAPRFilePool() : mPool(LLVolatileAPRPool::getLocalAPRFilePool()), apr_pool(mPool->getVolatileAPRPool()) { }
|
||||
~LLScopedVolatileAPRFilePool() { mPool->clearVolatileAPRPool(); }
|
||||
operator apr_pool_t*() const { return apr_pool; }
|
||||
};
|
||||
|
||||
//static
|
||||
S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset)
|
||||
{
|
||||
@@ -496,7 +289,7 @@ S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset)
|
||||
S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes)
|
||||
{
|
||||
apr_file_t* file_handle;
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
apr_status_t s = apr_file_open(&file_handle, filename.c_str(), APR_READ|APR_BINARY, APR_OS_DEFAULT, pool);
|
||||
if (s != APR_SUCCESS || !file_handle)
|
||||
{
|
||||
@@ -548,7 +341,7 @@ S32 LLAPRFile::writeEx(const std::string& filename, void *buf, S32 offset, S32 n
|
||||
}
|
||||
|
||||
apr_file_t* file_handle;
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
apr_status_t s = apr_file_open(&file_handle, filename.c_str(), flags, APR_OS_DEFAULT, pool);
|
||||
if (s != APR_SUCCESS || !file_handle)
|
||||
{
|
||||
@@ -593,7 +386,7 @@ bool LLAPRFile::remove(const std::string& filename)
|
||||
{
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_file_remove(filename.c_str(), pool);
|
||||
|
||||
if (s != APR_SUCCESS)
|
||||
@@ -613,7 +406,7 @@ bool LLAPRFile::rename(const std::string& filename, const std::string& newname)
|
||||
{
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_file_rename(filename.c_str(), newname.c_str(), pool);
|
||||
|
||||
if (s != APR_SUCCESS)
|
||||
@@ -631,7 +424,7 @@ bool LLAPRFile::isExist(const std::string& filename, apr_int32_t flags)
|
||||
apr_file_t* file_handle;
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_file_open(&file_handle, filename.c_str(), flags, APR_OS_DEFAULT, pool);
|
||||
|
||||
if (s != APR_SUCCESS || !file_handle)
|
||||
@@ -652,7 +445,7 @@ S32 LLAPRFile::size(const std::string& filename)
|
||||
apr_finfo_t info;
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_file_open(&file_handle, filename.c_str(), APR_READ, APR_OS_DEFAULT, pool);
|
||||
|
||||
if (s != APR_SUCCESS || !file_handle)
|
||||
@@ -681,7 +474,7 @@ bool LLAPRFile::makeDir(const std::string& dirname)
|
||||
{
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_dir_make(dirname.c_str(), APR_FPROT_OS_DEFAULT, pool);
|
||||
|
||||
if (s != APR_SUCCESS)
|
||||
@@ -698,7 +491,7 @@ bool LLAPRFile::removeDir(const std::string& dirname)
|
||||
{
|
||||
apr_status_t s;
|
||||
|
||||
LLScopedVolatileAPRFilePool pool;
|
||||
LLScopedVolatileAPRPool pool;
|
||||
s = apr_file_remove(dirname.c_str(), pool);
|
||||
|
||||
if (s != APR_SUCCESS)
|
||||
|
||||
@@ -48,73 +48,8 @@
|
||||
#include "apr_atomic.h"
|
||||
#include "llstring.h"
|
||||
|
||||
extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
|
||||
|
||||
/**
|
||||
* @brief initialize the common apr constructs -- apr itself, the
|
||||
* global pool, and a mutex.
|
||||
*/
|
||||
void LL_COMMON_API ll_init_apr();
|
||||
|
||||
/**
|
||||
* @brief Cleanup those common apr constructs.
|
||||
*/
|
||||
void LL_COMMON_API ll_cleanup_apr();
|
||||
|
||||
//
|
||||
//LL apr_pool
|
||||
//manage apr_pool_t, destroy allocated apr_pool in the destruction function.
|
||||
//
|
||||
class LL_COMMON_API LLAPRPool
|
||||
{
|
||||
public:
|
||||
LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ;
|
||||
~LLAPRPool() ;
|
||||
|
||||
apr_pool_t* getAPRPool() ;
|
||||
apr_status_t getStatus() {return mStatus ; }
|
||||
|
||||
protected:
|
||||
void releaseAPRPool() ;
|
||||
void createAPRPool() ;
|
||||
|
||||
protected:
|
||||
apr_pool_t* mPool ; //pointing to an apr_pool
|
||||
apr_pool_t* mParent ; //parent pool
|
||||
apr_size_t mMaxSize ; //max size of mPool, mPool should return memory to system if allocated memory beyond this limit. However it seems not to work.
|
||||
apr_status_t mStatus ; //status when creating the pool
|
||||
BOOL mReleasePoolFlag ; //if set, mPool is destroyed when LLAPRPool is deleted. default value is true.
|
||||
};
|
||||
|
||||
//
|
||||
//volatile LL apr_pool
|
||||
//which clears memory automatically.
|
||||
//so it can not hold static data or data after memory is cleared
|
||||
//
|
||||
class LL_COMMON_API LLVolatileAPRPool : protected LLAPRPool
|
||||
{
|
||||
public:
|
||||
LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE);
|
||||
~LLVolatileAPRPool(){}
|
||||
|
||||
apr_pool_t* getVolatileAPRPool() ;
|
||||
|
||||
void clearVolatileAPRPool() ;
|
||||
|
||||
BOOL isFull() ;
|
||||
BOOL isEmpty() {return !mNumActiveRef ;}
|
||||
|
||||
static void initLocalAPRFilePool();
|
||||
static void createLocalAPRFilePool();
|
||||
static void destroyLocalAPRFilePool(void* thread_local_data);
|
||||
static LLVolatileAPRPool* getLocalAPRFilePool();
|
||||
|
||||
private:
|
||||
S32 mNumActiveRef ; //number of active pointers pointing to the apr_pool.
|
||||
S32 mNumTotalRef ; //number of total pointers pointing to the apr_pool since last creating.
|
||||
|
||||
static apr_threadkey_t* sLocalAPRFilePoolKey;
|
||||
} ;
|
||||
class LLAPRPool;
|
||||
class LLVolatileAPRPool;
|
||||
|
||||
/**
|
||||
* @class LLScopedLock
|
||||
@@ -205,19 +140,21 @@ class LL_COMMON_API LLAPRFile : boost::noncopyable
|
||||
// make this non copyable since a copy closes the file
|
||||
private:
|
||||
apr_file_t* mFile ;
|
||||
LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool.
|
||||
LLVolatileAPRPool* mVolatileFilePoolp; // (Thread local) APR pool currently in use.
|
||||
LLAPRPool* mRegularFilePoolp; // ...or a regular pool.
|
||||
|
||||
public:
|
||||
enum access_t {
|
||||
global, // Use a global pool for long-lived file accesses. This should really only happen from the main thread.
|
||||
local // Use a thread-local volatile pool for short file accesses.
|
||||
long_lived, // Use a global pool for long-lived file accesses.
|
||||
short_lived // Use a volatile pool for short-lived file accesses.
|
||||
};
|
||||
|
||||
LLAPRFile() ;
|
||||
LLAPRFile(const std::string& filename, apr_int32_t flags, access_t access_type);
|
||||
LLAPRFile(const std::string& filename, apr_int32_t flags, S32* sizep = NULL, access_t access_type = short_lived);
|
||||
~LLAPRFile() ;
|
||||
|
||||
apr_status_t open(const std::string& filename, apr_int32_t flags, access_t access_type, S32* sizep = NULL);
|
||||
apr_status_t open(const std::string& filename, apr_int32_t flags, access_t access_type = short_lived, S32* sizep = NULL);
|
||||
apr_status_t open(const std::string& filename, apr_int32_t flags, BOOL use_global_pool); //use global pool.
|
||||
apr_status_t close() ;
|
||||
|
||||
// Returns actual offset, -1 if seek fails
|
||||
@@ -260,6 +197,4 @@ bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
|
||||
|
||||
void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
|
||||
|
||||
extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
|
||||
|
||||
#endif // LL_LLAPR_H
|
||||
|
||||
198
indra/llcommon/llaprpool.cpp
Normal file
198
indra/llcommon/llaprpool.cpp
Normal file
@@ -0,0 +1,198 @@
|
||||
/**
|
||||
* @file LLAPRPool.cpp
|
||||
*
|
||||
* Copyright (c) 2010, Aleric Inglewood.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution.
|
||||
*
|
||||
* CHANGELOG
|
||||
* and additional copyright holders.
|
||||
*
|
||||
* 04/04/2010
|
||||
* - Initial version, written by Aleric Inglewood @ SL
|
||||
*
|
||||
* 10/11/2010
|
||||
* - Changed filename, class names and license to a more
|
||||
* company-neutral format.
|
||||
* - Added APR_HAS_THREADS #if's to allow creation and destruction
|
||||
* of subpools by threads other than the parent pool owner.
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llerror.h"
|
||||
#include "llaprpool.h"
|
||||
#include "llthread.h"
|
||||
|
||||
// Create a subpool from parent.
|
||||
void LLAPRPool::create(LLAPRPool& parent)
|
||||
{
|
||||
llassert(!mPool); // Must be non-initialized.
|
||||
mParent = &parent;
|
||||
if (!mParent) // Using the default parameter?
|
||||
{
|
||||
// By default use the root pool of the current thread.
|
||||
mParent = &LLThreadLocalData::tldata().mRootPool;
|
||||
}
|
||||
llassert(mParent->mPool); // Parent must be initialized.
|
||||
#if APR_HAS_THREADS
|
||||
// As per the documentation of APR (ie http://apr.apache.org/docs/apr/1.4/apr__pools_8h.html):
|
||||
//
|
||||
// Note that most operations on pools are not thread-safe: a single pool should only be
|
||||
// accessed by a single thread at any given time. The one exception to this rule is creating
|
||||
// a subpool of a given pool: one or more threads can safely create subpools at the same
|
||||
// time that another thread accesses the parent pool.
|
||||
//
|
||||
// In other words, it's safe for any thread to create a (sub)pool, independent of who
|
||||
// owns the parent pool.
|
||||
mOwner = apr_os_thread_current();
|
||||
#else
|
||||
mOwner = mParent->mOwner;
|
||||
llassert(apr_os_thread_equal(mOwner, apr_os_thread_current()));
|
||||
#endif
|
||||
apr_status_t const apr_pool_create_status = apr_pool_create(&mPool, mParent->mPool);
|
||||
llassert_always(apr_pool_create_status == APR_SUCCESS);
|
||||
llassert(mPool); // Initialized.
|
||||
apr_pool_cleanup_register(mPool, this, &s_plain_cleanup, &apr_pool_cleanup_null);
|
||||
}
|
||||
|
||||
// Destroy the (sub)pool, if any.
|
||||
void LLAPRPool::destroy(void)
|
||||
{
|
||||
// Only do anything if we are not already (being) destroyed.
|
||||
if (mPool)
|
||||
{
|
||||
#if !APR_HAS_THREADS
|
||||
// If we are a root pool, then every thread may destruct us: in that case
|
||||
// we have to assume that no other thread will use this pool concurrently,
|
||||
// of course. Otherwise, if we are a subpool, only the thread that owns
|
||||
// the parent may destruct us, since that is the pool that is still alive,
|
||||
// possibly being used by others and being altered here.
|
||||
llassert(!mParent || apr_os_thread_equal(mParent->mOwner, apr_os_thread_current()));
|
||||
#endif
|
||||
apr_pool_t* pool = mPool;
|
||||
mPool = NULL; // Mark that we are BEING destructed.
|
||||
apr_pool_cleanup_kill(pool, this, &s_plain_cleanup);
|
||||
apr_pool_destroy(pool);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLAPRPool::parent_is_being_destructed(void)
|
||||
{
|
||||
return mParent && (!mParent->mPool || mParent->parent_is_being_destructed());
|
||||
}
|
||||
|
||||
LLAPRInitialization::LLAPRInitialization(void)
|
||||
{
|
||||
static bool apr_initialized = false;
|
||||
|
||||
if (!apr_initialized)
|
||||
{
|
||||
apr_initialize();
|
||||
}
|
||||
|
||||
apr_initialized = true;
|
||||
}
|
||||
|
||||
bool LLAPRRootPool::sCountInitialized = false;
|
||||
apr_uint32_t volatile LLAPRRootPool::sCount;
|
||||
|
||||
apr_thread_mutex_t* gLogMutexp;
|
||||
apr_thread_mutex_t* gCallStacksLogMutexp;
|
||||
|
||||
LLAPRRootPool::LLAPRRootPool(void) : LLAPRInitialization(), LLAPRPool(0)
|
||||
{
|
||||
// sCountInitialized don't need locking because when we get here there is still only a single thread.
|
||||
if (!sCountInitialized)
|
||||
{
|
||||
// Initialize the logging mutex
|
||||
apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_UNNESTED, mPool);
|
||||
apr_thread_mutex_create(&gCallStacksLogMutexp, APR_THREAD_MUTEX_UNNESTED, mPool);
|
||||
|
||||
apr_status_t status = apr_atomic_init(mPool);
|
||||
llassert_always(status == APR_SUCCESS);
|
||||
apr_atomic_set32(&sCount, 1); // Set to 1 to account for the global root pool.
|
||||
sCountInitialized = true;
|
||||
|
||||
// Initialize thread-local APR pool support.
|
||||
// Because this recursively calls LLAPRRootPool::LLAPRRootPool(void)
|
||||
// it must be done last, so that sCount is already initialized.
|
||||
LLThreadLocalData::init();
|
||||
}
|
||||
apr_atomic_inc32(&sCount);
|
||||
}
|
||||
|
||||
LLAPRRootPool::~LLAPRRootPool()
|
||||
{
|
||||
if (!apr_atomic_dec32(&sCount))
|
||||
{
|
||||
// The last pool was destructed. Cleanup remainder of APR.
|
||||
LL_INFOS("APR") << "Cleaning up APR" << LL_ENDL;
|
||||
|
||||
if (gLogMutexp)
|
||||
{
|
||||
// Clean up the logging mutex
|
||||
|
||||
// All other threads NEED to be done before we clean up APR, so this is okay.
|
||||
apr_thread_mutex_destroy(gLogMutexp);
|
||||
gLogMutexp = NULL;
|
||||
}
|
||||
if (gCallStacksLogMutexp)
|
||||
{
|
||||
// Clean up the logging mutex
|
||||
|
||||
// All other threads NEED to be done before we clean up APR, so this is okay.
|
||||
apr_thread_mutex_destroy(gCallStacksLogMutexp);
|
||||
gCallStacksLogMutexp = NULL;
|
||||
}
|
||||
|
||||
// Must destroy ALL, and therefore this last LLAPRRootPool, before terminating APR.
|
||||
static_cast<LLAPRRootPool*>(this)->destroy();
|
||||
|
||||
apr_terminate();
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
LLAPRRootPool& LLAPRRootPool::get(void)
|
||||
{
|
||||
static LLAPRRootPool global_APRpool(0); // This is what used to be gAPRPoolp.
|
||||
return global_APRpool;
|
||||
}
|
||||
|
||||
void LLVolatileAPRPool::clearVolatileAPRPool()
|
||||
{
|
||||
llassert_always(mNumActiveRef > 0);
|
||||
if (--mNumActiveRef == 0)
|
||||
{
|
||||
if (isOld())
|
||||
{
|
||||
destroy();
|
||||
mNumTotalRef = 0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This does not actually free the memory,
|
||||
// it just allows the pool to re-use this memory for the next allocation.
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Paranoia check if the pool is jammed.
|
||||
llassert(mNumTotalRef < (FULL_VOLATILE_APR_POOL << 2)) ;
|
||||
}
|
||||
246
indra/llcommon/llaprpool.h
Normal file
246
indra/llcommon/llaprpool.h
Normal file
@@ -0,0 +1,246 @@
|
||||
/**
|
||||
* @file LLAPRPool.h
|
||||
* @brief Implementation of LLAPRPool.
|
||||
*
|
||||
* Copyright (c) 2010, Aleric Inglewood.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution.
|
||||
*
|
||||
* CHANGELOG
|
||||
* and additional copyright holders.
|
||||
*
|
||||
* 04/04/2010
|
||||
* - Initial version, written by Aleric Inglewood @ SL
|
||||
*
|
||||
* 10/11/2010
|
||||
* - Changed filename, class names and license to a more
|
||||
* company-neutral format.
|
||||
* - Added APR_HAS_THREADS #if's to allow creation and destruction
|
||||
* of subpools by threads other than the parent pool owner.
|
||||
*/
|
||||
|
||||
#ifndef LL_LLAPRPOOL_H
|
||||
#define LL_LLAPRPOOL_H
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4996)
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h> // Needed before including apr_portable.h
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include "apr_portable.h"
|
||||
#include "apr_pools.h"
|
||||
#include "llerror.h"
|
||||
|
||||
extern void ll_init_apr();
|
||||
|
||||
/**
|
||||
* @brief A wrapper around the APR memory pool API.
|
||||
*
|
||||
* Usage of this class should be restricted to passing it to libapr-1 function calls that need it.
|
||||
*
|
||||
*/
|
||||
class LL_COMMON_API LLAPRPool
|
||||
{
|
||||
protected:
|
||||
apr_pool_t* mPool; //!< Pointer to the underlaying pool. NULL if not initialized.
|
||||
LLAPRPool* mParent; //!< Pointer to the parent pool, if any. Only valid when mPool is non-zero.
|
||||
apr_os_thread_t mOwner; //!< The thread that owns this memory pool. Only valid when mPool is non-zero.
|
||||
|
||||
public:
|
||||
//! Construct an uninitialized (destructed) pool.
|
||||
LLAPRPool(void) : mPool(NULL) { }
|
||||
|
||||
//! Construct a subpool from an existing pool.
|
||||
// This is not a copy-constructor, this class doesn't have one!
|
||||
LLAPRPool(LLAPRPool& parent) : mPool(NULL) { create(parent); }
|
||||
|
||||
//! Destruct the memory pool (free all of it's subpools and allocated memory).
|
||||
~LLAPRPool() { destroy(); }
|
||||
|
||||
protected:
|
||||
// Create a pool that is allocated from the Operating System. Only used by LLAPRRootPool.
|
||||
LLAPRPool(int) : mPool(NULL), mParent(NULL), mOwner(apr_os_thread_current())
|
||||
{
|
||||
apr_status_t const apr_pool_create_status = apr_pool_create(&mPool, NULL);
|
||||
llassert_always(apr_pool_create_status == APR_SUCCESS);
|
||||
llassert(mPool);
|
||||
apr_pool_cleanup_register(mPool, this, &s_plain_cleanup, &apr_pool_cleanup_null);
|
||||
}
|
||||
|
||||
public:
|
||||
//! Create a subpool from parent. May only be called for an uninitialized/destroyed pool.
|
||||
// The default parameter causes the root pool of the current thread to be used.
|
||||
void create(LLAPRPool& parent = *static_cast<LLAPRPool*>(NULL));
|
||||
|
||||
//! Destroy the (sub)pool, if any.
|
||||
void destroy(void);
|
||||
|
||||
// Use some safebool idiom (http://www.artima.com/cppsource/safebool.html) rather than operator bool.
|
||||
typedef LLAPRPool* const LLAPRPool::* const bool_type;
|
||||
/// Return true if the pool is initialized.
|
||||
operator bool_type() const { return mPool ? &LLAPRPool::mParent : 0; }
|
||||
|
||||
// Painful, but we have to either provide access to this, or wrap
|
||||
// every APR function call that needs a apr_pool_t* to be passed.
|
||||
// NEVER destroy a pool that is returned by this function!
|
||||
apr_pool_t* operator()(void) const
|
||||
{
|
||||
llassert(mPool);
|
||||
llassert(apr_os_thread_equal(mOwner, apr_os_thread_current()));
|
||||
return mPool;
|
||||
}
|
||||
|
||||
// Free all memory without destructing the pool.
|
||||
void clear(void)
|
||||
{
|
||||
llassert(mPool);
|
||||
llassert(apr_os_thread_equal(mOwner, apr_os_thread_current()));
|
||||
apr_pool_clear(mPool);
|
||||
}
|
||||
|
||||
// These methods would make this class 'complete' (as wrapper around the libapr
|
||||
// pool functions), but we don't use memory pools in the viewer (only when
|
||||
// we are forced to pass one to a libapr call), so don't define them in order
|
||||
// not to encourage people to use them.
|
||||
#if 0
|
||||
void* palloc(size_t size)
|
||||
{
|
||||
llassert(mPool);
|
||||
llassert(apr_os_thread_equal(mOwner, apr_os_thread_current()));
|
||||
return apr_palloc(mPool, size);
|
||||
}
|
||||
void* pcalloc(size_t size)
|
||||
{
|
||||
llassert(mPool);
|
||||
llassert(apr_os_thread_equal(mOwner, apr_os_thread_current()));
|
||||
return apr_pcalloc(mPool, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
bool parent_is_being_destructed(void);
|
||||
static apr_status_t s_plain_cleanup(void* userdata) { return static_cast<LLAPRPool*>(userdata)->plain_cleanup(); }
|
||||
|
||||
apr_status_t plain_cleanup(void)
|
||||
{
|
||||
if (mPool && // We are not being destructed,
|
||||
parent_is_being_destructed()) // but our parent is.
|
||||
// This means the pool is being destructed recursively by libapr
|
||||
// because one of it's parents is being destructed.
|
||||
{
|
||||
mPool = NULL; // Stop destroy() from destructing the pool again.
|
||||
}
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
||||
class LLAPRInitialization
|
||||
{
|
||||
public:
|
||||
LLAPRInitialization(void);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Root memory pool (allocates memory from the operating system).
|
||||
*
|
||||
* This class should only be used by LLThreadLocalData and AIThreadSafeSimpleDCRootPool_pbase
|
||||
* (and LLMutexRootPool when APR_HAS_THREADS isn't defined).
|
||||
*/
|
||||
class LL_COMMON_API LLAPRRootPool : public LLAPRInitialization, public LLAPRPool
|
||||
{
|
||||
private:
|
||||
friend class LLThreadLocalData;
|
||||
friend class AIThreadSafeSimpleDCRootPool_pbase;
|
||||
#if !APR_HAS_THREADS
|
||||
friend class LLMutexRootPool;
|
||||
#endif
|
||||
//! Construct a root memory pool.
|
||||
// Should only be used by LLThreadLocalData and AIThreadSafeSimpleDCRootPool_pbase.
|
||||
LLAPRRootPool(void);
|
||||
~LLAPRRootPool();
|
||||
|
||||
private:
|
||||
// Keep track of how many root pools exist and when the last one is destructed.
|
||||
static bool sCountInitialized;
|
||||
static apr_uint32_t volatile sCount;
|
||||
|
||||
public:
|
||||
// Return a global root pool that is independent of LLThreadLocalData.
|
||||
// Normally you should not use this. Only use for early initialization
|
||||
// (before main) and deinitialization (after main).
|
||||
static LLAPRRootPool& get(void);
|
||||
|
||||
#if APR_POOL_DEBUG
|
||||
void grab_ownership(void)
|
||||
{
|
||||
// You need a patched libapr to use this.
|
||||
// See http://web.archiveorange.com/archive/v/5XO9y2zoxUOMt6Gmi1OI
|
||||
apr_pool_owner_set(mPool);
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Used for constructing the Special Global Root Pool (returned by LLAPRRootPool::get).
|
||||
// It is the same as the default constructor but omits to increment sCount. As a result,
|
||||
// we must be sure that at least one other LLAPRRootPool is created before termination
|
||||
// of the application (which is the case: we create one LLAPRRootPool per thread).
|
||||
LLAPRRootPool(int) : LLAPRInitialization(), LLAPRPool(0) { }
|
||||
};
|
||||
|
||||
//! Volatile memory pool
|
||||
//
|
||||
// 'Volatile' APR memory pool which normally only clears memory,
|
||||
// and does not destroy the pool (the same pool is reused) for
|
||||
// greater efficiency. However, as a safe guard the apr pool
|
||||
// is destructed every FULL_VOLATILE_APR_POOL uses to allow
|
||||
// the system memory to be allocated more efficiently and not
|
||||
// get scattered through RAM.
|
||||
//
|
||||
class LL_COMMON_API LLVolatileAPRPool : protected LLAPRPool
|
||||
{
|
||||
public:
|
||||
LLVolatileAPRPool(void) : mNumActiveRef(0), mNumTotalRef(0) { }
|
||||
|
||||
void clearVolatileAPRPool(void);
|
||||
|
||||
bool isOld(void) const { return mNumTotalRef > FULL_VOLATILE_APR_POOL; }
|
||||
bool isUnused() const { return mNumActiveRef == 0; }
|
||||
|
||||
private:
|
||||
friend class LLScopedVolatileAPRPool;
|
||||
friend class LLAPRFile;
|
||||
apr_pool_t* getVolatileAPRPool(void) // The use of apr_pool_t is OK here.
|
||||
{
|
||||
if (!mPool) create();
|
||||
++mNumActiveRef;
|
||||
++mNumTotalRef;
|
||||
return LLAPRPool::operator()();
|
||||
}
|
||||
|
||||
private:
|
||||
S32 mNumActiveRef; // Number of active uses of the pool.
|
||||
S32 mNumTotalRef; // Number of total uses of the pool since last creation.
|
||||
|
||||
// Maximum number of references to LLVolatileAPRPool until the pool is recreated.
|
||||
static S32 const FULL_VOLATILE_APR_POOL = 1024;
|
||||
};
|
||||
|
||||
#endif // LLAPRPool_H
|
||||
@@ -33,207 +33,117 @@
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llassettype.h"
|
||||
#include "lldictionary.h"
|
||||
#include "llmemory.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
#include "llstring.h"
|
||||
#include "lltimer.h"
|
||||
|
||||
// I added lookups for exact text of asset type enums in addition to the ones below, so shoot me. -Steve
|
||||
|
||||
struct asset_info_t
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLAssetType
|
||||
///----------------------------------------------------------------------------
|
||||
struct AssetEntry : public LLDictionaryEntry
|
||||
{
|
||||
LLAssetType::EType type;
|
||||
const char* desc;
|
||||
AssetEntry(const char *desc_name,
|
||||
const char *type_name, // 8 character limit!
|
||||
const char *human_name, // for decoding to human readable form; put any and as many printable characters you want in each one
|
||||
bool can_link, // can you create a link to this type?
|
||||
bool can_fetch, // can you fetch this asset by ID?
|
||||
bool can_know) // can you see this asset's ID?
|
||||
:
|
||||
LLDictionaryEntry(desc_name),
|
||||
mTypeName(type_name),
|
||||
mHumanName(human_name),
|
||||
mCanLink(can_link),
|
||||
mCanFetch(can_fetch),
|
||||
mCanKnow(can_know)
|
||||
{
|
||||
llassert(strlen(mTypeName) <= 8);
|
||||
}
|
||||
|
||||
const char *mTypeName;
|
||||
const char *mHumanName;
|
||||
bool mCanLink;
|
||||
bool mCanFetch;
|
||||
bool mCanKnow;
|
||||
};
|
||||
|
||||
asset_info_t asset_types[] =
|
||||
class LLAssetDictionary : public LLSingleton<LLAssetDictionary>,
|
||||
public LLDictionary<LLAssetType::EType, AssetEntry>
|
||||
{
|
||||
{ LLAssetType::AT_TEXTURE, "TEXTURE" },
|
||||
{ LLAssetType::AT_SOUND, "SOUND" },
|
||||
{ LLAssetType::AT_CALLINGCARD, "CALLINGCARD" },
|
||||
{ LLAssetType::AT_LANDMARK, "LANDMARK" },
|
||||
{ LLAssetType::AT_SCRIPT, "SCRIPT" },
|
||||
{ LLAssetType::AT_CLOTHING, "CLOTHING" },
|
||||
{ LLAssetType::AT_OBJECT, "OBJECT" },
|
||||
{ LLAssetType::AT_NOTECARD, "NOTECARD" },
|
||||
{ LLAssetType::AT_CATEGORY, "CATEGORY" },
|
||||
{ LLAssetType::AT_ROOT_CATEGORY, "ROOT_CATEGORY" },
|
||||
{ LLAssetType::AT_LSL_TEXT, "LSL_TEXT" },
|
||||
{ LLAssetType::AT_LSL_BYTECODE, "LSL_BYTECODE" },
|
||||
{ LLAssetType::AT_TEXTURE_TGA, "TEXTURE_TGA" },
|
||||
{ LLAssetType::AT_BODYPART, "BODYPART" },
|
||||
{ LLAssetType::AT_TRASH, "TRASH" },
|
||||
{ LLAssetType::AT_SNAPSHOT_CATEGORY, "SNAPSHOT_CATEGORY" },
|
||||
{ LLAssetType::AT_LOST_AND_FOUND, "LOST_AND_FOUND" },
|
||||
{ LLAssetType::AT_SOUND_WAV, "SOUND_WAV" },
|
||||
{ LLAssetType::AT_IMAGE_TGA, "IMAGE_TGA" },
|
||||
{ LLAssetType::AT_IMAGE_JPEG, "IMAGE_JPEG" },
|
||||
{ LLAssetType::AT_ANIMATION, "ANIMATION" },
|
||||
{ LLAssetType::AT_GESTURE, "GESTURE" },
|
||||
{ LLAssetType::AT_SIMSTATE, "SIMSTATE" },
|
||||
{ LLAssetType::AT_FAVORITE, "FAVORITE" },
|
||||
{ LLAssetType::AT_LINK, "LINK" },
|
||||
{ LLAssetType::AT_LINK_FOLDER, "CURRENT" },
|
||||
{ LLAssetType::AT_CURRENT_OUTFIT, "FOLDER_LINK" },
|
||||
{ LLAssetType::AT_OUTFIT, "OUTFIT" },
|
||||
{ LLAssetType::AT_MY_OUTFITS, "MY_OUTFITS" },
|
||||
{ LLAssetType::AT_NONE, "NONE" }
|
||||
public:
|
||||
LLAssetDictionary();
|
||||
};
|
||||
|
||||
LLAssetType::EType LLAssetType::getType(const std::string& sin)
|
||||
LLAssetDictionary::LLAssetDictionary()
|
||||
{
|
||||
std::string s = sin;
|
||||
// DESCRIPTION TYPE NAME HUMAN NAME CAN LINK? CAN FETCH? CAN KNOW?
|
||||
// |--------------------|-----------|-------------------|-----------|-----------|---------|
|
||||
addEntry(LLAssetType::AT_TEXTURE, new AssetEntry("TEXTURE", "texture", "texture", true, false, true));
|
||||
addEntry(LLAssetType::AT_SOUND, new AssetEntry("SOUND", "sound", "sound", true, true, true));
|
||||
addEntry(LLAssetType::AT_CALLINGCARD, new AssetEntry("CALLINGCARD", "callcard", "calling card", true, false, false));
|
||||
addEntry(LLAssetType::AT_LANDMARK, new AssetEntry("LANDMARK", "landmark", "landmark", true, true, true));
|
||||
addEntry(LLAssetType::AT_SCRIPT, new AssetEntry("SCRIPT", "script", "legacy script", true, false, false));
|
||||
addEntry(LLAssetType::AT_CLOTHING, new AssetEntry("CLOTHING", "clothing", "clothing", true, true, true));
|
||||
addEntry(LLAssetType::AT_OBJECT, new AssetEntry("OBJECT", "object", "object", true, false, false));
|
||||
addEntry(LLAssetType::AT_NOTECARD, new AssetEntry("NOTECARD", "notecard", "note card", true, false, true));
|
||||
addEntry(LLAssetType::AT_CATEGORY, new AssetEntry("CATEGORY", "category", "folder", true, false, false));
|
||||
//addEntry(LLAssetType::AT_ROOT_CATEGORY, new AssetEntry("ROOT_CATEGORY", "root", "root", false, false, false));
|
||||
addEntry(LLAssetType::AT_LSL_TEXT, new AssetEntry("LSL_TEXT", "lsltext", "lsl2 script", true, false, false));
|
||||
addEntry(LLAssetType::AT_LSL_BYTECODE, new AssetEntry("LSL_BYTECODE", "lslbyte", "lsl bytecode", true, false, false));
|
||||
addEntry(LLAssetType::AT_TEXTURE_TGA, new AssetEntry("TEXTURE_TGA", "txtr_tga", "tga texture", true, false, false));
|
||||
addEntry(LLAssetType::AT_BODYPART, new AssetEntry("BODYPART", "bodypart", "body part", true, true, true));
|
||||
//addEntry(LLAssetType::AT_TRASH, new AssetEntry("TRASH", "trash", "trash", false, false, false));
|
||||
//addEntry(LLAssetType::AT_SNAPSHOT_CATEGORY, new AssetEntry("SNAPSHOT_CATEGORY", "snapshot", "snapshot", false, false, false));
|
||||
//addEntry(LLAssetType::AT_LOST_AND_FOUND, new AssetEntry("LOST_AND_FOUND", "lstndfnd", "lost and found", false, false, false));
|
||||
addEntry(LLAssetType::AT_SOUND_WAV, new AssetEntry("SOUND_WAV", "snd_wav", "sound", true, false, false));
|
||||
addEntry(LLAssetType::AT_IMAGE_TGA, new AssetEntry("IMAGE_TGA", "img_tga", "targa image", true, false, false));
|
||||
addEntry(LLAssetType::AT_IMAGE_JPEG, new AssetEntry("IMAGE_JPEG", "jpeg", "jpeg image", true, false, false));
|
||||
addEntry(LLAssetType::AT_ANIMATION, new AssetEntry("ANIMATION", "animatn", "animation", true, true, true));
|
||||
addEntry(LLAssetType::AT_GESTURE, new AssetEntry("GESTURE", "gesture", "gesture", true, true, true));
|
||||
addEntry(LLAssetType::AT_SIMSTATE, new AssetEntry("SIMSTATE", "simstate", "simstate", false, false, false));
|
||||
//addEntry(LLAssetType::AT_FAVORITE, new AssetEntry("FAVORITE", "favorite", "", false, false, false));
|
||||
addEntry(LLAssetType::AT_LINK, new AssetEntry("LINK", "link", "sym link", false, false, true));
|
||||
addEntry(LLAssetType::AT_LINK_FOLDER, new AssetEntry("FOLDER_LINK", "link_f", "sym folder link", false, false, true));
|
||||
addEntry(LLAssetType::AT_CURRENT_OUTFIT, new AssetEntry("FOLDER_LINK", "current", "current outfit", false, false, false));
|
||||
addEntry(LLAssetType::AT_OUTFIT, new AssetEntry("OUTFIT", "outfit", "outfit", false, false, false));
|
||||
addEntry(LLAssetType::AT_MY_OUTFITS, new AssetEntry("MY_OUTFITS", "my_otfts", "my outfits", false, false, false));
|
||||
addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, true, true));
|
||||
addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, false, false, false));
|
||||
};
|
||||
|
||||
// static
|
||||
LLAssetType::EType LLAssetType::getType(const std::string& desc_name)
|
||||
{
|
||||
std::string s = desc_name;
|
||||
LLStringUtil::toUpper(s);
|
||||
for (S32 idx = 0; ;idx++)
|
||||
{
|
||||
asset_info_t* info = asset_types + idx;
|
||||
if (info->type == LLAssetType::AT_NONE)
|
||||
break;
|
||||
if (s == info->desc)
|
||||
return info->type;
|
||||
}
|
||||
return LLAssetType::AT_NONE;
|
||||
return LLAssetDictionary::getInstance()->lookup(s);
|
||||
}
|
||||
|
||||
std::string LLAssetType::getDesc(LLAssetType::EType type)
|
||||
{
|
||||
for (S32 idx = 0; ;idx++)
|
||||
{
|
||||
asset_info_t* info = asset_types + idx;
|
||||
if (type == info->type)
|
||||
return info->desc;
|
||||
if (info->type == LLAssetType::AT_NONE)
|
||||
break;
|
||||
}
|
||||
return "BAD TYPE";
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
// The asset type names are limited to 8 characters.
|
||||
// static
|
||||
const char* LLAssetType::mAssetTypeNames[LLAssetType::AT_COUNT] =
|
||||
{
|
||||
"texture",
|
||||
"sound",
|
||||
"callcard",
|
||||
"landmark",
|
||||
"script",
|
||||
"clothing",
|
||||
"object",
|
||||
"notecard",
|
||||
"category",
|
||||
"root",
|
||||
"lsltext",
|
||||
"lslbyte",
|
||||
"txtr_tga",// Intentionally spelled this way. Limited to eight characters.
|
||||
"bodypart",
|
||||
"trash",
|
||||
"snapshot",
|
||||
"lstndfnd",
|
||||
"snd_wav",
|
||||
"img_tga",
|
||||
"jpeg",
|
||||
"animatn",
|
||||
"gesture",
|
||||
"simstate",
|
||||
"favorite",
|
||||
"link",
|
||||
"link_f",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"current",
|
||||
"outfit",
|
||||
"my_otfts"
|
||||
};
|
||||
|
||||
// This table is meant for decoding to human readable form. Put any
|
||||
// and as many printable characters you want in each one.
|
||||
// See also llinventory.cpp INVENTORY_TYPE_HUMAN_NAMES
|
||||
const char* LLAssetType::mAssetTypeHumanNames[LLAssetType::AT_COUNT] =
|
||||
{
|
||||
"texture",
|
||||
"sound",
|
||||
"calling card",
|
||||
"landmark",
|
||||
"legacy script",
|
||||
"clothing",
|
||||
"object",
|
||||
"note card",
|
||||
"folder",
|
||||
"root",
|
||||
"lsl2 script",
|
||||
"lsl bytecode",
|
||||
"tga texture",
|
||||
"body part",
|
||||
"trash",
|
||||
"snapshot",
|
||||
"lost and found",
|
||||
"sound",
|
||||
"targa image",
|
||||
"jpeg image",
|
||||
"animation",
|
||||
"gesture",
|
||||
"simstate",
|
||||
"",
|
||||
"symbolic link",
|
||||
"symbolic folder link"
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"current outfit",
|
||||
"outfit",
|
||||
"my outfits"
|
||||
};
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// class LLAssetType
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// static
|
||||
const char* LLAssetType::lookup( LLAssetType::EType type )
|
||||
const std::string &LLAssetType::getDesc(LLAssetType::EType asset_type)
|
||||
{
|
||||
if( (type >= 0) && (type < AT_COUNT ))
|
||||
const AssetEntry *entry = LLAssetDictionary::getInstance()->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
return mAssetTypeNames[ S32( type ) ];
|
||||
return entry->mName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "-1";
|
||||
return badLookup();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
const char *LLAssetType::lookup(LLAssetType::EType asset_type)
|
||||
{
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
const AssetEntry *entry = dict->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
return entry->mTypeName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return badLookup().c_str();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,29 +153,35 @@ LLAssetType::EType LLAssetType::lookup( const char* name )
|
||||
return lookup(ll_safe_string(name));
|
||||
}
|
||||
|
||||
LLAssetType::EType LLAssetType::lookup( const std::string& name )
|
||||
// static
|
||||
LLAssetType::EType LLAssetType::lookup(const std::string& type_name)
|
||||
{
|
||||
for( S32 i = 0; i < AT_COUNT; i++ )
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
for (LLAssetDictionary::const_iterator iter = dict->begin();
|
||||
iter != dict->end();
|
||||
iter++)
|
||||
{
|
||||
if( name == mAssetTypeNames[i] )
|
||||
const AssetEntry *entry = iter->second;
|
||||
if (type_name == entry->mTypeName)
|
||||
{
|
||||
// match
|
||||
return (EType)i;
|
||||
return iter->first;
|
||||
}
|
||||
}
|
||||
return AT_NONE;
|
||||
}
|
||||
|
||||
// static
|
||||
const char* LLAssetType::lookupHumanReadable(LLAssetType::EType type)
|
||||
const char *LLAssetType::lookupHumanReadable(LLAssetType::EType asset_type)
|
||||
{
|
||||
if( (type >= 0) && (type < AT_COUNT ))
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
const AssetEntry *entry = dict->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
return mAssetTypeHumanNames[S32(type)];
|
||||
return entry->mHumanName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
return badLookup().c_str();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,64 +191,38 @@ LLAssetType::EType LLAssetType::lookupHumanReadable( const char* name )
|
||||
return lookupHumanReadable(ll_safe_string(name));
|
||||
}
|
||||
|
||||
LLAssetType::EType LLAssetType::lookupHumanReadable( const std::string& name )
|
||||
// static
|
||||
LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string& readable_name)
|
||||
{
|
||||
for( S32 i = 0; i < AT_COUNT; i++ )
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
for (LLAssetDictionary::const_iterator iter = dict->begin();
|
||||
iter != dict->end();
|
||||
iter++)
|
||||
{
|
||||
if( name == mAssetTypeHumanNames[i] )
|
||||
const AssetEntry *entry = iter->second;
|
||||
if (entry->mHumanName && (readable_name == entry->mHumanName))
|
||||
{
|
||||
// match
|
||||
return (EType)i;
|
||||
return iter->first;
|
||||
}
|
||||
}
|
||||
return AT_NONE;
|
||||
}
|
||||
|
||||
EDragAndDropType LLAssetType::lookupDragAndDropType( EType asset )
|
||||
{
|
||||
switch( asset )
|
||||
{
|
||||
case AT_TEXTURE: return DAD_TEXTURE;
|
||||
case AT_SOUND: return DAD_SOUND;
|
||||
case AT_CALLINGCARD: return DAD_CALLINGCARD;
|
||||
case AT_LANDMARK: return DAD_LANDMARK;
|
||||
case AT_SCRIPT: return DAD_NONE;
|
||||
case AT_CLOTHING: return DAD_CLOTHING;
|
||||
case AT_OBJECT: return DAD_OBJECT;
|
||||
case AT_NOTECARD: return DAD_NOTECARD;
|
||||
case AT_CATEGORY: return DAD_CATEGORY;
|
||||
case AT_ROOT_CATEGORY: return DAD_ROOT_CATEGORY;
|
||||
case AT_LSL_TEXT: return DAD_SCRIPT;
|
||||
case AT_BODYPART: return DAD_BODYPART;
|
||||
case AT_ANIMATION: return DAD_ANIMATION;
|
||||
case AT_GESTURE: return DAD_GESTURE;
|
||||
case AT_FAVORITE: return DAD_CATEGORY;
|
||||
case AT_LINK: return DAD_LINK;
|
||||
case AT_LINK_FOLDER: return DAD_LINK;
|
||||
case AT_CURRENT_OUTFIT: return DAD_LINK;
|
||||
case AT_OUTFIT: return DAD_LINK;
|
||||
case AT_MY_OUTFITS: return DAD_CATEGORY;
|
||||
default: return DAD_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
// static. Generate a good default description
|
||||
void LLAssetType::generateDescriptionFor(LLAssetType::EType type,
|
||||
std::string& desc)
|
||||
{
|
||||
const S32 BUF_SIZE = 30;
|
||||
char time_str[BUF_SIZE]; /* Flawfinder: ignore */
|
||||
time_t now;
|
||||
time(&now);
|
||||
memset(time_str, '\0', BUF_SIZE);
|
||||
strftime(time_str, BUF_SIZE - 1, "%Y-%m-%d %H:%M:%S ", localtime(&now));
|
||||
desc.assign(time_str);
|
||||
desc.append(LLAssetType::lookupHumanReadable(type));
|
||||
}
|
||||
//NOTE: LLAssetType::lookupDragAndDropType & LLAssetType::generateDescriptionFor moved to newview/llviewerassettype.h
|
||||
|
||||
// static
|
||||
bool LLAssetType::lookupCanLink(EType asset_type)
|
||||
{
|
||||
//Check that enabling all these other types as linkable doesn't break things.
|
||||
/*const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
const AssetEntry *entry = dict->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
return entry->mCanLink;
|
||||
}
|
||||
return false;
|
||||
*/
|
||||
|
||||
return (asset_type == AT_CLOTHING || asset_type == AT_OBJECT || asset_type == AT_CATEGORY ||
|
||||
asset_type == AT_BODYPART || asset_type == AT_GESTURE);
|
||||
}
|
||||
@@ -341,45 +231,42 @@ bool LLAssetType::lookupCanLink(EType asset_type)
|
||||
// Not adding this to dictionary since we probably will only have these two types
|
||||
bool LLAssetType::lookupIsLinkType(EType asset_type)
|
||||
{
|
||||
return (asset_type == AT_LINK || asset_type == AT_LINK_FOLDER);
|
||||
if (asset_type == AT_LINK || asset_type == AT_LINK_FOLDER)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
const std::string &LLAssetType::badLookup()
|
||||
{
|
||||
static const std::string sBadLookup = "llassettype_bad_lookup";
|
||||
return sBadLookup;
|
||||
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAssetType::lookupIsAssetFetchByIDAllowed(EType asset_type)
|
||||
{
|
||||
// *FIX: Make this list smaller.
|
||||
switch(asset_type)
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
const AssetEntry *entry = dict->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
case LLAssetType::AT_SOUND:
|
||||
case LLAssetType::AT_LANDMARK:
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
case LLAssetType::AT_BODYPART:
|
||||
case LLAssetType::AT_ANIMATION:
|
||||
case LLAssetType::AT_GESTURE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
return entry->mCanFetch;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLAssetType::lookupIsAssetIDKnowable(EType asset_type)
|
||||
{
|
||||
switch(asset_type)
|
||||
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
|
||||
const AssetEntry *entry = dict->lookup(asset_type);
|
||||
if (entry)
|
||||
{
|
||||
case LLAssetType::AT_TEXTURE:
|
||||
case LLAssetType::AT_SOUND:
|
||||
case LLAssetType::AT_LANDMARK:
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
case LLAssetType::AT_NOTECARD:
|
||||
case LLAssetType::AT_BODYPART:
|
||||
case LLAssetType::AT_ANIMATION:
|
||||
case LLAssetType::AT_GESTURE:
|
||||
case LLAssetType::AT_LINK:
|
||||
case LLAssetType::AT_LINK_FOLDER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
return entry->mCanKnow;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
// A root category is a user's root inventory category. We
|
||||
// decided to expose it visually, so it seems logical to fold
|
||||
// it into the asset types.
|
||||
AT_ROOT_CATEGORY = 9,
|
||||
//AT_ROOT_CATEGORY = 9,
|
||||
|
||||
// The LSL is the brand spanking new scripting language. We've
|
||||
// split it into a text and bytecode representation.
|
||||
@@ -101,15 +101,15 @@ public:
|
||||
// This asset type is meant to only be used as a marker for a
|
||||
// category preferred type. Using this, we can throw things in
|
||||
// the trash before completely deleting.
|
||||
AT_TRASH = 14,
|
||||
//AT_TRASH = 14,
|
||||
|
||||
// This is a marker for a folder meant for snapshots. No
|
||||
// actual assets will be snapshots, though if there were, you
|
||||
// could interpret them as textures.
|
||||
AT_SNAPSHOT_CATEGORY = 15,
|
||||
//AT_SNAPSHOT_CATEGORY = 15,
|
||||
|
||||
// This is used to stuff lost&found items into
|
||||
AT_LOST_AND_FOUND = 16,
|
||||
//AT_LOST_AND_FOUND = 16,
|
||||
|
||||
// uncompressed sound
|
||||
AT_SOUND_WAV = 17,
|
||||
@@ -131,20 +131,24 @@ public:
|
||||
// simstate file
|
||||
AT_SIMSTATE = 22,
|
||||
|
||||
AT_FAVORITE = 23,
|
||||
//AT_FAVORITE = 23,
|
||||
|
||||
// Inventory symbolic link
|
||||
AT_LINK = 24,
|
||||
|
||||
// Inventory folder link
|
||||
AT_LINK_FOLDER = 25,
|
||||
|
||||
|
||||
AT_CURRENT_OUTFIT = 46,
|
||||
|
||||
AT_OUTFIT = 47,
|
||||
|
||||
AT_MY_OUTFITS = 48,
|
||||
|
||||
AT_MESH = 49,
|
||||
// Mesh data in our proprietary SLM format
|
||||
|
||||
AT_COUNT = 50,
|
||||
// +*********************************************+
|
||||
// | TO ADD AN ELEMENT TO THIS ENUM: |
|
||||
// +*********************************************+
|
||||
@@ -154,45 +158,40 @@ public:
|
||||
// | 4. ADD TO LLAssetType::mAssetTypeHumanNames |
|
||||
// +*********************************************+
|
||||
|
||||
AT_COUNT = 49,
|
||||
|
||||
AT_NONE = -1
|
||||
};
|
||||
|
||||
// machine transation between type and strings
|
||||
static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
|
||||
static EType lookup(const std::string& name);
|
||||
static const char* lookup(EType type);
|
||||
static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
|
||||
static EType lookup(const std::string& type_name);
|
||||
static const char* lookup(EType asset_type);
|
||||
|
||||
// translation from a type to a human readable form.
|
||||
static EType lookupHumanReadable( const char* name ); // safe conversion to std::string, *TODO: deprecate
|
||||
static EType lookupHumanReadable( const std::string& name );
|
||||
static const char* lookupHumanReadable(EType type);
|
||||
static EType lookupHumanReadable(const char* desc_name); // safe conversion to std::string, *TODO: deprecate
|
||||
static EType lookupHumanReadable(const std::string& readable_name);
|
||||
static const char* lookupHumanReadable(EType asset_type);
|
||||
|
||||
static EDragAndDropType lookupDragAndDropType( EType );
|
||||
//NOTE: LLAssetType::lookupDragAndDropType & LLAssetType::generateDescriptionFor moved to newview/llviewerassettype.h
|
||||
|
||||
// Generate a good default description. You may want to add a verb
|
||||
// or agent name after this depending on your application.
|
||||
static void generateDescriptionFor(LLAssetType::EType type,
|
||||
std::string& desc);
|
||||
static EType getType(const std::string& desc_name);
|
||||
static const std::string& getDesc(EType asset_type);
|
||||
|
||||
static EType getType(const std::string& sin);
|
||||
static std::string getDesc(EType type);
|
||||
|
||||
static bool lookupCanLink(EType asset_type);
|
||||
static bool lookupIsLinkType(EType asset_type);
|
||||
|
||||
static bool lookupIsAssetFetchByIDAllowed(EType asset_type); // the asset allows direct download
|
||||
static bool lookupIsAssetIDKnowable(EType asset_type); // asset data can be known by the viewer
|
||||
|
||||
private:
|
||||
// don't instantiate or derive one of these objects
|
||||
LLAssetType( void ) {}
|
||||
~LLAssetType( void ) {}
|
||||
static const std::string& badLookup(); // error string when a lookup fails
|
||||
|
||||
private:
|
||||
static const char* mAssetTypeNames[];
|
||||
static const char* mAssetTypeHumanNames[];
|
||||
protected:
|
||||
LLAssetType() {}
|
||||
~LLAssetType() {}
|
||||
};
|
||||
|
||||
#ifdef CWDEBUG
|
||||
#include <iosfwd>
|
||||
inline std::ostream& operator<<(std::ostream& os, LLAssetType::EType type) { return os << LLAssetType::getDesc(type); }
|
||||
#endif
|
||||
|
||||
#endif // LL_LLASSETTYPE
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
/*
|
||||
Ported to Phoenix by Wolfspirit Magic.
|
||||
*/
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llavatarname.h"
|
||||
@@ -52,7 +48,7 @@ LLAvatarName::LLAvatarName()
|
||||
mLegacyFirstName(),
|
||||
mLegacyLastName(),
|
||||
mIsDisplayNameDefault(false),
|
||||
mIsDummy(false),
|
||||
mIsTemporaryName(false),
|
||||
mExpires(F64_MAX),
|
||||
mNextUpdate(0.0)
|
||||
{ }
|
||||
@@ -94,21 +90,16 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
|
||||
std::string LLAvatarName::getCompleteName(bool linefeed) const
|
||||
{
|
||||
std::string name;
|
||||
if (!mUsername.empty())
|
||||
if (mUsername.empty() || mIsDisplayNameDefault)
|
||||
// If the display name feature is off
|
||||
// OR this particular display name is defaulted (i.e. based on user name),
|
||||
// then display only the easier to read instance of the person's name.
|
||||
{
|
||||
if (linefeed)
|
||||
{
|
||||
name = mDisplayName + "\n(" + mUsername + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
name = mDisplayName + " (" + mUsername + ")";
|
||||
}
|
||||
name = mDisplayName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...display names are off, legacy name is in mDisplayName
|
||||
name = mDisplayName;
|
||||
name = mDisplayName + (linefeed ? "\n(" : "(") + mUsername + ")";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
// Under error conditions, we may insert "dummy" records with
|
||||
// names like "???" into caches as placeholders. These can be
|
||||
// shown in UI, but are not serialized.
|
||||
bool mIsDummy;
|
||||
bool mIsTemporaryName;
|
||||
|
||||
// Names can change, so need to keep track of when name was
|
||||
// last checked.
|
||||
|
||||
@@ -46,4 +46,18 @@
|
||||
*/
|
||||
typedef boost::tokenizer<boost::char_separator<char> > boost_tokenizer;
|
||||
|
||||
// Useful combiner for boost signals that return a bool (e.g. validation)
|
||||
// returns false if any of the callbacks return false
|
||||
struct boost_boolean_combiner
|
||||
{
|
||||
typedef bool result_type;
|
||||
template<typename InputIterator>
|
||||
bool operator()(InputIterator first, InputIterator last) const
|
||||
{
|
||||
bool res = true;
|
||||
while (first != last)
|
||||
res &= *first++;
|
||||
return res;
|
||||
}
|
||||
};
|
||||
#endif // LL_LLBOOST_H
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#ifndef LL_LLCHAT_H
|
||||
#define LL_LLCHAT_H
|
||||
|
||||
#include "llstring.h"
|
||||
#include "lluuid.h"
|
||||
#include "v3math.h"
|
||||
|
||||
@@ -57,7 +56,8 @@ typedef enum e_chat_type
|
||||
CHAT_TYPE_STOP = 5,
|
||||
CHAT_TYPE_DEBUG_MSG = 6,
|
||||
CHAT_TYPE_REGION = 7,
|
||||
CHAT_TYPE_OWNER = 8
|
||||
CHAT_TYPE_OWNER = 8,
|
||||
CHAT_TYPE_DIRECT = 9 // From llRegionSayTo()
|
||||
} EChatType;
|
||||
|
||||
typedef enum e_chat_audible_level
|
||||
@@ -71,7 +71,7 @@ typedef enum e_chat_audible_level
|
||||
class LLChat
|
||||
{
|
||||
public:
|
||||
LLChat(const std::string& text = LLStringUtil::null)
|
||||
LLChat(const std::string& text = std::string())
|
||||
: mText(text),
|
||||
mFromName(),
|
||||
mFromID(),
|
||||
|
||||
@@ -42,5 +42,6 @@ const U8 CLICK_ACTION_PAY = 3;
|
||||
const U8 CLICK_ACTION_OPEN = 4;
|
||||
const U8 CLICK_ACTION_PLAY = 5;
|
||||
const U8 CLICK_ACTION_OPEN_MEDIA = 6;
|
||||
|
||||
const U8 CLICK_ACTION_ZOOM = 7;
|
||||
// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
|
||||
#endif
|
||||
|
||||
@@ -34,18 +34,10 @@
|
||||
#include "llcommon.h"
|
||||
#include "llthread.h"
|
||||
|
||||
//static
|
||||
BOOL LLCommon::sAprInitialized = FALSE;
|
||||
|
||||
//static
|
||||
void LLCommon::initClass()
|
||||
{
|
||||
LLMemory::initClass();
|
||||
if (!sAprInitialized)
|
||||
{
|
||||
ll_init_apr();
|
||||
sAprInitialized = TRUE;
|
||||
}
|
||||
LLTimer::initClass();
|
||||
LLThreadSafeRefCount::initThreadSafeRefCount();
|
||||
// LLWorkerThread::initClass();
|
||||
@@ -59,10 +51,5 @@ void LLCommon::cleanupClass()
|
||||
// LLWorkerThread::cleanupClass();
|
||||
LLThreadSafeRefCount::cleanupThreadSafeRefCount();
|
||||
LLTimer::cleanupClass();
|
||||
if (sAprInitialized)
|
||||
{
|
||||
ll_cleanup_apr();
|
||||
sAprInitialized = FALSE;
|
||||
}
|
||||
LLMemory::cleanupClass();
|
||||
}
|
||||
|
||||
@@ -43,8 +43,6 @@ class LL_COMMON_API LLCommon
|
||||
public:
|
||||
static void initClass();
|
||||
static void cleanupClass();
|
||||
private:
|
||||
static BOOL sAprInitialized;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user