mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
Compare commits
2122 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0b3a60a09 | ||
|
|
15f2376c62 | ||
|
|
efeeea37f6 | ||
|
|
5726e52df2 | ||
|
|
a1b596adc0 | ||
|
|
763196f0cc | ||
|
|
ff9048fcf0 | ||
|
|
7d9c86f584 | ||
|
|
6129360b06 | ||
|
|
3c5e91b611 | ||
|
|
e529a79ddb | ||
|
|
45bb9e6706 | ||
|
|
e6d14507e2 | ||
|
|
9a5881fc47 | ||
|
|
f7dd28002e | ||
|
|
496b0ec41d | ||
|
|
02df578939 | ||
|
|
eb4a1e2692 | ||
|
|
e6bec7d2b2 | ||
|
|
80f3bbb0af | ||
|
|
3a117b3bed | ||
|
|
ff91335011 | ||
|
|
01917439dd | ||
|
|
f21c80c48a | ||
|
|
3dc42b711c | ||
|
|
4b2863ca14 | ||
|
|
fe1b4b45b5 | ||
|
|
a20d6aa2b2 | ||
|
|
78e52a0fe3 | ||
|
|
b4b507ecc9 | ||
|
|
d7d19d7594 | ||
|
|
90df4413c3 | ||
|
|
4cd6646cca | ||
|
|
87ed0d31d4 | ||
|
|
921bdd9e3b | ||
|
|
1f51a603f0 | ||
|
|
5fbbdb8e3c | ||
|
|
745da6ba45 | ||
|
|
ad71e612a3 | ||
|
|
85823e8e5d | ||
|
|
b4fa8bebe9 | ||
|
|
7859a9bb1f | ||
|
|
696d8d1d54 | ||
|
|
6e8d3e0d7f | ||
|
|
6a0422fb27 | ||
|
|
26898feb62 | ||
|
|
0311feee9b | ||
|
|
cf601586fc | ||
|
|
f7b988906e | ||
|
|
5777a6d401 | ||
|
|
4807ca0057 | ||
|
|
f1aeec309e | ||
|
|
4b8e275254 | ||
|
|
4b6a75fb60 | ||
|
|
d463491026 | ||
|
|
df3d5e38ce | ||
|
|
4e22d636d3 | ||
|
|
e71841b871 | ||
|
|
e272c5d000 | ||
|
|
0d7740773e | ||
|
|
e4fbb1b640 | ||
|
|
986252d97f | ||
|
|
e0c1fc81e3 | ||
|
|
ee94e9d619 | ||
|
|
264da1ed78 | ||
|
|
ce37c795a7 | ||
|
|
ed2297ab7f | ||
|
|
ae5d8c9aad | ||
|
|
603ff9256c | ||
|
|
a966cab155 | ||
|
|
978dd65528 | ||
|
|
6502920047 | ||
|
|
ed97757dde | ||
|
|
da8ec1565e | ||
|
|
ad85a4a0e3 | ||
|
|
f9a7cdf4dd | ||
|
|
a5296bab95 | ||
|
|
bda7a2b351 | ||
|
|
f23351f11c | ||
|
|
e3f2541fde | ||
|
|
94723dbba3 | ||
|
|
6e0b92a4de | ||
|
|
13a61f5249 | ||
|
|
1347f81236 | ||
|
|
ab93894442 | ||
|
|
8ed6c2094b | ||
|
|
42d7f1ca67 | ||
|
|
cf51e04777 | ||
|
|
8398c12f74 | ||
|
|
2a345e770e | ||
|
|
b3fcf71982 | ||
|
|
3b94a42783 | ||
|
|
453ddaf0d6 | ||
|
|
d4ff36fde0 | ||
|
|
6239858d0a | ||
|
|
1dd873462e | ||
|
|
825c613d64 | ||
|
|
4aa314b3ab | ||
|
|
8e696e3fc4 | ||
|
|
217cf799c2 | ||
|
|
b10a59661e | ||
|
|
0f028db856 | ||
|
|
c194588118 | ||
|
|
398dc8101f | ||
|
|
13cb330711 | ||
|
|
c0740822a3 | ||
|
|
340e627af9 | ||
|
|
3089a710bd | ||
|
|
7d0474335a | ||
|
|
3d5190f51a | ||
|
|
de2de1e1d7 | ||
|
|
91a4f52f67 | ||
|
|
c8af25533d | ||
|
|
b1f76aeda6 | ||
|
|
3fccd03bbb | ||
|
|
3bcfa7e10b | ||
|
|
cbd7c10f3d | ||
|
|
0d09c24840 | ||
|
|
d54d371ab7 | ||
|
|
c90aa0a742 | ||
|
|
7f0bdea212 | ||
|
|
b29d184488 | ||
|
|
168d6b2080 | ||
|
|
b2c970c3bd | ||
|
|
a0445c4f7b | ||
|
|
9074a6fcf1 | ||
|
|
4c5d2f6ebb | ||
|
|
23ce2ec271 | ||
|
|
5bbc2fd94c | ||
|
|
901b8f0424 | ||
|
|
d2705988ac | ||
|
|
291da649c1 | ||
|
|
48e9d3b4e9 | ||
|
|
45e2578c5b | ||
|
|
a6742de405 | ||
|
|
948b5b2d9c | ||
|
|
6cb9714f06 | ||
|
|
c35eaa7a4d | ||
|
|
bececff9e5 | ||
|
|
2826e6f325 | ||
|
|
6bc1f94b60 | ||
|
|
9fd37221f6 | ||
|
|
db3072630a | ||
|
|
5cf6baca88 | ||
|
|
582858c0d4 | ||
|
|
7d56c64a9c | ||
|
|
902b35e189 | ||
|
|
5f6050aaec | ||
|
|
cb94213a04 | ||
|
|
fa6580f622 | ||
|
|
07effffa5e | ||
|
|
e15bcb51aa | ||
|
|
a04e2bc8f6 | ||
|
|
6aad609a48 | ||
|
|
24c0cc10a1 | ||
|
|
e567061e3c | ||
|
|
32ab1c1a06 | ||
|
|
e76d5854b8 | ||
|
|
d3b6c2d0e6 | ||
|
|
ef6cac6e92 | ||
|
|
0c5e72ab6a | ||
|
|
f67c9735c5 | ||
|
|
858e1aed3b | ||
|
|
3b7f2fbdaa | ||
|
|
2c167d6d27 | ||
|
|
f53d7fc9f3 | ||
|
|
04a4957ccf | ||
|
|
b5f7be2384 | ||
|
|
33a0ee37fa | ||
|
|
1eb9858f62 | ||
|
|
b829abf56c | ||
|
|
139a379a09 | ||
|
|
6a8611d98d | ||
|
|
241b93aab5 | ||
|
|
6d08a4386d | ||
|
|
37b4d5e7b5 | ||
|
|
f3b0971d00 | ||
|
|
05e8e53451 | ||
|
|
08251eeab7 | ||
|
|
8c96ba1c58 | ||
|
|
e170c45556 | ||
|
|
a537fe90a0 | ||
|
|
802ad96c49 | ||
|
|
5d979da3e2 | ||
|
|
b843d8e98a | ||
|
|
af6ad96cb6 | ||
|
|
f9e960070d | ||
|
|
1ab949b7ef | ||
|
|
8b39c8f219 | ||
|
|
14b28ba899 | ||
|
|
dd9b6643e6 | ||
|
|
e3f88395ec | ||
|
|
72ee1d186e | ||
|
|
ee53eca19f | ||
|
|
7331b8d5ae | ||
|
|
d17911d753 | ||
|
|
b41d01f126 | ||
|
|
27fc3fd659 | ||
|
|
cc9dc90655 | ||
|
|
015266181e | ||
|
|
299933c4f7 | ||
|
|
5312d6f9fa | ||
|
|
16eb7b3dbd | ||
|
|
cb9458dab4 | ||
|
|
e32a85a33f | ||
|
|
e4680fb0a2 | ||
|
|
1c52e0018a | ||
|
|
ee2838bada | ||
|
|
4d17265e90 | ||
|
|
6a6b860622 | ||
|
|
e78c452daf | ||
|
|
86e33a1ee9 | ||
|
|
37850ad85a | ||
|
|
daca49658e | ||
|
|
6975d7e2cd | ||
|
|
5b8bed6083 | ||
|
|
7474aa3e5d | ||
|
|
c6d2d51d4c | ||
|
|
9055105627 | ||
|
|
a44de63e24 | ||
|
|
8fc7931132 | ||
|
|
4070833229 | ||
|
|
3a9c3f939e | ||
|
|
aa42fb5076 | ||
|
|
50158a7977 | ||
|
|
f2ded359d8 | ||
|
|
0e358bbefe | ||
|
|
2cea561468 | ||
|
|
8024b0a186 | ||
|
|
2b135cf7e0 | ||
|
|
ce8c64a679 | ||
|
|
f0da6ec82f | ||
|
|
46e3b9b5d6 | ||
|
|
d5a08ae568 | ||
|
|
11f63f9b02 | ||
|
|
5694eaba8c | ||
|
|
484481f886 | ||
|
|
210106901e | ||
|
|
eb247b8607 | ||
|
|
fb1453d98a | ||
|
|
b734fb5511 | ||
|
|
2cd6cb8814 | ||
|
|
2a93eab14c | ||
|
|
f039ea68d0 | ||
|
|
e0c35e0002 | ||
|
|
5ace199dc4 | ||
|
|
556895744b | ||
|
|
7f2c60b0d7 | ||
|
|
7bb9e7ee82 | ||
|
|
26be4c3ac8 | ||
|
|
b80517ab15 | ||
|
|
b17cd3696c | ||
|
|
accd554600 | ||
|
|
8bf586cfa9 | ||
|
|
ebea409e6a | ||
|
|
6fdba3d555 | ||
|
|
e865883611 | ||
|
|
9c484e7b57 | ||
|
|
b365e16cc9 | ||
|
|
6a07a2f85d | ||
|
|
0fd7461266 | ||
|
|
62eb0ccd1d | ||
|
|
3367237da3 | ||
|
|
3504987ab3 | ||
|
|
554e625bda | ||
|
|
84530e0817 | ||
|
|
663fb88367 | ||
|
|
4d99c4b59d | ||
|
|
12ee235380 | ||
|
|
e30ed35d69 | ||
|
|
e2f8c7d989 | ||
|
|
ca6a8a7a46 | ||
|
|
f52dae4297 | ||
|
|
d643f8f8f7 | ||
|
|
08a12dd2b0 | ||
|
|
b33dd5d4f5 | ||
|
|
e797ac3a57 | ||
|
|
8bd31f6375 | ||
|
|
d3f83e63c9 | ||
|
|
b450f4797e | ||
|
|
0552084673 | ||
|
|
d021e2b362 | ||
|
|
c769e9cc32 | ||
|
|
639390115b | ||
|
|
ceaf80a186 | ||
|
|
86274b8b94 | ||
|
|
669427eb24 | ||
|
|
5ba22e7554 | ||
|
|
65ad88eed9 | ||
|
|
e34703ea5a | ||
|
|
55bd2c6da6 | ||
|
|
96b5221c1d | ||
|
|
3a94be9abb | ||
|
|
9656b40d53 | ||
|
|
7e61b513f3 | ||
|
|
1d4cbbe418 | ||
|
|
e0e2996e25 | ||
|
|
a102f5fcbf | ||
|
|
4e5d56e2c0 | ||
|
|
a55177edfa | ||
|
|
4c01a749de | ||
|
|
7b61268f22 | ||
|
|
b11dbe4fe1 | ||
|
|
6dbff81f95 | ||
|
|
9893e7a965 | ||
|
|
814c595c12 | ||
|
|
f8b4d04713 | ||
|
|
3cdc8c5884 | ||
|
|
5eabc05396 | ||
|
|
b2932773b9 | ||
|
|
59a04e6dbf | ||
|
|
ddf1e8a179 | ||
|
|
17cc87d633 | ||
|
|
fd7beb642f | ||
|
|
b766cf0807 | ||
|
|
6c9469961b | ||
|
|
d8844236d0 | ||
|
|
60eb59c605 | ||
|
|
6a7bbb8752 | ||
|
|
e4431749e1 | ||
|
|
c587b357eb | ||
|
|
7357c26d54 | ||
|
|
73ca45ad3d | ||
|
|
bf00503d1f | ||
|
|
44a90f5c7d | ||
|
|
5c3ee9f499 | ||
|
|
03f357efd1 | ||
|
|
5462575f5c | ||
|
|
120e2bc300 | ||
|
|
c3137df83c | ||
|
|
737155a226 | ||
|
|
66d64cf020 | ||
|
|
42f5c0f484 | ||
|
|
75047e26e2 | ||
|
|
9fa6d82775 | ||
|
|
d1468984e7 | ||
|
|
20a2331504 | ||
|
|
5b00c8ee08 | ||
|
|
bda4aadc54 | ||
|
|
9d7e2eccac | ||
|
|
8c219b981c | ||
|
|
7d87c8bb98 | ||
|
|
13afd96806 | ||
|
|
4fb74a1769 | ||
|
|
aa658b7dbc | ||
|
|
7e3601989a | ||
|
|
3a1c0f8d66 | ||
|
|
91160b4311 | ||
|
|
83f4093796 | ||
|
|
f219395b25 | ||
|
|
ae6a7ad8e5 | ||
|
|
d990ee102a | ||
|
|
cfde9939b4 | ||
|
|
a22725bb67 | ||
|
|
7a4040f6ec | ||
|
|
2fbb351314 | ||
|
|
96e85c0685 | ||
|
|
50577c9ea0 | ||
|
|
073323b517 | ||
|
|
37cc8f3aae | ||
|
|
6367152650 | ||
|
|
ffbaef3872 | ||
|
|
a0b2473bf4 | ||
|
|
95a3104a56 | ||
|
|
2d5f77730b | ||
|
|
033a0dfbb9 | ||
|
|
cb682b6e21 | ||
|
|
7312908d4d | ||
|
|
b44f6035b3 | ||
|
|
b6bc8abf83 | ||
|
|
c60c1154b9 | ||
|
|
219afb6244 | ||
|
|
22b6bdb5cf | ||
|
|
d9a47fe815 | ||
|
|
45e987b413 | ||
|
|
a920696d03 | ||
|
|
f72b153fe0 | ||
|
|
d240b4ed49 | ||
|
|
1a21627cdb | ||
|
|
0a115a3c03 | ||
|
|
7ef11f566b | ||
|
|
7f6aa9f9a6 | ||
|
|
4df1496a0f | ||
|
|
b68eb0bb5e | ||
|
|
7c0fb7c4f2 | ||
|
|
ede8048680 | ||
|
|
b10ba8fea0 | ||
|
|
3eb2cca286 | ||
|
|
721ac837e0 | ||
|
|
f6fef35d3d | ||
|
|
0569770239 | ||
|
|
6689b8ebfa | ||
|
|
3cb6c4f775 | ||
|
|
b687eb88f9 | ||
|
|
33a375910a | ||
|
|
a620400e4e | ||
|
|
cc7dc3597b | ||
|
|
60b5842e94 | ||
|
|
2b9c6ec447 | ||
|
|
742a4e53b5 | ||
|
|
0cd10b6b70 | ||
|
|
aabf718e60 | ||
|
|
03116c4ab8 | ||
|
|
38162c0129 | ||
|
|
f62edea450 | ||
|
|
940f1e30c5 | ||
|
|
af32d68c3f | ||
|
|
eb874ac810 | ||
|
|
a79bf4c3ec | ||
|
|
90adacab9f | ||
|
|
e86ca29b8c | ||
|
|
4f1f9a718c | ||
|
|
cc09014e6e | ||
|
|
de98b40c93 | ||
|
|
a6eaa34f6d | ||
|
|
dacb64ae66 | ||
|
|
c0a5e2012f | ||
|
|
389e53a8a0 | ||
|
|
928fbe235a | ||
|
|
7d85a8b6fc | ||
|
|
d004962e3a | ||
|
|
1462a4689d | ||
|
|
93be4c8ed1 | ||
|
|
536c6df438 | ||
|
|
f8a089a61f | ||
|
|
491ee6aa2f | ||
|
|
6a88c7cbaa | ||
|
|
be82ee15b7 | ||
|
|
1ddd3ea2b9 | ||
|
|
a56a8c1d6c | ||
|
|
9c4e314bb6 | ||
|
|
ea26722a18 | ||
|
|
5aee359700 | ||
|
|
5d11fc960e | ||
|
|
707fec0e2a | ||
|
|
55b877d5e0 | ||
|
|
e779285be4 | ||
|
|
cf6ae52889 | ||
|
|
caad705975 | ||
|
|
0c3fc6f858 | ||
|
|
0529155faa | ||
|
|
aa01d58b33 | ||
|
|
0c0caf6942 | ||
|
|
7e01ff451f | ||
|
|
e0e4b0a5a9 | ||
|
|
0e2c1f1355 | ||
|
|
0ed7341f71 | ||
|
|
29e970fd81 | ||
|
|
43ab72dcb8 | ||
|
|
07dc77f13d | ||
|
|
9b2ee998de | ||
|
|
e1c5cd1e86 | ||
|
|
0d0301f4f6 | ||
|
|
29adeae6a3 | ||
|
|
6b62a1963e | ||
|
|
fb2af5593f | ||
|
|
e938b75acd | ||
|
|
03daf0c95b | ||
|
|
189ea1c3c7 | ||
|
|
8448c3367b | ||
|
|
cc29707bb1 | ||
|
|
eff9ecf7cd | ||
|
|
21b22e7667 | ||
|
|
7d5b17d5c9 | ||
|
|
49d47a0eed | ||
|
|
78785ddc3c | ||
|
|
dea6caccf1 | ||
|
|
b917bfca07 | ||
|
|
85f0e04d0e | ||
|
|
440ba3823e | ||
|
|
b580691871 | ||
|
|
72c4f50871 | ||
|
|
7bc2c4a0d4 | ||
|
|
128551e193 | ||
|
|
72f7c72094 | ||
|
|
568b7f5139 | ||
|
|
164cb1285b | ||
|
|
e16be09f9a | ||
|
|
d55c59c796 | ||
|
|
5c13cf9dbf | ||
|
|
19a0dc80db | ||
|
|
683018a9d2 | ||
|
|
4c331341e5 | ||
|
|
ceb26add15 | ||
|
|
4b720ee3a2 | ||
|
|
d4af07ed51 | ||
|
|
a3132b7d13 | ||
|
|
0192c791ce | ||
|
|
f1ec2ef0c4 | ||
|
|
b1e93fda4b | ||
|
|
f349aafc37 | ||
|
|
8ebbe6fb4e | ||
|
|
e38b6ecd2c | ||
|
|
966f3b8597 | ||
|
|
f0756bceb8 | ||
|
|
423e23e3c0 | ||
|
|
2c740cab06 | ||
|
|
519a9edb60 | ||
|
|
e16216b39e | ||
|
|
f221d0f430 | ||
|
|
1aa497cb7b | ||
|
|
738a537723 | ||
|
|
d8d3a315a4 | ||
|
|
f62ca307b0 | ||
|
|
edfac4ef60 | ||
|
|
916962cf83 | ||
|
|
189766ceb4 | ||
|
|
2200e11e85 | ||
|
|
69d000488e | ||
|
|
88f8bb9848 | ||
|
|
4f37345324 | ||
|
|
31fcf86008 | ||
|
|
7d93c54444 | ||
|
|
b2b753c2b3 | ||
|
|
a97f853110 | ||
|
|
3dc5f0e2be | ||
|
|
d7accb6916 | ||
|
|
9c01f3efe3 | ||
|
|
49cc85dd3b | ||
|
|
974b9c77e0 | ||
|
|
f86dffb2f0 | ||
|
|
58f54caf55 | ||
|
|
6cb22ea75b | ||
|
|
e3ef7d53a7 | ||
|
|
0e2bfa25ab | ||
|
|
5cb326f95b | ||
|
|
c55a69c010 | ||
|
|
352df24160 | ||
|
|
5a41be48c3 | ||
|
|
12547a7c8c | ||
|
|
ddf4eb3e2b | ||
|
|
65ed949e1b | ||
|
|
e816b67472 | ||
|
|
e2d75ad6bf | ||
|
|
a1a3fcbe65 | ||
|
|
881b633006 | ||
|
|
400bdaa52c | ||
|
|
0f8ac672f3 | ||
|
|
be37228dc6 | ||
|
|
de386a9927 | ||
|
|
c1da2497a7 | ||
|
|
14150b5a04 | ||
|
|
deabacbd50 | ||
|
|
09a1e59b8c | ||
|
|
47166db166 | ||
|
|
90d243e0ba | ||
|
|
c34df428dc | ||
|
|
c468801c6e | ||
|
|
ace25d353b | ||
|
|
0ac8fcd1eb | ||
|
|
1d9e8dbda7 | ||
|
|
6de00b3a6a | ||
|
|
0a97b59228 | ||
|
|
fdcce1c046 | ||
|
|
30b2378778 | ||
|
|
f1c61f44c6 | ||
|
|
4d7de8d466 | ||
|
|
c8edb6ec6c | ||
|
|
55d046fa36 | ||
|
|
44bb963654 | ||
|
|
00b7ebf9ec | ||
|
|
69544bdf06 | ||
|
|
8a02103d5e | ||
|
|
06332c8f40 | ||
|
|
de910acbf2 | ||
|
|
0074b0be7e | ||
|
|
f94b36f415 | ||
|
|
59449bbe47 | ||
|
|
a4c377dc08 | ||
|
|
e194fcc9d4 | ||
|
|
b8c034f8c5 | ||
|
|
899f2b3fbd | ||
|
|
84e049be07 | ||
|
|
be0fe4c0d0 | ||
|
|
d8a4a94565 | ||
|
|
bed9f324ce | ||
|
|
3859336f0c | ||
|
|
e530cdbc7f | ||
|
|
eca5fb894f | ||
|
|
64f962dbb2 | ||
|
|
763f15fa36 | ||
|
|
df94370598 | ||
|
|
43988b8a7e | ||
|
|
4460d09140 | ||
|
|
f23ee951d9 | ||
|
|
a2443b26f7 | ||
|
|
de2458f72d | ||
|
|
4d3538781b | ||
|
|
623756c4f4 | ||
|
|
f12f10bc9e | ||
|
|
1ed88f3910 | ||
|
|
45ea22083e | ||
|
|
9ede1ab32c | ||
|
|
3d5568f65f | ||
|
|
a097f162a7 | ||
|
|
7a4541dac7 | ||
|
|
376cf6e8fa | ||
|
|
063f59065b | ||
|
|
004cab13dc | ||
|
|
24c243bcf6 | ||
|
|
5c3a0cc654 | ||
|
|
2b9e43db82 | ||
|
|
419a2875b3 | ||
|
|
ce193a0098 | ||
|
|
6f3a5e896c | ||
|
|
19222aefcc | ||
|
|
b7324913e9 | ||
|
|
1b68ea4eba | ||
|
|
621c28bf6f | ||
|
|
864b853306 | ||
|
|
438386a224 | ||
|
|
80c4949dfb | ||
|
|
54b31b8a55 | ||
|
|
93aa1247df | ||
|
|
fb4c21b97a | ||
|
|
d356993e33 | ||
|
|
cf017540e2 | ||
|
|
c776bb6c03 | ||
|
|
e7399d223d | ||
|
|
8aff20b374 | ||
|
|
3b8b95a22f | ||
|
|
2cb65aac72 | ||
|
|
0c8deecfc5 | ||
|
|
74f17fd638 | ||
|
|
f3f13ae4d3 | ||
|
|
daffa4e555 | ||
|
|
c618eec843 | ||
|
|
71a7ae70d0 | ||
|
|
c1a2697e42 | ||
|
|
d4dd57c7c8 | ||
|
|
9e3c6898ad | ||
|
|
b6d7fd6984 | ||
|
|
d8eb027c94 | ||
|
|
80d47b658e | ||
|
|
51f2b24daa | ||
|
|
fe86f69da3 | ||
|
|
2fb51d1a56 | ||
|
|
ca3b5b72ca | ||
|
|
3db8e2aec2 | ||
|
|
499b68b7ad | ||
|
|
2e3bb8e555 | ||
|
|
0c9eab70d5 | ||
|
|
0d3eaa5d86 | ||
|
|
c20634e093 | ||
|
|
5ee3b550bc | ||
|
|
831dac9b47 | ||
|
|
626c34dce8 | ||
|
|
ed67c20cba | ||
|
|
35c209c791 | ||
|
|
315109aa1f | ||
|
|
a57fa34f82 | ||
|
|
d1a2f7d6ed | ||
|
|
8382f68601 | ||
|
|
3aa1dd1e06 | ||
|
|
0571fe383c | ||
|
|
461c5eac3e | ||
|
|
e34f94bb79 | ||
|
|
071bae345e | ||
|
|
9f4625aa00 | ||
|
|
9837473810 | ||
|
|
9d3759c6cd | ||
|
|
6aa55eb056 | ||
|
|
c8b7f350ad | ||
|
|
b6b5045340 | ||
|
|
ab4f17a6f4 | ||
|
|
541f1d5550 | ||
|
|
12942a4e71 | ||
|
|
1a378381bd | ||
|
|
1354c913a4 | ||
|
|
c752fba1c4 | ||
|
|
d40a445f33 | ||
|
|
e0cae1dacb | ||
|
|
31a746f3fc | ||
|
|
b401059678 | ||
|
|
a30f49c75e | ||
|
|
e981fa53f3 | ||
|
|
4cd390ab02 | ||
|
|
716d6ae850 | ||
|
|
ceb07b7425 | ||
|
|
4885175ac6 | ||
|
|
d0f1a40f16 | ||
|
|
fc20d751bb | ||
|
|
dfc22abf35 | ||
|
|
de269e7a48 | ||
|
|
0ed885fe0f | ||
|
|
f9fc7051fc | ||
|
|
ab1f4df9d9 | ||
|
|
710771b8b1 | ||
|
|
2d982e2088 | ||
|
|
ef5fbba56b | ||
|
|
eadcc6f38c | ||
|
|
3db50a690c | ||
|
|
96aa929c31 | ||
|
|
e07fc76abf | ||
|
|
f01e227c87 | ||
|
|
cd34d567a7 | ||
|
|
bb429aae62 | ||
|
|
19f99bab0c | ||
|
|
1f433fc36d | ||
|
|
034cc0cd2f | ||
|
|
3efdc02fed | ||
|
|
501d141e13 | ||
|
|
9c1006f3ae | ||
|
|
5b0813478e | ||
|
|
ac964dc5ec | ||
|
|
11c2f240a1 | ||
|
|
8db2bdb6a7 | ||
|
|
7242eb8f4c | ||
|
|
60c6abbfcc | ||
|
|
a4c432f435 | ||
|
|
d50be26771 | ||
|
|
673027c82d | ||
|
|
e02ccd9b9b | ||
|
|
956276d1ee | ||
|
|
a936cf1ce4 | ||
|
|
5800546369 | ||
|
|
01adc8a2cd | ||
|
|
b1b33b2ae4 | ||
|
|
6506291e4e | ||
|
|
3471b314dd | ||
|
|
546d0a4922 | ||
|
|
c6989c2ef7 | ||
|
|
a5aa002752 | ||
|
|
b89490bca3 | ||
|
|
e33726f526 | ||
|
|
c238767750 | ||
|
|
116aeede2d | ||
|
|
662d80abea | ||
|
|
f6ddb3c5e7 | ||
|
|
6490e565d3 | ||
|
|
6b7ade8d61 | ||
|
|
9b77d7b5e2 | ||
|
|
1785088456 | ||
|
|
4dcd26a21f | ||
|
|
12e99a9d4c | ||
|
|
5e67a1f27b | ||
|
|
2a76e45dc5 | ||
|
|
6266883e81 | ||
|
|
aed9d15625 | ||
|
|
5551e82fea | ||
|
|
653a688fe6 | ||
|
|
dfc1dc2529 | ||
|
|
1e511acf37 | ||
|
|
141ee62af9 | ||
|
|
a5d202ffc8 | ||
|
|
f243ac7464 | ||
|
|
91ac9ca120 | ||
|
|
a56ba50cf9 | ||
|
|
fdaad55cc6 | ||
|
|
9d19214be9 | ||
|
|
038a6b9757 | ||
|
|
bad109ef8d | ||
|
|
5623e1342b | ||
|
|
6bad50c78b | ||
|
|
6929ffb865 | ||
|
|
2d7fdc0896 | ||
|
|
d1d73bcff6 | ||
|
|
bf1441223c | ||
|
|
fadca9a34a | ||
|
|
2ef3a0c157 | ||
|
|
c96a0a7bda | ||
|
|
fe6be686b7 | ||
|
|
05862ae991 | ||
|
|
6a6b6b94cf | ||
|
|
4701b1b67c | ||
|
|
f1b2d5881e | ||
|
|
efed07ac8b | ||
|
|
e5ff987392 | ||
|
|
8a24517fb9 | ||
|
|
a4c8bcab18 | ||
|
|
4fd8ada4ff | ||
|
|
7bf94ffe42 | ||
|
|
088205385f | ||
|
|
39c743631b | ||
|
|
603a95debb | ||
|
|
28a8adb26d | ||
|
|
e2bfd26bb3 | ||
|
|
857aadfa61 | ||
|
|
b8bbbd5489 | ||
|
|
ffb9a8b7ed | ||
|
|
b751f98e91 | ||
|
|
c0ceaa4195 | ||
|
|
6121c35e02 | ||
|
|
c3ea0c74ee | ||
|
|
610f189839 | ||
|
|
5b74739c51 | ||
|
|
775e87ff1f | ||
|
|
c4b7d89713 | ||
|
|
5f17d7aa75 | ||
|
|
3595a94b67 | ||
|
|
435edad604 | ||
|
|
87e616ad23 | ||
|
|
9d556ecc0f | ||
|
|
ea2c2df614 | ||
|
|
202a02af10 | ||
|
|
6ee71e3a9e | ||
|
|
1e7ed14810 | ||
|
|
17383083fb | ||
|
|
f5fe49923b | ||
|
|
457d338a97 | ||
|
|
4928c044af | ||
|
|
299c69686e | ||
|
|
b7132af214 | ||
|
|
74a5c974e6 | ||
|
|
942a4e9616 | ||
|
|
76f732dc53 | ||
|
|
0462cc3d0c | ||
|
|
965207d688 | ||
|
|
0f0a836fa0 | ||
|
|
29fb1de882 | ||
|
|
a807dc81a0 | ||
|
|
a4d3173da9 | ||
|
|
4b6a76bf02 | ||
|
|
35a520f132 | ||
|
|
1c53d2c123 | ||
|
|
591d98b55b | ||
|
|
f39ec58435 | ||
|
|
e72a30ca59 | ||
|
|
368c943040 | ||
|
|
a16e387dff | ||
|
|
95cf828975 | ||
|
|
c09d85f46d | ||
|
|
c2803fe1e2 | ||
|
|
98dfc2e286 | ||
|
|
ea848dbfc0 | ||
|
|
f7cfee55d5 | ||
|
|
26a7b3325d | ||
|
|
47fd5bdc00 | ||
|
|
5dfa9cf501 | ||
|
|
854c99bafa | ||
|
|
937ccbc5bd | ||
|
|
bc7c494316 | ||
|
|
17a2be41da | ||
|
|
ab5966fa9d | ||
|
|
89fe063b02 | ||
|
|
7061a1ebfa | ||
|
|
ec9a947259 | ||
|
|
11441d632b | ||
|
|
a17b647e79 | ||
|
|
2d87d29fa0 | ||
|
|
844845223f | ||
|
|
f2159e26d2 | ||
|
|
d677762dff | ||
|
|
3801e0d60b | ||
|
|
f6a498854c | ||
|
|
29ded2483c | ||
|
|
050e17298a | ||
|
|
af882b172e | ||
|
|
caad8c25ad | ||
|
|
74ef9ece30 | ||
|
|
97bfb4004b | ||
|
|
3da1b3f05d | ||
|
|
f21b22ae15 | ||
|
|
327e904dbc | ||
|
|
57c449936f | ||
|
|
efe6137067 | ||
|
|
96e9400761 | ||
|
|
6a517feda3 | ||
|
|
3b7a928313 | ||
|
|
2739320f10 | ||
|
|
7866e3fc2a | ||
|
|
2abf89cd16 | ||
|
|
8b2dcf976f | ||
|
|
559b86efe1 | ||
|
|
949a26ca0e | ||
|
|
2880ca00da | ||
|
|
39da62532b | ||
|
|
483ba95d80 | ||
|
|
2300b0c692 | ||
|
|
cc59b36c54 | ||
|
|
61d9918dae | ||
|
|
2c361f9b0a | ||
|
|
775b3e8c52 | ||
|
|
2a989c6cc1 | ||
|
|
3d7adf6483 | ||
|
|
56079f70c7 | ||
|
|
6c9e969099 | ||
|
|
76f8e6d6ef | ||
|
|
174cf3ed95 | ||
|
|
540f468e8a | ||
|
|
6b2423cdce | ||
|
|
e4a3181e1d | ||
|
|
b57730c28b | ||
|
|
5a02c38fcd | ||
|
|
2847098020 | ||
|
|
0cc6d90e3d | ||
|
|
66d1b3fd2f | ||
|
|
b28eaf2dbf | ||
|
|
191a99f91b | ||
|
|
f3f1ac939a | ||
|
|
9737b9cd62 | ||
|
|
e3fbb490df | ||
|
|
73d74f6cde | ||
|
|
1487f760b0 | ||
|
|
bdb2ac3a0b | ||
|
|
75bd7805c9 | ||
|
|
ef8e9a83bb | ||
|
|
7d9c24ff51 | ||
|
|
a8e83154f0 | ||
|
|
27c2c4dc33 | ||
|
|
a9a538cec8 | ||
|
|
57e1f7ee10 | ||
|
|
754eb89f04 | ||
|
|
2e95184d30 | ||
|
|
9deab9c497 | ||
|
|
5ae6c8a627 | ||
|
|
05104aef6c | ||
|
|
08da408471 | ||
|
|
4a4d5ac694 | ||
|
|
3b4d6d465b | ||
|
|
26f998ecb6 | ||
|
|
60a717365c | ||
|
|
07ae00aa20 | ||
|
|
39cc845df3 | ||
|
|
6c8b75a05f | ||
|
|
4c8efed256 | ||
|
|
faaa90fa0d | ||
|
|
7e075e5ebb | ||
|
|
b9508d853e | ||
|
|
716d52f3e3 | ||
|
|
90753f4d42 | ||
|
|
7117592f38 | ||
|
|
b9030d7e47 | ||
|
|
b79cfa213d | ||
|
|
60af9970c1 | ||
|
|
33a1e7f055 | ||
|
|
f72e9700ab | ||
|
|
4357d68462 | ||
|
|
adfaa95149 | ||
|
|
d6b887b7db | ||
|
|
227040f82f | ||
|
|
f5440ee52c | ||
|
|
de86aee6a2 | ||
|
|
038b7961db | ||
|
|
8be39488ec | ||
|
|
24f3b8dd3d | ||
|
|
2f61a91459 | ||
|
|
9399cf873f | ||
|
|
63455ce2be | ||
|
|
585058b500 | ||
|
|
57f31123e7 | ||
|
|
b4a3eb240e | ||
|
|
0e40b8a81a | ||
|
|
2510f61a4e | ||
|
|
28e5f62c60 | ||
|
|
586bca4bf6 | ||
|
|
bd30411ba7 | ||
|
|
1b95722757 | ||
|
|
1738c3f50a | ||
|
|
18169b461a | ||
|
|
42c0b6145b | ||
|
|
abd3fe6ed1 | ||
|
|
e918a594f3 | ||
|
|
3539b42c77 | ||
|
|
56277ae6da | ||
|
|
a52fee2248 | ||
|
|
37ea9c6656 | ||
|
|
a8e49c5a85 | ||
|
|
137bfe48ca | ||
|
|
94506848e0 | ||
|
|
97db5e9698 | ||
|
|
d17cd64fea | ||
|
|
949d036a81 | ||
|
|
f1c7dea0ab | ||
|
|
2577a2f637 | ||
|
|
b3728ae658 | ||
|
|
decfad5c99 | ||
|
|
334939324c | ||
|
|
99f8efac9a | ||
|
|
c1b4c4e42a | ||
|
|
a48a1ef272 | ||
|
|
6bdd114b99 | ||
|
|
69c48edfdf | ||
|
|
16a9d0c0c6 | ||
|
|
545ff9de56 | ||
|
|
d42d87280d | ||
|
|
b8026398e0 | ||
|
|
cff8bab3d3 | ||
|
|
5c3bfa690b | ||
|
|
8ab4d25e33 | ||
|
|
eade95dff7 | ||
|
|
ca57f91bfa | ||
|
|
f9668f4ba6 | ||
|
|
618eead341 | ||
|
|
ba68f463e5 | ||
|
|
df1d302bcb | ||
|
|
c2bcbfb1e0 | ||
|
|
4c51efc5e0 | ||
|
|
f19944f54d | ||
|
|
876dbe8179 | ||
|
|
f76e65a58d | ||
|
|
6977061227 | ||
|
|
ce59226909 | ||
|
|
1991afb87b | ||
|
|
61fc479c79 | ||
|
|
8f8f3c5415 | ||
|
|
f547c3ea3c | ||
|
|
02fc175289 | ||
|
|
6ae38aead8 | ||
|
|
52fa2b4479 | ||
|
|
af57b39d8f | ||
|
|
7321d205fe | ||
|
|
6a724352b0 | ||
|
|
69bd438fe1 | ||
|
|
111c4b71aa | ||
|
|
dd572ba024 | ||
|
|
4bc074fa84 | ||
|
|
66a13266e6 | ||
|
|
bfa3538745 | ||
|
|
362413dbe7 | ||
|
|
3f5b258629 | ||
|
|
def20f7e69 | ||
|
|
ceaf9ac24b | ||
|
|
e6f1dd0490 | ||
|
|
da16be7ad8 | ||
|
|
7b1a146976 | ||
|
|
75331cda94 | ||
|
|
a0a39f1c04 | ||
|
|
48de158d7c | ||
|
|
e71091f4a8 | ||
|
|
3987a5df6a | ||
|
|
3cf9658a17 | ||
|
|
d073128cfb | ||
|
|
6319449cbd | ||
|
|
0e08b0226b | ||
|
|
a66fec489c | ||
|
|
65212f22a6 | ||
|
|
541c0d7547 | ||
|
|
b3a8d02d19 | ||
|
|
49610f59ea | ||
|
|
9cf7fc4a2e | ||
|
|
053c897056 | ||
|
|
8397af5c9b | ||
|
|
914b26caec | ||
|
|
2aed6ec13f | ||
|
|
714d421334 | ||
|
|
6c6fe8ad5c | ||
|
|
48aacc0c2e | ||
|
|
6806f8e5ba | ||
|
|
3e9493f3e7 | ||
|
|
89b9d21eaa | ||
|
|
4e047beabb | ||
|
|
d5d1577b43 | ||
|
|
42eea8ffba | ||
|
|
10df0175d5 | ||
|
|
d69eb440d8 | ||
|
|
768e74d9d3 | ||
|
|
355b99c68f | ||
|
|
cf89cbe662 | ||
|
|
e756c9d46f | ||
|
|
9ddd97a6eb | ||
|
|
ee8b665472 | ||
|
|
c4cbcc7232 | ||
|
|
8701e0f402 | ||
|
|
2df4e22bf8 | ||
|
|
b6c6ff51b4 | ||
|
|
40d7e4aa6e | ||
|
|
a5a1ae6725 | ||
|
|
a70ece7b9c | ||
|
|
ed8ee35a86 | ||
|
|
8a6b110d0b | ||
|
|
1f65fbf422 | ||
|
|
25e4902a1c | ||
|
|
bcbda85a40 | ||
|
|
abac42826c | ||
|
|
012b82c395 | ||
|
|
23190e1f87 | ||
|
|
f462a5f14b | ||
|
|
d8219ad971 | ||
|
|
b34b4c2362 | ||
|
|
0986527495 | ||
|
|
0864d582a2 | ||
|
|
3f936b57f5 | ||
|
|
54785b29dd | ||
|
|
c88d428fb5 | ||
|
|
27c08c1edf | ||
|
|
1f8c9b9f71 | ||
|
|
f6e4d56de6 | ||
|
|
0d02af3cf0 | ||
|
|
a7a57e2bd0 | ||
|
|
63edfb8d52 | ||
|
|
8d3ca3292e | ||
|
|
25df658653 | ||
|
|
6b20a9bdd5 | ||
|
|
d399a6427a | ||
|
|
2f1a707fd3 | ||
|
|
cbfe52c756 | ||
|
|
3c1f0057ae | ||
|
|
1a9bd12af0 | ||
|
|
1b853c6a84 | ||
|
|
b9034523b5 | ||
|
|
5af9af1e5a | ||
|
|
eac9fe1b70 | ||
|
|
3cecc0693b | ||
|
|
0e6446b3ef | ||
|
|
b496fedea8 | ||
|
|
dc064008f3 | ||
|
|
652896bd3a | ||
|
|
1fe6dc4c6e | ||
|
|
e35ea13f60 | ||
|
|
e1fb0a5d72 | ||
|
|
e204ef629f | ||
|
|
d2704242f2 | ||
|
|
44a1bbf414 | ||
|
|
6ada7885b1 | ||
|
|
0119ec0055 | ||
|
|
d38d261bbc | ||
|
|
4e636381fd | ||
|
|
fe04d05c28 | ||
|
|
f45cc3fc73 | ||
|
|
490eaef5c1 | ||
|
|
077bc45b7d | ||
|
|
d3d9209b39 | ||
|
|
0884025b82 | ||
|
|
3ce0f8f4a8 | ||
|
|
c76bfceb3e | ||
|
|
7c2e060a5f | ||
|
|
936d1d6072 | ||
|
|
8db0305c83 | ||
|
|
8a8a927699 | ||
|
|
85f276c259 | ||
|
|
28cba0602c | ||
|
|
28e51309cc | ||
|
|
c1bb407b34 | ||
|
|
b047fc0063 | ||
|
|
3d32261f16 | ||
|
|
78f6ef464a | ||
|
|
b3906e770f | ||
|
|
e11a5d0d44 | ||
|
|
ad223a4e5c | ||
|
|
376cb01a16 | ||
|
|
0efb226c2f | ||
|
|
ea92e17ca0 | ||
|
|
c56408640f | ||
|
|
bc53109a1f | ||
|
|
b082a28cc4 | ||
|
|
b22774e33d | ||
|
|
891cc42f08 | ||
|
|
677036fb9c | ||
|
|
8ccb300ea7 | ||
|
|
dff6e09e1c | ||
|
|
fe1ab12fec | ||
|
|
b17808c6c7 | ||
|
|
6b22464771 | ||
|
|
79ace0a106 | ||
|
|
1770235648 | ||
|
|
f325d50ab8 | ||
|
|
c61e807f13 | ||
|
|
7d0d8d5649 | ||
|
|
318e42be26 | ||
|
|
df26127f88 | ||
|
|
afcd39e162 | ||
|
|
f0c544e7c6 | ||
|
|
aec2626d73 | ||
|
|
23085aee6d | ||
|
|
0ee4b1e336 | ||
|
|
a05d09ffea | ||
|
|
9cd7b746a6 | ||
|
|
78b3f5aef1 | ||
|
|
e25d98ef63 | ||
|
|
bbeb7289c1 | ||
|
|
51474b2eae | ||
|
|
9bf9788689 | ||
|
|
b372d20ab0 | ||
|
|
d1ce8a5f9b | ||
|
|
41ce0f57ed | ||
|
|
1a0b0e2385 | ||
|
|
443dedd832 | ||
|
|
caf9ee0c58 | ||
|
|
b2a9965617 | ||
|
|
821eb4568e | ||
|
|
883207bc6b | ||
|
|
15e38e1012 | ||
|
|
8a36897fd9 | ||
|
|
3e736b36b6 | ||
|
|
2e90abd2c5 | ||
|
|
fb99674217 | ||
|
|
69def38152 | ||
|
|
5759f163e3 | ||
|
|
e3106eaa2a | ||
|
|
edca3bebd7 | ||
|
|
620c68e3f1 | ||
|
|
8f2e382c8a | ||
|
|
6a0ad22774 | ||
|
|
2ac6348fbf | ||
|
|
3086f259ff | ||
|
|
95556d35c8 | ||
|
|
ea4f4c45cb | ||
|
|
808b051a3e | ||
|
|
c55146a78c | ||
|
|
cc5a437573 | ||
|
|
4a53717676 | ||
|
|
8385b88ce8 | ||
|
|
73604e90c8 | ||
|
|
c2d1589e74 | ||
|
|
69973af1ed | ||
|
|
f0c679fb61 | ||
|
|
5a2e2b1773 | ||
|
|
e720b61df6 | ||
|
|
44b121e8b0 | ||
|
|
6a7c086514 | ||
|
|
3b59868f62 | ||
|
|
0b77a3f2c1 | ||
|
|
957dfeed81 | ||
|
|
451c550b19 | ||
|
|
21cc8555b5 | ||
|
|
19b80a1c2d | ||
|
|
a000b1a2fe | ||
|
|
856055a04d | ||
|
|
be1c5f5d1d | ||
|
|
278d46ccd7 | ||
|
|
0da31b6bbb | ||
|
|
e8bc94a25a | ||
|
|
d12869dbac | ||
|
|
fecd70c9ad | ||
|
|
4effa999b3 | ||
|
|
dd35a717b7 | ||
|
|
c71577b7bf | ||
|
|
1d3736b98c | ||
|
|
efad16f2c0 | ||
|
|
243820ca95 | ||
|
|
28805bae65 | ||
|
|
e074643783 | ||
|
|
9340c8aae3 | ||
|
|
9158d79126 | ||
|
|
ded452fdfc | ||
|
|
467e9d1463 | ||
|
|
1429f80cf9 | ||
|
|
372908ba9d | ||
|
|
0d1686e170 | ||
|
|
aa527ba29b | ||
|
|
9a545a48ab | ||
|
|
9e808f3ecd | ||
|
|
cb583b5d6c | ||
|
|
2e3c43ad9e | ||
|
|
594a6c1c0f | ||
|
|
15f81cc316 | ||
|
|
434de44ef5 | ||
|
|
1c1396bf4b | ||
|
|
beea4c4147 | ||
|
|
849f6aa3d9 | ||
|
|
3c4d57f63b | ||
|
|
116caeaa74 | ||
|
|
673d43b526 | ||
|
|
c88053a575 | ||
|
|
1f250e87a3 | ||
|
|
cd89b55f5b | ||
|
|
716d6573ca | ||
|
|
a6b8597f5a | ||
|
|
cab1089e22 | ||
|
|
c95e12c136 | ||
|
|
d9a77d396c | ||
|
|
442f164159 | ||
|
|
d6f9ec3f8f | ||
|
|
9ccfadfb54 | ||
|
|
8b6de30e92 | ||
|
|
6408741733 | ||
|
|
7562e8b172 | ||
|
|
929437c159 | ||
|
|
93474d7f43 | ||
|
|
58e3031510 | ||
|
|
1b66c84303 | ||
|
|
1c321b7de2 | ||
|
|
e3cf364903 | ||
|
|
9b1c09818c | ||
|
|
46ba46ce9d | ||
|
|
1b6035d6c6 | ||
|
|
3e5d6cf88c | ||
|
|
a4c5d0bb62 | ||
|
|
9b316795fc | ||
|
|
b12cd66679 | ||
|
|
aac1a37a3f | ||
|
|
140234aef3 | ||
|
|
ec9715f326 | ||
|
|
69ca14bf46 | ||
|
|
0226f3d047 | ||
|
|
76391edad6 | ||
|
|
9b3822a8bd | ||
|
|
72ec6baf79 | ||
|
|
21769886fc | ||
|
|
2dc1886ee9 | ||
|
|
a29e3789d2 | ||
|
|
17db605b17 | ||
|
|
4e520938c9 | ||
|
|
7498a72f70 | ||
|
|
241bbd80bc | ||
|
|
2e05845410 | ||
|
|
a67263fa27 | ||
|
|
6d8b7bef09 | ||
|
|
3e30f75e7b | ||
|
|
7eb4b40dc7 | ||
|
|
e3a6ac548b | ||
|
|
044e65eb20 | ||
|
|
545604da63 | ||
|
|
4b9aff5b29 | ||
|
|
a93049056a | ||
|
|
3543fa4caa | ||
|
|
51a98736e8 | ||
|
|
12a8cadcfe | ||
|
|
aef959854f | ||
|
|
066161f397 | ||
|
|
d3e3de3fa2 | ||
|
|
194bc3e5be | ||
|
|
a9e3db0464 | ||
|
|
334ba3ede2 | ||
|
|
7978964995 | ||
|
|
d5ca4c4f28 | ||
|
|
08c2e1cd4e | ||
|
|
2f6e91cd9e | ||
|
|
888976873a | ||
|
|
5db608c3fc | ||
|
|
e46807c600 | ||
|
|
7799bbb57a | ||
|
|
7da8a5b1d8 | ||
|
|
ae9f4fa876 | ||
|
|
e3dd5900e2 | ||
|
|
aab865fe25 | ||
|
|
62656f4c51 | ||
|
|
b323d711cf | ||
|
|
9b4cf917d9 | ||
|
|
ba97573f93 | ||
|
|
9dc62e1469 | ||
|
|
55c0cb66e3 | ||
|
|
a8526585cb | ||
|
|
3850349eae | ||
|
|
f5bd0b7971 | ||
|
|
42d9753bdb | ||
|
|
17d5a5309a | ||
|
|
71be77c54b | ||
|
|
93c1fbd65e | ||
|
|
c8114347dc | ||
|
|
3c2c2b003f | ||
|
|
2edd6cd6c4 | ||
|
|
6713f65040 | ||
|
|
82ee4ad4ca | ||
|
|
d9134f7fe1 | ||
|
|
ee26839292 | ||
|
|
cd33376c07 | ||
|
|
e57481b87c | ||
|
|
5601aab043 | ||
|
|
1b7a1852bc | ||
|
|
509795e6c1 | ||
|
|
755642862f | ||
|
|
d1c05174b6 | ||
|
|
85b8698e35 | ||
|
|
471ba80b4d | ||
|
|
9dd555f111 | ||
|
|
7df1ff07a7 | ||
|
|
15a60930d2 | ||
|
|
eb779c5986 | ||
|
|
c051f5d3e7 | ||
|
|
ed9e463550 | ||
|
|
a7ebf1f60e | ||
|
|
6ab0ec547c | ||
|
|
26a0352851 | ||
|
|
8631cb0c2a | ||
|
|
a302448b76 | ||
|
|
fef072f721 | ||
|
|
46f196cb3f | ||
|
|
c5cd6422c6 | ||
|
|
5edc0b876c | ||
|
|
131699d309 | ||
|
|
59c01feaea | ||
|
|
772b50fdfb | ||
|
|
bf493c5763 | ||
|
|
e1f410ceff | ||
|
|
d3fb00d441 | ||
|
|
222e9f6645 | ||
|
|
22a904baf4 | ||
|
|
01670e5e85 | ||
|
|
7fbb540674 | ||
|
|
bed5361879 | ||
|
|
82cc528c49 | ||
|
|
1df64031c8 | ||
|
|
ea2d181741 | ||
|
|
3cd177bff2 | ||
|
|
132fc181cd | ||
|
|
987840e480 | ||
|
|
86096708da | ||
|
|
635f0606e0 | ||
|
|
3d15a108af | ||
|
|
254b204d6c | ||
|
|
ac645c63d3 | ||
|
|
0b9f1cc3b9 | ||
|
|
b96fee95f3 | ||
|
|
8cb7fb71d1 | ||
|
|
aac6385dc6 | ||
|
|
f7ee165f43 | ||
|
|
7132b75ffb | ||
|
|
bdd4854b0d | ||
|
|
8396e40fa0 | ||
|
|
71b06f4b20 | ||
|
|
a5274daeaa | ||
|
|
36f51c427b | ||
|
|
b3d102419b | ||
|
|
5c304c002b | ||
|
|
f96e529230 | ||
|
|
717f78ce7f | ||
|
|
b224a584fb | ||
|
|
31ef6173a1 | ||
|
|
f0697679f4 | ||
|
|
8657cf26de | ||
|
|
a8ed57bd65 | ||
|
|
bfcd01afb9 | ||
|
|
1a9e3944dc | ||
|
|
1da2ca1eb8 | ||
|
|
ccac2e497d | ||
|
|
a1d9794c0e | ||
|
|
6ee8c37cf5 | ||
|
|
c605986e8a | ||
|
|
a8c9e96b72 | ||
|
|
4cc637c0b2 | ||
|
|
4b41ae6980 | ||
|
|
6cf8369a24 | ||
|
|
e74c0f5cf5 | ||
|
|
d7707bae62 | ||
|
|
680587e050 | ||
|
|
ee7c6a91a7 | ||
|
|
6879cf765f | ||
|
|
f29febdc86 | ||
|
|
4b40546750 | ||
|
|
fcfaaacdcc | ||
|
|
68d72eac16 | ||
|
|
19c367b540 | ||
|
|
82cb7917e4 | ||
|
|
9b87bb8850 | ||
|
|
5d4b998be4 | ||
|
|
5f63db4a34 | ||
|
|
32eddbf581 | ||
|
|
ef9f0cfca7 | ||
|
|
1a157c7256 | ||
|
|
633fa7213a | ||
|
|
1ba185bf71 | ||
|
|
b4f0af4c77 | ||
|
|
785140d439 | ||
|
|
02d31d2d2a | ||
|
|
f60f9f9fc9 | ||
|
|
a7e2c06bc4 | ||
|
|
1c4a00dd00 | ||
|
|
7285537d73 | ||
|
|
12f975fa70 | ||
|
|
4b0b9acceb | ||
|
|
a9a2ec7c7b | ||
|
|
16d9571743 | ||
|
|
c1751f39ae | ||
|
|
e9c349fc55 | ||
|
|
8dcd5c6e34 | ||
|
|
3138d2c4a2 | ||
|
|
c56159da89 | ||
|
|
d0aec62997 | ||
|
|
b7003d499c | ||
|
|
76f550d9e7 | ||
|
|
a7b9b185bb | ||
|
|
48b5262855 | ||
|
|
c053d54d10 | ||
|
|
9289ebf4c9 | ||
|
|
15665b03a7 | ||
|
|
a7fe8baebe | ||
|
|
71c672eb9b | ||
|
|
caab58063f | ||
|
|
ee49f17895 | ||
|
|
2eb7825e69 | ||
|
|
e6c150c586 | ||
|
|
9f61f04680 | ||
|
|
5b148f2d7a | ||
|
|
ef0a915188 | ||
|
|
a88cd4d23d | ||
|
|
4ea6f61c52 | ||
|
|
d3a227d0bc | ||
|
|
08ca626b2f | ||
|
|
c84c106b17 | ||
|
|
2362e7a11f | ||
|
|
66f94a452d | ||
|
|
95d84f78e3 | ||
|
|
6e0249d6ea | ||
|
|
72cf94106c | ||
|
|
8ad0239bca | ||
|
|
37d2d58d2f | ||
|
|
0f45bef980 | ||
|
|
5b84011888 | ||
|
|
63f4d553cc | ||
|
|
b66304fc91 | ||
|
|
48f27c2174 | ||
|
|
f9f67d3bcd | ||
|
|
2ac1a58d5e | ||
|
|
a53cfaa63a | ||
|
|
86e003b891 | ||
|
|
4d677f430b | ||
|
|
551da69a4c | ||
|
|
218f284678 | ||
|
|
d7c6451f53 | ||
|
|
41db0bfafa | ||
|
|
f8ed89ee2c | ||
|
|
c75659db82 | ||
|
|
0093d4418e | ||
|
|
132164c3de | ||
|
|
2c71f61bfc | ||
|
|
68df6d37f7 | ||
|
|
92bb852921 | ||
|
|
d345508195 | ||
|
|
e8d77f8269 | ||
|
|
bca7f738a1 | ||
|
|
f4046fb8fc | ||
|
|
c6bd6d4a3b | ||
|
|
330b4504dc | ||
|
|
07ad9ed772 | ||
|
|
fcb00292a5 | ||
|
|
af1d687758 | ||
|
|
d4e484e982 | ||
|
|
2ccf8e777c | ||
|
|
405b97e4d3 | ||
|
|
35c7f826bc | ||
|
|
1e1cdb0ef0 | ||
|
|
fde5b39495 | ||
|
|
c9fae32ddf | ||
|
|
7f0bdc95da | ||
|
|
ac53b4bcab | ||
|
|
b4b2c41b34 | ||
|
|
21f8fb4090 | ||
|
|
3cef784f75 | ||
|
|
a7092ada08 | ||
|
|
d7b591f1a2 | ||
|
|
8b7583e628 | ||
|
|
7405302a15 | ||
|
|
8ecd04cf5c | ||
|
|
35b92ac453 | ||
|
|
fff91d555b | ||
|
|
e0112472d6 | ||
|
|
7007fb53e7 | ||
|
|
44000d2518 | ||
|
|
1843db91af | ||
|
|
eaacb4d102 | ||
|
|
be81a6dc34 | ||
|
|
73b5c8512d | ||
|
|
b1adfe38e1 | ||
|
|
639ae7be4d | ||
|
|
53c8f6ec74 | ||
|
|
d1b942cea5 | ||
|
|
8850d42246 | ||
|
|
c22d1033eb | ||
|
|
c373174436 | ||
|
|
c42bd6008a | ||
|
|
00236de741 | ||
|
|
85ed93e67b | ||
|
|
6219743c82 | ||
|
|
4de8990b5c | ||
|
|
0717d4a1b4 | ||
|
|
2fde4c7c98 | ||
|
|
21525a7261 | ||
|
|
c760ccb5bb | ||
|
|
7cca646e3f | ||
|
|
1aa21b8a2d | ||
|
|
143cdbd44b | ||
|
|
e688d34587 | ||
|
|
db5402dc09 | ||
|
|
fe977f4ba9 | ||
|
|
4ccd963037 | ||
|
|
b1c597e662 | ||
|
|
16a0fe4281 | ||
|
|
fee176dc72 | ||
|
|
b6f76ad8ed | ||
|
|
0d11f4460f | ||
|
|
ee2b412a10 | ||
|
|
cf67adfa42 | ||
|
|
4029c333ed | ||
|
|
0c6bd73996 | ||
|
|
d91abb5eba | ||
|
|
d177d69724 | ||
|
|
64e35886b7 | ||
|
|
7f75f814e3 | ||
|
|
6527c942c2 | ||
|
|
ea71389982 | ||
|
|
32d47456de | ||
|
|
407c13fcce | ||
|
|
39b935affe | ||
|
|
1f2fe6b93d | ||
|
|
d7811e2c55 | ||
|
|
5b692067d8 | ||
|
|
ebbbcafe5c | ||
|
|
6fb6de6b64 | ||
|
|
24c7f1d5b7 | ||
|
|
93e1c4c4e8 | ||
|
|
72eac9f149 | ||
|
|
fddb790c70 | ||
|
|
771bb22962 | ||
|
|
59dd372ec8 | ||
|
|
a3b3eeb56a | ||
|
|
7795872be1 | ||
|
|
c3e41710c7 | ||
|
|
386ae7d8c3 | ||
|
|
2e338ebc01 | ||
|
|
8314b147d5 | ||
|
|
cab3410d23 | ||
|
|
45b00c8b5f | ||
|
|
183b8770bb | ||
|
|
950598911c | ||
|
|
8a485575f5 | ||
|
|
1e6b493b41 | ||
|
|
959988a670 | ||
|
|
907f25c231 | ||
|
|
2d7dd36b0d | ||
|
|
0168a3b741 | ||
|
|
2f19ff768d | ||
|
|
a2c80e3fd6 | ||
|
|
356273d71e | ||
|
|
6223b26888 | ||
|
|
147aefc7e5 | ||
|
|
0cc7004d0d | ||
|
|
f263685e44 | ||
|
|
a17bc43d80 | ||
|
|
d805d976a6 | ||
|
|
688ca01b1b | ||
|
|
42461c467f | ||
|
|
2c3a6d38ab | ||
|
|
ce22028781 | ||
|
|
2a7b698a3d | ||
|
|
ef747cc4c0 | ||
|
|
b7dd936dae | ||
|
|
f34b946ea9 | ||
|
|
2326e090af | ||
|
|
f2f6dd2219 | ||
|
|
ee10322603 | ||
|
|
af444999bf | ||
|
|
8423f78586 | ||
|
|
d4265f16eb | ||
|
|
cadd4e5c2b | ||
|
|
6cba868e20 | ||
|
|
4f98149fa7 | ||
|
|
32cfaac1e2 | ||
|
|
d954d9280f | ||
|
|
0ad0a91fa4 | ||
|
|
c18cb9f61e | ||
|
|
4a908a314f | ||
|
|
188723e888 | ||
|
|
4e86d874a7 | ||
|
|
8646fb4487 | ||
|
|
a91afdb6ae | ||
|
|
6e71d5aa31 | ||
|
|
b5912c59cc | ||
|
|
a9635bb78a | ||
|
|
9481c70ecd | ||
|
|
b6939654b3 | ||
|
|
c84ac0bc10 | ||
|
|
3a7a3a6e9c | ||
|
|
de327cf3a4 | ||
|
|
2e4eaf8d33 | ||
|
|
f0b392575f | ||
|
|
f1c03f8b1d | ||
|
|
8760fb39cb | ||
|
|
1e17aa7431 | ||
|
|
293fc17aa6 | ||
|
|
2eb83b0035 | ||
|
|
7a2b3397a3 | ||
|
|
7838d420d8 | ||
|
|
3e6865ffa9 | ||
|
|
c26bea06d6 | ||
|
|
f2cd60e7b2 | ||
|
|
903a4a9222 | ||
|
|
06e0bb19a3 | ||
|
|
e6dc731921 | ||
|
|
61cf13edf8 | ||
|
|
31e5ec7bc3 | ||
|
|
372981920e | ||
|
|
4c9459def3 | ||
|
|
26b881e4c9 | ||
|
|
93802f5872 | ||
|
|
205d88cd23 | ||
|
|
02a63639da | ||
|
|
4a1de5d1cb | ||
|
|
209d33ca57 | ||
|
|
e854e42bd7 | ||
|
|
b25cc17ac9 | ||
|
|
0af8b8155f | ||
|
|
7f97416e6e | ||
|
|
3cbbfb1782 | ||
|
|
ced9706c5b | ||
|
|
7f21cdffa2 | ||
|
|
0e2add204b | ||
|
|
490c7e8fec | ||
|
|
a4b4360df6 | ||
|
|
0a29f25330 | ||
|
|
5532a0673f | ||
|
|
9b9c040d2d | ||
|
|
305b4d0ac0 | ||
|
|
615a96f9d8 | ||
|
|
0da508594b | ||
|
|
89643d1538 | ||
|
|
9900a51757 | ||
|
|
e6a08b9c18 | ||
|
|
e8027293bf | ||
|
|
0e00555703 | ||
|
|
a251c7325a | ||
|
|
e5d664bc07 | ||
|
|
460d5a9386 | ||
|
|
df06dd49c5 | ||
|
|
096bdef25a | ||
|
|
5286a2d9ae | ||
|
|
714b62049c | ||
|
|
1eb6f781b3 | ||
|
|
b4c2f7d371 | ||
|
|
424bba71f7 | ||
|
|
36a4930b35 | ||
|
|
9227fba474 | ||
|
|
4a8e59a95b | ||
|
|
bd5da4a36e | ||
|
|
a926b7b912 | ||
|
|
179e222919 | ||
|
|
1b98afe37d | ||
|
|
cfb4b5bd51 | ||
|
|
8e7bfb7f1a | ||
|
|
15bcf71aaf | ||
|
|
5b38c43b7e | ||
|
|
4d7d449cea | ||
|
|
ac100936c7 | ||
|
|
5eb289f1fe | ||
|
|
fe7ae9450b | ||
|
|
91d05c5de6 | ||
|
|
ac019a7d7e | ||
|
|
8c306a5d3d | ||
|
|
785ecb8a78 | ||
|
|
fa352b6917 | ||
|
|
29f50bb70b | ||
|
|
83bbde8d29 | ||
|
|
d69eee55dd | ||
|
|
d9ec628333 | ||
|
|
16a1ae3010 | ||
|
|
8603ec1c99 | ||
|
|
0a3cfe001d | ||
|
|
ee8e1996d9 | ||
|
|
0ab565ab02 | ||
|
|
744b9f574c | ||
|
|
f259e347aa | ||
|
|
b330829f09 | ||
|
|
5a59bc2abc | ||
|
|
8dd76a6cc8 | ||
|
|
b4cbfa02cf | ||
|
|
073eee8fab | ||
|
|
5c7a529fa1 | ||
|
|
3bd01c0d98 | ||
|
|
a3d71b1dca | ||
|
|
319068eef5 | ||
|
|
bc6d33e4fb | ||
|
|
004d99fc3a | ||
|
|
49b5deb9f4 | ||
|
|
47ca69b80e | ||
|
|
8990fad85a | ||
|
|
ab2458bdf4 | ||
|
|
97f15c04b4 | ||
|
|
a1b937b1fb | ||
|
|
896c13a612 | ||
|
|
27e5f8eeb6 | ||
|
|
362f8acb15 | ||
|
|
b58bc685e1 | ||
|
|
9ff92aeb40 | ||
|
|
0b52092eda | ||
|
|
0300d77fdb | ||
|
|
4839558429 | ||
|
|
b8e383368d | ||
|
|
51d9d37d1a | ||
|
|
8e46751e98 | ||
|
|
b0b9ce0cf8 | ||
|
|
09d3ecde2a | ||
|
|
8ed03051c3 | ||
|
|
104000fbc4 | ||
|
|
9bc569bf9a | ||
|
|
7f4cc6e5c0 | ||
|
|
0aacf1d07f | ||
|
|
b6e2bbc434 | ||
|
|
9a97c6c328 | ||
|
|
e04511269a | ||
|
|
ff566aa51f | ||
|
|
3e3a5273c0 | ||
|
|
367356f7f5 | ||
|
|
f4dd79ab43 | ||
|
|
f9fa58a6ea | ||
|
|
9c055ea1fd | ||
|
|
046a5866bf | ||
|
|
22d75ed856 | ||
|
|
a641f27b7e | ||
|
|
f0ab13ebc3 | ||
|
|
31426a289c | ||
|
|
78a87baa94 | ||
|
|
b2648afc7b | ||
|
|
be738eb5e7 | ||
|
|
740619529c | ||
|
|
441f4a9fc7 | ||
|
|
cd200b978b | ||
|
|
0a8368d639 | ||
|
|
9ade281a92 | ||
|
|
eb066b3539 | ||
|
|
00648c9673 | ||
|
|
c7d179d68e | ||
|
|
c1ad816211 | ||
|
|
4328a335ec | ||
|
|
d3e47245d6 | ||
|
|
0e32dd667d | ||
|
|
95437b2afe | ||
|
|
d15307a237 | ||
|
|
ac76e47b94 | ||
|
|
df50f1934e | ||
|
|
dc85616549 | ||
|
|
8ae15abb85 | ||
|
|
84a6fff034 | ||
|
|
c09a8bca7f | ||
|
|
90e0aa83d8 | ||
|
|
81652e3650 | ||
|
|
bdd2f51497 | ||
|
|
688e921034 | ||
|
|
e27993aff2 | ||
|
|
46388f4707 | ||
|
|
d68b931013 | ||
|
|
8807d6c6f3 | ||
|
|
14adcc0e51 | ||
|
|
a09aec032f | ||
|
|
7784fca0d4 | ||
|
|
68bd5569ce | ||
|
|
60e1c23a6b | ||
|
|
77fbb54ebc | ||
|
|
9b7b782020 | ||
|
|
bb3e0c126f | ||
|
|
3aeb9f31b0 | ||
|
|
8b19f0c3c0 | ||
|
|
73e259d6e7 | ||
|
|
f9039f4b34 | ||
|
|
5fb046ad1f | ||
|
|
7b089a1f2f | ||
|
|
867faef496 | ||
|
|
557313ae1e | ||
|
|
e4c2049975 | ||
|
|
b4ef19dac7 | ||
|
|
dc6c1fa622 | ||
|
|
d9db8401e2 | ||
|
|
9fe8a0f491 | ||
|
|
43d6b48cab | ||
|
|
ad40c53eb2 | ||
|
|
c71c610eba | ||
|
|
cf1fe04431 | ||
|
|
8f16a733b9 | ||
|
|
bc4991f915 | ||
|
|
7a8e923b41 | ||
|
|
e54dbcf574 | ||
|
|
c5d023822d | ||
|
|
e28d6e7451 | ||
|
|
9f275cc84f | ||
|
|
575903f921 | ||
|
|
02b3b94804 | ||
|
|
17ecdbf8ec | ||
|
|
80e0782fdb | ||
|
|
c505b5b9cb | ||
|
|
99f37504de | ||
|
|
69f4c6e5e9 | ||
|
|
fd98db1b70 | ||
|
|
205f3a327e | ||
|
|
750f7463cc | ||
|
|
f84b661af7 | ||
|
|
56330686be | ||
|
|
a41e91a731 | ||
|
|
e758b16ba3 | ||
|
|
e48c61cf27 | ||
|
|
08c802f733 | ||
|
|
7e4babaca8 | ||
|
|
f65c792191 | ||
|
|
e572c5776d | ||
|
|
5d1e53f469 | ||
|
|
bef20f7808 | ||
|
|
b47736b595 | ||
|
|
2dbfbe70af | ||
|
|
3f1d9ed366 | ||
|
|
b30bb21646 | ||
|
|
acfd5aa02f | ||
|
|
d8b16766f5 | ||
|
|
b902cc6531 | ||
|
|
2248cd96b1 | ||
|
|
01b7059582 | ||
|
|
7fd0d87d56 | ||
|
|
be515d4c40 | ||
|
|
ceee311efa | ||
|
|
f137d759c8 | ||
|
|
f5250d6bcf | ||
|
|
af42d2ff66 | ||
|
|
f1339f8b4a | ||
|
|
eed7ef1ac3 | ||
|
|
c7c654d310 | ||
|
|
94a7d3116a | ||
|
|
e770fcd197 | ||
|
|
5a0f965125 | ||
|
|
206be8b110 | ||
|
|
4189700a3b | ||
|
|
9a968674d6 | ||
|
|
18c9340950 | ||
|
|
78ef07cf0f | ||
|
|
d510f8c7cf | ||
|
|
2180a8faef | ||
|
|
2340ab0518 | ||
|
|
de5c6a4084 | ||
|
|
ce06d9bdfb | ||
|
|
33c11baca9 | ||
|
|
8fbdcd54aa | ||
|
|
20d3a84fc0 | ||
|
|
58a65b0004 | ||
|
|
bbd00a6020 | ||
|
|
63f544918d | ||
|
|
93938d6090 | ||
|
|
144e30775f | ||
|
|
f74eff8934 | ||
|
|
8ba96904a6 | ||
|
|
dbbc525174 | ||
|
|
b9324f44e6 | ||
|
|
d6c5e3dc3e | ||
|
|
7c350dde90 | ||
|
|
2c1759ce0a | ||
|
|
7f5a32a83b | ||
|
|
379f77af48 | ||
|
|
4b59d57f89 | ||
|
|
15b3860f83 | ||
|
|
b71a9b7d14 | ||
|
|
85352868ec | ||
|
|
310059f274 | ||
|
|
b5cc3b6f1b | ||
|
|
de9421e68f | ||
|
|
413443aa95 | ||
|
|
82d7c54a3d | ||
|
|
9123b21e18 | ||
|
|
56cca88fbd | ||
|
|
9b853350f1 | ||
|
|
e3b5a55eba | ||
|
|
366dc80dc0 | ||
|
|
ba2ee6d6e5 | ||
|
|
6afcf1a26f | ||
|
|
ee831fbcb6 | ||
|
|
4d87eefbe9 | ||
|
|
ec04fea9be | ||
|
|
1586aee2d2 | ||
|
|
226169bbbe | ||
|
|
e1e73077a1 | ||
|
|
7b5cfcb817 | ||
|
|
b3645ec945 | ||
|
|
7d06460e54 | ||
|
|
485761f45c | ||
|
|
f3d788de16 | ||
|
|
b06f5630c7 | ||
|
|
5c96a28fb6 | ||
|
|
9425569784 | ||
|
|
8b982b977b | ||
|
|
7a9d7b59e8 | ||
|
|
4720cf9fbe | ||
|
|
68f93c5e3d | ||
|
|
7b8330f8f8 | ||
|
|
63696b9f5f | ||
|
|
727b3c6b10 | ||
|
|
05cb3831a2 | ||
|
|
5b51375404 | ||
|
|
398e845e8d | ||
|
|
45c29888b4 | ||
|
|
82c5bd528c | ||
|
|
45d0b614c2 | ||
|
|
4725ff6d5f | ||
|
|
7158d4d4ad | ||
|
|
502d90b117 | ||
|
|
f0c95b3f29 | ||
|
|
d3dccace37 | ||
|
|
a30453616b | ||
|
|
168ba2ff9f | ||
|
|
2ca9a8fc79 | ||
|
|
6456a68805 | ||
|
|
e82b607fa1 | ||
|
|
7168c9ed59 | ||
|
|
d7af6934b6 | ||
|
|
b4a5a936a0 | ||
|
|
6129e0d696 | ||
|
|
a0c8424800 | ||
|
|
dc839e1ad1 | ||
|
|
59155256a9 | ||
|
|
29b7995e7f | ||
|
|
ae9ec8851c | ||
|
|
7c2df736df | ||
|
|
192e7d5060 | ||
|
|
6aed140ecf | ||
|
|
76d56c9ed4 | ||
|
|
17096055f8 | ||
|
|
c6134bc038 | ||
|
|
16f885f469 | ||
|
|
00072d0216 | ||
|
|
4878f70e58 | ||
|
|
9e8523470d | ||
|
|
7316be0bc2 | ||
|
|
8a4b663890 | ||
|
|
3276ad9979 | ||
|
|
0890043bf4 | ||
|
|
c90ef343c1 | ||
|
|
0f6e276113 | ||
|
|
1395c95831 | ||
|
|
33b70a550f | ||
|
|
985e924e9d | ||
|
|
3827919a32 | ||
|
|
d55bea7c46 | ||
|
|
2efe326fdb | ||
|
|
d43bd23e1a | ||
|
|
015ec12215 | ||
|
|
fde9dc7961 | ||
|
|
ed572ececf | ||
|
|
fd2b79bea9 | ||
|
|
acc10930c2 | ||
|
|
f17d6c2359 | ||
|
|
e21211f3f6 | ||
|
|
58deaa6b29 | ||
|
|
fcd88b4b3b | ||
|
|
3bd987ff2c | ||
|
|
45bcdc8c46 | ||
|
|
0d0b2d6962 | ||
|
|
fd6a41d219 | ||
|
|
b052429a73 | ||
|
|
1996f401e0 | ||
|
|
3b3f2226f1 | ||
|
|
5c0f6a1e50 | ||
|
|
b7438f6ab8 | ||
|
|
84f80b3e06 | ||
|
|
c281372b8d | ||
|
|
788a3cfc5e | ||
|
|
01eeb53af0 | ||
|
|
7cf69128ea | ||
|
|
c977baecc4 | ||
|
|
2ab2f5e675 | ||
|
|
6a38f1e9f3 | ||
|
|
f0eba69c4a | ||
|
|
cea366e135 | ||
|
|
d752c7434f | ||
|
|
4402120ffc | ||
|
|
b3fffdf530 | ||
|
|
8d6d959e17 | ||
|
|
43f5cc622e | ||
|
|
5f025bcbcc | ||
|
|
8297e22f10 | ||
|
|
989eade5d7 | ||
|
|
cd4de2ff96 | ||
|
|
73d66365e9 | ||
|
|
fbd4e593d2 | ||
|
|
033ef3889a | ||
|
|
0ce1b5d40b | ||
|
|
ed4ed6b433 | ||
|
|
4cd18b8358 | ||
|
|
fb85f272a1 | ||
|
|
28bb28b79c | ||
|
|
e3b6cfd54f | ||
|
|
bf6ed3d540 | ||
|
|
9c0a270d90 | ||
|
|
5112c3aa1e | ||
|
|
57dcf6cc93 | ||
|
|
48296775ae | ||
|
|
e3cb078306 | ||
|
|
2f78a10e4c | ||
|
|
f3e2e35533 | ||
|
|
0d9175dc15 | ||
|
|
302caba403 | ||
|
|
920b32b432 | ||
|
|
81e5c945b4 | ||
|
|
78ea4276ae | ||
|
|
12a36d08e2 | ||
|
|
e4879f7546 | ||
|
|
34b8f481e1 | ||
|
|
f36014194d | ||
|
|
763d1f0e2d | ||
|
|
5c6fb302d9 | ||
|
|
f748b75a19 | ||
|
|
6a815d5ebb | ||
|
|
bfb079cb4f | ||
|
|
89afbd1aef | ||
|
|
ed9922c8a9 | ||
|
|
3fe231cdb0 | ||
|
|
269af11eb4 | ||
|
|
6ed3936424 | ||
|
|
24c8fc6957 | ||
|
|
9965322505 | ||
|
|
9b04373809 | ||
|
|
6fffc589bf | ||
|
|
0889764bcc | ||
|
|
e40bb5c498 | ||
|
|
a255e062be | ||
|
|
02c3821ea7 | ||
|
|
e61dfa0927 | ||
|
|
c8304eb497 | ||
|
|
6e21f703ab | ||
|
|
7550cf394c | ||
|
|
d05805595e | ||
|
|
975c3a9276 | ||
|
|
43d5fe2f4d | ||
|
|
a2fb9306c7 | ||
|
|
4c07983834 | ||
|
|
b28d45df8a | ||
|
|
c863b2f65b | ||
|
|
896cad1fe0 | ||
|
|
8b9b284ae9 | ||
|
|
9ffd393a4a | ||
|
|
559fd28036 | ||
|
|
4452f9754e | ||
|
|
983c1b4a90 | ||
|
|
cd9d0bcf34 | ||
|
|
ec294228ae | ||
|
|
bbfb0556a6 | ||
|
|
0b8b887978 | ||
|
|
9320ffdbbd | ||
|
|
a955f522bd | ||
|
|
2526eda0db | ||
|
|
5b2dc51c07 | ||
|
|
30c0ce8d2c | ||
|
|
c758eb244b | ||
|
|
d9f5a974cb | ||
|
|
658d4ec478 | ||
|
|
72f9da2a67 | ||
|
|
41c70bce44 | ||
|
|
999db12a3a | ||
|
|
7a30072fcb | ||
|
|
0cdacc4b9f | ||
|
|
a6b04e99f6 | ||
|
|
8aa4402f88 | ||
|
|
295b32b890 | ||
|
|
0dcf02f891 | ||
|
|
15b91c1cac | ||
|
|
0bdc442bf0 | ||
|
|
d44ffde2a9 | ||
|
|
867b87415b | ||
|
|
761522a540 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
lib/external/** linguist-vendored
|
||||
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Sponsor links
|
||||
|
||||
patreon: werwolv
|
||||
custom: https://werwolv.net/donate
|
||||
github: WerWolv
|
||||
57
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Bug Report
|
||||
description: Something doesn't work correctly in ImHex.
|
||||
title: "[Bug] "
|
||||
labels: bug
|
||||
body:
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: What Operating System are you using ImHex on?
|
||||
options:
|
||||
- Windows
|
||||
- Linux
|
||||
- MacOS
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What's the issue you encountered?
|
||||
description: |
|
||||
Describe the issue in detail and what you were doing beforehand.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: How can the issue be reproduced?
|
||||
description: Include a detailed step by step process for recreating your issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: ImHex Version
|
||||
description: |
|
||||
The version of ImHex you've been using when encountering the bug. If using a nightly, please add the commit hash as well
|
||||
placeholder: X.X.X
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: ImHex Build Type
|
||||
options:
|
||||
- label: Nightly or built from sources
|
||||
- type: input
|
||||
attributes:
|
||||
label: Installation type
|
||||
description: |
|
||||
How did you install ImHex ? MSI/Portable/DMG/AppImage/Fedora package/etc..
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context?
|
||||
placeholder: |
|
||||
- Additional information about your environment.
|
||||
- If possible and useful, please upload the binary you've been editing when the bug occurred.
|
||||
validations:
|
||||
required: false
|
||||
26
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
26
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Feature Request
|
||||
description: Something you'd like to see added to ImHex in the future
|
||||
title: "[Feature] "
|
||||
labels: feature request
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What feature would you like to see?
|
||||
description: |
|
||||
Describe in detail what the feature should do and how it should work.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: How will this feature be useful to you and others?
|
||||
description: Describe how everybody will benefit from this feature if it gets added.
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Request Type
|
||||
options:
|
||||
- label: I can provide a PoC for this feature or am willing to work on it myself and submit a PR
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context?
|
||||
63
.github/workflows/analysis.yml
vendored
Normal file
63
.github/workflows/analysis.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
codeql:
|
||||
name: 🐛 CodeQL
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: ✋ Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: 'cpp'
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
- name: 📜 Restore CMakeCache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo bash dist/get_deps_debian.sh
|
||||
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
..
|
||||
make -j 4 install
|
||||
|
||||
- name: 🗯️ Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
516
.github/workflows/build.yml
vendored
Normal file
516
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,516 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["*"]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
|
||||
# Windows build
|
||||
win:
|
||||
runs-on: windows-2022
|
||||
name: 🪟 Windows MINGW64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
CCACHE_DIR: "${{ github.workspace }}/.ccache"
|
||||
CCACHE_MAXSIZE: "1000M"
|
||||
CCACHE_COMPRESS: "true"
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
id: cache-ccache
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
- name: 📜 Restore CMakeCache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: 🟦 Install msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: mingw64
|
||||
pacboy: >-
|
||||
gcc:p
|
||||
lld:p
|
||||
cmake:p
|
||||
make:p
|
||||
ccache:p
|
||||
glfw:p
|
||||
file:p
|
||||
mbedtls:p
|
||||
freetype:p
|
||||
dlfcn:p
|
||||
|
||||
- name: 📜 Set version variable
|
||||
run: |
|
||||
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||
|
||||
# Windows cmake build
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake -G "MinGW Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
||||
-DCREATE_PACKAGE=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
..
|
||||
mingw32-make -j4 install
|
||||
cpack
|
||||
echo "ImHex checks for the existence of this file to determine if it is running in portable mode. You should not delete this file" > $PWD/install/PORTABLE
|
||||
|
||||
#- name: 🗝️ Sign Windows Installer
|
||||
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
# shell: powershell
|
||||
# env:
|
||||
# WIN_SIGN_CERT: ${{ secrets.WIN_SIGN_CERT }}
|
||||
# WIN_SIGN_PW: ${{ secrets.WIN_SIGN_PW }}
|
||||
# run: |
|
||||
# $buffer = [System.Convert]::FromBase64String($env:WIN_SIGN_CERT)
|
||||
# $certificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]::New($buffer, $env:WIN_SIGN_PW)
|
||||
# Get-ChildItem -Path ./build -Filter *.msi -Recurse | Set-AuthenticodeSignature -HashAlgorithm SHA256 -Certificate $certificate -TimestampServer http://timestamp.digicert.com
|
||||
|
||||
- name: ⬆️ Upload Windows Installer
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Windows Installer
|
||||
path: |
|
||||
build/*.msi
|
||||
|
||||
- name: ⬆️ Upload Portable ZIP
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Windows Portable
|
||||
path: |
|
||||
build/install/*
|
||||
|
||||
- name: ⬇️ Download Mesa3D for NoGPU version
|
||||
shell: bash
|
||||
run: |
|
||||
echo "NoGPU version Powered by Mesa 3D : https://fdossena.com/?p=mesa%2Findex.frag" > build/install/MESA.md
|
||||
curl https://werwolv.net/downloads/mesa/MesaForWindows-x64-latest.7z -L -o mesa.7z
|
||||
7z e mesa.7z
|
||||
mv opengl32.dll build/install
|
||||
|
||||
- name: ⬆️ Upload NoGPU Portable ZIP
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Windows Portable NoGPU
|
||||
path: |
|
||||
build/install/*
|
||||
|
||||
# MacOS build
|
||||
macos:
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- suffix: "-NoGPU"
|
||||
custom_glfw: true
|
||||
- suffix: ""
|
||||
custom_glfw: false
|
||||
|
||||
name: 🍎 macOS 11.0${{matrix.suffix}}
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 📜 Set version variable
|
||||
run: |
|
||||
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
|
||||
- name: 📜 Restore CMakeCache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
run: |
|
||||
brew bundle --no-lock --file dist/Brewfile
|
||||
rm -rf /usr/local/Cellar/capstone
|
||||
|
||||
- name: ⬇️ Install classic glfw
|
||||
if: ${{! matrix.custom_glfw}}
|
||||
run: |
|
||||
brew install glfw
|
||||
|
||||
|
||||
- name: 🧰 Checkout glfw
|
||||
if: ${{matrix.custom_glfw}}
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: glfw/glfw
|
||||
path: glfw
|
||||
|
||||
- name: ⬇️ Patch and install custom glfw
|
||||
if: ${{matrix.custom_glfw}}
|
||||
run: |
|
||||
cd glfw
|
||||
git apply ../dist/macOS/0001-glfw-SW.patch
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||
..
|
||||
make -j 4 install
|
||||
|
||||
# MacOS cmake build
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
|
||||
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
|
||||
OBJC=$(brew --prefix llvm)/bin/clang \
|
||||
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
|
||||
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
|
||||
MACOSX_DEPLOYMENT_TARGET="10.10" \
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCREATE_BUNDLE=ON \
|
||||
-DCREATE_PACKAGE=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \
|
||||
-DCPACK_PACKAGE_FILE_NAME="imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}" \
|
||||
..
|
||||
make -j4 package
|
||||
|
||||
- name: ⬆️ Upload DMG
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macOS DMG${{matrix.suffix}}
|
||||
path: build/*.dmg
|
||||
|
||||
# Ubuntu build
|
||||
ubuntu:
|
||||
runs-on: ubuntu-22.04
|
||||
name: 🐧 Ubuntu 22.04
|
||||
steps:
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
- name: 📜 Restore other caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
build-appimage/CMakeCache.txt
|
||||
.flatpak-builder
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
|
||||
sudo apt update
|
||||
sudo bash dist/get_deps_debian.sh
|
||||
|
||||
sudo apt install -y python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fuse
|
||||
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
||||
sudo chmod +x /usr/local/bin/appimagetool
|
||||
sudo pip3 install git+https://github.com/iTrooz/appimage-builder@dpkg-package-versions
|
||||
|
||||
# Ubuntu cmake build
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
||||
..
|
||||
make -j 4 install DESTDIR=DebDir
|
||||
|
||||
- name: 📜 Set version variable
|
||||
run: |
|
||||
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||
|
||||
#- name: 📦 Bundle Flatpak
|
||||
# run: |
|
||||
# sudo apt install flatpak flatpak-builder
|
||||
# flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
# flatpak --user install -y flathub org.freedesktop.Platform//20.08
|
||||
# flatpak --user install -y flathub org.freedesktop.Sdk//20.08
|
||||
# flatpak-builder --jobs=4 --repo=imhex _flatpak dist/net.werwolv.ImHex.yaml --ccache --keep-build-dirs
|
||||
# flatpak build-bundle imhex imhex.flatpak net.werwolv.ImHex stable
|
||||
|
||||
- name: 📦 Bundle DEB
|
||||
run: |
|
||||
cp -r build/DEBIAN build/DebDir
|
||||
dpkg-deb -Zgzip --build build/DebDir
|
||||
mv build/DebDir.deb imhex-${{env.IMHEX_VERSION}}-Ubuntu-22.04.deb
|
||||
|
||||
# AppImage cmake build
|
||||
- name: 🛠️ Reconfigure build for AppImage
|
||||
run: |
|
||||
mkdir -p build-appimage
|
||||
cd build-appimage
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
||||
-DIMHEX_PLUGINS_IN_SHARE=ON \
|
||||
-DIMHEX_USE_BUNDLED_CA=ON \
|
||||
..
|
||||
make -j 4 install DESTDIR=AppDir
|
||||
|
||||
- name: 📦 Bundle AppImage
|
||||
run: |
|
||||
cd build-appimage
|
||||
export VERSION=${{env.IMHEX_VERSION}}
|
||||
appimage-builder --recipe ../dist/AppImageBuilder.yml
|
||||
|
||||
#- name: ⬆️ Upload Flatpak
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: Linux Flatpak
|
||||
# path: |
|
||||
# imhex.flatpak
|
||||
|
||||
- name: ⬆️ Upload DEB
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Ubuntu 22.04 DEB
|
||||
path: '*.deb'
|
||||
|
||||
- name: ⬆️ Upload AppImage
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Linux AppImage
|
||||
path: 'build-appimage/*.AppImage'
|
||||
|
||||
- name: ⬆️ Upload AppImage zsync
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Linux AppImage zsync
|
||||
path: 'build-appimage/*.AppImage.zsync'
|
||||
|
||||
# ArchLinux build
|
||||
archlinux-build:
|
||||
name: 🐧 ArchLinux
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: archlinux:base-devel
|
||||
|
||||
steps:
|
||||
- name: ⬇️ Update all packages
|
||||
run: |
|
||||
pacman -Syyu --noconfirm
|
||||
|
||||
- name: ⬇️ Install setup dependencies
|
||||
run: |
|
||||
pacman -Syu git ccache --noconfirm
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: ⬇️ Install ImHex dependencies
|
||||
run: |
|
||||
dist/get_deps_archlinux.sh --noconfirm
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: archlinux-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: archlinux-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
- name: 📜 Restore CMakeCache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
key: archlinux-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
# ArchLinux cmake build
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc CXX=g++ cmake \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DUSE_SYSTEM_CURL=ON \
|
||||
-DUSE_SYSTEM_FMT=ON \
|
||||
-DUSE_SYSTEM_YARA=ON \
|
||||
-DUSE_SYSTEM_NLOHMANN_JSON=ON \
|
||||
-DUSE_SYSTEM_CAPSTONE=OFF \
|
||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
||||
..
|
||||
make -j 4 install DESTDIR=installDir
|
||||
|
||||
- name: 📜 Set version variable
|
||||
run: |
|
||||
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||
|
||||
- name: ✒️ Prepare PKGBUILD
|
||||
run: |
|
||||
cp dist/Arch/PKGBUILD build
|
||||
sed -i 's/%version%/${{env.IMHEX_VERSION}}/g' build/PKGBUILD
|
||||
|
||||
# makepkg doesn't want to run as root, so I had to chmod 777 all over
|
||||
- name: 📦 Package ArchLinux .pkg.tar.zst
|
||||
run: |
|
||||
cd build
|
||||
|
||||
# the name is a small trick to make makepkg recognize it as the source
|
||||
# else, it would try to download the file from the release
|
||||
tar -cvf imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst -C installDir .
|
||||
|
||||
chmod -R 777 .
|
||||
|
||||
sudo -u nobody makepkg
|
||||
|
||||
# Replace the old file
|
||||
rm imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
|
||||
mv *.pkg.tar.zst imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
|
||||
|
||||
- name: ⬆️ Upload imhex-archlinux.pkg.tar.zst
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ArchLinux .pkg.tar.zst
|
||||
path: |
|
||||
build/imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst
|
||||
|
||||
# Fedora build
|
||||
fedora-build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- docker_image: fedora:latest
|
||||
release: Latest
|
||||
- docker_image: fedora:rawhide
|
||||
release: Rawhide
|
||||
|
||||
|
||||
name: 🐧 Fedora ${{ matrix.release }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: "${{ matrix.docker_image }}"
|
||||
|
||||
steps:
|
||||
- name: ⬇️ Update all packages
|
||||
run: |
|
||||
dnf upgrade -y
|
||||
|
||||
- name: ⬇️ Install setup dependencies
|
||||
run: |
|
||||
dnf install -y \
|
||||
ccache \
|
||||
desktop-file-utils \
|
||||
fmt-devel \
|
||||
git \
|
||||
json-devel \
|
||||
libcurl-devel \
|
||||
llvm-devel \
|
||||
mbedtls-devel \
|
||||
rpm-build \
|
||||
yara-devel
|
||||
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: ⬇️ Install ImHex dependencies
|
||||
run: |
|
||||
dist/get_deps_fedora.sh
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
- name: 📜 Set version variable
|
||||
run: |
|
||||
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||
|
||||
# Fedora cmake build (in imhex.spec)
|
||||
- name: 📦 Build RPM
|
||||
run: |
|
||||
rpmbuild -ba --define "_version ${{env.IMHEX_VERSION}}" --define "_src_path $GITHUB_WORKSPACE" --define "_build_type $BUILD_TYPE" $GITHUB_WORKSPACE/dist/rpm/imhex.spec
|
||||
mv ~/rpmbuild/RPMS/x86_64/*.rpm imhex-${{env.IMHEX_VERSION}}-Fedora-${{matrix.release}}.rpm
|
||||
|
||||
- name: ⬆️ Upload RPM
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Fedora ${{ matrix.release }} RPM
|
||||
path: |
|
||||
imhex-${{env.IMHEX_VERSION}}-Fedora-${{matrix.release}}.rpm
|
||||
160
.github/workflows/release.yml
vendored
Normal file
160
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release-common:
|
||||
runs-on: ubuntu-latest
|
||||
name: Release Common
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ImHex
|
||||
submodules: recursive
|
||||
|
||||
- name: 📜 Verify version and set version variable
|
||||
run: |
|
||||
project_version=`cat ImHex/VERSION`
|
||||
tag_version="${{github.event.release.tag_name}}"
|
||||
tag_version="${tag_version:1}"
|
||||
if [ "$project_version" != "$tag_version" ]; then
|
||||
echo "::warning::$project_version and $tag_version are not the same ! Refusing to populate release"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "IMHEX_VERSION=$project_version" >> $GITHUB_ENV
|
||||
|
||||
- name: 🗜️ Create tarball from sources with dependencies
|
||||
run: tar --exclude-vcs -czvf Full.Sources.tar.gz ImHex
|
||||
|
||||
- name: ⬇️ Download artifacts from latest workflow
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||
workflow: build.yml
|
||||
branch: ${{ github.event.release.target_commitish }}
|
||||
workflow_conclusion: success
|
||||
skip_unpack: true
|
||||
|
||||
- name: 🗜️ Unzip files when needed
|
||||
run: |
|
||||
for zipfile in ./*.zip
|
||||
do
|
||||
if [ `zipinfo -1 "$zipfile" | wc -l` -eq 1 ];
|
||||
then
|
||||
echo "unzipping $zipfile"
|
||||
unzip "$zipfile"
|
||||
rm "$zipfile"
|
||||
else
|
||||
echo "keeping $zipfile zipped"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: 🟩 Rename artifacts when needed
|
||||
run: |
|
||||
mv "Windows Portable.zip" imhex-${{env.IMHEX_VERSION}}-Windows-Portable.zip
|
||||
mv "Windows Portable NoGPU.zip" imhex-${{env.IMHEX_VERSION}}-Windows-Portable-NoGPU.zip
|
||||
|
||||
- name: ⬆️ Upload everything to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: '*'
|
||||
|
||||
- name: ✒️ Prepare PKGBUILD
|
||||
run: |
|
||||
cp ImHex/dist/Arch/PKGBUILD .
|
||||
|
||||
hash=`md5sum imhex-${{env.IMHEX_VERSION}}-ArchLinux.pkg.tar.zst | cut -d ' ' -f 1`
|
||||
|
||||
sed -i 's/%version%/${{env.IMHEX_VERSION}}/g' PKGBUILD
|
||||
sed -i "s/(SKIP)/($hash)/g" PKGBUILD
|
||||
|
||||
- name: ⬆️ Publish AUR package
|
||||
|
||||
# I couldn't make the condition in the env directly for some reason
|
||||
env:
|
||||
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
if: "${{ env.AUR_SSH_PRIVATE_KEY != '' }}"
|
||||
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v2
|
||||
with:
|
||||
pkgname: imhex-bin
|
||||
pkgbuild: ./PKGBUILD
|
||||
commit_username: iTrooz
|
||||
commit_email: itrooz@protonmail.com
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: Bump to version ${{env.IMHEX_VERSION}}
|
||||
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
|
||||
|
||||
- name: 🎫 Create PatternLanguage release
|
||||
uses: ncipollo/release-action@v1
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
if: "${{ env.RELEASE_TOKEN != '' }}"
|
||||
with:
|
||||
tag: ImHex-v${{env.IMHEX_VERSION}}
|
||||
repo: PatternLanguage
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: 🎫 Create ImHex-Patterns release
|
||||
uses: ncipollo/release-action@v1
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
if: "${{ env.RELEASE_TOKEN != '' }}"
|
||||
with:
|
||||
tag: ImHex-v${{env.IMHEX_VERSION}}
|
||||
repo: ImHex-Patterns
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: ✉️ Update C++ Plugin Template
|
||||
uses: mvasigh/dispatch-action@main
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
if: "${{ env.RELEASE_TOKEN != '' }}"
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
repo: ImHex-Cpp-Plugin-Template
|
||||
owner: WerWolv
|
||||
event_type: update_submodule
|
||||
|
||||
- name: ✉️ Update Rust Plugin Template
|
||||
uses: mvasigh/dispatch-action@main
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
if: "${{ env.RELEASE_TOKEN != '' }}"
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
repo: ImHex-Rust-Plugin-Template
|
||||
owner: WerWolv
|
||||
event_type: update_submodule
|
||||
|
||||
release-windows:
|
||||
name: Release Windows
|
||||
needs: release-common
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: ⬇️ Download dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
iwr https://github.com/microsoft/winget-create/releases/download/v1.1.2.0/wingetcreate.exe -OutFile wingetcreate.exe
|
||||
- name: ⬆️ Update winget manifest
|
||||
shell: pwsh
|
||||
env:
|
||||
WINGET_GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
if: "${{ env.WINGET_GITHUB_TOKEN != '' }}"
|
||||
run: |
|
||||
$tagname = $env:GITHUB_REF.Replace("refs/tags/", "")
|
||||
$version = $tagname.Replace("v", "")
|
||||
$url = "https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-win64.msi"
|
||||
.\wingetcreate.exe update WerWolv.ImHex -u $url --version $version
|
||||
if ($version -notmatch "-") {
|
||||
.\wingetcreate.exe submit .\manifests\w\WerWolv\ImHex\${version}\ --token $env:WINGET_GITHUB_TOKEN
|
||||
}
|
||||
63
.github/workflows/tests.yml
vendored
Normal file
63
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: "Unit Tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🧪 Unit Tests
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 📜 Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
||||
max-size: 50M
|
||||
|
||||
|
||||
- name: 📜 Restore CMakeCache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/CMakeCache.txt
|
||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo bash dist/get_deps_debian.sh
|
||||
|
||||
- name: 🛠️ Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld -fsanitize=address,leak,undefined -fno-sanitize-recover=all" \
|
||||
-DIMHEX_OFFLINE_BUILD=ON \
|
||||
..
|
||||
make -j4 unit_tests install
|
||||
|
||||
- name: 🧪 Perform Unit Tests
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,4 +1,10 @@
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
cmake-build-debug/
|
||||
cmake-build-*/
|
||||
build*/
|
||||
venv/
|
||||
|
||||
cmake-build-release/
|
||||
*.mgc
|
||||
imgui.ini
|
||||
.DS_Store
|
||||
|
||||
31
.gitmodules
vendored
Normal file
31
.gitmodules
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[submodule "lib/external/nativefiledialog"]
|
||||
path = lib/external/nativefiledialog
|
||||
url = https://github.com/btzy/nativefiledialog-extended
|
||||
ignore = dirty
|
||||
[submodule "lib/external/yara/yara"]
|
||||
path = lib/external/yara/yara
|
||||
url = https://github.com/VirusTotal/yara
|
||||
ignore = dirty
|
||||
[submodule "lib/external/xdgpp"]
|
||||
path = lib/external/xdgpp
|
||||
url = https://git.sr.ht/~danyspin97/xdgpp
|
||||
ignore = dirty
|
||||
[submodule "lib/external/fmt"]
|
||||
path = lib/external/fmt
|
||||
url = https://github.com/fmtlib/fmt
|
||||
ignore = dirty
|
||||
[submodule "lib/external/curl"]
|
||||
path = lib/external/curl
|
||||
url = https://github.com/curl/curl
|
||||
ignore = dirty
|
||||
[submodule "lib/external/capstone"]
|
||||
path = lib/external/capstone
|
||||
url = https://github.com/capstone-engine/capstone
|
||||
ignore = dirty
|
||||
[submodule "lib/external/libromfs"]
|
||||
path = lib/external/libromfs
|
||||
url = https://github.com/WerWolv/libromfs
|
||||
ignore = dirty
|
||||
[submodule "lib/external/pattern_language"]
|
||||
path = lib/external/pattern_language
|
||||
url = https://github.com/WerWolv/PatternLanguage
|
||||
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/../../../../../:\_Dev\Cpp\HexEditor\.idea/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
2
.idea/HexEditor.iml
generated
2
.idea/HexEditor.iml
generated
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
||||
14
.idea/deployment.xml
generated
14
.idea/deployment.xml
generated
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||
<serverData>
|
||||
<paths name="WSL (e494f5fa-cb38-49f1-b2cb-b9524b92ed51)">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping local="$PROJECT_DIR$" web="/" />
|
||||
</mappings>
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
</component>
|
||||
</project>
|
||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/HexEditor.iml" filepath="$PROJECT_DIR$/.idea/HexEditor.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,48 +1,53 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(HexEditor)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
# Options
|
||||
option(IMHEX_USE_BUNDLED_CA "Use the CA bundle in romfs instead of the system one" OFF)
|
||||
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
|
||||
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
|
||||
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
|
||||
option(IMHEX_IGNORE_BAD_CLONE "Disable the bad clone prevention checks" OFF)
|
||||
option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of the ImHex-Patterns repo" OFF)
|
||||
option(IMHEX_IGNORE_BAD_COMPILER "Allow compiling with an unsupported compiler" OFF)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(GLFW REQUIRED glfw3)
|
||||
find_package(OpenGL REQUIRED)
|
||||
# Basic compiler and cmake configurations
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
|
||||
set(IMHEX_BASE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
|
||||
include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
|
||||
|
||||
include_directories(include ${GLFW_INCLUDE_DIRS} libs/ImGui/include libs/glad/include)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -DIMGUI_IMPL_OPENGL_LOADER_GLAD")
|
||||
# Setup project
|
||||
loadVersion(IMHEX_VERSION)
|
||||
setVariableInParent(IMHEX_VERSION ${IMHEX_VERSION})
|
||||
project(imhex VERSION ${IMHEX_VERSION})
|
||||
|
||||
add_executable(ImHex
|
||||
source/main.cpp
|
||||
source/window.cpp
|
||||
source/utils.cpp
|
||||
source/crypto.cpp
|
||||
# Make sure project is configured correctly
|
||||
setDefaultBuiltTypeIfUnset()
|
||||
detectBadClone()
|
||||
verifyCompiler()
|
||||
|
||||
source/parser/lexer.cpp
|
||||
source/parser/parser.cpp
|
||||
# List plugin names here. Project name must match folder name
|
||||
set(PLUGINS
|
||||
builtin
|
||||
windows
|
||||
)
|
||||
|
||||
source/provider/file_provider.cpp
|
||||
# Add various defines
|
||||
detectOS()
|
||||
detectArch()
|
||||
addVersionDefines()
|
||||
configurePackingResources()
|
||||
setUninstallTarget()
|
||||
addBundledLibraries()
|
||||
|
||||
source/views/view_hexeditor.cpp
|
||||
source/views/view_pattern.cpp
|
||||
source/views/view_pattern_data.cpp
|
||||
source/views/view_hashes.cpp
|
||||
source/views/view_information.cpp
|
||||
# Add ImHex sources
|
||||
add_subdirectory(lib/libimhex)
|
||||
add_subdirectory(main)
|
||||
add_custom_target(imhex_all ALL DEPENDS main)
|
||||
|
||||
libs/glad/source/glad.c
|
||||
# Add unit tests
|
||||
enable_testing()
|
||||
add_subdirectory(tests EXCLUDE_FROM_ALL)
|
||||
|
||||
libs/ImGui/source/imgui.cpp
|
||||
libs/ImGui/source/imgui_demo.cpp
|
||||
libs/ImGui/source/imgui_draw.cpp
|
||||
libs/ImGui/source/imgui_widgets.cpp
|
||||
libs/ImGui/source/imgui_impl_glfw.cpp
|
||||
libs/ImGui/source/imgui_impl_opengl3.cpp
|
||||
|
||||
res.rc
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(ImHex libglfw3.a libgcc.a libstdc++.a libmagic.a libgnurx.a libtre.a libintl.a libiconv.a shlwapi.lib libcrypto.a)
|
||||
endif (WIN32)
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(ImHex libglfw.so libmagic.so libcrypto.so libdl.so)
|
||||
endif (UNIX)
|
||||
# Configure packaging
|
||||
createPackage()
|
||||
|
||||
67
HACKING.md
Normal file
67
HACKING.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Hacking guide
|
||||
|
||||
## Introduction
|
||||
|
||||
This document is a guide for developers who want to contribute to ImHex in any way. It contains information about the codebase, the build process and the general workflow.
|
||||
|
||||
## Codebase
|
||||
|
||||
ImHex is written in C++ and usually uses the latest compiler and standard library features available in gcc on all supported OSes. At the time of writing this is C++23.
|
||||
|
||||
### Structure
|
||||
|
||||
- `main`: Contains the main application code
|
||||
- Important to understand here is that the main ImHex application is basically just an empty shell.
|
||||
- All it does is create a Window and a OpenGL context using GLFW, load all available plugins, properly configure ImGui and render it to the screen.
|
||||
- Everything else is done inside of plugins. ImHex comes with a few plugins by default, most notably the `builtin` plugin which contains the majority of the application code.
|
||||
- In most cases, this code doesn't need to be modified. Most features should be self-contained inside a plugin.
|
||||
- `lib`
|
||||
- `libimhex`: Contains all helper utilities as well as various APIs for plugins to interact with ImHex.
|
||||
- The library's main purpose is for Dependency Inversion. The ImHex main application as well as libimhex do not know about the existence of plugins at build time. Plugins and the main application instead link against libimhex and use it as a common API to interact with each other.
|
||||
- Since libimhex is a doesn't know about the existence of plugins, it cannot depend on any of them. This includes localizations and things that get registered by plugins after launch.
|
||||
- Even if the builtin plugin is technically always available, it is still a plugin and should be treated that way.
|
||||
- All important APIs can be found in the `hex/api` include directory and are documented in the respective header file.
|
||||
- `external`: All libraries that need custom patches or aren't typically available in package managers go into here.
|
||||
- If you'd like to add new features to the Pattern language, please make a PR to https://github.com/WerWolv/PatternLanguage instead. ImHex usually depends on the latest commit of the master branch of this repo.
|
||||
- `plugins`
|
||||
- `builtin`: The builtin plugin. Contains the majority of the application code.
|
||||
- It's the heart of ImHex's functionality. It contains most of the default views, providers, etc. so if you want to add new functionality to ImHex, this is the place to start.
|
||||
- `tests`: Contains all unit tests for ImHex. These are run automatically by the CI and should be kept up to date, especially when adding new helper functions to libimhex.
|
||||
|
||||
### RomFS
|
||||
|
||||
ImHex uses a custom library called [libromfs](https://github.com/WerWolv/libromfs). It's a simple static library which uses CMake's code generation feature to embed files into the binary at compile time so they can be accessed at runtime.
|
||||
All plugins have a `romfs` folder which contains all files that should be embedded into the binary. Resources that need to be embedded into the main application (this is usually not necessary), go into the `resources/romfs` folder.
|
||||
When adding, changing files or removing files, make sure to re-run CMake to update the generated code. Otherwise, the changes might not be reflected in the binary.
|
||||
|
||||
## Development Environment
|
||||
|
||||
I personally use CLion for development since it makes configuring and building the project very easy on all platforms.
|
||||
|
||||
### Windows
|
||||
- Install MSYS2 from https://www.msys2.org/ and use the `dist/get_deps_msys2.sh` script to install all dependencies.
|
||||
### Linux
|
||||
- Install all dependencies using one of the `dist/get_deps_*.sh` scripts depending on your distribution or install them manually with your package manager.
|
||||
### macOS
|
||||
- Install all dependencies using brew and the `dist/Brewfile` script.
|
||||
|
||||
## Making Changes
|
||||
|
||||
### Adding new features to ImHex
|
||||
|
||||
If you'd like to add new features, the best way to start is by joining our Discord and telling us about your idea. We can then discuss the best way to implement it and how it should be integrated into ImHex or if it should be done in a separate plugin.
|
||||
|
||||
There are standalone plugin templates that use ImHex as a submodule. You can find them here:
|
||||
- https://github.com/WerWolv/ImHex-Cpp-Plugin-Template
|
||||
- https://github.com/WerWolv/ImHex-Rust-Plugin-Template
|
||||
|
||||
### Adding a new language
|
||||
|
||||
If you'd like to support a new language in ImHex, the best way is by using the `dist/langtool.py` tool. It will create the necessary file for you and help you fill them out.
|
||||
First, run the tool with `python3 dist/langtool.py create plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of your language. This will create a new file in the language directory.
|
||||
Afterwards follow the prompts of the program to populate the entire file. Once you're done, rerun cmake and rebuild ImHex. Your language should now be available in the settings.
|
||||
|
||||
### Updating an existing language
|
||||
|
||||
If you'd like to add missing keys to an existing language, you can also use the `dist/langtool.py` tool. Run it with `python3 dist/langtool.py translate plugins/builtin/romfs/lang <iso_code>` where `<iso_code>` is the ISO 639-1 code of the language.
|
||||
This will one by one list all the missing translation keys that are present in the default translation file, and you can fill them in with the correct translation for your language.
|
||||
52
INSTALL.md
Normal file
52
INSTALL.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Installing ImHex
|
||||
|
||||
## Official Releases
|
||||
|
||||
The easiest way to install ImHex is to download the latest release from the [GitHub Releases page](https://github.com/WerWolv/ImHex/releases/latest).
|
||||
|
||||
There's also a NoGPU version available for users who don't have a GPU or want to run ImHex in a VM without GPU passthrough.
|
||||
|
||||
## Nightly Builds
|
||||
|
||||
The GitHub Actions CI builds a new release package on every commit made to repository. These builds are available on the [GitHub Actions page](https://github.com/WerWolv/ImHex/actions?query=workflow%3A%22Build%22).
|
||||
These builds are not guaranteed to be stable and may contain bugs, however they also contain new features that are not yet available in the official releases.
|
||||
|
||||
## Building from source
|
||||
|
||||
Build instructions for Windows, Linux and macOS can be found under `/dist/compiling`:
|
||||
- Windows: [Link](dist/compiling/windows.md)
|
||||
- macOS: [Link](dist/compiling/macos.md)
|
||||
- Linux: [Link](dist/compiling/linux.md)
|
||||
|
||||
## Package managers
|
||||
|
||||
ImHex is also available on various package managers. The officially supported ones are listed here:
|
||||
|
||||
### Windows
|
||||
|
||||
- **Cocolatey**
|
||||
- [imhex](https://community.chocolatey.org/packages/imhex) (Thanks to @Jarcho)
|
||||
- `choco install imhex`
|
||||
- **winget**
|
||||
- [WerWolv.ImHex](https://github.com/microsoft/winget-pkgs/tree/master/manifests/w/WerWolv/ImHex)
|
||||
- `winget install WerWolv.ImHex`
|
||||
|
||||
### Linux
|
||||
- **Arch Linux AUR**
|
||||
- [imhex-bin](https://aur.archlinux.org/packages/imhex-bin/) (Thanks to @iTrooz)
|
||||
- `yay -S imhex-bin`
|
||||
- [imhex](https://aur.archlinux.org/packages/imhex/) (Thanks to @KokaKiwi)
|
||||
- `yay -S imhex`
|
||||
- **Fedora**
|
||||
- [imhex](https://src.fedoraproject.org/rpms/imhex/) (Thanks to @jonathanspw)
|
||||
- `dnf install imhex`
|
||||
- **Flatpak**
|
||||
- [net.werwolv.Imhex](https://flathub.org/apps/details/net.werwolv.ImHex) (Thanks to @Mailaender)
|
||||
- `flatpak install flathub net.werwolv.ImHex`
|
||||
|
||||
### Available on other package managers
|
||||
|
||||
Packages that aren't explicitly mentioned above are not officially supported but they will most likely still work.
|
||||
Contact the maintainer of the package if you have any issues.
|
||||
|
||||
[](https://repology.org/project/imhex/versions)
|
||||
339
LICENSE
Normal file
339
LICENSE
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
177
README.md
177
README.md
@@ -1,7 +1,178 @@
|
||||
# ImHex
|
||||
<a href="https://imhex.werwolv.net">
|
||||
<h1 align="center">
|
||||
<img height="100px" src="./resources/projects/logo_text_light.svg#gh-dark-mode-only">
|
||||
<img height="100px" src="./resources/projects/logo_text_dark.svg#gh-light-mode-only">
|
||||
</h1>
|
||||
</a>
|
||||
|
||||
A Hex editor written in C++ using OpenGL, GLFW and Dear ImGui
|
||||
<p align="center">A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.</p>
|
||||
|
||||
<p align="center">
|
||||
<a title="'Build' workflow Status" href="https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild"><img alt="'Build' workflow Status" src="https://img.shields.io/github/actions/workflow/status/WerWolv/ImHex/build.yml?longCache=true&style=for-the-badge&label=Build&logoColor=fff&logo=GitHub%20Actions&branch=master"></a>
|
||||
<a title="Discord Server" href="https://discord.gg/X63jZ36xBY"><img alt="Discord Server" src="https://img.shields.io/discord/789833418631675954?label=Discord&logo=Discord&style=for-the-badge"></a>
|
||||
<a title="Total Downloads" href="https://github.com/WerWolv/ImHex/releases/latest"><img alt="Total Downloads" src="https://img.shields.io/github/downloads/WerWolv/ImHex/total?longCache=true&style=for-the-badge&label=Downloads&logoColor=fff&logo=GitHub"></a>
|
||||
</p>
|
||||
|
||||
## Supporting
|
||||
|
||||
If you like my work, please consider supporting me on GitHub Sponsors, Patreon or PayPal. Thanks a lot!
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/sponsors/WerWolv"><img src="https://werwolv.net/assets/github_banner.png" alt="GitHub donate button" /> </a>
|
||||
<a href="https://www.patreon.com/werwolv"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /> </a>
|
||||
<a href="https://werwolv.net/donate"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /> </a>
|
||||
</p>
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Featureful hex view
|
||||
- Byte patching
|
||||
- Patch management
|
||||
- Copy bytes as feature
|
||||
- Bytes
|
||||
- Hex string
|
||||
- C, C++, C#, Rust, Python, Java & JavaScript array
|
||||
- ASCII-Art hex view
|
||||
- HTML self-contained div
|
||||
- String and hex search
|
||||
- Colorful highlighting
|
||||
- Goto from start, end and current cursor position
|
||||
- Custom C++-like pattern language for parsing highlighting a file's content
|
||||
- Automatic loading based on MIME type
|
||||
- arrays, pointers, structs, unions, enums, bitfields, namespaces, little and big endian support, conditionals and much more!
|
||||
- Useful error messages, syntax highlighting and error marking
|
||||
- Doesn't burn out your retinas when used in late-night sessions
|
||||
- Dark mode by default, but a light mode is available as well
|
||||
- Data importing
|
||||
- Base64 files
|
||||
- IPS and IPS32 patches
|
||||
- Data exporting
|
||||
- IPS and IPS32 patches
|
||||
- Data inspector allowing interpretation of data as many different types (little and big endian)
|
||||
- Huge file support with fast and efficient loading
|
||||
- String search
|
||||
- Copying of strings
|
||||
- Copying of demangled strings
|
||||
- File hashing support
|
||||
- CRC16 and CRC32 with custom initial values and polynomials
|
||||
- MD4, MD5
|
||||
- SHA-1, SHA-224, SHA-256, SHA-384, SHA-512
|
||||
- Disassembler supporting many architectures (frontend for Capstone)
|
||||
- ARM32 (ARM, Thumb, Cortex-M, AArch32)
|
||||
- ARM64
|
||||
- MIPS (MIPS32, MIPS64, MIPS32R6, Micro)
|
||||
- x86 (16-bit, 32-bit, 64-bit)
|
||||
- PowerPC (32-bit, 64-bit)
|
||||
- SPARC
|
||||
- IBM SystemZ
|
||||
- xCORE
|
||||
- M68K
|
||||
- TMS320C64X
|
||||
- M680X
|
||||
- Ethereum
|
||||
- RISC-V
|
||||
- WebAssembly
|
||||
- MOS65XX
|
||||
- Berkeley Packet Filter
|
||||
- Bookmarks
|
||||
- Region highlighting
|
||||
- Comments
|
||||
- Data Analyzer
|
||||
- File magic-based file parser and MIME type database
|
||||
- Byte distribution graph
|
||||
- Entropy graph
|
||||
- Highest and average entropy
|
||||
- Encrypted / Compressed file detection
|
||||
- Built-in Content Store
|
||||
- Download all files found in the database directly from within ImHex
|
||||
- Yara Rules support
|
||||
- Quickly scan a file for vulnerabilities with official yara rules
|
||||
- Helpful tools
|
||||
- Itanium and MSVC demangler
|
||||
- ASCII table
|
||||
- Regex replacer
|
||||
- Mathematical expression evaluator (Calculator)
|
||||
- Hexadecimal Color picker
|
||||
- Base converter
|
||||
- UNIX Permissions calculator
|
||||
- Anonfiles File upload tool
|
||||
- Wikipedia term definition finder
|
||||
- File utilities
|
||||
- File splitter
|
||||
- File combiner
|
||||
- File shredder
|
||||
|
||||
## Pattern Language
|
||||
|
||||
The Pattern Language is the completely custom programming language developed for ImHex.
|
||||
It allows you to define structures and data types in a C-like syntax and then use them to parse and highlight a file's content.
|
||||
|
||||
- Source Code: [Link](https://github.com/WerWolv/PatternLanguage/)
|
||||
- Documentation: [Link](https://imhex.werwolv.net/docs/)
|
||||
|
||||
## Database
|
||||
|
||||
For format patterns, libraries, magic and constant files, check out the [ImHex-Patterns](https://github.com/WerWolv/ImHex-Patterns) repository.
|
||||
|
||||
**Feel free to PR your own files there as well!**
|
||||
|
||||
## Requirements
|
||||
|
||||
To use ImHex, the following minimal system requirements need to be met:
|
||||
|
||||
- **OS**: Windows 7 or higher, macOS 10.15 (Catalina) or higher, "Modern" Linux (Ubuntu 22.04, Fedora Stable/Rawhide, and Arch Linux have official packages, other distributions can use the AppImage)
|
||||
- **CPU**: x86_64 (64 Bit)
|
||||
- **GPU**: OpenGL 3.0 or higher (preferable a dedicated GPU and not Intel HD Graphics)
|
||||
- **RAM**: 512MB, more may be required for more complicated analysis
|
||||
- **Storage**: 100MB
|
||||
|
||||
## Installing
|
||||
|
||||
Information on how to install ImHex can be found in the [Install](/INSTALL.md) guide
|
||||
|
||||
## Compiling
|
||||
|
||||
To compile ImHex on any platform, GCC (or Clang) is required with a version that supports C++23 or higher.
|
||||
On macOS, Clang is also required to compile some ObjC code.
|
||||
All releases are being built using latest available GCC.
|
||||
|
||||
Many dependencies are bundled into the repository using submodules so make sure to clone it using the `--recurse-submodules` option.
|
||||
All dependencies that aren't bundled, can be installed using the dependency installer scripts found in the `/dist` folder.
|
||||
|
||||
For more information, check out the [Compiling](/dist/compiling) guide.
|
||||
|
||||
## Plugin development
|
||||
|
||||
To develop plugins for ImHex, use one of the following two templates projects to get started. You then have access to the entirety of libimhex as well as the ImHex API and the Content Registry to interact with ImHex or to add new content.
|
||||
- [C++ Plugin Template](https://github.com/WerWolv/ImHex-Cpp-Plugin-Template)
|
||||
- [Rust Plugin Template](https://github.com/WerWolv/ImHex-Rust-Plugin-Template)
|
||||
|
||||
|
||||
## Credits
|
||||
|
||||
### Contributors
|
||||
|
||||
- [Mary](https://github.com/Thog) for her immense help porting ImHex to MacOS and help during development
|
||||
- [Roblabla](https://github.com/Roblabla) for adding MSI Installer support to ImHex
|
||||
- [jam1garner](https://github.com/jam1garner) and [raytwo](https://github.com/raytwo) for their help with adding Rust support to plugins
|
||||
- [Mailaender](https://github.com/Mailaender) for getting ImHex onto Flathub
|
||||
- [iTrooz](https://github.com/iTrooz) for many improvements related to release packaging and the GitHub Action runners.
|
||||
- Everybody else who has reported issues on Discord or GitHub that I had great conversations with :)
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Thanks a lot to ocornut for their amazing [Dear ImGui](https://github.com/ocornut/imgui) which is used for building the entire interface
|
||||
- Thanks to ocornut as well for their hex editor view used as base for this project.
|
||||
- Thanks to BalazsJako for their incredible [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit) used for the pattern language syntax highlighting
|
||||
- Thanks to nlohmann for their [json](https://github.com/nlohmann/json) library used for project files
|
||||
- Thanks to aquynh for [capstone](https://github.com/aquynh/capstone) which is the base of the disassembly window
|
||||
- Thanks to vitaut for their [libfmt](https://github.com/fmtlib/fmt) library which makes formatting and logging so much better
|
||||
- Thanks to rxi for [microtar](https://github.com/rxi/microtar) used for extracting downloaded store assets
|
||||
- Thanks to btzy for [nativefiledialog-extended](https://github.com/btzy/nativefiledialog-extended)
|
||||
- Thanks to danyspin97 for [xdgpp](https://sr.ht/~danyspin97/xdgpp)
|
||||
- Thanks to all other groups and organizations whose libraries are used in ImHex
|
||||
|
||||
503
cmake/build_helpers.cmake
Normal file
503
cmake/build_helpers.cmake
Normal file
@@ -0,0 +1,503 @@
|
||||
include(FetchContent)
|
||||
|
||||
if(IMHEX_STRIP_RELEASE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CPACK_STRIP_FILES TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
macro(addVersionDefines)
|
||||
if (NOT IMHEX_VERSION)
|
||||
message(FATAL_ERROR "IMHEX_VERSION is not defined")
|
||||
endif ()
|
||||
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
add_compile_definitions(GIT_COMMIT_HASH="${GIT_COMMIT_HASH}" GIT_BRANCH="${GIT_BRANCH}")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} -DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR} -DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH} ")
|
||||
|
||||
set(IMHEX_VERSION_STRING ${IMHEX_VERSION})
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING})
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-Debug)
|
||||
add_compile_definitions(DEBUG _GLIBCXX_DEBUG)
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-RelWithDebInfo)
|
||||
elseif (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
|
||||
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-MinSizeRel)
|
||||
endif ()
|
||||
|
||||
add_compile_definitions(IMHEX_VERSION="${IMHEX_VERSION_STRING}")
|
||||
|
||||
endmacro()
|
||||
|
||||
# Detect current OS / System
|
||||
macro(detectOS)
|
||||
if (WIN32)
|
||||
add_compile_definitions(OS_WINDOWS)
|
||||
set(CMAKE_INSTALL_BINDIR ".")
|
||||
set(CMAKE_INSTALL_LIBDIR ".")
|
||||
set(PLUGINS_INSTALL_LOCATION "plugins")
|
||||
|
||||
SET(IMHEX_USE_BUNDLED_CA ON)
|
||||
elseif (APPLE)
|
||||
add_compile_definitions(OS_MACOS)
|
||||
set(CMAKE_INSTALL_BINDIR ".")
|
||||
set(CMAKE_INSTALL_LIBDIR ".")
|
||||
set(PLUGINS_INSTALL_LOCATION "plugins")
|
||||
enable_language(OBJC)
|
||||
enable_language(OBJCXX)
|
||||
elseif (UNIX AND NOT APPLE)
|
||||
add_compile_definitions(OS_LINUX)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(IMHEX_PLUGINS_IN_SHARE)
|
||||
set(PLUGINS_INSTALL_LOCATION "share/imhex/plugins")
|
||||
else()
|
||||
set(PLUGINS_INSTALL_LOCATION "${CMAKE_INSTALL_LIBDIR}/imhex/plugins")
|
||||
# Warning : Do not work with portable versions such as appimage (because the path is hardcoded)
|
||||
add_compile_definitions(SYSTEM_PLUGINS_LOCATION="${CMAKE_INSTALL_FULL_LIBDIR}/imhex") # "plugins" will be appended from the app
|
||||
endif()
|
||||
|
||||
else ()
|
||||
message(FATAL_ERROR "Unknown / unsupported system!")
|
||||
endif()
|
||||
|
||||
if(IMHEX_USE_BUNDLED_CA)
|
||||
add_compile_definitions(IMHEX_USE_BUNDLED_CA)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
# Detect 32 vs. 64 bit system
|
||||
macro(detectArch)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_compile_definitions(ARCH_64_BIT)
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
add_compile_definitions(ARCH_32_BIT)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(configurePackingResources)
|
||||
option (CREATE_PACKAGE "Create a package with CPack" OFF)
|
||||
|
||||
if (APPLE)
|
||||
option (CREATE_BUNDLE "Create a bundle on macOS" OFF)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(APPLICATION_TYPE)
|
||||
set(IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/resource.rc")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-subsystem,windows")
|
||||
|
||||
if (CREATE_PACKAGE)
|
||||
set(CPACK_GENERATOR "WIX")
|
||||
set(CPACK_PACKAGE_NAME "imhex")
|
||||
set(CPACK_PACKAGE_VENDOR "WerWolv")
|
||||
set(CPACK_WIX_UPGRADE_GUID "05000E99-9659-42FD-A1CF-05C554B39285")
|
||||
set(CPACK_WIX_PRODUCT_ICON "${PROJECT_SOURCE_DIR}/resources/dist/windows/icon.ico")
|
||||
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_banner.png")
|
||||
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/resources/dist/windows/wix_dialog.png")
|
||||
set(CPACK_WIX_CULTURES "en-US;de-DE;ja-JP;it-IT;pt-BR;zh-CN;zh-TW")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "ImHex")
|
||||
set_property(INSTALL "$<TARGET_FILE_NAME:main>"
|
||||
PROPERTY CPACK_START_MENU_SHORTCUTS "ImHex"
|
||||
)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/resources/dist/windows/LICENSE.rtf")
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
set (IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/dist/macos/AppIcon.icns")
|
||||
|
||||
if (CREATE_BUNDLE)
|
||||
set(APPLICATION_TYPE MACOSX_BUNDLE)
|
||||
set_source_files_properties(${IMHEX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set(MACOSX_BUNDLE_ICON_FILE "AppIcon.icns")
|
||||
set(MACOSX_BUNDLE_INFO_STRING "WerWolv")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "ImHex")
|
||||
set(MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/dist/macos/Info.plist.in")
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.WerWolv.ImHex")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}-${GIT_COMMIT_HASH}")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
|
||||
string(TIMESTAMP CURR_YEAR "%Y")
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2020 - ${CURR_YEAR} WerWolv. All rights reserved." )
|
||||
if ("${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
||||
set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/ImHex.app")
|
||||
else ()
|
||||
set (IMHEX_BUNDLE_PATH "${CMAKE_BINARY_DIR}/ImHex.app")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(createPackage)
|
||||
set(LIBRARY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
file(MAKE_DIRECTORY "plugins")
|
||||
foreach (plugin IN LISTS PLUGINS)
|
||||
add_subdirectory("plugins/${plugin}")
|
||||
if (TARGET ${plugin})
|
||||
get_target_property(IS_RUST_PROJECT ${plugin} RUST_PROJECT)
|
||||
|
||||
set_target_properties(${plugin} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
|
||||
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
|
||||
|
||||
if (IS_RUST_PROJECT)
|
||||
set_target_properties(${plugin} PROPERTIES CARGO_BUILD_TARGET_DIR ${CMAKE_BINARY_DIR}/plugins)
|
||||
|
||||
get_target_property(PLUGIN_LOCATION ${plugin} LOCATION)
|
||||
|
||||
install(FILES "${PLUGIN_LOCATION}/../${plugin}.hexplug" DESTINATION "${PLUGINS_INSTALL_LOCATION}" PERMISSIONS ${LIBRARY_PERMISSIONS})
|
||||
else ()
|
||||
if (WIN32)
|
||||
install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION})
|
||||
elseif (APPLE)
|
||||
if (CREATE_BUNDLE)
|
||||
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:main>/${PLUGINS_INSTALL_LOCATION})
|
||||
else ()
|
||||
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
|
||||
endif ()
|
||||
else ()
|
||||
install(TARGETS ${plugin} LIBRARY DESTINATION ${PLUGINS_INSTALL_LOCATION})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_dependencies(imhex_all ${plugin})
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
set_target_properties(libimhex PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
if (WIN32)
|
||||
# Install binaries directly in the prefix, usually C:\Program Files\ImHex.
|
||||
set(CMAKE_INSTALL_BINDIR ".")
|
||||
|
||||
# Grab all dynamically linked dependencies.
|
||||
INSTALL(CODE "set(CMAKE_INSTALL_BINDIR \"${CMAKE_INSTALL_BINDIR}\")")
|
||||
INSTALL(CODE "LIST(APPEND DEP_FOLDERS \${PY_PARENT})")
|
||||
install(CODE [[
|
||||
file(GET_RUNTIME_DEPENDENCIES
|
||||
EXECUTABLES $<TARGET_FILE:builtin> $<TARGET_FILE:libimhex> $<TARGET_FILE:main>
|
||||
RESOLVED_DEPENDENCIES_VAR _r_deps
|
||||
UNRESOLVED_DEPENDENCIES_VAR _u_deps
|
||||
CONFLICTING_DEPENDENCIES_PREFIX _c_deps
|
||||
DIRECTORIES ${DEP_FOLDERS} $ENV{PATH}
|
||||
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
|
||||
)
|
||||
|
||||
if(_u_deps)
|
||||
message(WARNING "There were unresolved dependencies for binary: \"${_u_deps}\"!")
|
||||
endif()
|
||||
if(_c_deps_FILENAMES)
|
||||
message(WARNING "There were conflicting dependencies for library: \"${_c_deps}\"!")
|
||||
endif()
|
||||
|
||||
foreach(_file ${_r_deps})
|
||||
file(INSTALL
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
TYPE SHARED_LIBRARY
|
||||
FOLLOW_SYMLINK_CHAIN
|
||||
FILES "${_file}"
|
||||
)
|
||||
endforeach()
|
||||
]])
|
||||
|
||||
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}" PERMISSIONS ${LIBRARY_PERMISSIONS})
|
||||
downloadImHexPatternsFiles("./")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
|
||||
set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION})
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/licenses/imhex)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
|
||||
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}" PERMISSIONS ${LIBRARY_PERMISSIONS})
|
||||
downloadImHexPatternsFiles("./share/imhex")
|
||||
|
||||
# install AppStream file
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/net.werwolv.imhex.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo)
|
||||
|
||||
# install symlink for the old standard name
|
||||
file(CREATE_LINK net.werwolv.imhex.metainfo.xml ${CMAKE_CURRENT_BINARY_DIR}/net.werwolv.imhex.appdata.xml SYMBOLIC)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/net.werwolv.imhex.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo)
|
||||
|
||||
endif()
|
||||
|
||||
if (CREATE_BUNDLE)
|
||||
include(PostprocessBundle)
|
||||
|
||||
set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION})
|
||||
|
||||
set_property(TARGET main PROPERTY MACOSX_BUNDLE_INFO_PLIST ${MACOSX_BUNDLE_INFO_PLIST})
|
||||
|
||||
# Fix rpath
|
||||
add_custom_command(TARGET imhex_all POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/" $<TARGET_FILE:main>)
|
||||
|
||||
# FIXME: Remove this once we move/integrate the plugins directory.
|
||||
add_custom_target(build-time-make-plugins-directory ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${IMHEX_BUNDLE_PATH}/Contents/MacOS/plugins")
|
||||
add_custom_target(build-time-make-resources-directory ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${IMHEX_BUNDLE_PATH}/Contents/Resources")
|
||||
|
||||
downloadImHexPatternsFiles("${IMHEX_BUNDLE_PATH}/Contents/MacOS")
|
||||
|
||||
install(FILES ${IMHEX_ICON} DESTINATION "${IMHEX_BUNDLE_PATH}/Contents/Resources")
|
||||
install(TARGETS main BUNDLE DESTINATION ".")
|
||||
install(FILES $<TARGET_FILE:main> DESTINATION "${IMHEX_BUNDLE_PATH}")
|
||||
|
||||
# Update library references to make the bundle portable
|
||||
postprocess_bundle(imhex_all main)
|
||||
|
||||
# Enforce DragNDrop packaging.
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
else()
|
||||
install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
if (CREATE_PACKAGE)
|
||||
set (CPACK_BUNDLE_NAME "ImHex")
|
||||
set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" )
|
||||
set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist")
|
||||
|
||||
include(CPack)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(JOIN OUTPUT GLUE)
|
||||
set(_TMP_RESULT "")
|
||||
set(_GLUE "") # effective glue is empty at the beginning
|
||||
foreach(arg ${ARGN})
|
||||
set(_TMP_RESULT "${_TMP_RESULT}${_GLUE}${arg}")
|
||||
set(_GLUE "${GLUE}")
|
||||
endforeach()
|
||||
set(${OUTPUT} "${_TMP_RESULT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro(setDefaultBuiltTypeIfUnset)
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Using Release build type as it was left unset" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(loadVersion version)
|
||||
set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${VERSION_FILE})
|
||||
file(READ "${VERSION_FILE}" read_version)
|
||||
string(STRIP ${read_version} read_version)
|
||||
set(${version} ${read_version} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(detectBadClone)
|
||||
if (IMHEX_IGNORE_BAD_CLONE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
file (GLOB EXTERNAL_DIRS "lib/external/*")
|
||||
foreach (EXTERNAL_DIR ${EXTERNAL_DIRS})
|
||||
file(GLOB RESULT "${EXTERNAL_DIR}/*")
|
||||
list(LENGTH RESULT ENTRY_COUNT)
|
||||
if(ENTRY_COUNT LESS_EQUAL 1)
|
||||
message(FATAL_ERROR "External dependency ${EXTERNAL_DIR} is empty!\nMake sure to correctly clone ImHex using the --recurse-submodules git option or initialize the submodules manually.")
|
||||
endif()
|
||||
endforeach ()
|
||||
endfunction()
|
||||
|
||||
function(verifyCompiler)
|
||||
if (IMHEX_IGNORE_BAD_COMPILER)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0.0")
|
||||
message(FATAL_ERROR "ImHex requires GCC 12.0.0 or newer. Please use the latest GCC version.")
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14.0.0")
|
||||
message(FATAL_ERROR "ImHex requires Clang 14.0.0 or newer. Please use the latest Clang version.")
|
||||
elseif (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
message(FATAL_ERROR "ImHex can only be compiled with GCC or Clang. ${CMAKE_CXX_COMPILER_ID} is not supported.")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(setVariableInParent variable value)
|
||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||
|
||||
if (hasParent)
|
||||
set(${variable} "${value}" PARENT_SCOPE)
|
||||
else ()
|
||||
set(${variable} "${value}")
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
function(downloadImHexPatternsFiles dest)
|
||||
if (NOT IMHEX_OFFLINE_BUILD)
|
||||
if (IMHEX_PATTERNS_PULL_MASTER)
|
||||
set(PATTERNS_BRANCH master)
|
||||
else ()
|
||||
set(PATTERNS_BRANCH ImHex-v${IMHEX_VERSION})
|
||||
endif ()
|
||||
|
||||
FetchContent_Declare(
|
||||
imhex_patterns
|
||||
GIT_REPOSITORY https://github.com/WerWolv/ImHex-Patterns.git
|
||||
GIT_TAG master
|
||||
)
|
||||
|
||||
message(STATUS "Downloading ImHex-Patterns repo branch ${PATTERNS_BRANCH}...")
|
||||
FetchContent_MakeAvailable(imhex_patterns)
|
||||
message(STATUS "Finished downloading ImHex-Patterns")
|
||||
|
||||
else ()
|
||||
# Maybe patterns are cloned to a subdirectory
|
||||
set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
|
||||
endif ()
|
||||
|
||||
if (EXISTS ${imhex_patterns_SOURCE_DIR})
|
||||
set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
|
||||
foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
|
||||
install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
endfunction()
|
||||
|
||||
macro(setupCompilerWarnings target)
|
||||
set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror")
|
||||
set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}")
|
||||
set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}")
|
||||
endmacro()
|
||||
|
||||
# uninstall target
|
||||
macro(setUninstallTarget)
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(addBundledLibraries)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
set(EXTERN_LIBS_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/lib/external")
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/imgui)
|
||||
set_target_properties(imgui PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/microtar EXCLUDE_FROM_ALL)
|
||||
set_target_properties(microtar PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/intervaltree EXCLUDE_FROM_ALL)
|
||||
set_target_properties(intervaltree PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set(XDGPP_INCLUDE_DIRS "${EXTERN_LIBS_FOLDER}/xdgpp")
|
||||
set(CURL_USE_MBEDTLS ON)
|
||||
set(BUILD_CURL_EXE OFF)
|
||||
set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "")
|
||||
|
||||
if(NOT USE_SYSTEM_FMT)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/fmt EXCLUDE_FROM_ALL)
|
||||
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set(FMT_LIBRARIES fmt::fmt-header-only)
|
||||
else()
|
||||
find_package(fmt 8.0.0 REQUIRED)
|
||||
set(FMT_LIBRARIES fmt::fmt)
|
||||
endif()
|
||||
|
||||
if (NOT USE_SYSTEM_NFD)
|
||||
set(NFD_PORTAL ON CACHE BOOL "Use Portals for Linux file dialogs" FORCE)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/nativefiledialog EXCLUDE_FROM_ALL)
|
||||
set_target_properties(nfd PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set(NFD_LIBRARIES nfd)
|
||||
else()
|
||||
find_package(nfd)
|
||||
set(NFD_LIBRARIES nfd)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SYSTEM_NLOHMANN_JSON)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/nlohmann_json EXCLUDE_FROM_ALL)
|
||||
set(NLOHMANN_JSON_LIBRARIES nlohmann_json)
|
||||
else()
|
||||
find_package(nlohmann_json 3.10.2 REQUIRED)
|
||||
set(NLOHMANN_JSON_LIBRARIES nlohmann_json::nlohmann_json)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SYSTEM_CURL)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/curl EXCLUDE_FROM_ALL)
|
||||
set_target_properties(libcurl PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set(LIBCURL_LIBRARIES libcurl)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBCURL REQUIRED IMPORTED_TARGET libcurl>=7.76.1)
|
||||
endif()
|
||||
|
||||
if (NOT USE_SYSTEM_LLVM)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/llvm-demangle EXCLUDE_FROM_ALL)
|
||||
set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
else()
|
||||
find_package(LLVM REQUIRED Demangle)
|
||||
endif()
|
||||
|
||||
if (NOT USE_SYSTEM_YARA)
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/yara EXCLUDE_FROM_ALL)
|
||||
set_target_properties(libyara PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set(YARA_LIBRARIES libyara)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(YARA REQUIRED IMPORTED_TARGET yara)
|
||||
endif()
|
||||
|
||||
if (NOT USE_SYSTEM_CAPSTONE)
|
||||
set(CAPSTONE_BUILD_STATIC_RUNTIME OFF CACHE BOOL "Disable shared library building")
|
||||
set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Disable shared library building")
|
||||
set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Disable tests")
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/capstone EXCLUDE_FROM_ALL)
|
||||
set_target_properties(capstone PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set(CAPSTONE_LIBRARIES "capstone")
|
||||
set(CAPSTONE_INCLUDE_DIRS ${EXTERN_LIBS_FOLDER}/capstone/include)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(CAPSTONE 4.0.2 REQUIRED capstone)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${EXTERN_LIBS_FOLDER}/pattern_language EXCLUDE_FROM_ALL)
|
||||
set_target_properties(libpl PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
find_package(mbedTLS 2.26.0 REQUIRED)
|
||||
|
||||
pkg_search_module(MAGIC libmagic>=5.39)
|
||||
if(NOT MAGIC_FOUND)
|
||||
find_library(MAGIC 5.39 magic REQUIRED)
|
||||
else()
|
||||
set(MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDEDIR})
|
||||
endif()
|
||||
endmacro()
|
||||
21
cmake/cmake_uninstall.cmake.in
Normal file
21
cmake/cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,21 @@
|
||||
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
exec_program(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif()
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif()
|
||||
endforeach()
|
||||
70
cmake/modules/FindmbedTLS.cmake
Normal file
70
cmake/modules/FindmbedTLS.cmake
Normal file
@@ -0,0 +1,70 @@
|
||||
# - Try to find mbedTLS
|
||||
# Once done this will define
|
||||
#
|
||||
# Read-Only variables
|
||||
# MBEDTLS_FOUND - system has mbedTLS
|
||||
# MBEDTLS_INCLUDE_DIR - the mbedTLS include directory
|
||||
# MBEDTLS_LIBRARY_DIR - the mbedTLS library directory
|
||||
# MBEDTLS_LIBRARIES - Link these to use mbedTLS
|
||||
# MBEDTLS_LIBRARY - path to mbedTLS library
|
||||
# MBEDX509_LIBRARY - path to mbedTLS X.509 library
|
||||
# MBEDCRYPTO_LIBRARY - path to mbedTLS Crypto library
|
||||
|
||||
# Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
||||
# Copyright (c) 2005,2006 Mikhail Gusarov <dottedmag@dottedmag.net>
|
||||
# Copyright (c) 2006-2007 The Written Word, Inc.
|
||||
# Copyright (c) 2007 Eli Fant <elifantu@mail.ru>
|
||||
# Copyright (c) 2009-2019 Daniel Stenberg
|
||||
# Copyright (C) 2008, 2009 Simon Josefsson
|
||||
# All rights reserved.
|
||||
|
||||
|
||||
FIND_PATH(MBEDTLS_INCLUDE_DIR mbedtls/version.h)
|
||||
|
||||
SET(MBEDTLS_FIND_QUIETLY TRUE)
|
||||
|
||||
FIND_LIBRARY(MBEDTLS_LIBRARY NAMES mbedtls libmbedtls libmbedx509)
|
||||
FIND_LIBRARY(MBEDX509_LIBRARY NAMES mbedx509 libmbedx509)
|
||||
FIND_LIBRARY(MBEDCRYPTO_LIBRARY NAMES mbedcrypto libmbedcrypto)
|
||||
|
||||
IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY AND MBEDX509_LIBRARY AND MBEDCRYPTO_LIBRARY)
|
||||
SET(MBEDTLS_FOUND TRUE)
|
||||
ENDIF()
|
||||
|
||||
IF(MBEDTLS_FOUND)
|
||||
# split mbedTLS into -L and -l linker options, so we can set them for pkg-config
|
||||
GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_DIR ${MBEDTLS_LIBRARY} PATH)
|
||||
GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY} NAME_WE)
|
||||
STRING(REGEX REPLACE "^lib" "" MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY_FILE})
|
||||
STRING(REGEX REPLACE "^lib" "" MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY_FILE})
|
||||
STRING(REGEX REPLACE "^lib" "" MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY_FILE})
|
||||
SET(MBEDTLS_LIBRARIES "-L${MBEDTLS_LIBRARY_DIR} -l${MBEDTLS_LIBRARY_FILE} -l${MBEDX509_LIBRARY_FILE} -l${MBEDCRYPTO_LIBRARY_FILE}")
|
||||
|
||||
IF(NOT MBEDTLS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found mbedTLS:")
|
||||
FILE(READ ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLSCONTENT)
|
||||
STRING(REGEX MATCH "MBEDTLS_VERSION_STRING +\"[0-9|.]+\"" MBEDTLSMATCH ${MBEDTLSCONTENT})
|
||||
IF (MBEDTLSMATCH)
|
||||
STRING(REGEX REPLACE "MBEDTLS_VERSION_STRING +\"([0-9|.]+)\"" "\\1" MBEDTLS_VERSION ${MBEDTLSMATCH})
|
||||
MESSAGE(STATUS " version ${MBEDTLS_VERSION}")
|
||||
ENDIF(MBEDTLSMATCH)
|
||||
MESSAGE(STATUS " TLS: ${MBEDTLS_LIBRARY}")
|
||||
MESSAGE(STATUS " X509: ${MBEDX509_LIBRARY}")
|
||||
MESSAGE(STATUS " Crypto: ${MBEDCRYPTO_LIBRARY}")
|
||||
ENDIF(NOT MBEDTLS_FIND_QUIETLY)
|
||||
ELSE(MBEDTLS_FOUND)
|
||||
IF(MBEDTLS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find mbedTLS")
|
||||
ENDIF(MBEDTLS_FIND_REQUIRED)
|
||||
ENDIF(MBEDTLS_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MBEDTLS_INCLUDE_DIR
|
||||
MBEDTLS_LIBRARY_DIR
|
||||
MBEDTLS_LIBRARIES
|
||||
MBEDTLS_LIBRARY
|
||||
MBEDX509_LIBRARY
|
||||
MBEDCRYPTO_LIBRARY
|
||||
)
|
||||
61
cmake/modules/PostprocessBundle.cmake
Normal file
61
cmake/modules/PostprocessBundle.cmake
Normal file
@@ -0,0 +1,61 @@
|
||||
# Adapted from the Dolphin project: https://dolphin-emu.org/
|
||||
# This module can be used in two different ways.
|
||||
#
|
||||
# When invoked as `cmake -P PostprocessBundle.cmake`, it fixes up an
|
||||
# application folder to be standalone. It bundles all required libraries from
|
||||
# the system and fixes up library IDs. Any additional shared libraries, like
|
||||
# plugins, that are found under Contents/MacOS/ will be made standalone as well.
|
||||
#
|
||||
# When called with `include(PostprocessBundle)`, it defines a helper
|
||||
# function `postprocess_bundle` that sets up the command form of the
|
||||
# module as a post-build step.
|
||||
|
||||
if(CMAKE_GENERATOR)
|
||||
# Being called as include(PostprocessBundle), so define a helper function.
|
||||
set(_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}")
|
||||
function(postprocess_bundle out_target in_target)
|
||||
add_custom_command(TARGET ${out_target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -DBUNDLE_PATH="$<TARGET_FILE_DIR:${in_target}>/../.." -DCODE_SIGN_CERTIFICATE_ID="${CODE_SIGN_CERTIFICATE_ID}"
|
||||
-P "${_POSTPROCESS_BUNDLE_MODULE_LOCATION}"
|
||||
)
|
||||
endfunction()
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_filename_component(BUNDLE_PATH "${BUNDLE_PATH}" ABSOLUTE)
|
||||
message(STATUS "Fixing up application bundle: ${BUNDLE_PATH}")
|
||||
|
||||
|
||||
# Make sure to fix up any included ImHex plugin.
|
||||
file(GLOB_RECURSE extra_libs "${BUNDLE_PATH}/Contents/MacOS/plugins/*.hexplug")
|
||||
|
||||
message(STATUS "Fixing up application bundle: ${extra_dirs}")
|
||||
|
||||
# BundleUtilities doesn't support DYLD_FALLBACK_LIBRARY_PATH behavior, which
|
||||
# makes it sometimes break on libraries that do weird things with @rpath. Specify
|
||||
# equivalent search directories until https://gitlab.kitware.com/cmake/cmake/issues/16625
|
||||
# is fixed and in our minimum CMake version.
|
||||
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
|
||||
|
||||
# BundleUtilities is overly verbose, so disable most of its messages
|
||||
function(message)
|
||||
if(NOT ARGV MATCHES "^STATUS;")
|
||||
_message(${ARGV})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
fixup_bundle("${BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}")
|
||||
|
||||
if (CODE_SIGN_CERTIFICATE_ID)
|
||||
# Hack around Apple Silicon signing bugs by copying the real app, signing it and moving it back.
|
||||
# IMPORTANT: DON'T USE ${CMAKE_COMMAND} -E copy_directory HERE (this follow symbolic links).
|
||||
execute_process(COMMAND cp -R "${BUNDLE_PATH}" "${BUNDLE_PATH}.temp")
|
||||
execute_process(COMMAND codesign --deep --force --sign "${CODE_SIGN_CERTIFICATE_ID}" "${BUNDLE_PATH}.temp")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUNDLE_PATH}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E rename "${BUNDLE_PATH}.temp" "${BUNDLE_PATH}")
|
||||
endif()
|
||||
|
||||
# Add a necessary rpath to the imhex binary
|
||||
get_bundle_main_executable("${BUNDLE_PATH}" IMHEX_EXECUTABLE)
|
||||
139
dist/AppImageBuilder.yml
vendored
Normal file
139
dist/AppImageBuilder.yml
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
|
||||
version: 1
|
||||
AppDir:
|
||||
path: .AppDir
|
||||
app_info:
|
||||
id: imhex
|
||||
name: ImHex
|
||||
icon: imhex
|
||||
version: "{{VERSION}}"
|
||||
exec: usr/bin/imhex
|
||||
exec_args: $@
|
||||
apt:
|
||||
arch:
|
||||
- amd64
|
||||
allow_unauthenticated: true
|
||||
sources:
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
|
||||
- sourceline: deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
|
||||
- sourceline: deb http://.archive.ubuntu.com/ubuntu/ jammy-backports main restricted
|
||||
universe multiverse
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security universe
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu jammy-security multiverse
|
||||
include:
|
||||
- librsvg2-common
|
||||
- libbz2-1.0:amd64
|
||||
- libcap2:amd64
|
||||
- libdbus-1-3:amd64
|
||||
- libgpg-error0:amd64
|
||||
- liblzma5:amd64
|
||||
- libnss-mdns:amd64
|
||||
- libpcre3:amd64
|
||||
- libselinux1:amd64
|
||||
- libtinfo6:amd64
|
||||
files:
|
||||
include:
|
||||
- /lib/x86_64-linux-gnu/libGLX.so.0
|
||||
- /lib/x86_64-linux-gnu/libGLdispatch.so.0
|
||||
- /lib/x86_64-linux-gnu/libLLVM-13.so.1
|
||||
- /lib/x86_64-linux-gnu/libOpenGL.so.0
|
||||
- /lib/x86_64-linux-gnu/libX11.so.6
|
||||
- /lib/x86_64-linux-gnu/libXau.so.6
|
||||
- /lib/x86_64-linux-gnu/libXcomposite.so.1
|
||||
- /lib/x86_64-linux-gnu/libXcursor.so.1
|
||||
- /lib/x86_64-linux-gnu/libXdamage.so.1
|
||||
- /lib/x86_64-linux-gnu/libXdmcp.so.6
|
||||
- /lib/x86_64-linux-gnu/libXext.so.6
|
||||
- /lib/x86_64-linux-gnu/libXfixes.so.3
|
||||
- /lib/x86_64-linux-gnu/libXi.so.6
|
||||
- /lib/x86_64-linux-gnu/libXinerama.so.1
|
||||
- /lib/x86_64-linux-gnu/libXrandr.so.2
|
||||
- /lib/x86_64-linux-gnu/libXrender.so.1
|
||||
- /lib/x86_64-linux-gnu/libXxf86vm.so.1
|
||||
- /lib/x86_64-linux-gnu/libatk-1.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libatspi.so.0
|
||||
- /lib/x86_64-linux-gnu/libblkid.so.1
|
||||
- /lib/x86_64-linux-gnu/libbrotlicommon.so.1
|
||||
- /lib/x86_64-linux-gnu/libbrotlidec.so.1
|
||||
- /lib/x86_64-linux-gnu/libbsd.so.0
|
||||
- /lib/x86_64-linux-gnu/libcairo-gobject.so.2
|
||||
- /lib/x86_64-linux-gnu/libcairo.so.2
|
||||
- /lib/x86_64-linux-gnu/libdatrie.so.1
|
||||
- /lib/x86_64-linux-gnu/libedit.so.2
|
||||
- /lib/x86_64-linux-gnu/libelf.so.1
|
||||
- /lib/x86_64-linux-gnu/libepoxy.so.0
|
||||
- /lib/x86_64-linux-gnu/libffi.so.8
|
||||
- /lib/x86_64-linux-gnu/libfontconfig.so.1
|
||||
- /lib/x86_64-linux-gnu/libfreetype.so.6
|
||||
- /lib/x86_64-linux-gnu/libfribidi.so.0
|
||||
- /lib/x86_64-linux-gnu/libgcrypt.so.20
|
||||
- /lib/x86_64-linux-gnu/libgdk-3.so.0
|
||||
- /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libgio-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libglapi.so.0
|
||||
- /lib/x86_64-linux-gnu/libglfw.so.3
|
||||
- /lib/x86_64-linux-gnu/libglib-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libgmodule-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libgmp.so.10
|
||||
- /lib/x86_64-linux-gnu/libgnutls.so.30
|
||||
- /lib/x86_64-linux-gnu/libgobject-2.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libgraphite2.so.3
|
||||
- /lib/x86_64-linux-gnu/libharfbuzz.so.0
|
||||
- /lib/x86_64-linux-gnu/libhogweed.so.6
|
||||
- /lib/x86_64-linux-gnu/libicudata.so.70
|
||||
- /lib/x86_64-linux-gnu/libicuuc.so.70
|
||||
- /lib/x86_64-linux-gnu/libidn2.so.0
|
||||
- /lib/x86_64-linux-gnu/libjpeg.so.8
|
||||
- /lib/x86_64-linux-gnu/liblber-2.5.so.0
|
||||
- /lib/x86_64-linux-gnu/libldap-2.5.so.0
|
||||
- /lib/x86_64-linux-gnu/liblz4.so.1
|
||||
- /lib/x86_64-linux-gnu/libmagic.so.1
|
||||
- /lib/x86_64-linux-gnu/libmbedcrypto.so.7
|
||||
- /lib/x86_64-linux-gnu/libmbedtls.so.14
|
||||
- /lib/x86_64-linux-gnu/libmbedx509.so.1
|
||||
- /lib/x86_64-linux-gnu/libmd.so.0
|
||||
- /lib/x86_64-linux-gnu/libmount.so.1
|
||||
- /lib/x86_64-linux-gnu/libnettle.so.8
|
||||
- /lib/x86_64-linux-gnu/libp11-kit.so.0
|
||||
- /lib/x86_64-linux-gnu/libpango-1.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
|
||||
- /lib/x86_64-linux-gnu/libpcre2-8.so.0
|
||||
- /lib/x86_64-linux-gnu/libpixman-1.so.0
|
||||
- /lib/x86_64-linux-gnu/libpng16.so.16
|
||||
- /lib/x86_64-linux-gnu/libsasl2.so.2
|
||||
- /lib/x86_64-linux-gnu/libsensors.so.5
|
||||
- /lib/x86_64-linux-gnu/libstdc++.so.6
|
||||
- /lib/x86_64-linux-gnu/libsystemd.so.0
|
||||
- /lib/x86_64-linux-gnu/libtasn1.so.6
|
||||
- /lib/x86_64-linux-gnu/libthai.so.0
|
||||
- /lib/x86_64-linux-gnu/libunistring.so.2
|
||||
- /lib/x86_64-linux-gnu/libuuid.so.1
|
||||
- /lib/x86_64-linux-gnu/libvulkan.so.1
|
||||
- /lib/x86_64-linux-gnu/libwayland-client.so.0
|
||||
- /lib/x86_64-linux-gnu/libwayland-cursor.so.0
|
||||
- /lib/x86_64-linux-gnu/libwayland-egl.so.1
|
||||
- /lib/x86_64-linux-gnu/libxcb-dri2.so.0
|
||||
- /lib/x86_64-linux-gnu/libxcb-dri3.so.0
|
||||
- /lib/x86_64-linux-gnu/libxcb-present.so.0
|
||||
- /lib/x86_64-linux-gnu/libxcb-sync.so.1
|
||||
- /lib/x86_64-linux-gnu/libxkbcommon.so.0
|
||||
- /lib/x86_64-linux-gnu/libxml2.so.2
|
||||
- /lib/x86_64-linux-gnu/libxshmfence.so.1
|
||||
- /lib/x86_64-linux-gnu/libzstd.so.1
|
||||
exclude:
|
||||
- usr/share/man
|
||||
- usr/share/doc/*/README.*
|
||||
- usr/share/doc/*/changelog.*
|
||||
- usr/share/doc/*/NEWS.*
|
||||
- usr/share/doc/*/TODO.*
|
||||
AppImage:
|
||||
arch: x86_64
|
||||
update-information: gh-releases-zsync|WerWolv|ImHex|latest|imhex-*.AppImage.zsync
|
||||
file_name: imhex-{{VERSION}}.AppImage
|
||||
29
dist/Arch/PKGBUILD
vendored
Normal file
29
dist/Arch/PKGBUILD
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# Maintainer: iTrooz_ <itrooz at protonmail dot com>
|
||||
# Contributor: Morten Linderud <foxboron@archlinux.org>
|
||||
|
||||
pkgname=imhex-bin
|
||||
pkgver=%version%
|
||||
pkgrel=1
|
||||
pkgdesc="A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM. "
|
||||
arch=("x86_64")
|
||||
url="https://github.com/WerWolv/ImHex"
|
||||
license=('GPL2')
|
||||
depends=(glfw mbedtls freetype2 libglvnd dbus xdg-desktop-portal curl fmt yara nlohmann-json)
|
||||
makedepends=(git)
|
||||
provides=(imhex)
|
||||
conflicts=(imhex)
|
||||
source=("$url/releases/download/v$pkgver/imhex-$pkgver-ArchLinux.pkg.tar.zst")
|
||||
md5sums=(SKIP)
|
||||
|
||||
package() {
|
||||
install -Dm755 "$srcdir/usr/bin/imhex" "$pkgdir/usr/bin/imhex"
|
||||
install -Dm644 "$srcdir/usr/lib/libimhex.so.$pkgver" "$pkgdir/usr/lib/libimhex.so.$pkgver"
|
||||
|
||||
for plugin in "$srcdir/usr/lib/imhex/plugins/"*.hexplug; do
|
||||
install -Dm644 "$plugin" "$pkgdir/usr/lib/imhex/plugins/${plugin##*/}"
|
||||
done
|
||||
|
||||
install -d "$pkgdir/usr/share/imhex"
|
||||
cp -r "$srcdir/usr/share/imhex/"{constants,encodings,includes,magic,patterns} "$pkgdir/usr/share/imhex"
|
||||
cp -r "$srcdir/usr/share/"{applications,licenses} "$pkgdir/usr/share"
|
||||
}
|
||||
9
dist/Brewfile
vendored
Normal file
9
dist/Brewfile
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
brew "mbedtls"
|
||||
brew "nlohmann-json"
|
||||
brew "cmake"
|
||||
brew "ccache"
|
||||
brew "freetype2"
|
||||
brew "libmagic"
|
||||
brew "pkg-config"
|
||||
brew "gcc@12"
|
||||
brew "llvm"
|
||||
12
dist/DEBIAN/control.in
vendored
Normal file
12
dist/DEBIAN/control.in
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Package: ImHex
|
||||
Version: ${PROJECT_VERSION}
|
||||
Section: editors
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
License: GNU GPL-2
|
||||
Depends: libglfw3, libmagic1, libmbedtls14, libfreetype6, libopengl0, libdbus-1-3, xdg-desktop-portal
|
||||
Maintainer: WerWolv <hey@werwolv.net>
|
||||
Description: ImHex Hex Editor
|
||||
A Hex Editor for Reverse Engineers, Programmers and
|
||||
people who value their retinas when working at 3 AM.
|
||||
|
||||
27
dist/Dockerfile
vendored
Normal file
27
dist/Dockerfile
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM archlinux:latest
|
||||
|
||||
LABEL maintainer="hey@werwolv.net" = WerWolv
|
||||
|
||||
# Install dependencies
|
||||
RUN pacman -Syy --needed --noconfirm
|
||||
RUN pacman -S --needed --noconfirm \
|
||||
git \
|
||||
cmake \
|
||||
base-devel \
|
||||
gcc \
|
||||
pkg-config \
|
||||
glfw-x11 \
|
||||
file \
|
||||
mbedtls \
|
||||
freetype2 \
|
||||
dbus \
|
||||
xdg-desktop-portal
|
||||
|
||||
# Clone ImHex
|
||||
RUN git clone https://github.com/WerWolv/ImHex --recurse-submodules /root/ImHex
|
||||
|
||||
# Build ImHex
|
||||
RUN mkdir /root/ImHex/build
|
||||
WORKDIR /root/ImHex/build
|
||||
RUN cmake .. && make -j
|
||||
WORKDIR /root/ImHex
|
||||
28
dist/ImHex-9999.ebuild
vendored
Normal file
28
dist/ImHex-9999.ebuild
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# app-editors/ImHex
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
|
||||
HOMEPAGE="https://github.com/WerWolv/ImHex"
|
||||
SRC_URI=""
|
||||
EGIT_REPO_URI="https://github.com/WerWolv/ImHex.git"
|
||||
|
||||
inherit git-r3 cmake
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
media-libs/glfw
|
||||
sys-apps/file
|
||||
dev-libs/mbedtls
|
||||
dev-cpp/nlohmann_json
|
||||
dbus
|
||||
xdg-desktop-portal
|
||||
"
|
||||
BDEPEND="${DEPEND}"
|
||||
27
dist/compiling/linux.md
vendored
Normal file
27
dist/compiling/linux.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
### Compiling ImHex on Linux
|
||||
|
||||
On Linux, ImHex is built through regular GCC (or optionally Clang).
|
||||
|
||||
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
|
||||
2. Install the dependencies using one of the `dist/get_deps_*.sh` scripts. Choose the one that matches your distro.
|
||||
3. Build ImHex itself using the following commands:
|
||||
```sh
|
||||
cd ImHex
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||
..
|
||||
make -j 4 install
|
||||
```
|
||||
|
||||
All paths follow the XDG Base Directories standard, and can thus be modified
|
||||
with the environment variables `XDG_CONFIG_HOME`, `XDG_CONFIG_DIRS`,
|
||||
`XDG_DATA_HOME` and `XDG_DATA_DIRS`.
|
||||
32
dist/compiling/macos.md
vendored
Normal file
32
dist/compiling/macos.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
### Compiling ImHex on macOS
|
||||
|
||||
On macOS, ImHex is built through regular GCC and AppleClang.
|
||||
|
||||
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
|
||||
2. Install all the dependencies using `brew bundle --no-lock --file dist/Brewfile`
|
||||
3. Build ImHex itself using the following commands:
|
||||
```sh
|
||||
cd ImHex
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
|
||||
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
|
||||
OBJC=$(brew --prefix llvm)/bin/clang \
|
||||
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
|
||||
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
|
||||
MACOSX_DEPLOYMENT_TARGET="10.15" \
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCREATE_BUNDLE=ON \
|
||||
-DCREATE_PACKAGE=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||
..
|
||||
make -j4 package
|
||||
```
|
||||
|
||||
If the build fails while trying to find the macOS libraries, make sure you have
|
||||
Xcode installed with `xcode-select --install`. Homebrew will also help get the
|
||||
most recent SDK installed and configured with `brew doctor`.
|
||||
28
dist/compiling/windows.md
vendored
Normal file
28
dist/compiling/windows.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
### Compiling ImHex on Windows
|
||||
|
||||
On Windows, ImHex is built through [msys2 / mingw](https://www.msys2.org/)'s gcc.
|
||||
|
||||
1. Download and install msys2 from their [website](https://www.msys2.org/).
|
||||
2. Open the `MSYS2 MinGW x64` shell
|
||||
3. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
|
||||
4. Install all the dependencies using `./ImHex/dist/get_deps_msys2.sh`
|
||||
5. Build ImHex itself using the following commands:
|
||||
```sh
|
||||
cd ImHex
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MinGW Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
|
||||
..
|
||||
mingw32-make -j install
|
||||
```
|
||||
|
||||
ImHex will look for any extra resources either in various folders directly next to the executable or in `%localappdata%/imhex`
|
||||
16
dist/get_deps_archlinux.sh
vendored
Executable file
16
dist/get_deps_archlinux.sh
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
pacman -S $@ --needed \
|
||||
cmake \
|
||||
gcc \
|
||||
lld \
|
||||
glfw \
|
||||
file \
|
||||
mbedtls \
|
||||
freetype2 \
|
||||
dbus \
|
||||
xdg-desktop-portal \
|
||||
curl \
|
||||
fmt \
|
||||
yara \
|
||||
nlohmann-json
|
||||
24
dist/get_deps_debian.sh
vendored
Executable file
24
dist/get_deps_debian.sh
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Install pkgconf (adds minimum dependencies) only if the equivalent pkf-config is not already installed.
|
||||
if ! which pkg-config
|
||||
then
|
||||
PKGCONF="pkgconf"
|
||||
fi
|
||||
|
||||
apt install -y \
|
||||
build-essential \
|
||||
gcc-12 \
|
||||
g++-12 \
|
||||
lld \
|
||||
${PKGCONF:-} \
|
||||
cmake \
|
||||
make \
|
||||
ccache \
|
||||
libglfw3-dev \
|
||||
libglm-dev \
|
||||
libmagic-dev \
|
||||
libmbedtls-dev \
|
||||
libfreetype-dev \
|
||||
libdbus-1-dev \
|
||||
xdg-desktop-portal
|
||||
13
dist/get_deps_fedora.sh
vendored
Executable file
13
dist/get_deps_fedora.sh
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
dnf install -y \
|
||||
cmake \
|
||||
dbus-devel \
|
||||
file-devel \
|
||||
freetype-devel \
|
||||
gcc-c++ \
|
||||
git \
|
||||
mesa-libGL-devel \
|
||||
glfw-devel \
|
||||
lld \
|
||||
mbedtls-devel
|
||||
13
dist/get_deps_msys2.sh
vendored
Executable file
13
dist/get_deps_msys2.sh
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
pacman -S --needed --noconfirm \
|
||||
mingw-w64-x86_64-gcc \
|
||||
mingw-w64-x86_64-lld \
|
||||
mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-make \
|
||||
mingw-w64-x86_64-ccache \
|
||||
mingw-w64-x86_64-glfw \
|
||||
mingw-w64-x86_64-file \
|
||||
mingw-w64-x86_64-mbedtls \
|
||||
mingw-w64-x86_64-freetype \
|
||||
mingw-w64-x86_64-dlfcn
|
||||
10
dist/imhex.desktop
vendored
Normal file
10
dist/imhex.desktop
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=ImHex
|
||||
Comment=ImHex Hex Editor
|
||||
GenericName=Hex Editor
|
||||
Exec=imhex %U
|
||||
Icon=imhex
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Development;IDE;
|
||||
StartupWMClass=imhex
|
||||
104
dist/langtool.py
vendored
Normal file
104
dist/langtool.py
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import json
|
||||
|
||||
DEFAULT_LANG = "en_US"
|
||||
INVALID_TRANSLATION = "***** MISSING TRANSLATION *****"
|
||||
|
||||
|
||||
def handle_missing_key(command, lang_data, key, value):
|
||||
if command == "check":
|
||||
print(f"Error: Translation {lang_data['code']} is missing translation for key '{key}'")
|
||||
exit(2)
|
||||
elif command == "translate" or command == "create":
|
||||
print(f"Key \033[1m'{key}': '{value}'\033[0m is missing in translation '{lang_data['code']}'")
|
||||
new_value = input("Enter translation: ")
|
||||
lang_data["translations"][key] = new_value
|
||||
elif command == "update":
|
||||
lang_data["translations"][key] = INVALID_TRANSLATION
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 3:
|
||||
print(f"Usage: {Path(sys.argv[0]).name} <check|translate|update|create> <lang folder path> <language>")
|
||||
return 1
|
||||
|
||||
command = sys.argv[1]
|
||||
if command not in ["check", "translate", "update", "create"]:
|
||||
print(f"Unknown command: {command}")
|
||||
return 1
|
||||
|
||||
print(f"Using langtool in {command} mode")
|
||||
|
||||
lang_folder_path = Path(sys.argv[2])
|
||||
if not lang_folder_path.exists():
|
||||
print(f"Error: {lang_folder_path} does not exist")
|
||||
return 1
|
||||
|
||||
if not lang_folder_path.is_dir():
|
||||
print(f"Error: {lang_folder_path} is not a folder")
|
||||
return 1
|
||||
|
||||
lang = sys.argv[3] if len(sys.argv) > 3 else ""
|
||||
|
||||
print(f"Processing language files in {lang_folder_path}...")
|
||||
|
||||
default_lang_file_path = lang_folder_path / Path(DEFAULT_LANG + ".json")
|
||||
if not default_lang_file_path.exists():
|
||||
print(f"Error: Default language file {default_lang_file_path} does not exist")
|
||||
return 1
|
||||
|
||||
print(f"Using file '{default_lang_file_path.name}' as template language file")
|
||||
|
||||
with default_lang_file_path.open("r", encoding="utf-8") as default_lang_file:
|
||||
default_lang_data = json.load(default_lang_file)
|
||||
|
||||
if command == "create" and lang != "":
|
||||
lang_file_path = lang_folder_path / Path(lang + ".json")
|
||||
if lang_file_path.exists():
|
||||
print(f"Error: Language file {lang_file_path} already exists")
|
||||
return 1
|
||||
|
||||
print(f"Creating new language file '{lang_file_path.name}'")
|
||||
|
||||
with lang_file_path.open("w", encoding="utf-8") as new_lang_file:
|
||||
new_lang_data = {
|
||||
"code": lang,
|
||||
"language": input("Enter language: "),
|
||||
"country": input("Enter country: "),
|
||||
"translations": {}
|
||||
}
|
||||
json.dump(new_lang_data, new_lang_file, indent=4, ensure_ascii=False)
|
||||
|
||||
for additional_lang_file_path in lang_folder_path.glob("*.json"):
|
||||
if not lang == "" and not additional_lang_file_path.stem == lang:
|
||||
continue
|
||||
|
||||
if additional_lang_file_path.name.startswith(DEFAULT_LANG):
|
||||
continue
|
||||
|
||||
print(f"\nProcessing file '{additional_lang_file_path.name}'\n----------------------------\n")
|
||||
|
||||
with additional_lang_file_path.open("r+", encoding="utf-8") as additional_lang_file:
|
||||
additional_lang_data = json.load(additional_lang_file)
|
||||
|
||||
for key, value in default_lang_data["translations"].items():
|
||||
if key not in additional_lang_data["translations"] or additional_lang_data["translations"][key] == INVALID_TRANSLATION:
|
||||
handle_missing_key(command, additional_lang_data, key, value)
|
||||
|
||||
keys_to_remove = []
|
||||
for key, value in additional_lang_data["translations"].items():
|
||||
if key not in default_lang_data["translations"]:
|
||||
keys_to_remove.append(key)
|
||||
|
||||
for key in keys_to_remove:
|
||||
additional_lang_data["translations"].pop(key)
|
||||
print(f"Removed unused key '{key}' from translation '{additional_lang_data['code']}'")
|
||||
|
||||
additional_lang_file.seek(0)
|
||||
additional_lang_file.truncate()
|
||||
json.dump(additional_lang_data, additional_lang_file, indent=4, sort_keys=True, ensure_ascii=False)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
||||
25
dist/macOS/0001-glfw-SW.patch
vendored
Normal file
25
dist/macOS/0001-glfw-SW.patch
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
From 9c8665af4c2e2ce66555c15c05c72027bfdf0cb6 Mon Sep 17 00:00:00 2001
|
||||
From: iTrooz <itrooz@protonmail.com>
|
||||
Date: Mon, 29 Aug 2022 17:29:38 +0200
|
||||
Subject: [PATCH] Use software rendering on MacOS
|
||||
|
||||
---
|
||||
src/nsgl_context.m | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nsgl_context.m b/src/nsgl_context.m
|
||||
index fc1f7521..e5906575 100644
|
||||
--- a/src/nsgl_context.m
|
||||
+++ b/src/nsgl_context.m
|
||||
@@ -198,7 +198,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
||||
NSOpenGLPixelFormatAttribute attribs[40];
|
||||
int index = 0;
|
||||
|
||||
- ADD_ATTRIB(NSOpenGLPFAAccelerated);
|
||||
+ ADD_ATTRIB(NSOpenGLPFARendererID);ADD_ATTRIB(kCGLRendererGenericFloatID);
|
||||
ADD_ATTRIB(NSOpenGLPFAClosestPolicy);
|
||||
|
||||
if (ctxconfig->nsgl.offline)
|
||||
--
|
||||
2.37.2
|
||||
|
||||
43
dist/msys2/PKGBUILD
vendored
Normal file
43
dist/msys2/PKGBUILD
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
_realname=ImHex
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=ci
|
||||
pkgrel=1
|
||||
pkgdesc="${_realname}: a Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM (mingw-w64)"
|
||||
arch=('any')
|
||||
url="https://github.com/WerWolv/ImHex"
|
||||
license=('GPLv2')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-lld"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-make"
|
||||
"${MINGW_PACKAGE_PREFIX}-dlfcn"
|
||||
"${MINGW_PACKAGE_PREFIX}-glfw"
|
||||
"${MINGW_PACKAGE_PREFIX}-file"
|
||||
"${MINGW_PACKAGE_PREFIX}-mbedtls"
|
||||
"${MINGW_PACKAGE_PREFIX}-polly"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype")
|
||||
|
||||
source=()
|
||||
sha256sums=()
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"/../..
|
||||
mkdir build
|
||||
cd build
|
||||
export BUILD_TYPE='Release'
|
||||
MSYS2_ARG_CONV_EXCL=- cmake \
|
||||
-G "MinGW Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
|
||||
../../
|
||||
mingw32-make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/../../build
|
||||
mingw32-make DESTDIR="${pkgdir}" install
|
||||
|
||||
_licenses="${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
|
||||
mkdir -p "${_licenses}"
|
||||
install -m 644 ../LICENSE "${_licenses}"
|
||||
}
|
||||
61
dist/net.werwolv.ImHex.yaml
vendored
Normal file
61
dist/net.werwolv.ImHex.yaml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
app-id: net.werwolv.ImHex
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '20.08'
|
||||
default-branch: stable
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: imhex
|
||||
|
||||
finish-args:
|
||||
- --share=ipc
|
||||
- --socket=x11
|
||||
- --filesystem=host
|
||||
- --device=all
|
||||
|
||||
modules:
|
||||
- name: libiconv
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
|
||||
sha256: e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||
|
||||
- name: glfw
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DBUILD_SHARED_LIBS:BOOL=ON
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip
|
||||
sha256: 08a33a512f29d7dbf78eab39bd7858576adcc95228c9efe8e4bc5f0f3261efc7
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/pkgconfig
|
||||
|
||||
- name: mbedtls
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCMAKE_C_FLAGS=-fPIC
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.27.0.tar.gz
|
||||
sha256: 2a07856e541f0e5f6eaee4f78018c52f25bd244ed76f9020dea54a8b02cac6ea
|
||||
|
||||
- name: nlohmann-json
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DBUILD_TESTING=OFF
|
||||
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/nlohmann/json/archive/v3.9.1.tar.gz
|
||||
sha256: 4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b
|
||||
|
||||
- name: imhex
|
||||
buildsystem: cmake
|
||||
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/WerWolv/ImHex.git
|
||||
34
dist/net.werwolv.imhex.metainfo.xml
vendored
Normal file
34
dist/net.werwolv.imhex.metainfo.xml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>imhex</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0</project_license>
|
||||
<name>ImHex</name>
|
||||
<developer_name>WerWolv</developer_name>
|
||||
<update_contact>hey@werwolv.net</update_contact>
|
||||
<summary>A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM</summary>
|
||||
<description>
|
||||
<p>ImHex is a feature-rich Hex Editor aimed towards Reverse Engineers working with foreign data formats, malware, executables and raw memory.
|
||||
Besides all the features a common Hex Editor has, ImHex also features a custom scripting language used to declare and dissect data structures, support for running YARA rules, a node-based graphical data pre-processor and support for various data sources such as files, raw disks or GDB Servers.</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">imhex.desktop</launchable>
|
||||
<url type="homepage">https://imhex.werwolv.net</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://user-images.githubusercontent.com/10835354/139717326-8044769d-527b-4d88-8adf-2d4ecafdca1f.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://user-images.githubusercontent.com/10835354/139717323-1f8c9d52-f7eb-4f43-9f11-097ac728ed6c.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<provides>
|
||||
<id>imhex.desktop</id>
|
||||
</provides>
|
||||
|
||||
<categories>
|
||||
<category>Development</category>
|
||||
</categories>
|
||||
|
||||
|
||||
</component>
|
||||
86
dist/rpm/imhex.spec
vendored
Normal file
86
dist/rpm/imhex.spec
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
Name: imhex
|
||||
Version: %{_version}
|
||||
Release: 0%{?dist}
|
||||
Summary: A hex editor for reverse engineers and programmers
|
||||
|
||||
License: GPL-2.0-only
|
||||
URL: https://imhex.werwolv.net/
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: file-devel
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: fmt-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: mesa-libGL-devel
|
||||
BuildRequires: glfw-devel
|
||||
BuildRequires: json-devel
|
||||
BuildRequires: libcurl-devel
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: mbedtls-devel
|
||||
%if 0%{?fedora} >= 37
|
||||
BuildRequires: yara-devel
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
ImHex is a Hex Editor, a tool to display, decode and analyze binary data to
|
||||
reverse engineer their format, extract informations or patch values in them.
|
||||
|
||||
What makes ImHex special is that it has many advanced features that can often
|
||||
only be found in paid applications. Such features are a completely custom binary
|
||||
template and pattern language to decode and highlight structures in the data, a
|
||||
graphical node-based data processor to pre-process values before they're
|
||||
displayed, a disassembler, diffing support, bookmarks and much much more. At the
|
||||
same time ImHex is completely free and open source under the GPLv2 language.
|
||||
|
||||
|
||||
%prep
|
||||
# don't use the setup macro since we're pulling from git
|
||||
cp -r %{_src_path}/* %{_builddir}/
|
||||
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DCMAKE_BUILD_TYPE=%{_build_type} \
|
||||
-D USE_SYSTEM_NLOHMANN_JSON=ON \
|
||||
-D USE_SYSTEM_FMT=ON \
|
||||
-D USE_SYSTEM_CURL=ON \
|
||||
-D USE_SYSTEM_LLVM=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D IMHEX_PATTERNS_PULL_MASTER=ON \
|
||||
%if 0%{?fedora} >= 37
|
||||
-D USE_SYSTEM_YARA=ON \
|
||||
# if fedora <= 36 get updated to yara 4.2.x then they should \
|
||||
# be able to build against system libs \
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2112508 \
|
||||
%endif
|
||||
# when capstone >= 5.x is released we should be able to build against \
|
||||
# system libs of it \
|
||||
# -D USE_SYSTEM_CAPSTONE=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/imhex.desktop
|
||||
|
||||
|
||||
%files
|
||||
%dir %{_datadir}/licenses/imhex
|
||||
%license %{_datadir}/licenses/imhex/LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/imhex
|
||||
%dir %{_datadir}/imhex
|
||||
%{_datadir}/imhex/*
|
||||
%{_datadir}/pixmaps/imhex.png
|
||||
%{_datadir}/applications/imhex.desktop
|
||||
%{_prefix}/lib64/libimhex.so.%{_version}
|
||||
%{_prefix}/lib64/imhex/plugins/*
|
||||
%{_metainfodir}/net.werwolv.imhex.metainfo.xml
|
||||
%{_metainfodir}/net.werwolv.imhex.appdata.xml
|
||||
|
||||
%changelog
|
||||
@@ -1,24 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
u16 crc16(prv::Provider* &data, u64 offset, size_t size, u16 polynomial, u16 init);
|
||||
u32 crc32(prv::Provider* &data, u64 offset, size_t size, u32 polynomial, u32 init);
|
||||
|
||||
std::array<u32, 4> md4(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 4> md5(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 5> sha1(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 7> sha224(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 8> sha256(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 12> sha384(prv::Provider* &data, u64 offset, size_t size);
|
||||
std::array<u32, 16> sha512(prv::Provider* &data, u64 offset, size_t size);
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
namespace hex {
|
||||
|
||||
enum class Events {
|
||||
DataChanged
|
||||
};
|
||||
|
||||
struct EventHandler {
|
||||
void *sender;
|
||||
Events eventType;
|
||||
std::function<void(void*)> callback;
|
||||
};
|
||||
|
||||
class EventManager {
|
||||
public:
|
||||
|
||||
void post(Events eventType, void *userData) {
|
||||
for (auto &handler : this->m_eventHandlers)
|
||||
if (eventType == handler.eventType)
|
||||
handler.callback(userData);
|
||||
}
|
||||
|
||||
void subscribe(Events eventType, void *sender, std::function<void(void*)> callback) {
|
||||
for (auto &handler : this->m_eventHandlers)
|
||||
if (eventType == handler.eventType && sender == handler.sender)
|
||||
return;
|
||||
|
||||
this->m_eventHandlers.push_back(EventHandler { sender, eventType, callback });
|
||||
}
|
||||
|
||||
void unsubscribe(Events eventType, void *sender) {
|
||||
std::erase_if(this->m_eventHandlers, [&eventType, &sender](EventHandler handler) {
|
||||
return eventType == handler.eventType && sender == handler.sender;
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<EventHandler> m_eventHandlers;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
using u8 = std::uint8_t;
|
||||
using u16 = std::uint16_t;
|
||||
using u32 = std::uint32_t;
|
||||
using u64 = std::uint64_t;
|
||||
using u128 = __uint128_t;
|
||||
|
||||
using s8 = std::int8_t;
|
||||
using s16 = std::int16_t;
|
||||
using s32 = std::int32_t;
|
||||
using s64 = std::int64_t;
|
||||
using s128 = __int128_t;
|
||||
|
||||
#include "parser/result.hpp"
|
||||
#include "parser/results.hpp"
|
||||
@@ -1,81 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "token.hpp"
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
class ASTNode {
|
||||
public:
|
||||
enum class Type {
|
||||
VariableDecl,
|
||||
TypeDecl,
|
||||
Struct,
|
||||
Scope,
|
||||
};
|
||||
|
||||
explicit ASTNode(Type type) : m_type(type) {}
|
||||
virtual ~ASTNode() = default;
|
||||
|
||||
Type getType() { return this->m_type; }
|
||||
|
||||
private:
|
||||
Type m_type;
|
||||
};
|
||||
|
||||
class ASTNodeVariableDecl : public ASTNode {
|
||||
public:
|
||||
explicit ASTNodeVariableDecl(const Token::TypeToken::Type &type, const std::string &name, const std::string& customTypeName = "", std::optional<u64> offset = { }, size_t arraySize = 1)
|
||||
: ASTNode(Type::VariableDecl), m_type(type), m_name(name), m_customTypeName(customTypeName), m_offset(offset), m_arraySize(arraySize) { }
|
||||
|
||||
const Token::TypeToken::Type& getVariableType() const { return this->m_type; }
|
||||
const std::string& getCustomVariableTypeName() const { return this->m_customTypeName; }
|
||||
const std::string& getVariableName() const { return this->m_name; };
|
||||
std::optional<u64> getOffset() const { return this->m_offset; }
|
||||
size_t getArraySize() const { return this->m_arraySize; }
|
||||
|
||||
private:
|
||||
Token::TypeToken::Type m_type;
|
||||
std::string m_name, m_customTypeName;
|
||||
std::optional<u64> m_offset;
|
||||
size_t m_arraySize;
|
||||
};
|
||||
|
||||
class ASTNodeScope : public ASTNode {
|
||||
public:
|
||||
explicit ASTNodeScope(std::vector<ASTNode*> nodes) : ASTNode(Type::Scope), m_nodes(nodes) { }
|
||||
|
||||
std::vector<ASTNode*> &getNodes() { return this->m_nodes; }
|
||||
private:
|
||||
std::vector<ASTNode*> m_nodes;
|
||||
};
|
||||
|
||||
class ASTNodeStruct : public ASTNode {
|
||||
public:
|
||||
explicit ASTNodeStruct(std::string name, std::vector<ASTNode*> nodes)
|
||||
: ASTNode(Type::Struct), m_name(name), m_nodes(nodes) { }
|
||||
|
||||
const std::string& getName() const { return this->m_name; }
|
||||
std::vector<ASTNode*> &getNodes() { return this->m_nodes; }
|
||||
private:
|
||||
std::string m_name;
|
||||
std::vector<ASTNode*> m_nodes;
|
||||
};
|
||||
|
||||
class ASTNodeTypeDecl : public ASTNode {
|
||||
public:
|
||||
explicit ASTNodeTypeDecl(const Token::TypeToken::Type &type, const std::string &name, const std::string& customTypeName = "")
|
||||
: ASTNode(Type::TypeDecl), m_type(type), m_name(name), m_customTypeName(customTypeName) { }
|
||||
|
||||
const std::string& getTypeName() const { return this->m_name; };
|
||||
|
||||
const Token::TypeToken::Type& getAssignedType() const { return this->m_type; }
|
||||
const std::string& getAssignedCustomTypeName() const { return this->m_customTypeName; }
|
||||
private:
|
||||
Token::TypeToken::Type m_type;
|
||||
std::string m_name, m_customTypeName;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include "token.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
class Lexer {
|
||||
public:
|
||||
Lexer();
|
||||
|
||||
std::pair<Result, std::vector<Token>> lex(const std::string& code);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include "token.hpp"
|
||||
#include "ast_node.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
class Parser {
|
||||
public:
|
||||
Parser();
|
||||
|
||||
std::pair<Result, std::vector<ASTNode*>> parse(const std::vector<Token> &tokens);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
class Result {
|
||||
public:
|
||||
constexpr Result(const std::uint8_t module, const std::uint32_t desc) noexcept : m_result((module << 24) | (desc & 0x00FFFFFF)) { }
|
||||
|
||||
constexpr std::uint32_t getResult() const noexcept { return this->m_result; }
|
||||
constexpr std::uint8_t getModule() const noexcept { return this->m_result >> 24; }
|
||||
constexpr std::uint32_t getDescription() const noexcept { return this->m_result & 0x00FFFFFF; }
|
||||
|
||||
constexpr bool succeeded() const noexcept { return this->m_result == 0; }
|
||||
constexpr bool failed() const noexcept { return !succeeded(); }
|
||||
private:
|
||||
const std::uint32_t m_result;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "result.hpp"
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
constexpr Result ResultSuccess(0, 0);
|
||||
|
||||
constexpr Result ResultLexicalError(1, 1);
|
||||
constexpr Result ResultParseError(2, 1);
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace hex::lang {
|
||||
|
||||
struct Token {
|
||||
enum class Type : u64 {
|
||||
Keyword,
|
||||
Type,
|
||||
Operator,
|
||||
Integer,
|
||||
Identifier,
|
||||
EndOfExpression,
|
||||
ScopeOpen,
|
||||
ScopeClose,
|
||||
ArrayOpen,
|
||||
ArrayClose,
|
||||
Separator,
|
||||
EndOfProgram
|
||||
} type;
|
||||
|
||||
struct KeywordToken {
|
||||
enum class Keyword {
|
||||
Struct,
|
||||
Using
|
||||
} keyword;
|
||||
} keywordToken;
|
||||
struct IdentifierToken {
|
||||
std::string identifier;
|
||||
} identifierToken;
|
||||
struct OperatorToken {
|
||||
enum class Operator {
|
||||
AtDeclaration,
|
||||
Assignment
|
||||
} op;
|
||||
} operatorToken;
|
||||
struct IntegerToken {
|
||||
s128 integer;
|
||||
} integerToken;
|
||||
struct TypeToken {
|
||||
enum class Type {
|
||||
Unsigned8Bit = 0x10,
|
||||
Signed8Bit = 0x11,
|
||||
Unsigned16Bit = 0x20,
|
||||
Signed16Bit = 0x21,
|
||||
Unsigned32Bit = 0x40,
|
||||
Signed32Bit = 0x41,
|
||||
Unsigned64Bit = 0x80,
|
||||
Signed64Bit = 0x81,
|
||||
Unsigned128Bit = 0x100,
|
||||
Signed128Bit = 0x101,
|
||||
Float = 0x42,
|
||||
Double = 0x82,
|
||||
CustomType = 0x00
|
||||
} type;
|
||||
} typeToken;
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "providers/provider.hpp"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
namespace hex::prv {
|
||||
|
||||
class FileProvider : public Provider {
|
||||
public:
|
||||
explicit FileProvider(std::string_view path);
|
||||
~FileProvider() override;
|
||||
|
||||
bool isAvailable() override;
|
||||
bool isReadable() override;
|
||||
bool isWritable() override;
|
||||
|
||||
void read(u64 offset, void *buffer, size_t size) override;
|
||||
void write(u64 offset, void *buffer, size_t size) override;
|
||||
size_t getSize() override;
|
||||
|
||||
private:
|
||||
FILE *m_file;
|
||||
|
||||
bool m_readable, m_writable;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
namespace hex::prv {
|
||||
|
||||
class Provider {
|
||||
public:
|
||||
Provider() = default;
|
||||
virtual ~Provider() = default;
|
||||
|
||||
virtual bool isAvailable() = 0;
|
||||
virtual bool isReadable() = 0;
|
||||
virtual bool isWritable() = 0;
|
||||
|
||||
virtual void read(u64 offset, void *buffer, size_t size) = 0;
|
||||
virtual void write(u64 offset, void *buffer, size_t size) = 0;
|
||||
virtual size_t getSize() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace hex {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace hex {
|
||||
|
||||
struct Highlight {
|
||||
Highlight(u64 offset, size_t size, u32 color, std::string name)
|
||||
: offset(offset), size(size), color(color), name(name) {
|
||||
|
||||
}
|
||||
|
||||
u64 offset;
|
||||
size_t size;
|
||||
u32 color;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include "imgui.h"
|
||||
|
||||
#include "event.hpp"
|
||||
|
||||
namespace hex {
|
||||
|
||||
class View {
|
||||
public:
|
||||
View() { }
|
||||
virtual ~View() { }
|
||||
|
||||
virtual void createView() = 0;
|
||||
virtual void createMenu() { }
|
||||
virtual bool handleShortcut(int key, int mods) { return false; }
|
||||
|
||||
protected:
|
||||
void subscribeEvent(Events eventType, std::function<void(void*)> callback) {
|
||||
View::s_eventManager.subscribe(eventType, this, callback);
|
||||
}
|
||||
|
||||
void unsubscribeEvent(Events eventType) {
|
||||
View::s_eventManager.unsubscribe(eventType, this);
|
||||
}
|
||||
|
||||
void postEvent(Events eventType, void *userData = nullptr) {
|
||||
View::s_eventManager.post(eventType, userData);
|
||||
}
|
||||
|
||||
private:
|
||||
static inline EventManager s_eventManager;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
class ViewHashes : public View {
|
||||
public:
|
||||
explicit ViewHashes(prv::Provider* &dataProvider);
|
||||
~ViewHashes() override;
|
||||
|
||||
void createView() override;
|
||||
void createMenu() override;
|
||||
|
||||
private:
|
||||
prv::Provider* &m_dataProvider;
|
||||
bool m_windowOpen = true;
|
||||
|
||||
bool m_shouldInvalidate = true;
|
||||
int m_currHashFunction = 0;
|
||||
int m_hashStart = 0, m_hashEnd = 0;
|
||||
static constexpr const char* HashFunctionNames[] = { "CRC16", "CRC32", "MD4", "MD5", "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512" };
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "utils.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include "imgui_memory_editor.h"
|
||||
#include "imfilebrowser.h"
|
||||
|
||||
#include <tuple>
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
#include "views/highlight.hpp"
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
class ViewHexEditor : public View {
|
||||
public:
|
||||
ViewHexEditor(prv::Provider* &dataProvider, std::vector<Highlight> &highlights);
|
||||
~ViewHexEditor() override;
|
||||
|
||||
void createView() override;
|
||||
void createMenu() override;
|
||||
bool handleShortcut(int key, int mods) override;
|
||||
|
||||
private:
|
||||
MemoryEditor m_memoryEditor;
|
||||
|
||||
ImGui::FileBrowser m_fileBrowser;
|
||||
|
||||
|
||||
prv::Provider* &m_dataProvider;
|
||||
std::vector<Highlight> &m_highlights;
|
||||
|
||||
char m_searchBuffer[0xFFFF] = { 0 };
|
||||
s64 m_lastSearchIndex = 0;
|
||||
std::vector<std::pair<u64, u64>> m_lastSearch;
|
||||
u64 m_gotoAddress = 0;
|
||||
|
||||
|
||||
void drawSearchPopup();
|
||||
void drawGotoPopup();
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
class ViewInformation : public View {
|
||||
public:
|
||||
explicit ViewInformation(prv::Provider* &dataProvider);
|
||||
~ViewInformation() override;
|
||||
|
||||
void createView() override;
|
||||
void createMenu() override;
|
||||
|
||||
private:
|
||||
prv::Provider* &m_dataProvider;
|
||||
bool m_windowOpen = true;
|
||||
|
||||
float m_averageEntropy = 0;
|
||||
float m_highestBlockEntropy = 0;
|
||||
std::vector<float> m_blockEntropy;
|
||||
|
||||
std::array<float, 256> m_valueCounts = { 0 };
|
||||
bool m_shouldInvalidate = true;
|
||||
|
||||
std::string m_fileDescription;
|
||||
std::string m_mimeType;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "parser/ast_node.hpp"
|
||||
#include "parser/parser.hpp"
|
||||
#include "parser/lexer.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <concepts>
|
||||
#include <cstring>
|
||||
|
||||
#include "views/highlight.hpp"
|
||||
|
||||
#include "imfilebrowser.h"
|
||||
|
||||
namespace hex {
|
||||
|
||||
class ViewPattern : public View {
|
||||
public:
|
||||
explicit ViewPattern(std::vector<Highlight> &highlights);
|
||||
~ViewPattern() override;
|
||||
|
||||
void createMenu() override;
|
||||
void createView() override;
|
||||
|
||||
private:
|
||||
char *m_buffer;
|
||||
|
||||
std::vector<Highlight> &m_highlights;
|
||||
bool m_windowOpen = true;
|
||||
|
||||
ImGui::FileBrowser m_fileBrowser;
|
||||
|
||||
|
||||
void setHighlight(u64 offset, size_t size, std::string name, u32 color = 0);
|
||||
void parsePattern(char *buffer);
|
||||
|
||||
s32 highlightUsingDecls(std::vector<lang::ASTNode*> &ast, lang::ASTNodeTypeDecl* currTypeDeclNode, lang::ASTNodeVariableDecl* currVarDec, u64 offset);
|
||||
s32 highlightStruct(std::vector<lang::ASTNode*> &ast, lang::ASTNodeStruct* currStructNode, u64 offset);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include "imgui.h"
|
||||
#include "views/view.hpp"
|
||||
#include "views/highlight.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
#include <cstdio>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
class ViewPatternData : public View {
|
||||
public:
|
||||
ViewPatternData(prv::Provider* &dataProvider, std::vector<Highlight> &highlights);
|
||||
~ViewPatternData() override;
|
||||
|
||||
void createView() override;
|
||||
void createMenu() override;
|
||||
|
||||
private:
|
||||
prv::Provider* &m_dataProvider;
|
||||
std::vector<Highlight> &m_highlights;
|
||||
bool m_windowOpen = true;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "views/view.hpp"
|
||||
|
||||
struct GLFWwindow;
|
||||
|
||||
namespace hex {
|
||||
|
||||
class Window {
|
||||
public:
|
||||
Window();
|
||||
~Window();
|
||||
|
||||
void loop();
|
||||
|
||||
template<std::derived_from<View> T, typename ... Args>
|
||||
T* addView(Args&& ... args) {
|
||||
this->m_views.emplace_back(new T(std::forward<Args>(args)...));
|
||||
|
||||
return static_cast<T*>(this->m_views.back());
|
||||
}
|
||||
|
||||
private:
|
||||
void frameBegin();
|
||||
void frameEnd();
|
||||
|
||||
void initGLFW();
|
||||
void initImGui();
|
||||
void deinitGLFW();
|
||||
void deinitImGui();
|
||||
|
||||
GLFWwindow* m_window;
|
||||
std::vector<View*> m_views;
|
||||
bool m_fpsVisible = false;
|
||||
|
||||
static inline std::tuple<int, int> s_currShortcut = { -1, -1 };
|
||||
};
|
||||
|
||||
}
|
||||
1
lib/external/capstone
vendored
Submodule
1
lib/external/capstone
vendored
Submodule
Submodule lib/external/capstone added at d5141c0478
1
lib/external/curl
vendored
Submodule
1
lib/external/curl
vendored
Submodule
Submodule lib/external/curl added at c12fb3ddaf
1
lib/external/fmt
vendored
Submodule
1
lib/external/fmt
vendored
Submodule
Submodule lib/external/fmt added at a33701196a
50
lib/external/imgui/CMakeLists.txt
vendored
Normal file
50
lib/external/imgui/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(imgui)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
pkg_search_module(GLFW REQUIRED glfw3)
|
||||
|
||||
if (UNIX)
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif ()
|
||||
|
||||
add_library(imgui OBJECT
|
||||
source/imgui.cpp
|
||||
source/imgui_demo.cpp
|
||||
source/imgui_draw.cpp
|
||||
source/imgui_freetype.cpp
|
||||
source/imgui_impl_glfw.cpp
|
||||
source/imgui_impl_opengl3.cpp
|
||||
source/imgui_tables.cpp
|
||||
source/imgui_widgets.cpp
|
||||
|
||||
source/cimgui.cpp
|
||||
|
||||
source/TextEditor.cpp
|
||||
|
||||
source/imnodes.cpp
|
||||
|
||||
source/implot.cpp
|
||||
source/implot_items.cpp
|
||||
source/implot_demo.cpp
|
||||
|
||||
source/fonts/fontawesome_font.c
|
||||
source/fonts/codicons_font.c
|
||||
source/fonts/unifont_font.c
|
||||
)
|
||||
|
||||
add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD)
|
||||
|
||||
target_include_directories(imgui PUBLIC include ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS})
|
||||
|
||||
target_link_directories(imgui PUBLIC ${GLFW_LIBRARY_DIRS})
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw3 opengl32.lib)
|
||||
elseif (UNIX)
|
||||
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw OpenGL::GL)
|
||||
endif()
|
||||
395
lib/external/imgui/include/TextEditor.h
vendored
Normal file
395
lib/external/imgui/include/TextEditor.h
vendored
Normal file
@@ -0,0 +1,395 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <regex>
|
||||
#include "imgui.h"
|
||||
|
||||
class TextEditor
|
||||
{
|
||||
public:
|
||||
enum class PaletteIndex
|
||||
{
|
||||
Default,
|
||||
Keyword,
|
||||
Number,
|
||||
String,
|
||||
CharLiteral,
|
||||
Punctuation,
|
||||
Preprocessor,
|
||||
Identifier,
|
||||
KnownIdentifier,
|
||||
PreprocIdentifier,
|
||||
Comment,
|
||||
MultiLineComment,
|
||||
Background,
|
||||
Cursor,
|
||||
Selection,
|
||||
ErrorMarker,
|
||||
Breakpoint,
|
||||
LineNumber,
|
||||
CurrentLineFill,
|
||||
CurrentLineFillInactive,
|
||||
CurrentLineEdge,
|
||||
Max
|
||||
};
|
||||
|
||||
enum class SelectionMode
|
||||
{
|
||||
Normal,
|
||||
Word,
|
||||
Line
|
||||
};
|
||||
|
||||
struct Breakpoint
|
||||
{
|
||||
int mLine;
|
||||
bool mEnabled;
|
||||
std::string mCondition;
|
||||
|
||||
Breakpoint()
|
||||
: mLine(-1)
|
||||
, mEnabled(false)
|
||||
{}
|
||||
};
|
||||
|
||||
// Represents a character coordinate from the user's point of view,
|
||||
// i. e. consider an uniform grid (assuming fixed-width font) on the
|
||||
// screen as it is rendered, and each cell has its own coordinate, starting from 0.
|
||||
// Tabs are counted as [1..mTabSize] count empty spaces, depending on
|
||||
// how many space is necessary to reach the next tab stop.
|
||||
// For example, coordinate (1, 5) represents the character 'B' in a line "\tABC", when mTabSize = 4,
|
||||
// because it is rendered as " ABC" on the screen.
|
||||
struct Coordinates
|
||||
{
|
||||
int mLine, mColumn;
|
||||
Coordinates() : mLine(0), mColumn(0) {}
|
||||
Coordinates(int aLine, int aColumn) : mLine(aLine), mColumn(aColumn)
|
||||
{
|
||||
assert(aLine >= 0);
|
||||
assert(aColumn >= 0);
|
||||
}
|
||||
static Coordinates Invalid() { static Coordinates invalid(-1, -1); return invalid; }
|
||||
|
||||
bool operator ==(const Coordinates& o) const
|
||||
{
|
||||
return
|
||||
mLine == o.mLine &&
|
||||
mColumn == o.mColumn;
|
||||
}
|
||||
|
||||
bool operator !=(const Coordinates& o) const
|
||||
{
|
||||
return
|
||||
mLine != o.mLine ||
|
||||
mColumn != o.mColumn;
|
||||
}
|
||||
|
||||
bool operator <(const Coordinates& o) const
|
||||
{
|
||||
if (mLine != o.mLine)
|
||||
return mLine < o.mLine;
|
||||
return mColumn < o.mColumn;
|
||||
}
|
||||
|
||||
bool operator >(const Coordinates& o) const
|
||||
{
|
||||
if (mLine != o.mLine)
|
||||
return mLine > o.mLine;
|
||||
return mColumn > o.mColumn;
|
||||
}
|
||||
|
||||
bool operator <=(const Coordinates& o) const
|
||||
{
|
||||
if (mLine != o.mLine)
|
||||
return mLine < o.mLine;
|
||||
return mColumn <= o.mColumn;
|
||||
}
|
||||
|
||||
bool operator >=(const Coordinates& o) const
|
||||
{
|
||||
if (mLine != o.mLine)
|
||||
return mLine > o.mLine;
|
||||
return mColumn >= o.mColumn;
|
||||
}
|
||||
};
|
||||
|
||||
struct Identifier
|
||||
{
|
||||
Coordinates mLocation;
|
||||
std::string mDeclaration;
|
||||
};
|
||||
|
||||
typedef std::string String;
|
||||
typedef std::unordered_map<std::string, Identifier> Identifiers;
|
||||
typedef std::unordered_set<std::string> Keywords;
|
||||
typedef std::map<int, std::string> ErrorMarkers;
|
||||
typedef std::unordered_set<int> Breakpoints;
|
||||
typedef std::array<ImU32, (unsigned)PaletteIndex::Max> Palette;
|
||||
typedef uint8_t Char;
|
||||
|
||||
struct Glyph
|
||||
{
|
||||
Char mChar;
|
||||
PaletteIndex mColorIndex = PaletteIndex::Default;
|
||||
bool mComment : 1;
|
||||
bool mMultiLineComment : 1;
|
||||
bool mPreprocessor : 1;
|
||||
|
||||
Glyph(Char aChar, PaletteIndex aColorIndex) : mChar(aChar), mColorIndex(aColorIndex),
|
||||
mComment(false), mMultiLineComment(false), mPreprocessor(false) {}
|
||||
};
|
||||
|
||||
typedef std::vector<Glyph> Line;
|
||||
typedef std::vector<Line> Lines;
|
||||
|
||||
struct LanguageDefinition
|
||||
{
|
||||
typedef std::pair<std::string, PaletteIndex> TokenRegexString;
|
||||
typedef std::vector<TokenRegexString> TokenRegexStrings;
|
||||
typedef bool(*TokenizeCallback)(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end, PaletteIndex & paletteIndex);
|
||||
|
||||
std::string mName;
|
||||
Keywords mKeywords;
|
||||
Identifiers mIdentifiers;
|
||||
Identifiers mPreprocIdentifiers;
|
||||
std::string mCommentStart, mCommentEnd, mSingleLineComment;
|
||||
char mPreprocChar;
|
||||
bool mAutoIndentation;
|
||||
|
||||
TokenizeCallback mTokenize;
|
||||
|
||||
TokenRegexStrings mTokenRegexStrings;
|
||||
|
||||
bool mCaseSensitive;
|
||||
|
||||
LanguageDefinition()
|
||||
: mPreprocChar('#'), mAutoIndentation(true), mTokenize(nullptr), mCaseSensitive(true)
|
||||
{
|
||||
}
|
||||
|
||||
static const LanguageDefinition& CPlusPlus();
|
||||
static const LanguageDefinition& HLSL();
|
||||
static const LanguageDefinition& GLSL();
|
||||
static const LanguageDefinition& C();
|
||||
static const LanguageDefinition& SQL();
|
||||
static const LanguageDefinition& AngelScript();
|
||||
static const LanguageDefinition& Lua();
|
||||
};
|
||||
|
||||
TextEditor();
|
||||
~TextEditor();
|
||||
|
||||
void SetLanguageDefinition(const LanguageDefinition& aLanguageDef);
|
||||
const LanguageDefinition& GetLanguageDefinition() const { return mLanguageDefinition; }
|
||||
|
||||
static const Palette& GetPalette() { return sPaletteBase; }
|
||||
static void SetPalette(const Palette& aValue);
|
||||
|
||||
void SetErrorMarkers(const ErrorMarkers& aMarkers) { mErrorMarkers = aMarkers; }
|
||||
void SetBreakpoints(const Breakpoints& aMarkers) { mBreakpoints = aMarkers; }
|
||||
|
||||
void Render(const char* aTitle, const ImVec2& aSize = ImVec2(), bool aBorder = false);
|
||||
void SetText(const std::string& aText);
|
||||
std::string GetText() const;
|
||||
|
||||
void SetTextLines(const std::vector<std::string>& aLines);
|
||||
std::vector<std::string> GetTextLines() const;
|
||||
|
||||
std::string GetSelectedText() const;
|
||||
std::string GetCurrentLineText()const;
|
||||
|
||||
int GetTotalLines() const { return (int)mLines.size(); }
|
||||
bool IsOverwrite() const { return mOverwrite; }
|
||||
|
||||
void SetReadOnly(bool aValue);
|
||||
bool IsReadOnly() const { return mReadOnly; }
|
||||
bool IsTextChanged() const { return mTextChanged; }
|
||||
bool IsCursorPositionChanged() const { return mCursorPositionChanged; }
|
||||
|
||||
bool IsColorizerEnabled() const { return mColorizerEnabled; }
|
||||
void SetColorizerEnable(bool aValue);
|
||||
|
||||
Coordinates GetCursorPosition() const { return GetActualCursorCoordinates(); }
|
||||
void SetCursorPosition(const Coordinates& aPosition);
|
||||
|
||||
inline void SetHandleMouseInputs (bool aValue){ mHandleMouseInputs = aValue;}
|
||||
inline bool IsHandleMouseInputsEnabled() const { return mHandleKeyboardInputs; }
|
||||
|
||||
inline void SetHandleKeyboardInputs (bool aValue){ mHandleKeyboardInputs = aValue;}
|
||||
inline bool IsHandleKeyboardInputsEnabled() const { return mHandleKeyboardInputs; }
|
||||
|
||||
inline void SetImGuiChildIgnored (bool aValue){ mIgnoreImGuiChild = aValue;}
|
||||
inline bool IsImGuiChildIgnored() const { return mIgnoreImGuiChild; }
|
||||
|
||||
inline void SetShowWhitespaces(bool aValue) { mShowWhitespaces = aValue; }
|
||||
inline bool IsShowingWhitespaces() const { return mShowWhitespaces; }
|
||||
|
||||
void SetTabSize(int aValue);
|
||||
inline int GetTabSize() const { return mTabSize; }
|
||||
|
||||
void InsertText(const std::string& aValue);
|
||||
void InsertText(const char* aValue);
|
||||
|
||||
void MoveUp(int aAmount = 1, bool aSelect = false);
|
||||
void MoveDown(int aAmount = 1, bool aSelect = false);
|
||||
void MoveLeft(int aAmount = 1, bool aSelect = false, bool aWordMode = false);
|
||||
void MoveRight(int aAmount = 1, bool aSelect = false, bool aWordMode = false);
|
||||
void MoveTop(bool aSelect = false);
|
||||
void MoveBottom(bool aSelect = false);
|
||||
void MoveHome(bool aSelect = false);
|
||||
void MoveEnd(bool aSelect = false);
|
||||
|
||||
void SetSelectionStart(const Coordinates& aPosition);
|
||||
void SetSelectionEnd(const Coordinates& aPosition);
|
||||
void SetSelection(const Coordinates& aStart, const Coordinates& aEnd, SelectionMode aMode = SelectionMode::Normal);
|
||||
void SelectWordUnderCursor();
|
||||
void SelectAll();
|
||||
bool HasSelection() const;
|
||||
|
||||
void Copy();
|
||||
void Cut();
|
||||
void Paste();
|
||||
void Delete();
|
||||
|
||||
bool CanUndo() const;
|
||||
bool CanRedo() const;
|
||||
void Undo(int aSteps = 1);
|
||||
void Redo(int aSteps = 1);
|
||||
|
||||
static const Palette& GetDarkPalette();
|
||||
static const Palette& GetLightPalette();
|
||||
static const Palette& GetRetroBluePalette();
|
||||
|
||||
private:
|
||||
typedef std::vector<std::pair<std::regex, PaletteIndex>> RegexList;
|
||||
|
||||
struct EditorState
|
||||
{
|
||||
Coordinates mSelectionStart;
|
||||
Coordinates mSelectionEnd;
|
||||
Coordinates mCursorPosition;
|
||||
};
|
||||
|
||||
class UndoRecord
|
||||
{
|
||||
public:
|
||||
UndoRecord() {}
|
||||
~UndoRecord() {}
|
||||
|
||||
UndoRecord(
|
||||
const std::string& aAdded,
|
||||
const TextEditor::Coordinates aAddedStart,
|
||||
const TextEditor::Coordinates aAddedEnd,
|
||||
|
||||
const std::string& aRemoved,
|
||||
const TextEditor::Coordinates aRemovedStart,
|
||||
const TextEditor::Coordinates aRemovedEnd,
|
||||
|
||||
TextEditor::EditorState& aBefore,
|
||||
TextEditor::EditorState& aAfter);
|
||||
|
||||
void Undo(TextEditor* aEditor);
|
||||
void Redo(TextEditor* aEditor);
|
||||
|
||||
std::string mAdded;
|
||||
Coordinates mAddedStart;
|
||||
Coordinates mAddedEnd;
|
||||
|
||||
std::string mRemoved;
|
||||
Coordinates mRemovedStart;
|
||||
Coordinates mRemovedEnd;
|
||||
|
||||
EditorState mBefore;
|
||||
EditorState mAfter;
|
||||
};
|
||||
|
||||
typedef std::vector<UndoRecord> UndoBuffer;
|
||||
|
||||
void ProcessInputs();
|
||||
void Colorize(int aFromLine = 0, int aCount = -1);
|
||||
void ColorizeRange(int aFromLine = 0, int aToLine = 0);
|
||||
void ColorizeInternal();
|
||||
float TextDistanceToLineStart(const Coordinates& aFrom) const;
|
||||
void EnsureCursorVisible();
|
||||
int GetPageSize() const;
|
||||
std::string GetText(const Coordinates& aStart, const Coordinates& aEnd) const;
|
||||
Coordinates GetActualCursorCoordinates() const;
|
||||
Coordinates SanitizeCoordinates(const Coordinates& aValue) const;
|
||||
void Advance(Coordinates& aCoordinates) const;
|
||||
void DeleteRange(const Coordinates& aStart, const Coordinates& aEnd);
|
||||
int InsertTextAt(Coordinates& aWhere, const char* aValue);
|
||||
void AddUndo(UndoRecord& aValue);
|
||||
Coordinates ScreenPosToCoordinates(const ImVec2& aPosition) const;
|
||||
Coordinates FindWordStart(const Coordinates& aFrom) const;
|
||||
Coordinates FindWordEnd(const Coordinates& aFrom) const;
|
||||
Coordinates FindNextWord(const Coordinates& aFrom) const;
|
||||
int GetCharacterIndex(const Coordinates& aCoordinates) const;
|
||||
int GetCharacterColumn(int aLine, int aIndex) const;
|
||||
int GetLineCharacterCount(int aLine) const;
|
||||
int GetLineMaxColumn(int aLine) const;
|
||||
bool IsOnWordBoundary(const Coordinates& aAt) const;
|
||||
void RemoveLine(int aStart, int aEnd);
|
||||
void RemoveLine(int aIndex);
|
||||
Line& InsertLine(int aIndex);
|
||||
void EnterCharacter(ImWchar aChar, bool aShift);
|
||||
void Backspace();
|
||||
void DeleteSelection();
|
||||
std::string GetWordUnderCursor() const;
|
||||
std::string GetWordAt(const Coordinates& aCoords) const;
|
||||
ImU32 GetGlyphColor(const Glyph& aGlyph) const;
|
||||
|
||||
void HandleKeyboardInputs();
|
||||
void HandleMouseInputs();
|
||||
void Render();
|
||||
|
||||
float mLineSpacing;
|
||||
Lines mLines;
|
||||
EditorState mState;
|
||||
UndoBuffer mUndoBuffer;
|
||||
int mUndoIndex;
|
||||
|
||||
int mTabSize;
|
||||
bool mOverwrite;
|
||||
bool mReadOnly;
|
||||
bool mWithinRender;
|
||||
bool mScrollToCursor;
|
||||
bool mScrollToTop;
|
||||
bool mTextChanged;
|
||||
bool mColorizerEnabled;
|
||||
float mTextStart; // position (in pixels) where a code line starts relative to the left of the TextEditor.
|
||||
int mLeftMargin;
|
||||
bool mCursorPositionChanged;
|
||||
int mColorRangeMin, mColorRangeMax;
|
||||
SelectionMode mSelectionMode;
|
||||
bool mHandleKeyboardInputs;
|
||||
bool mHandleMouseInputs;
|
||||
bool mIgnoreImGuiChild;
|
||||
bool mShowWhitespaces;
|
||||
|
||||
static Palette sPaletteBase;
|
||||
Palette mPalette;
|
||||
LanguageDefinition mLanguageDefinition;
|
||||
RegexList mRegexList;
|
||||
|
||||
bool mCheckComments;
|
||||
Breakpoints mBreakpoints;
|
||||
ErrorMarkers mErrorMarkers;
|
||||
ImVec2 mCharAdvance;
|
||||
Coordinates mInteractiveStart, mInteractiveEnd;
|
||||
std::string mLineBuffer;
|
||||
uint64_t mStartTime;
|
||||
|
||||
float mLastClick;
|
||||
};
|
||||
|
||||
bool TokenizeCStyleString(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
|
||||
bool TokenizeCStyleCharacterLiteral(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
|
||||
bool TokenizeCStyleIdentifier(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
|
||||
bool TokenizeCStyleNumber(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
|
||||
bool TokenizeCStylePunctuation(const char * in_begin, const char * in_end, const char *& out_begin, const char *& out_end);
|
||||
1980
lib/external/imgui/include/cimgui.h
vendored
Normal file
1980
lib/external/imgui/include/cimgui.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
475
lib/external/imgui/include/fonts/codicons_font.h
vendored
Normal file
475
lib/external/imgui/include/fonts/codicons_font.h
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
// Generated by https://github.com/juliettef/IconFontCppHeaders script GenerateIconFontCppHeaders.py for languages C and C++
|
||||
// from https://raw.githubusercontent.com/microsoft/vscode-codicons/main/dist/codicon.css
|
||||
// for use with https://github.com/microsoft/vscode-codicons/raw/main/dist/codicon.ttf
|
||||
#pragma once
|
||||
|
||||
#define FONT_ICON_FILE_NAME_VS "codicon.ttf"
|
||||
|
||||
extern const unsigned int codicons_compressed_size;
|
||||
extern const unsigned int codicons_compressed_data[52184/4];
|
||||
|
||||
#define ICON_MIN_VS 0xea60
|
||||
#define ICON_MAX_VS 0xebdd
|
||||
#define ICON_VS_ADD "\xee\xa9\xa0" // U+ea60
|
||||
#define ICON_VS_PLUS "\xee\xa9\xa0" // U+ea60
|
||||
#define ICON_VS_GIST_NEW "\xee\xa9\xa0" // U+ea60
|
||||
#define ICON_VS_REPO_CREATE "\xee\xa9\xa0" // U+ea60
|
||||
#define ICON_VS_LIGHTBULB "\xee\xa9\xa1" // U+ea61
|
||||
#define ICON_VS_LIGHT_BULB "\xee\xa9\xa1" // U+ea61
|
||||
#define ICON_VS_REPO "\xee\xa9\xa2" // U+ea62
|
||||
#define ICON_VS_REPO_DELETE "\xee\xa9\xa2" // U+ea62
|
||||
#define ICON_VS_GIST_FORK "\xee\xa9\xa3" // U+ea63
|
||||
#define ICON_VS_REPO_FORKED "\xee\xa9\xa3" // U+ea63
|
||||
#define ICON_VS_GIT_PULL_REQUEST "\xee\xa9\xa4" // U+ea64
|
||||
#define ICON_VS_GIT_PULL_REQUEST_ABANDONED "\xee\xa9\xa4" // U+ea64
|
||||
#define ICON_VS_RECORD_KEYS "\xee\xa9\xa5" // U+ea65
|
||||
#define ICON_VS_KEYBOARD "\xee\xa9\xa5" // U+ea65
|
||||
#define ICON_VS_TAG "\xee\xa9\xa6" // U+ea66
|
||||
#define ICON_VS_TAG_ADD "\xee\xa9\xa6" // U+ea66
|
||||
#define ICON_VS_TAG_REMOVE "\xee\xa9\xa6" // U+ea66
|
||||
#define ICON_VS_PERSON "\xee\xa9\xa7" // U+ea67
|
||||
#define ICON_VS_PERSON_FOLLOW "\xee\xa9\xa7" // U+ea67
|
||||
#define ICON_VS_PERSON_OUTLINE "\xee\xa9\xa7" // U+ea67
|
||||
#define ICON_VS_PERSON_FILLED "\xee\xa9\xa7" // U+ea67
|
||||
#define ICON_VS_GIT_BRANCH "\xee\xa9\xa8" // U+ea68
|
||||
#define ICON_VS_GIT_BRANCH_CREATE "\xee\xa9\xa8" // U+ea68
|
||||
#define ICON_VS_GIT_BRANCH_DELETE "\xee\xa9\xa8" // U+ea68
|
||||
#define ICON_VS_SOURCE_CONTROL "\xee\xa9\xa8" // U+ea68
|
||||
#define ICON_VS_MIRROR "\xee\xa9\xa9" // U+ea69
|
||||
#define ICON_VS_MIRROR_PUBLIC "\xee\xa9\xa9" // U+ea69
|
||||
#define ICON_VS_STAR "\xee\xa9\xaa" // U+ea6a
|
||||
#define ICON_VS_STAR_ADD "\xee\xa9\xaa" // U+ea6a
|
||||
#define ICON_VS_STAR_DELETE "\xee\xa9\xaa" // U+ea6a
|
||||
#define ICON_VS_STAR_EMPTY "\xee\xa9\xaa" // U+ea6a
|
||||
#define ICON_VS_COMMENT "\xee\xa9\xab" // U+ea6b
|
||||
#define ICON_VS_COMMENT_ADD "\xee\xa9\xab" // U+ea6b
|
||||
#define ICON_VS_ALERT "\xee\xa9\xac" // U+ea6c
|
||||
#define ICON_VS_WARNING "\xee\xa9\xac" // U+ea6c
|
||||
#define ICON_VS_SEARCH "\xee\xa9\xad" // U+ea6d
|
||||
#define ICON_VS_SEARCH_SAVE "\xee\xa9\xad" // U+ea6d
|
||||
#define ICON_VS_LOG_OUT "\xee\xa9\xae" // U+ea6e
|
||||
#define ICON_VS_SIGN_OUT "\xee\xa9\xae" // U+ea6e
|
||||
#define ICON_VS_LOG_IN "\xee\xa9\xaf" // U+ea6f
|
||||
#define ICON_VS_SIGN_IN "\xee\xa9\xaf" // U+ea6f
|
||||
#define ICON_VS_EYE "\xee\xa9\xb0" // U+ea70
|
||||
#define ICON_VS_EYE_UNWATCH "\xee\xa9\xb0" // U+ea70
|
||||
#define ICON_VS_EYE_WATCH "\xee\xa9\xb0" // U+ea70
|
||||
#define ICON_VS_CIRCLE_FILLED "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_PRIMITIVE_DOT "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_CLOSE_DIRTY "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_DEBUG_BREAKPOINT "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_DISABLED "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_DEBUG_HINT "\xee\xa9\xb1" // U+ea71
|
||||
#define ICON_VS_PRIMITIVE_SQUARE "\xee\xa9\xb2" // U+ea72
|
||||
#define ICON_VS_EDIT "\xee\xa9\xb3" // U+ea73
|
||||
#define ICON_VS_PENCIL "\xee\xa9\xb3" // U+ea73
|
||||
#define ICON_VS_INFO "\xee\xa9\xb4" // U+ea74
|
||||
#define ICON_VS_ISSUE_OPENED "\xee\xa9\xb4" // U+ea74
|
||||
#define ICON_VS_GIST_PRIVATE "\xee\xa9\xb5" // U+ea75
|
||||
#define ICON_VS_GIT_FORK_PRIVATE "\xee\xa9\xb5" // U+ea75
|
||||
#define ICON_VS_LOCK "\xee\xa9\xb5" // U+ea75
|
||||
#define ICON_VS_MIRROR_PRIVATE "\xee\xa9\xb5" // U+ea75
|
||||
#define ICON_VS_CLOSE "\xee\xa9\xb6" // U+ea76
|
||||
#define ICON_VS_REMOVE_CLOSE "\xee\xa9\xb6" // U+ea76
|
||||
#define ICON_VS_X "\xee\xa9\xb6" // U+ea76
|
||||
#define ICON_VS_REPO_SYNC "\xee\xa9\xb7" // U+ea77
|
||||
#define ICON_VS_SYNC "\xee\xa9\xb7" // U+ea77
|
||||
#define ICON_VS_CLONE "\xee\xa9\xb8" // U+ea78
|
||||
#define ICON_VS_DESKTOP_DOWNLOAD "\xee\xa9\xb8" // U+ea78
|
||||
#define ICON_VS_BEAKER "\xee\xa9\xb9" // U+ea79
|
||||
#define ICON_VS_MICROSCOPE "\xee\xa9\xb9" // U+ea79
|
||||
#define ICON_VS_VM "\xee\xa9\xba" // U+ea7a
|
||||
#define ICON_VS_DEVICE_DESKTOP "\xee\xa9\xba" // U+ea7a
|
||||
#define ICON_VS_FILE "\xee\xa9\xbb" // U+ea7b
|
||||
#define ICON_VS_FILE_TEXT "\xee\xa9\xbb" // U+ea7b
|
||||
#define ICON_VS_MORE "\xee\xa9\xbc" // U+ea7c
|
||||
#define ICON_VS_ELLIPSIS "\xee\xa9\xbc" // U+ea7c
|
||||
#define ICON_VS_KEBAB_HORIZONTAL "\xee\xa9\xbc" // U+ea7c
|
||||
#define ICON_VS_MAIL_REPLY "\xee\xa9\xbd" // U+ea7d
|
||||
#define ICON_VS_REPLY "\xee\xa9\xbd" // U+ea7d
|
||||
#define ICON_VS_ORGANIZATION "\xee\xa9\xbe" // U+ea7e
|
||||
#define ICON_VS_ORGANIZATION_FILLED "\xee\xa9\xbe" // U+ea7e
|
||||
#define ICON_VS_ORGANIZATION_OUTLINE "\xee\xa9\xbe" // U+ea7e
|
||||
#define ICON_VS_NEW_FILE "\xee\xa9\xbf" // U+ea7f
|
||||
#define ICON_VS_FILE_ADD "\xee\xa9\xbf" // U+ea7f
|
||||
#define ICON_VS_NEW_FOLDER "\xee\xaa\x80" // U+ea80
|
||||
#define ICON_VS_FILE_DIRECTORY_CREATE "\xee\xaa\x80" // U+ea80
|
||||
#define ICON_VS_TRASH "\xee\xaa\x81" // U+ea81
|
||||
#define ICON_VS_TRASHCAN "\xee\xaa\x81" // U+ea81
|
||||
#define ICON_VS_HISTORY "\xee\xaa\x82" // U+ea82
|
||||
#define ICON_VS_CLOCK "\xee\xaa\x82" // U+ea82
|
||||
#define ICON_VS_FOLDER "\xee\xaa\x83" // U+ea83
|
||||
#define ICON_VS_FILE_DIRECTORY "\xee\xaa\x83" // U+ea83
|
||||
#define ICON_VS_SYMBOL_FOLDER "\xee\xaa\x83" // U+ea83
|
||||
#define ICON_VS_LOGO_GITHUB "\xee\xaa\x84" // U+ea84
|
||||
#define ICON_VS_MARK_GITHUB "\xee\xaa\x84" // U+ea84
|
||||
#define ICON_VS_GITHUB "\xee\xaa\x84" // U+ea84
|
||||
#define ICON_VS_TERMINAL "\xee\xaa\x85" // U+ea85
|
||||
#define ICON_VS_CONSOLE "\xee\xaa\x85" // U+ea85
|
||||
#define ICON_VS_REPL "\xee\xaa\x85" // U+ea85
|
||||
#define ICON_VS_ZAP "\xee\xaa\x86" // U+ea86
|
||||
#define ICON_VS_SYMBOL_EVENT "\xee\xaa\x86" // U+ea86
|
||||
#define ICON_VS_ERROR "\xee\xaa\x87" // U+ea87
|
||||
#define ICON_VS_STOP "\xee\xaa\x87" // U+ea87
|
||||
#define ICON_VS_VARIABLE "\xee\xaa\x88" // U+ea88
|
||||
#define ICON_VS_SYMBOL_VARIABLE "\xee\xaa\x88" // U+ea88
|
||||
#define ICON_VS_ARRAY "\xee\xaa\x8a" // U+ea8a
|
||||
#define ICON_VS_SYMBOL_ARRAY "\xee\xaa\x8a" // U+ea8a
|
||||
#define ICON_VS_SYMBOL_MODULE "\xee\xaa\x8b" // U+ea8b
|
||||
#define ICON_VS_SYMBOL_PACKAGE "\xee\xaa\x8b" // U+ea8b
|
||||
#define ICON_VS_SYMBOL_NAMESPACE "\xee\xaa\x8b" // U+ea8b
|
||||
#define ICON_VS_SYMBOL_OBJECT "\xee\xaa\x8b" // U+ea8b
|
||||
#define ICON_VS_SYMBOL_METHOD "\xee\xaa\x8c" // U+ea8c
|
||||
#define ICON_VS_SYMBOL_FUNCTION "\xee\xaa\x8c" // U+ea8c
|
||||
#define ICON_VS_SYMBOL_CONSTRUCTOR "\xee\xaa\x8c" // U+ea8c
|
||||
#define ICON_VS_SYMBOL_BOOLEAN "\xee\xaa\x8f" // U+ea8f
|
||||
#define ICON_VS_SYMBOL_NULL "\xee\xaa\x8f" // U+ea8f
|
||||
#define ICON_VS_SYMBOL_NUMERIC "\xee\xaa\x90" // U+ea90
|
||||
#define ICON_VS_SYMBOL_NUMBER "\xee\xaa\x90" // U+ea90
|
||||
#define ICON_VS_SYMBOL_STRUCTURE "\xee\xaa\x91" // U+ea91
|
||||
#define ICON_VS_SYMBOL_STRUCT "\xee\xaa\x91" // U+ea91
|
||||
#define ICON_VS_SYMBOL_PARAMETER "\xee\xaa\x92" // U+ea92
|
||||
#define ICON_VS_SYMBOL_TYPE_PARAMETER "\xee\xaa\x92" // U+ea92
|
||||
#define ICON_VS_SYMBOL_KEY "\xee\xaa\x93" // U+ea93
|
||||
#define ICON_VS_SYMBOL_TEXT "\xee\xaa\x93" // U+ea93
|
||||
#define ICON_VS_SYMBOL_REFERENCE "\xee\xaa\x94" // U+ea94
|
||||
#define ICON_VS_GO_TO_FILE "\xee\xaa\x94" // U+ea94
|
||||
#define ICON_VS_SYMBOL_ENUM "\xee\xaa\x95" // U+ea95
|
||||
#define ICON_VS_SYMBOL_VALUE "\xee\xaa\x95" // U+ea95
|
||||
#define ICON_VS_SYMBOL_RULER "\xee\xaa\x96" // U+ea96
|
||||
#define ICON_VS_SYMBOL_UNIT "\xee\xaa\x96" // U+ea96
|
||||
#define ICON_VS_ACTIVATE_BREAKPOINTS "\xee\xaa\x97" // U+ea97
|
||||
#define ICON_VS_ARCHIVE "\xee\xaa\x98" // U+ea98
|
||||
#define ICON_VS_ARROW_BOTH "\xee\xaa\x99" // U+ea99
|
||||
#define ICON_VS_ARROW_DOWN "\xee\xaa\x9a" // U+ea9a
|
||||
#define ICON_VS_ARROW_LEFT "\xee\xaa\x9b" // U+ea9b
|
||||
#define ICON_VS_ARROW_RIGHT "\xee\xaa\x9c" // U+ea9c
|
||||
#define ICON_VS_ARROW_SMALL_DOWN "\xee\xaa\x9d" // U+ea9d
|
||||
#define ICON_VS_ARROW_SMALL_LEFT "\xee\xaa\x9e" // U+ea9e
|
||||
#define ICON_VS_ARROW_SMALL_RIGHT "\xee\xaa\x9f" // U+ea9f
|
||||
#define ICON_VS_ARROW_SMALL_UP "\xee\xaa\xa0" // U+eaa0
|
||||
#define ICON_VS_ARROW_UP "\xee\xaa\xa1" // U+eaa1
|
||||
#define ICON_VS_BELL "\xee\xaa\xa2" // U+eaa2
|
||||
#define ICON_VS_BOLD "\xee\xaa\xa3" // U+eaa3
|
||||
#define ICON_VS_BOOK "\xee\xaa\xa4" // U+eaa4
|
||||
#define ICON_VS_BOOKMARK "\xee\xaa\xa5" // U+eaa5
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_CONDITIONAL_UNVERIFIED "\xee\xaa\xa6" // U+eaa6
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_CONDITIONAL "\xee\xaa\xa7" // U+eaa7
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_CONDITIONAL_DISABLED "\xee\xaa\xa7" // U+eaa7
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_DATA_UNVERIFIED "\xee\xaa\xa8" // U+eaa8
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_DATA "\xee\xaa\xa9" // U+eaa9
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_DATA_DISABLED "\xee\xaa\xa9" // U+eaa9
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_LOG_UNVERIFIED "\xee\xaa\xaa" // U+eaaa
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_LOG "\xee\xaa\xab" // U+eaab
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_LOG_DISABLED "\xee\xaa\xab" // U+eaab
|
||||
#define ICON_VS_BRIEFCASE "\xee\xaa\xac" // U+eaac
|
||||
#define ICON_VS_BROADCAST "\xee\xaa\xad" // U+eaad
|
||||
#define ICON_VS_BROWSER "\xee\xaa\xae" // U+eaae
|
||||
#define ICON_VS_BUG "\xee\xaa\xaf" // U+eaaf
|
||||
#define ICON_VS_CALENDAR "\xee\xaa\xb0" // U+eab0
|
||||
#define ICON_VS_CASE_SENSITIVE "\xee\xaa\xb1" // U+eab1
|
||||
#define ICON_VS_CHECK "\xee\xaa\xb2" // U+eab2
|
||||
#define ICON_VS_CHECKLIST "\xee\xaa\xb3" // U+eab3
|
||||
#define ICON_VS_CHEVRON_DOWN "\xee\xaa\xb4" // U+eab4
|
||||
#define ICON_VS_CHEVRON_LEFT "\xee\xaa\xb5" // U+eab5
|
||||
#define ICON_VS_CHEVRON_RIGHT "\xee\xaa\xb6" // U+eab6
|
||||
#define ICON_VS_CHEVRON_UP "\xee\xaa\xb7" // U+eab7
|
||||
#define ICON_VS_CHROME_CLOSE "\xee\xaa\xb8" // U+eab8
|
||||
#define ICON_VS_CHROME_MAXIMIZE "\xee\xaa\xb9" // U+eab9
|
||||
#define ICON_VS_CHROME_MINIMIZE "\xee\xaa\xba" // U+eaba
|
||||
#define ICON_VS_CHROME_RESTORE "\xee\xaa\xbb" // U+eabb
|
||||
#define ICON_VS_CIRCLE_OUTLINE "\xee\xaa\xbc" // U+eabc
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_UNVERIFIED "\xee\xaa\xbc" // U+eabc
|
||||
#define ICON_VS_CIRCLE_SLASH "\xee\xaa\xbd" // U+eabd
|
||||
#define ICON_VS_CIRCUIT_BOARD "\xee\xaa\xbe" // U+eabe
|
||||
#define ICON_VS_CLEAR_ALL "\xee\xaa\xbf" // U+eabf
|
||||
#define ICON_VS_CLIPPY "\xee\xab\x80" // U+eac0
|
||||
#define ICON_VS_CLOSE_ALL "\xee\xab\x81" // U+eac1
|
||||
#define ICON_VS_CLOUD_DOWNLOAD "\xee\xab\x82" // U+eac2
|
||||
#define ICON_VS_CLOUD_UPLOAD "\xee\xab\x83" // U+eac3
|
||||
#define ICON_VS_CODE "\xee\xab\x84" // U+eac4
|
||||
#define ICON_VS_COLLAPSE_ALL "\xee\xab\x85" // U+eac5
|
||||
#define ICON_VS_COLOR_MODE "\xee\xab\x86" // U+eac6
|
||||
#define ICON_VS_COMMENT_DISCUSSION "\xee\xab\x87" // U+eac7
|
||||
#define ICON_VS_CREDIT_CARD "\xee\xab\x89" // U+eac9
|
||||
#define ICON_VS_DASH "\xee\xab\x8c" // U+eacc
|
||||
#define ICON_VS_DASHBOARD "\xee\xab\x8d" // U+eacd
|
||||
#define ICON_VS_DATABASE "\xee\xab\x8e" // U+eace
|
||||
#define ICON_VS_DEBUG_CONTINUE "\xee\xab\x8f" // U+eacf
|
||||
#define ICON_VS_DEBUG_DISCONNECT "\xee\xab\x90" // U+ead0
|
||||
#define ICON_VS_DEBUG_PAUSE "\xee\xab\x91" // U+ead1
|
||||
#define ICON_VS_DEBUG_RESTART "\xee\xab\x92" // U+ead2
|
||||
#define ICON_VS_DEBUG_START "\xee\xab\x93" // U+ead3
|
||||
#define ICON_VS_DEBUG_STEP_INTO "\xee\xab\x94" // U+ead4
|
||||
#define ICON_VS_DEBUG_STEP_OUT "\xee\xab\x95" // U+ead5
|
||||
#define ICON_VS_DEBUG_STEP_OVER "\xee\xab\x96" // U+ead6
|
||||
#define ICON_VS_DEBUG_STOP "\xee\xab\x97" // U+ead7
|
||||
#define ICON_VS_DEBUG "\xee\xab\x98" // U+ead8
|
||||
#define ICON_VS_DEVICE_CAMERA_VIDEO "\xee\xab\x99" // U+ead9
|
||||
#define ICON_VS_DEVICE_CAMERA "\xee\xab\x9a" // U+eada
|
||||
#define ICON_VS_DEVICE_MOBILE "\xee\xab\x9b" // U+eadb
|
||||
#define ICON_VS_DIFF_ADDED "\xee\xab\x9c" // U+eadc
|
||||
#define ICON_VS_DIFF_IGNORED "\xee\xab\x9d" // U+eadd
|
||||
#define ICON_VS_DIFF_MODIFIED "\xee\xab\x9e" // U+eade
|
||||
#define ICON_VS_DIFF_REMOVED "\xee\xab\x9f" // U+eadf
|
||||
#define ICON_VS_DIFF_RENAMED "\xee\xab\xa0" // U+eae0
|
||||
#define ICON_VS_DIFF "\xee\xab\xa1" // U+eae1
|
||||
#define ICON_VS_DISCARD "\xee\xab\xa2" // U+eae2
|
||||
#define ICON_VS_EDITOR_LAYOUT "\xee\xab\xa3" // U+eae3
|
||||
#define ICON_VS_EMPTY_WINDOW "\xee\xab\xa4" // U+eae4
|
||||
#define ICON_VS_EXCLUDE "\xee\xab\xa5" // U+eae5
|
||||
#define ICON_VS_EXTENSIONS "\xee\xab\xa6" // U+eae6
|
||||
#define ICON_VS_EYE_CLOSED "\xee\xab\xa7" // U+eae7
|
||||
#define ICON_VS_FILE_BINARY "\xee\xab\xa8" // U+eae8
|
||||
#define ICON_VS_FILE_CODE "\xee\xab\xa9" // U+eae9
|
||||
#define ICON_VS_FILE_MEDIA "\xee\xab\xaa" // U+eaea
|
||||
#define ICON_VS_FILE_PDF "\xee\xab\xab" // U+eaeb
|
||||
#define ICON_VS_FILE_SUBMODULE "\xee\xab\xac" // U+eaec
|
||||
#define ICON_VS_FILE_SYMLINK_DIRECTORY "\xee\xab\xad" // U+eaed
|
||||
#define ICON_VS_FILE_SYMLINK_FILE "\xee\xab\xae" // U+eaee
|
||||
#define ICON_VS_FILE_ZIP "\xee\xab\xaf" // U+eaef
|
||||
#define ICON_VS_FILES "\xee\xab\xb0" // U+eaf0
|
||||
#define ICON_VS_FILTER "\xee\xab\xb1" // U+eaf1
|
||||
#define ICON_VS_FLAME "\xee\xab\xb2" // U+eaf2
|
||||
#define ICON_VS_FOLD_DOWN "\xee\xab\xb3" // U+eaf3
|
||||
#define ICON_VS_FOLD_UP "\xee\xab\xb4" // U+eaf4
|
||||
#define ICON_VS_FOLD "\xee\xab\xb5" // U+eaf5
|
||||
#define ICON_VS_FOLDER_ACTIVE "\xee\xab\xb6" // U+eaf6
|
||||
#define ICON_VS_FOLDER_OPENED "\xee\xab\xb7" // U+eaf7
|
||||
#define ICON_VS_GEAR "\xee\xab\xb8" // U+eaf8
|
||||
#define ICON_VS_GIFT "\xee\xab\xb9" // U+eaf9
|
||||
#define ICON_VS_GIST_SECRET "\xee\xab\xba" // U+eafa
|
||||
#define ICON_VS_GIST "\xee\xab\xbb" // U+eafb
|
||||
#define ICON_VS_GIT_COMMIT "\xee\xab\xbc" // U+eafc
|
||||
#define ICON_VS_GIT_COMPARE "\xee\xab\xbd" // U+eafd
|
||||
#define ICON_VS_COMPARE_CHANGES "\xee\xab\xbd" // U+eafd
|
||||
#define ICON_VS_GIT_MERGE "\xee\xab\xbe" // U+eafe
|
||||
#define ICON_VS_GITHUB_ACTION "\xee\xab\xbf" // U+eaff
|
||||
#define ICON_VS_GITHUB_ALT "\xee\xac\x80" // U+eb00
|
||||
#define ICON_VS_GLOBE "\xee\xac\x81" // U+eb01
|
||||
#define ICON_VS_GRABBER "\xee\xac\x82" // U+eb02
|
||||
#define ICON_VS_GRAPH "\xee\xac\x83" // U+eb03
|
||||
#define ICON_VS_GRIPPER "\xee\xac\x84" // U+eb04
|
||||
#define ICON_VS_HEART "\xee\xac\x85" // U+eb05
|
||||
#define ICON_VS_HOME "\xee\xac\x86" // U+eb06
|
||||
#define ICON_VS_HORIZONTAL_RULE "\xee\xac\x87" // U+eb07
|
||||
#define ICON_VS_HUBOT "\xee\xac\x88" // U+eb08
|
||||
#define ICON_VS_INBOX "\xee\xac\x89" // U+eb09
|
||||
#define ICON_VS_ISSUE_REOPENED "\xee\xac\x8b" // U+eb0b
|
||||
#define ICON_VS_ISSUES "\xee\xac\x8c" // U+eb0c
|
||||
#define ICON_VS_ITALIC "\xee\xac\x8d" // U+eb0d
|
||||
#define ICON_VS_JERSEY "\xee\xac\x8e" // U+eb0e
|
||||
#define ICON_VS_JSON "\xee\xac\x8f" // U+eb0f
|
||||
#define ICON_VS_KEBAB_VERTICAL "\xee\xac\x90" // U+eb10
|
||||
#define ICON_VS_KEY "\xee\xac\x91" // U+eb11
|
||||
#define ICON_VS_LAW "\xee\xac\x92" // U+eb12
|
||||
#define ICON_VS_LIGHTBULB_AUTOFIX "\xee\xac\x93" // U+eb13
|
||||
#define ICON_VS_LINK_EXTERNAL "\xee\xac\x94" // U+eb14
|
||||
#define ICON_VS_LINK "\xee\xac\x95" // U+eb15
|
||||
#define ICON_VS_LIST_ORDERED "\xee\xac\x96" // U+eb16
|
||||
#define ICON_VS_LIST_UNORDERED "\xee\xac\x97" // U+eb17
|
||||
#define ICON_VS_LIVE_SHARE "\xee\xac\x98" // U+eb18
|
||||
#define ICON_VS_LOADING "\xee\xac\x99" // U+eb19
|
||||
#define ICON_VS_LOCATION "\xee\xac\x9a" // U+eb1a
|
||||
#define ICON_VS_MAIL_READ "\xee\xac\x9b" // U+eb1b
|
||||
#define ICON_VS_MAIL "\xee\xac\x9c" // U+eb1c
|
||||
#define ICON_VS_MARKDOWN "\xee\xac\x9d" // U+eb1d
|
||||
#define ICON_VS_MEGAPHONE "\xee\xac\x9e" // U+eb1e
|
||||
#define ICON_VS_MENTION "\xee\xac\x9f" // U+eb1f
|
||||
#define ICON_VS_MILESTONE "\xee\xac\xa0" // U+eb20
|
||||
#define ICON_VS_MORTAR_BOARD "\xee\xac\xa1" // U+eb21
|
||||
#define ICON_VS_MOVE "\xee\xac\xa2" // U+eb22
|
||||
#define ICON_VS_MULTIPLE_WINDOWS "\xee\xac\xa3" // U+eb23
|
||||
#define ICON_VS_MUTE "\xee\xac\xa4" // U+eb24
|
||||
#define ICON_VS_NO_NEWLINE "\xee\xac\xa5" // U+eb25
|
||||
#define ICON_VS_NOTE "\xee\xac\xa6" // U+eb26
|
||||
#define ICON_VS_OCTOFACE "\xee\xac\xa7" // U+eb27
|
||||
#define ICON_VS_OPEN_PREVIEW "\xee\xac\xa8" // U+eb28
|
||||
#define ICON_VS_PACKAGE "\xee\xac\xa9" // U+eb29
|
||||
#define ICON_VS_PAINTCAN "\xee\xac\xaa" // U+eb2a
|
||||
#define ICON_VS_PIN "\xee\xac\xab" // U+eb2b
|
||||
#define ICON_VS_PLAY "\xee\xac\xac" // U+eb2c
|
||||
#define ICON_VS_RUN "\xee\xac\xac" // U+eb2c
|
||||
#define ICON_VS_PLUG "\xee\xac\xad" // U+eb2d
|
||||
#define ICON_VS_PRESERVE_CASE "\xee\xac\xae" // U+eb2e
|
||||
#define ICON_VS_PREVIEW "\xee\xac\xaf" // U+eb2f
|
||||
#define ICON_VS_PROJECT "\xee\xac\xb0" // U+eb30
|
||||
#define ICON_VS_PULSE "\xee\xac\xb1" // U+eb31
|
||||
#define ICON_VS_QUESTION "\xee\xac\xb2" // U+eb32
|
||||
#define ICON_VS_QUOTE "\xee\xac\xb3" // U+eb33
|
||||
#define ICON_VS_RADIO_TOWER "\xee\xac\xb4" // U+eb34
|
||||
#define ICON_VS_REACTIONS "\xee\xac\xb5" // U+eb35
|
||||
#define ICON_VS_REFERENCES "\xee\xac\xb6" // U+eb36
|
||||
#define ICON_VS_REFRESH "\xee\xac\xb7" // U+eb37
|
||||
#define ICON_VS_REGEX "\xee\xac\xb8" // U+eb38
|
||||
#define ICON_VS_REMOTE_EXPLORER "\xee\xac\xb9" // U+eb39
|
||||
#define ICON_VS_REMOTE "\xee\xac\xba" // U+eb3a
|
||||
#define ICON_VS_REMOVE "\xee\xac\xbb" // U+eb3b
|
||||
#define ICON_VS_REPLACE_ALL "\xee\xac\xbc" // U+eb3c
|
||||
#define ICON_VS_REPLACE "\xee\xac\xbd" // U+eb3d
|
||||
#define ICON_VS_REPO_CLONE "\xee\xac\xbe" // U+eb3e
|
||||
#define ICON_VS_REPO_FORCE_PUSH "\xee\xac\xbf" // U+eb3f
|
||||
#define ICON_VS_REPO_PULL "\xee\xad\x80" // U+eb40
|
||||
#define ICON_VS_REPO_PUSH "\xee\xad\x81" // U+eb41
|
||||
#define ICON_VS_REPORT "\xee\xad\x82" // U+eb42
|
||||
#define ICON_VS_REQUEST_CHANGES "\xee\xad\x83" // U+eb43
|
||||
#define ICON_VS_ROCKET "\xee\xad\x84" // U+eb44
|
||||
#define ICON_VS_ROOT_FOLDER_OPENED "\xee\xad\x85" // U+eb45
|
||||
#define ICON_VS_ROOT_FOLDER "\xee\xad\x86" // U+eb46
|
||||
#define ICON_VS_RSS "\xee\xad\x87" // U+eb47
|
||||
#define ICON_VS_RUBY "\xee\xad\x88" // U+eb48
|
||||
#define ICON_VS_SAVE_ALL "\xee\xad\x89" // U+eb49
|
||||
#define ICON_VS_SAVE_AS "\xee\xad\x8a" // U+eb4a
|
||||
#define ICON_VS_SAVE "\xee\xad\x8b" // U+eb4b
|
||||
#define ICON_VS_SCREEN_FULL "\xee\xad\x8c" // U+eb4c
|
||||
#define ICON_VS_SCREEN_NORMAL "\xee\xad\x8d" // U+eb4d
|
||||
#define ICON_VS_SEARCH_STOP "\xee\xad\x8e" // U+eb4e
|
||||
#define ICON_VS_SERVER "\xee\xad\x90" // U+eb50
|
||||
#define ICON_VS_SETTINGS_GEAR "\xee\xad\x91" // U+eb51
|
||||
#define ICON_VS_SETTINGS "\xee\xad\x92" // U+eb52
|
||||
#define ICON_VS_SHIELD "\xee\xad\x93" // U+eb53
|
||||
#define ICON_VS_SMILEY "\xee\xad\x94" // U+eb54
|
||||
#define ICON_VS_SORT_PRECEDENCE "\xee\xad\x95" // U+eb55
|
||||
#define ICON_VS_SPLIT_HORIZONTAL "\xee\xad\x96" // U+eb56
|
||||
#define ICON_VS_SPLIT_VERTICAL "\xee\xad\x97" // U+eb57
|
||||
#define ICON_VS_SQUIRREL "\xee\xad\x98" // U+eb58
|
||||
#define ICON_VS_STAR_FULL "\xee\xad\x99" // U+eb59
|
||||
#define ICON_VS_STAR_HALF "\xee\xad\x9a" // U+eb5a
|
||||
#define ICON_VS_SYMBOL_CLASS "\xee\xad\x9b" // U+eb5b
|
||||
#define ICON_VS_SYMBOL_COLOR "\xee\xad\x9c" // U+eb5c
|
||||
#define ICON_VS_SYMBOL_CONSTANT "\xee\xad\x9d" // U+eb5d
|
||||
#define ICON_VS_SYMBOL_ENUM_MEMBER "\xee\xad\x9e" // U+eb5e
|
||||
#define ICON_VS_SYMBOL_FIELD "\xee\xad\x9f" // U+eb5f
|
||||
#define ICON_VS_SYMBOL_FILE "\xee\xad\xa0" // U+eb60
|
||||
#define ICON_VS_SYMBOL_INTERFACE "\xee\xad\xa1" // U+eb61
|
||||
#define ICON_VS_SYMBOL_KEYWORD "\xee\xad\xa2" // U+eb62
|
||||
#define ICON_VS_SYMBOL_MISC "\xee\xad\xa3" // U+eb63
|
||||
#define ICON_VS_SYMBOL_OPERATOR "\xee\xad\xa4" // U+eb64
|
||||
#define ICON_VS_SYMBOL_PROPERTY "\xee\xad\xa5" // U+eb65
|
||||
#define ICON_VS_WRENCH "\xee\xad\xa5" // U+eb65
|
||||
#define ICON_VS_WRENCH_SUBACTION "\xee\xad\xa5" // U+eb65
|
||||
#define ICON_VS_SYMBOL_SNIPPET "\xee\xad\xa6" // U+eb66
|
||||
#define ICON_VS_TASKLIST "\xee\xad\xa7" // U+eb67
|
||||
#define ICON_VS_TELESCOPE "\xee\xad\xa8" // U+eb68
|
||||
#define ICON_VS_TEXT_SIZE "\xee\xad\xa9" // U+eb69
|
||||
#define ICON_VS_THREE_BARS "\xee\xad\xaa" // U+eb6a
|
||||
#define ICON_VS_THUMBSDOWN "\xee\xad\xab" // U+eb6b
|
||||
#define ICON_VS_THUMBSUP "\xee\xad\xac" // U+eb6c
|
||||
#define ICON_VS_TOOLS "\xee\xad\xad" // U+eb6d
|
||||
#define ICON_VS_TRIANGLE_DOWN "\xee\xad\xae" // U+eb6e
|
||||
#define ICON_VS_TRIANGLE_LEFT "\xee\xad\xaf" // U+eb6f
|
||||
#define ICON_VS_TRIANGLE_RIGHT "\xee\xad\xb0" // U+eb70
|
||||
#define ICON_VS_TRIANGLE_UP "\xee\xad\xb1" // U+eb71
|
||||
#define ICON_VS_TWITTER "\xee\xad\xb2" // U+eb72
|
||||
#define ICON_VS_UNFOLD "\xee\xad\xb3" // U+eb73
|
||||
#define ICON_VS_UNLOCK "\xee\xad\xb4" // U+eb74
|
||||
#define ICON_VS_UNMUTE "\xee\xad\xb5" // U+eb75
|
||||
#define ICON_VS_UNVERIFIED "\xee\xad\xb6" // U+eb76
|
||||
#define ICON_VS_VERIFIED "\xee\xad\xb7" // U+eb77
|
||||
#define ICON_VS_VERSIONS "\xee\xad\xb8" // U+eb78
|
||||
#define ICON_VS_VM_ACTIVE "\xee\xad\xb9" // U+eb79
|
||||
#define ICON_VS_VM_OUTLINE "\xee\xad\xba" // U+eb7a
|
||||
#define ICON_VS_VM_RUNNING "\xee\xad\xbb" // U+eb7b
|
||||
#define ICON_VS_WATCH "\xee\xad\xbc" // U+eb7c
|
||||
#define ICON_VS_WHITESPACE "\xee\xad\xbd" // U+eb7d
|
||||
#define ICON_VS_WHOLE_WORD "\xee\xad\xbe" // U+eb7e
|
||||
#define ICON_VS_WINDOW "\xee\xad\xbf" // U+eb7f
|
||||
#define ICON_VS_WORD_WRAP "\xee\xae\x80" // U+eb80
|
||||
#define ICON_VS_ZOOM_IN "\xee\xae\x81" // U+eb81
|
||||
#define ICON_VS_ZOOM_OUT "\xee\xae\x82" // U+eb82
|
||||
#define ICON_VS_LIST_FILTER "\xee\xae\x83" // U+eb83
|
||||
#define ICON_VS_LIST_FLAT "\xee\xae\x84" // U+eb84
|
||||
#define ICON_VS_LIST_SELECTION "\xee\xae\x85" // U+eb85
|
||||
#define ICON_VS_SELECTION "\xee\xae\x85" // U+eb85
|
||||
#define ICON_VS_LIST_TREE "\xee\xae\x86" // U+eb86
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_FUNCTION_UNVERIFIED "\xee\xae\x87" // U+eb87
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_FUNCTION "\xee\xae\x88" // U+eb88
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_FUNCTION_DISABLED "\xee\xae\x88" // U+eb88
|
||||
#define ICON_VS_DEBUG_STACKFRAME_ACTIVE "\xee\xae\x89" // U+eb89
|
||||
#define ICON_VS_DEBUG_STACKFRAME_DOT "\xee\xae\x8a" // U+eb8a
|
||||
#define ICON_VS_DEBUG_STACKFRAME "\xee\xae\x8b" // U+eb8b
|
||||
#define ICON_VS_DEBUG_STACKFRAME_FOCUSED "\xee\xae\x8b" // U+eb8b
|
||||
#define ICON_VS_DEBUG_BREAKPOINT_UNSUPPORTED "\xee\xae\x8c" // U+eb8c
|
||||
#define ICON_VS_SYMBOL_STRING "\xee\xae\x8d" // U+eb8d
|
||||
#define ICON_VS_DEBUG_REVERSE_CONTINUE "\xee\xae\x8e" // U+eb8e
|
||||
#define ICON_VS_DEBUG_STEP_BACK "\xee\xae\x8f" // U+eb8f
|
||||
#define ICON_VS_DEBUG_RESTART_FRAME "\xee\xae\x90" // U+eb90
|
||||
#define ICON_VS_DEBUG_ALT "\xee\xae\x91" // U+eb91
|
||||
#define ICON_VS_CALL_INCOMING "\xee\xae\x92" // U+eb92
|
||||
#define ICON_VS_CALL_OUTGOING "\xee\xae\x93" // U+eb93
|
||||
#define ICON_VS_MENU "\xee\xae\x94" // U+eb94
|
||||
#define ICON_VS_EXPAND_ALL "\xee\xae\x95" // U+eb95
|
||||
#define ICON_VS_FEEDBACK "\xee\xae\x96" // U+eb96
|
||||
#define ICON_VS_GROUP_BY_REF_TYPE "\xee\xae\x97" // U+eb97
|
||||
#define ICON_VS_UNGROUP_BY_REF_TYPE "\xee\xae\x98" // U+eb98
|
||||
#define ICON_VS_ACCOUNT "\xee\xae\x99" // U+eb99
|
||||
#define ICON_VS_BELL_DOT "\xee\xae\x9a" // U+eb9a
|
||||
#define ICON_VS_DEBUG_CONSOLE "\xee\xae\x9b" // U+eb9b
|
||||
#define ICON_VS_LIBRARY "\xee\xae\x9c" // U+eb9c
|
||||
#define ICON_VS_OUTPUT "\xee\xae\x9d" // U+eb9d
|
||||
#define ICON_VS_RUN_ALL "\xee\xae\x9e" // U+eb9e
|
||||
#define ICON_VS_SYNC_IGNORED "\xee\xae\x9f" // U+eb9f
|
||||
#define ICON_VS_PINNED "\xee\xae\xa0" // U+eba0
|
||||
#define ICON_VS_GITHUB_INVERTED "\xee\xae\xa1" // U+eba1
|
||||
#define ICON_VS_SERVER_PROCESS "\xee\xae\xa2" // U+eba2
|
||||
#define ICON_VS_SERVER_ENVIRONMENT "\xee\xae\xa3" // U+eba3
|
||||
#define ICON_VS_PASS "\xee\xae\xa4" // U+eba4
|
||||
#define ICON_VS_ISSUE_CLOSED "\xee\xae\xa4" // U+eba4
|
||||
#define ICON_VS_STOP_CIRCLE "\xee\xae\xa5" // U+eba5
|
||||
#define ICON_VS_PLAY_CIRCLE "\xee\xae\xa6" // U+eba6
|
||||
#define ICON_VS_RECORD "\xee\xae\xa7" // U+eba7
|
||||
#define ICON_VS_DEBUG_ALT_SMALL "\xee\xae\xa8" // U+eba8
|
||||
#define ICON_VS_VM_CONNECT "\xee\xae\xa9" // U+eba9
|
||||
#define ICON_VS_CLOUD "\xee\xae\xaa" // U+ebaa
|
||||
#define ICON_VS_MERGE "\xee\xae\xab" // U+ebab
|
||||
#define ICON_VS_EXPORT "\xee\xae\xac" // U+ebac
|
||||
#define ICON_VS_GRAPH_LEFT "\xee\xae\xad" // U+ebad
|
||||
#define ICON_VS_MAGNET "\xee\xae\xae" // U+ebae
|
||||
#define ICON_VS_NOTEBOOK "\xee\xae\xaf" // U+ebaf
|
||||
#define ICON_VS_REDO "\xee\xae\xb0" // U+ebb0
|
||||
#define ICON_VS_CHECK_ALL "\xee\xae\xb1" // U+ebb1
|
||||
#define ICON_VS_PINNED_DIRTY "\xee\xae\xb2" // U+ebb2
|
||||
#define ICON_VS_PASS_FILLED "\xee\xae\xb3" // U+ebb3
|
||||
#define ICON_VS_CIRCLE_LARGE_FILLED "\xee\xae\xb4" // U+ebb4
|
||||
#define ICON_VS_CIRCLE_LARGE_OUTLINE "\xee\xae\xb5" // U+ebb5
|
||||
#define ICON_VS_COMBINE "\xee\xae\xb6" // U+ebb6
|
||||
#define ICON_VS_GATHER "\xee\xae\xb6" // U+ebb6
|
||||
#define ICON_VS_TABLE "\xee\xae\xb7" // U+ebb7
|
||||
#define ICON_VS_VARIABLE_GROUP "\xee\xae\xb8" // U+ebb8
|
||||
#define ICON_VS_TYPE_HIERARCHY "\xee\xae\xb9" // U+ebb9
|
||||
#define ICON_VS_TYPE_HIERARCHY_SUB "\xee\xae\xba" // U+ebba
|
||||
#define ICON_VS_TYPE_HIERARCHY_SUPER "\xee\xae\xbb" // U+ebbb
|
||||
#define ICON_VS_GIT_PULL_REQUEST_CREATE "\xee\xae\xbc" // U+ebbc
|
||||
#define ICON_VS_RUN_ABOVE "\xee\xae\xbd" // U+ebbd
|
||||
#define ICON_VS_RUN_BELOW "\xee\xae\xbe" // U+ebbe
|
||||
#define ICON_VS_NOTEBOOK_TEMPLATE "\xee\xae\xbf" // U+ebbf
|
||||
#define ICON_VS_DEBUG_RERUN "\xee\xaf\x80" // U+ebc0
|
||||
#define ICON_VS_WORKSPACE_TRUSTED "\xee\xaf\x81" // U+ebc1
|
||||
#define ICON_VS_WORKSPACE_UNTRUSTED "\xee\xaf\x82" // U+ebc2
|
||||
#define ICON_VS_WORKSPACE_UNKNOWN "\xee\xaf\x83" // U+ebc3
|
||||
#define ICON_VS_TERMINAL_CMD "\xee\xaf\x84" // U+ebc4
|
||||
#define ICON_VS_TERMINAL_DEBIAN "\xee\xaf\x85" // U+ebc5
|
||||
#define ICON_VS_TERMINAL_LINUX "\xee\xaf\x86" // U+ebc6
|
||||
#define ICON_VS_TERMINAL_POWERSHELL "\xee\xaf\x87" // U+ebc7
|
||||
#define ICON_VS_TERMINAL_TMUX "\xee\xaf\x88" // U+ebc8
|
||||
#define ICON_VS_TERMINAL_UBUNTU "\xee\xaf\x89" // U+ebc9
|
||||
#define ICON_VS_TERMINAL_BASH "\xee\xaf\x8a" // U+ebca
|
||||
#define ICON_VS_ARROW_SWAP "\xee\xaf\x8b" // U+ebcb
|
||||
#define ICON_VS_COPY "\xee\xaf\x8c" // U+ebcc
|
||||
#define ICON_VS_PERSON_ADD "\xee\xaf\x8d" // U+ebcd
|
||||
#define ICON_VS_FILTER_FILLED "\xee\xaf\x8e" // U+ebce
|
||||
#define ICON_VS_WAND "\xee\xaf\x8f" // U+ebcf
|
||||
#define ICON_VS_DEBUG_LINE_BY_LINE "\xee\xaf\x90" // U+ebd0
|
||||
#define ICON_VS_INSPECT "\xee\xaf\x91" // U+ebd1
|
||||
#define ICON_VS_LAYERS "\xee\xaf\x92" // U+ebd2
|
||||
#define ICON_VS_LAYERS_DOT "\xee\xaf\x93" // U+ebd3
|
||||
#define ICON_VS_LAYERS_ACTIVE "\xee\xaf\x94" // U+ebd4
|
||||
#define ICON_VS_COMPASS "\xee\xaf\x95" // U+ebd5
|
||||
#define ICON_VS_COMPASS_DOT "\xee\xaf\x96" // U+ebd6
|
||||
#define ICON_VS_COMPASS_ACTIVE "\xee\xaf\x97" // U+ebd7
|
||||
#define ICON_VS_AZURE "\xee\xaf\x98" // U+ebd8
|
||||
#define ICON_VS_ISSUE_DRAFT "\xee\xaf\x99" // U+ebd9
|
||||
#define ICON_VS_GIT_PULL_REQUEST_CLOSED "\xee\xaf\x9a" // U+ebda
|
||||
#define ICON_VS_GIT_PULL_REQUEST_DRAFT "\xee\xaf\x9b" // U+ebdb
|
||||
#define ICON_VS_DEBUG_ALL "\xee\xaf\x9c" // U+ebdc
|
||||
#define ICON_VS_DEBUG_COVERAGE "\xee\xaf\x9d" // U+ebdd
|
||||
1015
lib/external/imgui/include/fonts/fontawesome_font.h
vendored
Normal file
1015
lib/external/imgui/include/fonts/fontawesome_font.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
lib/external/imgui/include/fonts/unifont_font.h
vendored
Normal file
6
lib/external/imgui/include/fonts/unifont_font.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define FONT_ICON_FILE_NAME_UNIFONT "unifont.ttf"
|
||||
|
||||
extern const unsigned int unifont_compressed_size;
|
||||
extern const unsigned int unifont_compressed_data[52184/4];
|
||||
@@ -20,28 +20,36 @@
|
||||
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
||||
|
||||
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
|
||||
// Using dear imgui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
|
||||
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
|
||||
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
|
||||
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
|
||||
//#define IMGUI_API __declspec( dllexport )
|
||||
//#define IMGUI_API __declspec( dllimport )
|
||||
|
||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// IMHEX PATCH BEGIN
|
||||
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.
|
||||
// IMHEX PATCH END
|
||||
|
||||
//---- Disable all of Dear ImGui or don't implement standard windows.
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
||||
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
|
||||
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
|
||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable debug/metrics window: ShowMetricsWindow() will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
|
||||
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88).
|
||||
|
||||
//---- Don't implement some functions to reduce linkage requirements.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
||||
//#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW)
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
|
||||
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, ime).
|
||||
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
|
||||
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
|
||||
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
|
||||
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
|
||||
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
|
||||
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
|
||||
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
|
||||
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
|
||||
|
||||
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
||||
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
||||
@@ -53,25 +61,37 @@
|
||||
//#define IMGUI_USE_WCHAR32
|
||||
|
||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
||||
// By default the embedded implementations are declared static and not available outside of imgui cpp files.
|
||||
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
||||
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
||||
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
||||
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if enabled
|
||||
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
||||
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
||||
|
||||
//---- Unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined, use the much faster STB sprintf library implementation of vsnprintf instead of the one from the default C library.
|
||||
// Note that stb_sprintf.h is meant to be provided by the user and available in the include path at compile time. Also, the compatibility checks of the arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by STB sprintf.
|
||||
// #define IMGUI_USE_STB_SPRINTF
|
||||
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
||||
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
|
||||
//#define IMGUI_USE_STB_SPRINTF
|
||||
|
||||
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
|
||||
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
|
||||
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
|
||||
// IMHEX PATCH BEGIN
|
||||
#define IMGUI_ENABLE_FREETYPE
|
||||
// IMHEX PATCH END
|
||||
|
||||
//---- Use stb_truetype to build and rasterize the font atlas (default)
|
||||
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
|
||||
//#define IMGUI_ENABLE_STB_TRUETYPE
|
||||
|
||||
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
||||
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
||||
/*
|
||||
#define IM_VEC2_CLASS_EXTRA \
|
||||
ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
|
||||
#define IM_VEC2_CLASS_EXTRA \
|
||||
constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \
|
||||
operator MyVec2() const { return MyVec2(x,y); }
|
||||
|
||||
#define IM_VEC4_CLASS_EXTRA \
|
||||
ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
|
||||
#define IM_VEC4_CLASS_EXTRA \
|
||||
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
|
||||
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
||||
*/
|
||||
|
||||
@@ -79,7 +99,7 @@
|
||||
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
||||
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
|
||||
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
||||
//#define ImDrawIdx unsigned int
|
||||
#define ImDrawIdx unsigned int
|
||||
|
||||
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
|
||||
//struct ImDrawList;
|
||||
File diff suppressed because it is too large
Load Diff
50
lib/external/imgui/include/imgui_freetype.h
vendored
Normal file
50
lib/external/imgui/include/imgui_freetype.h
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
|
||||
// (headers)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "imgui.h" // IMGUI_API
|
||||
|
||||
// Forward declarations
|
||||
struct ImFontAtlas;
|
||||
struct ImFontBuilderIO;
|
||||
|
||||
// Hinting greatly impacts visuals (and glyph sizes).
|
||||
// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter.
|
||||
// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h
|
||||
// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way.
|
||||
// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer.
|
||||
// You can set those flags globaly in ImFontAtlas::FontBuilderFlags
|
||||
// You can set those flags on a per font basis in ImFontConfig::FontBuilderFlags
|
||||
enum ImGuiFreeTypeBuilderFlags
|
||||
{
|
||||
ImGuiFreeTypeBuilderFlags_NoHinting = 1 << 0, // Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of the anti-aliased modes.
|
||||
ImGuiFreeTypeBuilderFlags_NoAutoHint = 1 << 1, // Disable auto-hinter.
|
||||
ImGuiFreeTypeBuilderFlags_ForceAutoHint = 1 << 2, // Indicates that the auto-hinter is preferred over the font's native hinter.
|
||||
ImGuiFreeTypeBuilderFlags_LightHinting = 1 << 3, // A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text.
|
||||
ImGuiFreeTypeBuilderFlags_MonoHinting = 1 << 4, // Strong hinting algorithm that should only be used for monochrome output.
|
||||
ImGuiFreeTypeBuilderFlags_Bold = 1 << 5, // Styling: Should we artificially embolden the font?
|
||||
ImGuiFreeTypeBuilderFlags_Oblique = 1 << 6, // Styling: Should we slant the font, emulating italic style?
|
||||
ImGuiFreeTypeBuilderFlags_Monochrome = 1 << 7, // Disable anti-aliasing. Combine this with MonoHinting for best results!
|
||||
ImGuiFreeTypeBuilderFlags_LoadColor = 1 << 8, // Enable FreeType color-layered glyphs
|
||||
ImGuiFreeTypeBuilderFlags_Bitmap = 1 << 9 // Enable FreeType bitmap glyphs
|
||||
};
|
||||
|
||||
namespace ImGuiFreeType
|
||||
{
|
||||
// This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'.
|
||||
// If you need to dynamically select between multiple builders:
|
||||
// - you can manually assign this builder with 'atlas->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()'
|
||||
// - prefer deep-copying this into your own ImFontBuilderIO instance if you use hot-reloading that messes up static data.
|
||||
IMGUI_API const ImFontBuilderIO* GetBuilderForFreeType();
|
||||
|
||||
// Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE()
|
||||
// However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired.
|
||||
IMGUI_API void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = NULL);
|
||||
|
||||
// Obsolete names (will be removed soon)
|
||||
// Prefer using '#define IMGUI_ENABLE_FREETYPE'
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
static inline bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int flags = 0) { atlas->FontBuilderIO = GetBuilderForFreeType(); atlas->FontBuilderFlags = flags; return atlas->Build(); }
|
||||
#endif
|
||||
}
|
||||
@@ -1,18 +1,20 @@
|
||||
// dear imgui: Platform Backend for GLFW
|
||||
// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
|
||||
// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan, WebGPU..)
|
||||
// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
|
||||
// (Requires: GLFW 3.1+. Prefer GLFW 3.3+ for full feature support.)
|
||||
|
||||
// Implemented features:
|
||||
// [X] Platform: Clipboard support.
|
||||
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy GLFW_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
|
||||
// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
|
||||
// [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW.
|
||||
// [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE).
|
||||
// [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange' (note: the resizing cursors requires GLFW 3.4+).
|
||||
// [X] Platform: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
|
||||
|
||||
// Issues:
|
||||
// [ ] Platform: Multi-viewport support: ParentViewportID not honored, and so io.ConfigViewportsNoDefaultParent has no effect (minor).
|
||||
|
||||
// You can copy and use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
||||
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
||||
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
|
||||
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
|
||||
// Read online: https://github.com/ocornut/imgui/tree/master/docs
|
||||
|
||||
@@ -28,14 +30,26 @@ struct GLFWmonitor;
|
||||
|
||||
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks);
|
||||
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks);
|
||||
IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool install_callbacks);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
|
||||
|
||||
// GLFW callbacks
|
||||
// - When calling Init with 'install_callbacks=true': GLFW callbacks will be installed for you. They will call user's previously installed callbacks, if any.
|
||||
// - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call those function yourself from your own GLFW callbacks.
|
||||
// GLFW callbacks (installer)
|
||||
// - When calling Init with 'install_callbacks=true': ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any.
|
||||
// - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks.
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window);
|
||||
|
||||
// GLFW callbacks (individual callbacks to call if you didn't install callbacks)
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_WindowFocusCallback(GLFWwindow* window, int focused); // Since 1.84
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_CursorEnterCallback(GLFWwindow* window, int entered); // Since 1.84
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_CursorPosCallback(GLFWwindow* window, double x, double y); // Since 1.87
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor* monitor, int event);
|
||||
|
||||
// IMHEX PATCH BEGIN
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_SetBorderlessWindowMode(bool enabled);
|
||||
// IMHEX PATCH END
|
||||
56
lib/external/imgui/include/imgui_impl_opengl3.h
vendored
Normal file
56
lib/external/imgui/include/imgui_impl_opengl3.h
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline
|
||||
// - Desktop GL: 2.x 3.x 4.x
|
||||
// - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0)
|
||||
// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
|
||||
|
||||
// Implemented features:
|
||||
// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
|
||||
// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
|
||||
// [x] Renderer: Large meshes support (64k+ vertices) with 16-bit indices (Desktop OpenGL only).
|
||||
|
||||
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
||||
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
|
||||
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
|
||||
// Read online: https://github.com/ocornut/imgui/tree/master/docs
|
||||
|
||||
// About GLSL version:
|
||||
// The 'glsl_version' initialization parameter should be NULL (default) or a "#version XXX" string.
|
||||
// On computer platform the GLSL version default to "#version 130". On OpenGL ES 3 platform it defaults to "#version 300 es"
|
||||
// Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp.
|
||||
|
||||
#pragma once
|
||||
#include "imgui.h" // IMGUI_IMPL_API
|
||||
|
||||
// Backend API
|
||||
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame();
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data);
|
||||
|
||||
// (Optional) Called by Init/NewFrame/Shutdown
|
||||
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateFontsTexture();
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyFontsTexture();
|
||||
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects();
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects();
|
||||
|
||||
// Specific OpenGL ES versions
|
||||
//#define IMGUI_IMPL_OPENGL_ES2 // Auto-detected on Emscripten
|
||||
//#define IMGUI_IMPL_OPENGL_ES3 // Auto-detected on iOS/Android
|
||||
|
||||
// You can explicitly select GLES2 or GLES3 API by using one of the '#define IMGUI_IMPL_OPENGL_LOADER_XXX' in imconfig.h or compiler command-line.
|
||||
#if !defined(IMGUI_IMPL_OPENGL_ES2) \
|
||||
&& !defined(IMGUI_IMPL_OPENGL_ES3)
|
||||
|
||||
// Try to detect GLES on matching platforms
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__))
|
||||
#define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es"
|
||||
#elif defined(__EMSCRIPTEN__) || defined(__amigaos4__)
|
||||
#define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
|
||||
#else
|
||||
// Otherwise imgui_impl_opengl3_loader.h will be used.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
787
lib/external/imgui/include/imgui_impl_opengl3_loader.h
vendored
Normal file
787
lib/external/imgui/include/imgui_impl_opengl3_loader.h
vendored
Normal file
@@ -0,0 +1,787 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// About imgui_impl_opengl3_loader.h:
|
||||
//
|
||||
// We embed our own OpenGL loader to not require user to provide their own or to have to use ours,
|
||||
// which proved to be endless problems for users.
|
||||
// Our loader is custom-generated, based on gl3w but automatically filtered to only include
|
||||
// enums/functions that we use in our imgui_impl_opengl3.cpp source file in order to be small.
|
||||
//
|
||||
// YOU SHOULD NOT NEED TO INCLUDE/USE THIS DIRECTLY. THIS IS USED BY imgui_impl_opengl3.cpp ONLY.
|
||||
// THE REST OF YOUR APP SHOULD USE A DIFFERENT GL LOADER: ANY GL LOADER OF YOUR CHOICE.
|
||||
//
|
||||
// Regenerate with:
|
||||
// python gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt
|
||||
//
|
||||
// More info:
|
||||
// https://github.com/dearimgui/gl3w_stripped
|
||||
// https://github.com/ocornut/imgui/issues/4445
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* This file was generated with gl3w_gen.py, part of imgl3w
|
||||
* (hosted at https://github.com/dearimgui/gl3w_stripped)
|
||||
*
|
||||
* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __gl3w_h_
|
||||
#define __gl3w_h_
|
||||
|
||||
// Adapted from KHR/khrplatform.h to avoid including entire file.
|
||||
#ifndef __khrplatform_h_
|
||||
typedef float khronos_float_t;
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
#ifdef _WIN64
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
typedef signed __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)
|
||||
#include <stdint.h>
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#else
|
||||
typedef signed long long khronos_int64_t;
|
||||
typedef unsigned long long khronos_uint64_t;
|
||||
#endif
|
||||
#endif // __khrplatform_h_
|
||||
|
||||
#ifndef __gl_glcorearb_h_
|
||||
#define __gl_glcorearb_h_ 1
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
/* glcorearb.h is for use with OpenGL core profile implementations.
|
||||
** It should should be placed in the same directory as gl.h and
|
||||
** included as <GL/glcorearb.h>.
|
||||
**
|
||||
** glcorearb.h includes only APIs in the latest OpenGL core profile
|
||||
** implementation together with APIs in newer ARB extensions which
|
||||
** can be supported by the core profile. It does not, and never will
|
||||
** include functionality removed from the core profile, such as
|
||||
** fixed-function vertex and fragment processing.
|
||||
**
|
||||
** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or
|
||||
** <GL/glext.h> in the same source file.
|
||||
*/
|
||||
/* Generated C header for:
|
||||
* API: gl
|
||||
* Profile: core
|
||||
* Versions considered: .*
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: glcore
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
#ifndef GL_VERSION_1_0
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef double GLdouble;
|
||||
typedef unsigned int GLuint;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_POLYGON_MODE 0x0B40
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_NEAREST 0x2600 // IMHEX PATCH
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
|
||||
typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
|
||||
typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
|
||||
typedef void (APIENTRYP PFNGLFLUSHPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
|
||||
typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
|
||||
typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
|
||||
typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
|
||||
GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glClear (GLbitfield mask);
|
||||
GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GLAPI void APIENTRY glDisable (GLenum cap);
|
||||
GLAPI void APIENTRY glEnable (GLenum cap);
|
||||
GLAPI void APIENTRY glFlush (void);
|
||||
GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GLAPI GLenum APIENTRY glGetError (void);
|
||||
GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GLAPI const GLubyte *APIENTRY glGetString (GLenum name);
|
||||
GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
|
||||
GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif
|
||||
#endif /* GL_VERSION_1_0 */
|
||||
#ifndef GL_VERSION_1_1
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef double GLclampd;
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
|
||||
typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
|
||||
typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
#endif
|
||||
#endif /* GL_VERSION_1_1 */
|
||||
#ifndef GL_VERSION_1_3
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glActiveTexture (GLenum texture);
|
||||
#endif
|
||||
#endif /* GL_VERSION_1_3 */
|
||||
#ifndef GL_VERSION_1_4
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
GLAPI void APIENTRY glBlendEquation (GLenum mode);
|
||||
#endif
|
||||
#endif /* GL_VERSION_1_4 */
|
||||
#ifndef GL_VERSION_1_5
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
|
||||
typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||
typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
#endif
|
||||
#endif /* GL_VERSION_1_5 */
|
||||
#ifndef GL_VERSION_2_0
|
||||
typedef char GLchar;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_UPPER_LEFT 0x8CA2
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
|
||||
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
|
||||
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
|
||||
typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
|
||||
typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
|
||||
typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
|
||||
typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
|
||||
typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
|
||||
typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GLAPI void APIENTRY glCompileShader (GLuint shader);
|
||||
GLAPI GLuint APIENTRY glCreateProgram (void);
|
||||
GLAPI GLuint APIENTRY glCreateShader (GLenum type);
|
||||
GLAPI void APIENTRY glDeleteProgram (GLuint program);
|
||||
GLAPI void APIENTRY glDeleteShader (GLuint shader);
|
||||
GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||
GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||
GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||
GLAPI void APIENTRY glLinkProgram (GLuint program);
|
||||
GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
GLAPI void APIENTRY glUseProgram (GLuint program);
|
||||
GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
|
||||
GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
#endif
|
||||
#endif /* GL_VERSION_2_0 */
|
||||
#ifndef GL_VERSION_3_0
|
||||
typedef khronos_uint16_t GLhalf;
|
||||
#define GL_MAJOR_VERSION 0x821B
|
||||
#define GL_MINOR_VERSION 0x821C
|
||||
#define GL_NUM_EXTENSIONS 0x821D
|
||||
#define GL_FRAMEBUFFER_SRGB 0x8DB9
|
||||
#define GL_VERTEX_ARRAY_BINDING 0x85B5
|
||||
typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
|
||||
typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
|
||||
typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
|
||||
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
|
||||
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
|
||||
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
|
||||
GLAPI void APIENTRY glBindVertexArray (GLuint array);
|
||||
GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
|
||||
GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
|
||||
#endif
|
||||
#endif /* GL_VERSION_3_0 */
|
||||
#ifndef GL_VERSION_3_1
|
||||
#define GL_VERSION_3_1 1
|
||||
#define GL_PRIMITIVE_RESTART 0x8F9D
|
||||
#endif /* GL_VERSION_3_1 */
|
||||
#ifndef GL_VERSION_3_2
|
||||
#define GL_VERSION_3_2 1
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
#endif
|
||||
#endif /* GL_VERSION_3_2 */
|
||||
#ifndef GL_VERSION_3_3
|
||||
#define GL_VERSION_3_3 1
|
||||
#define GL_SAMPLER_BINDING 0x8919
|
||||
typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
|
||||
#endif
|
||||
#endif /* GL_VERSION_3_3 */
|
||||
#ifndef GL_VERSION_4_1
|
||||
typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
|
||||
typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
|
||||
#endif /* GL_VERSION_4_1 */
|
||||
#ifndef GL_VERSION_4_3
|
||||
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
#endif /* GL_VERSION_4_3 */
|
||||
#ifndef GL_VERSION_4_5
|
||||
#define GL_CLIP_ORIGIN 0x935C
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
|
||||
#endif /* GL_VERSION_4_5 */
|
||||
#ifndef GL_ARB_bindless_texture
|
||||
typedef khronos_uint64_t GLuint64EXT;
|
||||
#endif /* GL_ARB_bindless_texture */
|
||||
#ifndef GL_ARB_cl_event
|
||||
struct _cl_context;
|
||||
struct _cl_event;
|
||||
#endif /* GL_ARB_cl_event */
|
||||
#ifndef GL_ARB_clip_control
|
||||
#define GL_ARB_clip_control 1
|
||||
#endif /* GL_ARB_clip_control */
|
||||
#ifndef GL_ARB_debug_output
|
||||
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
#endif /* GL_ARB_debug_output */
|
||||
#ifndef GL_EXT_EGL_image_storage
|
||||
typedef void *GLeglImageOES;
|
||||
#endif /* GL_EXT_EGL_image_storage */
|
||||
#ifndef GL_EXT_direct_state_access
|
||||
typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
|
||||
typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
|
||||
#endif /* GL_EXT_direct_state_access */
|
||||
#ifndef GL_NV_draw_vulkan_image
|
||||
typedef void (APIENTRY *GLVULKANPROCNV)(void);
|
||||
#endif /* GL_NV_draw_vulkan_image */
|
||||
#ifndef GL_NV_gpu_shader5
|
||||
typedef khronos_int64_t GLint64EXT;
|
||||
#endif /* GL_NV_gpu_shader5 */
|
||||
#ifndef GL_NV_vertex_buffer_unified_memory
|
||||
typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
|
||||
#endif /* GL_NV_vertex_buffer_unified_memory */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GL3W_API
|
||||
#define GL3W_API
|
||||
#endif
|
||||
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GL3W_OK 0
|
||||
#define GL3W_ERROR_INIT -1
|
||||
#define GL3W_ERROR_LIBRARY_OPEN -2
|
||||
#define GL3W_ERROR_OPENGL_VERSION -3
|
||||
|
||||
typedef void (*GL3WglProc)(void);
|
||||
typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc);
|
||||
|
||||
/* gl3w api */
|
||||
GL3W_API int imgl3wInit(void);
|
||||
GL3W_API int imgl3wInit2(GL3WGetProcAddressProc proc);
|
||||
GL3W_API int imgl3wIsSupported(int major, int minor);
|
||||
GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc);
|
||||
|
||||
/* gl3w internal state */
|
||||
union GL3WProcs {
|
||||
GL3WglProc ptr[58];
|
||||
struct {
|
||||
PFNGLACTIVETEXTUREPROC ActiveTexture;
|
||||
PFNGLATTACHSHADERPROC AttachShader;
|
||||
PFNGLBINDBUFFERPROC BindBuffer;
|
||||
PFNGLBINDSAMPLERPROC BindSampler;
|
||||
PFNGLBINDTEXTUREPROC BindTexture;
|
||||
PFNGLBINDVERTEXARRAYPROC BindVertexArray;
|
||||
PFNGLBLENDEQUATIONPROC BlendEquation;
|
||||
PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate;
|
||||
PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
|
||||
PFNGLBUFFERDATAPROC BufferData;
|
||||
PFNGLBUFFERSUBDATAPROC BufferSubData;
|
||||
PFNGLCLEARPROC Clear;
|
||||
PFNGLCLEARCOLORPROC ClearColor;
|
||||
PFNGLCOMPILESHADERPROC CompileShader;
|
||||
PFNGLCREATEPROGRAMPROC CreateProgram;
|
||||
PFNGLCREATESHADERPROC CreateShader;
|
||||
PFNGLDELETEBUFFERSPROC DeleteBuffers;
|
||||
PFNGLDELETEPROGRAMPROC DeleteProgram;
|
||||
PFNGLDELETESHADERPROC DeleteShader;
|
||||
PFNGLDELETETEXTURESPROC DeleteTextures;
|
||||
PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays;
|
||||
PFNGLDETACHSHADERPROC DetachShader;
|
||||
PFNGLDISABLEPROC Disable;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
|
||||
PFNGLDRAWELEMENTSPROC DrawElements;
|
||||
PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex;
|
||||
PFNGLENABLEPROC Enable;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
|
||||
PFNGLFLUSHPROC Flush;
|
||||
PFNGLGENBUFFERSPROC GenBuffers;
|
||||
PFNGLGENTEXTURESPROC GenTextures;
|
||||
PFNGLGENVERTEXARRAYSPROC GenVertexArrays;
|
||||
PFNGLGETATTRIBLOCATIONPROC GetAttribLocation;
|
||||
PFNGLGETERRORPROC GetError;
|
||||
PFNGLGETINTEGERVPROC GetIntegerv;
|
||||
PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog;
|
||||
PFNGLGETPROGRAMIVPROC GetProgramiv;
|
||||
PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog;
|
||||
PFNGLGETSHADERIVPROC GetShaderiv;
|
||||
PFNGLGETSTRINGPROC GetString;
|
||||
PFNGLGETSTRINGIPROC GetStringi;
|
||||
PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
|
||||
PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv;
|
||||
PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv;
|
||||
PFNGLISENABLEDPROC IsEnabled;
|
||||
PFNGLLINKPROGRAMPROC LinkProgram;
|
||||
PFNGLPIXELSTOREIPROC PixelStorei;
|
||||
PFNGLPOLYGONMODEPROC PolygonMode;
|
||||
PFNGLREADPIXELSPROC ReadPixels;
|
||||
PFNGLSCISSORPROC Scissor;
|
||||
PFNGLSHADERSOURCEPROC ShaderSource;
|
||||
PFNGLTEXIMAGE2DPROC TexImage2D;
|
||||
PFNGLTEXPARAMETERIPROC TexParameteri;
|
||||
PFNGLUNIFORM1IPROC Uniform1i;
|
||||
PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
|
||||
PFNGLUSEPROGRAMPROC UseProgram;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
|
||||
PFNGLVIEWPORTPROC Viewport;
|
||||
} gl;
|
||||
};
|
||||
|
||||
GL3W_API extern union GL3WProcs imgl3wProcs;
|
||||
|
||||
/* OpenGL functions */
|
||||
#define glActiveTexture imgl3wProcs.gl.ActiveTexture
|
||||
#define glAttachShader imgl3wProcs.gl.AttachShader
|
||||
#define glBindBuffer imgl3wProcs.gl.BindBuffer
|
||||
#define glBindSampler imgl3wProcs.gl.BindSampler
|
||||
#define glBindTexture imgl3wProcs.gl.BindTexture
|
||||
#define glBindVertexArray imgl3wProcs.gl.BindVertexArray
|
||||
#define glBlendEquation imgl3wProcs.gl.BlendEquation
|
||||
#define glBlendEquationSeparate imgl3wProcs.gl.BlendEquationSeparate
|
||||
#define glBlendFuncSeparate imgl3wProcs.gl.BlendFuncSeparate
|
||||
#define glBufferData imgl3wProcs.gl.BufferData
|
||||
#define glBufferSubData imgl3wProcs.gl.BufferSubData
|
||||
#define glClear imgl3wProcs.gl.Clear
|
||||
#define glClearColor imgl3wProcs.gl.ClearColor
|
||||
#define glCompileShader imgl3wProcs.gl.CompileShader
|
||||
#define glCreateProgram imgl3wProcs.gl.CreateProgram
|
||||
#define glCreateShader imgl3wProcs.gl.CreateShader
|
||||
#define glDeleteBuffers imgl3wProcs.gl.DeleteBuffers
|
||||
#define glDeleteProgram imgl3wProcs.gl.DeleteProgram
|
||||
#define glDeleteShader imgl3wProcs.gl.DeleteShader
|
||||
#define glDeleteTextures imgl3wProcs.gl.DeleteTextures
|
||||
#define glDeleteVertexArrays imgl3wProcs.gl.DeleteVertexArrays
|
||||
#define glDetachShader imgl3wProcs.gl.DetachShader
|
||||
#define glDisable imgl3wProcs.gl.Disable
|
||||
#define glDisableVertexAttribArray imgl3wProcs.gl.DisableVertexAttribArray
|
||||
#define glDrawElements imgl3wProcs.gl.DrawElements
|
||||
#define glDrawElementsBaseVertex imgl3wProcs.gl.DrawElementsBaseVertex
|
||||
#define glEnable imgl3wProcs.gl.Enable
|
||||
#define glEnableVertexAttribArray imgl3wProcs.gl.EnableVertexAttribArray
|
||||
#define glFlush imgl3wProcs.gl.Flush
|
||||
#define glGenBuffers imgl3wProcs.gl.GenBuffers
|
||||
#define glGenTextures imgl3wProcs.gl.GenTextures
|
||||
#define glGenVertexArrays imgl3wProcs.gl.GenVertexArrays
|
||||
#define glGetAttribLocation imgl3wProcs.gl.GetAttribLocation
|
||||
#define glGetError imgl3wProcs.gl.GetError
|
||||
#define glGetIntegerv imgl3wProcs.gl.GetIntegerv
|
||||
#define glGetProgramInfoLog imgl3wProcs.gl.GetProgramInfoLog
|
||||
#define glGetProgramiv imgl3wProcs.gl.GetProgramiv
|
||||
#define glGetShaderInfoLog imgl3wProcs.gl.GetShaderInfoLog
|
||||
#define glGetShaderiv imgl3wProcs.gl.GetShaderiv
|
||||
#define glGetString imgl3wProcs.gl.GetString
|
||||
#define glGetStringi imgl3wProcs.gl.GetStringi
|
||||
#define glGetUniformLocation imgl3wProcs.gl.GetUniformLocation
|
||||
#define glGetVertexAttribPointerv imgl3wProcs.gl.GetVertexAttribPointerv
|
||||
#define glGetVertexAttribiv imgl3wProcs.gl.GetVertexAttribiv
|
||||
#define glIsEnabled imgl3wProcs.gl.IsEnabled
|
||||
#define glLinkProgram imgl3wProcs.gl.LinkProgram
|
||||
#define glPixelStorei imgl3wProcs.gl.PixelStorei
|
||||
#define glPolygonMode imgl3wProcs.gl.PolygonMode
|
||||
#define glReadPixels imgl3wProcs.gl.ReadPixels
|
||||
#define glScissor imgl3wProcs.gl.Scissor
|
||||
#define glShaderSource imgl3wProcs.gl.ShaderSource
|
||||
#define glTexImage2D imgl3wProcs.gl.TexImage2D
|
||||
#define glTexParameteri imgl3wProcs.gl.TexParameteri
|
||||
#define glUniform1i imgl3wProcs.gl.Uniform1i
|
||||
#define glUniformMatrix4fv imgl3wProcs.gl.UniformMatrix4fv
|
||||
#define glUseProgram imgl3wProcs.gl.UseProgram
|
||||
#define glVertexAttribPointer imgl3wProcs.gl.VertexAttribPointer
|
||||
#define glViewport imgl3wProcs.gl.Viewport
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef IMGL3W_IMPL
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
static HMODULE libgl;
|
||||
typedef PROC(__stdcall* GL3WglGetProcAddr)(LPCSTR);
|
||||
static GL3WglGetProcAddr wgl_get_proc_address;
|
||||
|
||||
static int open_libgl(void)
|
||||
{
|
||||
libgl = LoadLibraryA("opengl32.dll");
|
||||
if (!libgl)
|
||||
return GL3W_ERROR_LIBRARY_OPEN;
|
||||
wgl_get_proc_address = (GL3WglGetProcAddr)GetProcAddress(libgl, "wglGetProcAddress");
|
||||
return GL3W_OK;
|
||||
}
|
||||
|
||||
static void close_libgl(void) { FreeLibrary(libgl); }
|
||||
static GL3WglProc get_proc(const char *proc)
|
||||
{
|
||||
GL3WglProc res;
|
||||
res = (GL3WglProc)wgl_get_proc_address(proc);
|
||||
if (!res)
|
||||
res = (GL3WglProc)GetProcAddress(libgl, proc);
|
||||
return res;
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
#include <dlfcn.h>
|
||||
|
||||
static void *libgl;
|
||||
static int open_libgl(void)
|
||||
{
|
||||
libgl = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!libgl)
|
||||
return GL3W_ERROR_LIBRARY_OPEN;
|
||||
return GL3W_OK;
|
||||
}
|
||||
|
||||
static void close_libgl(void) { dlclose(libgl); }
|
||||
|
||||
static GL3WglProc get_proc(const char *proc)
|
||||
{
|
||||
GL3WglProc res;
|
||||
*(void **)(&res) = dlsym(libgl, proc);
|
||||
return res;
|
||||
}
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
|
||||
static void *libgl;
|
||||
static GL3WglProc (*glx_get_proc_address)(const GLubyte *);
|
||||
|
||||
static int open_libgl(void)
|
||||
{
|
||||
libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!libgl)
|
||||
return GL3W_ERROR_LIBRARY_OPEN;
|
||||
*(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");
|
||||
return GL3W_OK;
|
||||
}
|
||||
|
||||
static void close_libgl(void) { dlclose(libgl); }
|
||||
|
||||
static GL3WglProc get_proc(const char *proc)
|
||||
{
|
||||
GL3WglProc res;
|
||||
res = glx_get_proc_address((const GLubyte *)proc);
|
||||
if (!res)
|
||||
*(void **)(&res) = dlsym(libgl, proc);
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct { int major, minor; } version;
|
||||
|
||||
static int parse_version(void)
|
||||
{
|
||||
if (!glGetIntegerv)
|
||||
return GL3W_ERROR_INIT;
|
||||
glGetIntegerv(GL_MAJOR_VERSION, &version.major);
|
||||
glGetIntegerv(GL_MINOR_VERSION, &version.minor);
|
||||
if (version.major < 3)
|
||||
return GL3W_ERROR_OPENGL_VERSION;
|
||||
return GL3W_OK;
|
||||
}
|
||||
|
||||
static void load_procs(GL3WGetProcAddressProc proc);
|
||||
|
||||
int imgl3wInit(void)
|
||||
{
|
||||
int res = open_libgl();
|
||||
if (res)
|
||||
return res;
|
||||
atexit(close_libgl);
|
||||
return imgl3wInit2(get_proc);
|
||||
}
|
||||
|
||||
int imgl3wInit2(GL3WGetProcAddressProc proc)
|
||||
{
|
||||
load_procs(proc);
|
||||
return parse_version();
|
||||
}
|
||||
|
||||
int imgl3wIsSupported(int major, int minor)
|
||||
{
|
||||
if (major < 3)
|
||||
return 0;
|
||||
if (version.major == major)
|
||||
return version.minor >= minor;
|
||||
return version.major >= major;
|
||||
}
|
||||
|
||||
GL3WglProc imgl3wGetProcAddress(const char *proc) { return get_proc(proc); }
|
||||
|
||||
static const char *proc_names[] = {
|
||||
"glActiveTexture",
|
||||
"glAttachShader",
|
||||
"glBindBuffer",
|
||||
"glBindSampler",
|
||||
"glBindTexture",
|
||||
"glBindVertexArray",
|
||||
"glBlendEquation",
|
||||
"glBlendEquationSeparate",
|
||||
"glBlendFuncSeparate",
|
||||
"glBufferData",
|
||||
"glBufferSubData",
|
||||
"glClear",
|
||||
"glClearColor",
|
||||
"glCompileShader",
|
||||
"glCreateProgram",
|
||||
"glCreateShader",
|
||||
"glDeleteBuffers",
|
||||
"glDeleteProgram",
|
||||
"glDeleteShader",
|
||||
"glDeleteTextures",
|
||||
"glDeleteVertexArrays",
|
||||
"glDetachShader",
|
||||
"glDisable",
|
||||
"glDisableVertexAttribArray",
|
||||
"glDrawElements",
|
||||
"glDrawElementsBaseVertex",
|
||||
"glEnable",
|
||||
"glEnableVertexAttribArray",
|
||||
"glFlush",
|
||||
"glGenBuffers",
|
||||
"glGenTextures",
|
||||
"glGenVertexArrays",
|
||||
"glGetAttribLocation",
|
||||
"glGetError",
|
||||
"glGetIntegerv",
|
||||
"glGetProgramInfoLog",
|
||||
"glGetProgramiv",
|
||||
"glGetShaderInfoLog",
|
||||
"glGetShaderiv",
|
||||
"glGetString",
|
||||
"glGetStringi",
|
||||
"glGetUniformLocation",
|
||||
"glGetVertexAttribPointerv",
|
||||
"glGetVertexAttribiv",
|
||||
"glIsEnabled",
|
||||
"glLinkProgram",
|
||||
"glPixelStorei",
|
||||
"glPolygonMode",
|
||||
"glReadPixels",
|
||||
"glScissor",
|
||||
"glShaderSource",
|
||||
"glTexImage2D",
|
||||
"glTexParameteri",
|
||||
"glUniform1i",
|
||||
"glUniformMatrix4fv",
|
||||
"glUseProgram",
|
||||
"glVertexAttribPointer",
|
||||
"glViewport",
|
||||
};
|
||||
|
||||
GL3W_API union GL3WProcs imgl3wProcs;
|
||||
|
||||
static void load_procs(GL3WGetProcAddressProc proc)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < ARRAY_SIZE(proc_names); i++)
|
||||
imgl3wProcs.ptr[i] = proc(proc_names[i]);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
438
lib/external/imgui/include/imnodes.h
vendored
Normal file
438
lib/external/imgui/include/imnodes.h
vendored
Normal file
@@ -0,0 +1,438 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <imgui.h>
|
||||
|
||||
#ifdef IMNODES_USER_CONFIG
|
||||
#include IMNODES_USER_CONFIG
|
||||
#endif
|
||||
|
||||
#ifndef IMNODES_NAMESPACE
|
||||
#define IMNODES_NAMESPACE ImNodes
|
||||
#endif
|
||||
|
||||
typedef int ImNodesCol; // -> enum ImNodesCol_
|
||||
typedef int ImNodesStyleVar; // -> enum ImNodesStyleVar_
|
||||
typedef int ImNodesStyleFlags; // -> enum ImNodesStyleFlags_
|
||||
typedef int ImNodesPinShape; // -> enum ImNodesPinShape_
|
||||
typedef int ImNodesAttributeFlags; // -> enum ImNodesAttributeFlags_
|
||||
typedef int ImNodesMiniMapLocation; // -> enum ImNodesMiniMapLocation_
|
||||
|
||||
enum ImNodesCol_
|
||||
{
|
||||
ImNodesCol_NodeBackground = 0,
|
||||
ImNodesCol_NodeBackgroundHovered,
|
||||
ImNodesCol_NodeBackgroundSelected,
|
||||
ImNodesCol_NodeOutline,
|
||||
ImNodesCol_TitleBar,
|
||||
ImNodesCol_TitleBarHovered,
|
||||
ImNodesCol_TitleBarSelected,
|
||||
ImNodesCol_Link,
|
||||
ImNodesCol_LinkHovered,
|
||||
ImNodesCol_LinkSelected,
|
||||
ImNodesCol_Pin,
|
||||
ImNodesCol_PinHovered,
|
||||
ImNodesCol_BoxSelector,
|
||||
ImNodesCol_BoxSelectorOutline,
|
||||
ImNodesCol_GridBackground,
|
||||
ImNodesCol_GridLine,
|
||||
ImNodesCol_GridLinePrimary,
|
||||
ImNodesCol_MiniMapBackground,
|
||||
ImNodesCol_MiniMapBackgroundHovered,
|
||||
ImNodesCol_MiniMapOutline,
|
||||
ImNodesCol_MiniMapOutlineHovered,
|
||||
ImNodesCol_MiniMapNodeBackground,
|
||||
ImNodesCol_MiniMapNodeBackgroundHovered,
|
||||
ImNodesCol_MiniMapNodeBackgroundSelected,
|
||||
ImNodesCol_MiniMapNodeOutline,
|
||||
ImNodesCol_MiniMapLink,
|
||||
ImNodesCol_MiniMapLinkSelected,
|
||||
ImNodesCol_MiniMapCanvas,
|
||||
ImNodesCol_MiniMapCanvasOutline,
|
||||
ImNodesCol_COUNT
|
||||
};
|
||||
|
||||
enum ImNodesStyleVar_
|
||||
{
|
||||
ImNodesStyleVar_GridSpacing = 0,
|
||||
ImNodesStyleVar_NodeCornerRounding,
|
||||
ImNodesStyleVar_NodePadding,
|
||||
ImNodesStyleVar_NodeBorderThickness,
|
||||
ImNodesStyleVar_LinkThickness,
|
||||
ImNodesStyleVar_LinkLineSegmentsPerLength,
|
||||
ImNodesStyleVar_LinkHoverDistance,
|
||||
ImNodesStyleVar_PinCircleRadius,
|
||||
ImNodesStyleVar_PinQuadSideLength,
|
||||
ImNodesStyleVar_PinTriangleSideLength,
|
||||
ImNodesStyleVar_PinLineThickness,
|
||||
ImNodesStyleVar_PinHoverRadius,
|
||||
ImNodesStyleVar_PinOffset,
|
||||
ImNodesStyleVar_MiniMapPadding,
|
||||
ImNodesStyleVar_MiniMapOffset,
|
||||
ImNodesStyleVar_COUNT
|
||||
};
|
||||
|
||||
enum ImNodesStyleFlags_
|
||||
{
|
||||
ImNodesStyleFlags_None = 0,
|
||||
ImNodesStyleFlags_NodeOutline = 1 << 0,
|
||||
ImNodesStyleFlags_GridLines = 1 << 2,
|
||||
ImNodesStyleFlags_GridLinesPrimary = 1 << 3,
|
||||
ImNodesStyleFlags_GridSnapping = 1 << 4
|
||||
};
|
||||
|
||||
enum ImNodesPinShape_
|
||||
{
|
||||
ImNodesPinShape_Circle,
|
||||
ImNodesPinShape_CircleFilled,
|
||||
ImNodesPinShape_Triangle,
|
||||
ImNodesPinShape_TriangleFilled,
|
||||
ImNodesPinShape_Quad,
|
||||
ImNodesPinShape_QuadFilled
|
||||
};
|
||||
|
||||
// This enum controls the way the attribute pins behave.
|
||||
enum ImNodesAttributeFlags_
|
||||
{
|
||||
ImNodesAttributeFlags_None = 0,
|
||||
// Allow detaching a link by left-clicking and dragging the link at a pin it is connected to.
|
||||
// NOTE: the user has to actually delete the link for this to work. A deleted link can be
|
||||
// detected by calling IsLinkDestroyed() after EndNodeEditor().
|
||||
ImNodesAttributeFlags_EnableLinkDetachWithDragClick = 1 << 0,
|
||||
// Visual snapping of an in progress link will trigger IsLink Created/Destroyed events. Allows
|
||||
// for previewing the creation of a link while dragging it across attributes. See here for demo:
|
||||
// https://github.com/Nelarius/imnodes/issues/41#issuecomment-647132113 NOTE: the user has to
|
||||
// actually delete the link for this to work. A deleted link can be detected by calling
|
||||
// IsLinkDestroyed() after EndNodeEditor().
|
||||
ImNodesAttributeFlags_EnableLinkCreationOnSnap = 1 << 1
|
||||
};
|
||||
|
||||
struct ImNodesIO
|
||||
{
|
||||
struct EmulateThreeButtonMouse
|
||||
{
|
||||
EmulateThreeButtonMouse();
|
||||
|
||||
// The keyboard modifier to use in combination with mouse left click to pan the editor view.
|
||||
// Set to NULL by default. To enable this feature, set the modifier to point to a boolean
|
||||
// indicating the state of a modifier. For example,
|
||||
//
|
||||
// ImNodes::GetIO().EmulateThreeButtonMouse.Modifier = &ImGui::GetIO().KeyAlt;
|
||||
const bool* Modifier;
|
||||
} EmulateThreeButtonMouse;
|
||||
|
||||
struct LinkDetachWithModifierClick
|
||||
{
|
||||
LinkDetachWithModifierClick();
|
||||
|
||||
// Pointer to a boolean value indicating when the desired modifier is pressed. Set to NULL
|
||||
// by default. To enable the feature, set the modifier to point to a boolean indicating the
|
||||
// state of a modifier. For example,
|
||||
//
|
||||
// ImNodes::GetIO().LinkDetachWithModifierClick.Modifier = &ImGui::GetIO().KeyCtrl;
|
||||
//
|
||||
// Left-clicking a link with this modifier pressed will detach that link. NOTE: the user has
|
||||
// to actually delete the link for this to work. A deleted link can be detected by calling
|
||||
// IsLinkDestroyed() after EndNodeEditor().
|
||||
const bool* Modifier;
|
||||
} LinkDetachWithModifierClick;
|
||||
|
||||
struct MultipleSelectModifier
|
||||
{
|
||||
MultipleSelectModifier();
|
||||
|
||||
// Pointer to a boolean value indicating when the desired modifier is pressed. Set to NULL
|
||||
// by default. To enable the feature, set the modifier to point to a boolean indicating the
|
||||
// state of a modifier. For example,
|
||||
//
|
||||
// ImNodes::GetIO().MultipleSelectModifier.Modifier = &ImGui::GetIO().KeyCtrl;
|
||||
//
|
||||
// Left-clicking a node with this modifier pressed will add the node to the list of
|
||||
// currently selected nodes. If this value is NULL, the Ctrl key will be used.
|
||||
const bool* Modifier;
|
||||
} MultipleSelectModifier;
|
||||
|
||||
// Holding alt mouse button pans the node area, by default middle mouse button will be used
|
||||
// Set based on ImGuiMouseButton values
|
||||
int AltMouseButton;
|
||||
|
||||
// Panning speed when dragging an element and mouse is outside the main editor view.
|
||||
float AutoPanningSpeed;
|
||||
|
||||
ImNodesIO();
|
||||
};
|
||||
|
||||
struct ImNodesStyle
|
||||
{
|
||||
float GridSpacing;
|
||||
|
||||
float NodeCornerRounding;
|
||||
ImVec2 NodePadding;
|
||||
float NodeBorderThickness;
|
||||
|
||||
float LinkThickness;
|
||||
float LinkLineSegmentsPerLength;
|
||||
float LinkHoverDistance;
|
||||
|
||||
// The following variables control the look and behavior of the pins. The default size of each
|
||||
// pin shape is balanced to occupy approximately the same surface area on the screen.
|
||||
|
||||
// The circle radius used when the pin shape is either ImNodesPinShape_Circle or
|
||||
// ImNodesPinShape_CircleFilled.
|
||||
float PinCircleRadius;
|
||||
// The quad side length used when the shape is either ImNodesPinShape_Quad or
|
||||
// ImNodesPinShape_QuadFilled.
|
||||
float PinQuadSideLength;
|
||||
// The equilateral triangle side length used when the pin shape is either
|
||||
// ImNodesPinShape_Triangle or ImNodesPinShape_TriangleFilled.
|
||||
float PinTriangleSideLength;
|
||||
// The thickness of the line used when the pin shape is not filled.
|
||||
float PinLineThickness;
|
||||
// The radius from the pin's center position inside of which it is detected as being hovered
|
||||
// over.
|
||||
float PinHoverRadius;
|
||||
// Offsets the pins' positions from the edge of the node to the outside of the node.
|
||||
float PinOffset;
|
||||
|
||||
// Mini-map padding size between mini-map edge and mini-map content.
|
||||
ImVec2 MiniMapPadding;
|
||||
// Mini-map offset from the screen side.
|
||||
ImVec2 MiniMapOffset;
|
||||
|
||||
// By default, ImNodesStyleFlags_NodeOutline and ImNodesStyleFlags_Gridlines are enabled.
|
||||
ImNodesStyleFlags Flags;
|
||||
// Set these mid-frame using Push/PopColorStyle. You can index this color array with with a
|
||||
// ImNodesCol value.
|
||||
unsigned int Colors[ImNodesCol_COUNT];
|
||||
|
||||
ImNodesStyle();
|
||||
};
|
||||
|
||||
enum ImNodesMiniMapLocation_
|
||||
{
|
||||
ImNodesMiniMapLocation_BottomLeft,
|
||||
ImNodesMiniMapLocation_BottomRight,
|
||||
ImNodesMiniMapLocation_TopLeft,
|
||||
ImNodesMiniMapLocation_TopRight,
|
||||
};
|
||||
|
||||
struct ImGuiContext;
|
||||
struct ImVec2;
|
||||
|
||||
struct ImNodesContext;
|
||||
|
||||
// An editor context corresponds to a set of nodes in a single workspace (created with a single
|
||||
// Begin/EndNodeEditor pair)
|
||||
//
|
||||
// By default, the library creates an editor context behind the scenes, so using any of the imnodes
|
||||
// functions doesn't require you to explicitly create a context.
|
||||
struct ImNodesEditorContext;
|
||||
|
||||
// Callback type used to specify special behavior when hovering a node in the minimap
|
||||
#ifndef ImNodesMiniMapNodeHoveringCallback
|
||||
typedef void (*ImNodesMiniMapNodeHoveringCallback)(int, void*);
|
||||
#endif
|
||||
|
||||
#ifndef ImNodesMiniMapNodeHoveringCallbackUserData
|
||||
typedef void* ImNodesMiniMapNodeHoveringCallbackUserData;
|
||||
#endif
|
||||
|
||||
namespace IMNODES_NAMESPACE
|
||||
{
|
||||
// Call this function if you are compiling imnodes in to a dll, separate from ImGui. Calling this
|
||||
// function sets the GImGui global variable, which is not shared across dll boundaries.
|
||||
void SetImGuiContext(ImGuiContext* ctx);
|
||||
|
||||
ImNodesContext* CreateContext();
|
||||
void DestroyContext(ImNodesContext* ctx = NULL); // NULL = destroy current context
|
||||
ImNodesContext* GetCurrentContext();
|
||||
void SetCurrentContext(ImNodesContext* ctx);
|
||||
|
||||
ImNodesEditorContext* EditorContextCreate();
|
||||
void EditorContextFree(ImNodesEditorContext*);
|
||||
void EditorContextSet(ImNodesEditorContext*);
|
||||
ImVec2 EditorContextGetPanning();
|
||||
void EditorContextResetPanning(const ImVec2& pos);
|
||||
void EditorContextMoveToNode(const int node_id);
|
||||
|
||||
ImNodesIO& GetIO();
|
||||
|
||||
// Returns the global style struct. See the struct declaration for default values.
|
||||
ImNodesStyle& GetStyle();
|
||||
// Style presets matching the dear imgui styles of the same name. If dest is NULL, the active
|
||||
// context's ImNodesStyle instance will be used as the destination.
|
||||
void StyleColorsDark(ImNodesStyle* dest = NULL); // on by default
|
||||
void StyleColorsClassic(ImNodesStyle* dest = NULL);
|
||||
void StyleColorsLight(ImNodesStyle* dest = NULL);
|
||||
|
||||
// The top-level function call. Call this before calling BeginNode/EndNode. Calling this function
|
||||
// will result the node editor grid workspace being rendered.
|
||||
void BeginNodeEditor();
|
||||
void EndNodeEditor();
|
||||
|
||||
// Add a navigable minimap to the editor; call before EndNodeEditor after all
|
||||
// nodes and links have been specified
|
||||
void MiniMap(
|
||||
const float minimap_size_fraction = 0.2f,
|
||||
const ImNodesMiniMapLocation location = ImNodesMiniMapLocation_TopLeft,
|
||||
const ImNodesMiniMapNodeHoveringCallback node_hovering_callback = NULL,
|
||||
const ImNodesMiniMapNodeHoveringCallbackUserData node_hovering_callback_data = NULL);
|
||||
|
||||
// Use PushColorStyle and PopColorStyle to modify ImNodesStyle::Colors mid-frame.
|
||||
void PushColorStyle(ImNodesCol item, unsigned int color);
|
||||
void PopColorStyle();
|
||||
void PushStyleVar(ImNodesStyleVar style_item, float value);
|
||||
void PushStyleVar(ImNodesStyleVar style_item, const ImVec2& value);
|
||||
void PopStyleVar(int count = 1);
|
||||
|
||||
// id can be any positive or negative integer, but INT_MIN is currently reserved for internal use.
|
||||
void BeginNode(int id);
|
||||
void EndNode();
|
||||
|
||||
ImVec2 GetNodeDimensions(int id);
|
||||
|
||||
// Place your node title bar content (such as the node title, using ImGui::Text) between the
|
||||
// following function calls. These functions have to be called before adding any attributes, or the
|
||||
// layout of the node will be incorrect.
|
||||
void BeginNodeTitleBar();
|
||||
void EndNodeTitleBar();
|
||||
|
||||
// Attributes are ImGui UI elements embedded within the node. Attributes can have pin shapes
|
||||
// rendered next to them. Links are created between pins.
|
||||
//
|
||||
// The activity status of an attribute can be checked via the IsAttributeActive() and
|
||||
// IsAnyAttributeActive() function calls. This is one easy way of checking for any changes made to
|
||||
// an attribute's drag float UI, for instance.
|
||||
//
|
||||
// Each attribute id must be unique.
|
||||
|
||||
// Create an input attribute block. The pin is rendered on left side.
|
||||
void BeginInputAttribute(int id, ImNodesPinShape shape = ImNodesPinShape_CircleFilled);
|
||||
void EndInputAttribute();
|
||||
// Create an output attribute block. The pin is rendered on the right side.
|
||||
void BeginOutputAttribute(int id, ImNodesPinShape shape = ImNodesPinShape_CircleFilled);
|
||||
void EndOutputAttribute();
|
||||
// Create a static attribute block. A static attribute has no pin, and therefore can't be linked to
|
||||
// anything. However, you can still use IsAttributeActive() and IsAnyAttributeActive() to check for
|
||||
// attribute activity.
|
||||
void BeginStaticAttribute(int id);
|
||||
void EndStaticAttribute();
|
||||
|
||||
// Push a single AttributeFlags value. By default, only AttributeFlags_None is set.
|
||||
void PushAttributeFlag(ImNodesAttributeFlags flag);
|
||||
void PopAttributeFlag();
|
||||
|
||||
// Render a link between attributes.
|
||||
// The attributes ids used here must match the ids used in Begin(Input|Output)Attribute function
|
||||
// calls. The order of start_attr and end_attr doesn't make a difference for rendering the link.
|
||||
void Link(int id, int start_attribute_id, int end_attribute_id);
|
||||
|
||||
// Enable or disable the ability to click and drag a specific node.
|
||||
void SetNodeDraggable(int node_id, const bool draggable);
|
||||
|
||||
// The node's position can be expressed in three coordinate systems:
|
||||
// * screen space coordinates, -- the origin is the upper left corner of the window.
|
||||
// * editor space coordinates -- the origin is the upper left corner of the node editor window
|
||||
// * grid space coordinates, -- the origin is the upper left corner of the node editor window,
|
||||
// translated by the current editor panning vector (see EditorContextGetPanning() and
|
||||
// EditorContextResetPanning())
|
||||
|
||||
// Use the following functions to get and set the node's coordinates in these coordinate systems.
|
||||
|
||||
void SetNodeScreenSpacePos(int node_id, const ImVec2& screen_space_pos);
|
||||
void SetNodeEditorSpacePos(int node_id, const ImVec2& editor_space_pos);
|
||||
void SetNodeGridSpacePos(int node_id, const ImVec2& grid_pos);
|
||||
|
||||
ImVec2 GetNodeScreenSpacePos(const int node_id);
|
||||
ImVec2 GetNodeEditorSpacePos(const int node_id);
|
||||
ImVec2 GetNodeGridSpacePos(const int node_id);
|
||||
|
||||
// If ImNodesStyleFlags_GridSnapping is enabled, snap the specified node's origin to the grid.
|
||||
void SnapNodeToGrid(int node_id);
|
||||
|
||||
// Returns true if the current node editor canvas is being hovered over by the mouse, and is not
|
||||
// blocked by any other windows.
|
||||
bool IsEditorHovered();
|
||||
// The following functions return true if a UI element is being hovered over by the mouse cursor.
|
||||
// Assigns the id of the UI element being hovered over to the function argument. Use these functions
|
||||
// after EndNodeEditor() has been called.
|
||||
bool IsNodeHovered(int* node_id);
|
||||
bool IsLinkHovered(int* link_id);
|
||||
bool IsPinHovered(int* attribute_id);
|
||||
|
||||
// Use The following two functions to query the number of selected nodes or links in the current
|
||||
// editor. Use after calling EndNodeEditor().
|
||||
int NumSelectedNodes();
|
||||
int NumSelectedLinks();
|
||||
// Get the selected node/link ids. The pointer argument should point to an integer array with at
|
||||
// least as many elements as the respective NumSelectedNodes/NumSelectedLinks function call
|
||||
// returned.
|
||||
void GetSelectedNodes(int* node_ids);
|
||||
void GetSelectedLinks(int* link_ids);
|
||||
// Clears the list of selected nodes/links. Useful if you want to delete a selected node or link.
|
||||
void ClearNodeSelection();
|
||||
void ClearLinkSelection();
|
||||
// Use the following functions to add or remove individual nodes or links from the current editors
|
||||
// selection. Note that all functions require the id to be an existing valid id for this editor.
|
||||
// Select-functions has the precondition that the object is currently considered unselected.
|
||||
// Clear-functions has the precondition that the object is currently considered selected.
|
||||
// Preconditions listed above can be checked via IsNodeSelected/IsLinkSelected if not already
|
||||
// known.
|
||||
void SelectNode(int node_id);
|
||||
void ClearNodeSelection(int node_id);
|
||||
bool IsNodeSelected(int node_id);
|
||||
void SelectLink(int link_id);
|
||||
void ClearLinkSelection(int link_id);
|
||||
bool IsLinkSelected(int link_id);
|
||||
|
||||
// Was the previous attribute active? This will continuously return true while the left mouse button
|
||||
// is being pressed over the UI content of the attribute.
|
||||
bool IsAttributeActive();
|
||||
// Was any attribute active? If so, sets the active attribute id to the output function argument.
|
||||
bool IsAnyAttributeActive(int* attribute_id = NULL);
|
||||
|
||||
// Use the following functions to query a change of state for an existing link, or new link. Call
|
||||
// these after EndNodeEditor().
|
||||
|
||||
// Did the user start dragging a new link from a pin?
|
||||
bool IsLinkStarted(int* started_at_attribute_id);
|
||||
// Did the user drop the dragged link before attaching it to a pin?
|
||||
// There are two different kinds of situations to consider when handling this event:
|
||||
// 1) a link which is created at a pin and then dropped
|
||||
// 2) an existing link which is detached from a pin and then dropped
|
||||
// Use the including_detached_links flag to control whether this function triggers when the user
|
||||
// detaches a link and drops it.
|
||||
bool IsLinkDropped(int* started_at_attribute_id = NULL, bool including_detached_links = true);
|
||||
// Did the user finish creating a new link?
|
||||
bool IsLinkCreated(
|
||||
int* started_at_attribute_id,
|
||||
int* ended_at_attribute_id,
|
||||
bool* created_from_snap = NULL);
|
||||
bool IsLinkCreated(
|
||||
int* started_at_node_id,
|
||||
int* started_at_attribute_id,
|
||||
int* ended_at_node_id,
|
||||
int* ended_at_attribute_id,
|
||||
bool* created_from_snap = NULL);
|
||||
|
||||
// Was an existing link detached from a pin by the user? The detached link's id is assigned to the
|
||||
// output argument link_id.
|
||||
bool IsLinkDestroyed(int* link_id);
|
||||
|
||||
// Use the following functions to write the editor context's state to a string, or directly to a
|
||||
// file. The editor context is serialized in the INI file format.
|
||||
|
||||
const char* SaveCurrentEditorStateToIniString(size_t* data_size = NULL);
|
||||
const char* SaveEditorStateToIniString(
|
||||
const ImNodesEditorContext* editor,
|
||||
size_t* data_size = NULL);
|
||||
|
||||
void LoadCurrentEditorStateFromIniString(const char* data, size_t data_size);
|
||||
void LoadEditorStateFromIniString(ImNodesEditorContext* editor, const char* data, size_t data_size);
|
||||
|
||||
void SaveCurrentEditorStateToIniFile(const char* file_name);
|
||||
void SaveEditorStateToIniFile(const ImNodesEditorContext* editor, const char* file_name);
|
||||
|
||||
void LoadCurrentEditorStateFromIniFile(const char* file_name);
|
||||
void LoadEditorStateFromIniFile(ImNodesEditorContext* editor, const char* file_name);
|
||||
} // namespace IMNODES_NAMESPACE
|
||||
501
lib/external/imgui/include/imnodes_internal.h
vendored
Normal file
501
lib/external/imgui/include/imnodes_internal.h
vendored
Normal file
@@ -0,0 +1,501 @@
|
||||
#pragma once
|
||||
|
||||
#include "imnodes.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#include <imgui_internal.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// the structure of this file:
|
||||
//
|
||||
// [SECTION] internal enums
|
||||
// [SECTION] internal data structures
|
||||
// [SECTION] global and editor context structs
|
||||
// [SECTION] object pool implementation
|
||||
|
||||
struct ImNodesContext;
|
||||
|
||||
extern ImNodesContext* GImNodes;
|
||||
|
||||
// [SECTION] internal enums
|
||||
|
||||
typedef int ImNodesScope;
|
||||
typedef int ImNodesAttributeType;
|
||||
typedef int ImNodesUIState;
|
||||
typedef int ImNodesClickInteractionType;
|
||||
typedef int ImNodesLinkCreationType;
|
||||
|
||||
enum ImNodesScope_
|
||||
{
|
||||
ImNodesScope_None = 1,
|
||||
ImNodesScope_Editor = 1 << 1,
|
||||
ImNodesScope_Node = 1 << 2,
|
||||
ImNodesScope_Attribute = 1 << 3
|
||||
};
|
||||
|
||||
enum ImNodesAttributeType_
|
||||
{
|
||||
ImNodesAttributeType_None,
|
||||
ImNodesAttributeType_Input,
|
||||
ImNodesAttributeType_Output
|
||||
};
|
||||
|
||||
enum ImNodesUIState_
|
||||
{
|
||||
ImNodesUIState_None = 0,
|
||||
ImNodesUIState_LinkStarted = 1 << 0,
|
||||
ImNodesUIState_LinkDropped = 1 << 1,
|
||||
ImNodesUIState_LinkCreated = 1 << 2
|
||||
};
|
||||
|
||||
enum ImNodesClickInteractionType_
|
||||
{
|
||||
ImNodesClickInteractionType_Node,
|
||||
ImNodesClickInteractionType_Link,
|
||||
ImNodesClickInteractionType_LinkCreation,
|
||||
ImNodesClickInteractionType_Panning,
|
||||
ImNodesClickInteractionType_BoxSelection,
|
||||
ImNodesClickInteractionType_ImGuiItem,
|
||||
ImNodesClickInteractionType_None
|
||||
};
|
||||
|
||||
enum ImNodesLinkCreationType_
|
||||
{
|
||||
ImNodesLinkCreationType_Standard,
|
||||
ImNodesLinkCreationType_FromDetach
|
||||
};
|
||||
|
||||
// [SECTION] internal data structures
|
||||
|
||||
// The object T must have the following interface:
|
||||
//
|
||||
// struct T
|
||||
// {
|
||||
// T();
|
||||
//
|
||||
// int id;
|
||||
// };
|
||||
template<typename T>
|
||||
struct ImObjectPool
|
||||
{
|
||||
ImVector<T> Pool;
|
||||
ImVector<bool> InUse;
|
||||
ImVector<int> FreeList;
|
||||
ImGuiStorage IdMap;
|
||||
|
||||
ImObjectPool() : Pool(), InUse(), FreeList(), IdMap() {}
|
||||
};
|
||||
|
||||
// Emulates std::optional<int> using the sentinel value `INVALID_INDEX`.
|
||||
struct ImOptionalIndex
|
||||
{
|
||||
ImOptionalIndex() : _Index(INVALID_INDEX) {}
|
||||
ImOptionalIndex(const int value) : _Index(value) {}
|
||||
|
||||
// Observers
|
||||
|
||||
inline bool HasValue() const { return _Index != INVALID_INDEX; }
|
||||
|
||||
inline int Value() const
|
||||
{
|
||||
IM_ASSERT(HasValue());
|
||||
return _Index;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
|
||||
inline ImOptionalIndex& operator=(const int value)
|
||||
{
|
||||
_Index = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline void Reset() { _Index = INVALID_INDEX; }
|
||||
|
||||
inline bool operator==(const ImOptionalIndex& rhs) const { return _Index == rhs._Index; }
|
||||
|
||||
inline bool operator==(const int rhs) const { return _Index == rhs; }
|
||||
|
||||
inline bool operator!=(const ImOptionalIndex& rhs) const { return _Index != rhs._Index; }
|
||||
|
||||
inline bool operator!=(const int rhs) const { return _Index != rhs; }
|
||||
|
||||
static const int INVALID_INDEX = -1;
|
||||
|
||||
private:
|
||||
int _Index;
|
||||
};
|
||||
|
||||
struct ImNodeData
|
||||
{
|
||||
int Id;
|
||||
ImVec2 Origin; // The node origin is in editor space
|
||||
ImRect TitleBarContentRect;
|
||||
ImRect Rect;
|
||||
|
||||
struct
|
||||
{
|
||||
ImU32 Background, BackgroundHovered, BackgroundSelected, Outline, Titlebar, TitlebarHovered,
|
||||
TitlebarSelected;
|
||||
} ColorStyle;
|
||||
|
||||
struct
|
||||
{
|
||||
float CornerRounding;
|
||||
ImVec2 Padding;
|
||||
float BorderThickness;
|
||||
} LayoutStyle;
|
||||
|
||||
ImVector<int> PinIndices;
|
||||
bool Draggable;
|
||||
|
||||
ImNodeData(const int node_id)
|
||||
: Id(node_id), Origin(0.0f, 0.0f), TitleBarContentRect(),
|
||||
Rect(ImVec2(0.0f, 0.0f), ImVec2(0.0f, 0.0f)), ColorStyle(), LayoutStyle(), PinIndices(),
|
||||
Draggable(true)
|
||||
{
|
||||
}
|
||||
|
||||
~ImNodeData() { Id = INT_MIN; }
|
||||
};
|
||||
|
||||
struct ImPinData
|
||||
{
|
||||
int Id;
|
||||
int ParentNodeIdx;
|
||||
ImRect AttributeRect;
|
||||
ImNodesAttributeType Type;
|
||||
ImNodesPinShape Shape;
|
||||
ImVec2 Pos; // screen-space coordinates
|
||||
int Flags;
|
||||
|
||||
struct
|
||||
{
|
||||
ImU32 Background, Hovered;
|
||||
} ColorStyle;
|
||||
|
||||
ImPinData(const int pin_id)
|
||||
: Id(pin_id), ParentNodeIdx(), AttributeRect(), Type(ImNodesAttributeType_None),
|
||||
Shape(ImNodesPinShape_CircleFilled), Pos(), Flags(ImNodesAttributeFlags_None),
|
||||
ColorStyle()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct ImLinkData
|
||||
{
|
||||
int Id;
|
||||
int StartPinIdx, EndPinIdx;
|
||||
|
||||
struct
|
||||
{
|
||||
ImU32 Base, Hovered, Selected;
|
||||
} ColorStyle;
|
||||
|
||||
ImLinkData(const int link_id) : Id(link_id), StartPinIdx(), EndPinIdx(), ColorStyle() {}
|
||||
};
|
||||
|
||||
struct ImClickInteractionState
|
||||
{
|
||||
ImNodesClickInteractionType Type;
|
||||
|
||||
struct
|
||||
{
|
||||
int StartPinIdx;
|
||||
ImOptionalIndex EndPinIdx;
|
||||
ImNodesLinkCreationType Type;
|
||||
} LinkCreation;
|
||||
|
||||
struct
|
||||
{
|
||||
ImRect Rect; // Coordinates in grid space
|
||||
} BoxSelector;
|
||||
|
||||
ImClickInteractionState() : Type(ImNodesClickInteractionType_None) {}
|
||||
};
|
||||
|
||||
struct ImNodesColElement
|
||||
{
|
||||
ImU32 Color;
|
||||
ImNodesCol Item;
|
||||
|
||||
ImNodesColElement(const ImU32 c, const ImNodesCol s) : Color(c), Item(s) {}
|
||||
};
|
||||
|
||||
struct ImNodesStyleVarElement
|
||||
{
|
||||
ImNodesStyleVar Item;
|
||||
float FloatValue[2];
|
||||
|
||||
ImNodesStyleVarElement(const ImNodesStyleVar variable, const float value) : Item(variable)
|
||||
{
|
||||
FloatValue[0] = value;
|
||||
}
|
||||
|
||||
ImNodesStyleVarElement(const ImNodesStyleVar variable, const ImVec2 value) : Item(variable)
|
||||
{
|
||||
FloatValue[0] = value.x;
|
||||
FloatValue[1] = value.y;
|
||||
}
|
||||
};
|
||||
|
||||
// [SECTION] global and editor context structs
|
||||
|
||||
struct ImNodesEditorContext
|
||||
{
|
||||
ImObjectPool<ImNodeData> Nodes;
|
||||
ImObjectPool<ImPinData> Pins;
|
||||
ImObjectPool<ImLinkData> Links;
|
||||
|
||||
ImVector<int> NodeDepthOrder;
|
||||
|
||||
// ui related fields
|
||||
ImVec2 Panning;
|
||||
ImVec2 AutoPanningDelta;
|
||||
// Minimum and maximum extents of all content in grid space. Valid after final
|
||||
// ImNodes::EndNode() call.
|
||||
ImRect GridContentBounds;
|
||||
|
||||
ImVector<int> SelectedNodeIndices;
|
||||
ImVector<int> SelectedLinkIndices;
|
||||
|
||||
// Relative origins of selected nodes for snapping of dragged nodes
|
||||
ImVector<ImVec2> SelectedNodeOffsets;
|
||||
// Offset of the primary node origin relative to the mouse cursor.
|
||||
ImVec2 PrimaryNodeOffset;
|
||||
|
||||
ImClickInteractionState ClickInteraction;
|
||||
|
||||
// Mini-map state set by MiniMap()
|
||||
|
||||
bool MiniMapEnabled;
|
||||
ImNodesMiniMapLocation MiniMapLocation;
|
||||
float MiniMapSizeFraction;
|
||||
ImNodesMiniMapNodeHoveringCallback MiniMapNodeHoveringCallback;
|
||||
ImNodesMiniMapNodeHoveringCallbackUserData MiniMapNodeHoveringCallbackUserData;
|
||||
|
||||
// Mini-map state set during EndNodeEditor() call
|
||||
|
||||
ImRect MiniMapRectScreenSpace;
|
||||
ImRect MiniMapContentScreenSpace;
|
||||
float MiniMapScaling;
|
||||
|
||||
ImNodesEditorContext()
|
||||
: Nodes(), Pins(), Links(), Panning(0.f, 0.f), SelectedNodeIndices(), SelectedLinkIndices(),
|
||||
SelectedNodeOffsets(), PrimaryNodeOffset(0.f, 0.f), ClickInteraction(),
|
||||
MiniMapEnabled(false), MiniMapSizeFraction(0.0f),
|
||||
MiniMapNodeHoveringCallback(NULL), MiniMapNodeHoveringCallbackUserData(NULL),
|
||||
MiniMapScaling(0.0f)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct ImNodesContext
|
||||
{
|
||||
ImNodesEditorContext* DefaultEditorCtx;
|
||||
ImNodesEditorContext* EditorCtx;
|
||||
|
||||
// Canvas draw list and helper state
|
||||
ImDrawList* CanvasDrawList;
|
||||
ImGuiStorage NodeIdxToSubmissionIdx;
|
||||
ImVector<int> NodeIdxSubmissionOrder;
|
||||
ImVector<int> NodeIndicesOverlappingWithMouse;
|
||||
ImVector<int> OccludedPinIndices;
|
||||
|
||||
// Canvas extents
|
||||
ImVec2 CanvasOriginScreenSpace;
|
||||
ImRect CanvasRectScreenSpace;
|
||||
|
||||
// Debug helpers
|
||||
ImNodesScope CurrentScope;
|
||||
|
||||
// Configuration state
|
||||
ImNodesIO Io;
|
||||
ImNodesStyle Style;
|
||||
ImVector<ImNodesColElement> ColorModifierStack;
|
||||
ImVector<ImNodesStyleVarElement> StyleModifierStack;
|
||||
ImGuiTextBuffer TextBuffer;
|
||||
|
||||
int CurrentAttributeFlags;
|
||||
ImVector<int> AttributeFlagStack;
|
||||
|
||||
// UI element state
|
||||
int CurrentNodeIdx;
|
||||
int CurrentPinIdx;
|
||||
int CurrentAttributeId;
|
||||
|
||||
ImOptionalIndex HoveredNodeIdx;
|
||||
ImOptionalIndex HoveredLinkIdx;
|
||||
ImOptionalIndex HoveredPinIdx;
|
||||
|
||||
ImOptionalIndex DeletedLinkIdx;
|
||||
ImOptionalIndex SnapLinkIdx;
|
||||
|
||||
// Event helper state
|
||||
// TODO: this should be a part of a state machine, and not a member of the global struct.
|
||||
// Unclear what parts of the code this relates to.
|
||||
int ImNodesUIState;
|
||||
|
||||
int ActiveAttributeId;
|
||||
bool ActiveAttribute;
|
||||
|
||||
// ImGui::IO cache
|
||||
|
||||
ImVec2 MousePos;
|
||||
|
||||
bool LeftMouseClicked;
|
||||
bool LeftMouseReleased;
|
||||
bool AltMouseClicked;
|
||||
bool LeftMouseDragging;
|
||||
bool AltMouseDragging;
|
||||
float AltMouseScrollDelta;
|
||||
bool MultipleSelectModifier;
|
||||
};
|
||||
|
||||
namespace IMNODES_NAMESPACE
|
||||
{
|
||||
static inline ImNodesEditorContext& EditorContextGet()
|
||||
{
|
||||
// No editor context was set! Did you forget to call ImNodes::CreateContext()?
|
||||
IM_ASSERT(GImNodes->EditorCtx != NULL);
|
||||
return *GImNodes->EditorCtx;
|
||||
}
|
||||
|
||||
// [SECTION] ObjectPool implementation
|
||||
|
||||
template<typename T>
|
||||
static inline int ObjectPoolFind(const ImObjectPool<T>& objects, const int id)
|
||||
{
|
||||
const int index = objects.IdMap.GetInt(static_cast<ImGuiID>(id), -1);
|
||||
return index;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline void ObjectPoolUpdate(ImObjectPool<T>& objects)
|
||||
{
|
||||
for (int i = 0; i < objects.InUse.size(); ++i)
|
||||
{
|
||||
const int id = objects.Pool[i].Id;
|
||||
|
||||
if (!objects.InUse[i] && objects.IdMap.GetInt(id, -1) == i)
|
||||
{
|
||||
objects.IdMap.SetInt(id, -1);
|
||||
objects.FreeList.push_back(i);
|
||||
(objects.Pool.Data + i)->~T();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void ObjectPoolUpdate(ImObjectPool<ImNodeData>& nodes)
|
||||
{
|
||||
for (int i = 0; i < nodes.InUse.size(); ++i)
|
||||
{
|
||||
if (nodes.InUse[i])
|
||||
{
|
||||
nodes.Pool[i].PinIndices.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
const int id = nodes.Pool[i].Id;
|
||||
|
||||
if (nodes.IdMap.GetInt(id, -1) == i)
|
||||
{
|
||||
// Remove node idx form depth stack the first time we detect that this idx slot is
|
||||
// unused
|
||||
ImVector<int>& depth_stack = EditorContextGet().NodeDepthOrder;
|
||||
const int* const elem = depth_stack.find(i);
|
||||
IM_ASSERT(elem != depth_stack.end());
|
||||
depth_stack.erase(elem);
|
||||
|
||||
nodes.IdMap.SetInt(id, -1);
|
||||
nodes.FreeList.push_back(i);
|
||||
(nodes.Pool.Data + i)->~ImNodeData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline void ObjectPoolReset(ImObjectPool<T>& objects)
|
||||
{
|
||||
if (!objects.InUse.empty())
|
||||
{
|
||||
memset(objects.InUse.Data, 0, objects.InUse.size_in_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline int ObjectPoolFindOrCreateIndex(ImObjectPool<T>& objects, const int id)
|
||||
{
|
||||
int index = objects.IdMap.GetInt(static_cast<ImGuiID>(id), -1);
|
||||
|
||||
// Construct new object
|
||||
if (index == -1)
|
||||
{
|
||||
if (objects.FreeList.empty())
|
||||
{
|
||||
index = objects.Pool.size();
|
||||
IM_ASSERT(objects.Pool.size() == objects.InUse.size());
|
||||
const int new_size = objects.Pool.size() + 1;
|
||||
objects.Pool.resize(new_size);
|
||||
objects.InUse.resize(new_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
index = objects.FreeList.back();
|
||||
objects.FreeList.pop_back();
|
||||
}
|
||||
IM_PLACEMENT_NEW(objects.Pool.Data + index) T(id);
|
||||
objects.IdMap.SetInt(static_cast<ImGuiID>(id), index);
|
||||
}
|
||||
|
||||
// Flag it as used
|
||||
objects.InUse[index] = true;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline int ObjectPoolFindOrCreateIndex(ImObjectPool<ImNodeData>& nodes, const int node_id)
|
||||
{
|
||||
int node_idx = nodes.IdMap.GetInt(static_cast<ImGuiID>(node_id), -1);
|
||||
|
||||
// Construct new node
|
||||
if (node_idx == -1)
|
||||
{
|
||||
if (nodes.FreeList.empty())
|
||||
{
|
||||
node_idx = nodes.Pool.size();
|
||||
IM_ASSERT(nodes.Pool.size() == nodes.InUse.size());
|
||||
const int new_size = nodes.Pool.size() + 1;
|
||||
nodes.Pool.resize(new_size);
|
||||
nodes.InUse.resize(new_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
node_idx = nodes.FreeList.back();
|
||||
nodes.FreeList.pop_back();
|
||||
}
|
||||
IM_PLACEMENT_NEW(nodes.Pool.Data + node_idx) ImNodeData(node_id);
|
||||
nodes.IdMap.SetInt(static_cast<ImGuiID>(node_id), node_idx);
|
||||
|
||||
ImNodesEditorContext& editor = EditorContextGet();
|
||||
editor.NodeDepthOrder.push_back(node_idx);
|
||||
}
|
||||
|
||||
// Flag node as used
|
||||
nodes.InUse[node_idx] = true;
|
||||
|
||||
return node_idx;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline T& ObjectPoolFindOrCreateObject(ImObjectPool<T>& objects, const int id)
|
||||
{
|
||||
const int index = ObjectPoolFindOrCreateIndex(objects, id);
|
||||
return objects.Pool[index];
|
||||
}
|
||||
} // namespace IMNODES_NAMESPACE
|
||||
1152
lib/external/imgui/include/implot.h
vendored
Normal file
1152
lib/external/imgui/include/implot.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1517
lib/external/imgui/include/implot_internal.h
vendored
Normal file
1517
lib/external/imgui/include/implot_internal.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,19 @@
|
||||
// [DEAR IMGUI]
|
||||
// This is a slightly modified version of stb_rect_pack.h 1.00.
|
||||
// Those changes would need to be pushed into nothings/stb:
|
||||
// - Added STBRP__CDECL
|
||||
// This is a slightly modified version of stb_rect_pack.h 1.01.
|
||||
// Grep for [DEAR IMGUI] to find the changes.
|
||||
|
||||
// stb_rect_pack.h - v1.00 - public domain - rectangle packing
|
||||
//
|
||||
// stb_rect_pack.h - v1.01 - public domain - rectangle packing
|
||||
// Sean Barrett 2014
|
||||
//
|
||||
// Useful for e.g. packing rectangular textures into an atlas.
|
||||
// Does not do rotation.
|
||||
//
|
||||
// Before #including,
|
||||
//
|
||||
// #define STB_RECT_PACK_IMPLEMENTATION
|
||||
//
|
||||
// in the file that you want to have the implementation.
|
||||
//
|
||||
// Not necessarily the awesomest packing method, but better than
|
||||
// the totally naive one in stb_truetype (which is primarily what
|
||||
// this is meant to replace).
|
||||
@@ -34,13 +38,14 @@
|
||||
// Minor features
|
||||
// Martins Mozeiko
|
||||
// github:IntellectualKitty
|
||||
//
|
||||
//
|
||||
// Bugfixes / warning fixes
|
||||
// Jeremy Jaussaud
|
||||
// Fabian Giesen
|
||||
//
|
||||
// Version history:
|
||||
//
|
||||
// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section
|
||||
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
|
||||
// 0.99 (2019-02-07) warning fixes
|
||||
// 0.11 (2017-03-03) return packing success/fail result
|
||||
@@ -81,11 +86,10 @@ typedef struct stbrp_context stbrp_context;
|
||||
typedef struct stbrp_node stbrp_node;
|
||||
typedef struct stbrp_rect stbrp_rect;
|
||||
|
||||
#ifdef STBRP_LARGE_RECTS
|
||||
typedef int stbrp_coord;
|
||||
#else
|
||||
typedef unsigned short stbrp_coord;
|
||||
#endif
|
||||
|
||||
#define STBRP__MAXVAL 0x7fffffff
|
||||
// Mostly for internal use, but this is the maximum supported coordinate value.
|
||||
|
||||
STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
|
||||
// Assign packed locations to rectangles. The rectangles are of type
|
||||
@@ -213,10 +217,9 @@ struct stbrp_context
|
||||
#define STBRP_ASSERT assert
|
||||
#endif
|
||||
|
||||
// [DEAR IMGUI] Added STBRP__CDECL
|
||||
#ifdef _MSC_VER
|
||||
#define STBRP__NOTUSED(v) (void)(v)
|
||||
#define STBRP__CDECL __cdecl
|
||||
#define STBRP__CDECL __cdecl
|
||||
#else
|
||||
#define STBRP__NOTUSED(v) (void)sizeof(v)
|
||||
#define STBRP__CDECL
|
||||
@@ -262,9 +265,6 @@ STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_ou
|
||||
STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
|
||||
{
|
||||
int i;
|
||||
#ifndef STBRP_LARGE_RECTS
|
||||
STBRP_ASSERT(width <= 0xffff && height <= 0xffff);
|
||||
#endif
|
||||
|
||||
for (i=0; i < num_nodes-1; ++i)
|
||||
nodes[i].next = &nodes[i+1];
|
||||
@@ -283,11 +283,7 @@ STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height,
|
||||
context->extra[0].y = 0;
|
||||
context->extra[0].next = &context->extra[1];
|
||||
context->extra[1].x = (stbrp_coord) width;
|
||||
#ifdef STBRP_LARGE_RECTS
|
||||
context->extra[1].y = (1<<30);
|
||||
#else
|
||||
context->extra[1].y = 65535;
|
||||
#endif
|
||||
context->extra[1].next = NULL;
|
||||
}
|
||||
|
||||
@@ -433,7 +429,7 @@ static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int widt
|
||||
if (y <= best_y) {
|
||||
if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
|
||||
best_x = xpos;
|
||||
STBRP_ASSERT(y <= best_y);
|
||||
//STBRP_ASSERT(y <= best_y); [DEAR IMGUI]
|
||||
best_y = y;
|
||||
best_waste = waste;
|
||||
best = prev;
|
||||
@@ -441,7 +437,7 @@ static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int widt
|
||||
}
|
||||
}
|
||||
tail = tail->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fr.prev_link = best;
|
||||
@@ -529,7 +525,6 @@ static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, i
|
||||
return res;
|
||||
}
|
||||
|
||||
// [DEAR IMGUI] Added STBRP__CDECL
|
||||
static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
|
||||
{
|
||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
||||
@@ -541,7 +536,6 @@ static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
|
||||
return (p->w > q->w) ? -1 : (p->w < q->w);
|
||||
}
|
||||
|
||||
// [DEAR IMGUI] Added STBRP__CDECL
|
||||
static int STBRP__CDECL rect_original_order(const void *a, const void *b)
|
||||
{
|
||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
||||
@@ -549,12 +543,6 @@ static int STBRP__CDECL rect_original_order(const void *a, const void *b)
|
||||
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
|
||||
}
|
||||
|
||||
#ifdef STBRP_LARGE_RECTS
|
||||
#define STBRP__MAXVAL 0xffffffff
|
||||
#else
|
||||
#define STBRP__MAXVAL 0xffff
|
||||
#endif
|
||||
|
||||
STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
|
||||
{
|
||||
int i, all_rects_packed = 1;
|
||||
@@ -602,38 +590,38 @@ This software is available under 2 licenses -- choose whichever you prefer.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE A - MIT License
|
||||
Copyright (c) 2017 Sean Barrett
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
||||
This is free and unencumbered software released into the public domain.
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
commercial or non-commercial, and by any means.
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
this software under copyright law.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1,10 +1,10 @@
|
||||
// [DEAR IMGUI]
|
||||
// This is a slightly modified version of stb_textedit.h 1.13.
|
||||
// This is a slightly modified version of stb_textedit.h 1.14.
|
||||
// Those changes would need to be pushed into nothings/stb:
|
||||
// - Fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
|
||||
// Grep for [DEAR IMGUI] to find the changes.
|
||||
|
||||
// stb_textedit.h - v1.13 - public domain - Sean Barrett
|
||||
// stb_textedit.h - v1.14 - public domain - Sean Barrett
|
||||
// Development of this library was sponsored by RAD Game Tools
|
||||
//
|
||||
// This C header file implements the guts of a multi-line text-editing
|
||||
@@ -19,7 +19,7 @@
|
||||
// texts, as its performance does not scale and it has limited undo).
|
||||
//
|
||||
// Non-trivial behaviors are modelled after Windows text controls.
|
||||
//
|
||||
//
|
||||
//
|
||||
// LICENSE
|
||||
//
|
||||
@@ -35,6 +35,7 @@
|
||||
//
|
||||
// VERSION HISTORY
|
||||
//
|
||||
// 1.14 (2021-07-11) page up/down, various fixes
|
||||
// 1.13 (2019-02-07) fix bug in undo size management
|
||||
// 1.12 (2018-01-29) user can change STB_TEXTEDIT_KEYTYPE, fix redo to avoid crash
|
||||
// 1.11 (2017-03-03) fix HOME on last line, dragging off single-line textfield
|
||||
@@ -58,6 +59,7 @@
|
||||
// Ulf Winklemann: move-by-word in 1.1
|
||||
// Fabian Giesen: secondary key inputs in 1.5
|
||||
// Martins Mozeiko: STB_TEXTEDIT_memmove in 1.6
|
||||
// Louis Schnellbach: page up/down in 1.14
|
||||
//
|
||||
// Bugfixes:
|
||||
// Scott Graham
|
||||
@@ -93,8 +95,8 @@
|
||||
// moderate sizes. The undo system does no memory allocations, so
|
||||
// it grows STB_TexteditState by the worst-case storage which is (in bytes):
|
||||
//
|
||||
// [4 + 3 * sizeof(STB_TEXTEDIT_POSITIONTYPE)] * STB_TEXTEDIT_UNDOSTATE_COUNT
|
||||
// + sizeof(STB_TEXTEDIT_CHARTYPE) * STB_TEXTEDIT_UNDOCHAR_COUNT
|
||||
// [4 + 3 * sizeof(STB_TEXTEDIT_POSITIONTYPE)] * STB_TEXTEDIT_UNDOSTATECOUNT
|
||||
// + sizeof(STB_TEXTEDIT_CHARTYPE) * STB_TEXTEDIT_UNDOCHARCOUNT
|
||||
//
|
||||
//
|
||||
// Implementation mode:
|
||||
@@ -217,20 +219,20 @@
|
||||
// call this with the mouse x,y on a mouse down; it will update the cursor
|
||||
// and reset the selection start/end to the cursor point. the x,y must
|
||||
// be relative to the text widget, with (0,0) being the top left.
|
||||
//
|
||||
//
|
||||
// drag:
|
||||
// call this with the mouse x,y on a mouse drag/up; it will update the
|
||||
// cursor and the selection end point
|
||||
//
|
||||
//
|
||||
// cut:
|
||||
// call this to delete the current selection; returns true if there was
|
||||
// one. you should FIRST copy the current selection to the system paste buffer.
|
||||
// (To copy, just copy the current selection out of the string yourself.)
|
||||
//
|
||||
//
|
||||
// paste:
|
||||
// call this to paste text at the current cursor point or over the current
|
||||
// selection if there is one.
|
||||
//
|
||||
//
|
||||
// key:
|
||||
// call this for keyboard inputs sent to the textfield. you can use it
|
||||
// for "key down" events or for "translated" key events. if you need to
|
||||
@@ -241,7 +243,7 @@
|
||||
// clear. STB_TEXTEDIT_KEYTYPE defaults to int, but you can #define it to
|
||||
// anything other type you wante before including.
|
||||
//
|
||||
//
|
||||
//
|
||||
// When rendering, you can read the cursor position and selection state from
|
||||
// the STB_TexteditState.
|
||||
//
|
||||
@@ -716,9 +718,7 @@ static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_TexteditSta
|
||||
state->has_preferred_x = 0;
|
||||
return 1;
|
||||
}
|
||||
// remove the undo since we didn't actually insert the characters
|
||||
if (state->undostate.undo_point)
|
||||
--state->undostate.undo_point;
|
||||
// note: paste failure will leave deleted selection, may be restored with an undo (see https://github.com/nothings/stb/issues/734 for details)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -764,7 +764,7 @@ retry:
|
||||
state->insert_mode = !state->insert_mode;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
case STB_TEXTEDIT_K_UNDO:
|
||||
stb_text_undo(str, state);
|
||||
state->has_preferred_x = 0;
|
||||
@@ -779,7 +779,7 @@ retry:
|
||||
// if currently there's a selection, move cursor to start of selection
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
stb_textedit_move_to_first(state);
|
||||
else
|
||||
else
|
||||
if (state->cursor > 0)
|
||||
--state->cursor;
|
||||
state->has_preferred_x = 0;
|
||||
@@ -828,7 +828,7 @@ retry:
|
||||
|
||||
#ifdef STB_TEXTEDIT_MOVEWORDRIGHT
|
||||
case STB_TEXTEDIT_K_WORDRIGHT:
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
stb_textedit_move_to_last(str, state);
|
||||
else {
|
||||
state->cursor = STB_TEXTEDIT_MOVEWORDRIGHT(str, state->cursor);
|
||||
@@ -922,7 +922,7 @@ retry:
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case STB_TEXTEDIT_K_UP:
|
||||
case STB_TEXTEDIT_K_UP | STB_TEXTEDIT_K_SHIFT:
|
||||
case STB_TEXTEDIT_K_PGUP:
|
||||
@@ -1014,7 +1014,7 @@ retry:
|
||||
}
|
||||
state->has_preferred_x = 0;
|
||||
break;
|
||||
|
||||
|
||||
#ifdef STB_TEXTEDIT_K_TEXTSTART2
|
||||
case STB_TEXTEDIT_K_TEXTSTART2:
|
||||
#endif
|
||||
@@ -1031,7 +1031,7 @@ retry:
|
||||
state->select_start = state->select_end = 0;
|
||||
state->has_preferred_x = 0;
|
||||
break;
|
||||
|
||||
|
||||
#ifdef STB_TEXTEDIT_K_TEXTSTART2
|
||||
case STB_TEXTEDIT_K_TEXTSTART2 | STB_TEXTEDIT_K_SHIFT:
|
||||
#endif
|
||||
@@ -1410,38 +1410,38 @@ This software is available under 2 licenses -- choose whichever you prefer.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE A - MIT License
|
||||
Copyright (c) 2017 Sean Barrett
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
||||
This is free and unencumbered software released into the public domain.
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
commercial or non-commercial, and by any means.
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
this software under copyright law.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
7897
lib/external/imgui/include/stb_image.h
vendored
Normal file
7897
lib/external/imgui/include/stb_image.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2886
lib/external/imgui/source/TextEditor.cpp
vendored
Normal file
2886
lib/external/imgui/source/TextEditor.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2746
lib/external/imgui/source/cimgui.cpp
vendored
Normal file
2746
lib/external/imgui/source/cimgui.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1095
lib/external/imgui/source/fonts/codicons_font.c
vendored
Normal file
1095
lib/external/imgui/source/fonts/codicons_font.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3025
lib/external/imgui/source/fonts/fontawesome_font.c
vendored
Normal file
3025
lib/external/imgui/source/fonts/fontawesome_font.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
116170
lib/external/imgui/source/fonts/unifont_font.c
vendored
Normal file
116170
lib/external/imgui/source/fonts/unifont_font.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
779
lib/external/imgui/source/imgui_freetype.cpp
vendored
Normal file
779
lib/external/imgui/source/imgui_freetype.cpp
vendored
Normal file
@@ -0,0 +1,779 @@
|
||||
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
|
||||
// (code)
|
||||
|
||||
// Get the latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype
|
||||
// Original code by @vuhdo (Aleksei Skriabin). Improvements by @mikesart. Maintained since 2019 by @ocornut.
|
||||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2021/08/23: fixed crash when FT_Render_Glyph() fails to render a glyph and returns NULL.
|
||||
// 2021/03/05: added ImGuiFreeTypeBuilderFlags_Bitmap to load bitmap glyphs.
|
||||
// 2021/03/02: set 'atlas->TexPixelsUseColors = true' to help some backends with deciding of a prefered texture format.
|
||||
// 2021/01/28: added support for color-layered glyphs via ImGuiFreeTypeBuilderFlags_LoadColor (require Freetype 2.10+).
|
||||
// 2021/01/26: simplified integration by using '#define IMGUI_ENABLE_FREETYPE'.
|
||||
// renamed ImGuiFreeType::XXX flags to ImGuiFreeTypeBuilderFlags_XXX for consistency with other API. removed ImGuiFreeType::BuildFontAtlas().
|
||||
// 2020/06/04: fix for rare case where FT_Get_Char_Index() succeed but FT_Load_Glyph() fails.
|
||||
// 2019/02/09: added RasterizerFlags::Monochrome flag to disable font anti-aliasing (combine with ::MonoHinting for best results!)
|
||||
// 2019/01/15: added support for imgui allocators + added FreeType only override function SetAllocatorFunctions().
|
||||
// 2019/01/10: re-factored to match big update in STB builder. fixed texture height waste. fixed redundant glyphs when merging. support for glyph padding.
|
||||
// 2018/06/08: added support for ImFontConfig::GlyphMinAdvanceX, GlyphMaxAdvanceX.
|
||||
// 2018/02/04: moved to main imgui repository (away from http://www.github.com/ocornut/imgui_club)
|
||||
// 2018/01/22: fix for addition of ImFontAtlas::TexUvscale member.
|
||||
// 2017/10/22: minor inconsequential change to match change in master (removed an unnecessary statement).
|
||||
// 2017/09/26: fixes for imgui internal changes.
|
||||
// 2017/08/26: cleanup, optimizations, support for ImFontConfig::RasterizerFlags, ImFontConfig::RasterizerMultiply.
|
||||
// 2017/08/16: imported from https://github.com/Vuhdo/imgui_freetype into http://www.github.com/ocornut/imgui_club, updated for latest changes in ImFontAtlas, minor tweaks.
|
||||
|
||||
// About Gamma Correct Blending:
|
||||
// - FreeType assumes blending in linear space rather than gamma space.
|
||||
// - See https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Glyph
|
||||
// - For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
|
||||
// - The default dear imgui styles will be impacted by this change (alpha values will need tweaking).
|
||||
|
||||
// FIXME: cfg.OversampleH, OversampleV are not supported (but perhaps not so necessary with this rasterizer).
|
||||
|
||||
#include "imgui_freetype.h"
|
||||
#include "imgui_internal.h" // ImMin,ImMax,ImFontAtlasBuild*,
|
||||
#include <stdint.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H // <freetype/freetype.h>
|
||||
#include FT_MODULE_H // <freetype/ftmodapi.h>
|
||||
#include FT_GLYPH_H // <freetype/ftglyph.h>
|
||||
#include FT_SYNTHESIS_H // <freetype/ftsynth.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
||||
#pragma warning (disable: 26812) // [Static Analyzer] The enum type 'xxx' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
|
||||
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Data
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// Default memory allocators
|
||||
static void* ImGuiFreeTypeDefaultAllocFunc(size_t size, void* user_data) { IM_UNUSED(user_data); return IM_ALLOC(size); }
|
||||
static void ImGuiFreeTypeDefaultFreeFunc(void* ptr, void* user_data) { IM_UNUSED(user_data); IM_FREE(ptr); }
|
||||
|
||||
// Current memory allocators
|
||||
static void* (*GImGuiFreeTypeAllocFunc)(size_t size, void* user_data) = ImGuiFreeTypeDefaultAllocFunc;
|
||||
static void (*GImGuiFreeTypeFreeFunc)(void* ptr, void* user_data) = ImGuiFreeTypeDefaultFreeFunc;
|
||||
static void* GImGuiFreeTypeAllocatorUserData = NULL;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Code
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
namespace
|
||||
{
|
||||
// Glyph metrics:
|
||||
// --------------
|
||||
//
|
||||
// xmin xmax
|
||||
// | |
|
||||
// |<-------- width -------->|
|
||||
// | |
|
||||
// | +-------------------------+----------------- ymax
|
||||
// | | ggggggggg ggggg | ^ ^
|
||||
// | | g:::::::::ggg::::g | | |
|
||||
// | | g:::::::::::::::::g | | |
|
||||
// | | g::::::ggggg::::::gg | | |
|
||||
// | | g:::::g g:::::g | | |
|
||||
// offsetX -|-------->| g:::::g g:::::g | offsetY |
|
||||
// | | g:::::g g:::::g | | |
|
||||
// | | g::::::g g:::::g | | |
|
||||
// | | g:::::::ggggg:::::g | | |
|
||||
// | | g::::::::::::::::g | | height
|
||||
// | | gg::::::::::::::g | | |
|
||||
// baseline ---*---------|---- gggggggg::::::g-----*-------- |
|
||||
// / | | g:::::g | |
|
||||
// origin | | gggggg g:::::g | |
|
||||
// | | g:::::gg gg:::::g | |
|
||||
// | | g::::::ggg:::::::g | |
|
||||
// | | gg:::::::::::::g | |
|
||||
// | | ggg::::::ggg | |
|
||||
// | | gggggg | v
|
||||
// | +-------------------------+----------------- ymin
|
||||
// | |
|
||||
// |------------- advanceX ----------->|
|
||||
|
||||
// A structure that describe a glyph.
|
||||
struct GlyphInfo
|
||||
{
|
||||
int Width; // Glyph's width in pixels.
|
||||
int Height; // Glyph's height in pixels.
|
||||
FT_Int OffsetX; // The distance from the origin ("pen position") to the left of the glyph.
|
||||
FT_Int OffsetY; // The distance from the origin to the top of the glyph. This is usually a value < 0.
|
||||
float AdvanceX; // The distance from the origin to the origin of the next glyph. This is usually a value > 0.
|
||||
bool IsColored; // The glyph is colored
|
||||
};
|
||||
|
||||
// Font parameters and metrics.
|
||||
struct FontInfo
|
||||
{
|
||||
uint32_t PixelHeight; // Size this font was generated with.
|
||||
float Ascender; // The pixel extents above the baseline in pixels (typically positive).
|
||||
float Descender; // The extents below the baseline in pixels (typically negative).
|
||||
float LineSpacing; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
|
||||
float LineGap; // The spacing in pixels between one row's descent and the next row's ascent.
|
||||
float MaxAdvanceWidth; // This field gives the maximum horizontal cursor advance for all glyphs in the font.
|
||||
};
|
||||
|
||||
// FreeType glyph rasterizer.
|
||||
// NB: No ctor/dtor, explicitly call Init()/Shutdown()
|
||||
struct FreeTypeFont
|
||||
{
|
||||
bool InitFont(FT_Library ft_library, const ImFontConfig& cfg, unsigned int extra_user_flags); // Initialize from an external data buffer. Doesn't copy data, and you must ensure it stays valid up to this object lifetime.
|
||||
void CloseFont();
|
||||
void SetPixelHeight(int pixel_height); // Change font pixel size. All following calls to RasterizeGlyph() will use this size
|
||||
const FT_Glyph_Metrics* LoadGlyph(uint32_t in_codepoint);
|
||||
const FT_Bitmap* RenderGlyphAndGetInfo(GlyphInfo* out_glyph_info);
|
||||
void BlitGlyph(const FT_Bitmap* ft_bitmap, uint32_t* dst, uint32_t dst_pitch, unsigned char* multiply_table = NULL);
|
||||
~FreeTypeFont() { CloseFont(); }
|
||||
|
||||
// [Internals]
|
||||
FontInfo Info; // Font descriptor of the current font.
|
||||
FT_Face Face;
|
||||
unsigned int UserFlags; // = ImFontConfig::RasterizerFlags
|
||||
FT_Int32 LoadFlags;
|
||||
FT_Render_Mode RenderMode;
|
||||
};
|
||||
|
||||
// From SDL_ttf: Handy routines for converting from fixed point
|
||||
#define FT_CEIL(X) (((X + 63) & -64) / 64)
|
||||
|
||||
bool FreeTypeFont::InitFont(FT_Library ft_library, const ImFontConfig& cfg, unsigned int extra_font_builder_flags)
|
||||
{
|
||||
FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)cfg.FontData, (uint32_t)cfg.FontDataSize, (uint32_t)cfg.FontNo, &Face);
|
||||
if (error != 0)
|
||||
return false;
|
||||
error = FT_Select_Charmap(Face, FT_ENCODING_UNICODE);
|
||||
if (error != 0)
|
||||
return false;
|
||||
|
||||
// Convert to FreeType flags (NB: Bold and Oblique are processed separately)
|
||||
UserFlags = cfg.FontBuilderFlags | extra_font_builder_flags;
|
||||
|
||||
LoadFlags = 0;
|
||||
if ((UserFlags & ImGuiFreeTypeBuilderFlags_Bitmap) == 0)
|
||||
LoadFlags |= FT_LOAD_NO_BITMAP;
|
||||
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_NoHinting)
|
||||
LoadFlags |= FT_LOAD_NO_HINTING;
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_NoAutoHint)
|
||||
LoadFlags |= FT_LOAD_NO_AUTOHINT;
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_ForceAutoHint)
|
||||
LoadFlags |= FT_LOAD_FORCE_AUTOHINT;
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_LightHinting)
|
||||
LoadFlags |= FT_LOAD_TARGET_LIGHT;
|
||||
else if (UserFlags & ImGuiFreeTypeBuilderFlags_MonoHinting)
|
||||
LoadFlags |= FT_LOAD_TARGET_MONO;
|
||||
else
|
||||
LoadFlags |= FT_LOAD_TARGET_NORMAL;
|
||||
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Monochrome)
|
||||
RenderMode = FT_RENDER_MODE_MONO;
|
||||
else
|
||||
RenderMode = FT_RENDER_MODE_NORMAL;
|
||||
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_LoadColor)
|
||||
LoadFlags |= FT_LOAD_COLOR;
|
||||
|
||||
memset(&Info, 0, sizeof(Info));
|
||||
SetPixelHeight((uint32_t)cfg.SizePixels);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void FreeTypeFont::CloseFont()
|
||||
{
|
||||
if (Face)
|
||||
{
|
||||
FT_Done_Face(Face);
|
||||
Face = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void FreeTypeFont::SetPixelHeight(int pixel_height)
|
||||
{
|
||||
// Vuhdo: I'm not sure how to deal with font sizes properly. As far as I understand, currently ImGui assumes that the 'pixel_height'
|
||||
// is a maximum height of an any given glyph, i.e. it's the sum of font's ascender and descender. Seems strange to me.
|
||||
// NB: FT_Set_Pixel_Sizes() doesn't seem to get us the same result.
|
||||
FT_Size_RequestRec req;
|
||||
req.type = (UserFlags & ImGuiFreeTypeBuilderFlags_Bitmap) ? FT_SIZE_REQUEST_TYPE_NOMINAL : FT_SIZE_REQUEST_TYPE_REAL_DIM;
|
||||
req.width = 0;
|
||||
req.height = (uint32_t)pixel_height * 64;
|
||||
req.horiResolution = 0;
|
||||
req.vertResolution = 0;
|
||||
FT_Request_Size(Face, &req);
|
||||
|
||||
// Update font info
|
||||
FT_Size_Metrics metrics = Face->size->metrics;
|
||||
Info.PixelHeight = (uint32_t)pixel_height;
|
||||
Info.Ascender = (float)FT_CEIL(metrics.ascender);
|
||||
Info.Descender = (float)FT_CEIL(metrics.descender);
|
||||
Info.LineSpacing = (float)FT_CEIL(metrics.height);
|
||||
Info.LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender);
|
||||
Info.MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance);
|
||||
}
|
||||
|
||||
const FT_Glyph_Metrics* FreeTypeFont::LoadGlyph(uint32_t codepoint)
|
||||
{
|
||||
uint32_t glyph_index = FT_Get_Char_Index(Face, codepoint);
|
||||
if (glyph_index == 0)
|
||||
return NULL;
|
||||
|
||||
// If this crash for you: FreeType 2.11.0 has a crash bug on some bitmap/colored fonts.
|
||||
// - https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
|
||||
// - https://github.com/ocornut/imgui/issues/4567
|
||||
// - https://github.com/ocornut/imgui/issues/4566
|
||||
// You can use FreeType 2.10, or the patched version of 2.11.0 in VcPkg, or probably any upcoming FreeType version.
|
||||
FT_Error error = FT_Load_Glyph(Face, glyph_index, LoadFlags);
|
||||
if (error)
|
||||
return NULL;
|
||||
|
||||
// Need an outline for this to work
|
||||
FT_GlyphSlot slot = Face->glyph;
|
||||
IM_ASSERT(slot->format == FT_GLYPH_FORMAT_OUTLINE || slot->format == FT_GLYPH_FORMAT_BITMAP);
|
||||
|
||||
// Apply convenience transform (this is not picking from real "Bold"/"Italic" fonts! Merely applying FreeType helper transform. Oblique == Slanting)
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Bold)
|
||||
FT_GlyphSlot_Embolden(slot);
|
||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Oblique)
|
||||
{
|
||||
FT_GlyphSlot_Oblique(slot);
|
||||
//FT_BBox bbox;
|
||||
//FT_Outline_Get_BBox(&slot->outline, &bbox);
|
||||
//slot->metrics.width = bbox.xMax - bbox.xMin;
|
||||
//slot->metrics.height = bbox.yMax - bbox.yMin;
|
||||
}
|
||||
|
||||
return &slot->metrics;
|
||||
}
|
||||
|
||||
const FT_Bitmap* FreeTypeFont::RenderGlyphAndGetInfo(GlyphInfo* out_glyph_info)
|
||||
{
|
||||
FT_GlyphSlot slot = Face->glyph;
|
||||
FT_Error error = FT_Render_Glyph(slot, RenderMode);
|
||||
if (error != 0)
|
||||
return NULL;
|
||||
|
||||
FT_Bitmap* ft_bitmap = &Face->glyph->bitmap;
|
||||
out_glyph_info->Width = (int)ft_bitmap->width;
|
||||
out_glyph_info->Height = (int)ft_bitmap->rows;
|
||||
out_glyph_info->OffsetX = Face->glyph->bitmap_left;
|
||||
out_glyph_info->OffsetY = -Face->glyph->bitmap_top;
|
||||
out_glyph_info->AdvanceX = (float)FT_CEIL(slot->advance.x);
|
||||
out_glyph_info->IsColored = (ft_bitmap->pixel_mode == FT_PIXEL_MODE_BGRA);
|
||||
|
||||
return ft_bitmap;
|
||||
}
|
||||
|
||||
void FreeTypeFont::BlitGlyph(const FT_Bitmap* ft_bitmap, uint32_t* dst, uint32_t dst_pitch, unsigned char* multiply_table)
|
||||
{
|
||||
IM_ASSERT(ft_bitmap != NULL);
|
||||
const uint32_t w = ft_bitmap->width;
|
||||
const uint32_t h = ft_bitmap->rows;
|
||||
const uint8_t* src = ft_bitmap->buffer;
|
||||
const uint32_t src_pitch = ft_bitmap->pitch;
|
||||
|
||||
switch (ft_bitmap->pixel_mode)
|
||||
{
|
||||
case FT_PIXEL_MODE_GRAY: // Grayscale image, 1 byte per pixel.
|
||||
{
|
||||
if (multiply_table == NULL)
|
||||
{
|
||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
||||
for (uint32_t x = 0; x < w; x++)
|
||||
dst[x] = IM_COL32(255, 255, 255, src[x]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
||||
for (uint32_t x = 0; x < w; x++)
|
||||
dst[x] = IM_COL32(255, 255, 255, multiply_table[src[x]]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FT_PIXEL_MODE_MONO: // Monochrome image, 1 bit per pixel. The bits in each byte are ordered from MSB to LSB.
|
||||
{
|
||||
uint8_t color0 = multiply_table ? multiply_table[0] : 0;
|
||||
uint8_t color1 = multiply_table ? multiply_table[255] : 255;
|
||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
||||
{
|
||||
uint8_t bits = 0;
|
||||
const uint8_t* bits_ptr = src;
|
||||
for (uint32_t x = 0; x < w; x++, bits <<= 1)
|
||||
{
|
||||
if ((x & 7) == 0)
|
||||
bits = *bits_ptr++;
|
||||
dst[x] = IM_COL32(255, 255, 255, (bits & 0x80) ? color1 : color0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FT_PIXEL_MODE_BGRA:
|
||||
{
|
||||
// FIXME: Converting pre-multiplied alpha to straight. Doesn't smell good.
|
||||
#define DE_MULTIPLY(color, alpha) (ImU32)(255.0f * (float)color / (float)alpha + 0.5f)
|
||||
if (multiply_table == NULL)
|
||||
{
|
||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
||||
for (uint32_t x = 0; x < w; x++)
|
||||
{
|
||||
uint8_t r = src[x * 4 + 2], g = src[x * 4 + 1], b = src[x * 4], a = src[x * 4 + 3];
|
||||
dst[x] = IM_COL32(DE_MULTIPLY(r, a), DE_MULTIPLY(g, a), DE_MULTIPLY(b, a), a);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
||||
{
|
||||
for (uint32_t x = 0; x < w; x++)
|
||||
{
|
||||
uint8_t r = src[x * 4 + 2], g = src[x * 4 + 1], b = src[x * 4], a = src[x * 4 + 3];
|
||||
dst[x] = IM_COL32(multiply_table[DE_MULTIPLY(r, a)], multiply_table[DE_MULTIPLY(g, a)], multiply_table[DE_MULTIPLY(b, a)], multiply_table[a]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef DE_MULTIPLY
|
||||
break;
|
||||
}
|
||||
default:
|
||||
IM_ASSERT(0 && "FreeTypeFont::BlitGlyph(): Unknown bitmap pixel mode!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef STB_RECT_PACK_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
||||
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
||||
#define STBRP_ASSERT(x) do { IM_ASSERT(x); } while (0)
|
||||
#define STBRP_STATIC
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#endif
|
||||
#ifdef IMGUI_STB_RECT_PACK_FILENAME
|
||||
#include IMGUI_STB_RECT_PACK_FILENAME
|
||||
#else
|
||||
#include "imstb_rectpack.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct ImFontBuildSrcGlyphFT
|
||||
{
|
||||
GlyphInfo Info;
|
||||
uint32_t Codepoint;
|
||||
unsigned int* BitmapData; // Point within one of the dst_tmp_bitmap_buffers[] array
|
||||
|
||||
ImFontBuildSrcGlyphFT() { memset((void*)this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
struct ImFontBuildSrcDataFT
|
||||
{
|
||||
FreeTypeFont Font;
|
||||
stbrp_rect* Rects; // Rectangle to pack. We first fill in their size and the packer will give us their position.
|
||||
const ImWchar* SrcRanges; // Ranges as requested by user (user is allowed to request too much, e.g. 0x0020..0xFFFF)
|
||||
int DstIndex; // Index into atlas->Fonts[] and dst_tmp_array[]
|
||||
int GlyphsHighest; // Highest requested codepoint
|
||||
int GlyphsCount; // Glyph count (excluding missing glyphs and glyphs already set by an earlier source font)
|
||||
ImBitVector GlyphsSet; // Glyph bit map (random access, 1-bit per codepoint. This will be a maximum of 8KB)
|
||||
ImVector<ImFontBuildSrcGlyphFT> GlyphsList;
|
||||
};
|
||||
|
||||
// Temporary data for one destination ImFont* (multiple source fonts can be merged into one destination ImFont)
|
||||
struct ImFontBuildDstDataFT
|
||||
{
|
||||
int SrcCount; // Number of source fonts targeting this destination font.
|
||||
int GlyphsHighest;
|
||||
int GlyphsCount;
|
||||
ImBitVector GlyphsSet; // This is used to resolve collision when multiple sources are merged into a same destination font.
|
||||
};
|
||||
|
||||
bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, unsigned int extra_flags)
|
||||
{
|
||||
IM_ASSERT(atlas->ConfigData.Size > 0);
|
||||
|
||||
ImFontAtlasBuildInit(atlas);
|
||||
|
||||
// Clear atlas
|
||||
atlas->TexID = (ImTextureID)NULL;
|
||||
atlas->TexWidth = atlas->TexHeight = 0;
|
||||
atlas->TexUvScale = ImVec2(0.0f, 0.0f);
|
||||
atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f);
|
||||
atlas->ClearTexData();
|
||||
|
||||
// Temporary storage for building
|
||||
bool src_load_color = false;
|
||||
ImVector<ImFontBuildSrcDataFT> src_tmp_array;
|
||||
ImVector<ImFontBuildDstDataFT> dst_tmp_array;
|
||||
src_tmp_array.resize(atlas->ConfigData.Size);
|
||||
dst_tmp_array.resize(atlas->Fonts.Size);
|
||||
memset((void*)src_tmp_array.Data, 0, (size_t)src_tmp_array.size_in_bytes());
|
||||
memset((void*)dst_tmp_array.Data, 0, (size_t)dst_tmp_array.size_in_bytes());
|
||||
|
||||
// 1. Initialize font loading structure, check font data validity
|
||||
for (int src_i = 0; src_i < atlas->ConfigData.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
||||
FreeTypeFont& font_face = src_tmp.Font;
|
||||
IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == atlas));
|
||||
|
||||
// Find index from cfg.DstFont (we allow the user to set cfg.DstFont. Also it makes casual debugging nicer than when storing indices)
|
||||
src_tmp.DstIndex = -1;
|
||||
for (int output_i = 0; output_i < atlas->Fonts.Size && src_tmp.DstIndex == -1; output_i++)
|
||||
if (cfg.DstFont == atlas->Fonts[output_i])
|
||||
src_tmp.DstIndex = output_i;
|
||||
IM_ASSERT(src_tmp.DstIndex != -1); // cfg.DstFont not pointing within atlas->Fonts[] array?
|
||||
if (src_tmp.DstIndex == -1)
|
||||
return false;
|
||||
|
||||
// Load font
|
||||
if (!font_face.InitFont(ft_library, cfg, extra_flags))
|
||||
return false;
|
||||
|
||||
// Measure highest codepoints
|
||||
src_load_color |= (cfg.FontBuilderFlags & ImGuiFreeTypeBuilderFlags_LoadColor) != 0;
|
||||
ImFontBuildDstDataFT& dst_tmp = dst_tmp_array[src_tmp.DstIndex];
|
||||
src_tmp.SrcRanges = cfg.GlyphRanges ? cfg.GlyphRanges : atlas->GetGlyphRangesDefault();
|
||||
for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2)
|
||||
src_tmp.GlyphsHighest = ImMax(src_tmp.GlyphsHighest, (int)src_range[1]);
|
||||
dst_tmp.SrcCount++;
|
||||
dst_tmp.GlyphsHighest = ImMax(dst_tmp.GlyphsHighest, src_tmp.GlyphsHighest);
|
||||
}
|
||||
|
||||
// 2. For every requested codepoint, check for their presence in the font data, and handle redundancy or overlaps between source fonts to avoid unused glyphs.
|
||||
int total_glyphs_count = 0;
|
||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
ImFontBuildDstDataFT& dst_tmp = dst_tmp_array[src_tmp.DstIndex];
|
||||
src_tmp.GlyphsSet.Create(src_tmp.GlyphsHighest + 1);
|
||||
if (dst_tmp.GlyphsSet.Storage.empty())
|
||||
dst_tmp.GlyphsSet.Create(dst_tmp.GlyphsHighest + 1);
|
||||
|
||||
for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2)
|
||||
for (int codepoint = src_range[0]; codepoint <= (int)src_range[1]; codepoint++)
|
||||
{
|
||||
if (dst_tmp.GlyphsSet.TestBit(codepoint)) // Don't overwrite existing glyphs. We could make this an option (e.g. MergeOverwrite)
|
||||
continue;
|
||||
uint32_t glyph_index = FT_Get_Char_Index(src_tmp.Font.Face, codepoint); // It is actually in the font? (FIXME-OPT: We are not storing the glyph_index..)
|
||||
if (glyph_index == 0)
|
||||
continue;
|
||||
|
||||
// Add to avail set/counters
|
||||
src_tmp.GlyphsCount++;
|
||||
dst_tmp.GlyphsCount++;
|
||||
src_tmp.GlyphsSet.SetBit(codepoint);
|
||||
dst_tmp.GlyphsSet.SetBit(codepoint);
|
||||
total_glyphs_count++;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Unpack our bit map into a flat list (we now have all the Unicode points that we know are requested _and_ available _and_ not overlapping another)
|
||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
src_tmp.GlyphsList.reserve(src_tmp.GlyphsCount);
|
||||
|
||||
IM_ASSERT(sizeof(src_tmp.GlyphsSet.Storage.Data[0]) == sizeof(ImU32));
|
||||
const ImU32* it_begin = src_tmp.GlyphsSet.Storage.begin();
|
||||
const ImU32* it_end = src_tmp.GlyphsSet.Storage.end();
|
||||
for (const ImU32* it = it_begin; it < it_end; it++)
|
||||
if (ImU32 entries_32 = *it)
|
||||
for (ImU32 bit_n = 0; bit_n < 32; bit_n++)
|
||||
if (entries_32 & ((ImU32)1 << bit_n))
|
||||
{
|
||||
ImFontBuildSrcGlyphFT src_glyph;
|
||||
src_glyph.Codepoint = (ImWchar)(((it - it_begin) << 5) + bit_n);
|
||||
//src_glyph.GlyphIndex = 0; // FIXME-OPT: We had this info in the previous step and lost it..
|
||||
src_tmp.GlyphsList.push_back(src_glyph);
|
||||
}
|
||||
src_tmp.GlyphsSet.Clear();
|
||||
IM_ASSERT(src_tmp.GlyphsList.Size == src_tmp.GlyphsCount);
|
||||
}
|
||||
for (int dst_i = 0; dst_i < dst_tmp_array.Size; dst_i++)
|
||||
dst_tmp_array[dst_i].GlyphsSet.Clear();
|
||||
dst_tmp_array.clear();
|
||||
|
||||
// Allocate packing character data and flag packed characters buffer as non-packed (x0=y0=x1=y1=0)
|
||||
// (We technically don't need to zero-clear buf_rects, but let's do it for the sake of sanity)
|
||||
ImVector<stbrp_rect> buf_rects;
|
||||
buf_rects.resize(total_glyphs_count);
|
||||
memset(buf_rects.Data, 0, (size_t)buf_rects.size_in_bytes());
|
||||
|
||||
// Allocate temporary rasterization data buffers.
|
||||
// We could not find a way to retrieve accurate glyph size without rendering them.
|
||||
// (e.g. slot->metrics->width not always matching bitmap->width, especially considering the Oblique transform)
|
||||
// We allocate in chunks of 256 KB to not waste too much extra memory ahead. Hopefully users of FreeType won't find the temporary allocations.
|
||||
const int BITMAP_BUFFERS_CHUNK_SIZE = 256 * 1024;
|
||||
int buf_bitmap_current_used_bytes = 0;
|
||||
ImVector<unsigned char*> buf_bitmap_buffers;
|
||||
buf_bitmap_buffers.push_back((unsigned char*)IM_ALLOC(BITMAP_BUFFERS_CHUNK_SIZE));
|
||||
|
||||
// 4. Gather glyphs sizes so we can pack them in our virtual canvas.
|
||||
// 8. Render/rasterize font characters into the texture
|
||||
int total_surface = 0;
|
||||
int buf_rects_out_n = 0;
|
||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
||||
if (src_tmp.GlyphsCount == 0)
|
||||
continue;
|
||||
|
||||
src_tmp.Rects = &buf_rects[buf_rects_out_n];
|
||||
buf_rects_out_n += src_tmp.GlyphsCount;
|
||||
|
||||
// Compute multiply table if requested
|
||||
const bool multiply_enabled = (cfg.RasterizerMultiply != 1.0f);
|
||||
unsigned char multiply_table[256];
|
||||
if (multiply_enabled)
|
||||
ImFontAtlasBuildMultiplyCalcLookupTable(multiply_table, cfg.RasterizerMultiply);
|
||||
|
||||
// Gather the sizes of all rectangles we will need to pack
|
||||
const int padding = atlas->TexGlyphPadding;
|
||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsList.Size; glyph_i++)
|
||||
{
|
||||
ImFontBuildSrcGlyphFT& src_glyph = src_tmp.GlyphsList[glyph_i];
|
||||
|
||||
const FT_Glyph_Metrics* metrics = src_tmp.Font.LoadGlyph(src_glyph.Codepoint);
|
||||
if (metrics == NULL)
|
||||
continue;
|
||||
|
||||
// Render glyph into a bitmap (currently held by FreeType)
|
||||
const FT_Bitmap* ft_bitmap = src_tmp.Font.RenderGlyphAndGetInfo(&src_glyph.Info);
|
||||
if (ft_bitmap == NULL)
|
||||
continue;
|
||||
|
||||
// Allocate new temporary chunk if needed
|
||||
const int bitmap_size_in_bytes = src_glyph.Info.Width * src_glyph.Info.Height * 4;
|
||||
if (buf_bitmap_current_used_bytes + bitmap_size_in_bytes > BITMAP_BUFFERS_CHUNK_SIZE)
|
||||
{
|
||||
buf_bitmap_current_used_bytes = 0;
|
||||
buf_bitmap_buffers.push_back((unsigned char*)IM_ALLOC(BITMAP_BUFFERS_CHUNK_SIZE));
|
||||
}
|
||||
|
||||
// Blit rasterized pixels to our temporary buffer and keep a pointer to it.
|
||||
src_glyph.BitmapData = (unsigned int*)(buf_bitmap_buffers.back() + buf_bitmap_current_used_bytes);
|
||||
buf_bitmap_current_used_bytes += bitmap_size_in_bytes;
|
||||
src_tmp.Font.BlitGlyph(ft_bitmap, src_glyph.BitmapData, src_glyph.Info.Width, multiply_enabled ? multiply_table : NULL);
|
||||
|
||||
src_tmp.Rects[glyph_i].w = (stbrp_coord)(src_glyph.Info.Width + padding);
|
||||
src_tmp.Rects[glyph_i].h = (stbrp_coord)(src_glyph.Info.Height + padding);
|
||||
total_surface += src_tmp.Rects[glyph_i].w * src_tmp.Rects[glyph_i].h;
|
||||
}
|
||||
}
|
||||
|
||||
// We need a width for the skyline algorithm, any width!
|
||||
// The exact width doesn't really matter much, but some API/GPU have texture size limitations and increasing width can decrease height.
|
||||
// User can override TexDesiredWidth and TexGlyphPadding if they wish, otherwise we use a simple heuristic to select the width based on expected surface.
|
||||
const int surface_sqrt = (int)ImSqrt((float)total_surface) + 1;
|
||||
atlas->TexHeight = 0;
|
||||
if (atlas->TexDesiredWidth > 0)
|
||||
atlas->TexWidth = atlas->TexDesiredWidth;
|
||||
else
|
||||
atlas->TexWidth = (surface_sqrt >= 4096 * 0.7f) ? 4096 : (surface_sqrt >= 2048 * 0.7f) ? 2048 : (surface_sqrt >= 1024 * 0.7f) ? 1024 : 512;
|
||||
|
||||
// 5. Start packing
|
||||
// Pack our extra data rectangles first, so it will be on the upper-left corner of our texture (UV will have small values).
|
||||
const int TEX_HEIGHT_MAX = 1024 * 32;
|
||||
const int num_nodes_for_packing_algorithm = atlas->TexWidth - atlas->TexGlyphPadding;
|
||||
ImVector<stbrp_node> pack_nodes;
|
||||
pack_nodes.resize(num_nodes_for_packing_algorithm);
|
||||
stbrp_context pack_context;
|
||||
stbrp_init_target(&pack_context, atlas->TexWidth, TEX_HEIGHT_MAX, pack_nodes.Data, pack_nodes.Size);
|
||||
ImFontAtlasBuildPackCustomRects(atlas, &pack_context);
|
||||
|
||||
// 6. Pack each source font. No rendering yet, we are working with rectangles in an infinitely tall texture at this point.
|
||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
if (src_tmp.GlyphsCount == 0)
|
||||
continue;
|
||||
|
||||
stbrp_pack_rects(&pack_context, src_tmp.Rects, src_tmp.GlyphsCount);
|
||||
|
||||
// Extend texture height and mark missing glyphs as non-packed so we won't render them.
|
||||
// FIXME: We are not handling packing failure here (would happen if we got off TEX_HEIGHT_MAX or if a single if larger than TexWidth?)
|
||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsCount; glyph_i++)
|
||||
if (src_tmp.Rects[glyph_i].was_packed)
|
||||
atlas->TexHeight = ImMax(atlas->TexHeight, src_tmp.Rects[glyph_i].y + src_tmp.Rects[glyph_i].h);
|
||||
}
|
||||
|
||||
// 7. Allocate texture
|
||||
atlas->TexHeight = (atlas->Flags & ImFontAtlasFlags_NoPowerOfTwoHeight) ? (atlas->TexHeight + 1) : ImUpperPowerOfTwo(atlas->TexHeight);
|
||||
atlas->TexUvScale = ImVec2(1.0f / atlas->TexWidth, 1.0f / atlas->TexHeight);
|
||||
if (src_load_color)
|
||||
{
|
||||
size_t tex_size = (size_t)atlas->TexWidth * atlas->TexHeight * 4;
|
||||
atlas->TexPixelsRGBA32 = (unsigned int*)IM_ALLOC(tex_size);
|
||||
memset(atlas->TexPixelsRGBA32, 0, tex_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t tex_size = (size_t)atlas->TexWidth * atlas->TexHeight * 1;
|
||||
atlas->TexPixelsAlpha8 = (unsigned char*)IM_ALLOC(tex_size);
|
||||
memset(atlas->TexPixelsAlpha8, 0, tex_size);
|
||||
}
|
||||
|
||||
// 8. Copy rasterized font characters back into the main texture
|
||||
// 9. Setup ImFont and glyphs for runtime
|
||||
bool tex_use_colors = false;
|
||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
||||
{
|
||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
||||
if (src_tmp.GlyphsCount == 0)
|
||||
continue;
|
||||
|
||||
// When merging fonts with MergeMode=true:
|
||||
// - We can have multiple input fonts writing into a same destination font.
|
||||
// - dst_font->ConfigData is != from cfg which is our source configuration.
|
||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
||||
ImFont* dst_font = cfg.DstFont;
|
||||
|
||||
const float ascent = src_tmp.Font.Info.Ascender;
|
||||
const float descent = src_tmp.Font.Info.Descender;
|
||||
ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent);
|
||||
const float font_off_x = cfg.GlyphOffset.x;
|
||||
const float font_off_y = cfg.GlyphOffset.y + IM_ROUND(dst_font->Ascent);
|
||||
|
||||
const int padding = atlas->TexGlyphPadding;
|
||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsCount; glyph_i++)
|
||||
{
|
||||
ImFontBuildSrcGlyphFT& src_glyph = src_tmp.GlyphsList[glyph_i];
|
||||
stbrp_rect& pack_rect = src_tmp.Rects[glyph_i];
|
||||
IM_ASSERT(pack_rect.was_packed);
|
||||
if (pack_rect.w == 0 && pack_rect.h == 0)
|
||||
continue;
|
||||
|
||||
GlyphInfo& info = src_glyph.Info;
|
||||
IM_ASSERT(info.Width + padding <= pack_rect.w);
|
||||
IM_ASSERT(info.Height + padding <= pack_rect.h);
|
||||
const int tx = pack_rect.x + padding;
|
||||
const int ty = pack_rect.y + padding;
|
||||
|
||||
// Register glyph
|
||||
float x0 = info.OffsetX + font_off_x;
|
||||
float y0 = info.OffsetY + font_off_y;
|
||||
float x1 = x0 + info.Width;
|
||||
float y1 = y0 + info.Height;
|
||||
float u0 = (tx) / (float)atlas->TexWidth;
|
||||
float v0 = (ty) / (float)atlas->TexHeight;
|
||||
float u1 = (tx + info.Width) / (float)atlas->TexWidth;
|
||||
float v1 = (ty + info.Height) / (float)atlas->TexHeight;
|
||||
dst_font->AddGlyph(&cfg, (ImWchar)src_glyph.Codepoint, x0, y0, x1, y1, u0, v0, u1, v1, info.AdvanceX);
|
||||
|
||||
ImFontGlyph* dst_glyph = &dst_font->Glyphs.back();
|
||||
IM_ASSERT(dst_glyph->Codepoint == src_glyph.Codepoint);
|
||||
if (src_glyph.Info.IsColored)
|
||||
dst_glyph->Colored = tex_use_colors = true;
|
||||
|
||||
// Blit from temporary buffer to final texture
|
||||
size_t blit_src_stride = (size_t)src_glyph.Info.Width;
|
||||
size_t blit_dst_stride = (size_t)atlas->TexWidth;
|
||||
unsigned int* blit_src = src_glyph.BitmapData;
|
||||
if (atlas->TexPixelsAlpha8 != NULL)
|
||||
{
|
||||
unsigned char* blit_dst = atlas->TexPixelsAlpha8 + (ty * blit_dst_stride) + tx;
|
||||
for (int y = 0; y < info.Height; y++, blit_dst += blit_dst_stride, blit_src += blit_src_stride)
|
||||
for (int x = 0; x < info.Width; x++)
|
||||
blit_dst[x] = (unsigned char)((blit_src[x] >> IM_COL32_A_SHIFT) & 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int* blit_dst = atlas->TexPixelsRGBA32 + (ty * blit_dst_stride) + tx;
|
||||
for (int y = 0; y < info.Height; y++, blit_dst += blit_dst_stride, blit_src += blit_src_stride)
|
||||
for (int x = 0; x < info.Width; x++)
|
||||
blit_dst[x] = blit_src[x];
|
||||
}
|
||||
}
|
||||
|
||||
src_tmp.Rects = NULL;
|
||||
}
|
||||
atlas->TexPixelsUseColors = tex_use_colors;
|
||||
|
||||
// Cleanup
|
||||
for (int buf_i = 0; buf_i < buf_bitmap_buffers.Size; buf_i++)
|
||||
IM_FREE(buf_bitmap_buffers[buf_i]);
|
||||
src_tmp_array.clear_destruct();
|
||||
|
||||
ImFontAtlasBuildFinish(atlas);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// FreeType memory allocation callbacks
|
||||
static void* FreeType_Alloc(FT_Memory /*memory*/, long size)
|
||||
{
|
||||
return GImGuiFreeTypeAllocFunc((size_t)size, GImGuiFreeTypeAllocatorUserData);
|
||||
}
|
||||
|
||||
static void FreeType_Free(FT_Memory /*memory*/, void* block)
|
||||
{
|
||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
||||
}
|
||||
|
||||
static void* FreeType_Realloc(FT_Memory /*memory*/, long cur_size, long new_size, void* block)
|
||||
{
|
||||
// Implement realloc() as we don't ask user to provide it.
|
||||
if (block == NULL)
|
||||
return GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
|
||||
|
||||
if (new_size == 0)
|
||||
{
|
||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (new_size > cur_size)
|
||||
{
|
||||
void* new_block = GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
|
||||
memcpy(new_block, block, (size_t)cur_size);
|
||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
||||
return new_block;
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
static bool ImFontAtlasBuildWithFreeType(ImFontAtlas* atlas)
|
||||
{
|
||||
// FreeType memory management: https://www.freetype.org/freetype2/docs/design/design-4.html
|
||||
FT_MemoryRec_ memory_rec = {};
|
||||
memory_rec.user = NULL;
|
||||
memory_rec.alloc = &FreeType_Alloc;
|
||||
memory_rec.free = &FreeType_Free;
|
||||
memory_rec.realloc = &FreeType_Realloc;
|
||||
|
||||
// https://www.freetype.org/freetype2/docs/reference/ft2-module_management.html#FT_New_Library
|
||||
FT_Library ft_library;
|
||||
FT_Error error = FT_New_Library(&memory_rec, &ft_library);
|
||||
if (error != 0)
|
||||
return false;
|
||||
|
||||
// If you don't call FT_Add_Default_Modules() the rest of code may work, but FreeType won't use our custom allocator.
|
||||
FT_Add_Default_Modules(ft_library);
|
||||
|
||||
bool ret = ImFontAtlasBuildWithFreeTypeEx(ft_library, atlas, atlas->FontBuilderFlags);
|
||||
FT_Done_Library(ft_library);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const ImFontBuilderIO* ImGuiFreeType::GetBuilderForFreeType()
|
||||
{
|
||||
static ImFontBuilderIO io;
|
||||
io.FontBuilder_Build = ImFontAtlasBuildWithFreeType;
|
||||
return &io;
|
||||
}
|
||||
|
||||
void ImGuiFreeType::SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data)
|
||||
{
|
||||
GImGuiFreeTypeAllocFunc = alloc_func;
|
||||
GImGuiFreeTypeFreeFunc = free_func;
|
||||
GImGuiFreeTypeAllocatorUserData = user_data;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user