Compare commits
595 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caa49a8ef3 | ||
|
|
9a6a787191 | ||
|
|
836c996544 | ||
|
|
b8028ff318 | ||
|
|
9a7e6850d6 | ||
|
|
fdbed324f7 | ||
|
|
95baf25648 | ||
|
|
48ea024d7e | ||
|
|
6dfeea1980 | ||
|
|
9d6cf95cf0 | ||
|
|
97c8603478 | ||
|
|
7654983d3d | ||
|
|
3c2b4b1560 | ||
|
|
cb63df2bac | ||
|
|
400073c7cc | ||
|
|
7438d6db18 | ||
|
|
719323e9c3 | ||
|
|
a3020b6787 | ||
|
|
702a68307a | ||
|
|
344235b1e1 | ||
|
|
8d70167acf | ||
|
|
b75b9fb7d6 | ||
|
|
f817eaa5c8 | ||
|
|
574c5cf1b2 | ||
|
|
e0e8521eb9 | ||
|
|
46f7d97176 | ||
|
|
f3f6f6a493 | ||
|
|
139658b5c3 | ||
|
|
11607b108c | ||
|
|
62748f6d4c | ||
|
|
a53b111182 | ||
|
|
6ffca842e6 | ||
|
|
107684e393 | ||
|
|
08930ddffb | ||
|
|
458c76d3b7 | ||
|
|
1847312c7a | ||
|
|
3015baf6e6 | ||
|
|
3c51455fa3 | ||
|
|
1028172dfc | ||
|
|
2b6059dee3 | ||
|
|
79ba3a28e6 | ||
|
|
398201f592 | ||
|
|
6f4b5fc71a | ||
|
|
9fc83c7cd5 | ||
|
|
e6cddf797a | ||
|
|
8a1b83048f | ||
|
|
ac5c0c5efa | ||
|
|
bfee734669 | ||
|
|
22d533c451 | ||
|
|
adf61d9878 | ||
|
|
dcc8094ce4 | ||
|
|
c3bd5d21aa | ||
|
|
a75746c7c1 | ||
|
|
eeafe77614 | ||
|
|
54ad927044 | ||
|
|
a2e82dc883 | ||
|
|
6c050c55d9 | ||
|
|
379e17c3bc | ||
|
|
c0640e49ee | ||
|
|
07d4668670 | ||
|
|
1c54d24962 | ||
|
|
aa64b2ee69 | ||
|
|
00dc4b9ace | ||
|
|
c69a978589 | ||
|
|
b69b50c6c6 | ||
|
|
970525cfd4 | ||
|
|
533136fb0e | ||
|
|
3218cb9ace | ||
|
|
147c000ef1 | ||
|
|
8ddd0b2f6f | ||
|
|
1b7b2ff456 | ||
|
|
289e98ed5b | ||
|
|
d1acd75068 | ||
|
|
44085df592 | ||
|
|
a3af8fc0ea | ||
|
|
c6ecf48ccd | ||
|
|
2de5a9d281 | ||
|
|
a6bc3e9790 | ||
|
|
c53f5baceb | ||
|
|
3822625e77 | ||
|
|
00ae123736 | ||
|
|
c167693ae4 | ||
|
|
9a59a124aa | ||
|
|
03f00c5526 | ||
|
|
bdb6153b3e | ||
|
|
70357be029 | ||
|
|
8d6db27b34 | ||
|
|
c06e55df81 | ||
|
|
58463bc3dc | ||
|
|
d1310b3337 | ||
|
|
b3160a17ea | ||
|
|
9f819061cd | ||
|
|
e4e2e886e8 | ||
|
|
278baaac80 | ||
|
|
5c8809e55d | ||
|
|
af4f56abfd | ||
|
|
1870b957f5 | ||
|
|
3640053415 | ||
|
|
d3ed14ebb7 | ||
|
|
4c9b8c7794 | ||
|
|
bf57a28654 | ||
|
|
7040bef27e | ||
|
|
40b4dc3b61 | ||
|
|
b474d34cf0 | ||
|
|
fa7c945363 | ||
|
|
c40a7a5265 | ||
|
|
a94efddfe6 | ||
|
|
99d97acb1d | ||
|
|
eb7f4d2eaa | ||
|
|
2e2e37098f | ||
|
|
ad79162061 | ||
|
|
c613f44991 | ||
|
|
583f60a3f3 | ||
|
|
5792bf1a85 | ||
|
|
75c16d1cbb | ||
|
|
dea65b637c | ||
|
|
b01953a5a3 | ||
|
|
47aec87a56 | ||
|
|
b706e8f1fd | ||
|
|
1f469a7acc | ||
|
|
07050f6e9c | ||
|
|
ab3e009d76 | ||
|
|
5fbf4af596 | ||
|
|
943c3155af | ||
|
|
9477437256 | ||
|
|
c7b4b8d3c3 | ||
|
|
52a264cc2b | ||
|
|
dc3e223875 | ||
|
|
70bd598ead | ||
|
|
f03aec1709 | ||
|
|
3c85d29ece | ||
|
|
2099f977fb | ||
|
|
6f25c4750d | ||
|
|
4e40b6cf3e | ||
|
|
7620baee80 | ||
|
|
4c491d850d | ||
|
|
e2c088a5c9 | ||
|
|
82b3013b0f | ||
|
|
73b0188126 | ||
|
|
82abdeb15f | ||
|
|
4cd461f57a | ||
|
|
5696178de4 | ||
|
|
5f5f7ec3dd | ||
|
|
c9498868e9 | ||
|
|
f95e33cf7b | ||
|
|
c0f62e5633 | ||
|
|
3de4395d5e | ||
|
|
cb283bb95a | ||
|
|
b81d8bf97a | ||
|
|
918db68c52 | ||
|
|
047fe9a422 | ||
|
|
8a78616351 | ||
|
|
89382f6306 | ||
|
|
beba23ea2e | ||
|
|
aba0633a78 | ||
|
|
0aa20f931d | ||
|
|
eefea5444e | ||
|
|
a6e142dd02 | ||
|
|
6c1f023768 | ||
|
|
ea1ffe7fb5 | ||
|
|
36250f5180 | ||
|
|
268f09160d | ||
|
|
7620395f92 | ||
|
|
28678f4e06 | ||
|
|
720ae949aa | ||
|
|
32fe0493c4 | ||
|
|
86e88c18b0 | ||
|
|
e684e230a6 | ||
|
|
a8b647e886 | ||
|
|
bce747e7f9 | ||
|
|
b7546b45b3 | ||
|
|
f183260ad6 | ||
|
|
0f057a8351 | ||
|
|
7ca13b3d51 | ||
|
|
1418712b4c | ||
|
|
e5021ffa01 | ||
|
|
572212c374 | ||
|
|
e0c6981b40 | ||
|
|
0d60cadffc | ||
|
|
26bc2a8c3e | ||
|
|
07dafd697e | ||
|
|
e48f86b289 | ||
|
|
e5c2b44572 | ||
|
|
9307834ef0 | ||
|
|
99036ec151 | ||
|
|
5776f43b98 | ||
|
|
0c755846fe | ||
|
|
19d1fa8e7d | ||
|
|
8937647d5f | ||
|
|
7541f57aeb | ||
|
|
b6a7771a23 | ||
|
|
1d32695f10 | ||
|
|
044feea23a | ||
|
|
0ba19cce4d | ||
|
|
67c6e10f5f | ||
|
|
98e2c311c3 | ||
|
|
be9bd16b4c | ||
|
|
d9ccde94c9 | ||
|
|
93dcf8231f | ||
|
|
b6cfc82b4e | ||
|
|
d50fe46f0e | ||
|
|
18b5b76a80 | ||
|
|
a87fab8d18 | ||
|
|
7608405a1f | ||
|
|
d8ad360b38 | ||
|
|
a3840963e1 | ||
|
|
e6b4528028 | ||
|
|
55a32c58a9 | ||
|
|
da85252347 | ||
|
|
15a288aa5b | ||
|
|
c4d6fa855c | ||
|
|
80fc1e5309 | ||
|
|
506a2b99c5 | ||
|
|
06bbd6e066 | ||
|
|
3fcf342fbc | ||
|
|
7e515d9d5b | ||
|
|
a045594b57 | ||
|
|
0e5a1cc8e4 | ||
|
|
e3602e3c75 | ||
|
|
4cccf28b4d | ||
|
|
558c75a452 | ||
|
|
a661c17eca | ||
|
|
fd9d372e6a | ||
|
|
cf23343911 | ||
|
|
780e23301b | ||
|
|
993f90cb2c | ||
|
|
db1bf88934 | ||
|
|
15c2727a1d | ||
|
|
e01e9715b9 | ||
|
|
98911af396 | ||
|
|
f579345059 | ||
|
|
64dfada038 | ||
|
|
7ca475f968 | ||
|
|
7636a559f9 | ||
|
|
b85941531d | ||
|
|
782d1f17d1 | ||
|
|
e1e8f33f67 | ||
|
|
805600ad44 | ||
|
|
342d49d050 | ||
|
|
992d8a90c7 | ||
|
|
9b92e7f8e8 | ||
|
|
bf9b23539e | ||
|
|
9cfc862b07 | ||
|
|
52991f3d66 | ||
|
|
37441e3fac | ||
|
|
8b04040d7e | ||
|
|
9608464ed1 | ||
|
|
2587bac300 | ||
|
|
504bd40263 | ||
|
|
28ec015ef4 | ||
|
|
65d4a0a8cd | ||
|
|
30847570bc | ||
|
|
51b7ec2b26 | ||
|
|
f12c6bf748 | ||
|
|
1b10aae74c | ||
|
|
3e84c0a91a | ||
|
|
2ff57c2eb7 | ||
|
|
bb04144fe8 | ||
|
|
2f2f3e26c3 | ||
|
|
34f037be92 | ||
|
|
429bef6830 | ||
|
|
15dd783d2c | ||
|
|
7851d3d987 | ||
|
|
8a942422da | ||
|
|
914b848e58 | ||
|
|
1984595d0d | ||
|
|
a58f84a1ff | ||
|
|
8d487d31a4 | ||
|
|
4c0e2af6e3 | ||
|
|
cb51ec61f7 | ||
|
|
2872f1706c | ||
|
|
da0afd3939 | ||
|
|
984602b7a0 | ||
|
|
705b74b3ba | ||
|
|
31494ec327 | ||
|
|
a1e1a33308 | ||
|
|
78acdf9095 | ||
|
|
40851409fb | ||
|
|
a03e354504 | ||
|
|
e91a41401c | ||
|
|
f4791c19e1 | ||
|
|
2ec500f926 | ||
|
|
3c1271b1c4 | ||
|
|
39057a6aa0 | ||
|
|
41f9c3d2a1 | ||
|
|
a7e358c27d | ||
|
|
afdf02b4be | ||
|
|
1e1428c73d | ||
|
|
4b8a2450bd | ||
|
|
b6b2e812c1 | ||
|
|
97150034bc | ||
|
|
1fe75f9420 | ||
|
|
6bd342f63a | ||
|
|
b2fa6fca82 | ||
|
|
5df7b9aa85 | ||
|
|
37c9ad8e8d | ||
|
|
7ec8d4c3f6 | ||
|
|
e81564387c | ||
|
|
3139ae1528 | ||
|
|
cdce9e27fb | ||
|
|
9049d01a5e | ||
|
|
76dcfb5ed0 | ||
|
|
8a69421dc9 | ||
|
|
e2d098dd9b | ||
|
|
cdf54b07c5 | ||
|
|
4e9bf53035 | ||
|
|
d45c2cf0f2 | ||
|
|
3e76f7af0f | ||
|
|
ac0178d2c7 | ||
|
|
7eb7dbe0be | ||
|
|
93c212f28d | ||
|
|
52ab7b8865 | ||
|
|
4061fc7cf8 | ||
|
|
8f15ad06f3 | ||
|
|
5654dc9907 | ||
|
|
a31c423d9e | ||
|
|
6d69f0b547 | ||
|
|
04b3b3dbc5 | ||
|
|
6125988f35 | ||
|
|
0a85279bcb | ||
|
|
3715286eba | ||
|
|
3230206b69 | ||
|
|
0f1c518592 | ||
|
|
9ba88838ba | ||
|
|
48366d245c | ||
|
|
44206cf088 | ||
|
|
84f2520924 | ||
|
|
6e2254c13d | ||
|
|
1f6f7b614c | ||
|
|
4ec2fe556a | ||
|
|
311e7802e5 | ||
|
|
153dc620c8 | ||
|
|
d0ebaff7b4 | ||
|
|
e25e7ff4a2 | ||
|
|
0b48e68a3c | ||
|
|
c248944dc1 | ||
|
|
204bf81dd1 | ||
|
|
f25ad83a02 | ||
|
|
a001553c5e | ||
|
|
9a94c6d85e | ||
|
|
46942413db | ||
|
|
434d0fb1c0 | ||
|
|
2721317fc3 | ||
|
|
18844d096a | ||
|
|
b10cb1c83c | ||
|
|
ed085776c7 | ||
|
|
492e320628 | ||
|
|
d6c48a5cf1 | ||
|
|
44ac7d152b | ||
|
|
70816f90b2 | ||
|
|
093fe5c7ef | ||
|
|
5e664e3a06 | ||
|
|
0f8c12aaf4 | ||
|
|
8a75acb985 | ||
|
|
1cef08e92b | ||
|
|
1d79d342c0 | ||
|
|
a58700c78f | ||
|
|
79ab7a1062 | ||
|
|
fcadee550e | ||
|
|
852d194b39 | ||
|
|
08e50ac72b | ||
|
|
d98249814d | ||
|
|
9715ba0c8a | ||
|
|
7abebabf4f | ||
|
|
0892d1c744 | ||
|
|
a938b7aadb | ||
|
|
d24c9322cc | ||
|
|
ad2ccae5db | ||
|
|
74afd8e819 | ||
|
|
cee297b218 | ||
|
|
873871a42c | ||
|
|
851c7b891e | ||
|
|
0064f5dcfd | ||
|
|
e93e4a9931 | ||
|
|
91761a2bea | ||
|
|
8e91a89a37 | ||
|
|
b2650c5a96 | ||
|
|
8d3e0687a0 | ||
|
|
2d4e08e060 | ||
|
|
5d068dfb23 | ||
|
|
c49aa6beef | ||
|
|
c7defdc06f | ||
|
|
eb23dda99b | ||
|
|
7174549441 | ||
|
|
a27147a75e | ||
|
|
070ad695ec | ||
|
|
a37a90c8c7 | ||
|
|
22f161d178 | ||
|
|
a56bcc8903 | ||
|
|
7613f1b726 | ||
|
|
cc44a833d5 | ||
|
|
f5e75b5933 | ||
|
|
0c47c2016d | ||
|
|
5adc1a12dd | ||
|
|
2ad5e6f06a | ||
|
|
03ab20a4b8 | ||
|
|
b9279f73fa | ||
|
|
d8923123fa | ||
|
|
9d55369c57 | ||
|
|
217e95e425 | ||
|
|
d44b811b0d | ||
|
|
b61ecabed3 | ||
|
|
e0e6f2b8e9 | ||
|
|
ebdb10e7f9 | ||
|
|
c2f3396753 | ||
|
|
1b8366f040 | ||
|
|
7df6d27900 | ||
|
|
e9e92d0892 | ||
|
|
86f2c9d350 | ||
|
|
a0ebbf997d | ||
|
|
9d5d3081dc | ||
|
|
5274826e5c | ||
|
|
79bd1f8121 | ||
|
|
b10b713e48 | ||
|
|
6dcb83f913 | ||
|
|
daf0b72eed | ||
|
|
ac52f73af2 | ||
|
|
832465a2a3 | ||
|
|
3768145c9b | ||
|
|
337161be02 | ||
|
|
510904ebea | ||
|
|
a37b98d95d | ||
|
|
35788f8654 | ||
|
|
ec17199feb | ||
|
|
fa63b3ee01 | ||
|
|
68f033fbbe | ||
|
|
37c7318097 | ||
|
|
012d0ee885 | ||
|
|
9b211928a9 | ||
|
|
fed210dc38 | ||
|
|
b73549fd35 | ||
|
|
5bb6c4d9e4 | ||
|
|
7a344930ec | ||
|
|
b2702efc93 | ||
|
|
d530c21cd7 | ||
|
|
7f51160879 | ||
|
|
5c80c31a70 | ||
|
|
ef53600d74 | ||
|
|
81cdcb4b62 | ||
|
|
ee981c4c19 | ||
|
|
589f76afca | ||
|
|
c33ce8e0e4 | ||
|
|
12f62df49a | ||
|
|
b367e105fa | ||
|
|
7ffbcebe4e | ||
|
|
415b114dac | ||
|
|
606a1f48c8 | ||
|
|
91ce14a410 | ||
|
|
aef17b414c | ||
|
|
a70bf1ffb1 | ||
|
|
7e8679b6c3 | ||
|
|
f1e7167c65 | ||
|
|
145f64bdfc | ||
|
|
3821ea2c74 | ||
|
|
ef082c2e1f | ||
|
|
8a26cfad79 | ||
|
|
38d64a34a1 | ||
|
|
586e6f1e1b | ||
|
|
bf419d18a9 | ||
|
|
94f8650ca4 | ||
|
|
41d5111684 | ||
|
|
b6ea06ba24 | ||
|
|
84222e8078 | ||
|
|
6e7f826e19 | ||
|
|
13c85cdfcb | ||
|
|
c2826bb1af | ||
|
|
8fa070f01c | ||
|
|
3c4af1a194 | ||
|
|
a710181388 | ||
|
|
c6ad476cb7 | ||
|
|
d1b403333c | ||
|
|
425427c96c | ||
|
|
ac4346719b | ||
|
|
e2c9fe8d12 | ||
|
|
423de39ad0 | ||
|
|
6c45fcbfc7 | ||
|
|
51c668a0fd | ||
|
|
8408e7fdb4 | ||
|
|
2975eb315f | ||
|
|
0ac05dbb0f | ||
|
|
7db7747cb0 | ||
|
|
343a1e2a76 | ||
|
|
44c58a66d1 | ||
|
|
8fc11c0791 | ||
|
|
db75d94961 | ||
|
|
26ff528a85 | ||
|
|
f7e9f85668 | ||
|
|
75eb0c6951 | ||
|
|
26fdb19344 | ||
|
|
e31638d3dd | ||
|
|
e12cd83b80 | ||
|
|
040b476359 | ||
|
|
d7633f40ba | ||
|
|
80fc8d4da9 | ||
|
|
9a92d20001 | ||
|
|
2b18089641 | ||
|
|
1da87d1d19 | ||
|
|
0c54276fe2 | ||
|
|
dda9a95163 | ||
|
|
34fa456106 | ||
|
|
0091cb3f23 | ||
|
|
9fe4504623 | ||
|
|
08d68300bd | ||
|
|
e326e2c6b3 | ||
|
|
e94dc226b5 | ||
|
|
2afd21c7ba | ||
|
|
bd2edea1c9 | ||
|
|
00cd0e1ae3 | ||
|
|
05aefc6489 | ||
|
|
5652018cde | ||
|
|
a63ba6bc4f | ||
|
|
c043be3aa4 | ||
|
|
b7180893c6 | ||
|
|
96ca7a8cbc | ||
|
|
c87c811719 | ||
|
|
4dab30ce6f | ||
|
|
75dc21c66d | ||
|
|
b0a4d7278a | ||
|
|
a01607e869 | ||
|
|
a3fd3205a9 | ||
|
|
55084499ac | ||
|
|
3e6f76826b | ||
|
|
01e9d39b63 | ||
|
|
0116d4176a | ||
|
|
7ea306a61a | ||
|
|
cdaab550e9 | ||
|
|
aa6f617715 | ||
|
|
7e4592c1e7 | ||
|
|
b97024c8f6 | ||
|
|
0f44f6752e | ||
|
|
3c9054c36f | ||
|
|
61379d4e05 | ||
|
|
fd2b779bb8 | ||
|
|
202e8ac3a1 | ||
|
|
6796f20683 | ||
|
|
cdc9fddc44 | ||
|
|
6409661a9f | ||
|
|
4ed03c2db2 | ||
|
|
7b2a9f7ea8 | ||
|
|
0d222e138f | ||
|
|
a80c415fc0 | ||
|
|
3f1a75f40a | ||
|
|
ad4bf1ac84 | ||
|
|
11dec27dd1 | ||
|
|
66253e142b | ||
|
|
b22b67c7d9 | ||
|
|
d8662b709a | ||
|
|
e826309d59 | ||
|
|
1554722a83 | ||
|
|
16ed89c471 | ||
|
|
6ccae6cc37 | ||
|
|
292ed892c1 | ||
|
|
bb8b91a100 | ||
|
|
1310b34e9c | ||
|
|
86cdb64b1d | ||
|
|
0456815bd5 | ||
|
|
1c12cd6b9e | ||
|
|
3c687d29d8 | ||
|
|
bb70edfdb3 | ||
|
|
a3f189f452 | ||
|
|
70727895f7 | ||
|
|
cdbf58b2c1 | ||
|
|
fe9bcc254a | ||
|
|
b0270550c5 | ||
|
|
597faee248 | ||
|
|
42c0815cda | ||
|
|
a5f12db6ba | ||
|
|
62808f8342 | ||
|
|
c6e89f938d | ||
|
|
1edc116532 | ||
|
|
40aa92c5f7 | ||
|
|
4eb39dc5ff | ||
|
|
b5cf6c7161 | ||
|
|
198691182b | ||
|
|
72b81bf403 | ||
|
|
5a3ed27fed | ||
|
|
a7cf39c7cd | ||
|
|
e17576a6f7 | ||
|
|
f33cd15419 | ||
|
|
05774854ef | ||
|
|
ef06165ea2 | ||
|
|
d398d367c1 | ||
|
|
951fa96848 | ||
|
|
77cc99acd3 | ||
|
|
62190d79be | ||
|
|
f7ee528d41 | ||
|
|
faa055010f | ||
|
|
ba8fd25604 | ||
|
|
9556d8e6da | ||
|
|
5b8b4c8c7b | ||
|
|
82aed2caab | ||
|
|
add4846d79 | ||
|
|
e354a0ee0e | ||
|
|
ccd6704b8f | ||
|
|
9bdb41a727 |
89
.clang-format
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignEscapedNewlinesLeft: false
|
||||||
|
AlignOperands: true
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: false
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: true
|
||||||
|
AfterFunction: true
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
ColumnLimit: 120
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '^(<|"(gtest|isl|json)/)'
|
||||||
|
Priority: 3
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 1
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: All
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: Cpp11
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
...
|
||||||
|
|
||||||
5
.gitattributes
vendored
@@ -1,8 +1,13 @@
|
|||||||
src/version.h.cmake export-subst
|
src/version.h.cmake export-subst
|
||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
|
.github export-ignore
|
||||||
.travis.yml export-ignore
|
.travis.yml export-ignore
|
||||||
.tx export-ignore
|
.tx export-ignore
|
||||||
snapcraft.yaml export-ignore
|
snapcraft.yaml export-ignore
|
||||||
make_release.sh export-ignore
|
make_release.sh export-ignore
|
||||||
AppImage-Recipe.sh export-ignore
|
AppImage-Recipe.sh export-ignore
|
||||||
|
|
||||||
|
# github-linguist language hints
|
||||||
|
*.h linguist-language=C++
|
||||||
|
*.cpp linguist-language=C++
|
||||||
|
|||||||
89
.github/CONTRIBUTING.md
vendored
@@ -1,31 +1,32 @@
|
|||||||
# Contributing to KeePassX Reboot
|
# Contributing to KeePassXC
|
||||||
|
|
||||||
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
|
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
|
||||||
|
|
||||||
The following is a set of guidelines for contributing to KeePassX Reboot on GitHub.
|
The following is a set of guidelines for contributing to KeePassXC on GitHub.
|
||||||
These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
||||||
|
|
||||||
#### Table Of Contents
|
#### Table of contents
|
||||||
|
|
||||||
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
|
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
|
||||||
* [Open Source Contribution Policy](#open-source-contribution-policy)
|
* [Open Source Contribution Policy](#open-source-contribution-policy)
|
||||||
|
|
||||||
[How Can I Contribute?](#how-can-i-contribute)
|
[How can I contribute?](#how-can-i-contribute)
|
||||||
* [Feature Requests](#feature-requests)
|
* [Feature requests](#feature-requests)
|
||||||
* [Bug Reports](#bug-reports)
|
* [Bug reports](#bug-reports)
|
||||||
* [Your First Code Contribution](#your-first-code-contribution)
|
* [Discuss with the team](#discuss-with-the-team)
|
||||||
* [Pull Requests](#pull-requests)
|
* [Your first code contribution](#your-first-code-contribution)
|
||||||
|
* [Pull requests](#pull-requests)
|
||||||
* [Translations](#translations)
|
* [Translations](#translations)
|
||||||
|
|
||||||
[Styleguides](#styleguides)
|
[Styleguides](#styleguides)
|
||||||
* [Git Branch Strategy](#git_branch_strategy)
|
* [Git branch strategy](#git-branch-strategy)
|
||||||
* [Git Commit Messages](#git-commit-messages)
|
* [Git commit messages](#git-commit-messages)
|
||||||
* [Coding Styleguide](#coding-styleguide)
|
* [Coding styleguide](#coding-styleguide)
|
||||||
|
|
||||||
|
|
||||||
## What should I know before I get started?
|
## What should I know before I get started?
|
||||||
### Open Source Contribution Policy
|
### Open Source Contribution Policy
|
||||||
[Version 0.3, 2015–11–18](https://medium.com/@jmaynard/a-contribution-policy-for-open-source-that-works-bfc4600c9d83#.i9ntbhmad)
|
**Source**: [Version 0.3, 2015–11–18](https://medium.com/@jmaynard/a-contribution-policy-for-open-source-that-works-bfc4600c9d83#.i9ntbhmad)
|
||||||
|
|
||||||
#### Policy
|
#### Policy
|
||||||
|
|
||||||
@@ -49,35 +50,35 @@ If we reject your contribution, it means only that we do not consider it suitabl
|
|||||||
* 0.3, 2011–11–19: Added “irrevocably” to “we can use” and changed “it” to “your contribution” in the “if rejected” section. Thanks to Patrick Maupin.
|
* 0.3, 2011–11–19: Added “irrevocably” to “we can use” and changed “it” to “your contribution” in the “if rejected” section. Thanks to Patrick Maupin.
|
||||||
|
|
||||||
|
|
||||||
## How Can I Contribute?
|
## How can I contribute?
|
||||||
### Feature Requests
|
### Feature requests
|
||||||
|
|
||||||
We're always looking for suggestions to improve our application. If you have a suggestion for improving an existing feature, or would like to suggest a completely new feature for KeePassX Reboot, please use the Issues section or our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum.
|
We're always looking for suggestions to improve our application. If you have a suggestion to improve an existing feature, or would like to suggest a completely new feature for KeePassXC, please use the [issue tracker on GitHub][issues-section]. For more general discussion, try using our [Google Groups][google-groups] forum.
|
||||||
|
|
||||||
### Bug Reports
|
### Bug reports
|
||||||
|
|
||||||
Our software isn't always perfect, but we strive to always improve our work. You may file bug reports in the Issues section.
|
Our software isn't always perfect, but we strive to always improve our work. You may file bug reports in the issue tracker.
|
||||||
|
|
||||||
Before submitting a Bug Report, check if the problem has already been reported. Please refrain from opening a duplicate issue. If you want to highlight a deficiency on an existing issue, simply add a comment.
|
Before submitting a bug report, check if the problem has already been reported. Please refrain from opening a duplicate issue. If you want to add further information to an existing issue, simply add a comment on that issue.
|
||||||
|
|
||||||
### Discuss with the Team
|
### Discuss with the team
|
||||||
|
|
||||||
You can talk to the KeePassX Reboot Team about Bugs, new feature, Issue and PullRequests at our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum
|
As with feature requests, you can talk to the KeePassXC team about bugs, new features, other issues and pull requests on the dedicated issue tracker, using the [Google Groups][google-groups] forum, or in the IRC channel on Freenode (`#keepassxc-dev` on `irc.freenode.net`, or use a [webchat link](https://webchat.freenode.net/?channels=%23keepassxc-dev)).
|
||||||
|
|
||||||
### Your First Code Contribution
|
### Your first code contribution
|
||||||
|
|
||||||
Unsure where to begin contributing to KeePassX Reboot? You can start by looking through these `beginner` and `help-wanted` issues:
|
Unsure where to begin contributing to KeePassXC? You can start by looking through these `beginner` and `help-wanted` issues:
|
||||||
|
|
||||||
* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two.
|
* [Beginner issues][beginner] – issues which should only require a few lines of code, and a test or two.
|
||||||
* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
|
* ['Help wanted' issues][help-wanted] – issues which should be a bit more involved than `beginner` issues.
|
||||||
|
|
||||||
Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.
|
Both issue lists are sorted by total number of comments. While not perfect, looking at the number of comments on an issue can give a general idea of how much an impact a given change will have.
|
||||||
|
|
||||||
### Pull Requests
|
### Pull requests
|
||||||
|
|
||||||
Along with our desire to hear your feedback and suggestions, we're also interested in accepting direct assistance in the form of code.
|
Along with our desire to hear your feedback and suggestions, we're also interested in accepting direct assistance in the form of code.
|
||||||
|
|
||||||
All pull requests must comply with the above requirements and with the [Styleguides](#styleguides).
|
All pull requests must comply with the above requirements and with the [styleguides](#styleguides).
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
|
|
||||||
@@ -86,19 +87,20 @@ Please join an existing language team or request a new one if there is none.
|
|||||||
|
|
||||||
## Styleguides
|
## Styleguides
|
||||||
|
|
||||||
### Git Branch Strategy
|
### Git branch strategy
|
||||||
|
|
||||||
The Branch Strategy is based on [git-flow-lite](http://nvie.com/posts/a-successful-git-branching-model/).
|
The Branch Strategy is based on [git-flow-lite](http://nvie.com/posts/a-successful-git-branching-model/).
|
||||||
|
|
||||||
* **master** -> always points to the last release published
|
* **master** – points to the latest public release
|
||||||
* **develop** -> points to the next planned release, tested and reviewed code
|
* **develop** – points to the development of the next release, contains tested and reviewed code
|
||||||
* **feature/**[name] -> points to brand new feature in codebase, candidate for merge into develop (subject to rebase)
|
* **feature/**[name] – points to a branch with a new feature, one which is candidate for merge into develop (subject to rebase)
|
||||||
|
* **hotfix/**[id]-[description] – points to a branch with a fix for a particular issue ID
|
||||||
|
|
||||||
|
|
||||||
### Git Commit Messages
|
### Git commit messages
|
||||||
|
|
||||||
* Use the present tense ("Add feature" not "Added feature")
|
* Use the present tense ("Add feature" not "Added feature")
|
||||||
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
* Use the imperative mood ("Move cursor to…" not "Moves cursor to…")
|
||||||
* Limit the first line to 72 characters or less
|
* Limit the first line to 72 characters or less
|
||||||
* Reference issues and pull requests liberally
|
* Reference issues and pull requests liberally
|
||||||
* When only changing documentation, include `[ci skip]` in the commit description
|
* When only changing documentation, include `[ci skip]` in the commit description
|
||||||
@@ -114,21 +116,21 @@ The Branch Strategy is based on [git-flow-lite](http://nvie.com/posts/a-successf
|
|||||||
* :lock: `:lock:` when dealing with security
|
* :lock: `:lock:` when dealing with security
|
||||||
|
|
||||||
|
|
||||||
### Coding Styleguide
|
### Coding styleguide
|
||||||
|
|
||||||
This project follows the [Qt Coding Style](https://wiki.qt.io/Qt_Coding_Style). All submissions are expected to follow this style.
|
This project follows the [Qt Coding Style](https://wiki.qt.io/Qt_Coding_Style). All submissions are expected to follow this style.
|
||||||
|
|
||||||
In particular Code must follow the following specific rules:
|
In particular, code must stick to the following rules:
|
||||||
|
|
||||||
#### Naming Convention
|
#### Naming convention
|
||||||
`lowerCamelCase`
|
`lowerCamelCase`
|
||||||
|
|
||||||
For names made of only one word, the fist letter is lowercase.
|
For names made of only one word, the first letter should be lowercase.
|
||||||
For names made of multiple concatenated words, the first letter is lowercase and each subsequent concatenated word is capitalized.
|
For names made of multiple concatenated words, the first letter of the whole is lowercase, and the first letter of each subsequent word is capitalized.
|
||||||
|
|
||||||
#### Indention
|
#### Indention
|
||||||
For C++ files (.cpp .h): 4 spaces
|
For **C++ files** (*.cpp .h*): 4 spaces
|
||||||
For Qt-UI files (.ui): 2 spaces
|
For **Qt-UI files** (*.ui*): 2 spaces
|
||||||
|
|
||||||
#### Pointers
|
#### Pointers
|
||||||
```c
|
```c
|
||||||
@@ -165,9 +167,8 @@ Use prefix: `m_*`
|
|||||||
|
|
||||||
Example: `m_variable`
|
Example: `m_variable`
|
||||||
|
|
||||||
#### GUI Widget names
|
#### GUI widget names
|
||||||
Widget names must be related to the desired program behaviour.
|
Widget names must be related to the desired program behavior, and preferably end with the widget's classname.
|
||||||
Preferably end the name with the Widget Classname
|
|
||||||
|
|
||||||
Example: `<widget class="QCheckBox" name="rememberCheckBox">`
|
Example: `<widget class="QCheckBox" name="rememberCheckBox">`
|
||||||
|
|
||||||
@@ -175,3 +176,5 @@ Example: `<widget class="QCheckBox" name="rememberCheckBox">`
|
|||||||
|
|
||||||
[beginner]:https://github.com/keepassxreboot/keepassx/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner+label%3A%22help+wanted%22+sort%3Acomments-desc
|
[beginner]:https://github.com/keepassxreboot/keepassx/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner+label%3A%22help+wanted%22+sort%3Acomments-desc
|
||||||
[help-wanted]:https://github.com/keepassxreboot/keepassx/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+sort%3Acomments-desc
|
[help-wanted]:https://github.com/keepassxreboot/keepassx/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+sort%3Acomments-desc
|
||||||
|
[issues-section]:https://github.com/keepassxreboot/keepassxc/issues
|
||||||
|
[google-groups]:https://groups.google.com/forum/#!forum/keepassx-reboot
|
||||||
|
|||||||
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -3,11 +3,11 @@
|
|||||||
## Description
|
## Description
|
||||||
<!--- Describe your changes in detail -->
|
<!--- Describe your changes in detail -->
|
||||||
|
|
||||||
## Motivation and Context
|
## Motivation and context
|
||||||
<!--- Why is this change required? What problem does it solve? -->
|
<!--- Why is this change required? What problem does it solve? -->
|
||||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||||
|
|
||||||
## How Has This Been Tested?
|
## How has this been tested?
|
||||||
<!--- Please describe in detail how you tested your changes. -->
|
<!--- Please describe in detail how you tested your changes. -->
|
||||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||||
<!--- see how your change affects other areas of the code, etc. -->
|
<!--- see how your change affects other areas of the code, etc. -->
|
||||||
@@ -29,5 +29,6 @@
|
|||||||
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
|
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
|
||||||
- ✅ My code follows the code style of this project. **[REQUIRED]**
|
- ✅ My code follows the code style of this project. **[REQUIRED]**
|
||||||
- ✅ All new and existing tests passed. **[REQUIRED]**
|
- ✅ All new and existing tests passed. **[REQUIRED]**
|
||||||
|
- ✅ I have compiled and verified my code with `-DWITH_ASAN=ON`. **[REQUIRED]**
|
||||||
- ✅ My change requires a change to the documentation and I have updated it accordingly.
|
- ✅ My change requires a change to the documentation and I have updated it accordingly.
|
||||||
- ✅ I have added tests to cover my changes.
|
- ✅ I have added tests to cover my changes.
|
||||||
|
|||||||
6
.gitignore
vendored
@@ -1,2 +1,8 @@
|
|||||||
CMakeLists.txt.*
|
CMakeLists.txt.*
|
||||||
build*/
|
build*/
|
||||||
|
release*/
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
*.kdev4
|
||||||
|
|
||||||
|
\.vscode/
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ compiler:
|
|||||||
- gcc
|
- gcc
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- CONFIG=Release
|
- CONFIG=Release ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
||||||
- CONFIG=Debug
|
- CONFIG=Debug ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 3
|
depth: 3
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libmicrohttpd10 libmicrohttpd-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libclang-common-3.5-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb libyubikey-dev libykpers-1-dev; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
|
||||||
@@ -32,7 +32,7 @@ before_script:
|
|||||||
- mkdir build && pushd build
|
- mkdir build && pushd build
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
|
- cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_ASAN=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
|
||||||
- make -j2
|
- make -j2
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
|
||||||
|
|||||||
@@ -39,26 +39,57 @@ mkdir -p $APP.AppDir
|
|||||||
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
|
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
|
||||||
. ./functions.sh
|
. ./functions.sh
|
||||||
|
|
||||||
|
LIB_DIR=./usr/lib
|
||||||
|
if [ -d ./usr/lib/x86_64-linux-gnu ]; then
|
||||||
|
LIB_DIR=./usr/lib/x86_64-linux-gnu
|
||||||
|
fi
|
||||||
|
|
||||||
cd $APP.AppDir
|
cd $APP.AppDir
|
||||||
cp -a ../../bin-release/* .
|
cp -a ../../bin-release/* .
|
||||||
mv ./usr/local/* ./usr
|
cp -a ./usr/local/* ./usr
|
||||||
rmdir ./usr/local
|
rm -R ./usr/local
|
||||||
patch_strings_in_file /usr/local ./
|
rmdir ./opt 2> /dev/null
|
||||||
patch_strings_in_file /usr ./
|
|
||||||
|
# bundle Qt platform plugins and themes
|
||||||
|
QXCB_PLUGIN="$(find /usr/lib -name 'libqxcb.so' 2> /dev/null)"
|
||||||
|
if [ "$QXCB_PLUGIN" == "" ]; then
|
||||||
|
QXCB_PLUGIN="$(find /opt/qt*/plugins -name 'libqxcb.so' 2> /dev/null)"
|
||||||
|
fi
|
||||||
|
QT_PLUGIN_PATH="$(dirname $(dirname $QXCB_PLUGIN))"
|
||||||
|
mkdir -p ".${QT_PLUGIN_PATH}/platforms"
|
||||||
|
cp "$QXCB_PLUGIN" ".${QT_PLUGIN_PATH}/platforms/"
|
||||||
|
|
||||||
get_apprun
|
get_apprun
|
||||||
copy_deps
|
copy_deps
|
||||||
delete_blacklisted
|
delete_blacklisted
|
||||||
|
|
||||||
|
# remove dbus and systemd libs as they are not blacklisted
|
||||||
|
find . -name libdbus-1.so.3 -exec rm {} \;
|
||||||
|
find . -name libsystemd.so.0 -exec rm {} \;
|
||||||
|
|
||||||
get_desktop
|
get_desktop
|
||||||
get_icon
|
get_icon
|
||||||
|
cat << EOF > ./usr/bin/keepassxc_env
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#export QT_QPA_PLATFORMTHEME=gtk2
|
||||||
|
export LD_LIBRARY_PATH="../opt/qt58/lib:\${LD_LIBRARY_PATH}"
|
||||||
|
export QT_PLUGIN_PATH="..${QT_PLUGIN_PATH}"
|
||||||
|
|
||||||
|
# unset XDG_DATA_DIRS to make tray icon work in Ubuntu Unity
|
||||||
|
# see https://github.com/probonopd/AppImageKit/issues/351
|
||||||
|
unset XDG_DATA_DIRS
|
||||||
|
|
||||||
|
exec keepassxc "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x ./usr/bin/keepassxc_env
|
||||||
|
sed -i 's/Exec=keepassxc/Exec=keepassxc_env/' keepassxc.desktop
|
||||||
get_desktopintegration $LOWERAPP
|
get_desktopintegration $LOWERAPP
|
||||||
|
|
||||||
GLIBC_NEEDED=$(glibc_needed)
|
GLIBC_NEEDED=$(glibc_needed)
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
generate_appimage
|
generate_type2_appimage
|
||||||
|
|
||||||
mv ../out/*.AppImage ..
|
mv ../out/*.AppImage ..
|
||||||
rmdir ../out > /dev/null 2>&1
|
rmdir ../out > /dev/null 2>&1
|
||||||
|
|||||||
76
CHANGELOG
@@ -1,3 +1,79 @@
|
|||||||
|
2.2.0 (2017-06-23)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Added YubiKey 2FA integration for unlocking databases [#127]
|
||||||
|
- Added TOTP support [#519]
|
||||||
|
- Added CSV import tool [#146, #490]
|
||||||
|
- Added KeePassXC CLI tool [#254]
|
||||||
|
- Added diceware password generator [#373]
|
||||||
|
- Added support for entry references [#370, #378]
|
||||||
|
- Added support for Twofish encryption [#167]
|
||||||
|
- Enabled DEP and ASLR for in-memory protection [#371]
|
||||||
|
- Enabled single instance mode [#510]
|
||||||
|
- Enabled portable mode [#645]
|
||||||
|
- Enabled database lock on screensaver and session lock [#545]
|
||||||
|
- Redesigned welcome screen with common features and recent databases [#292]
|
||||||
|
- Multiple updates to search behavior [#168, #213, #374, #471, #603, #654]
|
||||||
|
- Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480]
|
||||||
|
- Fixed auto-type errors on Linux [#550]
|
||||||
|
- Prompt user prior to executing a cmd:// URL [#235]
|
||||||
|
- Entry attributes can be protected (hidden) [#220]
|
||||||
|
- Added extended ascii to password generator [#538]
|
||||||
|
- Added new database icon to toolbar [#289]
|
||||||
|
- Added context menu entry to empty recycle bin in databases [#520]
|
||||||
|
- Added "apply" button to entry and group edit windows [#624]
|
||||||
|
- Added macOS tray icon and enabled minimize on close [#583]
|
||||||
|
- Fixed issues with unclean shutdowns [#170, #580]
|
||||||
|
- Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515]
|
||||||
|
- Compare window title to entry URLs [#556]
|
||||||
|
- Implemented inline error messages [#162]
|
||||||
|
- Ignore group expansion and other minor changes when making database "dirty" [#464]
|
||||||
|
- Updated license and copyright information on souce files [#632]
|
||||||
|
- Added contributors list to about dialog [#629]
|
||||||
|
|
||||||
|
2.1.4 (2017-04-09)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Bumped KeePassHTTP version to 1.8.4.2
|
||||||
|
- KeePassHTTP confirmation window comes to foreground [#466]
|
||||||
|
|
||||||
|
2.1.3 (2017-03-03)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Fix possible overflow in zxcvbn library [#363]
|
||||||
|
- Revert HiDPI setting to avoid problems on laptop screens [#332]
|
||||||
|
- Set file meta properties in Windows executable [#330]
|
||||||
|
- Suppress error message when auto-reloading a locked database [#345]
|
||||||
|
- Improve usability of question dialog when database is already locked by a different instance [#346]
|
||||||
|
- Fix compiler warnings in QHttp library [#351]
|
||||||
|
- Use unified toolbar on Mac OS X [#361]
|
||||||
|
- Fix an issue on X11 where the main window would be raised instead of closed on Alt+F4 [#362]
|
||||||
|
|
||||||
|
2.1.2 (2017-02-17)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Ask for save location when creating a new database [#302]
|
||||||
|
- Remove Libmicrohttpd dependency to clean up the code and ensure better OS X compatibility [#317, #265]
|
||||||
|
- Prevent Qt from degrading Wifi network performance on certain platforms [#318]
|
||||||
|
- Visually refine user interface on OS X and other platforms [#299]
|
||||||
|
- Remove unusable tray icon setting on OS X [#293]
|
||||||
|
- Fix compositing glitches on Ubuntu and prevent flashing when minimizing to the tray at startup [#307]
|
||||||
|
- Fix AppImage tray icon on Ubuntu [#277, #273]
|
||||||
|
- Fix global menu disappearing after restoring KeePassXC from the tray on Ubuntu [#276]
|
||||||
|
- Fix result order in entry search [#320]
|
||||||
|
- Enable HiDPI scaling on supported platforms [#315]
|
||||||
|
- Remove empty directories from installation target [#282]
|
||||||
|
|
||||||
|
2.1.1 (2017-02-06)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Enabled HTTP plugin build; plugin is disabled by default and limited to localhost [#147]
|
||||||
|
- Escape HTML in dialog boxes [#247]
|
||||||
|
- Corrected crashes in favicon download and password generator [#233, #226]
|
||||||
|
- Increase font size of password meter [#228]
|
||||||
|
- Fixed compatibility with Qt 5.8 [#211]
|
||||||
|
- Use consistent button heights in password generator [#229]
|
||||||
|
|
||||||
2.1.0 (2017-01-22)
|
2.1.0 (2017-01-22)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
||||||
|
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,6 +26,9 @@ cmake_minimum_required(VERSION 2.8.12)
|
|||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
# Support Visual Studio Code
|
||||||
|
include(CMakeToolsHelpers OPTIONAL)
|
||||||
|
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
@@ -32,14 +36,21 @@ include(CheckCXXSourceCompiles)
|
|||||||
option(WITH_TESTS "Enable building of unit tests" ON)
|
option(WITH_TESTS "Enable building of unit tests" ON)
|
||||||
option(WITH_GUI_TESTS "Enable building of GUI tests" OFF)
|
option(WITH_GUI_TESTS "Enable building of GUI tests" OFF)
|
||||||
option(WITH_DEV_BUILD "Use only for development. Disables/warns about deprecated methods." OFF)
|
option(WITH_DEV_BUILD "Use only for development. Disables/warns about deprecated methods." OFF)
|
||||||
option(WITH_COVERAGE "Use to build with coverage tests. (GCC ONLY)." OFF)
|
option(WITH_ASAN "Enable address sanitizer checks (Linux only)" OFF)
|
||||||
|
option(WITH_COVERAGE "Use to build with coverage tests (GCC only)." OFF)
|
||||||
|
option(WITH_APP_BUNDLE "Enable Application Bundle for OS X" ON)
|
||||||
|
|
||||||
option(WITH_XC_AUTOTYPE "Include Autotype." OFF)
|
option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
|
||||||
option(WITH_XC_HTTP "Include KeePassHTTP." OFF)
|
option(WITH_XC_HTTP "Include KeePassHTTP and Custom Icon Downloads." OFF)
|
||||||
option(WITH_XC_YUBIKEY "Include Yubikey support." OFF)
|
option(WITH_XC_YUBIKEY "Include YubiKey support." OFF)
|
||||||
|
|
||||||
set(KEEPASSXC_VERSION "2.1.0")
|
# Process ui files automatically from source files
|
||||||
set(KEEPASSXC_VERSION_NUM "2.1.0")
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
set(KEEPASSXC_VERSION_MAJOR "2")
|
||||||
|
set(KEEPASSXC_VERSION_MINOR "2")
|
||||||
|
set(KEEPASSXC_VERSION_PATCH "0")
|
||||||
|
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
||||||
|
|
||||||
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(CMAKE_COMPILER_IS_CLANG 1)
|
set(CMAKE_COMPILER_IS_CLANG 1)
|
||||||
@@ -68,18 +79,39 @@ endmacro(add_gcc_compiler_flags)
|
|||||||
|
|
||||||
add_definitions(-DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII)
|
add_definitions(-DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII)
|
||||||
|
|
||||||
add_gcc_compiler_flags("-fno-common -fstack-protector --param=ssp-buffer-size=4")
|
if(WITH_APP_BUNDLE)
|
||||||
|
add_definitions(-DWITH_APP_BUNDLE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_gcc_compiler_flags("-fno-common")
|
||||||
add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long")
|
add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long")
|
||||||
add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute")
|
add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute")
|
||||||
add_gcc_compiler_flags("-fvisibility=hidden")
|
add_gcc_compiler_flags("-fvisibility=hidden")
|
||||||
add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")
|
add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")
|
||||||
|
|
||||||
|
if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8.999) OR CMAKE_COMPILER_IS_CLANGXX)
|
||||||
|
add_gcc_compiler_flags("-fstack-protector-strong")
|
||||||
|
else()
|
||||||
|
add_gcc_compiler_flags("-fstack-protector --param=ssp-buffer-size=4")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti")
|
add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti")
|
||||||
add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")
|
add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")
|
||||||
add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings")
|
add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings")
|
||||||
|
if(WITH_ASAN)
|
||||||
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
message(FATAL_ERROR "WITH_ASAN is only supported on Linux at the moment.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_gcc_compiler_flags("-fsanitize=address -DWITH_ASAN")
|
||||||
|
|
||||||
|
if(NOT (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))
|
||||||
|
add_gcc_compiler_flags("-fsanitize=leak -DWITH_LSAN")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||||
if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel))
|
if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
|
||||||
add_gcc_compiler_flags("-D_FORTIFY_SOURCE=2")
|
add_gcc_compiler_flags("-D_FORTIFY_SOURCE=2")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -105,10 +137,14 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
if (CMAKE_COMPILER_IS_CLANGXX)
|
||||||
|
add_gcc_compiler_flags("-Qunused-arguments")
|
||||||
|
endif()
|
||||||
|
add_gcc_compiler_flags("-pie -fPIE")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed")
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed")
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro")
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_gcc_compiler_cxxflags("-std=c++11")
|
add_gcc_compiler_cxxflags("-std=c++11")
|
||||||
@@ -127,30 +163,37 @@ if(MINGW)
|
|||||||
set(CMAKE_RC_COMPILER_INIT windres)
|
set(CMAKE_RC_COMPILER_INIT windres)
|
||||||
enable_language(RC)
|
enable_language(RC)
|
||||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||||
link_libraries(ws2_32 wsock32)
|
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
|
||||||
|
# Enable DEP and ASLR
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE OR MINGW)
|
if(APPLE AND WITH_APP_BUNDLE OR MINGW)
|
||||||
set(PROGNAME KeePassXC)
|
set(PROGNAME KeePassXC)
|
||||||
else()
|
else()
|
||||||
set(PROGNAME keepassxc)
|
set(PROGNAME keepassxc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
|
if(APPLE AND WITH_APP_BUNDLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
|
||||||
set(CMAKE_INSTALL_PREFIX "/Applications")
|
set(CMAKE_INSTALL_PREFIX "/Applications")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
|
set(CLI_INSTALL_DIR ".")
|
||||||
set(BIN_INSTALL_DIR ".")
|
set(BIN_INSTALL_DIR ".")
|
||||||
set(PLUGIN_INSTALL_DIR ".")
|
set(PLUGIN_INSTALL_DIR ".")
|
||||||
set(DATA_INSTALL_DIR "share")
|
set(DATA_INSTALL_DIR "share")
|
||||||
elseif(APPLE)
|
elseif(APPLE AND WITH_APP_BUNDLE)
|
||||||
|
set(CLI_INSTALL_DIR "/usr/local/bin")
|
||||||
set(BIN_INSTALL_DIR ".")
|
set(BIN_INSTALL_DIR ".")
|
||||||
set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
|
set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
|
||||||
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
|
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
|
||||||
else()
|
else()
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
set(CLI_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||||
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||||
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassxc")
|
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassxc")
|
||||||
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/keepassxc")
|
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/keepassxc")
|
||||||
@@ -161,20 +204,24 @@ if(WITH_TESTS)
|
|||||||
endif(WITH_TESTS)
|
endif(WITH_TESTS)
|
||||||
|
|
||||||
find_package(Qt5Core 5.2 REQUIRED)
|
find_package(Qt5Core 5.2 REQUIRED)
|
||||||
|
find_package(Qt5Network 5.2 REQUIRED)
|
||||||
find_package(Qt5Concurrent 5.2 REQUIRED)
|
find_package(Qt5Concurrent 5.2 REQUIRED)
|
||||||
find_package(Qt5Widgets 5.2 REQUIRED)
|
find_package(Qt5Widgets 5.2 REQUIRED)
|
||||||
find_package(Qt5Test 5.2 REQUIRED)
|
find_package(Qt5Test 5.2 REQUIRED)
|
||||||
find_package(Qt5LinguistTools 5.2 REQUIRED)
|
find_package(Qt5LinguistTools 5.2 REQUIRED)
|
||||||
find_package(Qt5Network 5.2 REQUIRED)
|
find_package(Qt5Network 5.2 REQUIRED)
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
find_package(Qt5DBus 5.2 REQUIRED)
|
||||||
|
endif()
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
# Debian sets the the build type to None for package builds.
|
# Debian sets the the build type to None for package builds.
|
||||||
# Make sure we don't enable asserts there.
|
# Make sure we don't enable asserts there.
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_NONE QT_NO_DEBUG)
|
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_NONE QT_NO_DEBUG)
|
||||||
|
|
||||||
find_package(Gcrypt 1.6.0 REQUIRED)
|
find_package(LibGPGError REQUIRED)
|
||||||
|
|
||||||
find_package(LibMicroHTTPD REQUIRED)
|
find_package(Gcrypt 1.6.0 REQUIRED)
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
@@ -191,6 +238,13 @@ if(NOT ZLIB_SUPPORTS_GZIP)
|
|||||||
message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
|
message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Optional
|
||||||
|
if(WITH_XC_YUBIKEY)
|
||||||
|
find_package(YubiKey REQUIRED)
|
||||||
|
|
||||||
|
include_directories(SYSTEM ${YUBIKEY_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
check_cxx_source_compiles("#include <sys/prctl.h>
|
check_cxx_source_compiles("#include <sys/prctl.h>
|
||||||
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
|
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
|
||||||
@@ -213,13 +267,12 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${MHD_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(share)
|
add_subdirectory(share)
|
||||||
add_subdirectory(utils)
|
|
||||||
if(WITH_TESTS)
|
if(WITH_TESTS)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif(WITH_TESTS)
|
endif(WITH_TESTS)
|
||||||
@@ -229,6 +282,6 @@ if(PRINT_SUMMARY)
|
|||||||
feature_summary(WHAT ALL)
|
feature_summary(WHAT ALL)
|
||||||
else()
|
else()
|
||||||
# This will only print ENABLED and DISABLED feature
|
# This will only print ENABLED and DISABLED feature
|
||||||
print_enabled_features()
|
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
|
||||||
print_disabled_features()
|
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
64
COPYING
@@ -1,5 +1,5 @@
|
|||||||
KeePassX - http://www.keepassx.org/
|
KeePassXC - http://www.keepassxc.org/
|
||||||
Copyright (C) 2010-2012 Felix Geyer <debfx@fobos.de>
|
Copyright (C) 2016-2017 KeePassXC Team <team@keepassxc.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,9 +14,9 @@ GNU General Public License for more details.
|
|||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: KeePassX
|
Upstream-Name: KeePassXC
|
||||||
Upstream-Contact: Felix Geyer <debfx@fobos.de>
|
Upstream-Contact: KeePassXC Team <team@keepassxc.org>
|
||||||
Source: http://www.keepassx.org/
|
Source: http://www.keepassxc.org/
|
||||||
|
|
||||||
Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
|
Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
|
||||||
2011-2012, Florian Geyer <blueice@fobos.de>
|
2011-2012, Florian Geyer <blueice@fobos.de>
|
||||||
@@ -27,20 +27,46 @@ Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
|
|||||||
2000-2008, Tom Sato <VEF00200@nifty.ne.jp>
|
2000-2008, Tom Sato <VEF00200@nifty.ne.jp>
|
||||||
2013, Laszlo Papp <lpapp@kde.org>
|
2013, Laszlo Papp <lpapp@kde.org>
|
||||||
2013, David Faure <faure@kde.org>
|
2013, David Faure <faure@kde.org>
|
||||||
2016, KeePassXC Team
|
2016-2017, KeePassXC Team <team@keepassxc.org>
|
||||||
License: GPL-2 or GPL-3
|
License: GPL-2 or GPL-3
|
||||||
|
|
||||||
|
Comment: The "KeePassXC Team" in every copyright notice is formed by the following people:
|
||||||
|
- droidmonkey
|
||||||
|
- phoerious
|
||||||
|
- TheZ3ro <io@thezero.org>
|
||||||
|
- louib
|
||||||
|
- weslly
|
||||||
|
Every other contributor is listed on https://github.com/keepassxreboot/keepassxc/graphs/contributors
|
||||||
|
|
||||||
Files: cmake/GNUInstallDirs.cmake
|
Files: cmake/GNUInstallDirs.cmake
|
||||||
Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||||
2011 Kitware, Inc.
|
2011 Kitware, Inc.
|
||||||
License: BSD-3-clause
|
License: BSD-3-clause
|
||||||
|
|
||||||
|
Files: cmake/CodeCoverage.cmake
|
||||||
|
Copyright: 2012 - 2015, Lars Bilke
|
||||||
|
License: BSD-3-clause
|
||||||
|
|
||||||
|
Files: cmake/FindYubiKey.cmake
|
||||||
|
Copyright: 2014 Kyle Manna <kyle@kylemanna.com>
|
||||||
|
License: GPL-2 or GPL-3
|
||||||
|
|
||||||
|
Files: cmake/GenerateProductVersion.cmake
|
||||||
|
Copyright: 2015 halex2005 <akharlov@gmail.com>
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: cmake/CodeCoverage.cmake
|
||||||
|
Copyright: 2012 - 2015, Lars Bilke
|
||||||
|
License: BSD-3-clause
|
||||||
|
|
||||||
Files: share/icons/application/*/apps/keepassxc.png
|
Files: share/icons/application/*/apps/keepassxc.png
|
||||||
share/icons/application/scalable/apps/keepassxc.svgz
|
share/icons/application/scalable/apps/keepassxc.svgz
|
||||||
share/icons/application/*/apps/keepassxc-dark.png
|
share/icons/application/*/apps/keepassxc-dark.png
|
||||||
share/icons/application/scalable/apps/keepassxc-dark.svgz
|
share/icons/application/scalable/apps/keepassxc-dark.svgz
|
||||||
share/icons/application/*/apps/keepassxc-locked.png
|
share/icons/application/*/apps/keepassxc-locked.png
|
||||||
share/icons/application/scalable/apps/keepassxc-locked.svgz
|
share/icons/application/scalable/apps/keepassxc-locked.svgz
|
||||||
|
share/icons/application/*/apps/keepassxc-unlocked.png
|
||||||
|
share/icons/application/scalable/apps/keepassxc-unlocked.svgz
|
||||||
share/icons/application/*/mimetypes/application-x-keepassxc.png
|
share/icons/application/*/mimetypes/application-x-keepassxc.png
|
||||||
share/icons/application/scalable/mimetypes/application-x-keepassxc.svgz
|
share/icons/application/scalable/mimetypes/application-x-keepassxc.svgz
|
||||||
Copyright: 2016, Lorenzo Stella <lorenzo.stl@gmail.com>
|
Copyright: 2016, Lorenzo Stella <lorenzo.stl@gmail.com>
|
||||||
@@ -51,6 +77,8 @@ Files: share/icons/application/*/actions/auto-type.png
|
|||||||
share/icons/application/*/actions/entry-clone.png
|
share/icons/application/*/actions/entry-clone.png
|
||||||
share/icons/application/*/actions/entry-edit.png
|
share/icons/application/*/actions/entry-edit.png
|
||||||
share/icons/application/*/actions/entry-new.png
|
share/icons/application/*/actions/entry-new.png
|
||||||
|
share/icons/application/*/actions/group-empty-trash.png
|
||||||
|
share/icons/application/*/actions/help-about.png
|
||||||
share/icons/application/*/actions/password-generate.png
|
share/icons/application/*/actions/password-generate.png
|
||||||
share/icons/database/C00_Password.png
|
share/icons/database/C00_Password.png
|
||||||
share/icons/database/C01_Package_Network.png
|
share/icons/database/C01_Package_Network.png
|
||||||
@@ -136,18 +164,25 @@ Files: share/icons/application/*/actions/application-exit.png
|
|||||||
share/icons/application/*/actions/document-encrypt.png
|
share/icons/application/*/actions/document-encrypt.png
|
||||||
share/icons/application/*/actions/document-new.png
|
share/icons/application/*/actions/document-new.png
|
||||||
share/icons/application/*/actions/document-open.png
|
share/icons/application/*/actions/document-open.png
|
||||||
|
share/icons/application/*/actions/document-properties.png
|
||||||
share/icons/application/*/actions/document-save.png
|
share/icons/application/*/actions/document-save.png
|
||||||
share/icons/application/*/actions/document-save-as.png
|
share/icons/application/*/actions/document-save-as.png
|
||||||
share/icons/application/*/actions/edit-clear-locationbar-ltr.png
|
share/icons/application/*/actions/edit-clear-locationbar-ltr.png
|
||||||
share/icons/application/*/actions/edit-clear-locationbar-rtl.png
|
share/icons/application/*/actions/edit-clear-locationbar-rtl.png
|
||||||
|
share/icons/application/*/actions/key-enter.png
|
||||||
share/icons/application/*/actions/password-generator.png
|
share/icons/application/*/actions/password-generator.png
|
||||||
share/icons/application/*/actions/password-copy.png
|
share/icons/application/*/actions/password-copy.png
|
||||||
share/icons/application/*/actions/password-show-*.png
|
share/icons/application/*/actions/password-show-*.png
|
||||||
share/icons/application/*/actions/system-search.png
|
share/icons/application/*/actions/system-search.png
|
||||||
share/icons/application/*/actions/username-copy.png
|
share/icons/application/*/actions/username-copy.png
|
||||||
|
share/icons/application/*/actions/view-history.png
|
||||||
|
share/icons/application/*/apps/internet-web-browser.png
|
||||||
|
share/icons/application/*/apps/preferences-desktop-icons.png
|
||||||
|
share/icons/application/*/categories/preferences-other.png
|
||||||
share/icons/application/*/status/dialog-error.png
|
share/icons/application/*/status/dialog-error.png
|
||||||
share/icons/application/*/status/dialog-information.png
|
share/icons/application/*/status/dialog-information.png
|
||||||
share/icons/application/*/status/dialog-warning.png
|
share/icons/application/*/status/dialog-warning.png
|
||||||
|
share/icons/application/*/status/security-high.png
|
||||||
share/icons/svg/*.svgz
|
share/icons/svg/*.svgz
|
||||||
Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org>
|
Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org>
|
||||||
2007, David Vignoni <david@icon-king.com>
|
2007, David Vignoni <david@icon-king.com>
|
||||||
@@ -194,7 +229,20 @@ Copyright: 2009-2010, Iowa State University
|
|||||||
License: Boost-1.0
|
License: Boost-1.0
|
||||||
|
|
||||||
Files: src/zxcvbn/zxcvbn.*
|
Files: src/zxcvbn/zxcvbn.*
|
||||||
src/utils/entropy-meter.cpp
|
|
||||||
Copyright: 2015, Tony Evans
|
Copyright: 2015, Tony Evans
|
||||||
2016, KeePassXC Team
|
|
||||||
License: BSD 3-clause
|
License: BSD 3-clause
|
||||||
|
|
||||||
|
Files: src/http/qhttp/*
|
||||||
|
Copyright: 2014, Amir Zamani
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: src/gui/KMessageWidget.h
|
||||||
|
src/gui/KMessageWidget.cpp
|
||||||
|
Copyright: 2011 Aurélien Gâteau <agateau@kde.org>
|
||||||
|
2014 Dominik Haumann <dhaumann@kde.org>
|
||||||
|
License: LGPL-2.1
|
||||||
|
|
||||||
|
Files: src/totp/base32.cpp
|
||||||
|
src/totp/base32.h
|
||||||
|
Copyright: 2010 Google Inc.
|
||||||
|
License: Apache 2.0
|
||||||
36
Dockerfile
@@ -14,21 +14,43 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:14.04
|
||||||
|
|
||||||
RUN set -x && apt-get update
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --yes software-properties-common
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
&& add-apt-repository --yes ppa:beineri/opt-qt58-trusty
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
&& apt-get update \
|
||||||
&& apt-get install --yes \
|
&& apt-get install --yes \
|
||||||
|
g++ \
|
||||||
cmake \
|
cmake \
|
||||||
libgcrypt20-dev \
|
libgcrypt20-dev \
|
||||||
qtbase5-dev \
|
qt58base \
|
||||||
qttools5-dev-tools \
|
qt58tools \
|
||||||
libmicrohttpd-dev \
|
qt58x11extras \
|
||||||
libqt5x11extras5-dev \
|
|
||||||
libxi-dev \
|
libxi-dev \
|
||||||
libxtst-dev \
|
libxtst-dev \
|
||||||
zlib1g-dev
|
zlib1g-dev \
|
||||||
|
libyubikey-dev \
|
||||||
|
libykpers-1-dev \
|
||||||
|
xvfb \
|
||||||
|
wget \
|
||||||
|
file \
|
||||||
|
fuse \
|
||||||
|
python
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
&& apt-get install --yes mesa-common-dev
|
||||||
|
|
||||||
VOLUME /keepassxc/src
|
VOLUME /keepassxc/src
|
||||||
VOLUME /keepassxc/out
|
VOLUME /keepassxc/out
|
||||||
WORKDIR /keepassxc
|
WORKDIR /keepassxc
|
||||||
|
|
||||||
|
ENV CMAKE_PREFIX_PATH=/opt/qt58/lib/cmake
|
||||||
|
ENV LD_LIBRARY_PATH=/opt/qt58/lib
|
||||||
|
RUN set -x \
|
||||||
|
&& echo /opt/qt58/lib > /etc/ld.so.conf.d/qt58.conf
|
||||||
|
|||||||
81
README.md
@@ -1,59 +1,78 @@
|
|||||||
# KeePassXC - KeePass Cross-platform Community Edition
|
# <img src="https://keepassxc.org/logo.png" width="40" height="40"/> KeePassXC [](https://travis-ci.org/keepassxreboot/keepassxc) [](https://coveralls.io/github/keepassxreboot/keepassxc)
|
||||||
|
|
||||||
[](https://travis-ci.org/keepassxreboot/keepassxc) [](https://coveralls.io/github/keepassxreboot/keepassxc)
|
KeePass Cross-platform Community Edition
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
[KeePassXC](https://keepassxc.org) is a community fork of [KeePassX](https://www.keepassx.org/) with the goal to extend and improve it with new features and bugfixes to provide a feature-rich, fully cross-platform and modern open-source password manager.
|
||||||
Fork of [KeePassX](https://www.keepassx.org/) that [aims to incorporate stalled Pull Requests, features, and bug fixes that are not being incorporated into the main KeePassX baseline](https://github.com/keepassxreboot/keepassx/issues/43).
|
|
||||||
|
|
||||||
|
|
||||||
#### Additional Reboot Features
|
## Additional features compared to KeePassX
|
||||||
- keepasshttp support for use with [PassIFox](https://addons.mozilla.org/en-us/firefox/addon/passifox/) for Mozilla Firefox and [chromeIPass](https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae) for Google Chrome.
|
- Auto-Type on all three major platforms (Linux, Windows, OS X)
|
||||||
|
- Stand-alone password generator
|
||||||
|
- Password strength meter
|
||||||
|
- YubiKey HMAC-SHA1 authentication for unlocking databases
|
||||||
|
- Using website favicons as entry icons
|
||||||
|
- Merging of databases
|
||||||
|
- Automatic reload when the database changed on disk
|
||||||
|
- KeePassHTTP support for use with [PassIFox](https://addons.mozilla.org/en-us/firefox/addon/passifox/) in Mozilla Firefox and [chromeIPass](https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae) in Google Chrome or Chromium, and [passafari](https://github.com/mmichaa/passafari.safariextension/) in Safari.
|
||||||
|
- Many bug fixes
|
||||||
|
|
||||||
KeePassHttp implementation has been forked from jdachtera's repository, which in turn was based on code from code with Francois Ferrand's [keepassx-http](https://gitorious.org/keepassx/keepassx-http/source/master) repository.
|
For a full list of features and changes, read the [CHANGELOG](CHANGELOG) document.
|
||||||
|
|
||||||
This is a rebuild from [denk-mal's keepasshttp](https://github.com/denk-mal/keepassx.git) that brings it forward to Qt5 and KeePassX v2.x.
|
|
||||||
|
|
||||||
|
### Note about KeePassHTTP
|
||||||
|
KeePassHTTP is not a highly secure protocol and has certain flaw which allow an attacker to decrypt your passwords when they manage to intercept communication between a KeePassHTTP server and PassIFox/chromeIPass over a network connection (see [here](https://github.com/pfn/keepasshttp/issues/258) and [here](https://github.com/keepassxreboot/keepassxc/issues/147)). KeePassXC therefore strictly limits communication between itself and the browser plugin to your local computer. As long as your computer is not compromised, your passwords are fairly safe that way, but use it at your own risk!
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
Pre-compiled binaries can be found on the [downloads page](https://keepassxc.org/download). Additionally, individual Linux distributions may ship their own versions, so please check out your distribution's package list to see if KeePassXC is available.
|
||||||
|
|
||||||
Right now KeePassXC does not have a precompiled executable or an installation package.<br/>
|
### Building KeePassXC
|
||||||
So you must install it from its source code.
|
|
||||||
|
|
||||||
**More detailed instructions are available in the INSTALL file or at the [Wiki page](https://github.com/keepassxreboot/keepassx/wiki/Install-Instruction-from-Source).**
|
*More detailed instructions are available in the INSTALL file or on the [Wiki page](https://github.com/keepassxreboot/keepassxc/wiki/Building-KeePassXC).*
|
||||||
|
|
||||||
First you must download the KeePassXC source code as ZIP file or with Git.
|
First, you must download the KeePassXC [source tarball](https://keepassxc.org/download#source) or check out the latest version from our [Git repository](https://github.com/keepassxreboot/keepassxc).
|
||||||
|
|
||||||
Generally you can build and install KeePassXC with the following commands from a Terminal in the KeePassXC folder
|
To clone the project from Git, `cd` to a suitable location and run
|
||||||
```
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DWITH_TESTS=OFF ..
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Clone Repository
|
|
||||||
|
|
||||||
Clone the repository to a suitable location where you can extend and build this project.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/keepassxreboot/keepassxc.git
|
git clone https://github.com/keepassxreboot/keepassxc.git
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** This will clone the entire contents of the repository at the HEAD revision.
|
This will clone the entire contents of the repository and check out the current `develop` branch.
|
||||||
|
|
||||||
To update the project from within the project's folder you can run the following command:
|
To update the project from within the project's folder, you can run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git pull
|
git pull
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Once you have downloaded the source code, you can `cd` into the source code directory, build and install KeePassXC:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DWITH_TESTS=OFF ..
|
||||||
|
make -j8
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
cmake accepts the following options:
|
||||||
|
|
||||||
|
```
|
||||||
|
-DWITH_XC_AUTOTYPE=[ON|OFF] Enable/Disable Auto-Type (default: ON)
|
||||||
|
-DWITH_XC_HTTP=[ON|OFF] Enable/Disable KeePassHTTP and custom icon downloads (default: OFF)
|
||||||
|
-DWITH_XC_YUBIKEY=[ON|OFF] Enable/Disable YubiKey HMAC-SHA1 authentication support (default: OFF)
|
||||||
|
|
||||||
|
-DWITH_TESTS=[ON|OFF] Enable/Disable building of unit tests (default: ON)
|
||||||
|
-DWITH_GUI_TESTS=[ON|OFF] Enable/Disable building of GUI tests (default: OFF)
|
||||||
|
-DWITH_DEV_BUILD=[ON|OFF] Enable/Disable deprecated method warnings (default: OFF)
|
||||||
|
-DWITH_ASAN=[ON|OFF] Enable/Disable address sanitizer checks (Linux only) (default: OFF)
|
||||||
|
-DWITH_COVERAGE=[ON|OFF] Enable/Disable coverage tests (GCC only) (default: OFF)
|
||||||
|
```
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
We're always looking for suggestions to improve our application. If you have a suggestion for improving an existing feature,
|
We are always looking for suggestions how to improve our application. If you find any bugs or have an idea for a new feature, please let us know by opening a report in our [issue tracker](https://github.com/keepassxreboot/keepassxc/issues) on GitHub or join us on IRC on freenode channels #keepassxc or #keepassxc-dev.
|
||||||
or would like to suggest a completely new feature for KeePassX Reboot, please use the [Issues](https://github.com/keepassxreboot/keepassxc/issues) section or our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum.
|
|
||||||
|
|
||||||
Please review the [CONTRIBUTING](.github/CONTRIBUTING.md) document for further information.
|
You can of course also directly contribute your own code. We are happy to accept your pull requests.
|
||||||
|
|
||||||
|
Please read the [CONTRIBUTING document](.github/CONTRIBUTING.md) for further information.
|
||||||
|
|||||||
23
cmake/FindLibGPGError.cmake
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 or (at your option)
|
||||||
|
# version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
find_path(GPGERROR_INCLUDE_DIR gpg-error.h)
|
||||||
|
|
||||||
|
find_library(GPGERROR_LIBRARIES gpg-error)
|
||||||
|
|
||||||
|
mark_as_advanced(GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibGPGError DEFAULT_MSG GPGERROR_LIBRARIES GPGERROR_INCLUDE_DIR)
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
find_path(MHD_INCLUDE_DIR microhttpd.h)
|
|
||||||
|
|
||||||
find_library(MHD_LIBRARIES microhttpd)
|
|
||||||
|
|
||||||
mark_as_advanced(MHD_LIBRARIES MHD_INCLUDE_DIR)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(LibMicroHTTPD DEFAULT_MSG MHD_LIBRARIES MHD_INCLUDE_DIR)
|
|
||||||
27
cmake/FindYubiKey.cmake
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Copyright (C) 2014 Kyle Manna <kyle@kylemanna.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 or (at your option)
|
||||||
|
# version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
find_path(YUBIKEY_CORE_INCLUDE_DIR yubikey.h)
|
||||||
|
find_path(YUBIKEY_PERS_INCLUDE_DIR ykcore.h PATH_SUFFIXES ykpers-1)
|
||||||
|
set(YUBIKEY_INCLUDE_DIRS ${YUBIKEY_CORE_INCLUDE_DIR} ${YUBIKEY_PERS_INCLUDE_DIR})
|
||||||
|
|
||||||
|
find_library(YUBIKEY_CORE_LIBRARY yubikey)
|
||||||
|
find_library(YUBIKEY_PERS_LIBRARY ykpers-1)
|
||||||
|
set(YUBIKEY_LIBRARIES ${YUBIKEY_CORE_LIBRARY} ${YUBIKEY_PERS_LIBRARY})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(YubiKey DEFAULT_MSG YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
mark_as_advanced(YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)
|
||||||
118
cmake/GenerateProductVersion.cmake
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
# The MIT License (MIT)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015, by [halex2005](mailto:akharlov@gmail.com)
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
include (CMakeParseArguments)
|
||||||
|
|
||||||
|
set (GenerateProductVersionCurrentDir ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
||||||
|
# generate_product_version() function
|
||||||
|
#
|
||||||
|
# This function uses VersionInfo.in template file and VersionResource.rc file
|
||||||
|
# to generate WIN32 resource with version information and general resource strings.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# generate_product_version(
|
||||||
|
# SomeOutputResourceVariable
|
||||||
|
# NAME MyGreatProject
|
||||||
|
# ICON ${PATH_TO_APP_ICON}
|
||||||
|
# VERSION_MAJOR 2
|
||||||
|
# VERSION_MINOR 3
|
||||||
|
# VERSION_PATH ${BUILD_COUNTER}
|
||||||
|
# VERSION_REVISION ${BUILD_REVISION}
|
||||||
|
# )
|
||||||
|
# where BUILD_COUNTER and BUILD_REVISION could be values from your CI server.
|
||||||
|
#
|
||||||
|
# You can use generated resource for your executable targets:
|
||||||
|
# add_executable(target-name ${target-files} ${SomeOutputResourceVariable})
|
||||||
|
#
|
||||||
|
# You can specify resource strings in arguments:
|
||||||
|
# NAME - name of executable (no defaults, ex: Microsoft Word)
|
||||||
|
# BUNDLE - bundle (${NAME} is default, ex: Microsoft Office)
|
||||||
|
# VERSION_MAJOR - 1 is default
|
||||||
|
# VERSION_MINOR - 0 is default
|
||||||
|
# VERSION_PATCH - 0 is default
|
||||||
|
# COMPANY_NAME - your company name (no defaults)
|
||||||
|
# COMPANY_COPYRIGHT - ${COMPANY_NAME} (C) Copyright ${CURRENT_YEAR} is default
|
||||||
|
# COMMENTS - ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default
|
||||||
|
# ORIGINAL_FILENAME - ${NAME} is default
|
||||||
|
# INTERNAL_NAME - ${NAME} is default
|
||||||
|
# FILE_DESCRIPTION - ${NAME} is default
|
||||||
|
function(generate_product_version outfiles)
|
||||||
|
set (options)
|
||||||
|
set (oneValueArgs
|
||||||
|
NAME
|
||||||
|
BUNDLE
|
||||||
|
VERSION_MAJOR
|
||||||
|
VERSION_MINOR
|
||||||
|
VERSION_PATCH
|
||||||
|
COMPANY_NAME
|
||||||
|
COMPANY_COPYRIGHT
|
||||||
|
COMMENTS
|
||||||
|
ORIGINAL_FILENAME
|
||||||
|
INTERNAL_NAME
|
||||||
|
FILE_DESCRIPTION)
|
||||||
|
set (multiValueArgs)
|
||||||
|
cmake_parse_arguments(PRODUCT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if (NOT PRODUCT_BUNDLE OR "${PRODUCT_BUNDLE}" STREQUAL "")
|
||||||
|
set(PRODUCT_BUNDLE "${PRODUCT_NAME}")
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_VERSION_MAJOR OR "${PRODUCT_VERSION_MAJOR}" STREQUAL "")
|
||||||
|
set(PRODUCT_VERSION_MAJOR 1)
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_VERSION_MINOR OR "${PRODUCT_VERSION_MINOR}" STREQUAL "")
|
||||||
|
set(PRODUCT_VERSION_MINOR 0)
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_VERSION_PATCH OR "${PRODUCT_VERSION_PATCH}" STREQUAL "")
|
||||||
|
set(PRODUCT_VERSION_PATCH 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT PRODUCT_COMPANY_COPYRIGHT OR "${PRODUCT_COMPANY_COPYRIGHT}" STREQUAL "")
|
||||||
|
string(TIMESTAMP PRODUCT_CURRENT_YEAR "%Y")
|
||||||
|
set(PRODUCT_COMPANY_COPYRIGHT "Copyright (C) ${PRODUCT_CURRENT_YEAR} ${PRODUCT_COMPANY_NAME}")
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_COMMENTS OR "${PRODUCT_COMMENTS}" STREQUAL "")
|
||||||
|
set(PRODUCT_COMMENTS "${PRODUCT_NAME} v${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}")
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_ORIGINAL_FILENAME OR "${PRODUCT_ORIGINAL_FILENAME}" STREQUAL "")
|
||||||
|
set(PRODUCT_ORIGINAL_FILENAME "${PRODUCT_NAME}")
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_INTERNAL_NAME OR "${PRODUCT_INTERNAL_NAME}" STREQUAL "")
|
||||||
|
set(PRODUCT_INTERNAL_NAME "${PRODUCT_NAME}")
|
||||||
|
endif()
|
||||||
|
if (NOT PRODUCT_FILE_DESCRIPTION OR "${PRODUCT_FILE_DESCRIPTION}" STREQUAL "")
|
||||||
|
set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_NAME}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set (_VersionInfoFile ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.h)
|
||||||
|
set (_VersionResourceFile ${CMAKE_CURRENT_BINARY_DIR}/VersionResource.rc)
|
||||||
|
configure_file(
|
||||||
|
${GenerateProductVersionCurrentDir}/VersionInfo.in
|
||||||
|
${_VersionInfoFile}
|
||||||
|
@ONLY)
|
||||||
|
configure_file(
|
||||||
|
${GenerateProductVersionCurrentDir}/VersionResource.rc
|
||||||
|
${_VersionResourceFile}
|
||||||
|
COPYONLY)
|
||||||
|
list(APPEND ${outfiles} ${_VersionInfoFile} ${_VersionResourceFile})
|
||||||
|
set (${outfiles} ${${outfiles}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
68
cmake/VersionInfo.in
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef PRODUCT_VERSION_MAJOR
|
||||||
|
#define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_VERSION_MINOR
|
||||||
|
#define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_VERSION_PATCH
|
||||||
|
#define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FILE_VERSION_MAJOR
|
||||||
|
#define FILE_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FILE_VERSION_MINOR
|
||||||
|
#define FILE_VERSION_MINOR @PRODUCT_VERSION_MINOR@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FILE_VERSION_PATCH
|
||||||
|
#define FILE_VERSION_PATCH @PRODUCT_VERSION_PATCH@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TO_STRING
|
||||||
|
#define __TO_STRING_IMPL(x) #x
|
||||||
|
#define __TO_STRING(x) __TO_STRING_IMPL(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PRODUCT_VERSION_MAJOR_MINOR_STR __TO_STRING(PRODUCT_VERSION_MAJOR) "." __TO_STRING(PRODUCT_VERSION_MINOR)
|
||||||
|
#define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR PRODUCT_VERSION_MAJOR_MINOR_STR "." __TO_STRING(PRODUCT_VERSION_PATCH)
|
||||||
|
#define PRODUCT_VERSION_RESOURCE PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,0
|
||||||
|
#define PRODUCT_VERSION_RESOURCE_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "\0"
|
||||||
|
|
||||||
|
#define FILE_VERSION_MAJOR_MINOR_STR __TO_STRING(FILE_VERSION_MAJOR) "." __TO_STRING(FILE_VERSION_MINOR)
|
||||||
|
#define FILE_VERSION_MAJOR_MINOR_PATCH_STR FILE_VERSION_MAJOR_MINOR_STR "." __TO_STRING(FILE_VERSION_PATCH)
|
||||||
|
#define FILE_VERSION_RESOURCE FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,0
|
||||||
|
#define FILE_VERSION_RESOURCE_STR FILE_VERSION_MAJOR_MINOR_PATCH_STR "\0"
|
||||||
|
|
||||||
|
#ifndef PRODUCT_COMMENTS
|
||||||
|
#define PRODUCT_COMMENTS "@PRODUCT_COMMENTS@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_COMPANY_NAME
|
||||||
|
#define PRODUCT_COMPANY_NAME "@PRODUCT_COMPANY_NAME@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_COMPANY_COPYRIGHT
|
||||||
|
#define PRODUCT_COMPANY_COPYRIGHT "@PRODUCT_COMPANY_COPYRIGHT@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_FILE_DESCRIPTION
|
||||||
|
#define PRODUCT_FILE_DESCRIPTION "@PRODUCT_FILE_DESCRIPTION@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_INTERNAL_NAME
|
||||||
|
#define PRODUCT_INTERNAL_NAME "@PRODUCT_NAME@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_ORIGINAL_FILENAME
|
||||||
|
#define PRODUCT_ORIGINAL_FILENAME "@PRODUCT_ORIGINAL_FILENAME@\0"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRODUCT_BUNDLE
|
||||||
|
#define PRODUCT_BUNDLE "@PRODUCT_BUNDLE@\0"
|
||||||
|
#endif
|
||||||
36
cmake/VersionResource.rc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#include "VersionInfo.h"
|
||||||
|
#include "winresrc.h"
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION_RESOURCE
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION_RESOURCE
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x1L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Comments", PRODUCT_COMMENTS
|
||||||
|
VALUE "CompanyName", PRODUCT_COMPANY_NAME
|
||||||
|
VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_RESOURCE_STR
|
||||||
|
VALUE "InternalName", PRODUCT_INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", PRODUCT_COMPANY_COPYRIGHT
|
||||||
|
VALUE "OriginalFilename", PRODUCT_ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_BUNDLE
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
350
make_release.sh
@@ -1,350 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# KeePassXC Release Preparation Helper
|
|
||||||
# Copyright (C) 2017 KeePassXC team <https://keepassxc.org/>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 2 or (at your option)
|
|
||||||
# version 3 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
echo -e "\e[1m\e[32mKeePassXC\e[0m Release Preparation Helper"
|
|
||||||
echo -e "Copyright (C) 2017 KeePassXC Team <https://keepassxc.org/>\n"
|
|
||||||
|
|
||||||
|
|
||||||
# default values
|
|
||||||
RELEASE_NAME=""
|
|
||||||
APP_NAME="KeePassXC"
|
|
||||||
APP_NAME_LOWER="keepassxc"
|
|
||||||
SRC_DIR="."
|
|
||||||
GPG_KEY="CFB4C2166397D0D2"
|
|
||||||
GPG_GIT_KEY=""
|
|
||||||
OUTPUT_DIR="release"
|
|
||||||
BRANCH=""
|
|
||||||
RELEASE_BRANCH="master"
|
|
||||||
TAG_NAME=""
|
|
||||||
BUILD_SOURCES=false
|
|
||||||
DOCKER_IMAGE=""
|
|
||||||
DOCKER_CONTAINER_NAME="${APP_NAME_LOWER}-build-container"
|
|
||||||
CMAKE_OPTIONS=""
|
|
||||||
COMPILER="g++"
|
|
||||||
MAKE_OPTIONS="-j8"
|
|
||||||
BUILD_PLUGINS="autotype"
|
|
||||||
INSTALL_PREFIX="/usr/local"
|
|
||||||
|
|
||||||
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
|
|
||||||
ORIG_CWD="$(pwd)"
|
|
||||||
|
|
||||||
|
|
||||||
# helper functions
|
|
||||||
printUsage() {
|
|
||||||
echo -e "\e[1mUsage:\e[0m $(basename $0) [options]"
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-v, --version Release version number or name (required)
|
|
||||||
-a, --app-name Application name (default: '${APP_NAME}')
|
|
||||||
-s, --source-dir Source directory (default: '${SRC_DIR}')
|
|
||||||
-k, --gpg-key GPG key used to sign the release tarball
|
|
||||||
(default: '${GPG_KEY}')
|
|
||||||
-g, --gpg-git-key GPG key used to sign the merge commit and release tag,
|
|
||||||
leave empty to let Git choose your default key
|
|
||||||
(default: '${GPG_GIT_KEY}')
|
|
||||||
-o, --output-dir Output directory where to build the release
|
|
||||||
(default: '${OUTPUT_DIR}')
|
|
||||||
--develop-branch Development branch to merge from (default: 'release/VERSION')
|
|
||||||
--release-branch Target release branch to merge to (default: '${RELEASE_BRANCH}')
|
|
||||||
-t, --tag-name Override release tag name (defaults to version number)
|
|
||||||
-b, --build Build sources after exporting release
|
|
||||||
-d, --docker-image Use the specified Docker image to compile the application.
|
|
||||||
The image must have all required build dependencies installed.
|
|
||||||
This option has no effect if --build is not set.
|
|
||||||
--container-name Docker container name (default: '${DOCKER_CONTAINER_NAME}')
|
|
||||||
The container must not exist already
|
|
||||||
-c, --cmake-options Additional CMake options for compiling the sources
|
|
||||||
--compiler Compiler to use (default: '${COMPILER}')
|
|
||||||
-m, --make-options Make options for compiling sources (default: '${MAKE_OPTIONS}')
|
|
||||||
-i, --install-prefix Install prefix (default: '${INSTALL_PREFIX}')
|
|
||||||
-p, --plugins Space-separated list of plugins to build
|
|
||||||
(default: ${BUILD_PLUGINS})
|
|
||||||
-h, --help Show this help
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
logInfo() {
|
|
||||||
echo -e "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
logError() {
|
|
||||||
echo -e "\e[1m[ \e[31mERROR\e[39m ]\e[0m $1" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
exitError() {
|
|
||||||
logError "$1"
|
|
||||||
if [ "" != "$ORIG_BRANCH" ]; then
|
|
||||||
git checkout "$ORIG_BRANCH" > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
cd "$ORIG_CWD"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# parse command line options
|
|
||||||
while [ $# -ge 1 ]; do
|
|
||||||
arg="$1"
|
|
||||||
|
|
||||||
case "$arg" in
|
|
||||||
-a|--app-name)
|
|
||||||
APP_NAME="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-s|--source-dir)
|
|
||||||
SRC_DIR"$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-v|--version)
|
|
||||||
RELEASE_NAME="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-k|--gpg-key)
|
|
||||||
GPG_KEY="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-g|--gpg-git-key)
|
|
||||||
GPG_GIT_KEY="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-o|--output-dir)
|
|
||||||
OUTPUT_DIR="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
--develop-branch)
|
|
||||||
BRANCH="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
--release-branch)
|
|
||||||
RELEASE_BRANCH="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-t|--tag-name)
|
|
||||||
TAG_NAME="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-b|--build)
|
|
||||||
BUILD_SOURCES=true ;;
|
|
||||||
|
|
||||||
-d|--docker-image)
|
|
||||||
DOCKER_IMAGE="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
--container-name)
|
|
||||||
DOCKER_CONTAINER_NAME="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-c|--cmake-options)
|
|
||||||
CMAKE_OPTIONS="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-m|--make-options)
|
|
||||||
MAKE_OPTIONS="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
--compiler)
|
|
||||||
COMPILER="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-p|--plugins)
|
|
||||||
BUILD_PLUGINS="$2"
|
|
||||||
shift ;;
|
|
||||||
|
|
||||||
-h|--help)
|
|
||||||
printUsage
|
|
||||||
exit ;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
logError "Unknown option '$arg'\n"
|
|
||||||
printUsage
|
|
||||||
exit 1 ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if [ "" == "$RELEASE_NAME" ]; then
|
|
||||||
logError "Missing arguments, --version is required!\n"
|
|
||||||
printUsage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "" == "$TAG_NAME" ]; then
|
|
||||||
TAG_NAME="$RELEASE_NAME"
|
|
||||||
fi
|
|
||||||
if [ "" == "$BRANCH" ]; then
|
|
||||||
BRANCH="release/${RELEASE_NAME}"
|
|
||||||
fi
|
|
||||||
APP_NAME_LOWER="$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')"
|
|
||||||
APP_NAME_UPPER="$(echo "$APP_NAME" | tr '[:lower:]' '[:upper:]')"
|
|
||||||
|
|
||||||
SRC_DIR="$(realpath "$SRC_DIR")"
|
|
||||||
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
|
||||||
if [ ! -d "$SRC_DIR" ]; then
|
|
||||||
exitError "Source directory '${SRC_DIR}' does not exist!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "Changing to source directory..."
|
|
||||||
cd "${SRC_DIR}"
|
|
||||||
|
|
||||||
logInfo "Performing basic checks..."
|
|
||||||
|
|
||||||
if [ -e "$OUTPUT_DIR" ]; then
|
|
||||||
exitError "Output directory '$OUTPUT_DIR' already exists. Please choose a different location!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d .git ] || [ ! -f CHANGELOG ]; then
|
|
||||||
exitError "Source directory is not a valid Git repository!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git tag | grep -q "$RELEASE_NAME"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
exitError "Release '$RELEASE_NAME' already exists!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git diff-index --quiet HEAD --
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "Current working tree is not clean! Please commit or unstage any changes."
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout "$BRANCH" > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "Source branch '$BRANCH' does not exist!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
grep -q "${APP_NAME_UPPER}_VERSION \"${RELEASE_NAME}\"" CMakeLists.txt
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "${APP_NAME_UPPER}_VERSION version not updated to '${RELEASE_NAME}' in CMakeLists.txt!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
grep -q "${APP_NAME_UPPER}_VERSION_NUM \"${RELEASE_NAME}\"" CMakeLists.txt
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "${APP_NAME_UPPER}_VERSION_NUM version not updated to '${RELEASE_NAME}' in CMakeLists.txt!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f CHANGELOG ]; then
|
|
||||||
exitError "No CHANGELOG file found!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
grep -qPzo "${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n=+\n" CHANGELOG
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "CHANGELOG does not contain any information about the '${RELEASE_NAME}' release!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout "$RELEASE_BRANCH" > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "Release branch '$RELEASE_BRANCH' does not exist!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "All checks pass, getting our hands dirty now!"
|
|
||||||
|
|
||||||
logInfo "Merging '${BRANCH}' into '${RELEASE_BRANCH}'..."
|
|
||||||
|
|
||||||
CHANGELOG=$(grep -Pzo "(?<=${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n)=+\n\n(?:.|\n)+?\n(?=\n)" \
|
|
||||||
CHANGELOG | grep -Pzo '(?<=\n\n)(.|\n)+' | tr -d \\0)
|
|
||||||
COMMIT_MSG="Release ${RELEASE_NAME}"
|
|
||||||
|
|
||||||
git merge "$BRANCH" --no-ff -m "$COMMIT_MSG" -m "${CHANGELOG}" "$BRANCH" -S"$GPG_GIT_KEY"
|
|
||||||
|
|
||||||
logInfo "Creating tag '${RELEASE_NAME}'..."
|
|
||||||
if [ "" == "$GPG_GIT_KEY" ]; then
|
|
||||||
git tag -a "$RELEASE_NAME" -m "$COMMIT_MSG" -m "${CHANGELOG}" -s
|
|
||||||
else
|
|
||||||
git tag -a "$RELEASE_NAME" -m "$COMMIT_MSG" -m "${CHANGELOG}" -s -u "$GPG_GIT_KEY"
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "Merge done, creating target directory..."
|
|
||||||
mkdir -p "$OUTPUT_DIR"
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exitError "Failed to create output directory!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "Creating source tarball..."
|
|
||||||
TARBALL_NAME="${APP_NAME_LOWER}-${RELEASE_NAME}-src.tar.bz2"
|
|
||||||
git archive --format=tar "$RELEASE_BRANCH" --prefix="${APP_NAME_LOWER}-${RELEASE_NAME}/" \
|
|
||||||
| bzip2 -9 > "${OUTPUT_DIR}/${TARBALL_NAME}"
|
|
||||||
|
|
||||||
|
|
||||||
if $BUILD_SOURCES; then
|
|
||||||
logInfo "Creating build directory..."
|
|
||||||
mkdir -p "${OUTPUT_DIR}/build-release"
|
|
||||||
mkdir -p "${OUTPUT_DIR}/bin-release"
|
|
||||||
cd "${OUTPUT_DIR}/build-release"
|
|
||||||
|
|
||||||
logInfo "Configuring sources..."
|
|
||||||
for p in $BUILD_PLUGINS; do
|
|
||||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DWITH_XC_$(echo $p | tr '[:lower:]' '[:upper:]')=On"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$COMPILER" == "g++" ]; then
|
|
||||||
export CC=gcc
|
|
||||||
elif [ "$COMPILER" == "clang++" ]; then
|
|
||||||
export CC=clang
|
|
||||||
fi
|
|
||||||
export CXX="$COMPILER"
|
|
||||||
|
|
||||||
if [ "" == "$DOCKER_IMAGE" ]; then
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \
|
|
||||||
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" "$SRC_DIR"
|
|
||||||
|
|
||||||
logInfo "Compiling sources..."
|
|
||||||
make $MAKE_OPTIONS
|
|
||||||
|
|
||||||
logInfo "Installing to bin dir..."
|
|
||||||
make DESTDIR="${OUTPUT_DIR}/bin-release" install/strip
|
|
||||||
else
|
|
||||||
logInfo "Launching Docker container to compile sources..."
|
|
||||||
|
|
||||||
docker run --name "$DOCKER_CONTAINER_NAME" --rm \
|
|
||||||
-e "CC=${CC}" -e "CXX=${CXX}" \
|
|
||||||
-v "$(realpath "$SRC_DIR"):/keepassxc/src:ro" \
|
|
||||||
-v "$(realpath "$OUTPUT_DIR"):/keepassxc/out:rw" \
|
|
||||||
"$DOCKER_IMAGE" \
|
|
||||||
bash -c "cd /keepassxc/out/build-release && \
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=\"${INSTALL_PREFIX}\" /keepassxc/src && \
|
|
||||||
make $MAKE_OPTIONS && make DESTDIR=/keepassxc/out/bin-release install/strip"
|
|
||||||
|
|
||||||
logInfo "Build finished, Docker container terminated."
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "Creating AppImage..."
|
|
||||||
${SRC_DIR}/AppImage-Recipe.sh "$APP_NAME" "$RELEASE_NAME"
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
logInfo "Signing source tarball..."
|
|
||||||
gpg --output "${TARBALL_NAME}.sig" --armor --local-user "$GPG_KEY" --detach-sig "$TARBALL_NAME"
|
|
||||||
|
|
||||||
logInfo "Signing AppImage..."
|
|
||||||
APPIMAGE_NAME="${APP_NAME}-${RELEASE_NAME}-x86_64.AppImage"
|
|
||||||
gpg --output "${APPIMAGE_NAME}.sig" --armor --local-user "$GPG_KEY" --detach-sig "$APPIMAGE_NAME"
|
|
||||||
|
|
||||||
logInfo "Creating digests..."
|
|
||||||
sha256sum "$TARBALL_NAME" > "${TARBALL_NAME}.DIGEST"
|
|
||||||
sha256sum "$APPIMAGE_NAME" > "${APPIMAGE_NAME}.DIGEST"
|
|
||||||
fi
|
|
||||||
|
|
||||||
logInfo "Leaving source directory..."
|
|
||||||
cd "$ORIG_CWD"
|
|
||||||
git checkout "$ORIG_BRANCH" > /dev/null 2>&1
|
|
||||||
|
|
||||||
logInfo "All done!"
|
|
||||||
logInfo "Please merge the release branch back into the develop branch now and then push your changes."
|
|
||||||
logInfo "Don't forget to also push the tags using \e[1mgit push --tags\e[0m."
|
|
||||||
718
release-tool
Executable file
@@ -0,0 +1,718 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# KeePassXC Release Preparation Helper
|
||||||
|
# Copyright (C) 2017 KeePassXC team <https://keepassxc.org/>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 or (at your option)
|
||||||
|
# version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
printf "\e[1m\e[32mKeePassXC\e[0m Release Preparation Helper\n"
|
||||||
|
printf "Copyright (C) 2017 KeePassXC Team <https://keepassxc.org/>\n\n"
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# global default values
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
RELEASE_NAME=""
|
||||||
|
APP_NAME="KeePassXC"
|
||||||
|
SRC_DIR="."
|
||||||
|
GPG_KEY="CFB4C2166397D0D2"
|
||||||
|
GPG_GIT_KEY=""
|
||||||
|
OUTPUT_DIR="release"
|
||||||
|
SOURCE_BRANCH=""
|
||||||
|
TARGET_BRANCH="master"
|
||||||
|
TAG_NAME=""
|
||||||
|
DOCKER_IMAGE=""
|
||||||
|
DOCKER_CONTAINER_NAME="keepassxc-build-container"
|
||||||
|
CMAKE_OPTIONS=""
|
||||||
|
COMPILER="g++"
|
||||||
|
MAKE_OPTIONS="-j8"
|
||||||
|
BUILD_PLUGINS="autotype http yubikey"
|
||||||
|
INSTALL_PREFIX="/usr/local"
|
||||||
|
BUILD_SOURCE_TARBALL=true
|
||||||
|
ORIG_BRANCH=""
|
||||||
|
ORIG_CWD="$(pwd)"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# helper functions
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
printUsage() {
|
||||||
|
local cmd
|
||||||
|
if [ "" == "$1" ] || [ "help" == "$1" ]; then
|
||||||
|
cmd="COMMAND"
|
||||||
|
elif [ "check" == "$1" ] || [ "merge" == "$1" ] || [ "build" == "$1" ] || [ "sign" == "$1" ]; then
|
||||||
|
cmd="$1"
|
||||||
|
else
|
||||||
|
logError "Unknown command: '$1'\n"
|
||||||
|
cmd="COMMAND"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\e[1mUsage:\e[0m $(basename $0) $cmd [--version x.y.z] [options]\n"
|
||||||
|
|
||||||
|
if [ "COMMAND" == "$cmd" ]; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
check Perform a dry-run check, nothing is changed
|
||||||
|
merge Merge release branch into main branch and create release tags
|
||||||
|
build Build and package binary release from sources
|
||||||
|
sign Sign previously compiled release packages
|
||||||
|
help Show help for the given command
|
||||||
|
EOF
|
||||||
|
elif [ "merge" == "$cmd" ]; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
Merge release branch into main branch and create release tags
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-v, --version Release version number or name (required)
|
||||||
|
-a, --app-name Application name (default: '${APP_NAME}')
|
||||||
|
-s, --source-dir Source directory (default: '${SRC_DIR}')
|
||||||
|
-g, --gpg-key GPG key used to sign the merge commit and release tag,
|
||||||
|
leave empty to let Git choose your default key
|
||||||
|
(default: '${GPG_GIT_KEY}')
|
||||||
|
-r, --release-branch Source release branch to merge from (default: 'release/VERSION')
|
||||||
|
--target-branch Target branch to merge to (default: '${TARGET_BRANCH}')
|
||||||
|
-t, --tag-name Override release tag name (defaults to version number)
|
||||||
|
-h, --help Show this help
|
||||||
|
EOF
|
||||||
|
elif [ "build" == "$cmd" ]; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
Build and package binary release from sources
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-v, --version Release version number or name (required)
|
||||||
|
-a, --app-name Application name (default: '${APP_NAME}')
|
||||||
|
-s, --source-dir Source directory (default: '${SRC_DIR}')
|
||||||
|
-o, --output-dir Output directory where to build the release
|
||||||
|
(default: '${OUTPUT_DIR}')
|
||||||
|
-t, --tag-name Release tag to check out (defaults to version number)
|
||||||
|
-b, --build Build sources after exporting release
|
||||||
|
-d, --docker-image Use the specified Docker image to compile the application.
|
||||||
|
The image must have all required build dependencies installed.
|
||||||
|
This option has no effect if --build is not set.
|
||||||
|
--container-name Docker container name (default: '${DOCKER_CONTAINER_NAME}')
|
||||||
|
The container must not exist already
|
||||||
|
-c, --cmake-options Additional CMake options for compiling the sources
|
||||||
|
--compiler Compiler to use (default: '${COMPILER}')
|
||||||
|
-m, --make-options Make options for compiling sources (default: '${MAKE_OPTIONS}')
|
||||||
|
-i, --install-prefix Install prefix (default: '${INSTALL_PREFIX}')
|
||||||
|
-p, --plugins Space-separated list of plugins to build
|
||||||
|
(default: ${BUILD_PLUGINS})
|
||||||
|
-n, --no-source-tarball Don't build source tarball
|
||||||
|
-h, --help Show this help
|
||||||
|
EOF
|
||||||
|
elif [ "sign" == "$cmd" ]; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
Sign previously compiled release packages
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-f, --files Files to sign (required)
|
||||||
|
-g, --gpg-key GPG key used to sign the files (default: '${GPG_KEY}')
|
||||||
|
-h, --help Show this help
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
logInfo() {
|
||||||
|
printf "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
logError() {
|
||||||
|
printf "\e[1m[ \e[31mERROR\e[39m ]\e[0m $1\n" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
if [ "" == "$RELEASE_NAME" ]; then
|
||||||
|
logError "Missing arguments, --version is required!\n"
|
||||||
|
printUsage "check"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "" == "$TAG_NAME" ]; then
|
||||||
|
TAG_NAME="$RELEASE_NAME"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "" == "$SOURCE_BRANCH" ]; then
|
||||||
|
SOURCE_BRANCH="release/${RELEASE_NAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ORIG_CWD="$(pwd)"
|
||||||
|
SRC_DIR="$(realpath "$SRC_DIR")"
|
||||||
|
cd "$SRC_DIR" > /dev/null 2>&1
|
||||||
|
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
|
||||||
|
cd "$ORIG_CWD"
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
logInfo "Checking out original branch..."
|
||||||
|
if [ "" != "$ORIG_BRANCH" ]; then
|
||||||
|
git checkout "$ORIG_BRANCH" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
logInfo "Leaving source directory..."
|
||||||
|
cd "$ORIG_CWD"
|
||||||
|
}
|
||||||
|
|
||||||
|
exitError() {
|
||||||
|
logError "$1"
|
||||||
|
cleanup
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
exitTrap() {
|
||||||
|
exitError "Existing upon user request..."
|
||||||
|
}
|
||||||
|
|
||||||
|
checkSourceDirExists() {
|
||||||
|
if [ ! -d "$SRC_DIR" ]; then
|
||||||
|
exitError "Source directory '${SRC_DIR}' does not exist!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkOutputDirDoesNotExist() {
|
||||||
|
if [ -e "$OUTPUT_DIR" ]; then
|
||||||
|
exitError "Output directory '$OUTPUT_DIR' already exists. Please choose a different location!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkGitRepository() {
|
||||||
|
if [ ! -d .git ] || [ ! -f CHANGELOG ]; then
|
||||||
|
exitError "Source directory is not a valid Git repository!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkTagExists() {
|
||||||
|
git tag | grep -q "$TAG_NAME"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "Tag '${TAG_NAME}' does not exist!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkReleaseDoesNotExist() {
|
||||||
|
git tag | grep -q "$TAG_NAME"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
exitError "Release '$RELEASE_NAME' (tag: '$TAG_NAME') already exists!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkWorkingTreeClean() {
|
||||||
|
git diff-index --quiet HEAD --
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "Current working tree is not clean! Please commit or unstage any changes."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkSourceBranchExists() {
|
||||||
|
git rev-parse "$SOURCE_BRANCH" > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "Source branch '$SOURCE_BRANCH' does not exist!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkTargetBranchExists() {
|
||||||
|
git rev-parse "$TARGET_BRANCH" > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "Target branch '$TARGET_BRANCH' does not exist!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkVersionInCMake() {
|
||||||
|
local app_name_upper="$(echo "$APP_NAME" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
local major_num="$(echo ${RELEASE_NAME} | cut -f1 -d.)"
|
||||||
|
local minor_num="$(echo ${RELEASE_NAME} | cut -f2 -d.)"
|
||||||
|
local patch_num="$(echo ${RELEASE_NAME} | cut -f3 -d.)"
|
||||||
|
|
||||||
|
grep -q "${app_name_upper}_VERSION_MAJOR \"${major_num}\"" CMakeLists.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "${app_name_upper}_VERSION_MAJOR not updated to '${major_num}' in CMakeLists.txt!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
grep -q "${app_name_upper}_VERSION_MINOR \"${minor_num}\"" CMakeLists.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "${app_name_upper}_VERSION_MINOR not updated to '${minor_num}' in CMakeLists.txt!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
grep -q "${app_name_upper}_VERSION_PATCH \"${patch_num}\"" CMakeLists.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "${app_name_upper}_VERSION_PATCH not updated to '${patch_num}' in CMakeLists.txt!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkChangeLog() {
|
||||||
|
if [ ! -f CHANGELOG ]; then
|
||||||
|
exitError "No CHANGELOG file found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
grep -qPzo "${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n=+\n" CHANGELOG
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "CHANGELOG does not contain any information about the '${RELEASE_NAME}' release!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkTransifexCommandExists() {
|
||||||
|
command -v tx > /dev/null
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
command -v lupdate-qt5 > /dev/null
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Qt Linguist tool (lupdate-qt5) is not installed! Please install using 'apt install qttools5-dev-tools'"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
checkSnapcraft() {
|
||||||
|
if [ ! -f snapcraft.yaml ]; then
|
||||||
|
echo "No snapcraft file found!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
grep -qPzo "version: ${RELEASE_NAME}" snapcraft.yaml
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "snapcraft.yaml has not been updated to the '${RELEASE_NAME}' release!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
performChecks() {
|
||||||
|
logInfo "Performing basic checks..."
|
||||||
|
|
||||||
|
checkSourceDirExists
|
||||||
|
|
||||||
|
logInfo "Changing to source directory..."
|
||||||
|
cd "${SRC_DIR}"
|
||||||
|
|
||||||
|
logInfo "Validating toolset and repository..."
|
||||||
|
|
||||||
|
checkTransifexCommandExists
|
||||||
|
checkGitRepository
|
||||||
|
checkReleaseDoesNotExist
|
||||||
|
checkWorkingTreeClean
|
||||||
|
checkSourceBranchExists
|
||||||
|
checkTargetBranchExists
|
||||||
|
|
||||||
|
logInfo "Checking out '${SOURCE_BRANCH}'..."
|
||||||
|
git checkout "$SOURCE_BRANCH"
|
||||||
|
|
||||||
|
logInfo "Attempting to find '${RELEASE_NAME}' in various files..."
|
||||||
|
|
||||||
|
checkVersionInCMake
|
||||||
|
checkChangeLog
|
||||||
|
checkSnapcraft
|
||||||
|
|
||||||
|
logInfo "\e[1m\e[32mAll checks passed!\e[0m"
|
||||||
|
}
|
||||||
|
|
||||||
|
# re-implement realpath for OS X (thanks mschrag)
|
||||||
|
# https://superuser.com/questions/205127/
|
||||||
|
if ! $(command -v realpath > /dev/null); then
|
||||||
|
realpath() {
|
||||||
|
pushd . > /dev/null
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
cd "$1"
|
||||||
|
dirs -l +0
|
||||||
|
else
|
||||||
|
cd "$(dirname "$1")"
|
||||||
|
cur_dir=$(dirs -l +0)
|
||||||
|
|
||||||
|
if [ "$cur_dir" == "/" ]; then
|
||||||
|
echo "$cur_dir$(basename "$1")"
|
||||||
|
else
|
||||||
|
echo "$cur_dir/$(basename "$1")"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
trap exitTrap SIGINT SIGTERM
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# check command
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
check() {
|
||||||
|
while [ $# -ge 1 ]; do
|
||||||
|
local arg="$1"
|
||||||
|
case "$arg" in
|
||||||
|
-v|--version)
|
||||||
|
RELEASE_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
init
|
||||||
|
|
||||||
|
performChecks
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
logInfo "Congrats! You can successfully merge, build, and sign KeepassXC."
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# merge command
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
merge() {
|
||||||
|
while [ $# -ge 1 ]; do
|
||||||
|
local arg="$1"
|
||||||
|
case "$arg" in
|
||||||
|
-v|--version)
|
||||||
|
RELEASE_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-a|--app-name)
|
||||||
|
APP_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-s|--source-dir)
|
||||||
|
SRC_DIR="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-g|--gpg-key)
|
||||||
|
GPG_GIT_KEY="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-r|--release-branch)
|
||||||
|
SOURCE_BRANCH="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
--target-branch)
|
||||||
|
TARGET_BRANCH="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-t|--tag-name)
|
||||||
|
TAG_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-h|--help)
|
||||||
|
printUsage "merge"
|
||||||
|
exit ;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
logError "Unknown option '$arg'\n"
|
||||||
|
printUsage "merge"
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
init
|
||||||
|
|
||||||
|
performChecks
|
||||||
|
|
||||||
|
logInfo "Updating language files..."
|
||||||
|
./share/translations/update.sh
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Updating translations failed!"
|
||||||
|
fi
|
||||||
|
git diff-index --quiet HEAD --
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
git add ./share/translations/*
|
||||||
|
logInfo "Committing changes..."
|
||||||
|
if [ "" == "$GPG_GIT_KEY" ]; then
|
||||||
|
git commit -m "Update translations"
|
||||||
|
else
|
||||||
|
git commit -m "Update translations" -S"$GPG_GIT_KEY"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CHANGELOG=$(grep -Pzo "(?<=${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n)=+\n\n?(?:.|\n)+?\n(?=\n)" \
|
||||||
|
CHANGELOG | grep -Pzo '(?<=\n\n)(.|\n)+' | tr -d \\0)
|
||||||
|
COMMIT_MSG="Release ${RELEASE_NAME}"
|
||||||
|
|
||||||
|
logInfo "Checking out target branch '${TARGET_BRANCH}'..."
|
||||||
|
git checkout "$TARGET_BRANCH"
|
||||||
|
|
||||||
|
logInfo "Merging '${SOURCE_BRANCH}' into '${TARGET_BRANCH}'..."
|
||||||
|
|
||||||
|
git merge "$SOURCE_BRANCH" --no-ff -m "$COMMIT_MSG" -m "${CHANGELOG}" "$SOURCE_BRANCH" -S"$GPG_GIT_KEY"
|
||||||
|
|
||||||
|
logInfo "Creating tag '${TAG_NAME}'..."
|
||||||
|
if [ "" == "$GPG_GIT_KEY" ]; then
|
||||||
|
git tag -a "$TAG_NAME" -m "$COMMIT_MSG" -m "${CHANGELOG}" -s
|
||||||
|
else
|
||||||
|
git tag -a "$TAG_NAME" -m "$COMMIT_MSG" -m "${CHANGELOG}" -s -u "$GPG_GIT_KEY"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
logInfo "All done!"
|
||||||
|
logInfo "Please merge the release branch back into the develop branch now and then push your changes."
|
||||||
|
logInfo "Don't forget to also push the tags using \e[1mgit push --tags\e[0m."
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# build command
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
build() {
|
||||||
|
while [ $# -ge 1 ]; do
|
||||||
|
local arg="$1"
|
||||||
|
case "$arg" in
|
||||||
|
-v|--version)
|
||||||
|
RELEASE_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-a|--app-name)
|
||||||
|
APP_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-s|--source-dir)
|
||||||
|
SRC_DIR="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-o|--output-dir)
|
||||||
|
OUTPUT_DIR="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-t|--tag-name)
|
||||||
|
TAG_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-d|--docker-image)
|
||||||
|
DOCKER_IMAGE="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
--container-name)
|
||||||
|
DOCKER_CONTAINER_NAME="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-c|--cmake-options)
|
||||||
|
CMAKE_OPTIONS="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
--compiler)
|
||||||
|
COMPILER="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-m|--make-options)
|
||||||
|
MAKE_OPTIONS="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-i|--install-prefix)
|
||||||
|
INSTALL_PREFIX="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-p|--plugins)
|
||||||
|
BUILD_PLUGINS="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-n|--no-source-tarball)
|
||||||
|
BUILD_SOURCE_TARBALL=false ;;
|
||||||
|
|
||||||
|
-h|--help)
|
||||||
|
printUsage "build"
|
||||||
|
exit ;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
logError "Unknown option '$arg'\n"
|
||||||
|
printUsage "build"
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
init
|
||||||
|
|
||||||
|
performChecks
|
||||||
|
|
||||||
|
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
||||||
|
|
||||||
|
logInfo "Checking out release tag '${TAG_NAME}'..."
|
||||||
|
git checkout "$TAG_NAME"
|
||||||
|
|
||||||
|
logInfo "Creating output directory..."
|
||||||
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exitError "Failed to create output directory!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $BUILD_SOURCE_TARBALL; then
|
||||||
|
logInfo "Creating source tarball..."
|
||||||
|
local app_name_lower="$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
TARBALL_NAME="${app_name_lower}-${RELEASE_NAME}-src.tar.xz"
|
||||||
|
git archive --format=tar "$TAG_NAME" --prefix="${app_name_lower}-${RELEASE_NAME}/" \
|
||||||
|
| xz -6 > "${OUTPUT_DIR}/${TARBALL_NAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
logInfo "Creating build directory..."
|
||||||
|
mkdir -p "${OUTPUT_DIR}/build-release"
|
||||||
|
cd "${OUTPUT_DIR}/build-release"
|
||||||
|
|
||||||
|
logInfo "Configuring sources..."
|
||||||
|
for p in $BUILD_PLUGINS; do
|
||||||
|
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DWITH_XC_$(echo $p | tr '[:lower:]' '[:upper:]')=On"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$COMPILER" == "g++" ]; then
|
||||||
|
export CC=gcc
|
||||||
|
elif [ "$COMPILER" == "clang++" ]; then
|
||||||
|
export CC=clang
|
||||||
|
fi
|
||||||
|
export CXX="$COMPILER"
|
||||||
|
|
||||||
|
if [ "" == "$DOCKER_IMAGE" ]; then
|
||||||
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
|
# Building on OS X
|
||||||
|
local qt_vers="$(ls /usr/local/Cellar/qt5 2> /dev/null | sort -r | head -n1)"
|
||||||
|
if [ "" == "$qt_vers" ]; then
|
||||||
|
exitError "Couldn't find Qt5! Please make sure it is available in '/usr/local/Cellar/qt5'."
|
||||||
|
fi
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
|
|
||||||
|
logInfo "Configuring build..."
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_CXX11=OFF \
|
||||||
|
-DCMAKE_PREFIX_PATH="/usr/local/Cellar/qt5/${qt_vers}/lib/cmake" \
|
||||||
|
-DQT_BINARY_DIR="/usr/local/Cellar/qt5/${qt_vers}/bin" $CMAKE_OPTIONS "$SRC_DIR"
|
||||||
|
|
||||||
|
logInfo "Compiling and packaging sources..."
|
||||||
|
make $MAKE_OPTIONS package
|
||||||
|
|
||||||
|
mv "./${APP_NAME}-${RELEASE_NAME}.dmg" ../
|
||||||
|
elif [ "$(uname -o)" == "Msys" ]; then
|
||||||
|
# Building on Windows with Msys
|
||||||
|
logInfo "Configuring build..."
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off -G"MSYS Makefiles" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" $CMAKE_OPTIONS "$SRC_DIR"
|
||||||
|
|
||||||
|
logInfo "Compiling and packaging sources..."
|
||||||
|
make $MAKE_OPTIONS package
|
||||||
|
|
||||||
|
mv "./${APP_NAME}-${RELEASE_NAME}-"*.{exe,zip} ../
|
||||||
|
else
|
||||||
|
mkdir -p "${OUTPUT_DIR}/bin-release"
|
||||||
|
|
||||||
|
# Building on Linux without Docker container
|
||||||
|
logInfo "Configuring build..."
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" "$SRC_DIR"
|
||||||
|
|
||||||
|
logInfo "Compiling sources..."
|
||||||
|
make $MAKE_OPTIONS
|
||||||
|
|
||||||
|
logInfo "Installing to bin dir..."
|
||||||
|
make DESTDIR="${OUTPUT_DIR}/bin-release" install/strip
|
||||||
|
|
||||||
|
logInfo "Creating AppImage..."
|
||||||
|
${SRC_DIR}/AppImage-Recipe.sh "$APP_NAME" "$RELEASE_NAME"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
mkdir -p "${OUTPUT_DIR}/bin-release"
|
||||||
|
|
||||||
|
logInfo "Launching Docker container to compile sources..."
|
||||||
|
|
||||||
|
docker run --name "$DOCKER_CONTAINER_NAME" --rm \
|
||||||
|
--cap-add SYS_ADMIN --device /dev/fuse \
|
||||||
|
-e "CC=${CC}" -e "CXX=${CXX}" \
|
||||||
|
-v "$(realpath "$SRC_DIR"):/keepassxc/src:ro" \
|
||||||
|
-v "$(realpath "$OUTPUT_DIR"):/keepassxc/out:rw" \
|
||||||
|
"$DOCKER_IMAGE" \
|
||||||
|
bash -c "cd /keepassxc/out/build-release && \
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=Off $CMAKE_OPTIONS \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=\"${INSTALL_PREFIX}\" /keepassxc/src && \
|
||||||
|
make $MAKE_OPTIONS && make DESTDIR=/keepassxc/out/bin-release install/strip && \
|
||||||
|
/keepassxc/src/AppImage-Recipe.sh "$APP_NAME" "$RELEASE_NAME""
|
||||||
|
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Docker build failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
logInfo "Build finished, Docker container terminated."
|
||||||
|
fi
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
logInfo "All done!"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# sign command
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
sign() {
|
||||||
|
SIGN_FILES=()
|
||||||
|
|
||||||
|
while [ $# -ge 1 ]; do
|
||||||
|
local arg="$1"
|
||||||
|
case "$arg" in
|
||||||
|
-f|--files)
|
||||||
|
while [ "${2:0:1}" != "-" ] && [ $# -ge 2 ]; do
|
||||||
|
SIGN_FILES+=("$2")
|
||||||
|
shift
|
||||||
|
done ;;
|
||||||
|
|
||||||
|
-g|--gpg-key)
|
||||||
|
GPG_KEY="$2"
|
||||||
|
shift ;;
|
||||||
|
|
||||||
|
-h|--help)
|
||||||
|
printUsage "sign"
|
||||||
|
exit ;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
logError "Unknown option '$arg'\n"
|
||||||
|
printUsage "sign"
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$SIGN_FILES" ]; then
|
||||||
|
logError "Missing arguments, --files is required!\n"
|
||||||
|
printUsage "sign"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for f in "${SIGN_FILES[@]}"; do
|
||||||
|
if [ ! -f "$f" ]; then
|
||||||
|
exitError "File '${f}' does not exist!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
logInfo "Signing file '${f}'..."
|
||||||
|
gpg --output "${f}.sig" --armor --local-user "$GPG_KEY" --detach-sig "$f"
|
||||||
|
|
||||||
|
if [ 0 -ne $? ]; then
|
||||||
|
exitError "Signing failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
logInfo "Creating digest for file '${f}'..."
|
||||||
|
local rp="$(realpath "$f")"
|
||||||
|
local bname="$(basename "$f")"
|
||||||
|
(cd "$(dirname "$rp")"; sha256sum "$bname" > "${bname}.DIGEST")
|
||||||
|
done
|
||||||
|
|
||||||
|
logInfo "All done!"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# parse global command line
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
MODE="$1"
|
||||||
|
shift
|
||||||
|
if [ "" == "$MODE" ]; then
|
||||||
|
logError "Missing arguments!\n"
|
||||||
|
printUsage
|
||||||
|
exit 1
|
||||||
|
elif [ "help" == "$MODE" ]; then
|
||||||
|
printUsage "$1"
|
||||||
|
exit
|
||||||
|
elif [ "check" == "$MODE" ] || [ "merge" == "$MODE" ] || [ "build" == "$MODE" ] || [ "sign" == "$MODE" ]; then
|
||||||
|
$MODE "$@"
|
||||||
|
else
|
||||||
|
printUsage "$MODE"
|
||||||
|
fi
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
|
# Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
|
||||||
|
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,15 +16,20 @@
|
|||||||
|
|
||||||
add_subdirectory(translations)
|
add_subdirectory(translations)
|
||||||
|
|
||||||
|
file(GLOB wordlists_files "wordlists/*.wordlist")
|
||||||
|
install(FILES ${wordlists_files} DESTINATION ${DATA_INSTALL_DIR}/wordlists)
|
||||||
|
|
||||||
file(GLOB DATABASE_ICONS icons/database/*.png)
|
file(GLOB DATABASE_ICONS icons/database/*.png)
|
||||||
|
|
||||||
install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
|
install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
||||||
FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svgz")
|
FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svgz"
|
||||||
|
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
|
||||||
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
||||||
FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz")
|
FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz"
|
||||||
|
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
|
||||||
install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||||
install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
||||||
endif(UNIX AND NOT APPLE)
|
endif(UNIX AND NOT APPLE)
|
||||||
@@ -84,6 +90,22 @@ add_custom_target(icons
|
|||||||
COMMAND inkscape -z -w 256 -h 256
|
COMMAND inkscape -z -w 256 -h 256
|
||||||
icons/application/scalable/apps/keepassxc-locked.svgz -e icons/application/256x256/apps/keepassxc-locked.png
|
icons/application/scalable/apps/keepassxc-locked.svgz -e icons/application/256x256/apps/keepassxc-locked.png
|
||||||
|
|
||||||
|
# SVGZ to PNGs for KeePassXC
|
||||||
|
COMMAND inkscape -z -w 16 -h 16
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/16x16/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 24 -h 24
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/24x24/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 32 -h 32
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/32x32/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 48 -h 48
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/48x48/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 64 -h 64
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/64x64/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 128 -h 128
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/128x128/apps/keepassxc-unlocked.png
|
||||||
|
COMMAND inkscape -z -w 256 -h 256
|
||||||
|
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/256x256/apps/keepassxc-unlocked.png
|
||||||
|
|
||||||
# SVGZ to PNGs for KeePassXC MIME-Type
|
# SVGZ to PNGs for KeePassXC MIME-Type
|
||||||
COMMAND inkscape -z -w 16 -h 16
|
COMMAND inkscape -z -w 16 -h 16
|
||||||
icons/application/scalable/mimetypes/application-x-keepassxc.svgz -e icons/application/16x16/mimetypes/application-x-keepassxc.png
|
icons/application/scalable/mimetypes/application-x-keepassxc.svgz -e icons/application/16x16/mimetypes/application-x-keepassxc.png
|
||||||
|
|||||||
BIN
share/icons/application/128x128/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
share/icons/application/16x16/actions/group-empty-trash.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/16x16/actions/message-close.png
Normal file
|
After Width: | Height: | Size: 457 B |
BIN
share/icons/application/16x16/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 880 B |
BIN
share/icons/application/22x22/actions/document-new.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
share/icons/application/22x22/actions/message-close.png
Normal file
|
After Width: | Height: | Size: 457 B |
BIN
share/icons/application/24x24/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
share/icons/application/256x256/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
share/icons/application/32x32/actions/document-edit.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
share/icons/application/32x32/actions/document-properties.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
share/icons/application/32x32/actions/key-enter.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/32x32/actions/view-history.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
share/icons/application/32x32/apps/internet-web-browser.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
share/icons/application/32x32/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
share/icons/application/32x32/apps/preferences-desktop-icons.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
share/icons/application/32x32/categories/preferences-other.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
share/icons/application/32x32/status/security-high.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
share/icons/application/48x48/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
share/icons/application/64x64/apps/keepassxc-unlocked.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
share/icons/application/scalable/apps/keepassxc-unlocked.svgz
Normal file
BIN
share/icons/svg/document-properties.svgz
Normal file
BIN
share/icons/svg/internet-web-browser.svgz
Normal file
BIN
share/icons/svg/key-enter.svgz
Normal file
65
share/icons/svg/message-close.svg
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
version="1.1"
|
||||||
|
id="svg6"
|
||||||
|
sodipodi:docname="tab-close.svg"
|
||||||
|
inkscape:version="0.92.1 r">
|
||||||
|
<metadata
|
||||||
|
id="metadata10">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="791"
|
||||||
|
inkscape:window-height="480"
|
||||||
|
id="namedview8"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="14.75"
|
||||||
|
inkscape:cx="8"
|
||||||
|
inkscape:cy="8"
|
||||||
|
inkscape:window-x="1301"
|
||||||
|
inkscape:window-y="443"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="svg6" />
|
||||||
|
<defs
|
||||||
|
id="defs3051">
|
||||||
|
<style
|
||||||
|
type="text/css"
|
||||||
|
id="current-color-scheme">
|
||||||
|
.ColorScheme-Text {
|
||||||
|
color:#f2f2f2;
|
||||||
|
}
|
||||||
|
.ColorScheme-NegativeText {
|
||||||
|
color:#da4453;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:none"
|
||||||
|
class="ColorScheme-NegativeText"
|
||||||
|
d="M 8,2 A 6,6 0 0 0 2,8 6,6 0 0 0 8,14 6,6 0 0 0 14,8 6,6 0 0 0 8,2 Z M 5.70703,5 8,7.29297 10.29297,5 11,5.70703 8.70703,8 11,10.29297 10.29297,11 8,8.70703 5.70703,11 5,10.29297 7.29297,8 5,5.70703 5.70703,5 Z"
|
||||||
|
id="path4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
BIN
share/icons/svg/preferences-desktop-icons.svgz
Normal file
BIN
share/icons/svg/preferences-other.svgz
Normal file
BIN
share/icons/svg/security-high.svgz
Normal file
BIN
share/icons/svg/view-history.svgz
Normal file
57
share/keepassxc.ini
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
[General]
|
||||||
|
ShowToolbar=true
|
||||||
|
RememberLastDatabases=true
|
||||||
|
RememberLastKeyFiles=true
|
||||||
|
OpenPreviousDatabasesOnStartup=true
|
||||||
|
AutoSaveAfterEveryChange=false
|
||||||
|
AutoSaveOnExit=false
|
||||||
|
AutoReloadOnChange=true
|
||||||
|
MinimizeOnCopy=false
|
||||||
|
UseGroupIconOnEntryCreation=true
|
||||||
|
IgnoreGroupExpansion=false
|
||||||
|
AutoTypeEntryTitleMatch=true
|
||||||
|
GlobalAutoTypeKey=0
|
||||||
|
GlobalAutoTypeModifiers=0
|
||||||
|
LastOpenedDatabases=@Invalid()
|
||||||
|
|
||||||
|
[GUI]
|
||||||
|
Language=system
|
||||||
|
ShowTrayIcon=false
|
||||||
|
MinimizeToTray=false
|
||||||
|
MinimizeOnClose=false
|
||||||
|
MinimizeOnStartup=false
|
||||||
|
MainWindowGeometry="@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x2(\0\0\0\xbd\0\0\x5W\0\0\x3;\0\0\x2\x30\0\0\0\xdc\0\0\x5O\0\0\x3\x33\0\0\0\0\0\0\0\0\a\x80)"
|
||||||
|
SplitterState=@Invalid()
|
||||||
|
EntryListColumnSizes=@Invalid()
|
||||||
|
EntrySearchColumnSizes=@Invalid()
|
||||||
|
|
||||||
|
[security]
|
||||||
|
autotypeask=true
|
||||||
|
clearclipboard=true
|
||||||
|
clearclipboardtimeout=10
|
||||||
|
lockdatabaseidle=false
|
||||||
|
lockdatabaseidlesec=240
|
||||||
|
lockdatabaseminimize=false
|
||||||
|
lockdatabasescreenlock=true
|
||||||
|
passwordscleartext=false
|
||||||
|
passwordsrepeat=false
|
||||||
|
|
||||||
|
[Http]
|
||||||
|
Enabled=false
|
||||||
|
ShowNotification=true
|
||||||
|
BestMatchOnly=false
|
||||||
|
UnlockDatabase=true
|
||||||
|
MatchUrlScheme=true
|
||||||
|
SortByUsername=false
|
||||||
|
Port=19455
|
||||||
|
AlwaysAllowAccess=false
|
||||||
|
AlwaysAllowUpdate=false
|
||||||
|
SearchInAllDatabases=false
|
||||||
|
SupportKphFields=true
|
||||||
|
generator\LowerCase=true
|
||||||
|
generator\UpperCase=true
|
||||||
|
generator\Numbers=true
|
||||||
|
generator\SpecialChars=false
|
||||||
|
generator\ExcludeAlike=true
|
||||||
|
generator\EnsureEvery=true
|
||||||
|
generator\Length=16
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>CFBundleAllowMixedLocalizations</key>
|
||||||
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>${KEEPASSXC_VERSION_NUM}</string>
|
<string>${KEEPASSXC_VERSION_NUM}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright 2016 KeePassXC Development Team</string>
|
<string>Copyright 2016-2017 KeePassXC Development Team</string>
|
||||||
<key>CFBundleDocumentTypes</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
2384
share/translations/keepassx_fi.ts
Normal file
2390
share/translations/keepassx_kk.ts
Normal file
@@ -14,4 +14,4 @@ tx push -s
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo Pulling translations from Transifex
|
echo Pulling translations from Transifex
|
||||||
tx pull -a --minimum-perc=80
|
tx pull -af --minimum-perc=40
|
||||||
|
|||||||
BIN
share/windows/installer-header.bmp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
share/windows/installer-wizard.bmp
Normal file
|
After Width: | Height: | Size: 151 KiB |
7776
share/wordlists/eff_large.wordlist
Normal file
@@ -1,17 +1,17 @@
|
|||||||
name: keepassxc
|
name: keepassxc
|
||||||
version: 2.1.0
|
version: 2.2.0
|
||||||
grade: stable
|
grade: stable
|
||||||
summary: community driven port of the windows application “Keepass Password Safe”
|
summary: community driven port of the windows application “Keepass Password Safe”
|
||||||
description: |
|
description: |
|
||||||
KeePassXC is an application for people with extremly high demands on secure
|
KeePassXC is an application for people with extremely high demands on secure
|
||||||
personal data management. It has a light interface, is cross platform and
|
personal data management. It has a light interface, is cross platform and
|
||||||
published under the terms of the GNU General Public License.
|
is published under the terms of the GNU General Public License.
|
||||||
confinement: strict
|
confinement: strict
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
keepassxc:
|
keepassxc:
|
||||||
command: desktop-launch keepassxc
|
command: desktop-launch keepassxc
|
||||||
plugs: [unity7, opengl, gsettings, home]
|
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media]
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
keepassxc:
|
keepassxc:
|
||||||
@@ -21,6 +21,8 @@ parts:
|
|||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
- -DWITH_TESTS=OFF
|
- -DWITH_TESTS=OFF
|
||||||
- -DWITH_XC_AUTOTYPE=ON
|
- -DWITH_XC_AUTOTYPE=ON
|
||||||
|
- -DWITH_XC_HTTP=ON
|
||||||
|
- -DWITH_XC_YUBIKEY=ON
|
||||||
build-packages:
|
build-packages:
|
||||||
- g++
|
- g++
|
||||||
- libgcrypt20-dev
|
- libgcrypt20-dev
|
||||||
@@ -29,4 +31,20 @@ parts:
|
|||||||
- qttools5-dev
|
- qttools5-dev
|
||||||
- qttools5-dev-tools
|
- qttools5-dev-tools
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
|
- libxi-dev
|
||||||
|
- libxtst-dev
|
||||||
|
- libyubikey-dev
|
||||||
|
- libykpers-1-dev
|
||||||
after: [desktop-qt5]
|
after: [desktop-qt5]
|
||||||
|
desktop-qt5:
|
||||||
|
# Redefine stage packages to work with Ubuntu 17.04
|
||||||
|
stage-packages:
|
||||||
|
- libxkbcommon0
|
||||||
|
- ttf-ubuntu-font-family
|
||||||
|
- dmz-cursor-theme
|
||||||
|
- light-themes
|
||||||
|
- shared-mime-info
|
||||||
|
- libqt5gui5
|
||||||
|
- libgdk-pixbuf2.0-0
|
||||||
|
- libqt5svg5 # for loading icon themes which are svg
|
||||||
|
- locales-all
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
||||||
|
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -31,6 +32,7 @@ configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
|
|||||||
set(keepassx_SOURCES
|
set(keepassx_SOURCES
|
||||||
core/AutoTypeAssociations.cpp
|
core/AutoTypeAssociations.cpp
|
||||||
core/Config.cpp
|
core/Config.cpp
|
||||||
|
core/CsvParser.cpp
|
||||||
core/Database.cpp
|
core/Database.cpp
|
||||||
core/DatabaseIcons.cpp
|
core/DatabaseIcons.cpp
|
||||||
core/Endian.cpp
|
core/Endian.cpp
|
||||||
@@ -45,13 +47,20 @@ set(keepassx_SOURCES
|
|||||||
core/ListDeleter.h
|
core/ListDeleter.h
|
||||||
core/Metadata.cpp
|
core/Metadata.cpp
|
||||||
core/PasswordGenerator.cpp
|
core/PasswordGenerator.cpp
|
||||||
|
core/PassphraseGenerator.cpp
|
||||||
core/SignalMultiplexer.cpp
|
core/SignalMultiplexer.cpp
|
||||||
|
core/ScreenLockListener.cpp
|
||||||
|
core/ScreenLockListener.h
|
||||||
|
core/ScreenLockListenerPrivate.h
|
||||||
|
core/ScreenLockListenerPrivate.cpp
|
||||||
core/TimeDelta.cpp
|
core/TimeDelta.cpp
|
||||||
core/TimeInfo.cpp
|
core/TimeInfo.cpp
|
||||||
core/ToDbExporter.cpp
|
core/ToDbExporter.cpp
|
||||||
core/Tools.cpp
|
core/Tools.cpp
|
||||||
core/Translator.cpp
|
core/Translator.cpp
|
||||||
core/Uuid.cpp
|
core/Uuid.cpp
|
||||||
|
cli/PasswordInput.cpp
|
||||||
|
cli/PasswordInput.h
|
||||||
crypto/Crypto.cpp
|
crypto/Crypto.cpp
|
||||||
crypto/CryptoHash.cpp
|
crypto/CryptoHash.cpp
|
||||||
crypto/Random.cpp
|
crypto/Random.cpp
|
||||||
@@ -70,8 +79,10 @@ set(keepassx_SOURCES
|
|||||||
format/KeePass2XmlWriter.cpp
|
format/KeePass2XmlWriter.cpp
|
||||||
gui/AboutDialog.cpp
|
gui/AboutDialog.cpp
|
||||||
gui/Application.cpp
|
gui/Application.cpp
|
||||||
|
gui/CategoryListWidget.cpp
|
||||||
gui/ChangeMasterKeyWidget.cpp
|
gui/ChangeMasterKeyWidget.cpp
|
||||||
gui/Clipboard.cpp
|
gui/Clipboard.cpp
|
||||||
|
gui/CloneDialog.cpp
|
||||||
gui/DatabaseOpenWidget.cpp
|
gui/DatabaseOpenWidget.cpp
|
||||||
gui/DatabaseRepairWidget.cpp
|
gui/DatabaseRepairWidget.cpp
|
||||||
gui/DatabaseSettingsWidget.cpp
|
gui/DatabaseSettingsWidget.cpp
|
||||||
@@ -86,18 +97,24 @@ set(keepassx_SOURCES
|
|||||||
gui/FileDialog.cpp
|
gui/FileDialog.cpp
|
||||||
gui/IconModels.cpp
|
gui/IconModels.cpp
|
||||||
gui/KeePass1OpenWidget.cpp
|
gui/KeePass1OpenWidget.cpp
|
||||||
|
gui/KMessageWidget.cpp
|
||||||
gui/LineEdit.cpp
|
gui/LineEdit.cpp
|
||||||
gui/MainWindow.cpp
|
gui/MainWindow.cpp
|
||||||
gui/MessageBox.cpp
|
gui/MessageBox.cpp
|
||||||
|
gui/MessageWidget.cpp
|
||||||
gui/PasswordEdit.cpp
|
gui/PasswordEdit.cpp
|
||||||
gui/PasswordGeneratorWidget.cpp
|
gui/PasswordGeneratorWidget.cpp
|
||||||
gui/PasswordComboBox.cpp
|
|
||||||
gui/SettingsWidget.cpp
|
gui/SettingsWidget.cpp
|
||||||
gui/SearchWidget.cpp
|
gui/SearchWidget.cpp
|
||||||
gui/SortFilterHideProxyModel.cpp
|
gui/SortFilterHideProxyModel.cpp
|
||||||
|
gui/SetupTotpDialog.cpp
|
||||||
|
gui/TotpDialog.cpp
|
||||||
gui/UnlockDatabaseWidget.cpp
|
gui/UnlockDatabaseWidget.cpp
|
||||||
gui/UnlockDatabaseDialog.cpp
|
gui/UnlockDatabaseDialog.cpp
|
||||||
gui/WelcomeWidget.cpp
|
gui/WelcomeWidget.cpp
|
||||||
|
gui/csvImport/CsvImportWidget.cpp
|
||||||
|
gui/csvImport/CsvImportWizard.cpp
|
||||||
|
gui/csvImport/CsvParserModel.cpp
|
||||||
gui/entry/AutoTypeAssociationsModel.cpp
|
gui/entry/AutoTypeAssociationsModel.cpp
|
||||||
gui/entry/EditEntryWidget.cpp
|
gui/entry/EditEntryWidget.cpp
|
||||||
gui/entry/EditEntryWidget_p.h
|
gui/entry/EditEntryWidget_p.h
|
||||||
@@ -111,65 +128,55 @@ set(keepassx_SOURCES
|
|||||||
gui/group/GroupView.cpp
|
gui/group/GroupView.cpp
|
||||||
keys/CompositeKey.cpp
|
keys/CompositeKey.cpp
|
||||||
keys/CompositeKey_p.h
|
keys/CompositeKey_p.h
|
||||||
|
keys/drivers/YubiKey.h
|
||||||
keys/FileKey.cpp
|
keys/FileKey.cpp
|
||||||
keys/Key.h
|
keys/Key.h
|
||||||
keys/PasswordKey.cpp
|
keys/PasswordKey.cpp
|
||||||
|
keys/YkChallengeResponseKey.cpp
|
||||||
streams/HashedBlockStream.cpp
|
streams/HashedBlockStream.cpp
|
||||||
streams/LayeredStream.cpp
|
streams/LayeredStream.cpp
|
||||||
streams/qtiocompressor.cpp
|
streams/qtiocompressor.cpp
|
||||||
streams/StoreDataStream.cpp
|
streams/StoreDataStream.cpp
|
||||||
streams/SymmetricCipherStream.cpp
|
streams/SymmetricCipherStream.cpp
|
||||||
|
totp/base32.h
|
||||||
|
totp/base32.cpp
|
||||||
|
totp/totp.h
|
||||||
|
totp/totp.cpp
|
||||||
)
|
)
|
||||||
|
if(APPLE)
|
||||||
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
||||||
|
core/ScreenLockListenerMac.h
|
||||||
|
core/ScreenLockListenerMac.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
||||||
|
core/ScreenLockListenerDBus.h
|
||||||
|
core/ScreenLockListenerDBus.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(MINGW)
|
||||||
|
set(keepassx_SOURCES ${keepassx_SOURCES}
|
||||||
|
core/ScreenLockListenerWin.h
|
||||||
|
core/ScreenLockListenerWin.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(keepassx_SOURCES_MAINEXE
|
set(keepassx_SOURCES_MAINEXE
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(keepassx_FORMS
|
add_feature_info(AutoType WITH_XC_AUTOTYPE "Automatic password typing")
|
||||||
gui/AboutDialog.ui
|
add_feature_info(KeePassHTTP WITH_XC_HTTP "Browser integration compatible with ChromeIPass and PassIFox")
|
||||||
gui/ChangeMasterKeyWidget.ui
|
add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")
|
||||||
gui/DatabaseOpenWidget.ui
|
|
||||||
gui/DatabaseSettingsWidget.ui
|
|
||||||
gui/EditWidget.ui
|
|
||||||
gui/EditWidgetIcons.ui
|
|
||||||
gui/EditWidgetProperties.ui
|
|
||||||
gui/MainWindow.ui
|
|
||||||
gui/PasswordGeneratorWidget.ui
|
|
||||||
gui/SearchWidget.ui
|
|
||||||
gui/SettingsWidgetGeneral.ui
|
|
||||||
gui/SettingsWidgetSecurity.ui
|
|
||||||
gui/WelcomeWidget.ui
|
|
||||||
gui/entry/EditEntryWidgetAdvanced.ui
|
|
||||||
gui/entry/EditEntryWidgetAutoType.ui
|
|
||||||
gui/entry/EditEntryWidgetHistory.ui
|
|
||||||
gui/entry/EditEntryWidgetMain.ui
|
|
||||||
gui/group/EditGroupWidgetMain.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
add_feature_info(KeePassHTTP WITH_XC_HTTP "KeePassHTTP support for ChromeIPass and PassIFox")
|
|
||||||
add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields")
|
|
||||||
|
|
||||||
|
add_subdirectory(http)
|
||||||
if(WITH_XC_HTTP)
|
if(WITH_XC_HTTP)
|
||||||
set(keepasshttp_SOURCES
|
set(keepasshttp_LIB keepasshttp qhttp Qt5::Network)
|
||||||
http/AccessControlDialog.cpp
|
|
||||||
http/EntryConfig.cpp
|
|
||||||
http/HttpPasswordGeneratorWidget.cpp
|
|
||||||
http/HttpSettings.cpp
|
|
||||||
http/OptionDialog.cpp
|
|
||||||
http/Protocol.cpp
|
|
||||||
http/Server.cpp
|
|
||||||
http/Service.cpp
|
|
||||||
)
|
|
||||||
set(keepasshttp_FORMS
|
|
||||||
http/AccessControlDialog.ui
|
|
||||||
http/HttpPasswordGeneratorWidget.ui
|
|
||||||
http/OptionDialog.ui
|
|
||||||
)
|
|
||||||
set(keepasshttp_LIB keepasshttp)
|
|
||||||
qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(autotype)
|
add_subdirectory(autotype)
|
||||||
|
add_subdirectory(cli)
|
||||||
|
|
||||||
set(autotype_SOURCES
|
set(autotype_SOURCES
|
||||||
core/Tools.cpp
|
core/Tools.cpp
|
||||||
@@ -190,41 +197,67 @@ if(MINGW)
|
|||||||
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt5_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
if(WITH_XC_YUBIKEY)
|
||||||
|
list(APPEND keepassx_SOURCES keys/drivers/YubiKey.cpp)
|
||||||
|
else()
|
||||||
|
list(APPEND keepassx_SOURCES keys/drivers/YubiKeyStub.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
|
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
|
||||||
target_link_libraries(zxcvbn)
|
target_link_libraries(zxcvbn)
|
||||||
|
|
||||||
if(WITH_XC_HTTP)
|
|
||||||
add_library(keepasshttp STATIC ${keepasshttp_SOURCES})
|
|
||||||
target_link_libraries(keepasshttp ${MHD_LIBRARIES} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(autotype STATIC ${autotype_SOURCES})
|
add_library(autotype STATIC ${autotype_SOURCES})
|
||||||
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
|
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
|
||||||
|
|
||||||
set(autotype_LIB autotype)
|
set(autotype_LIB autotype)
|
||||||
|
|
||||||
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
||||||
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
|
||||||
target_link_libraries(keepassx_core zxcvbn ${keepasshttp_LIB} ${autotype_LIB} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
|
||||||
|
|
||||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
||||||
target_link_libraries(${PROGNAME}
|
target_link_libraries(keepassx_core
|
||||||
keepassx_core
|
${keepasshttp_LIB}
|
||||||
|
${autotype_LIB}
|
||||||
|
${YUBIKEY_LIBRARIES}
|
||||||
zxcvbn
|
zxcvbn
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
|
Qt5::Network
|
||||||
Qt5::Concurrent
|
Qt5::Concurrent
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::Network
|
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
|
${GPGERROR_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES})
|
${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
target_link_libraries(keepassx_core "-framework Foundation")
|
||||||
|
endif()
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
target_link_libraries(keepassx_core Qt5::DBus)
|
||||||
|
endif()
|
||||||
|
if(MINGW)
|
||||||
|
target_link_libraries(keepassx_core Wtsapi32.lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MINGW)
|
||||||
|
include(GenerateProductVersion)
|
||||||
|
generate_product_version(
|
||||||
|
WIN32_ProductVersionFiles
|
||||||
|
NAME "KeePassXC"
|
||||||
|
COMPANY_NAME "KeePassXC Team"
|
||||||
|
VERSION_MAJOR ${KEEPASSXC_VERSION_MAJOR}
|
||||||
|
VERSION_MINOR ${KEEPASSXC_VERSION_MINOR}
|
||||||
|
VERSION_PATCH ${KEEPASSXC_VERSION_PATCH}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(${PROGNAME} WIN32 ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles})
|
||||||
|
target_link_libraries(${PROGNAME} keepassx_core)
|
||||||
|
|
||||||
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE AND WITH_APP_BUNDLE)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||||
set_target_properties(${PROGNAME} PROPERTIES
|
set_target_properties(${PROGNAME} PROPERTIES
|
||||||
|
MACOSX_BUNDLE ON
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -232,7 +265,7 @@ install(TARGETS ${PROGNAME}
|
|||||||
BUNDLE DESTINATION . COMPONENT Runtime
|
BUNDLE DESTINATION . COMPONENT Runtime
|
||||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
|
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE AND WITH_APP_BUNDLE)
|
||||||
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
|
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
|
||||||
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
|
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
|
||||||
DESTINATION "${DATA_INSTALL_DIR}")
|
DESTINATION "${DATA_INSTALL_DIR}")
|
||||||
@@ -243,7 +276,7 @@ if(APPLE)
|
|||||||
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
|
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
|
||||||
set(CPACK_SYSTEM_NAME "OSX")
|
set(CPACK_SYSTEM_NAME "OSX")
|
||||||
set(CPACK_STRIP_FILES ON)
|
set(CPACK_STRIP_FILES ON)
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION_NUM}")
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
if(NOT DEFINED QT_BINARY_DIR)
|
if(NOT DEFINED QT_BINARY_DIR)
|
||||||
@@ -257,9 +290,32 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(CPACK_GENERATOR "ZIP")
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL "8")
|
||||||
|
set(OUTPUT_FILE_POSTFIX "Win64")
|
||||||
|
else()
|
||||||
|
set(OUTPUT_FILE_POSTFIX "Win32")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR "ZIP;NSIS")
|
||||||
set(CPACK_STRIP_FILES ON)
|
set(CPACK_STRIP_FILES ON)
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION_NUM}")
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
||||||
|
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION})
|
||||||
|
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
||||||
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
||||||
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.GPL-2")
|
||||||
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||||
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
||||||
|
set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
|
||||||
|
set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\${PROGNAME}.exe")
|
||||||
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}/share/windows/installer-wizard.bmp")
|
||||||
|
set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP}")
|
||||||
|
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROGNAME}.lnk' '$INSTDIR\\\\${PROGNAME}.exe'")
|
||||||
|
set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$START_MENU\\\\${PROGNAME}.lnk'")
|
||||||
|
set(CPACK_NSIS_URL_INFO_ABOUT "https://keepassxc.org")
|
||||||
|
set(CPACK_NSIS_DISPLAY_NAME ${PROGNAME})
|
||||||
|
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
|
||||||
|
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
@@ -267,5 +323,9 @@ if(MINGW)
|
|||||||
" COMPONENT Runtime)
|
" COMPONENT Runtime)
|
||||||
|
|
||||||
include(DeployQt4)
|
include(DeployQt4)
|
||||||
install_qt4_executable(${PROGNAME}.exe "qjpeg;qgif;qico;qtaccessiblewidgets")
|
install_qt4_executable(${PROGNAME}.exe)
|
||||||
|
add_custom_command(TARGET ${PROGNAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Qt5Core_DIR}/../../../share/qt5/plugins/platforms/qwindows$<$<CONFIG:Debug>:d>.dll
|
||||||
|
$<TARGET_FILE_DIR:${PROGNAME}>)
|
||||||
|
install(FILES $<TARGET_FILE_DIR:${PROGNAME}>/qwindows$<$<CONFIG:Debug>:d>.dll DESTINATION "platforms")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -142,6 +143,9 @@ void AutoType::performAutoType(const Entry* entry, QWidget* hideWindow, const QS
|
|||||||
sequence = customSequence;
|
sequence = customSequence;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sequence.replace("{{}", "{LEFTBRACE}");
|
||||||
|
sequence.replace("{}}", "{RIGHTBRACE}");
|
||||||
|
|
||||||
QList<AutoTypeAction*> actions;
|
QList<AutoTypeAction*> actions;
|
||||||
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
||||||
|
|
||||||
@@ -317,8 +321,6 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
|||||||
|
|
||||||
|
|
||||||
for (const QChar& ch : sequence) {
|
for (const QChar& ch : sequence) {
|
||||||
// TODO: implement support for {{}, {}}
|
|
||||||
|
|
||||||
if (inTmpl) {
|
if (inTmpl) {
|
||||||
if (ch == '{') {
|
if (ch == '{') {
|
||||||
qWarning("Syntax error in auto-type sequence.");
|
qWarning("Syntax error in auto-type sequence.");
|
||||||
@@ -396,6 +398,9 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
|
|||||||
else if (tmplName.compare("enter",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("enter",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeKey(Qt::Key_Enter));
|
list.append(new AutoTypeKey(Qt::Key_Enter));
|
||||||
}
|
}
|
||||||
|
else if (tmplName.compare("space",Qt::CaseInsensitive)==0) {
|
||||||
|
list.append(new AutoTypeKey(Qt::Key_Space));
|
||||||
|
}
|
||||||
else if (tmplName.compare("up",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("up",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeKey(Qt::Key_Up));
|
list.append(new AutoTypeKey(Qt::Key_Up));
|
||||||
}
|
}
|
||||||
@@ -483,10 +488,10 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
|
|||||||
else if (tmplName.compare(")",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare(")",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar(')'));
|
list.append(new AutoTypeChar(')'));
|
||||||
}
|
}
|
||||||
else if (tmplName.compare("{",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("leftbrace",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar('{'));
|
list.append(new AutoTypeChar('{'));
|
||||||
}
|
}
|
||||||
else if (tmplName.compare("}",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("rightbrace",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeChar('}'));
|
list.append(new AutoTypeChar('}'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -514,6 +519,14 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
|
|||||||
else if (tmplName.compare("clearfield",Qt::CaseInsensitive)==0) {
|
else if (tmplName.compare("clearfield",Qt::CaseInsensitive)==0) {
|
||||||
list.append(new AutoTypeClearField());
|
list.append(new AutoTypeClearField());
|
||||||
}
|
}
|
||||||
|
else if (tmplName.compare("totp", Qt::CaseInsensitive) == 0) {
|
||||||
|
QString totp = entry->totp();
|
||||||
|
if (!totp.isEmpty()) {
|
||||||
|
for (const QChar& ch : totp) {
|
||||||
|
list.append(new AutoTypeChar(ch));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
return list;
|
return list;
|
||||||
@@ -562,8 +575,9 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool() && !entry->title().isEmpty()
|
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool()
|
||||||
&& windowTitle.contains(entry->title(), Qt::CaseInsensitive)) {
|
&& (windowMatchesTitle(windowTitle, entry->resolvePlaceholder(entry->title()))
|
||||||
|
|| windowMatchesUrl(windowTitle, entry->resolvePlaceholder(entry->url())))) {
|
||||||
sequence = entry->defaultAutoTypeSequence();
|
sequence = entry->defaultAutoTypeSequence();
|
||||||
match = true;
|
match = true;
|
||||||
}
|
}
|
||||||
@@ -594,11 +608,11 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
|
|||||||
group = group->parentGroup();
|
group = group->parentGroup();
|
||||||
} while (group && (!enableSet || sequence.isEmpty()));
|
} while (group && (!enableSet || sequence.isEmpty()));
|
||||||
|
|
||||||
if (sequence.isEmpty() && (!entry->username().isEmpty() || !entry->password().isEmpty())) {
|
if (sequence.isEmpty() && (!entry->resolvePlaceholder(entry->username()).isEmpty() || !entry->resolvePlaceholder(entry->password()).isEmpty())) {
|
||||||
if (entry->username().isEmpty()) {
|
if (entry->resolvePlaceholder(entry->username()).isEmpty()) {
|
||||||
sequence = "{PASSWORD}{ENTER}";
|
sequence = "{PASSWORD}{ENTER}";
|
||||||
}
|
}
|
||||||
else if (entry->password().isEmpty()) {
|
else if (entry->resolvePlaceholder(entry->password()).isEmpty()) {
|
||||||
sequence = "{USERNAME}{ENTER}";
|
sequence = "{USERNAME}{ENTER}";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -619,3 +633,22 @@ bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPa
|
|||||||
return WildcardMatcher(windowTitle).match(windowPattern);
|
return WildcardMatcher(windowTitle).match(windowPattern);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AutoType::windowMatchesTitle(const QString& windowTitle, const QString& resolvedTitle)
|
||||||
|
{
|
||||||
|
return !resolvedTitle.isEmpty() && windowTitle.contains(resolvedTitle, Qt::CaseInsensitive);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AutoType::windowMatchesUrl(const QString& windowTitle, const QString& resolvedUrl)
|
||||||
|
{
|
||||||
|
if (!resolvedUrl.isEmpty() && windowTitle.contains(resolvedUrl, Qt::CaseInsensitive)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QUrl url(resolvedUrl);
|
||||||
|
if (url.isValid() && !url.host().isEmpty()) {
|
||||||
|
return windowTitle.contains(url.host(), Qt::CaseInsensitive);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,13 +49,13 @@ public:
|
|||||||
static AutoType* instance();
|
static AutoType* instance();
|
||||||
static void createTestInstance();
|
static void createTestInstance();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public slots:
|
||||||
void performGlobalAutoType(const QList<Database*>& dbList);
|
void performGlobalAutoType(const QList<Database*>& dbList);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void globalShortcutTriggered();
|
void globalShortcutTriggered();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private slots:
|
||||||
void performAutoTypeFromGlobal(Entry* entry, const QString& sequence);
|
void performAutoTypeFromGlobal(Entry* entry, const QString& sequence);
|
||||||
void resetInAutoType();
|
void resetInAutoType();
|
||||||
void unloadPlugin();
|
void unloadPlugin();
|
||||||
@@ -66,6 +67,8 @@ private:
|
|||||||
bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions);
|
bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions);
|
||||||
QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry);
|
QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry);
|
||||||
QString autoTypeSequence(const Entry* entry, const QString& windowTitle = QString());
|
QString autoTypeSequence(const Entry* entry, const QString& windowTitle = QString());
|
||||||
|
bool windowMatchesTitle(const QString& windowTitle, const QString& resolvedTitle);
|
||||||
|
bool windowMatchesUrl(const QString& windowTitle, const QString& resolvedUrl);
|
||||||
bool windowMatches(const QString& windowTitle, const QString& windowPattern);
|
bool windowMatches(const QString& windowTitle, const QString& windowPattern);
|
||||||
|
|
||||||
bool m_inAutoType;
|
bool m_inAutoType;
|
||||||
|
|||||||
@@ -90,6 +90,4 @@ void AutoTypeExecutor::execDelay(AutoTypeDelay* action)
|
|||||||
void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
|
void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
|
||||||
{
|
{
|
||||||
Q_UNUSED(action);
|
Q_UNUSED(action);
|
||||||
|
|
||||||
// TODO: implement
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void AutoTypeSelectDialog::emitEntryActivated(const QModelIndex& index)
|
|||||||
|
|
||||||
Entry* entry = m_view->entryFromIndex(index);
|
Entry* entry = m_view->entryFromIndex(index);
|
||||||
accept();
|
accept();
|
||||||
Q_EMIT entryActivated(entry, m_sequences[entry]);
|
emit entryActivated(entry, m_sequences[entry]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeSelectDialog::entryRemoved()
|
void AutoTypeSelectDialog::entryRemoved()
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ public:
|
|||||||
explicit AutoTypeSelectDialog(QWidget* parent = nullptr);
|
explicit AutoTypeSelectDialog(QWidget* parent = nullptr);
|
||||||
void setEntries(const QList<Entry*>& entries, const QHash<Entry*, QString>& sequences);
|
void setEntries(const QList<Entry*>& entries, const QHash<Entry*, QString>& sequences);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void entryActivated(Entry* entry, const QString& sequence);
|
void entryActivated(Entry* entry, const QString& sequence);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public slots:
|
||||||
void done(int r) override;
|
void done(int r) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private slots:
|
||||||
void emitEntryActivated(const QModelIndex& index);
|
void emitEntryActivated(const QModelIndex& index);
|
||||||
void entryRemoved();
|
void entryRemoved();
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void mouseMoveEvent(QMouseEvent* event) override;
|
void mouseMoveEvent(QMouseEvent* event) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private slots:
|
||||||
void selectFirstEntry();
|
void selectFirstEntry();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -98,7 +99,9 @@ QString AutoTypePlatformMac::activeWindowTitle()
|
|||||||
if (windowLayer(window) == 0) {
|
if (windowLayer(window) == 0) {
|
||||||
// First toplevel window in list (front to back order)
|
// First toplevel window in list (front to back order)
|
||||||
title = windowTitle(window);
|
title = windowTitle(window);
|
||||||
break;
|
if (!title.isEmpty()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +121,7 @@ bool AutoTypePlatformMac::registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifi
|
|||||||
qWarning("Invalid key code");
|
qWarning("Invalid key code");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint16 nativeModifiers = qtToNativeModifiers(modifiers);
|
CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, false);
|
||||||
if (::RegisterEventHotKey(nativeKeyCode, nativeModifiers, m_hotkeyId, GetApplicationEventTarget(), 0, &m_hotkeyRef) != noErr) {
|
if (::RegisterEventHotKey(nativeKeyCode, nativeModifiers, m_hotkeyId, GetApplicationEventTarget(), 0, &m_hotkeyRef) != noErr) {
|
||||||
qWarning("Register hotkey failed");
|
qWarning("Register hotkey failed");
|
||||||
return false;
|
return false;
|
||||||
@@ -199,7 +202,7 @@ void AutoTypePlatformMac::sendChar(const QChar& ch, bool isKeyDown)
|
|||||||
// Send key code to active window
|
// Send key code to active window
|
||||||
// see: Quartz Event Services
|
// see: Quartz Event Services
|
||||||
//
|
//
|
||||||
void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown)
|
void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers = 0)
|
||||||
{
|
{
|
||||||
uint16 keyCode = qtToNativeKeyCode(key);
|
uint16 keyCode = qtToNativeKeyCode(key);
|
||||||
if (keyCode == INVALID_KEYCODE) {
|
if (keyCode == INVALID_KEYCODE) {
|
||||||
@@ -207,7 +210,9 @@ void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CGEventRef keyEvent = ::CGEventCreateKeyboardEvent(nullptr, keyCode, isKeyDown);
|
CGEventRef keyEvent = ::CGEventCreateKeyboardEvent(nullptr, keyCode, isKeyDown);
|
||||||
|
CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, true);
|
||||||
if (keyEvent != nullptr) {
|
if (keyEvent != nullptr) {
|
||||||
|
::CGEventSetFlags(keyEvent, nativeModifiers);
|
||||||
::CGEventPost(kCGSessionEventTap, keyEvent);
|
::CGEventPost(kCGSessionEventTap, keyEvent);
|
||||||
::CFRelease(keyEvent);
|
::CFRelease(keyEvent);
|
||||||
}
|
}
|
||||||
@@ -315,6 +320,10 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
|
|||||||
case Qt::Key_Period:
|
case Qt::Key_Period:
|
||||||
return kVK_ANSI_Period;
|
return kVK_ANSI_Period;
|
||||||
|
|
||||||
|
case Qt::Key_Shift:
|
||||||
|
return kVK_Shift;
|
||||||
|
case Qt::Key_Control:
|
||||||
|
return kVK_Command;
|
||||||
case Qt::Key_Backspace:
|
case Qt::Key_Backspace:
|
||||||
return kVK_Delete;
|
return kVK_Delete;
|
||||||
case Qt::Key_Tab:
|
case Qt::Key_Tab:
|
||||||
@@ -393,21 +402,34 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
|
|||||||
// Translate qt key modifiers to mac os modifiers
|
// Translate qt key modifiers to mac os modifiers
|
||||||
// see: https://doc.qt.io/qt-5/osx-issues.html#special-keys
|
// see: https://doc.qt.io/qt-5/osx-issues.html#special-keys
|
||||||
//
|
//
|
||||||
uint16 AutoTypePlatformMac::qtToNativeModifiers(Qt::KeyboardModifiers modifiers)
|
CGEventFlags AutoTypePlatformMac::qtToNativeModifiers(Qt::KeyboardModifiers modifiers, bool native)
|
||||||
{
|
{
|
||||||
uint16 nativeModifiers = 0;
|
CGEventFlags nativeModifiers = CGEventFlags(0);
|
||||||
|
|
||||||
|
CGEventFlags shiftMod = CGEventFlags(shiftKey);
|
||||||
|
CGEventFlags cmdMod = CGEventFlags(cmdKey);
|
||||||
|
CGEventFlags optionMod = CGEventFlags(optionKey);
|
||||||
|
CGEventFlags controlMod = CGEventFlags(controlKey);
|
||||||
|
|
||||||
|
if (native) {
|
||||||
|
shiftMod = kCGEventFlagMaskShift;
|
||||||
|
cmdMod = kCGEventFlagMaskCommand;
|
||||||
|
optionMod = kCGEventFlagMaskAlternate;
|
||||||
|
controlMod = kCGEventFlagMaskControl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (modifiers & Qt::ShiftModifier) {
|
if (modifiers & Qt::ShiftModifier) {
|
||||||
nativeModifiers |= shiftKey;
|
nativeModifiers = CGEventFlags(nativeModifiers | shiftMod);
|
||||||
}
|
}
|
||||||
if (modifiers & Qt::ControlModifier) {
|
if (modifiers & Qt::ControlModifier) {
|
||||||
nativeModifiers |= cmdKey;
|
nativeModifiers = CGEventFlags(nativeModifiers | cmdMod);
|
||||||
}
|
}
|
||||||
if (modifiers & Qt::AltModifier) {
|
if (modifiers & Qt::AltModifier) {
|
||||||
nativeModifiers |= optionKey;
|
nativeModifiers = CGEventFlags(nativeModifiers | optionMod);
|
||||||
}
|
}
|
||||||
if (modifiers & Qt::MetaModifier) {
|
if (modifiers & Qt::MetaModifier) {
|
||||||
nativeModifiers |= controlKey;
|
nativeModifiers = CGEventFlags(nativeModifiers | controlMod);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nativeModifiers;
|
return nativeModifiers;
|
||||||
@@ -458,7 +480,7 @@ OSStatus AutoTypePlatformMac::hotkeyHandler(EventHandlerCallRef nextHandler, Eve
|
|||||||
|
|
||||||
if (::GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, nullptr, sizeof(hotkeyId), nullptr, &hotkeyId) == noErr
|
if (::GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, nullptr, sizeof(hotkeyId), nullptr, &hotkeyId) == noErr
|
||||||
&& hotkeyId.id == HOTKEY_ID) {
|
&& hotkeyId.id == HOTKEY_ID) {
|
||||||
Q_EMIT self->globalShortcutTriggered();
|
emit self->globalShortcutTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
return noErr;
|
return noErr;
|
||||||
@@ -486,3 +508,25 @@ void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
|
|||||||
m_platform->sendKey(action->key, false);
|
m_platform->sendKey(action->key, false);
|
||||||
usleep(25 * 1000);
|
usleep(25 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
|
||||||
|
m_platform->sendKey(Qt::Key_Control, true, Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Up, true, Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Up, false, Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, false);
|
||||||
|
usleep(25 * 1000);
|
||||||
|
m_platform->sendKey(Qt::Key_Shift, true, Qt::ShiftModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, true, Qt::ShiftModifier | Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Down, true, Qt::ShiftModifier | Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Down, false, Qt::ShiftModifier | Qt::ControlModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, false, Qt::ShiftModifier);
|
||||||
|
m_platform->sendKey(Qt::Key_Shift, false);
|
||||||
|
usleep(25 * 1000);
|
||||||
|
m_platform->sendKey(Qt::Key_Backspace, true);
|
||||||
|
m_platform->sendKey(Qt::Key_Backspace, false);
|
||||||
|
|
||||||
|
usleep(25 * 1000);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -49,9 +50,9 @@ public:
|
|||||||
bool raiseOwnWindow() override;
|
bool raiseOwnWindow() override;
|
||||||
|
|
||||||
void sendChar(const QChar& ch, bool isKeyDown);
|
void sendChar(const QChar& ch, bool isKeyDown);
|
||||||
void sendKey(Qt::Key key, bool isKeyDown);
|
void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void globalShortcutTriggered();
|
void globalShortcutTriggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -60,7 +61,7 @@ private:
|
|||||||
EventHotKeyID m_hotkeyId;
|
EventHotKeyID m_hotkeyId;
|
||||||
|
|
||||||
static uint16 qtToNativeKeyCode(Qt::Key key);
|
static uint16 qtToNativeKeyCode(Qt::Key key);
|
||||||
static uint16 qtToNativeModifiers(Qt::KeyboardModifiers modifiers);
|
static CGEventFlags qtToNativeModifiers(Qt::KeyboardModifiers modifiers, bool native);
|
||||||
static int windowLayer(CFDictionaryRef window);
|
static int windowLayer(CFDictionaryRef window);
|
||||||
static QString windowTitle(CFDictionaryRef window);
|
static QString windowTitle(CFDictionaryRef window);
|
||||||
static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData);
|
static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData);
|
||||||
@@ -73,6 +74,7 @@ public:
|
|||||||
|
|
||||||
void execChar(AutoTypeChar* action) override;
|
void execChar(AutoTypeChar* action) override;
|
||||||
void execKey(AutoTypeKey* action) override;
|
void execKey(AutoTypeKey* action) override;
|
||||||
|
void execClearField(AutoTypeClearField* action) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AutoTypePlatformMac* const m_platform;
|
AutoTypePlatformMac* const m_platform;
|
||||||
|
|||||||
@@ -12,9 +12,15 @@ target_link_libraries(keepassx-autotype-cocoa ${PROGNAME} Qt5::Core Qt5::Widgets
|
|||||||
if(NOT DEFINED QT_BINARY_DIR)
|
if(NOT DEFINED QT_BINARY_DIR)
|
||||||
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
|
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
|
||||||
endif()
|
endif()
|
||||||
add_custom_command(TARGET keepassx-autotype-cocoa
|
if(WITH_APP_BUNDLE)
|
||||||
POST_BUILD
|
add_custom_command(TARGET keepassx-autotype-cocoa
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
|
POST_BUILD
|
||||||
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
|
||||||
COMMENT "Deploying autotype plugin")
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
||||||
|
COMMENT "Deploying autotype plugin")
|
||||||
|
else()
|
||||||
|
install(TARGETS keepassx-autotype-cocoa
|
||||||
|
BUNDLE DESTINATION . COMPONENT Runtime
|
||||||
|
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
void addActionChar(AutoTypeChar* action);
|
void addActionChar(AutoTypeChar* action);
|
||||||
void addActionKey(AutoTypeKey* action);
|
void addActionKey(AutoTypeKey* action);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void globalShortcutTriggered();
|
void globalShortcutTriggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -96,7 +97,7 @@ int AutoTypePlatformWin::platformEventFilter(void* event)
|
|||||||
MSG *msg = static_cast<MSG *>(event);
|
MSG *msg = static_cast<MSG *>(event);
|
||||||
|
|
||||||
if (msg->message == WM_HOTKEY && msg->wParam == HOTKEY_ID) {
|
if (msg->message == WM_HOTKEY && msg->wParam == HOTKEY_ID) {
|
||||||
Q_EMIT globalShortcutTriggered();
|
emit globalShortcutTriggered();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +190,10 @@ DWORD AutoTypePlatformWin::qtToNativeKeyCode(Qt::Key key)
|
|||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
return VK_RETURN; // 0x0D
|
return VK_RETURN; // 0x0D
|
||||||
|
case Qt::Key_Shift:
|
||||||
|
return VK_SHIFT; // 0x10
|
||||||
|
case Qt::Key_Control:
|
||||||
|
return VK_CONTROL; // 0x11
|
||||||
case Qt::Key_Pause:
|
case Qt::Key_Pause:
|
||||||
return VK_PAUSE; // 0x13
|
return VK_PAUSE; // 0x13
|
||||||
case Qt::Key_CapsLock:
|
case Qt::Key_CapsLock:
|
||||||
@@ -527,3 +532,24 @@ void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
|
|||||||
::Sleep(25);
|
::Sleep(25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
|
||||||
|
m_platform->sendKey(Qt::Key_Control, true);
|
||||||
|
m_platform->sendKey(Qt::Key_Home, true);
|
||||||
|
m_platform->sendKey(Qt::Key_Home, false);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, false);
|
||||||
|
::Sleep(25);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, true);
|
||||||
|
m_platform->sendKey(Qt::Key_Shift, true);
|
||||||
|
m_platform->sendKey(Qt::Key_End, true);
|
||||||
|
m_platform->sendKey(Qt::Key_End, false);
|
||||||
|
m_platform->sendKey(Qt::Key_Shift, false);
|
||||||
|
m_platform->sendKey(Qt::Key_Control, false);
|
||||||
|
::Sleep(25);
|
||||||
|
m_platform->sendKey(Qt::Key_Backspace, true);
|
||||||
|
m_platform->sendKey(Qt::Key_Backspace, false);
|
||||||
|
|
||||||
|
::Sleep(25);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -45,7 +46,7 @@ public:
|
|||||||
void sendChar(const QChar& ch, bool isKeyDown);
|
void sendChar(const QChar& ch, bool isKeyDown);
|
||||||
void sendKey(Qt::Key key, bool isKeyDown);
|
void sendKey(Qt::Key key, bool isKeyDown);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void globalShortcutTriggered();
|
void globalShortcutTriggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -64,6 +65,7 @@ public:
|
|||||||
|
|
||||||
void execChar(AutoTypeChar* action) override;
|
void execChar(AutoTypeChar* action) override;
|
||||||
void execKey(AutoTypeKey* action) override;
|
void execKey(AutoTypeKey* action) override;
|
||||||
|
void execClearField(AutoTypeClearField* action) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AutoTypePlatformWin* const m_platform;
|
AutoTypePlatformWin* const m_platform;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||||
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
|
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -214,7 +215,7 @@ int AutoTypePlatformX11::platformEventFilter(void* event)
|
|||||||
&& (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized())
|
&& (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized())
|
||||||
&& m_loaded) {
|
&& m_loaded) {
|
||||||
if (type == XCB_KEY_PRESS) {
|
if (type == XCB_KEY_PRESS) {
|
||||||
Q_EMIT globalShortcutTriggered();
|
emit globalShortcutTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -435,6 +436,8 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
|
|||||||
return XK_Tab;
|
return XK_Tab;
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
return XK_Return;
|
return XK_Return;
|
||||||
|
case Qt::Key_Space:
|
||||||
|
return XK_space;
|
||||||
case Qt::Key_Up:
|
case Qt::Key_Up:
|
||||||
return XK_Up;
|
return XK_Up;
|
||||||
case Qt::Key_Down:
|
case Qt::Key_Down:
|
||||||
@@ -471,6 +474,12 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
|
|||||||
return XK_Print;
|
return XK_Print;
|
||||||
case Qt::Key_ScrollLock:
|
case Qt::Key_ScrollLock:
|
||||||
return XK_Scroll_Lock;
|
return XK_Scroll_Lock;
|
||||||
|
case Qt::Key_Shift:
|
||||||
|
return XK_Shift_L;
|
||||||
|
case Qt::Key_Control:
|
||||||
|
return XK_Control_L;
|
||||||
|
case Qt::Key_Alt:
|
||||||
|
return XK_Alt_L;
|
||||||
default:
|
default:
|
||||||
if (key >= Qt::Key_F1 && key <= Qt::Key_F16) {
|
if (key >= Qt::Key_F1 && key <= Qt::Key_F16) {
|
||||||
return XK_F1 + (key - Qt::Key_F1);
|
return XK_F1 + (key - Qt::Key_F1);
|
||||||
@@ -721,6 +730,12 @@ bool AutoTypePlatformX11::keysymModifiers(KeySym keysym, int keycode, unsigned i
|
|||||||
* are set ON, many events will be sent.
|
* are set ON, many events will be sent.
|
||||||
*/
|
*/
|
||||||
void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
||||||
|
{
|
||||||
|
SendKey(keysym,true);
|
||||||
|
SendKey(keysym,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
|
||||||
{
|
{
|
||||||
Window cur_focus;
|
Window cur_focus;
|
||||||
int revert_to;
|
int revert_to;
|
||||||
@@ -800,8 +815,11 @@ void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
|||||||
|
|
||||||
/* press and release key */
|
/* press and release key */
|
||||||
event.keycode = keycode;
|
event.keycode = keycode;
|
||||||
SendEvent(&event, KeyPress);
|
if (isKeyDown) {
|
||||||
SendEvent(&event, KeyRelease);
|
SendEvent(&event, KeyPress);
|
||||||
|
} else {
|
||||||
|
SendEvent(&event, KeyRelease);
|
||||||
|
}
|
||||||
|
|
||||||
/* release the modifiers */
|
/* release the modifiers */
|
||||||
SendModifier(&event, press_mask, KeyRelease);
|
SendModifier(&event, press_mask, KeyRelease);
|
||||||
@@ -831,13 +849,40 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform)
|
|||||||
void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
|
void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
|
||||||
{
|
{
|
||||||
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
|
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
|
||||||
|
Tools::wait(25);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
|
void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
|
||||||
{
|
{
|
||||||
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
|
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
|
||||||
|
Tools::wait(25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
|
||||||
|
timespec ts;
|
||||||
|
ts.tv_sec = 0;
|
||||||
|
ts.tv_nsec = 25 * 1000 * 1000;
|
||||||
|
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true);
|
||||||
|
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Home));
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
|
||||||
|
nanosleep(&ts, nullptr);
|
||||||
|
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true);
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), true);
|
||||||
|
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_End));
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), false);
|
||||||
|
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
|
||||||
|
nanosleep(&ts, nullptr);
|
||||||
|
|
||||||
|
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Backspace));
|
||||||
|
nanosleep(&ts, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int AutoTypePlatformX11::initialTimeout()
|
int AutoTypePlatformX11::initialTimeout()
|
||||||
{
|
{
|
||||||
return 500;
|
return 500;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||||
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
|
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
|
||||||
|
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -58,8 +59,9 @@ public:
|
|||||||
KeySym keyToKeySym(Qt::Key key);
|
KeySym keyToKeySym(Qt::Key key);
|
||||||
|
|
||||||
void SendKeyPressedEvent(KeySym keysym);
|
void SendKeyPressedEvent(KeySym keysym);
|
||||||
|
void SendKey(KeySym keysym, bool isKeyDown);
|
||||||
|
|
||||||
Q_SIGNALS:
|
signals:
|
||||||
void globalShortcutTriggered();
|
void globalShortcutTriggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -126,6 +128,7 @@ public:
|
|||||||
|
|
||||||
void execChar(AutoTypeChar* action) override;
|
void execChar(AutoTypeChar* action) override;
|
||||||
void execKey(AutoTypeKey* action) override;
|
void execKey(AutoTypeKey* action) override;
|
||||||
|
void execClearField(AutoTypeClearField* action) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AutoTypePlatformX11* const m_platform;
|
AutoTypePlatformX11* const m_platform;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
|
# Copyright (C) 2017 KeePassXC Team
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -13,22 +13,33 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
include_directories(../src)
|
set(cli_SOURCES
|
||||||
|
Clip.cpp
|
||||||
|
Clip.h
|
||||||
|
EntropyMeter.cpp
|
||||||
|
EntropyMeter.h
|
||||||
|
Extract.cpp
|
||||||
|
Extract.h
|
||||||
|
List.cpp
|
||||||
|
List.h
|
||||||
|
Merge.cpp
|
||||||
|
Merge.h
|
||||||
|
Show.cpp
|
||||||
|
Show.h)
|
||||||
|
|
||||||
add_executable(kdbx-extract kdbx-extract.cpp)
|
add_library(cli STATIC ${cli_SOURCES})
|
||||||
target_link_libraries(kdbx-extract
|
target_link_libraries(cli Qt5::Core Qt5::Widgets)
|
||||||
|
|
||||||
|
add_executable(keepassxc-cli keepassxc-cli.cpp)
|
||||||
|
target_link_libraries(keepassxc-cli
|
||||||
|
cli
|
||||||
keepassx_core
|
keepassx_core
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
${GCRYPT_LIBRARIES}
|
${GCRYPT_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES})
|
${GPGERROR_LIBRARIES}
|
||||||
|
${ZLIB_LIBRARIES}
|
||||||
|
zxcvbn)
|
||||||
|
|
||||||
add_executable(kdbx-merge kdbx-merge.cpp)
|
install(TARGETS keepassxc-cli
|
||||||
target_link_libraries(kdbx-merge
|
BUNDLE DESTINATION . COMPONENT Runtime
|
||||||
keepassx_core
|
RUNTIME DESTINATION ${CLI_INSTALL_DIR} COMPONENT Runtime)
|
||||||
Qt5::Core
|
|
||||||
${GCRYPT_LIBRARIES}
|
|
||||||
${ZLIB_LIBRARIES})
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(entropy-meter entropy-meter.cpp)
|
|
||||||
target_link_libraries(entropy-meter zxcvbn)
|
|
||||||