Compare commits
844 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e31d86596 | ||
|
|
ab007e2bb2 | ||
|
|
c45d55b94b | ||
|
|
7048bd8cc9 | ||
|
|
cae6ca987f | ||
|
|
65171cfb3a | ||
|
|
7ec636aeb6 | ||
|
|
c96980a57d | ||
|
|
0959ceeff2 | ||
|
|
1988c9d8c4 | ||
|
|
1eaa1e47fe | ||
|
|
31923b314e | ||
|
|
ee840b62e5 | ||
|
|
363efaa408 | ||
|
|
b0beeea95f | ||
|
|
d0a4650d69 | ||
|
|
ec5a84cf01 | ||
|
|
a057eb8590 | ||
|
|
6a8753b119 | ||
|
|
23fab90a31 | ||
|
|
8fdf9cac6b | ||
|
|
525d12f5a2 | ||
|
|
15d247a708 | ||
|
|
a1d0b85277 | ||
|
|
5e5a77b040 | ||
|
|
e420ae6942 | ||
|
|
0be7c0273e | ||
|
|
864b7cd41e | ||
|
|
78c8f13645 | ||
|
|
c87c456ae0 | ||
|
|
94d9b8fb39 | ||
|
|
2dad027001 | ||
|
|
f97bb240d7 | ||
|
|
80332fb6ab | ||
|
|
287ec2f3df | ||
|
|
eb5824f713 | ||
|
|
eded901f69 | ||
|
|
fd30df82cb | ||
|
|
d8888432c3 | ||
|
|
51712fea53 | ||
|
|
f597f99198 | ||
|
|
74ec37f3c7 | ||
|
|
05178f0fbf | ||
|
|
9ce09713b6 | ||
|
|
4fa6faf608 | ||
|
|
a24ae13d9c | ||
|
|
64dd0d1b45 | ||
|
|
da63b1223c | ||
|
|
36f32c2aef | ||
|
|
063acadc3b | ||
|
|
81c720c05b | ||
|
|
edcdcb945a | ||
|
|
5df6430bb2 | ||
|
|
9a0096d07c | ||
|
|
25d33d6057 | ||
|
|
ab4c6247c7 | ||
|
|
1b69dbb38b | ||
|
|
bfdd488b00 | ||
|
|
54c8809bf4 | ||
|
|
0873665bec | ||
|
|
02b3033ca3 | ||
|
|
a27c8ad90c | ||
|
|
18a58f73de | ||
|
|
d1451a3c90 | ||
|
|
0bef47b2f3 | ||
|
|
ccc05d6658 | ||
|
|
c15de69156 | ||
|
|
8bfb44fd28 | ||
|
|
79d3b84fad | ||
|
|
b97701586e | ||
|
|
b120345fe7 | ||
|
|
ec5c65a530 | ||
|
|
77e7a1fa8d | ||
|
|
f6d45b68ef | ||
|
|
24d76a0d75 | ||
|
|
c3326efe94 | ||
|
|
c0e056bb84 | ||
|
|
8a7df36701 | ||
|
|
39ec6b1bb2 | ||
|
|
30b2406533 | ||
|
|
076d5dda0e | ||
|
|
e78eab46ff | ||
|
|
19a08f8d5e | ||
|
|
c6319117fd | ||
|
|
4c10ed4ada | ||
|
|
b0ab3ca80b | ||
|
|
9f89a2fe76 | ||
|
|
e386bfb550 | ||
|
|
0189a3f1bd | ||
|
|
d3a333e03c | ||
|
|
04d3e282fb | ||
|
|
4be5f970d5 | ||
|
|
31ceff181e | ||
|
|
42abf4101c | ||
|
|
f09cae74fb | ||
|
|
13a6393ec5 | ||
|
|
ace57f9dd4 | ||
|
|
e5117a98c9 | ||
|
|
c1f7af7e6f | ||
|
|
b4c116e2a2 | ||
|
|
a19a960b5e | ||
|
|
29d2094626 | ||
|
|
c3b82e6818 | ||
|
|
1a7c89326b | ||
|
|
3a1f04ac2d | ||
|
|
2c8e95a0f4 | ||
|
|
a9d94ef732 | ||
|
|
2756d17873 | ||
|
|
34d7f84fc2 | ||
|
|
cea9b389bf | ||
|
|
71b1e881d8 | ||
|
|
7ba47e9d44 | ||
|
|
be48cb646c | ||
|
|
47eb5ff1d9 | ||
|
|
b608f5a670 | ||
|
|
e81dc34c4e | ||
|
|
1603e627a3 | ||
|
|
bf978b3e0f | ||
|
|
0fdaf33288 | ||
|
|
367c4153c1 | ||
|
|
395c673a24 | ||
|
|
22de23c651 | ||
|
|
23926d2461 | ||
|
|
c03f31b6ba | ||
|
|
a1060a8538 | ||
|
|
24251bc223 | ||
|
|
f78749d2cd | ||
|
|
0995377d39 | ||
|
|
b9228e64ff | ||
|
|
c4084de716 | ||
|
|
3c667918e7 | ||
|
|
e55745cbcf | ||
|
|
e01ce20431 | ||
|
|
dce8cb83d9 | ||
|
|
8dc956c55b | ||
|
|
6c77921a32 | ||
|
|
55e4748f06 | ||
|
|
5ff9e02517 | ||
|
|
7f7ebc36f5 | ||
|
|
0e5bfc03ce | ||
|
|
b309d333a6 | ||
|
|
ee439382ed | ||
|
|
192212c682 | ||
|
|
148bdfdcd6 | ||
|
|
066c0ba189 | ||
|
|
9651f1cddf | ||
|
|
5feb9b0806 | ||
|
|
44b9ee19e7 | ||
|
|
cc16d19bc4 | ||
|
|
b96c2de2b7 | ||
|
|
f882b80708 | ||
|
|
4d7c014b23 | ||
|
|
1f274699e5 | ||
|
|
697e355f07 | ||
|
|
e89bdfc422 | ||
|
|
c2cc9e62a7 | ||
|
|
1f2ae0d061 | ||
|
|
91a39588c6 | ||
|
|
a642f86d5b | ||
|
|
00cf290574 | ||
|
|
b59952b539 | ||
|
|
88b4ff9809 | ||
|
|
ddd0965a82 | ||
|
|
0a9491ff46 | ||
|
|
32b44e3d87 | ||
|
|
268004b4ff | ||
|
|
6c0f6ae62e | ||
|
|
094f2bb540 | ||
|
|
f4da7f1fb0 | ||
|
|
b058185d3b | ||
|
|
eecb981736 | ||
|
|
46b870e260 | ||
|
|
1ffab7337d | ||
|
|
82fb8c49cf | ||
|
|
ff2d59d32f | ||
|
|
0ced165b3e | ||
|
|
d3378c131a | ||
|
|
0300a85295 | ||
|
|
60a116f3e0 | ||
|
|
ff4d2d488f | ||
|
|
b0852b4cf5 | ||
|
|
c047b4d4de | ||
|
|
6655da9d24 | ||
|
|
cc6abfc366 | ||
|
|
4e3d4c3153 | ||
|
|
c323041040 | ||
|
|
95d600c5f1 | ||
|
|
52a47fbc67 | ||
|
|
4e7c069c1f | ||
|
|
f89ffa513a | ||
|
|
0086916b4d | ||
|
|
df5ef6fe67 | ||
|
|
c9e51dcfc1 | ||
|
|
c05adfd817 | ||
|
|
055410e38f | ||
|
|
6163de378e | ||
|
|
22938cd697 | ||
|
|
a493f81ec2 | ||
|
|
87cb2a7114 | ||
|
|
a875b46a80 | ||
|
|
704ba791fd | ||
|
|
c24d6bd71c | ||
|
|
9b319cf189 | ||
|
|
1a9eb19f0d | ||
|
|
1943cc60b6 | ||
|
|
761c05c358 | ||
|
|
b08c1ada02 | ||
|
|
dab17e381c | ||
|
|
114f66f297 | ||
|
|
f8878833de | ||
|
|
364d4340fd | ||
|
|
6226a6ee8f | ||
|
|
c49edeb09d | ||
|
|
7e794cd94f | ||
|
|
933a62de01 | ||
|
|
23f8e3b4f8 | ||
|
|
3502edf71b | ||
|
|
4d8a371e43 | ||
|
|
01fd3242c4 | ||
|
|
9c289334e9 | ||
|
|
002142539b | ||
|
|
e1d1c10fad | ||
|
|
577bc546d8 | ||
|
|
85a832fb7c | ||
|
|
a9f23a8331 | ||
|
|
5d24599546 | ||
|
|
07d9d3770b | ||
|
|
c9ddb12b5a | ||
|
|
0932ee6051 | ||
|
|
ee1b8465a3 | ||
|
|
26bd164168 | ||
|
|
00e819bd92 | ||
|
|
740d33b378 | ||
|
|
f0b284eda7 | ||
|
|
da370c8b36 | ||
|
|
203b9c7f6b | ||
|
|
7932ec3cc1 | ||
|
|
3f15e02881 | ||
|
|
6fb5c04bde | ||
|
|
578bcc3522 | ||
|
|
99dea76fd1 | ||
|
|
b680540adf | ||
|
|
67f57a443c | ||
|
|
2b3b4f9daf | ||
|
|
ba01a697e6 | ||
|
|
16d81db117 | ||
|
|
4ce92f1a98 | ||
|
|
21c63637bd | ||
|
|
18f764e4d5 | ||
|
|
5930ca8ac7 | ||
|
|
49be4a3be2 | ||
|
|
1e50620f53 | ||
|
|
5e82dc1841 | ||
|
|
33d76962a7 | ||
|
|
6ce1c17ee1 | ||
|
|
8d9b4d3669 | ||
|
|
fb79b8a7f8 | ||
|
|
b0236eaa24 | ||
|
|
19bbff708e | ||
|
|
1399ea13cc | ||
|
|
a25d9fd3b4 | ||
|
|
72d51e4667 | ||
|
|
f6e3838eb2 | ||
|
|
c1fdecae2d | ||
|
|
4104db65bb | ||
|
|
36cb827406 | ||
|
|
69a4558fe4 | ||
|
|
928eae419f | ||
|
|
50edac8ee8 | ||
|
|
945951cda5 | ||
|
|
fa95a638af | ||
|
|
3b6aeb1fc8 | ||
|
|
6543a01418 | ||
|
|
9724e52f1b | ||
|
|
9413a30a08 | ||
|
|
6a9a2559d2 | ||
|
|
78b6f4df01 | ||
|
|
b7e88aa2ef | ||
|
|
224fd21612 | ||
|
|
a6bf33c501 | ||
|
|
306a9421fb | ||
|
|
d5885daf0f | ||
|
|
52b3f7105d | ||
|
|
7f6dc291c0 | ||
|
|
eacb849353 | ||
|
|
367bc401ee | ||
|
|
92af3ea725 | ||
|
|
582ce4cfa0 | ||
|
|
43ae3dfce5 | ||
|
|
ce851a7a8b | ||
|
|
b5b7589b41 | ||
|
|
b638341c14 | ||
|
|
7274417f84 | ||
|
|
1967226c71 | ||
|
|
227ea8ed24 | ||
|
|
e705db8339 | ||
|
|
be65f78174 | ||
|
|
fd6a17f3e6 | ||
|
|
0353d7b6a6 | ||
|
|
a64724be0e | ||
|
|
a0d9d41455 | ||
|
|
84e8ab5b71 | ||
|
|
f5bbb12434 | ||
|
|
a07d2cddd2 | ||
|
|
f1878640c8 | ||
|
|
edf8147561 | ||
|
|
3a9ab3a86f | ||
|
|
8f912ca0c5 | ||
|
|
a827056d28 | ||
|
|
6c90989584 | ||
|
|
08acf5e9aa | ||
|
|
bca295183b | ||
|
|
a400a2e0bb | ||
|
|
8c15839753 | ||
|
|
810024f4c9 | ||
|
|
de7bcca5fe | ||
|
|
6552a48639 | ||
|
|
aee0f0c882 | ||
|
|
e353193fbb | ||
|
|
fb547e9100 | ||
|
|
44289c8781 | ||
|
|
d4a5ab252d | ||
|
|
a3b3c28694 | ||
|
|
976c41a3b8 | ||
|
|
da087292fd | ||
|
|
274f59f93b | ||
|
|
85d810d2cf | ||
|
|
47f151c594 | ||
|
|
7b5ef2186e | ||
|
|
8236dafb96 | ||
|
|
56e5627b6b | ||
|
|
38db0eddab | ||
|
|
710625e2a3 | ||
|
|
a5e7af6c1f | ||
|
|
5fe4d2db2b | ||
|
|
b2c587e2f8 | ||
|
|
40c2d891c1 | ||
|
|
d5ad3a8a70 | ||
|
|
c74382af4f | ||
|
|
0be0111724 | ||
|
|
f0d454b511 | ||
|
|
b79a45403e | ||
|
|
1cc60e755b | ||
|
|
7fb7cc8c46 | ||
|
|
1400889b23 | ||
|
|
44fa9bd141 | ||
|
|
992dffa032 | ||
|
|
5fa7e48c24 | ||
|
|
3b00dfebed | ||
|
|
b42c7e07e6 | ||
|
|
ab7bfabf12 | ||
|
|
ab72644ace | ||
|
|
218fa040c8 | ||
|
|
b8f783f104 | ||
|
|
ae2e3e7fb1 | ||
|
|
edd9d9aee3 | ||
|
|
8c66085621 | ||
|
|
40ab325a37 | ||
|
|
7ae95b14f4 | ||
|
|
5da6103fb5 | ||
|
|
6b5b9db20a | ||
|
|
eb39d144e4 | ||
|
|
cfaaf4a2c4 | ||
|
|
279a738aa6 | ||
|
|
10b55f11a2 | ||
|
|
25065c4151 | ||
|
|
d2657bc154 | ||
|
|
4fde3f4a65 | ||
|
|
e398cfb27c | ||
|
|
3cc670ec29 | ||
|
|
c8d9e8458a | ||
|
|
892419e880 | ||
|
|
13fb49cf39 | ||
|
|
eabe3f968e | ||
|
|
2ca5eaaab9 | ||
|
|
eed3deac67 | ||
|
|
a63863b65c | ||
|
|
748ff13bce | ||
|
|
6c7700c2e7 | ||
|
|
c8ccb014c8 | ||
|
|
f1bd14e8de | ||
|
|
024d01a192 | ||
|
|
b2d02ef0bd | ||
|
|
751d7deda6 | ||
|
|
fff795146e | ||
|
|
c6219581f6 | ||
|
|
d0c5fb2395 | ||
|
|
6c2c81dc83 | ||
|
|
bfdb0c0012 | ||
|
|
d870d6c326 | ||
|
|
c06410e726 | ||
|
|
ef03ebe086 | ||
|
|
a217e8f24c | ||
|
|
c164beb040 | ||
|
|
5171e5880d | ||
|
|
2ef62524d6 | ||
|
|
4bbb29c2b4 | ||
|
|
261776cc78 | ||
|
|
3008142b1b | ||
|
|
152e729768 | ||
|
|
e7c77df59e | ||
|
|
4ff1a13f32 | ||
|
|
b9b18d6120 | ||
|
|
4945ce3c8c | ||
|
|
19aa8c63c0 | ||
|
|
efd11b61c6 | ||
|
|
1facb1f95d | ||
|
|
3db0788a91 | ||
|
|
e068098046 | ||
|
|
f2d289326b | ||
|
|
ae57f27eb9 | ||
|
|
a1767b2f7f | ||
|
|
5e9fcf7537 | ||
|
|
8192cc7eea | ||
|
|
2b8e1f2504 | ||
|
|
9d01f80744 | ||
|
|
1a04c9da67 | ||
|
|
d35e1baee1 | ||
|
|
2f16e50c87 | ||
|
|
3a662f7afb | ||
|
|
903a78623c | ||
|
|
7cd2f39f82 | ||
|
|
949dd5db35 | ||
|
|
49a5c5bb8b | ||
|
|
48aa355eea | ||
|
|
644b2673e0 | ||
|
|
8eed62e639 | ||
|
|
04c8449e5f | ||
|
|
9dd776ff6c | ||
|
|
016868e95a | ||
|
|
5d9c664fba | ||
|
|
a662c85728 | ||
|
|
5c4b7d427d | ||
|
|
12cc8bfd95 | ||
|
|
11c6f20c90 | ||
|
|
c602ec310d | ||
|
|
60a4180dd6 | ||
|
|
8e42721959 | ||
|
|
4553fa1d09 | ||
|
|
b206a3b8e2 | ||
|
|
3bff5a061b | ||
|
|
0bc9b6f44e | ||
|
|
905f70a186 | ||
|
|
a8707b681d | ||
|
|
5d8f9f5346 | ||
|
|
e43ff398cd | ||
|
|
a441b1d562 | ||
|
|
6e2042cd55 | ||
|
|
bb8b58dc66 | ||
|
|
9cd099056b | ||
|
|
0adbc032ae | ||
|
|
22a679fb8c | ||
|
|
35a67fab0a | ||
|
|
fdc8117211 | ||
|
|
24208e6137 | ||
|
|
c0cd255ea3 | ||
|
|
a0375fd000 | ||
|
|
6d847cd5f9 | ||
|
|
6470a3f539 | ||
|
|
c6111d09ce | ||
|
|
d6012854a9 | ||
|
|
46c7026726 | ||
|
|
01ad3c4d81 | ||
|
|
4ac98bde73 | ||
|
|
f42a6d6ef6 | ||
|
|
9055c6ade7 | ||
|
|
1356a5bbaa | ||
|
|
3c320c2736 | ||
|
|
969757199e | ||
|
|
60f1c65a48 | ||
|
|
b87b0e16e6 | ||
|
|
8ed0b1be55 | ||
|
|
91b5f1076f | ||
|
|
8ec2457965 | ||
|
|
82d79b1188 | ||
|
|
e33601becd | ||
|
|
334443adbb | ||
|
|
99579e8a2a | ||
|
|
89438f7ace | ||
|
|
d323ec5dd9 | ||
|
|
bb5cf37330 | ||
|
|
4b0bdd648c | ||
|
|
5588fbe695 | ||
|
|
12ea381205 | ||
|
|
99fbf25fb2 | ||
|
|
b37645e14d | ||
|
|
1ec5a1aaa2 | ||
|
|
3eb7acde25 | ||
|
|
e53e39cfad | ||
|
|
1a17f40233 | ||
|
|
10094a997a | ||
|
|
2af38b093f | ||
|
|
b03c168175 | ||
|
|
1c6bc84d2d | ||
|
|
541239c17b | ||
|
|
74b4ade15a | ||
|
|
205502fd3b | ||
|
|
54e4217216 | ||
|
|
d2579a7754 | ||
|
|
76580840dd | ||
|
|
779e59156c | ||
|
|
b0f0d0b1cd | ||
|
|
858dcb53bd | ||
|
|
9d7db88fcb | ||
|
|
2099b7c6a0 | ||
|
|
4442564ad2 | ||
|
|
12148b5c9b | ||
|
|
d7d77a49fc | ||
|
|
b70c2f5c20 | ||
|
|
033249423f | ||
|
|
0c959e8661 | ||
|
|
79785241ea | ||
|
|
0090862313 | ||
|
|
a4a68c6622 | ||
|
|
49b4c341ae | ||
|
|
7c1f91abdd | ||
|
|
1f2ba7e254 | ||
|
|
8014bcb7c4 | ||
|
|
b1c8bf5954 | ||
|
|
0eb6740bac | ||
|
|
96531b548a | ||
|
|
f3371360ed | ||
|
|
c1b92f9fed | ||
|
|
b028ca0738 | ||
|
|
a9aab30d55 | ||
|
|
efbad3a3c8 | ||
|
|
b6ed959f98 | ||
|
|
477953f965 | ||
|
|
aaf59cece5 | ||
|
|
e88b7e8ec2 | ||
|
|
078b09b5f4 | ||
|
|
0d06fe764a | ||
|
|
94f8c39a9e | ||
|
|
7d1bd9da86 | ||
|
|
ed8cdf6910 | ||
|
|
7ee83847c8 | ||
|
|
52eca1362f | ||
|
|
eec1af09c4 | ||
|
|
c651c8cbf9 | ||
|
|
da6a398624 | ||
|
|
1418512a9f | ||
|
|
dd2859880b | ||
|
|
f38d8ba2e4 | ||
|
|
fdd52a2520 | ||
|
|
e2c0792043 | ||
|
|
e8889530b0 | ||
|
|
23f67d950a | ||
|
|
0bd1f507ab | ||
|
|
2bcfc143f6 | ||
|
|
9dc21bf8a3 | ||
|
|
70f627ba06 | ||
|
|
0683c26d41 | ||
|
|
dbc085d4d4 | ||
|
|
804eaa700e | ||
|
|
646922665d | ||
|
|
62ad2f19e3 | ||
|
|
14f55420f9 | ||
|
|
d4ea0ba6ba | ||
|
|
c06f7b7ecb | ||
|
|
3a50eece9e | ||
|
|
44f0fb0242 | ||
|
|
c210e2b72f | ||
|
|
7b5079f043 | ||
|
|
be4027fb36 | ||
|
|
0f03b47a46 | ||
|
|
c923e0803e | ||
|
|
bd74dbbfc5 | ||
|
|
a0599e75b7 | ||
|
|
f334b6349b | ||
|
|
2ff9fcfa1d | ||
|
|
aa23e4698b | ||
|
|
302fdeb1f9 | ||
|
|
eea8542fc0 | ||
|
|
a36d79e993 | ||
|
|
be5c1b2072 | ||
|
|
f0bd1ea48e | ||
|
|
90d0460a42 | ||
|
|
c15ce2b20b | ||
|
|
b51f210bfa | ||
|
|
105c76c055 | ||
|
|
6b15b7a58f | ||
|
|
fee0aae975 | ||
|
|
b33b638d2d | ||
|
|
1e677a5f0f | ||
|
|
3f3f6c0f39 | ||
|
|
5dd53b48ef | ||
|
|
a215e11b20 | ||
|
|
7d71f9dd2d | ||
|
|
183f1574ca | ||
|
|
504b651bb9 | ||
|
|
c848ff4bdb | ||
|
|
5aa8f5bc01 | ||
|
|
6c5d5a543c | ||
|
|
a8bc849b5d | ||
|
|
5f535b9661 | ||
|
|
eaf865539c | ||
|
|
75448c41d4 | ||
|
|
afc96e2021 | ||
|
|
d7bce80c7b | ||
|
|
7e07d20d31 | ||
|
|
238111be09 | ||
|
|
6f0820a3ed | ||
|
|
1d0d1c249b | ||
|
|
1b5ed68375 | ||
|
|
ce996b3fc8 | ||
|
|
2789522948 | ||
|
|
55a56cc275 | ||
|
|
20101527b2 | ||
|
|
311bd39100 | ||
|
|
fab77a15f0 | ||
|
|
09e7f5c618 | ||
|
|
c5a674b1df | ||
|
|
f83453cfc7 | ||
|
|
1ca8ebebd9 | ||
|
|
7cc73ed46c | ||
|
|
01b4694b47 | ||
|
|
bcc6d59c6b | ||
|
|
b4e2e5f586 | ||
|
|
43ed874789 | ||
|
|
8928c87fc3 | ||
|
|
e3f8a918d6 | ||
|
|
668bb94270 | ||
|
|
89e0543e0a | ||
|
|
6695b50965 | ||
|
|
5c02c85126 | ||
|
|
de99c0c7e7 | ||
|
|
9f0348979b | ||
|
|
5b5cd310b9 | ||
|
|
ea85d68a26 | ||
|
|
fb0a883f7b | ||
|
|
64a0efe29a | ||
|
|
1f361b7260 | ||
|
|
763b06477d | ||
|
|
cd7d2a0778 | ||
|
|
a4be3f304d | ||
|
|
88184d14d6 | ||
|
|
844d8eba47 | ||
|
|
5e65945a53 | ||
|
|
428040762f | ||
|
|
30e0a13bc5 | ||
|
|
275c2b1a6b | ||
|
|
e409814cb6 | ||
|
|
acdb624713 | ||
|
|
3cae8e7124 | ||
|
|
2595b9eae7 | ||
|
|
46a8561925 | ||
|
|
bb74cab887 | ||
|
|
dd7f58b9b9 | ||
|
|
ee080222d8 | ||
|
|
c7aaa3ab28 | ||
|
|
fcde01fd4c | ||
|
|
83be334ee8 | ||
|
|
819f76c2b9 | ||
|
|
783b16676f | ||
|
|
aa6160ab62 | ||
|
|
8bae06802b | ||
|
|
a20f572448 | ||
|
|
f74aa1e9a6 | ||
|
|
86525570aa | ||
|
|
d11ce781d0 | ||
|
|
be5a50a000 | ||
|
|
7309a894bc | ||
|
|
310f29d3fd | ||
|
|
07db03d6bc | ||
|
|
d68c4b379f | ||
|
|
396a12dfde | ||
|
|
c79f4f91a8 | ||
|
|
bec2f7c9b9 | ||
|
|
d4c8cad0e2 | ||
|
|
0ad2bd4b91 | ||
|
|
dcc8f9fa6c | ||
|
|
d7a93c74aa | ||
|
|
408547611b | ||
|
|
a8f0e79046 | ||
|
|
3e45147497 | ||
|
|
48310d3f5e | ||
|
|
1831a975eb | ||
|
|
a766a44bcf | ||
|
|
8165b83a27 | ||
|
|
fa62c270e6 | ||
|
|
c03199e78a | ||
|
|
f346503534 | ||
|
|
287f1c55ff | ||
|
|
1c6523bcec | ||
|
|
337c6d3e4e | ||
|
|
4a57957420 | ||
|
|
c633302f31 | ||
|
|
1315ca2a57 | ||
|
|
2f0474a467 | ||
|
|
db95e7291d | ||
|
|
ae54c27805 | ||
|
|
284285d441 | ||
|
|
2554a67cc7 | ||
|
|
e2cccd8615 | ||
|
|
948a98a871 | ||
|
|
b50d201154 | ||
|
|
25a3ceb94d | ||
|
|
c514fe371a | ||
|
|
9169c70efe | ||
|
|
3c07cea229 | ||
|
|
d3f51c611f | ||
|
|
21123bb029 | ||
|
|
fb8d11650c | ||
|
|
2c250050d5 | ||
|
|
e9b3cbf3f7 | ||
|
|
d31a6e6179 | ||
|
|
26d8c213b0 | ||
|
|
bcb9491f6a | ||
|
|
9d2c3ebad3 | ||
|
|
ad063b0634 | ||
|
|
8765538458 | ||
|
|
dd4aa14a8c | ||
|
|
99814539eb | ||
|
|
dbec98ff48 | ||
|
|
e2e14f2184 | ||
|
|
e85291c4ba | ||
|
|
58a5405343 | ||
|
|
4ba85311da | ||
|
|
3cf7003101 | ||
|
|
ae558a5889 | ||
|
|
0b0b762c6c | ||
|
|
55a4fd752d | ||
|
|
136b699106 | ||
|
|
fd83bf2089 | ||
|
|
75f075feb0 | ||
|
|
817039ddf3 | ||
|
|
6d6deaf6c4 | ||
|
|
9c63b89bac | ||
|
|
2a6e084219 | ||
|
|
ec120cd64c | ||
|
|
a9173b1aa1 | ||
|
|
89f7f75af2 | ||
|
|
8809ac0c4a | ||
|
|
7a03164a9a | ||
|
|
406254cd04 | ||
|
|
f01eeed9d0 | ||
|
|
5b6439e29d | ||
|
|
38954c2193 | ||
|
|
5954fb280c | ||
|
|
8e63652fb3 | ||
|
|
365dfd5380 | ||
|
|
1c70fb3ba4 | ||
|
|
e5af8e87b3 | ||
|
|
bfbec24f43 | ||
|
|
8dd97a358a | ||
|
|
7290afc6fe | ||
|
|
2ba20369ea | ||
|
|
804aef6548 | ||
|
|
85f49b6af4 | ||
|
|
68afc6011d | ||
|
|
524ffcd0e1 | ||
|
|
a7303205b4 | ||
|
|
8a06b2d136 | ||
|
|
7ba8a55fa5 | ||
|
|
ee7dc8e1c5 | ||
|
|
3556f90d68 | ||
|
|
6d984b505d | ||
|
|
8d9336f9f4 | ||
|
|
2b5e694181 | ||
|
|
aa983e4966 | ||
|
|
424b3a9dfc | ||
|
|
5a3bc7af9a | ||
|
|
4501ec10dc | ||
|
|
699ae176df | ||
|
|
9297b3b850 | ||
|
|
cac5f81388 | ||
|
|
28af8068e9 | ||
|
|
a1d64af7b1 | ||
|
|
edbb79b79c | ||
|
|
a000a7b52e | ||
|
|
0a427541d6 | ||
|
|
1c297c56a2 | ||
|
|
6f9bbc431d | ||
|
|
f62626e3eb | ||
|
|
28fcd75494 | ||
|
|
39a89e8fc7 | ||
|
|
38a8096732 | ||
|
|
d358c839ce | ||
|
|
17901e7bc7 | ||
|
|
0ea16c04cc | ||
|
|
f1e0cd1c9c | ||
|
|
e1f404a011 | ||
|
|
69715d2182 | ||
|
|
0285213140 | ||
|
|
1a907f23f0 | ||
|
|
1296be71ed | ||
|
|
0ebcdbbb3f | ||
|
|
891ced0fca | ||
|
|
6276bb3873 | ||
|
|
dbb0cbaff8 | ||
|
|
cfa777260c | ||
|
|
66fc273db6 | ||
|
|
9c9e377cf4 | ||
|
|
f75eb24bfe | ||
|
|
a617a04295 | ||
|
|
dc16f277ce | ||
|
|
07258deaaf | ||
|
|
7b53e0f953 | ||
|
|
2ac764bd1a | ||
|
|
82d2851a6b | ||
|
|
7a3be71452 | ||
|
|
977a513ee5 | ||
|
|
22cbebb7a7 | ||
|
|
72b2e6778a | ||
|
|
08babbf38d | ||
|
|
2ae5ae6962 | ||
|
|
fa6331a40a | ||
|
|
cece465947 | ||
|
|
3f97047abc | ||
|
|
b6d5213880 | ||
|
|
0bcb65db29 | ||
|
|
7734656ae3 | ||
|
|
c14e17e271 | ||
|
|
1f4ea2c60e | ||
|
|
edb4ff6b98 | ||
|
|
279bb47ab4 | ||
|
|
7ef92748ea | ||
|
|
0e6e614318 | ||
|
|
a5b6c3add7 | ||
|
|
fd30d8b0d1 | ||
|
|
5944acf8a6 | ||
|
|
58ace7c774 | ||
|
|
a07444412b | ||
|
|
339f59a4e8 | ||
|
|
4beb9b3efc | ||
|
|
a04cf32a69 | ||
|
|
746c0359d2 | ||
|
|
854852959c | ||
|
|
1e1751e451 | ||
|
|
7cd0179adc | ||
|
|
c0543cdbaf | ||
|
|
d681066dc2 | ||
|
|
b81939bff5 | ||
|
|
f8685c97f1 | ||
|
|
11e06c33db | ||
|
|
c0f2f5bcaa | ||
|
|
bfee6402a6 | ||
|
|
4fac62560e | ||
|
|
d780055b0e | ||
|
|
3f5c53425b | ||
|
|
4caca2ce1a | ||
|
|
e0645b4b63 | ||
|
|
591b71cf18 | ||
|
|
76e9687d6f |
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
.gitmodules
|
||||||
*build*/
|
*build*/
|
||||||
*flymake*
|
*flymake*
|
||||||
CMakeLists.txt.user*
|
CMakeLists.txt.user*
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "doc/ocdoc"]
|
||||||
|
path = doc/ocdoc
|
||||||
|
url = https://github.com/owncloud/documentation
|
||||||
@@ -4,18 +4,25 @@ project(mirall)
|
|||||||
set(PACKAGE "mirall")
|
set(PACKAGE "mirall")
|
||||||
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
|
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
|
||||||
|
|
||||||
if ( DEFINED OEM_THEME_DIR AND EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
include(Warnings)
|
||||||
|
|
||||||
|
set(OEM_THEME_DIR "" CACHE STRING "Define directory containing a custom theme")
|
||||||
|
if ( EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
||||||
include ( ${OEM_THEME_DIR}/OEM.cmake )
|
include ( ${OEM_THEME_DIR}/OEM.cmake )
|
||||||
else ()
|
else ()
|
||||||
include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
|
include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED APPLICATION_SHORTNAME)
|
||||||
|
set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||||
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
||||||
configure_file( ${CMAKE_SOURCE_DIR}/src/mirall/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/version.h" )
|
configure_file( ${CMAKE_SOURCE_DIR}/src/mirall/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/version.h" )
|
||||||
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")
|
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
include(DefineInstallationPaths)
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
|
||||||
@@ -31,10 +38,8 @@ if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## stupid, we should upstream this
|
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
|
||||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT CMAKE_INSTALL_SYSCONFDIR)
|
set(DATADIR ${DATA_INSTALL_DIR})
|
||||||
set(CMAKE_INSTALL_SYSCONFDIR "/etc")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#####
|
#####
|
||||||
## handle BUILD_OWNCLOUD_OSX_BUNDLE
|
## handle BUILD_OWNCLOUD_OSX_BUNDLE
|
||||||
@@ -53,9 +58,19 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
#####
|
#####
|
||||||
|
|
||||||
|
#####
|
||||||
|
## handle DBUS for Fdo notifications
|
||||||
|
if( UNIX AND NOT APPLE )
|
||||||
|
add_definitions( -DUSE_FDO_NOTIFICATIONS)
|
||||||
|
endif()
|
||||||
|
####
|
||||||
|
|
||||||
#### find libs
|
#### find libs
|
||||||
find_package(Qt4 4.6.0 COMPONENTS QtCore QtGui QtXml QtNetwork QtTest REQUIRED )
|
find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui QtXml QtNetwork QtTest QtWebkit REQUIRED )
|
||||||
find_package(Csync)
|
if( UNIX AND NOT APPLE ) # Fdo notifications
|
||||||
|
find_package(Qt4 4.7.0 COMPONENTS QtDBus REQUIRED )
|
||||||
|
endif()
|
||||||
|
find_package(Csync REQUIRED)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
find_package(INotify REQUIRED)
|
find_package(INotify REQUIRED)
|
||||||
else()
|
else()
|
||||||
@@ -65,39 +80,13 @@ find_package(Sphinx)
|
|||||||
find_package(PdfLatex)
|
find_package(PdfLatex)
|
||||||
find_package(QtKeychain)
|
find_package(QtKeychain)
|
||||||
|
|
||||||
set(WITH_CSYNC CSYNC_FOUND)
|
|
||||||
set(WITH_QTKEYCHAIN ${QTKEYCHAIN_FOUND})
|
set(WITH_QTKEYCHAIN ${QTKEYCHAIN_FOUND})
|
||||||
set(USE_INOTIFY ${INOTIFY_FOUND})
|
set(USE_INOTIFY ${INOTIFY_FOUND})
|
||||||
|
|
||||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
|
||||||
set(CPACK_SOURCE_IGNORE_FILES
|
|
||||||
# hidden files
|
|
||||||
"/\\\\..+$"
|
|
||||||
# temporary files
|
|
||||||
"\\\\.swp$"
|
|
||||||
# backup files
|
|
||||||
"~$"
|
|
||||||
# others
|
|
||||||
"\\\\.#"
|
|
||||||
"/#"
|
|
||||||
"/build/"
|
|
||||||
"/_build/"
|
|
||||||
# used before
|
|
||||||
"\\\\.o$"
|
|
||||||
"\\\\.lo$"
|
|
||||||
"\\\\.la$"
|
|
||||||
"Makefile\\\\.in$"
|
|
||||||
)
|
|
||||||
|
|
||||||
include(OwnCloudCPack.cmake)
|
include(OwnCloudCPack.cmake)
|
||||||
|
|
||||||
#
|
|
||||||
# This cmake builds two targets (aka apps), mirall and owncloud. For the owncloud
|
|
||||||
# target, OWNCLOUD_CLIENT needs to be a compile flag. It is set in src/CMakeLists.txt
|
|
||||||
# but if that fails because cmake is too old, uncomment this here if you want to build
|
|
||||||
# owncloud.
|
|
||||||
# add_definitions(-DOWNCLOUD_CLIENT)
|
|
||||||
add_definitions(-DUNICODE)
|
add_definitions(-DUNICODE)
|
||||||
add_definitions(-D_UNICODE)
|
add_definitions(-D_UNICODE)
|
||||||
|
|
||||||
@@ -117,5 +106,5 @@ endif(UNIT_TESTING)
|
|||||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
||||||
else()
|
else()
|
||||||
install( FILES sync-exclude.lst DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} )
|
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ If you have questions about how to use the ownCloud Desktop Client, please
|
|||||||
direct these to the [mailing list][mailinglist] or our [forum][forum].
|
direct these to the [mailing list][mailinglist] or our [forum][forum].
|
||||||
We are also available on [IRC][irc].
|
We are also available on [IRC][irc].
|
||||||
|
|
||||||
### Guidelines
|
### Bug Reporting Guidelines
|
||||||
* Report the issue using our [template][template], it includes all the
|
* Important: Report the issue using our [template][template], it includes all the
|
||||||
informations we need to track down the issue.
|
informations we need to track down the issue.
|
||||||
* This repository is *only* for issues within the ownCloud desktop client.
|
* This repository is *only* for issues within the ownCloud desktop client.
|
||||||
Issues in other compontents should be reported in their own repositores:
|
Issues in other compontents should be reported in their own repositores:
|
||||||
|
|||||||
137
ChangeLog
@@ -1,5 +1,137 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
|
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
||||||
|
|
||||||
|
* Translation and documentation fixes.
|
||||||
|
* Fixed error display in settings/status dialog, displays multi
|
||||||
|
line error messages now correctly.
|
||||||
|
* Wait up to 30 secs before complaining about missing systray
|
||||||
|
Fixes bug #949
|
||||||
|
* Fixed utf8 issues with basic auth authentication, fixes bug #941
|
||||||
|
* Fixed remote folder selector, avoid recursive syncing, fixes bug #962
|
||||||
|
* Handle and display network problems at startup correctly.
|
||||||
|
* Enable and disable the folder watcher during syncs correctly.
|
||||||
|
* Fix setting of thread priority.
|
||||||
|
* Fixed file size display.
|
||||||
|
* Fixed various folder wizard issues, bug #992
|
||||||
|
* Made "Sync started" message optional, fixes bug #934
|
||||||
|
* Fixed shutdown, avoid crashed config on win32, fixes bug #945
|
||||||
|
* Pop up config wizard if no server url is configured, fixes bug #1018
|
||||||
|
* Settings: calculate sidebar width dynamically, fixes bug #1020
|
||||||
|
* Fixed a crash if sync folders were removed, fixes bug #713
|
||||||
|
* Do proper resync after network disconnect, fixes bug #1007
|
||||||
|
* Various minor code fixes
|
||||||
|
|
||||||
|
version 1.4.0 (release 2013-09-04 ), csync 0.90.0 required
|
||||||
|
|
||||||
|
* New Scheduler: Only sync when there are actual changes in the server
|
||||||
|
* Add a Settings Dialog, move Proxy Settings there
|
||||||
|
* Transform folder Status Dialog into Account Settings, provide feedback via context menu
|
||||||
|
* Add Bandwidth Control
|
||||||
|
* Add a visual storage/quota indicator (context menu and account settings)
|
||||||
|
* Add progress indication (context menu and account settings)
|
||||||
|
* Introduce a sync history, persisting results across syncs
|
||||||
|
* Move ability to switch to mono icons from a switch to a Settings option
|
||||||
|
* Add "Launch on System Startup" GUI option
|
||||||
|
* Add "Show Desktop Nofications"GUI option (enabled by default)
|
||||||
|
top optionally disable sync notifications
|
||||||
|
* Add Help item, pointing to online reference
|
||||||
|
* Implement graphical selection of remote folders in FolderWizard
|
||||||
|
* Allow custom ignore patterns
|
||||||
|
* Add an editor for ingore patterns
|
||||||
|
* ALlow to flag certain ignore patterns as discardable
|
||||||
|
* Ensure to ship with all valid translations
|
||||||
|
* Progress Dialog now preserves the last syncned items across sync runs
|
||||||
|
* Split Setup Wizard into multiple pages again
|
||||||
|
* Implement "--logfile -" to log to stdout
|
||||||
|
* Add preliminary support for Shibboleth authentication
|
||||||
|
* Linux: Provide more icon sizes
|
||||||
|
* Linux: Do not trigger notifier on ignored files
|
||||||
|
* Windows: Reduce priority of CSync thread
|
||||||
|
* Documentation: Prem. updates to reflect UI changes
|
||||||
|
* Significant code refactorings
|
||||||
|
* Require Qt 4.7
|
||||||
|
* Known issue: Under certain conditions, a file will only get uploaded after up to five minutes
|
||||||
|
|
||||||
|
version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
||||||
|
|
||||||
|
* Default proxy port to 8080
|
||||||
|
* Don't lose proxy settings when changing passwords
|
||||||
|
* Support SOCKS5 proxy (useful in combination with ssh *D)
|
||||||
|
* Propagate proxy changes to csync at runtime
|
||||||
|
* Improve proxy wizard
|
||||||
|
* Display proxy errors
|
||||||
|
* Solved problems with lock files
|
||||||
|
* Warn if for some reason all files are scheduled for removal on either side
|
||||||
|
* Avoid infinite loop if authentication fails in certain cases
|
||||||
|
* Fix reading the password from the config in certain cases
|
||||||
|
* Do not crash when configured sync target disappears
|
||||||
|
* Make --help work on windows
|
||||||
|
* Make sync feedback less ambiguous.
|
||||||
|
* Fix icon tray tooltip sometimes showing repeated content
|
||||||
|
* More use of native directory separators on Windows
|
||||||
|
* Remove journal when reusing a directory that used to have a journal before
|
||||||
|
* Visual clean up of status dialog items
|
||||||
|
* Wizard: When changing the URL or user name, allow the user to push his data
|
||||||
|
to the new location or wipe the folder and start from scratch
|
||||||
|
* Wizard: Make setting a custom folder as a sync target work again
|
||||||
|
* Fix application icon
|
||||||
|
* User-Agent now contains "Mozilla/5.0" and the Platform name (for firewall/proxy compat)
|
||||||
|
* Server side directory moves will be detected
|
||||||
|
* New setup wizard, defaulting to root syncing (only for new setups)
|
||||||
|
* Improved thread stop/termination
|
||||||
|
|
||||||
|
version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
||||||
|
* [Fixes] NSIS installer fixes
|
||||||
|
* [Fixes] Fix crash race by making certificateChain() thread safe
|
||||||
|
* [Fixes] Build with older CMake versions (CentOS/RHEL 6)
|
||||||
|
* [Fixes] Wording in GUI
|
||||||
|
* [Fixes] Silently ignore "installed = true" status.php
|
||||||
|
* Set log verbosity before calling csync_init.
|
||||||
|
* GUI feedback for the statistics copy action
|
||||||
|
* Safer approach for detecting duplicate sync runs
|
||||||
|
|
||||||
|
version 1.2.4 (release 2013-04-11 ), csync 0.70.6 required
|
||||||
|
* [Fixes] Clarify string in folder wizard
|
||||||
|
* [Fixes] Fixed some valgrind warnings
|
||||||
|
* [Fixes] Ensure that only one sync thread can ever run
|
||||||
|
* [Fixes] Fix default config storage path
|
||||||
|
* [Fixes] Skip folders with no absolute path
|
||||||
|
* [Fixes] Allow setting the configuration directory on command line
|
||||||
|
|
||||||
|
version 1.2.3 (release 2013-04-02 ), csync 0.70.5 required
|
||||||
|
* [Fixes] Unbreak self-signed certificate handling
|
||||||
|
|
||||||
|
version 1.2.2 (release 2013-04-02 ), csync 0.70.5 required
|
||||||
|
* [Fixes] Do not crash when local file tree contains symlinks
|
||||||
|
* [Fixes] Correctly handle locked files on Windows
|
||||||
|
* [Fixes] Display errors in all members of the SSL chain
|
||||||
|
* [Fixes] Enable Accessibility features on Windows
|
||||||
|
* [Fixes] Make setupFavLink work properly on Mac OS
|
||||||
|
* [Fixes] Ignore temporary files created by MS Office
|
||||||
|
* [Gui] Support Nautilus in setupFavLink
|
||||||
|
|
||||||
|
version 1.2.1 (release 2013-02-26 ), csync 0.70.4 required
|
||||||
|
* [Fixes] Leave configured folders on configuration changes.
|
||||||
|
* [Fixes] Do not allow to finish the setup dialog if connection can't be established.
|
||||||
|
* [Fixes] Better handling of credentials in setup dialog.
|
||||||
|
* [Fixes] Do not leak fd's to /dev/null when using gnutls
|
||||||
|
* [Fixes] Stop sync scheduling when configuration wizard starts.
|
||||||
|
* [Fixes] Clear pending network requests when stepping back in config wizard.
|
||||||
|
* [Fixes] User password dialog asynchronous issues.
|
||||||
|
* [Fixes] Make folderman starting and stoping the scheduling.
|
||||||
|
* [Fixes] Various minor fixes and cleanups.
|
||||||
|
* [Fixes] Crash on pausing sync
|
||||||
|
* [Fixes] Stale lock file after pausing sync
|
||||||
|
* [App] Load translations from app dir or bundle as well.
|
||||||
|
* [Platform] Build fixes and simplifications, ie. build only one lib.
|
||||||
|
* [Platform] Added some getter/setters for configuration values.
|
||||||
|
* [Platform] Added man pages.
|
||||||
|
* [Platform] Simplified/fixed credential store usage and custom configs.
|
||||||
|
* [Platform] Added soname version to libowncloudsync.
|
||||||
|
* [Platform] Pull in Qt translations
|
||||||
|
* [Gui] Make sync result popups less annoyingq
|
||||||
|
* [Gui] Fix for result popup
|
||||||
|
|
||||||
version 1.2.0 (release 2013-01-24 ), csync 0.70.2 required
|
version 1.2.0 (release 2013-01-24 ), csync 0.70.2 required
|
||||||
* [GUI] New status dialog to show a detailed list of synced files.
|
* [GUI] New status dialog to show a detailed list of synced files.
|
||||||
@@ -51,10 +183,6 @@ version 1.1.1 (release 2012-10-18), csync 0.60.1 required
|
|||||||
* [Fixes] csync: Allow single quote (') in file names
|
* [Fixes] csync: Allow single quote (') in file names
|
||||||
* [Fixes] csync: Remove stray temporary files
|
* [Fixes] csync: Remove stray temporary files
|
||||||
|
|
||||||
version 1.1.0 (release 2012-10-10), csync 0.60.0 required
|
|
||||||
* [GUI] Added an about dialog
|
|
||||||
* [GUI] Improved themeing capabilities of the client.
|
|
||||||
* [GUI] Minor fixes in folder assistant.
|
|
||||||
* [GUI] Reworked tray context menu.
|
* [GUI] Reworked tray context menu.
|
||||||
* [GUI] Users can now sync the server root folder.
|
* [GUI] Users can now sync the server root folder.
|
||||||
* [Fixes] Proxy support: now supports Proxy Auto-Configuration (PAC)
|
* [Fixes] Proxy support: now supports Proxy Auto-Configuration (PAC)
|
||||||
@@ -149,4 +277,3 @@ version 1.0.1 (release 2012-04-18), csync 0.50.5 required
|
|||||||
* [Platform] MacOSX Bundle creation added
|
* [Platform] MacOSX Bundle creation added
|
||||||
* [Platform] Enabled ranslations on Windows.
|
* [Platform] Enabled ranslations on Windows.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
set( APPLICATION_SHORTNAME "owncloud" )
|
|
||||||
set( APPLICATION_NAME "ownCloud" )
|
set( APPLICATION_NAME "ownCloud" )
|
||||||
set( APPLICATION_EXECUTABLE "owncloud" )
|
#set( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||||
set( APPLICATION_DOMAIN "owncloud.com" )
|
set( APPLICATION_EXECUTABLE "owncloud" )
|
||||||
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
set( APPLICATION_DOMAIN "owncloud.com" )
|
||||||
set( THEME_CLASS "ownCloudTheme" )
|
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
||||||
|
set( THEME_CLASS "ownCloudTheme" )
|
||||||
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
||||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||||
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ if(WIN32)
|
|||||||
# CPACK_INCLUDE_TOPLEVEL_DIRECTORY Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. 0 to disable, 1 to enable
|
# CPACK_INCLUDE_TOPLEVEL_DIRECTORY Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. 0 to disable, 1 to enable
|
||||||
# CPACK_INSTALL_CMAKE_PROJECTS List of four values: Build directory, Project Name, Project Component, Directory in the package /home/andy/vtk/CMake-bin;CMake;ALL;/
|
# CPACK_INSTALL_CMAKE_PROJECTS List of four values: Build directory, Project Name, Project Component, Directory in the package /home/andy/vtk/CMake-bin;CMake;ALL;/
|
||||||
set( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" ) # File used as a description of a project /path/to/project/ReadMe.txt
|
set( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" ) # File used as a description of a project /path/to/project/ReadMe.txt
|
||||||
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "ownCloud Syncing Client" ) # Description summary of a project
|
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "${APPLICATION_NAME} Syncing Client" ) # Description summary of a project
|
||||||
# CPACK_PACKAGE_EXECUTABLES List of pairs of executables and labels. Used by the NSIS generator to create Start Menu shortcuts. ccmake;CMake
|
# CPACK_PACKAGE_EXECUTABLES List of pairs of executables and labels. Used by the NSIS generator to create Start Menu shortcuts. ccmake;CMake
|
||||||
set( CPACK_PACKAGE_INSTALL_DIRECTORY ${APPLICATION_NAME} ) # Installation directory on the target system -> C:\Program Files\fellody
|
set( CPACK_PACKAGE_INSTALL_DIRECTORY ${APPLICATION_NAME} ) # Installation directory on the target system -> C:\Program Files\fellody
|
||||||
set( CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${APPLICATION_NAME} ) # Registry key used when installing this project CMake 2.5.0
|
set( CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${APPLICATION_NAME} ) # Registry key used when installing this project CMake 2.5.0
|
||||||
set( CPACK_PACKAGE_NAME ${APPLICATION_NAME} ) # Package name, defaults to the project name
|
set( CPACK_PACKAGE_NAME ${APPLICATION_NAME} ) # Package name, defaults to the project name
|
||||||
set( CPACK_PACKAGE_VENDOR "http://owncloud.com" ) # Package vendor name
|
set( CPACK_PACKAGE_VENDOR "http://${APPLICATION_DOMAIN}" ) # Package vendor name
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt" ) # License file for the project, used by the STGZ, NSIS, and PackageMaker generators. /home/andy/vtk/CMake/Copyright.txt
|
# set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt" ) # License file for the project, used by the STGZ, NSIS, and PackageMaker generators. /home/andy/vtk/CMake/Copyright.txt
|
||||||
|
|||||||
61
README.md
@@ -2,50 +2,12 @@
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
Mirall synchronizes your folders with another computer.
|
Mirall is a tool to synchronize files from ownCloud Server with your computer.
|
||||||
|
It uses OCSync as its syncing backend.
|
||||||
The ultimate goals of Mirall are:
|
|
||||||
|
|
||||||
* Network location aware: should not try to sync against your NAS if you are
|
|
||||||
not in the home network
|
|
||||||
* It is a zero-interaction tool. So forget about resolving conflicts.
|
|
||||||
* It should work silently and realiably.
|
|
||||||
|
|
||||||
Mirall is in early stages of development, and may still eat your
|
|
||||||
files or hang your computer.
|
|
||||||
|
|
||||||
* Network location awareness not implemented yet
|
|
||||||
* Current version supports local and remote (sftp and smb) folders.
|
|
||||||
* It is powered by csync (http://www.csync.org), however
|
|
||||||
the user does not know and other tools will be incorporated to provide other
|
|
||||||
functionality.
|
|
||||||
|
|
||||||
## Current issues
|
|
||||||
|
|
||||||
* No sane way to backup conflicting versions yet, this should be solved
|
|
||||||
in a near csync release (--conflictcopy, available in Jann's branch).
|
|
||||||
Right now the newest copy wins.
|
|
||||||
* You can't remove folder configurations
|
|
||||||
Workaround: delete ~/.local/share/data/Mirall/folders/$alias and restart
|
|
||||||
* Some tasks block the GUI (initial setup of watchers)
|
|
||||||
* May be some concurrency issues
|
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
|
|
||||||
* Improve robustness to minimize user interaction
|
|
||||||
* Improve feedback and sync results
|
|
||||||
* Add support for other folder types: tarsnap, duplicity, git (SparkleShare)
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
* Linux (currently it uses inotify to detect file changes)
|
|
||||||
* unison installed in the local and remote machine
|
|
||||||
(you should not care if you got Mirall with your favorite
|
|
||||||
distribution)
|
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
### openSUSE
|
### Binary packages
|
||||||
|
|
||||||
* Refer to the download page http://owncloud.org/sync-clients/
|
* Refer to the download page http://owncloud.org/sync-clients/
|
||||||
|
|
||||||
@@ -55,23 +17,12 @@ files or hang your computer.
|
|||||||
|
|
||||||
## Building the source code
|
## Building the source code
|
||||||
|
|
||||||
You need Qt 4.7 and cmake:
|
Please refer to [Building the Client](http://doc.owncloud.org/desktop/1.2/building.html)
|
||||||
|
in the ownCloud client manual.
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
|
|
||||||
To generate a tarball:
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ..
|
|
||||||
make package_source
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
* Duncan Mac-Vicar P. <duncan@kde.org>
|
* Duncan Mac-Vicar P. <duncan@kde.org> (original Mirall author)
|
||||||
* Klaas Freitag <freitag@owncloud.com>
|
* Klaas Freitag <freitag@owncloud.com>
|
||||||
* Daniel Molkentin <danimo@owncloud.com>
|
* Daniel Molkentin <danimo@owncloud.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
set( VERSION_MAJOR 1 )
|
set( VERSION_MAJOR 1 )
|
||||||
set( VERSION_MINOR 2 )
|
set( VERSION_MINOR 4 )
|
||||||
set( VERSION_PATCH 0 )
|
set( VERSION_PATCH 1 )
|
||||||
set( VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
set( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}")
|
||||||
|
set( SOVERSION 0 )
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ mount="/Volumes/$(basename $src_dmg|cut -d"-" -f1)"
|
|||||||
|
|
||||||
test -e $tmp_dmg && rm -rf $tmp_dmg
|
test -e $tmp_dmg && rm -rf $tmp_dmg
|
||||||
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
||||||
open $tmp_dmg
|
hdiutil attach $tmp_dmg
|
||||||
sleep 2s
|
|
||||||
pushd $mount
|
pushd $mount
|
||||||
codesign -s "$identity" $mount/*.app
|
codesign -s "$identity" $mount/*.app
|
||||||
popd
|
popd
|
||||||
|
|||||||
108
cmake/modules/DefineInstallationPaths.cmake
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
if (UNIX)
|
||||||
|
# Suffix for Linux
|
||||||
|
SET(LIB_SUFFIX
|
||||||
|
CACHE STRING "Define suffix of directory name (32/64)"
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(EXEC_INSTALL_PREFIX
|
||||||
|
"${CMAKE_INSTALL_PREFIX}"
|
||||||
|
CACHE PATH "Base directory for executables and libraries"
|
||||||
|
)
|
||||||
|
SET(SHARE_INSTALL_PREFIX
|
||||||
|
"${CMAKE_INSTALL_PREFIX}/share"
|
||||||
|
CACHE PATH "Base directory for files which go to share/"
|
||||||
|
)
|
||||||
|
SET(DATA_INSTALL_PREFIX
|
||||||
|
"${SHARE_INSTALL_PREFIX}/${APPLICATION_SHORT_NAME}"
|
||||||
|
CACHE PATH "The parent directory where applications can install their data")
|
||||||
|
|
||||||
|
# The following are directories where stuff will be installed to
|
||||||
|
SET(BIN_INSTALL_DIR
|
||||||
|
"${EXEC_INSTALL_PREFIX}/bin"
|
||||||
|
CACHE PATH "The ${APPLICATION_SHORT_NAME} binary install dir (default prefix/bin)"
|
||||||
|
)
|
||||||
|
SET(SBIN_INSTALL_DIR
|
||||||
|
"${EXEC_INSTALL_PREFIX}/sbin"
|
||||||
|
CACHE PATH "The ${APPLICATION_SHORT_NAME} sbin install dir (default prefix/sbin)"
|
||||||
|
)
|
||||||
|
SET(LIB_INSTALL_DIR
|
||||||
|
"${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
|
||||||
|
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
|
||||||
|
)
|
||||||
|
SET(LIBEXEC_INSTALL_DIR
|
||||||
|
"${EXEC_INSTALL_PREFIX}/libexec"
|
||||||
|
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
|
||||||
|
)
|
||||||
|
SET(PLUGIN_INSTALL_DIR
|
||||||
|
"${LIB_INSTALL_DIR}/${APPLICATION_SHORT_NAME}"
|
||||||
|
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_SHORT_NAME})"
|
||||||
|
)
|
||||||
|
SET(INCLUDE_INSTALL_DIR
|
||||||
|
"${CMAKE_INSTALL_PREFIX}/include"
|
||||||
|
CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(DATA_INSTALL_DIR
|
||||||
|
"${DATA_INSTALL_PREFIX}"
|
||||||
|
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORT_NAME})"
|
||||||
|
)
|
||||||
|
SET(HTML_INSTALL_DIR
|
||||||
|
"${DATA_INSTALL_PREFIX}/doc/HTML"
|
||||||
|
CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
|
||||||
|
)
|
||||||
|
SET(ICON_INSTALL_DIR
|
||||||
|
"${DATA_INSTALL_PREFIX}/icons"
|
||||||
|
CACHE PATH "The icon install dir (default data/icons/)"
|
||||||
|
)
|
||||||
|
SET(SOUND_INSTALL_DIR
|
||||||
|
"${DATA_INSTALL_PREFIX}/sounds"
|
||||||
|
CACHE PATH "The install dir for sound files (default data/sounds)"
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LOCALE_INSTALL_DIR
|
||||||
|
"${SHARE_INSTALL_PREFIX}/locale"
|
||||||
|
CACHE PATH "The install dir for translations (default prefix/share/locale)"
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(XDG_APPS_DIR
|
||||||
|
"${SHARE_INSTALL_PREFIX}/applications/"
|
||||||
|
CACHE PATH "The XDG apps dir"
|
||||||
|
)
|
||||||
|
SET(XDG_DIRECTORY_DIR
|
||||||
|
"${SHARE_INSTALL_PREFIX}/desktop-directories"
|
||||||
|
CACHE PATH "The XDG directory"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(NOT "${EXEC_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||||
|
SET(SYSCONFDIR_INSTALL_PREFIX "${EXEC_INSTALL_PREFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
SET(SYSCONF_INSTALL_DIR
|
||||||
|
"${SYSCONFDIR_INSTALL_PREFIX}/etc"
|
||||||
|
CACHE PATH "The ${APPLICATION_SHORT_NAME} sysconfig install dir (default prefix/etc)"
|
||||||
|
)
|
||||||
|
SET(MAN_INSTALL_DIR
|
||||||
|
"${SHARE_INSTALL_PREFIX}/man"
|
||||||
|
CACHE PATH "The ${APPLICATION_SHORT_NAME} man install dir (default prefix/man)"
|
||||||
|
)
|
||||||
|
SET(INFO_INSTALL_DIR
|
||||||
|
"${SHARE_INSTALL_PREFIX}/info"
|
||||||
|
CACHE PATH "The ${APPLICATION_SHORT_NAME} info install dir (default prefix/info)"
|
||||||
|
)
|
||||||
|
endif (UNIX)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
# Same same
|
||||||
|
set(SHARE_INSTALL_PREFIX "share" CACHE PATH "-")
|
||||||
|
set(BIN_INSTALL_DIR "." CACHE PATH "-")
|
||||||
|
set(SBIN_INSTALL_DIR "." CACHE PATH "-")
|
||||||
|
set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
|
||||||
|
set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
|
||||||
|
set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
|
||||||
|
set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
|
||||||
|
set(ICON_INSTALL_DIR "." CACHE PATH "-")
|
||||||
|
set(SOUND_INSTALL_DIR "." CACHE PATH "-")
|
||||||
|
set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
|
||||||
|
set(SYSCONF_INSTALL_DIR "config" CACHE PATH "-")
|
||||||
|
set(MAN_INSTALL_DIR "man" CACHE PATH "-")
|
||||||
|
endif (WIN32)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
;ownCloud installer script.
|
;ownCloud installer script.
|
||||||
|
|
||||||
!define APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
|
||||||
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
||||||
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
||||||
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
||||||
@@ -8,9 +8,6 @@
|
|||||||
!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
|
!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
|
||||||
!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
|
!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
|
||||||
|
|
||||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
|
|
||||||
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; Some installer script options (comment-out options not required)
|
; Some installer script options (comment-out options not required)
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
@@ -21,7 +18,6 @@
|
|||||||
!define OPTION_SECTION_SC_START_MENU
|
!define OPTION_SECTION_SC_START_MENU
|
||||||
!define OPTION_SECTION_SC_DESKTOP
|
!define OPTION_SECTION_SC_DESKTOP
|
||||||
!define OPTION_SECTION_SC_QUICK_LAUNCH
|
!define OPTION_SECTION_SC_QUICK_LAUNCH
|
||||||
!define OPTION_SECTION_SC_AUTOSTART
|
|
||||||
!define OPTION_FINISHPAGE
|
!define OPTION_FINISHPAGE
|
||||||
!define OPTION_FINISHPAGE_LAUNCHER
|
!define OPTION_FINISHPAGE_LAUNCHER
|
||||||
; !define OPTION_FINISHPAGE_RELEASE_NOTES
|
; !define OPTION_FINISHPAGE_RELEASE_NOTES
|
||||||
@@ -34,9 +30,11 @@
|
|||||||
!endif
|
!endif
|
||||||
!define MING_BIN "${MING_PATH}/bin"
|
!define MING_BIN "${MING_PATH}/bin"
|
||||||
!define MING_LIB "${MING_PATH}/lib"
|
!define MING_LIB "${MING_PATH}/lib"
|
||||||
|
!define MING_SHARE "${MING_PATH}/share"
|
||||||
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
||||||
!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
|
!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
|
||||||
!define QT_DLL_PATH "${MING_BIN}"
|
!define QT_DLL_PATH "${MING_BIN}"
|
||||||
|
!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt4/plugins/accessible"
|
||||||
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
|
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
|
||||||
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
|
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
|
||||||
|
|
||||||
@@ -64,7 +62,6 @@
|
|||||||
; Initial installer setup and definitions.
|
; Initial installer setup and definitions.
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
||||||
Caption "${APPLICATION_NAME} Setup"
|
|
||||||
BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
|
BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
|
||||||
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
||||||
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||||
@@ -105,13 +102,11 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|||||||
!define MUI_ICON ${NSI_PATH}\installer.ico
|
!define MUI_ICON ${NSI_PATH}\installer.ico
|
||||||
!define MUI_UNICON ${NSI_PATH}\installer.ico
|
!define MUI_UNICON ${NSI_PATH}\installer.ico
|
||||||
!define MUI_WELCOMEFINISHPAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/welcome.bmp
|
!define MUI_WELCOMEFINISHPAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/welcome.bmp
|
||||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to the @CPACK_PACKAGE_NAME@ ${VERSION} Setup Wizard"
|
|
||||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation.$\r$\n$\r$\n$_CLICK"
|
|
||||||
!define MUI_HEADERIMAGE
|
!define MUI_HEADERIMAGE
|
||||||
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
!define MUI_FINISHPAGE_TITLE "@CPACK_PACKAGE_NAME@ Setup Completed"
|
!define MUI_FINISHPAGE_LINK "www.${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_LINK "Click here to visit the @CPACK_PACKAGE_NAME@ website."
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
@@ -271,7 +266,7 @@ FunctionEnd
|
|||||||
# INSTALLER SECTIONS #
|
# INSTALLER SECTIONS #
|
||||||
# #
|
# #
|
||||||
##############################################################################
|
##############################################################################
|
||||||
Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||||
SectionIn 1 2 3 RO
|
SectionIn 1 2 3 RO
|
||||||
SetDetailsPrint listonly
|
SetDetailsPrint listonly
|
||||||
|
|
||||||
@@ -287,23 +282,20 @@ Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
|||||||
!ifndef INSTALL_PATH
|
!ifndef INSTALL_PATH
|
||||||
;Main executable.
|
;Main executable.
|
||||||
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
|
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
|
||||||
File "${BUILD_PATH}\src\libowncloudsync.dll"
|
File "${BUILD_PATH}\src\lib${APPLICATION_SHORTNAME}sync.dll"
|
||||||
File "${BUILD_PATH}\src\mirall_ca.qm"
|
|
||||||
File "${BUILD_PATH}\src\mirall_cs_CZ.qm"
|
File "${BUILD_PATH}\src\mirall_*.qm"
|
||||||
File "${BUILD_PATH}\src\mirall_de.qm"
|
; Make sure only to copy qt, not qt_help, etc
|
||||||
File "${BUILD_PATH}\src\mirall_el.qm"
|
File "${MING_SHARE}\qt4\translations\qt_??.qm"
|
||||||
File "${BUILD_PATH}\src\mirall_en.qm"
|
File "${MING_SHARE}\qt4\translations\qt_??_??.qm"
|
||||||
File "${BUILD_PATH}\src\mirall_es.qm"
|
File "${MING_SHARE}\qt4\translations\qtkeychain_*.qm"
|
||||||
File "${BUILD_PATH}\src\mirall_fr.qm"
|
|
||||||
File "${BUILD_PATH}\src\mirall_it.qm"
|
SetOutPath "$INSTDIR\accessible"
|
||||||
File "${BUILD_PATH}\src\mirall_ja_JP.qm"
|
File "${ACCESSIBLE_DLL_PATH}\qtaccessiblewidgets4.dll"
|
||||||
File "${BUILD_PATH}\src\mirall_pl.qm"
|
SetOutPath "$INSTDIR\imageformats"
|
||||||
File "${BUILD_PATH}\src\mirall_pt_BR.qm"
|
File "${IMAGEFORMATS_DLL_PATH}\qgif4.dll"
|
||||||
File "${BUILD_PATH}\src\mirall_pt_PT.qm"
|
File "${IMAGEFORMATS_DLL_PATH}\qjpeg4.dll"
|
||||||
File "${BUILD_PATH}\src\mirall_ru.qm"
|
File "${IMAGEFORMATS_DLL_PATH}\qico4.dll"
|
||||||
File "${BUILD_PATH}\src\mirall_sk_SK.qm"
|
|
||||||
File "${BUILD_PATH}\src\mirall_sl.qm"
|
|
||||||
File "${BUILD_PATH}\src\mirall_sv.qm"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\modules"
|
SetOutPath "$INSTDIR\modules"
|
||||||
; FIXME: fix installation dir of module, currently needs manual copying to
|
; FIXME: fix installation dir of module, currently needs manual copying to
|
||||||
@@ -317,13 +309,14 @@ Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
|||||||
|
|
||||||
;License & release notes.
|
;License & release notes.
|
||||||
File "@CPACK_RESOURCE_FILE_LICENSE@"
|
File "@CPACK_RESOURCE_FILE_LICENSE@"
|
||||||
File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
|
;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
|
||||||
|
|
||||||
;QT stuff:
|
;QT stuff:
|
||||||
File "${QT_DLL_PATH}\QtCore4.dll"
|
File "${QT_DLL_PATH}\QtCore4.dll"
|
||||||
File "${QT_DLL_PATH}\QtGui4.dll"
|
File "${QT_DLL_PATH}\QtGui4.dll"
|
||||||
File "${QT_DLL_PATH}\QtNetwork4.dll"
|
File "${QT_DLL_PATH}\QtNetwork4.dll"
|
||||||
File "${QT_DLL_PATH}\QtXml4.dll"
|
File "${QT_DLL_PATH}\QtXml4.dll"
|
||||||
|
File "${QT_DLL_PATH}\QtWebKit4.dll"
|
||||||
|
|
||||||
;QtKeyChain stuff
|
;QtKeyChain stuff
|
||||||
File "${MING_BIN}\libqtkeychain.dll"
|
File "${MING_BIN}\libqtkeychain.dll"
|
||||||
@@ -347,13 +340,12 @@ Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
|||||||
|
|
||||||
; Other
|
; Other
|
||||||
;File "${MING_BIN}\libpng15-15.dll"
|
;File "${MING_BIN}\libpng15-15.dll"
|
||||||
;File "${MING_BIN}\libjpeg-8.dll"
|
File "${MING_BIN}\libjpeg-8.dll"
|
||||||
File "${MING_BIN}\zlib1.dll"
|
File "${MING_BIN}\zlib1.dll"
|
||||||
File "${MING_BIN}\libcrypto-8.dll"
|
File "${MING_BIN}\libcrypto-10.dll"
|
||||||
File "${MING_BIN}\libssl-8.dll"
|
File "${MING_BIN}\libssl-10.dll"
|
||||||
|
|
||||||
; CSync configs
|
; CSync configs
|
||||||
File "${CSYNC_CONFIG_DIR}/ocsync.conf"
|
|
||||||
File "${SOURCE_PATH}/sync-exclude.lst"
|
File "${SOURCE_PATH}/sync-exclude.lst"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
@@ -369,9 +361,9 @@ SectionGroup "Shortcuts"
|
|||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
RMDir /r "$SMPROGRAMS\${APPLICATION_NAME}"
|
RMDir /r "$SMPROGRAMS\${APPLICATION_NAME}"
|
||||||
CreateDirectory "$SMPROGRAMS\${APPLICATION_NAME}"
|
CreateDirectory "$SMPROGRAMS\${APPLICATION_NAME}"
|
||||||
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
|
;CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
|
||||||
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
||||||
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Release notes.lnk" "$INSTDIR\NOTES.txt"
|
;CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Release notes.lnk" "$INSTDIR\NOTES.txt"
|
||||||
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
${MementoSectionEnd}
|
${MementoSectionEnd}
|
||||||
@@ -399,17 +391,6 @@ SectionGroup "Shortcuts"
|
|||||||
|
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
!ifdef OPTION_SECTION_SC_AUTOSTART
|
|
||||||
${MementoSection} "Autostart" SEC_AUTOSTART
|
|
||||||
SectionIn 1 2
|
|
||||||
SetDetailsPrint textonly
|
|
||||||
DetailPrint "Creating Windows Start Entry"
|
|
||||||
SetDetailsPrint listonly
|
|
||||||
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" \
|
|
||||||
"${APPLICATION_NAME}" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
|
||||||
${MementoSectionEnd}
|
|
||||||
!endif
|
|
||||||
|
|
||||||
${MementoSectionDone}
|
${MementoSectionDone}
|
||||||
|
|
||||||
; Installer section descriptions
|
; Installer section descriptions
|
||||||
@@ -419,7 +400,6 @@ ${MementoSectionDone}
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "${APPLICATION_NAME} program group."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "${APPLICATION_NAME} program group."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for ${APPLICATION_NAME}."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for ${APPLICATION_NAME}."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for ${APPLICATION_NAME}."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for ${APPLICATION_NAME}."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_AUTOSTART} "Register ${APPLICATION_NAME} to run on Windows startup."
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
Section -post
|
Section -post
|
||||||
@@ -522,11 +502,6 @@ Section Uninstall
|
|||||||
|
|
||||||
DeleteRegKey HKCR "${APPLICATION_NAME}"
|
DeleteRegKey HKCR "${APPLICATION_NAME}"
|
||||||
|
|
||||||
;Windows Start entry
|
|
||||||
!ifdef OPTION_SECTION_SC_AUTOSTART
|
|
||||||
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${APPLICATION_NAME}"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
;Start menu shortcuts.
|
;Start menu shortcuts.
|
||||||
!ifdef OPTION_SECTION_SC_START_MENU
|
!ifdef OPTION_SECTION_SC_START_MENU
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|||||||
20
cmake/modules/Warnings.cmake
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||||
|
OUTPUT_VARIABLE GCC_VERSION)
|
||||||
|
if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-long-long")
|
||||||
|
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Wno-long-long")
|
||||||
|
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||||
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Wno-long-long")
|
||||||
|
endif(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||||
|
# TODO: handle msvc compilers warnings?
|
||||||
|
|
||||||
|
if(DEFINED MIRALL_FATAL_WARNINGS)
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER MATCHES "clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||||
|
endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER MATCHES "clang")
|
||||||
|
# TODO: handle msvc compilers warnings?
|
||||||
|
endif(DEFINED MIRALL_FATAL_WARNINGS)
|
||||||
@@ -2,11 +2,17 @@
|
|||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#cmakedefine USE_INOTIFY 1
|
#cmakedefine USE_INOTIFY 1
|
||||||
#cmakedefine WITH_CSYNC 1
|
|
||||||
#cmakedefine WITH_QTKEYCHAIN 1
|
#cmakedefine WITH_QTKEYCHAIN 1
|
||||||
|
|
||||||
#cmakedefine GIT_SHA1 "@GIT_SHA1@"
|
#cmakedefine GIT_SHA1 "@GIT_SHA1@"
|
||||||
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
||||||
#cmakedefine THEME_CLASS @THEME_CLASS@
|
#cmakedefine THEME_CLASS @THEME_CLASS@
|
||||||
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
||||||
|
|
||||||
|
#cmakedefine APPLICATION_NAME "@APPLICATION_NAME@"
|
||||||
|
#cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
||||||
|
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
|
||||||
|
|
||||||
|
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||||
|
#cmakedefine DATADIR "@DATADIR@"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,41 +13,73 @@ if(SPHINX_FOUND)
|
|||||||
set(LATEX_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/logo-blue.pdf")
|
set(LATEX_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/logo-blue.pdf")
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
|
||||||
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
|
||||||
|
if(WITH_DOC)
|
||||||
|
add_custom_target(doc ALL DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||||
|
install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR})
|
||||||
|
else(WITH_DOC)
|
||||||
|
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||||
|
endif(WITH_DOC)
|
||||||
|
|
||||||
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ocdoc/_shared_assets")
|
||||||
|
add_dependencies(doc doc-html-org)
|
||||||
|
add_dependencies(doc doc-html-com)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(PDFLATEX_FOUND)
|
if(PDFLATEX_FOUND)
|
||||||
# if this still fails on Debian/Ubuntu, run
|
# if this still fails on Debian/Ubuntu, run
|
||||||
# apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
|
# apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
|
||||||
add_custom_target(doc-latex ${SPHINX_EXECUTABLE}
|
add_custom_target(doc-latex ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b latex
|
-q -c . -b latex
|
||||||
-d ${SPHINX_CACHE_DIR}
|
-d ${SPHINX_CACHE_DIR}/latex
|
||||||
-D latex_logo=${LATEX_LOGO}
|
-D latex_logo=${LATEX_LOGO}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${SPHINX_PDF_DIR} )
|
${SPHINX_PDF_DIR} )
|
||||||
add_custom_target(doc-pdf make -C ${SPHINX_PDF_DIR} all-pdf
|
add_custom_target(doc-pdf make -C ${SPHINX_PDF_DIR} all-pdf
|
||||||
DEPENDS doc-latex )
|
DEPENDS doc-latex )
|
||||||
add_dependencies(doc doc-pdf)
|
add_dependencies(doc doc-pdf)
|
||||||
|
if (WITH_DOC)
|
||||||
|
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
endif (WITH_DOC)
|
||||||
endif(PDFLATEX_FOUND)
|
endif(PDFLATEX_FOUND)
|
||||||
if (EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
|
if (EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
|
||||||
add_custom_target( doc-qch-sphinx ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-qch-sphinx ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b qthelp
|
-q -c . -b qthelp
|
||||||
-d ${SPHINX_CACHE_DIR}
|
-d ${SPHINX_CACHE_DIR}/qthelp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${SPHINX_QCH_DIR} )
|
${SPHINX_QCH_DIR} )
|
||||||
add_custom_target( doc-qch ${QT_QCOLLECTIONGENERATOR_EXECUTABLE}
|
add_custom_target( doc-qch ${QT_QCOLLECTIONGENERATOR_EXECUTABLE}
|
||||||
${SPHINX_QCH_DIR}/*.qhcp
|
${SPHINX_QCH_DIR}/*.qhcp
|
||||||
DEPENDS doc-qch-sphinx )
|
DEPENDS doc-qch-sphinx )
|
||||||
add_dependencies(doc doc-qch)
|
add_dependencies(doc doc-qch)
|
||||||
|
if (WITH_DOC)
|
||||||
|
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
endif (WITH_DOC)
|
||||||
endif()
|
endif()
|
||||||
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b html
|
-q -c . -b html
|
||||||
-d ${SPHINX_CACHE_DIR}
|
-d ${SPHINX_CACHE_DIR}/html
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${SPHINX_HTML_DIR} )
|
${SPHINX_HTML_DIR}/unthemed )
|
||||||
|
add_custom_target( doc-html-org ${SPHINX_EXECUTABLE}
|
||||||
|
-q -c . -b html
|
||||||
|
-d ${SPHINX_CACHE_DIR}/html
|
||||||
|
-D html_theme=owncloud_org
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${SPHINX_HTML_DIR}/org )
|
||||||
|
add_custom_target( doc-html-com ${SPHINX_EXECUTABLE}
|
||||||
|
-q -c . -b html
|
||||||
|
-d ${SPHINX_CACHE_DIR}/html
|
||||||
|
-D html_theme=owncloud_com
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${SPHINX_HTML_DIR}/com )
|
||||||
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b man
|
-q -c . -b man
|
||||||
-d ${SPHINX_CACHE_DIR}
|
-d ${SPHINX_CACHE_DIR}/man
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${SPHINX_MAN_DIR} )
|
${SPHINX_MAN_DIR} )
|
||||||
|
|
||||||
## Building CHM files requires HTML Help Workshop. Since it requires wine
|
## Building CHM files requires HTML Help Workshop. Since it requires wine
|
||||||
## with special dependencies, it's impossible to write a cmake check for it.
|
## with special dependencies, it's impossible to write a cmake check for it.
|
||||||
## This is why doc-chm is not a dependency for doc. Instead, run
|
## This is why doc-chm is not a dependency for doc. Instead, run
|
||||||
@@ -56,7 +88,7 @@ if(SPHINX_FOUND)
|
|||||||
add_custom_target( doc-chm-sphinx ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-chm-sphinx ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b htmlhelp
|
-q -c . -b htmlhelp
|
||||||
-D html_theme=basic
|
-D html_theme=basic
|
||||||
-d ${SPHINX_CACHE_DIR}
|
-d ${SPHINX_CACHE_DIR}/htmlhelp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${SPHINX_HTMLHELP_DIR} )
|
${SPHINX_HTMLHELP_DIR} )
|
||||||
add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd
|
add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd
|
||||||
|
|||||||
37
doc/accountsetup.rst
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Setting up an Account
|
||||||
|
=====================
|
||||||
|
|
||||||
|
If no account has been configured, ownCloud Client will automatically assist
|
||||||
|
you in connecting to your ownCloud Server after the application has been
|
||||||
|
started.
|
||||||
|
|
||||||
|
As a first step, specify the URL to your Server, just
|
||||||
|
like you would when you open your ownCloud instance inside a browser.
|
||||||
|
|
||||||
|
.. image:: images/wizard_url.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
.. note:: Make sure to use ``https://`` if the server supports it. Otherwise,
|
||||||
|
your password and all data will be transferred to the server unencrypted.
|
||||||
|
This makes it easy for third parties to intercept your communication, and
|
||||||
|
getting hold of your password!
|
||||||
|
|
||||||
|
Next, you are prompted for your username and password. Again, use the same
|
||||||
|
credentials that you would use to log on via the web interface.
|
||||||
|
|
||||||
|
.. image:: images/wizard_user.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
Finally, choose the folder that ownCloud Client is supposed to sync the
|
||||||
|
contents of your ownCloud account with. By default, this is a folder
|
||||||
|
called `ownCloud`, which will reside in your home directory.
|
||||||
|
|
||||||
|
.. image:: images/wizard_targetfolder.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
After pressing `Connect`, ownCloud Client will commence with the syncing
|
||||||
|
process. The next screen will give you the opportunity to review your
|
||||||
|
settings:
|
||||||
|
|
||||||
|
.. image:: images/wizard_overview.png
|
||||||
|
:scale: 50 %
|
||||||
14
doc/advancedusage.rst
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Advanced Usage
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. index:: Advanced Usage
|
||||||
|
|
||||||
|
Options
|
||||||
|
-------
|
||||||
|
.. index:: command line switches, command line, options, parameters
|
||||||
|
.. include:: options.rst
|
||||||
|
|
||||||
|
Config File
|
||||||
|
-----------
|
||||||
|
.. index:: config file
|
||||||
|
.. include:: conffile.rst
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
Architecture
|
Appendix B: Architecture
|
||||||
============
|
========================
|
||||||
|
|
||||||
.. index:: architecture
|
.. index:: architecture
|
||||||
|
|
||||||
The ownCloud project provides desktop sync clients to synchronize the
|
The ownCloud project provides desktop sync clients to synchronize the
|
||||||
@@ -11,11 +12,10 @@ csync was written to synchronize with ownCloud’s built-in WebDAV server.
|
|||||||
|
|
||||||
The ownCloud sync client is based on a tool called mirall initially written by
|
The ownCloud sync client is based on a tool called mirall initially written by
|
||||||
Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to work
|
Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to work
|
||||||
with ownCloud server. Both mirall and ownCloud Client (oCC) build from the same
|
with ownCloud server.
|
||||||
source, currently hosted in the ownCloud source repo on gitorious.
|
|
||||||
|
|
||||||
oCC is written in C++ using the `Qt Framework`_. As a result oCC runs on the
|
ownCloud Client is written in C++ using the `Qt Framework`_. As a result, the
|
||||||
three important platforms Linux, Windows and MacOS.
|
ownCloud Client runs on the three important platforms Linux, Windows and MacOS.
|
||||||
|
|
||||||
.. _csync: http://www.csync.org
|
.. _csync: http://www.csync.org
|
||||||
.. _`Qt Framework`: http://www.qt-project.org
|
.. _`Qt Framework`: http://www.qt-project.org
|
||||||
@@ -23,8 +23,8 @@ three important platforms Linux, Windows and MacOS.
|
|||||||
The Sync Process
|
The Sync Process
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
First it is important to recall what syncing is. Syncing tries to keep the files
|
First it is important to recall what syncing is: It tries to keep the files
|
||||||
on both repositories the same. That means if a file is added to one repository
|
on two repositories the same. That means if a file is added to one repository
|
||||||
it is going to be copied to the other repository. If a file is changed on one
|
it is going to be copied to the other repository. If a file is changed on one
|
||||||
repository, the change is propagated to the other repository. Also, if a file
|
repository, the change is propagated to the other repository. Also, if a file
|
||||||
is deleted on one side, it is deleted on the other. As a matter of fact, in
|
is deleted on one side, it is deleted on the other. As a matter of fact, in
|
||||||
@@ -34,8 +34,13 @@ server is always master.
|
|||||||
This is the major difference to other systems like a file backup where just
|
This is the major difference to other systems like a file backup where just
|
||||||
changes and new files are propagated but files never get deleted.
|
changes and new files are propagated but files never get deleted.
|
||||||
|
|
||||||
Sync Direction and Strategies
|
The ownCloud Client checks both repositories for changes frequently after a
|
||||||
-----------------------------
|
certain time span. That is refered to as a sync run. In between the local
|
||||||
|
repository is monitored by a file system monitor system that starts a sync run
|
||||||
|
immediately if something was edited, added or removed.
|
||||||
|
|
||||||
|
Sync by Time versus ETag
|
||||||
|
------------------------
|
||||||
.. index:: time stamps, file times, etag, unique id
|
.. index:: time stamps, file times, etag, unique id
|
||||||
|
|
||||||
Until the release of ownCloud 4.5 and ownCloud Client 1.1, ownCloud employed
|
Until the release of ownCloud 4.5 and ownCloud Client 1.1, ownCloud employed
|
||||||
@@ -44,7 +49,7 @@ synced to the other repository: the files modification time.
|
|||||||
|
|
||||||
The *modification timestamp* is part of the files metadata. It is available on
|
The *modification timestamp* is part of the files metadata. It is available on
|
||||||
every relevant filesystem and is the natural indicator for a file change.
|
every relevant filesystem and is the natural indicator for a file change.
|
||||||
modification timestamps do not require special action to create and have
|
Modification timestamps do not require special action to create and have
|
||||||
a general meaning. One design goal of csync is to not require a special server
|
a general meaning. One design goal of csync is to not require a special server
|
||||||
component, that’s why it was chosen as the backend component.
|
component, that’s why it was chosen as the backend component.
|
||||||
|
|
||||||
@@ -57,29 +62,24 @@ machines.
|
|||||||
Since this strategy is rather fragile without NTP, ownCloud 4.5 introduced a
|
Since this strategy is rather fragile without NTP, ownCloud 4.5 introduced a
|
||||||
unique number, which changes whenever the file changes. Although it is a unique
|
unique number, which changes whenever the file changes. Although it is a unique
|
||||||
value, it is not a hash of the file, but a randomly chosen number, which it will
|
value, it is not a hash of the file, but a randomly chosen number, which it will
|
||||||
transmit in the Etag_ field. The client will store this number in a
|
transmit in the Etag_ field. Since the file number is guaranteed to change if
|
||||||
per-directory database, located in the application directory (version 1.1) or
|
the file changes, it can now be used to determine if one of the files has
|
||||||
as a hidden file right in the directory to be synced (later versions).
|
changed.
|
||||||
Since the file number is guaranteed to change if the file changes, it can now be
|
|
||||||
used to determine if one of the files has changed.
|
|
||||||
|
|
||||||
.. todo:: describe what happens if both sides change
|
.. note:: ownCloud Client 1.1 and newer require file ID capabilities on the
|
||||||
|
ownCloud server, hence using them with a server earlier than 4.5.0 is
|
||||||
|
not supported.
|
||||||
|
|
||||||
|
Before the 1.3.0 release of the client the sync process might create faux
|
||||||
|
conflict files if time deviates. The original and the conflict files only
|
||||||
|
differed in the timestamp, but not in content. This behaviour was changed
|
||||||
|
towards a binary check if the files are different.
|
||||||
|
|
||||||
If the per-directory database gets removed, oCC's CSync backend will fall back
|
|
||||||
to a time-stamp based sync process to rebuild the database. Thus it should be
|
|
||||||
made sure that both server and client synchronized to NTP time before
|
|
||||||
restarting the client after a database removal. If time deviates, the sync
|
|
||||||
process might create faux conflict files, which only differ in their time.
|
|
||||||
Those need to be cleaned up manually later on and will not be synced back
|
|
||||||
to the server. However, no files will get deleted in this process.
|
|
||||||
|
|
||||||
Just like files, directories also hold a unique id, which changes whenever
|
Just like files, directories also hold a unique id, which changes whenever
|
||||||
one of the contained files or directories gets modified. Since this is a
|
one of the contained files or directories gets modified. Since this is a
|
||||||
recursive process, it significantly reduces the effort required for a sync
|
recursive process, it significantly reduces the effort required for a sync
|
||||||
cycle, because the client will only walk directories with a modified unique id.
|
cycle, because the client will only walk directories with a modified unique id.
|
||||||
|
|
||||||
.. note:: oCC 1.1 and newer require file ID capabilities on the ownCloud server,
|
|
||||||
hence using them with a server earlier than 4.5.0 is not supported.
|
|
||||||
|
|
||||||
This table outlines the different sync methods attempted depending
|
This table outlines the different sync methods attempted depending
|
||||||
on server/client combination:
|
on server/client combination:
|
||||||
@@ -106,3 +106,56 @@ are involved and one of them is not in sync with NTP time.
|
|||||||
.. _`NTP time synchronisation`: http://en.wikipedia.org/wiki/Network_Time_Protocol
|
.. _`NTP time synchronisation`: http://en.wikipedia.org/wiki/Network_Time_Protocol
|
||||||
.. _Etag: http://en.wikipedia.org/wiki/HTTP_ETag
|
.. _Etag: http://en.wikipedia.org/wiki/HTTP_ETag
|
||||||
|
|
||||||
|
Comparison and Conflict Cases
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
In a sync run the client first has to detect if one of the two repositories have
|
||||||
|
changed files. On the local repository, the client traverses the file
|
||||||
|
tree and compares the modification time of each file with the value it was
|
||||||
|
before. The previous value is stored in the client's database. If it is not, it
|
||||||
|
means that the file has been added to the local repository. Note that on
|
||||||
|
the local side, the modificaton time a good attribute to detect changes because
|
||||||
|
it does not depend on time shifts and such.
|
||||||
|
|
||||||
|
For the remote (ie. ownCloud) repository, the client compares the ETag of each
|
||||||
|
file with it's previous value. Again the previous value is queried from the
|
||||||
|
database. If the ETag is still the same, the file has not changed.
|
||||||
|
|
||||||
|
In case a file has changed on both, the local and the remote repository since
|
||||||
|
the last sync run, it can not easily be decided which version of the file is
|
||||||
|
the one that should be used. However, changes to any side must not be lost.
|
||||||
|
|
||||||
|
That is called a **conflict case**. The client solves it by creating a conflict
|
||||||
|
file of the older of the two files and save the newer one under the original
|
||||||
|
file name. Conflict files are always created on the client and never on the
|
||||||
|
server. The conflict file has the same name as the original file appended with
|
||||||
|
the timestamp of the conflict detection.
|
||||||
|
|
||||||
|
|
||||||
|
.. _ignored-files-label:
|
||||||
|
|
||||||
|
Ignored Files
|
||||||
|
-------------
|
||||||
|
|
||||||
|
ownCloud Client will refuse to sync the following files:
|
||||||
|
|
||||||
|
* Files matched by one of the pattern in :ref:`ignoredFilesEditor-label`
|
||||||
|
* Files containing characters that do not work on certain file systems.
|
||||||
|
Currently, these characters are: `\, :, ?, *, ", >, <, |`
|
||||||
|
* Files starting in ``.csync_journal.db`` (reserved for journalling)
|
||||||
|
|
||||||
|
The Sync Journal
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The client stores the ETag number in a per-directory database,
|
||||||
|
called the journal. It is a hidden file right in the directory
|
||||||
|
to be synced.
|
||||||
|
|
||||||
|
If the journal database gets removed, ownCloud Client's CSync backend will
|
||||||
|
rebuild the database by comparing the files and their modification times. Thus
|
||||||
|
it should be made sure that both server and client synchronized with NTP time
|
||||||
|
before restarting the client after a database removal.
|
||||||
|
|
||||||
|
Pressing ``F5`` in the Account Settings Dialog that allows to "reset" the
|
||||||
|
journal. That can be used to recreate the journal database. Use this only
|
||||||
|
if advised to do so by the developer or support staff.
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
Building the Client
|
.. _building-label:
|
||||||
===================
|
|
||||||
|
Appendix A: Building the Client
|
||||||
|
===============================
|
||||||
|
|
||||||
This section explains how to build the ownCloud Client from source
|
This section explains how to build the ownCloud Client from source
|
||||||
for all major platforms. You should read this section if you want
|
for all major platforms. You should read this section if you want
|
||||||
@@ -20,20 +22,29 @@ Linux
|
|||||||
Mac OS X
|
Mac OS X
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Follow the `generic build instructions`_.
|
Next to XCode (and the command line tools!), you will need some
|
||||||
|
extra dependencies.
|
||||||
|
|
||||||
You can install the missing dependencies via MacPorts_ or Homebrew_.
|
You can install these dependencies via MacPorts_ or Homebrew_.
|
||||||
This is only needed on the build machine, since non-standard libs
|
This is only needed on the build machine, since non-standard libs
|
||||||
will be deployed in the app bundle.
|
will be deployed in the app bundle.
|
||||||
|
|
||||||
The only exception to this rule is libiniparser_, which lacks a decent
|
The tested and preferred way is to use HomeBrew_. The ownCloud team has
|
||||||
build system. If you are using Homebrew_, you can just add it::
|
its own repository which contains non-standard recipes. Add it with::
|
||||||
|
|
||||||
brew tap dschmidt/owncloud
|
brew tap owncloud/owncloud
|
||||||
brew install iniparser
|
|
||||||
|
|
||||||
Otherwise, you need to copy the header and lib files to
|
Next, install the missing dependencies::
|
||||||
``/usr/local/include`` and ``/usr/local/lib`` respectively.
|
|
||||||
|
brew install $(brew deps ocsync)
|
||||||
|
brew install $(brew deps mirall)
|
||||||
|
|
||||||
|
bug:
|
||||||
|
iniparser is not provideed by $(brew deps ocsync)
|
||||||
|
fix with brew install iniparser
|
||||||
|
|
||||||
|
|
||||||
|
To build mirall and csync, follow the `generic build instructions`_.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You should not call ``make install`` at any time, since the product of the
|
You should not call ``make install`` at any time, since the product of the
|
||||||
@@ -51,18 +62,22 @@ if you do not have it installed already.
|
|||||||
In order to cross-compile, the following repositories need to be added
|
In order to cross-compile, the following repositories need to be added
|
||||||
via YaST or ``zypper ar`` (adjust when using openSUSE 12.2)::
|
via YaST or ``zypper ar`` (adjust when using openSUSE 12.2)::
|
||||||
|
|
||||||
http://download.opensuse.org/repositories/isv:/ownCloud:/devel:/mingw:/win32/openSUSE_12.1/
|
zypper ar http://download.opensuse.org/repositories/isv:/ownCloud:/devel:/mingw:/win32/openSUSE_12.1/isv:ownCloud:devel:mingw:win32.repo
|
||||||
http://download.opensuse.org/repositories/windows:/mingw/openSUSE_12.1/
|
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/windows:mingw:win32.repo
|
||||||
http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.1/
|
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_12.1/windows:mingw.repo
|
||||||
|
|
||||||
Next, install the cross-compiler packages and the cross-compiled dependencies::
|
Next, install the cross-compiler packages and the cross-compiled dependencies::
|
||||||
|
|
||||||
zypper si -d mingw32-csync
|
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
||||||
zypper install kdewin-png2ico mingw32-libqt4 mingw32-libqt4-devel \
|
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
||||||
mingw32-libgcrypt mingw32-libgnutls mingw32-libneon \
|
mingw32-headers mingw32-runtime site-config mingw32-iniparser-devel \
|
||||||
mingw32-libbeecrypt mingw32-libopenssl mingw32-openssl \
|
mingw32-libsqlite-devel mingw32-dlfcn-devel mingw32-libssh2-devel \
|
||||||
mingw32-libpng-devel mingw32-libsqlite mingw32-qtkeychain \
|
kdewin-png2ico mingw32-libqt4 mingw32-libqt4-devel mingw32-libgcrypt \
|
||||||
mingw32-qtkeychain-devel mingw32-iniparser mingw32-dlfcn
|
mingw32-libgnutls mingw32-libneon mingw32-libneon-devel mingw32-libbeecrypt \
|
||||||
|
mingw32-libopenssl mingw32-openssl mingw32-libpng-devel mingw32-libsqlite \
|
||||||
|
mingw32-qtkeychain mingw32-qtkeychain-devel mingw32-iniparser mingw32-dlfcn \
|
||||||
|
mingw32-libintl-devel mingw32-libneon-devel mingw32-libopenssl-devel \
|
||||||
|
mingw32-libproxy-devel mingw32-libxml2-devel mingw32-zlib-devel
|
||||||
|
|
||||||
For the installer, the NSIS installer package is also required::
|
For the installer, the NSIS installer package is also required::
|
||||||
|
|
||||||
@@ -76,18 +91,18 @@ For the installer, the NSIS installer package is also required::
|
|||||||
You will also need to manually download and install the following files with
|
You will also need to manually download and install the following files with
|
||||||
``rpm -ivh <package>`` (They will also work with OpenSUSE 12.2)::
|
``rpm -ivh <package>`` (They will also work with OpenSUSE 12.2)::
|
||||||
|
|
||||||
http://pmbs.links2linux.org/download/mingw:/32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
|
rpm -ihv http://pmbs.links2linux.org/download/mingw:/32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
|
||||||
http://pmbs.links2linux.org/download/mingw:/32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
|
rpm -ihv http://pmbs.links2linux.org/download/mingw:/32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
|
||||||
|
|
||||||
Now, follow the `generic build instructions`_, but pay attention to
|
Now, follow the `generic build instructions`_, but pay attention to
|
||||||
the following differences:
|
the following differences:
|
||||||
|
|
||||||
1. For building ``libocsync``, you need to use ``mingw32-cmake`` instead
|
1. For building ``libocsync``, you need to use ``mingw32-cmake`` instead
|
||||||
of cmake.
|
of cmake.
|
||||||
2. Also, you need to specify *absolute pathes* for ``CSYNC_LIBRARY_PATH``
|
2. for building ``mirall``, you need to use ``cmake`` again, but make sure
|
||||||
and ``CSYNC_LIBRARY_PATH`` when running ``cmake`` on mirall.
|
|
||||||
3. for building ``mirall``, you need to use ``cmake`` again, but make sure
|
|
||||||
to append the following parameter::
|
to append the following parameter::
|
||||||
|
3. Also, you need to specify *absolute pathes* for ``CSYNC_LIBRARY_PATH``
|
||||||
|
and ``CSYNC_LIBRARY_PATH`` when running ``cmake`` on mirall.
|
||||||
|
|
||||||
``-DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``
|
``-DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``
|
||||||
|
|
||||||
@@ -147,14 +162,17 @@ directories. If this succeeds, call ``make``. The owncloud binary should appear
|
|||||||
in the ``bin`` directory. You can also run ``make install`` to install the client to
|
in the ``bin`` directory. You can also run ``make install`` to install the client to
|
||||||
``/usr/local/bin``.
|
``/usr/local/bin``.
|
||||||
|
|
||||||
To build in installer (requires the mingw32-cross-nsis packages)::
|
To build an installer/app bundle (requires the mingw32-cross-nsis packages on Windows)::
|
||||||
|
|
||||||
make package
|
make package
|
||||||
|
|
||||||
|
Known cmake parameters:
|
||||||
|
|
||||||
|
* WITH_DOC=TRUE: create doc and manpages via running ``make``; also adds install statements to be able to install it via ``make install``.
|
||||||
|
|
||||||
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
|
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
|
||||||
.. _CSync: http://www.csync.org
|
.. _CSync: http://www.csync.org
|
||||||
.. _`Client Download Page`: http://owncloud.org/sync-clients/
|
.. _`Client Download Page`: http://owncloud.org/sync-clients/
|
||||||
.. _Git: http://git-scm.com
|
.. _Git: http://git-scm.com
|
||||||
.. _MacPorts: http://www.macports.org
|
.. _MacPorts: http://www.macports.org
|
||||||
.. _Homebrew: http://mxcl.github.com/homebrew/
|
.. _Homebrew: http://mxcl.github.com/homebrew/
|
||||||
.. _libiniparser: http://ndevilla.free.fr/iniparser/
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import sys, os
|
|||||||
extensions = ['sphinx.ext.todo']
|
extensions = ['sphinx.ext.todo']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
#templates_path = ['templates']
|
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/templates']
|
||||||
|
|
||||||
# The suffix of source filenames.
|
# The suffix of source filenames.
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
@@ -41,7 +41,7 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'ownCloud Client Manual'
|
project = u'ownCloud Client Manual'
|
||||||
copyright = u'2012, The ownCloud developers'
|
copyright = u'2013, The ownCloud developers'
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
@@ -64,7 +64,7 @@ release = '@VERSION@'
|
|||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build','scripts/*']
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||||
#default_role = None
|
#default_role = None
|
||||||
@@ -95,7 +95,7 @@ pygments_style = 'sphinx'
|
|||||||
#html_theme_options = {}
|
#html_theme_options = {}
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
# Add any paths that contain custom themes here, relative to this directory.
|
||||||
#html_theme_path = ['themes']
|
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/themes']
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
@@ -120,7 +120,7 @@ html_short_title = "Client Manual"
|
|||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
#html_static_path = ['static']
|
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/static']
|
||||||
|
|
||||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||||
# using the given strftime format.
|
# using the given strftime format.
|
||||||
@@ -213,12 +213,12 @@ latex_documents = [
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'owncloud', u'ownCloud Client Manual',
|
('owncloud.1', 'owncloud', u'File synchronisation desktop utility.',
|
||||||
[u'The ownCloud developers'], 1)
|
[u'The ownCloud developers'], 1),
|
||||||
]
|
]
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
# If true, show URL addresses after external links.
|
||||||
#man_show_urls = False
|
man_show_urls = True
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ------------------------------------------------
|
# -- Options for Texinfo output ------------------------------------------------
|
||||||
@@ -248,7 +248,7 @@ texinfo_documents = [
|
|||||||
epub_title = u'ownCloud Client Manual'
|
epub_title = u'ownCloud Client Manual'
|
||||||
epub_author = u'The ownCloud developers'
|
epub_author = u'The ownCloud developers'
|
||||||
epub_publisher = u'The ownCloud developers'
|
epub_publisher = u'The ownCloud developers'
|
||||||
epub_copyright = u'2012, The ownCloud developers'
|
epub_copyright = u'2013, The ownCloud developers'
|
||||||
|
|
||||||
# The language of the text. It defaults to the language option
|
# The language of the text. It defaults to the language option
|
||||||
# or en if the language is not set.
|
# or en if the language is not set.
|
||||||
|
|||||||
26
doc/conffile.rst
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
ownCloud Client reads a configuration file.
|
||||||
|
|
||||||
|
On Linux it can be found in:
|
||||||
|
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
|
||||||
|
|
||||||
|
On Windows it can be found in:
|
||||||
|
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
|
||||||
|
|
||||||
|
On Mac it can be found in:
|
||||||
|
``$HOME/Library/Application Support/ownCloud``
|
||||||
|
|
||||||
|
|
||||||
|
It contains settings in the ini file format known from Windows.
|
||||||
|
|
||||||
|
.. note:: Changes here should be done carefully as wrong settings can cause disfunctionality.
|
||||||
|
|
||||||
|
.. note:: Changes may be overwritten by using ownCloud's configuration dialog.
|
||||||
|
|
||||||
|
These are config settings that may be changed:
|
||||||
|
|
||||||
|
``remotePollinterval`` (default: ``30000``)
|
||||||
|
Poll time for the remote repository in milliseconds
|
||||||
|
|
||||||
|
``maxLogLines`` (default: ``20000``)
|
||||||
|
Maximum count of log lines shown in the log window
|
||||||
|
|
||||||
@@ -4,8 +4,8 @@ Glossary
|
|||||||
.. glossary::
|
.. glossary::
|
||||||
:sorted:
|
:sorted:
|
||||||
|
|
||||||
|
ownCloud Sync Client
|
||||||
ownCloud Client
|
ownCloud Client
|
||||||
oCC
|
|
||||||
Name of the official ownCloud syncing client for desktop, which runs on
|
Name of the official ownCloud syncing client for desktop, which runs on
|
||||||
Windows, Mac OS X and Linux. It is based Mirall, and uses the CSync
|
Windows, Mac OS X and Linux. It is based Mirall, and uses the CSync
|
||||||
sync engine for synchronization with the ownCloud server.
|
sync engine for synchronization with the ownCloud server.
|
||||||
@@ -23,6 +23,7 @@ Glossary
|
|||||||
exist in the client directory.
|
exist in the client directory.
|
||||||
|
|
||||||
unique id
|
unique id
|
||||||
|
ETag
|
||||||
ID assigned to every file starting with ownCloud server 4.5 and submitted
|
ID assigned to every file starting with ownCloud server 4.5 and submitted
|
||||||
via the HTTP ``Etag``. Used to check if files on client and server have
|
via the HTTP ``Etag``. Used to check if files on client and server have
|
||||||
changed.
|
changed.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 45 KiB |
BIN
doc/images/icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
doc/images/ignored_files_editor.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
doc/images/menu.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
doc/images/settings_account.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
doc/images/settings_general.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
doc/images/settings_network.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
doc/images/sync_protocol.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
doc/images/wizard_overview.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
doc/images/wizard_targetfolder.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
doc/images/wizard_url.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
doc/images/wizard_user.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
@@ -6,8 +6,11 @@ Contents
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
install
|
introduction
|
||||||
usage
|
accountsetup
|
||||||
|
visualtour
|
||||||
|
advancedusage
|
||||||
|
|
||||||
building
|
building
|
||||||
architecture
|
architecture
|
||||||
troubleshooting
|
troubleshooting
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
Installation
|
|
||||||
============
|
|
||||||
|
|
||||||
General
|
|
||||||
-------
|
|
||||||
|
|
||||||
The latest version of ownCloud client can be obtained at
|
|
||||||
http://owncloud.org/sync-clients/.
|
|
||||||
|
|
||||||
Windows
|
|
||||||
-------
|
|
||||||
|
|
||||||
ownCloud client for Windows is provided as a NSIS-based setup file for
|
|
||||||
machine-wide install.
|
|
||||||
|
|
||||||
Mac OS X
|
|
||||||
--------
|
|
||||||
|
|
||||||
Installing the ownCloud client on your Mac follows the normal app installation
|
|
||||||
pattern:
|
|
||||||
|
|
||||||
1. Download the installation file Click ownCloud-1.1.1.dmg, a window with the
|
|
||||||
2. ownCloud icon opens In that window, drag the ownCloud application into the
|
|
||||||
3. ‘Applications’ folder on the right hand side From ‘Applications’, choose
|
|
||||||
ownCloud
|
|
||||||
|
|
||||||
Linux
|
|
||||||
------
|
|
||||||
|
|
||||||
The ownCloud client is provided as in a convenient repository for a wide range
|
|
||||||
of popular Linux distributions. If you want to build the sources instead.
|
|
||||||
|
|
||||||
Supported distributions are CentOS/RHEL, Fedora, SLES, openSUSE, Ubuntu and
|
|
||||||
Debian.
|
|
||||||
|
|
||||||
To support other distributions, a source build is required.
|
|
||||||
37
doc/introduction.rst
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
|
This is the documentation for the ownCloud Sync Client, also referred to as
|
||||||
|
the ownCloud Client.
|
||||||
|
|
||||||
|
The ownCloud Sync Client is a desktop program you install on your computer.
|
||||||
|
Specify one ore more directories on the local machine to sync your ownCloud
|
||||||
|
server, and always have your latest files wherever you are. Make a change to the
|
||||||
|
files on one computer, it will flow across the others using these desktop sync
|
||||||
|
clients.
|
||||||
|
|
||||||
|
ownCloud Client is available for Windows, Mac OS X and various Linux
|
||||||
|
distributions. See below for details on how to obtain the Client.
|
||||||
|
|
||||||
|
Obtaining the Client
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The latest version of the ownCloud Client can be obtained at
|
||||||
|
http://owncloud.org/sync-clients/.
|
||||||
|
|
||||||
|
ownCloud client for **Windows** is provided as a NSIS-based setup file for
|
||||||
|
machine-wide install. Installing the ownCloud client on **Mac OS** follows
|
||||||
|
the normal app bundle installation pattern:
|
||||||
|
|
||||||
|
1. Download the installation file: Click ``ownCloud-x.y.z.dmg``, a window with
|
||||||
|
the ownCloud icon opens.
|
||||||
|
2. In that window, drag the ownCloud application into the ``Applications``
|
||||||
|
folder.
|
||||||
|
3. On the right hand side From ``Applications``, choose ``ownCloud``.
|
||||||
|
|
||||||
|
The ownCloud Client is also provided as in a convenient repository for a wide
|
||||||
|
range of popular **Linux distributions**. If you want to build the sources
|
||||||
|
instead.
|
||||||
|
|
||||||
|
Supported distributions are Fedora, openSUSE, Ubuntu and Debian.
|
||||||
|
To support other distributions, a is required, see :ref:`building-label`
|
||||||
1
doc/ocdoc
Submodule
20
doc/options.rst
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
ownCloud Client supports the following command line switches:
|
||||||
|
|
||||||
|
``--logwindow``
|
||||||
|
open a window to show log output.
|
||||||
|
|
||||||
|
``--logfile`` `<filename>`
|
||||||
|
write log output to file <filename>.
|
||||||
|
|
||||||
|
``--logdir`` `<name>`
|
||||||
|
write each sync log output in a new file in directory <name>
|
||||||
|
|
||||||
|
``--logexpire`` `<hours>`
|
||||||
|
removes logs older than <hours> hours. (to be used with --logdir)
|
||||||
|
|
||||||
|
``--logflush``
|
||||||
|
flush the log file after every write.
|
||||||
|
|
||||||
|
``--confdir`` `<dirname>`
|
||||||
|
Use the given configuration directory.
|
||||||
|
|
||||||
37
doc/owncloud.1.rst
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
owncloud(1)
|
||||||
|
-----------
|
||||||
|
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
========
|
||||||
|
*owncloud* [`OPTIONS`...]
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
===========
|
||||||
|
ownCloud is a file synchronisation desktop utility based on mirall.
|
||||||
|
It synchronizes files on your local machine with an ownCloud Server. If you
|
||||||
|
make a change to the files on one computer, it will flow across the others
|
||||||
|
using this desktop sync clients.
|
||||||
|
|
||||||
|
Normally you start the client by click on the desktop icon or start from the
|
||||||
|
application menu. After starting an ownCloud icon appears in the system tray.
|
||||||
|
|
||||||
|
Options
|
||||||
|
=======
|
||||||
|
.. include:: options.rst
|
||||||
|
|
||||||
|
Config File
|
||||||
|
===========
|
||||||
|
.. include:: conffile.rst
|
||||||
|
|
||||||
|
BUGS
|
||||||
|
====
|
||||||
|
|
||||||
|
Please report bugs at https://github.com/owncloud/core/issues.
|
||||||
|
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
========
|
||||||
|
`csync(1)`
|
||||||
|
|
||||||
@@ -4,9 +4,12 @@ Doc Build Convenience Scripts
|
|||||||
* ``htmlhelp.sh``: A script to install Microsoft HTML Workshop on Linux or Mac OS using Wine, along with some dependencies.
|
* ``htmlhelp.sh``: A script to install Microsoft HTML Workshop on Linux or Mac OS using Wine, along with some dependencies.
|
||||||
* ``htmlhelp.reg``: Registry file to override some DLLs with their native version and set the right Windows version.
|
* ``htmlhelp.reg``: Registry file to override some DLLs with their native version and set the right Windows version.
|
||||||
|
|
||||||
Those files have been taken from the HTML Help Project (http://code.google.com/p/htmlhelp/wiki/HHW4Wine).
|
Those files have been taken from the `HTML Help Project`_.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
The HTML Help Project has licensed its software under LGPLv3 terms.
|
The HTML Help Project has licensed_ its software under LGPLv2.1 terms
|
||||||
|
|
||||||
|
.. _HTML Help Project: http://code.google.com/p/htmlhelp/wiki/HHW4Wine
|
||||||
|
.. _licensed: https://code.google.com/p/htmlhelp/source/browse/trunk/pyhtmlhelp/COPYING
|
||||||
|
|||||||
@@ -1,28 +1,136 @@
|
|||||||
Troubleshooting
|
Appendix C: Troubleshooting
|
||||||
===============
|
===========================
|
||||||
|
|
||||||
:All of my desktop clients fail to connect to ownCloud:
|
If the client fails to start syncing it basically can have two
|
||||||
|
basic reasons: Either the server setup has a problem or the client
|
||||||
|
has a bug. When reporting bugs, it is crucial to find out what part
|
||||||
|
of the system causes the problem.
|
||||||
|
|
||||||
|
Identifying basic functionality problems
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
:Perform a general ownCloud Server test:
|
||||||
|
A very first check is to verify that you can log on to ownClouds web
|
||||||
|
application. Assuming your ownCloud instance is installed at
|
||||||
|
``http://yourserver.com/owncloud``, type
|
||||||
|
``http://yourserver.com/owncloud/`` into your browsers address bar.
|
||||||
|
|
||||||
|
If you are not prompted to enter your user name and password, or if you
|
||||||
|
see a red warning box on the page, your server setup is not correct or needs
|
||||||
|
fixes. Please verify that your server installation is working correctly.
|
||||||
|
|
||||||
|
:Ensure the WebDAV API is working:
|
||||||
|
If all desktop clients fail to connect to ownCloud, but the access via the
|
||||||
|
web interface works, the problem often is a mis-configuration of the WebDAV
|
||||||
|
API.
|
||||||
|
|
||||||
|
The ownCloud client uses the built-in WebDAV access of the server content.
|
||||||
Verify that you can log on to ownClouds WebDAV server. Assuming your ownCloud
|
Verify that you can log on to ownClouds WebDAV server. Assuming your ownCloud
|
||||||
instance is installed at ``http://yourserver.com/owncloud``, type
|
instance is installed at ``http://yourserver.com/owncloud``, type
|
||||||
``http://yourserver.com/owncloud/remote.php/webdav`` into your browsers
|
``http://yourserver.com/owncloud/remote.php/webdav`` into your browsers
|
||||||
address bar.
|
address bar.
|
||||||
|
|
||||||
If you are not prompted to enter your user name and password, please verify
|
|
||||||
that your server installation is working correctly.
|
|
||||||
|
|
||||||
If you are prompted, but the authentication fails even though the credentials
|
If you are prompted, but the authentication fails even though the credentials
|
||||||
your provided are correct, please ensure that your authentication backend
|
your provided are correct, please ensure that your authentication backend
|
||||||
is configured properly.
|
is configured properly.
|
||||||
|
|
||||||
|
:Use a WebDAV command line tool to test:
|
||||||
|
A more sophisticated test is to use a WebDAV command line client and log
|
||||||
|
into the ownCloud WebDAV server, such as a little app called cadaver,
|
||||||
|
available on Linux. It can be used to further verify that the WebDAV server is
|
||||||
|
running properly, for example by performing PROPFIND calls:
|
||||||
|
|
||||||
:The desktop client fails for an unknown reason:
|
``propget .`` called within cadaver will return some properties of the current
|
||||||
Start the client with ``--logwindow``. You can also open a log window for an
|
directory and thus be a successful WebDAV connect.
|
||||||
already running session, by simply starting the client again with this
|
|
||||||
parameter. Syntax:
|
Isolating other issues
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
If the sync result is unreliable, please ensure that the folder synced with
|
||||||
|
ownCloud is not shared with other syncing apps.
|
||||||
|
|
||||||
|
.. note:: Syncing the same directory with ownCloud and other sync software such
|
||||||
|
as Unison, rsync, Microsoft Windows Offline Folders or cloud services
|
||||||
|
such as DropBox or Microsoft SkyDrive is not supported and should
|
||||||
|
not be attempted. In the worst case, doing so can result in data
|
||||||
|
loss.
|
||||||
|
|
||||||
|
If some files do not get take a look at the sync protocol. Some files are
|
||||||
|
automatically automatically being ignored because they are system files,
|
||||||
|
others get ignored because their file name contains characters that cannot
|
||||||
|
be represented on certain file systems. See :ref:`_ignored-files-label` for
|
||||||
|
details.
|
||||||
|
|
||||||
|
If you are operating your own server and use the local storage backend (the
|
||||||
|
default), make sure that ownCloud has exclusive access to the directory.
|
||||||
|
|
||||||
|
.. note:: The data directory on the server is exclusive to ownCloud and must
|
||||||
|
not be modified manually.
|
||||||
|
|
||||||
|
If you are using a different backend, you can try to exclude a bug in the
|
||||||
|
backend by reverting to the local backend.
|
||||||
|
|
||||||
|
Logfiles
|
||||||
|
--------
|
||||||
|
|
||||||
|
Doing effective debugging requires to provide as much as relevant logs as
|
||||||
|
possible. The log output can help you with tracking down problem, and if you
|
||||||
|
report a bug, you're advised to include the output.
|
||||||
|
|
||||||
|
Client Logfile
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Start the client with ``--logwindow``. That opens a window providing a view
|
||||||
|
on the current log. It provides a Save button to let you save the log to a
|
||||||
|
file.
|
||||||
|
|
||||||
|
You can also open a log window for an already running session, by simply
|
||||||
|
starting the client again with this parameter. Syntax:
|
||||||
|
|
||||||
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
||||||
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
||||||
* Linux: ``owncloud --logwindow``
|
* Linux: ``owncloud --logwindow``
|
||||||
|
|
||||||
The log output can help you with tracking down problem, and if you report
|
It is also possible to directly log to a directory, which is an useful option
|
||||||
a bug, it's useful to include the output.
|
in case the problem only happens ocassionally. In that case it is better to
|
||||||
|
create a huge amount of data, as the log window has a limited buffer.
|
||||||
|
|
||||||
|
To write logs to disk, start the client with ``--logfile <file>``, where
|
||||||
|
``<file`` is the file you want to log to, or ``--logdir <dir>``, where ``<dir>``
|
||||||
|
is an existing directory. In case of ``--logdir``, each sync run will create a
|
||||||
|
new file. To limit the amount of data that accumulates over time, there is another
|
||||||
|
useful parameter: ``--logexpire <hours>```. If that is combined with ```--logdir```
|
||||||
|
the client automatically erases log data in that directory that is older than the
|
||||||
|
given expiry period.
|
||||||
|
|
||||||
|
For example, for a long running test where you intend to keep the log data of the
|
||||||
|
last two days, this would be the command line:
|
||||||
|
|
||||||
|
```
|
||||||
|
owncloud --logdir /tmp/owncloud_logs --logexpire 48
|
||||||
|
```
|
||||||
|
|
||||||
|
ownCloud server Logfile
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The ownCloud server maintains an ownCloud specific logfile as well. It can and
|
||||||
|
must be enabled through the ownCloud Administration page. There you can adjust
|
||||||
|
the loglevel. It is advisable to set it to a verbose level like ``Debug`` or
|
||||||
|
``Info``.
|
||||||
|
|
||||||
|
The logfile can be viewed either in the web interface or can be found in the
|
||||||
|
filesystem in the ownCloud server data dir.
|
||||||
|
|
||||||
|
Webserver Logfiles
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Also, please take a look at your webservers error log file to check if there
|
||||||
|
are problems. For Apache on Linux, the error logs usually can be found at
|
||||||
|
``/var/log/apache2``. A file called ``error_log`` shows errors like PHP code
|
||||||
|
problems. A file called ``access_log`` usually records all requests handled
|
||||||
|
by the server. Especially the access_log is a very good debugging tool as the
|
||||||
|
log line contains a lot of information of every request and it's result.
|
||||||
|
|
||||||
|
More information about the apache logging can be found at
|
||||||
|
``http://httpd.apache.org/docs/current/logs.html``.
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
Usage
|
|
||||||
=====
|
|
||||||
.. index:: usage, client sync usage
|
|
||||||
|
|
||||||
To start ownCloud Client, click on the desktop icon or start it from the
|
|
||||||
application menu. In the system tray, an ownCloud icon appears.
|
|
||||||
|
|
||||||
.. index:: start application
|
|
||||||
|
|
||||||
A left click on the tray icon open a status dialog which gives an overview on
|
|
||||||
the configured sync folders and allows to add and remove more sync folder
|
|
||||||
connections as well as pausing a sync connection.
|
|
||||||
|
|
||||||
A right click on the tray icon gives other configuration options.
|
|
||||||
|
|
||||||
|
|
||||||
Command line switches
|
|
||||||
---------------------
|
|
||||||
.. index:: command line switches, command line, options, parameters
|
|
||||||
|
|
||||||
|
|
||||||
ownCloud Client supports the following command line switches:
|
|
||||||
|
|
||||||
+--------------------------+------------------------------------------------+
|
|
||||||
| Switch | Action |
|
|
||||||
+==========================+================================================+
|
|
||||||
| ``--logwindow`` | open a window to show log output at startup. |
|
|
||||||
+--------------------------+------------------------------------------------+
|
|
||||||
| ``--logfile <filename>`` | write log output to file. |
|
|
||||||
+--------------------------+------------------------------------------------+
|
|
||||||
| ``--flushlog`` | flush the log file after every write. |
|
|
||||||
+--------------------------+------------------------------------------------+
|
|
||||||
|
|
||||||
Config File
|
|
||||||
-----------
|
|
||||||
.. index:: config file
|
|
||||||
|
|
||||||
ownCloud Client reads a configuration file which on Linux can be found at ``$HOME/.local/share/data/ownCloud/owncloud.cfg``
|
|
||||||
On Windows, it can be found in ``\Users\<name>\AppData\Local\ownCloud\owncloud.cfg``
|
|
||||||
.. todo:: Mac?
|
|
||||||
It contains settings in the ini file format known from Windows.
|
|
||||||
|
|
||||||
.. note:: Changes here should be done carefully as wrong settings can cause disfunctionality.
|
|
||||||
|
|
||||||
|
|
||||||
These are config settings that may be changed:
|
|
||||||
|
|
||||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
|
||||||
| Setting | Data Type | Unit | Default | Description |
|
|
||||||
+===========================+===========+==============+===========+=====================================================+
|
|
||||||
| ``remotePollinterval`` | integer | milliseconds | ``30000`` | Poll time for the remote repository |
|
|
||||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
|
||||||
| ``maxLogLines`` | integer | lines | ``20000`` | Maximum count of log lines shown in the log window |
|
|
||||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
|
||||||
|
|
||||||
* ``remotePollinterval`` The frequency used for polling for remote changes on
|
|
||||||
the ownCloud Server.
|
|
||||||
|
|
||||||
178
doc/visualtour.rst
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
Visual Tour
|
||||||
|
===========
|
||||||
|
|
||||||
|
.. index:: visual tour, usage
|
||||||
|
|
||||||
|
ownCloud Client stays in the background, and is visible as an
|
||||||
|
icon in your system tray (Windows, KDE), status bar (Mac OS X)
|
||||||
|
or notification area (Ubuntu), like so:
|
||||||
|
|
||||||
|
.. image:: images/icon.png
|
||||||
|
|
||||||
|
If a setup is still required, it will open the setup. Otherwise, the
|
||||||
|
main menu is opened, which provides several options and displays
|
||||||
|
progress information:
|
||||||
|
|
||||||
|
.. image:: images/menu.png
|
||||||
|
|
||||||
|
Here is an explanation of the individual items in the menu:
|
||||||
|
|
||||||
|
* ``Open ownCloud in browser``: Opens the ownCloud web interface
|
||||||
|
* ``Open folder 'ownCloud'``: Opens the local folder. If you have
|
||||||
|
defined multiple sync targets, you should see multiple entries
|
||||||
|
here.
|
||||||
|
* **Disk space indicator**: Shows how much space is used up on the server.
|
||||||
|
* Operation indicator: Shows the status of the current sync process, or
|
||||||
|
``Up to date`` if server and client are in sync.
|
||||||
|
* **Recent Changes**: shows the last six files modified by sync operations,
|
||||||
|
and provides access to the Sync Protocol, which lists all changes
|
||||||
|
since the last restart of ownCloud Client.
|
||||||
|
* ``Settings...``: provides access to the settings menu.
|
||||||
|
* ``Help``: Opens a browser to display this help.
|
||||||
|
* ``Quit ownCloud``: Quits ownCloud, ending a currently running sync run.
|
||||||
|
|
||||||
|
The settings dialog is split up in three categories: ``Account Settings``,
|
||||||
|
``General Settings`` and ``Network Settings``:
|
||||||
|
|
||||||
|
Account Settings
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. index:: account settings, user, password, Server URL
|
||||||
|
|
||||||
|
The ``Account Settings`` tab provides an executive summary about the synced
|
||||||
|
folders in your account and allows to modify them. It also provides a more
|
||||||
|
detailed report about the storage usage. Finally, it allows to change
|
||||||
|
the files that ownCloud Client should ignore (for details, see the
|
||||||
|
``Ignored Files Editor`` section below), and to modify various aspects
|
||||||
|
of the current account settings, such as user name, password and server URL.
|
||||||
|
|
||||||
|
.. image:: images/settings_account.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
General Settings
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. index:: general settings, auto start, startup, desktop notifications
|
||||||
|
|
||||||
|
The tab provides several useful options:
|
||||||
|
|
||||||
|
.. image:: images/settings_general.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
* **Launch on System Startup**: This option is automatically activated
|
||||||
|
once a user has conimaged his account. Unchecking the box will cause
|
||||||
|
ownCloud client to not launch on startup for a particular user.
|
||||||
|
* **Show Desktop Nofications**: Do not show bubble notifications whenever
|
||||||
|
a set of sync operations has been performed.
|
||||||
|
* **Use Monochrome Icons**: Use less obstrusive icons. Especially useful
|
||||||
|
on Mac OS.
|
||||||
|
|
||||||
|
The acout menu provides information about authors as well as detailed
|
||||||
|
information about the build conditions. Those are particularly valuable
|
||||||
|
when filing a bug report.
|
||||||
|
|
||||||
|
Network Settings
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. index:: proxy settings, SOCKS, bandwith, throttling, limiting
|
||||||
|
|
||||||
|
This tab consollidates ``Proxy Settings`` and ``Bandwith Limiting``:
|
||||||
|
|
||||||
|
.. image:: images/settings_network.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
Proxy Settings
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* ``No Proxy``: Check this if ownCloud Client should circumvent the default
|
||||||
|
proxy conimaged on the system.
|
||||||
|
* ``Use system proxy``: Default, will follow the systems proxy settings.
|
||||||
|
On Linux, this will only pick up the value of the variable ``http_proxy``.
|
||||||
|
* ``Specify proxy manually as``: Allows to specify custom proxy settings.
|
||||||
|
If you require to go through a HTTP(S) proxy server such as Squid or Microsoft
|
||||||
|
Forefront TMG, pick ``HTTP(S)``. ``SOCKSv5`` on the other hand is particulary
|
||||||
|
useful in special company LAN setups, or in combination with the OpenSSH
|
||||||
|
dynamic application level forwarding feature (see ``ssh -D``).
|
||||||
|
* ``Host``: Enter the host name or IP address of your proxy server, followed
|
||||||
|
by the port number. HTTP proxies usually listen on Ports 8080 (default) or
|
||||||
|
3128. SOCKS server usually listen on port 1080.
|
||||||
|
* ``Proxy Server requires authentication``: Should be checked if the proxy
|
||||||
|
server does not allow anonymous usage. If you check this option, you must
|
||||||
|
provide username and password in the fields below, or ownless Cloud will no
|
||||||
|
longer be able to connect successfully.
|
||||||
|
|
||||||
|
Bandwidth Limiting
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The ``Download Bandwidth`` (i.e. the bandwidth available for data flowing
|
||||||
|
from the ownCloud Server to the client) can be either ``Unlimited``
|
||||||
|
(the default), or limited to a custom value, specified in bytes
|
||||||
|
|
||||||
|
The ``Upload Bandwith`` (i.e. the bandwith available for data flowing
|
||||||
|
from the ownCloud Client to the server) additionally has the option
|
||||||
|
to ``Limit automatically``: When this option is checked, the ownCloud
|
||||||
|
Client will surrender available upstream bandwith to other applications.
|
||||||
|
Use this option if you expirience problems with real time communication,
|
||||||
|
such as Skype or other VoIP software, in conjunction with ownCloud Client.
|
||||||
|
This is commonly the case with asymmetric internet connection, such as
|
||||||
|
certain DSL lines with very limited upstream capacity.
|
||||||
|
|
||||||
|
ownCloud Client will pick up changes immediately, but ongoing operations
|
||||||
|
will finish using the old settings.
|
||||||
|
|
||||||
|
The Sync Protocol
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. index:: sync protocol
|
||||||
|
|
||||||
|
The ``Sync Protocol`` window, which can be invoked from either from the main
|
||||||
|
menu (``Recent Changes`` -> ``Details...``) or the ``Account Settings``
|
||||||
|
(``Info`` button), will provide you with an in-depth summary of the recent
|
||||||
|
sync activity. It will also show files that have not been synched (ignored
|
||||||
|
files). Those are ignored either because they are listed in the ignored
|
||||||
|
files list (see ``Ignored Files Editor`` section below), or because they
|
||||||
|
cannot be synced in a cross-platform manner because they contain special
|
||||||
|
characters that cannot be stored on certain file systems.
|
||||||
|
|
||||||
|
.. image:: images/sync_protocol.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
.. _ignoredFilesEditor-label:
|
||||||
|
|
||||||
|
The Ignored Files Editor
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. index:: ignored files, exclude files, pattern
|
||||||
|
|
||||||
|
The ignored files editor allows adding patterns for files or directories
|
||||||
|
that should be excluded from the sync process. Next to normal characters,
|
||||||
|
wildcards can be used to match an arbitrary number of characters, designated
|
||||||
|
by an asterisk (``*``) or a single character, designated by a question mark
|
||||||
|
(``?``).
|
||||||
|
|
||||||
|
Global defaults cannot be directly modified within the editor. Hovering
|
||||||
|
with the mouse will reveal the location of the global exclude definition
|
||||||
|
file.
|
||||||
|
|
||||||
|
In addition to this list, ownCloud Client always excludes files with
|
||||||
|
characters that cannot be synched down to other file systems,
|
||||||
|
see :ref:`ignored-files-label`.
|
||||||
|
|
||||||
|
.. note:: Modifying the global exclude definition file might render the
|
||||||
|
client unusable or cause undesired behavior.
|
||||||
|
|
||||||
|
.. note:: Custom entries are currently not validated for syntactical
|
||||||
|
correctness by the editor, but might fail to load correctly.
|
||||||
|
|
||||||
|
.. image:: images/ignored_files_editor.png
|
||||||
|
:scale: 50%
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
^^^^^^^^^
|
||||||
|
+-----------+------------------------------+
|
||||||
|
| Pattern | Matches |
|
||||||
|
+===========+==============================+
|
||||||
|
| ``~$*`` | ``~$foo``, ``~$example.doc`` |
|
||||||
|
+-----------+------------------------------+
|
||||||
|
| ``fl?p`` | ``flip``, ``flap`` |
|
||||||
|
+-----------+------------------------------+
|
||||||
@@ -20,6 +20,8 @@ PHP version:
|
|||||||
|
|
||||||
ownCloud version:
|
ownCloud version:
|
||||||
|
|
||||||
|
Storage backend:
|
||||||
|
|
||||||
### Client configuration
|
### Client configuration
|
||||||
Client version:
|
Client version:
|
||||||
|
|
||||||
@@ -31,18 +33,14 @@ Installation path of client:
|
|||||||
|
|
||||||
### Logs
|
### Logs
|
||||||
|
|
||||||
#### output of `owncloud --logwindow` or `owncloud --logfile log.txt`
|
Please use Gist (https://gist.github.com/) or a similar code paster for longer
|
||||||
```
|
logs.
|
||||||
Insert your log output here
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Web server error log
|
```Template for output < 10 lines```
|
||||||
```
|
|
||||||
Insert your webserver log here
|
|
||||||
```
|
|
||||||
|
|
||||||
#### ownCloud log (data/owncloud.log)
|
1. Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
|
||||||
```
|
|
||||||
Insert your ownCloud log here
|
2. Web server error log:
|
||||||
```
|
|
||||||
|
3. ownCloud log (data/owncloud.log):
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ Type=Application
|
|||||||
Exec=@APPLICATION_EXECUTABLE@
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
Name=@APPLICATION_NAME@ desktop sync client
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
GenericName=Folder Sync
|
GenericName=Folder Sync
|
||||||
Icon=@APPLICATION_SHORTNAME@
|
Icon=@APPLICATION_EXECUTABLE@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
|||||||
23
mirall.qrc
@@ -1,24 +1,17 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/mirall">
|
<qresource prefix="/mirall">
|
||||||
<file>resources/mirall-32.png</file>
|
|
||||||
<file>resources/mirall-64.png</file>
|
|
||||||
<file>resources/mirall-128.png</file>
|
|
||||||
<file>resources/folder-grey-32.png</file>
|
|
||||||
<file>resources/folder-remote-32.png</file>
|
|
||||||
<file>resources/folder-grey-22.png</file>
|
|
||||||
<file>resources/folder-remote-22.png</file>
|
|
||||||
<file>resources/mirall-22.png</file>
|
|
||||||
<file>resources/mirall-48.png</file>
|
|
||||||
<file>resources/folder-grey-48.png</file>
|
|
||||||
<file>resources/folder-remote-48.png</file>
|
|
||||||
<file>resources/dialog-close.png</file>
|
<file>resources/dialog-close.png</file>
|
||||||
<file>resources/dialog-ok.png</file>
|
<file>resources/dialog-ok.png</file>
|
||||||
<file>resources/dialog-cancel.png</file>
|
<file>resources/dialog-cancel.png</file>
|
||||||
<file>resources/view-refresh.png</file>
|
<file>resources/folder-remote-32.png</file>
|
||||||
<file>resources/folder-favorites.png</file>
|
<file>resources/folder-remote.png</file>
|
||||||
<file>resources/folder-sync-48.png</file>
|
<file>resources/folder-sync.png</file>
|
||||||
<file>resources/folder-important.png</file>
|
|
||||||
<file>resources/folder-grey.png</file>
|
<file>resources/folder-grey.png</file>
|
||||||
<file>resources/task-ongoing.png</file>
|
<file>resources/task-ongoing.png</file>
|
||||||
|
<file>resources/view-refresh.png</file>
|
||||||
|
<file>resources/warning-16.png</file>
|
||||||
|
<file>resources/settings.png</file>
|
||||||
|
<file>resources/network.png</file>
|
||||||
|
<file>resources/owncloud_logo_blue.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 668 B |
|
Before Width: | Height: | Size: 883 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
resources/lock-http.png
Normal file
|
After Width: | Height: | Size: 739 B |
BIN
resources/lock-https.png
Normal file
|
After Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
resources/network.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/owncloud_logo_blue.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/settings.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
resources/warning-16.png
Normal file
|
After Width: | Height: | Size: 596 B |
22
src/3rdparty/LGPL_EXCEPTION.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Digia Qt LGPL Exception version 1.1
|
||||||
|
|
||||||
|
As an additional permission to the GNU Lesser General Public License version
|
||||||
|
2.1, the object code form of a "work that uses the Library" may incorporate
|
||||||
|
material from a header file that is part of the Library. You may distribute
|
||||||
|
such object code under terms of your choice, provided that:
|
||||||
|
(i) the header files of the Library have not been modified; and
|
||||||
|
(ii) the incorporated material is limited to numerical parameters, data
|
||||||
|
structure layouts, accessors, macros, inline functions and
|
||||||
|
templates; and
|
||||||
|
(iii) you comply with the terms of Section 6 of the GNU Lesser General
|
||||||
|
Public License version 2.1.
|
||||||
|
|
||||||
|
Moreover, you may apply this exception to a modified version of the Library,
|
||||||
|
provided that such modification does not involve copying material from the
|
||||||
|
Library into the modified Library's header files unless such material is
|
||||||
|
limited to (i) numerical parameters; (ii) data structure layouts;
|
||||||
|
(iii) accessors; and (iv) small macros, templates and inline functions of
|
||||||
|
five lines or less in length.
|
||||||
|
|
||||||
|
Furthermore, you are not required to apply this additional permission to a
|
||||||
|
modified version of the Library.
|
||||||
165
src/3rdparty/QProgressIndicator/LICENSE
vendored
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
137
src/3rdparty/QProgressIndicator/QProgressIndicator.cpp
vendored
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of QProgressIndicator,
|
||||||
|
* an open-source recent files menu widget
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 - 2010 Morgan Leborgne
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with QRecentFilesMenu. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include "QProgressIndicator.h"
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
QProgressIndicator::QProgressIndicator(QWidget* parent)
|
||||||
|
: QWidget(parent),
|
||||||
|
m_angle(0),
|
||||||
|
m_timerId(-1),
|
||||||
|
m_delay(40),
|
||||||
|
m_displayedWhenStopped(false),
|
||||||
|
m_color(Qt::black)
|
||||||
|
{
|
||||||
|
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QProgressIndicator::isAnimated () const
|
||||||
|
{
|
||||||
|
return (m_timerId != -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::setDisplayedWhenStopped(bool state)
|
||||||
|
{
|
||||||
|
m_displayedWhenStopped = state;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QProgressIndicator::isDisplayedWhenStopped() const
|
||||||
|
{
|
||||||
|
return m_displayedWhenStopped;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::startAnimation()
|
||||||
|
{
|
||||||
|
m_angle = 0;
|
||||||
|
|
||||||
|
if (m_timerId == -1)
|
||||||
|
m_timerId = startTimer(m_delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::stopAnimation()
|
||||||
|
{
|
||||||
|
if (m_timerId != -1)
|
||||||
|
killTimer(m_timerId);
|
||||||
|
|
||||||
|
m_timerId = -1;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::setAnimationDelay(int delay)
|
||||||
|
{
|
||||||
|
if (m_timerId != -1)
|
||||||
|
killTimer(m_timerId);
|
||||||
|
|
||||||
|
m_delay = delay;
|
||||||
|
|
||||||
|
if (m_timerId != -1)
|
||||||
|
m_timerId = startTimer(m_delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::setColor(const QColor & color)
|
||||||
|
{
|
||||||
|
m_color = color;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize QProgressIndicator::sizeHint() const
|
||||||
|
{
|
||||||
|
return QSize(20,20);
|
||||||
|
}
|
||||||
|
|
||||||
|
int QProgressIndicator::heightForWidth(int w) const
|
||||||
|
{
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::timerEvent(QTimerEvent * /*event*/)
|
||||||
|
{
|
||||||
|
m_angle = (m_angle+30)%360;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QProgressIndicator::paintEvent(QPaintEvent * /*event*/)
|
||||||
|
{
|
||||||
|
if (!m_displayedWhenStopped && !isAnimated())
|
||||||
|
return;
|
||||||
|
|
||||||
|
int width = qMin(this->width(), this->height());
|
||||||
|
|
||||||
|
QPainter p(this);
|
||||||
|
p.setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
int outerRadius = (width-1)*0.5;
|
||||||
|
int innerRadius = (width-1)*0.5*0.38;
|
||||||
|
|
||||||
|
int capsuleHeight = outerRadius - innerRadius;
|
||||||
|
int capsuleWidth = (width > 32 ) ? capsuleHeight *.23 : capsuleHeight *.35;
|
||||||
|
int capsuleRadius = capsuleWidth/2;
|
||||||
|
|
||||||
|
for (int i=0; i<12; i++)
|
||||||
|
{
|
||||||
|
QColor color = m_color;
|
||||||
|
color.setAlphaF(1.0f - (i/12.0f));
|
||||||
|
p.setPen(Qt::NoPen);
|
||||||
|
p.setBrush(color);
|
||||||
|
p.save();
|
||||||
|
p.translate(rect().center());
|
||||||
|
p.rotate(m_angle - i*30.0f);
|
||||||
|
p.drawRoundedRect(-capsuleWidth*0.5, -(innerRadius+capsuleHeight), capsuleWidth, capsuleHeight, capsuleRadius, capsuleRadius);
|
||||||
|
p.restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
108
src/3rdparty/QProgressIndicator/QProgressIndicator.h
vendored
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of QProgressIndicator,
|
||||||
|
* an open-source recent files menu widget
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 - 2010 Morgan Leborgne
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with QRecentFilesMenu. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef QPROGRESSINDICATOR_H
|
||||||
|
#define QPROGRESSINDICATOR_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QColor>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class QProgressIndicator
|
||||||
|
\brief The QProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way.
|
||||||
|
|
||||||
|
Progress indicators are indeterminate and do nothing more than spin to show that the application is busy.
|
||||||
|
\sa QProgressBar
|
||||||
|
*/
|
||||||
|
class QProgressIndicator : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(int delay READ animationDelay WRITE setAnimationDelay)
|
||||||
|
Q_PROPERTY(bool displayedWhenStopped READ isDisplayedWhenStopped WRITE setDisplayedWhenStopped)
|
||||||
|
Q_PROPERTY(QColor color READ color WRITE setColor)
|
||||||
|
public:
|
||||||
|
QProgressIndicator(QWidget* parent = 0);
|
||||||
|
|
||||||
|
/*! Returns the delay between animation steps.
|
||||||
|
\return The number of milliseconds between animation steps. By default, the animation delay is set to 40 milliseconds.
|
||||||
|
\sa setAnimationDelay
|
||||||
|
*/
|
||||||
|
int animationDelay() const { return m_delay; }
|
||||||
|
|
||||||
|
/*! Returns a Boolean value indicating whether the component is currently animated.
|
||||||
|
\return Animation state.
|
||||||
|
\sa startAnimation stopAnimation
|
||||||
|
*/
|
||||||
|
bool isAnimated () const;
|
||||||
|
|
||||||
|
/*! Returns a Boolean value indicating whether the receiver shows itself even when it is not animating.
|
||||||
|
\return Return true if the progress indicator shows itself even when it is not animating. By default, it returns false.
|
||||||
|
\sa setDisplayedWhenStopped
|
||||||
|
*/
|
||||||
|
bool isDisplayedWhenStopped() const;
|
||||||
|
|
||||||
|
/*! Returns the color of the component.
|
||||||
|
\sa setColor
|
||||||
|
*/
|
||||||
|
const QColor & color() const { return m_color; }
|
||||||
|
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
int heightForWidth(int w) const;
|
||||||
|
public slots:
|
||||||
|
/*! Starts the spin animation.
|
||||||
|
\sa stopAnimation isAnimated
|
||||||
|
*/
|
||||||
|
void startAnimation();
|
||||||
|
|
||||||
|
/*! Stops the spin animation.
|
||||||
|
\sa startAnimation isAnimated
|
||||||
|
*/
|
||||||
|
void stopAnimation();
|
||||||
|
|
||||||
|
/*! Sets the delay between animation steps.
|
||||||
|
Setting the \a delay to a value larger than 40 slows the animation, while setting the \a delay to a smaller value speeds it up.
|
||||||
|
\param delay The delay, in milliseconds.
|
||||||
|
\sa animationDelay
|
||||||
|
*/
|
||||||
|
void setAnimationDelay(int delay);
|
||||||
|
|
||||||
|
/*! Sets whether the component hides itself when it is not animating.
|
||||||
|
\param state The animation state. Set false to hide the progress indicator when it is not animating; otherwise true.
|
||||||
|
\sa isDisplayedWhenStopped
|
||||||
|
*/
|
||||||
|
void setDisplayedWhenStopped(bool state);
|
||||||
|
|
||||||
|
/*! Sets the color of the components to the given color.
|
||||||
|
\sa color
|
||||||
|
*/
|
||||||
|
void setColor(const QColor & color);
|
||||||
|
protected:
|
||||||
|
virtual void timerEvent(QTimerEvent * event);
|
||||||
|
virtual void paintEvent(QPaintEvent * event);
|
||||||
|
private:
|
||||||
|
int m_angle;
|
||||||
|
int m_timerId;
|
||||||
|
int m_delay;
|
||||||
|
bool m_displayedWhenStopped;
|
||||||
|
QColor m_color;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // QPROGRESSINDICATOR_H
|
||||||
14
src/3rdparty/QProgressIndicator/README.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
## Description
|
||||||
|
|
||||||
|
The QProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way.
|
||||||
|
Will work at any size.
|
||||||
|
|
||||||
|
<img src="https://raw.github.com/mojocorp/QProgressIndicator/master/screen-capture-1.png" >
|
||||||
|
<img src="https://raw.github.com/mojocorp/QProgressIndicator/master/screen-capture-2.png" >
|
||||||
|
|
||||||
|
## Dependency
|
||||||
|
Qt 4.4.x.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
LGPL
|
||||||
353
src/3rdparty/fancylineedit/fancylineedit.cpp
vendored
Normal file
@@ -0,0 +1,353 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "fancylineedit.h"
|
||||||
|
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QString>
|
||||||
|
#include <QPropertyAnimation>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QAbstractButton>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QPaintEvent>
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
|
/*! Opens a menu at the specified widget position.
|
||||||
|
* This functions computes the position where to show the menu, and opens it with
|
||||||
|
* QMenu::exec().
|
||||||
|
* \param menu The menu to open
|
||||||
|
* \param widget The widget next to which to open the menu
|
||||||
|
*/
|
||||||
|
static void execMenuAtWidget(QMenu *menu, QWidget *widget)
|
||||||
|
{
|
||||||
|
QPoint p;
|
||||||
|
QRect screen = qApp->desktop()->availableGeometry(widget);
|
||||||
|
QSize sh = menu->sizeHint();
|
||||||
|
QRect rect = widget->rect();
|
||||||
|
if (widget->isRightToLeft()) {
|
||||||
|
if (widget->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.height())
|
||||||
|
p = widget->mapToGlobal(rect.bottomRight());
|
||||||
|
else
|
||||||
|
p = widget->mapToGlobal(rect.topRight() - QPoint(0, sh.height()));
|
||||||
|
p.rx() -= sh.width();
|
||||||
|
} else {
|
||||||
|
if (widget->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.height())
|
||||||
|
p = widget->mapToGlobal(rect.bottomLeft());
|
||||||
|
else
|
||||||
|
p = widget->mapToGlobal(rect.topLeft() - QPoint(0, sh.height()));
|
||||||
|
}
|
||||||
|
p.rx() = qMax(screen.left(), qMin(p.x(), screen.right() - sh.width()));
|
||||||
|
p.ry() += 1;
|
||||||
|
|
||||||
|
menu->exec(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class Utils::FancyLineEdit
|
||||||
|
|
||||||
|
\brief A line edit with an embedded pixmap on one side that is connected to
|
||||||
|
a menu.
|
||||||
|
|
||||||
|
Additionally, it can display a grayed hintText (like "Type Here to")
|
||||||
|
when not focused and empty. When connecting to the changed signals and
|
||||||
|
querying text, one has to be aware that the text is set to that hint
|
||||||
|
text if isShowingHintText() returns true (that is, does not contain
|
||||||
|
valid user input).
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum { margin = 6 };
|
||||||
|
|
||||||
|
#define ICONBUTTON_HEIGHT 18
|
||||||
|
#define FADE_TIME 160
|
||||||
|
|
||||||
|
namespace Utils {
|
||||||
|
|
||||||
|
// --------- FancyLineEditPrivate
|
||||||
|
class FancyLineEditPrivate : public QObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit FancyLineEditPrivate(FancyLineEdit *parent);
|
||||||
|
|
||||||
|
virtual bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
|
||||||
|
FancyLineEdit *m_lineEdit;
|
||||||
|
QPixmap m_pixmap[2];
|
||||||
|
QMenu *m_menu[2];
|
||||||
|
bool m_menuTabFocusTrigger[2];
|
||||||
|
IconButton *m_iconbutton[2];
|
||||||
|
bool m_iconEnabled[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
|
||||||
|
QObject(parent), m_lineEdit(parent)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
m_menu[i] = 0;
|
||||||
|
m_menuTabFocusTrigger[i] = false;
|
||||||
|
m_iconbutton[i] = new IconButton(parent);
|
||||||
|
m_iconbutton[i]->installEventFilter(this);
|
||||||
|
m_iconbutton[i]->hide();
|
||||||
|
m_iconbutton[i]->setAutoHide(false);
|
||||||
|
m_iconEnabled[i] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FancyLineEditPrivate::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
int buttonIndex = -1;
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
if (obj == m_iconbutton[i]) {
|
||||||
|
buttonIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (buttonIndex == -1)
|
||||||
|
return QObject::eventFilter(obj, event);
|
||||||
|
switch (event->type()) {
|
||||||
|
case QEvent::FocusIn:
|
||||||
|
if (m_menuTabFocusTrigger[buttonIndex] && m_menu[buttonIndex]) {
|
||||||
|
m_lineEdit->setFocus();
|
||||||
|
execMenuAtWidget(m_menu[buttonIndex], m_iconbutton[buttonIndex]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return QObject::eventFilter(obj, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// --------- FancyLineEdit
|
||||||
|
FancyLineEdit::FancyLineEdit(QWidget *parent) :
|
||||||
|
QLineEdit(parent),
|
||||||
|
d(new FancyLineEditPrivate(this))
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
updateMargins();
|
||||||
|
|
||||||
|
connect(this, SIGNAL(textChanged(QString)), this, SLOT(checkButtons(QString)));
|
||||||
|
connect(d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||||
|
connect(d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::checkButtons(const QString &text)
|
||||||
|
{
|
||||||
|
if (m_oldText.isEmpty() || text.isEmpty()) {
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
if (d->m_iconbutton[i]->hasAutoHide())
|
||||||
|
d->m_iconbutton[i]->animateShow(!text.isEmpty());
|
||||||
|
}
|
||||||
|
m_oldText = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FancyLineEdit::~FancyLineEdit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setButtonVisible(Side side, bool visible)
|
||||||
|
{
|
||||||
|
d->m_iconbutton[side]->setVisible(visible);
|
||||||
|
d->m_iconEnabled[side] = visible;
|
||||||
|
updateMargins();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FancyLineEdit::isButtonVisible(Side side) const
|
||||||
|
{
|
||||||
|
return d->m_iconEnabled[side];
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::iconClicked()
|
||||||
|
{
|
||||||
|
IconButton *button = qobject_cast<IconButton *>(sender());
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < 2; ++i)
|
||||||
|
if (d->m_iconbutton[i] == button)
|
||||||
|
index = i;
|
||||||
|
if (index == -1)
|
||||||
|
return;
|
||||||
|
if (d->m_menu[index]) {
|
||||||
|
execMenuAtWidget(d->m_menu[index], button);
|
||||||
|
} else {
|
||||||
|
emit buttonClicked((Side)index);
|
||||||
|
if (index == Left)
|
||||||
|
emit leftButtonClicked();
|
||||||
|
else if (index == Right)
|
||||||
|
emit rightButtonClicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::updateMargins()
|
||||||
|
{
|
||||||
|
bool leftToRight = (layoutDirection() == Qt::LeftToRight);
|
||||||
|
Side realLeft = (leftToRight ? Left : Right);
|
||||||
|
Side realRight = (leftToRight ? Right : Left);
|
||||||
|
|
||||||
|
int leftMargin = d->m_iconbutton[realLeft]->pixmap().width() + 8;
|
||||||
|
int rightMargin = d->m_iconbutton[realRight]->pixmap().width() + 8;
|
||||||
|
// Note KDE does not reserve space for the highlight color
|
||||||
|
if (style()->inherits("OxygenStyle")) {
|
||||||
|
leftMargin = qMax(24, leftMargin);
|
||||||
|
rightMargin = qMax(24, rightMargin);
|
||||||
|
}
|
||||||
|
|
||||||
|
QMargins margins((d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,
|
||||||
|
(d->m_iconEnabled[realRight] ? rightMargin : 0), 0);
|
||||||
|
|
||||||
|
setTextMargins(margins);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::updateButtonPositions()
|
||||||
|
{
|
||||||
|
QRect contentRect = rect();
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
Side iconpos = (Side)i;
|
||||||
|
if (layoutDirection() == Qt::RightToLeft)
|
||||||
|
iconpos = (iconpos == Left ? Right : Left);
|
||||||
|
|
||||||
|
if (iconpos == FancyLineEdit::Right) {
|
||||||
|
const int iconoffset = textMargins().right() + 4;
|
||||||
|
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
|
||||||
|
} else {
|
||||||
|
const int iconoffset = textMargins().left() + 4;
|
||||||
|
d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::resizeEvent(QResizeEvent *)
|
||||||
|
{
|
||||||
|
updateButtonPositions();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)
|
||||||
|
{
|
||||||
|
d->m_iconbutton[side]->setPixmap(buttonPixmap);
|
||||||
|
updateMargins();
|
||||||
|
updateButtonPositions();
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
QPixmap FancyLineEdit::buttonPixmap(Side side) const
|
||||||
|
{
|
||||||
|
return d->m_pixmap[side];
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setButtonMenu(Side side, QMenu *buttonMenu)
|
||||||
|
{
|
||||||
|
d->m_menu[side] = buttonMenu;
|
||||||
|
d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu *FancyLineEdit::buttonMenu(Side side) const
|
||||||
|
{
|
||||||
|
return d->m_menu[side];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FancyLineEdit::hasMenuTabFocusTrigger(Side side) const
|
||||||
|
{
|
||||||
|
return d->m_menuTabFocusTrigger[side];
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setMenuTabFocusTrigger(Side side, bool v)
|
||||||
|
{
|
||||||
|
if (d->m_menuTabFocusTrigger[side] == v)
|
||||||
|
return;
|
||||||
|
|
||||||
|
d->m_menuTabFocusTrigger[side] = v;
|
||||||
|
d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FancyLineEdit::hasAutoHideButton(Side side) const
|
||||||
|
{
|
||||||
|
return d->m_iconbutton[side]->hasAutoHide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setAutoHideButton(Side side, bool h)
|
||||||
|
{
|
||||||
|
d->m_iconbutton[side]->setAutoHide(h);
|
||||||
|
if (h)
|
||||||
|
d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ? 0.0 : 1.0);
|
||||||
|
else
|
||||||
|
d->m_iconbutton[side]->setIconOpacity(1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setButtonToolTip(Side side, const QString &tip)
|
||||||
|
{
|
||||||
|
d->m_iconbutton[side]->setToolTip(tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
|
||||||
|
{
|
||||||
|
d->m_iconbutton[side]->setFocusPolicy(policy);
|
||||||
|
}
|
||||||
|
|
||||||
|
// IconButton - helper class to represent a clickable icon
|
||||||
|
|
||||||
|
IconButton::IconButton(QWidget *parent)
|
||||||
|
: QAbstractButton(parent), m_autoHide(false)
|
||||||
|
{
|
||||||
|
setCursor(Qt::ArrowCursor);
|
||||||
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IconButton::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
QRect pixmapRect = QRect(0, 0, m_pixmap.width(), m_pixmap.height());
|
||||||
|
pixmapRect.moveCenter(rect().center());
|
||||||
|
|
||||||
|
if (m_autoHide)
|
||||||
|
painter.setOpacity(m_iconOpacity);
|
||||||
|
|
||||||
|
painter.drawPixmap(pixmapRect, m_pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IconButton::animateShow(bool visible)
|
||||||
|
{
|
||||||
|
if (visible) {
|
||||||
|
QPropertyAnimation *animation = new QPropertyAnimation(this, "iconOpacity");
|
||||||
|
animation->setDuration(FADE_TIME);
|
||||||
|
animation->setEndValue(1.0);
|
||||||
|
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
|
} else {
|
||||||
|
QPropertyAnimation *animation = new QPropertyAnimation(this, "iconOpacity");
|
||||||
|
animation->setDuration(FADE_TIME);
|
||||||
|
animation->setEndValue(0.0);
|
||||||
|
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Utils
|
||||||
121
src/3rdparty/fancylineedit/fancylineedit.h
vendored
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef FANCYLINEEDIT_H
|
||||||
|
#define FANCYLINEEDIT_H
|
||||||
|
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QAbstractButton>
|
||||||
|
|
||||||
|
namespace Utils {
|
||||||
|
|
||||||
|
class FancyLineEditPrivate;
|
||||||
|
|
||||||
|
class IconButton: public QAbstractButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(float iconOpacity READ iconOpacity WRITE setIconOpacity)
|
||||||
|
Q_PROPERTY(bool autoHide READ hasAutoHide WRITE setAutoHide)
|
||||||
|
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
|
||||||
|
public:
|
||||||
|
explicit IconButton(QWidget *parent = 0);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; update(); }
|
||||||
|
QPixmap pixmap() const { return m_pixmap; }
|
||||||
|
float iconOpacity() { return m_iconOpacity; }
|
||||||
|
void setIconOpacity(float value) { m_iconOpacity = value; update(); }
|
||||||
|
void animateShow(bool visible);
|
||||||
|
|
||||||
|
void setAutoHide(bool hide) { m_autoHide = hide; }
|
||||||
|
bool hasAutoHide() const { return m_autoHide; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
float m_iconOpacity;
|
||||||
|
bool m_autoHide;
|
||||||
|
QPixmap m_pixmap;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FancyLineEdit : public QLineEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_ENUMS(Side)
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum Side {Left = 0, Right = 1};
|
||||||
|
|
||||||
|
explicit FancyLineEdit(QWidget *parent = 0);
|
||||||
|
~FancyLineEdit();
|
||||||
|
|
||||||
|
QPixmap buttonPixmap(Side side) const;
|
||||||
|
void setButtonPixmap(Side side, const QPixmap &pixmap);
|
||||||
|
|
||||||
|
QMenu *buttonMenu(Side side) const;
|
||||||
|
void setButtonMenu(Side side, QMenu *menu);
|
||||||
|
|
||||||
|
void setButtonVisible(Side side, bool visible);
|
||||||
|
bool isButtonVisible(Side side) const;
|
||||||
|
|
||||||
|
void setButtonToolTip(Side side, const QString &);
|
||||||
|
void setButtonFocusPolicy(Side side, Qt::FocusPolicy policy);
|
||||||
|
|
||||||
|
// Set whether tabbing in will trigger the menu.
|
||||||
|
void setMenuTabFocusTrigger(Side side, bool v);
|
||||||
|
bool hasMenuTabFocusTrigger(Side side) const;
|
||||||
|
|
||||||
|
// Set if icon should be hidden when text is empty
|
||||||
|
void setAutoHideButton(Side side, bool h);
|
||||||
|
bool hasAutoHideButton(Side side) const;
|
||||||
|
#if QT_VERSION <= 0x040700
|
||||||
|
void setPlaceholderText( const QString& ) { }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void buttonClicked(Utils::FancyLineEdit::Side side);
|
||||||
|
void leftButtonClicked();
|
||||||
|
void rightButtonClicked();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void checkButtons(const QString &);
|
||||||
|
void iconClicked();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void resizeEvent(QResizeEvent *e);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void updateMargins();
|
||||||
|
void updateButtonPositions();
|
||||||
|
friend class Utils::FancyLineEditPrivate;
|
||||||
|
|
||||||
|
FancyLineEditPrivate *d;
|
||||||
|
QString m_oldText;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Utils
|
||||||
|
|
||||||
|
#endif // FANCYLINEEDIT_H
|
||||||
@@ -3,7 +3,7 @@ include(${QT_USE_FILE})
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
QT4_ADD_RESOURCES ( MIRALL_RC_SRC ../mirall.qrc)
|
QT4_ADD_RESOURCES ( MIRALL_RC_SRC ../mirall.qrc)
|
||||||
if ( DEFINED OEM_THEME_DIR)
|
if ( IS_DIRECTORY ${OEM_THEME_DIR} )
|
||||||
QT4_ADD_RESOURCES ( MIRALL_RC_SRC ${OEM_THEME_DIR}/theme.qrc)
|
QT4_ADD_RESOURCES ( MIRALL_RC_SRC ${OEM_THEME_DIR}/theme.qrc)
|
||||||
set(theme_dir ${OEM_THEME_DIR}/theme)
|
set(theme_dir ${OEM_THEME_DIR}/theme)
|
||||||
else()
|
else()
|
||||||
@@ -11,39 +11,39 @@ else()
|
|||||||
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
||||||
|
|
||||||
set(mirall_UI
|
set(mirall_UI
|
||||||
mirall/folderwizardsourcepage.ui
|
mirall/folderwizardsourcepage.ui
|
||||||
mirall/folderwizardtargetpage.ui
|
mirall/folderwizardtargetpage.ui
|
||||||
mirall/folderwizardnetworkpage.ui
|
|
||||||
mirall/folderwizardowncloudpage.ui
|
|
||||||
mirall/statusdialog.ui
|
|
||||||
mirall/owncloudwizardselecttypepage.ui
|
|
||||||
mirall/owncloudsetuppage.ui
|
|
||||||
mirall/createanowncloudpage.ui
|
|
||||||
mirall/owncloudftpaccesspage.ui
|
|
||||||
mirall/owncloudwizardresultpage.ui
|
|
||||||
mirall/owncloudcredentialspage.ui
|
|
||||||
mirall/sslerrordialog.ui
|
mirall/sslerrordialog.ui
|
||||||
mirall/proxydialog.ui
|
mirall/settingsdialog.ui
|
||||||
mirall/fileitemdialog.ui
|
mirall/generalsettings.ui
|
||||||
|
mirall/networksettings.ui
|
||||||
|
mirall/accountsettings.ui
|
||||||
|
mirall/ignorelisteditor.ui
|
||||||
|
mirall/itemprogressdialog.ui
|
||||||
|
wizard/owncloudsetupnocredspage.ui
|
||||||
|
wizard/owncloudhttpcredspage.ui
|
||||||
|
wizard/owncloudwizardresultpage.ui
|
||||||
|
wizard/owncloudadvancedsetuppage.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
set(3rdparty_SRC
|
set(3rdparty_SRC
|
||||||
3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
||||||
3rdparty/qtsingleapplication/qtlocalpeer.h
|
|
||||||
3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
||||||
3rdparty/qtsingleapplication/qtsingleapplication.h
|
|
||||||
3rdparty/qtsingleapplication/qtsinglecoreapplication.h
|
|
||||||
3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
||||||
|
|
||||||
3rdparty/qtlockedfile/qtlockedfile.h
|
|
||||||
3rdparty/qtlockedfile/qtlockedfile.cpp
|
3rdparty/qtlockedfile/qtlockedfile.cpp
|
||||||
|
3rdparty/fancylineedit/fancylineedit.cpp
|
||||||
|
3rdparty/QProgressIndicator/QProgressIndicator.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(3rdparty_HEADER
|
set(3rdparty_HEADER
|
||||||
3rdparty/qtsingleapplication/qtlocalpeer.h
|
3rdparty/qtsingleapplication/qtlocalpeer.h
|
||||||
3rdparty/qtsingleapplication/qtsingleapplication.h
|
3rdparty/qtsingleapplication/qtsingleapplication.h
|
||||||
3rdparty/qtsingleapplication/qtsinglecoreapplication.h
|
3rdparty/qtsingleapplication/qtsinglecoreapplication.h
|
||||||
|
3rdparty/fancylineedit/fancylineedit.h
|
||||||
|
3rdparty/QProgressIndicator/QProgressIndicator.h
|
||||||
)
|
)
|
||||||
qt4_wrap_cpp(3rdparty_MOC ${3rdparty_HEADER})
|
qt4_wrap_cpp(3rdparty_MOC ${3rdparty_HEADER})
|
||||||
|
|
||||||
@@ -56,6 +56,8 @@ endif()
|
|||||||
set(3rdparty_INC
|
set(3rdparty_INC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtlockedfile
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtlockedfile
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QProgressIndicator
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/fancylineedit
|
||||||
)
|
)
|
||||||
|
|
||||||
qt4_wrap_ui(mirall_UI_SRCS ${mirall_UI})
|
qt4_wrap_ui(mirall_UI_SRCS ${mirall_UI})
|
||||||
@@ -64,35 +66,58 @@ set(libsync_SRCS
|
|||||||
mirall/folderman.cpp
|
mirall/folderman.cpp
|
||||||
mirall/folder.cpp
|
mirall/folder.cpp
|
||||||
mirall/folderwatcher.cpp
|
mirall/folderwatcher.cpp
|
||||||
mirall/gitfolder.cpp
|
|
||||||
mirall/syncresult.cpp
|
mirall/syncresult.cpp
|
||||||
mirall/unisonfolder.cpp
|
|
||||||
mirall/networklocation.cpp
|
mirall/networklocation.cpp
|
||||||
mirall/mirallconfigfile.cpp
|
mirall/mirallconfigfile.cpp
|
||||||
mirall/credentialstore.cpp
|
|
||||||
mirall/csyncfolder.cpp
|
|
||||||
mirall/owncloudfolder.cpp
|
|
||||||
mirall/csyncthread.cpp
|
mirall/csyncthread.cpp
|
||||||
mirall/fileutils.cpp
|
mirall/fileutils.cpp
|
||||||
mirall/theme.cpp
|
mirall/theme.cpp
|
||||||
mirall/owncloudtheme.cpp
|
mirall/owncloudtheme.cpp
|
||||||
mirall/miralltheme.cpp
|
|
||||||
mirall/owncloudinfo.cpp
|
mirall/owncloudinfo.cpp
|
||||||
mirall/logger.cpp
|
mirall/logger.cpp
|
||||||
mirall/utility.cpp
|
mirall/utility.cpp
|
||||||
|
mirall/connectionvalidator.cpp
|
||||||
|
mirall/progressdispatcher.cpp
|
||||||
|
mirall/mirallaccessmanager.cpp
|
||||||
|
creds/dummycredentials.cpp
|
||||||
|
creds/httpcredentials.cpp
|
||||||
|
creds/credentialsfactory.cpp
|
||||||
|
creds/http/credentialstore.cpp
|
||||||
|
creds/http/httpconfigfile.cpp
|
||||||
|
creds/shibbolethcredentials.cpp
|
||||||
|
creds/shibboleth/shibbolethaccessmanager.cpp
|
||||||
|
creds/shibboleth/shibbolethcookiejar.cpp
|
||||||
|
creds/shibboleth/shibbolethwebview.cpp
|
||||||
|
creds/shibboleth/shibbolethrefresher.cpp
|
||||||
|
creds/shibboleth/shibbolethconfigfile.cpp
|
||||||
|
creds/credentialscommon.cpp
|
||||||
)
|
)
|
||||||
set(libsync_HEADERS
|
|
||||||
|
set(libsync_HEADERS
|
||||||
mirall/folderman.h
|
mirall/folderman.h
|
||||||
mirall/folder.h
|
mirall/folder.h
|
||||||
mirall/folderwatcher.h
|
mirall/folderwatcher.h
|
||||||
mirall/gitfolder.h
|
|
||||||
mirall/unisonfolder.h
|
|
||||||
mirall/csyncfolder.h
|
|
||||||
mirall/owncloudfolder.h
|
|
||||||
mirall/csyncthread.h
|
mirall/csyncthread.h
|
||||||
|
mirall/theme.h
|
||||||
|
mirall/owncloudtheme.h
|
||||||
mirall/owncloudinfo.h
|
mirall/owncloudinfo.h
|
||||||
mirall/credentialstore.h
|
|
||||||
mirall/logger.h
|
mirall/logger.h
|
||||||
|
mirall/connectionvalidator.h
|
||||||
|
mirall/progressdispatcher.h
|
||||||
|
mirall/mirallaccessmanager.h
|
||||||
|
creds/abstractcredentials.h
|
||||||
|
creds/dummycredentials.h
|
||||||
|
creds/httpcredentials.h
|
||||||
|
creds/credentialsfactory.h
|
||||||
|
creds/http/credentialstore.h
|
||||||
|
creds/http/httpconfigfile.h
|
||||||
|
creds/shibbolethcredentials.h
|
||||||
|
creds/shibboleth/shibbolethaccessmanager.h
|
||||||
|
creds/shibboleth/shibbolethcookiejar.h
|
||||||
|
creds/shibboleth/shibbolethwebview.h
|
||||||
|
creds/shibboleth/shibbolethrefresher.h
|
||||||
|
creds/shibboleth/shibbolethconfigfile.h
|
||||||
|
creds/credentialscommon.h
|
||||||
)
|
)
|
||||||
|
|
||||||
IF( INOTIFY_FOUND )
|
IF( INOTIFY_FOUND )
|
||||||
@@ -115,6 +140,7 @@ qt4_wrap_cpp(syncMoc ${libsync_HEADERS})
|
|||||||
list(APPEND libsync_LINK_TARGETS
|
list(APPEND libsync_LINK_TARGETS
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
${CSYNC_LIBRARY}
|
${CSYNC_LIBRARY}
|
||||||
|
dl
|
||||||
)
|
)
|
||||||
|
|
||||||
if(QTKEYCHAIN_FOUND)
|
if(QTKEYCHAIN_FOUND)
|
||||||
@@ -122,58 +148,80 @@ if(QTKEYCHAIN_FOUND)
|
|||||||
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(mirallsync SHARED ${libsync_SRCS} ${syncMoc})
|
add_library(${synclib_NAME} SHARED ${libsync_SRCS} ${syncMoc})
|
||||||
add_library(owncloudsync SHARED ${libsync_SRCS} ${syncMoc})
|
set_target_properties( ${synclib_NAME} PROPERTIES
|
||||||
set_target_properties( owncloudsync PROPERTIES COMPILE_DEFINITIONS OWNCLOUD_CLIENT)
|
VERSION ${VERSION}
|
||||||
|
SOVERSION ${SOVERSION}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(mirallsync ${libsync_LINK_TARGETS} )
|
target_link_libraries(${synclib_NAME} ${libsync_LINK_TARGETS} )
|
||||||
target_link_libraries(owncloudsync ${libsync_LINK_TARGETS} )
|
|
||||||
|
|
||||||
if ( APPLE )
|
if ( APPLE )
|
||||||
target_link_libraries(mirallsync /System/Library/Frameworks/CoreServices.framework)
|
target_link_libraries(${synclib_NAME} /System/Library/Frameworks/CoreServices.framework)
|
||||||
target_link_libraries(owncloudsync /System/Library/Frameworks/CoreServices.framework)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
install(TARGETS mirallsync owncloudsync
|
install(TARGETS ${synclib_NAME}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||||
${APPLICATION_SHORTNAME}.desktop)
|
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop DESTINATION share/applications )
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION share/applications )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(TARGETS mirallsync owncloudsync DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(mirall_SRCS
|
set(mirall_SRCS
|
||||||
mirall/application.cpp
|
mirall/application.cpp
|
||||||
|
mirall/systray.cpp
|
||||||
mirall/folderwizard.cpp
|
mirall/folderwizard.cpp
|
||||||
mirall/statusdialog.cpp
|
mirall/folderstatusmodel.cpp
|
||||||
mirall/owncloudwizard.cpp
|
wizard/owncloudwizard.cpp
|
||||||
|
wizard/owncloudsetuppage.cpp
|
||||||
|
wizard/owncloudhttpcredspage.cpp
|
||||||
|
wizard/owncloudwizardresultpage.cpp
|
||||||
|
wizard/owncloudwizardcommon.cpp
|
||||||
|
wizard/owncloudshibbolethcredspage.cpp
|
||||||
|
wizard/owncloudadvancedsetuppage.cpp
|
||||||
mirall/owncloudsetupwizard.cpp
|
mirall/owncloudsetupwizard.cpp
|
||||||
mirall/updatedetector.cpp
|
mirall/updatedetector.cpp
|
||||||
mirall/occinfo.cpp
|
mirall/occinfo.cpp
|
||||||
mirall/sslerrordialog.cpp
|
mirall/sslerrordialog.cpp
|
||||||
mirall/logbrowser.cpp
|
mirall/logbrowser.cpp
|
||||||
mirall/proxydialog.cpp
|
mirall/settingsdialog.cpp
|
||||||
mirall/fileitemdialog.cpp
|
mirall/generalsettings.cpp
|
||||||
|
mirall/networksettings.cpp
|
||||||
|
mirall/accountsettings.cpp
|
||||||
|
mirall/ignorelisteditor.cpp
|
||||||
|
mirall/itemprogressdialog.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(mirall_HEADERS
|
set(mirall_HEADERS
|
||||||
mirall/application.h
|
mirall/application.h
|
||||||
|
mirall/systray.h
|
||||||
mirall/folderwizard.h
|
mirall/folderwizard.h
|
||||||
mirall/owncloudsetupwizard.h
|
mirall/owncloudsetupwizard.h
|
||||||
mirall/owncloudwizard.h
|
wizard/owncloudwizard.h
|
||||||
mirall/statusdialog.h
|
wizard/owncloudsetuppage.h
|
||||||
|
wizard/owncloudhttpcredspage.h
|
||||||
|
wizard/owncloudwizardresultpage.h
|
||||||
|
wizard/owncloudwizardcommon.h
|
||||||
|
wizard/owncloudshibbolethcredspage.h
|
||||||
|
wizard/owncloudadvancedsetuppage.h
|
||||||
|
mirall/folderstatusmodel.h
|
||||||
mirall/updatedetector.h
|
mirall/updatedetector.h
|
||||||
mirall/sslerrordialog.h
|
mirall/sslerrordialog.h
|
||||||
mirall/logbrowser.h
|
mirall/logbrowser.h
|
||||||
mirall/proxydialog.h
|
mirall/settingsdialog.h
|
||||||
mirall/fileitemdialog.h
|
mirall/generalsettings.h
|
||||||
|
mirall/networksettings.h
|
||||||
|
mirall/accountsettings.h
|
||||||
|
mirall/ignorelisteditor.h
|
||||||
|
mirall/itemprogressdialog.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if( UNIX AND NOT APPLE)
|
if( UNIX AND NOT APPLE)
|
||||||
@@ -183,7 +231,7 @@ if( UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# csync is required.
|
# csync is required.
|
||||||
include_directories(${CSYNC_INCLUDE_DIR}/csync ${CSYNC_INCLUDE_DIR} ${CMAKE_BINARY_DIR})
|
include_directories(${CSYNC_INCLUDE_DIR}/csync ${CSYNC_INCLUDE_DIR} ${CSYNC_BUILD_PATH}/src)
|
||||||
include_directories(${3rdparty_INC})
|
include_directories(${3rdparty_INC})
|
||||||
|
|
||||||
qt4_wrap_cpp(mirallMoc ${mirall_HEADERS})
|
qt4_wrap_cpp(mirallMoc ${mirall_HEADERS})
|
||||||
@@ -206,7 +254,15 @@ set( final_src
|
|||||||
include( AddAppIconMacro )
|
include( AddAppIconMacro )
|
||||||
set(ownCloud_old ${ownCloud})
|
set(ownCloud_old ${ownCloud})
|
||||||
|
|
||||||
kde4_add_app_icon( ownCloud "${theme_dir}/colored/${APPLICATION_SHORTNAME}-icon*.png")
|
# set an icon_app_name. For historical reasons we can not use the
|
||||||
|
# application_shortname for ownCloud but must rather set it manually.
|
||||||
|
if ( EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
||||||
|
set(ICON_APP_NAME ${APPLICATION_SHORTNAME})
|
||||||
|
else()
|
||||||
|
set(ICON_APP_NAME "owncloud")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
kde4_add_app_icon( ownCloud "${theme_dir}/colored/${ICON_APP_NAME}-icon*.png")
|
||||||
list(APPEND final_src ${ownCloud})
|
list(APPEND final_src ${ownCloud})
|
||||||
set(ownCloud ${ownCloud_old})
|
set(ownCloud ${ownCloud_old})
|
||||||
|
|
||||||
@@ -214,35 +270,21 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
|||||||
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/resources/mirall-48.png
|
file( GLOB _icons "${theme_dir}/colored/${ICON_APP_NAME}-icon-*.png" )
|
||||||
DESTINATION share/icons/hicolor/48x48/apps/ RENAME mirall.png)
|
foreach( _file ${_icons} )
|
||||||
install(FILES
|
string( REPLACE "${theme_dir}/colored/${ICON_APP_NAME}-icon-" "" _res ${_file} )
|
||||||
${theme_dir}/colored/${APPLICATION_SHORTNAME}-icon-48.png
|
string( REPLACE ".png" "" _res ${_res} )
|
||||||
DESTINATION share/icons/hicolor/48x48/apps/ RENAME ${APPLICATION_SHORTNAME}.png)
|
install( FILES ${_file} RENAME ${ICON_APP_NAME}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
||||||
|
endforeach( _file )
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
install(FILES ${mirall_I18N} DESTINATION share/mirall/i18n)
|
install(FILES ${mirall_I18N} DESTINATION share/${APPLICATION_EXECUTABLE}/i18n)
|
||||||
|
|
||||||
# we may not add MACOSX_BUNDLE here, if not building one
|
# we may not add MACOSX_BUNDLE here, if not building one
|
||||||
|
|
||||||
# add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src})
|
# add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src})
|
||||||
add_executable( ${APPLICATION_EXECUTABLE} WIN32 main.cpp ${final_src})
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 main.cpp ${final_src})
|
||||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES COMPILE_DEFINITIONS OWNCLOUD_CLIENT)
|
|
||||||
|
|
||||||
# mirall is not built for the bundle
|
|
||||||
add_executable( mirall WIN32 main.cpp ${final_src})
|
|
||||||
|
|
||||||
target_link_libraries(mirall ${QT_LIBRARIES} )
|
|
||||||
target_link_libraries(mirall mirallsync)
|
|
||||||
target_link_libraries(mirall ${CSYNC_LIBRARY})
|
|
||||||
|
|
||||||
set_target_properties( mirall PROPERTIES
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
|
||||||
install(TARGETS mirall
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||||
include(DeployQt4)
|
include(DeployQt4)
|
||||||
@@ -252,7 +294,6 @@ else()
|
|||||||
|
|
||||||
# we must add MACOSX_BUNDLE only if building a bundle
|
# we must add MACOSX_BUNDLE only if building a bundle
|
||||||
add_executable( ${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${final_src})
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${final_src})
|
||||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES COMPILE_DEFINITIONS OWNCLOUD_CLIENT)
|
|
||||||
|
|
||||||
#FIXME: hardcoded path
|
#FIXME: hardcoded path
|
||||||
if ( EXISTS ${CSYNC_BINARY_DIR}/modules/ocsync_owncloud.so )
|
if ( EXISTS ${CSYNC_BINARY_DIR}/modules/ocsync_owncloud.so )
|
||||||
@@ -260,8 +301,13 @@ else()
|
|||||||
else()
|
else()
|
||||||
install(FILES /usr/local/lib/ocsync-0/ocsync_owncloud.so DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Plugins)
|
install(FILES /usr/local/lib/ocsync-0/ocsync_owncloud.so DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Plugins)
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${mirall_I18N} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/translations)
|
|
||||||
|
|
||||||
|
set (QM_DIR ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/Translations)
|
||||||
|
install(FILES ${mirall_I18N} DESTINATION ${QM_DIR})
|
||||||
|
file(GLOB qt_I18N ${QT_TRANSLATIONS_DIR}/qt_??.qm ${QT_TRANSLATIONS_DIR}/qt_??_??.qm)
|
||||||
|
install(FILES ${qt_I18N} DESTINATION ${QM_DIR})
|
||||||
|
file(GLOB qtkeychain_I18N ${QT_TRANSLATIONS_DIR}/qtkeychain*.qm)
|
||||||
|
install(FILES ${qtkeychain_I18N} DESTINATION ${QM_DIR})
|
||||||
list(APPEND dirs "/usr/local/lib")
|
list(APPEND dirs "/usr/local/lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -270,7 +316,7 @@ set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
|||||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
||||||
)
|
)
|
||||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${QT_LIBRARIES} )
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${QT_LIBRARIES} )
|
||||||
target_link_libraries( ${APPLICATION_EXECUTABLE} owncloudsync )
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${CSYNC_LIBRARY} )
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${CSYNC_LIBRARY} )
|
||||||
|
|
||||||
install(TARGETS ${APPLICATION_EXECUTABLE}
|
install(TARGETS ${APPLICATION_EXECUTABLE}
|
||||||
@@ -280,7 +326,7 @@ install(TARGETS ${APPLICATION_EXECUTABLE}
|
|||||||
BUNDLE DESTINATION "."
|
BUNDLE DESTINATION "."
|
||||||
)
|
)
|
||||||
|
|
||||||
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unneccessary
|
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
|
||||||
# currently it needs to be done because the code right above needs to be executed no matter
|
# currently it needs to be done because the code right above needs to be executed no matter
|
||||||
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
||||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
|
|||||||
47
src/creds/abstractcredentials.h
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_ABSTRACT_CREDENTIALS_H
|
||||||
|
#define MIRALL_CREDS_ABSTRACT_CREDENTIALS_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include <csync.h>
|
||||||
|
|
||||||
|
class QNetworkAccessManager;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class AbstractCredentials : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
// No need for virtual destructor - QObject already has one.
|
||||||
|
virtual void syncContextPreInit(CSYNC* ctx) = 0;
|
||||||
|
virtual void syncContextPreStart(CSYNC* ctx) = 0;
|
||||||
|
virtual bool changed(AbstractCredentials* credentials) const = 0;
|
||||||
|
virtual QString authType() const = 0;
|
||||||
|
virtual QNetworkAccessManager* getQNAM() const = 0;
|
||||||
|
virtual bool ready() const = 0;
|
||||||
|
virtual void fetch() = 0;
|
||||||
|
virtual void persistForUrl(const QString& url) = 0;
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void fetched();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
77
src/creds/credentialscommon.cpp
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
||||||
|
* Copyright (C) by Klaas Freitag <freitag@kde.org>
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
|
#include <QRegExp>
|
||||||
|
#include <QString>
|
||||||
|
#include <QSslCertificate>
|
||||||
|
|
||||||
|
#include "creds/credentialscommon.h"
|
||||||
|
|
||||||
|
#include "mirall/utility.h"
|
||||||
|
#include "mirall/owncloudinfo.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
int handleNeonSSLProblems(const char* prompt,
|
||||||
|
char* buf,
|
||||||
|
size_t /*len*/,
|
||||||
|
int /*echo*/,
|
||||||
|
int /*verify*/,
|
||||||
|
void* /*userdata*/)
|
||||||
|
{
|
||||||
|
int re = 0;
|
||||||
|
const QString qPrompt = QString::fromLatin1( prompt ).trimmed();
|
||||||
|
|
||||||
|
if( qPrompt.startsWith( QLatin1String("There are problems with the SSL certificate:"))) {
|
||||||
|
// SSL is requested. If the program came here, the SSL check was done by mirall
|
||||||
|
// It needs to be checked if the chain is still equal to the one which
|
||||||
|
// was verified by the user.
|
||||||
|
const QRegExp regexp("fingerprint: ([\\w\\d:]+)");
|
||||||
|
bool certOk = false;
|
||||||
|
int pos = 0;
|
||||||
|
// This is the set of certificates which QNAM accepted, so we should accept
|
||||||
|
// them as well
|
||||||
|
QList<QSslCertificate> certs = ownCloudInfo::instance()->certificateChain();
|
||||||
|
|
||||||
|
while (!certOk && (pos = regexp.indexIn(qPrompt, 1+pos)) != -1) {
|
||||||
|
QString neon_fingerprint = regexp.cap(1);
|
||||||
|
|
||||||
|
foreach( const QSslCertificate& c, certs ) {
|
||||||
|
QString verified_shasum = Utility::formatFingerprint(c.digest(QCryptographicHash::Sha1).toHex());
|
||||||
|
qDebug() << "SSL Fingerprint from neon: " << neon_fingerprint << " compared to verified: " << verified_shasum;
|
||||||
|
if( verified_shasum == neon_fingerprint ) {
|
||||||
|
certOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// certOk = false; DEBUG setting, keep disabled!
|
||||||
|
if( !certOk ) { // Problem!
|
||||||
|
qstrcpy( buf, "no" );
|
||||||
|
re = -1;
|
||||||
|
} else {
|
||||||
|
qstrcpy( buf, "yes" ); // Certificate is fine!
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qDebug() << "Unknown prompt: <" << prompt << ">";
|
||||||
|
re = -1;
|
||||||
|
}
|
||||||
|
return re;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
||||||
|
* Copyright (C) by Klaas Freitag <freitag@kde.org>
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -12,35 +14,19 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MIRALL_GITFOLDER_H
|
#ifndef MIRALL_CREDS_COMMON_H
|
||||||
#define MIRALL_GITFOLDER_H
|
#define MIRALL_CREDS_COMMON_H
|
||||||
|
|
||||||
#include <QMutex>
|
namespace Mirall
|
||||||
#include "mirall/folder.h"
|
|
||||||
|
|
||||||
class QProcess;
|
|
||||||
|
|
||||||
namespace Mirall {
|
|
||||||
|
|
||||||
class GitFolder : public Folder
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* path : Local folder to be keep in sync
|
|
||||||
* remote: git repo url to sync from/to
|
|
||||||
*/
|
|
||||||
GitFolder(const QString &alias,
|
|
||||||
const QString &path,
|
|
||||||
const QString &secondPath, QObject *parent = 0L);
|
|
||||||
virtual ~GitFolder();
|
|
||||||
|
|
||||||
virtual void startSync();
|
int handleNeonSSLProblems(const char* prompt,
|
||||||
private:
|
char* buf,
|
||||||
QMutex _syncMutex;
|
size_t len,
|
||||||
QProcess *_syncProcess;
|
int echo,
|
||||||
};
|
int verify,
|
||||||
|
void* userdata);
|
||||||
|
|
||||||
}
|
} // ns Mirall
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
43
src/creds/credentialsfactory.cpp
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "creds/httpcredentials.h"
|
||||||
|
#include "creds/dummycredentials.h"
|
||||||
|
#include "creds/shibbolethcredentials.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace CredentialsFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
AbstractCredentials* create(const QString& type)
|
||||||
|
{
|
||||||
|
// empty string might happen for old version of configuration
|
||||||
|
if (type == "http" || type == "") {
|
||||||
|
return new HttpCredentials;
|
||||||
|
} else if (type == "dummy") {
|
||||||
|
return new DummyCredentials;
|
||||||
|
} else if (type == "shibboleth") {
|
||||||
|
return new ShibbolethCredentials;
|
||||||
|
} else {
|
||||||
|
qWarning("Unknown credentials type: %s", qPrintable(type));
|
||||||
|
return new DummyCredentials;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns CredentialsFactory
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
32
src/creds/credentialsfactory.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_CREDENTIALS_FACTORY_H
|
||||||
|
#define MIRALL_CREDS_CREDENTIALS_FACTORY_H
|
||||||
|
|
||||||
|
class AbstractCredentials;
|
||||||
|
class QString;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace CredentialsFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
AbstractCredentials* create(const QString& type);
|
||||||
|
|
||||||
|
} // ns CredentialsFactory
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
56
src/creds/dummycredentials.cpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "creds/dummycredentials.h"
|
||||||
|
#include "mirall/mirallaccessmanager.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
void DummyCredentials::syncContextPreInit(CSYNC*)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DummyCredentials::syncContextPreStart(CSYNC*)
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool DummyCredentials::changed(AbstractCredentials* credentials) const
|
||||||
|
{
|
||||||
|
DummyCredentials* dummy(dynamic_cast< DummyCredentials* >(credentials));
|
||||||
|
|
||||||
|
return dummy == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DummyCredentials::authType() const
|
||||||
|
{
|
||||||
|
return QString::fromLatin1("dummy");
|
||||||
|
}
|
||||||
|
|
||||||
|
QNetworkAccessManager* DummyCredentials::getQNAM() const
|
||||||
|
{
|
||||||
|
return new MirallAccessManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DummyCredentials::ready() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DummyCredentials::fetch()
|
||||||
|
{
|
||||||
|
Q_EMIT(fetched());
|
||||||
|
}
|
||||||
|
|
||||||
|
void DummyCredentials::persistForUrl(const QString&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
39
src/creds/dummycredentials.h
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_DUMMY_CREDENTIALS_H
|
||||||
|
#define MIRALL_CREDS_DUMMY_CREDENTIALS_H
|
||||||
|
|
||||||
|
#include "creds/abstractcredentials.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class DummyCredentials : public AbstractCredentials
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
void syncContextPreInit(CSYNC* ctx);
|
||||||
|
void syncContextPreStart(CSYNC* ctx);
|
||||||
|
bool changed(AbstractCredentials* credentials) const;
|
||||||
|
QString authType() const;
|
||||||
|
QNetworkAccessManager* getQNAM() const;
|
||||||
|
bool ready() const;
|
||||||
|
void fetch();
|
||||||
|
void persistForUrl(const QString& url);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -12,13 +12,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "mirall/credentialstore.h"
|
#include "creds/http/credentialstore.h"
|
||||||
#include "mirall/mirallconfigfile.h"
|
#include "creds/http/httpconfigfile.h"
|
||||||
#include "mirall/theme.h"
|
#include "mirall/theme.h"
|
||||||
|
|
||||||
|
#ifdef WITH_QTKEYCHAIN
|
||||||
|
#include <qtkeychain/keychain.h>
|
||||||
|
using namespace QKeychain;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_LOGIN_ATTEMPTS 3
|
#define MAX_LOGIN_ATTEMPTS 3
|
||||||
|
|
||||||
namespace Mirall {
|
namespace Mirall {
|
||||||
@@ -29,7 +35,6 @@ QString CredentialStore::_passwd = QString::null;
|
|||||||
QString CredentialStore::_user = QString::null;
|
QString CredentialStore::_user = QString::null;
|
||||||
QString CredentialStore::_url = QString::null;
|
QString CredentialStore::_url = QString::null;
|
||||||
QString CredentialStore::_errorMsg = QString::null;
|
QString CredentialStore::_errorMsg = QString::null;
|
||||||
int CredentialStore::_tries = 0;
|
|
||||||
#ifdef WITH_QTKEYCHAIN
|
#ifdef WITH_QTKEYCHAIN
|
||||||
CredentialStore::CredentialType CredentialStore::_type = KeyChain;
|
CredentialStore::CredentialType CredentialStore::_type = KeyChain;
|
||||||
#else
|
#else
|
||||||
@@ -47,11 +52,11 @@ CredentialStore *CredentialStore::instance()
|
|||||||
return CredentialStore::_instance;
|
return CredentialStore::_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CredentialStore::password( const QString& ) const
|
QString CredentialStore::password() const
|
||||||
{
|
{
|
||||||
return _passwd;
|
return _passwd;
|
||||||
}
|
}
|
||||||
QString CredentialStore::user( const QString& ) const
|
QString CredentialStore::user() const
|
||||||
{
|
{
|
||||||
return _user;
|
return _user;
|
||||||
}
|
}
|
||||||
@@ -61,47 +66,13 @@ CredentialStore::CredState CredentialStore::state()
|
|||||||
return _state;
|
return _state;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CredentialStore::canTryAgain()
|
|
||||||
{
|
|
||||||
bool canDoIt = false;
|
|
||||||
|
|
||||||
if( _tries > MAX_LOGIN_ATTEMPTS ) {
|
|
||||||
qDebug() << "canTryAgain: Max attempts reached.";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( _state == NotFetched ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( _type ) {
|
|
||||||
case CredentialStore::User:
|
|
||||||
canDoIt = true;
|
|
||||||
break;
|
|
||||||
case CredentialStore::Settings:
|
|
||||||
break;
|
|
||||||
case CredentialStore::KeyChain:
|
|
||||||
canDoIt = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return canDoIt;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CredentialStore::fetchCredentials()
|
void CredentialStore::fetchCredentials()
|
||||||
{
|
{
|
||||||
MirallConfigFile cfgFile;
|
HttpConfigFile cfgFile;
|
||||||
if( ++_tries > MAX_LOGIN_ATTEMPTS ) {
|
|
||||||
qDebug() << "Too many attempts to enter password!";
|
|
||||||
_state = TooManyAttempts;
|
|
||||||
emit( fetchCredentialsFinished(false) );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
QString pwd;
|
QString pwd;
|
||||||
_user = cfgFile.ownCloudUser();
|
_user = cfgFile.user();
|
||||||
_url = cfgFile.ownCloudUrl();
|
_url = cfgFile.ownCloudUrl();
|
||||||
|
|
||||||
QString key = keyChainKey(_url);
|
QString key = keyChainKey(_url);
|
||||||
@@ -114,30 +85,22 @@ void CredentialStore::fetchCredentials()
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch( _type ) {
|
switch( _type ) {
|
||||||
case CredentialStore::User: {
|
|
||||||
/* Ask the user for the password */
|
|
||||||
/* Fixme: Move user interaction out here. */
|
|
||||||
_state = Fetching;
|
|
||||||
pwd = QInputDialog::getText(0, QApplication::translate("MirallConfigFile","Password Required"),
|
|
||||||
QApplication::translate("MirallConfigFile","Please enter your %1 password:")
|
|
||||||
.arg(Theme::instance()->appName()),
|
|
||||||
QLineEdit::Password,
|
|
||||||
QString::null, &ok);
|
|
||||||
if( !ok ) {
|
|
||||||
_state = UserCanceled;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CredentialStore::Settings: {
|
case CredentialStore::Settings: {
|
||||||
/* Read from config file. */
|
/* Read from config file. */
|
||||||
_state = Fetching;
|
_state = Fetching;
|
||||||
pwd = cfgFile.ownCloudPasswd();
|
cfgFile.fixupOldPassword();
|
||||||
ok = true;
|
if( cfgFile.passwordExists() ) {
|
||||||
|
pwd = cfgFile.password();
|
||||||
|
ok = true;
|
||||||
|
} else {
|
||||||
|
ok = false;
|
||||||
|
_state = EntryNotFound;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CredentialStore::KeyChain: {
|
case CredentialStore::KeyChain: {
|
||||||
// If the credentials are here already, return.
|
// If the credentials are here already, return.
|
||||||
if( _state == Ok ) {
|
if( _state == Ok || _state == AsyncWriting ) {
|
||||||
emit(fetchCredentialsFinished(true));
|
emit(fetchCredentialsFinished(true));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -184,7 +147,6 @@ void CredentialStore::reset()
|
|||||||
_state = NotFetched;
|
_state = NotFetched;
|
||||||
_user = QString::null;
|
_user = QString::null;
|
||||||
_passwd = QString::null;
|
_passwd = QString::null;
|
||||||
_tries = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CredentialStore::keyChainKey( const QString& url ) const
|
QString CredentialStore::keyChainKey( const QString& url ) const
|
||||||
@@ -231,9 +193,6 @@ void CredentialStore::slotKeyChainReadFinished(QKeychain::Job* job)
|
|||||||
case QKeychain::CouldNotDeleteEntry:
|
case QKeychain::CouldNotDeleteEntry:
|
||||||
_state = Error;
|
_state = Error;
|
||||||
break;
|
break;
|
||||||
case QKeychain::AccessDeniedByUser:
|
|
||||||
_state = AccessDeniedByUser;
|
|
||||||
break;
|
|
||||||
case QKeychain::AccessDenied:
|
case QKeychain::AccessDenied:
|
||||||
_state = AccessDenied;
|
_state = AccessDenied;
|
||||||
break;
|
break;
|
||||||
@@ -281,53 +240,49 @@ QString CredentialStore::errorMessage()
|
|||||||
return _errorMsg;
|
return _errorMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray CredentialStore::basicAuthHeader() const
|
void CredentialStore::setCredentials( const QString& url, const QString& user,
|
||||||
{
|
const QString& pwd )
|
||||||
QString concatenated = _user + QLatin1Char(':') + _passwd;
|
|
||||||
const QString b(QLatin1String("Basic "));
|
|
||||||
QByteArray data = b.toLocal8Bit() + concatenated.toLocal8Bit().toBase64();
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CredentialStore::setCredentials( const QString& url, const QString& user, const QString& pwd )
|
|
||||||
{
|
{
|
||||||
_passwd = pwd;
|
_passwd = pwd;
|
||||||
_user = user;
|
_user = user;
|
||||||
|
#ifdef WITH_QTKEYCHAIN
|
||||||
|
_type = KeyChain;
|
||||||
|
#else
|
||||||
|
_type = Settings;
|
||||||
|
#endif
|
||||||
_url = url;
|
_url = url;
|
||||||
_state = Ok;
|
_state = Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CredentialStore::saveCredentials( )
|
void CredentialStore::saveCredentials( )
|
||||||
{
|
{
|
||||||
MirallConfigFile cfgFile;
|
HttpConfigFile cfgFile;
|
||||||
QString key = keyChainKey(_url);
|
QString key = keyChainKey(_url);
|
||||||
if( key.isNull() ) {
|
if( key.isNull() ) {
|
||||||
qDebug() << "Error: Can not save credentials, URL is zero!";
|
qDebug() << "Error: Can not save credentials, URL is zero!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef WITH_QTKEYCHAIN
|
#ifdef WITH_QTKEYCHAIN
|
||||||
WritePasswordJob *job = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cfgFile.setUser(_user);
|
||||||
switch( _type ) {
|
switch( _type ) {
|
||||||
case CredentialStore::User:
|
case CredentialStore::KeyChain: {
|
||||||
deleteKeyChainCredential( key );
|
|
||||||
break;
|
|
||||||
case CredentialStore::KeyChain:
|
|
||||||
#ifdef WITH_QTKEYCHAIN
|
#ifdef WITH_QTKEYCHAIN
|
||||||
|
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
||||||
// Set password in KeyChain
|
// Set password in KeyChain
|
||||||
job = new WritePasswordJob(Theme::instance()->appName());
|
|
||||||
job->setKey( key );
|
job->setKey( key );
|
||||||
job->setTextData(_passwd);
|
job->setTextData(_passwd);
|
||||||
|
|
||||||
connect( job, SIGNAL(finished(QKeychain::Job*)), this,
|
connect( job, SIGNAL(finished(QKeychain::Job*)), this,
|
||||||
SLOT(slotKeyChainWriteFinished(QKeychain::Job*)));
|
SLOT(slotKeyChainWriteFinished(QKeychain::Job*)));
|
||||||
|
_state = AsyncWriting;
|
||||||
job->start();
|
job->start();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CredentialStore::Settings:
|
case CredentialStore::Settings:
|
||||||
cfgFile.writePassword( _passwd );
|
cfgFile.setPassword( _passwd );
|
||||||
reset();
|
reset();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -347,17 +302,22 @@ void CredentialStore::slotKeyChainWriteFinished( QKeychain::Job *job )
|
|||||||
qDebug() << "Error with keychain: " << pwdJob->errorString();
|
qDebug() << "Error with keychain: " << pwdJob->errorString();
|
||||||
if( err == NoBackendAvailable || err == NotImplemented ||
|
if( err == NoBackendAvailable || err == NotImplemented ||
|
||||||
pwdJob->errorString().contains(QLatin1String("Could not open wallet"))) {
|
pwdJob->errorString().contains(QLatin1String("Could not open wallet"))) {
|
||||||
|
_state = NoKeychainBackend;
|
||||||
_type = Settings;
|
_type = Settings;
|
||||||
saveCredentials();
|
saveCredentials();
|
||||||
|
} else {
|
||||||
|
_state = Error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Successfully stored password for user " << _user;
|
qDebug() << "Successfully stored password for user " << _user;
|
||||||
// Try to remove password formerly stored in the config file.
|
// Try to remove password formerly stored in the config file.
|
||||||
MirallConfigFile cfgFile;
|
HttpConfigFile cfgFile;
|
||||||
cfgFile.clearPasswordFromConfig();
|
cfgFile.removePassword();
|
||||||
|
_state = NotFetched;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Error: KeyChain Write Password Job failed!";
|
qDebug() << "Error: KeyChain Write Password Job failed!";
|
||||||
|
_state = Error;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(void) job;
|
(void) job;
|
||||||
@@ -14,21 +14,12 @@
|
|||||||
#ifndef CREDENTIALSTORE_H
|
#ifndef CREDENTIALSTORE_H
|
||||||
#define CREDENTIALSTORE_H
|
#define CREDENTIALSTORE_H
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
#ifdef WITH_QTKEYCHAIN
|
|
||||||
#include "qtkeychain/keychain.h"
|
|
||||||
|
|
||||||
using namespace QKeychain;
|
|
||||||
#else
|
|
||||||
// FIXME: If the slot definition below is ifdefed for some reason the slot is
|
|
||||||
// not there even if WITH_QTKEYCHAIN is defined.
|
|
||||||
namespace QKeychain {
|
namespace QKeychain {
|
||||||
typedef void Job;
|
class Job;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace Mirall {
|
namespace Mirall {
|
||||||
|
|
||||||
@@ -43,10 +34,8 @@ namespace Mirall {
|
|||||||
* The fetchCredentials() call changes the internal state of the credential store
|
* The fetchCredentials() call changes the internal state of the credential store
|
||||||
* to one of
|
* to one of
|
||||||
* Ok: There are credentials. Note that it's unknown if they are correct!!
|
* Ok: There are credentials. Note that it's unknown if they are correct!!
|
||||||
* UserCanceled: The fetching involved user interaction and the user canceled
|
|
||||||
* the operation. No valid credentials are there.
|
|
||||||
* TooManyAttempts: The user tried to often to enter a password.
|
|
||||||
* Fetching: The fetching is not yet finished.
|
* Fetching: The fetching is not yet finished.
|
||||||
|
* EntryNotFound: No password entry found in the storage.
|
||||||
* Error: A general error happened.
|
* Error: A general error happened.
|
||||||
* After fetching has finished, signal fetchCredentialsFinished(bool) is emitted.
|
* After fetching has finished, signal fetchCredentialsFinished(bool) is emitted.
|
||||||
* The result can be retrieved with state() and password() and user() methods.
|
* The result can be retrieved with state() and password() and user() methods.
|
||||||
@@ -58,24 +47,21 @@ class CredentialStore : public QObject
|
|||||||
public:
|
public:
|
||||||
enum CredState { NotFetched = 0,
|
enum CredState { NotFetched = 0,
|
||||||
Ok,
|
Ok,
|
||||||
UserCanceled,
|
|
||||||
Fetching,
|
Fetching,
|
||||||
AsyncFetching,
|
AsyncFetching,
|
||||||
EntryNotFound,
|
EntryNotFound,
|
||||||
AccessDeniedByUser,
|
|
||||||
AccessDenied,
|
AccessDenied,
|
||||||
NoKeychainBackend,
|
NoKeychainBackend,
|
||||||
Error,
|
Error,
|
||||||
TooManyAttempts };
|
AsyncWriting };
|
||||||
|
|
||||||
enum CredentialType {
|
enum CredentialType {
|
||||||
User = 0,
|
Settings = 0,
|
||||||
Settings,
|
|
||||||
KeyChain
|
KeyChain
|
||||||
};
|
};
|
||||||
|
|
||||||
QString password( const QString& connection = QString::null ) const;
|
QString password( ) const;
|
||||||
QString user( const QString& connection = QString::null ) const;
|
QString user( ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief state
|
* @brief state
|
||||||
@@ -91,12 +77,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void fetchCredentials();
|
void fetchCredentials();
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief basicAuthHeader - return a basic authentication header.
|
|
||||||
* @return a QByteArray with a ready to use Header for HTTP basic auth.
|
|
||||||
*/
|
|
||||||
QByteArray basicAuthHeader() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief instance - singleton pointer.
|
* @brief instance - singleton pointer.
|
||||||
* @return the singleton pointer to access the object.
|
* @return the singleton pointer to access the object.
|
||||||
@@ -109,20 +89,15 @@ public:
|
|||||||
* This function is called from the setup wizard to set the credentials
|
* This function is called from the setup wizard to set the credentials
|
||||||
* int this store. Note that it does not store the password.
|
* int this store. Note that it does not store the password.
|
||||||
* The function also sets the state to ok.
|
* The function also sets the state to ok.
|
||||||
|
* @param url - the connection url
|
||||||
* @param user - the user name
|
* @param user - the user name
|
||||||
* @param password - the password.
|
|
||||||
*/
|
*/
|
||||||
void setCredentials( const QString&, const QString&, const QString& );
|
void setCredentials( const QString& url, const QString& user, const QString& pwd);
|
||||||
|
|
||||||
void saveCredentials( );
|
void saveCredentials( );
|
||||||
|
|
||||||
QString errorMessage();
|
QString errorMessage();
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief canTryAgain - check if another try to get credentials makes sense.
|
|
||||||
*/
|
|
||||||
bool canTryAgain();
|
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
signals:
|
signals:
|
||||||
/**
|
/**
|
||||||
@@ -150,7 +125,6 @@ private:
|
|||||||
static QString _user;
|
static QString _user;
|
||||||
static QString _url;
|
static QString _url;
|
||||||
static QString _errorMsg;
|
static QString _errorMsg;
|
||||||
static int _tries;
|
|
||||||
static CredentialType _type;
|
static CredentialType _type;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
81
src/creds/http/httpconfigfile.cpp
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "creds/http/httpconfigfile.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
const char userC[] = "user";
|
||||||
|
const char passwdC[] = "passwd";
|
||||||
|
const char oldPasswdC[] = "password";
|
||||||
|
|
||||||
|
} // ns
|
||||||
|
|
||||||
|
QString HttpConfigFile::user() const
|
||||||
|
{
|
||||||
|
return retrieveData(QString(), QLatin1String(userC)).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpConfigFile::setUser(const QString& user)
|
||||||
|
{
|
||||||
|
storeData(QString(), QLatin1String(userC), QVariant(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString HttpConfigFile::password() const
|
||||||
|
{
|
||||||
|
const QVariant passwd(retrieveData(QString(), QLatin1String(passwdC)));
|
||||||
|
|
||||||
|
if (passwd.isValid()) {
|
||||||
|
return QString::fromUtf8(QByteArray::fromBase64(passwd.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpConfigFile::setPassword(const QString& password)
|
||||||
|
{
|
||||||
|
QByteArray pwdba = password.toUtf8();
|
||||||
|
storeData( QString(), QLatin1String(passwdC), QVariant(pwdba.toBase64()) );
|
||||||
|
removeOldPassword();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HttpConfigFile::passwordExists() const
|
||||||
|
{
|
||||||
|
return dataExists(QString(), QLatin1String(passwdC));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpConfigFile::removePassword()
|
||||||
|
{
|
||||||
|
removeOldPassword();
|
||||||
|
removeData(QString(), QLatin1String(passwdC));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpConfigFile::fixupOldPassword()
|
||||||
|
{
|
||||||
|
const QString old(QString::fromLatin1(oldPasswdC));
|
||||||
|
|
||||||
|
if (dataExists(QString(), old)) {
|
||||||
|
setPassword(retrieveData(QString(), old).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpConfigFile::removeOldPassword()
|
||||||
|
{
|
||||||
|
removeData(QString(), QLatin1String(oldPasswdC));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
40
src/creds/http/httpconfigfile.h
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_HTTP_CONFIG_FILE_H
|
||||||
|
#define MIRALL_CREDS_HTTP_CONFIG_FILE_H
|
||||||
|
|
||||||
|
#include "mirall/mirallconfigfile.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class HttpConfigFile : public MirallConfigFile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QString user() const;
|
||||||
|
void setUser(const QString& user);
|
||||||
|
|
||||||
|
QString password() const;
|
||||||
|
void setPassword(const QString& password);
|
||||||
|
bool passwordExists() const;
|
||||||
|
void removePassword();
|
||||||
|
void fixupOldPassword();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void removeOldPassword();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
213
src/creds/httpcredentials.cpp
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
||||||
|
* Copyright (C) by Klaas Freitag <freitag@kde.org>
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QMutex>
|
||||||
|
|
||||||
|
#include "creds/httpcredentials.h"
|
||||||
|
#include "mirall/owncloudinfo.h"
|
||||||
|
#include "mirall/mirallconfigfile.h"
|
||||||
|
#include "mirall/mirallaccessmanager.h"
|
||||||
|
#include "mirall/utility.h"
|
||||||
|
#include "creds/http/credentialstore.h"
|
||||||
|
#include "creds/credentialscommon.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
int getauth(const char *prompt,
|
||||||
|
char *buf,
|
||||||
|
size_t len,
|
||||||
|
int echo,
|
||||||
|
int verify,
|
||||||
|
void *userdata)
|
||||||
|
{
|
||||||
|
int re = 0;
|
||||||
|
QMutex mutex;
|
||||||
|
MirallConfigFile cfg;
|
||||||
|
HttpCredentials* http_credentials = dynamic_cast< HttpCredentials* > (cfg.getCredentials());
|
||||||
|
|
||||||
|
if (!http_credentials) {
|
||||||
|
qDebug() << "Not a HTTP creds instance!";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString qPrompt = QString::fromLatin1( prompt ).trimmed();
|
||||||
|
QString user = http_credentials->user();
|
||||||
|
QString pwd = http_credentials->password();
|
||||||
|
|
||||||
|
if( qPrompt == QLatin1String("Enter your username:") ) {
|
||||||
|
// qDebug() << "OOO Username requested!";
|
||||||
|
QMutexLocker locker( &mutex );
|
||||||
|
qstrncpy( buf, user.toUtf8().constData(), len );
|
||||||
|
} else if( qPrompt == QLatin1String("Enter your password:") ) {
|
||||||
|
QMutexLocker locker( &mutex );
|
||||||
|
// qDebug() << "OOO Password requested!";
|
||||||
|
qstrncpy( buf, pwd.toUtf8().constData(), len );
|
||||||
|
} else {
|
||||||
|
re = handleNeonSSLProblems(prompt, buf, len, echo, verify, userdata);
|
||||||
|
}
|
||||||
|
return re;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns
|
||||||
|
|
||||||
|
class HttpCredentialsAccessManager : public MirallAccessManager {
|
||||||
|
public:
|
||||||
|
HttpCredentialsAccessManager(const HttpCredentials *cred, QObject* parent = 0)
|
||||||
|
: MirallAccessManager(parent), _cred(cred) {}
|
||||||
|
protected:
|
||||||
|
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) {
|
||||||
|
QByteArray credHash = QByteArray(_cred->user().toUtf8()+":"+_cred->password().toUtf8()).toBase64();
|
||||||
|
QNetworkRequest req(request);
|
||||||
|
req.setRawHeader(QByteArray("Authorization"), QByteArray("Basic ") + credHash);
|
||||||
|
return MirallAccessManager::createRequest(op, req, outgoingData);\
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
const HttpCredentials *_cred;
|
||||||
|
};
|
||||||
|
|
||||||
|
HttpCredentials::HttpCredentials()
|
||||||
|
: _user(),
|
||||||
|
_password(),
|
||||||
|
_ready(false)
|
||||||
|
{}
|
||||||
|
|
||||||
|
HttpCredentials::HttpCredentials(const QString& user, const QString& password)
|
||||||
|
: _user(user),
|
||||||
|
_password(password),
|
||||||
|
_ready(true)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void HttpCredentials::syncContextPreInit (CSYNC* ctx)
|
||||||
|
{
|
||||||
|
csync_set_auth_callback (ctx, getauth);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::syncContextPreStart (CSYNC* ctx)
|
||||||
|
{
|
||||||
|
// TODO: This should not be a part of this method, but we don't have
|
||||||
|
// any way to get "session_key" module property from csync. Had we
|
||||||
|
// have it, then we could remove this code and keep it in
|
||||||
|
// csyncthread code (or folder code, git remembers).
|
||||||
|
QList<QNetworkCookie> cookies(ownCloudInfo::instance()->getLastAuthCookies());
|
||||||
|
QString cookiesAsString;
|
||||||
|
|
||||||
|
// Stuff cookies inside csync, then we can avoid the intermediate HTTP 401 reply
|
||||||
|
// when https://github.com/owncloud/core/pull/4042 is merged.
|
||||||
|
foreach(QNetworkCookie c, cookies) {
|
||||||
|
cookiesAsString += c.name();
|
||||||
|
cookiesAsString += '=';
|
||||||
|
cookiesAsString += c.value();
|
||||||
|
cookiesAsString += "; ";
|
||||||
|
}
|
||||||
|
|
||||||
|
csync_set_module_property(ctx, "session_key", cookiesAsString.toLatin1().data());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HttpCredentials::changed(AbstractCredentials* credentials) const
|
||||||
|
{
|
||||||
|
HttpCredentials* other(dynamic_cast< HttpCredentials* >(credentials));
|
||||||
|
|
||||||
|
if (!other || other->user() != this->user()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString HttpCredentials::authType() const
|
||||||
|
{
|
||||||
|
return QString::fromLatin1("http");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString HttpCredentials::user() const
|
||||||
|
{
|
||||||
|
return _user;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString HttpCredentials::password() const
|
||||||
|
{
|
||||||
|
return _password;
|
||||||
|
}
|
||||||
|
|
||||||
|
QNetworkAccessManager* HttpCredentials::getQNAM() const
|
||||||
|
{
|
||||||
|
MirallAccessManager* qnam = new HttpCredentialsAccessManager(this);
|
||||||
|
|
||||||
|
connect( qnam, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
|
||||||
|
this, SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*)));
|
||||||
|
|
||||||
|
return qnam;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HttpCredentials::ready() const
|
||||||
|
{
|
||||||
|
return _ready;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::fetch()
|
||||||
|
{
|
||||||
|
if (_ready) {
|
||||||
|
Q_EMIT fetched();
|
||||||
|
} else {
|
||||||
|
// TODO: merge CredentialStore into HttpCredentials?
|
||||||
|
CredentialStore* store(CredentialStore::instance());
|
||||||
|
connect(store, SIGNAL(fetchCredentialsFinished(bool)),
|
||||||
|
this, SLOT(slotCredentialsFetched(bool)));
|
||||||
|
store->fetchCredentials();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::persistForUrl(const QString& url)
|
||||||
|
{
|
||||||
|
CredentialStore* store(CredentialStore::instance());
|
||||||
|
store->setCredentials(url, _user, _password);
|
||||||
|
store->saveCredentials();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::slotCredentialsFetched(bool ok)
|
||||||
|
{
|
||||||
|
_ready = ok;
|
||||||
|
if (_ready) {
|
||||||
|
CredentialStore* store(CredentialStore::instance());
|
||||||
|
_user = store->user();
|
||||||
|
_password = store->password();
|
||||||
|
}
|
||||||
|
Q_EMIT fetched();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
|
||||||
|
{
|
||||||
|
Q_UNUSED(authenticator)
|
||||||
|
// we cannot use QAuthenticator, because it sends username and passwords with latin1
|
||||||
|
// instead of utf8 encoding. Instead, we send it manually. Thus, if we reach this signal,
|
||||||
|
// those credentials were invalid and we terminate.
|
||||||
|
qDebug() << "Stop request: Authentication failed for " << reply->url().toString();
|
||||||
|
reply->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HttpCredentials::slotReplyFinished()
|
||||||
|
{
|
||||||
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >(sender());
|
||||||
|
|
||||||
|
disconnect(reply, SIGNAL(finished()),
|
||||||
|
this, SLOT(slotReplyFinished()));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
63
src/creds/httpcredentials.h
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
||||||
|
* Copyright (C) by Klaas Freitag <freitag@kde.org>
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_HTTP_CREDENTIALS_H
|
||||||
|
#define MIRALL_CREDS_HTTP_CREDENTIALS_H
|
||||||
|
|
||||||
|
#include <QMap>
|
||||||
|
|
||||||
|
#include "creds/abstractcredentials.h"
|
||||||
|
|
||||||
|
class QNetworkReply;
|
||||||
|
class QAuthenticator;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class HttpCredentials : public AbstractCredentials
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
HttpCredentials();
|
||||||
|
HttpCredentials(const QString& user, const QString& password);
|
||||||
|
|
||||||
|
void syncContextPreInit(CSYNC* ctx);
|
||||||
|
void syncContextPreStart(CSYNC* ctx);
|
||||||
|
bool changed(AbstractCredentials* credentials) const;
|
||||||
|
QString authType() const;
|
||||||
|
QNetworkAccessManager* getQNAM() const;
|
||||||
|
bool ready() const;
|
||||||
|
void fetch();
|
||||||
|
void persistForUrl(const QString& url);
|
||||||
|
|
||||||
|
QString user() const;
|
||||||
|
QString password() const;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void slotCredentialsFetched(bool);
|
||||||
|
void slotAuthentication(QNetworkReply*, QAuthenticator*);
|
||||||
|
void slotReplyFinished();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString _user;
|
||||||
|
QString _password;
|
||||||
|
bool _ready;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
55
src/creds/shibboleth/shibbolethaccessmanager.cpp
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QNetworkRequest>
|
||||||
|
|
||||||
|
#include "creds/shibboleth/shibbolethaccessmanager.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
ShibbolethAccessManager::ShibbolethAccessManager(const QNetworkCookie& cookie, QObject* parent)
|
||||||
|
: MirallAccessManager (parent),
|
||||||
|
_cookie(cookie)
|
||||||
|
{}
|
||||||
|
|
||||||
|
QNetworkReply* ShibbolethAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData)
|
||||||
|
{
|
||||||
|
if (!_cookie.name().isEmpty()) {
|
||||||
|
QNetworkCookieJar* jar(cookieJar());
|
||||||
|
QUrl url(request.url());
|
||||||
|
QList<QNetworkCookie> cookies;
|
||||||
|
|
||||||
|
Q_FOREACH(const QNetworkCookie& cookie, jar->cookiesForUrl(url)) {
|
||||||
|
if (!cookie.name().startsWith("_shibsession_")) {
|
||||||
|
cookies << cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cookies << _cookie;
|
||||||
|
jar->setCookiesFromUrl(cookies, url);
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Creating a request to " << request.url().toString() << " with shibboleth cookie:" << _cookie.name();
|
||||||
|
|
||||||
|
return MirallAccessManager::createRequest (op, request, outgoingData);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethAccessManager::setCookie(const QNetworkCookie& cookie)
|
||||||
|
{
|
||||||
|
qDebug() << "Got new shibboleth cookie:" << cookie.name();
|
||||||
|
_cookie = cookie;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
43
src/creds/shibboleth/shibbolethaccessmanager.h
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_WIZARD_SHIBBOLETH_ACCESS_MANAGER_H
|
||||||
|
#define MIRALL_WIZARD_SHIBBOLETH_ACCESS_MANAGER_H
|
||||||
|
|
||||||
|
#include <QNetworkCookie>
|
||||||
|
|
||||||
|
#include "mirall/mirallaccessmanager.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class ShibbolethAccessManager : public MirallAccessManager
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ShibbolethAccessManager(const QNetworkCookie& cookie, QObject* parent = 0);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void setCookie(const QNetworkCookie& cookie);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QNetworkCookie _cookie;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
104
src/creds/shibboleth/shibbolethconfigfile.cpp
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QTextStream>
|
||||||
|
|
||||||
|
#include "creds/shibboleth/shibbolethconfigfile.h"
|
||||||
|
#include "creds/shibboleth/shibbolethcookiejar.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
const char otherCookiesC[] = "otherCookies";
|
||||||
|
|
||||||
|
} // ns
|
||||||
|
|
||||||
|
void ShibbolethConfigFile::storeCookies(const QMap<QUrl, QList<QNetworkCookie> >& cookiesForUrl)
|
||||||
|
{
|
||||||
|
if (cookiesForUrl.isEmpty()) {
|
||||||
|
removeData(QString(), QString::fromLatin1(otherCookiesC));
|
||||||
|
} else {
|
||||||
|
QByteArray data;
|
||||||
|
QTextStream stream(&data);
|
||||||
|
|
||||||
|
Q_FOREACH (const QUrl& url, cookiesForUrl.keys()) {
|
||||||
|
const QList<QNetworkCookie>& cookies(cookiesForUrl[url]);
|
||||||
|
|
||||||
|
if (cookies.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
stream << "URL: " << url.toString().toUtf8() << "\n";
|
||||||
|
qDebug() << "URL: " << url.toString().toUtf8();
|
||||||
|
|
||||||
|
Q_FOREACH (const QNetworkCookie& cookie, cookies) {
|
||||||
|
stream << cookie.toRawForm(QNetworkCookie::NameAndValueOnly) << "\n";
|
||||||
|
qDebug() << cookie.toRawForm(QNetworkCookie::NameAndValueOnly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stream.flush();
|
||||||
|
|
||||||
|
const QByteArray encodedCookies(data.toBase64());
|
||||||
|
|
||||||
|
qDebug() << "Raw cookies:\n" << data;
|
||||||
|
qDebug() << "Encoded cookies: " << encodedCookies;
|
||||||
|
|
||||||
|
storeData(QString(), QString::fromLatin1(otherCookiesC), QVariant(encodedCookies));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShibbolethCookieJar* ShibbolethConfigFile::createCookieJar() const
|
||||||
|
{
|
||||||
|
ShibbolethCookieJar* jar = new ShibbolethCookieJar();
|
||||||
|
const QVariant variant(retrieveData(QString(), QString::fromLatin1(otherCookiesC)));
|
||||||
|
|
||||||
|
if (variant.isValid()) {
|
||||||
|
QByteArray data(QByteArray::fromBase64(variant.toByteArray()));
|
||||||
|
QTextStream stream (&data);
|
||||||
|
const QString urlHeader(QString::fromLatin1("URL: "));
|
||||||
|
QUrl currentUrl;
|
||||||
|
QList<QNetworkCookie> currentCookies;
|
||||||
|
|
||||||
|
qDebug() << "Got valid cookies variant: " << data;
|
||||||
|
|
||||||
|
while (!stream.atEnd()) {
|
||||||
|
const QString line(stream.readLine());
|
||||||
|
|
||||||
|
qDebug() << line;
|
||||||
|
|
||||||
|
if (line.startsWith(urlHeader)) {
|
||||||
|
if (!currentUrl.isEmpty() && !currentCookies.isEmpty()) {
|
||||||
|
jar->setCookiesFromUrl(currentCookies, currentUrl);
|
||||||
|
currentCookies.clear();
|
||||||
|
currentUrl.clear();
|
||||||
|
}
|
||||||
|
currentUrl = QUrl(line.mid(5));
|
||||||
|
} else if (!currentUrl.isEmpty()) {
|
||||||
|
const int equalPos(line.indexOf('='));
|
||||||
|
|
||||||
|
currentCookies << QNetworkCookie(line.left(equalPos).toUtf8(), line.mid(equalPos + 1).toUtf8());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!currentUrl.isEmpty() && !currentCookies.isEmpty()) {
|
||||||
|
jar->setCookiesFromUrl(currentCookies, currentUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return jar;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
38
src/creds/shibboleth/shibbolethconfigfile.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_SHIBBOLETH_CONFIG_FILE_H
|
||||||
|
#define MIRALL_CREDS_SHIBBOLETH_CONFIG_FILE_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QNetworkCookie>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
|
#include "mirall/mirallconfigfile.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class ShibbolethCookieJar;
|
||||||
|
|
||||||
|
class ShibbolethConfigFile : public MirallConfigFile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void storeCookies(const QMap<QUrl, QList<QNetworkCookie> >& cookies);
|
||||||
|
ShibbolethCookieJar* createCookieJar() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
34
src/creds/shibboleth/shibbolethcookiejar.cpp
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "creds/shibboleth/shibbolethcookiejar.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
ShibbolethCookieJar::ShibbolethCookieJar (QObject* parent)
|
||||||
|
: QNetworkCookieJar (parent)
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool ShibbolethCookieJar::setCookiesFromUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
|
||||||
|
{
|
||||||
|
if (QNetworkCookieJar::setCookiesFromUrl (cookieList, url)) {
|
||||||
|
Q_EMIT newCookiesForUrl (cookieList, url);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
41
src/creds/shibboleth/shibbolethcookiejar.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_WIZARD_SHIBBOLETH_COOKIE_JAR_H
|
||||||
|
#define MIRALL_WIZARD_SHIBBOLETH_COOKIE_JAR_H
|
||||||
|
|
||||||
|
#include <QNetworkCookieJar>
|
||||||
|
#include <QList>
|
||||||
|
|
||||||
|
class QUrl;
|
||||||
|
class QNetworkCookie;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class ShibbolethCookieJar : public QNetworkCookieJar
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ShibbolethCookieJar (QObject* parent = 0);
|
||||||
|
|
||||||
|
virtual bool setCookiesFromUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void newCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
52
src/creds/shibboleth/shibbolethrefresher.cpp
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QEventLoop>
|
||||||
|
|
||||||
|
#include "creds/shibboleth/shibbolethrefresher.h"
|
||||||
|
#include "creds/shibbolethcredentials.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
ShibbolethRefresher::ShibbolethRefresher(ShibbolethCredentials* creds, CSYNC* csync_ctx, QObject* parent)
|
||||||
|
: QObject(parent),
|
||||||
|
_creds(creds),
|
||||||
|
_csync_ctx(csync_ctx)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ShibbolethRefresher::refresh()
|
||||||
|
{
|
||||||
|
QEventLoop loop;
|
||||||
|
|
||||||
|
connect(_creds, SIGNAL(invalidatedAndFetched(QByteArray)),
|
||||||
|
this, SLOT(onInvalidatedAndFetched(QByteArray)));
|
||||||
|
connect(_creds, SIGNAL(invalidatedAndFetched(QByteArray)),
|
||||||
|
&loop, SLOT(quit()));
|
||||||
|
QMetaObject::invokeMethod(_creds, "invalidateAndFetch", Qt::QueuedConnection);
|
||||||
|
loop.exec();
|
||||||
|
disconnect(_creds, SIGNAL(invalidatedAndFetched(QByteArray)),
|
||||||
|
&loop, SLOT(quit()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethRefresher::onInvalidatedAndFetched(const QByteArray& cookies)
|
||||||
|
{
|
||||||
|
// "cookies" is const and its data() return const void*. We want just void*.
|
||||||
|
QByteArray myCookies(cookies);
|
||||||
|
|
||||||
|
disconnect(_creds, SIGNAL(invalidatedAndFetched(QByteArray)),
|
||||||
|
this, SLOT(onInvalidatedAndFetched(QByteArray)));
|
||||||
|
csync_set_module_property(_csync_ctx, "session_key", myCookies.data());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
47
src/creds/shibboleth/shibbolethrefresher.h
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_CREDS_SHIBBOLETH_REFRESHER_H
|
||||||
|
#define MIRALL_CREDS_SHIBBOLETH_REFRESHER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include <csync.h>
|
||||||
|
|
||||||
|
class QByteArray;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class ShibbolethCredentials;
|
||||||
|
|
||||||
|
class ShibbolethRefresher : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ShibbolethRefresher(ShibbolethCredentials* creds, CSYNC* csync_ctx, QObject* parent = 0);
|
||||||
|
|
||||||
|
void refresh();
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onInvalidatedAndFetched(const QByteArray& cookieData);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ShibbolethCredentials* _creds;
|
||||||
|
CSYNC* _csync_ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
104
src/creds/shibboleth/shibbolethwebview.cpp
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QNetworkCookie>
|
||||||
|
#include <QWebFrame>
|
||||||
|
#include <QWebPage>
|
||||||
|
|
||||||
|
#include "creds/shibboleth/shibbolethcookiejar.h"
|
||||||
|
#include "creds/shibboleth/shibbolethwebview.h"
|
||||||
|
#include "mirall/mirallaccessmanager.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
void ShibbolethWebView::setup(const QUrl& url, ShibbolethCookieJar* jar)
|
||||||
|
{
|
||||||
|
MirallAccessManager* nm = new MirallAccessManager(this);
|
||||||
|
QWebPage* page = new QWebPage(this);
|
||||||
|
|
||||||
|
jar->setParent(this);
|
||||||
|
connect(jar, SIGNAL (newCookiesForUrl (QList<QNetworkCookie>, QUrl)),
|
||||||
|
this, SLOT (onNewCookiesForUrl (QList<QNetworkCookie>, QUrl)));
|
||||||
|
connect(page, SIGNAL(loadStarted()),
|
||||||
|
this, SLOT(slotLoadStarted()));
|
||||||
|
connect(page, SIGNAL(loadFinished(bool)),
|
||||||
|
this, SLOT(slotLoadFinished()));
|
||||||
|
|
||||||
|
nm->setCookieJar(jar);
|
||||||
|
page->setNetworkAccessManager(nm);
|
||||||
|
page->mainFrame ()->load (url);
|
||||||
|
this->setPage (page);
|
||||||
|
}
|
||||||
|
|
||||||
|
ShibbolethWebView::ShibbolethWebView(const QUrl& url, QWidget* parent)
|
||||||
|
: QWebView(parent)
|
||||||
|
{
|
||||||
|
setup(url, new ShibbolethCookieJar(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
ShibbolethWebView::~ShibbolethWebView()
|
||||||
|
{
|
||||||
|
slotLoadFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
ShibbolethWebView::ShibbolethWebView(const QUrl& url, ShibbolethCookieJar* jar, QWidget* parent)
|
||||||
|
: QWebView(parent)
|
||||||
|
{
|
||||||
|
setup(url, jar);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethWebView::onNewCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
|
||||||
|
{
|
||||||
|
QList<QNetworkCookie> otherCookies;
|
||||||
|
QNetworkCookie shibCookie;
|
||||||
|
|
||||||
|
Q_FOREACH (const QNetworkCookie& cookie, cookieList) {
|
||||||
|
if (cookie.name().startsWith ("_shibsession_")) {
|
||||||
|
if (shibCookie.name().isEmpty()) {
|
||||||
|
shibCookie = cookie;
|
||||||
|
} else {
|
||||||
|
qWarning() << "Too many Shibboleth session cookies at once!";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
otherCookies << cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!otherCookies.isEmpty()) {
|
||||||
|
Q_EMIT otherCookiesReceived(otherCookies, url);
|
||||||
|
}
|
||||||
|
if (!shibCookie.name().isEmpty()) {
|
||||||
|
Q_EMIT shibbolethCookieReceived(shibCookie);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethWebView::hideEvent(QHideEvent* event)
|
||||||
|
{
|
||||||
|
Q_EMIT viewHidden();
|
||||||
|
QWebView::hideEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethWebView::slotLoadStarted()
|
||||||
|
{
|
||||||
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethWebView::slotLoadFinished()
|
||||||
|
{
|
||||||
|
QApplication::restoreOverrideCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
56
src/creds/shibboleth/shibbolethwebview.h
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MIRALL_WIZARD_SHIBBOLETH_WEB_VIEW_H
|
||||||
|
#define MIRALL_WIZARD_SHIBBOLETH_WEB_VIEW_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
|
#include <QWebView>
|
||||||
|
|
||||||
|
class QNetworkCookie;
|
||||||
|
class QUrl;
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
class ShibbolethCookieJar;
|
||||||
|
|
||||||
|
class ShibbolethWebView : public QWebView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ShibbolethWebView(const QUrl& url, QWidget* parent = 0);
|
||||||
|
ShibbolethWebView(const QUrl& url, ShibbolethCookieJar* jar, QWidget* parent = 0);
|
||||||
|
~ShibbolethWebView();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void hideEvent(QHideEvent* event);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void shibbolethCookieReceived(const QNetworkCookie& cookie);
|
||||||
|
void viewHidden();
|
||||||
|
void otherCookiesReceived(const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onNewCookiesForUrl(const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
||||||
|
void slotLoadStarted();
|
||||||
|
void slotLoadFinished();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setup(const QUrl& url, ShibbolethCookieJar* jar);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
||||||
231
src/creds/shibbolethcredentials.cpp
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
||||||
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.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; version 2 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "creds/shibbolethcredentials.h"
|
||||||
|
#include "creds/shibboleth/shibbolethaccessmanager.h"
|
||||||
|
#include "creds/shibboleth/shibbolethwebview.h"
|
||||||
|
#include "creds/shibboleth/shibbolethrefresher.h"
|
||||||
|
#include "creds/shibboleth/shibbolethconfigfile.h"
|
||||||
|
#include "creds/credentialscommon.h"
|
||||||
|
#include "mirall/owncloudinfo.h"
|
||||||
|
#include "mirall/mirallconfigfile.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
int shibboleth_redirect_callback(CSYNC* csync_ctx,
|
||||||
|
const char* uri)
|
||||||
|
{
|
||||||
|
if (!csync_ctx || !uri) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString qurl(QString::fromLatin1(uri));
|
||||||
|
QRegExp shibbolethyWords ("SAML|wayf");
|
||||||
|
|
||||||
|
shibbolethyWords.setCaseSensitivity (Qt::CaseInsensitive);
|
||||||
|
if (!qurl.contains(shibbolethyWords)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMutex mutex;
|
||||||
|
QMutexLocker locker(&mutex);
|
||||||
|
MirallConfigFile cfg;
|
||||||
|
ShibbolethCredentials* creds = dynamic_cast< ShibbolethCredentials* > (cfg.getCredentials());
|
||||||
|
|
||||||
|
if (!creds) {
|
||||||
|
qDebug() << "Not a Shibboleth creds instance!";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ShibbolethRefresher refresher(creds, csync_ctx);
|
||||||
|
|
||||||
|
// blocks
|
||||||
|
refresher.refresh();
|
||||||
|
|
||||||
|
return creds->ready() ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns
|
||||||
|
|
||||||
|
ShibbolethCredentials::ShibbolethCredentials()
|
||||||
|
: _shibCookie(),
|
||||||
|
_ready(false),
|
||||||
|
_browser(0),
|
||||||
|
_otherCookies()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ShibbolethCredentials::ShibbolethCredentials(const QNetworkCookie& cookie, const QMap<QUrl, QList<QNetworkCookie> >& otherCookies)
|
||||||
|
: _shibCookie(cookie),
|
||||||
|
_ready(true),
|
||||||
|
_browser(0),
|
||||||
|
_otherCookies(otherCookies)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::syncContextPreInit(CSYNC* ctx)
|
||||||
|
{
|
||||||
|
csync_set_auth_callback (ctx, handleNeonSSLProblems);
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray ShibbolethCredentials::prepareCookieData() const
|
||||||
|
{
|
||||||
|
QString cookiesAsString;
|
||||||
|
// TODO: This should not be a part of this method, but we don't
|
||||||
|
// have any way to get "session_key" module property from
|
||||||
|
// csync. Had we have it, then we could just append shibboleth
|
||||||
|
// cookies to the "session_key" value and set it in csync module.
|
||||||
|
QList<QNetworkCookie> cookies(ownCloudInfo::instance()->getLastAuthCookies());
|
||||||
|
QMap<QString, QString> uniqueCookies;
|
||||||
|
|
||||||
|
cookies << _shibCookie;
|
||||||
|
// Stuff cookies inside csync, then we can avoid the intermediate HTTP 401 reply
|
||||||
|
// when https://github.com/owncloud/core/pull/4042 is merged.
|
||||||
|
foreach(QNetworkCookie c, cookies) {
|
||||||
|
const QString cookieName(c.name());
|
||||||
|
|
||||||
|
if (cookieName.startsWith("_shibsession_")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
uniqueCookies.insert(cookieName, c.value());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_shibCookie.name().isEmpty()) {
|
||||||
|
uniqueCookies.insert(_shibCookie.name(), _shibCookie.value());
|
||||||
|
}
|
||||||
|
foreach(const QString& cookieName, uniqueCookies.keys()) {
|
||||||
|
cookiesAsString += cookieName;
|
||||||
|
cookiesAsString += '=';
|
||||||
|
cookiesAsString += uniqueCookies[cookieName];
|
||||||
|
cookiesAsString += "; ";
|
||||||
|
}
|
||||||
|
|
||||||
|
return cookiesAsString.toLatin1();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::syncContextPreStart (CSYNC* ctx)
|
||||||
|
{
|
||||||
|
typedef int (*csync_owncloud_redirect_callback_t)(CSYNC* ctx, const char* uri);
|
||||||
|
|
||||||
|
csync_owncloud_redirect_callback_t cb = shibboleth_redirect_callback;
|
||||||
|
|
||||||
|
csync_set_module_property(ctx, "session_key", prepareCookieData().data());
|
||||||
|
csync_set_module_property(ctx, "redirect_callback", &cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShibbolethCredentials::changed(AbstractCredentials* credentials) const
|
||||||
|
{
|
||||||
|
ShibbolethCredentials* other(dynamic_cast< ShibbolethCredentials* >(credentials));
|
||||||
|
|
||||||
|
if (!other || other->cookie() != this->cookie()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ShibbolethCredentials::authType() const
|
||||||
|
{
|
||||||
|
return QString::fromLatin1("shibboleth");
|
||||||
|
}
|
||||||
|
|
||||||
|
QNetworkCookie ShibbolethCredentials::cookie() const
|
||||||
|
{
|
||||||
|
return _shibCookie;
|
||||||
|
}
|
||||||
|
|
||||||
|
QNetworkAccessManager* ShibbolethCredentials::getQNAM() const
|
||||||
|
{
|
||||||
|
ShibbolethAccessManager* qnam(new ShibbolethAccessManager(_shibCookie));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(newCookie(QNetworkCookie)),
|
||||||
|
qnam, SLOT(setCookie(QNetworkCookie)));
|
||||||
|
return qnam;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShibbolethCredentials::ready() const
|
||||||
|
{
|
||||||
|
return _ready;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::fetch()
|
||||||
|
{
|
||||||
|
if (_ready) {
|
||||||
|
Q_EMIT fetched();
|
||||||
|
} else {
|
||||||
|
ShibbolethConfigFile cfg;
|
||||||
|
|
||||||
|
_browser = new ShibbolethWebView(QUrl(cfg.ownCloudUrl()), cfg.createCookieJar());
|
||||||
|
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
|
||||||
|
this, SLOT(onShibbolethCookieReceived(QNetworkCookie)));
|
||||||
|
connect(_browser, SIGNAL(viewHidden()),
|
||||||
|
this, SLOT(slotBrowserHidden()));
|
||||||
|
_browser->show ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::persistForUrl(const QString& /*url*/)
|
||||||
|
{
|
||||||
|
ShibbolethConfigFile cfg;
|
||||||
|
|
||||||
|
cfg.storeCookies(_otherCookies);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::disposeBrowser()
|
||||||
|
{
|
||||||
|
disconnect(_browser, SIGNAL(viewHidden()),
|
||||||
|
this, SLOT(slotBrowserHidden()));
|
||||||
|
disconnect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
|
||||||
|
this, SLOT(onShibbolethCookieReceived(QNetworkCookie)));
|
||||||
|
_browser->hide();
|
||||||
|
_browser->deleteLater();
|
||||||
|
_browser = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::onShibbolethCookieReceived(const QNetworkCookie& cookie)
|
||||||
|
{
|
||||||
|
disposeBrowser();
|
||||||
|
_ready = true;
|
||||||
|
_shibCookie = cookie;
|
||||||
|
Q_EMIT newCookie(_shibCookie);
|
||||||
|
Q_EMIT fetched();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::slotBrowserHidden()
|
||||||
|
{
|
||||||
|
disposeBrowser();
|
||||||
|
_ready = false;
|
||||||
|
_shibCookie = QNetworkCookie();
|
||||||
|
Q_EMIT fetched();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::invalidateAndFetch()
|
||||||
|
{
|
||||||
|
_ready = false;
|
||||||
|
connect (this, SIGNAL(fetched()),
|
||||||
|
this, SLOT(onFetched()));
|
||||||
|
fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShibbolethCredentials::onFetched()
|
||||||
|
{
|
||||||
|
disconnect (this, SIGNAL(fetched()),
|
||||||
|
this, SLOT(onFetched()));
|
||||||
|
|
||||||
|
Q_EMIT invalidatedAndFetched(prepareCookieData());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||