mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
Compare commits
802 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3c1036696 | ||
|
|
0d992a1075 | ||
|
|
b05c0b000c | ||
|
|
3c8fedae6d | ||
|
|
5c80600323 | ||
|
|
0cc88c6189 | ||
|
|
f1dddd1402 | ||
|
|
dd1f913a6b | ||
|
|
241c900339 | ||
|
|
542c868809 | ||
|
|
d92cf744c7 | ||
|
|
a64b53548f | ||
|
|
2808c46322 | ||
|
|
78f0c0f12e | ||
|
|
88eb51b2e3 | ||
|
|
ff005b3c82 | ||
|
|
ae1c6e2721 | ||
|
|
3229e3a7c9 | ||
|
|
7a44b5eb6a | ||
|
|
e482723604 | ||
|
|
38711119a3 | ||
|
|
bc08286f7c | ||
|
|
7fbd0b7bbf | ||
|
|
da208cfd3b | ||
|
|
74a565f497 | ||
|
|
141863c6a7 | ||
|
|
f426770547 | ||
|
|
60ed456ff2 | ||
|
|
4d36e8402d | ||
|
|
66c715aff2 | ||
|
|
f9483c9624 | ||
|
|
22ab2ad28c | ||
|
|
bf2765f51f | ||
|
|
63818ace02 | ||
|
|
b403e715fe | ||
|
|
18c4329c5b | ||
|
|
c4c6188d66 | ||
|
|
807e13572d | ||
|
|
dccad6e581 | ||
|
|
765d1a4267 | ||
|
|
4d800adf77 | ||
|
|
fd5b0c16e0 | ||
|
|
133f2ea840 | ||
|
|
bf47a26bd5 | ||
|
|
66d2a2d96b | ||
|
|
9a7ffa4375 | ||
|
|
2ca85d6437 | ||
|
|
5e2e64a5e0 | ||
|
|
a846c3310a | ||
|
|
cfdb4697ee | ||
|
|
dd86f0f78e | ||
|
|
74945485e5 | ||
|
|
402c9b9d26 | ||
|
|
471a2258e3 | ||
|
|
d1080c9fb0 | ||
|
|
09a3535b44 | ||
|
|
9ee4153e1e | ||
|
|
254c24ddbf | ||
|
|
310dc08a14 | ||
|
|
08835173a1 | ||
|
|
2fbfd7c122 | ||
|
|
b7109d6dff | ||
|
|
932518d0bc | ||
|
|
fd0ea75465 | ||
|
|
52d35ff880 | ||
|
|
5777456c33 | ||
|
|
c2f75a9b3a | ||
|
|
d3675e414f | ||
|
|
08234b4ac6 | ||
|
|
7498aed8d3 | ||
|
|
79afdd64be | ||
|
|
4cce38a29c | ||
|
|
79593759a1 | ||
|
|
4a44284191 | ||
|
|
11412dbc70 | ||
|
|
88b6a8e17e | ||
|
|
fca3fbe87a | ||
|
|
ad6a7e9b20 | ||
|
|
506fbcf875 | ||
|
|
1adb036de9 | ||
|
|
870d05baa3 | ||
|
|
a6a96e7019 | ||
|
|
be21ef6b0d | ||
|
|
c41854d67d | ||
|
|
c1fef82400 | ||
|
|
9fe0b53657 | ||
|
|
5b6f4ff3fb | ||
|
|
08d1f10951 | ||
|
|
68a744c9d5 | ||
|
|
78ae98929d | ||
|
|
135c286dd8 | ||
|
|
a3f84a4922 | ||
|
|
fcadc68575 | ||
|
|
78ca759b6d | ||
|
|
0551e1969c | ||
|
|
df45e522bd | ||
|
|
8d8ed97e91 | ||
|
|
03b88d30f5 | ||
|
|
b9b2f22a34 | ||
|
|
d97276a462 | ||
|
|
ad02d532cd | ||
|
|
a1868506e6 | ||
|
|
5a4b47061e | ||
|
|
9451db44ac | ||
|
|
c34784dc93 | ||
|
|
fe6d355fd8 | ||
|
|
601c5e4ca5 | ||
|
|
f8a671912b | ||
|
|
a206e2d7fa | ||
|
|
a3cc396874 | ||
|
|
821ffa5cd8 | ||
|
|
27ff5e3cf4 | ||
|
|
06c3e02e3e | ||
|
|
8b185d7232 | ||
|
|
1cf4e2ca2d | ||
|
|
e99480d17d | ||
|
|
934f308d5b | ||
|
|
27d124d22f | ||
|
|
604a298350 | ||
|
|
32910740fb | ||
|
|
b6585c6f89 | ||
|
|
515d2da7cb | ||
|
|
9aa232b266 | ||
|
|
d5f3419495 | ||
|
|
58ff8ddb5e | ||
|
|
799efec576 | ||
|
|
831b6356ed | ||
|
|
2bb498ebc8 | ||
|
|
ff18dfb03d | ||
|
|
fc9fb83990 | ||
|
|
d5d3db289a | ||
|
|
994dec962b | ||
|
|
7f589fa99f | ||
|
|
01af7005a0 | ||
|
|
90c54a3fc1 | ||
|
|
549a467322 | ||
|
|
e5ceba75d8 | ||
|
|
de0e30386f | ||
|
|
e9d9f15178 | ||
|
|
58e3d90405 | ||
|
|
1a918b28da | ||
|
|
3ab62a3b50 | ||
|
|
4e0544e86e | ||
|
|
774156640c | ||
|
|
4b37a8ba11 | ||
|
|
cd9d7fd6e6 | ||
|
|
6466af1e8d | ||
|
|
7b2e9d0051 | ||
|
|
11aed9096e | ||
|
|
8e4d4cd331 | ||
|
|
524679411d | ||
|
|
2c1fe95d6f | ||
|
|
6d4edf3f04 | ||
|
|
0bb32a4ac5 | ||
|
|
f29f0af163 | ||
|
|
38c1546476 | ||
|
|
aea5bb7c96 | ||
|
|
6c7c661459 | ||
|
|
ee6157f40f | ||
|
|
23663f1d1d | ||
|
|
5f819d17cd | ||
|
|
5438582ff6 | ||
|
|
a963718f67 | ||
|
|
54412d4593 | ||
|
|
d956c9fbfd | ||
|
|
12721c7e83 | ||
|
|
d33a4eb42c | ||
|
|
fd8cc47e53 | ||
|
|
2ff8f319c1 | ||
|
|
1eeb9f7b73 | ||
|
|
bbec84b9c2 | ||
|
|
e00cf6bb79 | ||
|
|
f466a94036 | ||
|
|
157b869b2d | ||
|
|
f4824594fc | ||
|
|
a9fa41d862 | ||
|
|
53ff9e6be3 | ||
|
|
017c51c8cb | ||
|
|
556f0c301b | ||
|
|
6975132042 | ||
|
|
597a911cda | ||
|
|
8135f44823 | ||
|
|
50ee1e7a0a | ||
|
|
9b52164930 | ||
|
|
ab4b770a5f | ||
|
|
42ea7b173f | ||
|
|
7a4c5b8773 | ||
|
|
511de77f0f | ||
|
|
01b33b06f0 | ||
|
|
86b23c6e04 | ||
|
|
a9ae6228f6 | ||
|
|
0825a4fc27 | ||
|
|
747c0010fd | ||
|
|
a6fe2cc0c4 | ||
|
|
1050c04ae7 | ||
|
|
f4c79871fc | ||
|
|
1467e4b435 | ||
|
|
5eb46a99bd | ||
|
|
7a983d897d | ||
|
|
39a2607fe6 | ||
|
|
098add36c1 | ||
|
|
3c2a822eac | ||
|
|
13aefa8a4e | ||
|
|
a7347a95d5 | ||
|
|
8ba61f32ee | ||
|
|
5541725e72 | ||
|
|
4655a237d7 | ||
|
|
157c925030 | ||
|
|
cefb810b73 | ||
|
|
4589dc44db | ||
|
|
72785efcdc | ||
|
|
1d40158c8a | ||
|
|
e858203a4f | ||
|
|
6369f2d7f6 | ||
|
|
0ddff1234a | ||
|
|
8745a4ae2b | ||
|
|
f3fcd807dd | ||
|
|
77d4db6ffc | ||
|
|
c8fa7aa298 | ||
|
|
ca67337212 | ||
|
|
7250987848 | ||
|
|
a51aa0f266 | ||
|
|
2eea7928b2 | ||
|
|
ff867e6e11 | ||
|
|
952dd446d8 | ||
|
|
16d2d264f9 | ||
|
|
9abf4ef397 | ||
|
|
5a4335cb43 | ||
|
|
d076cbf283 | ||
|
|
181812cb85 | ||
|
|
702d8b46d2 | ||
|
|
69c063626f | ||
|
|
8e50000e6e | ||
|
|
d5474f8c6e | ||
|
|
7ce116c659 | ||
|
|
e3734a942d | ||
|
|
9b77e8b599 | ||
|
|
33d3093bf7 | ||
|
|
e478d7d634 | ||
|
|
c3932e5ac0 | ||
|
|
8589deef2c | ||
|
|
9b4323ce50 | ||
|
|
6e70ad4ea5 | ||
|
|
c0f124f2a6 | ||
|
|
abd3c30969 | ||
|
|
92b743749c | ||
|
|
e9d57062eb | ||
|
|
9fce14cd4e | ||
|
|
37770a7d43 | ||
|
|
6c81b19cc9 | ||
|
|
5c3387c78c | ||
|
|
24b43c92d9 | ||
|
|
402f8cae06 | ||
|
|
751b86bf40 | ||
|
|
8cfefb2e56 | ||
|
|
9c5e8f6fa9 | ||
|
|
002a9d2014 | ||
|
|
2cd49e2f27 | ||
|
|
7b35178518 | ||
|
|
55e34222f0 | ||
|
|
3dbdbc9859 | ||
|
|
f19398ccab | ||
|
|
e402d9f5bf | ||
|
|
329c442ed1 | ||
|
|
d803f02162 | ||
|
|
bbd68b2b84 | ||
|
|
cc6c8b595b | ||
|
|
a0dd769d56 | ||
|
|
d1466efbf6 | ||
|
|
7331633884 | ||
|
|
f9d56bdc8c | ||
|
|
7b824ee581 | ||
|
|
382dd4f516 | ||
|
|
255abd12fe | ||
|
|
57d69ce841 | ||
|
|
d365607439 | ||
|
|
7d9e9c7fff | ||
|
|
ac9dfd3e8c | ||
|
|
47202187cb | ||
|
|
f98fdd12ff | ||
|
|
4c130dd06d | ||
|
|
6553ce9056 | ||
|
|
e1c98528f5 | ||
|
|
7fb4631838 | ||
|
|
e3f3d7f2f6 | ||
|
|
8f79fe93b0 | ||
|
|
3d00e1d65a | ||
|
|
1882c46170 | ||
|
|
1fe379232c | ||
|
|
4bf42b9601 | ||
|
|
04bdad2e01 | ||
|
|
2489208171 | ||
|
|
cfe791bef4 | ||
|
|
0c569f6046 | ||
|
|
5f6372b7eb | ||
|
|
587c479b6c | ||
|
|
68e9183424 | ||
|
|
30035ef882 | ||
|
|
bf4141838e | ||
|
|
f52fbd7425 | ||
|
|
61c7792a77 | ||
|
|
59693d9b43 | ||
|
|
28cf1e5ea2 | ||
|
|
51a53b12cd | ||
|
|
a61c0693fa | ||
|
|
012529b681 | ||
|
|
2bd4bbf738 | ||
|
|
40ce2beab2 | ||
|
|
52f56fc14b | ||
|
|
16032b1aa7 | ||
|
|
cf2318c99e | ||
|
|
4ff6434286 | ||
|
|
603509c6c4 | ||
|
|
8696332e6b | ||
|
|
3dab3a5563 | ||
|
|
be0abc9fda | ||
|
|
e7453ea3f8 | ||
|
|
87de8a28db | ||
|
|
2871806442 | ||
|
|
720da6289c | ||
|
|
331fc8f9a8 | ||
|
|
694b80c461 | ||
|
|
2f13716160 | ||
|
|
e3edd61b35 | ||
|
|
f7a30dab87 | ||
|
|
cc5e08665a | ||
|
|
3abbc25d13 | ||
|
|
f210934679 | ||
|
|
af60b8e4ce | ||
|
|
10bffb49fd | ||
|
|
bc957c83b7 | ||
|
|
e8c37b471a | ||
|
|
de4ee8a18e | ||
|
|
715fb037a4 | ||
|
|
0aef341920 | ||
|
|
236ed4d152 | ||
|
|
08d028e079 | ||
|
|
d735a612d3 | ||
|
|
476f331bf5 | ||
|
|
bf33665705 | ||
|
|
6b600464d9 | ||
|
|
3911cc82b8 | ||
|
|
1cd7066c7a | ||
|
|
a8e9ae3001 | ||
|
|
0a2a54e32b | ||
|
|
b65b1f4462 | ||
|
|
ab3898117b | ||
|
|
d1e764b756 | ||
|
|
3b0cfd52bb | ||
|
|
bedb045e65 | ||
|
|
a7e772c642 | ||
|
|
a0761f2b92 | ||
|
|
d7b921fdd7 | ||
|
|
5e65503b43 | ||
|
|
32556baa8c | ||
|
|
ed846227df | ||
|
|
a6680b7afe | ||
|
|
53622442f6 | ||
|
|
cacb09924d | ||
|
|
ee4af7e41d | ||
|
|
bbb01f565f | ||
|
|
dc86126023 | ||
|
|
0d56a31d55 | ||
|
|
17b1e9dfba | ||
|
|
6457a6ca54 | ||
|
|
d99c4c0a15 | ||
|
|
d8a5f092fc | ||
|
|
865495ffa5 | ||
|
|
001a12e6c7 | ||
|
|
8227f6194f | ||
|
|
4a811bd9ff | ||
|
|
703b185681 | ||
|
|
87a34df746 | ||
|
|
e0f596a36c | ||
|
|
df13ca624b | ||
|
|
b6c9867edc | ||
|
|
ad1c20082a | ||
|
|
b5de064943 | ||
|
|
765a7cd8f1 | ||
|
|
75d5344b38 | ||
|
|
87f2941f12 | ||
|
|
89216010e1 | ||
|
|
c0d3c8d46a | ||
|
|
fd8d5079cb | ||
|
|
f6383a5c48 | ||
|
|
4e97077eb8 | ||
|
|
8539451aad | ||
|
|
32c43bcf21 | ||
|
|
b809b3d5c5 | ||
|
|
130f39aaa0 | ||
|
|
374b210d1a | ||
|
|
11c43e3674 | ||
|
|
9058205475 | ||
|
|
87b31821a5 | ||
|
|
1f76ef495f | ||
|
|
4034e228c1 | ||
|
|
6b228393cb | ||
|
|
a5eb47c390 | ||
|
|
ce6f7accb4 | ||
|
|
491c7f41a3 | ||
|
|
2a593a99fc | ||
|
|
9cbd7aebf8 | ||
|
|
d56cc65ac0 | ||
|
|
1ac9815c65 | ||
|
|
ae2d1012c3 | ||
|
|
594a6a7204 | ||
|
|
cf3a318e99 | ||
|
|
f5450688c7 | ||
|
|
63acf11359 | ||
|
|
dda57d70e5 | ||
|
|
96206931a3 | ||
|
|
07b03f9431 | ||
|
|
28fc816b58 | ||
|
|
37d910fe9a | ||
|
|
b05bbfe230 | ||
|
|
7cb87d29b0 | ||
|
|
b0b4175cd3 | ||
|
|
36e4664cfa | ||
|
|
2c8340fdfc | ||
|
|
96dafe4250 | ||
|
|
f0be8de338 | ||
|
|
048a46ae91 | ||
|
|
80a90b8016 | ||
|
|
0a4265ec1e | ||
|
|
efad45bde2 | ||
|
|
669e34115a | ||
|
|
8953af676e | ||
|
|
472665ef54 | ||
|
|
c9570e9f30 | ||
|
|
9e9144074f | ||
|
|
9e2b870bd6 | ||
|
|
9d4064b645 | ||
|
|
61106e286a | ||
|
|
66998e6d04 | ||
|
|
c3bebce2ab | ||
|
|
9e2e17e821 | ||
|
|
3d043f989e | ||
|
|
5c9f4fe999 | ||
|
|
9f9d8aa2be | ||
|
|
abd77ac848 | ||
|
|
68bd6ac6ba | ||
|
|
52b3618c02 | ||
|
|
c317490190 | ||
|
|
49ad251714 | ||
|
|
e4da677ada | ||
|
|
1ee50ffae6 | ||
|
|
70eec4f9d5 | ||
|
|
0c2b49fa77 | ||
|
|
ac21e29b8a | ||
|
|
1a4cbb4d44 | ||
|
|
732409bb1b | ||
|
|
cbec17d154 | ||
|
|
7810b9859f | ||
|
|
8b1831cb9b | ||
|
|
f71f3d9840 | ||
|
|
dcf110d54d | ||
|
|
6d20d5efc5 | ||
|
|
a448ac4631 | ||
|
|
d9e50522b2 | ||
|
|
6e3d96d23e | ||
|
|
0eedccceac | ||
|
|
3fcf126303 | ||
|
|
772013a38b | ||
|
|
c4cd60d944 | ||
|
|
05eec77cd7 | ||
|
|
f5a4db0d8c | ||
|
|
3d766876c4 | ||
|
|
ffbd7cb5cd | ||
|
|
972501a13f | ||
|
|
42ce8cadf7 | ||
|
|
0bb4c72424 | ||
|
|
225eb607c8 | ||
|
|
4d5319c58d | ||
|
|
1b1c1ab692 | ||
|
|
1f95e52874 | ||
|
|
c952d033f3 | ||
|
|
a190f5b5e6 | ||
|
|
4df6f5d567 | ||
|
|
062cd079ad | ||
|
|
ad75d0a9ce | ||
|
|
02c924015b | ||
|
|
4b41b9099c | ||
|
|
05e670d28c | ||
|
|
772b8bf25e | ||
|
|
aa99cd2a6c | ||
|
|
d094217772 | ||
|
|
7a246e95f9 | ||
|
|
3fcd6cb3b2 | ||
|
|
9999770c4c | ||
|
|
53575ed351 | ||
|
|
d0b2572978 | ||
|
|
807af44779 | ||
|
|
881ae4b648 | ||
|
|
c01a8937fa | ||
|
|
a026be18de | ||
|
|
dade5261c7 | ||
|
|
daf38924c5 | ||
|
|
e6288c811d | ||
|
|
ef849caf6d | ||
|
|
141296216f | ||
|
|
e5167bc82b | ||
|
|
9763d62fef | ||
|
|
37077d6783 | ||
|
|
32267e2419 | ||
|
|
7d599d93db | ||
|
|
e460ca2aa7 | ||
|
|
7e9cb225c7 | ||
|
|
232837f0d0 | ||
|
|
ff6edaeefc | ||
|
|
60ce309d42 | ||
|
|
2fb2f865e5 | ||
|
|
e81147479f | ||
|
|
0c1d812b13 | ||
|
|
d95bc41b1d | ||
|
|
4893dcf453 | ||
|
|
edf2b5bec0 | ||
|
|
026eb10a70 | ||
|
|
d8740a8db8 | ||
|
|
1ca51b5550 | ||
|
|
816b800e8d | ||
|
|
e6a3d2049d | ||
|
|
08a508c65c | ||
|
|
0f0f250863 | ||
|
|
adc775ff39 | ||
|
|
1715870ab4 | ||
|
|
b84611e80a | ||
|
|
fbcbbe8737 | ||
|
|
35c4821f1f | ||
|
|
8dfd461192 | ||
|
|
4705d872b6 | ||
|
|
9e59658f3c | ||
|
|
22e8fe8f18 | ||
|
|
c8a93c6d12 | ||
|
|
c4812da51d | ||
|
|
1536927a52 | ||
|
|
a06dd15a2e | ||
|
|
50396d8828 | ||
|
|
82e30f23dd | ||
|
|
1e7a24f18a | ||
|
|
fb76ebe3c0 | ||
|
|
99edf13c49 | ||
|
|
64332db081 | ||
|
|
c8f2b574a1 | ||
|
|
a2496b7789 | ||
|
|
1a06376612 | ||
|
|
5a5b560848 | ||
|
|
9dd2dc63d0 | ||
|
|
bcc185f03d | ||
|
|
73cea3db6f | ||
|
|
1604a2e155 | ||
|
|
15c63c1d44 | ||
|
|
295987f575 | ||
|
|
2eb17e84ee | ||
|
|
e1f2fcb9b0 | ||
|
|
9c825cd342 | ||
|
|
7276735ae9 | ||
|
|
b751552a44 | ||
|
|
c7ba3edf5c | ||
|
|
782d66ac81 | ||
|
|
2285dec9a3 | ||
|
|
9694dcfa60 | ||
|
|
936643d597 | ||
|
|
953168c2c5 | ||
|
|
11122fdbd9 | ||
|
|
cb067d630c | ||
|
|
c80b44f3e2 | ||
|
|
b998425799 | ||
|
|
3c84adf229 | ||
|
|
275ee98180 | ||
|
|
bcde416c6f | ||
|
|
f9dd2acc7c | ||
|
|
ab03e800e1 | ||
|
|
7849781189 | ||
|
|
838b092187 | ||
|
|
52e29fbbc0 | ||
|
|
a2a2b0a3a0 | ||
|
|
371fb39112 | ||
|
|
3a40c40cad | ||
|
|
0643b75cef | ||
|
|
0a7fa952c2 | ||
|
|
cebb748c74 | ||
|
|
c333f10a71 | ||
|
|
088310d01c | ||
|
|
a823b328ee | ||
|
|
f82e7263f2 | ||
|
|
fa834ef827 | ||
|
|
468e704169 | ||
|
|
b5e18fdc79 | ||
|
|
cd3a6a7382 | ||
|
|
7ec2b7bb89 | ||
|
|
8ab74b06a0 | ||
|
|
ce0cef5f17 | ||
|
|
f85a4d5ea1 | ||
|
|
bccb1461cd | ||
|
|
917c6c5f72 | ||
|
|
1cb63383b3 | ||
|
|
58c2a2b2a6 | ||
|
|
631e036589 | ||
|
|
4c759cad71 | ||
|
|
b3d9d51bbf | ||
|
|
d7f30094f4 | ||
|
|
4fc5ac44e2 | ||
|
|
ad213e853c | ||
|
|
753970dcf8 | ||
|
|
85782c8d25 | ||
|
|
42d8f165e0 | ||
|
|
eae198ece7 | ||
|
|
928fd9946d | ||
|
|
111107087f | ||
|
|
3a81e31c1e | ||
|
|
6e95214f1c | ||
|
|
9c570bd00c | ||
|
|
9804158fea | ||
|
|
b46b8db99d | ||
|
|
b3c768d820 | ||
|
|
346cfc609c | ||
|
|
a155ee295c | ||
|
|
0cf21e39d1 | ||
|
|
678ca2855f | ||
|
|
b91b1b9582 | ||
|
|
959fab194c | ||
|
|
3100cf30f1 | ||
|
|
f7f37d2f09 | ||
|
|
0d417c7f22 | ||
|
|
2b74d648fc | ||
|
|
44b8919210 | ||
|
|
7f7687a498 | ||
|
|
8f21d3a003 | ||
|
|
e060938f89 | ||
|
|
584c6c7110 | ||
|
|
c4ac5bf295 | ||
|
|
1be6d56107 | ||
|
|
563191dd53 | ||
|
|
860be1b25d | ||
|
|
de9c5eea79 | ||
|
|
1357a4dfe9 | ||
|
|
be853659fc | ||
|
|
34fe51a8e3 | ||
|
|
b9e5bbb5e7 | ||
|
|
2174a6654f | ||
|
|
dc90c5b60a | ||
|
|
d3a8a46285 | ||
|
|
642431926a | ||
|
|
efedf5ea00 | ||
|
|
c0992beaa5 | ||
|
|
7d8c00849b | ||
|
|
171a6ff6c1 | ||
|
|
53c3687542 | ||
|
|
7ac353b361 | ||
|
|
50abce513a | ||
|
|
5c9757f956 | ||
|
|
9d260796c5 | ||
|
|
4512e78aa0 | ||
|
|
4259007a3d | ||
|
|
2b00991759 | ||
|
|
f9415b3b83 | ||
|
|
57a919ac0d | ||
|
|
757fee57a0 | ||
|
|
3ed462eec0 | ||
|
|
c2c1475715 | ||
|
|
9b24fbc406 | ||
|
|
b008364eb4 | ||
|
|
e04157019c | ||
|
|
56ff285252 | ||
|
|
de49a789c9 | ||
|
|
b6a5e19c44 | ||
|
|
805f8ad97e | ||
|
|
837c22f0c9 | ||
|
|
9e2e68c967 | ||
|
|
11832bb5a3 | ||
|
|
769e65fd52 | ||
|
|
3fdd25986a | ||
|
|
3dae2cfb41 | ||
|
|
9fad418eca | ||
|
|
3a1d8b259a | ||
|
|
dd1544ef0f | ||
|
|
9acef5809e | ||
|
|
a85c41943a | ||
|
|
f27f0cf777 | ||
|
|
7a5f4aad7b | ||
|
|
75fea91316 | ||
|
|
d2b2818a54 | ||
|
|
a773b60bad | ||
|
|
bea7e4b84d | ||
|
|
cec89a4ded | ||
|
|
d1d9bc8097 | ||
|
|
f42e14d1dc | ||
|
|
4a2a92192d | ||
|
|
c75ec0058f | ||
|
|
3898e87602 | ||
|
|
d14d68f751 | ||
|
|
7952ed3e4a | ||
|
|
b5eef1081d | ||
|
|
f8e892a606 | ||
|
|
a89c959a0e | ||
|
|
9775831bcd | ||
|
|
37ef4eb70d | ||
|
|
0446bd7d66 | ||
|
|
10572e4247 | ||
|
|
31e5b98356 | ||
|
|
3fdd25fae7 | ||
|
|
6db8aa8ce8 | ||
|
|
615183402e | ||
|
|
91c73feede | ||
|
|
078f033e21 | ||
|
|
5c7596a8df | ||
|
|
01992f8183 | ||
|
|
62de842b10 | ||
|
|
f815d480bc | ||
|
|
0ec397f6f1 | ||
|
|
9a202b2e1c | ||
|
|
e1f19272c5 | ||
|
|
c1e67e29d6 | ||
|
|
50402131a9 | ||
|
|
545ee91111 | ||
|
|
28f4510269 | ||
|
|
7b0ac769b6 | ||
|
|
582319c511 | ||
|
|
4e3430b622 | ||
|
|
4b9962ef00 | ||
|
|
791162005b | ||
|
|
35d3a0b269 | ||
|
|
8faad0afa3 | ||
|
|
606f46a2eb | ||
|
|
e7613cb063 | ||
|
|
aeb63c59fb | ||
|
|
36dc653bf4 | ||
|
|
527fc9b40b | ||
|
|
a0fa3f15ea | ||
|
|
7cbe4a91b8 | ||
|
|
5687c21a9c | ||
|
|
65aa144ffd | ||
|
|
8f3138f3c0 | ||
|
|
f7707515b5 | ||
|
|
3d3f301793 | ||
|
|
5c7c51b637 | ||
|
|
51fd83d23e | ||
|
|
9bfece0b2a | ||
|
|
41a45cc8d6 | ||
|
|
99dd9a5949 | ||
|
|
0f3711b809 | ||
|
|
369b19bde0 | ||
|
|
8abd2ed47c | ||
|
|
516cb7d31c | ||
|
|
f8bf387e9b | ||
|
|
5c3b592b05 | ||
|
|
d0c1c5bcc0 | ||
|
|
37c2476a4d | ||
|
|
11070e0289 | ||
|
|
040c87c4ae | ||
|
|
6ed50760f4 | ||
|
|
b43144509c | ||
|
|
fd10df7a42 | ||
|
|
06c05f6dd4 | ||
|
|
0cf940b755 | ||
|
|
2c7c6722a7 | ||
|
|
d6d16ae820 | ||
|
|
3ddb181145 | ||
|
|
2a01f1d547 | ||
|
|
2854d3461b | ||
|
|
07486edbd9 | ||
|
|
2523774c7f | ||
|
|
613a30f5de | ||
|
|
e2e671f651 | ||
|
|
f0be42539a | ||
|
|
559bdf5df5 | ||
|
|
10c89b7908 | ||
|
|
861a1b5357 | ||
|
|
c2ff68d6f9 | ||
|
|
382a015b4e | ||
|
|
4288f1c60c | ||
|
|
a71c536d96 | ||
|
|
3814ccbd15 | ||
|
|
f8723a9a75 | ||
|
|
fa7361d39e | ||
|
|
bbb6add6f1 | ||
|
|
f89bd6d5a8 | ||
|
|
2c776eda5a | ||
|
|
2e9dad5134 | ||
|
|
cbb107e408 | ||
|
|
b51ac56843 | ||
|
|
c98e982848 | ||
|
|
0d161d8082 | ||
|
|
d7e44bec96 | ||
|
|
8e7c60b244 | ||
|
|
9b6525b27c | ||
|
|
6821af9434 | ||
|
|
87e1a90471 | ||
|
|
cd9207c6e1 | ||
|
|
fa80fefde4 | ||
|
|
0418b00c87 | ||
|
|
cd608be571 | ||
|
|
9f7c725cdf | ||
|
|
96dfcfad9b | ||
|
|
c4ab7e794c | ||
|
|
f3fa2cbbcf | ||
|
|
2ec77997f6 | ||
|
|
41bbbff014 | ||
|
|
384fd98545 | ||
|
|
85d69cd0b9 | ||
|
|
9b5e991466 | ||
|
|
934fdf4cba |
196
.github/README.md
vendored
Normal file
196
.github/README.md
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Welcome to JetBrains Runtime!
|
||||
|
||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
||||
It includes a number of enhancements in font rendering, ligatures, HiDPI support, windowing/focus subsystems, performance improvements, and bugfixes.
|
||||
|
||||
> **_NOTE_**: This is a **development** branch that is periodically synchronized with
|
||||
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
|
||||
>
|
||||
Release builds are based on these branches:
|
||||
* [jbr11](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr11) (JDK 11)
|
||||
* [jbr17](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr17) (JDK 17)
|
||||
|
||||
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
|
||||
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
|
||||
|
||||
## Releases based on JDK 17
|
||||
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
|-------------|--------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 2023.1 | [17.0.6-b829.1](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b829.1) | 14-Feb-2023 |
|
||||
| 2022.3 | [17.0.6-b653.32](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b653.32) | 14-Feb-2023 |
|
||||
| 2022.2 | [17.0.5-b469.71](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.5b469.71) | 14-Nov-2022 |
|
||||
|
||||
## Releases based on JDK 11
|
||||
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
|-------------|-------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 2022.1 | [11_0_16-b2043.64](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_16b2043.64) | 10-Nov-2022 |
|
||||
| 2021.3 | [11_0_14_1-b1751.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_14_1b1751.46) | 21-Feb-2022 |
|
||||
| 2021.2 | [11_0_13-b1504.49](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_13-b1504.49) | 15-Nov-2021 |
|
||||
| 2021.1 | [11.0.11+9-b1341.60](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1248891540)| 15-Jun-2021 |
|
||||
| 2020.3 | [11_0_10-b1145.115](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1249243977) | 21-Jun-2021 |
|
||||
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#welcome-to-jetbrains-runtime)
|
||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
||||
- [Getting Sources](#getting-sources)
|
||||
- [macOS, Linux](#macos-linux)
|
||||
- [Windows](#sources-windows)
|
||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
||||
- [Linux (Docker)](#linux-docker)
|
||||
- [Ubuntu Linux](#ubuntu-linux)
|
||||
- [Windows](#build-windows)
|
||||
- [macOS](#macos)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
|
||||
## Products Built on JetBrains Runtime
|
||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
||||
* [Toolbox App](https://www.jetbrains.com/toolbox-app/). JetBrains IDE manager.
|
||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
||||
|
||||
## Getting Sources
|
||||
### macOS, Linux
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
### Windows
|
||||
<a name="sources-windows"></a>
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
## Configuring the Build Environment
|
||||
Here are quick per-platform instructions for those who can't wait to get started.
|
||||
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
|
||||
coverage of all the details.
|
||||
|
||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
||||
> It would usually have meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Create a container:
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
```
|
||||
Run these commands in the new container:
|
||||
```
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
```
|
||||
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
```
|
||||
Get Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=linux&package=jdk)).
|
||||
|
||||
Then run the following:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/linux-x86_64-server-release/`.
|
||||
|
||||
### Windows
|
||||
<a name="build-windows"></a>
|
||||
Install the following:
|
||||
* [Cygwin x64](http://www.cygwin.com/).
|
||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
||||
Install those together with Cygwin.
|
||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
||||
Visual Studio 2019 is supported by default.
|
||||
* Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=windows&package=jdk)).
|
||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
|
||||
```
|
||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
||||
|
||||
In the Cygwin shell:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ bash configure --with-toolchain-version=2019
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/windows-x86_64-server-release/`.
|
||||
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
|
||||
* Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=macos&package=jdk)).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
|
||||
|
||||
## Developing
|
||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
||||
Both require projects to be created.
|
||||
|
||||
### CLion
|
||||
Run
|
||||
```
|
||||
$ make compile-commands
|
||||
```
|
||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
||||
|
||||
See also this detailed step-by-step tutorial for all platforms:
|
||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
### IDEA
|
||||
Run
|
||||
```
|
||||
$ sh ./bin/idea.sh
|
||||
```
|
||||
in the git root to generate project files (add `--help` for options). If you have multiple
|
||||
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
|
||||
Then open the git root directory as a project in IDEA.
|
||||
|
||||
## Contributing
|
||||
We are happy to receive your pull requests!
|
||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
||||
|
||||
## Resources
|
||||
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
|
||||
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
|
||||
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
|
||||
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,3 +18,5 @@ NashornProfile.txt
|
||||
/src/utils/LogCompilation/target/
|
||||
/.project/
|
||||
/.settings/
|
||||
*.class
|
||||
.idea/workspace.xml
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Welcome to the JDK!
|
||||
|
||||
For build instructions please see the
|
||||
|
||||
302
bin/idea.sh
302
bin/idea.sh
@@ -25,7 +25,26 @@
|
||||
# Shell script for generating an IDEA project from a given list of modules
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [-c|--conf <conf_name>] [modules]+"
|
||||
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [-c|--conf <conf_name>] [modules...]"
|
||||
echo " -h | --help"
|
||||
echo " -q | --quiet
|
||||
No stdout output"
|
||||
echo " -a | --absolute-paths
|
||||
Use absolute paths to this jdk, so that generated .idea
|
||||
project files can be moved independently of jdk sources"
|
||||
echo " -r | --root <path>
|
||||
Project content root
|
||||
Default: $TOPLEVEL_DIR"
|
||||
echo " -o | --output <path>
|
||||
Where .idea directory with project files will be generated
|
||||
(e.g. using '-o .' will place project files in './.idea')
|
||||
Default: same as --root"
|
||||
echo " -c | --conf <conf_name>
|
||||
make configuration (release, slowdebug etc)"
|
||||
echo " [modules...]
|
||||
Generate project modules for specific java modules
|
||||
(e.g. 'java.base java.desktop')
|
||||
Default: all existing modules (java.* and jdk.*)"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -33,10 +52,13 @@ SCRIPT_DIR=`dirname $0`
|
||||
#assume TOP is the dir from which the script has been called
|
||||
TOP=`pwd`
|
||||
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
|
||||
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||
cd .. ; TOPLEVEL_DIR=`pwd`
|
||||
fi
|
||||
cd $TOP;
|
||||
|
||||
IDEA_OUTPUT=$TOP/.idea
|
||||
VERBOSE="false"
|
||||
VERBOSE=true
|
||||
ABSOLUTE_PATHS=false
|
||||
CONF_ARG=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
@@ -45,14 +67,24 @@ do
|
||||
usage
|
||||
;;
|
||||
|
||||
-v | --vebose )
|
||||
VERBOSE="true"
|
||||
-q | --quiet )
|
||||
VERBOSE=false
|
||||
;;
|
||||
|
||||
-a | --absolute-paths )
|
||||
ABSOLUTE_PATHS=true
|
||||
;;
|
||||
|
||||
-r | --root )
|
||||
TOPLEVEL_DIR="$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
-o | --output )
|
||||
IDEA_OUTPUT=$2/.idea
|
||||
IDEA_OUTPUT="$2/.idea"
|
||||
shift
|
||||
;;
|
||||
|
||||
-c | --conf )
|
||||
CONF_ARG="CONF_NAME=$2"
|
||||
shift
|
||||
@@ -69,20 +101,17 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -e $IDEA_OUTPUT ] ; then
|
||||
rm -r $IDEA_OUTPUT
|
||||
if [ "x$IDEA_OUTPUT" = "x" ] ; then
|
||||
IDEA_OUTPUT="$TOPLEVEL_DIR/.idea"
|
||||
fi
|
||||
|
||||
mkdir -p $IDEA_OUTPUT || exit 1
|
||||
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
cd "$TOP" ; cd $TOPLEVEL_DIR; TOPLEVEL_DIR=`pwd`
|
||||
cd "$TOP" ; cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
cd ..; IDEA_OUTPUT_PARENT=`pwd`
|
||||
cd "$SCRIPT_DIR/.." ; OPENJDK_DIR=`pwd`
|
||||
|
||||
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||
cd $SCRIPT_DIR/..
|
||||
TOPLEVEL_DIR=`pwd`
|
||||
cd $IDEA_OUTPUT
|
||||
fi
|
||||
|
||||
MAKE_DIR="$SCRIPT_DIR/../make"
|
||||
IDEA_MAKE="$MAKE_DIR/ide/idea/jdk"
|
||||
IDEA_MAKE="$OPENJDK_DIR/make/ide/idea/jdk"
|
||||
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
||||
|
||||
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||
@@ -94,31 +123,31 @@ if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" = "true" ] ; then
|
||||
echo "output dir: $IDEA_OUTPUT"
|
||||
echo "idea template dir: $IDEA_TEMPLATE"
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Will generate IDEA project files in \"$IDEA_OUTPUT\" for project \"$TOPLEVEL_DIR\""
|
||||
fi
|
||||
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I "$OPENJDK_DIR" idea TOPLEVEL_DIR="$TOPLEVEL_DIR" \
|
||||
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
|
||||
# Expect MODULE_ROOTS, MODULE_NAMES, BOOT_JDK & SPEC to be set
|
||||
if [ "x$MODULE_ROOTS" = "x" ] ; then
|
||||
echo "FATAL: MODULE_ROOTS is empty" >&2; exit 1
|
||||
# Expect MODULES, MODULE_NAMES, RELATIVE_PROJECT_DIR, RELATIVE_BUILD_DIR to be set
|
||||
if [ "xMODULES" = "x" ] ; then
|
||||
echo "FATAL: MODULES is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$MODULE_NAMES" = "x" ] ; then
|
||||
echo "FATAL: MODULE_NAMES is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$BOOT_JDK" = "x" ] ; then
|
||||
echo "FATAL: BOOT_JDK is empty" >&2; exit 1
|
||||
if [ "x$RELATIVE_PROJECT_DIR" = "x" ] ; then
|
||||
echo "FATAL: RELATIVE_PROJECT_DIR is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$SPEC" = "x" ] ; then
|
||||
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||
if [ "x$RELATIVE_BUILD_DIR" = "x" ] ; then
|
||||
echo "FATAL: RELATIVE_BUILD_DIR is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
@@ -129,6 +158,43 @@ if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
if [ "$ABSOLUTE_PATHS" = true ] ; then
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
PROJECT_DIR="`$PATHTOOL -am $OPENJDK_DIR`"
|
||||
TOPLEVEL_PROJECT_DIR="`$PATHTOOL -am $TOPLEVEL_DIR`"
|
||||
else
|
||||
PROJECT_DIR="$OPENJDK_DIR"
|
||||
TOPLEVEL_PROJECT_DIR="$TOPLEVEL_DIR"
|
||||
fi
|
||||
MODULE_DIR="$PROJECT_DIR"
|
||||
TOPLEVEL_MODULE_DIR="$TOPLEVEL_PROJECT_DIR"
|
||||
cd "$IDEA_OUTPUT_PARENT" && cd "$RELATIVE_BUILD_DIR" && BUILD_DIR="`pwd`"
|
||||
CLION_SCRIPT_TOPDIR="$OPENJDK_DIR"
|
||||
CLION_PROJECT_DIR="$PROJECT_DIR"
|
||||
else
|
||||
if [ "$RELATIVE_PROJECT_DIR" = "." ] ; then
|
||||
PROJECT_DIR=""
|
||||
else
|
||||
PROJECT_DIR="/$RELATIVE_PROJECT_DIR"
|
||||
fi
|
||||
if [ "$RELATIVE_TOPLEVEL_PROJECT_DIR" = "." ] ; then
|
||||
TOPLEVEL_PROJECT_DIR=""
|
||||
else
|
||||
TOPLEVEL_PROJECT_DIR="/$RELATIVE_TOPLEVEL_PROJECT_DIR"
|
||||
fi
|
||||
MODULE_DIR="\$MODULE_DIR\$$PROJECT_DIR"
|
||||
PROJECT_DIR="\$PROJECT_DIR\$$PROJECT_DIR"
|
||||
TOPLEVEL_MODULE_DIR="\$MODULE_DIR\$$TOPLEVEL_PROJECT_DIR"
|
||||
TOPLEVEL_PROJECT_DIR="\$PROJECT_DIR\$$TOPLEVEL_PROJECT_DIR"
|
||||
BUILD_DIR="\$PROJECT_DIR\$/$RELATIVE_BUILD_DIR"
|
||||
CLION_SCRIPT_TOPDIR="$CLION_RELATIVE_PROJECT_DIR"
|
||||
CLION_PROJECT_DIR="\$PROJECT_DIR\$/$CLION_SCRIPT_TOPDIR"
|
||||
fi
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Project root: $PROJECT_DIR"
|
||||
echo "Generating IDEA project files..."
|
||||
fi
|
||||
|
||||
### Replace template variables
|
||||
|
||||
NUM_REPLACEMENTS=0
|
||||
@@ -152,126 +218,106 @@ add_replacement() {
|
||||
eval TO$NUM_REPLACEMENTS='$2'
|
||||
}
|
||||
|
||||
add_replacement "###PATHTOOL###" "$PATHTOOL"
|
||||
add_replacement "###CLION_SCRIPT_TOPDIR###" "$CLION_SCRIPT_TOPDIR"
|
||||
add_replacement "###CLION_PROJECT_DIR###" "$CLION_PROJECT_DIR"
|
||||
add_replacement "###PROJECT_DIR###" "$PROJECT_DIR"
|
||||
add_replacement "###MODULE_DIR###" "$MODULE_DIR"
|
||||
add_replacement "###TOPLEVEL_PROJECT_DIR###" "$TOPLEVEL_PROJECT_DIR"
|
||||
add_replacement "###TOPLEVEL_MODULE_DIR###" "$TOPLEVEL_MODULE_DIR"
|
||||
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||
SPEC_DIR=`dirname $SPEC`
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`$CYGPATH -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`$CYGPATH -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`$CYGPATH -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`$CYGPATH -am $IDEA_OUTPUT`"
|
||||
add_replacement "###BUILD_DIR###" "$BUILD_DIR"
|
||||
add_replacement "###RELATIVE_BUILD_DIR###" "$RELATIVE_BUILD_DIR"
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
add_replacement "###BASH_RUNNER_PREFIX###" "\$PROJECT_DIR\$/.idea/bash.bat"
|
||||
else
|
||||
add_replacement "###BASH_RUNNER_PREFIX###" ""
|
||||
fi
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
if [ "x$JT_HOME" = "x" ]; then
|
||||
add_replacement "###JTREG_HOME###" ""
|
||||
else
|
||||
add_replacement "###JTREG_HOME###" "`$CYGPATH -am $JT_HOME`"
|
||||
fi
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`wslpath -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`wslpath -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`wslpath -am $IDEA_OUTPUT`"
|
||||
if [ "x$JT_HOME" = "x" ]; then
|
||||
add_replacement "###JTREG_HOME###" ""
|
||||
else
|
||||
add_replacement "###JTREG_HOME###" "`wslpath -am $JT_HOME`"
|
||||
add_replacement "###JTREG_HOME###" "`$PATHTOOL -am $JT_HOME`"
|
||||
fi
|
||||
else
|
||||
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
|
||||
add_replacement "###JTREG_HOME###" "$JT_HOME"
|
||||
add_replacement "###IMAGES_DIR###" "$SPEC_DIR/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "$TOPLEVEL_DIR"
|
||||
add_replacement "###IDEA_DIR###" "$IDEA_OUTPUT"
|
||||
fi
|
||||
|
||||
SOURCE_PREFIX="<sourceFolder url=\"file://"
|
||||
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
||||
|
||||
for root in $MODULE_ROOTS; do
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
root=`$CYGPATH -am $root`
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
root=`wslpath -am $root`
|
||||
fi
|
||||
|
||||
VM_CI="jdk.internal.vm.ci/share/classes"
|
||||
VM_COMPILER="src/jdk.internal.vm.compiler/share/classes"
|
||||
if test "${root#*$VM_CI}" != "$root" || test "${root#*$VM_COMPILER}" != "$root"; then
|
||||
for subdir in "$root"/*; do
|
||||
if [ -d "$subdir" ]; then
|
||||
SOURCES=$SOURCES" $SOURCE_PREFIX""$subdir"/src"$SOURCE_POSTFIX"
|
||||
fi
|
||||
done
|
||||
else
|
||||
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
|
||||
fi
|
||||
MODULE_IMLS=""
|
||||
TEST_MODULE_DEPENDENCIES=""
|
||||
for module in $MODULE_NAMES; do
|
||||
MODULE_IMLS="$MODULE_IMLS<module fileurl=\"file://\$PROJECT_DIR$/.idea/$module.iml\" filepath=\"\$PROJECT_DIR$/.idea/$module.iml\" /> "
|
||||
TEST_MODULE_DEPENDENCIES="$TEST_MODULE_DEPENDENCIES<orderEntry type=\"module\" module-name=\"$module\" scope=\"TEST\" /> "
|
||||
done
|
||||
|
||||
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
|
||||
add_replacement "###MODULE_IMLS###" "$MODULE_IMLS"
|
||||
add_replacement "###TEST_MODULE_DEPENDENCIES###" "$TEST_MODULE_DEPENDENCIES"
|
||||
|
||||
replace_template_dir "$IDEA_OUTPUT"
|
||||
|
||||
### Compile the custom Logger
|
||||
### Generate module project files
|
||||
|
||||
CLASSES=$IDEA_OUTPUT/classes
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Generating project modules:"
|
||||
fi
|
||||
(
|
||||
DEFAULT_IFS="$IFS"
|
||||
IFS='#'
|
||||
for value in $MODULES; do
|
||||
(
|
||||
eval "$value"
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo " $module"
|
||||
fi
|
||||
MAIN_SOURCE_DIRS=""
|
||||
CONTENT_ROOTS=""
|
||||
IFS=' '
|
||||
for dir in $moduleSrcDirs; do
|
||||
case $dir in
|
||||
"src/"*) MAIN_SOURCE_DIRS="$MAIN_SOURCE_DIRS <sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" />" ;;
|
||||
*"/support/gensrc/$module") ;; # Exclude generated sources to avoid module-info conflicts, see https://youtrack.jetbrains.com/issue/IDEA-185108
|
||||
*) CONTENT_ROOTS="$CONTENT_ROOTS <content url=\"file://$MODULE_DIR/$dir\">\
|
||||
<sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" generated=\"true\" /></content>" ;;
|
||||
esac
|
||||
done
|
||||
if [ "x$MAIN_SOURCE_DIRS" != "x" ] ; then
|
||||
CONTENT_ROOTS="<content url=\"file://$MODULE_DIR/src/$module\">$MAIN_SOURCE_DIRS</content>$CONTENT_ROOTS"
|
||||
fi
|
||||
add_replacement "###MODULE_CONTENT_ROOTS###" "$CONTENT_ROOTS"
|
||||
DEPENDENCIES=""
|
||||
for dep in $moduleDependencies; do
|
||||
case $MODULE_NAMES in # Exclude skipped modules from dependencies
|
||||
*"$dep"*) DEPENDENCIES="$DEPENDENCIES<orderEntry type=\"module\" module-name=\"$dep\" /> "
|
||||
esac
|
||||
done
|
||||
add_replacement "###DEPENDENCIES###" "$DEPENDENCIES"
|
||||
cp "$IDEA_OUTPUT/module.iml" "$IDEA_OUTPUT/$module.iml"
|
||||
IFS="$DEFAULT_IFS"
|
||||
replace_template_file "$IDEA_OUTPUT/$module.iml"
|
||||
)
|
||||
done
|
||||
)
|
||||
rm "$IDEA_OUTPUT/module.iml"
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
# try some common locations
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
### Create shell script runner for Windows
|
||||
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
echo "@echo off" > "$IDEA_OUTPUT/bash.bat"
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ] ; then
|
||||
echo "wsl -d $WSL_DISTRO_NAME --cd \"%cd%\" -e %*" >> "$IDEA_OUTPUT/bash.bat"
|
||||
else
|
||||
try_ant=$(ls /opt/homebrew/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
else
|
||||
try_ant=$(ls /usr/local/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$ANT_HOME/lib/ant.jar" ] ; then
|
||||
echo "FATAL: ANT_HOME is incorrect. Try removing it and use autodetection, or fix the value" >&2; exit 1
|
||||
echo "$WINENV_ROOT\bin\bash.exe -l -c \"cd %CD:\=/%/ && %*\"" >> "$IDEA_OUTPUT/bash.bat"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
fi
|
||||
CP=$ANT_HOME/lib/ant.jar
|
||||
rm -rf $CLASSES; mkdir $CLASSES
|
||||
|
||||
# If we have a Windows boot JDK, we need a .exe suffix
|
||||
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
|
||||
JAVAC=javac.exe
|
||||
else
|
||||
JAVAC=javac
|
||||
fi
|
||||
|
||||
# If we are on WSL, the boot JDK might be either Windows or Linux,
|
||||
# and we need to use realpath instead of CYGPATH to make javac work on both.
|
||||
# We need to handle this case first since CYGPATH might be set on WSL.
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
|
||||
ANT_TEMP=`mktemp -d -p ./`
|
||||
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
|
||||
JAVAC_CP=$ANT_TEMP/ant.jar
|
||||
elif [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||
JAVAC_SOURCE_FILE=`$CYGPATH -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`$CYGPATH -am $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`$CYGPATH -am $CLASSES`
|
||||
JAVAC_CP=`$CYGPATH -am $CP`
|
||||
else
|
||||
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
|
||||
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
|
||||
JAVAC_CLASSES=$CLASSES
|
||||
JAVAC_CP=$CP
|
||||
fi
|
||||
|
||||
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
rm -rf $ANT_TEMP
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
IDEA_PROJECT_DIR="`dirname $IDEA_OUTPUT`"
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
IDEA_PROJECT_DIR="`$PATHTOOL -am $IDEA_PROJECT_DIR`"
|
||||
fi
|
||||
echo "
|
||||
Now you can open \"$IDEA_PROJECT_DIR\" as IDEA project
|
||||
You can also run 'bash \"$IDEA_OUTPUT/jdk-clion/update-project.sh\"' to generate Clion project"
|
||||
fi
|
||||
238
jb/branchdiff.py
Executable file
238
jb/branchdiff.py
Executable file
@@ -0,0 +1,238 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stderr.write(f"[verbose] ")
|
||||
sys.stderr.write(*msg)
|
||||
sys.stderr.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show commit differences between branches of JBR git repos",
|
||||
epilog="Example: %(prog)s --from origin/jbr17 --to jbr17.b469 --path "
|
||||
"src/hotspot --limit 200")
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git root', required=True)
|
||||
ap.add_argument('--from', dest='frombranch', help='branch to take commits from', required=True)
|
||||
ap.add_argument('--to', dest='tobranch', help='branch to apply new commits to', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('--html', dest="ishtml", help="print out HTML rather than plain text", action='store_true')
|
||||
ap.add_argument('-o', dest="output", help="print the list of missing commits to this file"
|
||||
" to be used as exclude list later")
|
||||
ap.add_argument('--exclude', dest='exclude', help='exclude commits listed in the given file '
|
||||
'(can use edited -o output file as input here)')
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.frombranch = args.frombranch
|
||||
self.tobranch = args.tobranch
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.exclude = args.exclude
|
||||
self.output = args.output
|
||||
self.ishtml = args.ishtml
|
||||
self.verbose = args.verbose
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, branch, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate", branch]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = ""
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message = l.strip()
|
||||
t = self.message.split(' ')
|
||||
if len(t) > 1:
|
||||
bugid = t[0]
|
||||
if bugid.startswith("fixup"):
|
||||
bugid = t[1]
|
||||
bugid = bugid.strip(":")
|
||||
if bugid.startswith("JBR-") or bugid.isnumeric():
|
||||
self.bugid = bugid
|
||||
break
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jbr):
|
||||
verbose(options, f"Reading history from '{jbr.rootpath}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
if options.limit > 0:
|
||||
verbose(options, f"\t(up to '{options.limit}' commits)")
|
||||
verbose(options, f"Searching for missing fixes in '{options.tobranch}' compared with '{options.frombranch}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
options = Options()
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
print_explanation(options, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
log_from = jbr.log(options.frombranch, options.path, options.limit)
|
||||
log_to = jbr.log(options.tobranch, options.path, options.limit)
|
||||
history_from = History(log_from)
|
||||
history_to = History(log_to)
|
||||
|
||||
verbose(options, f"Read {history_from.size()} commits from '{options.frombranch}', {history_to.size()} from {options.tobranch}")
|
||||
|
||||
exclude_list=[]
|
||||
if options.exclude:
|
||||
with open(options.exclude, "r") as exclude_file:
|
||||
l = exclude_file.read().split('\n')
|
||||
exclude_list = list(filter(lambda line: not line.startswith("#"), l))
|
||||
|
||||
for c in history_from.commits:
|
||||
if c.message:
|
||||
verbose(options, f"Looking for commit '{c.message}'")
|
||||
if c.message in exclude_list:
|
||||
verbose(options, "...nope, in exclude list")
|
||||
continue
|
||||
if not history_to.contains(c.message):
|
||||
commits_to_save.append(c)
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
print_out_commits(options, commits_to_save)
|
||||
save_commits_to_file(commits_to_save, options)
|
||||
|
||||
|
||||
def save_commits_to_file(commits_to_save, options):
|
||||
if len(commits_to_save) > 0 and options.output:
|
||||
print()
|
||||
with open(options.output, "w") as out:
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
print(f"# {c.sha}", file=out)
|
||||
print(c.message, file=out)
|
||||
|
||||
|
||||
def print_out_commits(options, commits_to_save):
|
||||
if options.ishtml:
|
||||
print("<html><body>")
|
||||
print(f"<p><b>Commits on <code>{options.frombranch}</code>"
|
||||
f" missing from <code>{options.tobranch}</code></b></p></h1>")
|
||||
if len(commits_to_save) > 0:
|
||||
for c in sorted(commits_to_save, key=lambda commit: commit.bugid):
|
||||
if options.ishtml:
|
||||
msg = c.message
|
||||
bugurl = ""
|
||||
if c.bugid:
|
||||
if c.bugid.isnumeric():
|
||||
bugurl = f"https://bugs.openjdk.org/browse/JDK-{c.bugid}"
|
||||
elif c.bugid.startswith("JBR-"):
|
||||
bugurl = f"https://youtrack.jetbrains.com/issue/{c.bugid}"
|
||||
|
||||
if len(bugurl) > 0:
|
||||
msg = msg.replace(c.bugid, f"<a href='{bugurl}'>{c.bugid}</a>")
|
||||
|
||||
sha = f"<a href='https://jetbrains.team/p/jbre/repositories/jbr/commits?commits={c.sha}'>" \
|
||||
f"{c.sha[0:8]}</a>"
|
||||
print(f"<li>{msg} ({sha})</li>")
|
||||
else:
|
||||
print(f"{c.message} ({c.sha[0:8]})")
|
||||
if options.ishtml:
|
||||
print("</body></html>")
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
230
jb/jdkdiff.py
Executable file
230
jb/jdkdiff.py
Executable file
@@ -0,0 +1,230 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stdout.write(f"[verbose] ")
|
||||
sys.stdout.write(*msg)
|
||||
sys.stdout.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
|
||||
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
|
||||
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jdkpath):
|
||||
fatal(f"{args.jdkpath} not a directory")
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.jdkpath = args.jdkpath
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.output_dir = args.output_dir
|
||||
self.verbose = args.verbose
|
||||
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate"]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = None
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message += l + "\n"
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
if self.message and self.message != "" and ":" in self.message:
|
||||
maybe_bugid = self.message.split(":")[0].strip()
|
||||
if 10 >= len(maybe_bugid) >= 4:
|
||||
self.bugid = maybe_bugid
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jdk, jbr):
|
||||
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
|
||||
options = Options()
|
||||
|
||||
jdk = GitRepo(options.jdkpath)
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
|
||||
print_explanation(options, jdk, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
jdk_log = jdk.log(options.path, options.limit)
|
||||
jdk_history = History(jdk_log)
|
||||
|
||||
jbr_log = jbr.log(options.path)
|
||||
jbr_history = History(jbr_log)
|
||||
|
||||
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
|
||||
|
||||
for c in jdk_history.commits:
|
||||
if c.bugid:
|
||||
verbose(options, f"Looking for bugfix for {c.bugid}")
|
||||
if not jbr_history.contains(c.bugid):
|
||||
commits_to_save.append(c)
|
||||
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
|
||||
print(f" commit {c.sha}")
|
||||
print(f" {first_line(c.message).strip()}")
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
if len(commits_to_save) > 0 and options.output_dir:
|
||||
print()
|
||||
if not os.path.exists(options.output_dir):
|
||||
verbose(options, f"Creating output directory {options.output_dir}")
|
||||
os.makedirs(options.output_dir)
|
||||
nzeroes = len(str(len(commits_to_save)))
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
|
||||
print(f"[note] {c.bugid} saved as {fname}")
|
||||
fname = os.path.abspath(fname)
|
||||
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
|
||||
|
||||
script_fname = os.path.join(options.output_dir, "apply.sh")
|
||||
with open(script_fname, "w") as script_file:
|
||||
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
|
||||
file=script_file)
|
||||
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
|
||||
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
apply_script_code = """
|
||||
#!/bin/bash
|
||||
|
||||
GITROOT={0}
|
||||
PATCHROOT={1}
|
||||
|
||||
cd $PATCHROOT || exit 1
|
||||
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
|
||||
|
||||
for P in $PATCHES; do
|
||||
git -C $GITROOT am $P
|
||||
if [ $? != 0 ]; then
|
||||
mv "$P" "$P.failed"
|
||||
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
|
||||
echo "[NOTE] Execute this script to apply the remaining patches."
|
||||
exit 1
|
||||
else
|
||||
mv "$P" "$P.done"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
13
jb/project/docker/Dockerfile
Normal file
13
jb/project/docker/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
# jetbrains/runtime:jbr15env
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
# Install Java 16
|
||||
RUN wget https://cdn.azul.com/zulu/bin/zulu17.28.13-ca-jdk17.0.0-linux_x64.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
RUN mv /zulu17.28.13-ca-jdk17.0.0-linux_x64 /jdk17.0.0
|
||||
ENV PATH /opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN mkdir .git
|
||||
RUN git config user.email "teamcity@jetbrains.com"
|
||||
RUN git config user.name "builduser"
|
||||
48
jb/project/docker/Dockerfile.aarch64
Normal file
48
jb/project/docker/Dockerfile.aarch64
Normal file
@@ -0,0 +1,48 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM arm64v8/ubuntu:focal-20211006
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
||||
apt-get update -qy && \
|
||||
apt-get install -qy \
|
||||
autoconf \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
file \
|
||||
g++-10=10.3.0-1ubuntu1~20.04 \
|
||||
gcc-10=10.3.0-1ubuntu1~20.04 \
|
||||
git \
|
||||
libasound2-dev \
|
||||
libcups2-dev \
|
||||
libfontconfig1-dev \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxt-dev \
|
||||
libxtst-dev \
|
||||
make \
|
||||
rsync \
|
||||
tar \
|
||||
unzip \
|
||||
zip && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
||||
apt-get clean -qy && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk.tar.gz && rm /jdk17/boot_jdk.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
22
jb/project/docker/Dockerfile.musl_aarch64
Normal file
22
jb/project/docker/Dockerfile.musl_aarch64
Normal file
@@ -0,0 +1,22 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM arm64v8/alpine:3.12
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
|
||||
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
|
||||
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
|
||||
fontconfig fontconfig-dev linux-headers
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_aarch64.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk17/boot_jdk_musl_aarch64.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
22
jb/project/docker/Dockerfile.musl_x64
Normal file
22
jb/project/docker/Dockerfile.musl_x64
Normal file
@@ -0,0 +1,22 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_x64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM alpine:3.14
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
|
||||
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
|
||||
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
|
||||
fontconfig fontconfig-dev linux-headers
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_amd64.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk17/boot_jdk_musl_amd64.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
55
jb/project/docker/Dockerfile.x86
Normal file
55
jb/project/docker/Dockerfile.x86
Normal file
@@ -0,0 +1,55 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_x86.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT receive updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
#FROM i386/ubuntu:xenial
|
||||
#FROM i386/ubuntu:bionic
|
||||
FROM i386/ubuntu:focal
|
||||
|
||||
RUN linux32 \
|
||||
apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
||||
linux32 \
|
||||
apt-get -y install \
|
||||
autoconf \
|
||||
build-essential \
|
||||
curl \
|
||||
file \
|
||||
git \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrender-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
libxt-dev \
|
||||
libcups2-dev \
|
||||
libasound2-data \
|
||||
# libpng12-0 \
|
||||
libasound2 \
|
||||
libfreetype6 \
|
||||
libfontconfig1-dev \
|
||||
libasound2-dev \
|
||||
rsync \
|
||||
unzip \
|
||||
zip
|
||||
RUN linux32 \
|
||||
apt-get -y install \
|
||||
g++-10 \
|
||||
gcc-10 && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
||||
apt-get clean -qy && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_x86.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_x86.tar.gz && rm /jdk17/boot_jdk_x86.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
29
jb/project/docker/mkdocker_aarch64.sh
Executable file
29
jb/project/docker/mkdocker_aarch64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building AArch64 variant
|
||||
# of the JetBrains Runtime "dev" version.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.30.15-ca-jdk17.0.1-linux_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=4d9c9116eb0cdd2d7fb220d6d27059f4bf1b7e95cc93d5512bd8ce3791af86c7
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jbrdevenv_arm64v8 -f Dockerfile.aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
29
jb/project/docker/mkdocker_musl_aarch64.sh
Executable file
29
jb/project/docker/mkdocker_musl_aarch64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl AArch64 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=6b920559abafbe9bdef386a20ecf3a2f318bc1f0d8359eb1f95aee26606bbc70
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_aarch64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jbr17buildenv -f Dockerfile.musl_aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
29
jb/project/docker/mkdocker_musl_x64.sh
Executable file
29
jb/project/docker/mkdocker_musl_x64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl-x64 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_x64.tar.gz
|
||||
BOOT_JDK_SHA=bcc5342011bd9f3643372aadbdfa68d47463ff0d8621668a0bdf2910614d95c6
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_amd64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jbr17buildenv -f Dockerfile.musl_x64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
26
jb/project/docker/mkdocker_x86.sh
Executable file
26
jb/project/docker/mkdocker_x86.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# This script creates a Docker image suitable for building x86 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.34.19-ca-jdk17.0.3-linux_i686.tar.gz
|
||||
BOOT_JDK_SHA=1c35c374ba0001e675d6e80819d5be900c4e141636d5e484992a8c550be14481
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_x86.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr17env_x86 -f Dockerfile.x86 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
1
jb/project/idea-project-files/jdk-clion/.idea/.name
generated
Normal file
1
jb/project/idea-project-files/jdk-clion/.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
JetBrainsRuntime
|
||||
20
jb/project/idea-project-files/jdk-clion/.idea/vcs.xml
generated
Normal file
20
jb/project/idea-project-files/jdk-clion/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
13
jb/project/idea-project-files/jetbrains.api.iml
Normal file
13
jb/project/idea-project-files/jetbrains.api.iml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/src/jetbrains.api">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/templates" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
12
jb/project/idea-project-files/modules.xml
Normal file
12
jb/project/idea-project-files/modules.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdk.iml" filepath="$PROJECT_DIR$/.idea/jdk.iml" />
|
||||
###MODULE_IMLS###
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jetbrains.api.iml" filepath="$PROJECT_DIR$/.idea/jetbrains.api.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
20
jb/project/idea-project-files/vcs.xml
Normal file
20
jb/project/idea-project-files/vcs.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
135
jb/project/java-gradle/build.gradle
Normal file
135
jb/project/java-gradle/build.gradle
Normal file
@@ -0,0 +1,135 @@
|
||||
apply plugin: 'java'
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def test_jvm = {
|
||||
if (project.hasProperty('jbsdkhome')) {
|
||||
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
|
||||
} else {
|
||||
if (OperatingSystem.current().isMacOsX()) {
|
||||
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.0.4.jdk/Contents/Home/bin/java').absolutePath
|
||||
} else if (OperatingSystem.current().isLinux()) {
|
||||
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
|
||||
} else {
|
||||
file('../../../build/windows-x86_64-normal-server-release/images/jdk/bin/java.exe').absolutePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile('junit:junit:4.12'){
|
||||
exclude group: 'org.hamcrest'
|
||||
}
|
||||
testCompile 'org.hamcrest:hamcrest-library:1.3'
|
||||
testCompile 'net.java.dev.jna:jna:4.4.0'
|
||||
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
|
||||
testCompile 'org.apache.commons:commons-lang3:3.0'
|
||||
}
|
||||
|
||||
def jdk_modules = ["java.base", "java.logging", "java.prefs",
|
||||
"java.se.ee", "java.sql", "java.datatransfer",
|
||||
"java.management", "java.rmi", "java.security.jgss",
|
||||
"java.sql.rowset", "java.desktop", "java.management.rmi",
|
||||
"java.scripting", "java.security.sasl", "java.transaction",
|
||||
"java.instrument", "java.naming", "java.se",
|
||||
"java.smartcardio", "java.xml.crypto"]
|
||||
|
||||
def jdk_class_dirs = []
|
||||
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
new File("../../../src/" + it + "/share/classes")
|
||||
}
|
||||
|
||||
if (OperatingSystem.current().isMacOsX())
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/macosx/classes"
|
||||
}
|
||||
else if (OperatingSystem.current().isLinux()) {
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/solaris/classes"
|
||||
}
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/unix/classes"
|
||||
}
|
||||
} else
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/windows/classes"
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDirs = jdk_class_dirs
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
srcDir "../../../test/jdk/jbu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test.dependsOn.clear()
|
||||
|
||||
test.dependsOn tasks.compileTestJava
|
||||
|
||||
test {
|
||||
systemProperty "jb.java2d.metal", "true"
|
||||
systemProperty "testdata", file('../../../test/jdk/jbu/testdata').absolutePath
|
||||
|
||||
// Generate golden images for DroidFontTest and MixedTextTest
|
||||
// systemProperty "gentestdata", ""
|
||||
|
||||
// Enable Java2D logging (https://confluence.jetbrains.com/display/JRE/Java2D+Rendering+Logging)
|
||||
// systemProperty "sun.java2d.trace", "log"
|
||||
// systemProperty "sun.java2d.trace", "log,pimpl"
|
||||
|
||||
outputs.upToDateWhen { false }
|
||||
executable = test_jvm()
|
||||
|
||||
// Enable async/dtrace profiler
|
||||
jvmArgs "-XX:+PreserveFramePointer"
|
||||
// Enable native J2D logging (only in debug build)
|
||||
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
|
||||
|
||||
// environment 'J2D_TRACE_LEVEL', '4'
|
||||
}
|
||||
|
||||
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
|
||||
|
||||
def make_cmd = "make"
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
|
||||
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
|
||||
}
|
||||
def test_run = false
|
||||
task make_images {
|
||||
doLast {
|
||||
if (!test_run) {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task make_clean {
|
||||
doLast {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
|
||||
task run_test {
|
||||
doLast {
|
||||
test_run = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.cleanTest.dependsOn tasks.run_test
|
||||
classes.dependsOn.clear()
|
||||
classes.dependsOn tasks.make_images
|
||||
tasks.cleanClasses.dependsOn tasks.make_clean
|
||||
54
jb/project/tools/common/modules.list
Normal file
54
jb/project/tools/common/modules.list
Normal file
@@ -0,0 +1,54 @@
|
||||
java.base,
|
||||
java.compiler,
|
||||
java.datatransfer,
|
||||
java.desktop,
|
||||
java.instrument,
|
||||
java.logging,
|
||||
java.management,
|
||||
java.management.rmi,
|
||||
java.naming,
|
||||
java.net.http,
|
||||
java.prefs,
|
||||
java.rmi,
|
||||
java.scripting,
|
||||
java.se,
|
||||
java.security.jgss,
|
||||
java.security.sasl,
|
||||
java.smartcardio,
|
||||
java.sql,
|
||||
java.sql.rowset,
|
||||
java.transaction.xa,
|
||||
java.xml,
|
||||
java.xml.crypto,
|
||||
jdk.accessibility,
|
||||
jdk.attach,
|
||||
jdk.charsets,
|
||||
jdk.compiler,
|
||||
jdk.crypto.cryptoki,
|
||||
jdk.crypto.ec,
|
||||
jdk.dynalink,
|
||||
jdk.httpserver,
|
||||
jdk.internal.ed,
|
||||
jdk.internal.le,
|
||||
jdk.internal.vm.ci,
|
||||
jdk.javadoc,
|
||||
jdk.jdi,
|
||||
jdk.jdwp.agent,
|
||||
jdk.jfr,
|
||||
jdk.jsobject,
|
||||
jdk.localedata,
|
||||
jdk.management,
|
||||
jdk.management.agent,
|
||||
jdk.management.jfr,
|
||||
jdk.naming.dns,
|
||||
jdk.naming.rmi,
|
||||
jdk.net,
|
||||
jdk.sctp,
|
||||
jdk.security.auth,
|
||||
jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jdk.jcmd
|
||||
18
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
18
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin//bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# $1 - Boot JDK
|
||||
# $2 - JBR part of API version
|
||||
|
||||
cd "`dirname "$0"`/../../../../.."
|
||||
PWD="`pwd`"
|
||||
CONF="$PWD/build/jbr-api.conf"
|
||||
./configure --with-debug-level=release --with-boot-jdk=$1 || exit $?
|
||||
make jbr-api CONF=release MAKEOVERRIDES= "JBR_API_CONF_FILE=$CONF" JBR_API_JBR_VERSION=$2 || exit $?
|
||||
. $CONF || exit $?
|
||||
echo "##teamcity[buildNumber '$VERSION']"
|
||||
cp "$JAR" ./jbr-api-${VERSION}.jar || exit $?
|
||||
cp "$SOURCES_JAR" ./jbr-api-${VERSION}-sources.jar || exit $?
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}.jar']"
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}-sources.jar']"
|
||||
184
jb/project/tools/common/scripts/common.sh
Normal file
184
jb/project/tools/common/scripts/common.sh
Normal file
@@ -0,0 +1,184 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
function check_bundle_type_maketest() {
|
||||
# check whether last char is 't', if so remove it
|
||||
if [ "${bundle_type: -1}" == "t" ]; then
|
||||
bundle_type="${bundle_type%?}"
|
||||
do_maketest=1
|
||||
else
|
||||
do_maketest=0
|
||||
fi
|
||||
}
|
||||
|
||||
function getVersionProp() {
|
||||
grep "^${1}" make/conf/version-numbers.conf | cut -d'=' -f2
|
||||
}
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i) INC_BUILD=1 ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Required at least two arguments: build_number bundle_type"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_number=$1
|
||||
bundle_type=$2
|
||||
# shellcheck disable=SC2034
|
||||
architecture=${3:-x64} # aarch64 or x64
|
||||
|
||||
check_bundle_type_maketest
|
||||
|
||||
tag_prefix="jdk-"
|
||||
OPENJDK_TAG=$(git log --simplify-by-decoration --decorate=short --pretty=short | grep "$tag_prefix" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | tr -d ',' | sort -t "-" -k 2 -g | tail -n 1)
|
||||
VERSION_FEATURE=$(getVersionProp "DEFAULT_VERSION_FEATURE")
|
||||
VERSION_INTERIM=$(getVersionProp "DEFAULT_VERSION_INTERIM")
|
||||
VERSION_UPDATE=$(getVersionProp "DEFAULT_VERSION_UPDATE")
|
||||
VERSION_PATCH=$(getVersionProp "DEFAULT_VERSION_PATCH")
|
||||
[[ $VERSION_UPDATE = 0 ]] && JBSDK_VERSION="$VERSION_FEATURE" || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}"
|
||||
[[ $VERSION_PATCH = 0 ]] || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}.${VERSION_PATCH}"
|
||||
echo "##teamcity[setParameter name='env.JBSDK_VERSION' value='${JBSDK_VERSION}']"
|
||||
JDK_BUILD_NUMBER=${JDK_BUILD_NUMBER:=$(echo $OPENJDK_TAG | awk -F "-|[+]" '{print $3}')}
|
||||
[ -z $JDK_BUILD_NUMBER ] && JDK_BUILD_NUMBER=1
|
||||
echo "##teamcity[setParameter name='env.JDK_UPDATE_NUMBER' value='${JDK_BUILD_NUMBER}']"
|
||||
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION}+${JDK_BUILD_NUMBER}-${build_number}"
|
||||
[ -z "$bundle_type" ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
|
||||
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=0
|
||||
HEAD_REVISION=0
|
||||
|
||||
STATIC_CONF_ARGS=""
|
||||
common_conf_props_file="jb/project/tools/common/static_conf_args.txt"
|
||||
if [[ -f "$common_conf_props_file" ]]; then
|
||||
STATIC_CONF_ARGS=$(<$common_conf_props_file)
|
||||
fi
|
||||
OS_NAME=$(uname -s)
|
||||
# Enable reproducible builds
|
||||
TZ=UTC
|
||||
export TZ
|
||||
SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)"
|
||||
export SOURCE_DATE_EPOCH
|
||||
|
||||
COPYRIGHT_YEAR=""
|
||||
BUILD_TIME=""
|
||||
TOUCH_TIME=""
|
||||
REPRODUCIBLE_TAR_OPTS=""
|
||||
case "$OS_NAME" in
|
||||
Linux)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
CYGWIN*)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
Darwin)
|
||||
COPYRIGHT_YEAR="$(date -u -r $SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%F)"
|
||||
TOUCH_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%Y%m%d%H%M.%S)"
|
||||
REPRODUCIBLE_TAR_OPTS="--uid 0 --gid 0 --numeric-owner"
|
||||
;;
|
||||
esac
|
||||
|
||||
WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS="--with-native-debug-symbols=zipped"
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--enable-reproducible-build
|
||||
--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
--disable-absolute-paths-in-output
|
||||
--with-build-user=builduser"
|
||||
|
||||
function zip_native_debug_symbols() {
|
||||
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
|
||||
jdk_name=$(echo $1 | cut -d"/" -f5)
|
||||
jbr_diz_name=$2
|
||||
|
||||
[ -d "dizfiles" ] && rm -rf dizfiles
|
||||
mkdir dizfiles
|
||||
|
||||
rsync_target="../../../../dizfiles"
|
||||
[ -z "$jdk_name" ] && rsync_target=$rsync_target"/"$jbr_diz_name
|
||||
(cd $image_bundle_path && find . -name '*.diz' -exec rsync -R {} $rsync_target \;)
|
||||
[ ! -z "$jdk_name" ] && mv dizfiles/$jdk_name dizfiles/$jbr_diz_name
|
||||
|
||||
(cd dizfiles && find $jbr_diz_name -print0 | COPYFILE_DISABLE=1 \
|
||||
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
|
||||
}
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
if [ $do_reset_dcevm -eq 1 ]; then
|
||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
||||
fi
|
||||
exit "$exit_code"
|
||||
}
|
||||
|
||||
function update_jsdk_mods() {
|
||||
__jsdk=$1
|
||||
__jcef_mods=$2
|
||||
__orig_jsdk_mods=$3
|
||||
__updated_jsdk_mods=$4
|
||||
|
||||
# re-create java.desktop.jmod with updated module-info.class
|
||||
tmp=.java.desktop.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.desktop.jmod || exit $?
|
||||
"$__jsdk"/bin/javac \
|
||||
--patch-module java.desktop="$__orig_jsdk_mods"/java.desktop.jmod \
|
||||
--module-path "$__jcef_mods" -d "$tmp"/classes src/java.desktop/share/classes/module-info.java || exit $?
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --class-path "$tmp"/classes --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.desktop.jmod || exit $?
|
||||
mv java.desktop.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
|
||||
# re-create java.base.jmod with updated hashes
|
||||
tmp=.java.base.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
hash_modules=$("$__jsdk"/bin/jmod describe "$__orig_jsdk_mods"/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.base.jmod || exit $?
|
||||
rm "$__updated_jsdk_mods"/java.base.jmod || exit $? # temp exclude from path
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --module-path "$__updated_jsdk_mods" --hash-modules "$hash_modules" \
|
||||
--class-path "$tmp"/classes --cmds "$tmp"/bin --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.base.jmod || exit $?
|
||||
mv java.base.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
function get_mods_list() {
|
||||
__mods=$1
|
||||
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
|
||||
}
|
||||
|
||||
function copy_jmods() {
|
||||
__mods_list=$1
|
||||
__jmods_from=$2
|
||||
__jmods_to=$3
|
||||
|
||||
mkdir -p $__jmods_to
|
||||
|
||||
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
|
||||
}
|
||||
|
||||
function build_jbr_api() {
|
||||
make jbr-api || do_exit $?
|
||||
|
||||
JBR_API_DIR=build/${RELEASE_NAME}/jbr-api
|
||||
JBR_API_JAR=jbr-api-b${build_number}.jar
|
||||
cp "${JBR_API_DIR}/jbr-api.jar" "${JBR_API_JAR}"
|
||||
}
|
||||
1
jb/project/tools/common/static_conf_args.txt
Normal file
1
jb/project/tools/common/static_conf_args.txt
Normal file
@@ -0,0 +1 @@
|
||||
--with-vendor-vm-bug-url=https://youtrack.jetbrains.com/issues/JBR
|
||||
165
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
165
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
@@ -0,0 +1,165 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_aarch64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_aarch64}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-aarch64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-aarch64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-aarch64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
165
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
165
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,165 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
[ "$bundle_type" != "fd" ] && jbrsdk_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
145
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
145
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
function do_configure {
|
||||
linux32 bash configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
$STATIC_CONF_ARGS \
|
||||
--enable-cds=yes \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x86-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
16
jb/project/tools/mac/scripts/entitlements.xml
Normal file
16
jb/project/tools/mac/scripts/entitlements.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
168
jb/project/tools/mac/scripts/mkimages.sh
Executable file
168
jb/project/tools/mac/scripts/mkimages.sh
Executable file
@@ -0,0 +1,168 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 17)}
|
||||
|
||||
function do_configure {
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
ENABLE_CDS="--enable-cds=no"
|
||||
else
|
||||
ENABLE_CDS="--enable-cds=yes"
|
||||
fi
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-macosx-bundle-name-base=${VENDOR_VERSION_STRING} \
|
||||
--with-macosx-bundle-id-base="com.jetbrains.jbr" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
tmp=.bundle.$$.tmp
|
||||
mkdir "$tmp" || do_exit $?
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
JRE_CONTENTS=$tmp/$__root_dir/Contents
|
||||
mkdir -p "$JRE_CONTENTS" || do_exit $?
|
||||
|
||||
echo Running jlink...
|
||||
"$JSDK"/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
||||
mv release $JRE_CONTENTS/Home/release
|
||||
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
||||
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
|
||||
|
||||
[ -n "$bundle_type" ] && (cp -a $JCEF_PATH/Frameworks "$JRE_CONTENTS" || do_exit $?)
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
# Normalize timestamp
|
||||
find "$tmp"/"$__root_dir" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
|
||||
|
||||
(cd "$tmp" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
COPYFILE_DISABLE=1 tar $REPRODUCIBLE_TAR_OPTS --no-recursion --null -T - \
|
||||
-czf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man') || do_exit $?
|
||||
mv "$tmp"/"$JBR".tar.gz "$JBR".tar.gz
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
CONF_ARCHITECTURE=x86_64
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
CONF_ARCHITECTURE=aarch64
|
||||
fi
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
|
||||
JBSDK=macosx-${architecture}-server-release
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
|
||||
JSDK=$IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
121
jb/project/tools/mac/scripts/notarize.sh
Executable file
121
jb/project/tools/mac/scripts/notarize.sh
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
APP_DIRECTORY=$1
|
||||
APPL_USER=$2
|
||||
APPL_PASSWORD=$3
|
||||
APP_NAME=$4
|
||||
BUNDLE_ID=$5
|
||||
FAKE_ROOT="${6:-fake-root}"
|
||||
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$APPL_USER" ]] || [[ -z "$APPL_PASSWORD" ]]; then
|
||||
echo "Usage: $0 AppDirectory Username Password"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
function publish-log() {
|
||||
id=$1
|
||||
file=$2
|
||||
curl -T "$file" "$ARTIFACTORY_URL/$id" || true
|
||||
}
|
||||
|
||||
function altool-upload() {
|
||||
# Since altool uses same file for upload token we have to trick it into using different folders for token file location
|
||||
# Also it copies zip into TMPDIR so we override it too, to simplify cleanup
|
||||
OLD_HOME="$HOME"
|
||||
export HOME="$FAKE_ROOT/home"
|
||||
export TMPDIR="$FAKE_ROOT/tmp"
|
||||
mkdir -p "$HOME"
|
||||
mkdir -p "$TMPDIR"
|
||||
export _JAVA_OPTIONS="-Duser.home=$HOME -Djava.io.tmpdir=$TMPDIR"
|
||||
# Reduce amount of downloads, cache transporter libraries
|
||||
shared_itmstransporter="$OLD_HOME/shared-itmstransporter"
|
||||
if [[ -f "$shared_itmstransporter" ]]; then
|
||||
cp -r "$shared_itmstransporter" "$HOME/.itmstransporter"
|
||||
fi
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
set +e
|
||||
xcrun altool --notarize-app \
|
||||
--username "$APPL_USER" --password "$APPL_PASSWORD" \
|
||||
--primary-bundle-id "$BUNDLE_ID" \
|
||||
--asc-provider JetBrainssro --file "$1" 2>&1 | tee "altool.init.out"
|
||||
unset TMPDIR
|
||||
export HOME="$OLD_HOME"
|
||||
set -e
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
#file="$APP_NAME.zip"
|
||||
|
||||
#log "Zipping $file..."
|
||||
#rm -rf "$file"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
|
||||
|
||||
log "Notarizing $APP_NAME..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
altool-upload "$APP_NAME"
|
||||
|
||||
notarization_info="$(grep -e "RequestUUID" "altool.init.out" | grep -oE '([0-9a-f-]{36})')"
|
||||
|
||||
if [ -z "$notarization_info" ]; then
|
||||
log "Faile to read RequestUUID from altool.init.out"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
PATH="$PATH:/usr/local/bin/"
|
||||
|
||||
log "Notarization request sent, awaiting response"
|
||||
spent=0
|
||||
|
||||
while true; do
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
xcrun altool --username "$APPL_USER" --notarization-info "$notarization_info" --password "$APPL_PASSWORD" >"altool.check.out" 2>&1 || true
|
||||
status="$(grep -oe 'Status: .*' "altool.check.out" | cut -c 9- || true)"
|
||||
log "Current status: $status"
|
||||
if [ "$status" = "invalid" ]; then
|
||||
log "Notarization failed"
|
||||
ec=1
|
||||
elif [ "$status" = "success" ]; then
|
||||
log "Notarization succeeded"
|
||||
ec=0
|
||||
else
|
||||
if [ "$status" != "in progress" ]; then
|
||||
log "Unknown notarization status, waiting more, altool output:"
|
||||
cat "altool.check.out"
|
||||
fi
|
||||
if [[ $spent -gt 60 ]]; then
|
||||
log "Waiting time out (apx 60 minutes)"
|
||||
ec=2
|
||||
break
|
||||
fi
|
||||
sleep 60
|
||||
((spent += 1))
|
||||
continue
|
||||
fi
|
||||
developer_log="developer_log.json"
|
||||
log "Fetching $developer_log"
|
||||
# TODO: Replace cut with trim or something better
|
||||
url="$(grep -oe 'LogFileURL: .*' "altool.check.out" | cut -c 13-)"
|
||||
wget "$url" -O "$developer_log" && cat "$developer_log" || true
|
||||
if [ $ec != 0 ]; then
|
||||
log "Publishing $developer_log"
|
||||
publish-log "$notarization_info" "$developer_log"
|
||||
fi
|
||||
break
|
||||
done
|
||||
cat "altool.check.out"
|
||||
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
exit $ec
|
||||
117
jb/project/tools/mac/scripts/sign.sh
Executable file
117
jb/project/tools/mac/scripts/sign.sh
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
APPLICATION_PATH=$1
|
||||
APP_NAME=$2
|
||||
BUNDLE_ID=$3
|
||||
JB_DEVELOPER_CERT=$4
|
||||
JB_INSTALLER_CERT=$5
|
||||
|
||||
if [[ -z "$APPLICATION_PATH" ]] || [[ -z "$JB_DEVELOPER_CERT" ]]; then
|
||||
echo "Usage: $0 AppDirectory CertificateID"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APPLICATION_PATH" ]]; then
|
||||
echo "AppDirectory '$APPLICATION_PATH' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/lib" "Contents/MacOS" \
|
||||
"Contents/Home/Frameworks" \
|
||||
"Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
# with `-o pipefail` there's no input for 'while' loop
|
||||
find "$APPLICATION_PATH" -name '*.jar' \
|
||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '\.tbd\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
log "Processing libraries in $file"
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
mkdir jarfolder
|
||||
filename="${file##*/}"
|
||||
log "Filename: $filename"
|
||||
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
|
||||
-exec codesign --timestamp \
|
||||
--force \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
done
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
for f in \
|
||||
"Contents/Home/bin"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
#log "Signing executable..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml "$APPLICATION_PATH/Contents/MacOS/idea"
|
||||
|
||||
log "Signing whole app..."
|
||||
codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements entitlements.xml "$APPLICATION_PATH"
|
||||
|
||||
BUILD_NAME=$(echo $APPLICATION_PATH | awk -F"/" '{ print $2 }')
|
||||
|
||||
log "Creating $APP_NAME.pkg..."
|
||||
rm -rf "$APP_NAME.pkg"
|
||||
|
||||
mkdir -p unsigned
|
||||
pkgbuild --identifier $BUNDLE_ID --root $APPLICATION_PATH \
|
||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${APP_NAME}.pkg
|
||||
productsign --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${APP_NAME}.pkg ${APP_NAME}.pkg
|
||||
|
||||
#log "Signing whole app..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml $APP_NAME.pkg
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APPLICATION_PATH" \
|
||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
||||
138
jb/project/tools/mac/scripts/signapp.sh
Executable file
138
jb/project/tools/mac/scripts/signapp.sh
Executable file
@@ -0,0 +1,138 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
|
||||
INPUT_FILE=$1
|
||||
EXPLODED=$2.exploded
|
||||
BACKUP_JMODS=$2.backup
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
CODESIGN_STRING=$5
|
||||
JB_INSTALLER_CERT=$6
|
||||
NOTARIZE=$7
|
||||
BUNDLE_ID=$8
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
log "Deleting $EXPLODED ..."
|
||||
if test -d "$EXPLODED"; then
|
||||
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
|
||||
fi
|
||||
rm -rf "$EXPLODED"
|
||||
mkdir "$EXPLODED"
|
||||
rm -rf "$BACKUP_JMODS"
|
||||
mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
#sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
||||
rm "$INPUT_FILE"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APP_NAME=$(echo ${INPUT_FILE} | awk -F".tar" '{ print $1 }')
|
||||
APPLICATION_PATH=$EXPLODED/$(ls $EXPLODED)
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
-maxdepth 1 -type f -name '*.jnilib' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Linking $file"
|
||||
b="$(basename "$file" .jnilib)"
|
||||
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$APPLICATION_PATH/Contents/" \
|
||||
-maxdepth 1 -type f -name '*.txt' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Moving $file"
|
||||
mv "$file" "$APPLICATION_PATH/Contents/Resources"
|
||||
fi
|
||||
done
|
||||
|
||||
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
|
||||
if [[ $non_plist -gt 0 ]]; then
|
||||
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
|
||||
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
./sign.sh "$APPLICATION_PATH" "$APP_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
if [ $attempt -eq $limit ]; then
|
||||
set -e
|
||||
fi
|
||||
log "Signing failed, wait for 30 sec and try to sign again"
|
||||
sleep 30
|
||||
else
|
||||
log "Signing done"
|
||||
codesign -v "$APPLICATION_PATH" -vvvvv
|
||||
log "Check sign done"
|
||||
spctl -a -v $APPLICATION_PATH
|
||||
((attempt += limit))
|
||||
fi
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
# shellcheck disable=SC1090
|
||||
source "$HOME/.notarize_token"
|
||||
# Since notarization tool uses same file for upload token we have to trick it into using different folders, hence fake root
|
||||
# Also it leaves copy of zip file in TMPDIR, so notarize.sh overrides it and uses FAKE_ROOT as location for temp TMPDIR
|
||||
FAKE_ROOT="$(pwd)/fake-root"
|
||||
mkdir -p "$FAKE_ROOT"
|
||||
echo "Notarization will use fake root: $FAKE_ROOT"
|
||||
./notarize.sh "$APPLICATION_PATH" "$APPLE_USERNAME" "$APPLE_PASSWORD" "$APP_NAME.pkg" "$BUNDLE_ID" "$FAKE_ROOT"
|
||||
rm -rf "$FAKE_ROOT"
|
||||
|
||||
set +e
|
||||
log "Stapling..."
|
||||
xcrun stapler staple "$APPLICATION_PATH"
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $APPLICATION_PATH/Contents/Home
|
||||
fi
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
|
||||
tar -pczvf $INPUT_FILE --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7cb43..c40e689d5de 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index 897647ee368..781d1809493 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7..c40e689 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index 897647e..781d180 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
162
jb/project/tools/test/check_jbr_size.sh
Normal file
162
jb/project/tools/test/check_jbr_size.sh
Normal file
@@ -0,0 +1,162 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TC_PRINT=0
|
||||
# Always print TeamCity service messages if running under TeamCity
|
||||
[[ -n "${TEAMCITY_VERSION:-}" ]] && TC_PRINT=1
|
||||
|
||||
while getopts ":t" o; do
|
||||
case "${o}" in
|
||||
t) TC_PRINT=1 ;;
|
||||
*);;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
NEWFILEPATH="$1"
|
||||
CONFIGID="$2"
|
||||
BUILDID="$3"
|
||||
TOKEN="$4"
|
||||
|
||||
if [ ! -f "$NEWFILEPATH" ]; then
|
||||
echo "File not found: $NEWFILEPATH"
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Get the size of new artifact
|
||||
#
|
||||
|
||||
unameOut="$(uname -s)"
|
||||
case "${unameOut}" in
|
||||
Linux*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
Darwin*)
|
||||
NEWFILESIZE=$(stat -f%z "$NEWFILEPATH")
|
||||
;;
|
||||
CYGWIN*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
MINGW*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
*)
|
||||
echo "Unknown machine: ${unameOut}"
|
||||
exit 1
|
||||
esac
|
||||
FILENAME=$(basename "${NEWFILEPATH}")
|
||||
|
||||
#
|
||||
# Get pattern of artifact name
|
||||
# Base filename pattern: <BUNDLE_TYPE>-<JDK_VERSION>-<OS>-<ARCH>-b<BUILD>.tar.gz: jbr_dcevm-17.0.2-osx-x64-b1234.tar.gz
|
||||
# BUNDLE_TYPE: jbr, jbrsdk, jbr_dcevm, jbrsdk_jcef etc.
|
||||
# OS_ARCH_PATTERN - <os_architecture>: osx-x64, linux-aarch64, linux-musl-x64, windows-x64 etc.
|
||||
|
||||
BUNDLE_TYPE=jbrsdk
|
||||
OS_ARCH_PATTERN=""
|
||||
FILE_EXTENSION=tar.gz
|
||||
|
||||
re='(jbr[a-z_]*).*-[0-9_\.]+-(.+)-b[0-9]+(.+)'
|
||||
if [[ $FILENAME =~ $re ]]; then
|
||||
BUNDLE_TYPE=${BASH_REMATCH[1]}
|
||||
OS_ARCH_PATTERN=${BASH_REMATCH[2]}
|
||||
FILE_EXTENSION=${BASH_REMATCH[3]}
|
||||
else
|
||||
echo "File name $FILENAME does not match regex $re"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function test_started_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testStarted name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_failed_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFailed name='$1' message='$2']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_finished_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFinished name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
test_name="${BUNDLE_TYPE}_${OS_ARCH_PATTERN//\-/_}${FILE_EXTENSION//\./_}"
|
||||
test_started_msg "$test_name"
|
||||
|
||||
echo "BUNDLE_TYPE: $BUNDLE_TYPE"
|
||||
echo "OS_ARCH_PATTERN: $OS_ARCH_PATTERN"
|
||||
echo "FILE_EXTENSION: $FILE_EXTENSION"
|
||||
echo "Size of $FILENAME is $NEWFILESIZE bytes"
|
||||
|
||||
#
|
||||
# Get previous successful build ID
|
||||
# Example:
|
||||
# CONFIGID=IntellijCustomJdk_Jdk17_Master_LinuxX64jcef
|
||||
# BUILDID=12345678
|
||||
#
|
||||
# expected return value
|
||||
# id="123".number="567"
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/?locator=buildType:(id:$CONFIGID),status:success,count:1,finishDate:(build:$BUILDID,condition:before)")
|
||||
re='id=\"([0-9]+)\".+number=\"([0-9\.]+)\"'
|
||||
|
||||
# ID: Previous successful build id
|
||||
ID=0
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
ID=${BASH_REMATCH[1]}
|
||||
echo "Previous build ID: $ID"
|
||||
echo "Previous build number: ${BASH_REMATCH[2]}"
|
||||
else
|
||||
msg="ERROR: cannot find previous build"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Get artifacts from previous successful build
|
||||
#
|
||||
# expected return value
|
||||
# name="jbrsdk_jcef*.tar.gz size="123'
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/$ID?fields=id,number,artifacts(file(name,size))")
|
||||
echo "Artifacts of the previous build:"
|
||||
echo "$CURL_RESPONSE"
|
||||
|
||||
# Find binary size (in response) with reg exp
|
||||
re="name=\"(${BUNDLE_TYPE}[^\"]+${OS_ARCH_PATTERN}[^\"]+${FILE_EXTENSION})\" size=\"([0-9]+)\""
|
||||
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
prevFileName=${BASH_REMATCH[1]}
|
||||
echo "Previous artifact name: $prevFileName"
|
||||
prevFileSize=${BASH_REMATCH[2]}
|
||||
echo "Previous artifact size: $prevFileSize"
|
||||
|
||||
((allowedSize=prevFileSize+prevFileSize/20)) # use 5% threshold
|
||||
echo "Allowed size: $allowedSize"
|
||||
if [[ "$NEWFILESIZE" -gt "$allowedSize" ]]; then
|
||||
msg="ERROR: new size is significantly greater than previous size (need to investigate)"
|
||||
echo "$msg"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
else
|
||||
echo "PASSED"
|
||||
test_finished_msg "$test_name"
|
||||
fi
|
||||
else
|
||||
msg="ERROR: cannot find string with size in xml response:"
|
||||
echo "Regex: $re"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
93
jb/project/tools/test/perfcmp.sh
Executable file
93
jb/project/tools/test/perfcmp.sh
Executable file
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: perfcmp.sh [options] <test_results_cur> <test_results_ref> <results> <test_prefix> <noHeaders>"
|
||||
echo "Options:"
|
||||
echo -e " -h, --help\tdisplay this help"
|
||||
echo -e " -tc\tprint teacmity statistic"
|
||||
echo -e "test_results_cur - the file with metrics values for the current measuring"
|
||||
echo -e "test_results_ref - the file with metrics values for the reference measuring"
|
||||
echo -e "results - results of comaprison"
|
||||
echo -e "test_prefix - specifys measuring type, makes sense for enabled -tc, by default no prefixes"
|
||||
echo -e "noHeaders - by default 1-st line contains headers"
|
||||
echo -e ""
|
||||
echo -e "test_results_* files content should be in csv format with header and tab separator:"
|
||||
echo -e "The 1-st column is the test name"
|
||||
echo -e "The 2-st column is the test value"
|
||||
echo -e ""
|
||||
echo -e "Example:"
|
||||
echo -e "Test Value"
|
||||
echo -e "Testname 51.54"
|
||||
}
|
||||
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | --help) usage
|
||||
exit 1 ;;
|
||||
-tc) tc=1
|
||||
shift
|
||||
break ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$#" < "3" ]]; then
|
||||
echo "Error: Invalid arguments"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curFile=$1
|
||||
refFile=$2
|
||||
resFile=$3
|
||||
testNamePrefix=$4
|
||||
noHeaders=$5
|
||||
echo $curFile
|
||||
echo $refFile
|
||||
echo $resFile
|
||||
|
||||
curValues=`cat "$curFile" | cut -f 2 | tr -d '\t'`
|
||||
if [ -z $noHeaders ]; then
|
||||
curValuesHeader=`echo "$curValues" | head -n +1`_cur
|
||||
header=`cat "$refFile" | head -n +1 | awk -F'\t' -v x=$curValuesHeader '{print " "$1"\t"$2"_ref\t"x"\tratio"}'`
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +2`
|
||||
else
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +1`
|
||||
fi
|
||||
|
||||
testContent=`echo "$testContent" | tr "," "." | awk -F'\t' '{
|
||||
if ($3>$2+$2*0.1) {
|
||||
print "* "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
} else {
|
||||
print " "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
}
|
||||
}'`
|
||||
if [ -z $noHeaders ]; then
|
||||
echo "$header" > $resFile
|
||||
fi
|
||||
echo "$testContent" >> $resFile
|
||||
cat "$resFile" | tr '\t' ';' | column -t -s ';' | tee $resFile
|
||||
|
||||
if [ -z $tc ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
failed=0
|
||||
echo "$testContent" 2>&1 | (
|
||||
while read -r s; do
|
||||
testname=`echo "$s" | cut -f 1 | tr -d "[:space:]" | tr -d "*"`
|
||||
duration=`echo "$s" | cut -f 3`
|
||||
echo "$s" | cut -c1 | grep -c "*" && failed=1
|
||||
echo \#\#teamcity[testStarted name=\'$testNamePrefix$testname\']
|
||||
echo "===>$s"
|
||||
echo \#\#teamcity[buildStatisticValue key=\'$testNamePrefix$testname\' value=\'$duration\']
|
||||
[ $failed -eq 1 ] && echo \#\#teamcity[testFailed name=\'$testNamePrefix$testname\' message=\'$s\']
|
||||
echo \#\#teamcity[testFinished name=\'$testNamePrefix$testname\' duration=\'$duration\']
|
||||
failed=0
|
||||
done
|
||||
)
|
||||
150
jb/project/tools/windows/scripts/mkimages_aarch64.sh
Normal file
150
jb/project/tools/windows/scripts/mkimages_aarch64.sh
Normal file
@@ -0,0 +1,150 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_aarch64
|
||||
|
||||
if [ -z "$BUILD_JDK" ]; then
|
||||
echo "BUILD_JDK environment variable must be specified and point to a JDK built from the current sources" \
|
||||
" and is able to run on the build system. See OpenJDK documentation for --with-build-jdk for more info."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_aarch64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--openjdk-target=aarch64-unknown-cygwin \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-build-jdk=$BUILD_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${BUILD_JDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__arch_name/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-aarch64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
143
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
143
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
133
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
133
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,133 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
build_jbr_api
|
||||
|
||||
do_exit 0
|
||||
56
jb/project/tools/windows/scripts/pack_aarch64.sh
Normal file
56
jb/project/tools/windows/scripts/pack_aarch64.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
56
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
56
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
50
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
50
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && echo "not implemented" && do_exit 1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
93
make/JBRApi.gmk
Normal file
93
make/JBRApi.gmk
Normal file
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# Copyright 2000-2023 JetBrains s.r.o.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code 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
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
JBR_API_ROOT_DIR := $(TOPDIR)/src/jetbrains.api
|
||||
JBR_API_TOOLS_DIR := $(JBR_API_ROOT_DIR)/tools
|
||||
JBR_API_SRC_DIR := $(JBR_API_ROOT_DIR)/src
|
||||
JBR_API_OUTPUT_DIR := $(OUTPUTDIR)/jbr-api
|
||||
JBR_API_GENSRC_DIR := $(JBR_API_OUTPUT_DIR)/gensrc
|
||||
JBR_API_BIN_DIR := $(JBR_API_OUTPUT_DIR)/bin
|
||||
JBR_API_VERSION_PROPERTIES := $(JBR_API_ROOT_DIR)/version.properties
|
||||
JBR_API_VERSION_GENSRC := $(JBR_API_OUTPUT_DIR)/jbr-api.version
|
||||
JBR_API_GENSRC_BATCH := $(JBR_API_VERSION_GENSRC)
|
||||
|
||||
JBR_API_SRC_FILES := $(call FindFiles, $(JBR_API_SRC_DIR))
|
||||
JBR_API_GENSRC_FILES := $(foreach f, $(call FindFiles, $(JBR_API_SRC_DIR)), \
|
||||
$(JBR_API_GENSRC_DIR)/$(call RelativePath, $f, $(JBR_API_SRC_DIR)))
|
||||
|
||||
ifeq ($(JBR_API_JBR_VERSION),)
|
||||
JBR_API_JBR_VERSION := <DEVELOPMENT>
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := false
|
||||
else
|
||||
.PHONY: $(JBR_API_VERSION_PROPERTIES)
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := true
|
||||
endif
|
||||
|
||||
ARCHIVE_BUILD_JBR_API_BIN := $(JBR_API_BIN_DIR)
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JBR_API, \
|
||||
SMALL_JAVA := true, \
|
||||
COMPILER := bootjdk, \
|
||||
SRC := $(JBR_API_GENSRC_DIR), \
|
||||
EXTRA_FILES := $(JBR_API_GENSRC_FILES), \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api.jar, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJarArchive, BUILD_JBR_API_SOURCES_JAR, \
|
||||
DEPENDENCIES := $(JBR_API_GENSRC_FILES), \
|
||||
SRCS := $(JBR_API_GENSRC_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar, \
|
||||
SUFFIXES := .java, \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
))
|
||||
|
||||
# Grouped targets may not be supported, so hack dependencies: sources -> version file -> generated sources
|
||||
$(JBR_API_VERSION_GENSRC): $(JBR_API_SRC_FILES) $(JBR_API_VERSION_PROPERTIES) $(JBR_API_TOOLS_DIR)/Gensrc.java
|
||||
$(ECHO) Generating sources for JBR API
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_TOOLS_DIR)/Gensrc.java" \
|
||||
"$(TOPDIR)/src" "$(JBR_API_OUTPUT_DIR)" "$(JBR_API_JBR_VERSION)"
|
||||
$(JBR_API_GENSRC_FILES): $(JBR_API_VERSION_GENSRC)
|
||||
$(TOUCH) $@
|
||||
|
||||
jbr-api-check-version: $(JBR_API_GENSRC_FILES) $(JBR_API_VERSION_PROPERTIES)
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_TOOLS_DIR)/CheckVersion.java" \
|
||||
"$(JBR_API_ROOT_DIR)" "$(JBR_API_GENSRC_DIR)" "$(JBR_API_FAIL_ON_HASH_MISMATCH)"
|
||||
|
||||
jbr-api: $(BUILD_JBR_API) $(BUILD_JBR_API_SOURCES_JAR) jbr-api-check-version
|
||||
|
||||
.PHONY: jbr-api jbr-api-check-version
|
||||
|
||||
ifneq ($(JBR_API_CONF_FILE),)
|
||||
$(JBR_API_CONF_FILE): $(JBR_API_GENSRC_FILES)
|
||||
$(ECHO) "VERSION=`$(CAT) $(JBR_API_VERSION_GENSRC)`" > $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "JAR=$(JBR_API_OUTPUT_DIR)/jbr-api.jar" >> $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "SOURCES_JAR=$(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar" >> $(JBR_API_CONF_FILE)
|
||||
jbr-api: $(JBR_API_CONF_FILE)
|
||||
.PHONY: $(JBR_API_CONF_FILE)
|
||||
endif
|
||||
@@ -1354,6 +1354,14 @@ create-main-targets-include:
|
||||
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
|
||||
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
|
||||
|
||||
################################################################################
|
||||
# JBR API
|
||||
|
||||
$(eval $(call SetupTarget, jbr-api, \
|
||||
MAKEFILE := JBRApi, \
|
||||
TARGET := jbr-api \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Main-post.gmk))
|
||||
|
||||
@@ -89,8 +89,8 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
WINENV_TEMP_DIR=$($PATHTOOL -u $($CMD /q /c echo %TEMP% 2> /dev/null) | $TR -d '\r\n')
|
||||
AC_MSG_RESULT([$WINENV_TEMP_DIR])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Don't trust the current directory for WSL2, but change to an OK temp dir
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Don't trust the current directory for WSL, but change to an OK temp dir
|
||||
cd "$WINENV_TEMP_DIR"
|
||||
# Bring along confdefs.h or autoconf gets all confused
|
||||
cp "$CONFIGURE_START_DIR/confdefs.h" "$WINENV_TEMP_DIR"
|
||||
@@ -228,7 +228,7 @@ AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
|
||||
# Platform-specific finalization
|
||||
AC_DEFUN([BASIC_WINDOWS_FINALIZE],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Change back from temp dir
|
||||
cd $CONFIGURE_START_DIR
|
||||
fi
|
||||
|
||||
@@ -234,6 +234,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_OVERRIDE_LIBPATH)
|
||||
|
||||
# Should we build the client for the JAWS screen reader?
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if JAWS client support is enabled])
|
||||
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=true
|
||||
AC_ARG_ENABLE(
|
||||
[jaws-client],
|
||||
[AS_HELP_STRING([--disable-jaws-client], [Set to disable to exclude the client for the JAWS screen reader from the build])],
|
||||
[
|
||||
if test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
AC_MSG_WARN([--[enable|disable]-jaws-client[=*] flags are ignored for headless builds])
|
||||
elif test "x$enableval" != xyes; then
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
]
|
||||
)
|
||||
if test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$A11Y_JAWS_ANNOUNCING_ENABLED])
|
||||
else
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
AC_SUBST(A11Y_JAWS_ANNOUNCING_ENABLED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
|
||||
121
make/autoconf/lib-nvdacontrollerclient.m4
Normal file
121
make/autoconf/lib-nvdacontrollerclient.m4
Normal file
@@ -0,0 +1,121 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, JetBrains s.r.o.. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code 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
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup nvdacontrollerclient (The library for communication with
|
||||
# NVDA - a screen reader for Microsoft Windows)
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_NVDACONTROLLERCLIENT], [
|
||||
# To enable NVDA, user specifies neither --with-nvdacontrollerclient or
|
||||
# a pair (--with-nvdacontrollerclient-include, --with-nvdacontrollerclient-lib)
|
||||
AC_ARG_WITH(nvdacontrollerclient, [AS_HELP_STRING([--with-nvdacontrollerclient],
|
||||
[specify prefix directory for the NVDA Controller Client library package
|
||||
(expecting headers and libs under PATH/<target-arch>/)])])
|
||||
AC_ARG_WITH(nvdacontrollerclient-include, [AS_HELP_STRING([--with-nvdacontrollerclient-include],
|
||||
[specify directory for the NVDA Controller Client include files])])
|
||||
AC_ARG_WITH(nvdacontrollerclient-lib, [AS_HELP_STRING([--with-nvdacontrollerclient-lib],
|
||||
[specify directory for the NVDA Controller Client library])])
|
||||
|
||||
NVDACONTROLLERCLIENT_FOUND=no
|
||||
NVDACONTROLLERCLIENT_LIB=
|
||||
NVDACONTROLLERCLIENT_DLL=
|
||||
NVDACONTROLLERCLIENT_CFLAGS=
|
||||
|
||||
if test "x${NEEDS_LIB_NVDACONTROLLERCLIENT}" = "xtrue" ; then
|
||||
if (test "x${with_nvdacontrollerclient_include}" = "x" && test "x${with_nvdacontrollerclient_lib}" != "x") || \
|
||||
(test "x${with_nvdacontrollerclient_include}" != "x" && test "x${with_nvdacontrollerclient_lib}" = "x") ; then
|
||||
AC_MSG_ERROR([Must specify both or neither of --with-nvdacontrollerclient-include and --with-nvdacontrollerclient-lib])
|
||||
elif (test "x${with_nvdacontrollerclient}" != "x" && test "x${with_nvdacontrollerclient_include}" != "x") ; then
|
||||
AC_MSG_ERROR([Must specify either --with-nvdacontrollerclient or a pair (--with-nvdacontrollerclient-include, --with-nvdacontrollerclient-lib)])
|
||||
fi
|
||||
|
||||
if (test "x${with_nvdacontrollerclient}" != "x") || \
|
||||
(test "x${with_nvdacontrollerclient_include}" != "x" && test "x${with_nvdacontrollerclient_lib}" != "x") ; then
|
||||
|
||||
AC_MSG_CHECKING([for nvdacontrollerclient])
|
||||
|
||||
if test "x${OPENJDK_TARGET_OS}" != "xwindows" ; then
|
||||
AC_MSG_ERROR([--with-nvdacontrollerclient[-*] flags are applicable only to Windows builds])
|
||||
fi
|
||||
|
||||
if test "x${OPENJDK_TARGET_CPU_ARCH}" = "xaarch64" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient32"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="arm64"
|
||||
elif test "x${OPENJDK_TARGET_CPU_ARCH}" = "xx86" && test "x${OPENJDK_TARGET_CPU_BITS}" = "x64" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient64"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="x64"
|
||||
elif test "x${OPENJDK_TARGET_CPU_ARCH}" = "xx86" && test "x${OPENJDK_TARGET_CPU_BITS}" = "x32" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient32"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="x86"
|
||||
else
|
||||
AC_MSG_ERROR([The nvdacontrollerclient library exists only for x86_32, x86_64, AArch64 architectures])
|
||||
fi
|
||||
|
||||
if test "x${with_nvdacontrollerclient}" != "x" ; then
|
||||
# NVDACONTROLLERCLIENT_ARCHDIR is used only here
|
||||
NVDACONTROLLERCLIENT_INC_PATH="${with_nvdacontrollerclient}/${NVDACONTROLLERCLIENT_ARCHDIR}"
|
||||
NVDACONTROLLERCLIENT_BIN_PATH="${with_nvdacontrollerclient}/${NVDACONTROLLERCLIENT_ARCHDIR}"
|
||||
else
|
||||
NVDACONTROLLERCLIENT_INC_PATH="${with_nvdacontrollerclient_include}"
|
||||
NVDACONTROLLERCLIENT_BIN_PATH="${with_nvdacontrollerclient_lib}"
|
||||
fi
|
||||
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_DLL="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.dll"
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_LIB="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.lib"
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_EXP="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.exp"
|
||||
|
||||
if ! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_DLL}" || \
|
||||
! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_LIB}" || \
|
||||
! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_EXP}" ; then
|
||||
AC_MSG_ERROR([Could not find ${NVDACONTROLLERCLIENT_BIN_BASENAME}.dll and/or ${NVDACONTROLLERCLIENT_BIN_BASENAME}.lib and/or ${NVDACONTROLLERCLIENT_BIN_BASENAME}.exp inside ${NVDACONTROLLERCLIENT_BIN_PATH}])
|
||||
fi
|
||||
if ! test -s "${NVDACONTROLLERCLIENT_INC_PATH}/nvdaController.h" ; then
|
||||
AC_MSG_ERROR([Could not find the header file nvdaController.h inside ${NVDACONTROLLERCLIENT_INC_PATH}])
|
||||
fi
|
||||
|
||||
NVDACONTROLLERCLIENT_CFLAGS="-I${NVDACONTROLLERCLIENT_INC_PATH}"
|
||||
NVDACONTROLLERCLIENT_DLL="${POTENTIAL_NVDACONTROLLERCLIENT_DLL}"
|
||||
NVDACONTROLLERCLIENT_LIB="${POTENTIAL_NVDACONTROLLERCLIENT_LIB}"
|
||||
NVDACONTROLLERCLIENT_FOUND=yes
|
||||
|
||||
AC_MSG_RESULT([includes at ${NVDACONTROLLERCLIENT_INC_PATH} ; binaries at ${NVDACONTROLLERCLIENT_BIN_PATH}])
|
||||
fi
|
||||
elif test "x${with_nvdacontrollerclient}" != "x" || \
|
||||
test "x${with_nvdacontrollerclient_include}" != "x" || test "x${with_nvdacontrollerclient_lib}" != "x" ; then
|
||||
AC_MSG_WARN([[nvdacontrollerclient is not used, so --with-nvdacontrollerclient[-*] is ignored]])
|
||||
fi
|
||||
|
||||
if test "x${NVDACONTROLLERCLIENT_FOUND}" = "xyes" ; then
|
||||
A11Y_NVDA_ANNOUNCING_ENABLED=true
|
||||
else
|
||||
A11Y_NVDA_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
|
||||
AC_SUBST(A11Y_NVDA_ANNOUNCING_ENABLED)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_CFLAGS)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_DLL)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_LIB)
|
||||
])
|
||||
92
make/autoconf/lib-speechd.m4
Normal file
92
make/autoconf/lib-speechd.m4
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, JetBrains s.r.o.. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code 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
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup speechd
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_SPEECHD],
|
||||
[
|
||||
AC_ARG_WITH(speechd, [AS_HELP_STRING([--with-speechd],
|
||||
[specify prefix directory for the libspeechd package
|
||||
(expecting the headers under PATH/include); required for AccessibleAnnouncer to work])])
|
||||
AC_ARG_WITH(speechd-include, [AS_HELP_STRING([--with-speechd-include],
|
||||
[specify directory for the speechd include files])])
|
||||
|
||||
if test "x$NEEDS_LIB_SPEECHD" = xfalse || test "x${with_speechd}" = xno || \
|
||||
test "x${with_speechd_include}" = xno; then
|
||||
if (test "x${with_speechd}" != x && test "x${with_speechd}" != xno) || \
|
||||
(test "x${with_speechd_include}" != x && test "x${with_speechd_include}" != xno); then
|
||||
AC_MSG_WARN([[speechd not used, so --with-speechd[-*] is ignored]])
|
||||
fi
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=false
|
||||
SPEECHD_CFLAGS=
|
||||
SPEECHD_LIBS=
|
||||
else
|
||||
SPEECHD_FOUND=no
|
||||
|
||||
if test "x${with_speechd}" != x && test "x${with_speechd}" != xyes; then
|
||||
AC_MSG_CHECKING([for speechd header and library])
|
||||
if test -s "${with_speechd}/include/libspeechd.h"; then
|
||||
SPEECHD_CFLAGS="-I${with_speechd}/include"
|
||||
SPEECHD_LIBS="-L${with_speechd}/lib -lspeechd"
|
||||
SPEECHD_FOUND=yes
|
||||
AC_MSG_RESULT([$SPEECHD_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/libspeechd.h' under ${with_speechd} given with the --with-speechd option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_speechd_include}" != x; then
|
||||
AC_MSG_CHECKING([for speechd headers])
|
||||
if test -s "${with_speechd_include}/libspeechd.h"; then
|
||||
SPEECHD_CFLAGS="-I${with_speechd_include}"
|
||||
SPEECHD_FOUND=yes
|
||||
AC_MSG_RESULT([$SPEECHD_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/libspeechd.h' under ${with_speechd} given with the --with-speechd-include option.])
|
||||
fi
|
||||
fi
|
||||
if test "x$SPEECHD_FOUND" = xno; then
|
||||
# Are the libspeechd headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([libspeechd.h],
|
||||
[ SPEECHD_FOUND=yes ],
|
||||
[ SPEECHD_FOUND=no; break ]
|
||||
)
|
||||
if test "x$SPEECHD_FOUND" = xyes; then
|
||||
SPEECHD_CFLAGS=
|
||||
SPEECHD_LIBS="-lspeechd"
|
||||
fi
|
||||
fi
|
||||
if test "x$SPEECHD_FOUND" = xno; then
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=false
|
||||
else
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=true
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(A11Y_SPEECHD_ANNOUNCING_ENABLED)
|
||||
AC_SUBST(SPEECHD_CFLAGS)
|
||||
AC_SUBST(SPEECHD_LIBS)
|
||||
])
|
||||
@@ -33,7 +33,9 @@ m4_include([lib-freetype.m4])
|
||||
m4_include([lib-hsdis.m4])
|
||||
m4_include([lib-std.m4])
|
||||
m4_include([lib-x11.m4])
|
||||
|
||||
m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-speechd.m4])
|
||||
m4_include([lib-nvdacontrollerclient.m4])
|
||||
m4_include([lib-tests.m4])
|
||||
|
||||
################################################################################
|
||||
@@ -45,10 +47,16 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# No X11 support on windows or macosx
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_SPEECHD=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_SPEECHD=false
|
||||
else
|
||||
# All other instances need X11, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
NEEDS_LIB_X11=true
|
||||
NEEDS_LIB_SPEECHD=true
|
||||
fi
|
||||
|
||||
# Check if fontconfig is needed
|
||||
@@ -87,6 +95,13 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
else
|
||||
NEEDS_LIB_FFI=false
|
||||
fi
|
||||
|
||||
# Check if nvdacontrollerclient is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$ENABLE_HEADLESS_ONLY" != xtrue; then
|
||||
NEEDS_LIB_NVDACONTROLLERCLIENT=true
|
||||
else
|
||||
NEEDS_LIB_NVDACONTROLLERCLIENT=false
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -132,7 +147,8 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_LIBFFI
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_X11
|
||||
|
||||
LIB_SETUP_SPEECHD
|
||||
LIB_SETUP_NVDACONTROLLERCLIENT
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
|
||||
@@ -460,6 +460,20 @@ UBSAN_LDFLAGS:=@UBSAN_LDFLAGS@
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
|
||||
# Linux speechd a11y announcer
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED:=@A11Y_SPEECHD_ANNOUNCING_ENABLED@
|
||||
SPEECHD_CFLAGS:=@SPEECHD_CFLAGS@
|
||||
SPEECHD_LIBS:=@SPEECHD_LIBS@
|
||||
|
||||
# Windows NVDA a11y announcer
|
||||
A11Y_NVDA_ANNOUNCING_ENABLED:=@A11Y_NVDA_ANNOUNCING_ENABLED@
|
||||
NVDACONTROLLERCLIENT_CFLAGS:=@NVDACONTROLLERCLIENT_CFLAGS@
|
||||
NVDACONTROLLERCLIENT_DLL:=@NVDACONTROLLERCLIENT_DLL@
|
||||
NVDACONTROLLERCLIENT_LIB:=@NVDACONTROLLERCLIENT_LIB@
|
||||
|
||||
# Windows the client for the JAWS screen reader
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED:=@A11Y_JAWS_ANNOUNCING_ENABLED@
|
||||
|
||||
# The lowest required version of macosx
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
# The highest allowed version of macosx
|
||||
|
||||
@@ -88,7 +88,7 @@ ifneq ($(call check-jvm-feature, jvmti), true)
|
||||
jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
|
||||
jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
|
||||
jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
|
||||
jvmtiClassFileReconstituter.cpp jvmtiTagMapTable.cpp
|
||||
jvmtiClassFileReconstituter.cpp jvmtiTagMapTable.cpp jvmtiEnhancedRedefineClasses.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, jvmci), true)
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<!-- importing.xml -->
|
||||
<project name="jdk">
|
||||
|
||||
<taskdef name="wrapLogger" classname="idea.IdeaLoggerWrapper" classpath="${idea.dir}/classes"/>
|
||||
|
||||
<wrapLogger/>
|
||||
|
||||
<macrodef name="call-make">
|
||||
<attribute name="dir"/>
|
||||
<attribute name="args"/>
|
||||
<sequential>
|
||||
<exec executable="make" dir="@{dir}" failonerror="true">
|
||||
<arg line="@{args}"/>
|
||||
<env key="CLASSPATH" value = ""/>
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="cond-clean" unless="${intellij.ismake}">
|
||||
<antcall target="clean"/>
|
||||
</target>
|
||||
|
||||
<target name="post-make" depends="cond-clean, build-module"/>
|
||||
|
||||
<!--
|
||||
**** Global JDK Build Targets
|
||||
-->
|
||||
|
||||
<target name="clean">
|
||||
<echo message="base = ${basedir}"/>
|
||||
<call-make dir = "${build.target.dir}" args = "reconfigure"/>
|
||||
<call-make dir = "${build.target.dir}" args = "clean"/>
|
||||
</target>
|
||||
|
||||
<target name="images">
|
||||
<call-make dir = "${build.target.dir}" args = "images"/>
|
||||
</target>
|
||||
|
||||
<target name="build-module">
|
||||
<call-make dir = "${build.target.dir}" args = "${module.name}"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -46,13 +46,18 @@ else #with SPEC
|
||||
endif
|
||||
|
||||
idea:
|
||||
$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
|
||||
$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs,$(mod)))\"" >> $(OUT)
|
||||
$(ECHO) "MODULES=\"$(foreach mod, $(SEL_MODULES), \
|
||||
module='$(mod)' \
|
||||
moduleSrcDirs='$(foreach m,$(call FindModuleSrcDirs,$(mod)),$(call RelativePath,$m,$(topdir)))' \
|
||||
moduleDependencies='$(call FindTransitiveDepsForModule,$(mod))' \
|
||||
#)\"" > $(OUT)
|
||||
$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
|
||||
$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
|
||||
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
|
||||
$(ECHO) "CYGPATH=\"$(PATHTOOL)\"" >> $(OUT)
|
||||
$(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT)
|
||||
$(ECHO) "RELATIVE_TOPLEVEL_PROJECT_DIR=\"$(call RelativePath,$(TOPLEVEL_DIR),$(IDEA_OUTPUT_PARENT))\"" >> $(OUT)
|
||||
$(ECHO) "RELATIVE_PROJECT_DIR=\"$(call RelativePath,$(topdir),$(IDEA_OUTPUT_PARENT))\"" >> $(OUT)
|
||||
$(ECHO) "RELATIVE_BUILD_DIR=\"$(call RelativePath,$(OUTPUTDIR),$(IDEA_OUTPUT_PARENT))\"" >> $(OUT)
|
||||
$(ECHO) "CLION_RELATIVE_PROJECT_DIR=\"$(call RelativePath,$(topdir),$(IDEA_OUTPUT_PARENT)/.idea/jdk-clion)\"" >> $(OUT)
|
||||
$(ECHO) "PATHTOOL=\"$(PATHTOOL)\"" >> $(OUT)
|
||||
$(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT)
|
||||
$(ECHO) "WINENV_ROOT=\"$(WINENV_ROOT)\"" >> $(OUT)
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AntConfiguration">
|
||||
<buildFile url="file://###ROOT_DIR###/make/ide/idea/jdk/build.xml">
|
||||
<properties>
|
||||
<property name="intellij.ismake" value="$IsMake$" />
|
||||
<property name="build.target.dir" value="###BUILD_DIR###" />
|
||||
<property name="module.name" value="###MODULE_NAMES###" />
|
||||
<property name="idea.dir" value="###IDEA_DIR###" />
|
||||
</properties>
|
||||
<executeOn event="afterCompilation" target="post-make" />
|
||||
</buildFile>
|
||||
</component>
|
||||
</project>
|
||||
@@ -3,10 +3,10 @@
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<excludeFromCompile>
|
||||
<directory url="file://###ROOT_DIR###/src" includeSubdirectories="true" />
|
||||
<directory url="file://###ROOT_DIR###/build" includeSubdirectories="true" />
|
||||
<directory url="file://###ROOT_DIR###/make" includeSubdirectories="true" />
|
||||
<directory url="file://###ROOT_DIR###/test" includeSubdirectories="true" />
|
||||
<directory url="file://###PROJECT_DIR###/src" includeSubdirectories="true" />
|
||||
<directory url="file://###PROJECT_DIR###/build" includeSubdirectories="true" />
|
||||
<directory url="file://###PROJECT_DIR###/make" includeSubdirectories="true" />
|
||||
<directory url="file://###PROJECT_DIR###/test" includeSubdirectories="false" />
|
||||
</excludeFromCompile>
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
|
||||
9
make/ide/idea/jdk/template/copyright/JetBrains.xml
Normal file
9
make/ide/idea/jdk/template/copyright/JetBrains.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This code 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 version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="JetBrains" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
7
make/ide/idea/jdk/template/copyright/JetBrainsCE.xml
Normal file
7
make/ide/idea/jdk/template/copyright/JetBrainsCE.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="allowReplaceRegexp" value="JetBrains" />
|
||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code. This code 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 version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
||||
<option name="myName" value="JetBrainsCE" />
|
||||
</copyright>
|
||||
</component>
|
||||
@@ -1,3 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
||||
<settings default="JetBrainsCE">
|
||||
<module2copyright>
|
||||
<element module="TestFiles" copyright="JetBrains" />
|
||||
</module2copyright>
|
||||
</settings>
|
||||
</component>
|
||||
9
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/JetBrains.xml
generated
Normal file
9
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/JetBrains.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This code 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 version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="JetBrains" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
7
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/JetBrainsCE.xml
generated
Normal file
7
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/JetBrainsCE.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="allowReplaceRegexp" value="JetBrains" />
|
||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code. This code 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 version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
||||
<option name="myName" value="JetBrainsCE" />
|
||||
</copyright>
|
||||
</component>
|
||||
7
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/profiles_settings.xml
generated
Normal file
7
make/ide/idea/jdk/template/jdk-clion/.idea/copyright/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="JetBrainsCE">
|
||||
<module2copyright>
|
||||
<element module="TestFiles" copyright="JetBrains" />
|
||||
</module2copyright>
|
||||
</settings>
|
||||
</component>
|
||||
25
make/ide/idea/jdk/template/jdk-clion/.idea/misc.xml
generated
Normal file
25
make/ide/idea/jdk/template/jdk-clion/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CidrRootsConfiguration">
|
||||
<excludeRoots>
|
||||
<file path="###CLION_PROJECT_DIR###/build" />
|
||||
<file path="###CLION_PROJECT_DIR###/make" />
|
||||
</excludeRoots>
|
||||
</component>
|
||||
<component name="CompDBSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<CompDBProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</CompDBProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="CompDBWorkspace" PROJECT_DIR="$PROJECT_DIR$">
|
||||
<contentRoot DIR="###CLION_PROJECT_DIR###" />
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
</project>
|
||||
3
make/ide/idea/jdk/template/jdk-clion/.idea/scopes/TestFiles.xml
generated
Normal file
3
make/ide/idea/jdk/template/jdk-clion/.idea/scopes/TestFiles.xml
generated
Normal file
@@ -0,0 +1,3 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<scope name="TestFiles" pattern="file[test]:*/" />
|
||||
</component>
|
||||
5
make/ide/idea/jdk/template/jdk-clion/.idea/scopes/scope_settings.xml
generated
Normal file
5
make/ide/idea/jdk/template/jdk-clion/.idea/scopes/scope_settings.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
||||
16
make/ide/idea/jdk/template/jdk-clion/.idea/vcs.xml
generated
Normal file
16
make/ide/idea/jdk/template/jdk-clion/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="###CLION_PROJECT_DIR###" vcs="###VCS_TYPE###" />
|
||||
</component>
|
||||
</project>
|
||||
55
make/ide/idea/jdk/template/jdk-clion/.idea/workspace.xml
generated
Normal file
55
make/ide/idea/jdk/template/jdk-clion/.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ClangdSettings">
|
||||
<option name="formatViaClangd" value="false" />
|
||||
</component>
|
||||
<component name="CompDBLocalSettings">
|
||||
<option name="availableProjects">
|
||||
<map>
|
||||
<entry>
|
||||
<key>
|
||||
<ExternalProjectPojo>
|
||||
<option name="name" value="jdk-clion" />
|
||||
<option name="path" value="$PROJECT_DIR$" />
|
||||
</ExternalProjectPojo>
|
||||
</key>
|
||||
<value>
|
||||
<list>
|
||||
<ExternalProjectPojo>
|
||||
<option name="name" value="jdk-clion" />
|
||||
<option name="path" value="$PROJECT_DIR$" />
|
||||
</ExternalProjectPojo>
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="projectSyncType">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="RE_IMPORT" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ExternalProjectsData">
|
||||
<projectState path="$PROJECT_DIR$">
|
||||
<ProjectState />
|
||||
</projectState>
|
||||
</component>
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="RunOnceActivity.cidr.known.project.marker" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="cf.first.check.clang-format" value="false" />
|
||||
<property name="cidr.known.project.marker" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="settings.editor.selected.configurable" value="CPPToolchains" />
|
||||
</component>
|
||||
</project>
|
||||
29
make/ide/idea/jdk/template/jdk-clion/update-project.sh
Normal file
29
make/ide/idea/jdk/template/jdk-clion/update-project.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
TOPDIR="###CLION_SCRIPT_TOPDIR###"
|
||||
BUILD_DIR="###RELATIVE_BUILD_DIR###"
|
||||
PATHTOOL="###PATHTOOL###"
|
||||
|
||||
|
||||
|
||||
cd "`dirname $0`"
|
||||
SCRIPT_DIR="`pwd`"
|
||||
cd "$TOPDIR"
|
||||
|
||||
echo "Updating Clion project files in \"$SCRIPT_DIR\" for project \"`pwd`\""
|
||||
|
||||
set -o pipefail
|
||||
make compile-commands SPEC="$BUILD_DIR/spec.gmk" | sed 's/^/ /' || exit 1
|
||||
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
CLION_PROJECT_DIR="`$PATHTOOL -am $SCRIPT_DIR`"
|
||||
sed "s/\\\\\\\\\\\\\\\\/\\\\\\\\/g" "$BUILD_DIR/compile_commands.json" > "$SCRIPT_DIR/compile_commands.json"
|
||||
else
|
||||
CLION_PROJECT_DIR="$SCRIPT_DIR"
|
||||
cp "$BUILD_DIR/compile_commands.json" "$SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
echo "
|
||||
Now you can open \"$CLION_PROJECT_DIR\" as Clion project
|
||||
If Clion complains about missing files when loading a project, building it may help:
|
||||
cd \"`pwd`\" && make SPEC=\"$BUILD_DIR/spec.gmk\""
|
||||
@@ -2,10 +2,9 @@
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://###ROOT_DIR###">
|
||||
###SOURCE_ROOTS###
|
||||
<excludeFolder url="file://###ROOT_DIR###/build" />
|
||||
<excludeFolder url="file://###ROOT_DIR###/make" />
|
||||
<content url="file://###TOPLEVEL_MODULE_DIR###">
|
||||
<excludeFolder url="file://###MODULE_DIR###/build" />
|
||||
<excludeFolder url="file://###MODULE_DIR###/make" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
||||
@@ -6,11 +6,8 @@
|
||||
<component name="JTRegService">
|
||||
<path>###JTREG_HOME###</path>
|
||||
<workDir>###BUILD_DIR###</workDir>
|
||||
<jre alt="true" value="###IMAGES_DIR###" />
|
||||
<jre alt="true" value="###BUILD_DIR###/images/jdk" />
|
||||
<options></options>
|
||||
<ant>
|
||||
<target file="file://###ROOT_DIR###/make/ide/idea/jdk/build.xml" name="images" />
|
||||
</ant>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" assert-keyword="true" project-jdk-type="JavaSDK">
|
||||
<output url="file://###BUILD_DIR###/idea" />
|
||||
|
||||
11
make/ide/idea/jdk/template/module.iml
Normal file
11
make/ide/idea/jdk/template/module.iml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
###MODULE_CONTENT_ROOTS###
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
###DEPENDENCIES###
|
||||
<orderEntry type="inheritedJdk" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdk.iml" filepath="$PROJECT_DIR$/.idea/jdk.iml" />
|
||||
###MODULE_IMLS###
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
3
make/ide/idea/jdk/template/scopes/TestFiles.xml
Normal file
3
make/ide/idea/jdk/template/scopes/TestFiles.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<scope name="TestFiles" pattern="file[test]:*/" />
|
||||
</component>
|
||||
@@ -1,13 +0,0 @@
|
||||
package idea;
|
||||
|
||||
import org.apache.tools.ant.Task;
|
||||
|
||||
/**
|
||||
* This class implements a custom Ant task which replaces the standard Intellij IDEA Ant logger
|
||||
* with a custom one which generates tighter output.
|
||||
*/
|
||||
public class IdeaLoggerWrapper extends Task {
|
||||
public void execute() {
|
||||
new JdkIdeaAntLogger(getProject());
|
||||
}
|
||||
}
|
||||
@@ -1,375 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code 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
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package idea;
|
||||
|
||||
import org.apache.tools.ant.BuildEvent;
|
||||
import org.apache.tools.ant.BuildListener;
|
||||
import org.apache.tools.ant.DefaultLogger;
|
||||
import org.apache.tools.ant.Project;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Stack;
|
||||
|
||||
import static org.apache.tools.ant.Project.*;
|
||||
|
||||
/**
|
||||
* This class is used to wrap the IntelliJ ant logger in order to provide more meaningful
|
||||
* output when building langtools. The basic ant output in IntelliJ can be quite cumbersome to
|
||||
* work with, as it provides two separate views: (i) a tree view, which is good to display build task
|
||||
* in a hierarchical fashion as they are processed; and a (ii) plain text view, which gives you
|
||||
* the full ant output. The main problem is that javac-related messages are buried into the
|
||||
* ant output (which is made very verbose by IntelliJ in order to support the tree view). It is
|
||||
* not easy to figure out which node to expand in order to see the error message; switching
|
||||
* to plain text doesn't help either, as now the output is totally flat.
|
||||
*
|
||||
* This logger class removes a lot of verbosity from the IntelliJ ant logger by not propagating
|
||||
* all the events to the IntelliJ's logger. In addition, certain events are handled in a custom
|
||||
* fashion, to generate better output during the build.
|
||||
*/
|
||||
public final class JdkIdeaAntLogger extends DefaultLogger {
|
||||
|
||||
/**
|
||||
* This is just a way to pass in customized binary string predicates;
|
||||
*
|
||||
* TODO: replace with @code{BiPredicate<String, String>} and method reference when moving to 8
|
||||
*/
|
||||
enum StringBinaryPredicate {
|
||||
CONTAINS() {
|
||||
@Override
|
||||
boolean apply(String s1, String s2) {
|
||||
return s1.contains(s2);
|
||||
}
|
||||
},
|
||||
STARTS_WITH {
|
||||
@Override
|
||||
boolean apply(String s1, String s2) {
|
||||
return s1.startsWith(s2);
|
||||
}
|
||||
},
|
||||
MATCHES {
|
||||
@Override
|
||||
boolean apply(String s1, String s2) {
|
||||
return s1.matches(s2);
|
||||
}
|
||||
};
|
||||
|
||||
abstract boolean apply(String s1, String s2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Various kinds of ant messages that we shall intercept
|
||||
*/
|
||||
enum MessageKind {
|
||||
|
||||
/** a make error */
|
||||
MAKE_ERROR(StringBinaryPredicate.CONTAINS, MSG_ERR, "error:", "compiler.err"),
|
||||
/** a make warning */
|
||||
MAKE_WARNING(StringBinaryPredicate.CONTAINS, MSG_WARN, "warning:", "compiler.warn"),
|
||||
/** a make note */
|
||||
MAKE_NOTE(StringBinaryPredicate.CONTAINS, MSG_INFO, "note:", "compiler.note"),
|
||||
/** std make output */
|
||||
MAKE_OTHER(StringBinaryPredicate.MATCHES, MSG_INFO, ".*"),
|
||||
/** a javac crash */
|
||||
JAVAC_CRASH(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "An exception has occurred in the compiler"),
|
||||
/** jtreg test success */
|
||||
JTREG_TEST_PASSED(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Passed: "),
|
||||
/** jtreg test failure */
|
||||
JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
|
||||
/** jtreg test error */
|
||||
JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: "),
|
||||
/** jtreg report */
|
||||
JTREG_TEST_REPORT(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Report written");
|
||||
|
||||
StringBinaryPredicate sbp;
|
||||
int priority;
|
||||
String[] keys;
|
||||
|
||||
MessageKind(StringBinaryPredicate sbp, int priority, String... keys) {
|
||||
this.sbp = sbp;
|
||||
this.priority = priority;
|
||||
this.keys = keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does a given message string matches this kind?
|
||||
*/
|
||||
boolean matches(String s) {
|
||||
for (String key : keys) {
|
||||
if (sbp.apply(s, key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum is used to represent the list of tasks we need to keep track of during logging.
|
||||
*/
|
||||
enum Task {
|
||||
/** javac task - invoked during compilation */
|
||||
MAKE("exec", MessageKind.MAKE_ERROR, MessageKind.MAKE_WARNING, MessageKind.MAKE_NOTE,
|
||||
MessageKind.MAKE_OTHER, MessageKind.JAVAC_CRASH),
|
||||
/** jtreg task - invoked during test execution */
|
||||
JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR, MessageKind.JTREG_TEST_REPORT),
|
||||
/** initial synthetic task when the logger is created */
|
||||
ROOT("") {
|
||||
@Override
|
||||
boolean matches(String s) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
/** synthetic task catching any other tasks not in this list */
|
||||
ANY("") {
|
||||
@Override
|
||||
boolean matches(String s) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
String taskName;
|
||||
MessageKind[] msgs;
|
||||
|
||||
Task(String taskName, MessageKind... msgs) {
|
||||
this.taskName = taskName;
|
||||
this.msgs = msgs;
|
||||
}
|
||||
|
||||
boolean matches(String s) {
|
||||
return s.equals(taskName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum is used to represent the list of targets we need to keep track of during logging.
|
||||
* A regular expression is used to match a given target name.
|
||||
*/
|
||||
enum Target {
|
||||
/** jtreg target - executed when launching tests */
|
||||
JTREG("jtreg") {
|
||||
@Override
|
||||
String getDisplayMessage(BuildEvent e) {
|
||||
return "Running jtreg tests: " + e.getProject().getProperty("jtreg.tests");
|
||||
}
|
||||
},
|
||||
/** build selected modules */
|
||||
BUILD_MODULE("build-module") {
|
||||
@Override
|
||||
String getDisplayMessage(BuildEvent e) {
|
||||
return "Building modules: " + e.getProject().getProperty("module.name") + "...";
|
||||
}
|
||||
},
|
||||
/** build images */
|
||||
BUILD_IMAGES("images") {
|
||||
@Override
|
||||
String getDisplayMessage(BuildEvent e) {
|
||||
return "Building images...";
|
||||
}
|
||||
},
|
||||
/** build images */
|
||||
CONFIGURE("-do-configure") {
|
||||
@Override
|
||||
String getDisplayMessage(BuildEvent e) {
|
||||
return "Configuring build...";
|
||||
}
|
||||
},
|
||||
/** synthetic target catching any other target not in this list */
|
||||
ANY("") {
|
||||
@Override
|
||||
String getDisplayMessage(BuildEvent e) {
|
||||
return "Executing Ant target(s): " + e.getProject().getProperty("ant.project.invoked-targets");
|
||||
}
|
||||
@Override
|
||||
boolean matches(String msg) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
String targetRegex;
|
||||
|
||||
Target(String targetRegex) {
|
||||
this.targetRegex = targetRegex;
|
||||
}
|
||||
|
||||
boolean matches(String msg) {
|
||||
return msg.matches(targetRegex);
|
||||
}
|
||||
|
||||
abstract String getDisplayMessage(BuildEvent e);
|
||||
}
|
||||
|
||||
/**
|
||||
* A custom build event used to represent status changes which should be notified inside
|
||||
* Intellij
|
||||
*/
|
||||
static class StatusEvent extends BuildEvent {
|
||||
|
||||
/** the target to which the status update refers */
|
||||
Target target;
|
||||
|
||||
StatusEvent(BuildEvent e, Target target) {
|
||||
super(new StatusTask(e, target.getDisplayMessage(e)));
|
||||
this.target = target;
|
||||
setMessage(getTask().getTaskName(), 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* A custom task used to channel info regarding a status change
|
||||
*/
|
||||
static class StatusTask extends org.apache.tools.ant.Task {
|
||||
StatusTask(BuildEvent event, String msg) {
|
||||
setProject(event.getProject());
|
||||
setOwningTarget(event.getTarget());
|
||||
setTaskName(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** wrapped ant logger (IntelliJ's own logger) */
|
||||
DefaultLogger logger;
|
||||
|
||||
/** flag - is this the first target we encounter? */
|
||||
boolean firstTarget = true;
|
||||
|
||||
/** flag - should subsequent failures be suppressed ? */
|
||||
boolean suppressTaskFailures = false;
|
||||
|
||||
/** flag - have we ran into a javac crash ? */
|
||||
boolean crashFound = false;
|
||||
|
||||
/** stack of status changes associated with pending targets */
|
||||
Stack<StatusEvent> statusEvents = new Stack<>();
|
||||
|
||||
/** stack of pending tasks */
|
||||
Stack<Task> tasks = new Stack<>();
|
||||
|
||||
public JdkIdeaAntLogger(Project project) {
|
||||
for (Object o : project.getBuildListeners()) {
|
||||
if (o instanceof DefaultLogger) {
|
||||
this.logger = (DefaultLogger)o;
|
||||
project.removeBuildListener((BuildListener)o);
|
||||
project.addBuildListener(this);
|
||||
}
|
||||
}
|
||||
tasks.push(Task.ROOT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildStarted(BuildEvent event) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildFinished(BuildEvent event) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void targetStarted(BuildEvent event) {
|
||||
EnumSet<Target> statusKinds = firstTarget ?
|
||||
EnumSet.allOf(Target.class) :
|
||||
EnumSet.complementOf(EnumSet.of(Target.ANY));
|
||||
|
||||
String targetName = event.getTarget().getName();
|
||||
|
||||
for (Target statusKind : statusKinds) {
|
||||
if (statusKind.matches(targetName)) {
|
||||
StatusEvent statusEvent = new StatusEvent(event, statusKind);
|
||||
statusEvents.push(statusEvent);
|
||||
logger.taskStarted(statusEvent);
|
||||
firstTarget = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void targetFinished(BuildEvent event) {
|
||||
if (!statusEvents.isEmpty()) {
|
||||
StatusEvent lastEvent = statusEvents.pop();
|
||||
if (lastEvent.target.matches(event.getTarget().getName())) {
|
||||
logger.taskFinished(lastEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void taskStarted(BuildEvent event) {
|
||||
String taskName = event.getTask().getTaskName();
|
||||
System.err.println("task started " + taskName);
|
||||
for (Task task : Task.values()) {
|
||||
if (task.matches(taskName)) {
|
||||
tasks.push(task);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void taskFinished(BuildEvent event) {
|
||||
if (tasks.peek() == Task.ROOT) {
|
||||
//we need to 'close' the root task to get nicer output
|
||||
logger.taskFinished(event);
|
||||
} else if (!suppressTaskFailures && event.getException() != null) {
|
||||
//the first (innermost) task failure should always be logged
|
||||
event.setMessage(event.getException().toString(), 0);
|
||||
event.setException(null);
|
||||
//note: we turn this into a plain message to avoid stack trace being logged by Idea
|
||||
logger.messageLogged(event);
|
||||
suppressTaskFailures = true;
|
||||
}
|
||||
tasks.pop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageLogged(BuildEvent event) {
|
||||
String msg = event.getMessage();
|
||||
|
||||
boolean processed = false;
|
||||
|
||||
if (!tasks.isEmpty()) {
|
||||
Task task = tasks.peek();
|
||||
for (MessageKind messageKind : task.msgs) {
|
||||
if (messageKind.matches(msg)) {
|
||||
event.setMessage(msg, messageKind.priority);
|
||||
processed = true;
|
||||
if (messageKind == MessageKind.JAVAC_CRASH) {
|
||||
crashFound = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getPriority() == MSG_ERR || crashFound) {
|
||||
//we log errors regardless of owning task
|
||||
logger.messageLogged(event);
|
||||
suppressTaskFailures = true;
|
||||
} else if (processed) {
|
||||
logger.messageLogged(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
10
make/ide/idea/jdk/template/test.iml
Normal file
10
make/ide/idea/jdk/template/test.iml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://###MODULE_DIR###/test/jdk"></content>
|
||||
<orderEntry type="sourceFolder" forTests="true" />
|
||||
###TEST_MODULE_DEPENDENCIES###
|
||||
<orderEntry type="inheritedJdk" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -4,13 +4,13 @@
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="\d{7}" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.org/browse/JDK-$0" />
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="###ROOT_DIR###" vcs="###VCS_TYPE###" />
|
||||
<mapping directory="###TOPLEVEL_PROJECT_DIR###" vcs="###VCS_TYPE###" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -2,63 +2,62 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<ignored path="jdk.iws" />
|
||||
<ignored path="###ROOT_DIR###/build/idea/out/" />
|
||||
<ignored path="###PROJECT_DIR###/build/idea/out/" />
|
||||
<ignored path=".idea/" />
|
||||
</component>
|
||||
<component name="StructureViewFactory">
|
||||
<option name="ACTIVE_ACTIONS" value=",ALPHA_COMPARATOR" />
|
||||
</component>
|
||||
<component name="antWorkspaceConfiguration">
|
||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
<buildFile url="file://###ROOT_DIR###/make/ide/idea/jdk/build.xml">
|
||||
<runInBackground value="false" />
|
||||
<targetFilters>
|
||||
<filter targetName="clean" isVisible="true" />
|
||||
<filter targetName="images" isVisible="true" />
|
||||
</targetFilters>
|
||||
<treeView value="false" />
|
||||
<expanded value="true" />
|
||||
</buildFile>
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents />
|
||||
<hideEmptyPackages />
|
||||
<abbreviatePackageNames />
|
||||
<autoscrollToSource />
|
||||
<autoscrollFromSource />
|
||||
<sortByType />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="jdk" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="jdk" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="jdk" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
<component name="RunManager" selected="Shell Script.images">
|
||||
<configuration name="clean" type="ShConfigurationType" folderName="make">
|
||||
<option name="SCRIPT_TEXT" value="###BASH_RUNNER_PREFIX### make clean" />
|
||||
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
|
||||
<option name="SCRIPT_PATH" value="" />
|
||||
<option name="SCRIPT_OPTIONS" value="" />
|
||||
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
|
||||
<option name="SCRIPT_WORKING_DIRECTORY" value="###PROJECT_DIR###" />
|
||||
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
|
||||
<option name="INTERPRETER_PATH" value="" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="EXECUTE_IN_TERMINAL" value="true" />
|
||||
<option name="EXECUTE_SCRIPT_FILE" value="false" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="images" type="ShConfigurationType" folderName="make">
|
||||
<option name="SCRIPT_TEXT" value="###BASH_RUNNER_PREFIX### make images" />
|
||||
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
|
||||
<option name="SCRIPT_PATH" value="" />
|
||||
<option name="SCRIPT_OPTIONS" value="" />
|
||||
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
|
||||
<option name="SCRIPT_WORKING_DIRECTORY" value="###PROJECT_DIR###" />
|
||||
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
|
||||
<option name="INTERPRETER_PATH" value="" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="EXECUTE_IN_TERMINAL" value="true" />
|
||||
<option name="EXECUTE_SCRIPT_FILE" value="false" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="reconfigure" type="ShConfigurationType" folderName="make">
|
||||
<option name="SCRIPT_TEXT" value="###BASH_RUNNER_PREFIX### make reconfigure" />
|
||||
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
|
||||
<option name="SCRIPT_PATH" value="" />
|
||||
<option name="SCRIPT_OPTIONS" value="" />
|
||||
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
|
||||
<option name="SCRIPT_WORKING_DIRECTORY" value="###PROJECT_DIR###" />
|
||||
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
|
||||
<option name="INTERPRETER_PATH" value="" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="EXECUTE_IN_TERMINAL" value="true" />
|
||||
<option name="EXECUTE_SCRIPT_FILE" value="false" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Shell Script.images" />
|
||||
<item itemvalue="Shell Script.clean" />
|
||||
<item itemvalue="Shell Script.reconfigure" />
|
||||
</list>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -1142,6 +1142,8 @@ public class WrapperGenerator {
|
||||
pw.println("/* This file is an automatically generated file, please do not edit this file, modify the XlibParser.java file instead !*/\n" );
|
||||
pw.println("#include <X11/Xlib.h>\n#include <X11/Xutil.h>\n#include <X11/Xos.h>\n#include <X11/Xatom.h>\n#include <stdio.h>\n");
|
||||
pw.println("#include <X11/extensions/Xdbe.h>");
|
||||
pw.println("#include <X11/extensions/XI2.h>");
|
||||
pw.println("#include <X11/extensions/XInput2.h>");
|
||||
pw.println("#include <X11/XKBlib.h>");
|
||||
pw.println("#include \"awt_p.h\"");
|
||||
pw.println("#include \"color.h\"");
|
||||
|
||||
@@ -82,3 +82,13 @@ $(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
|
||||
TARGETS += $(COPY_LEGAL)
|
||||
|
||||
################################################################################
|
||||
|
||||
FONTFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share
|
||||
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.otf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
|
||||
FONTFILE_TARGET_FILES := $(subst $(FONTFILE_SRC_DIR),$(LIB_DST_DIR),$(FONTFILE_SRCS))
|
||||
|
||||
$(LIB_DST_DIR)/fonts/%: $(FONTFILE_SRC_DIR)/fonts/%
|
||||
$(call install-file)
|
||||
|
||||
|
||||
TARGETS += $(FONTFILE_TARGET_FILES)
|
||||
|
||||
@@ -74,6 +74,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
||||
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
|
||||
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
|
||||
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/launcher \
|
||||
#
|
||||
endif
|
||||
|
||||
@@ -130,6 +131,36 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
LIBAWT_CFLAGS += -fgcse-after-reload
|
||||
endif
|
||||
|
||||
# Setup NVDA a11y announcer
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
A11Y_NVDA_ANNOUNCING_CFLAGS := -DNO_A11Y_NVDA_ANNOUNCING
|
||||
A11Y_NVDA_ANNOUNCING_LIBS :=
|
||||
A11Y_NVDA_ANNOUNCING_DEPENDENCIES :=
|
||||
|
||||
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
ifeq ($(A11Y_NVDA_ANNOUNCING_ENABLED), true)
|
||||
A11Y_NVDA_ANNOUNCING_CFLAGS := $(NVDACONTROLLERCLIENT_CFLAGS)
|
||||
A11Y_NVDA_ANNOUNCING_LIBS := $(NVDACONTROLLERCLIENT_LIB)
|
||||
A11Y_NVDA_ANNOUNCING_DEPENDENCIES := $(NVDACONTROLLERCLIENT_DLL)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBAWT_CFLAGS += $(A11Y_NVDA_ANNOUNCING_CFLAGS)
|
||||
endif
|
||||
|
||||
# Setup the client for the JAWS screen reader
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
A11Y_JAWS_ANNOUNCING_CFLAGS := -DNO_A11Y_JAWS_ANNOUNCING
|
||||
|
||||
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
ifeq ($(A11Y_JAWS_ANNOUNCING_ENABLED), true)
|
||||
A11Y_JAWS_ANNOUNCING_CFLAGS :=
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBAWT_CFLAGS += $(A11Y_JAWS_ANNOUNCING_CFLAGS)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
||||
NAME := awt, \
|
||||
EXTRA_SRC := $(LIBAWT_EXTRA_SRC), \
|
||||
@@ -158,7 +189,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
||||
DISABLED_WARNINGS_microsoft_OGLContext.c := 4267, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
|
||||
LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll -delayload:gdiplus.dll \
|
||||
-delayload:shell32.dll -delayload:winmm.dll \
|
||||
-delayload:winspool.drv -delayload:imm32.dll \
|
||||
-delayload:ole32.dll -delayload:comdlg32.dll \
|
||||
@@ -173,10 +204,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
||||
-framework JavaRuntimeSupport \
|
||||
-framework ApplicationServices \
|
||||
-framework AudioToolbox, \
|
||||
LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
LIBS_windows := kernel32.lib user32.lib gdi32.lib gdiplus.lib winspool.lib \
|
||||
imm32.lib ole32.lib uuid.lib shell32.lib \
|
||||
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
|
||||
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
|
||||
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib dwmapi.lib $(A11Y_NVDA_ANNOUNCING_LIBS), \
|
||||
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
|
||||
EXTRA_RCFLAGS := $(LIBAWT_RCFLAGS), \
|
||||
))
|
||||
@@ -187,6 +218,18 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows)+$(ENABLE_HEADLESS_ONLY)+$(A11Y_NVDA_ANNOUNCING_ENABLED), true+false+true)
|
||||
$(eval $(call SetupCopyFiles, COPY_NVDA_DEPENDENCIES, \
|
||||
FILES := $(A11Y_NVDA_ANNOUNCING_DEPENDENCIES), \
|
||||
DEST := $(BUILD_LIBAWT_OUTPUT_DIR), \
|
||||
))
|
||||
|
||||
$(COPY_NVDA_DEPENDENCIES): $(A11Y_NVDA_ANNOUNCING_DEPENDENCIES)
|
||||
$(BUILD_LIBAWT): $(COPY_NVDA_DEPENDENCIES)
|
||||
|
||||
TARGETS += $(COPY_NVDA_DEPENDENCIES)
|
||||
endif
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT)
|
||||
|
||||
################################################################################
|
||||
@@ -200,6 +243,18 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
#
|
||||
|
||||
ifeq ($(A11Y_SPEECHD_ANNOUNCING_ENABLED), true)
|
||||
A11Y_SPEECHD_ANNOUNCING_CFLAGS :=
|
||||
else
|
||||
A11Y_SPEECHD_ANNOUNCING_CFLAGS := -DNO_A11Y_SPEECHD_ANNOUNCING
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
LIBAWT_XAWT_EXTRA_SRC += \
|
||||
$(TOPDIR)/src/$(MODULE)/linux/native/libawt_xawt \
|
||||
#
|
||||
endif
|
||||
|
||||
LIBAWT_XAWT_EXCLUDES := medialib debug
|
||||
|
||||
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
|
||||
@@ -215,7 +270,10 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
|
||||
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
|
||||
$(FONTCONFIG_CFLAGS) \
|
||||
$(CUPS_CFLAGS)
|
||||
$(CUPS_CFLAGS) \
|
||||
$(SPEECHD_CFLAGS) \
|
||||
$(A11Y_SPEECHD_ANNOUNCING_CFLAGS) \
|
||||
#
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
ifeq ($(DISABLE_XRENDER), true)
|
||||
@@ -223,7 +281,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
|
||||
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(SPEECHD_LIBS) $(LIBDL) -lXtst -lXi -ljava -ljvm
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
LIBAWT_XAWT_LIBS += -lpthread
|
||||
@@ -251,6 +309,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
|
||||
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
|
||||
DISABLED_WARNINGS_gcc_keycode_cache.c := unused-function, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -302,6 +361,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
|
||||
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
|
||||
DISABLED_WARNINGS_gcc := format-nonliteral type-limits stringop-truncation, \
|
||||
DISABLED_WARNINGS_clang := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_cmstypes.c := unused-but-set-parameter, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -504,10 +564,12 @@ else ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c \
|
||||
fontpath.c \
|
||||
lcdglyph.c
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
else
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
lcdglyph.c
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
endif
|
||||
|
||||
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
||||
@@ -836,6 +898,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_PrinterView.m := enum-conversion, \
|
||||
DISABLED_WARNINGS_clang_SystemHotkey.m := format-nonliteral, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -845,6 +908,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
-framework AudioToolbox \
|
||||
-framework Carbon \
|
||||
-framework Cocoa \
|
||||
-framework IOKit \
|
||||
-framework Metal \
|
||||
-framework Security \
|
||||
-framework ExceptionHandling \
|
||||
|
||||
@@ -125,6 +125,17 @@ else
|
||||
BUILD_JDK_JTREG_EXCLUDE += exeLibraryCache.c
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libwindows_touch_robot := user32.lib
|
||||
BUILD_JDK_JTREG_EXCLUDE += libtouchscreen_device.c
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
BUILD_JDK_JTREG_EXCLUDE += libwindows_touch_robot.c
|
||||
else
|
||||
BUILD_JDK_JTREG_EXCLUDE += libtouchscreen_device.c libwindows_touch_robot.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
# Unconditionally compile with debug symbols and don't ever perform
|
||||
# stripping during the test libraries' build.
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
package j2dbench.report;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryIteratorException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* The class reads J2DBench scores and reports them into output stream in format applicable for TeamCity charts.
|
||||
* The directory, where J2DBench result files placed, is specified via command line parameter like follows:
|
||||
* <p>
|
||||
* <code>-basexml | -b <xml file path></code>
|
||||
* </p>
|
||||
* This directory must contain one file with pattern <code>*{openjdk}*.{res}</code> which is considered as a container
|
||||
* of reference scores and several <code>*{jbsdk}*.{res}</code>.
|
||||
* <p>
|
||||
* <p> Names of these files have several mandatory fields separated by <code>"_"</code> and look like
|
||||
* <code>osName_jdkName_renderName_*.res</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* If any of score is less than corresponding reference value by 5% then exit code <code>1</code> is returned otherwise
|
||||
* exit code <code>0</code> is returned.
|
||||
* <p>
|
||||
* Standard output will contain scores in format required for TeamCity charts.
|
||||
* <p>
|
||||
* Created by vprovodin on 13/02/2017.
|
||||
*/
|
||||
public class TCChartReporter {
|
||||
|
||||
private static boolean printTCValues = false;
|
||||
private static boolean printValues = false;
|
||||
|
||||
private static final DecimalFormat decimalFormat =
|
||||
new DecimalFormat("0.00");
|
||||
|
||||
private static FileSystem defaultFileSystem = FileSystems.getDefault();
|
||||
|
||||
private static double getMeasurementError(String testCaseName, String osName) {
|
||||
if (testCaseName.contains("text.Rendering.tests.drawString") && osName.toLowerCase().contains("lin") )
|
||||
return 0.18;
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Level at which tests are grouped to be displayed in summary
|
||||
*/
|
||||
private static final int LEVEL = 2;
|
||||
|
||||
/**
|
||||
* Holds the groups and corresponding group-display-names
|
||||
*/
|
||||
private static List<String> groups = new ArrayList<>();
|
||||
private static Map<String, Double> referenceValues = new HashMap<>();
|
||||
private static boolean testFailed = false;
|
||||
|
||||
private static void printUsage() {
|
||||
String usage =
|
||||
"\njava TCChartReporter [options] " +
|
||||
" \n\n" +
|
||||
"where options include: " +
|
||||
" \n" +
|
||||
" -basexml | -b <xml file path> " +
|
||||
"path to base-build result";
|
||||
System.out.println(usage);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* String = getTestResultsTableForSummary()
|
||||
*/
|
||||
private static double generateTestCaseReport(
|
||||
Object key,
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
|
||||
Map<String, Integer> testCaseResultCount) {
|
||||
|
||||
Integer curTestCountObj = testCaseResultCount.get(key.toString());
|
||||
int curTestCount = 0;
|
||||
if (curTestCountObj != null) {
|
||||
curTestCount = curTestCountObj;
|
||||
}
|
||||
|
||||
double totalScore = 0;
|
||||
|
||||
for (int i = 0; i < curTestCount; i++) {
|
||||
J2DAnalyzer.ResultHolder resultTCR = testCaseResult.get(key.toString() + "_" + i);
|
||||
totalScore = totalScore + resultTCR.getScore();
|
||||
}
|
||||
|
||||
return totalScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Testcase Summary Report for TC - *.out
|
||||
*/
|
||||
private static void generateTestCaseSummaryReport(
|
||||
String OJRname,
|
||||
Map<String, Double> consoleResult,
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
|
||||
Map<String, Integer> testCaseResultCount,
|
||||
boolean rememberReference) {
|
||||
|
||||
String curGroupName, curTestName;
|
||||
|
||||
Object[] groupNameArray = groups.toArray();
|
||||
|
||||
Object[] testCaseList = consoleResult.keySet().toArray();
|
||||
Arrays.sort(testCaseList);
|
||||
|
||||
for (Object aGroupNameArray : groupNameArray) {
|
||||
|
||||
double value;
|
||||
curGroupName = aGroupNameArray.toString();
|
||||
|
||||
for (Object aTestCaseList : testCaseList) {
|
||||
|
||||
curTestName = aTestCaseList.toString();
|
||||
|
||||
if (curTestName.contains(curGroupName)) {
|
||||
|
||||
value = generateTestCaseReport(curTestName, testCaseResult, testCaseResultCount);
|
||||
|
||||
if (printTCValues)
|
||||
System.out.println("##teamcity[buildStatisticValue key='" + (OJRname.isEmpty() ? "" : OJRname + ".") + curTestName
|
||||
+ "' value='" + decimalFormat.format(value) + "']");
|
||||
if (printValues)
|
||||
System.out.println((OJRname.isEmpty() ? "" : OJRname + ".") + curTestName + "," + decimalFormat.format(value));
|
||||
if (rememberReference) {
|
||||
referenceValues.put(curTestName, value);
|
||||
} else {
|
||||
double refValue = referenceValues.getOrDefault(curTestName, 0.);
|
||||
if (Math.abs(value/refValue - 1) >= getMeasurementError(curTestName, OJRname)) {
|
||||
System.err.println(OJRname);
|
||||
System.err.println(curTestName);
|
||||
System.err.println("\treferenceValue=" + refValue);
|
||||
System.err.println("\t actualValue=" + value);
|
||||
System.err.println("\t diff:" + ((value / refValue - 1) * 100));
|
||||
testFailed = (value < refValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
|
||||
String baseXML = null;
|
||||
int group = 2;
|
||||
|
||||
/* ---- Analysis Mode ----
|
||||
BEST = 1;
|
||||
WORST = 2;
|
||||
AVERAGE = 3;
|
||||
MIDAVG = 4;
|
||||
------------------------ */
|
||||
int analyzerMode = 4;
|
||||
|
||||
try {
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
|
||||
if (args[i].startsWith("-basexml") ||
|
||||
args[i].startsWith("-b")) {
|
||||
i++;
|
||||
baseXML = args[i];
|
||||
} else if (args[i].startsWith("-tc")) {
|
||||
printTCValues = true;
|
||||
} else if (args[i].startsWith("-v"))
|
||||
printValues = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
printUsage();
|
||||
}
|
||||
|
||||
XMLHTMLReporter.setGroupLevel(group);
|
||||
J2DAnalyzer.setMode(analyzerMode);
|
||||
if (baseXML != null) {
|
||||
generateComparisonReport(defaultFileSystem.getPath(baseXML));
|
||||
} else {
|
||||
printUsage();
|
||||
}
|
||||
|
||||
if (testFailed)
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Test Group to the list
|
||||
*/
|
||||
private static void addGroup(String testName) {
|
||||
|
||||
String testNameSplit[] = testName.replace('.', '_').split("_");
|
||||
StringBuilder group = new StringBuilder(testNameSplit[0]);
|
||||
for (int i = 1; i < LEVEL; i++) {
|
||||
group.append(".").append(testNameSplit[i]);
|
||||
}
|
||||
|
||||
if (!groups.contains(group.toString()))
|
||||
groups.add(group.toString());
|
||||
}
|
||||
|
||||
private static List<Path> listResFiles(Path dir, String pattern) throws IOException {
|
||||
List<Path> result = new ArrayList<>();
|
||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, pattern)) {
|
||||
for (Path entry : stream) {
|
||||
result.add(entry);
|
||||
}
|
||||
} catch (DirectoryIteratorException ex) {
|
||||
throw ex.getCause();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the reports from the base & target result XML
|
||||
*/
|
||||
private static void generateComparisonReport(Path directoryToResFiles) {
|
||||
|
||||
if (directoryToResFiles.toFile().isDirectory()) {
|
||||
List<Path> jbsdkFiles, openjdkFiles;
|
||||
|
||||
try {
|
||||
jbsdkFiles = listResFiles(directoryToResFiles, "*{jbsdk,jbre}*.{res}");
|
||||
openjdkFiles = listResFiles(directoryToResFiles, "*{openjdk}*.{res}");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
readScores(openjdkFiles.get(0), true);
|
||||
|
||||
for (Path file : jbsdkFiles) {
|
||||
readScores(file, false);
|
||||
}
|
||||
} else {
|
||||
readScores(directoryToResFiles, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void readScores(Path file, boolean rememberReference) {
|
||||
String fileName = file.getName(file.getNameCount() - 1).toString();
|
||||
String osName="", jdkName="", renderName="";
|
||||
if (fileName.contains("win") || fileName.contains("linux") || fileName.contains("osx")) {
|
||||
String[] fileNameComponents = fileName.split("_");
|
||||
if (fileNameComponents.length > 0)
|
||||
osName = fileNameComponents[0];
|
||||
if (fileNameComponents.length > 1)
|
||||
jdkName = fileNameComponents[1];
|
||||
if (fileNameComponents.length > 2)
|
||||
renderName = fileNameComponents[2];
|
||||
}
|
||||
|
||||
String resultXMLFileName = file.toString();
|
||||
|
||||
J2DAnalyzer.results = new Vector();
|
||||
J2DAnalyzer.readResults(resultXMLFileName);
|
||||
J2DAnalyzer.SingleResultSetHolder baseSRSH =
|
||||
(J2DAnalyzer.SingleResultSetHolder) J2DAnalyzer.results.elementAt(0);
|
||||
Enumeration baseEnum_ = baseSRSH.getKeyEnumeration();
|
||||
Vector<String> baseKeyvector = new Vector<>();
|
||||
while (baseEnum_.hasMoreElements()) {
|
||||
baseKeyvector.add((String) baseEnum_.nextElement());
|
||||
}
|
||||
String baseKeys[] = new String[baseKeyvector.size()];
|
||||
baseKeyvector.copyInto(baseKeys);
|
||||
J2DAnalyzer.sort(baseKeys);
|
||||
|
||||
Map<String, Double> consoleBaseRes = new HashMap<>();
|
||||
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseBaseResult = new HashMap<>();
|
||||
Map<String, Integer> testCaseResultCount = new HashMap<>();
|
||||
|
||||
for (String baseKey : baseKeys) {
|
||||
|
||||
J2DAnalyzer.ResultHolder baseTCR =
|
||||
baseSRSH.getResultByKey(baseKey);
|
||||
|
||||
Integer curTestCountObj = testCaseResultCount.get(baseTCR.getName());
|
||||
int curTestCount = 0;
|
||||
if (curTestCountObj != null) {
|
||||
curTestCount = curTestCountObj;
|
||||
}
|
||||
curTestCount++;
|
||||
testCaseBaseResult.put(baseTCR.getName() + "_" + (curTestCount - 1), baseTCR);
|
||||
testCaseResultCount.put(baseTCR.getName(), curTestCount);
|
||||
|
||||
addGroup(baseTCR.getName());
|
||||
|
||||
Double curTotalScoreObj = consoleBaseRes.get(baseTCR.getName());
|
||||
double curTotalScore = 0;
|
||||
if (curTotalScoreObj != null) {
|
||||
curTotalScore = curTotalScoreObj;
|
||||
}
|
||||
curTotalScore = curTotalScore + baseTCR.getScore();
|
||||
consoleBaseRes.put(baseTCR.getName(), curTotalScore);
|
||||
}
|
||||
|
||||
String OJRname = osName + "." + jdkName + "." + renderName;
|
||||
generateTestCaseSummaryReport((OJRname.length() == 2? "": OJRname),
|
||||
consoleBaseRes,
|
||||
testCaseBaseResult,
|
||||
testCaseResultCount,
|
||||
rememberReference);
|
||||
|
||||
}
|
||||
}
|
||||
74
src/demo/share/java2d/RenderPerfTest/Makefile
Normal file
74
src/demo/share/java2d/RenderPerfTest/Makefile
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# Copyright (c) 2019, Oracle and/or its affiliates. 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.
|
||||
#
|
||||
# - Neither the name of Oracle 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.
|
||||
#
|
||||
|
||||
SOURCEPATH=src
|
||||
CLASSES=build
|
||||
DIST=dist
|
||||
RESOURCES=resources
|
||||
|
||||
RENDERPERF_CLASSES = $(CLASSES)/renderperf/RenderPerfTest.class
|
||||
RENDERPERF_SOURCES = $(SOURCEPATH)/renderperf/RenderPerfTest.java
|
||||
|
||||
RENDERPERF_RESOURCES = $(CLASSES)/renderperf/images/duke.png
|
||||
|
||||
all: mkdirs $(DIST)/RenderPerfTest.jar
|
||||
|
||||
run: mkdirs $(DIST)/RenderPerfTest.jar
|
||||
java -jar $(DIST)/RenderPerfTest.jar
|
||||
|
||||
$(DIST)/RenderPerfTest.jar: \
|
||||
$(RENDERPERF_CLASSES) $(RENDERPERF_RESOURCES) \
|
||||
$(CLASSES)/renderperf.manifest
|
||||
jar cvmf $(CLASSES)/renderperf.manifest $(DIST)/RenderPerfTest.jar -C $(CLASSES) .
|
||||
|
||||
|
||||
$(CLASSES)/renderperf/images/%: $(RESOURCES)/images/%
|
||||
cp -r $< $@
|
||||
|
||||
|
||||
$(CLASSES)/renderperf.manifest:
|
||||
echo "Main-Class: renderperf.RenderPerfTest" > $@
|
||||
|
||||
$(DIST):
|
||||
mkdir $(DIST)
|
||||
|
||||
$(CLASSES):
|
||||
mkdir $(CLASSES)
|
||||
mkdir -p $(CLASSES)/renderperf/images
|
||||
|
||||
mkdirs: $(DIST) $(CLASSES)
|
||||
|
||||
$(RENDERPERF_CLASSES): $(RENDERPERF_SOURCES)
|
||||
javac -g:none -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
|
||||
clean:
|
||||
rm -rf $(CLASSES)
|
||||
rm -rf $(DIST)
|
||||
34
src/demo/share/java2d/RenderPerfTest/README
Normal file
34
src/demo/share/java2d/RenderPerfTest/README
Normal file
@@ -0,0 +1,34 @@
|
||||
-----------------------------------------------------------------------
|
||||
Introduction
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
RenderPerfTest is a set of on-screen rendering microbenchmarks to
|
||||
analyze the performance of Java2D graphical primitives rendering
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
How To Compile
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
#> cd RenderPerfTest
|
||||
|
||||
The benchmark can be compiled by using either ant:
|
||||
|
||||
#> ant
|
||||
|
||||
or gnumake (assuming there's 'javac' in the path):
|
||||
|
||||
#> gnumake
|
||||
|
||||
The jar files will be generated into RenderPerfTest/dist directory.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
How To Run RenderPerfTest
|
||||
-----------------------------------------------------------------------
|
||||
Run all tests
|
||||
#> ant run
|
||||
or
|
||||
#> java -jar dist/RenderPerfTest.jar
|
||||
|
||||
Run particular test cases
|
||||
|
||||
#> java -jar dist/RenderPerfTest.jar testWhiteTextBubblesGray ...
|
||||
94
src/demo/share/java2d/RenderPerfTest/build.xml
Normal file
94
src/demo/share/java2d/RenderPerfTest/build.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<!--
|
||||
Copyright (c) 2019, Oracle and/or its affiliates. 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.
|
||||
|
||||
- Neither the name of Oracle 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.
|
||||
-->
|
||||
|
||||
<project name="RenderPerfTest" default="dist" basedir=".">
|
||||
<description>
|
||||
simple example build file
|
||||
</description>
|
||||
<!-- set global properties for this build -->
|
||||
<property name="src" location="src"/>
|
||||
<property name="build" location="build"/>
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="resources" location="resources"/>
|
||||
|
||||
<target name="init">
|
||||
<!-- Create the time stamp -->
|
||||
<tstamp/>
|
||||
<!-- Create the build directory structure used by compile -->
|
||||
<mkdir dir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac includeantruntime="false" debug="off" srcdir="${src}" destdir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
description="run RenderPerfTest" >
|
||||
<java jar="${dist}/RenderPerfTest.jar"
|
||||
fork="true"
|
||||
>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="resources" depends="init"
|
||||
description="copy resources into build dir" >
|
||||
<!-- Copy the resource files from ${resources} into ${build}/ -->
|
||||
<mkdir dir="${dist}"/>
|
||||
<mkdir dir="${dist}/renderperf"/>
|
||||
<mkdir dir="${build}/renderperf/images"/>
|
||||
<copy todir="${build}/renderperf/images">
|
||||
<fileset dir="resources/renderperf/images" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="dist" depends="compile, resources"
|
||||
description="generate the distribution" >
|
||||
<!-- Create the distribution directory -->
|
||||
<mkdir dir="${dist}"/>
|
||||
|
||||
<!-- Put everything in ${build} into the J2DBench.jar file -->
|
||||
<jar jarfile="${dist}/RenderPerfTest.jar" basedir="${build}">
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name}"/>
|
||||
<attribute name="Main-Class" value="renderperf.RenderPerfTest"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="clean"
|
||||
description="clean up" >
|
||||
<!-- Delete the ${build} and ${dist} directory trees -->
|
||||
<delete dir="${build}"/>
|
||||
<delete dir="${dist}"/>
|
||||
</target>
|
||||
</project>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,739 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code 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
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package renderperf;
|
||||
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.QuadCurve2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
|
||||
public class RenderPerfTest {
|
||||
private static HashSet<String> ignoredTests = new HashSet<>();
|
||||
|
||||
private final static int N = 1000;
|
||||
private final static float WIDTH = 800;
|
||||
private final static float HEIGHT = 800;
|
||||
private final static float R = 25;
|
||||
private final static int BW = 50;
|
||||
private final static int BH = 50;
|
||||
private final static int COUNT = 300;
|
||||
private final static int DELAY = 10;
|
||||
private final static int RESOLUTION = 5;
|
||||
private final static int COLOR_TOLERANCE = 10;
|
||||
private final static int MAX_MEASURE_TIME = 5000;
|
||||
|
||||
|
||||
interface Configurable {
|
||||
void configure(Graphics2D g2d);
|
||||
}
|
||||
|
||||
interface Renderable {
|
||||
void setup(Graphics2D g2d);
|
||||
void render(Graphics2D g2d);
|
||||
void update();
|
||||
}
|
||||
|
||||
static class Particles {
|
||||
private float[] bx;
|
||||
private float[] by;
|
||||
private float[] vx;
|
||||
private float[] vy;
|
||||
private float r;
|
||||
private int n;
|
||||
|
||||
private float x0;
|
||||
private float y0;
|
||||
private float width;
|
||||
private float height;
|
||||
|
||||
Particles(int n, float r, float x0, float y0, float width, float height) {
|
||||
bx = new float[n];
|
||||
by = new float[n];
|
||||
vx = new float[n];
|
||||
vy = new float[n];
|
||||
this.n = n;
|
||||
this.r = r;
|
||||
this.x0 = x0;
|
||||
this.y0 = y0;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
for (int i = 0; i < n; i++) {
|
||||
bx[i] = (float) (x0 + r + 0.1 + Math.random() * (width - 2 * r - 0.2 - x0));
|
||||
by[i] = (float) (y0 + r + 0.1 + Math.random() * (height - 2 * r - 0.2 - y0));
|
||||
vx[i] = 0.1f * (float) (Math.random() * 2 * r - r);
|
||||
vy[i] = 0.1f * (float) (Math.random() * 2 * r - r);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void render(Graphics2D g2d, ParticleRenderer renderer) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
renderer.render(g2d, i, bx, by, vx, vy);
|
||||
}
|
||||
}
|
||||
|
||||
void update() {
|
||||
for (int i = 0; i < n; i++) {
|
||||
bx[i] += vx[i];
|
||||
if (bx[i] + r > width || bx[i] - r < x0) vx[i] = -vx[i];
|
||||
by[i] += vy[i];
|
||||
if (by[i] + r > height || by[i] - r < y0) vy[i] = -vy[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ParticleRenderable createPR(ParticleRenderer renderer) {
|
||||
return new ParticleRenderable(renderer);
|
||||
}
|
||||
|
||||
static class ParticleRenderable implements Renderable {
|
||||
ParticleRenderer renderer;
|
||||
Configurable configure;
|
||||
|
||||
ParticleRenderable(ParticleRenderer renderer, Configurable configure) {
|
||||
this.renderer = renderer;
|
||||
this.configure = configure;
|
||||
}
|
||||
|
||||
ParticleRenderable(ParticleRenderer renderer) {
|
||||
this(renderer, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup(Graphics2D g2d) {
|
||||
if (configure != null) configure.configure(g2d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d) {
|
||||
balls.render(g2d, renderer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
balls.update();
|
||||
}
|
||||
|
||||
public ParticleRenderable configure(Configurable configure) {
|
||||
this.configure = configure;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
interface ParticleRenderer {
|
||||
void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy);
|
||||
|
||||
}
|
||||
|
||||
static class FlatParticleRenderer implements ParticleRenderer {
|
||||
Color[] colors;
|
||||
float r;
|
||||
|
||||
FlatParticleRenderer(int n, float r) {
|
||||
colors = new Color[n];
|
||||
this.r = r;
|
||||
for (int i = 0; i < n; i++) {
|
||||
colors[i] = new Color((float) Math.random(),
|
||||
(float) Math.random(), (float) Math.random());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.fillOval((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class WhiteTextParticleRenderer implements ParticleRenderer {
|
||||
float r;
|
||||
|
||||
WhiteTextParticleRenderer(float r) {
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
void setPaint(Graphics2D g2d, int id) {
|
||||
g2d.setColor(Color.WHITE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
setPaint(g2d, id);
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)(y[id] - r));
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)y[id]);
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)(y[id] + r));
|
||||
}
|
||||
}
|
||||
|
||||
static class TextParticleRenderer extends WhiteTextParticleRenderer {
|
||||
Color[] colors;
|
||||
|
||||
float r;
|
||||
|
||||
TextParticleRenderer(int n, float r) {
|
||||
super(r);
|
||||
colors = new Color[n];
|
||||
this.r = r;
|
||||
for (int i = 0; i < n; i++) {
|
||||
colors[i] = new Color((float) Math.random(),
|
||||
(float) Math.random(), (float) Math.random());
|
||||
}
|
||||
}
|
||||
|
||||
void setPaint(Graphics2D g2d, int id) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
}
|
||||
}
|
||||
|
||||
static class LargeTextParticleRenderer extends TextParticleRenderer {
|
||||
|
||||
LargeTextParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
setPaint(g2d, id);
|
||||
Font font = new Font("LucidaGrande", Font.PLAIN, 32);
|
||||
g2d.setFont(font);
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)(y[id] - r));
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)y[id]);
|
||||
g2d.drawString("The quick brown fox jumps over the lazy dog",
|
||||
(int)(x[id] - r), (int)(y[id] + r));
|
||||
}
|
||||
}
|
||||
|
||||
static class FlatOvalRotParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
|
||||
FlatOvalRotParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
void setPaint(Graphics2D g2d, int id) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
setPaint(g2d, id);
|
||||
if (Math.abs(vx[id] + vy[id]) > 0.001) {
|
||||
AffineTransform t = (AffineTransform) g2d.getTransform().clone();
|
||||
double l = vx[id] / Math.sqrt(vx[id] * vx[id] + vy[id] * vy[id]);
|
||||
if (vy[id] < 0) {
|
||||
l = -l;
|
||||
}
|
||||
g2d.translate(x[id], y[id]);
|
||||
g2d.rotate(Math.acos(l));
|
||||
g2d.fillOval(-(int)r, (int)(-0.5*r), (int) (2 * r), (int)r);
|
||||
g2d.setTransform(t);
|
||||
} else {
|
||||
g2d.fillOval((int)(x[id] - r), (int)(y[id] - 0.5*r),
|
||||
(int) (2 * r), (int) r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class LinGradOvalRotParticleRenderer extends FlatOvalRotParticleRenderer {
|
||||
|
||||
|
||||
LinGradOvalRotParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
void setPaint(Graphics2D g2d, int id) {
|
||||
Point2D start = new Point2D.Double(- r, - 0.5*r);
|
||||
Point2D end = new Point2D.Double( 2 * r, r);
|
||||
float[] dist = {0.0f, 1.0f};
|
||||
Color[] cls = {colors[id %colors.length], colors[(colors.length - id) %colors.length]};
|
||||
LinearGradientPaint p =
|
||||
new LinearGradientPaint(start, end, dist, cls);
|
||||
g2d.setPaint(p);
|
||||
}
|
||||
}
|
||||
|
||||
static class FlatBoxParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
|
||||
FlatBoxParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.fillRect((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class ImgParticleRenderer extends FlatParticleRenderer {
|
||||
BufferedImage dukeImg;
|
||||
|
||||
ImgParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
try {
|
||||
dukeImg = ImageIO.read(
|
||||
Objects.requireNonNull(
|
||||
RenderPerfTest.class.getClassLoader().getResourceAsStream(
|
||||
"renderperf/images/duke.png")));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.drawImage(dukeImg, (int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r), null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class FlatBoxRotParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
|
||||
FlatBoxRotParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
if (Math.abs(vx[id] + vy[id]) > 0.001) {
|
||||
AffineTransform t = (AffineTransform) g2d.getTransform().clone();
|
||||
double l = vx[id] / Math.sqrt(vx[id] * vx[id] + vy[id] * vy[id]);
|
||||
if (vy[id] < 0) {
|
||||
l = -l;
|
||||
}
|
||||
g2d.translate(x[id], y[id]);
|
||||
g2d.rotate(Math.acos(l));
|
||||
g2d.fillRect(-(int)r, -(int)r, (int) (2 * r), (int) (2 * r));
|
||||
g2d.setTransform(t);
|
||||
} else {
|
||||
g2d.fillRect((int)(x[id] - r), (int)(y[id] - r),
|
||||
(int) (2 * r), (int) (2 * r));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class WiredParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
|
||||
WiredParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.drawOval((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
|
||||
}
|
||||
|
||||
}
|
||||
static class WiredBoxParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
WiredBoxParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.drawRect((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
|
||||
}
|
||||
|
||||
}
|
||||
static class SegParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
SegParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
double v = Math.sqrt(vx[id]*vx[id]+vy[id]*vy[id]);
|
||||
float nvx = (float) (vx[id]/v);
|
||||
float nvy = (float) (vy[id]/v);
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.drawLine((int)(x[id] - r*nvx), (int)(y[id] - r*nvy),
|
||||
(int)(x[id] + 2*r*nvx), (int)(y[id] + 2*r*nvy));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static class WiredQuadParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
WiredQuadParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
if (id > 2 && (id % 3) == 0) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.draw(new QuadCurve2D.Float(x[id-3], y[id-3], x[id-2], y[id-2], x[id-1], y[id-1]));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static class FlatQuadParticleRenderer extends FlatParticleRenderer {
|
||||
|
||||
FlatQuadParticleRenderer(int n, float r) {
|
||||
super(n, r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
|
||||
if (id > 2 && (id % 3) == 0) {
|
||||
g2d.setColor(colors[id % colors.length]);
|
||||
g2d.fill(new QuadCurve2D.Float(x[id-3], y[id-3], x[id-2], y[id-2], x[id-1], y[id-1]));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static class PerfMeter {
|
||||
private String name;
|
||||
private int frame = 0;
|
||||
|
||||
private JPanel panel;
|
||||
|
||||
private long time;
|
||||
private double execTime = 0;
|
||||
private Color expColor = Color.RED;
|
||||
AtomicBoolean waiting = new AtomicBoolean(false);
|
||||
private double fps;
|
||||
|
||||
PerfMeter(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
PerfMeter exec(final Renderable renderable) throws Exception {
|
||||
final CountDownLatch latch = new CountDownLatch(COUNT);
|
||||
final CountDownLatch latchFrame = new CountDownLatch(1);
|
||||
final long endTime = System.currentTimeMillis() + MAX_MEASURE_TIME;
|
||||
|
||||
final JFrame f = new JFrame();
|
||||
f.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
latchFrame.countDown();
|
||||
}
|
||||
});
|
||||
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
panel = new JPanel()
|
||||
{
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
|
||||
super.paintComponent(g);
|
||||
time = System.nanoTime();
|
||||
Graphics2D g2d = (Graphics2D) g.create();
|
||||
renderable.setup(g2d);
|
||||
renderable.render(g2d);
|
||||
g2d.setColor(expColor);
|
||||
g.fillRect(0, 0, BW, BH);
|
||||
}
|
||||
};
|
||||
|
||||
panel.setPreferredSize(new Dimension((int)(WIDTH + BW), (int)(HEIGHT + BH)));
|
||||
panel.setBackground(Color.BLACK);
|
||||
f.add(panel);
|
||||
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
f.pack();
|
||||
f.setVisible(true);
|
||||
}
|
||||
});
|
||||
Robot robot = new Robot();
|
||||
|
||||
Timer timer = new Timer(DELAY, e -> {
|
||||
|
||||
if (waiting.compareAndSet(false, true)) {
|
||||
Color c = robot.getPixelColor(
|
||||
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW / 2,
|
||||
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BW / 2);
|
||||
if (isAlmostEqual(c, Color.BLUE)) {
|
||||
expColor = Color.RED;
|
||||
} else {
|
||||
expColor = Color.BLUE;
|
||||
}
|
||||
renderable.update();
|
||||
panel.getParent().repaint();
|
||||
|
||||
} else {
|
||||
while (!isAlmostEqual(
|
||||
robot.getPixelColor(
|
||||
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW/2,
|
||||
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BH/2),
|
||||
expColor))
|
||||
{
|
||||
try {
|
||||
Thread.sleep(RESOLUTION);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
time = System.nanoTime() - time;
|
||||
execTime += time;
|
||||
frame++;
|
||||
waiting.set(false);
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() < endTime) {
|
||||
latch.countDown();
|
||||
} else {
|
||||
while(latch.getCount() > 0) latch.countDown();
|
||||
}
|
||||
});
|
||||
timer.start();
|
||||
latch.await();
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
timer.stop();
|
||||
f.setVisible(false);
|
||||
f.dispose();
|
||||
});
|
||||
|
||||
latchFrame.await();
|
||||
if (execTime != 0 && frame != 0) {
|
||||
fps = 1e9 / (execTime / frame);
|
||||
} else {
|
||||
fps = 0;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private void report() {
|
||||
System.err.println(name + " : " + String.format("%.2f FPS", fps));
|
||||
}
|
||||
|
||||
private boolean isAlmostEqual(Color c1, Color c2) {
|
||||
return Math.abs(c1.getRed() - c2.getRed()) < COLOR_TOLERANCE ||
|
||||
Math.abs(c1.getGreen() - c2.getGreen()) < COLOR_TOLERANCE ||
|
||||
Math.abs(c1.getBlue() - c2.getBlue()) < COLOR_TOLERANCE;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static final Particles balls = new Particles(N, R, BW, BH, WIDTH, HEIGHT);
|
||||
private static final ParticleRenderer flatRenderer = new FlatParticleRenderer(N, R);
|
||||
private static final ParticleRenderer flatOvalRotRenderer = new FlatOvalRotParticleRenderer(N, R);
|
||||
private static final ParticleRenderer flatBoxRenderer = new FlatBoxParticleRenderer(N, R);
|
||||
private static final ParticleRenderer flatBoxRotRenderer = new FlatBoxRotParticleRenderer(N, R);
|
||||
private static final ParticleRenderer linGradOvalRotRenderer = new LinGradOvalRotParticleRenderer(N, R);
|
||||
private static final ParticleRenderer wiredRenderer = new WiredParticleRenderer(N, R);
|
||||
private static final ParticleRenderer wiredBoxRenderer = new WiredBoxParticleRenderer(N, R);
|
||||
private static final ParticleRenderer segRenderer = new SegParticleRenderer(N, R);
|
||||
private static final ParticleRenderer flatQuadRenderer = new FlatQuadParticleRenderer(N, R);
|
||||
private static final ParticleRenderer wiredQuadRenderer = new WiredQuadParticleRenderer(N, R);
|
||||
private static final ParticleRenderer imgRenderer = new ImgParticleRenderer(N, R);
|
||||
private static final ParticleRenderer textRenderer = new TextParticleRenderer(N, R);
|
||||
private static final ParticleRenderer largeTextRenderer = new LargeTextParticleRenderer(N, R);
|
||||
private static final ParticleRenderer whiteTextRenderer = new WhiteTextParticleRenderer(R);
|
||||
|
||||
private static final Configurable AA = (Graphics2D g2d) ->
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
private static final Configurable TextLCD = (Graphics2D g2d) ->
|
||||
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
|
||||
|
||||
private static final Configurable TextAA = (Graphics2D g2d) ->
|
||||
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
|
||||
public void testFlatBubbles() throws Exception {
|
||||
(new PerfMeter("FlatOval")).exec(createPR(flatRenderer)).report();
|
||||
}
|
||||
|
||||
public void testFlatBubblesAA() throws Exception {
|
||||
(new PerfMeter("FlatOvalAA")).exec(createPR(flatRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testFlatBoxBubbles() throws Exception {
|
||||
(new PerfMeter("FlatBox")).exec(createPR(flatBoxRenderer)).report();
|
||||
}
|
||||
|
||||
public void testFlatBoxBubblesAA() throws Exception {
|
||||
(new PerfMeter("FlatBoxAA")).exec(createPR(flatBoxRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testImgBubbles() throws Exception {
|
||||
(new PerfMeter("Image")).exec(createPR(imgRenderer)).report();
|
||||
}
|
||||
|
||||
public void testImgBubblesAA() throws Exception {
|
||||
(new PerfMeter("ImageAA")).exec(createPR(imgRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testFlatBoxRotBubbles() throws Exception {
|
||||
(new PerfMeter("RotatedBox")).exec(createPR(flatBoxRotRenderer)).report();
|
||||
}
|
||||
|
||||
public void testFlatBoxRotBubblesAA() throws Exception {
|
||||
(new PerfMeter("RotatedBoxAA")).exec(createPR(flatBoxRotRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testFlatOvalRotBubbles() throws Exception {
|
||||
(new PerfMeter("RotatedOval")).exec(createPR(flatOvalRotRenderer)).report();
|
||||
}
|
||||
|
||||
public void testFlatOvalRotBubblesAA() throws Exception {
|
||||
(new PerfMeter("RotatedOvalAA")).exec(createPR(flatOvalRotRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testLinGradOvalRotBubbles() throws Exception {
|
||||
(new PerfMeter("LinGradRotatedOval")).exec(createPR(linGradOvalRotRenderer)).report();
|
||||
}
|
||||
|
||||
public void testLinGradOvalRotBubblesAA() throws Exception {
|
||||
(new PerfMeter("LinGradRotatedOvalAA")).exec(createPR(linGradOvalRotRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testWiredBubbles() throws Exception {
|
||||
(new PerfMeter("WiredBubbles")).exec(createPR(wiredRenderer)).report();
|
||||
}
|
||||
|
||||
public void testWiredBubblesAA() throws Exception {
|
||||
(new PerfMeter("WiredBubblesAA")).exec(createPR(wiredRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testWiredBoxBubbles() throws Exception {
|
||||
(new PerfMeter("WiredBox")).exec(createPR(wiredBoxRenderer)).report();
|
||||
}
|
||||
|
||||
public void testWiredBoxBubblesAA() throws Exception {
|
||||
(new PerfMeter("WiredBoxAA")).exec(createPR(wiredBoxRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testLines() throws Exception {
|
||||
(new PerfMeter("Lines")).exec(createPR(segRenderer)).report();
|
||||
}
|
||||
|
||||
public void testLinesAA() throws Exception {
|
||||
(new PerfMeter("LinesAA")).exec(createPR(segRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testFlatQuad() throws Exception {
|
||||
(new PerfMeter("FlatQuad")).exec(createPR(flatQuadRenderer)).report();
|
||||
}
|
||||
|
||||
public void testFlatQuadAA() throws Exception {
|
||||
(new PerfMeter("FlatQuadAA")).exec(createPR(flatQuadRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testWiredQuad() throws Exception {
|
||||
(new PerfMeter("WiredQuad")).exec(createPR(wiredQuadRenderer)).report();
|
||||
}
|
||||
|
||||
public void testWiredQuadAA() throws Exception {
|
||||
(new PerfMeter("WiredQuadAA")).exec(createPR(wiredQuadRenderer).configure(AA)).report();
|
||||
}
|
||||
|
||||
public void testTextBubblesNoAA() throws Exception {
|
||||
(new PerfMeter("TextNoAA")).exec(createPR(textRenderer)).report();
|
||||
}
|
||||
|
||||
public void testTextBubblesLCD() throws Exception {
|
||||
(new PerfMeter("TextLCD")).exec(createPR(textRenderer).configure(TextLCD)).report();
|
||||
}
|
||||
|
||||
public void testTextBubblesGray() throws Exception {
|
||||
(new PerfMeter("TextGray")).exec(createPR(textRenderer).configure(TextAA)).report();
|
||||
}
|
||||
|
||||
public void testLargeTextBubblesNoAA() throws Exception {
|
||||
(new PerfMeter("LargeTextNoAA")).exec(createPR(largeTextRenderer)).report();
|
||||
}
|
||||
|
||||
public void testLargeTextBubblesLCD() throws Exception {
|
||||
(new PerfMeter("LargeTextLCD")).exec(createPR(largeTextRenderer).configure(TextLCD)).report();
|
||||
}
|
||||
|
||||
public void testLargeTextBubblesGray() throws Exception {
|
||||
(new PerfMeter("LargeTextGray")).exec(createPR(largeTextRenderer).configure(TextAA)).report();
|
||||
}
|
||||
public void testWhiteTextBubblesNoAA() throws Exception {
|
||||
(new PerfMeter("WhiteTextNoAA")).exec(createPR(whiteTextRenderer)).report();
|
||||
}
|
||||
|
||||
public void testWhiteTextBubblesLCD() throws Exception {
|
||||
(new PerfMeter("WhiteTextLCD")).exec(createPR(whiteTextRenderer).configure(TextLCD)).report();
|
||||
}
|
||||
|
||||
public void testWhiteTextBubblesGray() throws Exception {
|
||||
(new PerfMeter("WhiteTextGray")).exec(createPR(whiteTextRenderer).configure(TextAA)).report();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
throws InvocationTargetException, IllegalAccessException, NoSuchMethodException
|
||||
{
|
||||
RenderPerfTest test = new RenderPerfTest();
|
||||
|
||||
if (args.length > 0) {
|
||||
for (String testCase : args) {
|
||||
Method m = RenderPerfTest.class.getDeclaredMethod(testCase);
|
||||
m.invoke(test);
|
||||
}
|
||||
} else {
|
||||
Method[] methods = RenderPerfTest.class.getDeclaredMethods();
|
||||
for (Method m : methods) {
|
||||
if (m.getName().startsWith("test") && !ignoredTests.contains(m.getName())) {
|
||||
m.invoke(test);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1120,6 +1120,10 @@ void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * os::dll_load_utf8(const char *filename, char *ebuf, int ebuflen) {
|
||||
return os::dll_load(filename, ebuf, ebuflen);
|
||||
}
|
||||
|
||||
void os::print_dll_info(outputStream *st) {
|
||||
st->print_cr("Dynamic libraries:");
|
||||
LoadedLibraries::print(st);
|
||||
|
||||
@@ -1179,6 +1179,10 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||
}
|
||||
#endif // !__APPLE__
|
||||
|
||||
void * os::dll_load_utf8(const char *filename, char *ebuf, int ebuflen) {
|
||||
return os::dll_load(filename, ebuf, ebuflen);
|
||||
}
|
||||
|
||||
int _print_dll_info_cb(const char * name, address base_address, address top_address, void * param) {
|
||||
outputStream * out = (outputStream *) param;
|
||||
out->print_cr(INTPTR_FORMAT " \t%s", (intptr_t)base_address, name);
|
||||
|
||||
@@ -1698,6 +1698,10 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void * os::dll_load_utf8(const char *filename, char *ebuf, int ebuflen) {
|
||||
return os::dll_load(filename, ebuf, ebuflen);
|
||||
}
|
||||
|
||||
void * os::Linux::dlopen_helper(const char *filename, char *ebuf,
|
||||
int ebuflen) {
|
||||
void * result = ::dlopen(filename, RTLD_LAZY);
|
||||
|
||||
@@ -557,6 +557,12 @@ int JVM_HANDLE_XXX_SIGNAL(int sig, siginfo_t* info,
|
||||
{
|
||||
assert(info != nullptr && ucVoid != nullptr, "sanity");
|
||||
|
||||
if (sig == SIGABRT) {
|
||||
// Re-set the handler so that we don't recurse if/when abort() is called
|
||||
// from here.
|
||||
PosixSignals::install_generic_signal_handler(SIGABRT, (void*)SIG_DFL);
|
||||
}
|
||||
|
||||
// Note: it's not uncommon that JNI code uses signal/sigset to install,
|
||||
// then restore certain signal handler (e.g. to temporarily block SIGPIPE,
|
||||
// or have a SIGILL handler when detecting CPU type). When that happens,
|
||||
@@ -1339,6 +1345,10 @@ void install_signal_handlers() {
|
||||
assert(ret == 0, "check");
|
||||
}
|
||||
|
||||
if (CatchSIGABRT) {
|
||||
set_signal_handler(SIGABRT);
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
// lldb (gdb) installs both standard BSD signal handlers, and mach exception
|
||||
// handlers. By replacing the existing task exception handler, we disable lldb's mach
|
||||
|
||||
@@ -1515,9 +1515,221 @@ static int _print_module(const char* fname, address base_address,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static errno_t convert_to_UTF16(char const* source_str, UINT source_encoding, LPWSTR* dest_utf16_str) {
|
||||
const int len_estimated = MultiByteToWideChar(source_encoding,
|
||||
MB_ERR_INVALID_CHARS,
|
||||
source_str,
|
||||
-1, // source is null-terminated
|
||||
NULL,
|
||||
0); // estimate characters count
|
||||
if (len_estimated == 0) {
|
||||
// Probably source_str contains characters that cannot be represented in the source_encoding given.
|
||||
*dest_utf16_str = NULL;
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
*dest_utf16_str = NEW_C_HEAP_ARRAY(WCHAR, len_estimated, mtInternal);
|
||||
|
||||
const int len_real = MultiByteToWideChar(source_encoding,
|
||||
MB_ERR_INVALID_CHARS,
|
||||
source_str,
|
||||
-1, // source is null-terminated
|
||||
*dest_utf16_str, len_estimated);
|
||||
assert(len_real == len_estimated, "length already checked above");
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
// Converts a string in the "platform" encoding to UTF16.
|
||||
static errno_t convert_to_UTF16(char const* platform_str, LPWSTR* utf16_str) {
|
||||
return convert_to_UTF16(platform_str, CP_ACP, utf16_str);
|
||||
}
|
||||
|
||||
static errno_t convert_UTF8_to_UTF16(char const* utf8_str, LPWSTR* utf16_str) {
|
||||
return convert_to_UTF16(utf8_str, CP_UTF8, utf16_str);
|
||||
}
|
||||
|
||||
// Converts a wide-character string in UTF-16 encoding to the 8-bit "platform" encoding.
|
||||
// Unless the platform encoding is UTF-8, not all characters in the source string can be represented in the dest string.
|
||||
// The function succeeds in this case anyway and just replaces these with a certain character.
|
||||
static errno_t convert_UTF16_to_platform(LPWSTR source_utf16_str, char*& dest_str) {
|
||||
const int len_estimated = WideCharToMultiByte(CP_ACP,
|
||||
0,
|
||||
source_utf16_str,
|
||||
-1, // source is null-terminated
|
||||
NULL,
|
||||
0, // estimate characters count
|
||||
NULL, NULL);
|
||||
if (len_estimated == 0) {
|
||||
dest_str = NULL;
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
dest_str = NEW_C_HEAP_ARRAY(CHAR, len_estimated, mtInternal);
|
||||
|
||||
const int len_real = WideCharToMultiByte(CP_ACP,
|
||||
0,
|
||||
source_utf16_str,
|
||||
-1, // source is null-terminated
|
||||
dest_str, len_estimated, NULL, NULL);
|
||||
assert(len_real == len_estimated, "length already checked above");
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
class MemoryReleaserW : public StackObj {
|
||||
private:
|
||||
WCHAR* _object_ptr;
|
||||
|
||||
public:
|
||||
MemoryReleaserW(WCHAR * object_ptr) : _object_ptr(object_ptr) {}
|
||||
~MemoryReleaserW() { if (_object_ptr != NULL) FREE_C_HEAP_ARRAY(WCHAR, _object_ptr); }
|
||||
};
|
||||
|
||||
class MemoryReleaser : public StackObj {
|
||||
private:
|
||||
CHAR* _object_ptr;
|
||||
|
||||
public:
|
||||
MemoryReleaser(CHAR * object_ptr) : _object_ptr(object_ptr) {}
|
||||
~MemoryReleaser() { if (_object_ptr != NULL) FREE_C_HEAP_ARRAY(CHAR, _object_ptr); }
|
||||
};
|
||||
|
||||
// Loads .dll/.so and
|
||||
// in case of error it checks if .dll/.so was built for the
|
||||
// same architecture as Hotspot is running on
|
||||
void * os::dll_load_utf8(const char *utf8_name, char *ebuf, int ebuflen) {
|
||||
LPWSTR utf16_name = NULL;
|
||||
errno_t err = convert_UTF8_to_UTF16(utf8_name, &utf16_name);
|
||||
MemoryReleaserW release_utf16_name(utf16_name);
|
||||
if (err != ERROR_SUCCESS) {
|
||||
errno = err;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char* platform_name = NULL; // name of the library converted to the "platform" encoding for use in log messages
|
||||
errno_t ignored_err = convert_UTF16_to_platform(utf16_name, platform_name);
|
||||
MemoryReleaser release_platform_name(platform_name);
|
||||
|
||||
log_info(os)("attempting shared library load of %s", platform_name);
|
||||
|
||||
void * result = LoadLibraryW(utf16_name);
|
||||
|
||||
if (result != NULL) {
|
||||
Events::log(NULL, "Loaded shared library %s", platform_name);
|
||||
// Recalculate pdb search path if a DLL was loaded successfully.
|
||||
SymbolEngine::recalc_search_path();
|
||||
log_info(os)("shared library load of %s was successful", platform_name);
|
||||
return result;
|
||||
}
|
||||
DWORD errcode = GetLastError();
|
||||
// Read system error message into ebuf
|
||||
// It may or may not be overwritten below (in the for loop and just above)
|
||||
lasterror(ebuf, (size_t) ebuflen);
|
||||
ebuf[ebuflen - 1] = '\0';
|
||||
Events::log(NULL, "Loading shared library %s failed, error code %lu", platform_name, errcode);
|
||||
log_info(os)("shared library load of %s failed, error code %lu", platform_name, errcode);
|
||||
|
||||
if (errcode == ERROR_MOD_NOT_FOUND) {
|
||||
strncpy(ebuf, "Can't find dependent libraries", ebuflen - 1);
|
||||
ebuf[ebuflen - 1] = '\0';
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Parsing dll below
|
||||
// If we can read dll-info and find that dll was built
|
||||
// for an architecture other than Hotspot is running in
|
||||
// - then print to buffer "DLL was built for a different architecture"
|
||||
// else call os::lasterror to obtain system error message
|
||||
int fd = ::wopen(utf16_name, O_RDONLY | O_BINARY, 0);
|
||||
if (fd < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint32_t signature_offset;
|
||||
uint16_t lib_arch = 0;
|
||||
bool failed_to_get_lib_arch =
|
||||
( // Go to position 3c in the dll
|
||||
(os::seek_to_file_offset(fd, IMAGE_FILE_PTR_TO_SIGNATURE) < 0)
|
||||
||
|
||||
// Read location of signature
|
||||
(sizeof(signature_offset) !=
|
||||
(::read(fd, (void*)&signature_offset, sizeof(signature_offset))))
|
||||
||
|
||||
// Go to COFF File Header in dll
|
||||
// that is located after "signature" (4 bytes long)
|
||||
(os::seek_to_file_offset(fd,
|
||||
signature_offset + IMAGE_FILE_SIGNATURE_LENGTH) < 0)
|
||||
||
|
||||
// Read field that contains code of architecture
|
||||
// that dll was built for
|
||||
(sizeof(lib_arch) != (::read(fd, (void*)&lib_arch, sizeof(lib_arch))))
|
||||
);
|
||||
|
||||
::close(fd);
|
||||
if (failed_to_get_lib_arch) {
|
||||
// file i/o error - report os::lasterror(...) msg
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
uint16_t arch_code;
|
||||
char* arch_name;
|
||||
} arch_t;
|
||||
|
||||
static const arch_t arch_array[] = {
|
||||
{IMAGE_FILE_MACHINE_I386, (char*)"IA 32"},
|
||||
{IMAGE_FILE_MACHINE_AMD64, (char*)"AMD 64"},
|
||||
{IMAGE_FILE_MACHINE_ARM64, (char*)"ARM 64"}
|
||||
};
|
||||
#if (defined _M_ARM64)
|
||||
static const uint16_t running_arch = IMAGE_FILE_MACHINE_ARM64;
|
||||
#elif (defined _M_AMD64)
|
||||
static const uint16_t running_arch = IMAGE_FILE_MACHINE_AMD64;
|
||||
#elif (defined _M_IX86)
|
||||
static const uint16_t running_arch = IMAGE_FILE_MACHINE_I386;
|
||||
#else
|
||||
#error Method os::dll_load requires that one of following \
|
||||
is defined :_M_AMD64 or _M_IX86 or _M_ARM64
|
||||
#endif
|
||||
|
||||
|
||||
// Obtain a string for printf operation
|
||||
// lib_arch_str shall contain string what platform this .dll was built for
|
||||
// running_arch_str shall string contain what platform Hotspot was built for
|
||||
char *running_arch_str = NULL, *lib_arch_str = NULL;
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(arch_array); i++) {
|
||||
if (lib_arch == arch_array[i].arch_code) {
|
||||
lib_arch_str = arch_array[i].arch_name;
|
||||
}
|
||||
if (running_arch == arch_array[i].arch_code) {
|
||||
running_arch_str = arch_array[i].arch_name;
|
||||
}
|
||||
}
|
||||
|
||||
assert(running_arch_str,
|
||||
"Didn't find running architecture code in arch_array");
|
||||
|
||||
// If the architecture is right
|
||||
// but some other error took place - report os::lasterror(...) msg
|
||||
if (lib_arch == running_arch) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (lib_arch_str != NULL) {
|
||||
::_snprintf(ebuf, ebuflen - 1,
|
||||
"Can't load %s-bit .dll on a %s-bit platform",
|
||||
lib_arch_str, running_arch_str);
|
||||
} else {
|
||||
// don't know what architecture this dll was build for
|
||||
::_snprintf(ebuf, ebuflen - 1,
|
||||
"Can't load this .dll (machine code=0x%x) on a %s-bit platform",
|
||||
lib_arch, running_arch_str);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * os::dll_load(const char *name, char *ebuf, int ebuflen) {
|
||||
log_info(os)("attempting shared library load of %s", name);
|
||||
|
||||
@@ -4455,7 +4667,7 @@ static wchar_t* wide_abs_unc_path(char const* path, errno_t & err, int additiona
|
||||
set_path_prefix(buf, &prefix, &prefix_off, &needs_fullpath);
|
||||
|
||||
LPWSTR unicode_path = NULL;
|
||||
err = convert_to_unicode(buf, &unicode_path);
|
||||
err = convert_to_UTF16(buf, &unicode_path);
|
||||
FREE_C_HEAP_ARRAY(char, buf);
|
||||
if (err != ERROR_SUCCESS) {
|
||||
return NULL;
|
||||
|
||||
@@ -808,6 +808,19 @@ bool BlockBegin::try_merge(ValueStack* new_state, bool has_irreducible_loops) {
|
||||
}
|
||||
}
|
||||
|
||||
for_each_stack_value(existing_state, index, existing_value) {
|
||||
if ( !(existing_value->as_Phi() != NULL && existing_value->as_Phi()->block() == this)) {
|
||||
TRACE_PHI(tty->print_cr("Re-entered loop head without existing phi for stack - bailout"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for_each_local_value(existing_state, index, existing_value) {
|
||||
if (!(existing_value == new_state->local_at(index) || (existing_value->as_Phi() != NULL && existing_value->as_Phi()->as_Phi()->block() == this))) {
|
||||
TRACE_PHI(tty->print_cr("Re-entered loop head without existing phi for modified local - bailout"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// check that all necessary phi functions are present
|
||||
for_each_stack_value(existing_state, index, existing_value) {
|
||||
|
||||
@@ -204,6 +204,7 @@ void LambdaFormInvokers::regenerate_class(char* class_name, ClassFileStream& st,
|
||||
class_name_sym,
|
||||
cld,
|
||||
cl_info,
|
||||
false, // pick_newest
|
||||
CHECK);
|
||||
|
||||
assert(result->java_mirror() != nullptr, "must be");
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
void print_name_on(outputStream* st);
|
||||
|
||||
const char* external_name() const;
|
||||
Klass* new_version() { return get_Klass()->new_version(); }
|
||||
};
|
||||
|
||||
#endif // SHARE_CI_CIKLASS_HPP
|
||||
|
||||
@@ -74,7 +74,10 @@ GrowableArray<ciMetadata*>* ciObjectFactory::_shared_ci_metadata = nullptr;
|
||||
ciSymbol* ciObjectFactory::_shared_ci_symbols[vmSymbols::number_of_symbols()];
|
||||
int ciObjectFactory::_shared_ident_limit = 0;
|
||||
volatile bool ciObjectFactory::_initialized = false;
|
||||
volatile bool ciObjectFactory::_reinitialize_vm_klasses = false;
|
||||
|
||||
// TODO: review...
|
||||
Arena* ciObjectFactory::_initial_arena = NULL;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciObjectFactory::ciObjectFactory
|
||||
@@ -110,6 +113,7 @@ void ciObjectFactory::initialize() {
|
||||
// compiler thread that initializes the initial ciObjectFactory which
|
||||
// creates the shared ciObjects that all later ciObjectFactories use.
|
||||
Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
ciObjectFactory::_initial_arena = arena;
|
||||
ciEnv initial(arena);
|
||||
ciEnv* env = ciEnv::current();
|
||||
env->_factory->init_shared_objects();
|
||||
@@ -118,6 +122,36 @@ void ciObjectFactory::initialize() {
|
||||
|
||||
}
|
||||
|
||||
// (DCEVM) vm classes could be modified
|
||||
void ciObjectFactory::reinitialize_vm_classes() {
|
||||
ASSERT_IN_VM;
|
||||
JavaThread* thread = JavaThread::current();
|
||||
HandleMark handle_mark(thread);
|
||||
|
||||
// This Arena is long lived and exists in the resource mark of the
|
||||
// compiler thread that initializes the initial ciObjectFactory which
|
||||
// creates the shared ciObjects that all later ciObjectFactories use.
|
||||
// Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
ciEnv initial(ciObjectFactory::_initial_arena);
|
||||
ciEnv* env = ciEnv::current();
|
||||
env->_factory->do_reinitialize_vm_classes();
|
||||
_reinitialize_vm_klasses = false;
|
||||
}
|
||||
|
||||
// (DCEVM) vm classes could be modified
|
||||
void ciObjectFactory::do_reinitialize_vm_classes() {
|
||||
#define VM_CLASS_DEFN(name, ignore_s) \
|
||||
if (ciEnv::_##name != NULL && ciEnv::_##name->new_version() != NULL) { \
|
||||
int old_ident = ciEnv::_##name->ident(); \
|
||||
ciEnv::_##name = get_metadata(vmClasses::name())->as_instance_klass(); \
|
||||
ciEnv::_##name->compute_nonstatic_fields(); \
|
||||
ciEnv::_##name->set_ident(old_ident); \
|
||||
}
|
||||
|
||||
VM_CLASSES_DO(VM_CLASS_DEFN)
|
||||
#undef VM_CLASS_DEFN
|
||||
}
|
||||
|
||||
void ciObjectFactory::init_shared_objects() {
|
||||
|
||||
_next_ident = 1; // start numbering CI objects at 1
|
||||
@@ -724,3 +758,28 @@ void ciObjectFactory::print() {
|
||||
_unloaded_instances.length(),
|
||||
_unloaded_klasses.length());
|
||||
}
|
||||
|
||||
|
||||
int ciObjectFactory::compare_cimetadata(ciMetadata** a, ciMetadata** b) {
|
||||
Metadata* am = (*a)->constant_encoding();
|
||||
Metadata* bm = (*b)->constant_encoding();
|
||||
return ((am > bm) ? 1 : ((am == bm) ? 0 : -1));
|
||||
}
|
||||
|
||||
// FIXME: review... Resoring the ciObject arrays after class redefinition
|
||||
void ciObjectFactory::resort_shared_ci_metadata() {
|
||||
if (_shared_ci_metadata == NULL) return;
|
||||
_shared_ci_metadata->sort(ciObjectFactory::compare_cimetadata);
|
||||
|
||||
#ifdef ASSERT
|
||||
if (CIObjectFactoryVerify) {
|
||||
Metadata* last = NULL;
|
||||
for (int j = 0; j< _shared_ci_metadata->length(); j++) {
|
||||
Metadata* o = _shared_ci_metadata->at(j)->constant_encoding();
|
||||
assert(last < o, "out of order");
|
||||
last = o;
|
||||
}
|
||||
}
|
||||
#endif // ASSERT
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,11 @@ class ciObjectFactory : public ArenaObj {
|
||||
|
||||
private:
|
||||
static volatile bool _initialized;
|
||||
static volatile bool _reinitialize_vm_klasses;
|
||||
static GrowableArray<ciMetadata*>* _shared_ci_metadata;
|
||||
static ciSymbol* _shared_ci_symbols[];
|
||||
static int _shared_ident_limit;
|
||||
static Arena* _initial_arena;
|
||||
|
||||
Arena* _arena;
|
||||
GrowableArray<ciMetadata*> _ci_metadata;
|
||||
@@ -89,10 +91,15 @@ private:
|
||||
|
||||
ciInstance* get_unloaded_instance(ciInstanceKlass* klass);
|
||||
|
||||
static int compare_cimetadata(ciMetadata** a, ciMetadata** b);
|
||||
void do_reinitialize_vm_classes();
|
||||
public:
|
||||
static bool is_initialized() { return _initialized; }
|
||||
static bool is_reinitialize_vm_klasses() { return _reinitialize_vm_klasses; }
|
||||
static void set_reinitialize_vm_klasses() { _reinitialize_vm_klasses = true; }
|
||||
|
||||
static void initialize();
|
||||
static void reinitialize_vm_classes();
|
||||
void init_shared_objects();
|
||||
void remove_symbols();
|
||||
|
||||
@@ -145,6 +152,8 @@ public:
|
||||
|
||||
void print_contents();
|
||||
void print();
|
||||
|
||||
static void resort_shared_ci_metadata();
|
||||
};
|
||||
|
||||
#endif // SHARE_CI_CIOBJECTFACTORY_HPP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user