Compare commits
562 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bce9c8add | ||
|
|
c8f5824554 | ||
|
|
7d3c18e1fb | ||
|
|
dce691157e | ||
|
|
611a74d74d | ||
|
|
de5f8082de | ||
|
|
59786d7bd7 | ||
|
|
cb0b948603 | ||
|
|
2e4f1a21b4 | ||
|
|
649a14db84 | ||
|
|
9ebe0b61eb | ||
|
|
4b6dbcaec4 | ||
|
|
8e7fa3d3d6 | ||
|
|
df3051038e | ||
|
|
daef0a358c | ||
|
|
422bc4da30 | ||
|
|
faf36190bd | ||
|
|
d59ca0a9cc | ||
|
|
ea1554915b | ||
|
|
6f9224784e | ||
|
|
34886dc7e0 | ||
|
|
f71d0c0da8 | ||
|
|
c0f668c4bb | ||
|
|
cdad46377b | ||
|
|
8ed8e57012 | ||
|
|
691e60d72b | ||
|
|
a888de19cd | ||
|
|
9ceadac299 | ||
|
|
bb50db40d2 | ||
|
|
35c6df2535 | ||
|
|
98c812a297 | ||
|
|
32100be47a | ||
|
|
4fed655621 | ||
|
|
8a0085f0f8 | ||
|
|
fab9f2a9fb | ||
|
|
e4ae2f9176 | ||
|
|
5e891c2caa | ||
|
|
2d127b8942 | ||
|
|
7ab6af00bc | ||
|
|
e53ac65518 | ||
|
|
1158294323 | ||
|
|
4ecd9e7e23 | ||
|
|
8a7de4408d | ||
|
|
a766052243 | ||
|
|
31ec840a8d | ||
|
|
e555937214 | ||
|
|
3799833cfa | ||
|
|
231f90a8e5 | ||
|
|
45c2a98b5b | ||
|
|
6b9137ac6c | ||
|
|
35e86efbce | ||
|
|
549eaefdb8 | ||
|
|
b553af8fd0 | ||
|
|
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 | ||
|
|
26fdb19344 | ||
|
|
0091cb3f23 | ||
|
|
2afd21c7ba | ||
|
|
4dab30ce6f | ||
|
|
75dc21c66d | ||
|
|
b0a4d7278a | ||
|
|
a01607e869 | ||
|
|
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
|
||||
...
|
||||
|
||||
4
.gitattributes
vendored
@@ -7,3 +7,7 @@ src/version.h.cmake export-subst
|
||||
snapcraft.yaml export-ignore
|
||||
make_release.sh export-ignore
|
||||
AppImage-Recipe.sh export-ignore
|
||||
|
||||
# github-linguist language hints
|
||||
*.h linguist-language=C++
|
||||
*.cpp linguist-language=C++
|
||||
|
||||
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -3,11 +3,11 @@
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Motivation and Context
|
||||
## Motivation and context
|
||||
<!--- Why is this change required? What problem does it solve? -->
|
||||
<!--- 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. -->
|
||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||
<!--- see how your change affects other areas of the code, etc. -->
|
||||
@@ -29,5 +29,6 @@
|
||||
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
|
||||
- ✅ My code follows the code style of this project. **[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.
|
||||
- ✅ I have added tests to cover my changes.
|
||||
|
||||
6
.gitignore
vendored
@@ -1,2 +1,8 @@
|
||||
CMakeLists.txt.*
|
||||
build*/
|
||||
release*/
|
||||
.idea/
|
||||
*.iml
|
||||
*.kdev4
|
||||
|
||||
\.vscode/
|
||||
|
||||
10
.travis.yml
@@ -1,6 +1,8 @@
|
||||
language: cpp
|
||||
sudo: required
|
||||
dist: trusty
|
||||
# FIXME : remove when (https://github.com/google/sanitizers/issues/837) is resolved.
|
||||
group: deprecated-2017Q3
|
||||
services: [docker]
|
||||
|
||||
os:
|
||||
@@ -13,15 +15,15 @@ compiler:
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- CONFIG=Release
|
||||
- CONFIG=Debug
|
||||
- CONFIG=Release ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
||||
- CONFIG=Debug ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
||||
|
||||
git:
|
||||
depth: 3
|
||||
|
||||
before_install:
|
||||
- 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 ls | grep -wq cmake || brew install cmake; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
|
||||
@@ -32,7 +34,7 @@ before_script:
|
||||
- mkdir build && pushd build
|
||||
|
||||
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
|
||||
- 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
|
||||
|
||||
@@ -49,8 +49,6 @@ cp -a ../../bin-release/* .
|
||||
cp -a ./usr/local/* ./usr
|
||||
rm -R ./usr/local
|
||||
rmdir ./opt 2> /dev/null
|
||||
patch_strings_in_file /usr/local ././
|
||||
patch_strings_in_file /usr ./
|
||||
|
||||
# bundle Qt platform plugins and themes
|
||||
QXCB_PLUGIN="$(find /usr/lib -name 'libqxcb.so' 2> /dev/null)"
|
||||
@@ -74,8 +72,13 @@ 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 LD_LIBRARY_PATH="..$(dirname ${QT_PLUGIN_PATH})/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
|
||||
|
||||
80
CHANGELOG
@@ -1,3 +1,83 @@
|
||||
2.2.1 (2017-10-01)
|
||||
=========================
|
||||
|
||||
- Corrected multiple snap issues [#934, #1011]
|
||||
- Corrected multiple custom icon issues [#708, #719, #994]
|
||||
- Corrected multiple Yubikey issues [#880]
|
||||
- Fixed single instance preventing load on occasion [#997]
|
||||
- Keep entry history when merging databases [#970]
|
||||
- Prevent data loss if passwords were mismatched [#1007]
|
||||
- Fixed crash after merge [#941]
|
||||
- Added configurable auto-type default delay [#703]
|
||||
- Unlock database dialog window comes to front [#663]
|
||||
- Translation and compiling fixes
|
||||
|
||||
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)
|
||||
=========================
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# 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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -21,10 +22,13 @@ endif()
|
||||
|
||||
project(KeePassXC)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Support Visual Studio Code
|
||||
include(CMakeToolsHelpers OPTIONAL)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckCXXSourceCompiles)
|
||||
@@ -32,14 +36,21 @@ include(CheckCXXSourceCompiles)
|
||||
option(WITH_TESTS "Enable building of unit tests" ON)
|
||||
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_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_HTTP "Include KeePassHTTP." OFF)
|
||||
option(WITH_XC_YUBIKEY "Include Yubikey support." OFF)
|
||||
option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
|
||||
option(WITH_XC_HTTP "Include KeePassHTTP and Custom Icon Downloads." OFF)
|
||||
option(WITH_XC_YUBIKEY "Include YubiKey support." OFF)
|
||||
|
||||
set(KEEPASSXC_VERSION "2.1.1")
|
||||
set(KEEPASSXC_VERSION_NUM "2.1.1")
|
||||
# Process ui files automatically from source files
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(KEEPASSXC_VERSION_MAJOR "2")
|
||||
set(KEEPASSXC_VERSION_MINOR "2")
|
||||
set(KEEPASSXC_VERSION_PATCH "1")
|
||||
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")
|
||||
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_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("-Wformat=2 -Wmissing-format-attribute")
|
||||
add_gcc_compiler_flags("-fvisibility=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("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")
|
||||
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)
|
||||
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")
|
||||
endif()
|
||||
|
||||
@@ -105,10 +137,14 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
endif()
|
||||
|
||||
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,-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,-z,relro")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
|
||||
endif()
|
||||
|
||||
add_gcc_compiler_cxxflags("-std=c++11")
|
||||
@@ -127,30 +163,37 @@ if(MINGW)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
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()
|
||||
|
||||
if(APPLE OR MINGW)
|
||||
if(APPLE AND WITH_APP_BUNDLE OR MINGW)
|
||||
set(PROGNAME KeePassXC)
|
||||
else()
|
||||
set(PROGNAME keepassxc)
|
||||
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")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CLI_INSTALL_DIR ".")
|
||||
set(BIN_INSTALL_DIR ".")
|
||||
set(PLUGIN_INSTALL_DIR ".")
|
||||
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(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
|
||||
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
|
||||
else()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CLI_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassxc")
|
||||
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/keepassxc")
|
||||
@@ -161,11 +204,15 @@ if(WITH_TESTS)
|
||||
endif(WITH_TESTS)
|
||||
|
||||
find_package(Qt5Core 5.2 REQUIRED)
|
||||
find_package(Qt5Network 5.2 REQUIRED)
|
||||
find_package(Qt5Concurrent 5.2 REQUIRED)
|
||||
find_package(Qt5Widgets 5.2 REQUIRED)
|
||||
find_package(Qt5Test 5.2 REQUIRED)
|
||||
find_package(Qt5LinguistTools 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)
|
||||
|
||||
# Debian sets the the build type to None for package builds.
|
||||
@@ -176,12 +223,10 @@ find_package(LibGPGError REQUIRED)
|
||||
|
||||
find_package(Gcrypt 1.6.0 REQUIRED)
|
||||
|
||||
if (WITH_XC_HTTP)
|
||||
find_package(LibMicroHTTPD REQUIRED)
|
||||
endif(WITH_XC_HTTP)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <zlib.h>
|
||||
|
||||
@@ -195,6 +240,13 @@ if(NOT ZLIB_SUPPORTS_GZIP)
|
||||
message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
|
||||
endif()
|
||||
|
||||
# Optional
|
||||
if(WITH_XC_YUBIKEY)
|
||||
find_package(YubiKey REQUIRED)
|
||||
|
||||
include_directories(SYSTEM ${YUBIKEY_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
check_cxx_source_compiles("#include <sys/prctl.h>
|
||||
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
|
||||
@@ -217,13 +269,12 @@ if(UNIX)
|
||||
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)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(share)
|
||||
add_subdirectory(utils)
|
||||
if(WITH_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif(WITH_TESTS)
|
||||
@@ -233,6 +284,6 @@ if(PRINT_SUMMARY)
|
||||
feature_summary(WHAT ALL)
|
||||
else()
|
||||
# This will only print ENABLED and DISABLED feature
|
||||
print_enabled_features()
|
||||
print_disabled_features()
|
||||
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
|
||||
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
|
||||
endif()
|
||||
|
||||
64
COPYING
@@ -1,5 +1,5 @@
|
||||
KeePassX - http://www.keepassx.org/
|
||||
Copyright (C) 2010-2012 Felix Geyer <debfx@fobos.de>
|
||||
KeePassXC - http://www.keepassxc.org/
|
||||
Copyright (C) 2016-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
|
||||
@@ -14,9 +14,9 @@ GNU General Public License for more details.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: KeePassX
|
||||
Upstream-Contact: Felix Geyer <debfx@fobos.de>
|
||||
Source: http://www.keepassx.org/
|
||||
Upstream-Name: KeePassXC
|
||||
Upstream-Contact: KeePassXC Team <team@keepassxc.org>
|
||||
Source: http://www.keepassxc.org/
|
||||
|
||||
Copyright: 2010-2012, Felix Geyer <debfx@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>
|
||||
2013, Laszlo Papp <lpapp@kde.org>
|
||||
2013, David Faure <faure@kde.org>
|
||||
2016, KeePassXC Team
|
||||
2016-2017, KeePassXC Team <team@keepassxc.org>
|
||||
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
|
||||
Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
2011 Kitware, Inc.
|
||||
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
|
||||
share/icons/application/scalable/apps/keepassxc.svgz
|
||||
share/icons/application/*/apps/keepassxc-dark.png
|
||||
share/icons/application/scalable/apps/keepassxc-dark.svgz
|
||||
share/icons/application/*/apps/keepassxc-locked.png
|
||||
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/scalable/mimetypes/application-x-keepassxc.svgz
|
||||
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-edit.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/database/C00_Password.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-new.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-as.png
|
||||
share/icons/application/*/actions/edit-clear-locationbar-ltr.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-copy.png
|
||||
share/icons/application/*/actions/password-show-*.png
|
||||
share/icons/application/*/actions/system-search.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-information.png
|
||||
share/icons/application/*/status/dialog-warning.png
|
||||
share/icons/application/*/status/security-high.png
|
||||
share/icons/svg/*.svgz
|
||||
Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org>
|
||||
2007, David Vignoni <david@icon-king.com>
|
||||
@@ -194,7 +229,20 @@ Copyright: 2009-2010, Iowa State University
|
||||
License: Boost-1.0
|
||||
|
||||
Files: src/zxcvbn/zxcvbn.*
|
||||
src/utils/entropy-meter.cpp
|
||||
Copyright: 2015, Tony Evans
|
||||
2016, KeePassXC Team
|
||||
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
|
||||
24
Dockerfile
@@ -21,7 +21,13 @@ RUN set -x \
|
||||
&& apt-get install --yes software-properties-common
|
||||
|
||||
RUN set -x \
|
||||
&& add-apt-repository --yes ppa:beineri/opt-qt58-trusty
|
||||
&& add-apt-repository ppa:george-edison55/cmake-3.x
|
||||
|
||||
ENV QT_VERSION=qt59
|
||||
|
||||
RUN set -x \
|
||||
&& add-apt-repository --yes ppa:beineri/opt-${QT_VERSION}-trusty
|
||||
|
||||
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
@@ -29,13 +35,15 @@ RUN set -x \
|
||||
g++ \
|
||||
cmake \
|
||||
libgcrypt20-dev \
|
||||
qt58base \
|
||||
qt58tools \
|
||||
qt58x11extras \
|
||||
libmicrohttpd-dev \
|
||||
${QT_VERSION}base \
|
||||
${QT_VERSION}tools \
|
||||
${QT_VERSION}x11extras \
|
||||
libxi-dev \
|
||||
libxtst-dev \
|
||||
zlib1g-dev \
|
||||
libyubikey-dev \
|
||||
libykpers-1-dev \
|
||||
xvfb \
|
||||
wget \
|
||||
file \
|
||||
fuse \
|
||||
@@ -48,7 +56,7 @@ VOLUME /keepassxc/src
|
||||
VOLUME /keepassxc/out
|
||||
WORKDIR /keepassxc
|
||||
|
||||
ENV CMAKE_PREFIX_PATH=/opt/qt58/lib/cmake
|
||||
ENV LD_LIBRARY_PATH=/opt/qt58/lib
|
||||
ENV CMAKE_PREFIX_PATH=/opt/${QT_VERSION}/lib/cmake
|
||||
ENV LD_LIBRARY_PATH=/opt/${QT_VERSION}/lib
|
||||
RUN set -x \
|
||||
&& echo /opt/qt58/lib > /etc/ld.so.conf.d/qt58.conf
|
||||
&& echo /opt/${QT_VERSION}/lib > /etc/ld.so.conf.d/${QT_VERSION}.conf
|
||||
|
||||
201
LICENSE.APACHE-2.0
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
41
README.md
@@ -1,31 +1,33 @@
|
||||
# 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
|
||||
KeePassXC is a fork of [KeePassX](https://www.keepassx.org/) that [aims to incorporate stalled pull requests, features, and bug fixes that have never made it into the main KeePassX repository](https://github.com/keepassxreboot/keepassx/issues/43).
|
||||
[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.
|
||||
|
||||
|
||||
## Additional features compared to KeePassX
|
||||
- Autotype on all three major platforms (Linux, Windows, OS X)
|
||||
- Auto-Type on all three major platforms (Linux, Windows, OS X)
|
||||
- Stand-alone password generator
|
||||
- Password strength meter
|
||||
- Use website's favicons as entry icons
|
||||
- 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.
|
||||
- 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
|
||||
|
||||
For a full list of features and changes, read the [CHANGELOG](CHANGELOG) document.
|
||||
|
||||
### 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 still use it at your own risk!
|
||||
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
|
||||
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.
|
||||
|
||||
### Building KeePassXC yourself
|
||||
### Building KeePassXC
|
||||
|
||||
*More detailed instructions are available in the INSTALL file or on 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 tarball](https://keepassxc.org/download#source) or check out the latest version from our [Git repository](https://github.com/keepassxreboot/keepassxc).
|
||||
|
||||
@@ -43,9 +45,9 @@ To update the project from within the project's folder, you can run the followin
|
||||
git pull
|
||||
```
|
||||
|
||||
Once you have downloaded the source code, you can `cd` into the source code directory and build and install KeePassXC with
|
||||
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 ..
|
||||
@@ -53,13 +55,24 @@ make -j8
|
||||
sudo make install
|
||||
```
|
||||
|
||||
To enable autotype, add `-DWITH_XC_AUTOTYPE=ON` to the `cmake` command. KeePassHTTP support is compiled in by adding `-DWITH_XC_HTTP=ON`. If these options are not specified, KeePassXC will be built without these plugins.
|
||||
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
|
||||
|
||||
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 write to our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum.
|
||||
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.
|
||||
|
||||
You can of course also directly contribute your own code. We are happy to accept your pull requests.
|
||||
|
||||
Please read the [CONTRIBUTING](.github/CONTRIBUTING.md) document for further information.
|
||||
Please read the [CONTRIBUTING document](.github/CONTRIBUTING.md) for further information.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -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
|
||||
193
release-tool
@@ -16,8 +16,8 @@
|
||||
# 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"
|
||||
printf "\e[1m\e[32mKeePassXC\e[0m Release Preparation Helper\n"
|
||||
printf "Copyright (C) 2017 KeePassXC Team <https://keepassxc.org/>\n\n"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
@@ -37,7 +37,7 @@ DOCKER_CONTAINER_NAME="keepassxc-build-container"
|
||||
CMAKE_OPTIONS=""
|
||||
COMPILER="g++"
|
||||
MAKE_OPTIONS="-j8"
|
||||
BUILD_PLUGINS="autotype"
|
||||
BUILD_PLUGINS="autotype http yubikey"
|
||||
INSTALL_PREFIX="/usr/local"
|
||||
BUILD_SOURCE_TARBALL=true
|
||||
ORIG_BRANCH=""
|
||||
@@ -50,19 +50,20 @@ printUsage() {
|
||||
local cmd
|
||||
if [ "" == "$1" ] || [ "help" == "$1" ]; then
|
||||
cmd="COMMAND"
|
||||
elif [ "merge" == "$1" ] || [ "build" == "$1" ] || [ "sign" == "$1" ]; then
|
||||
elif [ "check" == "$1" ] || [ "merge" == "$1" ] || [ "build" == "$1" ] || [ "sign" == "$1" ]; then
|
||||
cmd="$1"
|
||||
else
|
||||
logError "Unknown command: '$1'\n"
|
||||
cmd="COMMAND"
|
||||
fi
|
||||
|
||||
echo -e "\e[1mUsage:\e[0m $(basename $0) $cmd [options]"
|
||||
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
|
||||
@@ -126,15 +127,30 @@ EOF
|
||||
}
|
||||
|
||||
logInfo() {
|
||||
echo -e "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1"
|
||||
printf "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1\n"
|
||||
}
|
||||
|
||||
logError() {
|
||||
echo -e "\e[1m[ \e[31mERROR\e[39m ]\e[0m $1" >&2
|
||||
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"
|
||||
@@ -214,15 +230,23 @@ checkTargetBranchExists() {
|
||||
|
||||
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 \"${RELEASE_NAME}\"" CMakeLists.txt
|
||||
grep -q "${app_name_upper}_VERSION_MAJOR \"${major_num}\"" CMakeLists.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exitError "${app_name_upper}_VERSION version not updated to '${RELEASE_NAME}' in CMakeLists.txt!"
|
||||
exitError "${app_name_upper}_VERSION_MAJOR not updated to '${major_num}' in CMakeLists.txt!"
|
||||
fi
|
||||
|
||||
grep -q "${app_name_upper}_VERSION_NUM \"${RELEASE_NAME}\"" CMakeLists.txt
|
||||
grep -q "${app_name_upper}_VERSION_MINOR \"${minor_num}\"" CMakeLists.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
exitError "${app_name_upper}_VERSION_NUM version not updated to '${RELEASE_NAME}' in CMakeLists.txt!"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -242,11 +266,57 @@ checkTransifexCommandExists() {
|
||||
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
|
||||
if ! $(command -v realpath > /dev/null); then
|
||||
realpath() {
|
||||
pushd . > /dev/null
|
||||
if [ -d "$1" ]; then
|
||||
@@ -269,6 +339,28 @@ 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
|
||||
@@ -317,44 +409,9 @@ merge() {
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "" == "$RELEASE_NAME" ]; then
|
||||
logError "Missing arguments, --version is required!\n"
|
||||
printUsage "merge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "" == "$TAG_NAME" ]; then
|
||||
TAG_NAME="$RELEASE_NAME"
|
||||
fi
|
||||
|
||||
if [ "" == "$SOURCE_BRANCH" ]; then
|
||||
SOURCE_BRANCH="release/${RELEASE_NAME}"
|
||||
fi
|
||||
|
||||
init
|
||||
|
||||
SRC_DIR="$(realpath "$SRC_DIR")"
|
||||
|
||||
logInfo "Performing basic checks..."
|
||||
|
||||
checkSourceDirExists
|
||||
|
||||
logInfo "Changing to source directory..."
|
||||
cd "${SRC_DIR}"
|
||||
|
||||
checkTransifexCommandExists
|
||||
checkGitRepository
|
||||
checkReleaseDoesNotExist
|
||||
checkWorkingTreeClean
|
||||
checkSourceBranchExists
|
||||
checkTargetBranchExists
|
||||
checkVersionInCMake
|
||||
checkChangeLog
|
||||
|
||||
logInfo "All checks pass, getting our hands dirty now!"
|
||||
|
||||
logInfo "Checking out source branch..."
|
||||
git checkout "$SOURCE_BRANCH"
|
||||
performChecks
|
||||
|
||||
logInfo "Updating language files..."
|
||||
./share/translations/update.sh
|
||||
@@ -372,15 +429,15 @@ merge() {
|
||||
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}'..."
|
||||
|
||||
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 "$SOURCE_BRANCH" --no-ff -m "$COMMIT_MSG" -m "${CHANGELOG}" "$SOURCE_BRANCH" -S"$GPG_GIT_KEY"
|
||||
|
||||
logInfo "Creating tag '${TAG_NAME}'..."
|
||||
@@ -467,34 +524,10 @@ build() {
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "" == "$RELEASE_NAME" ]; then
|
||||
logError "Missing arguments, --version is required!\n"
|
||||
printUsage "build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "" == "$TAG_NAME" ]; then
|
||||
TAG_NAME="$RELEASE_NAME"
|
||||
fi
|
||||
|
||||
init
|
||||
|
||||
SRC_DIR="$(realpath "$SRC_DIR")"
|
||||
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
||||
|
||||
logInfo "Performing basic checks..."
|
||||
|
||||
checkSourceDirExists
|
||||
|
||||
logInfo "Changing to source directory..."
|
||||
cd "${SRC_DIR}"
|
||||
|
||||
checkTagExists
|
||||
checkGitRepository
|
||||
checkWorkingTreeClean
|
||||
checkOutputDirDoesNotExist
|
||||
|
||||
logInfo "All checks pass, getting our hands dirty now!"
|
||||
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
|
||||
|
||||
logInfo "Checking out release tag '${TAG_NAME}'..."
|
||||
git checkout "$TAG_NAME"
|
||||
@@ -656,7 +689,9 @@ sign() {
|
||||
fi
|
||||
|
||||
logInfo "Creating digest for file '${f}'..."
|
||||
sha256sum "$f" > "${f}.DIGEST"
|
||||
local rp="$(realpath "$f")"
|
||||
local bname="$(basename "$f")"
|
||||
(cd "$(dirname "$rp")"; sha256sum "$bname" > "${bname}.DIGEST")
|
||||
done
|
||||
|
||||
logInfo "All done!"
|
||||
@@ -675,7 +710,7 @@ if [ "" == "$MODE" ]; then
|
||||
elif [ "help" == "$MODE" ]; then
|
||||
printUsage "$1"
|
||||
exit
|
||||
elif [ "merge" == "$MODE" ] || [ "build" == "$MODE" ] || [ "sign" == "$MODE" ]; then
|
||||
elif [ "check" == "$MODE" ] || [ "merge" == "$MODE" ] || [ "build" == "$MODE" ] || [ "sign" == "$MODE" ]; then
|
||||
$MODE "$@"
|
||||
else
|
||||
printUsage "$MODE"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=KeePassXC
|
||||
GenericName=Community Password Manager
|
||||
GenericName[de]=Passwortverwaltung
|
||||
GenericName[es]=Gestor de contraseñas
|
||||
GenericName[fr]=Gestionnaire de mot de passe
|
||||
GenericName[ru]=менеджер паролей
|
||||
Exec=keepassxc %f
|
||||
Icon=${SNAP}/share/icons/hicolor/256x256/apps/keepassxc.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;Utility;
|
||||
MimeType=application/x-keepass2;
|
||||
@@ -1,4 +1,5 @@
|
||||
# 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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -15,15 +16,20 @@
|
||||
|
||||
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)
|
||||
|
||||
install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
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
|
||||
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.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
||||
endif(UNIX AND NOT APPLE)
|
||||
@@ -84,6 +90,22 @@ add_custom_target(icons
|
||||
COMMAND inkscape -z -w 256 -h 256
|
||||
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
|
||||
COMMAND inkscape -z -w 16 -h 16
|
||||
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>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleAllowMixedLocalizations</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
@@ -27,7 +29,7 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${KEEPASSXC_VERSION_NUM}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2016 KeePassXC Development Team</string>
|
||||
<string>Copyright 2016-2017 KeePassXC Development Team</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
2369
share/translations/keepassx_eu.ts
Normal file
2387
share/translations/keepassx_fi.ts
Normal file
2392
share/translations/keepassx_hu.ts
Normal file
2376
share/translations/keepassx_kk.ts
Normal file
2384
share/translations/keepassx_tr.ts
Normal file
@@ -1,17 +1,64 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
BASEDIR=$(dirname $0)
|
||||
BASEDIR="$(dirname $0)"
|
||||
|
||||
cd $BASEDIR/../..
|
||||
PUSH=true
|
||||
PULL=true
|
||||
UPDATE=true
|
||||
|
||||
echo Updating source file
|
||||
lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts
|
||||
lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts
|
||||
if [ "$1" == "push" ]; then
|
||||
PULL=false
|
||||
elif [ "$1" == "pull" ]; then
|
||||
PUSH=false
|
||||
UPDATE=false
|
||||
elif [ "$1" == "update" ]; then
|
||||
PUSH=false
|
||||
PULL=false
|
||||
elif [ "$1" != "" ]; then
|
||||
echo "Unknown command '${1}'"
|
||||
echo "Usage: $(basename $0) [update|pull|push]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo Pushing English translation file to Transifex
|
||||
tx push -s
|
||||
cd "${BASEDIR}/../.."
|
||||
|
||||
echo
|
||||
echo Pulling translations from Transifex
|
||||
tx pull -a --minimum-perc=80
|
||||
if $UPDATE; then
|
||||
echo "Updating source files..."
|
||||
|
||||
LUPDATE=lupdate-qt5
|
||||
command -v $LUPDATE > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LUPDATE=lupdate
|
||||
fi
|
||||
$LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts
|
||||
$LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts
|
||||
echo
|
||||
fi
|
||||
|
||||
if $PUSH; then
|
||||
echo "Pushing English source files to Transifex..."
|
||||
tx push -s
|
||||
echo
|
||||
fi
|
||||
|
||||
if $PULL; then
|
||||
echo "Pulling translations from Transifex..."
|
||||
tx pull -af --minimum-perc=40
|
||||
echo
|
||||
fi
|
||||
|
||||
7776
share/wordlists/eff_large.wordlist
Normal file
@@ -1,17 +1,21 @@
|
||||
name: keepassxc
|
||||
version: 2.1.0
|
||||
version: 2.2.1
|
||||
grade: stable
|
||||
summary: community driven port of the windows application “Keepass Password Safe”
|
||||
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
|
||||
published under the terms of the GNU General Public License.
|
||||
is published under the terms of the GNU General Public License.
|
||||
confinement: strict
|
||||
|
||||
apps:
|
||||
keepassxc:
|
||||
command: desktop-launch keepassxc
|
||||
plugs: [unity7, opengl, gsettings, home]
|
||||
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
|
||||
desktop: share/applications/keepassxc.desktop
|
||||
cli:
|
||||
command: keepassxc-cli
|
||||
plugs: [gsettings, home, removable-media, raw-usb]
|
||||
|
||||
parts:
|
||||
keepassxc:
|
||||
@@ -21,6 +25,8 @@ parts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DWITH_TESTS=OFF
|
||||
- -DWITH_XC_AUTOTYPE=ON
|
||||
- -DWITH_XC_HTTP=ON
|
||||
- -DWITH_XC_YUBIKEY=ON
|
||||
build-packages:
|
||||
- g++
|
||||
- libgcrypt20-dev
|
||||
@@ -29,4 +35,30 @@ parts:
|
||||
- qttools5-dev
|
||||
- qttools5-dev-tools
|
||||
- zlib1g-dev
|
||||
- libxi-dev
|
||||
- libxtst-dev
|
||||
- libyubikey-dev
|
||||
- libykpers-1-dev
|
||||
after: [desktop-qt5]
|
||||
|
||||
# Redefine desktop-qt5 stage packages to work with Ubuntu 17.04
|
||||
desktop-qt5:
|
||||
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
|
||||
|
||||
# Overcome limitation in snapd to support URL loading (CTRL+U)
|
||||
snapd-xdg-open:
|
||||
source: https://github.com/ubuntu-core/snapd-xdg-open.git
|
||||
plugin: dump
|
||||
organize:
|
||||
data/xdg-open: bin/xdg-open
|
||||
stage-packages:
|
||||
- dbus
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# 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
|
||||
# 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
|
||||
core/AutoTypeAssociations.cpp
|
||||
core/Config.cpp
|
||||
core/CsvParser.cpp
|
||||
core/Database.cpp
|
||||
core/DatabaseIcons.cpp
|
||||
core/Endian.cpp
|
||||
@@ -45,13 +47,20 @@ set(keepassx_SOURCES
|
||||
core/ListDeleter.h
|
||||
core/Metadata.cpp
|
||||
core/PasswordGenerator.cpp
|
||||
core/PassphraseGenerator.cpp
|
||||
core/SignalMultiplexer.cpp
|
||||
core/ScreenLockListener.cpp
|
||||
core/ScreenLockListener.h
|
||||
core/ScreenLockListenerPrivate.h
|
||||
core/ScreenLockListenerPrivate.cpp
|
||||
core/TimeDelta.cpp
|
||||
core/TimeInfo.cpp
|
||||
core/ToDbExporter.cpp
|
||||
core/Tools.cpp
|
||||
core/Translator.cpp
|
||||
core/Uuid.cpp
|
||||
cli/PasswordInput.cpp
|
||||
cli/PasswordInput.h
|
||||
crypto/Crypto.cpp
|
||||
crypto/CryptoHash.cpp
|
||||
crypto/Random.cpp
|
||||
@@ -70,8 +79,10 @@ set(keepassx_SOURCES
|
||||
format/KeePass2XmlWriter.cpp
|
||||
gui/AboutDialog.cpp
|
||||
gui/Application.cpp
|
||||
gui/CategoryListWidget.cpp
|
||||
gui/ChangeMasterKeyWidget.cpp
|
||||
gui/Clipboard.cpp
|
||||
gui/CloneDialog.cpp
|
||||
gui/DatabaseOpenWidget.cpp
|
||||
gui/DatabaseRepairWidget.cpp
|
||||
gui/DatabaseSettingsWidget.cpp
|
||||
@@ -86,18 +97,24 @@ set(keepassx_SOURCES
|
||||
gui/FileDialog.cpp
|
||||
gui/IconModels.cpp
|
||||
gui/KeePass1OpenWidget.cpp
|
||||
gui/KMessageWidget.cpp
|
||||
gui/LineEdit.cpp
|
||||
gui/MainWindow.cpp
|
||||
gui/MessageBox.cpp
|
||||
gui/MessageWidget.cpp
|
||||
gui/PasswordEdit.cpp
|
||||
gui/PasswordGeneratorWidget.cpp
|
||||
gui/PasswordComboBox.cpp
|
||||
gui/SettingsWidget.cpp
|
||||
gui/SearchWidget.cpp
|
||||
gui/SortFilterHideProxyModel.cpp
|
||||
gui/SetupTotpDialog.cpp
|
||||
gui/TotpDialog.cpp
|
||||
gui/UnlockDatabaseWidget.cpp
|
||||
gui/UnlockDatabaseDialog.cpp
|
||||
gui/WelcomeWidget.cpp
|
||||
gui/csvImport/CsvImportWidget.cpp
|
||||
gui/csvImport/CsvImportWizard.cpp
|
||||
gui/csvImport/CsvParserModel.cpp
|
||||
gui/entry/AutoTypeAssociationsModel.cpp
|
||||
gui/entry/EditEntryWidget.cpp
|
||||
gui/entry/EditEntryWidget_p.h
|
||||
@@ -111,65 +128,55 @@ set(keepassx_SOURCES
|
||||
gui/group/GroupView.cpp
|
||||
keys/CompositeKey.cpp
|
||||
keys/CompositeKey_p.h
|
||||
keys/drivers/YubiKey.h
|
||||
keys/FileKey.cpp
|
||||
keys/Key.h
|
||||
keys/PasswordKey.cpp
|
||||
keys/YkChallengeResponseKey.cpp
|
||||
streams/HashedBlockStream.cpp
|
||||
streams/LayeredStream.cpp
|
||||
streams/qtiocompressor.cpp
|
||||
streams/StoreDataStream.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
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set(keepassx_FORMS
|
||||
gui/AboutDialog.ui
|
||||
gui/ChangeMasterKeyWidget.ui
|
||||
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_feature_info(AutoType WITH_XC_AUTOTYPE "Automatic password typing")
|
||||
add_feature_info(KeePassHTTP WITH_XC_HTTP "Browser integration compatible with ChromeIPass and PassIFox")
|
||||
add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")
|
||||
|
||||
add_subdirectory(http)
|
||||
if(WITH_XC_HTTP)
|
||||
set(keepasshttp_SOURCES
|
||||
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})
|
||||
set(keepasshttp_LIB keepasshttp qhttp Qt5::Network)
|
||||
endif()
|
||||
|
||||
add_subdirectory(autotype)
|
||||
add_subdirectory(cli)
|
||||
|
||||
set(autotype_SOURCES
|
||||
core/Tools.cpp
|
||||
@@ -190,42 +197,67 @@ if(MINGW)
|
||||
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
||||
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)
|
||||
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})
|
||||
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
|
||||
|
||||
set(autotype_LIB autotype)
|
||||
|
||||
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})
|
||||
target_link_libraries(${PROGNAME}
|
||||
keepassx_core
|
||||
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
||||
target_link_libraries(keepassx_core
|
||||
${keepasshttp_LIB}
|
||||
${autotype_LIB}
|
||||
${YUBIKEY_LIBRARIES}
|
||||
zxcvbn
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Concurrent
|
||||
Qt5::Widgets
|
||||
Qt5::Network
|
||||
${GCRYPT_LIBRARIES}
|
||||
${GPGERROR_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)
|
||||
|
||||
if(APPLE)
|
||||
if(APPLE AND WITH_APP_BUNDLE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
set_target_properties(${PROGNAME} PROPERTIES
|
||||
MACOSX_BUNDLE ON
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
endif()
|
||||
|
||||
@@ -233,7 +265,7 @@ install(TARGETS ${PROGNAME}
|
||||
BUNDLE DESTINATION . 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")
|
||||
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
|
||||
DESTINATION "${DATA_INSTALL_DIR}")
|
||||
@@ -244,7 +276,7 @@ if(APPLE)
|
||||
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
|
||||
set(CPACK_SYSTEM_NAME "OSX")
|
||||
set(CPACK_STRIP_FILES ON)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION_NUM}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
|
||||
include(CPack)
|
||||
|
||||
if(NOT DEFINED QT_BINARY_DIR)
|
||||
@@ -258,7 +290,12 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
string(REPLACE "AMD" "Win" OUTPUT_FILE_POSTFIX "${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
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_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
||||
@@ -267,6 +304,7 @@ if(MINGW)
|
||||
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")
|
||||
@@ -275,6 +313,7 @@ if(MINGW)
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.replace("{{}", "{LEFTBRACE}");
|
||||
sequence.replace("{}}", "{RIGHTBRACE}");
|
||||
|
||||
QList<AutoTypeAction*> actions;
|
||||
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
||||
|
||||
@@ -313,12 +317,10 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
||||
{
|
||||
QString tmpl;
|
||||
bool inTmpl = false;
|
||||
m_autoTypeDelay = 0;
|
||||
m_autoTypeDelay = config()->get("AutoTypeDelay").toInt();
|
||||
|
||||
|
||||
for (const QChar& ch : sequence) {
|
||||
// TODO: implement support for {{}, {}}
|
||||
|
||||
if (inTmpl) {
|
||||
if (ch == '{') {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
list.append(new AutoTypeChar(')'));
|
||||
}
|
||||
else if (tmplName.compare("{",Qt::CaseInsensitive)==0) {
|
||||
else if (tmplName.compare("leftbrace",Qt::CaseInsensitive)==0) {
|
||||
list.append(new AutoTypeChar('{'));
|
||||
}
|
||||
else if (tmplName.compare("}",Qt::CaseInsensitive)==0) {
|
||||
else if (tmplName.compare("rightbrace",Qt::CaseInsensitive)==0) {
|
||||
list.append(new AutoTypeChar('}'));
|
||||
}
|
||||
else {
|
||||
@@ -514,6 +519,14 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
|
||||
else if (tmplName.compare("clearfield",Qt::CaseInsensitive)==0) {
|
||||
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()) {
|
||||
return list;
|
||||
@@ -562,8 +575,9 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
|
||||
}
|
||||
}
|
||||
|
||||
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool() && !entry->title().isEmpty()
|
||||
&& windowTitle.contains(entry->title(), Qt::CaseInsensitive)) {
|
||||
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool()
|
||||
&& (windowMatchesTitle(windowTitle, entry->resolvePlaceholder(entry->title()))
|
||||
|| windowMatchesUrl(windowTitle, entry->resolvePlaceholder(entry->url())))) {
|
||||
sequence = entry->defaultAutoTypeSequence();
|
||||
match = true;
|
||||
}
|
||||
@@ -594,11 +608,11 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
|
||||
group = group->parentGroup();
|
||||
} while (group && (!enableSet || sequence.isEmpty()));
|
||||
|
||||
if (sequence.isEmpty() && (!entry->username().isEmpty() || !entry->password().isEmpty())) {
|
||||
if (entry->username().isEmpty()) {
|
||||
if (sequence.isEmpty() && (!entry->resolvePlaceholder(entry->username()).isEmpty() || !entry->resolvePlaceholder(entry->password()).isEmpty())) {
|
||||
if (entry->resolvePlaceholder(entry->username()).isEmpty()) {
|
||||
sequence = "{PASSWORD}{ENTER}";
|
||||
}
|
||||
else if (entry->password().isEmpty()) {
|
||||
else if (entry->resolvePlaceholder(entry->password()).isEmpty()) {
|
||||
sequence = "{USERNAME}{ENTER}";
|
||||
}
|
||||
else {
|
||||
@@ -619,3 +633,22 @@ bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPa
|
||||
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) 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
|
||||
@@ -48,13 +49,13 @@ public:
|
||||
static AutoType* instance();
|
||||
static void createTestInstance();
|
||||
|
||||
public Q_SLOTS:
|
||||
public slots:
|
||||
void performGlobalAutoType(const QList<Database*>& dbList);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void globalShortcutTriggered();
|
||||
|
||||
private Q_SLOTS:
|
||||
private slots:
|
||||
void performAutoTypeFromGlobal(Entry* entry, const QString& sequence);
|
||||
void resetInAutoType();
|
||||
void unloadPlugin();
|
||||
@@ -66,6 +67,8 @@ private:
|
||||
bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions);
|
||||
QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry);
|
||||
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 m_inAutoType;
|
||||
|
||||
@@ -90,6 +90,4 @@ void AutoTypeExecutor::execDelay(AutoTypeDelay* action)
|
||||
void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ void AutoTypeSelectDialog::emitEntryActivated(const QModelIndex& index)
|
||||
|
||||
Entry* entry = m_view->entryFromIndex(index);
|
||||
accept();
|
||||
Q_EMIT entryActivated(entry, m_sequences[entry]);
|
||||
emit entryActivated(entry, m_sequences[entry]);
|
||||
}
|
||||
|
||||
void AutoTypeSelectDialog::entryRemoved()
|
||||
|
||||
@@ -33,13 +33,13 @@ public:
|
||||
explicit AutoTypeSelectDialog(QWidget* parent = nullptr);
|
||||
void setEntries(const QList<Entry*>& entries, const QHash<Entry*, QString>& sequences);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void entryActivated(Entry* entry, const QString& sequence);
|
||||
|
||||
public Q_SLOTS:
|
||||
public slots:
|
||||
void done(int r) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
private slots:
|
||||
void emitEntryActivated(const QModelIndex& index);
|
||||
void entryRemoved();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent* event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
private slots:
|
||||
void selectFirstEntry();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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) 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
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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) 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
|
||||
@@ -120,7 +121,7 @@ bool AutoTypePlatformMac::registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifi
|
||||
qWarning("Invalid key code");
|
||||
return false;
|
||||
}
|
||||
uint16 nativeModifiers = qtToNativeModifiers(modifiers);
|
||||
CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, false);
|
||||
if (::RegisterEventHotKey(nativeKeyCode, nativeModifiers, m_hotkeyId, GetApplicationEventTarget(), 0, &m_hotkeyRef) != noErr) {
|
||||
qWarning("Register hotkey failed");
|
||||
return false;
|
||||
@@ -201,7 +202,7 @@ void AutoTypePlatformMac::sendChar(const QChar& ch, bool isKeyDown)
|
||||
// Send key code to active window
|
||||
// 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);
|
||||
if (keyCode == INVALID_KEYCODE) {
|
||||
@@ -209,7 +210,9 @@ void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown)
|
||||
}
|
||||
|
||||
CGEventRef keyEvent = ::CGEventCreateKeyboardEvent(nullptr, keyCode, isKeyDown);
|
||||
CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, true);
|
||||
if (keyEvent != nullptr) {
|
||||
::CGEventSetFlags(keyEvent, nativeModifiers);
|
||||
::CGEventPost(kCGSessionEventTap, keyEvent);
|
||||
::CFRelease(keyEvent);
|
||||
}
|
||||
@@ -317,6 +320,10 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
|
||||
case Qt::Key_Period:
|
||||
return kVK_ANSI_Period;
|
||||
|
||||
case Qt::Key_Shift:
|
||||
return kVK_Shift;
|
||||
case Qt::Key_Control:
|
||||
return kVK_Command;
|
||||
case Qt::Key_Backspace:
|
||||
return kVK_Delete;
|
||||
case Qt::Key_Tab:
|
||||
@@ -395,21 +402,34 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
|
||||
// Translate qt key modifiers to mac os modifiers
|
||||
// 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) {
|
||||
nativeModifiers |= shiftKey;
|
||||
nativeModifiers = CGEventFlags(nativeModifiers | shiftMod);
|
||||
}
|
||||
if (modifiers & Qt::ControlModifier) {
|
||||
nativeModifiers |= cmdKey;
|
||||
nativeModifiers = CGEventFlags(nativeModifiers | cmdMod);
|
||||
}
|
||||
if (modifiers & Qt::AltModifier) {
|
||||
nativeModifiers |= optionKey;
|
||||
nativeModifiers = CGEventFlags(nativeModifiers | optionMod);
|
||||
}
|
||||
if (modifiers & Qt::MetaModifier) {
|
||||
nativeModifiers |= controlKey;
|
||||
nativeModifiers = CGEventFlags(nativeModifiers | controlMod);
|
||||
}
|
||||
|
||||
return nativeModifiers;
|
||||
@@ -460,7 +480,7 @@ OSStatus AutoTypePlatformMac::hotkeyHandler(EventHandlerCallRef nextHandler, Eve
|
||||
|
||||
if (::GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, nullptr, sizeof(hotkeyId), nullptr, &hotkeyId) == noErr
|
||||
&& hotkeyId.id == HOTKEY_ID) {
|
||||
Q_EMIT self->globalShortcutTriggered();
|
||||
emit self->globalShortcutTriggered();
|
||||
}
|
||||
|
||||
return noErr;
|
||||
@@ -479,12 +499,32 @@ void AutoTypeExecutorMac::execChar(AutoTypeChar* action)
|
||||
{
|
||||
m_platform->sendChar(action->character, true);
|
||||
m_platform->sendChar(action->character, false);
|
||||
usleep(25 * 1000);
|
||||
}
|
||||
|
||||
void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
|
||||
{
|
||||
m_platform->sendKey(action->key, true);
|
||||
m_platform->sendKey(action->key, false);
|
||||
}
|
||||
|
||||
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) 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
|
||||
@@ -49,9 +50,9 @@ public:
|
||||
bool raiseOwnWindow() override;
|
||||
|
||||
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();
|
||||
|
||||
private:
|
||||
@@ -60,7 +61,7 @@ private:
|
||||
EventHotKeyID m_hotkeyId;
|
||||
|
||||
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 QString windowTitle(CFDictionaryRef window);
|
||||
static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData);
|
||||
@@ -73,6 +74,7 @@ public:
|
||||
|
||||
void execChar(AutoTypeChar* action) override;
|
||||
void execKey(AutoTypeKey* action) override;
|
||||
void execClearField(AutoTypeClearField* action) override;
|
||||
|
||||
private:
|
||||
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)
|
||||
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
|
||||
endif()
|
||||
add_custom_command(TARGET keepassx-autotype-cocoa
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
|
||||
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
||||
COMMENT "Deploying autotype plugin")
|
||||
if(WITH_APP_BUNDLE)
|
||||
add_custom_command(TARGET keepassx-autotype-cocoa
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
|
||||
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
|
||||
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 addActionKey(AutoTypeKey* action);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void globalShortcutTriggered();
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* 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);
|
||||
|
||||
if (msg->message == WM_HOTKEY && msg->wParam == HOTKEY_ID) {
|
||||
Q_EMIT globalShortcutTriggered();
|
||||
emit globalShortcutTriggered();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -189,6 +190,10 @@ DWORD AutoTypePlatformWin::qtToNativeKeyCode(Qt::Key key)
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
return VK_RETURN; // 0x0D
|
||||
case Qt::Key_Shift:
|
||||
return VK_SHIFT; // 0x10
|
||||
case Qt::Key_Control:
|
||||
return VK_CONTROL; // 0x11
|
||||
case Qt::Key_Pause:
|
||||
return VK_PAUSE; // 0x13
|
||||
case Qt::Key_CapsLock:
|
||||
@@ -517,13 +522,32 @@ void AutoTypeExecutorWin::execChar(AutoTypeChar* action)
|
||||
{
|
||||
m_platform->sendChar(action->character, true);
|
||||
m_platform->sendChar(action->character, false);
|
||||
::Sleep(25);
|
||||
}
|
||||
|
||||
void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
|
||||
{
|
||||
m_platform->sendKey(action->key, true);
|
||||
m_platform->sendKey(action->key, false);
|
||||
::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) 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
|
||||
@@ -45,7 +46,7 @@ public:
|
||||
void sendChar(const QChar& ch, bool isKeyDown);
|
||||
void sendKey(Qt::Key key, bool isKeyDown);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void globalShortcutTriggered();
|
||||
|
||||
private:
|
||||
@@ -64,6 +65,7 @@ public:
|
||||
|
||||
void execChar(AutoTypeChar* action) override;
|
||||
void execKey(AutoTypeKey* action) override;
|
||||
void execClearField(AutoTypeClearField* action) override;
|
||||
|
||||
private:
|
||||
AutoTypePlatformWin* const m_platform;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||
* 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
|
||||
* 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())
|
||||
&& m_loaded) {
|
||||
if (type == XCB_KEY_PRESS) {
|
||||
Q_EMIT globalShortcutTriggered();
|
||||
emit globalShortcutTriggered();
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -435,6 +436,8 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
|
||||
return XK_Tab;
|
||||
case Qt::Key_Enter:
|
||||
return XK_Return;
|
||||
case Qt::Key_Space:
|
||||
return XK_space;
|
||||
case Qt::Key_Up:
|
||||
return XK_Up;
|
||||
case Qt::Key_Down:
|
||||
@@ -471,6 +474,12 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
|
||||
return XK_Print;
|
||||
case Qt::Key_ScrollLock:
|
||||
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:
|
||||
if (key >= Qt::Key_F1 && key <= Qt::Key_F16) {
|
||||
return XK_F1 + (key - Qt::Key_F1);
|
||||
@@ -632,21 +641,13 @@ int AutoTypePlatformX11::AddKeysym(KeySym keysym)
|
||||
* If input focus is specified explicitly, select the window
|
||||
* before send event to the window.
|
||||
*/
|
||||
void AutoTypePlatformX11::SendEvent(XKeyEvent* event, int event_type)
|
||||
void AutoTypePlatformX11::SendKeyEvent(unsigned keycode, bool press)
|
||||
{
|
||||
XSync(event->display, False);
|
||||
XSync(m_dpy, False);
|
||||
int (*oldHandler) (Display*, XErrorEvent*) = XSetErrorHandler(MyErrorHandler);
|
||||
|
||||
event->type = event_type;
|
||||
Bool press;
|
||||
if (event->type == KeyPress) {
|
||||
press = True;
|
||||
}
|
||||
else {
|
||||
press = False;
|
||||
}
|
||||
XTestFakeKeyEvent(event->display, event->keycode, press, 0);
|
||||
XFlush(event->display);
|
||||
XTestFakeKeyEvent(m_dpy, keycode, press, 0);
|
||||
XFlush(m_dpy);
|
||||
|
||||
XSetErrorHandler(oldHandler);
|
||||
}
|
||||
@@ -655,17 +656,12 @@ void AutoTypePlatformX11::SendEvent(XKeyEvent* event, int event_type)
|
||||
* Send a modifier press/release event for all modifiers
|
||||
* which are set in the mask variable.
|
||||
*/
|
||||
void AutoTypePlatformX11::SendModifier(XKeyEvent *event, unsigned int mask, int event_type)
|
||||
void AutoTypePlatformX11::SendModifiers(unsigned int mask, bool press)
|
||||
{
|
||||
int mod_index;
|
||||
for (mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) {
|
||||
if (mask & (1 << mod_index)) {
|
||||
event->keycode = m_modifier_keycode[mod_index];
|
||||
SendEvent(event, event_type);
|
||||
if (event_type == KeyPress)
|
||||
event->state |= (1 << mod_index);
|
||||
else
|
||||
event->state &= (1 << mod_index);
|
||||
SendKeyEvent(m_modifier_keycode[mod_index], press);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -720,37 +716,15 @@ bool AutoTypePlatformX11::keysymModifiers(KeySym keysym, int keycode, unsigned i
|
||||
* window to simulate keyboard. If modifiers (shift, control, etc)
|
||||
* are set ON, many events will be sent.
|
||||
*/
|
||||
void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
||||
void AutoTypePlatformX11::SendKey(KeySym keysym, unsigned int modifiers)
|
||||
{
|
||||
Window cur_focus;
|
||||
int revert_to;
|
||||
XKeyEvent event;
|
||||
int keycode;
|
||||
|
||||
if (keysym == NoSymbol) {
|
||||
qWarning("No such key: keysym=0x%lX", keysym);
|
||||
return;
|
||||
}
|
||||
|
||||
XGetInputFocus(m_dpy, &cur_focus, &revert_to);
|
||||
|
||||
event.display = m_dpy;
|
||||
event.window = cur_focus;
|
||||
event.root = m_rootWindow;
|
||||
event.subwindow = None;
|
||||
event.time = CurrentTime;
|
||||
event.x = 1;
|
||||
event.y = 1;
|
||||
event.x_root = 1;
|
||||
event.y_root = 1;
|
||||
event.same_screen = True;
|
||||
|
||||
Window root, child;
|
||||
int root_x, root_y, x, y;
|
||||
unsigned int wanted_mask = 0;
|
||||
unsigned int original_mask;
|
||||
|
||||
XQueryPointer(m_dpy, event.root, &root, &child, &root_x, &root_y, &x, &y, &original_mask);
|
||||
int keycode;
|
||||
unsigned int wanted_mask;
|
||||
|
||||
/* determine keycode and mask for the given keysym */
|
||||
keycode = GetKeycode(keysym, &wanted_mask);
|
||||
@@ -758,8 +732,14 @@ void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
||||
qWarning("Unable to get valid keycode for key: keysym=0x%lX", keysym);
|
||||
return;
|
||||
}
|
||||
wanted_mask |= modifiers;
|
||||
|
||||
event.state = original_mask;
|
||||
Window root, child;
|
||||
int root_x, root_y, x, y;
|
||||
unsigned int original_mask;
|
||||
|
||||
XSync(m_dpy, False);
|
||||
XQueryPointer(m_dpy, m_rootWindow, &root, &child, &root_x, &root_y, &x, &y, &original_mask);
|
||||
|
||||
// modifiers that need to be pressed but aren't
|
||||
unsigned int press_mask = wanted_mask & ~original_mask;
|
||||
@@ -770,44 +750,52 @@ void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
|
||||
// modifiers we need to release before sending the keycode
|
||||
unsigned int release_mask = 0;
|
||||
|
||||
// check every release_check_mask individually if it affects the keysym we would generate
|
||||
// if it doesn't we probably don't need to release it
|
||||
for (int mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) {
|
||||
if (release_check_mask & (1 << mod_index)) {
|
||||
unsigned int mods_rtrn;
|
||||
KeySym keysym_rtrn;
|
||||
XkbTranslateKeyCode(m_xkb, keycode, wanted_mask | (1 << mod_index), &mods_rtrn, &keysym_rtrn);
|
||||
if (!modifiers) {
|
||||
// check every release_check_mask individually if it affects the keysym we would generate
|
||||
// if it doesn't we probably don't need to release it
|
||||
for (int mod_index = ShiftMapIndex; mod_index <= Mod5MapIndex; mod_index ++) {
|
||||
if (release_check_mask & (1 << mod_index)) {
|
||||
unsigned int mods_rtrn;
|
||||
KeySym keysym_rtrn;
|
||||
XkbTranslateKeyCode(m_xkb, keycode, wanted_mask | (1 << mod_index), &mods_rtrn, &keysym_rtrn);
|
||||
|
||||
if (keysym_rtrn != keysym) {
|
||||
release_mask |= (1 << mod_index);
|
||||
if (keysym_rtrn != keysym) {
|
||||
release_mask |= (1 << mod_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally check if the combination of pressed modifiers that we chose to ignore affects the keysym
|
||||
unsigned int mods_rtrn;
|
||||
KeySym keysym_rtrn;
|
||||
XkbTranslateKeyCode(m_xkb, keycode, wanted_mask | (release_check_mask & ~release_mask), &mods_rtrn, &keysym_rtrn);
|
||||
if (keysym_rtrn != keysym) {
|
||||
// oh well, release all the modifiers we don't want
|
||||
// finally check if the combination of pressed modifiers that we chose to ignore affects the keysym
|
||||
unsigned int mods_rtrn;
|
||||
KeySym keysym_rtrn;
|
||||
XkbTranslateKeyCode(m_xkb, keycode, wanted_mask | (release_check_mask & ~release_mask), &mods_rtrn, &keysym_rtrn);
|
||||
if (keysym_rtrn != keysym) {
|
||||
// oh well, release all the modifiers we don't want
|
||||
release_mask = release_check_mask;
|
||||
}
|
||||
} else {
|
||||
release_mask = release_check_mask;
|
||||
}
|
||||
|
||||
/* release all modifiers */
|
||||
SendModifier(&event, release_mask, KeyRelease);
|
||||
/* set modifiers mask */
|
||||
if ((release_mask | press_mask) & LockMask) {
|
||||
SendModifiers(LockMask, true);
|
||||
SendModifiers(LockMask, false);
|
||||
}
|
||||
SendModifiers(release_mask & ~LockMask, false);
|
||||
SendModifiers(press_mask & ~LockMask, true);
|
||||
|
||||
SendModifier(&event, press_mask, KeyPress);
|
||||
/* press and release release key */
|
||||
SendKeyEvent(keycode, true);
|
||||
SendKeyEvent(keycode, false);
|
||||
|
||||
/* press and release key */
|
||||
event.keycode = keycode;
|
||||
SendEvent(&event, KeyPress);
|
||||
SendEvent(&event, KeyRelease);
|
||||
|
||||
/* release the modifiers */
|
||||
SendModifier(&event, press_mask, KeyRelease);
|
||||
|
||||
/* restore the old keyboard mask */
|
||||
SendModifier(&event, release_mask, KeyPress);
|
||||
/* restore previous modifiers mask */
|
||||
SendModifiers(press_mask & ~LockMask, false);
|
||||
SendModifiers(release_mask & ~LockMask, true);
|
||||
if ((release_mask | press_mask) & LockMask) {
|
||||
SendModifiers(LockMask, true);
|
||||
SendModifiers(LockMask, false);
|
||||
}
|
||||
}
|
||||
|
||||
int AutoTypePlatformX11::MyErrorHandler(Display* my_dpy, XErrorEvent* event)
|
||||
@@ -830,14 +818,33 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform)
|
||||
|
||||
void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
|
||||
{
|
||||
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
|
||||
m_platform->SendKey(m_platform->charToKeySym(action->character));
|
||||
}
|
||||
|
||||
void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
|
||||
{
|
||||
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
|
||||
m_platform->SendKey(m_platform->keyToKeySym(action->key));
|
||||
}
|
||||
|
||||
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_Home), static_cast<unsigned int>(ControlMask));
|
||||
nanosleep(&ts, nullptr);
|
||||
|
||||
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_End), static_cast<unsigned int>(ControlMask | ShiftMask));
|
||||
nanosleep(&ts, nullptr);
|
||||
|
||||
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Backspace));
|
||||
nanosleep(&ts, nullptr);
|
||||
}
|
||||
|
||||
|
||||
int AutoTypePlatformX11::initialTimeout()
|
||||
{
|
||||
return 500;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -57,9 +58,9 @@ public:
|
||||
KeySym charToKeySym(const QChar& ch);
|
||||
KeySym keyToKeySym(Qt::Key key);
|
||||
|
||||
void SendKeyPressedEvent(KeySym keysym);
|
||||
void SendKey(KeySym keysym, unsigned int modifiers = 0);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void globalShortcutTriggered();
|
||||
|
||||
private:
|
||||
@@ -78,8 +79,8 @@ private:
|
||||
bool isRemapKeycodeValid();
|
||||
int AddKeysym(KeySym keysym);
|
||||
void AddModifier(KeySym keysym);
|
||||
void SendEvent(XKeyEvent* event, int event_type);
|
||||
void SendModifier(XKeyEvent *event, unsigned int mask, int event_type);
|
||||
void SendKeyEvent(unsigned keycode, bool press);
|
||||
void SendModifiers(unsigned int mask, bool press);
|
||||
int GetKeycode(KeySym keysym, unsigned int *mask);
|
||||
bool keysymModifiers(KeySym keysym, int keycode, unsigned int *mask);
|
||||
|
||||
@@ -126,6 +127,7 @@ public:
|
||||
|
||||
void execChar(AutoTypeChar* action) override;
|
||||
void execKey(AutoTypeKey* action) override;
|
||||
void execClearField(AutoTypeClearField* action) override;
|
||||
|
||||
private:
|
||||
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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -13,24 +13,33 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# 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)
|
||||
target_link_libraries(kdbx-extract
|
||||
add_library(cli STATIC ${cli_SOURCES})
|
||||
target_link_libraries(cli Qt5::Core Qt5::Widgets)
|
||||
|
||||
add_executable(keepassxc-cli keepassxc-cli.cpp)
|
||||
target_link_libraries(keepassxc-cli
|
||||
cli
|
||||
keepassx_core
|
||||
Qt5::Core
|
||||
${GCRYPT_LIBRARIES}
|
||||
${GPGERROR_LIBRARIES}
|
||||
${ZLIB_LIBRARIES})
|
||||
${ZLIB_LIBRARIES}
|
||||
zxcvbn)
|
||||
|
||||
add_executable(kdbx-merge kdbx-merge.cpp)
|
||||
target_link_libraries(kdbx-merge
|
||||
keepassx_core
|
||||
Qt5::Core
|
||||
${GCRYPT_LIBRARIES}
|
||||
${GPGERROR_LIBRARIES}
|
||||
${ZLIB_LIBRARIES})
|
||||
|
||||
|
||||
add_executable(entropy-meter entropy-meter.cpp)
|
||||
target_link_libraries(entropy-meter zxcvbn)
|
||||
install(TARGETS keepassxc-cli
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${CLI_INSTALL_DIR} COMPONENT Runtime)
|
||||