mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Compare commits
830 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
187d1473a2 | ||
|
|
db47ff6d83 | ||
|
|
f0f08e6b8c | ||
|
|
bcdd375241 | ||
|
|
ec0de7416d | ||
|
|
b7d12a3b5d | ||
|
|
49f67723e2 | ||
|
|
40d785bf0f | ||
|
|
37bd3f1ed6 | ||
|
|
082635c63f | ||
|
|
3d7c4206d1 | ||
|
|
8959c57708 | ||
|
|
eac3191766 | ||
|
|
473a550a03 | ||
|
|
0b803ae534 |
||
|
|
8f007810dc | ||
|
|
c1df50e370 | ||
|
|
8dd479eab0 | ||
|
|
3f2fcb350a | ||
|
|
43c39e03be | ||
|
|
7cc14a7a04 | ||
|
|
e4c9a87eef | ||
|
|
2c9db300ee | ||
|
|
64dbf811b3 | ||
|
|
78ba4aef4b | ||
|
|
c97770d6f4 | ||
|
|
ae24245ef6 | ||
|
|
1d2497b1b1 | ||
|
|
2e10385436 | ||
|
|
c9563cf5ed | ||
|
|
b4b2d9a36c | ||
|
|
24fb6d6065 | ||
|
|
76935aa7b2 | ||
|
|
948801b5a6 | ||
|
|
24114a9ddf | ||
|
|
81c1432816 | ||
|
|
eda51ead20 | ||
|
|
0201c82dc7 | ||
|
|
5943e8f889 | ||
|
|
fa56c3ba55 | ||
|
|
9a5ba4d7d7 | ||
|
|
43e8984b4c | ||
|
|
6776fac0e4 | ||
|
|
b204fbb617 | ||
|
|
2b0c1bef2e | ||
|
|
4418184107 | ||
|
|
aa16eef676 | ||
|
|
1c1be9e27e | ||
|
|
809b11db4b | ||
|
|
b83b18d720 | ||
|
|
18bd640b80 | ||
|
|
896b62f3c1 | ||
|
|
85d16bc730 | ||
|
|
9bc17f78f0 | ||
|
|
67a0b57bfa | ||
|
|
5f59896293 | ||
|
|
c1ff328019 | ||
|
|
e535431caf | ||
|
|
f65c10ad49 | ||
|
|
45bf76b7e2 | ||
|
|
c3c28365b9 | ||
|
|
3190c43eb4 | ||
|
|
87de6bfa1f | ||
|
|
feccc5649e | ||
|
|
8dd6716a9c | ||
|
|
480d73822c | ||
|
|
876aafca57 | ||
|
|
47143e0f1c | ||
|
|
4ed0c7336f | ||
|
|
a7bd1e19c4 | ||
|
|
eaf180ff48 | ||
|
|
f7a3e44e59 | ||
|
|
8ec76d59a7 | ||
|
|
b8fc7d03bb | ||
|
|
89ab760574 | ||
|
|
1bb8f0f1cf | ||
|
|
624dbdb243 | ||
|
|
fd6243c053 | ||
|
|
be6bca9465 | ||
|
|
29de7d6e01 | ||
|
|
3fed40edda | ||
|
|
117d8bbf75 | ||
|
|
caee75995c | ||
|
|
f2634f4d10 | ||
|
|
ea1ed2aba3 | ||
|
|
09cd3790c1 | ||
|
|
882800c88b | ||
|
|
699c605d19 | ||
|
|
d346429a1f | ||
|
|
88e0d9d47a | ||
|
|
fa716899e1 | ||
|
|
61673c1aa1 | ||
|
|
3e0bcbda9f | ||
|
|
9fbea677f6 | ||
|
|
3e2f2f76d4 | ||
|
|
ed21f6dead | ||
|
|
e5e32a8e58 | ||
|
|
07eea5f9d0 | ||
|
|
c731030d25 | ||
|
|
63057a3fac | ||
|
|
91fb4f59d2 | ||
|
|
190999dd92 | ||
|
|
afc98ed4a5 | ||
|
|
91cab20d38 | ||
|
|
ad1f683101 | ||
|
|
3625bc7a4d | ||
|
|
b2695c0d3d | ||
|
|
f8d7513354 | ||
|
|
e73b33791b | ||
|
|
5b42d8637c | ||
|
|
2ccb72ab65 | ||
|
|
727d583037 | ||
|
|
70f6884531 | ||
|
|
42d61877fc | ||
|
|
e9387a3c70 | ||
|
|
2b5adfb10e | ||
|
|
51b94c0954 | ||
|
|
37b44f0ed8 | ||
|
|
73cb90e63c | ||
|
|
415d587bb0 | ||
|
|
ef0c2b68f2 | ||
|
|
3d546bcb45 | ||
|
|
dcaeb045a6 | ||
|
|
4f11eb7c64 | ||
|
|
e3c3453a42 | ||
|
|
f094c70a4a | ||
|
|
4d241dc120 | ||
|
|
9fabdb6e99 | ||
|
|
37167887c9 | ||
|
|
0ab13eca08 | ||
|
|
952f12f631 | ||
|
|
3e3ecc9432 | ||
|
|
3f46a0408a | ||
|
|
387457bf6e | ||
|
|
a9f808e6bc |
||
|
|
3adf7b07d1 | ||
|
|
15e166ecde | ||
|
|
9436bd15c6 | ||
|
|
9cee7263d1 | ||
|
|
8490889e7b | ||
|
|
808d1ef88d | ||
|
|
0ac62190c3 | ||
|
|
7e7f48d70e | ||
|
|
031cf26473 | ||
|
|
f88f810a2e | ||
|
|
4d57ae4caa | ||
|
|
d801cf8cda | ||
|
|
cc4fffc980 | ||
|
|
aa50acce68 | ||
|
|
3619468fcc | ||
|
|
db7f80e80d | ||
|
|
c22653fb50 | ||
|
|
72d249537c | ||
|
|
8a2b8f5e88 | ||
|
|
bd50861ef6 | ||
|
|
e9c1c8fbd6 | ||
|
|
cd27187ac4 | ||
|
|
035e47a3d7 | ||
|
|
1ce1606fda | ||
|
|
c8be36cef6 | ||
|
|
d9a6bba4cf | ||
|
|
52c0d620cc | ||
|
|
939dc5926d | ||
|
|
470ac231a2 | ||
|
|
8943848d1d | ||
|
|
00d46d50af | ||
|
|
e22bb3df89 | ||
|
|
f746d25109 | ||
|
|
6baafba866 | ||
|
|
4a0bcd0fa1 | ||
|
|
906ce2a6e6 | ||
|
|
677adc3cde | ||
|
|
7ea476cace | ||
|
|
e4b509073c | ||
|
|
5787eea73d | ||
|
|
748d20e1be | ||
|
|
1898608413 | ||
|
|
628dce73bf | ||
|
|
13a1173092 | ||
|
|
ece4fe1dd2 | ||
|
|
3a33650a89 | ||
|
|
2626a317f0 | ||
|
|
9a8e9f827e | ||
|
|
451c7afdf1 | ||
|
|
e31aab2f5e | ||
|
|
14aa2b6a7b | ||
|
|
6e56938dc1 | ||
|
|
3461456384 | ||
|
|
ba4d6b029a | ||
|
|
211973f489 | ||
|
|
ab816613d1 | ||
|
|
3845a75d3b | ||
|
|
90ad99a69f | ||
|
|
011028db4d | ||
|
|
a712e16765 | ||
|
|
f57d2e9cad | ||
|
|
45caf2da51 | ||
|
|
fd15280abd | ||
|
|
4f4a743d04 | ||
|
|
ed59afc8ba | ||
|
|
9c148b2223 | ||
|
|
ee18b23087 | ||
|
|
c7f8c9e5fb | ||
|
|
cbec6de865 | ||
|
|
b9a2874217 | ||
|
|
b1a1c07e95 | ||
|
|
9d29d5d10f | ||
|
|
014ac5a0a6 | ||
|
|
451517832e | ||
|
|
d35debe202 | ||
|
|
72cf1165e7 | ||
|
|
a10c06cec8 | ||
|
|
740d699f61 | ||
|
|
6eb3e31fec | ||
|
|
e6c959cbc5 | ||
|
|
0690552c92 | ||
|
|
56e640281c | ||
|
|
112631e160 | ||
|
|
6c7f86cd4d | ||
|
|
c8153f8d9f | ||
|
|
20c484a2cb | ||
|
|
ec3e2c130c | ||
|
|
7f56a8b1a9 | ||
|
|
d7d098956c | ||
|
|
dc1f91e6b3 | ||
|
|
99b76b3668 | ||
|
|
536fd18063 | ||
|
|
b306e9e36d | ||
|
|
d40d810712 | ||
|
|
4a9d2b841d | ||
|
|
069d583849 | ||
|
|
6755986dbe | ||
|
|
6f82d9ab2c | ||
|
|
067b4b1e2d | ||
|
|
27793f67d0 | ||
|
|
a461879e5b | ||
|
|
cc87ab6421 | ||
|
|
9f36d76df9 | ||
|
|
02383cc688 | ||
|
|
a0c6cbc964 | ||
|
|
b3a7e2b219 | ||
|
|
8cc5e80bd0 | ||
|
|
95ec7c4af1 | ||
|
|
f5702e6dbb | ||
|
|
9e048ac7e0 | ||
|
|
9dd31c2e92 | ||
|
|
0cdb3ca9d1 | ||
|
|
fbfbce839c | ||
|
|
445461bec1 | ||
|
|
3b63b5aa67 | ||
|
|
f02511c0b3 | ||
|
|
150af300ad | ||
|
|
128ff3f087 | ||
|
|
7bc216b8b1 | ||
|
|
0ab5113eca | ||
|
|
3006bed3ee | ||
|
|
71418abb86 | ||
|
|
b153f457af | ||
|
|
2afd36d602 | ||
|
|
d2a8eb26a0 | ||
|
|
9fd1e71a04 | ||
|
|
7ad816ff17 | ||
|
|
c45365d1bc | ||
|
|
d93942deab | ||
|
|
4474269032 | ||
|
|
413e1e8398 | ||
|
|
bba22702ab | ||
|
|
2301bc2081 | ||
|
|
1ee9f00fcc | ||
|
|
69bdf3c02f | ||
|
|
dfe6006ec8 | ||
|
|
7d895fb6aa | ||
|
|
515060f869 | ||
|
|
314edd30ef | ||
|
|
82e0f019a0 | ||
|
|
b6b1b81a5c | ||
|
|
25e13b3983 | ||
|
|
1ef959fa97 | ||
|
|
52fc67529f | ||
|
|
3699a78c45 | ||
|
|
49c9f167ac | ||
|
|
280cdc3888 | ||
|
|
f4189f2139 | ||
|
|
4149c05afc | ||
|
|
6da6ca3988 | ||
|
|
255fc9a8df | ||
|
|
29c68b758a | ||
|
|
58e1181977 | ||
|
|
edc41b641c | ||
|
|
c9ef3e431a | ||
|
|
07820a8afa | ||
|
|
ca4ccfdab5 | ||
|
|
7640357bca | ||
|
|
4c51c72d89 | ||
|
|
20cfa4e47f | ||
|
|
3a6be9bd44 | ||
|
|
7a02fcb1e9 | ||
|
|
5a42260fbd | ||
|
|
d4401c2923 | ||
|
|
e7420de849 | ||
|
|
40248df74c | ||
|
|
1e6d500c1e | ||
|
|
dfb20dc45f | ||
|
|
edf588ff5a | ||
|
|
5828d0beb6 | ||
|
|
627c926a29 | ||
|
|
e467765695 | ||
|
|
4ecba56cd5 | ||
|
|
890bd24569 | ||
|
|
f9842b44ff |
||
|
|
ca77fea987 | ||
|
|
b4bc7c2a03 | ||
|
|
0c882703d3 | ||
|
|
759ccd600b | ||
|
|
dd87909edf | ||
|
|
e3fb00b1e9 | ||
|
|
262e4b383e | ||
|
|
6f76129d06 | ||
|
|
638fa8a748 | ||
|
|
68107f6e08 | ||
|
|
bd6c8c30a3 | ||
|
|
52b5319f71 | ||
|
|
8a0c36d921 | ||
|
|
ecef381065 | ||
|
|
841e0a616f | ||
|
|
28125592ab | ||
|
|
089ab3cdb6 | ||
|
|
462a88c449 | ||
|
|
75f3da0160 | ||
|
|
83a7cb49c5 | ||
|
|
73e91c9bc7 | ||
|
|
5f8ddd0e6c | ||
|
|
fbf2075bf8 | ||
|
|
886d9ae8e0 | ||
|
|
a463109055 | ||
|
|
3df8697e4f | ||
|
|
9481c6e5f5 | ||
|
|
7aff6814fc | ||
|
|
4a6642f164 | ||
|
|
5255e44dc6 | ||
|
|
6f37a3006e | ||
|
|
584ee60dab | ||
|
|
22fb1a9332 | ||
|
|
3e81971ad3 | ||
|
|
192cb25519 | ||
|
|
3e89b9cb95 | ||
|
|
c536bfbd59 | ||
|
|
c7d4b68c39 | ||
|
|
cd1bbb9865 | ||
|
|
a44c245a54 | ||
|
|
2af1f8ee5d | ||
|
|
813564caf0 | ||
|
|
7b12fa4829 | ||
|
|
44259358c6 | ||
|
|
c4e8b2c348 | ||
|
|
b8f358ace5 | ||
|
|
de5434328a | ||
|
|
0190785784 | ||
|
|
94d94be158 | ||
|
|
263cea7c05 | ||
|
|
dea421f002 | ||
|
|
f4bda829bc | ||
|
|
edd44b0e23 | ||
|
|
330d51c101 | ||
|
|
f3ed1d8fc5 | ||
|
|
16df1c7991 | ||
|
|
5a05f2cd99 | ||
|
|
99ded957ee | ||
|
|
2574f7a3c5 | ||
|
|
ca05ac409d | ||
|
|
0546c64d13 | ||
|
|
276b9f8efa | ||
|
|
0272038b9f | ||
|
|
95936be701 | ||
|
|
70213c0093 | ||
|
|
9a08ba81a9 | ||
|
|
66a86a84e5 | ||
|
|
f60bf09df0 | ||
|
|
88342a221c | ||
|
|
0e02e9303c | ||
|
|
96553479d5 | ||
|
|
6e9c699241 | ||
|
|
b2c0cb52fb | ||
|
|
b965125939 | ||
|
|
a7742c4244 | ||
|
|
abc0420937 | ||
|
|
3d62f8d231 | ||
|
|
fdf48e393c | ||
|
|
204b057cc7 | ||
|
|
e14821b38a | ||
|
|
b8913f1255 | ||
|
|
5b4ddcc205 | ||
|
|
aedb718da4 | ||
|
|
79078c40cb | ||
|
|
c8f17e36ad | ||
|
|
bf406ee4cb | ||
|
|
c9992a5121 | ||
|
|
f7cd88e6c1 | ||
|
|
cb8966982d | ||
|
|
f9a283d679 | ||
|
|
1f23c8b262 | ||
|
|
1653e8f21e | ||
|
|
cc107d22e3 | ||
|
|
84d34b7fd2 | ||
|
|
aef3ff3313 | ||
|
|
4645960a6d | ||
|
|
12c6d6c2d6 | ||
|
|
31d80d21bd | ||
|
|
0590197436 | ||
|
|
b253677450 | ||
|
|
5da5e933f7 | ||
|
|
095fb36268 | ||
|
|
9b62526af6 | ||
|
|
9a86b1ce8d | ||
|
|
26d8defe26 | ||
|
|
c5de90352a | ||
|
|
156d29cf21 | ||
|
|
dcebbd4c56 | ||
|
|
bd0f5c6977 | ||
|
|
a98bd40888 | ||
|
|
f1b449635a | ||
|
|
077c302f63 | ||
|
|
f40c015742 | ||
|
|
8981951a4c | ||
|
|
eef27754c1 | ||
|
|
82e221789e | ||
|
|
e533e99c7e | ||
|
|
91242096be | ||
|
|
7ecec58a13 | ||
|
|
03d9f4f164 | ||
|
|
9a21789d6b | ||
|
|
9773366d80 | ||
|
|
fc7f57ff44 | ||
|
|
4842b42062 | ||
|
|
c2ecdd7f94 | ||
|
|
0a0f5f2db4 | ||
|
|
fe8ea81cfb | ||
|
|
6488d977db | ||
|
|
4079e78672 | ||
|
|
42b75f6ba9 | ||
|
|
8c74d9663c | ||
|
|
032f04c608 | ||
|
|
7603933357 | ||
|
|
a1e12af803 | ||
|
|
e283775b4b | ||
|
|
e7946aa7e2 | ||
|
|
2775d4a540 | ||
|
|
1de81d1a84 | ||
|
|
a8cac649ba | ||
|
|
48ac4f71b1 | ||
|
|
7f090a336d | ||
|
|
ec9ed11434 | ||
|
|
e4a6afac75 | ||
|
|
4f156be5f5 | ||
|
|
bf76809072 | ||
|
|
d62a137163 | ||
|
|
7cbd68596f | ||
|
|
601d4a0360 | ||
|
|
32223720b3 | ||
|
|
c61ad5d17c | ||
|
|
c7bc5e6392 | ||
|
|
4e2506d9f2 | ||
|
|
5f6d47f553 | ||
|
|
b31288a41c | ||
|
|
3e6578f18e | ||
|
|
39e5f39db5 | ||
|
|
73e31f077f | ||
|
|
e7e8c8e8b9 | ||
|
|
2ee0f3ed3f | ||
|
|
9da33c5584 | ||
|
|
800c23efc9 | ||
|
|
8f0784e66b | ||
|
|
b17e1e48db | ||
|
|
1e6eea881c | ||
|
|
08ba5ea10f | ||
|
|
5f09025088 | ||
|
|
15e259ba8e | ||
|
|
818c3b265e | ||
|
|
6ce6e68f24 | ||
|
|
aa8a3a3a14 | ||
|
|
b220a50e90 | ||
|
|
09f4c297df | ||
|
|
35ce4cd34b | ||
|
|
bbe1f5bf1a | ||
|
|
6ac1a6a7b4 | ||
|
|
bf042bc801 | ||
|
|
1e6f11e3e7 | ||
|
|
5c1e40c192 | ||
|
|
4b8c0e59bc | ||
|
|
12dd546b6b | ||
|
|
1c8b8fe621 | ||
|
|
5d0fa8a131 | ||
|
|
0a7500ff39 | ||
|
|
51ab93793b | ||
|
|
e8144cb246 | ||
|
|
f0dcb021b7 | ||
|
|
e8c11b02ba | ||
|
|
ad729a82d8 | ||
|
|
0536d0d06a | ||
|
|
7b566eb9ec | ||
|
|
1bfdd8cdd4 | ||
|
|
76de6aaf39 | ||
|
|
48d6a1a523 | ||
|
|
fad1987fe5 | ||
|
|
e3021f1c6b | ||
|
|
66bf11065d | ||
|
|
fd8f5f992a | ||
|
|
632033894f | ||
|
|
d6e525eb9a | ||
|
|
ec364da854 | ||
|
|
a20182fff3 | ||
|
|
bf4bad95e3 | ||
|
|
018d03a567 | ||
|
|
10c57d25a8 | ||
|
|
fe4d1e8d96 | ||
|
|
c881784433 | ||
|
|
55ed9ca3f6 | ||
|
|
747365517f | ||
|
|
845106bd1a | ||
|
|
e432281c1a | ||
|
|
fb8726ac63 | ||
|
|
ba535a8ef1 | ||
|
|
78966ff478 | ||
|
|
90ba808094 | ||
|
|
b8ad32cc99 | ||
|
|
fbee0afef7 | ||
|
|
b68c76cca9 | ||
|
|
36e704d3ab | ||
|
|
f57be5f9b0 | ||
|
|
b9d422290e | ||
|
|
38df7d82ff | ||
|
|
b4471e8faa | ||
|
|
6563415480 | ||
|
|
b2834e9ce4 | ||
|
|
dd0355fa32 | ||
|
|
111d56ae05 | ||
|
|
d9c871bfce | ||
|
|
d877eee7ba | ||
|
|
43b758e0d6 | ||
|
|
9b7a9bd6c1 | ||
|
|
81602d4397 | ||
|
|
73fa8d8222 | ||
|
|
48f2e4345e | ||
|
|
abdb9287df | ||
|
|
c4d664491a | ||
|
|
8093eeb80e | ||
|
|
c9a52a055c | ||
|
|
0a2887a432 | ||
|
|
4ced4d39af | ||
|
|
8c818e011d | ||
|
|
1b49f5f908 | ||
|
|
2a58e889f5 | ||
|
|
10273b2846 | ||
|
|
e51b372dcd | ||
|
|
db067eb4c2 | ||
|
|
082d70068f | ||
|
|
59ded13694 | ||
|
|
6ef8186da4 | ||
|
|
7a836aae8f | ||
|
|
fb6c4a1885 | ||
|
|
c61442c5d2 | ||
|
|
b2ede1eead | ||
|
|
926d30e419 | ||
|
|
6414fcb117 | ||
|
|
a73d367232 | ||
|
|
09e8e8864e | ||
|
|
bc533a396e | ||
|
|
97f52a1811 | ||
|
|
482f1afcf4 | ||
|
|
a5a63ddd23 | ||
|
|
950623ee14 | ||
|
|
6f1089dc44 | ||
|
|
af48eb9d23 | ||
|
|
7bce92da3d | ||
|
|
97e51c6310 | ||
|
|
43cc2f4a7e | ||
|
|
16458d7759 | ||
|
|
23c3a1954d | ||
|
|
d3ec32c29a | ||
|
|
5c3d354b26 | ||
|
|
ce59083c33 | ||
|
|
ae0e59a086 | ||
|
|
cc6d9cba90 | ||
|
|
b308422c3d | ||
|
|
04631774e6 | ||
|
|
9923850740 | ||
|
|
c34c65071e | ||
|
|
a967433325 | ||
|
|
06e3ba0a51 | ||
|
|
8b7f395d12 | ||
|
|
1ff352cddc | ||
|
|
48b5b3be1e | ||
|
|
50daef684a | ||
|
|
a10531d22b | ||
|
|
b7dac1002b | ||
|
|
ab6c5c9316 | ||
|
|
921642f87e | ||
|
|
f50aa634d5 | ||
|
|
e56ad29b25 | ||
|
|
e2ccf2050a | ||
|
|
2af29ac19f | ||
|
|
084bd85028 | ||
|
|
41ea61700e | ||
|
|
738927696a | ||
|
|
8908718f4a | ||
|
|
9404bdadfa | ||
|
|
c2c5bf8f9e | ||
|
|
b6fc98502b | ||
|
|
3fab2dd143 | ||
|
|
a54b75b645 | ||
|
|
9ac0c294d5 | ||
|
|
e883d012ec | ||
|
|
21c272791e | ||
|
|
5788897cf8 | ||
|
|
bcf551cf8c | ||
|
|
3fafe5b1b8 | ||
|
|
30034a9f2f | ||
|
|
75e4adfe4b | ||
|
|
e842f45848 | ||
|
|
cf93e68e7d | ||
|
|
e455cbcd8b | ||
|
|
ae9e34966b | ||
|
|
fd263edcbc | ||
|
|
92925e7a91 | ||
|
|
24d68afdb0 | ||
|
|
abdd776d09 | ||
|
|
375f06d6e5 | ||
|
|
6a34f7a7c1 | ||
|
|
db7b0943b5 | ||
|
|
5cae5f0095 | ||
|
|
8f786a3014 | ||
|
|
3863add31f | ||
|
|
a243cdb9ea | ||
|
|
4b5159b623 | ||
|
|
44cda40bca | ||
|
|
e35531fa70 | ||
|
|
279b61f319 | ||
|
|
4282f79438 | ||
|
|
05dce82be8 | ||
|
|
f0f8b4db52 | ||
|
|
66e6fe0c52 | ||
|
|
27170363eb | ||
|
|
08eac5ed3e | ||
|
|
bc7922e316 | ||
|
|
7ede5ef61a | ||
|
|
9a561b817a | ||
|
|
179e1a772d | ||
|
|
a2500df30c | ||
|
|
260e32a463 | ||
|
|
ff5dfd9c6e | ||
|
|
c698c9e8af | ||
|
|
96fcdc230c | ||
|
|
a2275e6f4e | ||
|
|
82e5c684c3 | ||
|
|
df6468de31 | ||
|
|
67d3976033 | ||
|
|
d3e8389906 | ||
|
|
445c2dcb63 | ||
|
|
943aa711a4 | ||
|
|
3b5ae2cb6e | ||
|
|
cd5f1e6eae | ||
|
|
31106e17b7 | ||
|
|
32d4f4ed89 | ||
|
|
0f42887fb0 | ||
|
|
8a1ecf8977 | ||
|
|
f6d38274f2 | ||
|
|
3f0782ca13 | ||
|
|
12b307ffda | ||
|
|
56ac6a262b | ||
|
|
11b7f9da8c | ||
|
|
4aee194e60 | ||
|
|
f96767c13d | ||
|
|
5436c7c574 | ||
|
|
d6a15d3d97 | ||
|
|
71bcaef302 | ||
|
|
165939d321 | ||
|
|
fd9fcea432 | ||
|
|
65d0771280 | ||
|
|
1b3e7a3a24 | ||
|
|
f5c9990b41 | ||
|
|
1be8fa91ee | ||
|
|
d574b5f645 | ||
|
|
03a57f9d94 | ||
|
|
4d84797068 | ||
|
|
f2093a2f2e | ||
|
|
d7f8c6b591 | ||
|
|
00d9dd1276 | ||
|
|
e9244cb69d | ||
|
|
37d1545caf | ||
|
|
e9b034e6f9 | ||
|
|
b06a88af11 | ||
|
|
58352c086e | ||
|
|
c1be2667ae | ||
|
|
8d856435e2 | ||
|
|
d44cf5fe6f | ||
|
|
290927c678 | ||
|
|
3ecc9093bf | ||
|
|
0032175085 | ||
|
|
c379b11318 | ||
|
|
ed95fded50 | ||
|
|
a60f725102 | ||
|
|
2ecbdcd461 | ||
|
|
4514a60d05 | ||
|
|
4a869bd9c6 | ||
|
|
c9d90d1886 | ||
|
|
b38dc095a7 | ||
|
|
e0ce4968bb | ||
|
|
27e787b5f5 | ||
|
|
7a7b14efcd | ||
|
|
3706ea6270 | ||
|
|
388f138d39 | ||
|
|
21ce5665a3 | ||
|
|
fed9e1c15f | ||
|
|
0a5c9328a0 | ||
|
|
b323b32a2b | ||
|
|
e3664c5749 | ||
|
|
30e00f53f8 | ||
|
|
66130edd29 | ||
|
|
d8570ffdc9 | ||
|
|
68377921cb | ||
|
|
5713aca956 | ||
|
|
9e003612d1 | ||
|
|
5285b736d1 | ||
|
|
99c7620893 | ||
|
|
7cea2fedab | ||
|
|
0750dc3264 | ||
|
|
28507aedda | ||
|
|
455d1ba7ed | ||
|
|
febf51a6d6 | ||
|
|
fafe1f2c68 | ||
|
|
42dfbf5448 | ||
|
|
8245d4acda | ||
|
|
8c74dcac10 | ||
|
|
5f6ca4483f | ||
|
|
dbdb689e61 | ||
|
|
a1855fc64a | ||
|
|
5021ef9c93 | ||
|
|
1adf973bd5 | ||
|
|
91d0e7cb0b | ||
|
|
eecd70c65d | ||
|
|
49a823e14b | ||
|
|
798d8462cd | ||
|
|
5919c7166e | ||
|
|
86798ee994 | ||
|
|
7b71f4987b | ||
|
|
4aeca13849 | ||
|
|
50ba015731 | ||
|
|
7413aaf165 | ||
|
|
ac22480c70 | ||
|
|
b254347e0b | ||
|
|
21712753bc | ||
|
|
c16b13da6b | ||
|
|
726b2d2fc4 | ||
|
|
52fce9fba7 | ||
|
|
3c12d81209 | ||
|
|
66fd3a4cd4 | ||
|
|
6215d2fa93 | ||
|
|
961efff810 | ||
|
|
33d8e86db3 | ||
|
|
1c46399683 | ||
|
|
da09d79d01 | ||
|
|
a89cc3f4ca | ||
|
|
31485c58b9 | ||
|
|
035cbb3de6 | ||
|
|
8eeb289dbf | ||
|
|
ea1d13dd3a | ||
|
|
6729ec2110 | ||
|
|
b31ec41399 | ||
|
|
374ecc52a2 | ||
|
|
3ac33017e4 | ||
|
|
abd7777534 | ||
|
|
e53426d0a4 | ||
|
|
bde8179846 | ||
|
|
4a9b928ba8 | ||
|
|
8fbc6674c3 | ||
|
|
a3987d19f4 | ||
|
|
ae331340e7 | ||
|
|
4aa3cb8ac9 | ||
|
|
62bc2c83d2 | ||
|
|
98a22aa105 | ||
|
|
2cad7cd392 | ||
|
|
fbdf8e6938 | ||
|
|
859c7b066d | ||
|
|
006094bb5c | ||
|
|
04939dd462 | ||
|
|
e94ffc6a4e | ||
|
|
c34b4dfcf2 | ||
|
|
a5264b7359 | ||
|
|
8108426140 | ||
|
|
f8a38d9c97 | ||
|
|
1e13f7eacc | ||
|
|
b17255bc35 | ||
|
|
fb2c5af2d1 | ||
|
|
5dfb093472 | ||
|
|
b1838ee2db | ||
|
|
6e6fad1cc9 | ||
|
|
de3a635623 | ||
|
|
6cae0e6390 | ||
|
|
cd3a69c655 | ||
|
|
d5023b37eb | ||
|
|
246c9081ee | ||
|
|
69bede7aae | ||
|
|
3a3e8b02ed | ||
|
|
b4e4df8810 | ||
|
|
533ecbdfae | ||
|
|
cf87f52512 | ||
|
|
cdebe99bb6 | ||
|
|
5b87675ab1 | ||
|
|
838729b99e | ||
|
|
5725538ee8 | ||
|
|
5983b651b6 | ||
|
|
b3248c39db | ||
|
|
70c96226be | ||
|
|
96b0f50302 | ||
|
|
f9fbdedb82 | ||
|
|
ebd3e94414 | ||
|
|
e78fe3df19 | ||
|
|
14417cce28 | ||
|
|
45d5de80ca | ||
|
|
722a421416 | ||
|
|
f49e7ec13e | ||
|
|
91e1263ece | ||
|
|
08f2c26f86 | ||
|
|
28ed87663c | ||
|
|
d3d4ddf1ec | ||
|
|
8475db364d | ||
|
|
24c42aabea | ||
|
|
c3252c7884 | ||
|
|
3a14e07f6f | ||
|
|
9aff9d9346 |
727 changed files with 70801 additions and 134923 deletions
7
.github/ISSUE_TEMPLATE/config.yml
vendored
7
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,9 +1,6 @@
|
|||
blank_issues_enabled: false
|
||||
blank_issues_enabled: true
|
||||
|
||||
contact_links:
|
||||
- name: Feature request
|
||||
url: https://github.com/doublecmd/doublecmd/discussions/categories/suggestions
|
||||
about: Please use GitHub Discussions to suggest a new feature or improvement
|
||||
- name: I have a question about Double Commander
|
||||
url: https://github.com/doublecmd/doublecmd/discussions/categories/general
|
||||
url: https://github.com/doublecmd/doublecmd/discussions
|
||||
about: Please use GitHub Discussions to ask questions
|
||||
|
|
|
|||
22
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
22
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: "Feature request"
|
||||
labels: [enhancement]
|
||||
description: Suggest a new feature or improvement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before filling a new feature request, please use the [search form](https://doublecmd.sourceforge.io/mantisbt/view_all_bug_page.php) to try to locate similar features at the old bug tracker.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
placeholder:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Proposed technical implementation details (optional)
|
||||
placeholder:
|
||||
validations:
|
||||
required: false
|
||||
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
13
.github/scripts/create_snapshot.bat
vendored
13
.github/scripts/create_snapshot.bat
vendored
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
rem Set Double Commander version
|
||||
set DC_VER=1.1.0
|
||||
|
||||
rem The new package will be created from here
|
||||
set BUILD_PACK_DIR=%TEMP%\doublecmd-release
|
||||
|
||||
|
|
@ -12,20 +15,12 @@ rem Get revision number
|
|||
call src\platform\git2revisioninc.exe.cmd %CD%
|
||||
echo %REVISION%> %PACK_DIR%\revision.txt
|
||||
|
||||
rem Read version number
|
||||
for /f tokens^=2delims^=^" %%a in ('findstr "MajorVersionNr" src\doublecmd.lpi') do (set DC_MAJOR=%%a)
|
||||
for /f tokens^=2delims^=^" %%a in ('findstr "MinorVersionNr" src\doublecmd.lpi') do (set DC_MINOR=%%a)
|
||||
for /f tokens^=2delims^=^" %%a in ('findstr "RevisionNr" src\doublecmd.lpi') do (set DC_MICRO=%%a)
|
||||
if [%DC_MINOR%] == [] set DC_MINOR=0
|
||||
if [%DC_MICRO%] == [] set DC_MICRO=0
|
||||
set DC_VER=%DC_MAJOR%.%DC_MINOR%.%DC_MICRO%
|
||||
|
||||
rem Change log
|
||||
git log -n 10 --format="%%h %%al %%ai%%n%%s%%n" > %PACK_DIR%\changelog.txt
|
||||
|
||||
rem Get libraries
|
||||
pushd install
|
||||
curl -o windows.7z -L https://github.com/doublecmd/external/raw/main/windows.7z
|
||||
curl -o windows.7z -L https://github.com/doublecmd/snapshots/raw/main/windows.7z
|
||||
"%ProgramFiles%\7-Zip\7z.exe" x windows.7z
|
||||
del /Q windows.7z
|
||||
popd
|
||||
|
|
|
|||
55
.github/scripts/create_snapshot.lnx
vendored
55
.github/scripts/create_snapshot.lnx
vendored
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# The new package will be saved here
|
||||
PACK_DIR=$PWD/doublecmd-release
|
||||
|
||||
# Temp dir for creating *.tar.xz package
|
||||
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
|
||||
|
||||
# Save revision number
|
||||
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
|
||||
|
||||
# Read version number
|
||||
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
|
||||
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
||||
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
||||
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
|
||||
|
||||
# Get libraries
|
||||
pushd install
|
||||
wget https://github.com/doublecmd/external/raw/main/linux.tar.gz
|
||||
tar xzf linux.tar.gz
|
||||
rm -f linux.tar.gz
|
||||
popd
|
||||
|
||||
# Set widgetset
|
||||
export lcl=gtk3
|
||||
|
||||
# Set processor architecture
|
||||
export CPU_TARGET=$(fpc -iTP)
|
||||
|
||||
build_doublecmd()
|
||||
{
|
||||
# Build all components of Double Commander
|
||||
./build.sh release
|
||||
|
||||
# Copy libraries
|
||||
cp -a install/linux/lib/$CPU_TARGET/*.so ./
|
||||
|
||||
# Create *.tar.xz package
|
||||
mkdir -p $BUILD_PACK_DIR
|
||||
install/linux/install.sh --portable-prefix=$BUILD_PACK_DIR
|
||||
pushd $BUILD_PACK_DIR
|
||||
# Set run-time library search path
|
||||
patchelf --set-rpath '$ORIGIN' doublecmd/doublecmd
|
||||
tar -cJf $PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.tar.xz doublecmd
|
||||
popd
|
||||
|
||||
# Clean DC build dir
|
||||
./clean.sh
|
||||
rm -rf $BUILD_PACK_DIR
|
||||
}
|
||||
|
||||
mkdir -p $PACK_DIR
|
||||
|
||||
build_doublecmd
|
||||
51
.github/scripts/create_snapshot.sh
vendored
51
.github/scripts/create_snapshot.sh
vendored
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set Double Commander version
|
||||
DC_VER=1.1.0
|
||||
|
||||
# The new package will be saved here
|
||||
PACK_DIR=$PWD/doublecmd-release
|
||||
|
||||
|
|
@ -9,19 +12,6 @@ BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
|
|||
# Save revision number
|
||||
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
|
||||
|
||||
# Read version number
|
||||
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
|
||||
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
||||
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
|
||||
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
|
||||
|
||||
# Get libraries
|
||||
pushd install
|
||||
wget https://github.com/doublecmd/external/raw/main/darwin.tar.gz
|
||||
tar xzf darwin.tar.gz
|
||||
rm -f darwin.tar.gz
|
||||
popd
|
||||
|
||||
# Set widgetset
|
||||
export lcl=cocoa
|
||||
|
||||
|
|
@ -36,10 +26,7 @@ build_doublecmd()
|
|||
# Build all components of Double Commander
|
||||
./build.sh release
|
||||
|
||||
# Copy libraries
|
||||
cp -a install/darwin/lib/$CPU_TARGET/*.dylib ./
|
||||
|
||||
# Prepare *.dmg package
|
||||
# Create *.dmg package
|
||||
mkdir -p $BUILD_PACK_DIR
|
||||
install/darwin/install.sh $BUILD_PACK_DIR
|
||||
pushd $BUILD_PACK_DIR
|
||||
|
|
@ -47,21 +34,7 @@ build_doublecmd()
|
|||
codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
|
||||
popd
|
||||
|
||||
# Create *.dmg package
|
||||
HDI_TRY=0
|
||||
HDI_MAX=5
|
||||
|
||||
while true; do
|
||||
|
||||
HDI_TRY=$((HDI_TRY+1))
|
||||
|
||||
echo "Try to create a package $HDI_TRY ..."
|
||||
|
||||
# Bug: https://github.com/actions/runner-images/issues/7522
|
||||
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
|
||||
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
|
||||
|
||||
sudo install/darwin/create-dmg/create-dmg \
|
||||
install/darwin/create-dmg/create-dmg \
|
||||
--volname "Double Commander" \
|
||||
--volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
|
||||
--background "$BUILD_PACK_DIR/.background/bg.jpg" \
|
||||
|
|
@ -76,18 +49,6 @@ build_doublecmd()
|
|||
"$PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.dmg" \
|
||||
"$BUILD_PACK_DIR/"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $HDI_TRY -eq $HDI_MAX ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
# Clean DC build dir
|
||||
./clean.sh
|
||||
rm -rf $BUILD_PACK_DIR
|
||||
|
|
@ -107,6 +68,6 @@ build_doublecmd
|
|||
# Set processor architecture
|
||||
export CPU_TARGET=x86_64
|
||||
# Set minimal Mac OS X target version
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.11
|
||||
|
||||
build_doublecmd
|
||||
|
|
|
|||
4
.github/scripts/upload_snapshot.sh
vendored
4
.github/scripts/upload_snapshot.sh
vendored
|
|
@ -11,7 +11,7 @@ if [[ "$OSTYPE" == "msys" ]]; then
|
|||
|
||||
icacls.exe ssh_key //inheritance:r
|
||||
|
||||
echo "-rm *.7z" >> upload_snapshot.txt
|
||||
echo "rm *.7z" >> upload_snapshot.txt
|
||||
echo "put *.7z" >> upload_snapshot.txt
|
||||
echo "put *.txt" >> upload_snapshot.txt
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ else
|
|||
|
||||
chmod 0600 ssh_key
|
||||
|
||||
echo "-rm *.dmg" >> upload_snapshot.txt
|
||||
echo "rm *.dmg" >> upload_snapshot.txt
|
||||
echo "put *.dmg" >> upload_snapshot.txt
|
||||
echo "put *.php" >> upload_snapshot.txt
|
||||
|
||||
|
|
|
|||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
lazarus-version: "stable"
|
||||
|
||||
- name: Get Lazarus source
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'fpc/Lazarus'
|
||||
ref: 'fixes_4'
|
||||
|
|
@ -36,12 +36,12 @@ jobs:
|
|||
sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download unrar source code
|
||||
run: wget https://www.rarlab.com/rar/unrarsrc-7.2.3.tar.gz -O /tmp/unrarsrc.tar.gz
|
||||
run: wget https://www.rarlab.com/rar/unrarsrc-7.0.9.tar.gz -O /tmp/unrarsrc.tar.gz
|
||||
|
||||
- name: Extract unrar source code
|
||||
run: cd /tmp && tar xzf unrarsrc.tar.gz
|
||||
|
|
|
|||
132
.github/workflows/snapshots.yml
vendored
132
.github/workflows/snapshots.yml
vendored
|
|
@ -1,15 +1,10 @@
|
|||
name: build-snapshot
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'components/**'
|
||||
- 'plugins/**'
|
||||
- 'sdk/**'
|
||||
- 'src/**'
|
||||
release:
|
||||
types: [unpublished]
|
||||
branches:
|
||||
- master
|
||||
- v1.1.x
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
|
|
@ -17,139 +12,62 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build-mac:
|
||||
runs-on: macos-14
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- name: Install Free Pascal
|
||||
uses: doublecmd/lazarus-install@mac
|
||||
uses: alexx2000/setup-fpc@master
|
||||
with:
|
||||
lazarus-version: "stable"
|
||||
|
||||
- name: Get Lazarus source
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'fpc/Lazarus'
|
||||
|
||||
- name: Build and install Lazarus
|
||||
run: |
|
||||
make all
|
||||
sudo make install
|
||||
run: make all install
|
||||
|
||||
- name: Create Lazarus config
|
||||
run: |
|
||||
mkdir -p $HOME/.lazarus
|
||||
cp tools/install/macosx/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
|
||||
sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
|
||||
sudo mkdir -p /etc/lazarus
|
||||
sudo cp tools/install/macosx/environmentoptions.xml /etc/lazarus/environmentoptions.xml
|
||||
sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare source
|
||||
run: sed -i -e "s|BOX_CLIENT_SECRET = '\*'|BOX_CLIENT_SECRET = '$BOX_CLIENT_SECRET'|g" plugins/wfx/MacCloud/src/drivers/oauth2/box/uboxclient.pas
|
||||
env:
|
||||
BOX_CLIENT_SECRET: ${{ secrets.BOX_CLIENT_SECRET }}
|
||||
|
||||
- name: Build packages
|
||||
run: ./.github/scripts/create_snapshot.sh
|
||||
|
||||
- name: Share data between jobs
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: snapshot-mac
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
path: doublecmd-release/doublecmd*.dmg
|
||||
- name: Deploy to snapshot server
|
||||
run: ./.github/scripts/upload_snapshot.sh
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
|
||||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
|
||||
REMOTE_USER: ${{ secrets.REMOTE_USER }}
|
||||
|
||||
build-win:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Install Lazarus
|
||||
uses: doublecmd/lazarus-install@win
|
||||
uses: alexx2000/setup-fpc@win
|
||||
with:
|
||||
lazarus-version: "stable"
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore timestamps
|
||||
uses: chetan/git-restore-mtime-action@v2
|
||||
|
||||
- name: Build packages
|
||||
run: ./.github/scripts/create_snapshot.bat
|
||||
|
||||
- name: Share data between jobs
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: snapshot-win
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
path: doublecmd-release/*
|
||||
|
||||
build-lin:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install fpc patchelf libgtk-3-dev libdbus-1-dev
|
||||
|
||||
- name: Get Lazarus source
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: 'fpc/Lazarus'
|
||||
|
||||
- name: Build and install Lazarus
|
||||
run: |
|
||||
make all
|
||||
sudo make install
|
||||
|
||||
- name: Create Lazarus config
|
||||
run: |
|
||||
mkdir -p $HOME/.lazarus
|
||||
cp tools/install/linux/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
|
||||
sed -i -e "s|__LAZARUSDIR__|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build packages
|
||||
run: ./.github/scripts/create_snapshot.lnx
|
||||
|
||||
- name: Share data between jobs
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: snapshot-lin
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
path: doublecmd-release/doublecmd*.tar.xz
|
||||
|
||||
upload:
|
||||
needs: [build-win, build-mac, build-lin]
|
||||
runs-on: ubuntu-latest
|
||||
environment: snapshots
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
merge-multiple: true
|
||||
|
||||
- name: Save revision number
|
||||
run: echo "REVISION=$(cat revision.txt)" >> "$GITHUB_ENV"
|
||||
- name: Deploy to snapshot server
|
||||
run: ./.github/scripts/upload_snapshot.sh
|
||||
shell: bash
|
||||
|
||||
- name: Upload binaries to snapshots
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_name: doublecmd/snapshots
|
||||
repo_token: ${{ secrets.SNAPSHOTS }}
|
||||
file: ./*
|
||||
release_name: Revision ${{ env.REVISION }}
|
||||
tag: ${{ env.REVISION }}
|
||||
body: ${{ vars.BODY }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
|
||||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
|
||||
REMOTE_USER: ${{ secrets.REMOTE_USER }}
|
||||
|
|
|
|||
2
.github/workflows/winget.yml
vendored
2
.github/workflows/winget.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
|||
types: [released]
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: windows-latest # action can only be run on windows
|
||||
steps:
|
||||
- uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,7 +16,6 @@
|
|||
*.w?x
|
||||
units/
|
||||
/doublecmd
|
||||
tools/extractdwrflnfo
|
||||
|
||||
# Lazarus autogenerated files (duplicated info)
|
||||
*.rst
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Control like TButton which does not steal focus on click
|
||||
|
||||
Copyright (C) 2021-2026 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2021-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
|
@ -27,7 +27,7 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
Buttons, Themes, Types, ImgList, LMessages;
|
||||
Buttons, Themes, Types;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -37,20 +37,11 @@ type
|
|||
private
|
||||
FState: TButtonState;
|
||||
FShowCaption: Boolean;
|
||||
FMouseInControl: Boolean;
|
||||
FButtonGlyph: TButtonGlyph;
|
||||
FImageChangeLink: TChangeLink;
|
||||
private
|
||||
function GetGlyph: TBitmap;
|
||||
function GetImageWidth: Integer;
|
||||
function IsGlyphStored: Boolean;
|
||||
procedure SetGlyph(AValue: TBitmap);
|
||||
function GetImageIndex: TImageIndex;
|
||||
function GetImages: TCustomImageList;
|
||||
procedure SetImageWidth(AValue: Integer);
|
||||
procedure SetShowCaption(AValue: Boolean);
|
||||
procedure SetImageIndex(AValue: TImageIndex);
|
||||
procedure SetImages(AValue: TCustomImageList);
|
||||
function GetDrawDetails: TThemedElementDetails;
|
||||
protected
|
||||
procedure Paint; override;
|
||||
|
|
@ -63,21 +54,15 @@ type
|
|||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
||||
protected
|
||||
function GetGlyphSize: TSize;
|
||||
procedure GlyphChanged(Sender: TObject);
|
||||
procedure ImageListChange(Sender: TObject);
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
|
||||
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer; WithThemeSpace: Boolean); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property Action;
|
||||
property Images: TCustomImageList read GetImages write SetImages;
|
||||
property ImageIndex: TImageIndex read GetImageIndex write SetImageIndex default -1;
|
||||
property ImageWidth: Integer read GetImageWidth write SetImageWidth default 0;
|
||||
property Glyph: TBitmap read GetGlyph write SetGlyph stored IsGlyphStored;
|
||||
property ShowCaption: Boolean read FShowCaption write SetShowCaption default True;
|
||||
end;
|
||||
|
|
@ -87,16 +72,13 @@ procedure Register;
|
|||
implementation
|
||||
|
||||
uses
|
||||
LCLType, LCLProc, LCLIntf, ActnList, GraphType;
|
||||
LCLType, LCLProc, LCLIntf, ActnList;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('KASComponents',[TKASButton]);
|
||||
end;
|
||||
|
||||
const
|
||||
UpState: array[Boolean] of TButtonState = (bsUp, bsHot);
|
||||
|
||||
{ TKASButton }
|
||||
|
||||
procedure TKASButton.DoEnter;
|
||||
|
|
@ -143,21 +125,6 @@ begin
|
|||
Result:= FButtonGlyph.Glyph;
|
||||
end;
|
||||
|
||||
function TKASButton.GetImageIndex: TImageIndex;
|
||||
begin
|
||||
Result:= FButtonGlyph.ExternalImageIndex;
|
||||
end;
|
||||
|
||||
function TKASButton.GetImages: TCustomImageList;
|
||||
begin
|
||||
Result:= FButtonGlyph.ExternalImages;
|
||||
end;
|
||||
|
||||
function TKASButton.GetImageWidth: Integer;
|
||||
begin
|
||||
Result:= FButtonGlyph.ExternalImageWidth;
|
||||
end;
|
||||
|
||||
function TKASButton.IsGlyphStored: Boolean;
|
||||
var
|
||||
Act: TCustomAction;
|
||||
|
|
@ -181,41 +148,11 @@ begin
|
|||
AdjustSize;
|
||||
end;
|
||||
|
||||
procedure TKASButton.SetImageIndex(AValue: TImageIndex);
|
||||
begin
|
||||
FButtonGlyph.ExternalImageIndex:= AValue;
|
||||
end;
|
||||
|
||||
procedure TKASButton.SetImages(AValue: TCustomImageList);
|
||||
begin
|
||||
if FButtonGlyph.ExternalImages <> nil then
|
||||
begin
|
||||
FButtonGlyph.ExternalImages.UnRegisterChanges(FImageChangeLink);
|
||||
FButtonGlyph.ExternalImages.RemoveFreeNotification(Self);
|
||||
end;
|
||||
FButtonGlyph.ExternalImages := AValue;
|
||||
if FButtonGlyph.ExternalImages <> nil then
|
||||
begin
|
||||
FButtonGlyph.ExternalImages.FreeNotification(Self);
|
||||
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
|
||||
end;
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
|
||||
procedure TKASButton.SetImageWidth(AValue: Integer);
|
||||
begin
|
||||
FButtonGlyph.ExternalImageWidth:= AValue;
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
|
||||
procedure TKASButton.Paint;
|
||||
var
|
||||
APoint: TPoint;
|
||||
SysFont: TFont;
|
||||
PaintRect: TRect;
|
||||
AGlyphSize: TSize;
|
||||
TextFlags: Integer;
|
||||
Details: TThemedElementDetails;
|
||||
begin
|
||||
|
|
@ -244,22 +181,17 @@ begin
|
|||
DrawText(Canvas.Handle, PChar(Caption), Length(Caption), PaintRect, TextFlags);
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
AGlyphSize:= GetGlyphSize;
|
||||
|
||||
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
|
||||
begin
|
||||
APoint.X:= (PaintRect.Width - AGlyphSize.CX) div 2;
|
||||
APoint.Y:= (PaintRect.Height - AGlyphSize.CY) div 2;
|
||||
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0, Font.PixelsPerInch, GetCanvasScaleFactor);
|
||||
end;
|
||||
else if not FButtonGlyph.Glyph.Empty then
|
||||
begin
|
||||
APoint.X:= (PaintRect.Width - FButtonGlyph.Width) div 2;
|
||||
APoint.Y:= (PaintRect.Height - FButtonGlyph.Height) div 2;
|
||||
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TKASButton.MouseEnter;
|
||||
begin
|
||||
inherited MouseEnter;
|
||||
FMouseInControl:= True;
|
||||
FState:= bsHot;
|
||||
Invalidate;
|
||||
end;
|
||||
|
|
@ -267,7 +199,6 @@ end;
|
|||
procedure TKASButton.MouseLeave;
|
||||
begin
|
||||
inherited MouseLeave;
|
||||
FMouseInControl:= False;
|
||||
FState:= bsUp;
|
||||
Invalidate;
|
||||
end;
|
||||
|
|
@ -309,37 +240,12 @@ begin
|
|||
Invalidate;
|
||||
end;
|
||||
|
||||
function TKASButton.GetGlyphSize: TSize;
|
||||
var
|
||||
AIndex: Integer;
|
||||
AEffect: TGraphicsDrawEffect;
|
||||
AImageRes: TScaledImageListResolution;
|
||||
begin
|
||||
if (FButtonGlyph.Glyph.Empty) and ((Images = nil) or (ImageIndex = -1)) then
|
||||
begin
|
||||
Result.CX:= 0;
|
||||
Result.CY:= 0;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
FButtonGlyph.GetImageIndexAndEffect(Low(TButtonState), Font.PixelsPerInch,
|
||||
GetCanvasScaleFactor, AImageRes, AIndex, AEffect);
|
||||
|
||||
Result.CX:= AImageRes.Width;
|
||||
Result.CY:= AImageRes.Height;
|
||||
end;
|
||||
|
||||
procedure TKASButton.GlyphChanged(Sender: TObject);
|
||||
begin
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
|
||||
procedure TKASButton.ImageListChange(Sender: TObject);
|
||||
begin
|
||||
if Sender = Images then Invalidate;
|
||||
end;
|
||||
|
||||
class function TKASButton.GetControlClassDefaultSize: TSize;
|
||||
begin
|
||||
Result.CX := 23;
|
||||
|
|
@ -361,36 +267,23 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TKASButton.CMEnabledChanged(var Message: TLMessage);
|
||||
begin
|
||||
if Enabled then
|
||||
FState:= UpState[FMouseInControl]
|
||||
else begin
|
||||
FState:= bsDisabled;
|
||||
end;
|
||||
inherited CMEnabledChanged(Message);
|
||||
end;
|
||||
|
||||
procedure TKASButton.CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: Integer; WithThemeSpace: Boolean);
|
||||
var
|
||||
PaintRect: TRect;
|
||||
ClientRect: TRect;
|
||||
AGlyphSize: TSize;
|
||||
Details: TThemedElementDetails;
|
||||
begin
|
||||
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
|
||||
|
||||
AGlyphSize:= GetGlyphSize;
|
||||
|
||||
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
|
||||
if (not FButtonGlyph.Glyph.Empty) then
|
||||
begin
|
||||
Details:= GetDrawDetails;
|
||||
PaintRect:= TRect.Create(0, 0, 32, 32);
|
||||
ClientRect:= ThemeServices.ContentRect(Canvas.Handle, Details, PaintRect);
|
||||
|
||||
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + AGlyphSize.CX;
|
||||
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + AGlyphSize.CY;
|
||||
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + FButtonGlyph.Width;
|
||||
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + FButtonGlyph.Height;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -403,9 +296,6 @@ begin
|
|||
FButtonGlyph.OnChange := GlyphChanged;
|
||||
FButtonGlyph.IsDesigning := csDesigning in ComponentState;
|
||||
|
||||
FImageChangeLink := TChangeLink.Create;
|
||||
FImageChangeLink.OnChange := ImageListChange;
|
||||
|
||||
FShowCaption:= True;
|
||||
TabStop:= True;
|
||||
end;
|
||||
|
|
@ -413,7 +303,6 @@ end;
|
|||
destructor TKASButton.Destroy;
|
||||
begin
|
||||
FreeAndNil(FButtonGlyph);
|
||||
FreeAndNil(FImageChangeLink);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ unit KASCDEdit;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LazVersion, LResources, Controls, Graphics, Dialogs, Types,
|
||||
Classes, SysUtils, LResources, Controls, Graphics, Dialogs, Types,
|
||||
Menus, CustomDrawnControls, CustomDrawnDrawers, CustomDrawn_Common;
|
||||
|
||||
type
|
||||
|
|
@ -412,12 +412,6 @@ begin
|
|||
begin
|
||||
inherited MouseDown(Button, Shift, X, Y);
|
||||
|
||||
{$IF Laz_FullVersion >= 4990000}
|
||||
// see also LCL 4b41b7a:
|
||||
// customdrawn: remove redundant SetFocus from TCDControl.MouseDown
|
||||
SetFocus();
|
||||
{$ENDIF}
|
||||
|
||||
FDragDropStarted := True;
|
||||
|
||||
// Caret positioning
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
"/>
|
||||
<License Value="GNU GPL 2
|
||||
"/>
|
||||
<Version Major="1" Minor="10"/>
|
||||
<Files Count="12">
|
||||
<Version Major="1" Minor="9" Release="5"/>
|
||||
<Files Count="11">
|
||||
<Item1>
|
||||
<Filename Value="kastoolbar.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
|
|
@ -82,11 +82,6 @@
|
|||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="KASComCtrls"/>
|
||||
</Item11>
|
||||
<Item12>
|
||||
<Filename Value="kascontrols.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="kascontrols"/>
|
||||
</Item12>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="3">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ interface
|
|||
uses
|
||||
KASToolBar, KASProgressBar, KASPathEdit, KASToolItems, KASComboBox,
|
||||
KASCDEdit, KASStatusBar, KASToolPanel, KASButton, KASButtonPanel,
|
||||
KASComCtrls, KASControls, LazarusPackageIntf;
|
||||
KASComCtrls, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -26,7 +26,6 @@ begin
|
|||
RegisterUnit('KASButton', @KASButton.Register);
|
||||
RegisterUnit('KASButtonPanel', @KASButtonPanel.Register);
|
||||
RegisterUnit('KASComCtrls', @KASComCtrls.Register);
|
||||
RegisterUnit('KASControls', @KASControls.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
|||
|
|
@ -1,89 +0,0 @@
|
|||
unit KASControls;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Controls, StdCtrls, ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TKASPanel }
|
||||
|
||||
TKASPanel = class(TPanel)
|
||||
private
|
||||
FOnAutoSize: TNotifyEvent;
|
||||
protected
|
||||
procedure DoAutoSize; override;
|
||||
published
|
||||
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
|
||||
end;
|
||||
|
||||
{ TKASGroupBox }
|
||||
|
||||
TKASGroupBox = class(TGroupBox)
|
||||
private
|
||||
FOnAutoSize: TNotifyEvent;
|
||||
protected
|
||||
procedure DoAutoSize; override;
|
||||
published
|
||||
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('KASComponents', [TKASPanel, TKASGroupBox]);
|
||||
end;
|
||||
|
||||
procedure LabelsAutoSize(Self: TWinControl);
|
||||
var
|
||||
Index: Integer;
|
||||
AControl: TControl;
|
||||
begin
|
||||
with Self do
|
||||
begin
|
||||
DisableAutoSizing;
|
||||
for Index:= 0 to ControlCount - 1 do
|
||||
begin
|
||||
AControl:= Controls[Index];
|
||||
if (not (AControl is TLabel)) and Assigned(AControl.AnchorSide[akTop].Control) then
|
||||
begin
|
||||
if AControl.AnchorSide[akTop].Control is TLabel then
|
||||
AControl.AnchorSide[akTop].Control.Constraints.MinHeight:= AControl.Height;
|
||||
end;
|
||||
end;
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TKASPanel }
|
||||
|
||||
procedure TKASPanel.DoAutoSize;
|
||||
begin
|
||||
inherited DoAutoSize;
|
||||
if not (csDesigning in ComponentState) then
|
||||
begin
|
||||
LabelsAutoSize(Self);
|
||||
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TKASGroupBox }
|
||||
|
||||
procedure TKASGroupBox.DoAutoSize;
|
||||
begin
|
||||
inherited DoAutoSize;
|
||||
if not (csDesigning in ComponentState) then
|
||||
begin
|
||||
LabelsAutoSize(Self);
|
||||
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
@ -22,7 +22,6 @@
|
|||
unit KASPathEdit;
|
||||
|
||||
{$mode delphi}
|
||||
{$interfaces corba}
|
||||
{$IF DEFINED(LCLCOCOA)}
|
||||
{$modeswitch objectivec1}
|
||||
{$ENDIF}
|
||||
|
|
@ -39,34 +38,15 @@ uses
|
|||
|
||||
type
|
||||
|
||||
{ TKASPathEditGetFilesFunc }
|
||||
|
||||
TKASPathEditGetFilesFunc = Procedure (
|
||||
const path: String;
|
||||
const types: TObjectTypes;
|
||||
const sort: TFileSortType;
|
||||
files: TStringList );
|
||||
|
||||
{ IKASPathEditMate }
|
||||
|
||||
IKASPathEditMate = interface
|
||||
function getFilesAtPath(
|
||||
const path: String;
|
||||
const types: TObjectTypes;
|
||||
const sort: TFileSortType ): TStringList;
|
||||
end;
|
||||
|
||||
{ TKASPathEdit }
|
||||
|
||||
TKASPathEdit = class(TEdit)
|
||||
private
|
||||
FMate: IKASPathEditMate;
|
||||
FKeyDown: Word;
|
||||
FBasePath: String;
|
||||
FListBox: TListBox;
|
||||
FPanel: THintWindow;
|
||||
FAutoComplete: Boolean;
|
||||
FGetFilesFunc: TKASPathEditGetFilesFunc;
|
||||
FStringList: TStringList;
|
||||
FObjectTypes: TObjectTypes;
|
||||
FFileSortType: TFileSortType;
|
||||
|
|
@ -100,8 +80,6 @@ type
|
|||
onKeyRETURN: TNotifyEvent;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
property GetFilesFunc: TKASPathEditGetFilesFunc read FGetFilesFunc write FGetFilesFunc;
|
||||
property Mate: IKASPathEditMate read FMate write FMate;
|
||||
published
|
||||
property ObjectTypes: TObjectTypes read FObjectTypes write SetObjectTypes;
|
||||
property FileSortType: TFileSortType read FFileSortType write FFileSortType;
|
||||
|
|
@ -151,6 +129,77 @@ begin
|
|||
RegisterComponents('KASComponents', [TKASPathEdit]);
|
||||
end;
|
||||
|
||||
function FilesSortAlphabet(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
begin
|
||||
Result:= CompareFilenames(List[Index1], List[Index2]);
|
||||
end;
|
||||
|
||||
function FilesSortFoldersFirst(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
var
|
||||
Attr1, Attr2: IntPtr;
|
||||
begin
|
||||
Attr1:= IntPtr(List.Objects[Index1]);
|
||||
Attr2:= IntPtr(List.Objects[Index2]);
|
||||
if (Attr1 and faDirectory <> 0) and (Attr2 and faDirectory <> 0) then
|
||||
Result:= CompareFilenames(List[Index1], List[Index2])
|
||||
else begin
|
||||
if (Attr1 and faDirectory <> 0) then
|
||||
Result:= -1
|
||||
else begin
|
||||
Result:= 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure GetFilesInDir(const ABaseDir: String; AMask: String; AObjectTypes: TObjectTypes;
|
||||
AResult: TStringList; AFileSortType: TFileSortType);
|
||||
var
|
||||
ExcludeAttr: Integer;
|
||||
SearchRec: TSearchRec;
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
ErrMode : LongWord;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
ErrMode:= SetErrorMode(SEM_FAILCRITICALERRORS or SEM_NOALIGNMENTFAULTEXCEPT or SEM_NOGPFAULTERRORBOX or SEM_NOOPENFILEERRORBOX);
|
||||
try
|
||||
{$ENDIF}
|
||||
if FindFirst(ABaseDir + AMask, faAnyFile, SearchRec) = 0 then
|
||||
begin
|
||||
ExcludeAttr:= 0;
|
||||
|
||||
if not (otHidden in AObjectTypes) then
|
||||
ExcludeAttr:= ExcludeAttr or faHidden;
|
||||
if not (otFolders in AObjectTypes) then
|
||||
ExcludeAttr:= ExcludeAttr or faDirectory;
|
||||
|
||||
repeat
|
||||
if (SearchRec.Attr and ExcludeAttr <> 0) then
|
||||
Continue;
|
||||
if (SearchRec.Name = '.') or (SearchRec.Name = '..')then
|
||||
Continue;
|
||||
if (SearchRec.Attr and faDirectory = 0) and not (otNonFolders in AObjectTypes) then
|
||||
Continue;
|
||||
|
||||
AResult.AddObject(SearchRec.Name, TObject(IntPtr(SearchRec.Attr)));
|
||||
until FindNext(SearchRec) <> 0;
|
||||
|
||||
if AResult.Count > 0 then
|
||||
begin
|
||||
case AFileSortType of
|
||||
fstAlphabet: AResult.CustomSort(@FilesSortAlphabet);
|
||||
fstFoldersFirst: AResult.CustomSort(@FilesSortFoldersFirst);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
SysUtils.FindClose(SearchRec);
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
finally
|
||||
SetErrorMode(ErrMode);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{ TKASPathEdit }
|
||||
|
||||
function TKASPathEdit.isShowingListBox(): Boolean;
|
||||
|
|
@ -177,49 +226,49 @@ begin
|
|||
BasePath:= ExtractFilePath(Path);
|
||||
if CompareFilenames(FBasePath, BasePath) <> 0 then
|
||||
begin
|
||||
FreeAndNil(FStringList);
|
||||
FStringList.Clear;
|
||||
FBasePath:= BasePath;
|
||||
if Assigned(FMate) then
|
||||
FStringList:= FMate.getFilesAtPath(BasePath, FObjectTypes, FFileSortType);
|
||||
GetFilesInDir(BasePath, AllFilesMask, FObjectTypes, FStringList, FFileSortType);
|
||||
end;
|
||||
if (FStringList=nil) or (FStringList.Count<=0) then
|
||||
Exit;
|
||||
FListBox.Items.BeginUpdate;
|
||||
try
|
||||
// Check mask and make absolute file name
|
||||
AMask:= TMask.Create(ExtractFileName(Path) + '*',
|
||||
{$IF LCL_FULLVERSION < 4990000}
|
||||
AFlags[FileNameCaseSensitive]
|
||||
{$ELSE}
|
||||
FileNameCaseSensitive
|
||||
{$ENDIF}
|
||||
);
|
||||
for I:= 0 to FStringList.Count - 1 do
|
||||
begin
|
||||
if AMask.Matches(FStringList[I]) then
|
||||
FListBox.Items.Add(BasePath + FStringList[I]);
|
||||
end;
|
||||
AMask.Free;
|
||||
finally
|
||||
FListBox.Items.EndUpdate;
|
||||
end;
|
||||
if FListBox.Items.Count = 0 then HideListBox;
|
||||
if FListBox.Items.Count > 0 then
|
||||
if (FStringList.Count > 0) then
|
||||
begin
|
||||
ShowListBox;
|
||||
// Calculate ListBox height
|
||||
with FListBox.ItemRect(0) do
|
||||
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
|
||||
with FListBox do
|
||||
begin
|
||||
{$IF NOT DEFINED(LCLCOCOA)}
|
||||
if Items.Count = 1 then
|
||||
FPanel.ClientHeight:= Self.Height
|
||||
else
|
||||
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
|
||||
FListBox.Items.BeginUpdate;
|
||||
try
|
||||
// Check mask and make absolute file name
|
||||
AMask:= TMask.Create(ExtractFileName(Path) + '*',
|
||||
{$IF LCL_FULLVERSION < 4990000}
|
||||
AFlags[FileNameCaseSensitive]
|
||||
{$ELSE}
|
||||
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
|
||||
FileNameCaseSensitive
|
||||
{$ENDIF}
|
||||
);
|
||||
for I:= 0 to FStringList.Count - 1 do
|
||||
begin
|
||||
if AMask.Matches(FStringList[I]) then
|
||||
FListBox.Items.Add(BasePath + FStringList[I]);
|
||||
end;
|
||||
AMask.Free;
|
||||
finally
|
||||
FListBox.Items.EndUpdate;
|
||||
end;
|
||||
if FListBox.Items.Count = 0 then HideListBox;
|
||||
if FListBox.Items.Count > 0 then
|
||||
begin
|
||||
ShowListBox;
|
||||
// Calculate ListBox height
|
||||
with FListBox.ItemRect(0) do
|
||||
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
|
||||
with FListBox do
|
||||
begin
|
||||
{$IF NOT DEFINED(LCLCOCOA)}
|
||||
if Items.Count = 1 then
|
||||
FPanel.ClientHeight:= Self.Height
|
||||
else
|
||||
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
|
||||
{$ELSE}
|
||||
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -454,6 +503,8 @@ constructor TKASPathEdit.Create(AOwner: TComponent);
|
|||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
FStringList:= TStringList.Create;
|
||||
|
||||
FListBox:= TListBox.Create(Self);
|
||||
FListBox.TabStop:= False;
|
||||
FListBox.Align:= alClient;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@ type
|
|||
FOverlay: TBitmap;
|
||||
FToolItem: TKASToolItem;
|
||||
function GetToolBar: TKASToolBar;
|
||||
function GetGlyphBitmap: TBitmap;
|
||||
procedure SetGlyphBitmap(bitmap: TBitmap);
|
||||
protected
|
||||
procedure CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
||||
|
|
@ -68,13 +66,12 @@ type
|
|||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
|
||||
procedure CMHintShow(var Message: TLMessage); message CM_HINTSHOW;
|
||||
public
|
||||
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce; virtual;
|
||||
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce;
|
||||
destructor Destroy; override;
|
||||
procedure Click; override;
|
||||
public
|
||||
property ToolBar: TKASToolBar read GetToolBar;
|
||||
property ToolItem: TKASToolItem read FToolItem;
|
||||
property Glyph: TBitmap read GetGlyphBitmap write SetGlyphBitmap;
|
||||
end;
|
||||
|
||||
{ TKASToolDivider }
|
||||
|
|
@ -84,17 +81,6 @@ type
|
|||
procedure CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
||||
procedure Paint; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
|
||||
end;
|
||||
|
||||
{ TKASToolLabel }
|
||||
|
||||
TKASToolLabel = class(TKASToolButton)
|
||||
protected
|
||||
procedure Paint; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
|
||||
end;
|
||||
|
||||
{ TKASToolBar }
|
||||
|
|
@ -179,9 +165,7 @@ type
|
|||
procedure RemoveButton(Button: TKASToolButton);
|
||||
procedure RemoveToolItemExecutor(ExecuteFunction: TOnToolItemExecute);
|
||||
procedure UncheckAllButtons;
|
||||
function GlyphBitmapSize: Integer;
|
||||
procedure UpdateIcon(ToolButton: TKASToolButton);
|
||||
procedure UpdateIconWithBitmap(ToolButton: TKASToolButton; bitmap: TBitmap);
|
||||
procedure UseItems(AItems: TKASToolBarItems);
|
||||
|
||||
procedure LoadConfiguration(Config: TXmlConfig; RootNode: TXmlNode;
|
||||
|
|
@ -220,7 +204,7 @@ procedure Register;
|
|||
implementation
|
||||
|
||||
uses
|
||||
Themes, Types, Math, ActnList, LCLType, LCLIntf, DCOSUtils;
|
||||
Themes, Types, Math, ActnList, DCOSUtils;
|
||||
|
||||
type
|
||||
PToolItemExecutor = ^TToolItemExecutor;
|
||||
|
|
@ -234,29 +218,6 @@ begin
|
|||
RegisterComponents('KASComponents',[TKASToolBar]);
|
||||
end;
|
||||
|
||||
function findScaleFactorByFirstForm: Double;
|
||||
begin
|
||||
Result:= 1;
|
||||
if Screen.FormCount > 0 then
|
||||
Result:= Screen.Forms[0].GetCanvasScaleFactor();
|
||||
end;
|
||||
|
||||
function findScaleFactorByControl( control: TControl ): Double;
|
||||
var
|
||||
topParent: TControl;
|
||||
begin
|
||||
if Assigned(control) then begin
|
||||
topParent:= control.GetTopParent;
|
||||
if Assigned(topParent) then
|
||||
control:= topParent;
|
||||
if (control is TWinControl) and TWinControl(control).HandleAllocated then begin
|
||||
Result:= control.GetCanvasScaleFactor;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Result:= findScaleFactorByFirstForm();
|
||||
end;
|
||||
|
||||
{ TKASToolBar }
|
||||
|
||||
procedure TKASToolBar.InsertButton(InsertAt: Integer; ToolButton: TKASToolButton);
|
||||
|
|
@ -326,19 +287,14 @@ var
|
|||
procedure CalculatePosition;
|
||||
var
|
||||
NewBounds: TRect;
|
||||
ALineBreak: Boolean;
|
||||
begin
|
||||
ALineBreak:= (CurControl is TKASToolDivider) and (not FShowDividerAsButton) and
|
||||
(TKASToolDivider(CurControl).FToolItem is TKASSeparatorItem) and
|
||||
(TKASSeparatorItem(TKASToolDivider(CurControl).FToolItem).Style = kssLineBreak);
|
||||
|
||||
if IsVertical then
|
||||
begin
|
||||
NewBounds := Bounds(x, y, FRowWidth, CurControl.Height);
|
||||
repeat
|
||||
if (not Wrapable) or
|
||||
(NewBounds.Top = StartY) or
|
||||
((NewBounds.Bottom <= ARect.Bottom) and not ALineBreak) then
|
||||
(NewBounds.Bottom <= ARect.Bottom) or
|
||||
(NewBounds.Top = StartY) then
|
||||
begin
|
||||
// control fits into the column
|
||||
x := NewBounds.Left;
|
||||
|
|
@ -357,8 +313,8 @@ var
|
|||
NewBounds := Bounds(x, y, CurControl.Width, FRowHeight);
|
||||
repeat
|
||||
if (not Wrapable) or
|
||||
(NewBounds.Left = StartX) or
|
||||
((NewBounds.Right <= ARect.Right) and not ALineBreak) then
|
||||
(NewBounds.Right <= ARect.Right) or
|
||||
(NewBounds.Left = StartX) then
|
||||
begin
|
||||
// control fits into the row
|
||||
x := NewBounds.Left;
|
||||
|
|
@ -591,18 +547,10 @@ begin
|
|||
if FGlyphSize = AValue then Exit;
|
||||
FGlyphSize:= AValue;
|
||||
|
||||
self.Images.Clear;
|
||||
self.images.Width:= GlyphBitmapSize;
|
||||
self.images.Height:= GlyphBitmapSize;
|
||||
self.ImagesWidth:= FGlyphSize;
|
||||
Self.Images.Scaled := (findScaleFactorByControl(Self) > 1.0);
|
||||
|
||||
BeginUpdate;
|
||||
try
|
||||
for I := 0 to ButtonList.Count - 1 do begin
|
||||
TKASToolButton(ButtonList[i]).ImageIndex:= -1;
|
||||
for I := 0 to ButtonList.Count - 1 do
|
||||
UpdateIcon(TKASToolButton(ButtonList[i]));
|
||||
end;
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
|
|
@ -781,8 +729,7 @@ begin
|
|||
ToolButton.FOverlay := FOnLoadButtonOverlay(ToolButton.ToolItem, FGlyphSize div 2, clBtnFace);
|
||||
end;
|
||||
|
||||
if Assigned(Bitmap) then
|
||||
self.UpdateIconWithBitmap(ToolButton, Bitmap);
|
||||
ToolButton.Glyph.Assign(Bitmap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
|
|
@ -791,18 +738,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TKASToolBar.UpdateIconWithBitmap(ToolButton: TKASToolButton;
|
||||
bitmap: TBitmap);
|
||||
begin
|
||||
if ToolButton.ImageIndex < 0 then begin
|
||||
ToolButton.Images:= self.Images;
|
||||
ToolButton.ImageIndex:= self.Images.Add( bitmap, nil );
|
||||
ToolButton.ImageWidth:= self.ImagesWidth;
|
||||
end else begin
|
||||
self.Images.Replace( ToolButton.ImageIndex, bitmap, nil );
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TKASToolBar.UseItems(AItems: TKASToolBarItems);
|
||||
var
|
||||
i: Integer;
|
||||
|
|
@ -893,8 +828,7 @@ end;
|
|||
constructor TKASToolBar.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
self.images:= TImageList.Create(self);
|
||||
self.GlyphSize:= 16; // by default
|
||||
FGlyphSize:= 16; // by default
|
||||
FUpdateCount:= 0;
|
||||
FButtonWidth := 23;
|
||||
FButtonHeight := 22;
|
||||
|
|
@ -915,10 +849,6 @@ begin
|
|||
begin
|
||||
Result := TKASToolDivider.Create(Self, Item);
|
||||
end
|
||||
else if Item is TKASLabelItem then
|
||||
begin
|
||||
Result := TKASToolLabel.Create(Self, Item);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result := TKASToolButton.Create(Self, Item);
|
||||
|
|
@ -1096,18 +1026,12 @@ begin
|
|||
Buttons[I].Down:= False;
|
||||
end;
|
||||
|
||||
function TKASToolBar.GlyphBitmapSize: Integer;
|
||||
begin
|
||||
Result:= Round(FGlyphSize * findScaleFactorByControl(self));
|
||||
end;
|
||||
|
||||
{ TKASToolButton }
|
||||
|
||||
procedure TKASToolButton.CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: integer; WithThemeSpace: Boolean);
|
||||
var
|
||||
TextSize: TSize;
|
||||
iconWidth: Integer;
|
||||
begin
|
||||
if (Parent = nil) then
|
||||
inherited
|
||||
|
|
@ -1125,10 +1049,7 @@ begin
|
|||
begin
|
||||
// Size to extent of the icon + caption.
|
||||
TextSize := Canvas.TextExtent(Caption);
|
||||
iconWidth := self.ImageWidth;
|
||||
if iconWidth = 0 then
|
||||
iconWidth := Glyph.Width;
|
||||
PreferredWidth := Max(TextSize.cx + iconWidth + 16, PreferredWidth);
|
||||
PreferredWidth := Max(TextSize.cx + Glyph.Width + 16, PreferredWidth);
|
||||
PreferredHeight := Max(TextSize.cy + 4, PreferredHeight);
|
||||
end;
|
||||
end;
|
||||
|
|
@ -1202,44 +1123,22 @@ begin
|
|||
Result := Parent as TKASToolBar;
|
||||
end;
|
||||
|
||||
function TKASToolButton.GetGlyphBitmap: TBitmap;
|
||||
begin
|
||||
Result:= Inherited Glyph;
|
||||
end;
|
||||
|
||||
procedure TKASToolButton.SetGlyphBitmap(bitmap: TBitmap);
|
||||
begin
|
||||
self.ToolBar.UpdateIconWithBitmap(self, bitmap);
|
||||
end;
|
||||
|
||||
{ TKASToolDivider }
|
||||
|
||||
procedure TKASToolDivider.CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: integer; WithThemeSpace: Boolean);
|
||||
var
|
||||
ASize: Integer;
|
||||
begin
|
||||
if Assigned(Parent) and (Parent is TKASToolBar) and
|
||||
(not TKASSeparatorItem(FToolItem).Style) and
|
||||
(not TKASToolBar(Parent).FShowDividerAsButton) then
|
||||
begin
|
||||
if (TKASSeparatorItem(FToolItem).Style = kssSeparator) then
|
||||
ASize:= 5
|
||||
else if (TKASSeparatorItem(FToolItem).Style = kssLineBreak) then
|
||||
ASize:= 0
|
||||
else begin
|
||||
ASize:= -1;
|
||||
end;
|
||||
if ASize < 0 then
|
||||
if ToolBar.IsVertical then
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
else if ToolBar.IsVertical then
|
||||
begin
|
||||
PreferredHeight := ASize;
|
||||
PreferredHeight := 5;
|
||||
PreferredWidth := ToolBar.FRowWidth;
|
||||
end
|
||||
else begin
|
||||
PreferredWidth := ASize;
|
||||
PreferredWidth := 5;
|
||||
PreferredHeight := ToolBar.FRowHeight;
|
||||
end;
|
||||
end
|
||||
|
|
@ -1255,7 +1154,7 @@ begin
|
|||
if Assigned(Parent) and (Parent is TKASToolBar) and
|
||||
not TKASToolBar(Parent).FShowDividerAsButton then
|
||||
begin
|
||||
if TKASSeparatorItem(FToolItem).Style > kssSeparator then Exit;
|
||||
if TKASSeparatorItem(FToolItem).Style then Exit;
|
||||
|
||||
DividerRect:= ClientRect;
|
||||
|
||||
|
|
@ -1298,46 +1197,5 @@ begin
|
|||
inherited Paint;
|
||||
end;
|
||||
|
||||
constructor TKASToolDivider.Create(AOwner: TComponent; Item: TKASToolItem);
|
||||
begin
|
||||
inherited Create(AOwner, Item);
|
||||
ControlStyle:= ControlStyle + [csAutoSize0x0];
|
||||
end;
|
||||
|
||||
{ TKASToolLabel }
|
||||
|
||||
procedure TKASToolLabel.Paint;
|
||||
const
|
||||
cAlignment: array[TAlignment] of Longint = (DT_LEFT, DT_RIGHT, DT_CENTER);
|
||||
var
|
||||
R: TRect;
|
||||
Flags: Longint;
|
||||
LabelText: String;
|
||||
begin
|
||||
R:= ClientRect;
|
||||
Canvas.Font:= Font;
|
||||
LabelText:= Caption;
|
||||
InflateRect(R, -8, 0);
|
||||
Canvas.Brush.Color:= Color;
|
||||
Canvas.Brush.Style:= bsClear;
|
||||
|
||||
Flags:= DT_EXPANDTABS or DT_VCENTER;
|
||||
Flags:= Flags or DT_SINGLELINE or DT_NOPREFIX;
|
||||
|
||||
if UseRightToLeftReading then
|
||||
begin
|
||||
Flags:= Flags or DT_RTLREADING;
|
||||
end;
|
||||
Flags:= Flags or cAlignment[BidiFlipAlignment(Self.Alignment, UseRightToLeftAlignment)];
|
||||
|
||||
DrawText(Canvas.Handle, PAnsiChar(LabelText), Length(LabelText), R, Flags or DT_NOCLIP);
|
||||
end;
|
||||
|
||||
constructor TKASToolLabel.Create(AOwner: TComponent; Item: TKASToolItem);
|
||||
begin
|
||||
inherited Create(AOwner, Item);
|
||||
AutoSize:= True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ type
|
|||
|
||||
TOnLoadToolItem = procedure (Item: TKASToolItem) of object;
|
||||
|
||||
TKASSeparatorStyle = (kssSeparator, kssDivider, kssLineBreak);
|
||||
|
||||
{$interfaces corba}
|
||||
IToolOwner = interface
|
||||
['{A7908D38-1E13-4E8D-8FA7-8830A2FF9290}']
|
||||
|
|
@ -84,7 +82,7 @@ type
|
|||
|
||||
TKASSeparatorItem = class(TKASToolItem)
|
||||
public
|
||||
Style: TKASSeparatorStyle;
|
||||
Style: Boolean;
|
||||
procedure Assign(OtherItem: TKASToolItem); override;
|
||||
function Clone: TKASToolItem; override;
|
||||
function ConfigNodeName: String; override;
|
||||
|
|
@ -142,10 +140,6 @@ type
|
|||
property SubItems: TKASToolBarItems read FItems;
|
||||
end;
|
||||
|
||||
{ TKASLabelItem }
|
||||
|
||||
TKASLabelItem = class(TKASNormalItem);
|
||||
|
||||
{ TKASToolBarItems }
|
||||
|
||||
TKASToolBarItems = class
|
||||
|
|
@ -419,20 +413,13 @@ begin
|
|||
end;
|
||||
|
||||
procedure TKASSeparatorItem.Load(Config: TXmlConfig; Node: TXmlNode; Loader: TKASToolBarLoader);
|
||||
var
|
||||
OldStyle: Boolean;
|
||||
AStyle: array[Boolean] of TKASSeparatorStyle = (kssSeparator, kssDivider);
|
||||
begin
|
||||
if Config.TryGetValue(Node, 'Style', OldStyle) then
|
||||
Style := AStyle[OldStyle]
|
||||
else begin
|
||||
Style := TKASSeparatorStyle(Config.GetValue(Node, 'Style', Integer(kssSeparator)));
|
||||
end;
|
||||
Style := Config.GetValue(Node, 'Style', False);
|
||||
end;
|
||||
|
||||
procedure TKASSeparatorItem.SaveContents(Config: TXmlConfig; Node: TXmlNode);
|
||||
begin
|
||||
Config.AddValue(Node, 'Style', Integer(Style));
|
||||
Config.AddValue(Node, 'Style', Style);
|
||||
end;
|
||||
|
||||
{ TKASNormalItem }
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ type
|
|||
property EdgeBorders default [ebTop];
|
||||
property EdgeInner;
|
||||
property EdgeOuter;
|
||||
property OnResize;
|
||||
property TabOrder;
|
||||
property Visible;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ lazbuild doublecmd\doublecmd_common.lpk %DC_ARCH%
|
|||
lazbuild Image32\Image32.lpk %DC_ARCH%
|
||||
lazbuild KASToolBar\kascomp.lpk %DC_ARCH%
|
||||
lazbuild viewer\viewerpackage.lpk %DC_ARCH%
|
||||
lazbuild gifview\gifview.lpk %DC_ARCH%
|
||||
lazbuild gifanim\pkg_gifanim.lpk %DC_ARCH%
|
||||
lazbuild synunihighlighter\synuni.lpk %DC_ARCH%
|
||||
lazbuild virtualterminal\virtualterminal.lpk %DC_ARCH%
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ $lazbuild doublecmd/doublecmd_common.lpk $DC_ARCH
|
|||
$lazbuild Image32/Image32.lpk $DC_ARCH
|
||||
$lazbuild KASToolBar/kascomp.lpk $DC_ARCH
|
||||
$lazbuild viewer/viewerpackage.lpk $DC_ARCH
|
||||
$lazbuild gifview/gifview.lpk $DC_ARCH
|
||||
$lazbuild gifanim/pkg_gifanim.lpk $DC_ARCH
|
||||
$lazbuild synunihighlighter/synuni.lpk $DC_ARCH
|
||||
$lazbuild virtualterminal/virtualterminal.lpk $DC_ARCH
|
||||
cd $basedir
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
unit DCClasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, NullStream;
|
||||
|
||||
type
|
||||
|
||||
{ TNullStreamEx }
|
||||
|
||||
TNullStreamEx = class(TNullStream)
|
||||
public
|
||||
function Write(const Buffer; Count: LongInt): LongInt; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TNullStreamEx }
|
||||
|
||||
function TNullStreamEx.Write(const Buffer; Count: LongInt): LongInt;
|
||||
begin
|
||||
Result:= Count;
|
||||
inherited Write(Buffer, Count);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ unit DCClassesUtf8;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, RtlConsts, SysUtils, IniFiles, Math;
|
||||
Classes, RtlConsts, SysUtils, IniFiles;
|
||||
|
||||
type
|
||||
{ TFileStreamEx class }
|
||||
|
|
@ -53,7 +53,7 @@ type
|
|||
property AutoSync: Boolean read FAutoSync write SetAutoSync;
|
||||
property Capacity: Int64 write SetCapacity;
|
||||
property FileName: String read FFileName;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TStringListEx }
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ type
|
|||
function IndexOfValue(const Value: String): Integer;
|
||||
procedure LoadFromFile(const FileName: String); override;
|
||||
procedure SaveToFile(const FileName: String); override;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TIniFileEx }
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
DCOSUtils, DCConvertEncoding;
|
||||
DCOSUtils, LazUTF8;
|
||||
|
||||
{ TFileStreamEx }
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ begin
|
|||
inherited Create(AHandle);
|
||||
end
|
||||
else
|
||||
begin
|
||||
begin
|
||||
AHandle:= mbFileOpen(AFileName, Mode);
|
||||
if AHandle = feInvalidHandle then
|
||||
raise EFOpenError.CreateFmt(SFOpenError + LineEnding + mbSysErrorMessage , [AFilename])
|
||||
|
|
@ -213,26 +213,11 @@ end;
|
|||
{ TStringListEx }
|
||||
|
||||
function TStringListEx.DoCompareText(const S1, S2: String): PtrInt;
|
||||
var
|
||||
U1, U2: UnicodeString;
|
||||
begin
|
||||
U1:= CeUtf8ToUtf16(S1);
|
||||
U2:= CeUtf8ToUtf16(S2);
|
||||
|
||||
if CaseSensitive then
|
||||
begin
|
||||
Result:= UnicodeCompareStr(U1, U2);
|
||||
if Result = 0 then
|
||||
begin
|
||||
Result := CompareMemRange(Pointer(U1), Pointer(U2), Min(Length(U1), Length(U2)) * SizeOf(WideChar));
|
||||
if Result = 0 then
|
||||
Result := Length(U1) - Length(U2);
|
||||
end
|
||||
end
|
||||
Result:= UTF8CompareStr(S1, S2)
|
||||
else
|
||||
begin
|
||||
Result:= UnicodeCompareText(U1, U2);
|
||||
end;
|
||||
Result:= UTF8CompareText(S1, S2);
|
||||
end;
|
||||
|
||||
function TStringListEx.IndexOfValue(const Value: String): Integer;
|
||||
|
|
|
|||
|
|
@ -14,19 +14,10 @@ const
|
|||
CLOSE_RANGE_CLOEXEC = (1 << 2);
|
||||
|
||||
function CloseRange(first: cuint; last: cuint; flags: cint): cint; cdecl;
|
||||
function mbFileCopyXattr(const Source, Target: String): Boolean;
|
||||
|
||||
// MacOS File Utils
|
||||
function MacosFileSetCreationTime( const path:String; const birthtime:TFileTimeEx ): Boolean;
|
||||
|
||||
type
|
||||
|
||||
{ TDarwinFileUtil }
|
||||
|
||||
TDarwinFileUtil = class
|
||||
class function cloneFile( const fromPath: String; const toPath: String; const size: Int64 ): Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
|
|
@ -43,32 +34,6 @@ const
|
|||
PROC_PIDLISTFDS = 1;
|
||||
PROC_PIDLISTFD_SIZE = SizeOf(proc_fdinfo);
|
||||
|
||||
const
|
||||
NSAppKitVersionNumber10_13 = 1561;
|
||||
|
||||
const
|
||||
COPYFILE_ACL = 1 shl 0;
|
||||
COPYFILE_STAT = 1 shl 1;
|
||||
COPYFILE_XATTR = 1 shl 2;
|
||||
COPYFILE_DATA = 1 shl 3;
|
||||
|
||||
COPYFILE_SECURITY = COPYFILE_STAT or COPYFILE_ACL;
|
||||
COPYFILE_METADATA = COPYFILE_SECURITY or COPYFILE_XATTR;
|
||||
COPYFILE_ALL = COPYFILE_METADATA or COPYFILE_DATA;
|
||||
|
||||
COPYFILE_UNLINK = 1 shl 21;
|
||||
COPYFILE_CLONE = 1 shl 24;
|
||||
COPYFILE_CLONE_FORCE = 1 shl 25;
|
||||
|
||||
type
|
||||
copyfile_state_t_o = record
|
||||
end;
|
||||
copyfile_state_t = ^copyfile_state_t_o;
|
||||
copyfile_flags_t = UInt32;
|
||||
|
||||
function copyfile( const fromPath: pchar; const toPath: pchar; state: copyfile_state_t; flags: copyfile_flags_t ): Integer;
|
||||
cdecl; external name 'copyfile';
|
||||
|
||||
function proc_pidinfo(pid: cint; flavor: cint; arg: cuint64; buffer: pointer; buffersize: cint): cint; cdecl; external 'proc';
|
||||
|
||||
function CloseRange(first: cuint; last: cuint; flags: cint): cint; cdecl;
|
||||
|
|
@ -103,16 +68,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function mbFileCopyXattr(const Source, Target: String): Boolean;
|
||||
var
|
||||
ret: Integer;
|
||||
begin
|
||||
Writeln( '>>3> mbFileCopyXattr' );
|
||||
ret:= copyfile( pchar(Source), pchar(Target), nil, COPYFILE_XATTR );
|
||||
fpseterrno( ret );
|
||||
Result:= (ret=0);
|
||||
end;
|
||||
|
||||
function StringToNSString(const S: String): NSString;
|
||||
begin
|
||||
Result:= NSString(NSString.stringWithUTF8String(PAnsiChar(S)));
|
||||
|
|
@ -133,39 +88,5 @@ begin
|
|||
Result:= NSFileManager.defaultManager.setAttributes_ofItemAtPath_error( attrs, nsPath, nil );
|
||||
end;
|
||||
|
||||
{ TDarwinFileUtil }
|
||||
|
||||
// the copyfile() api has two advantages:
|
||||
// 1. dramatically improve file copy speed on APFS
|
||||
// 2. supports copying macOS specific attributes
|
||||
// therefore, we should try copyfile() as much as possible on macOS
|
||||
class function TDarwinFileUtil.cloneFile( const fromPath: String; const toPath: String; const size: Int64 ): Boolean;
|
||||
const
|
||||
NO_CALLBACK_MAXSIZE = 20*1024*1024; // 20MB
|
||||
var
|
||||
flags: copyfile_flags_t;
|
||||
ret: Integer;
|
||||
begin
|
||||
Result:= False;
|
||||
flags:= COPYFILE_ALL;
|
||||
|
||||
// call copyfile() when:
|
||||
// 1. macOS < 10.13 and filesize <= MAX_SIZE (copy only)
|
||||
// 2. macOS >= 10.13 and filesize > MAX_SIZE (clone only, fail fast)
|
||||
// 3. macOS >= 10.13 and filesize <= MAX_SIZE (try clone, then copy)
|
||||
if NSAppKitVersionNumber < NSAppKitVersionNumber10_13 then begin
|
||||
if size > NO_CALLBACK_MAXSIZE then
|
||||
Exit;
|
||||
end else begin
|
||||
if size > NO_CALLBACK_MAXSIZE then
|
||||
flags:= flags or COPYFILE_CLONE_FORCE or COPYFILE_UNLINK
|
||||
else
|
||||
flags:= flags or COPYFILE_CLONE;
|
||||
end;
|
||||
|
||||
ret:= copyfile( pchar(fromPath), pchar(toPath), nil, flags );
|
||||
Result:= (ret=0);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,6 @@ const
|
|||
S_IRWXU = S_IRUSR or S_IWUSR or S_IXUSR;
|
||||
S_IRWXG = S_IRGRP or S_IWGRP or S_IXGRP;
|
||||
S_IRWXO = S_IROTH or S_IWOTH or S_IXOTH;
|
||||
S_IRUGO = S_IRUSR or S_IRGRP or S_IROTH;
|
||||
S_IWUGO = S_IWUSR or S_IWGRP or S_IWOTH;
|
||||
S_IXUGO = S_IXUSR or S_IXGRP or S_IXOTH;
|
||||
|
||||
{ POSIX setuid(), setgid(), and sticky bit }
|
||||
|
|
@ -103,7 +101,6 @@ const
|
|||
function WinToUnixFileAttr(Attr: TFileAttrs): TFileAttrs;
|
||||
function UnixToWinFileAttr(Attr: TFileAttrs): TFileAttrs;
|
||||
function UnixToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
|
||||
function WinToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
|
||||
function UnixToWinFileAttr(const FileName: String; Attr: TFileAttrs): TFileAttrs;
|
||||
|
||||
function SingleStrToFileAttr(sAttr: String): TFileAttrs;
|
||||
|
|
@ -233,17 +230,6 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function WinToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
|
||||
begin
|
||||
{$IF DEFINED(UNIX)}
|
||||
Result := WinToUnixFileAttr(Attr);
|
||||
{$ELSEIF DEFINED(MSWINDOWS)}
|
||||
Result := Attr;
|
||||
{$ELSE}
|
||||
Result := 0;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function UnixToWinFileAttr(const FileName: String; Attr: TFileAttrs): TFileAttrs;
|
||||
begin
|
||||
Result := UnixToWinFileAttr(Attr);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ const
|
|||
IO_REPARSE_TAG_LX_SYMLINK = $A000001D;
|
||||
|
||||
const
|
||||
LX_SYMLINK_HEADER_SIZE = 4;
|
||||
REPARSE_DATA_HEADER_SIZE = 8;
|
||||
MOUNT_POINT_HEADER_SIZE = 8;
|
||||
FILE_DOES_NOT_EXIST = DWORD(-1);
|
||||
|
|
@ -120,13 +119,6 @@ function CreateHardLink(const AFileName, ALinkName: UnicodeString): Boolean;
|
|||
@returns(The function returns @true if successful, @false otherwise)
|
||||
}
|
||||
function ReadSymLink(const aSymlinkFileName: UnicodeString; out aTargetFileName: UnicodeString): Boolean;
|
||||
{en
|
||||
Creates a WSL/Cygwin symbolic link.
|
||||
@param(aTargetFileName The name of the existing file)
|
||||
@param(aSymlinkFileName The name of the symbolic link)
|
||||
@returns(The function returns @true if successful, @false otherwise)
|
||||
}
|
||||
function CreateSymLinkUnix(const aTargetFileName: String; const aSymlinkFileName: UnicodeString): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -365,55 +357,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function CreateSymLinkUnix(const aTargetFileName: String; const aSymlinkFileName: UnicodeString): Boolean;
|
||||
var
|
||||
hDevice: THandle;
|
||||
dwLastError: DWORD;
|
||||
nInBufferSize: DWORD;
|
||||
dwPathBufferSize: DWORD;
|
||||
lpBytesReturned: DWORD = 0;
|
||||
lpInBuffer: PReparseDataBuffer;
|
||||
begin
|
||||
hDevice:= CreateFileW(PWideChar(aSymlinkFileName),
|
||||
GENERIC_WRITE, 0, nil, CREATE_NEW,
|
||||
FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
||||
if hDevice = INVALID_HANDLE_VALUE then Exit(False);
|
||||
dwPathBufferSize:= Length(aTargetFileName);
|
||||
nInBufferSize:= REPARSE_DATA_HEADER_SIZE + LX_SYMLINK_HEADER_SIZE + dwPathBufferSize;
|
||||
lpInBuffer:= GetMem(nInBufferSize);
|
||||
ZeroMemory(lpInBuffer, nInBufferSize);
|
||||
with lpInBuffer^, lpInBuffer^.LxSymlinkReparseBuffer do
|
||||
begin
|
||||
FileType:= 2; // symbolic link
|
||||
ReparseTag:= IO_REPARSE_TAG_LX_SYMLINK;
|
||||
ReparseDataLength:= LX_SYMLINK_HEADER_SIZE + dwPathBufferSize;
|
||||
CopyMemory(@PathBuffer[0], @aTargetFileName[1], Length(aTargetFileName));
|
||||
end;
|
||||
Result:= DeviceIoControl(hDevice, // handle to file or directory
|
||||
FSCTL_SET_REPARSE_POINT, // dwIoControlCode
|
||||
lpInBuffer, // input buffer
|
||||
nInBufferSize, // size of input buffer
|
||||
nil, // lpOutBuffer
|
||||
0, // nOutBufferSize
|
||||
lpBytesReturned, // lpBytesReturned
|
||||
nil); // OVERLAPPED structure
|
||||
// File system does not support reparse points
|
||||
// Create a normal file with the link target inside
|
||||
if (not Result) and (GetLastError = ERROR_INVALID_FUNCTION) then
|
||||
begin
|
||||
Result:= (FileWrite(hDevice, aTargetFileName[1], dwPathBufferSize) = dwPathBufferSize);
|
||||
if Result then SetFileAttributesW(PWideChar(aSymlinkFileName), FILE_ATTRIBUTE_SYSTEM);
|
||||
end;
|
||||
if not Result then dwLastError:= GetLastError;
|
||||
FreeMem(lpInBuffer);
|
||||
CloseHandle(hDevice);
|
||||
if not Result then
|
||||
begin
|
||||
DeleteFileW(PWideChar(aSymlinkFileName));
|
||||
SetLastError(dwLastError);
|
||||
end;
|
||||
end;
|
||||
|
||||
function ReadSymLink(const aSymlinkFileName: UnicodeString; out aTargetFileName: UnicodeString): Boolean;
|
||||
var
|
||||
L: Integer;
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ uses
|
|||
{$IFDEF LINUX}
|
||||
, DCLinux
|
||||
{$ENDIF}
|
||||
{$IFDEF DARWIN}
|
||||
, DCDarwin
|
||||
{$ENDIF}
|
||||
{$IFDEF HAIKU}
|
||||
, DCHaiku
|
||||
{$ENDIF}
|
||||
|
|
@ -57,8 +54,6 @@ const
|
|||
ERROR_NOT_SAME_DEVICE = Windows.ERROR_NOT_SAME_DEVICE;
|
||||
{$ENDIF}
|
||||
|
||||
FileNameNormalized = {$IFDEF DARWIN}True{$ELSE}False{$ENDIF};
|
||||
|
||||
type
|
||||
TFileMapRec = record
|
||||
FileHandle : System.THandle;
|
||||
|
|
@ -185,8 +180,6 @@ function MapFile(const sFileName : String; out FileMapRec : TFileMapRec) : Boole
|
|||
}
|
||||
procedure UnMapFile(var FileMapRec : TFileMapRec);
|
||||
|
||||
function NormalizeFileName(const Source: String): String;
|
||||
|
||||
{en
|
||||
Convert from console to UTF8 encoding.
|
||||
}
|
||||
|
|
@ -340,9 +333,6 @@ uses
|
|||
{$ENDIF}
|
||||
{$IF DEFINED(UNIX)}
|
||||
Unix, dl,
|
||||
{$ENDIF}
|
||||
{$IF DEFINED(DARWIN)}
|
||||
LazFileUtils,
|
||||
{$ENDIF}
|
||||
DCStrUtils, LazUTF8;
|
||||
|
||||
|
|
@ -619,14 +609,6 @@ begin
|
|||
if Assigned(Errors) then Errors^[caoCopyOwnership]:= GetLastOSError;
|
||||
end;
|
||||
end;
|
||||
if caoCopyTime in Options then
|
||||
begin
|
||||
if DC_SymLinkSetTime(sDst, StatInfo.mtime, StatInfo.atime) = false then
|
||||
begin
|
||||
Include(Result, caoCopyTime);
|
||||
if Assigned(Errors) then Errors^[caoCopyTime]:= GetLastOSError;
|
||||
end;
|
||||
end;
|
||||
{$IF DEFINED(HAIKU)}
|
||||
if caoCopyXattributes in Options then
|
||||
begin
|
||||
|
|
@ -673,7 +655,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
{$IF DEFINED(LINUX) or DEFINED(DARWIN) or DEFINED(HAIKU)}
|
||||
{$IF DEFINED(LINUX) or DEFINED(HAIKU)}
|
||||
if caoCopyXattributes in Options then
|
||||
begin
|
||||
if not mbFileCopyXattr(sSrc, sDst) then
|
||||
|
|
@ -861,17 +843,6 @@ begin
|
|||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function NormalizeFileName(const Source: String): String; inline;
|
||||
{$IF DEFINED(DARWIN)}
|
||||
begin
|
||||
Result:= GetDarwinNormalizedFileName(Source);
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
Result:= Source;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function ConsoleToUTF8(const Source: String): RawByteString;
|
||||
{$IFDEF MSWINDOWS}
|
||||
begin
|
||||
|
|
@ -895,7 +866,7 @@ begin
|
|||
if (Mode and fmOpenNoATime <> 0) then
|
||||
begin
|
||||
if (Result <> feInvalidHandle) then
|
||||
SetFileTime(Result, nil, @ft, nil)
|
||||
SetFileTime(Result, nil, @ft, @ft)
|
||||
else if GetLastError = ERROR_ACCESS_DENIED then
|
||||
Result := mbFileOpen(FileName, Mode and not fmOpenNoATime);
|
||||
end;
|
||||
|
|
@ -983,23 +954,24 @@ var
|
|||
Handle: System.THandle;
|
||||
FindData: TWin32FindDataW;
|
||||
begin
|
||||
Handle:= FindFirstFileW(PWideChar(UTF16LongName(FileName)), FindData);
|
||||
Handle := FindFirstFileW(PWideChar(UTF16LongName(FileName)), FindData);
|
||||
if Handle <> INVALID_HANDLE_VALUE then
|
||||
begin
|
||||
Windows.FindClose(Handle);
|
||||
Exit(DCBasicTypes.TFileTime(FindData.ftLastWriteTime));
|
||||
end;
|
||||
begin
|
||||
Windows.FindClose(Handle);
|
||||
if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
|
||||
Exit(DCBasicTypes.TWinFileTime(FindData.ftLastWriteTime));
|
||||
end;
|
||||
Result:= DCBasicTypes.TFileTime(-1);
|
||||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
Info: BaseUnix.Stat;
|
||||
begin
|
||||
Result:= DCBasicTypes.TFileTime(-1);
|
||||
if fpStat(UTF8ToSys(FileName), Info) >= 0 then
|
||||
Result:= DCBasicTypes.TFileTime(Info.st_mtime)
|
||||
else begin
|
||||
Result:= DCBasicTypes.TFileTime(-1);
|
||||
end;
|
||||
{$PUSH}{$R-}
|
||||
Result := Info.st_mtime;
|
||||
{$POP}
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
|
@ -1646,16 +1618,8 @@ begin
|
|||
Result := mbFileGetAttr(Path) <> faInvalidAttributes;
|
||||
end;
|
||||
|
||||
function mbCompareFileNames(const FileName1, FileName2: String): Boolean;
|
||||
{$IF DEFINED(DARWIN)}
|
||||
begin
|
||||
if (Length(FileName1) = 0) or (Length(FileName2) = 0) then
|
||||
Result:= (FileName1 = FileName2)
|
||||
else begin
|
||||
Result:= CompareFilenamesIgnoreCase(FileName1, FileName2) = 0;
|
||||
end;
|
||||
end;
|
||||
{$ELSEIF DEFINED(MSWINDOWS)}
|
||||
function mbCompareFileNames(const FileName1, FileName2: String): Boolean; inline;
|
||||
{$IF DEFINED(WINDOWS) OR DEFINED(DARWIN)}
|
||||
begin
|
||||
Result:= (UnicodeCompareText(CeUtf8ToUtf16(FileName1), CeUtf8ToUtf16(FileName2)) = 0);
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -42,14 +42,12 @@ type
|
|||
private
|
||||
FList: PStringHashItemList;
|
||||
FCount: Integer;
|
||||
fNormalize: Boolean;
|
||||
fCaseSensitive: Boolean;
|
||||
function BinarySearch(HashValue: Cardinal): Integer;
|
||||
function CompareString(const Low, Key: String): Boolean;
|
||||
function CompareValue(const Value1, Value2: Cardinal): Integer;
|
||||
procedure FindHashBoundaries(HashValue: Cardinal; StartFrom: Integer; out First, Last: Integer);
|
||||
function GetData(const S: String): Pointer;
|
||||
procedure SetNormalize(AValue: Boolean);
|
||||
procedure SetCaseSensitive(const Value: Boolean);
|
||||
procedure Delete(Index: Integer);
|
||||
procedure SetData(const S: String; const AValue: Pointer);
|
||||
|
|
@ -68,7 +66,6 @@ type
|
|||
function Remove(const S: String): Integer;
|
||||
function Remove(const S: String; Data: Pointer): Integer;
|
||||
procedure FindBoundaries(StartFrom: Integer; out First, Last: Integer);
|
||||
property Normalize: Boolean read fNormalize write SetNormalize;
|
||||
property CaseSensitive: Boolean read fCaseSensitive write SetCaseSensitive;
|
||||
property Count: Integer read FCount;
|
||||
property Data[const S: String]: Pointer read GetData write SetData; default;
|
||||
|
|
@ -78,7 +75,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
LazUTF8, DCOSUtils;
|
||||
LazUTF8;
|
||||
|
||||
{ TStringHashListUtf8 }
|
||||
|
||||
|
|
@ -100,10 +97,6 @@ begin
|
|||
else begin
|
||||
Text:= UTF8LowerCase(S);
|
||||
end;
|
||||
if fNormalize then
|
||||
begin
|
||||
Text:= NormalizeFileName(Text);
|
||||
end;
|
||||
New(Item);
|
||||
Val:= HashOf(Text);
|
||||
Item^.HashValue := Val;
|
||||
|
|
@ -187,20 +180,13 @@ var
|
|||
begin
|
||||
P:= Pointer(Low);
|
||||
Len:= Length(Low);
|
||||
if not fNormalize then
|
||||
begin
|
||||
LKey:= Key;
|
||||
end
|
||||
else begin
|
||||
LKey:= NormalizeFileName(Key);
|
||||
end;
|
||||
if fCaseSensitive then
|
||||
begin
|
||||
Result:= (Len = Length(LKey));
|
||||
if Result then Result:= (CompareByte(P^, Pointer(LKey)^, Len) = 0);
|
||||
Result:= (Len = Length(Key));
|
||||
if Result then Result:= (CompareByte(P^, Pointer(Key)^, Len) = 0);
|
||||
end
|
||||
else begin
|
||||
LKey:= UTF8LowerCase(LKey);
|
||||
LKey:= UTF8LowerCase(Key);
|
||||
Result:= (Len = Length(LKey));
|
||||
if Result then Result:= (CompareByte(P^, Pointer(LKey)^, Len) = 0);
|
||||
end;
|
||||
|
|
@ -246,18 +232,6 @@ begin
|
|||
Add(S,AValue);
|
||||
end;
|
||||
|
||||
procedure TStringHashListUtf8.SetNormalize(AValue: Boolean);
|
||||
begin
|
||||
if fNormalize <> AValue then
|
||||
begin
|
||||
if Count > 0 then
|
||||
begin
|
||||
raise EListError.Create(lrsListMustBeEmpty);
|
||||
end;
|
||||
fNormalize := AValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TStringHashListUtf8.Destroy;
|
||||
begin
|
||||
Clear;
|
||||
|
|
@ -275,10 +249,6 @@ begin
|
|||
else begin
|
||||
Text:= UTF8LowerCase(S);
|
||||
end;
|
||||
if fNormalize then
|
||||
begin
|
||||
Text:= NormalizeFileName(Text);
|
||||
end;
|
||||
Value:= HashOf(Text);
|
||||
Result:= BinarySearch(Value);
|
||||
if (Result <> -1) and not CompareString(Text, FList[Result]^.Key) then
|
||||
|
|
@ -305,10 +275,6 @@ begin
|
|||
else begin
|
||||
Text:= UTF8LowerCase(S);
|
||||
end;
|
||||
if fNormalize then
|
||||
begin
|
||||
Text:= NormalizeFileName(Text);
|
||||
end;
|
||||
Value:= HashOf(Text);
|
||||
Result:= BinarySearch(Value);
|
||||
if (Result <> -1) and
|
||||
|
|
@ -369,8 +335,7 @@ end;
|
|||
|
||||
constructor TStringHashListUtf8.Create(CaseSensitivity: boolean);
|
||||
begin
|
||||
fNormalize:= FileNameNormalized;
|
||||
fCaseSensitive:= CaseSensitivity;
|
||||
fCaseSensitive:=CaseSensitivity;
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,6 @@ function TrimPath(const Path: String): String;
|
|||
}
|
||||
function TrimRightLineEnding(const sText: String; TextLineBreakStyle: TTextLineBreakStyle): String;
|
||||
function mbCompareText(const s1, s2: String): PtrInt;
|
||||
function mbCompareStr(const s1, s2: String): PtrInt;
|
||||
|
||||
function StrNewW(const mbString: String): PWideChar;
|
||||
procedure StrDisposeW(var pStr : PWideChar);
|
||||
|
|
@ -753,12 +752,12 @@ begin
|
|||
|
||||
sBasePath := IncludeTrailingPathDelimiter(sBasePath);
|
||||
|
||||
BasePathLength := UTF8Length(sBasePath);
|
||||
PathToCheckLength := UTF8Length(sPathToCheck);
|
||||
BasePathLength := Length(sBasePath);
|
||||
PathToCheckLength := Length(sPathToCheck);
|
||||
|
||||
if PathToCheckLength > BasePathLength then
|
||||
begin
|
||||
if mbCompareFileNames(UTF8Copy(sPathToCheck, 1, BasePathLength), sBasePath) then
|
||||
if mbCompareFileNames(Copy(sPathToCheck, 1, BasePathLength), sBasePath) then
|
||||
begin
|
||||
if AllowSubDirs then
|
||||
Result := True
|
||||
|
|
@ -767,10 +766,10 @@ begin
|
|||
// Additionally check if the remaining path is a relative path.
|
||||
|
||||
// Look for a path delimiter in the middle of the filepath.
|
||||
sPathToCheck := UTF8Copy(sPathToCheck, 1 + BasePathLength,
|
||||
sPathToCheck := Copy(sPathToCheck, 1 + BasePathLength,
|
||||
PathToCheckLength - BasePathLength);
|
||||
|
||||
DelimiterPos := UTF8Pos(DirectorySeparator, sPathToCheck);
|
||||
DelimiterPos := Pos(DirectorySeparator, sPathToCheck);
|
||||
|
||||
// If no delimiter was found or it was found at then end (directories
|
||||
// may end with it), then the 'sPathToCheck' is in 'sBasePath'.
|
||||
|
|
@ -785,7 +784,7 @@ begin
|
|||
(((PathToCheckLength = BasePathLength) and
|
||||
(mbCompareFileNames(sPathToCheck, sBasePath))) or
|
||||
((PathToCheckLength = BasePathLength - 1) and
|
||||
(mbCompareFileNames(UTF8Copy(sBasePath, 1, PathToCheckLength), sPathToCheck))));
|
||||
(mbCompareFileNames(Copy(sBasePath, 1, PathToCheckLength), sPathToCheck))));
|
||||
end;
|
||||
|
||||
function ExtractDirLevel(const sPrefix, sPath: String): String;
|
||||
|
|
@ -1025,12 +1024,9 @@ end;
|
|||
|
||||
function mbCompareText(const s1, s2: String): PtrInt; inline;
|
||||
begin
|
||||
Result := UnicodeCompareText(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
|
||||
end;
|
||||
|
||||
function mbCompareStr(const s1, s2: String): PtrInt; inline;
|
||||
begin
|
||||
Result := UnicodeCompareStr(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
|
||||
// From 0.9.31 LazUtils can be used but this package does not exist in 0.9.30.
|
||||
// Result := LazUTF8.UTF8CompareText(s1, s2);
|
||||
Result := WideCompareText(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
|
||||
end;
|
||||
|
||||
function StrNewW(const mbString: String): PWideChar;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,9 @@ const
|
|||
FD_CLOEXEC = 1;
|
||||
O_CLOEXEC = &02000000;
|
||||
O_PATH = &010000000;
|
||||
_SC_NPROCESSORS_CONF = 83;
|
||||
_SC_NPROCESSORS_ONLN = 84;
|
||||
{$ELSEIF DEFINED(FREEBSD)}
|
||||
O_CLOEXEC = &04000000;
|
||||
_SC_NPROCESSORS_CONF = 57;
|
||||
_SC_NPROCESSORS_ONLN = 58;
|
||||
CLOSE_RANGE_CLOEXEC = (1 << 2);
|
||||
{$ELSEIF DEFINED(NETBSD)}
|
||||
|
|
@ -56,7 +54,6 @@ const
|
|||
{$ELSEIF DEFINED(DARWIN)}
|
||||
F_NOCACHE = 48;
|
||||
O_CLOEXEC = $1000000;
|
||||
_SC_NPROCESSORS_CONF = 57;
|
||||
_SC_NPROCESSORS_ONLN = 58;
|
||||
{$ELSE}
|
||||
O_CLOEXEC = 0;
|
||||
|
|
@ -184,11 +181,6 @@ function DC_FileSetTime(const FileName: String;
|
|||
const birthtime: TFileTimeEx;
|
||||
const atime : TFileTimeEx ): Boolean;
|
||||
|
||||
// nanoseconds supported, does not follow symbolic links
|
||||
function DC_SymLinkSetTime(const FileName: String;
|
||||
const mtime : TFileTimeEx;
|
||||
const atime : TFileTimeEx ): Boolean;
|
||||
|
||||
|
||||
{en
|
||||
Set the close-on-exec flag to all
|
||||
|
|
@ -291,11 +283,13 @@ function fnmatch(const pattern: PAnsiChar; const str: PAnsiChar; flags: cint): c
|
|||
implementation
|
||||
|
||||
uses
|
||||
Unix, DCConvertEncoding, DCOSUtils, LazUTF8
|
||||
Unix, DCConvertEncoding, LazUTF8
|
||||
{$IF DEFINED(DARWIN)}
|
||||
, DCDarwin
|
||||
{$ELSEIF DEFINED(LINUX)}
|
||||
, Dos, DCLinux
|
||||
, Dos, DCLinux, DCOSUtils
|
||||
{$ELSEIF DEFINED(FREEBSD)}
|
||||
, DCOSUtils
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
|
|
@ -376,7 +370,6 @@ end;
|
|||
{$ENDIF}
|
||||
|
||||
function fputimes( path:pchar; times:Array of UnixType.timeval ): cint; cdecl; external clib name 'utimes';
|
||||
function flutimes( path:pchar; times:Array of UnixType.timeval ): cint; cdecl; external clib name 'lutimes';
|
||||
|
||||
function DC_FileSetTime(const FileName: String;
|
||||
const mtime : TFileTimeEx;
|
||||
|
|
@ -402,23 +395,6 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
// Like DC_FileSetTime but uses lutimes() instead of utimes(), so the
|
||||
// timestamp is set on the symlink itself rather than its target.
|
||||
function DC_SymLinkSetTime(const FileName: String;
|
||||
const mtime : TFileTimeEx;
|
||||
const atime : TFileTimeEx ): Boolean;
|
||||
var
|
||||
timevals: Array[0..1] of UnixType.timeval;
|
||||
begin
|
||||
// last access time
|
||||
timevals[0].tv_sec:= atime.sec;
|
||||
timevals[0].tv_usec:= round( Extended(atime.nanosec) / 1000.0 );
|
||||
// last modification time
|
||||
timevals[1].tv_sec:= mtime.sec;
|
||||
timevals[1].tv_usec:= round( Extended(mtime.nanosec) / 1000.0 );
|
||||
Result:= flutimes(pchar(UTF8ToSys(FileName)), timevals) = 0;
|
||||
end;
|
||||
|
||||
{$IF DEFINED(BSD)}
|
||||
type rlim_t = Int64;
|
||||
{$ENDIF}
|
||||
|
|
@ -516,22 +492,21 @@ begin
|
|||
begin
|
||||
if (I = 1) then
|
||||
sTemp:= PathDelim
|
||||
else begin
|
||||
else
|
||||
sTemp:= Copy(FileName, 1, I - 1);
|
||||
end;
|
||||
// Stat for current directory
|
||||
if (fpLStat(sTemp, recStat) < 0) then Continue;
|
||||
// If it is a link then checking link destination
|
||||
if fpS_ISLNK(recStat.st_mode) then
|
||||
begin
|
||||
sTemp:= mbReadAllLinks(sTemp);
|
||||
sTemp:= fpReadlink(sTemp);
|
||||
Result:= FindMountPointPath(sTemp);
|
||||
Exit;
|
||||
end;
|
||||
// Check device ID
|
||||
if (recStat.st_dev <> st_dev) then
|
||||
begin
|
||||
Result:= IncludeTrailingPathDelimiter(Copy(FileName, 1, J));
|
||||
Result:= Copy(FileName, 1, J);
|
||||
Exit;
|
||||
end;
|
||||
J:= I;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ end"/>
|
|||
</CompilerOptions>
|
||||
<Description Value="Common units for Double Commander"/>
|
||||
<License Value="GNU GPL 2"/>
|
||||
<Version Minor="4" Release="3"/>
|
||||
<Files Count="13">
|
||||
<Version Minor="4" Release="2"/>
|
||||
<Files Count="12">
|
||||
<Item1>
|
||||
<Filename Value="dcclassesutf8.pas"/>
|
||||
<UnitName Value="DCClassesUtf8"/>
|
||||
|
|
@ -86,10 +86,6 @@ end"/>
|
|||
<Filename Value="dcjsonconfig.pas"/>
|
||||
<UnitName Value="DCJsonConfig"/>
|
||||
</Item12>
|
||||
<Item13>
|
||||
<Filename Value="dcclasses.pas"/>
|
||||
<UnitName Value="DCClasses"/>
|
||||
</Item13>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="2">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ interface
|
|||
uses
|
||||
DCClassesUtf8, DCOSUtils, DCStrUtils, DCBasicTypes, DCFileAttributes,
|
||||
DCConvertEncoding, DCDateTimeUtils, DCXmlConfig, DCProcessUtf8,
|
||||
DCUnicodeUtils, DCStringHashListUtf8, DCJsonConfig, DCClasses;
|
||||
DCUnicodeUtils, DCStringHashListUtf8, DCJsonConfig;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
|||
370
components/gifanim/doublecmd.diff
Normal file
370
components/gifanim/doublecmd.diff
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
Index: gifanim.pas
|
||||
===================================================================
|
||||
--- gifanim.pas (revision none)
|
||||
+++ gifanim.pas (working copy)
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
uses
|
||||
Classes, LCLProc, Lresources, SysUtils, Controls, Graphics, ExtCtrls,
|
||||
- IntfGraphics, FPimage, Contnrs, GraphType, dialogs;
|
||||
+ IntfGraphics, FPimage, Contnrs, GraphType, dialogs, types;
|
||||
|
||||
const
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
procedure DoAutoSize; override;
|
||||
procedure DoStartAnim;
|
||||
procedure DoStopAnim;
|
||||
- class function GetControlClassDefaultSize: TPoint; override;
|
||||
+ class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure GifChanged;
|
||||
procedure LoadFromFile(const Filename: string); virtual;
|
||||
procedure Paint; override;
|
||||
@@ -203,6 +203,8 @@
|
||||
{ Public declarations }
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
+ procedure NextFrame;
|
||||
+ procedure PriorFrame;
|
||||
property Empty: boolean Read FEmpty;
|
||||
property GifBitmaps: TGifList Read FGifBitmaps;
|
||||
property GifIndex: integer Read FCurrentImage;
|
||||
@@ -237,28 +239,9 @@
|
||||
|
||||
implementation
|
||||
|
||||
-uses LazIDEIntf, propedits;
|
||||
-Type
|
||||
- TGifFileNamePropertyEditor=class(TFileNamePropertyEditor)
|
||||
- protected
|
||||
- function GetFilter: String; override;
|
||||
- function GetInitialDirectory: string; override;
|
||||
- end;
|
||||
-function TGifFileNamePropertyEditor.GetFilter: String;
|
||||
-begin
|
||||
- Result := 'GIF|*.gif';
|
||||
-end;
|
||||
-
|
||||
-function TGifFileNamePropertyEditor.GetInitialDirectory: string;
|
||||
-begin
|
||||
- Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
-end;
|
||||
-
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Wile64', [TGifAnim]);
|
||||
- RegisterPropertyEditor(TypeInfo(String),
|
||||
- TGifAnim, 'FileName', TGifFileNamePropertyEditor);
|
||||
end;
|
||||
|
||||
{ TGifAnim }
|
||||
@@ -268,7 +251,7 @@
|
||||
inherited Create(AOwner);
|
||||
ControlStyle := [csCaptureMouse, csClickEvents, csDoubleClicks];
|
||||
AutoSize := True;
|
||||
- SetInitialBounds(0, 0, GetControlClassDefaultSize.X, GetControlClassDefaultSize.Y);
|
||||
+ SetInitialBounds(0, 0, GetControlClassDefaultSize.CX, GetControlClassDefaultSize.CY);
|
||||
FEmpty := True;
|
||||
FCurrentImage := 0;
|
||||
CurrentView := TBitmap.Create;
|
||||
@@ -295,6 +278,59 @@
|
||||
CurrentView.Free;
|
||||
end;
|
||||
|
||||
+procedure TGifAnim.NextFrame;
|
||||
+begin
|
||||
+ if (not FEmpty) and Visible and (not FAnimate) then
|
||||
+ begin
|
||||
+ if FCurrentImage >= GifBitmaps.Count - 1 then
|
||||
+ FCurrentImage := 0
|
||||
+ else
|
||||
+ Inc(FCurrentImage);
|
||||
+ if Assigned(FOnFrameChanged) then
|
||||
+ FOnFrameChanged(Self);
|
||||
+ Repaint;
|
||||
+ end;
|
||||
+end;
|
||||
+
|
||||
+procedure TGifAnim.PriorFrame;
|
||||
+var
|
||||
+ DesiredImage: Integer;
|
||||
+begin
|
||||
+ if (not FEmpty) and Visible and (not FAnimate) then
|
||||
+ begin
|
||||
+ if FCurrentImage = 0 then
|
||||
+ DesiredImage:= GifBitmaps.Count - 1
|
||||
+ else
|
||||
+ DesiredImage:= FCurrentImage - 1;
|
||||
+ // For proper display repaint image from first frame to desired frame
|
||||
+ FCurrentImage:= 0;
|
||||
+ while FCurrentImage < DesiredImage do
|
||||
+ begin
|
||||
+ with GifBitmaps.Items[FCurrentImage] do
|
||||
+ begin
|
||||
+ BufferImg.Canvas.Brush.Color := (Self.Color);
|
||||
+ if FCurrentImage = 0 then
|
||||
+ BufferImg.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
+ if Delay <> 0 then
|
||||
+ FWait.Interval := Delay * 10;
|
||||
+ BufferImg.Canvas.Draw(PosX, PosY, Bitmap);
|
||||
+ case Method of
|
||||
+ //0 : Not specified...
|
||||
+ //1 : No change Background
|
||||
+ 2: BufferImg.Canvas.FillRect(
|
||||
+ Rect(PosX, PosY, Bitmap.Width + PosX, Bitmap.Height + PosY));
|
||||
+
|
||||
+ 3: BufferImg.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
+ end;
|
||||
+ end;
|
||||
+ Inc(FCurrentImage);
|
||||
+ end;
|
||||
+ if Assigned(FOnFrameChanged) then
|
||||
+ FOnFrameChanged(Self);
|
||||
+ Repaint;
|
||||
+ end;
|
||||
+end;
|
||||
+
|
||||
function TGifAnim.LoadFromLazarusResource(const ResName: String): boolean;
|
||||
var
|
||||
GifLoader: TGifLoader;
|
||||
@@ -340,12 +376,13 @@
|
||||
begin
|
||||
if (not Empty) and Visible then
|
||||
begin
|
||||
- if FCurrentImage > GifBitmaps.Count - 1 then
|
||||
- FCurrentImage := 0;
|
||||
- if assigned(FOnFrameChanged) then
|
||||
- FOnFrameChanged(self);
|
||||
- Paint;
|
||||
- Inc(FCurrentImage);
|
||||
+ if FCurrentImage >= GifBitmaps.Count - 1 then
|
||||
+ FCurrentImage := 0
|
||||
+ else
|
||||
+ Inc(FCurrentImage);
|
||||
+ if Assigned(FOnFrameChanged) then
|
||||
+ FOnFrameChanged(Self);
|
||||
+ Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -365,27 +402,12 @@
|
||||
end;
|
||||
|
||||
procedure TGifAnim.SetFileName(const AValue: string);
|
||||
-var
|
||||
- fn: string;
|
||||
begin
|
||||
-
|
||||
- if (FFileName = AValue) then
|
||||
- exit;
|
||||
+ if (FFileName = AValue) then Exit;
|
||||
FFileName := AValue;
|
||||
ResetImage;
|
||||
- if (FFileName = '') then exit;
|
||||
- if (csDesigning in ComponentState) then
|
||||
- begin
|
||||
- fn:= ExtractFileName(AValue);
|
||||
- FFileName:= ExtractFilePath(AValue);
|
||||
- FFileName:= ExtractRelativepath(ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile) ,FFileName);
|
||||
- FFileName:=FFileName+fn;
|
||||
- LoadFromFile(FFileName+fn);
|
||||
- end
|
||||
- else begin
|
||||
- FFileName := AValue;
|
||||
- LoadFromFile(FFileName);
|
||||
- end;
|
||||
+ if (FFileName = '') then Exit;
|
||||
+ LoadFromFile(FFileName);
|
||||
if not Empty then
|
||||
GifChanged;
|
||||
end;
|
||||
@@ -441,10 +463,10 @@
|
||||
end;
|
||||
end;
|
||||
|
||||
-class function TGifAnim.GetControlClassDefaultSize: TPoint;
|
||||
+class function TGifAnim.GetControlClassDefaultSize: TSize;
|
||||
begin
|
||||
- Result.X := 90;
|
||||
- Result.Y := 90;
|
||||
+ Result.CX := 90;
|
||||
+ Result.CY := 90;
|
||||
end;
|
||||
|
||||
procedure TGifAnim.GifChanged;
|
||||
Index: gifanimdsgn.pas
|
||||
===================================================================
|
||||
--- gifanimdsgn.pas (revision 0)
|
||||
+++ gifanimdsgn.pas (revision 0)
|
||||
@@ -0,0 +1,41 @@
|
||||
+unit GifAnimDsgn;
|
||||
+
|
||||
+{$mode objfpc}{$H+}
|
||||
+
|
||||
+interface
|
||||
+
|
||||
+uses
|
||||
+ LazIDEIntf, PropEdits;
|
||||
+
|
||||
+Type
|
||||
+ TGifFileNamePropertyEditor = class(TFileNamePropertyEditor)
|
||||
+ protected
|
||||
+ function GetFilter: String; override;
|
||||
+ function GetInitialDirectory: string; override;
|
||||
+ end;
|
||||
+
|
||||
+procedure Register;
|
||||
+
|
||||
+implementation
|
||||
+
|
||||
+uses
|
||||
+ SysUtils, GifAnim;
|
||||
+
|
||||
+function TGifFileNamePropertyEditor.GetFilter: String;
|
||||
+begin
|
||||
+ Result := 'GIF|*.gif';
|
||||
+end;
|
||||
+
|
||||
+function TGifFileNamePropertyEditor.GetInitialDirectory: string;
|
||||
+begin
|
||||
+ Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
+end;
|
||||
+
|
||||
+procedure Register;
|
||||
+begin
|
||||
+ RegisterPropertyEditor(TypeInfo(String), TGifAnim,
|
||||
+ 'FileName', TGifFileNamePropertyEditor);
|
||||
+end;
|
||||
+
|
||||
+end.
|
||||
+
|
||||
Index: pkg_gifanim.lpk
|
||||
===================================================================
|
||||
--- pkg_gifanim.lpk (revision none)
|
||||
+++ pkg_gifanim.lpk (working copy)
|
||||
@@ -1,15 +1,21 @@
|
||||
-<?xml version="1.0"?>
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
- <Package Version="3">
|
||||
+ <Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="pkg_gifanim"/>
|
||||
+ <AddToProjectUsesSection Value="True"/>
|
||||
<Author Value="Laurent Jacques"/>
|
||||
<CompilerOptions>
|
||||
- <Version Value="8"/>
|
||||
+ <Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
- <OtherUnitFiles Value="$(LazarusDir)\ide\"/>
|
||||
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
+ <Linking>
|
||||
+ <Debugging>
|
||||
+ <DebugInfoType Value="dsDwarf2Set"/>
|
||||
+ </Debugging>
|
||||
+ </Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
@@ -33,15 +39,16 @@
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
- <PackageName Value="FCL"/>
|
||||
+ <PackageName Value="LCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
- <PackageName Value="IDEIntf"/>
|
||||
+ <PackageName Value="FCL"/>
|
||||
+ <MinVersion Major="1" Valid="True"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
- <UnitPath Value="$(PkgOutDir)\"/>
|
||||
+ <UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
Index: pkg_gifanim_dsgn.lpk
|
||||
===================================================================
|
||||
--- pkg_gifanim_dsgn.lpk (revision 0)
|
||||
+++ pkg_gifanim_dsgn.lpk (revision 0)
|
||||
@@ -0,0 +1,49 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<CONFIG>
|
||||
+ <Package Version="4">
|
||||
+ <PathDelim Value="\"/>
|
||||
+ <Name Value="pkg_gifanim_dsgn"/>
|
||||
+ <CompilerOptions>
|
||||
+ <Version Value="11"/>
|
||||
+ <PathDelim Value="\"/>
|
||||
+ <SearchPaths>
|
||||
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
+ </SearchPaths>
|
||||
+ <Linking>
|
||||
+ <Debugging>
|
||||
+ <DebugInfoType Value="dsDwarf2Set"/>
|
||||
+ </Debugging>
|
||||
+ </Linking>
|
||||
+ <Other>
|
||||
+ <CompilerMessages>
|
||||
+ <MsgFileName Value=""/>
|
||||
+ </CompilerMessages>
|
||||
+ <CompilerPath Value="$(CompPath)"/>
|
||||
+ </Other>
|
||||
+ </CompilerOptions>
|
||||
+ <License Value="GPL"/>
|
||||
+ <Version Major="1" Minor="4"/>
|
||||
+ <Files Count="1">
|
||||
+ <Item1>
|
||||
+ <Filename Value="gifanimdsgn.pas"/>
|
||||
+ <HasRegisterProc Value="True"/>
|
||||
+ <UnitName Value="GifAnimDsgn"/>
|
||||
+ </Item1>
|
||||
+ </Files>
|
||||
+ <Type Value="DesignTime"/>
|
||||
+ <RequiredPkgs Count="2">
|
||||
+ <Item1>
|
||||
+ <PackageName Value="IDEIntf"/>
|
||||
+ </Item1>
|
||||
+ <Item2>
|
||||
+ <PackageName Value="pkg_gifanim"/>
|
||||
+ </Item2>
|
||||
+ </RequiredPkgs>
|
||||
+ <UsageOptions>
|
||||
+ <UnitPath Value="$(PkgOutDir)"/>
|
||||
+ </UsageOptions>
|
||||
+ <PublishOptions>
|
||||
+ <Version Value="2"/>
|
||||
+ </PublishOptions>
|
||||
+ </Package>
|
||||
+</CONFIG>
|
||||
Index: pkg_gifanim_dsgn.pas
|
||||
===================================================================
|
||||
--- pkg_gifanim_dsgn.pas (revision 0)
|
||||
+++ pkg_gifanim_dsgn.pas (revision 0)
|
||||
@@ -0,0 +1,21 @@
|
||||
+{ This file was automatically created by Lazarus. Do not edit!
|
||||
+ This source is only used to compile and install the package.
|
||||
+ }
|
||||
+
|
||||
+unit pkg_gifanim_dsgn;
|
||||
+
|
||||
+interface
|
||||
+
|
||||
+uses
|
||||
+ GifAnimDsgn, LazarusPackageIntf;
|
||||
+
|
||||
+implementation
|
||||
+
|
||||
+procedure Register;
|
||||
+begin
|
||||
+ RegisterUnit('GifAnimDsgn', @GifAnimDsgn.Register);
|
||||
+end;
|
||||
+
|
||||
+initialization
|
||||
+ RegisterPackage('pkg_gifanim_dsgn', @Register);
|
||||
+end.
|
||||
25
components/gifanim/gifanim.lrs
Normal file
25
components/gifanim/gifanim.lrs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
LazarusResources.Add('tgifanim','XPM',[
|
||||
'/* XPM */'#13#10'static char * gifanim_xpm[] = {'#13#10'"24 24 31 1",'#13#10
|
||||
+'" '#9'c None",'#13#10'".'#9'c #959595",'#13#10'"+'#9'c #E1E1E1",'#13#10'"@'
|
||||
+#9'c #919191",'#13#10'"#'#9'c #848484",'#13#10'"$'#9'c #888888",'#13#10'"%'#9
|
||||
+'c #EEEEEE",'#13#10'"&'#9'c #E6E9EC",'#13#10'"*'#9'c #D6DFE8",'#13#10'"='#9
|
||||
+'c #FFFFFF",'#13#10'"-'#9'c #E7F0F9",'#13#10'";'#9'c #3783CE",'#13#10'">'#9
|
||||
+'c #FFF7F7",'#13#10'",'#9'c #FFEFEF",'#13#10'"'''#9'c #F7F2F5",'#13#10'")'#9
|
||||
+'c #F7FAFD",'#13#10'"!'#9'c #FF5757",'#13#10'"~'#9'c #FFDFDF",'#13#10'"{'#9
|
||||
+'c #FF4F4F",'#13#10'"]'#9'c #FFD7D7",'#13#10'"^'#9'c #FF4747",'#13#10'"/'#9
|
||||
+'c #FF3F3F",'#13#10'"('#9'c #8D8D8D",'#13#10'"_'#9'c #EEE6E6",'#13#10'":'#9
|
||||
+'c #EED6D6",'#13#10'"<'#9'c #EECECE",'#13#10'"['#9'c #FAFAFA",'#13#10'"}'#9
|
||||
+'c #F2F2F2",'#13#10'"|'#9'c #F6F6F6",'#13#10'"1'#9'c #A2A2A2",'#13#10'"2'#9
|
||||
+'c #FAF2F2",'#13#10'" .++@ @++. ",'#13#10'" @@@##$$$$$$$$$$$$##'
|
||||
+'@@@ ",'#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" .++@+%%&**&&**&%%+@++. "'
|
||||
+','#13#10'" @@@@%==-;;--;;-==%@@@@ ",'#13#10'" .++.%==-;;--;;-==%.++. ",'#13
|
||||
+#10'" .++.%>,''--))--'',>%.++. ",'#13#10'" @@@@%,!~>====>~!,%@@@@ ",'#13#10
|
||||
+'" .++.%>~{]~~~~]{~>%.++. ",'#13#10'" .++.%=>~^////^~>=%.++. ",'#13#10'" @@@'
|
||||
+'(+%%_:<<<<:_%%+(@@@ ",'#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" .++$#$$$'
|
||||
+'$$$$$$$$$#$++. ",'#13#10'" @@@(+%%&**&%%%%%%+(@@@ ",'#13#10'" .++.%==-;;-[}'
|
||||
+'}[==%.++. ",'#13#10'" .++.%==-;;-|11|==%.++. ",'#13#10'" @@@@%>,''--)[}}2,>'
|
||||
+'%@@@@ ",'#13#10'" .++.%,!~>====>~!,%.++. ",'#13#10'" .++.%>~{]~~~~]{~>%.++.'
|
||||
+' ",'#13#10'" @@@@%=>~^////^~>=%@@@@ ",'#13#10'" .++@+%%_:<<<<:_%%+@++. ",'
|
||||
+#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" @@@##$$$$$$$$$$$$##@@@ ",'#13#10
|
||||
+'" .++@ @++. "};'#13#10
|
||||
]);
|
||||
1117
components/gifanim/gifanim.pas
Normal file
1117
components/gifanim/gifanim.pas
Normal file
File diff suppressed because it is too large
Load diff
41
components/gifanim/gifanimdsgn.pas
Normal file
41
components/gifanim/gifanimdsgn.pas
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
unit GifAnimDsgn;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LazIDEIntf, PropEdits;
|
||||
|
||||
Type
|
||||
TGifFileNamePropertyEditor = class(TFileNamePropertyEditor)
|
||||
protected
|
||||
function GetFilter: String; override;
|
||||
function GetInitialDirectory: string; override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, GifAnim;
|
||||
|
||||
function TGifFileNamePropertyEditor.GetFilter: String;
|
||||
begin
|
||||
Result := 'GIF|*.gif';
|
||||
end;
|
||||
|
||||
function TGifFileNamePropertyEditor.GetInitialDirectory: string;
|
||||
begin
|
||||
Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterPropertyEditor(TypeInfo(String), TGifAnim,
|
||||
'FileName', TGifFileNamePropertyEditor);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
58
components/gifanim/pkg_gifanim.lpk
Normal file
58
components/gifanim/pkg_gifanim.lpk
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="pkg_gifanim"/>
|
||||
<AddToProjectUsesSection Value="True"/>
|
||||
<Author Value="Laurent Jacques"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Show Gif Animation
|
||||
"/>
|
||||
<License Value="GPL
|
||||
"/>
|
||||
<Version Major="1" Minor="5"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="gifanim.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="GifAnim"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="gifanim.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
||||
21
components/gifanim/pkg_gifanim.pas
Normal file
21
components/gifanim/pkg_gifanim.pas
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit pkg_gifanim;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GifAnim, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('GifAnim', @GifAnim.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('pkg_gifanim', @Register);
|
||||
end.
|
||||
49
components/gifanim/pkg_gifanim_dsgn.lpk
Normal file
49
components/gifanim/pkg_gifanim_dsgn.lpk
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="pkg_gifanim_dsgn"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<License Value="GPL"/>
|
||||
<Version Major="1" Minor="4"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="gifanimdsgn.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="GifAnimDsgn"/>
|
||||
</Item1>
|
||||
</Files>
|
||||
<Type Value="DesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="pkg_gifanim"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
||||
21
components/gifanim/pkg_gifanim_dsgn.pas
Normal file
21
components/gifanim/pkg_gifanim_dsgn.pas
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit pkg_gifanim_dsgn;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
GifAnimDsgn, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('GifAnimDsgn', @GifAnimDsgn.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('pkg_gifanim_dsgn', @Register);
|
||||
end.
|
||||
5
components/gifanim/readme.txt
Normal file
5
components/gifanim/readme.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
GifAnim
|
||||
http://wile64.perso.neuf.fr/download/download.php?cat=4&id=8
|
||||
Version 1.4 (14/09/2009)
|
||||
|
||||
Some modifications done for Double Commander (see doublecmd.diff).
|
||||
28
components/gifanim/ressource-file.txt
Normal file
28
components/gifanim/ressource-file.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
1) Gif in ressource file
|
||||
-------------------------
|
||||
|
||||
- Create ressource file with lazres ex : lazres mygif.lrs gif1.gif gif2.gif
|
||||
- Put TGifAnim on your form
|
||||
- In the FormCreate add (see down)
|
||||
|
||||
[code]
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
GifAnim1.LoadFromLazarusResource('gif1');
|
||||
GifAnim2.LoadFromLazarusResource('gif2');
|
||||
end;
|
||||
|
||||
[/code]
|
||||
|
||||
- And insert ressouce file in initialization section (see down)
|
||||
|
||||
[code]
|
||||
|
||||
initialization
|
||||
{$I unit1.lrs}
|
||||
{$I mesgif.lrs}
|
||||
|
||||
[/code]
|
||||
|
||||
58
components/gifanim/tgifanim.xpm
Normal file
58
components/gifanim/tgifanim.xpm
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/* XPM */
|
||||
static char * gifanim_xpm[] = {
|
||||
"24 24 31 1",
|
||||
" c None",
|
||||
". c #959595",
|
||||
"+ c #E1E1E1",
|
||||
"@ c #919191",
|
||||
"# c #848484",
|
||||
"$ c #888888",
|
||||
"% c #EEEEEE",
|
||||
"& c #E6E9EC",
|
||||
"* c #D6DFE8",
|
||||
"= c #FFFFFF",
|
||||
"- c #E7F0F9",
|
||||
"; c #3783CE",
|
||||
"> c #FFF7F7",
|
||||
", c #FFEFEF",
|
||||
"' c #F7F2F5",
|
||||
") c #F7FAFD",
|
||||
"! c #FF5757",
|
||||
"~ c #FFDFDF",
|
||||
"{ c #FF4F4F",
|
||||
"] c #FFD7D7",
|
||||
"^ c #FF4747",
|
||||
"/ c #FF3F3F",
|
||||
"( c #8D8D8D",
|
||||
"_ c #EEE6E6",
|
||||
": c #EED6D6",
|
||||
"< c #EECECE",
|
||||
"[ c #FAFAFA",
|
||||
"} c #F2F2F2",
|
||||
"| c #F6F6F6",
|
||||
"1 c #A2A2A2",
|
||||
"2 c #FAF2F2",
|
||||
" .++@ @++. ",
|
||||
" @@@##$$$$$$$$$$$$##@@@ ",
|
||||
" .++$#$$$$$$$$$$$$#$++. ",
|
||||
" .++@+%%&**&&**&%%+@++. ",
|
||||
" @@@@%==-;;--;;-==%@@@@ ",
|
||||
" .++.%==-;;--;;-==%.++. ",
|
||||
" .++.%>,'--))--',>%.++. ",
|
||||
" @@@@%,!~>====>~!,%@@@@ ",
|
||||
" .++.%>~{]~~~~]{~>%.++. ",
|
||||
" .++.%=>~^////^~>=%.++. ",
|
||||
" @@@(+%%_:<<<<:_%%+(@@@ ",
|
||||
" .++$#$$$$$$$$$$$$#$++. ",
|
||||
" .++$#$$$$$$$$$$$$#$++. ",
|
||||
" @@@(+%%&**&%%%%%%+(@@@ ",
|
||||
" .++.%==-;;-[}}[==%.++. ",
|
||||
" .++.%==-;;-|11|==%.++. ",
|
||||
" @@@@%>,'--)[}}2,>%@@@@ ",
|
||||
" .++.%,!~>====>~!,%.++. ",
|
||||
" .++.%>~{]~~~~]{~>%.++. ",
|
||||
" @@@@%=>~^////^~>=%@@@@ ",
|
||||
" .++@+%%_:<<<<:_%%+@++. ",
|
||||
" .++$#$$$$$$$$$$$$#$++. ",
|
||||
" @@@##$$$$$$$$$$$$##@@@ ",
|
||||
" .++@ @++. "};
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
GifView
|
||||
|
||||
Animated GIF Viewer Component
|
||||
|
||||
Copyright (C) 2025 Alexander Koblov
|
||||
|
||||
License:
|
||||
MPL 2.0
|
||||
|
||||
Based on:
|
||||
TGIFViewer
|
||||
https://github.com/jdelauney/TGIFViewer
|
||||
|
||||
Original author:
|
||||
Copyright (C) 2018 J.Delauney (BeanzMaster)
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="GifView"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<Author Value="Jérôme Delauney (BeanzMaster), Alexander Koblov"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="source"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Description Value="GIF Viewer"/>
|
||||
<License Value="MPL-2.0"/>
|
||||
<Version Major="1"/>
|
||||
<Files>
|
||||
<Item>
|
||||
<Filename Value="source\GifViewerStrConsts.pas"/>
|
||||
<UnitName Value="GifViewerStrConsts"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Filename Value="source\uFastBitmap.pas"/>
|
||||
<UnitName Value="uFastBitmap"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Filename Value="source\uGifViewer.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="uGifViewer"/>
|
||||
</Item>
|
||||
</Files>
|
||||
<RequiredPkgs>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
<MinVersion Major="2" Minor="2" Valid="True"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit GifView;
|
||||
|
||||
{$warn 5023 off : no warning about unused units}
|
||||
interface
|
||||
|
||||
uses
|
||||
GifViewerStrConsts, uFastBitmap, uGifViewer, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('uGifViewer', @uGifViewer.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('GifView', @Register);
|
||||
end.
|
||||
Binary file not shown.
|
|
@ -1,36 +0,0 @@
|
|||
Unit GifViewerStrConsts;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
Interface
|
||||
|
||||
ResourceString
|
||||
// Messages d'erreurs ou de notifications
|
||||
// Error or notification messages
|
||||
//uGifViewer
|
||||
rsScreenBadColorSize = 'Invalid number of colors in the global palette.';
|
||||
rsImageBadColorSize = 'Number of colors is invalid in local palette.';
|
||||
rsBadSignature = 'GIF invalid signature: %s';
|
||||
rsBadScreenSize = 'Invalid image size: %dx%d';
|
||||
rsEmptyColorMap = 'Error no palette of color available for this image!';
|
||||
rsEmptyImage = 'The picture is empty';
|
||||
rsUnknownVersion = 'Unknown GIF version';
|
||||
rsFileNotFound = 'The file %s not found !';
|
||||
rsResourceNotFound = 'Resource %s not found!';
|
||||
rsBufferOverFlow = 'Image #%d: The decoder has been stopped to prevent a buffer overflow';
|
||||
rsInvalidOutputBufferSize = 'Image #%d: The size of the output buffer is invalid (size < = 0)';
|
||||
rsInvalidInputBufferSize = 'Image #%d: The size of the input buffer is invalid (size < = 0)';
|
||||
rsInvalidBufferSize = 'Image #%d: The size of the input and output buffer are invalid (size < = 0)';
|
||||
rsLZWInternalErrorOutputBufferOverflow = 'Output buffer overflow in the GIF LZW decoder buffer. Report this bug. This is a serious bug!';
|
||||
rsLZWInternalErrorInputBufferOverflow = 'Input buffer overflow in the GIF LZW decoder. Report this bug. This is a serious bug!';
|
||||
rsLZWInvalidInput = 'Image #%d: The decoder encountered an invalid entry (corrupted data)';
|
||||
rsLZWOutputBufferTooSmall = 'Image #%d: The decoder could not decode all the data because the output buffer is too small';
|
||||
rsAllFrameCorrupted = 'All images in the GIF are corrupted. Unable to display GIF file.';
|
||||
//uFastBitmap
|
||||
rsBitmapCreateError = 'An Error occured while creating TBitmap';
|
||||
rsBitmapScanlineOutOfRange = 'Scanline : Index Out of range';
|
||||
|
||||
Implementation
|
||||
|
||||
End.
|
||||
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
Before Width: | Height: | Size: 975 B |
File diff suppressed because it is too large
Load diff
|
|
@ -1,204 +0,0 @@
|
|||
{
|
||||
Fast SHA256 using ARMv8-A + Cryptographic Extension
|
||||
|
||||
Copyright (C) 2025 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
Based on sha256_arm_shani.cpp
|
||||
https://github.com/bitcoin/bitcoin
|
||||
Copyright (C) 2022 The Bitcoin Core developers
|
||||
|
||||
Distributed under the MIT software license, see the accompanying
|
||||
file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
}
|
||||
|
||||
procedure sha256_compress_arm(CurrentHash: PLongWord; HashBuffer: PByte; BufferCount: UIntPtr); assembler; nostackframe;
|
||||
asm
|
||||
.long 0xad401003 // ldp q3, q4, [x0]
|
||||
.long 0xd1000443 // sub x3, x2, #0x1
|
||||
.long 0x4ea31c61 // mov v1.16b, v3.16b
|
||||
.long 0x4ea41c80 // mov v0.16b, v4.16b
|
||||
.long 0xb4000e62 // cbz x2, 1dc <sha256_compress_arm+0x1dc>
|
||||
.long 0x10000ee2 // adr x2, 1f0 <sha256_compress_arm+0x1f0>
|
||||
.long 0xad401426 // ldp q6, q5, [x1]
|
||||
.long 0xd1000463 // sub x3, x3, #0x1
|
||||
.long 0xad404041 // ldp q1, q16, [x2]
|
||||
.long 0xb100047f // cmn x3, #0x1
|
||||
.long 0x6e2008c6 // rev32 v6.16b, v6.16b
|
||||
.long 0x91010021 // add x1, x1, #0x40
|
||||
.long 0x4ea31c72 // mov v18.16b, v3.16b
|
||||
.long 0x4ea41c80 // mov v0.16b, v4.16b
|
||||
.long 0x6e2008a5 // rev32 v5.16b, v5.16b
|
||||
.long 0x4ea68421 // add v1.4s, v1.4s, v6.4s
|
||||
.long 0x3cde0022 // ldur q2, [x1, #-32]
|
||||
.long 0x4ea58610 // add v16.4s, v16.4s, v5.4s
|
||||
.long 0x5e014092 // sha256h q18, q4, v1.4s
|
||||
.long 0x5e015060 // sha256h2 q0, q3, v1.4s
|
||||
.long 0x6e200842 // rev32 v2.16b, v2.16b
|
||||
.long 0x3dc00847 // ldr q7, [x2, #32]
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x3cdf0021 // ldur q1, [x1, #-16]
|
||||
.long 0x4ea284e7 // add v7.4s, v7.4s, v2.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x6e200821 // rev32 v1.16b, v1.16b
|
||||
.long 0x5e2828a6 // sha256su0 v6.4s, v5.4s
|
||||
.long 0x5e282845 // sha256su0 v5.4s, v2.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e016046 // sha256su1 v6.4s, v2.4s, v1.4s
|
||||
.long 0x5e282822 // sha256su0 v2.4s, v1.4s
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad419c50 // ldp q16, q7, [x2, #48]
|
||||
.long 0x5e066025 // sha256su1 v5.4s, v1.4s, v6.4s
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea18610 // add v16.4s, v16.4s, v1.4s
|
||||
.long 0x4ea684e7 // add v7.4s, v7.4s, v6.4s
|
||||
.long 0x5e2828c1 // sha256su0 v1.4s, v6.4s
|
||||
.long 0x5e0560c2 // sha256su1 v2.4s, v6.4s, v5.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x5e2828a6 // sha256su0 v6.4s, v5.4s
|
||||
.long 0x5e0260a1 // sha256su1 v1.4s, v5.4s, v2.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad429c50 // ldp q16, q7, [x2, #80]
|
||||
.long 0x5e016046 // sha256su1 v6.4s, v2.4s, v1.4s
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea58610 // add v16.4s, v16.4s, v5.4s
|
||||
.long 0x4ea284e7 // add v7.4s, v7.4s, v2.4s
|
||||
.long 0x5e282845 // sha256su0 v5.4s, v2.4s
|
||||
.long 0x5e282822 // sha256su0 v2.4s, v1.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x5e066025 // sha256su1 v5.4s, v1.4s, v6.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e0560c2 // sha256su1 v2.4s, v6.4s, v5.4s
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad439c50 // ldp q16, q7, [x2, #112]
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea18610 // add v16.4s, v16.4s, v1.4s
|
||||
.long 0x4ea684e7 // add v7.4s, v7.4s, v6.4s
|
||||
.long 0x5e2828c1 // sha256su0 v1.4s, v6.4s
|
||||
.long 0x5e2828a6 // sha256su0 v6.4s, v5.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x5e0260a1 // sha256su1 v1.4s, v5.4s, v2.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e016046 // sha256su1 v6.4s, v2.4s, v1.4s
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad449c50 // ldp q16, q7, [x2, #144]
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea58610 // add v16.4s, v16.4s, v5.4s
|
||||
.long 0x4ea284e7 // add v7.4s, v7.4s, v2.4s
|
||||
.long 0x5e282845 // sha256su0 v5.4s, v2.4s
|
||||
.long 0x5e282822 // sha256su0 v2.4s, v1.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x5e066025 // sha256su1 v5.4s, v1.4s, v6.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e0560c2 // sha256su1 v2.4s, v6.4s, v5.4s
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad459c50 // ldp q16, q7, [x2, #176]
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea18610 // add v16.4s, v16.4s, v1.4s
|
||||
.long 0x4ea684e7 // add v7.4s, v7.4s, v6.4s
|
||||
.long 0x5e2828c1 // sha256su0 v1.4s, v6.4s
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x5e0260a1 // sha256su1 v1.4s, v5.4s, v2.4s
|
||||
.long 0x4eb11e32 // mov v18.16b, v17.16b
|
||||
.long 0x5e074012 // sha256h q18, q0, v7.4s
|
||||
.long 0x5e075220 // sha256h2 q0, q17, v7.4s
|
||||
.long 0xad469c50 // ldp q16, q7, [x2, #208]
|
||||
.long 0x4eb21e51 // mov v17.16b, v18.16b
|
||||
.long 0x4ea58610 // add v16.4s, v16.4s, v5.4s
|
||||
.long 0x4ea284e2 // add v2.4s, v7.4s, v2.4s
|
||||
.long 0x3dc03c45 // ldr q5, [x2, #240]
|
||||
.long 0x5e104011 // sha256h q17, q0, v16.4s
|
||||
.long 0x5e105240 // sha256h2 q0, q18, v16.4s
|
||||
.long 0x4ea184a1 // add v1.4s, v5.4s, v1.4s
|
||||
.long 0x4eb11e26 // mov v6.16b, v17.16b
|
||||
.long 0x5e024006 // sha256h q6, q0, v2.4s
|
||||
.long 0x5e025220 // sha256h2 q0, q17, v2.4s
|
||||
.long 0x4ea61cc2 // mov v2.16b, v6.16b
|
||||
.long 0x5e014002 // sha256h q2, q0, v1.4s
|
||||
.long 0x5e0150c0 // sha256h2 q0, q6, v1.4s
|
||||
.long 0x4ea28463 // add v3.4s, v3.4s, v2.4s
|
||||
.long 0x4ea08484 // add v4.4s, v4.4s, v0.4s
|
||||
.long 0x54fff241 // b.ne 18 <sha256_compress_arm+0x18> // b.any
|
||||
.long 0x4ea41c80 // mov v0.16b, v4.16b
|
||||
.long 0x4ea31c61 // mov v1.16b, v3.16b
|
||||
.long 0xad000001 // stp q1, q0, [x0]
|
||||
.long 0xd65f03c0 // ret
|
||||
.long 0xd503201f // nop
|
||||
.long 0xd503201f // nop
|
||||
.long 0xd503201f // nop
|
||||
.long 0x428a2f98 // .word 0x428a2f98
|
||||
.long 0x71374491 // .word 0x71374491
|
||||
.long 0xb5c0fbcf // .word 0xb5c0fbcf
|
||||
.long 0xe9b5dba5 // .word 0xe9b5dba5
|
||||
.long 0x3956c25b // .word 0x3956c25b
|
||||
.long 0x59f111f1 // .word 0x59f111f1
|
||||
.long 0x923f82a4 // .word 0x923f82a4
|
||||
.long 0xab1c5ed5 // .word 0xab1c5ed5
|
||||
.long 0xd807aa98 // .word 0xd807aa98
|
||||
.long 0x12835b01 // .word 0x12835b01
|
||||
.long 0x243185be // .word 0x243185be
|
||||
.long 0x550c7dc3 // .word 0x550c7dc3
|
||||
.long 0x72be5d74 // .word 0x72be5d74
|
||||
.long 0x80deb1fe // .word 0x80deb1fe
|
||||
.long 0x9bdc06a7 // .word 0x9bdc06a7
|
||||
.long 0xc19bf174 // .word 0xc19bf174
|
||||
.long 0xe49b69c1 // .word 0xe49b69c1
|
||||
.long 0xefbe4786 // .word 0xefbe4786
|
||||
.long 0x0fc19dc6 // .word 0x0fc19dc6
|
||||
.long 0x240ca1cc // .word 0x240ca1cc
|
||||
.long 0x2de92c6f // .word 0x2de92c6f
|
||||
.long 0x4a7484aa // .word 0x4a7484aa
|
||||
.long 0x5cb0a9dc // .word 0x5cb0a9dc
|
||||
.long 0x76f988da // .word 0x76f988da
|
||||
.long 0x983e5152 // .word 0x983e5152
|
||||
.long 0xa831c66d // .word 0xa831c66d
|
||||
.long 0xb00327c8 // .word 0xb00327c8
|
||||
.long 0xbf597fc7 // .word 0xbf597fc7
|
||||
.long 0xc6e00bf3 // .word 0xc6e00bf3
|
||||
.long 0xd5a79147 // .word 0xd5a79147
|
||||
.long 0x06ca6351 // .word 0x06ca6351
|
||||
.long 0x14292967 // .word 0x14292967
|
||||
.long 0x27b70a85 // .word 0x27b70a85
|
||||
.long 0x2e1b2138 // .word 0x2e1b2138
|
||||
.long 0x4d2c6dfc // .word 0x4d2c6dfc
|
||||
.long 0x53380d13 // .word 0x53380d13
|
||||
.long 0x650a7354 // .word 0x650a7354
|
||||
.long 0x766a0abb // .word 0x766a0abb
|
||||
.long 0x81c2c92e // .word 0x81c2c92e
|
||||
.long 0x92722c85 // .word 0x92722c85
|
||||
.long 0xa2bfe8a1 // .word 0xa2bfe8a1
|
||||
.long 0xa81a664b // .word 0xa81a664b
|
||||
.long 0xc24b8b70 // .word 0xc24b8b70
|
||||
.long 0xc76c51a3 // .word 0xc76c51a3
|
||||
.long 0xd192e819 // .word 0xd192e819
|
||||
.long 0xd6990624 // .word 0xd6990624
|
||||
.long 0xf40e3585 // .word 0xf40e3585
|
||||
.long 0x106aa070 // .word 0x106aa070
|
||||
.long 0x19a4c116 // .word 0x19a4c116
|
||||
.long 0x1e376c08 // .word 0x1e376c08
|
||||
.long 0x2748774c // .word 0x2748774c
|
||||
.long 0x34b0bcb5 // .word 0x34b0bcb5
|
||||
.long 0x391c0cb3 // .word 0x391c0cb3
|
||||
.long 0x4ed8aa4a // .word 0x4ed8aa4a
|
||||
.long 0x5b9cca4f // .word 0x5b9cca4f
|
||||
.long 0x682e6ff3 // .word 0x682e6ff3
|
||||
.long 0x748f82ee // .word 0x748f82ee
|
||||
.long 0x78a5636f // .word 0x78a5636f
|
||||
.long 0x84c87814 // .word 0x84c87814
|
||||
.long 0x8cc70208 // .word 0x8cc70208
|
||||
.long 0x90befffa // .word 0x90befffa
|
||||
.long 0xa4506ceb // .word 0xa4506ceb
|
||||
.long 0xbef9a3f7 // .word 0xbef9a3f7
|
||||
.long 0xc67178f2 // .word 0xc67178f2
|
||||
end;
|
||||
File diff suppressed because it is too large
Load diff
5
components/kascrypt/Hashes/Private/README.txt
Normal file
5
components/kascrypt/Hashes/Private/README.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
CRC / HASH / HMAC
|
||||
http://www.wolfgang-ehrhardt.de/crchash_en.html
|
||||
crc_hash_2016-05-01.zip
|
||||
|
||||
Some modifications done for Double Commander (see doublecmd.diff).
|
||||
103
components/kascrypt/Hashes/Private/doublecmd.diff
Normal file
103
components/kascrypt/Hashes/Private/doublecmd.diff
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
Index: kperm_64.inc
|
||||
===================================================================
|
||||
--- kperm_64.inc (revision 6895)
|
||||
+++ kperm_64.inc (working copy)
|
||||
@@ -33,10 +33,14 @@
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
+{$IFDEF FPC}
|
||||
+ {$MACRO ON} {$DEFINE RotL:= RolQWord}
|
||||
+{$ELSE}
|
||||
function RotL(x: u64bit; c: integer): u64bit; {$ifdef HAS_INLINE} inline; {$endif}
|
||||
begin
|
||||
RotL := (x shl c) or (x shr (64-c));
|
||||
end;
|
||||
+{$ENDIF}
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
Index: sha1.pas
|
||||
===================================================================
|
||||
--- sha1.pas
|
||||
+++ sha1.pas
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
{$i STD.INC}
|
||||
|
||||
-{$ifdef BIT64}
|
||||
+{$ifndef CPUI386}
|
||||
{$ifndef PurePascal}
|
||||
{$define PurePascal}
|
||||
{$endif}
|
||||
Index: sha3.pas
|
||||
===================================================================
|
||||
--- sha3.pas (revision 6895)
|
||||
+++ sha3.pas (working copy)
|
||||
@@ -6,6 +6,15 @@
|
||||
|
||||
{$i STD.INC}
|
||||
|
||||
+{$ifdef FPC}
|
||||
+ {$ifdef CPUI386}
|
||||
+ {$define USE_MMXCODE}
|
||||
+ {$endif}
|
||||
+ {$ifdef CPU64}
|
||||
+ {$define USE_64BITCODE}
|
||||
+ {$endif}
|
||||
+{$endif}
|
||||
+
|
||||
{.$define USE_64BITCODE} {Use 64-bit for Keccak permutation}
|
||||
{.$define USE_MMXCODE } {Use MMX for Keccak permutation, contributed by Eric Grange}
|
||||
{.$define USE_MMX_AKP } {Use MMX for Keccak permutation, contributed by Anna Kaliszewicz / payl}
|
||||
Index: scrypt.pas
|
||||
===================================================================
|
||||
--- scrypt.pas (revision 7740)
|
||||
+++ scrypt.pas (working copy)
|
||||
@@ -90,7 +90,7 @@
|
||||
implementation
|
||||
|
||||
uses
|
||||
- sha256; {Register SHA256 for HMAC-SHA256}
|
||||
+ SHA3_512; {Register SHA3_512 for HMAC_SHA3_512}
|
||||
|
||||
type
|
||||
TLA16 = array[0..15] of longint;
|
||||
@@ -361,14 +361,14 @@
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
-function pbkfd2_hmac_sha256(pPW: pointer; pLen: word; salt: pointer; sLen,C: longint; var DK; dkLen: longint): integer;
|
||||
- {-Derive key DK from password pPW using salt and iteration count C using (hmac-)sha256}
|
||||
+function pbkdf2_hmac_sha3_512(pPW: pointer; pLen: word; salt: pointer; sLen,C: longint; var DK; dkLen: longint): integer;
|
||||
+ {-Derive key DK from password pPW using salt and iteration count C using hmac_sha3_512}
|
||||
var
|
||||
phash: PHashDesc;
|
||||
begin
|
||||
- {Note: pbkdf2 will return error indicator phash=nil if _SHA256 is not found!}
|
||||
- phash := FindHash_by_ID(_SHA256);
|
||||
- pbkfd2_hmac_sha256 := pbkdf2(phash,pPW,pLen,salt,sLen,C,DK,dkLen);
|
||||
+ {Note: pbkdf2 will return error indicator phash=nil if _SHA3_512 is not found!}
|
||||
+ phash := FindHash_by_ID(_SHA3_512);
|
||||
+ pbkdf2_hmac_sha3_512 := pbkdf2(phash,pPW,pLen,salt,sLen,C,DK,dkLen);
|
||||
end;
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
pV := malloc(sV);
|
||||
pXY := malloc(sXY);
|
||||
if (pB<>nil) and (pV<>nil) and (pXY<>nil) then begin
|
||||
- err := pbkfd2_hmac_sha256(pPW, pLen, salt, sLen, 1, pB^, sB);
|
||||
+ err := pbkdf2_hmac_sha3_512(pPW, pLen, salt, sLen, 1, pB^, sB);
|
||||
if err=0 then begin
|
||||
pw := pB;
|
||||
for i:=0 to p-1 do begin
|
||||
@@ -425,7 +425,7 @@
|
||||
smix(pw, r, N, pV, pXY);
|
||||
inc(Ptr2Inc(pw), r*128);
|
||||
end;
|
||||
- err := pbkfd2_hmac_sha256(pPW, pLen, pB, sB, 1, DK, dKlen);
|
||||
+ err := pbkdf2_hmac_sha3_512(pPW, pLen, pB, sB, 1, DK, dKlen);
|
||||
end;
|
||||
scrypt_kdf := err;
|
||||
end
|
||||
|
|
@ -2,9 +2,6 @@
|
|||
{Pascal translation from C code in Keccak-simple32BI.c by Ronny Van Keer}
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
const
|
||||
cKeccakNumberOfRounds = 24;
|
||||
|
||||
const
|
||||
KeccakF1600RoundConstants_int2: array[0..2*24-1] of longint =
|
||||
(longint($00000001), longint($00000000),
|
||||
|
|
|
|||
|
|
@ -33,7 +33,18 @@ const
|
|||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure KeccakPermutation64(var state: TState_L);
|
||||
{$IFDEF FPC}
|
||||
{$MACRO ON} {$DEFINE RotL:= RolQWord}
|
||||
{$ELSE}
|
||||
function RotL(x: u64bit; c: integer): u64bit; {$ifdef HAS_INLINE} inline; {$endif}
|
||||
begin
|
||||
RotL := (x shl c) or (x shr (64-c));
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure KeccakPermutation(var state: TState_L);
|
||||
{$ifdef USE_LOCALA}
|
||||
var A: array[0..24] of u64bit;
|
||||
{$else}
|
||||
|
|
@ -54,37 +65,37 @@ begin
|
|||
C3 := A[03] xor A[08] xor A[13] xor A[18] xor A[23];
|
||||
C4 := A[04] xor A[09] xor A[14] xor A[19] xor A[24];
|
||||
|
||||
D0 := RolQWord(C0, 1) xor C3;
|
||||
D1 := RolQWord(C1, 1) xor C4;
|
||||
D2 := RolQWord(C2, 1) xor C0;
|
||||
D3 := RolQWord(C3, 1) xor C1;
|
||||
D4 := RolQWord(C4, 1) xor C2;
|
||||
D0 := RotL(C0, 1) xor C3;
|
||||
D1 := RotL(C1, 1) xor C4;
|
||||
D2 := RotL(C2, 1) xor C0;
|
||||
D3 := RotL(C3, 1) xor C1;
|
||||
D4 := RotL(C4, 1) xor C2;
|
||||
|
||||
B[00] := A[00] xor D1;
|
||||
B[01] := RolQWord(A[06] xor D2, 44);
|
||||
B[02] := RolQWord(A[12] xor D3, 43);
|
||||
B[03] := RolQWord(A[18] xor D4, 21);
|
||||
B[04] := RolQWord(A[24] xor D0, 14);
|
||||
B[05] := RolQWord(A[03] xor D4, 28);
|
||||
B[06] := RolQWord(A[09] xor D0, 20);
|
||||
B[07] := RolQWord(A[10] xor D1, 3);
|
||||
B[08] := RolQWord(A[16] xor D2, 45);
|
||||
B[09] := RolQWord(A[22] xor D3, 61);
|
||||
B[10] := RolQWord(A[01] xor D2, 1);
|
||||
B[11] := RolQWord(A[07] xor D3, 6);
|
||||
B[12] := RolQWord(A[13] xor D4, 25);
|
||||
B[13] := RolQWord(A[19] xor D0, 8);
|
||||
B[14] := RolQWord(A[20] xor D1, 18);
|
||||
B[15] := RolQWord(A[04] xor D0, 27);
|
||||
B[16] := RolQWord(A[05] xor D1, 36);
|
||||
B[17] := RolQWord(A[11] xor D2, 10);
|
||||
B[18] := RolQWord(A[17] xor D3, 15);
|
||||
B[19] := RolQWord(A[23] xor D4, 56);
|
||||
B[20] := RolQWord(A[02] xor D3, 62);
|
||||
B[21] := RolQWord(A[08] xor D4, 55);
|
||||
B[22] := RolQWord(A[14] xor D0, 39);
|
||||
B[23] := RolQWord(A[15] xor D1, 41);
|
||||
B[24] := RolQWord(A[21] xor D2, 2);
|
||||
B[01] := RotL(A[06] xor D2, 44);
|
||||
B[02] := RotL(A[12] xor D3, 43);
|
||||
B[03] := RotL(A[18] xor D4, 21);
|
||||
B[04] := RotL(A[24] xor D0, 14);
|
||||
B[05] := RotL(A[03] xor D4, 28);
|
||||
B[06] := RotL(A[09] xor D0, 20);
|
||||
B[07] := RotL(A[10] xor D1, 3);
|
||||
B[08] := RotL(A[16] xor D2, 45);
|
||||
B[09] := RotL(A[22] xor D3, 61);
|
||||
B[10] := RotL(A[01] xor D2, 1);
|
||||
B[11] := RotL(A[07] xor D3, 6);
|
||||
B[12] := RotL(A[13] xor D4, 25);
|
||||
B[13] := RotL(A[19] xor D0, 8);
|
||||
B[14] := RotL(A[20] xor D1, 18);
|
||||
B[15] := RotL(A[04] xor D0, 27);
|
||||
B[16] := RotL(A[05] xor D1, 36);
|
||||
B[17] := RotL(A[11] xor D2, 10);
|
||||
B[18] := RotL(A[17] xor D3, 15);
|
||||
B[19] := RotL(A[23] xor D4, 56);
|
||||
B[20] := RotL(A[02] xor D3, 62);
|
||||
B[21] := RotL(A[08] xor D4, 55);
|
||||
B[22] := RotL(A[14] xor D0, 39);
|
||||
B[23] := RotL(A[15] xor D1, 41);
|
||||
B[24] := RotL(A[21] xor D2, 2);
|
||||
|
||||
A[00] := B[00] xor ((not B[01]) and B[02]);
|
||||
A[01] := B[01] xor ((not B[02]) and B[03]);
|
||||
|
|
@ -120,7 +131,7 @@ end;
|
|||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure extractFromState64(outp: pointer; const state: TState_L; laneCount: integer);
|
||||
procedure extractFromState(outp: pointer; const state: TState_L; laneCount: integer);
|
||||
var
|
||||
pI, pS: pu64bit;
|
||||
i: integer;
|
||||
|
|
@ -136,7 +147,7 @@ end;
|
|||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure xorIntoState64(var state: TState_L; inp: PLongint; laneCount: integer);
|
||||
procedure xorIntoState(var state: TState_L; inp: PLongint; laneCount: integer);
|
||||
{-Include input message data bits into the sponge state}
|
||||
var
|
||||
pI, pS: pu64bit;
|
||||
|
|
|
|||
|
|
@ -1,444 +0,0 @@
|
|||
{
|
||||
The eXtended Keccak Code Package (XKCP)
|
||||
https://github.com/XKCP/XKCP
|
||||
|
||||
Copyright (c) 2006-2017, CRYPTOGAMS by <appro@openssl.org>
|
||||
Copyright (c) 2017 Ronny Van Keer
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain copyright notices,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
* Neither the name of the CRYPTOGAMS nor the names of its
|
||||
copyright holder and contributors may be used to endorse or
|
||||
promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
ALTERNATIVELY, provided that this notice is retained in full, this
|
||||
product may be distributed under the terms of the GNU General Public
|
||||
License (GPL), in which case the provisions of the GPL apply INSTEAD OF
|
||||
those given above.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Notes:
|
||||
The code for the permutation was generated with
|
||||
Andy Polyakov's keccak1600-avx2.pl from the CRYPTOGAMS project
|
||||
(https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-avx2.pl).
|
||||
The rest of the code was written by Ronny Van Keer.
|
||||
Adaptations for macOS by Stéphane Léon.
|
||||
Pascal translation by Alexander Koblov.
|
||||
}
|
||||
|
||||
{$CODEALIGN CONSTMIN=64}
|
||||
|
||||
const
|
||||
mapState: array[0..24] of UInt64 = (
|
||||
0*8, 1*8, 2*8, 3*8, 4*8,
|
||||
7*8, 21*8, 10*8, 15*8, 20*8,
|
||||
5*8, 13*8, 22*8, 19*8, 12*8,
|
||||
8*8, 9*8, 18*8, 23*8, 16*8,
|
||||
6*8, 17*8, 14*8, 11*8, 24*8
|
||||
);
|
||||
|
||||
procedure KeccakPermutationAVX(var state: TState_L); assembler; nostackframe;
|
||||
// UNIX RDI
|
||||
// WIN64: RCX
|
||||
asm
|
||||
.balign 32
|
||||
{$IF DEFINED(WIN64)}
|
||||
xchg %rcx, %rdi
|
||||
subq $168, %rsp
|
||||
movdqa %xmm6, (%rsp)
|
||||
movdqa %xmm7, 16(%rsp)
|
||||
movdqa %xmm8, 32(%rsp)
|
||||
movdqa %xmm9, 48(%rsp)
|
||||
movdqa %xmm10, 64(%rsp)
|
||||
movdqa %xmm11, 80(%rsp)
|
||||
movdqa %xmm12, 96(%rsp)
|
||||
movdqa %xmm13, 112(%rsp)
|
||||
movdqa %xmm14, 128(%rsp)
|
||||
movdqa %xmm15, 144(%rsp)
|
||||
{$ENDIF}
|
||||
lea .LKrhotates_left+96(%rip),%r8
|
||||
lea .LKrhotates_right+96(%rip),%r9
|
||||
lea .LKiotas(%rip),%r10
|
||||
mov $24,%eax
|
||||
lea 96(%rdi),%rdi
|
||||
vzeroupper
|
||||
vpbroadcastq -96(%rdi),%ymm0 // load A[5][5]
|
||||
vmovdqu 8+32*0-96(%rdi),%ymm1
|
||||
vmovdqu 8+32*1-96(%rdi),%ymm2
|
||||
vmovdqu 8+32*2-96(%rdi),%ymm3
|
||||
vmovdqu 8+32*3-96(%rdi),%ymm4
|
||||
vmovdqu 8+32*4-96(%rdi),%ymm5
|
||||
vmovdqu 8+32*5-96(%rdi),%ymm6
|
||||
// -----------------------------------------
|
||||
.Loop_avx2:
|
||||
// ######################################### Theta
|
||||
vpshufd $0b01001110,%ymm2,%ymm13
|
||||
vpxor %ymm3,%ymm5,%ymm12
|
||||
vpxor %ymm6,%ymm4,%ymm9
|
||||
vpxor %ymm1,%ymm12,%ymm12
|
||||
vpxor %ymm9,%ymm12,%ymm12 // C[1..4]
|
||||
|
||||
vpermq $0b10010011,%ymm12,%ymm11
|
||||
vpxor %ymm2,%ymm13,%ymm13
|
||||
vpermq $0b01001110,%ymm13,%ymm7
|
||||
|
||||
vpsrlq $63,%ymm12,%ymm8
|
||||
vpaddq %ymm12,%ymm12,%ymm9
|
||||
vpor %ymm9,%ymm8,%ymm8 // ROL64(C[1..4],1)
|
||||
|
||||
vpermq $0b00111001,%ymm8,%ymm15
|
||||
vpxor %ymm11,%ymm8,%ymm14
|
||||
vpermq $0b00000000,%ymm14,%ymm14 // D[0..0] = ROL64(C[1],1) ^ C[4]
|
||||
|
||||
vpxor %ymm0,%ymm13,%ymm13
|
||||
vpxor %ymm7,%ymm13,%ymm13 // C[0..0]
|
||||
|
||||
vpsrlq $63,%ymm13,%ymm7
|
||||
vpaddq %ymm13,%ymm13,%ymm8
|
||||
vpor %ymm7,%ymm8,%ymm8 // ROL64(C[0..0],1)
|
||||
|
||||
vpxor %ymm14,%ymm2,%ymm2 // ^= D[0..0]
|
||||
vpxor %ymm14,%ymm0,%ymm0 // ^= D[0..0]
|
||||
|
||||
vpblendd $0b11000000,%ymm8,%ymm15,%ymm15
|
||||
vpblendd $0b00000011,%ymm13,%ymm11,%ymm11
|
||||
vpxor %ymm11,%ymm15,%ymm15 // D[1..4] = ROL64(C[2..4,0),1) ^ C[0..3]
|
||||
|
||||
// ######################################### Rho + Pi + pre-Chi shuffle
|
||||
vpsllvq 0*32-96(%r8),%ymm2,%ymm10
|
||||
vpsrlvq 0*32-96(%r9),%ymm2,%ymm2
|
||||
vpor %ymm10,%ymm2,%ymm2
|
||||
|
||||
vpxor %ymm15,%ymm3,%ymm3 // ^= D[1..4] from Theta
|
||||
vpsllvq 2*32-96(%r8),%ymm3,%ymm11
|
||||
vpsrlvq 2*32-96(%r9),%ymm3,%ymm3
|
||||
vpor %ymm11,%ymm3,%ymm3
|
||||
|
||||
vpxor %ymm15,%ymm4,%ymm4 // ^= D[1..4] from Theta
|
||||
vpsllvq 3*32-96(%r8),%ymm4,%ymm12
|
||||
vpsrlvq 3*32-96(%r9),%ymm4,%ymm4
|
||||
vpor %ymm12,%ymm4,%ymm4
|
||||
|
||||
vpxor %ymm15,%ymm5,%ymm5 // ^= D[1..4] from Theta
|
||||
vpsllvq 4*32-96(%r8),%ymm5,%ymm13
|
||||
vpsrlvq 4*32-96(%r9),%ymm5,%ymm5
|
||||
vpor %ymm13,%ymm5,%ymm5
|
||||
|
||||
vpxor %ymm15,%ymm6,%ymm6 // ^= D[1..4] from Theta
|
||||
vpermq $0b10001101,%ymm2,%ymm10 // %ymm2 -> future %ymm3
|
||||
vpermq $0b10001101,%ymm3,%ymm11 // %ymm3 -> future %ymm4
|
||||
vpsllvq 5*32-96(%r8),%ymm6,%ymm14
|
||||
vpsrlvq 5*32-96(%r9),%ymm6,%ymm8
|
||||
vpor %ymm14,%ymm8,%ymm8 // %ymm6 -> future %ymm1
|
||||
|
||||
vpxor %ymm15,%ymm1,%ymm1 // ^= D[1..4] from Theta
|
||||
vpermq $0b00011011,%ymm4,%ymm12 // %ymm4 -> future %ymm5
|
||||
vpermq $0b01110010,%ymm5,%ymm13 // %ymm5 -> future %ymm6
|
||||
vpsllvq 1*32-96(%r8),%ymm1,%ymm15
|
||||
vpsrlvq 1*32-96(%r9),%ymm1,%ymm9
|
||||
vpor %ymm15,%ymm9,%ymm9 // %ymm1 -> future %ymm2
|
||||
|
||||
// ######################################### Chi
|
||||
vpsrldq $8,%ymm8,%ymm14
|
||||
vpandn %ymm14,%ymm8,%ymm7 // tgting [0][0] [0][0] [0][0] [0][0]
|
||||
|
||||
vpblendd $0b00001100,%ymm13,%ymm9,%ymm3 // [4][4] [2][0]
|
||||
vpblendd $0b00001100,%ymm9,%ymm11,%ymm15 // [4][0] [2][1]
|
||||
vpblendd $0b00001100,%ymm11,%ymm10,%ymm5 // [4][2] [2][4]
|
||||
vpblendd $0b00001100,%ymm10,%ymm9,%ymm14 // [4][3] [2][0]
|
||||
vpblendd $0b00110000,%ymm11,%ymm3,%ymm3 // [1][3] [4][4] [2][0]
|
||||
vpblendd $0b00110000,%ymm12,%ymm15,%ymm15 // [1][4] [4][0] [2][1]
|
||||
vpblendd $0b00110000,%ymm9,%ymm5,%ymm5 // [1][0] [4][2] [2][4]
|
||||
vpblendd $0b00110000,%ymm13,%ymm14,%ymm14 // [1][1] [4][3] [2][0]
|
||||
vpblendd $0b11000000,%ymm12,%ymm3,%ymm3 // [3][2] [1][3] [4][4] [2][0]
|
||||
vpblendd $0b11000000,%ymm13,%ymm15,%ymm15 // [3][3] [1][4] [4][0] [2][1]
|
||||
vpblendd $0b11000000,%ymm13,%ymm5,%ymm5 // [3][3] [1][0] [4][2] [2][4]
|
||||
vpblendd $0b11000000,%ymm11,%ymm14,%ymm14 // [3][4] [1][1] [4][3] [2][0]
|
||||
vpandn %ymm15,%ymm3,%ymm3 // tgting [3][1] [1][2] [4][3] [2][4]
|
||||
vpandn %ymm14,%ymm5,%ymm5 // tgting [3][2] [1][4] [4][1] [2][3]
|
||||
|
||||
vpblendd $0b00001100,%ymm9,%ymm12,%ymm6 // [4][0] [2][3]
|
||||
vpblendd $0b00001100,%ymm12,%ymm10,%ymm15 // [4][1] [2][4]
|
||||
vpxor %ymm10,%ymm3,%ymm3
|
||||
vpblendd $0b00110000,%ymm10,%ymm6,%ymm6 // [1][2] [4][0] [2][3]
|
||||
vpblendd $0b00110000,%ymm11,%ymm15,%ymm15 // [1][3] [4][1] [2][4]
|
||||
vpxor %ymm12,%ymm5,%ymm5
|
||||
vpblendd $0b11000000,%ymm11,%ymm6,%ymm6 // [3][4] [1][2] [4][0] [2][3]
|
||||
vpblendd $0b11000000,%ymm9,%ymm15,%ymm15 // [3][0] [1][3] [4][1] [2][4]
|
||||
vpandn %ymm15,%ymm6,%ymm6 // tgting [3][3] [1][1] [4][4] [2][2]
|
||||
vpxor %ymm13,%ymm6,%ymm6
|
||||
|
||||
vpermq $0b00011110,%ymm8,%ymm4 // [0][1] [0][2] [0][4] [0][3]
|
||||
vpblendd $0b00110000,%ymm0,%ymm4,%ymm15 // [0][1] [0][0] [0][4] [0][3]
|
||||
vpermq $0b00111001,%ymm8,%ymm1 // [0][1] [0][4] [0][3] [0][2]
|
||||
vpblendd $0b11000000,%ymm0,%ymm1,%ymm1 // [0][0] [0][4] [0][3] [0][2]
|
||||
vpandn %ymm15,%ymm1,%ymm1 // tgting [0][4] [0][3] [0][2] [0][1]
|
||||
|
||||
vpblendd $0b00001100,%ymm12,%ymm11,%ymm2 // [4][1] [2][1]
|
||||
vpblendd $0b00001100,%ymm11,%ymm13,%ymm14 // [4][2] [2][2]
|
||||
vpblendd $0b00110000,%ymm13,%ymm2,%ymm2 // [1][1] [4][1] [2][1]
|
||||
vpblendd $0b00110000,%ymm10,%ymm14,%ymm14 // [1][2] [4][2] [2][2]
|
||||
vpblendd $0b11000000,%ymm10,%ymm2,%ymm2 // [3][1] [1][1] [4][1] [2][1]
|
||||
vpblendd $0b11000000,%ymm12,%ymm14,%ymm14 // [3][2] [1][2] [4][2] [2][2]
|
||||
vpandn %ymm14,%ymm2,%ymm2 // tgting [3][0] [1][0] [4][0] [2][0]
|
||||
vpxor %ymm9,%ymm2,%ymm2
|
||||
|
||||
vpermq $0b00000000,%ymm7,%ymm7 // [0][0] [0][0] [0][0] [0][0]
|
||||
vpermq $0b00011011,%ymm3,%ymm3 // post-Chi shuffle
|
||||
vpermq $0b10001101,%ymm5,%ymm5
|
||||
vpermq $0b01110010,%ymm6,%ymm6
|
||||
|
||||
vpblendd $0b00001100,%ymm10,%ymm13,%ymm4 // [4][3] [2][2]
|
||||
vpblendd $0b00001100,%ymm13,%ymm12,%ymm14 // [4][4] [2][3]
|
||||
vpblendd $0b00110000,%ymm12,%ymm4,%ymm4 // [1][4] [4][3] [2][2]
|
||||
vpblendd $0b00110000,%ymm9,%ymm14,%ymm14 // [1][0] [4][4] [2][3]
|
||||
vpblendd $0b11000000,%ymm9,%ymm4,%ymm4 // [3][0] [1][4] [4][3] [2][2]
|
||||
vpblendd $0b11000000,%ymm10,%ymm14,%ymm14 // [3][1] [1][0] [4][4] [2][3]
|
||||
vpandn %ymm14,%ymm4,%ymm4 // tgting [3][4] [1][3] [4][2] [2][1]
|
||||
|
||||
vpxor %ymm7,%ymm0,%ymm0
|
||||
vpxor %ymm8,%ymm1,%ymm1
|
||||
vpxor %ymm11,%ymm4,%ymm4
|
||||
|
||||
// ######################################### Iota
|
||||
vpxor (%r10),%ymm0,%ymm0
|
||||
lea 32(%r10),%r10
|
||||
|
||||
dec %eax
|
||||
jnz .Loop_avx2
|
||||
// -----------------------------------------
|
||||
vmovq %xmm0,-96(%rdi)
|
||||
vmovdqu %ymm1,8+32*0-96(%rdi)
|
||||
vmovdqu %ymm2,8+32*1-96(%rdi)
|
||||
vmovdqu %ymm3,8+32*2-96(%rdi)
|
||||
vmovdqu %ymm4,8+32*3-96(%rdi)
|
||||
vmovdqu %ymm5,8+32*4-96(%rdi)
|
||||
vmovdqu %ymm6,8+32*5-96(%rdi)
|
||||
vzeroupper
|
||||
{$IF DEFINED(WIN64)}
|
||||
movdqa (%rsp),%xmm6
|
||||
movdqa 0x10(%rsp),%xmm7
|
||||
movdqa 0x20(%rsp),%xmm8
|
||||
movdqa 0x30(%rsp),%xmm9
|
||||
movdqa 0x40(%rsp),%xmm10
|
||||
movdqa 0x50(%rsp),%xmm11
|
||||
movdqa 0x60(%rsp),%xmm12
|
||||
movdqa 0x70(%rsp),%xmm13
|
||||
movdqa 0x80(%rsp),%xmm14
|
||||
movdqa 0x90(%rsp),%xmm15
|
||||
addq $168, %rsp
|
||||
movq %rcx, %rdi
|
||||
{$ENDIF}
|
||||
retq
|
||||
.balign 64
|
||||
.LKrhotates_left:
|
||||
.quad 3, 18, 36, 41 // [2][0] [4][0] [1][0] [3][0]
|
||||
.quad 1, 62, 28, 27 // [0][1] [0][2] [0][3] [0][4]
|
||||
.quad 45, 6, 56, 39 // [3][1] [1][2] [4][3] [2][4]
|
||||
.quad 10, 61, 55, 8 // [2][1] [4][2] [1][3] [3][4]
|
||||
.quad 2, 15, 25, 20 // [4][1] [3][2] [2][3] [1][4]
|
||||
.quad 44, 43, 21, 14 // [1][1] [2][2] [3][3] [4][4]
|
||||
.LKrhotates_right:
|
||||
.quad 64-3, 64-18, 64-36, 64-41
|
||||
.quad 64-1, 64-62, 64-28, 64-27
|
||||
.quad 64-45, 64-6, 64-56, 64-39
|
||||
.quad 64-10, 64-61, 64-55, 64-8
|
||||
.quad 64-2, 64-15, 64-25, 64-20
|
||||
.quad 64-44, 64-43, 64-21, 64-14
|
||||
.LKiotas:
|
||||
.quad 0x0000000000000001, 0x0000000000000001, 0x0000000000000001, 0x0000000000000001
|
||||
.quad 0x0000000000008082, 0x0000000000008082, 0x0000000000008082, 0x0000000000008082
|
||||
.quad 0x800000000000808a, 0x800000000000808a, 0x800000000000808a, 0x800000000000808a
|
||||
.quad 0x8000000080008000, 0x8000000080008000, 0x8000000080008000, 0x8000000080008000
|
||||
.quad 0x000000000000808b, 0x000000000000808b, 0x000000000000808b, 0x000000000000808b
|
||||
.quad 0x0000000080000001, 0x0000000080000001, 0x0000000080000001, 0x0000000080000001
|
||||
.quad 0x8000000080008081, 0x8000000080008081, 0x8000000080008081, 0x8000000080008081
|
||||
.quad 0x8000000000008009, 0x8000000000008009, 0x8000000000008009, 0x8000000000008009
|
||||
.quad 0x000000000000008a, 0x000000000000008a, 0x000000000000008a, 0x000000000000008a
|
||||
.quad 0x0000000000000088, 0x0000000000000088, 0x0000000000000088, 0x0000000000000088
|
||||
.quad 0x0000000080008009, 0x0000000080008009, 0x0000000080008009, 0x0000000080008009
|
||||
.quad 0x000000008000000a, 0x000000008000000a, 0x000000008000000a, 0x000000008000000a
|
||||
.quad 0x000000008000808b, 0x000000008000808b, 0x000000008000808b, 0x000000008000808b
|
||||
.quad 0x800000000000008b, 0x800000000000008b, 0x800000000000008b, 0x800000000000008b
|
||||
.quad 0x8000000000008089, 0x8000000000008089, 0x8000000000008089, 0x8000000000008089
|
||||
.quad 0x8000000000008003, 0x8000000000008003, 0x8000000000008003, 0x8000000000008003
|
||||
.quad 0x8000000000008002, 0x8000000000008002, 0x8000000000008002, 0x8000000000008002
|
||||
.quad 0x8000000000000080, 0x8000000000000080, 0x8000000000000080, 0x8000000000000080
|
||||
.quad 0x000000000000800a, 0x000000000000800a, 0x000000000000800a, 0x000000000000800a
|
||||
.quad 0x800000008000000a, 0x800000008000000a, 0x800000008000000a, 0x800000008000000a
|
||||
.quad 0x8000000080008081, 0x8000000080008081, 0x8000000080008081, 0x8000000080008081
|
||||
.quad 0x8000000000008080, 0x8000000000008080, 0x8000000000008080, 0x8000000000008080
|
||||
.quad 0x0000000080000001, 0x0000000080000001, 0x0000000080000001, 0x0000000080000001
|
||||
.quad 0x8000000080008008, 0x8000000080008008, 0x8000000080008008, 0x8000000080008008
|
||||
end;
|
||||
|
||||
procedure KeccakP1600_ExtractBytes(const state: Pointer; data: PByte; offset, length: Cardinal); assembler; nostackframe;
|
||||
// UNIX RDI, RSI, RDX, RCX
|
||||
// WIN64: RCX, RDX, R8, R9
|
||||
asm
|
||||
.balign 32
|
||||
{$IF DEFINED(WIN64)}
|
||||
mov %rsi, 16(%rsp)
|
||||
mov %rdi, 24(%rsp)
|
||||
mov %rcx, %rdi
|
||||
mov %rdx, %rsi
|
||||
mov %r8, %rdx
|
||||
mov %r9, %rcx
|
||||
{$ENDIF}
|
||||
push %rbx
|
||||
cmp $0, %rcx
|
||||
jz .LKeccakP1600_ExtractBytes_Exit
|
||||
mov %rdx, %rax // rax offset in lane
|
||||
and $0xFFFFFFF8, %edx // rdx pointer into state index mapper
|
||||
lea mapState(%rip), %r9
|
||||
add %r9, %rdx
|
||||
and $7, %rax
|
||||
jz .LKeccakP1600_ExtractBytes_LaneAlignedCheck
|
||||
mov $8, %rbx // rbx is (max) length of incomplete lane
|
||||
sub %rax, %rbx
|
||||
cmp %rcx, %rbx
|
||||
cmovae %rcx, %rbx
|
||||
sub %rbx, %rcx // length -= length of incomplete lane
|
||||
mov (%rdx), %r9
|
||||
add $8, %rdx
|
||||
add %rdi, %r9
|
||||
add %rax, %r9
|
||||
.LKeccakP1600_ExtractBytes_NotAlignedLoop:
|
||||
mov (%r9), %r8b
|
||||
inc %r9
|
||||
mov %r8b, (%rsi)
|
||||
inc %rsi
|
||||
dec %rbx
|
||||
jnz .LKeccakP1600_ExtractBytes_NotAlignedLoop
|
||||
jmp .LKeccakP1600_ExtractBytes_LaneAlignedCheck
|
||||
.LKeccakP1600_ExtractBytes_LaneAlignedLoop:
|
||||
mov (%rdx), %rax
|
||||
add $8, %rdx
|
||||
add %rdi, %rax
|
||||
mov (%rax), %r8
|
||||
mov %r8, (%rsi)
|
||||
add $8, %rsi
|
||||
.LKeccakP1600_ExtractBytes_LaneAlignedCheck:
|
||||
sub $8, %rcx
|
||||
jnc .LKeccakP1600_ExtractBytes_LaneAlignedLoop
|
||||
.LKeccakP1600_ExtractBytes_LastIncompleteLane:
|
||||
add $8, %rcx
|
||||
jz .LKeccakP1600_ExtractBytes_Exit
|
||||
mov (%rdx), %rax
|
||||
add %rdi, %rax
|
||||
mov (%rax), %r8
|
||||
.LKeccakP1600_ExtractBytes_LastIncompleteLaneLoop:
|
||||
mov %r8b, (%rsi)
|
||||
shr $8, %r8
|
||||
inc %rsi
|
||||
dec %rcx
|
||||
jnz .LKeccakP1600_ExtractBytes_LastIncompleteLaneLoop
|
||||
.LKeccakP1600_ExtractBytes_Exit:
|
||||
pop %rbx
|
||||
{$IF DEFINED(WIN64)}
|
||||
mov 16(%rsp), %rsi
|
||||
mov 24(%rsp), %rdi
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure KeccakP1600_AddBytes(state: Pointer; const data: PByte; offset, length: Cardinal); assembler; nostackframe;
|
||||
// UNIX RDI, RSI, RDX, RCX
|
||||
// WIN64: RCX, RDX, R8, R9
|
||||
asm
|
||||
.balign 32
|
||||
{$IF DEFINED(WIN64)}
|
||||
mov %rsi, 16(%rsp)
|
||||
mov %rdi, 24(%rsp)
|
||||
mov %rcx, %rdi
|
||||
mov %rdx, %rsi
|
||||
mov %r8, %rdx
|
||||
mov %r9, %rcx
|
||||
{$ENDIF}
|
||||
cmp $0, %rcx
|
||||
jz .LKeccakP1600_AddBytes_Exit
|
||||
mov %rdx, %rax // rax offset in lane
|
||||
and $0xFFFFFFF8, %edx // rdx pointer into state index mapper
|
||||
lea mapState(%rip), %r9
|
||||
add %r9, %rdx
|
||||
and $7, %rax
|
||||
jz .LKeccakP1600_AddBytes_LaneAlignedCheck
|
||||
mov $8, %r9 // r9 is (max) length of incomplete lane
|
||||
sub %rax, %r9
|
||||
cmp %rcx, %r9
|
||||
cmovae %rcx, %r9
|
||||
sub %r9, %rcx // length -= length of incomplete lane
|
||||
add (%rdx), %rax // rax = pointer to state lane
|
||||
add $8, %rdx
|
||||
add %rdi, %rax
|
||||
.LKeccakP1600_AddBytes_NotAlignedLoop:
|
||||
mov (%rsi), %r8b
|
||||
inc %rsi
|
||||
xorb %r8b, (%rax)
|
||||
inc %rax
|
||||
dec %r9
|
||||
jnz .LKeccakP1600_AddBytes_NotAlignedLoop
|
||||
jmp .LKeccakP1600_AddBytes_LaneAlignedCheck
|
||||
.LKeccakP1600_AddBytes_LaneAlignedLoop:
|
||||
mov (%rsi), %r8
|
||||
add $8, %rsi
|
||||
mov (%rdx), %rax
|
||||
add $8, %rdx
|
||||
add %rdi, %rax
|
||||
xor %r8, (%rax)
|
||||
.LKeccakP1600_AddBytes_LaneAlignedCheck:
|
||||
sub $8, %rcx
|
||||
jnc .LKeccakP1600_AddBytes_LaneAlignedLoop
|
||||
.LKeccakP1600_AddBytes_LastIncompleteLane:
|
||||
add $8, %rcx
|
||||
jz .LKeccakP1600_AddBytes_Exit
|
||||
mov (%rdx), %rax
|
||||
add %rdi, %rax
|
||||
.LKeccakP1600_AddBytes_LastIncompleteLaneLoop:
|
||||
mov (%rsi), %r8b
|
||||
inc %rsi
|
||||
xor %r8b, (%rax)
|
||||
inc %rax
|
||||
dec %rcx
|
||||
jnz .LKeccakP1600_AddBytes_LastIncompleteLaneLoop
|
||||
.LKeccakP1600_AddBytes_Exit:
|
||||
{$IF DEFINED(WIN64)}
|
||||
movq 16(%rsp), %rsi
|
||||
movq 24(%rsp), %rdi
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure extractFromStateAVX(outp: pointer; const state: TState_L; laneCount: integer);
|
||||
begin
|
||||
KeccakP1600_ExtractBytes(@state[0], outp, 0, laneCount * 8);
|
||||
end;
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
procedure xorIntoStateAVX(var state: TState_L; inp: PLongint; laneCount: integer);
|
||||
{-Include input message data bits into the sponge state}
|
||||
begin
|
||||
KeccakP1600_AddBytes(@state[0], PByte(inp), 0, laneCount * 8);
|
||||
end;
|
||||
|
|
@ -6,6 +6,19 @@ interface
|
|||
|
||||
{$i STD.INC}
|
||||
|
||||
{$ifdef FPC}
|
||||
{$ifdef CPUI386}
|
||||
{$define USE_MMXCODE}
|
||||
{$endif}
|
||||
{$ifdef CPU64}
|
||||
{$define USE_64BITCODE}
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
{.$define USE_64BITCODE} {Use 64-bit for Keccak permutation}
|
||||
{.$define USE_MMXCODE } {Use MMX for Keccak permutation, contributed by Eric Grange}
|
||||
{.$define USE_MMX_AKP } {Use MMX for Keccak permutation, contributed by Anna Kaliszewicz / payl}
|
||||
|
||||
(*************************************************************************
|
||||
|
||||
DESCRIPTION : SHA3 functions (including SHAKE) based on Keccak
|
||||
|
|
@ -73,8 +86,7 @@ interface
|
|||
|
||||
|
||||
(*-------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 Wolfgang Ehrhardt
|
||||
Copyright (C) 2025 Alexander Koblov (alexx2000@mail.ru)
|
||||
(C) Copyright 2012-2016 Wolfgang Ehrhardt
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from
|
||||
|
|
@ -182,15 +194,14 @@ function SHA3_FinalBit(var state: TSHA3State; bits: byte; bitlen: integer; hashv
|
|||
{0=no error during context initialization.}
|
||||
|
||||
var
|
||||
SHA3_LastError: integer = 0;
|
||||
SHA3_LastError: integer;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
uses
|
||||
CPU;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
cKeccakNumberOfRounds = 24;
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{Helper types}
|
||||
|
|
@ -208,26 +219,43 @@ type
|
|||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
{$include kperm_ax.inc}
|
||||
var
|
||||
KeccakPermutation: procedure(var state: TState_L);
|
||||
xorIntoState: procedure(var state: TState_L; inp: PLongint; laneCount: integer);
|
||||
extractFromState: procedure(outp: pointer; const state: TState_L; laneCount: integer);
|
||||
{$ELSEIF DEFINED(CPU64)}
|
||||
{$MACRO ON}
|
||||
{$DEFINE xorIntoState64:= xorIntoState}
|
||||
{$DEFINE extractFromState64:= extractFromState}
|
||||
{$DEFINE KeccakPermutation64:= KeccakPermutation}
|
||||
{$ENDIF}
|
||||
|
||||
{$IF DEFINED(CPUI386)}
|
||||
{$include kperm_mx.inc}
|
||||
{$ELSEIF DEFINED(CPU64)}
|
||||
{$include kperm_64.inc}
|
||||
{$ELSE}
|
||||
{$include kperm_32.inc}
|
||||
{$ENDIF}
|
||||
{$ifndef BIT16}
|
||||
{$ifdef BIT64}
|
||||
{$define USE_64BITCODE}
|
||||
{$else}
|
||||
{$ifndef FPC}
|
||||
{$ifndef CONDITIONALEXPRESSIONS}
|
||||
{Delphi 5 or lower}
|
||||
{$undef USE_MMXCODE}
|
||||
{$undef USE_MMX_AKP}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$ifdef USE_64BITCODE}
|
||||
{$i kperm_64.inc}
|
||||
{$ifdef HAS_MSG}
|
||||
{.$message '* using 64-bit code'}
|
||||
{$endif}
|
||||
{$else}
|
||||
{$ifdef USE_MMXCODE}
|
||||
{$i kperm_mx.inc}
|
||||
{$ifdef HAS_MSG}
|
||||
{$message '* using mmx code (32Bit/eg)'}
|
||||
{$endif}
|
||||
{$else}
|
||||
{$ifdef USE_MMX_AKP}
|
||||
{$i kperm_mp.inc}
|
||||
{$ifdef HAS_MSG}
|
||||
{$message '* using mmx code (32Bit/akp)'}
|
||||
{$endif}
|
||||
{$else}
|
||||
{$i kperm_32.inc}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$else}
|
||||
{$i kperm_16.inc}
|
||||
{$endif}
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
|
|
@ -542,19 +570,10 @@ end;
|
|||
|
||||
|
||||
begin
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
if AVX2Support then
|
||||
begin
|
||||
xorIntoState:= xorIntoStateAVX;
|
||||
extractFromState:= extractFromStateAVX;
|
||||
KeccakPermutation:= KeccakPermutationAVX;
|
||||
end
|
||||
else begin
|
||||
xorIntoState:= xorIntoState64;
|
||||
extractFromState:= extractFromState64;
|
||||
KeccakPermutation:= KeccakPermutation64;
|
||||
end;
|
||||
{$ENDIF}
|
||||
Assert(SizeOf(TSHA3State) = HASHCTXSIZE , '** Invalid sizeof(TSHA3State)');
|
||||
{$ifdef HAS_ASSERT}
|
||||
assert(sizeof(TSHA3State)=HASHCTXSIZE , '** Invalid sizeof(TSHA3State)');
|
||||
{$else}
|
||||
if sizeof(THashContext)<>HASHCTXSIZE then RunError(227);
|
||||
{$endif}
|
||||
SHA3_LastError := 0;
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
unit Argon2;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$define USE_MTPROCS}
|
||||
{.$define GENKAT}
|
||||
|
||||
interface
|
||||
|
|
@ -43,7 +44,6 @@ const
|
|||
ARGON2_OK = 0;
|
||||
ARGON2_MEMORY_ALLOCATION_ERROR = -22;
|
||||
ARGON2_INCORRECT_PARAMETER = -25;
|
||||
ARGON2_THREAD_FAIL = -33;
|
||||
|
||||
|
||||
type
|
||||
|
|
@ -88,22 +88,11 @@ type
|
|||
ARGON2_VERSION_NUMBER = ARGON2_VERSION_13
|
||||
);
|
||||
|
||||
function argon2d_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t): cint;
|
||||
|
||||
function argon2id_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t): cint;
|
||||
|
||||
function argon2_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t;
|
||||
type_: Targon2_type): cint;
|
||||
|
||||
function argon2_hash(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
|
|
@ -119,7 +108,11 @@ implementation
|
|||
{$R-}{$Q-}
|
||||
|
||||
uses
|
||||
Math, Hash, SysUtils, StrUtils;
|
||||
Math, Hash, SysUtils, StrUtils
|
||||
{$IF DEFINED(USE_MTPROCS)}
|
||||
, MTProcs
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
//**********************Argon2 internal constants*******************************/
|
||||
|
||||
|
|
@ -177,7 +170,6 @@ type
|
|||
Pargon2_position_t = ^Targon2_position_t;
|
||||
Targon2_position_t = record
|
||||
pass: cuint32;
|
||||
lane: cuint32;
|
||||
slice: cuint8;
|
||||
index: cuint32;
|
||||
instance_ptr: Pargon2_instance_t;
|
||||
|
|
@ -621,7 +613,7 @@ begin
|
|||
Result:= absolute_position;
|
||||
end;
|
||||
|
||||
function fill_segment(Data: Pointer): PtrInt;
|
||||
procedure fill_segment(position_lane: PtrInt; Data: Pointer; {%H-}Item: TObject);
|
||||
var
|
||||
ref_block: Pblock = nil;
|
||||
curr_block: Pblock = nil;
|
||||
|
|
@ -634,7 +626,6 @@ var
|
|||
position: Targon2_position_t;
|
||||
instance: Pargon2_instance_t absolute position.instance_ptr;
|
||||
begin
|
||||
Result:= 0;
|
||||
if (Data = nil) then Exit;
|
||||
|
||||
position := Pargon2_position_t(Data)^;
|
||||
|
|
@ -650,7 +641,7 @@ begin
|
|||
init_block_value(@input_block, 0);
|
||||
|
||||
input_block.v[0] := position.pass;
|
||||
input_block.v[1] := position.lane;
|
||||
input_block.v[1] := position_lane;
|
||||
input_block.v[2] := position.slice;
|
||||
input_block.v[3] := instance^.memory_blocks;
|
||||
input_block.v[4] := instance^.passes;
|
||||
|
|
@ -671,7 +662,7 @@ begin
|
|||
end;
|
||||
|
||||
//* Offset of the current block */
|
||||
curr_offset := position.lane * instance^.lane_length +
|
||||
curr_offset := position_lane * instance^.lane_length +
|
||||
position.slice * instance^.segment_length + starting_index;
|
||||
|
||||
if (0 = curr_offset mod instance^.lane_length) then
|
||||
|
|
@ -710,13 +701,13 @@ begin
|
|||
|
||||
if ((position.pass = 0) and (position.slice = 0)) then begin
|
||||
//* Can not reference other lanes yet */
|
||||
ref_lane := position.lane;
|
||||
ref_lane := position_lane;
|
||||
end;
|
||||
|
||||
//* 1.2.3 Computing the number of possible reference block within the lane. */
|
||||
position.index := i;
|
||||
ref_index := index_alpha(instance, @position, pseudo_rand and $FFFFFFFF,
|
||||
ref_lane = position.lane);
|
||||
ref_lane = position_lane);
|
||||
|
||||
//* 2 Creating a new block */
|
||||
ref_block :=
|
||||
|
|
@ -779,12 +770,14 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
//* Single-threaded version for p=1 case */
|
||||
function fill_memory_blocks_st(instance: Pargon2_instance_t): cint;
|
||||
function fill_memory_blocks(instance: Pargon2_instance_t): cint;
|
||||
var
|
||||
r, s, l: cuint32;
|
||||
position: Targon2_position_t;
|
||||
begin
|
||||
if (instance = nil) or (instance^.lanes = 0) then begin
|
||||
Exit(ARGON2_INCORRECT_PARAMETER);
|
||||
end;
|
||||
position.instance_ptr:= instance;
|
||||
for r := 0 to instance^.passes - 1 do
|
||||
begin
|
||||
|
|
@ -792,78 +785,20 @@ begin
|
|||
for s := 0 to ARGON2_SYNC_POINTS - 1 do
|
||||
begin
|
||||
position.slice:= s;
|
||||
for l:= 0 to instance^.lanes - 1 do
|
||||
begin
|
||||
position.lane:= l;
|
||||
fill_segment(@position);
|
||||
end;
|
||||
{$IF DEFINED(USE_MTPROCS)}
|
||||
if instance^.lanes > 1 then
|
||||
ProcThreadPool.DoParallel(TMTProcedure(@fill_segment), 0, instance^.lanes - 1, @position)
|
||||
else
|
||||
{$ENDIF}
|
||||
for l := 0 to instance^.lanes - 1 do fill_segment(l, @position, nil);
|
||||
end;
|
||||
{$IFDEF GENKAT}
|
||||
internal_kat(instance, r); //* Print all memory blocks */
|
||||
internal_kat(instance, r); ///* Print all memory blocks */
|
||||
{$ENDIF}
|
||||
end;
|
||||
Result:= ARGON2_OK;
|
||||
end;
|
||||
|
||||
//* Multi-threaded version for p > 1 case */
|
||||
function fill_memory_blocks_mt(instance: Pargon2_instance_t): cint;
|
||||
var
|
||||
r, s, l, ll: cuint32;
|
||||
threads: array of TThreadID;
|
||||
positions: array of Targon2_position_t;
|
||||
begin
|
||||
// 1. Allocating space for threads
|
||||
SetLength(threads, instance^.lanes);
|
||||
SetLength(positions, instance^.lanes);
|
||||
for r := 0 to instance^.passes - 1 do
|
||||
begin
|
||||
for s := 0 to ARGON2_SYNC_POINTS - 1 do
|
||||
begin
|
||||
// 2. Calling threads
|
||||
for l:= 0 to instance^.lanes - 1 do
|
||||
begin
|
||||
positions[l].pass:= r;
|
||||
positions[l].lane:= l;
|
||||
positions[l].slice:= s;
|
||||
positions[l].instance_ptr:= instance;
|
||||
threads[l]:= BeginThread(@fill_segment, @positions[l]);
|
||||
if (threads[l] = TThreadID(0)) then
|
||||
begin
|
||||
// Wait for already running threads
|
||||
for ll:= 0 to l - 1 do
|
||||
begin
|
||||
WaitForThreadTerminate(threads[ll], -1);
|
||||
CloseThread(threads[ll]);
|
||||
end;
|
||||
Exit(ARGON2_THREAD_FAIL);
|
||||
end;
|
||||
end;
|
||||
// 3. Joining remaining threads
|
||||
for l := instance^.lanes - instance^.threads to instance^.lanes - 1 do
|
||||
begin
|
||||
WaitForThreadTerminate(threads[l], -1);
|
||||
CloseThread(threads[l]);
|
||||
end;
|
||||
end;
|
||||
{$IFDEF GENKAT}
|
||||
internal_kat(instance, r); //* Print all memory blocks */
|
||||
{$ENDIF}
|
||||
end;
|
||||
Result:= ARGON2_OK;
|
||||
end;
|
||||
|
||||
function fill_memory_blocks(instance: Pargon2_instance_t): cint;
|
||||
begin
|
||||
if (instance = nil) or (instance^.lanes = 0) then begin
|
||||
Exit(ARGON2_INCORRECT_PARAMETER);
|
||||
end;
|
||||
if (instance^.threads > 1) then
|
||||
Result:= fill_memory_blocks_mt(instance)
|
||||
else begin
|
||||
Result:= fill_memory_blocks_st(instance);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure fill_first_blocks(blockhash: pcuint8; const instance: pargon2_instance_t);
|
||||
var
|
||||
l: cuint32;
|
||||
|
|
@ -1121,105 +1056,65 @@ begin
|
|||
FreeMem(context.out_);
|
||||
end;
|
||||
|
||||
function argon2d_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t): cint; inline;
|
||||
begin
|
||||
Result:= argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, nil, 0,
|
||||
nil, 0, hash, hashlen, Argon2_d, ARGON2_VERSION_NUMBER);
|
||||
end;
|
||||
|
||||
function argon2id_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t): cint; inline;
|
||||
hash: Pointer; const hashlen: csize_t): cint;
|
||||
begin
|
||||
Result:= argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, nil, 0,
|
||||
nil, 0, hash, hashlen, Argon2_id, ARGON2_VERSION_NUMBER);
|
||||
end;
|
||||
|
||||
function argon2_kdf(const t_cost, m_cost, parallelism: cuint32;
|
||||
const pwd: pansichar; const pwdlen: csize_t;
|
||||
const salt: pansichar; const saltlen: csize_t;
|
||||
hash: Pointer; const hashlen: csize_t;
|
||||
type_: Targon2_type): cint; inline;
|
||||
begin
|
||||
Result:= argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen, nil, 0,
|
||||
nil, 0, hash, hashlen, type_, ARGON2_VERSION_NUMBER);
|
||||
end;
|
||||
|
||||
function argon2_selftest: Boolean;
|
||||
|
||||
function hash_test(version: Targon2_version; type_: Targon2_type; t, m, p: cuint32; pwd, salt, hex: String): Boolean;
|
||||
const
|
||||
AName: array[Targon2_type] of String = ('Argon2d', 'Argon2i', 'Argon2id');
|
||||
var
|
||||
Q: QWord;
|
||||
ret: Integer;
|
||||
out_: String;
|
||||
out_hex: String;
|
||||
out_len: Integer;
|
||||
begin
|
||||
WriteLn(AName[type_]);
|
||||
out_len:= Length(hex) div 2;
|
||||
WriteLn(Format('Hash test: $v=%d t=%d, m=%d, p=%d, pass=%s, salt=%s, result=%d',
|
||||
[version, t, m, p, pwd, salt, out_len]));
|
||||
SetLength(out_, out_len);
|
||||
out_len:= Length(hex) div 2;
|
||||
WriteLn(Format('Hash test: $v=%d t=%d, m=%d, p=%d, pass=%s, salt=%s, result=%d',
|
||||
[version, t, m, p, pwd, salt, out_len]));
|
||||
|
||||
Q:= GetTickCount64;
|
||||
ret:= argon2_hash(t, 1 shl m, p, Pointer(pwd), Length(pwd), Pointer(salt), Length(salt),
|
||||
nil, 0, nil, 0, Pointer(out_), OUT_LEN, type_, version);
|
||||
if (ret <> ARGON2_OK) then
|
||||
begin
|
||||
WriteLn('Error: ', ret);
|
||||
Exit(False);
|
||||
end;
|
||||
WriteLn('Time: ', GetTickCount64 - Q);
|
||||
|
||||
SetLength(out_hex, OUT_LEN * 2);
|
||||
BinToHex(PAnsiChar(out_), PAnsiChar(out_hex), OUT_LEN);
|
||||
Result:= SameText(hex, out_hex);
|
||||
WriteLn('Must: ', hex);
|
||||
WriteLn('Have: ', out_hex);
|
||||
WriteLn('Result: ', Result);
|
||||
WriteLn('------------------------------------------------------------');
|
||||
SetLength(out_, out_len);
|
||||
Q:= GetTickCount64;
|
||||
argon2_hash(t, 1 shl m, p, Pointer(pwd), Length(pwd), Pointer(salt), Length(salt),
|
||||
nil, 0, nil, 0, Pointer(out_), OUT_LEN, type_, version);
|
||||
WriteLn('Time: ', GetTickCount64 - Q);
|
||||
SetLength(out_hex, OUT_LEN * 2);
|
||||
BinToHex(PAnsiChar(out_), PAnsiChar(out_hex), OUT_LEN);
|
||||
Result:= SameText(hex, out_hex);
|
||||
WriteLn('Must: ', hex);
|
||||
WriteLn('Have: ', out_hex);
|
||||
WriteLn('Result: ', Result);
|
||||
WriteLn('------------------------------------------------------------');
|
||||
end;
|
||||
|
||||
begin
|
||||
Result:= True;
|
||||
// Test Argon2i
|
||||
Result:= Result and hash_test(ARGON2_VERSION_10, Argon2_i, 2, 16, 1, 'password', 'somesalt',
|
||||
'f6c4db4a54e2a370627aff3db6176b94a2a209a62c8e36152711802f7b30c694');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_i, 2, 16, 1, 'password', 'somesalt',
|
||||
'c1628832147d9720c5bd1cfd61367078729f6dfb6f8fea9ff98158e0d7816ed0');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_i, 2, 16, 1, 'differentpassword', 'somesalt',
|
||||
'14ae8da01afea8700c2358dcef7c5358d9021282bd88663a4562f59fb74d22ee');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_i, 2, 16, 1, 'password', 'diffsalt',
|
||||
'b0357cccfbef91f3860b0dba447b2348cbefecadaf990abfe9cc40726c521271');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_i, 2, 16, 2,
|
||||
'The quick brown fox jumps over the lazy dog',
|
||||
'09316115d5cf24ed5a15a31a3ba326e5cf32edc24702987c02b6566f61913cf7',
|
||||
'81f1ba863be362444e3a22feca1d65e4d0ff53609ef9db5961d715552d38ac0d');
|
||||
// Test Argon2d
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_d, 2, 16, 1, 'password', 'somesalt',
|
||||
'955e5d5b163a1b60bba35fc36d0496474fba4f6b59ad53628666f07fb2f93eaf');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_d, 4, 17, 4,
|
||||
'The quick brown fox jumps over the lazy dog',
|
||||
'49d91010f3cadfca4964a1305132537e28a195cf7b0823763fa34d190f9b2559',
|
||||
'595193668d0ae6169235017f58d2a197d9cc485af5cb8f26357d95ee7eb991c4');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_d, 10, 16, 4,
|
||||
'The quick brown fox jumps over the lazy dog',
|
||||
'49d91010f3cadfca4964a1305132537e28a195cf7b0823763fa34d190f9b2559',
|
||||
'49101d42bd15dc1559bfd978753ac957c239b2f6184b8de2042e03fdd4b6676c');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_d, 6, 17, 4,
|
||||
'The quick brown fox jumps over the lazy dog',
|
||||
'49d91010f3cadfca4964a1305132537e28a195cf7b0823763fa34d190f9b2559',
|
||||
'13ea5db0e564b8719f7f3fc55559b8ca224dd063256f53051dd5bb682b48b5ac');
|
||||
// Test Argon2id
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_id, 2, 16, 1, 'password', 'somesalt',
|
||||
'09316115d5cf24ed5a15a31a3ba326e5cf32edc24702987c02b6566f61913cf7');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_id, 2, 16, 1, 'password', 'diffsalt',
|
||||
'bdf32b05ccc42eb15d58fd19b1f856b113da1e9a5874fdcc544308565aa8141c');
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_id, 2, 16, 2, 'password', 'somesalt',
|
||||
'6f681ac1c3384a90119d2763a683f9ac79532d999abfab5644aa8aafd3d0d234');
|
||||
// Print result
|
||||
// Recommended parameters (the running time about 125ms on Intel Core i5-7400 64 bit)
|
||||
Result:= Result and hash_test(ARGON2_VERSION_NUMBER, Argon2_id, 2, 16, 4,
|
||||
'password','123456789012345678901234567890xy',
|
||||
'c80142cbb6076b2d6be20137ddf24679cfc70eb4cde0f242a342e9e63636292eb2efcd907873fc19ca0bee0b7d7e992a7f68ce24a2da379bc41d5eb235f76eaa17220a6fa82d2d4a2e168b021dbfa5ba5a9f232ea0a1e24d');
|
||||
WriteLn('Result: ', Result);
|
||||
end;
|
||||
|
||||
0
components/kascrypt/Hashes/Include/blake2_avx.inc → components/kascrypt/Hashes/blake2_avx.inc
Normal file → Executable file
0
components/kascrypt/Hashes/Include/blake2_avx.inc → components/kascrypt/Hashes/blake2_avx.inc
Normal file → Executable file
0
components/kascrypt/Hashes/Include/blake3_avx2.inc → components/kascrypt/Hashes/blake3_avx2.inc
Normal file → Executable file
0
components/kascrypt/Hashes/Include/blake3_avx2.inc → components/kascrypt/Hashes/blake3_avx2.inc
Normal file → Executable file
11
components/kascrypt/Hashes/Include/blake3_sse41.inc → components/kascrypt/Hashes/blake3_sse41.inc
Normal file → Executable file
11
components/kascrypt/Hashes/Include/blake3_sse41.inc → components/kascrypt/Hashes/blake3_sse41.inc
Normal file → Executable file
|
|
@ -2086,3 +2086,14 @@ asm
|
|||
{$ENDIF}
|
||||
ret
|
||||
end;
|
||||
|
||||
function SSE41Support: LongBool; assembler;
|
||||
asm
|
||||
push rbx
|
||||
mov eax, 1
|
||||
cpuid
|
||||
and ecx, $80000
|
||||
mov eax, ecx
|
||||
pop rbx
|
||||
end;
|
||||
|
||||
|
|
@ -30,8 +30,6 @@ const
|
|||
|
||||
{$if defined(CPUX86_64)}
|
||||
MAX_SIMD_DEGREE = 16;
|
||||
{$elseif defined(CPUAARCH64)}
|
||||
MAX_SIMD_DEGREE = 4;
|
||||
{$else}
|
||||
MAX_SIMD_DEGREE = 1;
|
||||
{$endif}
|
||||
|
|
@ -88,7 +86,7 @@ implementation
|
|||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
uses
|
||||
CPU, KAScpu;
|
||||
CPU;
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
|
|
@ -205,10 +203,6 @@ end;
|
|||
{$include blake3_pas.inc}
|
||||
{$ENDIF}
|
||||
|
||||
{$IF DEFINED(CPUAARCH64)}
|
||||
{$include blake3_neon.inc}
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
blake3_simd_degree: csize_t; // The dynamically detected SIMD degree of the current platform
|
||||
|
||||
|
|
@ -738,11 +732,6 @@ initialization
|
|||
blake3_compress_xof:= @blake3_compress_xof_sse2;
|
||||
blake3_hash_many:= @blake3_hash_many_sse2;
|
||||
end;
|
||||
{$ELSEIF DEFINED(CPUAARCH64)}
|
||||
blake3_simd_degree:= 4;
|
||||
blake3_compress_in_place:= @blake3_compress_in_place_portable;
|
||||
blake3_compress_xof:= @blake3_compress_xof_portable;
|
||||
blake3_hash_many:= @blake3_hash_many_neon;
|
||||
{$ELSE}
|
||||
blake3_simd_degree:= 1;
|
||||
blake3_compress_in_place:= @blake3_compress_in_place_portable;
|
||||
|
|
@ -750,3 +739,4 @@ initialization
|
|||
blake3_hash_many:= @blake3_hash_many_portable;
|
||||
{$ENDIF}
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -80,13 +80,9 @@ implementation
|
|||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
uses
|
||||
CPU, KAScpu;
|
||||
CPU;
|
||||
{$include sha256_sse.inc}
|
||||
{$include sha256_avx.inc}
|
||||
{$ELSEIF DEFINED(CPUAARCH64)}
|
||||
uses
|
||||
KAScpu;
|
||||
{$include sha256_arm.inc}
|
||||
{$ENDIF}
|
||||
|
||||
procedure sha256_compress_pas(CurrentHash: PLongWord; HashBuffer: PByte; BufferCount: UIntPtr); register;
|
||||
|
|
@ -217,10 +213,6 @@ begin
|
|||
else if SSSE3Support then
|
||||
FCompress:= @sha256_compress_sse
|
||||
else
|
||||
{$ELSEIF DEFINED(CPUAARCH64)}
|
||||
if SHA256Support then
|
||||
FCompress:= @sha256_compress_arm
|
||||
else
|
||||
{$ENDIF}
|
||||
FCompress:= @sha256_compress_pas;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{* A binary compatible implementation of SHA512 *******************************}
|
||||
{******************************************************************************}
|
||||
{* Copyright (C) 1999-2002 David Barton *}
|
||||
{* Copyright (C) 2018-2025 Alexander Koblov (alexx2000@mail.ru) *}
|
||||
{* Copyright (C) 2018 Alexander Koblov (alexx2000@mail.ru) *}
|
||||
{* 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 *}
|
||||
|
|
@ -75,10 +75,7 @@ implementation
|
|||
{$R-}{$Q-}
|
||||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
uses
|
||||
CPU, KAScpu;
|
||||
{$include sha512_sse.inc}
|
||||
{$include sha512_avx.inc}
|
||||
{$ENDIF}
|
||||
|
||||
procedure sha512_compress_pas(HashBuffer: PByte; CurrentHash: PInt64; BufferCount: UIntPtr); register;
|
||||
|
|
@ -221,9 +218,7 @@ end;
|
|||
procedure TDCP_sha512base.Init;
|
||||
begin
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
if AVX2Support and BMI2Support then
|
||||
FCompress:= @sha512_compress_avx
|
||||
else if SSSE3Support then
|
||||
if SSSE3Support then
|
||||
FCompress:= @sha512_compress_sse
|
||||
else
|
||||
{$ENDIF}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ type
|
|||
implementation
|
||||
{$R-}{$Q-}
|
||||
|
||||
{$INCLUDE dcptiger.inc}
|
||||
{$INCLUDE DCPtiger.inc}
|
||||
|
||||
procedure TDCP_tiger.Compress;
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
{******************************************************************************}
|
||||
{* DCPcrypt v2.0 written by David Barton (crypto@cityinthesky.co.uk) **********}
|
||||
{******************************************************************************}
|
||||
{* A binary compatible implementation of XXH3-128 *}
|
||||
{******************************************************************************}
|
||||
{* Copyright (C) 2024 Alexander Koblov (alexx2000@mail.ru) *}
|
||||
{* Permission is hereby granted, free of charge, to any person obtaining a *}
|
||||
{* copy of this software and associated documentation files (the "Software"), *}
|
||||
{* to deal in the Software without restriction, including without limitation *}
|
||||
{* the rights to use, copy, modify, merge, publish, distribute, sublicense, *}
|
||||
{* and/or sell copies of the Software, and to permit persons to whom the *}
|
||||
{* Software is furnished to do so, subject to the following conditions: *}
|
||||
{* *}
|
||||
{* The above copyright notice and this permission notice shall be included in *}
|
||||
{* all copies or substantial portions of the Software. *}
|
||||
{* *}
|
||||
{* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *}
|
||||
{* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *}
|
||||
{* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *}
|
||||
{* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *}
|
||||
{* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *}
|
||||
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
||||
{* DEALINGS IN THE SOFTWARE. *}
|
||||
{******************************************************************************}
|
||||
unit DCPxxh3;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Sysutils, DCPcrypt2, DCxxhash;
|
||||
|
||||
type
|
||||
|
||||
{ TDCP_xxh3_128 }
|
||||
|
||||
TDCP_xxh3_128 = class(TDCP_hash)
|
||||
protected
|
||||
S: PXXH3_state_t;
|
||||
public
|
||||
class function GetAlgorithm: string; override;
|
||||
class function GetHashSize: integer; override;
|
||||
class function SelfTest: boolean; override;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Init; override;
|
||||
procedure Burn; override;
|
||||
procedure Update(const Buffer; Size: longword); override;
|
||||
procedure Final(var Digest); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
{$R-}{$Q-}
|
||||
|
||||
{ TDCP_xxh3_128 }
|
||||
|
||||
class function TDCP_xxh3_128.GetHashSize: integer;
|
||||
begin
|
||||
Result:= 128;
|
||||
end;
|
||||
|
||||
class function TDCP_xxh3_128.GetAlgorithm: string;
|
||||
begin
|
||||
Result:= 'XXH3-128';
|
||||
end;
|
||||
|
||||
class function TDCP_xxh3_128.SelfTest: boolean;
|
||||
begin
|
||||
Result:= False; // TODO: SelfTest XXH3_128
|
||||
end;
|
||||
|
||||
constructor TDCP_xxh3_128.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
S:= XXH3_createState();
|
||||
end;
|
||||
|
||||
destructor TDCP_xxh3_128.Destroy;
|
||||
begin
|
||||
XXH3_freeState(S);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TDCP_xxh3_128.Init;
|
||||
begin
|
||||
Burn;
|
||||
fInitialized:= true;
|
||||
end;
|
||||
|
||||
procedure TDCP_xxh3_128.Burn;
|
||||
begin
|
||||
XXH3_128bits_reset(S);
|
||||
fInitialized:= false;
|
||||
end;
|
||||
|
||||
procedure TDCP_xxh3_128.Update(const Buffer; Size: longword);
|
||||
begin
|
||||
XXH3_128bits_update(S, @Buffer, Size);
|
||||
end;
|
||||
|
||||
procedure TDCP_xxh3_128.Final(var Digest);
|
||||
var
|
||||
Temp: UInt64;
|
||||
Hash: XXH128_hash_t;
|
||||
begin
|
||||
if not fInitialized then
|
||||
raise EDCP_hash.Create('Hash not initialized');
|
||||
Hash:= XXH3_128bits_digest(S);
|
||||
Temp:= SwapEndian(Hash.low64);
|
||||
Hash.low64:= SwapEndian(Hash.high64);
|
||||
Hash.high64:= Temp;
|
||||
Move(Hash, Digest, Sizeof(XXH128_hash_t));
|
||||
Burn;
|
||||
end;
|
||||
|
||||
end.
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -46,6 +46,7 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; This code schedules 2 blocks at a time, with 4 lanes per block
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
*/
|
||||
/*
|
||||
* Conversion to GAS assembly and integration to libgcrypt
|
||||
* by Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
|
|
@ -55,12 +56,12 @@
|
|||
{$CODEALIGN CONSTMIN=32}
|
||||
|
||||
const
|
||||
_FLIP_MASK: array [0..7] of UInt32 = ($00010203, $04050607, $08090A0B, $0C0D0E0F,
|
||||
$00010203, $04050607, $08090A0B, $0C0D0E0F);
|
||||
_SHUF_00BA: array [0..7] of UInt32 = ($03020100, $0B0A0908, $FFFFFFFF, $FFFFFFFF,
|
||||
$03020100, $0B0A0908, $FFFFFFFF, $FFFFFFFF);
|
||||
_SHUF_DC00: array [0..7] of UInt32 = ($FFFFFFFF, $FFFFFFFF, $03020100, $0B0A0908,
|
||||
$FFFFFFFF, $FFFFFFFF, $03020100, $0B0A0908);
|
||||
_BYTE_FLIP_MASK: array [0..7] of UInt32 = (66051, 67438087, 134810123, 202182159,
|
||||
66051, 67438087, 134810123, 202182159);
|
||||
_SHUF_00BA: array [0..7] of UInt32 = (50462976, 185207048, $FFFFFFFF, $FFFFFFFF,
|
||||
50462976, 185207048, $FFFFFFFF, $FFFFFFFF);
|
||||
_SHUF_DC00: array [0..7] of UInt32 = ($FFFFFFFF, $FFFFFFFF, 50462976, 185207048,
|
||||
$FFFFFFFF, $FFFFFFFF, 50462976, 185207048);
|
||||
|
||||
procedure sha256_compress_avx(CurrentHash: PLongWord; HashBuffer: PByte; BufferCount: UIntPtr); assembler; nostackframe;
|
||||
// UNIX RDI, RSI, RDX
|
||||
|
|
@ -96,7 +97,7 @@ asm
|
|||
push %r14
|
||||
push %r15
|
||||
vzeroupper
|
||||
vmovdqa _FLIP_MASK(%rip),%ymm13
|
||||
vmovdqa _BYTE_FLIP_MASK(%rip),%ymm13
|
||||
vmovdqa _SHUF_00BA(%rip),%ymm10
|
||||
vmovdqa _SHUF_DC00(%rip),%ymm12
|
||||
mov %rsp,%rax
|
||||
|
|
@ -1384,7 +1385,7 @@ asm
|
|||
mov 0x14(%rsi),%r9d
|
||||
mov 0x18(%rsi),%r10d
|
||||
mov 0x1c(%rsi),%r11d
|
||||
vmovdqa _FLIP_MASK(%rip),%ymm13
|
||||
vmovdqa _BYTE_FLIP_MASK(%rip),%ymm13
|
||||
vmovdqa _SHUF_00BA(%rip),%ymm10
|
||||
vmovdqa _SHUF_DC00(%rip),%ymm12
|
||||
mov %rsi,0x210(%rsp)
|
||||
18
components/kascrypt/dcp.pas
Normal file
18
components/kascrypt/dcp.pas
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ This file was automatically created by Lazarus. do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit dcp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
DCPbase64, DCPblockciphers, DCPconst, DCPcrypt2, DCPblowfish, DCPcast128,
|
||||
DCPcast256, DCPdes, DCPgost, DCPice, DCPidea, DCPmars, DCPmisty1, DCPrc2,
|
||||
DCPrc4, DCPrc5, DCPrc6, DCPrijndael, DCPserpent, DCPtea, DCPtwofish,
|
||||
DCPhaval, DCPmd4, DCPmd5, DCPripemd128, DCPripemd160, DCPsha1, DCPsha256,
|
||||
DCPsha512, DCPtiger;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
{* Main component definitions *************************************************}
|
||||
{******************************************************************************}
|
||||
{* Copyright (C) 1999-2003 David Barton *}
|
||||
{* Copyright (C) 2018 Alexander Koblov (alexx2000@mail.ru) *}
|
||||
{* 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 *}
|
||||
|
|
@ -254,6 +255,13 @@ procedure dcpFillChar(out x; count: SizeInt; Value: Byte); overload;
|
|||
procedure dcpFillChar(out x; count: SizeInt; Value: Char); overload;
|
||||
procedure ZeroMemory(Destination: Pointer; Length: PtrUInt);
|
||||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
|
||||
function BMI2Support: LongBool;
|
||||
function SSSE3Support: LongBool;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
{$Q-}{$R-}
|
||||
|
|
@ -696,5 +704,30 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
{$IF DEFINED(CPUX86_64)}
|
||||
|
||||
function BMI2Support: LongBool; assembler; nostackframe;
|
||||
asm
|
||||
pushq %rbx
|
||||
movl $7,%eax
|
||||
movl $0,%ecx
|
||||
cpuid
|
||||
andl $256,%ebx
|
||||
movl %ebx,%eax
|
||||
popq %rbx
|
||||
end;
|
||||
|
||||
function SSSE3Support: LongBool; assembler; nostackframe;
|
||||
asm
|
||||
pushq %rbx
|
||||
movl $1,%eax
|
||||
cpuid
|
||||
andl $512,%ecx
|
||||
movl %ecx,%eax
|
||||
popq %rbx
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,151 +0,0 @@
|
|||
{
|
||||
KAScrypt Cryptographic Component Library
|
||||
-------------------------------------------------------------------------
|
||||
Detect hardware features
|
||||
|
||||
Copyright (C) 2018-2025 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
}
|
||||
|
||||
unit KAScpu;
|
||||
|
||||
interface
|
||||
|
||||
{$IF DEFINED(CPUAARCH64)}
|
||||
|
||||
function SHA256Support: Boolean;
|
||||
|
||||
{$ELSEIF DEFINED(CPUX86_64)}
|
||||
|
||||
function BMI2Support: LongBool;
|
||||
function SSSE3Support: LongBool;
|
||||
function SSE41Support: LongBool;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
{$IF DEFINED(CPUAARCH64)}
|
||||
|
||||
{$IF DEFINED(WIN64)}
|
||||
uses
|
||||
Windows;
|
||||
{$ELSEIF DEFINED(UNIX)}
|
||||
uses
|
||||
InitC, CTypes;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
HWCAP_SHA2 = 64;
|
||||
|
||||
var
|
||||
hwcaps: UInt64 = 0;
|
||||
|
||||
{$IF DEFINED(LINUX) OR DEFINED(ANDROID)}
|
||||
|
||||
const
|
||||
AT_HWCAP = 16;
|
||||
|
||||
function getauxval(type_: culong): culong; cdecl; external clib;
|
||||
|
||||
procedure Initialize;
|
||||
begin
|
||||
hwcaps:= getauxval(AT_HWCAP);
|
||||
end;
|
||||
{$ELSEIF DEFINED(DARWIN)}
|
||||
|
||||
function sysctlbyname(const name: pansichar; oldp: pointer; oldlenp: pcsize_t;
|
||||
const newp: pointer; newlen: csize_t): cint; cdecl; external clib;
|
||||
|
||||
procedure Initialize;
|
||||
var
|
||||
value: cint;
|
||||
size: csize_t;
|
||||
begin
|
||||
value:= 0;
|
||||
size:= SizeOf(value);
|
||||
if sysctlbyname('hw.optional.arm.FEAT_SHA256', @value, @size, nil, 0) = 0 then
|
||||
begin
|
||||
if (size > 0) and (value <> 0) then
|
||||
begin
|
||||
hwcaps:= hwcaps or HWCAP_SHA2;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ELSEIF DEFINED(WIN64)}
|
||||
const
|
||||
PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE = 30;
|
||||
|
||||
function IsProcessorFeaturePresent(ProcessorFeature: DWORD): BOOL; stdcall; external kernel32;
|
||||
|
||||
procedure Initialize;
|
||||
begin
|
||||
if IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) then
|
||||
hwcaps:= hwcaps or HWCAP_SHA2;
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
function SHA256Support: Boolean;
|
||||
begin
|
||||
Result:= (hwcaps and HWCAP_SHA2) <> 0;
|
||||
end;
|
||||
|
||||
initialization
|
||||
Initialize;
|
||||
|
||||
{$ELSEIF DEFINED(CPUX86_64)}
|
||||
|
||||
function BMI2Support: LongBool; assembler; nostackframe;
|
||||
asm
|
||||
pushq %rbx
|
||||
movl $7,%eax
|
||||
movl $0,%ecx
|
||||
cpuid
|
||||
andl $256,%ebx
|
||||
movl %ebx,%eax
|
||||
popq %rbx
|
||||
end;
|
||||
|
||||
function SSSE3Support: LongBool; assembler; nostackframe;
|
||||
asm
|
||||
pushq %rbx
|
||||
movl $1,%eax
|
||||
cpuid
|
||||
andl $512,%ecx
|
||||
movl %ecx,%eax
|
||||
popq %rbx
|
||||
end;
|
||||
|
||||
function SSE41Support: LongBool; assembler; nostackframe;
|
||||
asm
|
||||
pushq %rbx
|
||||
movl $1,%eax
|
||||
cpuid
|
||||
andl $0x80000,%ecx
|
||||
movl %ecx,%eax
|
||||
popq %rbx
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="Hashes/Include;Hashes/Private;Ciphers"/>
|
||||
<OtherUnitFiles Value="Ciphers;Hashes;Hashes/Private;KeyDerivation;Random;$(PkgOutDir)"/>
|
||||
<IncludeFiles Value="Hashes/Private;Ciphers"/>
|
||||
<OtherUnitFiles Value="Ciphers;Hashes;Hashes/Private;Random;$(PkgOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
"/>
|
||||
<License Value="KAScrypt is open source software (released under the MIT license) and as such there is no charge for inclusion in other software.
|
||||
"/>
|
||||
<Version Major="3" Minor="5"/>
|
||||
<Files Count="32">
|
||||
<Version Major="3" Minor="1" Release="1"/>
|
||||
<Files Count="30">
|
||||
<Item1>
|
||||
<Filename Value="dcpbase64.pas"/>
|
||||
<UnitName Value="DCPbase64"/>
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<UnitName Value="DCPcrc32"/>
|
||||
</Item14>
|
||||
<Item15>
|
||||
<Filename Value="Hashes/dcptiger.inc"/>
|
||||
<Filename Value="Hashes/DCPtiger.inc"/>
|
||||
<Type Value="Include"/>
|
||||
</Item15>
|
||||
<Item16>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
<UnitName Value="ISAAC"/>
|
||||
</Item23>
|
||||
<Item24>
|
||||
<Filename Value="KeyDerivation/scrypt.pas"/>
|
||||
<Filename Value="Hashes/Private/scrypt.pas"/>
|
||||
<UnitName Value="scrypt"/>
|
||||
</Item24>
|
||||
<Item25>
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
<UnitName Value="SHA1"/>
|
||||
</Item27>
|
||||
<Item28>
|
||||
<Filename Value="KeyDerivation/argon2.pas"/>
|
||||
<Filename Value="Hashes/argon2.pas"/>
|
||||
<UnitName Value="Argon2"/>
|
||||
</Item28>
|
||||
<Item29>
|
||||
|
|
@ -159,14 +159,6 @@
|
|||
<Filename Value="Hashes/dcpchecksum32.pas"/>
|
||||
<UnitName Value="dcpchecksum32"/>
|
||||
</Item30>
|
||||
<Item31>
|
||||
<Filename Value="Hashes/dcpxxh3.pas"/>
|
||||
<UnitName Value="DCPxxh3"/>
|
||||
</Item31>
|
||||
<Item32>
|
||||
<Filename Value="Hashes/dcxxhash.pas"/>
|
||||
<UnitName Value="DCxxhash"/>
|
||||
</Item32>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="2">
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ uses
|
|||
DCPbase64, DCPblockciphers, DCPconst, DCPcrypt2, DCPhaval, DCPmd4, DCPmd5,
|
||||
DCPripemd128, DCPripemd160, DCPsha1, DCPsha256, DCPsha512, DCPtiger,
|
||||
DCPcrc32, DCcrc32, DCblake2, DCPblake2, DCPsha3, HMAC, SHA3, SHA3_512,
|
||||
ISAAC, scrypt, DCPrijndael, SHA1, Argon2, DCPblake3, dcpchecksum32, DCPxxh3,
|
||||
DCxxhash;
|
||||
ISAAC, scrypt, DCPrijndael, SHA1, Argon2, DCPblake3, dcpchecksum32;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
KAScrypt Cryptographic Component Library
|
||||
|
||||
Copyright (C) 2011-2025 Alexander Koblov
|
||||
Copyright (C) 2011-2023 Alexander Koblov
|
||||
|
||||
KAScrypt library implements a modern cryptographic hash functions
|
||||
with hardware acceleration using SIMD instructions
|
||||
under x86_64 and aarch64 platforms:
|
||||
with hardware acceleration using SIMD instructions under x86_64 platform:
|
||||
|
||||
| Function | Acceleration |
|
||||
| ---------| ------------------------ |
|
||||
| SHA224 | SSSE3, AVX2, ARM64CE |
|
||||
| SHA256 | SSSE3, AVX2, ARM64CE |
|
||||
| SHA384 | SSSE3, AVX2 |
|
||||
| SHA512 | SSSE3, AVX2 |
|
||||
| SHA3-224 | AVX2 |
|
||||
| SHA3-256 | AVX2 |
|
||||
| SHA3-384 | AVX2 |
|
||||
| SHA3-512 | AVX2 |
|
||||
| BLAKE2s | SSE2, AVX |
|
||||
| BLAKE2sp | SSE2, AVX |
|
||||
| BLAKE2b | SSE2, AVX |
|
||||
| BLAKE2bp | SSE2, AVX |
|
||||
| BLAKE3 | SSE2, SSE4.1, AVX2, NEON |
|
||||
| Function | Acceleration |
|
||||
| ---------| -------------------|
|
||||
| SHA224 | SSSE3, AVX2 |
|
||||
| SHA256 | SSSE3, AVX2 |
|
||||
| SHA384 | SSSE3 |
|
||||
| SHA512 | SSSE3 |
|
||||
| SHA3-224 | |
|
||||
| SHA3-256 | |
|
||||
| SHA3-384 | |
|
||||
| SHA3-512 | |
|
||||
| BLAKE2s | SSE2, AVX |
|
||||
| BLAKE2sp | SSE2, AVX |
|
||||
| BLAKE2b | SSE2, AVX |
|
||||
| BLAKE2bp | SSE2, AVX |
|
||||
| BLAKE3 | SSE2, SSE4.1, AVX2 |
|
||||
|
||||
Based on:
|
||||
DCPcrypt Cryptographic Component Library
|
||||
|
|
|
|||
|
|
@ -138,11 +138,12 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
CRC, Laz2_XMLRead, LCLVersion;
|
||||
CRC, Laz2_XMLRead;
|
||||
|
||||
//==== TSynUniSyn ============================================================
|
||||
constructor TSynUniSyn.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
Info := TSynInfo.Create;
|
||||
Info.History := TStringList.Create;
|
||||
Info.Sample := TStringList.Create;
|
||||
|
|
@ -156,8 +157,6 @@ begin
|
|||
fEol := False;
|
||||
fPrEol := False;
|
||||
fCurrentRule := MainRules;
|
||||
|
||||
inherited Create(AOwner);
|
||||
end;
|
||||
|
||||
destructor TSynUniSyn.Destroy;
|
||||
|
|
@ -446,20 +445,7 @@ end;
|
|||
|
||||
procedure TSynUniSyn.SetRange(Value: Pointer);
|
||||
//: Set current range
|
||||
{$if lcl_fullversion >= 4990000}
|
||||
var
|
||||
Index: Integer;
|
||||
{$endif}
|
||||
begin
|
||||
{$if lcl_fullversion >= 4990000}
|
||||
// Workaround, issue #2764
|
||||
if (Value = nil) then
|
||||
begin
|
||||
Index:= LineIndex - 1;
|
||||
PrepareLines(-1, 100);
|
||||
Value:= CurrentRanges[Index];
|
||||
end;
|
||||
{$endif}
|
||||
fCurrentRule := TSynRange(Value);
|
||||
end;
|
||||
|
||||
|
|
@ -716,9 +702,6 @@ begin
|
|||
ReadXMLFile(Xml, TargetStream, [xrfPreserveWhiteSpace]);
|
||||
try
|
||||
LoadFromXml(Xml);
|
||||
{$if lcl_fullversion >= 4990000}
|
||||
DefaultFilter:= GetDefaultFilter;
|
||||
{$endif}
|
||||
finally
|
||||
Xml.Free;
|
||||
end;
|
||||
|
|
@ -742,9 +725,6 @@ procedure TSynUniSyn.SaveToStream(Stream: TStream; Rule: TSynRule);
|
|||
var
|
||||
StreamWriter: TStreamWriter;
|
||||
begin
|
||||
{$if lcl_fullversion >= 4990000}
|
||||
SetDefaultFilter(DefaultFilter);
|
||||
{$endif}
|
||||
StreamWriter := TStreamWriter.Create(Stream);
|
||||
with StreamWriter do begin
|
||||
WriteTag(0, 'UniHighlighter');
|
||||
|
|
|
|||
742
components/viewer/viewercontrol.pas
Executable file → Normal file
742
components/viewer/viewercontrol.pas
Executable file → Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -785,9 +785,7 @@ end;
|
|||
procedure TCustomComTerminal.ClearScreen;
|
||||
begin
|
||||
FBuffer.Init(0, 0);
|
||||
FTopLeft := Classes.Point(1, 1);
|
||||
MoveCaret(1, 1);
|
||||
UpdateScrollRange;
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
|
|
@ -1363,7 +1361,7 @@ begin
|
|||
end;
|
||||
if FAutoFollow then
|
||||
begin
|
||||
if (FCaretPos.Y - FTopLeft.Y) >= FVisibleRows then
|
||||
if (FCaretPos.Y - FTopLeft.Y) > FVisibleRows then
|
||||
begin
|
||||
I:= FCaretPos.Y - FVisibleRows + 1;
|
||||
ModifyScrollBar(SB_Vert, SB_THUMBPOSITION, I);
|
||||
|
|
@ -1775,9 +1773,7 @@ begin
|
|||
ecEraseScreen:
|
||||
begin
|
||||
FBuffer.EraseScreenRight(1, 1);
|
||||
FTopLeft := Classes.Point(1, 1);
|
||||
MoveCaret(1, 1);
|
||||
UpdateScrollRange;
|
||||
MoveCaret(1, 1)
|
||||
end;
|
||||
ecEraseChar: FBuffer.EraseChar(FCaretPos.X, FCaretPos.Y, GetParam(1, AParams));
|
||||
ecDeleteChar: FBuffer.DeleteChar(FCaretPos.X, FCaretPos.Y, GetParam(1, AParams));
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ Extension=7z
|
|||
Description=7-Zip - www.7-zip.org
|
||||
ID=37 7A BC AF 27 1C
|
||||
IDPos=0
|
||||
Archiver=7zz
|
||||
FallBackArchivers=7zzs,7za,7z
|
||||
Archiver=7za
|
||||
Start=^-------------------
|
||||
End=^-------------------
|
||||
Format0=yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp n+
|
||||
|
|
@ -22,9 +21,8 @@ Enabled=0
|
|||
Debug=0
|
||||
|
||||
[7Z (ro)]
|
||||
Archiver=7zz
|
||||
FallBackArchivers=7zzs,7z
|
||||
Description=7-Zip - www.7-zip.org (read-only addon)
|
||||
Archiver=7z
|
||||
Description=7-Zip - www.7-zip.org
|
||||
Extension=cab,z,taz,lzh,lha,iso,wim,swm,dmg,xar,hfs,ntfs,fat,vhd,mbr
|
||||
Start=^-------------------
|
||||
End=^-------------------
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Compiling Double Commander
|
|||
1) What you need?
|
||||
|
||||
Double Commander is developed with Free Pascal and Lazarus.
|
||||
Current version requires at least FPC 3.2.2 and Lazarus 4.0.
|
||||
Current version requires at least FPC 3.2.2 and Lazarus 2.2.0 (3.0 under macOS).
|
||||
|
||||
2) Using the IDE to develop and build DC.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ directory of DC sources. You must open each .lpk package file:
|
|||
- multithreadprocs/multithreadprocslaz.lpk
|
||||
- kascrypt/kascrypt.lpk
|
||||
- doublecmd/doublecmd_common.lpk
|
||||
- gifview/gifview.lpk
|
||||
- gifanim/pkg_gifanim.lpk
|
||||
- KASToolBar/kascomp.lpk
|
||||
- synunihighlighter/synuni.lpk
|
||||
- viewer/viewerpackage.lpk
|
||||
|
|
|
|||
|
|
@ -77,17 +77,6 @@
|
|||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>DoubleCommand</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>dc2ea085a05ac273a</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB |
|
|
@ -1,2 +1 @@
|
|||
ru
|
||||
zh
|
||||
ru
|
||||
|
|
@ -19,7 +19,7 @@ const
|
|||
'components\Image32\Image32.lpk',
|
||||
'components\KASToolBar\kascomp.lpk',
|
||||
'components\viewer\viewerpackage.lpk',
|
||||
'components\gifview\gifview.lpk',
|
||||
'components\gifanim\pkg_gifanim.lpk',
|
||||
'components\synunihighlighter\synuni.lpk',
|
||||
'components\virtualterminal\virtualterminal.lpk'
|
||||
);
|
||||
|
|
@ -50,10 +50,9 @@ const
|
|||
'plugins/wcx/cpio/src/cpio.lpi'
|
||||
);
|
||||
|
||||
DarwinPlugins: array[1..3] of String =
|
||||
DarwinPlugins: array[1..2] of String =
|
||||
(
|
||||
'plugins/wcx/cpio/src/cpio.lpi',
|
||||
'plugins/wfx/MacCloud/src/MacCloud.lpi',
|
||||
'plugins/wlx/MacPreview/src/MacPreview.lpi'
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<UniHighlighter version="1.8">
|
||||
<Info>
|
||||
<General Name="JSON" Extensions="json,jsonc" Other="0"/>
|
||||
<General Name="JSON" Extensions="json" Other="0"/>
|
||||
<Author Name="" Email="" Web="" Copyright="" Company="" Remark=""/>
|
||||
<Version Version="1" Revision="1" Date="45338,8541038426"/>
|
||||
<History>
|
||||
|
|
@ -40,14 +40,6 @@
|
|||
<Word Value=":"/>
|
||||
</Keywords>
|
||||
<Set Name="Numbers" Attributes="$00008000,$80000005;False:True." Style="" Symbols="0123456789"/>
|
||||
<Range Name="Remark //" Attributes="$00A00000,$80000005;False:True." Style="" CaseSensitive="True"
|
||||
Delimiters="!"#$%&'()*+,-./:;<=>?@[\]^`{|}~">
|
||||
<Rule OpenSymbol="//" CloseOnEol="True"/>
|
||||
</Range>
|
||||
<Range Name="Remark /*...*/" Attributes="$00A00000,$80000005;False:True." Style="" CaseSensitive="True"
|
||||
Delimiters="!"#$%&'()*+,-./:;<=>?@[\]^`{|}~">
|
||||
<Rule OpenSymbol="/*" CloseSymbol="*/"/>
|
||||
</Range>
|
||||
<Range Name="Strings ".."" Attributes="$00000080,$80000005;False:True." Style=""
|
||||
Delimiters="!"#$%&'()*+,-./:;<=>?@[\]^`{|}~">
|
||||
<Rule OpenSymbol=""" OpenSymbolPartOfTerm="Right" CloseSymbol=""" CloseSymbolPartOfTerm="Right" CloseOnEol="True"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<UniHighlighter version="1.8">
|
||||
<Info>
|
||||
<General Name="JavaScript" Extensions="js,ts,mjs,cjs" Other="0"/>
|
||||
<General Name="Java script" Extensions="js" Other="0"/>
|
||||
<Author Name="Vitaly Nevzorov" Email="nevzorov@yahoo.com" Web="www.delphist.com" Copyright="Copyright (c) Vitaly Nevzorov, 2002" Company="N/A" Remark=""/>
|
||||
<Version Version="1" Revision="1" Date="45338,8541038426"/>
|
||||
<History>
|
||||
|
|
|
|||
|
|
@ -234,14 +234,6 @@
|
|||
}
|
||||
],
|
||||
Ranges : [
|
||||
{
|
||||
Name : "Remark //",
|
||||
Attributes : "$00A00000,$80000005;False:True."
|
||||
},
|
||||
{
|
||||
Name : "Remark /*...*/",
|
||||
Attributes : "$00A00000,$80000005;False:True."
|
||||
},
|
||||
{
|
||||
Name : "Strings \"..\"",
|
||||
Attributes : "$00000080,$80000005;False:True.",
|
||||
|
|
@ -257,7 +249,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
Name : "JavaScript",
|
||||
Name : "Java script",
|
||||
Ranges : [
|
||||
{
|
||||
Name : "Root",
|
||||
|
|
@ -834,14 +826,6 @@
|
|||
}
|
||||
],
|
||||
Ranges : [
|
||||
{
|
||||
Name : "Remark //",
|
||||
Attributes : "$00C09B61,$80000005;False:True."
|
||||
},
|
||||
{
|
||||
Name : "Remark /*...*/",
|
||||
Attributes : "$00C09B61,$80000005;False:True."
|
||||
},
|
||||
{
|
||||
Name : "Strings \"..\"",
|
||||
Attributes : "$00898BB9,$80000005;False:True.",
|
||||
|
|
@ -857,7 +841,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
Name : "JavaScript",
|
||||
Name : "Java script",
|
||||
Ranges : [
|
||||
{
|
||||
Name : "Root",
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue