Compare commits
641 Commits
v3.3.6
...
v2.5.0-oem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b247c41c64 | ||
|
|
de3dd3f889 | ||
|
|
b5a06361b9 | ||
|
|
f8e7df42a8 | ||
|
|
ba2c4d1b21 | ||
|
|
5c3dc990ca | ||
|
|
aee4ed6192 | ||
|
|
777e6ff5e0 | ||
|
|
df68d2b76f | ||
|
|
a4c6b48824 | ||
|
|
47cd931193 | ||
|
|
7f104355f1 | ||
|
|
8a08a51540 | ||
|
|
d8aa08d6ea | ||
|
|
778186b9ce | ||
|
|
4c07c4070b | ||
|
|
d434b2fd2a | ||
|
|
a1db6bfce5 | ||
|
|
83eeef1410 | ||
|
|
cccf4b100b | ||
|
|
5481060f82 | ||
|
|
5cd9082bea | ||
|
|
5e442f588e | ||
|
|
15e5cd9be0 | ||
|
|
73641bfb9b | ||
|
|
85464a9230 | ||
|
|
e65a8b44be | ||
|
|
a3f0c7f010 | ||
|
|
30fb68b3b7 | ||
|
|
e04af3088b | ||
|
|
44ae0df62b | ||
|
|
58a4bcb50f | ||
|
|
cad3c8a136 | ||
|
|
131c3448e3 | ||
|
|
117f6a86a7 | ||
|
|
34e7782d91 | ||
|
|
413ff1c7a0 | ||
|
|
a50eee8d8a | ||
|
|
10b9b7a793 | ||
|
|
3b57e22fc8 | ||
|
|
19951e5533 | ||
|
|
2a2451f4db | ||
|
|
9560cf2734 | ||
|
|
ba388934a2 | ||
|
|
cd5d8b3f5a | ||
|
|
04770d51d5 | ||
|
|
8130963476 | ||
|
|
fe28e00357 | ||
|
|
7d023348ab | ||
|
|
0abf2c603e | ||
|
|
9f742f059a | ||
|
|
5bcbcecb09 | ||
|
|
41ba1bf6e9 | ||
|
|
822637965b | ||
|
|
54c6967956 | ||
|
|
e281f081dc | ||
|
|
7080c0b33b | ||
|
|
a82ef9979c | ||
|
|
5cb7344c0b | ||
|
|
82553270cf | ||
|
|
ceb112d1fd | ||
|
|
a26901ea30 | ||
|
|
9b7da91f6d | ||
|
|
a31eadcadf | ||
|
|
7209fd27a0 | ||
|
|
0bab7cb068 | ||
|
|
0696805cef | ||
|
|
1e5b632e60 | ||
|
|
61452de83d | ||
|
|
aefeb08e36 | ||
|
|
918f6abd98 | ||
|
|
00674b12a7 | ||
|
|
af6accc3cc | ||
|
|
ba2e006263 | ||
|
|
0a88b069dd | ||
|
|
b98d96a82d | ||
|
|
6ed83d4a60 | ||
|
|
d3d16e2259 | ||
|
|
fe043006c8 | ||
|
|
bd5897a422 | ||
|
|
46d3e0d68c | ||
|
|
662d218595 | ||
|
|
b4f63ca219 | ||
|
|
f50afaf3eb | ||
|
|
64c1f7752b | ||
|
|
4194025eeb | ||
|
|
4dc2a70031 | ||
|
|
b03d106d0b | ||
|
|
c1751de118 | ||
|
|
6b8af42419 | ||
|
|
c85cd8e225 | ||
|
|
dd13e6304a | ||
|
|
d1e15b7802 | ||
|
|
add417e7af | ||
|
|
9db3439aeb | ||
|
|
5deeb6cd87 | ||
|
|
06633cf7f6 | ||
|
|
406192d0ba | ||
|
|
0b9049e6ff | ||
|
|
c2020e467b | ||
|
|
4a3fce531c | ||
|
|
760f0eab89 | ||
|
|
c8ecbc30ed | ||
|
|
2811aebf1a | ||
|
|
3450b2b85e | ||
|
|
d038ffa1fd | ||
|
|
58f46010b5 | ||
|
|
3dcf2479ad | ||
|
|
8ba0b83353 | ||
|
|
cf6e8269bf | ||
|
|
58d6632eaf | ||
|
|
81cc4c064e | ||
|
|
f27e5374eb | ||
|
|
7ec97f3f3a | ||
|
|
e9c9f5301e | ||
|
|
ab98547677 | ||
|
|
659aefa8ad | ||
|
|
eb7e074795 | ||
|
|
d0bdccc60a | ||
|
|
84b98ca29f | ||
|
|
299851c817 | ||
|
|
45bf2e9023 | ||
|
|
de0883d1a8 | ||
|
|
02fc7d3d0d | ||
|
|
d9e7ecd00a | ||
|
|
86fbde7147 | ||
|
|
3f120ce134 | ||
|
|
0b8e40b4af | ||
|
|
0af89b1937 | ||
|
|
ef873efb97 | ||
|
|
289dac3e36 | ||
|
|
c1ff89a47d | ||
|
|
7199f51ac4 | ||
|
|
1c6afda0d5 | ||
|
|
97a229cbf1 | ||
|
|
597d76137b | ||
|
|
56166deb76 | ||
|
|
a0675bd0ab | ||
|
|
b2b347417e | ||
|
|
d23b7a7a25 | ||
|
|
88676360b4 | ||
|
|
ae2724fd17 | ||
|
|
9e94faa967 | ||
|
|
fbed75ff98 | ||
|
|
847f82c44d | ||
|
|
04bbe2a34b | ||
|
|
590dab8548 | ||
|
|
9ea402a67e | ||
|
|
69fae8dd6a | ||
|
|
93cacdf04d | ||
|
|
1872e9a5f9 | ||
|
|
106dffba54 | ||
|
|
c645ca0711 | ||
|
|
d6b7bde3ca | ||
|
|
77768a12a2 | ||
|
|
d7e77b7473 | ||
|
|
9c47f63812 | ||
|
|
3d850fe24d | ||
|
|
0f79406e93 | ||
|
|
ff09ebd47a | ||
|
|
916343d7c2 | ||
|
|
c9e97c12cd | ||
|
|
c620683251 | ||
|
|
530ff542ea | ||
|
|
046047a370 | ||
|
|
890cd3ee1a | ||
|
|
e352032d99 | ||
|
|
4c2f690dab | ||
|
|
acbab4a8e9 | ||
|
|
37e5c47cdc | ||
|
|
6b3ce1939c | ||
|
|
7590edd971 | ||
|
|
9292be1374 | ||
|
|
e91a4211e4 | ||
|
|
05bd8291b9 | ||
|
|
90ec9a9735 | ||
|
|
25cca051a9 | ||
|
|
ab3315594d | ||
|
|
c7aca2d4a9 | ||
|
|
64014dd374 | ||
|
|
5b4c98d015 | ||
|
|
585a42cec9 | ||
|
|
11cba10290 | ||
|
|
c398300721 | ||
|
|
df5ec640e1 | ||
|
|
7029ad1a29 | ||
|
|
4517d0224e | ||
|
|
d332319394 | ||
|
|
3e40166ad2 | ||
|
|
dc14dae63d | ||
|
|
c095a0f25b | ||
|
|
347d35ae5d | ||
|
|
ea94c414b2 | ||
|
|
150d4f5935 | ||
|
|
e2a8975ad8 | ||
|
|
0dc8bde694 | ||
|
|
4d826a3d21 | ||
|
|
52bccac23a | ||
|
|
399046c7d5 | ||
|
|
07e2230dd9 | ||
|
|
b4b1409148 | ||
|
|
1a7a1552b0 | ||
|
|
8e4d2e8c9f | ||
|
|
b2fa9edd14 | ||
|
|
8dad4406ec | ||
|
|
f27fd4f693 | ||
|
|
2fec00a052 | ||
|
|
4cf53aa5ef | ||
|
|
a93f2d4ba9 | ||
|
|
e1a4c3ab72 | ||
|
|
4f96647bae | ||
|
|
79ef892e71 | ||
|
|
464c1fbce0 | ||
|
|
841606d138 | ||
|
|
850dc67a25 | ||
|
|
ae80317a74 | ||
|
|
a0d6139505 | ||
|
|
8b1d9799a3 | ||
|
|
ca033b9685 | ||
|
|
99116acdca | ||
|
|
92219c5bf7 | ||
|
|
de6b23c854 | ||
|
|
5b1057ea94 | ||
|
|
92b1375c58 | ||
|
|
9dac8be0ed | ||
|
|
d188b37caf | ||
|
|
343a27cbd8 | ||
|
|
0c49e6cc19 | ||
|
|
cdf0f04e45 | ||
|
|
5989c84949 | ||
|
|
3e9dadc1ed | ||
|
|
0062a28864 | ||
|
|
4cc0539080 | ||
|
|
9bb2f1965d | ||
|
|
62d9f74aa8 | ||
|
|
ad2446b036 | ||
|
|
9c66dbb2b7 | ||
|
|
e4574b2628 | ||
|
|
7557a124d8 | ||
|
|
f80c237c5c | ||
|
|
b7cee004cb | ||
|
|
bfd6b21591 | ||
|
|
d11e3e1f5f | ||
|
|
ab0813c77f | ||
|
|
4a8f99d628 | ||
|
|
789c7062fe | ||
|
|
9a8078944f | ||
|
|
76bb76a59e | ||
|
|
888f2aae2f | ||
|
|
9e26b0fea3 | ||
|
|
52cfb6bfef | ||
|
|
1c03ba03e4 | ||
|
|
eeff148051 | ||
|
|
13cb9ab1c5 | ||
|
|
f5ac5f2973 | ||
|
|
bff1c1cf28 | ||
|
|
40d432ecdd | ||
|
|
1753ce651b | ||
|
|
104f8c9ba2 | ||
|
|
7a776dbb6a | ||
|
|
3a7a6b0b9e | ||
|
|
d7792dc951 | ||
|
|
1434fa5139 | ||
|
|
252484e875 | ||
|
|
94535a75d9 | ||
|
|
91044fee81 | ||
|
|
47aa1ade71 | ||
|
|
7ba48849c6 | ||
|
|
ce1aa6af53 | ||
|
|
7aded05f40 | ||
|
|
f7b5665bce | ||
|
|
1a4ce88afb | ||
|
|
11ae820db1 | ||
|
|
46077f0de2 | ||
|
|
13d0595296 | ||
|
|
88abf43bda | ||
|
|
de77514671 | ||
|
|
5c69130300 | ||
|
|
74e412c789 | ||
|
|
5811c74f9c | ||
|
|
57a2881906 | ||
|
|
c625d8e3b7 | ||
|
|
53f52b4cf5 | ||
|
|
293c2b4f79 | ||
|
|
29349d4b3a | ||
|
|
7790953a2c | ||
|
|
e3083d6791 | ||
|
|
b9323bd191 | ||
|
|
8f9f2b5462 | ||
|
|
70b1deb226 | ||
|
|
2b112b8dcf | ||
|
|
9350b4458c | ||
|
|
2870715fff | ||
|
|
b0aa3a1da0 | ||
|
|
0cd2540a69 | ||
|
|
e680b3f3c8 | ||
|
|
2493cbe491 | ||
|
|
394ef439e0 | ||
|
|
309c53ca8f | ||
|
|
2638332dc6 | ||
|
|
5308fc4148 | ||
|
|
ad5fbfe05b | ||
|
|
b1224cff0c | ||
|
|
ce06c96135 | ||
|
|
1c4592339a | ||
|
|
0365653055 | ||
|
|
d8078d43fb | ||
|
|
fabc706e43 | ||
|
|
e7e8a62bb7 | ||
|
|
f396f2f41d | ||
|
|
8d14f4357a | ||
|
|
34d40e6c67 | ||
|
|
c80ee0ea48 | ||
|
|
fb71a90756 | ||
|
|
41dc87c748 | ||
|
|
8b952d3741 | ||
|
|
33b0726390 | ||
|
|
40e23d3da7 | ||
|
|
97ff3dccb8 | ||
|
|
fd18ece619 | ||
|
|
fe5e5fcb32 | ||
|
|
0f57326057 | ||
|
|
886f31456a | ||
|
|
2d7841204c | ||
|
|
5f6f5f5789 | ||
|
|
64e351c6d3 | ||
|
|
5e4aca8988 | ||
|
|
d917f52779 | ||
|
|
cca7914204 | ||
|
|
974b6a8845 | ||
|
|
52aa5754c3 | ||
|
|
2bfcd60d18 | ||
|
|
2e64b291da | ||
|
|
ce42080cc7 | ||
|
|
600a98e2e9 | ||
|
|
a547e228d3 | ||
|
|
369d833610 | ||
|
|
80e0f03f1b | ||
|
|
63935f086d | ||
|
|
905877ecc0 | ||
|
|
af4e40c3fc | ||
|
|
e9ac35b2e5 | ||
|
|
ce260909a8 | ||
|
|
d1304b2c05 | ||
|
|
6b3f9ee4c9 | ||
|
|
b7eb9b2040 | ||
|
|
0ce287d96d | ||
|
|
5e13d519d9 | ||
|
|
2c53025b0a | ||
|
|
0d51b32722 | ||
|
|
489342018f | ||
|
|
e5dd54d4f4 | ||
|
|
f470b045d7 | ||
|
|
2b7a726acf | ||
|
|
7cac493a6e | ||
|
|
ad917d038f | ||
|
|
7710b66498 | ||
|
|
0a14fce639 | ||
|
|
642ed1bb70 | ||
|
|
3f9c10e641 | ||
|
|
4327fede32 | ||
|
|
8b45fbfdab | ||
|
|
2696c520bd | ||
|
|
1ab3a9fc13 | ||
|
|
9d4ece4b3a | ||
|
|
e9db52a378 | ||
|
|
fc73cde10c | ||
|
|
44071f0892 | ||
|
|
529649254b | ||
|
|
1ec5d5b0cf | ||
|
|
7053a9c3d9 | ||
|
|
5ccf5fd9a1 | ||
|
|
6520263244 | ||
|
|
9555f8d75c | ||
|
|
073de7a8e0 | ||
|
|
397206134f | ||
|
|
a12986a952 | ||
|
|
5270b76520 | ||
|
|
f0dae03d06 | ||
|
|
4268f793fb | ||
|
|
1ef7ca1b09 | ||
|
|
dd5265a5f8 | ||
|
|
84a692435e | ||
|
|
c1fb5e6b20 | ||
|
|
e0b554ada9 | ||
|
|
1508b562ad | ||
|
|
4390bbf838 | ||
|
|
a4d049464b | ||
|
|
0073b7581f | ||
|
|
1ce3e4c27a | ||
|
|
69e5d55956 | ||
|
|
7cce30942e | ||
|
|
71db7fef77 | ||
|
|
b6f1ba38a6 | ||
|
|
f6a075ef54 | ||
|
|
c5701f635a | ||
|
|
2bf1f27c80 | ||
|
|
a5271b529b | ||
|
|
7c558394c1 | ||
|
|
d2d5439c5c | ||
|
|
c82aa10a66 | ||
|
|
38f1c5b7d2 | ||
|
|
985a657f48 | ||
|
|
9e8464e114 | ||
|
|
02b818af04 | ||
|
|
0fdfb2cba3 | ||
|
|
a9561f494b | ||
|
|
b7412a4f09 | ||
|
|
ba1309b3a4 | ||
|
|
70b4dc99dc | ||
|
|
65a2b1aa8a | ||
|
|
fb3e3edcbd | ||
|
|
c2f84d7c3e | ||
|
|
8358dabbfd | ||
|
|
8b6ae04155 | ||
|
|
87433bfe87 | ||
|
|
9bd583b0e5 | ||
|
|
01bb241e48 | ||
|
|
e2f2c9a153 | ||
|
|
a41d385607 | ||
|
|
a8b4526d65 | ||
|
|
a2191474eb | ||
|
|
cc8497916d | ||
|
|
798e60c9f6 | ||
|
|
57044c1e02 | ||
|
|
daa26d0c81 | ||
|
|
9ed937a6d3 | ||
|
|
5509cd2504 | ||
|
|
fa6ac9da23 | ||
|
|
78e80e5d46 | ||
|
|
2c18ea0a89 | ||
|
|
93d8810414 | ||
|
|
aaa00c1f30 | ||
|
|
2728c49649 | ||
|
|
1449426aee | ||
|
|
aceff1f863 | ||
|
|
113f56fdc5 | ||
|
|
bd9ec3dbee | ||
|
|
6fcff62e95 | ||
|
|
abc3667048 | ||
|
|
894686e66a | ||
|
|
db64b217b8 | ||
|
|
7e5edac9ce | ||
|
|
ca36da6037 | ||
|
|
73777beb00 | ||
|
|
eef275a1e4 | ||
|
|
1114b8ce0a | ||
|
|
716be66234 | ||
|
|
2298ecca7c | ||
|
|
0f5a43797a | ||
|
|
268eae1da6 | ||
|
|
d128608f21 | ||
|
|
cbcd3a05e7 | ||
|
|
42b254785e | ||
|
|
d6b16c3c06 | ||
|
|
55414d4c1d | ||
|
|
3bafa1ec89 | ||
|
|
dfc0545994 | ||
|
|
71de396a5d | ||
|
|
f9299826b1 | ||
|
|
e9646364a0 | ||
|
|
75241c6cd6 | ||
|
|
fc4582ddf6 | ||
|
|
02a2056543 | ||
|
|
afec3ccf6e | ||
|
|
49b1a32251 | ||
|
|
a450859789 | ||
|
|
8b1b572935 | ||
|
|
cc4149c125 | ||
|
|
073fda3d03 | ||
|
|
6f44cc3d98 | ||
|
|
9f346037ee | ||
|
|
39d909b05a | ||
|
|
28f68369be | ||
|
|
2641a6af21 | ||
|
|
d69936e065 | ||
|
|
1ac45be94e | ||
|
|
3d002468ae | ||
|
|
5e75d224ee | ||
|
|
8e7f7cfec8 | ||
|
|
31f13c8846 | ||
|
|
25deaed9e5 | ||
|
|
17342031d7 | ||
|
|
26b991c0c0 | ||
|
|
3f4d504c34 | ||
|
|
6a4486df3b | ||
|
|
9516519165 | ||
|
|
7739157bfc | ||
|
|
b34878c16d | ||
|
|
962c38583f | ||
|
|
9bd30cf003 | ||
|
|
20881cd004 | ||
|
|
e5b93c7584 | ||
|
|
24e2c809e4 | ||
|
|
75a269acb6 | ||
|
|
8357f1ea9a | ||
|
|
20bd943a87 | ||
|
|
424898603a | ||
|
|
c1592e34c7 | ||
|
|
edacaae15f | ||
|
|
29557ea550 | ||
|
|
37a93dca63 | ||
|
|
b632b7e0fa | ||
|
|
fc8e3b0914 | ||
|
|
861d777899 | ||
|
|
ff3e3ce886 | ||
|
|
d69e9ebf46 | ||
|
|
24bf1b3629 | ||
|
|
94b0c9f78e | ||
|
|
567f7eb205 | ||
|
|
a89508ba26 | ||
|
|
c3c8ab85ec | ||
|
|
0bf0f92949 | ||
|
|
04f8d0f2bc | ||
|
|
4584e5d3c5 | ||
|
|
d1c887d754 | ||
|
|
bbf1843865 | ||
|
|
b6aaa6fd2b | ||
|
|
0031e09410 | ||
|
|
0071011ebf | ||
|
|
978a129eed | ||
|
|
991f4faafb | ||
|
|
371acb296d | ||
|
|
86b30e36c2 | ||
|
|
7132e88f8e | ||
|
|
1119bcf539 | ||
|
|
d67018311f | ||
|
|
50c8ec8fd9 | ||
|
|
eaecec418e | ||
|
|
2e2ffca9e2 | ||
|
|
ab27bcacdf | ||
|
|
536a051460 | ||
|
|
427bb83f0d | ||
|
|
faec059a9b | ||
|
|
641eddfbdf | ||
|
|
61869bb65e | ||
|
|
797473ba1f | ||
|
|
f82d61ea19 | ||
|
|
ec281654ae | ||
|
|
52dfe589ba | ||
|
|
a5aebac6a7 | ||
|
|
13eb64584f | ||
|
|
259a117db5 | ||
|
|
2041f1ace8 | ||
|
|
08f402d264 | ||
|
|
d8084e2b18 | ||
|
|
7d03e47fea | ||
|
|
f5f68c0bc0 | ||
|
|
167939a8c9 | ||
|
|
41ebfb635e | ||
|
|
017b8e9de3 | ||
|
|
6453c57979 | ||
|
|
7606184b31 | ||
|
|
5ff2b5b0a3 | ||
|
|
7397565274 | ||
|
|
4a19a8d644 | ||
|
|
a01c73be19 | ||
|
|
f63737ecb0 | ||
|
|
dd87799a82 | ||
|
|
302c60fe15 | ||
|
|
22c7002d59 | ||
|
|
9968142976 | ||
|
|
75a6783a79 | ||
|
|
18afe6a395 | ||
|
|
da6b515bfc | ||
|
|
f9a03fa288 | ||
|
|
a5c66cf289 | ||
|
|
41b908e293 | ||
|
|
6ffed87b08 | ||
|
|
f6331951eb | ||
|
|
7897b386b6 | ||
|
|
bd5ea43547 | ||
|
|
159899d3ba | ||
|
|
48dd8ed6c2 | ||
|
|
8ba27cb0f1 | ||
|
|
1ab8bb62ae | ||
|
|
6f8248ebfd | ||
|
|
33306dcc38 | ||
|
|
ed2dfcf399 | ||
|
|
6fc3bfc265 | ||
|
|
129b814931 | ||
|
|
888818a9f7 | ||
|
|
aee72ae098 | ||
|
|
766f8c2006 | ||
|
|
d43439ebd9 | ||
|
|
f7caf13873 | ||
|
|
d90229242e | ||
|
|
b14ba325d5 | ||
|
|
628e310501 | ||
|
|
6c1a73b67a | ||
|
|
4a47f7e438 | ||
|
|
131647442f | ||
|
|
01b79f2ff1 | ||
|
|
73062e21a3 | ||
|
|
e7e6584cab | ||
|
|
7373c68aeb | ||
|
|
13f1122c50 | ||
|
|
ba5fb5aca7 | ||
|
|
c4543c58ea | ||
|
|
55a91926c1 | ||
|
|
b5e129aa6b | ||
|
|
9fc175231d | ||
|
|
4dd0a75cce | ||
|
|
3cfd502f7e | ||
|
|
452a99f7d3 | ||
|
|
a9d37a0784 | ||
|
|
22b19636e9 | ||
|
|
6ee3310e2b | ||
|
|
065b1eed11 | ||
|
|
7860876b54 | ||
|
|
dbc2d4a8b6 | ||
|
|
7eb2dc21af | ||
|
|
3aeeb11135 | ||
|
|
e338739d83 | ||
|
|
8fb9700869 | ||
|
|
f95e044206 | ||
|
|
795ab29514 | ||
|
|
72262b565e | ||
|
|
cedf72825b | ||
|
|
06a86033c1 | ||
|
|
e17d5defe3 | ||
|
|
959d60e957 | ||
|
|
31f516f390 | ||
|
|
b6835186a3 | ||
|
|
c32ba4aee3 | ||
|
|
e720f84005 | ||
|
|
ec26388826 | ||
|
|
f0822d648d | ||
|
|
14f60a4238 | ||
|
|
f8022bb248 | ||
|
|
48ef2e4563 | ||
|
|
a0d9fc4354 | ||
|
|
e4b2d27c65 | ||
|
|
d1aacac294 | ||
|
|
e322bd706f | ||
|
|
c846a329a8 | ||
|
|
de929eb566 | ||
|
|
c5d37dfedc | ||
|
|
eae00f9969 | ||
|
|
c1bf90ddad | ||
|
|
b418bf6db4 |
92
.drone.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# We are building GCC with make and Clang with ninja, the combinations are more
|
||||
# or less arbitrarily chosen. We just want to check that both compilers and both
|
||||
# CMake generators work. It's unlikely that a specific generator only breaks
|
||||
# with a specific compiler.
|
||||
#
|
||||
|
||||
workspace:
|
||||
base: /drone
|
||||
path: src/github.com/owncloud/client
|
||||
|
||||
branches:
|
||||
- master
|
||||
- 2.5
|
||||
- 2.4
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
pull: true
|
||||
tags: false
|
||||
|
||||
pipeline:
|
||||
prepare-clang:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- mkdir clang-build
|
||||
- cd clang-build
|
||||
- cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
|
||||
building-clang:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- cd clang-build
|
||||
- ninja -j4
|
||||
|
||||
testing-clang:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- cd clang-build
|
||||
- useradd -m -s /bin/bash tester
|
||||
- chown -R tester:tester .
|
||||
- su-exec tester ctest --output-on-failure
|
||||
|
||||
prepare-gcc:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- mkdir gcc-build
|
||||
- cd gcc-build
|
||||
- cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
|
||||
building-gcc:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- cd gcc-build
|
||||
- make -j4
|
||||
|
||||
testing-gcc:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- cd gcc-build
|
||||
- useradd -m -s /bin/bash tester
|
||||
- chown -R tester:tester .
|
||||
- su-exec tester ctest --output-on-failure
|
||||
|
||||
notify-slack:
|
||||
image: plugins/slack
|
||||
pull: true
|
||||
secrets: [ slack_webhook ]
|
||||
channel: desktop
|
||||
when:
|
||||
local: false
|
||||
status: [ changed, failure ]
|
||||
event: [ push ]
|
||||
50
.github/release_template.md
vendored
@@ -16,6 +16,7 @@ Some weeks before the release:
|
||||
* [ ] Ensure Windows Overlay DLLs are rebuilt
|
||||
* [ ] Check nightly builds are up and running, that is Jenkins jobs ownCloud-client-linux, ownCloud-client-osx and ownCloud-client-win32 all green.
|
||||
* [ ] Ensure Linux nightlies are built too for all distros https://build.opensuse.org/package/show/isv:ownCloud:community:nightly/owncloud-client
|
||||
* Check if patches still apply in the linux packages
|
||||
* [ ] Build branded clients through the scripting machine and smoke test one or two branded clients (especially with predefined url)
|
||||
* [ ] Upload a nightly build of the windows version to virustotal.com
|
||||
* Contact AV vendors whom's engine reports a virus
|
||||
@@ -35,6 +36,7 @@ For all alphas, betas and RCs (Copy this section for each alpha/beta/rc):
|
||||
* [ ] Add last updates to Changelog in the client source repository.
|
||||
* [ ] Branch off a release branch called VERSION-rcX or VERSION-betaX (without v, v is for tags)
|
||||
* [ ] Edit ```VERSION.cmake``` to set the suffix to beta1, beta2 etc. Commit the result to the release branch only
|
||||
* [ ] Make sure to increase the version number of the branched of release, e.g. if you release 2.3.2 then you should change VERSION.cmake in 2.3 to 2.3.3 since that branch now will be 2.3.3
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'ownCloud'
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'testpilotcloud'
|
||||
* [ ] Only now download the last created source .tar.xz and sign it with gpg. Copy the signature into a new .asc file. (timing issue because currently 'testpilotcloud' re-creates the source .tar.xz)
|
||||
@@ -42,11 +44,12 @@ For all alphas, betas and RCs (Copy this section for each alpha/beta/rc):
|
||||
* [ ] Mac: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Win: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Smoke test of one distro package (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Run @SamuAlfageme 's magic Linux-test-all-packages-script
|
||||
* [ ] Create a signed tag using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Create a pull request to the owncloud.org repository to update the install page (strings.php, page-desktop.php) and the changelog on owncloud.org. From now on download packages from the staging webserver.
|
||||
* [ ] Inform community mailinglists devel@owncloud.org and testpilots@owncloud.org
|
||||
* [ ] Inform packagers @dragotin (openSUSE) @hefee (Debian)
|
||||
* [ ] Inform packagers @dragotin (openSUSE), @hefee (Debian), ??? (Fedora)
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Inform community mailinglists devel@owncloud.org and testpilots@owncloud.org (make sure to mention it is an rc). Link to the central post so discussion happens there.
|
||||
* [ ] Check crash reporter
|
||||
|
||||
One week before the final release:
|
||||
@@ -63,52 +66,53 @@ Day before final Release:
|
||||
|
||||
On Release Day (for final release):
|
||||
* [ ] Add last updates to Changelog in the client source repository.
|
||||
* [ ] Branch off a release branch called VERSION-rcX or VERSION-betaX (without v, v is for tags)
|
||||
* [ ] Edit ```VERSION.cmake``` to set the suffix to beta1, beta2 etc. Commit the result to the release branch only
|
||||
* [ ] Make sure to increase the version number of the branched of release, e.g. if you release 2.3.2 then you should change VERSION.cmake in 2.3 to 2.3.3 since that branch now will be 2.3.3
|
||||
* [ ] Branch off a release branch called VERSION (without v, v is for tags)
|
||||
* [ ] Edit ```VERSION.cmake``` to set the suffix to "" etc. Commit the result to the release branch only
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'ownCloud'
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'testpilotcloud'
|
||||
* [ ] Only now download the last created source .tar.xz and sign it with gpg. Copy the signature into a new .asc file. (timing issue because currently 'testpilotcloud' re-creates the source .tar.xz) (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Branch isv:ownCloud:desktop to isv:ownCloud:desktop:client-X.Y.Z before overwriting https://github.com/owncloud/administration/blob/master/jenkins/obs_integration/obs-backup-prj.sh
|
||||
* Check if patches still apply in the linux packages
|
||||
* Update [OBS repository](https://build.opensuse.org/project/show?project=isv%3AownCloud%3Adesktop) `isv:ownCloud:desktop`
|
||||
* [ ] Branch isv:ownCloud:desktop to isv:ownCloud:desktop:client-X.Y.Z before overwriting https://github.com/owncloud/administration/blob/master/jenkins/obs_integration/obs-backup-prj.sh (the linux packages will land in the :testing repository still)
|
||||
```obs-backup-prj.sh isv:ownCloud:desktop isv:ownCloud:desktop:client-2.4.1 owncloud-client 2.4.1 # (if not already done)```
|
||||
|
||||
* [ ] Re-download Mac builds and check signature. Interactive in installer window
|
||||
* [ ] Re-download Win build check signature. From Mac or Linux: ```osslsigncode verify ownCloud-version-setup.exe```
|
||||
* [ ] Mac: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Win: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Smoke test of one distro package (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Run @SamuAlfageme 's magic Linux-test-all-packages-script
|
||||
* [ ] Linux: Re-enable OBS publishing on the project (check for accidentially disabled packages too)
|
||||
* Let obs build and publish exactly once. then
|
||||
* [ ] disable publishing (on the obs project!) and rebuild the owncloud-client package and all its dependencies.
|
||||
* [ ] double-check that there are no _aggregatepac from other projects
|
||||
* [ ] Create a signed tag using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Copy builds from ```testing``` to ```stable``` on download.owncloud.com, double check the download links. (make sure the .asc is there too)
|
||||
* [ ] Create a pull request to the owncloud.org repository to update the install page (strings.php, page-desktop.php). From now on download packages from the staging webserver.
|
||||
* [ ] Linux: Run @SamuAlfageme 's client-linux-tests Jenkins job (this tests only package installations!) Adjust REPO_URL in https://jenkins.int.owncloud.com/job/client-linux-tests/build (Better: gitlab?)
|
||||
* [ ] Win/Mac Copy builds from ```testing``` to ```stable``` on download.owncloud.com, double check the download links. (make sure the .asc is there too)
|
||||
* [ ] Linux: disable publishing on project isv:ownCloud:desktop
|
||||
* [ ] Linux: Use https://github.com/owncloud/administration/blob/master/jenkins/obs_integration/obs-deepcopy-prj.sh to copy from isv:ownCloud:community:testing to isv:ownCloud:desktop
|
||||
```obs-deepcopy-prj.sh isv:ownCloud:desktop:testing isv:ownCloud:desktop```
|
||||
```obs-deepcopy-prj.sh isv:ownCloud:testpilot:testing isv:ownCloud:testpilot```
|
||||
* [ ] Linux: Re-enable OBS publishing on the project after official release date and if all distros build (check for accidentially disabled packages too)
|
||||
* [ ] Linux: Wait until everything is built and published, then disable publishing on project isv:ownCloud:desktop
|
||||
* [ ] Create git signed tag in client repository using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Create a (draft) release on https://github.com/owncloud/client/releases
|
||||
* [ ] Update https://owncloud.org/changelog/desktop-client/
|
||||
* [ ] Update https://owncloud.org/download/#owncloud-desktop-client -> Download ownCloud -> click open 'Desktop Client', edit win/mac/lin, each all three tabs "Production", "Technical Preview" [disabled], "Test pilot"
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Announce on announcements@owncloud.org
|
||||
* [ ] Inform packagers @dragotin (openSUSE) @hefee (Debian)
|
||||
* [ ] Create git signed tag in client repository using ```git tag -u E94E7B37 tagname```
|
||||
* [ ] Announce on announcements@owncloud.org Link to the central post so discussion happens there.
|
||||
* [ ] Inform packagers @dragotin (openSUSE) @hefee (Debian) @Germano0 (Fedora)
|
||||
* [ ] Send out Social (tweet, blog, other)
|
||||
* [ ] Send out customer communication (if any)
|
||||
* [ ] Inform GCX that the new version is released (gcx@owncloud.com)
|
||||
* [ ] Inform release-coordination@owncloud.com
|
||||
* [ ] Ensure marketing is aware (marketing@owncloud.com)
|
||||
* [ ] Take pride and celebrate!
|
||||
* [ ] Also update the testpilotcloud builds for that release version and make sure they show up on the download page
|
||||
* [ ] Tell GCX to increment the minimum supported version for enterprise customers
|
||||
* [ ] Check if minimum.supported.desktop.version (https://github.com/owncloud/core/blob/master/config/config.sample.php#L1152) needs to be updated in server
|
||||
* [ ] Linux OBS: Update the testing repository to the latest stable version.
|
||||
|
||||
15 minutes after after release:
|
||||
* [ ] Test all advertised download links to have the expected version
|
||||
* [ ] Check for build errors in OBS
|
||||
* [ ] Check for build errors in OBS, do
|
||||
```obs-deepcopy-prj.sh isv:ownCloud:desktop isv:ownCloud:desktop:client-2.X.X```
|
||||
* [ ] disable publishing in OBS to prevent that accidential rebuilds hit the end users.
|
||||
|
||||
A few days after the release (for final release)
|
||||
* [ ] Review changes in the release branch, merge back into master
|
||||
* [ ] check the crash reporter if auto update is a good idea or we need a new release
|
||||
* [ ] Update the updater script ```clientupdater.php```
|
||||
* [ ] Update the updater script ```clientupdater.php``` https://github.com/owncloud/enterprise/wiki/How-to-use-the-Client-Updater#updating-the-owncloud-hosted-updater
|
||||
* [ ] Execute announced deprecations. Disable builds for deprecated platforms. Update accordingly: https://doc.owncloud.org/server/latest/admin_manual/installation/system_requirements.html#desktop
|
||||
* [ ] Increment version number in nightly builds. Special case: after the last release in a branch, jump forward to the 'next release branch'... That may mean, this is nightly is the same as edge then.
|
||||
|
||||
|
||||
3
.gitmodules
vendored
@@ -7,3 +7,6 @@
|
||||
[submodule "src/3rdparty/libcrashreporter-qt"]
|
||||
path = src/3rdparty/libcrashreporter-qt
|
||||
url = git://github.com/dschmidt/libcrashreporter-qt.git
|
||||
[submodule "doc/docs-themes"]
|
||||
path = doc/docs-themes
|
||||
url = https://github.com/owncloud/docs-themes.git
|
||||
|
||||
37
.travis.yml
@@ -1,37 +0,0 @@
|
||||
sudo: required
|
||||
|
||||
language: cpp
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
branches:
|
||||
only:
|
||||
- coverity_scan
|
||||
|
||||
before_install:
|
||||
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_14.04/Release.key
|
||||
- sudo apt-key add - < Release.key
|
||||
- sudo apt-get update
|
||||
- sudo apt-get -y build-dep owncloud-client
|
||||
- checkout=$(git show-ref --head --hash head)
|
||||
- cd ../
|
||||
- wget https://scan.coverity.com/download/linux-64 --post-data "token=$token&project=owncloud%2Fmirall" -O coverity_tool.tgz
|
||||
- mkdir coverity
|
||||
- tar -xvf coverity_tool.tgz -C coverity --strip-components=1
|
||||
- export PATH=$PATH:$PWD/coverity/bin/
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
|
||||
install:
|
||||
- cd ../
|
||||
- mkdir client-build
|
||||
- cd client-build
|
||||
- cmake -DCMAKE_BUILD_TYPE="Debug" $TRAVIS_BUILD_DIR
|
||||
- cov-build --dir cov-int make
|
||||
- tar czvf client.tgz cov-int
|
||||
- curl --form token=$token --form email=lukas@statuscode.ch --form file=@$PWD/client.tgz --form version="$checkout" --form description="$checkout" https://scan.coverity.com/builds?project=owncloud%2Fmirall
|
||||
|
||||
# Hack to stop processing
|
||||
script: true
|
||||
@@ -5,41 +5,15 @@ project(client)
|
||||
|
||||
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
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 )
|
||||
else ()
|
||||
include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
|
||||
endif()
|
||||
# need this logic to not mess with re/uninstallations via macosx.pkgproj
|
||||
if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient")
|
||||
set(APPLICATION_REV_DOMAIN_INSTALLER "com.ownCloud.client")
|
||||
else()
|
||||
set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/THEME.cmake")
|
||||
|
||||
# For usage in XML files we preprocess
|
||||
string(REPLACE "&" "&" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
|
||||
string(REPLACE "<" "<" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
|
||||
string(REPLACE ">" ">" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
|
||||
|
||||
if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
|
||||
set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PACKAGE)
|
||||
set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
|
||||
endif()
|
||||
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
|
||||
|
||||
if(NOT CRASHREPORTER_EXECUTABLE)
|
||||
set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
|
||||
endif()
|
||||
set(synclib_NAME "${APPLICATION_EXECUTABLE}sync")
|
||||
set(csync_NAME "${APPLICATION_EXECUTABLE}_csync")
|
||||
|
||||
include(Warnings)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
||||
# For config.h
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# Allows includes based on src/ like #include "common/utility.h" or #include "csync/csync.h"
|
||||
@@ -188,7 +162,7 @@ if(BUILD_CLIENT)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED APPLICATION_ICON_NAME)
|
||||
set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME})
|
||||
set(APPLICATION_ICON_NAME "${APPLICATION_SHORTNAME}")
|
||||
endif()
|
||||
|
||||
include(OwnCloudCPack.cmake)
|
||||
@@ -211,9 +185,6 @@ endif()
|
||||
file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts)
|
||||
set(TRANSLATIONS ${TRANS_FILES})
|
||||
|
||||
# Make sure we set this before recursing into child folders.
|
||||
set(WITH_TESTING ${UNIT_TESTING})
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
add_subdirectory(src)
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
|
||||
161
ChangeLog
@@ -1,7 +1,166 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
version 2.4.0 (2017-12-XX)
|
||||
version 2.5.0 (2018-09-xx)
|
||||
* Local discovery: Speed up by skipping directories without changes reported by the file system watcher.
|
||||
* Experimental option to create virtual files (e.g. my_document.txt.owncloud) and download contents on demand ("placeholders")
|
||||
* Windows: Add sync folders to Explorer's navigation pane (#5295)
|
||||
* Config: Client configuration in roaming profile on Windows, XDG conform on Linux (#684, #2245)
|
||||
* Experimental option to upload conflict files (#4557)
|
||||
* Conflicts: Change conflict file naming scheme
|
||||
* Conflicts: Add user name to conflict file name (#6325)
|
||||
* Conflicts: Better comparison when connection broke (#6626)
|
||||
* Conflicts: Deal with file/folder conflicts (#6312)
|
||||
* Conflicts: Change tray icon for unresolved conflicts (#6277)
|
||||
* Conflicts: Add documentation link to conflicts listing (#6396)
|
||||
* Conflicts: Change tags to be more user friendly (#6365)
|
||||
* Share dialog: Allow opening it if the file's contents are still syncing (#4608)
|
||||
* Share dialog: Don't hide account settings when opening it (#6185)
|
||||
* Share dialog: Remove odd grey square on OSX (#5774)
|
||||
* Share dialog: Preserve the entered password when unrelated changes are done (#6512)
|
||||
* Share dialog: Fix Re-shares not not showing up (#6666)
|
||||
* Sharing: Add "copy public link" to menu (#6356)
|
||||
* Share link: Update permission wording (#6192)
|
||||
* Private links: improve legacy fileid derivation (#6745)
|
||||
* User shares: Show avatars
|
||||
* OAuth2: Remove the timeout (#6612)
|
||||
* Wizard: Remove the "Skip folder config" button and instead add a radio button (#3664)
|
||||
* Wizard: Fix for back button in OAuth2 (#6574)
|
||||
* Wizard: add a context menu to copy the OAuth2 link (enterprise
|
||||
* Wizard: Put errors into a scroll area (#6546)
|
||||
* Wizard: show a message when the URL is invalid
|
||||
* Wizard: pre-select the right radio button (#6685)
|
||||
* Selective Sync: Do not abort applying selective sync if one folder has an error (#6675)
|
||||
* Protocol: Introduce context menu with "open in browser" (#6121)
|
||||
* Protocol: Correct sorting by size (#6326)
|
||||
* Issues tab: Invalidate issues selectively (#6226)
|
||||
* Issues tab: Don't allow two issues for the same file/folder
|
||||
* Issues tab: addItem performance improvement
|
||||
* Activities: Remove the text that a server does not support activities when the account is removed (#6679)
|
||||
* Activities: Handle the fact that the username can contain a '@' (#6728)
|
||||
* Notifications: Lower hiding timeout
|
||||
* Notifications: Also have clickable link (#6236)
|
||||
* Shell integration: Add "Open in browser" entry in the explorer menu (#5903)
|
||||
* Sync journal: Fix crash when unmounting a drive while a sync is running (#6049)
|
||||
* Client certs: Improve error message (#6128)
|
||||
* Settings: Hide selective sync buttons while disconnected (#5809)
|
||||
* Settings: Show account page when account created
|
||||
* Settings: Move "About" to a dialog (#6075)
|
||||
* Settings: Force sync should wipe the blacklist (#6757)
|
||||
* Excludes: Optimize further the matching of exclude files using regular expression
|
||||
* Windows: Update Overlay Icon naming
|
||||
* Windows: Release handle/fd when file open fails (#6699)
|
||||
* Config: Look for exclude file in a relative path.
|
||||
* Config: Versionize settings
|
||||
* Settings: Fix rename migration issue on old macOS
|
||||
* Credentials: Re-try on Linux if daemon not running (#4274, #6522)
|
||||
* Windows: Fixed MSVC build and compiler bugs
|
||||
* Proxy: Hostname validation and reconnection on setting change (#6140)
|
||||
* owncloudcmd: Set proxy earlier (#6281)
|
||||
* Exclude regex: Restore old matching on Windows (#6245)
|
||||
* Build system: Modernize the CMakeLists.txt files
|
||||
* Use standard png2ico
|
||||
* Sync: When detecting a local move, keep the local mtime (#6629)
|
||||
* Sync: Better error handling for local directory parsing (#6610)
|
||||
* Sync: Error if properties are missing (#6317)
|
||||
* Sync: Recover when the PUT reply (or chunkin's MOVE) is lost (#5106)
|
||||
* Sync: Do not abort a sync if the server closes the connection (#6516)
|
||||
* Sync: Increase the timeout for the last MOVE/PUT for huge files (#6527)
|
||||
* Sync: Fix renames making hierarchy inversion (#6694)
|
||||
* Sync: RemotePermissions: Fix empty vs null (#4608)
|
||||
* Sync: Fix the "direction" of the "all file delted" message when the server is reset (#6317)
|
||||
* Data-Fingerprint: Fix backup detection when fingerprint is empty
|
||||
* propagateuploadv1: Fixed an assert with ownCloud 5
|
||||
* Download: Use the <s:message> from the reply in the error message (#6459, #6459)
|
||||
* SocketAPI: dynamic action menu
|
||||
* Hidden option to move remote-deleted files to trash (#6265)
|
||||
* FolderStatusModel: Refresh folders on Problem sync (#6337)
|
||||
* SyncJournal: Clear etag filter before sync
|
||||
* SyncEngine: Use separate state for two unicode conversions
|
||||
* owncloudcmd: Do not read the proxy settings from the gui's config file
|
||||
* ProgressInfo: Add information for local vs remote discovery
|
||||
* SyncResult: Make sure the number of conflicts is correct (#6226)
|
||||
* Remove the "CSync" wording from the error messages
|
||||
* Apply branding to crashreporter resources file
|
||||
* SslButton: Add HTTP/2 info (#3146)
|
||||
* SslButton: Improve speed (especially on macOS) (#6031)
|
||||
* Folder: normalize the local path. (#4424)
|
||||
* Folder: Fix checking if the folder can be used as sync folder (#6654)
|
||||
* Blacklisting must prevent parent etag updates (#6411)
|
||||
* FolderStatusModel: fix potential assert
|
||||
* Nautilus integration: Not a ColumnProvider
|
||||
* Nautilus integration: Fix python3 compatibility (#6406, #6643)
|
||||
* Nautilus: Guard against None state (#6643)
|
||||
* Dolphin plugin: fall back if $XDG_RUNTIME_DIR is empty
|
||||
* Notify if an explicitly excluded folder is created (#6222)
|
||||
* Theme: unify ownCloudTheme and Theme classes
|
||||
* SyncJournalDb::setSelectiveSyncList: Always use a transaction (#6431)
|
||||
* Folders: Use "Problem" icon for unresolved conflicts (#6277)
|
||||
* macOS: Unload the Finder extension on exit (#5382, #3819)
|
||||
* Logging: Go to new file on Problem/Abort too (#6442)
|
||||
* Logging: Compress log when switching files (#6442)
|
||||
* Logging: Add persistent auto-logdir option (#6442)
|
||||
* Logging: .owncloudsynclog: Allow 10 MB of size (#6420)
|
||||
* Logging: .owncloudsynclog: Persist X-Request-ID for correlation with server (#6420)
|
||||
* UI: High-DPI layout fixes
|
||||
* Network settings: Better warnings about bad configuration (#5885)
|
||||
* Folder watcher: Show a notification if it becomes unreliable (#6119)
|
||||
* Ignore editor: Preserve comments in the exclude list file
|
||||
* Updater: Support EXE->MSI upgrade (different code than 2.4)
|
||||
* Updater: Remove unused installers before copying new ones into the appdata dir (#6690)
|
||||
* ConnectionValidator: change the minimum server version to 7.0
|
||||
* ConnectionValidator: Warn when the server version is less than 10.0
|
||||
* Valgrind: Refactorings to avoid errors
|
||||
* Crash fixes (#6562 and more)
|
||||
* Windows: Fix missing company name in our DLLs
|
||||
* Windows: Appveyor/craft changes
|
||||
* Linux: More tray workarounds (#6545)
|
||||
* libocsync: Rename to ${APPLICATION_EXECUTABLE}_csync
|
||||
* Don't use Qt deprecated API now that we required Qt 5.6
|
||||
|
||||
version 2.4.3 (2018-08-13)
|
||||
* Windows: Don't ignore files with FILE_ATTRIBUTE_TEMPORARY (#6696, #6610)
|
||||
* OAuth2: Fix infinite loop when the refresh token is expired
|
||||
* Windows MSI: Fix crash in the auto updater
|
||||
* Nautilus: Guard against None state (#6643)
|
||||
|
||||
version 2.4.2 (2018-07-18)
|
||||
* Linux: Tray workarounds (#6545)
|
||||
* Fix nautilus/nemo shell issues (#6393, #6406)
|
||||
* Updater: Add update channel feature (#6259)
|
||||
* Updater: Support EXE->MSI upgrade
|
||||
* SyncJournal: Fixes for sync folders on removable media (#6049, #6049)
|
||||
* SslButton: Add HTTP/2 info (#3146)
|
||||
* Fix assert when using ownCloud server 5 (which you should not) (#6403)
|
||||
* Normalize local path (#4424)
|
||||
* Blacklisting must prevent parent etag updates (#6411)
|
||||
* macdeployqt: Adjust minimum version based on our Qt (#5932)
|
||||
* macOS: Unload the Finder extension on exit (#5382, #3819)
|
||||
* Upload: Adjust timeout for final job based on file size (#6527)
|
||||
* Sync: When detecting a local move, keep the local mtime (#6629)
|
||||
* Credentials: Retry fetching from the keychain in case the keychain is still starting (#4274, #6522)
|
||||
* OAuth2: Try to refresh the token even if the credentials weren't ready (#6522)
|
||||
|
||||
version 2.4.1 (2018-03-05)
|
||||
* Ignore files with file names that can't be encoded for the filesystem (#6287, #5676, #5719)
|
||||
* Issues: Speed up insertion and add hard upper limit (#6272)
|
||||
* Notifications: Fix "Dismiss" action
|
||||
* Notifications: Fix timer invocation on macOS
|
||||
* Notifications: Immediately poll when account online
|
||||
* Protocol: Remove entries for auto resolved conflicts (#6316)
|
||||
* owncloudcmd: Set proxy before capabilities call (#6281)
|
||||
* owncloudcmd: Do not do the capability call when --nonshib is passed
|
||||
* Avatars: Use old location for servers <10 (#6279)
|
||||
* Link shares: Change default share name (#6298)
|
||||
* Sharing: Use maximum allowed permissions for new share (#6346)
|
||||
* Nautilus integration: Work with python2 and python3
|
||||
* Windows: Don't delete contents behind directory junctions (#6322)
|
||||
* SyncJournal: Don't use LIKE with paths (#6322)
|
||||
* Fix setting launch-on-startup when the first account is set up (#6347)
|
||||
* HTTP2: Only allow with Qt 5.9.4 (#6285)
|
||||
* Crash fixes
|
||||
|
||||
version 2.4.0 (2017-12-21)
|
||||
* If you're using 2.4.0 alpha1, please upgrade as previous alphas/rcs had an issue with hidden files and renames!
|
||||
* OAuth2 authentication support by opening external browser (#5668)
|
||||
* Shibboleth: Change to use OAuth2 if supported (#6198)
|
||||
|
||||
72
Jenkinsfile
vendored
@@ -1,72 +0,0 @@
|
||||
#!groovy
|
||||
|
||||
//
|
||||
// We now run the tests in Debug mode so that ASSERTs are triggered.
|
||||
// Ideally we should run the tests in both Debug and Release so we catch
|
||||
// all possible error combinations.
|
||||
// See also the top comment in syncenginetestutils.h
|
||||
//
|
||||
// We are building "Linux - GCC" with "make" and "Linux - Clang" with ninja,
|
||||
// the combinations are more or less arbitrarily chosen. We just want to
|
||||
// check that both compilers and both CMake generators work. It's
|
||||
// unlikely that a specific generator only breaks with a specific
|
||||
// compiler.
|
||||
|
||||
// Constructed from the DockerFile in admin/linux/DockerFile
|
||||
def linux = docker.image('dominikschmidt/docker-owncloud-client-linux:latest')
|
||||
// Constructed from the DockerFile in admin/win/docker/DockerFile
|
||||
def win32 = docker.image('dominikschmidt/docker-owncloud-client-win32-cross:latest')
|
||||
|
||||
node('CLIENT') {
|
||||
stage 'Checkout'
|
||||
checkout scm
|
||||
sh '''git submodule update --init'''
|
||||
|
||||
stage 'Linux - Pull Docker Image'
|
||||
linux.pull()
|
||||
|
||||
stage 'Linux - GCC'
|
||||
linux.inside {
|
||||
sh '''
|
||||
export HOME="$(pwd)/home"
|
||||
rm -rf build home
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
make -j4
|
||||
LC_ALL=C.UTF-8 ctest -V --output-on-failure
|
||||
'''
|
||||
}
|
||||
|
||||
stage 'Linux - Clang'
|
||||
linux.inside {
|
||||
sh '''
|
||||
export HOME="$(pwd)/home"
|
||||
rm -rf build home
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
ninja -j4
|
||||
LC_ALL=C.UTF-8 ctest -V --output-on-failure
|
||||
'''
|
||||
}
|
||||
|
||||
stage 'Win32 Cross - Pull Docker Image'
|
||||
win32.pull()
|
||||
|
||||
stage 'Win32 Cross'
|
||||
win32.inside {
|
||||
sh '''
|
||||
rm -rf build-win32
|
||||
mkdir build-win32
|
||||
cd build-win32
|
||||
../admin/win/download_runtimes.sh
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
|
||||
make -j4
|
||||
make package
|
||||
ctest .
|
||||
'''
|
||||
}
|
||||
|
||||
// Stage 'macOS' TODO
|
||||
}
|
||||
@@ -5,6 +5,7 @@ set( APPLICATION_DOMAIN "owncloud.com" )
|
||||
set( APPLICATION_VENDOR "ownCloud" )
|
||||
set( APPLICATION_UPDATE_URL "https://updates.owncloud.com/client/" CACHE string "URL for updater" )
|
||||
set( APPLICATION_ICON_NAME "owncloud" )
|
||||
set( APPLICATION_VIRTUALFILE_SUFFIX "owncloud" CACHE STRING "Virtual file suffix (not including the .)")
|
||||
|
||||
set( LINUX_PACKAGE_SHORTNAME "owncloud" )
|
||||
|
||||
@@ -19,4 +20,4 @@ set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-back
|
||||
|
||||
option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||
set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE string "URL for crash reporter" )
|
||||
set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||
|
||||
|
||||
33
README.md
@@ -1,6 +1,6 @@
|
||||
# ownCloud Desktop Client
|
||||
|
||||
[](https://jenkins.owncloud.org/job/owncloud-client/job/client/job/master/) [](https://ci.appveyor.com/project/ownclouders/client/branch/master)
|
||||
[](https://drone.owncloud.com/owncloud/client) [](https://ci.appveyor.com/project/ownclouders/client/branch/master)
|
||||
|
||||
|
||||
## Introduction
|
||||
@@ -12,7 +12,7 @@ with your computer.
|
||||
|
||||
### Binary packages
|
||||
|
||||
* Refer to the download page https://owncloud.org/install/#install-clients
|
||||
* Refer to the download page https://owncloud.org/download/#owncloud-desktop-client
|
||||
|
||||
### Source code
|
||||
|
||||
@@ -27,18 +27,6 @@ https://github.com/owncloud/client.
|
||||
[Building the Client](http://doc.owncloud.org/desktop/2.3/building.html)
|
||||
in the ownCloud Desktop Client manual.
|
||||
|
||||
## Maintainers and Contributors
|
||||
|
||||
The maintainers of this repository are:
|
||||
|
||||
* Klaas Freitag <freitag@owncloud.com>
|
||||
* Daniel Molkentin <danimo@owncloud.com>
|
||||
* Markus Goetz <guruz@owncloud.com>
|
||||
* Olivier Goffart <ogoffart@owncloud.com>
|
||||
|
||||
ownCloud Desktop Client is developed by the ownCloud community and receives
|
||||
patches from a variety of authors.
|
||||
|
||||
## Reporting issues and contributing
|
||||
|
||||
If you find any bugs or have any suggestion for improvement, please
|
||||
@@ -56,6 +44,23 @@ If you want to contact us, e.g. before starting a more complex feature,
|
||||
you can join us at
|
||||
[#owncloud-client-dev](irc://irc.freenode.net/#owncloud-client-dev).
|
||||
|
||||
## Maintainers and Contributors
|
||||
|
||||
The current maintainers of this repository are:
|
||||
|
||||
* Markus Goetz <guruz@owncloud.com>
|
||||
* Olivier Goffart <ogoffart@owncloud.com>
|
||||
* Christian Kamm <mail@ckamm.de>
|
||||
|
||||
ownCloud Desktop Client is developed by the ownCloud community and [receives
|
||||
patches from a variety of authors](https://github.com/owncloud/client/graphs/contributors).
|
||||
|
||||
Past maintainers:
|
||||
|
||||
* Klaas Freitag <freitag@owncloud.com>
|
||||
* Daniel Molkentin <daniel@molkentin.de>
|
||||
* Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
## License
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
38
THEME.cmake
Normal file
@@ -0,0 +1,38 @@
|
||||
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")
|
||||
else()
|
||||
include ("${CMAKE_CURRENT_LIST_DIR}/OWNCLOUD.cmake")
|
||||
endif()
|
||||
|
||||
# Default suffix if the theme doesn't define one
|
||||
if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
|
||||
set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
|
||||
endif()
|
||||
|
||||
# need this logic to not mess with re/uninstallations via macosx.pkgproj
|
||||
if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient")
|
||||
set(APPLICATION_REV_DOMAIN_INSTALLER "com.ownCloud.client")
|
||||
else()
|
||||
set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
|
||||
endif()
|
||||
|
||||
# For usage in XML files we preprocess
|
||||
string(REPLACE "&" "&" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
|
||||
string(REPLACE "<" "<" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
|
||||
string(REPLACE ">" ">" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
|
||||
|
||||
if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
|
||||
set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PACKAGE)
|
||||
set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
|
||||
endif()
|
||||
|
||||
if(NOT CRASHREPORTER_EXECUTABLE)
|
||||
set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
|
||||
endif()
|
||||
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/VERSION.cmake")
|
||||
@@ -1,7 +1,7 @@
|
||||
set( MIRALL_VERSION_MAJOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 5 )
|
||||
set( MIRALL_VERSION_PATCH 0 )
|
||||
set( MIRALL_VERSION_YEAR 2017 )
|
||||
set( MIRALL_VERSION_PATCH 1 )
|
||||
set( MIRALL_VERSION_YEAR 2018 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
|
||||
@@ -11,7 +11,8 @@ else()
|
||||
set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "0")
|
||||
endif()
|
||||
|
||||
configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
|
||||
configure_file(macosx.pkgproj ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)
|
||||
find_package(Qt5 5.6 COMPONENTS Core REQUIRED)
|
||||
configure_file(create_mac.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
|
||||
configure_file(macosx.pkgproj.cmake ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)
|
||||
configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh)
|
||||
configure_file(post_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/post_install.sh)
|
||||
|
||||
@@ -23,7 +23,7 @@ identity="$3"
|
||||
prjfile=$build_path/admin/osx/macosx.pkgproj
|
||||
|
||||
# The name of the installer package
|
||||
installer="@APPLICATION_SHORTNAME@-@MIRALL_VERSION_FULL@@MIRALL_VERSION_SUFFIX@"
|
||||
installer="@APPLICATION_SHORTNAME@-qt@Qt5Core_VERSION@-@MIRALL_VERSION_FULL@@MIRALL_VERSION_SUFFIX@"
|
||||
installer_file="$installer.pkg"
|
||||
installer_file_tar="$installer.pkg.tar"
|
||||
installer_file_tar_bz2="$installer.pkg.tar.bz2"
|
||||
@@ -22,6 +22,10 @@ import subprocess
|
||||
import commands
|
||||
import sys
|
||||
from glob import glob
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
bundle_dir = sys.argv[1]
|
||||
qmake_path = sys.argv[2]
|
||||
|
||||
def QueryQMake(attrib):
|
||||
return subprocess.check_output([qmake_path, '-query', attrib]).rstrip('\n')
|
||||
@@ -31,7 +35,9 @@ FRAMEWORK_SEARCH_PATH=[
|
||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||
]
|
||||
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '.']
|
||||
LIBRARY_SEARCH_PATH=[
|
||||
'.'
|
||||
]
|
||||
|
||||
QT_PLUGINS = [
|
||||
'sqldrivers/libqsqlite.dylib',
|
||||
@@ -43,10 +49,12 @@ QT_PLUGINS = [
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
# os.path.join(os.environ['QTDIR'], 'plugins'),
|
||||
'/usr/local/Cellar/qt/5.2.1/plugins',
|
||||
]
|
||||
|
||||
# Package libraries from these paths even if they are also a system library
|
||||
SYSTEM_LIBRARY_BLACKLIST = [
|
||||
QueryQMake('QT_INSTALL_LIBS')
|
||||
]
|
||||
|
||||
class Error(Exception):
|
||||
pass
|
||||
@@ -77,8 +85,6 @@ if len(sys.argv) < 3:
|
||||
def is_exe(fpath):
|
||||
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||
|
||||
bundle_dir = sys.argv[1]
|
||||
qmake_path = sys.argv[2]
|
||||
|
||||
bundle_name = os.path.basename(bundle_dir).split('.')[0]
|
||||
|
||||
@@ -92,6 +98,8 @@ commands.append(['mkdir', '-p', resources_dir])
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'PlugIns')
|
||||
binaries = [i for i in glob(os.path.join(bundle_dir, 'Contents', 'MacOS', "*")) if is_exe(i)];
|
||||
|
||||
qt_version = QueryQMake('QT_VERSION')
|
||||
print "Using Qt", qt_version
|
||||
|
||||
fixed_libraries = []
|
||||
fixed_frameworks = []
|
||||
@@ -195,7 +203,7 @@ def FixFramework(path):
|
||||
FixLibraryInstallPath(library, new_path)
|
||||
|
||||
def FixLibrary(path):
|
||||
if path in fixed_libraries or FindSystemLibrary(os.path.basename(path)) is not None:
|
||||
if path in fixed_libraries or FindSystemLibrary(path) is not None:
|
||||
return
|
||||
else:
|
||||
fixed_libraries.append(path)
|
||||
@@ -232,6 +240,7 @@ def FixBinary(path):
|
||||
FixLibraryInstallPath(library, path)
|
||||
|
||||
def CopyLibrary(path):
|
||||
print "CopyLibrary:", path
|
||||
new_path = os.path.join(binary_dir, os.path.basename(path))
|
||||
args = ['ditto', '--arch=x86_64', path, new_path]
|
||||
commands.append(args)
|
||||
@@ -240,6 +249,7 @@ def CopyLibrary(path):
|
||||
return new_path
|
||||
|
||||
def CopyPlugin(path, subdir):
|
||||
print "CopyPlugin:", path, subdir
|
||||
new_path = os.path.join(plugins_dir, subdir, os.path.basename(path))
|
||||
args = ['mkdir', '-p', os.path.dirname(new_path)]
|
||||
commands.append(args)
|
||||
@@ -250,8 +260,8 @@ def CopyPlugin(path, subdir):
|
||||
return new_path
|
||||
|
||||
def CopyFramework(source_dylib):
|
||||
parts = source_dylib.split(os.sep)
|
||||
print "CopyFramework:", source_dylib
|
||||
parts = source_dylib.split(os.sep)
|
||||
for i, part in enumerate(parts):
|
||||
matchObj = re.match(r'(\w+\.framework)', part)
|
||||
if matchObj:
|
||||
@@ -298,7 +308,12 @@ def FixInstallPath(library_path, library, new_path):
|
||||
args = ['install_name_tool', '-change', library_path, new_path, library]
|
||||
commands.append(args)
|
||||
|
||||
def FindSystemLibrary(library_name):
|
||||
def FindSystemLibrary(library_path):
|
||||
for item in SYSTEM_LIBRARY_BLACKLIST:
|
||||
if library_path.startswith(item):
|
||||
return None
|
||||
|
||||
library_name = os.path.basename(library_path)
|
||||
for path in ['/lib', '/usr/lib']:
|
||||
full_path = os.path.join(path, library_name)
|
||||
if os.path.exists(full_path):
|
||||
@@ -306,7 +321,7 @@ def FindSystemLibrary(library_name):
|
||||
return None
|
||||
|
||||
def FixLibraryInstallPath(library_path, library):
|
||||
system_library = FindSystemLibrary(os.path.basename(library_path))
|
||||
system_library = FindSystemLibrary(library_path)
|
||||
if system_library is None:
|
||||
new_path = '@executable_path/../MacOS/%s' % os.path.basename(library_path)
|
||||
FixInstallPath(library_path, library, new_path)
|
||||
@@ -334,9 +349,19 @@ def FindQtPlugin(name):
|
||||
for binary in binaries:
|
||||
FixBinary(binary)
|
||||
|
||||
|
||||
if LooseVersion(qt_version) >= LooseVersion("5.10.0"):
|
||||
QT_PLUGINS.append('styles/libqmacstyle.dylib')
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
||||
if LooseVersion(qt_version) >= LooseVersion("5.10.0"):
|
||||
args = ['plutil', '-insert', 'LSMinimumSystemVersion', '-string', '10.10.0', os.path.join(bundle_dir, 'Contents', 'Info.plist')]
|
||||
commands.append(args)
|
||||
else:
|
||||
args = ['plutil', '-insert', 'LSMinimumSystemVersion', '-string', '10.7.0', os.path.join(bundle_dir, 'Contents', 'Info.plist')]
|
||||
commands.append(args)
|
||||
|
||||
if len(sys.argv) <= 2:
|
||||
print 'Will run %d commands:' % len(commands)
|
||||
for command in commands:
|
||||
|
||||
@@ -579,7 +579,9 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>INSTALLATION TYPE</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>MODE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>INSTALLATION_STEPS</key>
|
||||
<array>
|
||||
@@ -699,7 +701,7 @@
|
||||
<key>BUILD_PATH</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>../install/.</string>
|
||||
<string>@CMAKE_INSTALL_PREFIX@/.</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
osascript << EOF
|
||||
# Check if Finder is running (for systems with Finder disabled)
|
||||
finder_status=`ps aux | grep "/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder" | grep -v "grep"`
|
||||
if ! [ "$finder_status" == "" ] ; then # Finder is running
|
||||
osascript << EOF
|
||||
tell application "Finder"
|
||||
activate
|
||||
select the last Finder window
|
||||
reveal POSIX file "/Applications/@APPLICATION_EXECUTABLE@.app"
|
||||
end tell
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Always enable the new 10.10 finder plugin if available
|
||||
if [ -x "$(command -v pluginkit)" ]; then
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
[ "$#" -lt 2 ] && echo "Usage: sign_dmg.sh <dmg> <identity>" && exit
|
||||
|
||||
src_dmg="$1"
|
||||
tmp_dmg="writable_$1"
|
||||
signed_dmg="signed_$1"
|
||||
identity="$2"
|
||||
|
||||
QT_FMWKS=`basename ${TMP_APP}/Contents/Frameworks`/Qt*
|
||||
QT_FMWK_VERSION="5"
|
||||
|
||||
fix_frameworks() {
|
||||
TMP_APP=$1
|
||||
QT_FMWK_PATH=$2
|
||||
QT_FMWKS=$3/Qt*.framework
|
||||
|
||||
echo "Patching Qt frameworks..."
|
||||
for FMWK in $QT_FMWKS; do
|
||||
FMWK_NAME=`basename -s .framework $FMWK`
|
||||
FMWK=`basename $FMWK`
|
||||
FMWK_PATH="${TMP_APP}/Contents/Frameworks/${FMWK}"
|
||||
mkdir -p "${FMWK_PATH}/Versions/${QT_FMWK_VERSION}/Resources/"
|
||||
cp -avf "${QT_FMWK_PATH}/${FMWK}/Contents/Info.plist" "${FMWK_PATH}/Versions/${QT_FMWK_VERSION}/Resources"
|
||||
(cd "${FMWK_PATH}" && ln -sf "Versions/${QT_FMWK_VERSION}/Resources" "Resources")
|
||||
perl -pi -e "s/${FMWK_NAME}_debug/${FMWK_NAME}/" "${FMWK_PATH}/Resources/Info.plist"
|
||||
done
|
||||
}
|
||||
|
||||
mount="/Volumes/$(basename "$src_dmg"|sed 's,-\([0-9]\)\(.*\),,')"
|
||||
test -e "$tmp_dmg" && rm -rf "$tmp_dmg"
|
||||
hdiutil convert "$src_dmg" -format UDRW -o "$tmp_dmg"
|
||||
hdiutil attach "$tmp_dmg"
|
||||
pushd "$mount"
|
||||
fix_frameworks "$mount"/*.app `qmake -query QT_INSTALL_LIBS` "$mount"/*.app/Contents/Frameworks
|
||||
codesign -s "$identity" --deep "$mount"/*.app
|
||||
popd
|
||||
diskutil eject "$mount"
|
||||
test -e "$signed_dmg" && rm -rf "$signed_dmg"
|
||||
hdiutil convert "$tmp_dmg" -format UDBZ -o "$signed_dmg"
|
||||
120
admin/win/nsi/lib/fileassoc.nsh
Normal file
@@ -0,0 +1,120 @@
|
||||
; fileassoc.nsh
|
||||
; File association helper macros
|
||||
; Written by Saivert
|
||||
; See http://nsis.sourceforge.net/FileAssoc
|
||||
;
|
||||
; Features automatic backup system and UPDATEFILEASSOC macro for
|
||||
; shell change notification.
|
||||
;
|
||||
; |> How to use <|
|
||||
; To associate a file with an application so you can double-click it in explorer, use
|
||||
; the APP_ASSOCIATE macro like this:
|
||||
;
|
||||
; Example:
|
||||
; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "Description of txt files" \
|
||||
; "$INSTDIR\myapp.exe,0" "Open with myapp" "$INSTDIR\myapp.exe $\"%1$\""
|
||||
;
|
||||
; Never insert the APP_ASSOCIATE macro multiple times, it is only ment
|
||||
; to associate an application with a single file and using the
|
||||
; the "open" verb as default. To add more verbs (actions) to a file
|
||||
; use the APP_ASSOCIATE_ADDVERB macro.
|
||||
;
|
||||
; Example:
|
||||
; !insertmacro APP_ASSOCIATE_ADDVERB "myapp.textfile" "edit" "Edit with myapp" \
|
||||
; "$INSTDIR\myapp.exe /edit $\"%1$\""
|
||||
;
|
||||
; To have access to more options when registering the file association use the
|
||||
; APP_ASSOCIATE_EX macro. Here you can specify the verb and what verb is to be the
|
||||
; standard action (default verb).
|
||||
;
|
||||
; And finally: To remove the association from the registry use the APP_UNASSOCIATE
|
||||
; macro. Here is another example just to wrap it up:
|
||||
; !insertmacro APP_UNASSOCIATE "txt" "myapp.textfile"
|
||||
;
|
||||
; |> Note <|
|
||||
; When defining your file class string always use the short form of your application title
|
||||
; then a period (dot) and the type of file. This keeps the file class sort of unique.
|
||||
; Examples:
|
||||
; Winamp.Playlist
|
||||
; NSIS.Script
|
||||
; Photoshop.JPEGFile
|
||||
;
|
||||
; |> Tech info <|
|
||||
; The registry key layout for a file association is:
|
||||
; HKEY_CLASSES_ROOT
|
||||
; <applicationID> = <"description">
|
||||
; shell
|
||||
; <verb> = <"menu-item text">
|
||||
; command = <"command string">
|
||||
;
|
||||
|
||||
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" ""
|
||||
WriteRegStr HKCR ".${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
|
||||
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
|
||||
|
||||
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
|
||||
WriteRegStr HKCR "${FILECLASS}\DefaultIcon" "" `${ICON}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell" "" "open"
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\open\command" "" `${COMMAND}`
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_EX EXT FILECLASS DESCRIPTION ICON VERB DEFAULTVERB SHELLNEW COMMANDTEXT COMMAND
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" ""
|
||||
WriteRegStr HKCR ".${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
|
||||
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
|
||||
StrCmp "${SHELLNEW}" "0" +2
|
||||
WriteRegStr HKCR ".${EXT}\ShellNew" "NullFile" ""
|
||||
|
||||
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
|
||||
WriteRegStr HKCR "${FILECLASS}\DefaultIcon" "" `${ICON}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell" "" `${DEFAULTVERB}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}\command" "" `${COMMAND}`
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_ADDVERB FILECLASS VERB COMMANDTEXT COMMAND
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}\command" "" `${COMMAND}`
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_REMOVEVERB FILECLASS VERB
|
||||
DeleteRegKey HKCR `${FILECLASS}\shell\${VERB}`
|
||||
!macroend
|
||||
|
||||
|
||||
!macro APP_UNASSOCIATE EXT FILECLASS
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" `${FILECLASS}_backup`
|
||||
WriteRegStr HKCR ".${EXT}" "" "$R0"
|
||||
|
||||
DeleteRegKey HKCR `${FILECLASS}`
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_GETFILECLASS OUTPUT EXT
|
||||
ReadRegStr ${OUTPUT} HKCR ".${EXT}" ""
|
||||
!macroend
|
||||
|
||||
|
||||
; !defines for use with SHChangeNotify
|
||||
!ifdef SHCNE_ASSOCCHANGED
|
||||
!undef SHCNE_ASSOCCHANGED
|
||||
!endif
|
||||
!define SHCNE_ASSOCCHANGED 0x08000000
|
||||
!ifdef SHCNF_FLUSH
|
||||
!undef SHCNF_FLUSH
|
||||
!endif
|
||||
!define SHCNF_FLUSH 0x1000
|
||||
|
||||
!macro UPDATEFILEASSOC
|
||||
; Using the system.dll plugin to call the SHChangeNotify Win32 API function so we
|
||||
; can update the shell.
|
||||
System::Call "shell32::SHChangeNotify(i,i,i,i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_FLUSH}, 0, 0)"
|
||||
!macroend
|
||||
|
||||
;EOF
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 25 KiB |
15
appveyor.ini
@@ -9,13 +9,18 @@ Command=craft
|
||||
#Values need to be overwritten to create a chache
|
||||
UseCache = True
|
||||
CreateCache = False
|
||||
QtVersion = 5.11.1
|
||||
OpenSslVersion = 1.1.0i
|
||||
CacheVersion = Qt_${Variables:QtVersion}
|
||||
|
||||
# Settings applicable for all Crafts matrices
|
||||
# Settings are Category/key=value
|
||||
# Category is case sensitive
|
||||
|
||||
[GeneralSettings]
|
||||
General/EMERGE_PKGDSTDIR=${Variables:APPVEYOR_BUILD_FOLDER}/binaries
|
||||
Version/ConfigVersion = 6
|
||||
|
||||
Packager/Destination=${Variables:APPVEYOR_BUILD_FOLDER}/binaries
|
||||
Paths/python = C:\Python36
|
||||
Paths/python27 = C:\Python27
|
||||
Paths/downloaddir = ${Variables:Root}\downloads
|
||||
@@ -25,17 +30,21 @@ ShortPath/JunctionDir = C:\CM-SP\
|
||||
Packager/CacheDir = ${Variables:Root}\cache
|
||||
Packager/UseCache = ${Variables:UseCache}
|
||||
Packager/CreateCache = ${Variables:CreateCache}
|
||||
Packager/CacheVersion = ${Variables:CacheVersion}
|
||||
; Packager/RepositoryUrl = https://files.kde.org/craft/
|
||||
Packager/PackageType = PortablePackager
|
||||
Packager/RepositoryUrl = http://ftp.acc.umu.se/mirror/kde.org/files/craft/master/
|
||||
Packager/Whitelist = *.pdb;*.sym;symbols
|
||||
Packager/RepositoryUrl = https://attic.owncloud.com/org/mirror/craft/
|
||||
Compile/BuildType = RelWithDebInfo
|
||||
ContinuousIntegration/Enabled = True
|
||||
|
||||
[BlueprintSettings]
|
||||
# don't try to pip install on the ci
|
||||
python-modules.ignored = True
|
||||
binary/mysql.ignored = True
|
||||
|
||||
libs/qt5.version = 5.9.3
|
||||
libs/qt5.version = ${Variables:QtVersion}
|
||||
win32libs/openssl.version = ${Variables:OpenSslVersion}
|
||||
craft/craft-core.version = master
|
||||
|
||||
[windows-msvc2017_64-cl]
|
||||
|
||||
10
appveyor.yml
@@ -3,6 +3,7 @@ version: '{build}-{branch}'
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- 2.5
|
||||
|
||||
clone_depth: 50
|
||||
|
||||
@@ -20,6 +21,7 @@ install:
|
||||
& cmd /C "git clone -q --depth=1 git://anongit.kde.org/craftmaster.git C:\CraftMaster\CraftMaster 2>&1"
|
||||
|
||||
craft $env:TARGET -i craft
|
||||
craft $env:TARGET --add-blueprint-repository [git]https://github.com/owncloud/craft-blueprints-owncloud.git
|
||||
craft $env:TARGET --install-deps owncloud-client
|
||||
|
||||
build_script:
|
||||
@@ -30,11 +32,6 @@ after_build:
|
||||
- ps: |
|
||||
craft $env:TARGET --src-dir $env:APPVEYOR_BUILD_FOLDER --package owncloud-client
|
||||
|
||||
|
||||
on_finish:
|
||||
- ps: |
|
||||
Get-ChildItem $env:USERPROFILE\.craft\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
craft $env:TARGET --src-dir $env:APPVEYOR_BUILD_FOLDER --test owncloud-client
|
||||
@@ -45,6 +42,3 @@ environment:
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- TARGET: windows-msvc2017_64-cl
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
|
||||
artifacts:
|
||||
- path: binaries/*
|
||||
|
||||
2
binary
@@ -20,7 +20,7 @@
|
||||
<file>resources/lock-https.png</file>
|
||||
<file>resources/lock-https@2x.png</file>
|
||||
<file>resources/account.png</file>
|
||||
<file>resources/more.png</file>
|
||||
<file>resources/more.svg</file>
|
||||
<file>resources/delete.png</file>
|
||||
<file>resources/bell.png</file>
|
||||
</qresource>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#
|
||||
# ecm_add_app_icon(<sources_var>
|
||||
# ICONS <icon> [<icon> [...]]
|
||||
# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.4x
|
||||
# [OUTFILE_BASE <name>]) # Since 5.4x
|
||||
# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.49
|
||||
# [OUTFILE_BASENAME <name>]) # Since 5.49
|
||||
# )
|
||||
#
|
||||
# The given icons, whose names must match the pattern::
|
||||
@@ -27,20 +27,21 @@
|
||||
#
|
||||
# ``SIDEBAR_ICONS`` can be used to add Mac OS X sidebar
|
||||
# icons to the generated iconset. They are used when a folder monitored by the
|
||||
# application is dragged into Finder's sidebar. Since 5.4x.
|
||||
# application is dragged into Finder's sidebar. Since 5.49.
|
||||
#
|
||||
# ``OUTFILE_BASE`` will be used as the basename for the icon file. If
|
||||
# you specify it, the icon file will be called ``<OUTFILE_BASE>.icns`` on Mac OS X
|
||||
# and ``<OUTFILE_BASE>.ico`` on Windows. If you don't specify it, it defaults
|
||||
# to ``<sources_var>.<ext>``. Since 5.4x.
|
||||
# ``OUTFILE_BASENAME`` will be used as the basename for the icon file. If
|
||||
# you specify it, the icon file will be called ``<OUTFILE_BASENAME>.icns`` on Mac OS X
|
||||
# and ``<OUTFILE_BASENAME>.ico`` on Windows. If you don't specify it, it defaults
|
||||
# to ``<sources_var>.<ext>``. Since 5.49.
|
||||
#
|
||||
#
|
||||
# Windows notes
|
||||
# * Icons are compiled into the executable using a resource file.
|
||||
# * Icons may not show up in Windows Explorer if the executable
|
||||
# target does not have the ``WIN32_EXECUTABLE`` property set.
|
||||
# * The tool png2ico is required. See :find-module:`FindPng2Ico`.
|
||||
# * Supported sizes: 16, 32, 48, 64, 128.
|
||||
# * One of the tools png2ico (See :find-module:`FindPng2Ico`) or
|
||||
# icotool (see :find-module:`FindIcoTool`) is required.
|
||||
# * Supported sizes: 16, 24, 32, 48, 64, 128, 256, 512 and 1024.
|
||||
#
|
||||
# Mac OS X notes
|
||||
# * The executable target must have the ``MACOSX_BUNDLE`` property set.
|
||||
@@ -101,7 +102,7 @@ include(CMakeParseArguments)
|
||||
|
||||
function(ecm_add_app_icon appsources)
|
||||
set(options)
|
||||
set(oneValueArgs OUTFILE_BASE)
|
||||
set(oneValueArgs OUTFILE_BASENAME)
|
||||
set(multiValueArgs ICONS SIDEBAR_ICONS)
|
||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
@@ -140,7 +141,7 @@ function(ecm_add_app_icon appsources)
|
||||
|
||||
_ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" "16;32;48;64;128;256;512;1024")
|
||||
if(ARG_SIDEBAR_ICONS)
|
||||
_ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" "sidebar_icons" "16;18;32;36;64")
|
||||
_ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" "sidebar_icons" "16;32;64;128;256")
|
||||
endif()
|
||||
|
||||
set(mac_icons
|
||||
@@ -164,46 +165,41 @@ function(ecm_add_app_icon appsources)
|
||||
endif()
|
||||
|
||||
|
||||
set(windows_icons ${icons_at_16px}
|
||||
${icons_at_32px}
|
||||
${icons_at_48px}
|
||||
${icons_at_64px}
|
||||
${icons_at_128px})
|
||||
if (NOT windows_icons)
|
||||
set(windows_icons_classic ${icons_at_16px}
|
||||
${icons_at_24px}
|
||||
${icons_at_32px}
|
||||
${icons_at_48px}
|
||||
${icons_at_64px}
|
||||
${icons_at_128px})
|
||||
set(windows_icons_modern ${windows_icons_classic}
|
||||
${icons_at_256px}
|
||||
${icons_at_512px}
|
||||
${icons_at_1024px})
|
||||
|
||||
if (NOT (windows_icons_modern OR windows_icons_classic))
|
||||
message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
|
||||
endif()
|
||||
|
||||
if (ARG_OUTFILE_BASE)
|
||||
set (_outfilebasename "${ARG_OUTFILE_BASE}")
|
||||
if (ARG_OUTFILE_BASENAME)
|
||||
set (_outfilebasename "${ARG_OUTFILE_BASENAME}")
|
||||
else()
|
||||
set (_outfilebasename "${appsources}")
|
||||
endif()
|
||||
set (_outfilename "${CMAKE_CURRENT_BINARY_DIR}/${_outfilebasename}")
|
||||
|
||||
if (WIN32 AND windows_icons)
|
||||
if (WIN32 AND (windows_icons_modern OR windows_icons_classic))
|
||||
set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
|
||||
find_package(Png2Ico)
|
||||
find_package(IcoTool)
|
||||
set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
|
||||
|
||||
if (Png2Ico_FOUND)
|
||||
if (Png2Ico_HAS_RCFILE_ARGUMENT)
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
|
||||
COMMAND Png2Ico::Png2Ico
|
||||
ARGS
|
||||
--rcfile "${_outfilename}.rc"
|
||||
"${_outfilename}.ico"
|
||||
${windows_icons}
|
||||
DEPENDS ${windows_icons}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
else()
|
||||
function(create_windows_icon_and_rc command args deps)
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.ico"
|
||||
COMMAND Png2Ico::Png2Ico
|
||||
ARGS "${_outfilename}.ico" ${windows_icons}
|
||||
DEPENDS ${windows_icons}
|
||||
COMMAND ${command}
|
||||
ARGS ${args}
|
||||
DEPENDS ${deps}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
# this bit's a little hacky to make the dependency stuff work
|
||||
@@ -215,10 +211,65 @@ function(ecm_add_app_icon appsources)
|
||||
DEPENDS "${_outfilename}.ico"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (IcoTool_FOUND)
|
||||
list(APPEND icotool_args "-c" "-o" "${_outfilename}.ico")
|
||||
|
||||
# According to https://stackoverflow.com/a/40851713/2886832
|
||||
# Windows always chooses the first icon above 255px, all other ones will be ignored
|
||||
set(maxSize 0)
|
||||
foreach(size 256 512 1024)
|
||||
if(icons_at_${size}px)
|
||||
set(maxSize "${size}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(size 16 32 48 64 128 ${maxSize})
|
||||
if(NOT icons_at_${size}px)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
set(icotool_icon_arg "")
|
||||
if(size STREQUAL "${maxSize}")
|
||||
# maxSize icon needs to be included as raw png
|
||||
list(APPEND icotool_args "-r")
|
||||
endif()
|
||||
|
||||
foreach(icon ${icons_at_${size}px})
|
||||
list(APPEND icotool_args "${icons_at_${size}px}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
create_windows_icon_and_rc(IcoTool::IcoTool "${icotool_args}" "${windows_icons_modern}")
|
||||
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||
|
||||
# standard png2ico has no rcfile argument
|
||||
elseif(Png2Ico_FOUND AND NOT Png2Ico_HAS_RCFILE_ARGUMENT AND windows_icons_classic)
|
||||
set(png2ico_args)
|
||||
list(APPEND png2ico_args "${_outfilename}.ico")
|
||||
list(APPEND png2ico_args "${windows_icons_classic}")
|
||||
|
||||
create_windows_icon_and_rc(Png2Ico::Png2Ico "${png2ico_args}" "${windows_icons_classic}")
|
||||
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||
|
||||
# png2ico from kdewin provides rcfile argument
|
||||
elseif(Png2Ico_FOUND AND windows_icons_classic)
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
|
||||
COMMAND Png2Ico::Png2Ico
|
||||
ARGS
|
||||
--rcfile "${_outfilename}.rc"
|
||||
"${_outfilename}.ico"
|
||||
${windows_icons_classic}
|
||||
DEPENDS ${windows_icons_classic}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||
# else none of the supported tools was found
|
||||
else()
|
||||
message(WARNING "Unable to find the png2ico utility - application will not have an application icon!")
|
||||
message(WARNING "Unable to find the png2ico or icotool utilities or icons in matching sizes - application will not have an application icon!")
|
||||
endif()
|
||||
elseif (APPLE AND mac_icons)
|
||||
# first generate .iconset directory structure, then convert to .icns format using the Mac OS X "iconutil" utility,
|
||||
@@ -247,6 +298,9 @@ function(ecm_add_app_icon appsources)
|
||||
list(APPEND iconset_icons
|
||||
"${_outfilename}.iconset/${type}_${sizename}.png")
|
||||
endmacro()
|
||||
|
||||
# List of supported sizes and filenames taken from:
|
||||
# https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
|
||||
foreach(size 16 32 128 256 512)
|
||||
math(EXPR double_size "2 * ${size}")
|
||||
foreach(file ${icons_at_${size}px})
|
||||
@@ -257,14 +311,25 @@ function(ecm_add_app_icon appsources)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
foreach(size 16 18 32)
|
||||
math(EXPR double_size "2 * ${size}")
|
||||
foreach(file ${sidebar_icons_at_${size}px})
|
||||
copy_icon("${file}" "${size}x${size}" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_${double_size}px})
|
||||
copy_icon("${file}" "${size}x${size}@2x" "sidebar")
|
||||
endforeach()
|
||||
# List of supported sizes and filenames taken from:
|
||||
# https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
|
||||
foreach(file ${sidebar_icons_at_16px})
|
||||
copy_icon("${file}" "16x16" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_32px})
|
||||
copy_icon("${file}" "16x16@2x" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_32px})
|
||||
copy_icon("${file}" "18x18" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_64px})
|
||||
copy_icon("${file}" "18x18@2x" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_128px})
|
||||
copy_icon("${file}" "32x32" "sidebar")
|
||||
endforeach()
|
||||
foreach(file ${sidebar_icons_at_256px})
|
||||
copy_icon("${file}" "32x32@2x" "sidebar")
|
||||
endforeach()
|
||||
|
||||
# generate .icns icon file
|
||||
|
||||
27
cmake/modules/FindIcoTool.cmake
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2017 Vincent Pinon <vpinon@kde.org>
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
|
||||
ecm_find_package_version_check(IcoTool)
|
||||
find_program(IcoTool_EXECUTABLE NAMES icotool)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(IcoTool
|
||||
FOUND_VAR
|
||||
IcoTool_FOUND
|
||||
REQUIRED_VARS
|
||||
IcoTool_EXECUTABLE
|
||||
)
|
||||
mark_as_advanced(IcoTool_EXECUTABLE)
|
||||
|
||||
if (IcoTool_FOUND)
|
||||
if (NOT TARGET IcoTool::IcoTool)
|
||||
add_executable(IcoTool::IcoTool IMPORTED)
|
||||
set_target_properties(IcoTool::IcoTool PROPERTIES
|
||||
IMPORTED_LOCATION "${IcoTool_EXECUTABLE}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(IcoTool PROPERTIES
|
||||
URL "http://www.nongnu.org/icoutils/"
|
||||
DESCRIPTION "Executable that converts a collection of PNG files into a Windows icon file"
|
||||
)
|
||||
@@ -26,6 +26,7 @@ find_path(SQLITE3_INCLUDE_DIR
|
||||
sqlite3.h
|
||||
PATHS
|
||||
${_SQLITE3_INCLUDEDIR}
|
||||
${SQLITE3_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(SQLITE3_LIBRARY
|
||||
@@ -33,6 +34,7 @@ find_library(SQLITE3_LIBRARY
|
||||
sqlite3 sqlite3-0
|
||||
PATHS
|
||||
${_SQLITE3_LIBDIR}
|
||||
${SQLITE3_LIBRARIES}
|
||||
)
|
||||
|
||||
set(SQLITE3_INCLUDE_DIRS
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#
|
||||
# Once done this will define
|
||||
# SPARKLE_FOUND - system has Sparkle
|
||||
# SPARKLE_INCLUDE_DIR - the Sparkle include directory
|
||||
# SPARKLE_LIBRARY - The library needed to use Sparkle
|
||||
# SPARKLE_LIBRARY - The framework needed to use Sparkle
|
||||
# Copyright (c) 2009, Vittorio Giovara <vittorio.giovara@gmail.com>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
@@ -15,9 +14,8 @@
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
|
||||
find_library(SPARKLE_LIBRARY NAMES Sparkle)
|
||||
|
||||
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
|
||||
mark_as_advanced(SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
|
||||
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_LIBRARY)
|
||||
mark_as_advanced(SPARKLE_LIBRARY)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@APPLICATION_EXECUTABLE@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>ownCloud.icns</string>
|
||||
<string>@APPLICATION_EXECUTABLE@.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@APPLICATION_REV_DOMAIN@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
@@ -27,12 +27,47 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MIRALL_VERSION_STRING@</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>(C) 2014-2016 @APPLICATION_VENDOR@</string>
|
||||
<string>(C) 2014-2018 @APPLICATION_VENDOR@</string>
|
||||
<key>SUShowReleaseNotes</key>
|
||||
<false/>
|
||||
<key>LSMinimumBundleVersion</key>
|
||||
<string>10.7.0</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>dsa_pub.pem</string>
|
||||
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>@APPLICATION_REV_DOMAIN@.VIRTUALFILE</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<string>@APPLICATION_VIRTUALFILE_SUFFIX@</string>
|
||||
<key>public.mime-type</key>
|
||||
<string>application/octet-stream</string>
|
||||
</dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>@APPLICATION_EXECUTABLE@ Download Virtual File</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>@APPLICATION_REV_DOMAIN@.VIRTUALFILE</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
!define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe"
|
||||
!define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
|
||||
!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
|
||||
!define APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
|
||||
!define APPLICATION_VIRTUALFILE_FILECLASS "@APPLICATION_EXECUTABLE@.@APPLICATION_VIRTUALFILE_SUFFIX@"
|
||||
!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
|
||||
|
||||
!define CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
|
||||
@@ -100,6 +102,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
!include Library.nsh ;Used by the COM registration for shell extensions
|
||||
!include x64.nsh ;Used to determine the right arch for the shell extensions
|
||||
|
||||
!include ${source_path}/admin/win/nsi/lib/fileassoc.nsh
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Memento selections stored in registry.
|
||||
;-----------------------------------------------------------------------------
|
||||
@@ -385,7 +389,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
|
||||
File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
|
||||
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
|
||||
File "${BUILD_PATH}\bin\libocsync.dll"
|
||||
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}_csync.dll"
|
||||
|
||||
File "${BUILD_PATH}\src\gui\client*.qm"
|
||||
; Make sure only to copy qt, not qt_help, etc
|
||||
@@ -403,6 +407,8 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qico.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
|
||||
; PNG is built in Qt
|
||||
|
||||
SetOutPath "$INSTDIR\sqldrivers"
|
||||
File "${SQLITE_DLL_PATH}\qsqlite.dll"
|
||||
@@ -420,6 +426,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${QT_DLL_PATH}\Qt5Gui.dll"
|
||||
File "${QT_DLL_PATH}\Qt5Network.dll"
|
||||
File "${QT_DLL_PATH}\Qt5PrintSupport.dll"
|
||||
File "${QT_DLL_PATH}\Qt5Svg.dll"
|
||||
File "${QT_DLL_PATH}\Qt5Qml.dll"
|
||||
File "${QT_DLL_PATH}\Qt5Sql.dll"
|
||||
File "${QT_DLL_PATH}\Qt5WebKit.dll"
|
||||
@@ -466,6 +473,9 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
;CSync configs
|
||||
File "${SOURCE_PATH}/sync-exclude.lst"
|
||||
|
||||
;Add file association
|
||||
!insertmacro APP_ASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}" "Virtual File for Remote File" "$INSTDIR\${APPLICATION_EXECUTABLE},0" "Download" "$INSTDIR\${APPLICATION_EXECUTABLE} $\"%1$\""
|
||||
|
||||
SectionEnd
|
||||
|
||||
!ifdef OPTION_SECTION_SC_SHELL_EXT
|
||||
@@ -643,6 +653,9 @@ Section Uninstall
|
||||
|
||||
DeleteRegKey HKCR "${APPLICATION_NAME}"
|
||||
|
||||
;Remove file association
|
||||
!insertmacro APP_UNASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}"
|
||||
|
||||
;Shell extension
|
||||
!ifdef OPTION_SECTION_SC_SHELL_EXT
|
||||
!define LIBRARY_COM
|
||||
|
||||
@@ -7,10 +7,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
|
||||
# Fix sqlite compilation on macOS
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers")
|
||||
# Fix sqlite compilation on MinGW
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
# Fix sqlite compilation on MinGW
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers")
|
||||
|
||||
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)
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
|
||||
#cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@"
|
||||
#cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@"
|
||||
#cmakedefine APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
|
||||
#define APPLICATION_DOTVIRTUALFILE_SUFFIX "." APPLICATION_VIRTUALFILE_SUFFIX
|
||||
|
||||
#cmakedefine ZLIB_FOUND @ZLIB_FOUND@
|
||||
|
||||
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||
#cmakedefine SHAREDIR "@SHAREDIR@"
|
||||
|
||||
#cmakedefine WITH_TESTING 1
|
||||
|
||||
#endif
|
||||
|
||||
2
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
conf.py
|
||||
Makefile
|
||||
@@ -24,7 +24,7 @@ if(SPHINX_FOUND)
|
||||
add_custom_target(doc DEPENDS doc-html COMMENT "Building documentation...")
|
||||
endif(WITH_DOC)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ocdoc/_shared_assets")
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/docs-themes")
|
||||
add_dependencies(doc doc-html-org)
|
||||
add_dependencies(doc doc-html-com)
|
||||
endif()
|
||||
@@ -90,4 +90,4 @@ if(SPHINX_FOUND)
|
||||
${SPHINX_HTMLHELP_DIR} )
|
||||
add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd
|
||||
DEPENDS doc-chm-sphinx )
|
||||
endif(SPHINX_FOUND)
|
||||
endif(SPHINX_FOUND)
|
||||
|
||||
174
doc/Makefile
@@ -1,174 +0,0 @@
|
||||
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " pdf to make PDF files"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
html: html-org
|
||||
|
||||
html-all: html-release html-org html-com
|
||||
|
||||
html-release:
|
||||
$(SPHINXBUILD) -b html -D html_theme='owncloud_release' $(ALLSPHINXOPTS) $(BUILDDIR)/html/release
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/release."
|
||||
|
||||
html-org:
|
||||
$(SPHINXBUILD) -b html -D html_theme='owncloud_org' $(ALLSPHINXOPTS) $(BUILDDIR)/html/org
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/org."
|
||||
|
||||
html-com:
|
||||
$(SPHINXBUILD) -b html -D html_theme='owncloud_com' $(ALLSPHINXOPTS) $(BUILDDIR)/html/com
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/com."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/OwncloudDocumentation.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/OwncloudDocumentation.qhc"
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/OwncloudDocumentation"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/OwncloudDocumentation"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
pdf:
|
||||
$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
|
||||
@echo
|
||||
@echo "build finished. the text files are in $(BUILDDIR)/pdf."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "build finished. the text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
@@ -138,8 +138,8 @@ under the original file name.
|
||||
|
||||
Example: Assume there is a conflict in message.txt because its contents have
|
||||
changed both locally and remotely since the last sync run. The local file with
|
||||
the local changes will be renamed to message_conflict-20160101-153110.txt and
|
||||
the remote file will be downloaded and saved as message.txt.
|
||||
the local changes will be renamed to "message (conflicted copy 2016-01-01 153110).txt"
|
||||
and the remote file will be downloaded and saved as message.txt.
|
||||
|
||||
Conflict files are always created on the client and never on the server.
|
||||
|
||||
@@ -276,9 +276,15 @@ Some system wide file patterns that are used to exclude or ignore files are incl
|
||||
|
||||
By default, the ownCloud Client ignores the following files:
|
||||
|
||||
* Files matched by one of the patterns defined in the Ignored Files Editor
|
||||
* Files containing characters that do not work on certain file systems ``(`\, /, :, ?, *, ", >, <, |`)``.
|
||||
* Files starting with ``._sync_xxxxxxx.db`` and the old format ``.csync_journal.db``, as these files are reserved for journalling.
|
||||
* Files matched by one of the patterns defined in the Ignored Files Editor.
|
||||
* Files starting with ``._sync_*.db*``, ``.sync_*.db*``, ``.csync_journal.db*``, ``.owncloudsync.log*``, as these files are reserved for journalling.
|
||||
* Files with a name longer than 254 characters.
|
||||
* The file ``Desktop.ini`` in the root of a synced folder.
|
||||
* Files matching the pattern ``*_conflict-*`` unless conflict file uploading is enabled.
|
||||
* Files matching the pattern ``*(conflicted copy*`` unless conflict file uploading is enabled.
|
||||
* Windows only: Files containing characters that do not work on typical Windows filesystems ``(`\, /, :, ?, *, ", >, <, |`)``.
|
||||
* Windows only: Files with a trailing space or dot.
|
||||
* Windows only: Filenames that are reserved on Windows.
|
||||
|
||||
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
|
||||
a line in the exclude file starts with the character ``]`` directly followed by
|
||||
|
||||
@@ -13,6 +13,14 @@ desktop client.
|
||||
|
||||
These instructions are updated to work with version |version| of the ownCloud Client.
|
||||
|
||||
|
||||
Compiling via ownBrander
|
||||
------------------------
|
||||
|
||||
If you don't want to go through the trouble of doing all the compile work manually,
|
||||
you can use `ownBrander`_ to create installer images for all platforms.
|
||||
|
||||
|
||||
Getting Source Code
|
||||
-------------------
|
||||
|
||||
@@ -51,8 +59,8 @@ distribution. Make sure the repositories for source packages are enabled.
|
||||
|
||||
3. Follow the :ref:`generic-build-instructions`, starting with step 2.
|
||||
|
||||
Mac OS X
|
||||
--------
|
||||
macOS
|
||||
-----
|
||||
|
||||
In addition to needing XCode (along with the command line tools), developing in
|
||||
the Mac OS X environment requires extra dependencies. You can install these
|
||||
@@ -77,29 +85,23 @@ To set up your build environment for development using HomeBrew_:
|
||||
|
||||
brew tap owncloud/owncloud
|
||||
|
||||
5. Install a Qt5 version with qtwebkit support::
|
||||
5. Install a Qt5 version, ideally from from 5.10.1::
|
||||
|
||||
brew install qt5 --with-qtwebkit
|
||||
brew install qt5
|
||||
|
||||
6. Install any missing dependencies::
|
||||
|
||||
brew install $(brew deps owncloud-client)
|
||||
|
||||
7. Add Qt from brew to the path::
|
||||
7. Install qtkeychain from here: git clone https://github.com/frankosterfeld/qtkeychain.git
|
||||
make sure you make the same install prefix as later while building the client e.g.
|
||||
``-DCMAKE_INSTALL_PREFIX=/Path/to/client/../install``
|
||||
|
||||
export PATH=/usr/local/Cellar/qt5/5.x.y/bin:$PATH
|
||||
8. For compilation of the client, follow the :ref:`generic-build-instructions`.
|
||||
|
||||
Where ``x.y`` is the current version of Qt 5 that brew has installed
|
||||
on your machine.
|
||||
8. Install qtkeychain from here: git clone https://github.com/frankosterfeld/qtkeychain.git
|
||||
make sure you make the same install prefix as later while building the client e.g. -
|
||||
``DCMAKE_INSTALL_PREFIX=/Path/to/client-install``
|
||||
9. Install the Packages_ package creation tool.
|
||||
|
||||
9. For compilation of the client, follow the :ref:`generic-build-instructions`.
|
||||
|
||||
10. Install the Packages_ package creation tool.
|
||||
|
||||
11. In the build directory, run ``admin/osx/create_mac.sh <build_dir> <install_dir>``.
|
||||
10. In the build directory, run ``admin/osx/create_mac.sh <CMAKE_INSTALL_DIR> <build dir> <installer sign identity>``.
|
||||
If you have a developer signing certificate, you can specify
|
||||
its Common Name as a third parameter (use quotes) to have the package
|
||||
signed automatically.
|
||||
@@ -152,7 +154,7 @@ follow `Windows Installer Build (Cross-Compile)`_ instead.
|
||||
|
||||
7. Build the client::
|
||||
|
||||
cmake -G "MinGW Makefiles" ../client
|
||||
cmake -G "MinGW Makefiles" -DNO_SHIBBOLETH=1 ../client
|
||||
mingw32-make
|
||||
|
||||
.. note:: You can try using ninja to build in parallel using
|
||||
@@ -220,16 +222,14 @@ In order to make setup simple, you can use the provided Dockerfile to build your
|
||||
Generic Build Instructions
|
||||
--------------------------
|
||||
|
||||
Compared to previous versions, building the desktop sync client has become easier. Unlike
|
||||
earlier versions, CSync, which is the sync engine library of the client, is now
|
||||
part of the client source repository and not a separate module.
|
||||
|
||||
To build the most up-to-date version of the client:
|
||||
|
||||
1. Clone the latest versions of the client from Git_ as follows::
|
||||
|
||||
git clone git://github.com/owncloud/client.git
|
||||
cd client
|
||||
# master this default, but you can also check out a tag like v2.4.1
|
||||
git checkout master
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
@@ -240,19 +240,18 @@ To build the most up-to-date version of the client:
|
||||
|
||||
3. Configure the client build::
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE="Debug" ..
|
||||
|
||||
.. note:: You must use absolute paths for the ``include`` and ``library``
|
||||
directories.
|
||||
cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DCMAKE_INSTALL_PREFIX=/Users/path/to/client/../install/ -DNO_SHIBBOLETH=1 ..``
|
||||
|
||||
.. note:: You must use absolute paths for the ``include`` and ``library``
|
||||
directories.
|
||||
|
||||
.. note:: On Mac OS X, you need to specify ``-DCMAKE_INSTALL_PREFIX=target``,
|
||||
where ``target`` is a private location, i.e. in parallel to your build
|
||||
dir by specifying ``../install``.
|
||||
|
||||
.. note:: qtkeychain must be compiled with the same prefix e.g ``-DCMAKE_INSTALL_PREFIX=/Users/path/to/client/../install/``
|
||||
|
||||
|
||||
.. note:: On Mac OS X, you need to specify ``-DCMAKE_INSTALL_PREFIX=target``,
|
||||
where ``target`` is a private location, i.e. in parallel to your build
|
||||
dir by specifying ``../install``.
|
||||
|
||||
.. note:: qtkeychain must be compiled with the same prefix e.g ``CMAKE_INSTALL_PREFIX=/Users/path/to/client/install/ .``
|
||||
|
||||
.. note:: Example:: ``cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DCMAKE_INSTALL_PREFIX=/Users/path/to/client/install/ -DNO_SHIBBOLETH=1``
|
||||
|
||||
4. Call ``make``.
|
||||
|
||||
The owncloud binary will appear in the ``bin`` directory.
|
||||
@@ -264,11 +263,10 @@ The following are known cmake parameters:
|
||||
|
||||
* ``QTKEYCHAIN_LIBRARY=/path/to/qtkeychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path/to/qtkeychain/``:
|
||||
Used for stored credentials. When compiling with Qt5, the library is called ``qt5keychain.dylib.``
|
||||
You need to compile QtKeychain with the same Qt version.
|
||||
You need to compile QtKeychain with the same Qt version. If you install QtKeychain into the CMAKE_PREFIX_PATH then you don't need to specify the path manually.
|
||||
* ``WITH_DOC=TRUE``: Creates doc and manpages through running ``make``; also adds install statements,
|
||||
providing the ability to install using ``make install``.
|
||||
* ``CMAKE_PREFIX_PATH=/path/to/Qt5.2.0/5.2.0/yourarch/lib/cmake/``: Builds using Qt5.
|
||||
* ``BUILD_WITH_QT4=ON``: Builds using Qt4 (even if Qt5 is found).
|
||||
* ``CMAKE_PREFIX_PATH=/path/to/Qt5.10.1/5.10.1/yourarch/lib/cmake/``: Builds using that Qt version.
|
||||
* ``CMAKE_INSTALL_PREFIX=path``: Set an install prefix. This is mandatory on Mac OS
|
||||
|
||||
.. _ownCloud repository from OBS: http://software.opensuse.org/download/package?
|
||||
@@ -285,3 +283,4 @@ The following are known cmake parameters:
|
||||
.. _QtKeychain: https://github.com/frankosterfeld/qtkeychain
|
||||
.. _Packages: http://s.sudre.free.fr/Software/Packages/about.html
|
||||
.. _Index of repositories: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/
|
||||
.. _ownBrander: https://doc.owncloud.org/branded_clients/
|
||||
|
||||
292
doc/conf.py
@@ -1,292 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ownCloud Documentation documentation build configuration file, created by
|
||||
# sphinx-quickstart on Mon Oct 22 23:16:40 2012.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.todo']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'ownCloud Client Manual'
|
||||
copyright = u'2013-2016, The ownCloud developers'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2.4.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.4.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build','scripts/*']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
2
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
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
|
||||
# a list of builtin themes.
|
||||
#html_theme = 'bootstrap'
|
||||
html_theme = 'default'
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
html_short_title = "Client Manual"
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# 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,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
html_show_sphinx = False
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'ownCloudClientManual'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'ownCloudClientManual.tex', u'ownCloud Client Manual',
|
||||
u'The ownCloud developers', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
latex_logo = 'logo-blue.pdf'
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('owncloud.1', 'owncloud', u'File synchronisation desktop utility.',
|
||||
[u'The ownCloud developers'], 1),
|
||||
('owncloudcmd.1', 'owncloudcmd', u'Command line ownCloud client tool.',
|
||||
[u'The ownCloud developers'], 1),
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
man_show_urls = True
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'ownCloudClientManual', u'ownCloud Client Manual',
|
||||
u'The ownCloud developers', 'ownCloud', 'The ownCloud Client Manual.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
|
||||
# -- Options for Epub output ---------------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = u'ownCloud Client Manual'
|
||||
epub_author = u'The ownCloud developers'
|
||||
epub_publisher = u'The ownCloud developers'
|
||||
epub_copyright = u'2013-2016, The ownCloud developers'
|
||||
|
||||
# The language of the text. It defaults to the language option
|
||||
# or en if the language is not set.
|
||||
#epub_language = ''
|
||||
|
||||
# The scheme of the identifier. Typical schemes are ISBN or URL.
|
||||
#epub_scheme = ''
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#epub_uid = ''
|
||||
|
||||
# A tuple containing the cover image and cover page html template filenames.
|
||||
#epub_cover = ()
|
||||
|
||||
# HTML files that should be inserted before the pages created by sphinx.
|
||||
# The format is a list of tuples containing the path and title.
|
||||
#epub_pre_files = []
|
||||
|
||||
# HTML files shat should be inserted after the pages created by sphinx.
|
||||
# The format is a list of tuples containing the path and title.
|
||||
#epub_post_files = []
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
#epub_exclude_files = []
|
||||
|
||||
# The depth of the table of contents in toc.ncx.
|
||||
#epub_tocdepth = 3
|
||||
|
||||
# Allow duplicate toc entries.
|
||||
#epub_tocdup = True
|
||||
|
||||
# Include todos?
|
||||
todo_include_todos = True
|
||||
|
||||
rst_epilog = '.. |version| replace:: %s' % version
|
||||
@@ -12,6 +12,7 @@
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
from datetime import datetime
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
@@ -28,7 +29,7 @@ import sys, os
|
||||
extensions = ['sphinx.ext.todo']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/templates']
|
||||
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/docs-themes/templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
@@ -41,7 +42,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'ownCloud Client Manual'
|
||||
copyright = u'2013-2016, The ownCloud developers'
|
||||
copyright = u'2013-{:%Y}, The ownCloud developers'.format(datetime.now())
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -95,7 +96,7 @@ pygments_style = 'sphinx'
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/themes']
|
||||
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/docs-themes/themes']
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
@@ -120,7 +121,7 @@ html_short_title = "Client Manual"
|
||||
# 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,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/static']
|
||||
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/docs-themes/static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
@@ -250,7 +251,7 @@ texinfo_documents = [
|
||||
epub_title = u'ownCloud Client Manual'
|
||||
epub_author = u'The ownCloud developers'
|
||||
epub_publisher = u'The ownCloud developers'
|
||||
epub_copyright = u'2013-2016, The ownCloud developers'
|
||||
epub_copyright = u'2013-{:%Y}, The ownCloud developers'.format(datetime.now())
|
||||
|
||||
# The language of the text. It defaults to the language option
|
||||
# or en if the language is not set.
|
||||
|
||||
@@ -46,6 +46,13 @@ Some interesting values that can be set on the configuration file are:
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``timeout`` | ``300`` | The timeout for network connections in seconds. |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``moveToTrash`` | ``false`` | If non-locally deleted files should be moved to trash instead of deleting them completely. |
|
||||
| | | This option only works on linux |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``showExperimentalOptions`` | ``false`` | Whether to show experimental options that are still undergoing testing in the user interface. |
|
||||
| | | Turning this on does not enable experimental behavior on its own. It does enable user inferface |
|
||||
| | | options that can be used to opt in to experimental features. |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
61
doc/conflicts.rst
Normal file
@@ -0,0 +1,61 @@
|
||||
=========
|
||||
Conflicts
|
||||
=========
|
||||
|
||||
.. index:: conflicts
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The ownCloud desktop client uploads local changes and downloads remote changes.
|
||||
When a file has changed on the local side and on the remote between synchronization
|
||||
runs the client will be unable to resolve the situation on its own. It will
|
||||
create a conflict file with the local version, download the remote version and
|
||||
notify the user that a conflict occured which needs attention.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
Imagine there is a file called ``mydata.txt`` your synchronized folder. It has
|
||||
not changed for a while and contains the text "contents" locally and remotely.
|
||||
Now, nearly at the same time you update it locally to say "local contents" while
|
||||
the file on the server gets updated to contain "remote contents" by someone else.
|
||||
|
||||
When attempting to upload your local changes the desktop client will notice that
|
||||
the server version has also changed. It creates a conflict and you will now have
|
||||
two files on your local machine:
|
||||
|
||||
- ``mydata.txt`` containing "remote contents"
|
||||
- ``mydata (conflicted copy 2018-04-10 093612).txt`` containing "local contents"
|
||||
|
||||
In this situation the file ``mydata.txt`` has the remote changes (and will continue
|
||||
to be updated with further remote changes when they happen), but your local
|
||||
adjustments have not been sent to the server (unless the server enables conflict
|
||||
uploading, see below).
|
||||
|
||||
The desktop client notifies you of this situation via system notifications, the
|
||||
system tray icon and a yellow "unresolved conflicts" badge in the account settings
|
||||
window. Clicking this badge shows a list that includes the unresolved conflicts
|
||||
and clicking one of them opens an explorer window pointing at the relevant file.
|
||||
|
||||
To resolve this conflict, open both files, compare the differences and copy your
|
||||
local changes from the "conflicted copy" file into the base file where applicable.
|
||||
In this example you might change ``mydata.txt`` to say "local and remote contents"
|
||||
and delete the file with "conflicted copy" in its name. With that, the conflict
|
||||
is resolved.
|
||||
|
||||
Uploading conflicts (experimental)
|
||||
----------------------------------
|
||||
|
||||
By default the conflict file (the file with "conflicted copy" in its name that
|
||||
contains your local conflicting changes) is not uploaded to the server. The idea
|
||||
is that you, the author of the changes, are the best person for resolving the
|
||||
conflict and showing the conflict to other users might create confusion.
|
||||
|
||||
However, in some scenarios it makes a lot of sense to upload these conflicting
|
||||
changes such that local work can become visible even if the conflict won't be
|
||||
resolved immediately.
|
||||
|
||||
In the future there might be a server-wide switch for this behavior. For now it
|
||||
can already be tested by setting the environment variable
|
||||
``OWNCLOUD_UPLOAD_CONFLICT_FILES=1``.
|
||||
1
doc/docs-themes
Submodule
53
doc/faq.rst
@@ -21,6 +21,59 @@ When a deeply nested directory is excluded from synchronization it will be
|
||||
listed with other ignored files and directories in the "Not synced" tab of
|
||||
the "Activity" pane.
|
||||
|
||||
I See a Warning Message for Unsupported Versions.
|
||||
-------------------------------------------------
|
||||
|
||||
Keeping software up to date is crucial for file integrity and security – if
|
||||
software is outdated, there can be unfixed bugs. That’s why you should always
|
||||
upgrade your software when there is a new version.
|
||||
|
||||
The ownCloud Desktop Client talks to a server, e.g. the ownCloud server – so
|
||||
you don’t only have to upgrade your client when there is a new version for it,
|
||||
also the server has to be kept up-to-date by your sysadmin.
|
||||
|
||||
Starting with version 2.5.0, the client will show a warning message if you
|
||||
connect to an outdated or unsupported server:
|
||||
|
||||
.. image:: https://owncloud.org/wp-content/uploads/2018/09/ownCloud-unsupported-version-warning-message.png
|
||||
|
||||
**Because earlier versions are not maintained anymore, only ownCloud 10.0.0 or
|
||||
higher is supported.** So if you encounter such a message, you should ask your
|
||||
administrator to upgrade ownCloud to a secure version.
|
||||
|
||||
An important feature of the ownCloud Client is checksumming – each time you
|
||||
download or upload a file, the client and the server both check if the file was
|
||||
corrupted during the sync. This way you can be sure that you don’t lose any
|
||||
files.
|
||||
|
||||
There are servers out there which don’t have checksumming implemented on their
|
||||
side, or which are not tested by ownCloud’s QA team. They can’t ensure file
|
||||
integrity, they have potential security issues, and we can’t guarantee that
|
||||
they are compatible with the ownCloud Desktop Client.
|
||||
|
||||
**We care about your data and want it to be safe.** That’s why you see this warning
|
||||
message, so you can evaluate your data security. Don’t worry – you can still
|
||||
use the client with an unsupported server, but do so at your own risk.
|
||||
|
||||
There Was A Warning About Changes In Synchronized Folders Not Being Tracked Reliably.
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
On linux when the synchronized folder contains very many subfolders the
|
||||
operating system may not allow for enough inotify watches to monitor the
|
||||
changes in all of them.
|
||||
|
||||
In this case the client will not be able to immediately start the
|
||||
synchronization process when a file in one of the unmonitored folders changes.
|
||||
Instead, the client will show the warning and manually scan folders for changes
|
||||
in a regular interval (two hours by default).
|
||||
|
||||
This problem can be solved by setting the fs.inotify.max_user_watches
|
||||
sysctl to a higher value. This can usually be done either temporarily::
|
||||
|
||||
echo 524288 > /proc/sys/fs/inotify/max_user_watches
|
||||
|
||||
or permanently by adjusting ``/etc/sysctl.conf``.
|
||||
|
||||
I Want To Move My Local Sync Folder
|
||||
-----------------------------------
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 66 KiB |
@@ -9,6 +9,7 @@ ownCloud Desktop Client Manual
|
||||
introduction
|
||||
installing
|
||||
navigating
|
||||
conflicts
|
||||
advancedusage
|
||||
autoupdate
|
||||
building
|
||||
@@ -16,4 +17,4 @@ ownCloud Desktop Client Manual
|
||||
troubleshooting
|
||||
faq
|
||||
glossary
|
||||
|
||||
|
||||
|
||||
@@ -2,77 +2,203 @@
|
||||
Installing the Desktop Synchronization Client
|
||||
=============================================
|
||||
|
||||
You can download the latest version of the ownCloud Desktop Synchronization
|
||||
Client from the `ownCloud download page`_.
|
||||
There are clients for Linux, Mac OS X, and Microsoft Windows.
|
||||
You can download the latest version of the ownCloud Desktop Synchronization Client from the `ownCloud download page`_.
|
||||
There are clients for *Linux*, *macOS*, and *Microsoft Windows*.
|
||||
|
||||
Installation on Mac OS X and Windows is the same as for any software
|
||||
application: download the program and then double-click it to launch the
|
||||
installation, and then follow the installation wizard. After it is installed and
|
||||
configured the sync client will automatically keep itself updated; see
|
||||
:doc:`autoupdate` for more information.
|
||||
Installation on Mac OS X and Windows is the same as for any software application: download the program and then double-click it to launch the installation, and then follow the installation wizard.
|
||||
After it is installed and configured the sync client will automatically keep itself updated; see :doc:`autoupdate` for more information.
|
||||
|
||||
Linux users must follow the instructions on the download page to add the
|
||||
appropriate repository for their Linux distribution, install the signing key,
|
||||
and then use their package managers to install the desktop sync client. Linux
|
||||
users will also update their sync clients via package manager, and the client
|
||||
will display a notification when an update is available.
|
||||
Linux users must follow the instructions on the download page to add the appropriate repository for their Linux distribution, install the signing key, and then use their package managers to install the desktop sync client.
|
||||
Linux users will also update their sync clients via package manager, and the client will display a notification when an update is available.
|
||||
|
||||
Linux users must also have a password manager enabled, such as GNOME Keyring or
|
||||
KWallet, so that the sync client can login automatically.
|
||||
Linux users must also have a password manager enabled, such as `GNOME Keyring`_ or `KWallet`_, so that the sync client can login automatically.
|
||||
|
||||
You will also find links to source code archives and older versions on the
|
||||
download page.
|
||||
You will also find links to source code archives and older versions on the download page.
|
||||
|
||||
System Requirements
|
||||
----------------------------------
|
||||
-------------------
|
||||
|
||||
- Windows 7+
|
||||
- Mac OS X 10.7+ (**64-bit only**)
|
||||
- CentOS 6 & 7 (64-bit only)
|
||||
- Debian 7.0 & 8.0 & 9.0
|
||||
- Fedora 24 & 25 & 26
|
||||
- Ubuntu 16.04 & 16.10 & 17.04
|
||||
- openSUSE Leap 42.1 & 42.2 & 42.3
|
||||
- Debian 8.0 & 9.0
|
||||
- Fedora 25 & 26 & 27
|
||||
- Ubuntu 16.04 & 17.04 & 17.10
|
||||
- openSUSE Leap 42.2 & 42.3
|
||||
|
||||
.. note::
|
||||
For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous `LTS`_.
|
||||
For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous Ubuntu `LTS`_.
|
||||
|
||||
Customizing the Windows installation
|
||||
------------------------------------
|
||||
|
||||
If you just want to install ownCloud Desktop Synchronization Client on your local system, you can simply launch the .msi file and configure it in the wizard that pops up.
|
||||
|
||||
Features
|
||||
^^^^^^^^
|
||||
|
||||
The MSI installer provides several features that can be installed or removed individually, which you can also control via command-line, if you are automating the installation, then run the following command:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi
|
||||
|
||||
The command will install the ownCloud Desktop Synchronization Client into the default location with the default features enabled.
|
||||
If you want to disable, e.g., desktop shortcut icons you can simply change the above command to the following:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi REMOVE=DesktopShortcut
|
||||
|
||||
See the following table for a list of available features:
|
||||
|
||||
+--------------------+--------------------+----------------------------------+-----------------------------+
|
||||
| Feature | Enabled by default | Description |Property to disable |
|
||||
+====================+====================+==================================+=============================+
|
||||
| Client | Yes, required | The actual client | |
|
||||
+--------------------+--------------------+----------------------------------+-----------------------------+
|
||||
| DesktopShortcut | Yes | Adds a shortcut to the desktop |``NO_DESKTOP_SHORTCUT`` |
|
||||
+--------------------+--------------------+----------------------------------+-----------------------------+
|
||||
| StartMenuShortcuts | Yes | Adds shortcuts to the start menu |``NO_START_MENU_SHORTCUTS``|
|
||||
+--------------------+--------------------+----------------------------------+-----------------------------+
|
||||
| ShellExtensions | Yes | Adds Explorer integration |``NO_SHELL_EXTENSIONS`` |
|
||||
+--------------------+--------------------+----------------------------------+-----------------------------+
|
||||
|
||||
Installation
|
||||
~~~~~~~~~~~~
|
||||
|
||||
You can also choose to only install the client itself by using the following command:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi ADDDEFAULT=Client
|
||||
|
||||
If you for instance want to install everything but the ``DesktopShortcut`` and the ``ShellExtensions`` feature, you have two possibilities:
|
||||
|
||||
1. You explicitly name all the features you actually want to install (whitelist) where ``Client`` is always installed anyway:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi ADDDEFAULT=StartMenuShortcuts
|
||||
|
||||
2. You pass the ``NO_DESKTOP_SHORTCUT`` and ``NO_SHELL_EXTENSIONS`` properties:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi NO_DESKTOP_SHORTCUT="1" NO_SHELL_EXTENSIONS="1"
|
||||
|
||||
.. note:: The ownCloud .msi remembers these properties, so you don't need to specify them on upgrades.
|
||||
|
||||
.. note:: You cannot use these to change the installed features, if you want to do that, see the next section.
|
||||
|
||||
Changing Installed Features
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can change the installed features later by using ``REMOVE`` and ``ADDDEFAULT`` properties.
|
||||
|
||||
1. If you want to add the desktop shortcut later, run the following command:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi ADDDEFAULT="DesktopShortcut"
|
||||
|
||||
2. If you want to remove it, simply run the following command:
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi REMOVE="DesktopShortcut"
|
||||
|
||||
Windows keeps track of the installed features and using ``REMOVE`` or ``ADDDEFAULT`` will only affect the mentioned features.
|
||||
|
||||
Compare `REMOVE <https://msdn.microsoft.com/en-us/library/windows/desktop/aa371194(v=vs.85).aspx>`_ and `ADDDEFAULT <https://msdn.microsoft.com/en-us/library/windows/desktop/aa367518(v=vs.85).aspx>`_ on the Windows Installer Guide.
|
||||
|
||||
.. note:: You cannot specify `REMOVE` on initial installation as it will disable all features.
|
||||
|
||||
Installation Folder
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can adjust the installation folder by specifying the ``INSTALLDIR`` property like this
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi INSTALLDIR="C:\Program Files (x86)\Non Standard ownCloud Client Folder"
|
||||
|
||||
Be careful when using PowerShell instead of ``cmd.exe``, it can be tricky to get the whitespace escaping right there.
|
||||
Specifying the ``INSTALLDIR`` like this only works on first installation, you cannot simply re-invoke the .msi with a different path.
|
||||
If you still need to change it, uninstall it first and reinstall it with the new path.
|
||||
|
||||
Disabling Automatic Updates
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To disable automatic updates, you can pass the ``SKIPAUTOUPDATE`` property.
|
||||
|
||||
::
|
||||
|
||||
msiexec /passive /i ownCloud-x.y.z.msi SKIPAUTOUPDATE="1"
|
||||
|
||||
Launch After Installation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To launch the client automatically after installation, you can pass the ``LAUNCH`` property.
|
||||
|
||||
::
|
||||
|
||||
msiexec /i ownCloud-x.y.z.msi LAUNCH="1"
|
||||
|
||||
This option also removes the checkbox to let users decide if they want to launch the client for non passive/quiet mode.
|
||||
|
||||
.. note:: This option does not have any effect without GUI.
|
||||
|
||||
No Reboot After Installation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The ownCloud Client schedules a reboot after installation to make sure the Explorer extension is correctly (un)loaded.
|
||||
If you're taking care of the reboot yourself, you can set the ``REBOOT`` property
|
||||
|
||||
::
|
||||
|
||||
msiexec /i ownCloud-x.y.z.msi REBOOT=ReallySuppress
|
||||
|
||||
This will make `msiexec` exit with error `ERROR_SUCCESS_REBOOT_REQUIRED` (3010).
|
||||
If your deployment tooling interprets this as an actual error and you want to avoid that, you may want to set the ``DO_NOT_SCHEDULE_REBOOT`` instead
|
||||
|
||||
::
|
||||
|
||||
msiexec /i ownCloud-x.y.z.msi DO_NOT_SCHEDULE_REBOOT="1"
|
||||
|
||||
Installation Wizard
|
||||
-------------------
|
||||
|
||||
The installation wizard takes you step-by-step through configuration options and
|
||||
account setup. First you need to enter the URL of your ownCloud server.
|
||||
The installation wizard takes you step-by-step through configuration options and account setup.
|
||||
First you need to enter the URL of your ownCloud server.
|
||||
|
||||
.. image:: images/client-1.png
|
||||
:alt: form for entering ownCloud server URL
|
||||
|
||||
|
||||
Enter your ownCloud login on the next screen.
|
||||
|
||||
.. image:: images/client-2.png
|
||||
:alt: form for entering your ownCloud login
|
||||
|
||||
On the Local Folder Option screen you may sync
|
||||
all of your files on the ownCloud server, or select individual folders. The
|
||||
default local sync folder is ``ownCloud``, in your home directory. You may
|
||||
change this as well.
|
||||
On the *"Local Folder Option"* screen you may sync all of your files on the ownCloud server, or select individual folders.
|
||||
The default local sync folder is ``ownCloud``, in your home directory.
|
||||
You may change this as well.
|
||||
|
||||
.. image:: images/client-3.png
|
||||
:alt: Select which remote folders to sync, and which local folder to store
|
||||
:alt: Select which remote folders to sync, and which local folder to store
|
||||
them in.
|
||||
|
||||
When you have completed selecting your sync folders, click the Connect button
|
||||
at the bottom right. The client will attempt to connect to your ownCloud
|
||||
server, and when it is successful you'll see two buttons: one to connect to
|
||||
your ownCloud Web GUI, and one to open your local folder. It will also start
|
||||
synchronizing your files.
|
||||
|
||||
.. image:: images/client-4.png
|
||||
:alt: A successful server connection, showing a button to connect to your
|
||||
Web GUI, and one to open your local ownCloud folder
|
||||
When you have completed selecting your sync folders, click the *"Connect"* button at the bottom right.
|
||||
The client will attempt to connect to your ownCloud server, and when it is successful you'll see two buttons:
|
||||
|
||||
Click the Finish button, and you're all done.
|
||||
- one to connect to your ownCloud Web GUI
|
||||
- one to open your local folder
|
||||
|
||||
It will also start synchronizing your files.
|
||||
|
||||
.. Links
|
||||
|
||||
|
||||
.. _ownCloud download page: https://owncloud.com/download/#desktop-clients
|
||||
.. _LTS: https://wiki.ubuntu.com/LTS
|
||||
.. _GNOME Keyring: https://wiki.gnome.org/Projects/GnomeKeyring/
|
||||
.. _KWallet: https://utils.kde.org/projects/kwalletmanager/
|
||||
|
||||
@@ -23,11 +23,3 @@ The |version| release of the ownCloud desktop sync client has many new features
|
||||
improvements. (See the `complete changelog
|
||||
<https://owncloud.org/changelog/desktop/>`_.)
|
||||
|
||||
* Show server notifications on the client
|
||||
* Improved sync speed
|
||||
* Improved handling of Win32 file locks and network files
|
||||
* Improved user notifications about ignored files and conflicts
|
||||
* Add warnings for old server versions
|
||||
* Update of QtKeyChain to support Windows credential store
|
||||
* Packaging of dolphin overlay icon module for bleeding edge distributions
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Using the Synchronization Client
|
||||
.. index:: navigating, usage
|
||||
|
||||
The ownCloud Desktop Client remains in the background and is visible as an icon
|
||||
in the system tray (Windows, KDE), status bar (Mac OS X), or notification area
|
||||
in the system tray (Windows, KDE), menu bar (macOS), or notification area
|
||||
(Linux).
|
||||
|
||||
.. figure:: images/icon.png
|
||||
|
||||
@@ -24,7 +24,9 @@ The other options are:
|
||||
``--logflush``
|
||||
Clears (flushes) the log file after each write action.
|
||||
|
||||
``--logdebug``
|
||||
Also output debug-level messages in the log (equivalent to setting the env var QT_LOGGING_RULES="qt.*=true;*.debug=true").
|
||||
)
|
||||
|
||||
``--confdir`` `<dirname>`
|
||||
Uses the specified configuration directory.
|
||||
|
||||
|
||||
|
||||
@@ -107,14 +107,25 @@ Log Files
|
||||
|
||||
Effectively debugging software requires as much relevant information as can be
|
||||
obtained. To assist the ownCloud support personnel, please try to provide as
|
||||
many relevant logs as possible. Log output can help with tracking down
|
||||
many relevant logs as possible. Log output can help with tracking down
|
||||
problems and, if you report a bug, log output can help to resolve an issue more
|
||||
quickly.
|
||||
|
||||
The client log file is often the most helpful log to provide.
|
||||
|
||||
Obtaining the Client Log File
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To obtain the client log file:
|
||||
There are several ways to produce log files. The most commonly useful is enabling
|
||||
logging to a temporary directory, described first.
|
||||
|
||||
Note: Client log files contain file and folder names, metadata, server urls and
|
||||
other private information. Only upload them if you are comfortable sharing the
|
||||
information. Logs are often essential for tracking down a problem though, so
|
||||
please consider providing them to developers privately.
|
||||
|
||||
Logging to a Temporary Directory
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. Open the ownCloud Desktop Client.
|
||||
|
||||
@@ -124,37 +135,22 @@ To obtain the client log file:
|
||||
|
||||
.. image:: images/log_output_window.png
|
||||
|
||||
3. Click the 'Save' button.
|
||||
3. Enable the 'Permanently save logs' checkbox.
|
||||
|
||||
The Save Log File window opens.
|
||||
4. Look at its tooltip and take note of the directory the logs will be saved to.
|
||||
|
||||
.. image:: images/save_log_file.png
|
||||
5. Navigate to this directory.
|
||||
|
||||
4. Migrate to a location on your system where you want to save your log file.
|
||||
6. Select the logs for the timeframe in which the issue occurred.
|
||||
|
||||
5. Name the log file and click the 'Save' button.
|
||||
|
||||
The log file is saved in the location specified.
|
||||
|
||||
Alternatively, you can launch the ownCloud Log Output window using the
|
||||
``--logwindow`` command. After issuing this command, the Log Output window
|
||||
opens to show the current log. You can then follow the same procedures
|
||||
mentioned above to save the log to a file.
|
||||
|
||||
.. note:: You can also open a log window for an already running session, by
|
||||
restarting the client using the following command:
|
||||
|
||||
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
||||
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
||||
* Linux: ``owncloud --logwindow``
|
||||
Note that the choice to enable logging will be persist across client restarts.
|
||||
|
||||
Saving Files Directly
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The ownCloud client enables you to save log files directly to a predefined file
|
||||
or directory. This is a useful option for troubleshooting sporadic issues as
|
||||
it enables you to log large amounts of data and bypasses the limited buffer
|
||||
settings associated with the log window.
|
||||
The ownCloud client allows you to save log files directly to a custom file
|
||||
or directory. This is a useful option for easily reproducible problems, as well
|
||||
as for cases where you want logs to be saved to a different location.
|
||||
|
||||
To save log files to a file or a directory:
|
||||
|
||||
@@ -170,6 +166,8 @@ the amount of data that accumulates over time, you can specify the
|
||||
the client automatically erases saved log data in the directory that is older
|
||||
than the specified number of hours.
|
||||
|
||||
Adding the ``--logdebug`` flag increases the verbosity of the generated log files.
|
||||
|
||||
As an example, to define a test where you keep log data for two days, you can
|
||||
issue the following command:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ if(SPHINX_FOUND)
|
||||
set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1")
|
||||
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL)
|
||||
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
|
||||
-c ${CMAKE_SOURCE_DIR}/doc -b man
|
||||
-c ${CMAKE_BINARY_DIR}/doc -b man
|
||||
-d ${SPHINX_CACHE_DIR}/man
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_MAN_DIR} )
|
||||
|
||||
@@ -8,185 +8,7 @@ GenericName=Folder Sync
|
||||
Icon=@APPLICATION_EXECUTABLE@
|
||||
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||
X-GNOME-Autostart-Delay=3
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
MimeType=application/vnd.@APPLICATION_EXECUTABLE@;
|
||||
|
||||
# Translations
|
||||
|
||||
@@ -196,187 +18,195 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
# Translations
|
||||
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
Name[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
Icon[oc]=@APPLICATION_EXECUTABLE@
|
||||
Name[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
Comment[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
|
||||
GenericName[ar]=مزامنة المجلد
|
||||
Name[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
|
||||
Icon[ar]=@APPLICATION_EXECUTABLE@
|
||||
Name[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
|
||||
GenericName[ar]=مزامنة المجلد
|
||||
Comment[bg_BG]=@APPLICATION_NAME@ клиент за десктоп синхронизация
|
||||
GenericName[bg_BG]=Синхронизиране на папката
|
||||
Name[bg_BG]=@APPLICATION_NAME@ клиент десктоп синхронизация
|
||||
Icon[bg_BG]=@APPLICATION_EXECUTABLE@
|
||||
Name[bg_BG]=@APPLICATION_NAME@ клиент десктоп синхронизация
|
||||
GenericName[bg_BG]=Синхронизиране на папката
|
||||
Comment[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
|
||||
GenericName[ca]=Sincronització de carpetes
|
||||
Name[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
|
||||
Icon[ca]=@APPLICATION_EXECUTABLE@
|
||||
Name[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
|
||||
GenericName[ca]=Sincronització de carpetes
|
||||
Comment[da]=@APPLICATION_NAME@ skrivebordsklient til synkronisering
|
||||
GenericName[da]=Mappesynkronisering
|
||||
Name[da]=@APPLICATION_NAME@ skrivebordsklient til synk
|
||||
Icon[da]=@APPLICATION_EXECUTABLE@
|
||||
Name[da]=@APPLICATION_NAME@ skrivebordsklient til synk
|
||||
GenericName[da]=Mappesynkronisering
|
||||
Comment[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de]=Ordner-Synchronisation
|
||||
Name[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
Icon[de]=@APPLICATION_EXECUTABLE@
|
||||
Name[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de]=Ordner-Synchronisation
|
||||
Comment[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
|
||||
GenericName[ja_JP]=フォルダー同期
|
||||
Name[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
|
||||
Icon[ja_JP]=@APPLICATION_EXECUTABLE@
|
||||
Name[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
|
||||
GenericName[ja_JP]=フォルダー同期
|
||||
Comment[el]=@ΟΝΟΜΑ_ΕΦΑΡΜΟΓΗΣ@ συγχρονισμός επιφάνειας εργασίας πελάτη
|
||||
GenericName[el]=Συγχρονισμός φακέλου
|
||||
Name[el]=@ΟΝΟΜΑ_ΕΦΑΡΜΟΓΗΣ@ συγχρονισμός επιφάνειας εργασίας πελάτη
|
||||
Icon[el]=@APPLICATION_EXECUTABLE@
|
||||
Name[el]=@ΟΝΟΜΑ_ΕΦΑΡΜΟΓΗΣ@ συγχρονισμός επιφάνειας εργασίας πελάτη
|
||||
GenericName[el]=Συγχρονισμός φακέλου
|
||||
Comment[en_GB]=@APPLICATION_NAME@ desktop synchronisation client
|
||||
GenericName[en_GB]=Folder Sync
|
||||
Name[en_GB]=@APPLICATION_NAME@ desktop sync client
|
||||
Icon[en_GB]=@APPLICATION_EXECUTABLE@
|
||||
Name[en_GB]=@APPLICATION_NAME@ desktop sync client
|
||||
GenericName[en_GB]=Folder Sync
|
||||
Comment[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
|
||||
GenericName[es]=Sincronización de carpeta
|
||||
Name[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
|
||||
Icon[es]=@APPLICATION_EXECUTABLE@
|
||||
Name[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
|
||||
GenericName[es]=Sincronización de carpeta
|
||||
Comment[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de_DE]=Ordner-Synchronisation
|
||||
Name[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
Icon[de_DE]=@APPLICATION_EXECUTABLE@
|
||||
Name[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de_DE]=Ordner-Synchronisation
|
||||
Comment[eu]=@APPLICATION_NAME@ mahaigaineko sinkronizazio bezeroa
|
||||
GenericName[eu]=Karpetaren sinkronizazioa
|
||||
Name[eu]=@APPLICATION_NAME@ mahaigaineko sinkronizazio bezeroa
|
||||
Icon[eu]=@APPLICATION_EXECUTABLE@
|
||||
GenericName[fa]=همسان سازی پوشهها
|
||||
Name[fa]=@APPLICATION_EXECUTABLE@ نسخهی همسان سازی مشتری
|
||||
Name[eu]=@APPLICATION_NAME@ mahaigaineko sinkronizazio bezeroa
|
||||
GenericName[eu]=Karpetaren sinkronizazioa
|
||||
Icon[fa]=@APPLICATION_EXECUTABLE@
|
||||
Comment[fr]=Synchronisez vos dossiers avec un serveur @APPLICATION_NAME@
|
||||
GenericName[fr]=Synchronisation de dossier
|
||||
Name[fr]=Client de synchronisation @APPLICATION_NAME@
|
||||
Name[fa]=@APPLICATION_EXECUTABLE@ نسخهی همسان سازی مشتری
|
||||
GenericName[fa]=همسان سازی پوشهها
|
||||
Comment[fr]=Client de synchronisation @APPLICATION_NAME@
|
||||
Icon[fr]=@APPLICATION_EXECUTABLE@
|
||||
Name[fr]=Client de synchronisation @APPLICATION_NAME@
|
||||
GenericName[fr]=Synchronisation de dossier
|
||||
Comment[gl]=@APPLICATION_NAME@ cliente de sincronización para escritorio
|
||||
GenericName[gl]=Sincronizar Cartafol
|
||||
Name[gl]=@APPLICATION_NAME@ cliente de sincronización para escritorio
|
||||
Icon[gl]=@APPLICATION_EXECUTABLE@
|
||||
Name[gl]=@APPLICATION_NAME@ cliente de sincronización para escritorio
|
||||
GenericName[gl]=Sincronizar Cartafol
|
||||
Comment[he]=@APPLICATION_NAME@ לקוח סנכון שולחן עבודה
|
||||
GenericName[he]=סנכון תיקייה
|
||||
Name[he]=@APPLICATION_NAME@ לקוח סנכרון שולחן עבודה
|
||||
Icon[he]=@APPLICATION_EXECUTABLE@
|
||||
Name[he]=@APPLICATION_NAME@ לקוח סנכרון שולחן עבודה
|
||||
GenericName[he]=סנכון תיקייה
|
||||
Comment[ia]=@APPLICATION_NAME@ cliente de synchronisation pro scriptorio
|
||||
GenericName[ia]=Synchronisar Dossier
|
||||
Name[ia]=@APPLICATION_NAME@ cliente de synchronisation pro scriptorio
|
||||
Icon[ia]=@APPLICATION_EXECUTABLE@
|
||||
Name[ia]=@APPLICATION_NAME@ cliente de synchronisation pro scriptorio
|
||||
GenericName[ia]=Synchronisar Dossier
|
||||
Comment[id]=Klien sinkronisasi desktop @APPLICATION_NAME@
|
||||
GenericName[id]=Folder Sync
|
||||
Name[id]=Klien sync desktop @APPLICATION_NAME@
|
||||
Icon[id]=@APPLICATION_EXECUTABLE@
|
||||
Name[id]=Klien sync desktop @APPLICATION_NAME@
|
||||
GenericName[id]=Folder Sync
|
||||
Comment[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
|
||||
GenericName[is]=Samstilling möppu
|
||||
Name[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
|
||||
Icon[is]=@APPLICATION_EXECUTABLE@
|
||||
Name[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
|
||||
GenericName[is]=Samstilling möppu
|
||||
Comment[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
|
||||
GenericName[it]=Sincronizzazione cartella
|
||||
Name[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
|
||||
Icon[it]=@APPLICATION_EXECUTABLE@
|
||||
Name[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
|
||||
GenericName[it]=Sincronizzazione cartella
|
||||
Comment[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
GenericName[ko]=폴더 동기화
|
||||
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
Icon[ko]=@APPLICATION_EXECUTABLE@
|
||||
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
GenericName[ko]=폴더 동기화
|
||||
Comment[lo]=@APPLICATION_NAME@ ການປະສານຂໍ້ມູນຄອມພິວເຕີລູກຂ່າຍ
|
||||
Icon[lo]=@APPLICATION_EXECUTABLE@
|
||||
Name[lo]=@APPLICATION_NAME@ ຊິງຄອມພິວເຕີລູກຂ່າຍ
|
||||
GenericName[lo]=ໂຟນເດີຊິງ
|
||||
Comment[mk]=@APPLICATION_NAME@ десктор клиент за синхронизација
|
||||
Icon[mk]=@APPLICATION_EXECUTABLE@
|
||||
Name[mk]=@APPLICATION_NAME@ десктор клиент за синхронизација
|
||||
GenericName[mk]=Папка за синхронизација
|
||||
Comment[hu_HU]=@APPLICATION_NAME@ asztali szinkronizációs kliens
|
||||
GenericName[hu_HU]=Könyvtár szinkronizálás
|
||||
Name[hu_HU]=@APPLICATION_NAME@ asztali szinkr. kliens
|
||||
Icon[hu_HU]=@APPLICATION_EXECUTABLE@
|
||||
Name[hu_HU]=@APPLICATION_NAME@ asztali szinkronizációs kliens
|
||||
GenericName[hu_HU]=Mappaszinkronizálás
|
||||
Comment[af_ZA]=@APPLICATION_NAME@ werkskermsinchroniseerkliënt
|
||||
GenericName[af_ZA]=Vouersinchronisering
|
||||
Name[af_ZA]=@APPLICATION_NAME@ werkskermsinchroniseerkliënt
|
||||
Icon[af_ZA]=@APPLICATION_EXECUTABLE@
|
||||
Name[af_ZA]=@APPLICATION_NAME@ werkskermsinchroniseerkliënt
|
||||
GenericName[af_ZA]=Vouersinchronisering
|
||||
Comment[nl]=@APPLICATION_NAME@ desktop synchronisatie client
|
||||
GenericName[nl]=Mappen sync
|
||||
Name[nl]=@APPLICATION_NAME@ desktop sync client
|
||||
Icon[nl]=@APPLICATION_EXECUTABLE@
|
||||
Name[nl]=@APPLICATION_NAME@ desktop sync client
|
||||
GenericName[nl]=Mappen sync
|
||||
Comment[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
|
||||
GenericName[et_EE]=Kaustade sünkroonimine
|
||||
Name[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
|
||||
Icon[et_EE]=@APPLICATION_EXECUTABLE@
|
||||
Name[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
|
||||
GenericName[et_EE]=Kaustade sünkroonimine
|
||||
Comment[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
|
||||
GenericName[pl]=Folder Synchronizacji
|
||||
Name[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
|
||||
Icon[pl]=@APPLICATION_EXECUTABLE@
|
||||
Name[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
|
||||
GenericName[pl]=Folder Synchronizacji
|
||||
Comment[pt_BR]=@APPLICATION_NAME@ cliente de sincronização do computador
|
||||
GenericName[pt_BR]=Sincronização de Pasta
|
||||
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização de desktop
|
||||
Icon[pt_BR]=@APPLICATION_EXECUTABLE@
|
||||
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização de desktop
|
||||
GenericName[pt_BR]=Sincronização de Pasta
|
||||
Comment[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
|
||||
GenericName[cs_CZ]=Synchronizace adresáře
|
||||
Name[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
|
||||
Icon[cs_CZ]=@APPLICATION_EXECUTABLE@
|
||||
Name[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
|
||||
GenericName[cs_CZ]=Synchronizace adresáře
|
||||
Comment[ru]=Настольный клиент синхронизации @APPLICATION_NAME@
|
||||
GenericName[ru]=Синхронизация каталогов
|
||||
Name[ru]=Настольный клиент синхронизации @APPLICATION_NAME@
|
||||
Icon[ru]=@APPLICATION_EXECUTABLE@
|
||||
Name[ru]=Настольный клиент синхронизации @APPLICATION_NAME@
|
||||
GenericName[ru]=Синхронизация каталогов
|
||||
Comment[sl]=@APPLICATION_NAME@ ‒ Program za usklajevanje datotek z namizjem
|
||||
GenericName[sl]=Usklajevanje map
|
||||
Name[sl]=@APPLICATION_NAME@ ‒ Program za usklajevanje datotek z namizjem
|
||||
Icon[sl]=@APPLICATION_EXECUTABLE@
|
||||
Name[sl]=@APPLICATION_NAME@ ‒ Program za usklajevanje datotek z namizjem
|
||||
GenericName[sl]=Usklajevanje map
|
||||
Comment[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
GenericName[sq]=Njëkohësim Dosjesh
|
||||
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
Icon[sq]=@APPLICATION_EXECUTABLE@
|
||||
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
GenericName[sq]=Njëkohësim Dosjesh
|
||||
Comment[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
|
||||
GenericName[fi_FI]=Kansion synkronointi
|
||||
Name[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
|
||||
Icon[fi_FI]=@APPLICATION_EXECUTABLE@
|
||||
Name[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
|
||||
GenericName[fi_FI]=Kansion synkronointi
|
||||
Comment[sv]=@APPLICATION_NAME@ desktop synkroniseringsklient
|
||||
GenericName[sv]=Mappsynk
|
||||
Name[sv]=@APPLICATION_NAME@ desktop synk-klient
|
||||
Icon[sv]=@APPLICATION_EXECUTABLE@
|
||||
Name[sv]=@APPLICATION_NAME@ desktop synk-klient
|
||||
GenericName[sv]=Mappsynk
|
||||
Comment[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
|
||||
GenericName[tr]=Dosya Eşitleme
|
||||
Name[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
|
||||
Icon[tr]=@APPLICATION_EXECUTABLE@
|
||||
Name[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
|
||||
GenericName[tr]=Dosya Eşitleme
|
||||
Comment[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
|
||||
GenericName[uk]=Синхронізація теки
|
||||
Name[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
|
||||
Icon[uk]=@APPLICATION_EXECUTABLE@
|
||||
Name[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
|
||||
GenericName[uk]=Синхронізація теки
|
||||
Comment[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
|
||||
GenericName[ro]=Sincronizare director
|
||||
Name[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
|
||||
Icon[ro]=@APPLICATION_EXECUTABLE@
|
||||
Name[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
|
||||
GenericName[ro]=Sincronizare director
|
||||
Comment[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
|
||||
GenericName[zh_CN]=文件夹同步
|
||||
Name[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
|
||||
Icon[zh_CN]=@APPLICATION_EXECUTABLE@
|
||||
Name[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
|
||||
GenericName[zh_CN]=文件夹同步
|
||||
Comment[zh_HK]=桌面版同步客户端
|
||||
Comment[zh_TW]=@APPLICATION_NAME@ 桌面同步客戶端
|
||||
GenericName[zh_TW]=資料夾同步
|
||||
Name[zh_TW]=@APPLICATION_NAME@ 桌面同步客戶端
|
||||
Icon[zh_TW]=@APPLICATION_EXECUTABLE@
|
||||
Name[zh_TW]=@APPLICATION_NAME@ 桌面同步客戶端
|
||||
GenericName[zh_TW]=資料夾同步
|
||||
Comment[es_AR]=Cliente de sincronización para escritorio @APPLICATION_NAME@
|
||||
GenericName[es_AR]=Sincronización de directorio
|
||||
Name[es_AR]=Cliente de sincronización para escritorio @APPLICATION_NAME@
|
||||
Icon[es_AR]=@APPLICATION_EXECUTABLE@
|
||||
Name[es_AR]=Cliente de sincronización para escritorio @APPLICATION_NAME@
|
||||
GenericName[es_AR]=Sincronización de directorio
|
||||
Comment[lt_LT]=@APPLICATION_NAME@ darbalaukio sinchronizavimo programa
|
||||
GenericName[lt_LT]=Katalogo sinchnorizacija
|
||||
Name[lt_LT]=@APPLICATION_NAME@ darbalaukio programa
|
||||
Icon[lt_LT]=@APPLICATION_EXECUTABLE@
|
||||
Comment[th_TH]=@APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
|
||||
GenericName[th_TH]=ประสานข้อมูลโฟลเดอร์
|
||||
Name[th_TH]= @APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
|
||||
Name[lt_LT]=@APPLICATION_NAME@ darbalaukio programa
|
||||
GenericName[lt_LT]=Katalogo sinchnorizacija
|
||||
Comment[th_TH]=@APPLICATION_NAME@ ประสานข้อมูลด้วยโปรแกรมบนเดสก์ท็อป
|
||||
Icon[th_TH]=@APPLICATION_EXECUTABLE@
|
||||
Name[th_TH]= @APPLICATION_NAME@ ประสานข้อมูลด้วยโปรแกรมบนเดสก์ท็อป
|
||||
GenericName[th_TH]=ประสานข้อมูลโฟลเดอร์
|
||||
Comment[es_MX]=Cliente de escritorio para sincronziación de @APPLICATION_NAME@
|
||||
GenericName[es_MX]=Sincronización de Carpetas
|
||||
Name[es_MX]=Cliente de escritorio para sincronziación de @APPLICATION_NAME@
|
||||
Icon[es_MX]=@APPLICATION_EXECUTABLE@
|
||||
Name[es_MX]=Cliente de escritorio para sincronziación de @APPLICATION_NAME@
|
||||
GenericName[es_MX]=Sincronización de Carpetas
|
||||
Comment[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
|
||||
GenericName[nb_NO]=Mappesynkronisering
|
||||
Name[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
|
||||
Icon[nb_NO]=@APPLICATION_EXECUTABLE@
|
||||
Name[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
|
||||
GenericName[nb_NO]=Mappesynkronisering
|
||||
Comment[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
|
||||
GenericName[nn_NO]=Mappe synkronisering
|
||||
Name[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
|
||||
Icon[nn_NO]=@APPLICATION_EXECUTABLE@
|
||||
Name[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
|
||||
GenericName[nn_NO]=Mappe synkronisering
|
||||
Comment[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
|
||||
GenericName[pt_PT]=Sincronizar Pasta
|
||||
Name[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
|
||||
Icon[pt_PT]=@APPLICATION_EXECUTABLE@
|
||||
Name[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
|
||||
GenericName[pt_PT]=Sincronizar Pasta
|
||||
Icon[km]=@APPLICATION_EXECUTABLE@
|
||||
Comment[lb]=@APPLICATION_NAME@ Desktop Synchronisatioun Client
|
||||
GenericName[lb]=Dossier Dync
|
||||
Name[lb]=@APPLICATION_NAME@ Desktop Sync Client
|
||||
Icon[lb]=@APPLICATION_EXECUTABLE@
|
||||
Name[lb]=@APPLICATION_NAME@ Desktop Sync Client
|
||||
GenericName[lb]=Dossier Dync
|
||||
|
||||
|
Before Width: | Height: | Size: 122 B |
5
resources/more.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<rect style="color:#000000" fill-opacity="0" height="97.986" width="163.31" y="-32.993" x="-62.897"/>
|
||||
<path d="m3 6c-1.1046 0-2 0.8954-2 2s0.8954 2 2 2 2-0.8954 2-2-0.8954-2-2-2zm5 0c-1.1046 0-2 0.8954-2 2s0.8954 2 2 2 2-0.8954 2-2-0.8954-2-2-2zm5 0c-1.105 0-2 0.8954-2 2s0.895 2 2 2 2-0.8954 2-2-0.895-2-2-2z" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 660 B |
@@ -23,6 +23,7 @@
|
||||
NSMutableSet *_registeredDirectories;
|
||||
NSString *_shareMenuTitle;
|
||||
NSMutableDictionary *_strings;
|
||||
NSMutableArray *_menuItems;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
|
||||
FIFinderSyncController *syncController = [FIFinderSyncController defaultController];
|
||||
NSBundle *extBundle = [NSBundle bundleForClass:[self class]];
|
||||
// This was added to the bundle's Info.plist to get it from the build system
|
||||
@@ -43,7 +43,7 @@
|
||||
[syncController setBadgeImage:sync label:@"Synchronizing" forBadgeIdentifier:@"NEW+SWM"];
|
||||
[syncController setBadgeImage:warning label:@"Ignored" forBadgeIdentifier:@"IGNORE+SWM"];
|
||||
[syncController setBadgeImage:error label:@"Error" forBadgeIdentifier:@"ERROR+SWM"];
|
||||
|
||||
|
||||
// The Mach port name needs to:
|
||||
// - Be prefixed with the code signing Team ID
|
||||
// - Then infixed with the sandbox App Group
|
||||
@@ -55,12 +55,12 @@
|
||||
// the sandboxed App Extension needs.
|
||||
// https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24
|
||||
NSString *serverName = [socketApiPrefix stringByAppendingString:@".socketApi"];
|
||||
// NSLog(@"FinderSync serverName %@", serverName);
|
||||
//NSLog(@"FinderSync serverName %@", serverName);
|
||||
|
||||
_syncClientProxy = [[SyncClientProxy alloc] initWithDelegate:self serverName:serverName];
|
||||
_registeredDirectories = [[NSMutableSet alloc] init];
|
||||
_strings = [[NSMutableDictionary alloc] init];
|
||||
|
||||
|
||||
[_syncClientProxy start];
|
||||
return self;
|
||||
}
|
||||
@@ -74,13 +74,27 @@
|
||||
NSLog(@"ERROR: Could not determine file type of %@", [url path]);
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
|
||||
NSString* normalizedPath = [[url path] decomposedStringWithCanonicalMapping];
|
||||
[_syncClientProxy askForIcon:normalizedPath isDirectory:isDir];
|
||||
}
|
||||
|
||||
#pragma mark - Menu and toolbar item support
|
||||
|
||||
- (NSString*) selectedPathsSeparatedByRecordSeparator
|
||||
{
|
||||
FIFinderSyncController *syncController = [FIFinderSyncController defaultController];
|
||||
NSMutableString *string = [[NSMutableString alloc] init];
|
||||
[syncController.selectedItemURLs enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if (string.length > 0) {
|
||||
[string appendString:@"\x1e"]; // record separator
|
||||
}
|
||||
NSString* normalizedPath = [[obj path] decomposedStringWithCanonicalMapping];
|
||||
[string appendString:normalizedPath];
|
||||
}];
|
||||
return string;
|
||||
}
|
||||
|
||||
- (NSMenu *)menuForMenuKind:(FIMenuKind)whichMenu
|
||||
{
|
||||
FIFinderSyncController *syncController = [FIFinderSyncController defaultController];
|
||||
@@ -101,54 +115,43 @@
|
||||
}
|
||||
}];
|
||||
|
||||
NSString *paths = [self selectedPathsSeparatedByRecordSeparator];
|
||||
// calling this IPC calls us back from client with several MENU_ITEM entries and then our askOnSocket returns again
|
||||
[_syncClientProxy askOnSocket:paths query:@"GET_MENU_ITEMS"];
|
||||
|
||||
id contextMenuTitle = [_strings objectForKey:@"CONTEXT_MENU_TITLE"];
|
||||
id shareTitle = [_strings objectForKey:@"SHARE_MENU_TITLE"];
|
||||
id copyLinkTitle = [_strings objectForKey:@"COPY_PRIVATE_LINK_MENU_TITLE"];
|
||||
id emailLinkTitle = [_strings objectForKey:@"EMAIL_PRIVATE_LINK_MENU_TITLE"];
|
||||
if (contextMenuTitle && !onlyRootsSelected) {
|
||||
NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
|
||||
NSMenu *subMenu = [[NSMenu alloc] initWithTitle:@""];
|
||||
NSMenuItem *subMenuItem = [menu addItemWithTitle:contextMenuTitle action:nil keyEquivalent:@""];
|
||||
subMenuItem.submenu = subMenu;
|
||||
subMenuItem.image = [[NSBundle mainBundle] imageForResource:@"app.icns"];
|
||||
|
||||
[subMenu addItemWithTitle:shareTitle action:@selector(shareMenuAction:) keyEquivalent:@""];
|
||||
[subMenu addItemWithTitle:copyLinkTitle action:@selector(copyLinkMenuAction:) keyEquivalent:@""];
|
||||
[subMenu addItemWithTitle:emailLinkTitle action:@selector(emailLinkMenuAction:) keyEquivalent:@""];
|
||||
NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
|
||||
NSMenu *subMenu = [[NSMenu alloc] initWithTitle:@""];
|
||||
NSMenuItem *subMenuItem = [menu addItemWithTitle:contextMenuTitle action:nil keyEquivalent:@""];
|
||||
subMenuItem.submenu = subMenu;
|
||||
subMenuItem.image = [[NSBundle mainBundle] imageForResource:@"app.icns"];
|
||||
|
||||
// There is an annoying bug in macOS (at least 10.13.3), it does not use/copy over the representedObject of a menu item
|
||||
// So we have to use tag instead.
|
||||
int idx = 0;
|
||||
for (NSArray* item in _menuItems) {
|
||||
NSMenuItem *actionItem = [subMenu addItemWithTitle:[item valueForKey:@"text"]
|
||||
action:@selector(subMenuActionClicked:)
|
||||
keyEquivalent:@""];
|
||||
[actionItem setTag:idx];
|
||||
[actionItem setTarget:self];
|
||||
NSString *flags = [item valueForKey:@"flags"]; // e.g. "d"
|
||||
if ([flags rangeOfString:@"d"].location != NSNotFound) {
|
||||
[actionItem setEnabled:false];
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (IBAction)shareMenuAction:(id)sender
|
||||
{
|
||||
NSArray* items = [[FIFinderSyncController defaultController] selectedItemURLs];
|
||||
|
||||
[items enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
NSString* normalizedPath = [[obj path] decomposedStringWithCanonicalMapping];
|
||||
[_syncClientProxy askOnSocket:normalizedPath query:@"SHARE"];
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)copyLinkMenuAction:(id)sender
|
||||
{
|
||||
NSArray* items = [[FIFinderSyncController defaultController] selectedItemURLs];
|
||||
|
||||
[items enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
NSString* normalizedPath = [[obj path] decomposedStringWithCanonicalMapping];
|
||||
[_syncClientProxy askOnSocket:normalizedPath query:@"COPY_PRIVATE_LINK"];
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)emailLinkMenuAction:(id)sender
|
||||
{
|
||||
NSArray* items = [[FIFinderSyncController defaultController] selectedItemURLs];
|
||||
|
||||
[items enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
NSString* normalizedPath = [[obj path] decomposedStringWithCanonicalMapping];
|
||||
[_syncClientProxy askOnSocket:normalizedPath query:@"EMAIL_PRIVATE_LINK"];
|
||||
}];
|
||||
- (void)subMenuActionClicked:(id)sender {
|
||||
long idx = [(NSMenuItem*)sender tag];
|
||||
NSString *command = [[_menuItems objectAtIndex:idx] valueForKey:@"command"];
|
||||
NSString *paths = [self selectedPathsSeparatedByRecordSeparator];
|
||||
[_syncClientProxy askOnSocket:paths query:command];
|
||||
}
|
||||
|
||||
#pragma mark - SyncClientProxyDelegate implementation
|
||||
@@ -181,6 +184,14 @@
|
||||
[_strings setObject:value forKey:key];
|
||||
}
|
||||
|
||||
- (void)resetMenuItems
|
||||
{
|
||||
_menuItems = [[NSMutableArray alloc] init];
|
||||
}
|
||||
- (void)addMenuItem:(NSDictionary *)item {
|
||||
[_menuItems addObject:item];
|
||||
}
|
||||
|
||||
- (void)connectionDidDie
|
||||
{
|
||||
[_strings removeAllObjects];
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
- (void)registerPath:(NSString*)path;
|
||||
- (void)unregisterPath:(NSString*)path;
|
||||
- (void)setString:(NSString*)key value:(NSString*)value;
|
||||
- (void)resetMenuItems;
|
||||
- (void)addMenuItem:(NSDictionary *)item;
|
||||
- (void)connectionDidDie;
|
||||
@end
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
- (instancetype)initWithDelegate:(id)arg1 serverName:(NSString*)serverName
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
|
||||
self.delegate = arg1;
|
||||
_serverName = serverName;
|
||||
_remoteEnd = nil;
|
||||
@@ -41,20 +41,20 @@
|
||||
{
|
||||
if (_remoteEnd)
|
||||
return;
|
||||
|
||||
|
||||
// Lookup the server connection
|
||||
NSConnection *conn = [NSConnection connectionWithRegisteredName:_serverName host:nil];
|
||||
|
||||
|
||||
if (!conn) {
|
||||
// Could not connect to the sync client
|
||||
[self scheduleRetry];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(connectionDidDie:)
|
||||
name:NSConnectionDidDieNotification
|
||||
object:conn];
|
||||
selector:@selector(connectionDidDie:)
|
||||
name:NSConnectionDidDieNotification
|
||||
object:conn];
|
||||
|
||||
NSDistantObject <ServerProtocol> *server = (NSDistantObject <ServerProtocol> *)[conn rootProxy];
|
||||
assert(server);
|
||||
@@ -71,7 +71,7 @@
|
||||
// The server replied with the distant object that we will use for tx
|
||||
_remoteEnd = (NSDistantObject <ChannelProtocol> *)tx;
|
||||
[_remoteEnd setProtocolForProxy:@protocol(ChannelProtocol)];
|
||||
|
||||
|
||||
// Everything is set up, start querying
|
||||
[self askOnSocket:@"" query:@"GET_STRINGS"];
|
||||
}
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
- (void)connectionDidDie:(NSNotification*)notification
|
||||
{
|
||||
#pragma unused(notification)
|
||||
#pragma unused(notification)
|
||||
_remoteEnd = nil;
|
||||
[_delegate connectionDidDie];
|
||||
|
||||
@@ -95,11 +95,11 @@
|
||||
- (void)sendMessage:(NSData*)msg
|
||||
{
|
||||
NSString *answer = [[NSString alloc] initWithData:msg encoding:NSUTF8StringEncoding];
|
||||
|
||||
// Cut the trailing newline
|
||||
|
||||
// Cut the trailing newline. We always only receive one line from the client.
|
||||
answer = [answer substringToIndex:[answer length] - 1];
|
||||
NSArray *chunks = [answer componentsSeparatedByString: @":"];
|
||||
|
||||
|
||||
if( [[chunks objectAtIndex:0] isEqualToString:@"STATUS"] ) {
|
||||
NSString *result = [chunks objectAtIndex:1];
|
||||
NSString *path = [chunks objectAtIndex:2];
|
||||
@@ -123,6 +123,18 @@
|
||||
// BEGIN and END messages, do nothing.
|
||||
} else if( [[chunks objectAtIndex:0 ] isEqualToString:@"STRING"] ) {
|
||||
[_delegate setString:[chunks objectAtIndex:1] value:[chunks objectAtIndex:2]];
|
||||
} else if( [[chunks objectAtIndex:0 ] isEqualToString:@"GET_MENU_ITEMS"] ) {
|
||||
if ([[chunks objectAtIndex:1] isEqualToString:@"BEGIN"]) {
|
||||
[_delegate resetMenuItems];
|
||||
} else if ([[chunks objectAtIndex:1] isEqualToString:@"END"]) {
|
||||
// Don't do anything special, the askOnSocket call in FinderSync menuForMenuKind will return after this line
|
||||
}
|
||||
} else if( [[chunks objectAtIndex:0 ] isEqualToString:@"MENU_ITEM"] ) {
|
||||
NSMutableDictionary *item = [[NSMutableDictionary alloc] init];
|
||||
[item setValue:[chunks objectAtIndex:1] forKey:@"command"]; // e.g. "COPY_PRIVATE_LINK"
|
||||
[item setValue:[chunks objectAtIndex:2] forKey:@"flags"]; // e.g. "d"
|
||||
[item setValue:[chunks objectAtIndex:3] forKey:@"text"]; // e.g. "Copy private link to clipboard"
|
||||
[_delegate addMenuItem:item];
|
||||
} else {
|
||||
NSLog(@"SyncState: Unknown command %@", [chunks objectAtIndex:0]);
|
||||
}
|
||||
@@ -131,7 +143,7 @@
|
||||
- (void)askOnSocket:(NSString*)path query:(NSString*)verb
|
||||
{
|
||||
NSString *query = [NSString stringWithFormat:@"%@:%@\n", verb,path];
|
||||
|
||||
|
||||
@try {
|
||||
[_remoteEnd sendMessage:[query dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
} @catch(NSException* e) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <QtNetwork/QLocalSocket>
|
||||
#include <qcoreevent.h>
|
||||
#include <QStandardPaths>
|
||||
#include <QFile>
|
||||
#include "ownclouddolphinpluginhelper.h"
|
||||
#include "config.h"
|
||||
@@ -68,12 +69,14 @@ void OwncloudDolphinPluginHelper::tryConnect()
|
||||
if (_socket.state() != QLocalSocket::UnconnectedState) {
|
||||
return;
|
||||
}
|
||||
QString runtimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR"));
|
||||
runtimeDir.append( QChar('/'));
|
||||
runtimeDir.append( QLatin1String(APPLICATION_SHORTNAME) );
|
||||
|
||||
QString socketPath = QStandardPaths::locate(QStandardPaths::RuntimeLocation,
|
||||
APPLICATION_SHORTNAME,
|
||||
QStandardPaths::LocateDirectory);
|
||||
if(socketPath.isEmpty())
|
||||
return;
|
||||
|
||||
const QString socketPath = runtimeDir + QLatin1String("/socket");
|
||||
_socket.connectToServer(socketPath);
|
||||
_socket.connectToServer(socketPath + QLatin1String("/socket"));
|
||||
}
|
||||
|
||||
void OwncloudDolphinPluginHelper::slotReadyRead()
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
# this script replaces the line
|
||||
# appname = 'ownCloud'
|
||||
# with the correct branding name in the syncstate.py script
|
||||
sed -i.org -e 's/appname\s*=\s*'"'"'ownCloud'"'/appname = '$1'/" syncstate.py
|
||||
# It also replaces the occurences in the class name so several
|
||||
# branding can be loaded (see #6524)
|
||||
sed -i.org -e "s/ownCloud/$1/g" syncstate.py
|
||||
|
||||
@@ -28,19 +28,20 @@ import time
|
||||
|
||||
from gi.repository import GObject, Nautilus
|
||||
|
||||
# Please do not touch the following line.
|
||||
# The reason is that we use a script to adopt this file for branding
|
||||
# by replacing this line with the branding app name. If the following
|
||||
# line is changed, the script can not match the pattern and fails.
|
||||
# Note: setappname.sh will search and replace 'ownCloud' on this file to update this line and other
|
||||
# occurrences of the name
|
||||
appname = 'ownCloud'
|
||||
|
||||
print("Initializing "+appname+"-client-nautilus extension")
|
||||
print("Using python version {}".format(sys.version_info))
|
||||
|
||||
def get_local_path(url):
|
||||
if url[0:7] == 'file://':
|
||||
url = url[7:]
|
||||
unquote = urllib.parse.unquote if python3 else urllib.unquote
|
||||
return unquote(url)
|
||||
if python3:
|
||||
return urllib.parse.unquote(url)
|
||||
else:
|
||||
return urllib.unquote(url).decode('utf-8')
|
||||
|
||||
def get_runtime_dir():
|
||||
"""Returns the value of $XDG_RUNTIME_DIR, a directory path.
|
||||
@@ -62,7 +63,7 @@ class SocketConnect(GObject.GObject):
|
||||
self._watch_id = 0
|
||||
self._sock = None
|
||||
self._listeners = [self._update_registered_paths, self._get_version]
|
||||
self._remainder = ''.encode()
|
||||
self._remainder = ''.encode('utf-8')
|
||||
self.protocolVersion = '1.0'
|
||||
self.nautilusVFSFile_table = {} # not needed in this object actually but shared
|
||||
# all over the other objects.
|
||||
@@ -81,7 +82,7 @@ class SocketConnect(GObject.GObject):
|
||||
# print("Server command: " + cmd)
|
||||
if self.connected:
|
||||
try:
|
||||
self._sock.send(cmd.encode())
|
||||
self._sock.send(cmd.encode('utf-8'))
|
||||
except:
|
||||
print("Sending failed.")
|
||||
self.reconnect()
|
||||
@@ -96,19 +97,16 @@ class SocketConnect(GObject.GObject):
|
||||
self._sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
sock_file = os.path.join(get_runtime_dir(), appname, "socket")
|
||||
try:
|
||||
print("Socket File: " + sock_file)
|
||||
self._sock.connect(sock_file) # fails if sock_file doesn't exist
|
||||
self.connected = True
|
||||
print("Setting connected to %r." % self.connected )
|
||||
self._watch_id = GObject.io_add_watch(self._sock, GObject.IO_IN, self._handle_notify)
|
||||
print("Socket watch id: " + str(self._watch_id))
|
||||
|
||||
self.sendCommand('VERSION:\n')
|
||||
self.sendCommand('GET_STRINGS:\n')
|
||||
|
||||
return False # Don't run again
|
||||
except Exception as e:
|
||||
print("Could not connect to unix socket. " + str(e))
|
||||
print("Could not connect to unix socket " + sock_file + ". " + str(e))
|
||||
except Exception as e: # Bad habbit
|
||||
print("Connect could not be established, try again later.")
|
||||
self._sock.close()
|
||||
@@ -131,12 +129,12 @@ class SocketConnect(GObject.GObject):
|
||||
|
||||
# Parses response lines out of collected data, returns list of strings
|
||||
def get_available_responses(self):
|
||||
end = self._remainder.rfind('\n'.encode())
|
||||
end = self._remainder.rfind(b'\n')
|
||||
if end == -1:
|
||||
return []
|
||||
data = self._remainder[:end]
|
||||
self._remainder = self._remainder[end+1:]
|
||||
return data.decode().split('\n')
|
||||
return data.decode('utf-8').split('\n')
|
||||
|
||||
# Notify is the raw answer from the socket
|
||||
def _handle_notify(self, source, condition):
|
||||
@@ -152,7 +150,7 @@ class SocketConnect(GObject.GObject):
|
||||
return True # Run again
|
||||
|
||||
def handle_server_response(self, line):
|
||||
print("Server response: " + line)
|
||||
# print("Server response: " + line)
|
||||
parts = line.split(':')
|
||||
action = parts[0]
|
||||
args = parts[1:]
|
||||
@@ -178,7 +176,7 @@ class SocketConnect(GObject.GObject):
|
||||
socketConnect = SocketConnect()
|
||||
|
||||
|
||||
class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
class MenuExtension_ownCloud(GObject.GObject, Nautilus.MenuProvider):
|
||||
def __init__(self):
|
||||
GObject.GObject.__init__(self)
|
||||
|
||||
@@ -235,7 +233,7 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
def ask_for_menu_items(self, files):
|
||||
record_separator = '\x1e'
|
||||
filesstring = record_separator.join(files)
|
||||
socketConnect.sendCommand('GET_MENU_ITEMS:{}\n'.format(filesstring))
|
||||
socketConnect.sendCommand(u'GET_MENU_ITEMS:{}\n'.format(filesstring))
|
||||
|
||||
done = False
|
||||
start = time.time()
|
||||
@@ -295,8 +293,8 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
# and we definitely don't want to show them for IGNORED.
|
||||
shareable = False
|
||||
state = entry['state']
|
||||
state_ok = state.startswith('OK')
|
||||
state_sync = state.startswith('SYNC')
|
||||
state_ok = state and state.startswith('OK')
|
||||
state_sync = state and state.startswith('SYNC')
|
||||
if state_ok:
|
||||
shareable = True
|
||||
elif state_sync and isDir:
|
||||
@@ -342,11 +340,11 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
|
||||
|
||||
def context_menu_action(self, menu, action, filename):
|
||||
print("Context menu: " + action + ' ' + filename)
|
||||
# print("Context menu: " + action + ' ' + filename)
|
||||
socketConnect.sendCommand(action + ":" + filename + "\n")
|
||||
|
||||
|
||||
class SyncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
|
||||
class SyncStateExtension_ownCloud(GObject.GObject, Nautilus.InfoProvider):
|
||||
def __init__(self):
|
||||
GObject.GObject.__init__(self)
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
using namespace std;
|
||||
|
||||
#define PIPE_TIMEOUT 5*1000 //ms
|
||||
#define SOCK_BUFFER 4096
|
||||
|
||||
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo(const std::wstring &files)
|
||||
{
|
||||
@@ -92,9 +91,5 @@ void OCClientInterface::SendRequest(const wchar_t *verb, const std::wstring &pat
|
||||
return;
|
||||
}
|
||||
|
||||
wchar_t msg[SOCK_BUFFER] = { 0 };
|
||||
if (SUCCEEDED(StringCchPrintf(msg, SOCK_BUFFER, L"%s:%s\n", verb, path.c_str())))
|
||||
{
|
||||
socket.SendMsg(msg);
|
||||
}
|
||||
socket.SendMsg((verb + (L":" + path + L"\n")).data());
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
|
||||
|
||||
MENUITEMINFO mii = { sizeof(mii) };
|
||||
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING | MIIM_STATE;
|
||||
mii.wID = indexSubMenu;
|
||||
mii.wID = idCmdFirst + indexSubMenu;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = &item.title[0];
|
||||
mii.fState = disabled ? MFS_DISABLED : MFS_ENABLED;
|
||||
@@ -192,7 +192,7 @@ IFACEMETHODIMP OCContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
|
||||
// check the identifier offset.
|
||||
|
||||
auto offset = LOWORD(pici->lpVerb);
|
||||
if (offset < m_info.menuItems.size())
|
||||
if (offset >= m_info.menuItems.size())
|
||||
return E_FAIL;
|
||||
|
||||
command = m_info.menuItems[offset].command;
|
||||
|
||||
@@ -5,6 +5,7 @@ add_library(OCUtil SHARED
|
||||
RemotePathChecker.cpp
|
||||
stdafx.cpp
|
||||
StringUtil.cpp
|
||||
OCUtil.rc
|
||||
)
|
||||
|
||||
target_include_directories(OCUtil
|
||||
|
||||
BIN
shell_integration/windows/OCUtil/OCUtil.rc
Normal file
@@ -169,8 +169,11 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StringUtil.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="OCUtil.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
14
shell_integration/windows/OCUtil/resource.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by OCContextMenu.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
2
src/3rdparty/libcrashreporter-qt
vendored
17002
src/3rdparty/sqlite3/sqlite3.c
vendored
917
src/3rdparty/sqlite3/sqlite3.h
vendored
@@ -2,12 +2,13 @@
|
||||
if(NOT TOKEN_AUTH_ONLY)
|
||||
endif()
|
||||
|
||||
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
||||
|
||||
find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent REQUIRED)
|
||||
if (Qt5Core_VERSION VERSION_LESS 5.9.0)
|
||||
message(STATUS "For HTTP/2 support, compile with Qt 5.9 or higher.")
|
||||
endif()
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
message(STATUS "Using Qt ${Qt5Core_VERSION} (${QT_QMAKE_EXECUTABLE})")
|
||||
|
||||
|
||||
if(NOT TOKEN_AUTH_ONLY)
|
||||
find_package(Qt5Keychain REQUIRED)
|
||||
|
||||
@@ -16,13 +16,11 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
add_executable(${cmd_NAME} ${cmd_SRC})
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
add_executable(${cmd_NAME} ${cmd_SRC})
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
|
||||
target_link_libraries(${cmd_NAME} ocsync ${synclib_NAME} Qt5::Core Qt5::Network)
|
||||
target_link_libraries(${cmd_NAME} "${csync_NAME}" "${synclib_NAME}" Qt5::Core Qt5::Network)
|
||||
|
||||
# Need tokenizer for netrc parser
|
||||
target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)
|
||||
|
||||
@@ -23,17 +23,16 @@
|
||||
#include <QFileInfo>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QNetworkProxy>
|
||||
#include <qdebug.h>
|
||||
|
||||
#include "account.h"
|
||||
#include "clientproxy.h"
|
||||
#include "configfile.h" // ONLY ACCESS THE STATIC FUNCTIONS!
|
||||
#include "creds/httpcredentials.h"
|
||||
#include "simplesslerrorhandler.h"
|
||||
#include "syncengine.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "config.h"
|
||||
#include "connectionvalidator.h"
|
||||
|
||||
#include "cmd.h"
|
||||
|
||||
@@ -83,8 +82,6 @@ struct CmdOptions
|
||||
// So we have to use a global variable
|
||||
CmdOptions *opts = 0;
|
||||
|
||||
const qint64 timeoutToUseMsec = qMax(1000, ConnectionValidator::DefaultCallingIntervalMsec - 5 * 1000);
|
||||
|
||||
class EchoDisabler
|
||||
{
|
||||
public:
|
||||
@@ -327,7 +324,6 @@ int main(int argc, char **argv)
|
||||
options.restartTimes = 3;
|
||||
options.uplimit = 0;
|
||||
options.downlimit = 0;
|
||||
ClientProxy clientProxy;
|
||||
|
||||
parseOptions(app.arguments(), &options);
|
||||
|
||||
@@ -439,8 +435,6 @@ int main(int argc, char **argv)
|
||||
} else {
|
||||
qFatal("Could not read httpproxy. The proxy should have the format \"http://hostname:port\".");
|
||||
}
|
||||
} else {
|
||||
clientProxy.setupQtProxyFromConfig();
|
||||
}
|
||||
|
||||
SimpleSslErrorHandler *sslErrorHandler = new SimpleSslErrorHandler;
|
||||
@@ -454,24 +448,29 @@ int main(int argc, char **argv)
|
||||
account->setCredentials(cred);
|
||||
account->setSslErrorHandler(sslErrorHandler);
|
||||
|
||||
//obtain capabilities using event loop
|
||||
QEventLoop loop;
|
||||
// Perform a call to get the capabilities.
|
||||
if (!options.nonShib) {
|
||||
// Do not do it if '--nonshib' was passed. This mean we should only connect to the 'nonshib'
|
||||
// dav endpoint. Since we do not get the capabilities, in that case, this has the additional
|
||||
// side effect that chunking-ng will be disabled. (because otherwise it would use the new
|
||||
// 'dav' endpoint instead of the nonshib one (which still use the old chunking)
|
||||
|
||||
JsonApiJob *job = new JsonApiJob(account, QLatin1String("ocs/v1.php/cloud/capabilities"));
|
||||
job->setTimeout(timeoutToUseMsec);
|
||||
QObject::connect(job, &JsonApiJob::jsonReceived, [&](const QJsonDocument &json) {
|
||||
auto caps = json.object().value("ocs").toObject().value("data").toObject().value("capabilities").toObject();
|
||||
qDebug() << "Server capabilities" << caps;
|
||||
account->setCapabilities(caps.toVariantMap());
|
||||
loop.quit();
|
||||
});
|
||||
job->start();
|
||||
QEventLoop loop;
|
||||
JsonApiJob *job = new JsonApiJob(account, QLatin1String("ocs/v1.php/cloud/capabilities"));
|
||||
QObject::connect(job, &JsonApiJob::jsonReceived, [&](const QJsonDocument &json) {
|
||||
auto caps = json.object().value("ocs").toObject().value("data").toObject().value("capabilities").toObject();
|
||||
qDebug() << "Server capabilities" << caps;
|
||||
account->setCapabilities(caps.toVariantMap());
|
||||
loop.quit();
|
||||
});
|
||||
job->start();
|
||||
|
||||
loop.exec();
|
||||
loop.exec();
|
||||
|
||||
if (job->reply()->error() != QNetworkReply::NoError){
|
||||
std::cout<<"Error connecting to server\n";
|
||||
return EXIT_FAILURE;
|
||||
if (job->reply()->error() != QNetworkReply::NoError){
|
||||
std::cout<<"Error connecting to server\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
// much lower age than the default since this utility is usually made to be run right after a change in the tests
|
||||
|
||||
@@ -19,8 +19,11 @@
|
||||
#include "filesystembase.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QUrl>
|
||||
#include <QFile>
|
||||
#include <QCryptographicHash>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@@ -269,10 +272,12 @@ bool FileSystem::openAndSeekFileSharedRead(QFile *file, QString *errorOrNull, qi
|
||||
int fd = _open_osfhandle((intptr_t)fileHandle, _O_RDONLY);
|
||||
if (fd == -1) {
|
||||
error = "could not make fd from handle";
|
||||
CloseHandle(fileHandle);
|
||||
return false;
|
||||
}
|
||||
if (!file->open(fd, QIODevice::ReadOnly, QFile::AutoCloseHandle)) {
|
||||
error = file->errorString();
|
||||
_close(fd); // implicitly closes fileHandle
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -422,6 +427,83 @@ bool FileSystem::remove(const QString &fileName, QString *errorString)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileSystem::moveToTrash(const QString &fileName, QString *errorString)
|
||||
{
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
QString trashPath, trashFilePath, trashInfoPath;
|
||||
QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));
|
||||
if (xdgDataHome.isEmpty()) {
|
||||
trashPath = QDir::homePath() + "/.local/share/Trash/"; // trash path that should exist
|
||||
} else {
|
||||
trashPath = xdgDataHome + "/Trash/";
|
||||
}
|
||||
|
||||
trashFilePath = trashPath + "files/"; // trash file path contain delete files
|
||||
trashInfoPath = trashPath + "info/"; // trash info path contain delete files information
|
||||
|
||||
if (!(QDir().mkpath(trashFilePath) && QDir().mkpath(trashInfoPath))) {
|
||||
*errorString = QCoreApplication::translate("FileSystem", "Could not make directories in trash");
|
||||
return false; //mkpath will return true if path exists
|
||||
}
|
||||
|
||||
QFileInfo f(fileName);
|
||||
|
||||
QDir file;
|
||||
int suffix_number = 1;
|
||||
if (file.exists(trashFilePath + f.fileName())) { //file in trash already exists, move to "filename.1"
|
||||
QString path = trashFilePath + f.fileName() + ".";
|
||||
while (file.exists(path + QString::number(suffix_number))) { //or to "filename.2" if "filename.1" exists, etc
|
||||
suffix_number++;
|
||||
}
|
||||
if (!file.rename(f.absoluteFilePath(), path + QString::number(suffix_number))) { // rename(file old path, file trash path)
|
||||
*errorString = QCoreApplication::translate("FileSystem", "Could not move '%1' to '%2'")
|
||||
.arg(f.absoluteFilePath(), path + QString::number(suffix_number));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!file.rename(f.absoluteFilePath(), trashFilePath + f.fileName())) { // rename(file old path, file trash path)
|
||||
*errorString = QCoreApplication::translate("FileSystem", "Could not move '%1' to '%2'")
|
||||
.arg(f.absoluteFilePath(), trashFilePath + f.fileName());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// create file format for trash info file----- START
|
||||
QFile infoFile;
|
||||
if (file.exists(trashInfoPath + f.fileName() + ".trashinfo")) { //TrashInfo file already exists, create "filename.1.trashinfo"
|
||||
QString filename = trashInfoPath + f.fileName() + "." + QString::number(suffix_number) + ".trashinfo";
|
||||
infoFile.setFileName(filename); //filename+.trashinfo // create file information file in /.local/share/Trash/info/ folder
|
||||
} else {
|
||||
QString filename = trashInfoPath + f.fileName() + ".trashinfo";
|
||||
infoFile.setFileName(filename); //filename+.trashinfo // create file information file in /.local/share/Trash/info/ folder
|
||||
}
|
||||
|
||||
infoFile.open(QIODevice::ReadWrite);
|
||||
|
||||
QTextStream stream(&infoFile); // for write data on open file
|
||||
|
||||
QByteArray info = "[Trash Info]\n";
|
||||
info += "Path=";
|
||||
info += QUrl::toPercentEncoding(f.absoluteFilePath(), "~_-./");
|
||||
info += '\n';
|
||||
info += "DeletionDate=";
|
||||
info += QDateTime::currentDateTime().toString(Qt::ISODate).toLatin1();
|
||||
info += '\n';
|
||||
|
||||
stream << info;
|
||||
|
||||
infoFile.close();
|
||||
|
||||
// create info file format of trash file----- END
|
||||
|
||||
return true;
|
||||
#else
|
||||
Q_UNUSED(fileName)
|
||||
*errorString = QCoreApplication::translate("FileSystem", "Moving to the trash is not implemented on this platform");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool FileSystem::isFileLocked(const QString &fileName)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -457,4 +539,22 @@ bool FileSystem::isLnkFile(const QString &filename)
|
||||
return filename.endsWith(".lnk");
|
||||
}
|
||||
|
||||
bool FileSystem::isJunction(const QString &filename)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind = FindFirstFileEx((const wchar_t *)filename.utf16(), FindExInfoBasic, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
FindClose(hFind);
|
||||
return false;
|
||||
}
|
||||
return findData.dwFileAttributes != INVALID_FILE_ATTRIBUTES
|
||||
&& findData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT
|
||||
&& findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT;
|
||||
#else
|
||||
Q_UNUSED(filename);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -109,6 +109,11 @@ namespace FileSystem {
|
||||
*/
|
||||
bool OCSYNC_EXPORT remove(const QString &fileName, QString *errorString = 0);
|
||||
|
||||
/**
|
||||
* Move the specified file or folder to the trash. (Only implemented on linux)
|
||||
*/
|
||||
bool OCSYNC_EXPORT moveToTrash(const QString &filename, QString *errorString);
|
||||
|
||||
/**
|
||||
* Replacement for QFile::open(ReadOnly) followed by a seek().
|
||||
* This version sets a more permissive sharing mode on Windows.
|
||||
@@ -136,8 +141,16 @@ namespace FileSystem {
|
||||
*/
|
||||
bool OCSYNC_EXPORT isFileLocked(const QString &fileName);
|
||||
|
||||
/**
|
||||
* Returns whether the file is a shortcut file (ends with .lnk)
|
||||
*/
|
||||
bool OCSYNC_EXPORT isLnkFile(const QString &filename);
|
||||
|
||||
/**
|
||||
* Returns whether the file is a junction (windows only)
|
||||
*/
|
||||
bool OCSYNC_EXPORT isJunction(const QString &filename);
|
||||
|
||||
/*
|
||||
* This function takes a path and converts it to a UNC representation of the
|
||||
* string. That means that it prepends a \\?\ (unless already UNC) and converts
|
||||
|
||||
@@ -49,6 +49,12 @@ SqlDatabase::SqlDatabase()
|
||||
{
|
||||
}
|
||||
|
||||
SqlDatabase::~SqlDatabase()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
bool SqlDatabase::isOpen()
|
||||
{
|
||||
return _db != 0;
|
||||
@@ -184,6 +190,9 @@ QString SqlDatabase::error() const
|
||||
void SqlDatabase::close()
|
||||
{
|
||||
if (_db) {
|
||||
foreach (auto q, _queries) {
|
||||
q->finish();
|
||||
}
|
||||
SQLITE_DO(sqlite3_close(_db));
|
||||
if (_errId != SQLITE_OK)
|
||||
qCWarning(lcSql) << "Closing database failed" << _error;
|
||||
@@ -217,9 +226,8 @@ sqlite3 *SqlDatabase::sqliteDb()
|
||||
/* =========================================================================================== */
|
||||
|
||||
SqlQuery::SqlQuery(SqlDatabase &db)
|
||||
: _db(db.sqliteDb())
|
||||
, _stmt(0)
|
||||
, _errId(0)
|
||||
: _sqldb(&db)
|
||||
, _db(db.sqliteDb())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -230,18 +238,16 @@ SqlQuery::~SqlQuery()
|
||||
}
|
||||
}
|
||||
|
||||
SqlQuery::SqlQuery(const QString &sql, SqlDatabase &db)
|
||||
: _db(db.sqliteDb())
|
||||
, _stmt(0)
|
||||
, _errId(0)
|
||||
SqlQuery::SqlQuery(const QByteArray &sql, SqlDatabase &db)
|
||||
: _sqldb(&db)
|
||||
, _db(db.sqliteDb())
|
||||
{
|
||||
prepare(sql);
|
||||
}
|
||||
|
||||
int SqlQuery::prepare(const QString &sql, bool allow_failure)
|
||||
int SqlQuery::prepare(const QByteArray &sql, bool allow_failure)
|
||||
{
|
||||
QString s(sql);
|
||||
_sql = s.trimmed();
|
||||
_sql = sql.trimmed();
|
||||
if (_stmt) {
|
||||
finish();
|
||||
}
|
||||
@@ -249,7 +255,7 @@ int SqlQuery::prepare(const QString &sql, bool allow_failure)
|
||||
int n = 0;
|
||||
int rc;
|
||||
do {
|
||||
rc = sqlite3_prepare_v2(_db, _sql.toUtf8().constData(), -1, &_stmt, 0);
|
||||
rc = sqlite3_prepare_v2(_db, _sql.constData(), -1, &_stmt, 0);
|
||||
if ((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED)) {
|
||||
n++;
|
||||
OCC::Utility::usleep(SQLITE_SLEEP_TIME_USEC);
|
||||
@@ -261,19 +267,32 @@ int SqlQuery::prepare(const QString &sql, bool allow_failure)
|
||||
_error = QString::fromUtf8(sqlite3_errmsg(_db));
|
||||
qCWarning(lcSql) << "Sqlite prepare statement error:" << _error << "in" << _sql;
|
||||
ENFORCE(allow_failure, "SQLITE Prepare error");
|
||||
} else {
|
||||
ASSERT(_stmt);
|
||||
_sqldb->_queries.insert(this);
|
||||
}
|
||||
}
|
||||
return _errId;
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no overloads to QByteArray::startWith that takes Qt::CaseInsensitive.
|
||||
* Returns true if 'a' starts with 'b' in a case insensitive way
|
||||
*/
|
||||
static bool startsWithInsensitive(const QByteArray &a, const char *b)
|
||||
{
|
||||
int len = strlen(b);
|
||||
return a.size() >= len && qstrnicmp(a.constData(), b, len) == 0;
|
||||
}
|
||||
|
||||
bool SqlQuery::isSelect()
|
||||
{
|
||||
return (!_sql.isEmpty() && _sql.startsWith("SELECT", Qt::CaseInsensitive));
|
||||
return startsWithInsensitive(_sql, "SELECT");
|
||||
}
|
||||
|
||||
bool SqlQuery::isPragma()
|
||||
{
|
||||
return (!_sql.isEmpty() && _sql.startsWith("PRAGMA", Qt::CaseInsensitive));
|
||||
return startsWithInsensitive(_sql, "PRAGMA");
|
||||
}
|
||||
|
||||
bool SqlQuery::exec()
|
||||
@@ -440,8 +459,13 @@ int SqlQuery::numRowsAffected()
|
||||
|
||||
void SqlQuery::finish()
|
||||
{
|
||||
if (!_stmt)
|
||||
return;
|
||||
SQLITE_DO(sqlite3_finalize(_stmt));
|
||||
_stmt = 0;
|
||||
if (_sqldb) {
|
||||
_sqldb->_queries.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
void SqlQuery::reset_and_clear_bindings()
|
||||
@@ -452,4 +476,18 @@ void SqlQuery::reset_and_clear_bindings()
|
||||
}
|
||||
}
|
||||
|
||||
bool SqlQuery::initOrReset(const QByteArray &sql, OCC::SqlDatabase &db)
|
||||
{
|
||||
ENFORCE(!_sqldb || &db == _sqldb);
|
||||
_sqldb = &db;
|
||||
_db = db.sqliteDb();
|
||||
if (_stmt) {
|
||||
reset_and_clear_bindings();
|
||||
return true;
|
||||
} else {
|
||||
return prepare(sql) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
#include <QSet>
|
||||
|
||||
#include "ocsynclib.h"
|
||||
|
||||
@@ -29,6 +30,8 @@ struct sqlite3_stmt;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
class SqlQuery;
|
||||
|
||||
/**
|
||||
* @brief The SqlDatabase class
|
||||
* @ingroup libsync
|
||||
@@ -38,6 +41,7 @@ class OCSYNC_EXPORT SqlDatabase
|
||||
Q_DISABLE_COPY(SqlDatabase)
|
||||
public:
|
||||
explicit SqlDatabase();
|
||||
~SqlDatabase();
|
||||
|
||||
bool isOpen();
|
||||
bool openOrCreateReadWrite(const QString &filename);
|
||||
@@ -62,18 +66,54 @@ private:
|
||||
sqlite3 *_db;
|
||||
QString _error; // last error string
|
||||
int _errId;
|
||||
|
||||
friend class SqlQuery;
|
||||
QSet<SqlQuery *> _queries;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The SqlQuery class
|
||||
* @ingroup libsync
|
||||
*
|
||||
* There is basically 3 ways to initialize and use a query:
|
||||
*
|
||||
SqlQuery q1;
|
||||
[...]
|
||||
q1.initOrReset(...);
|
||||
q1.bindValue(...);
|
||||
q1.exec(...)
|
||||
*
|
||||
SqlQuery q2(db);
|
||||
q2.prepare(...);
|
||||
[...]
|
||||
q2.reset_and_clear_bindings();
|
||||
q2.bindValue(...);
|
||||
q2.exec(...)
|
||||
*
|
||||
SqlQuery q3("...", db);
|
||||
q3.bindValue(...);
|
||||
q3.exec(...)
|
||||
*
|
||||
*/
|
||||
class OCSYNC_EXPORT SqlQuery
|
||||
{
|
||||
Q_DISABLE_COPY(SqlQuery)
|
||||
public:
|
||||
explicit SqlQuery() = default;
|
||||
explicit SqlQuery(SqlDatabase &db);
|
||||
explicit SqlQuery(const QString &sql, SqlDatabase &db);
|
||||
explicit SqlQuery(const QByteArray &sql, SqlDatabase &db);
|
||||
/**
|
||||
* Prepare the SqlQuery if it was not prepared yet.
|
||||
* Otherwise, clear the results and the bindings.
|
||||
* return false if there is an error
|
||||
*/
|
||||
bool initOrReset(const QByteArray &sql, SqlDatabase &db);
|
||||
/**
|
||||
* Prepare the SqlQuery.
|
||||
* If the query was already prepared, this will first call finish(), and re-prepare it.
|
||||
* This function must only be used if the constructor was setting a SqlDatabase
|
||||
*/
|
||||
int prepare(const QByteArray &sql, bool allow_failure = false);
|
||||
|
||||
~SqlQuery();
|
||||
QString error() const;
|
||||
@@ -82,16 +122,13 @@ public:
|
||||
/// Checks whether the value at the given column index is NULL
|
||||
bool nullValue(int index);
|
||||
|
||||
|
||||
QString stringValue(int index);
|
||||
int intValue(int index);
|
||||
quint64 int64Value(int index);
|
||||
QByteArray baValue(int index);
|
||||
|
||||
bool isSelect();
|
||||
bool isPragma();
|
||||
bool exec();
|
||||
int prepare(const QString &sql, bool allow_failure = false);
|
||||
bool next();
|
||||
void bindValue(int pos, const QVariant &value);
|
||||
QString lastQuery() const;
|
||||
@@ -100,11 +137,12 @@ public:
|
||||
void finish();
|
||||
|
||||
private:
|
||||
sqlite3 *_db;
|
||||
sqlite3_stmt *_stmt;
|
||||
SqlDatabase *_sqldb = nullptr;
|
||||
sqlite3 *_db = nullptr;
|
||||
sqlite3_stmt *_stmt = nullptr;
|
||||
QString _error;
|
||||
int _errId;
|
||||
QString _sql;
|
||||
QByteArray _sql;
|
||||
};
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -27,7 +27,7 @@ static const char letters[] = " WDNVCKRSMm";
|
||||
template <typename Char>
|
||||
void RemotePermissions::fromArray(const Char *p)
|
||||
{
|
||||
_value = p ? notNullMask : 0;
|
||||
_value = notNullMask;
|
||||
if (!p)
|
||||
return;
|
||||
while (*p) {
|
||||
@@ -37,17 +37,7 @@ void RemotePermissions::fromArray(const Char *p)
|
||||
}
|
||||
}
|
||||
|
||||
RemotePermissions::RemotePermissions(const char *p)
|
||||
{
|
||||
fromArray(p);
|
||||
}
|
||||
|
||||
RemotePermissions::RemotePermissions(const QString &s)
|
||||
{
|
||||
fromArray(s.isEmpty() ? nullptr : s.utf16());
|
||||
}
|
||||
|
||||
QByteArray RemotePermissions::toString() const
|
||||
QByteArray RemotePermissions::toDbValue() const
|
||||
{
|
||||
QByteArray result;
|
||||
if (isNull())
|
||||
@@ -64,4 +54,25 @@ QByteArray RemotePermissions::toString() const
|
||||
return result;
|
||||
}
|
||||
|
||||
QByteArray RemotePermissions::toString() const
|
||||
{
|
||||
return toDbValue();
|
||||
}
|
||||
|
||||
RemotePermissions RemotePermissions::fromDbValue(const QByteArray &value)
|
||||
{
|
||||
if (value.isEmpty())
|
||||
return RemotePermissions();
|
||||
RemotePermissions perm;
|
||||
perm.fromArray(value.constData());
|
||||
return perm;
|
||||
}
|
||||
|
||||
RemotePermissions RemotePermissions::fromServerString(const QString &value)
|
||||
{
|
||||
RemotePermissions perm;
|
||||
perm.fromArray(value.utf16());
|
||||
return perm;
|
||||
}
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -57,11 +57,22 @@ public:
|
||||
// (by setting forceRemoteDiscovery in SyncJournalDb::checkConnect)
|
||||
PermissionsCount = IsMountedSub
|
||||
};
|
||||
RemotePermissions() = default;
|
||||
explicit RemotePermissions(const char *);
|
||||
explicit RemotePermissions(const QString &);
|
||||
|
||||
/// null permissions
|
||||
RemotePermissions() = default;
|
||||
|
||||
/// array with one character per permission, "" is null, " " is non-null but empty
|
||||
QByteArray toDbValue() const;
|
||||
|
||||
/// output for display purposes, no defined format (same as toDbValue in practice)
|
||||
QByteArray toString() const;
|
||||
|
||||
/// read value that was written with toDbValue()
|
||||
static RemotePermissions fromDbValue(const QByteArray &);
|
||||
|
||||
/// read a permissions string received from the server, never null
|
||||
static RemotePermissions fromServerString(const QString &);
|
||||
|
||||
bool hasPermission(Permissions p) const
|
||||
{
|
||||
return _value & (1 << static_cast<int>(p));
|
||||
|
||||
@@ -108,11 +108,17 @@ public:
|
||||
}
|
||||
int _chunk;
|
||||
int _transferid;
|
||||
quint64 _size; //currently unused
|
||||
qint64 _size;
|
||||
qint64 _modtime;
|
||||
int _errorCount;
|
||||
bool _valid;
|
||||
QByteArray _contentChecksum;
|
||||
/**
|
||||
* Returns true if this entry refers to a chunked upload that can be continued.
|
||||
* (As opposed to a small file transfer which is stored in the db so we can detect the case
|
||||
* when the upload succeeded, but the connection was dropped before we got the answer)
|
||||
*/
|
||||
bool isChunked() const { return _transferid != 0; }
|
||||
};
|
||||
|
||||
struct PollInfo
|
||||
@@ -159,20 +165,29 @@ public:
|
||||
void setSelectiveSyncList(SelectiveSyncListType type, const QStringList &list);
|
||||
|
||||
/**
|
||||
* Make sure that on the next sync, fileName is not read from the DB but uses the PROPFIND to
|
||||
* get the info from the server
|
||||
* Make sure that on the next sync fileName and its parents are discovered from the server.
|
||||
*
|
||||
* Specifically, this sets the md5 field of fileName and all its parents to _invalid_.
|
||||
* That means its metadata and, if it's a directory, its direct contents.
|
||||
*
|
||||
* Specifically, etag (md5 field) of fileName and all its parents are set to _invalid_.
|
||||
* That causes a metadata difference and a resulting discovery from the remote for the
|
||||
* affected folders.
|
||||
*
|
||||
* Since folders in the selective sync list will not be rediscovered (csync_ftw,
|
||||
* _csync_detect_update skip them), the _invalid_ marker will stay and it. And any
|
||||
* _csync_detect_update skip them), the _invalid_ marker will stay. And any
|
||||
* child items in the db will be ignored when reading a remote tree from the database.
|
||||
*
|
||||
* Any setFileRecord() call to affected directories before the next sync run will be
|
||||
* adjusted to retain the invalid etag via _etagStorageFilter.
|
||||
*/
|
||||
void avoidReadFromDbOnNextSync(const QString &fileName) { avoidReadFromDbOnNextSync(fileName.toUtf8()); }
|
||||
void avoidReadFromDbOnNextSync(const QByteArray &fileName);
|
||||
|
||||
/**
|
||||
* Wipe _etagStorageFilter. Also done implicitly on close().
|
||||
*/
|
||||
void clearEtagStorageFilter();
|
||||
|
||||
/**
|
||||
* Ensures full remote discovery happens on the next sync.
|
||||
*
|
||||
@@ -213,13 +228,13 @@ public:
|
||||
/// Store a new or updated record in the database
|
||||
void setConflictRecord(const ConflictRecord &record);
|
||||
|
||||
/// Retrieve a conflict record by path of the _conflict- file
|
||||
/// Retrieve a conflict record by path of the file with the conflict tag
|
||||
ConflictRecord conflictRecord(const QByteArray &path);
|
||||
|
||||
/// Delete a conflict record by path of the _conflict- file
|
||||
/// Delete a conflict record by path of the file with the conflict tag
|
||||
void deleteConflictRecord(const QByteArray &path);
|
||||
|
||||
/// Return all paths of _conflict- files with records in the db
|
||||
/// Return all paths of files with a conflict tag in the name and records in the db
|
||||
QByteArrayList conflictRecordPaths();
|
||||
|
||||
|
||||
@@ -230,6 +245,12 @@ public:
|
||||
*/
|
||||
void clearFileTable();
|
||||
|
||||
/**
|
||||
* Set the 'ItemTypeVirtualFileDownload' to all the files that have the ItemTypeVirtualFile flag
|
||||
* within the directory specified path path
|
||||
*/
|
||||
void markVirtualFileForDownloadRecursively(const QByteArray &path);
|
||||
|
||||
private:
|
||||
int getFileRecordCount();
|
||||
bool updateDatabaseStructure();
|
||||
@@ -239,7 +260,7 @@ private:
|
||||
void commitInternal(const QString &context, bool startTrans = true);
|
||||
void startTransaction();
|
||||
void commitTransaction();
|
||||
QStringList tableColumns(const QString &table);
|
||||
QVector<QByteArray> tableColumns(const QByteArray &table);
|
||||
bool checkConnect();
|
||||
|
||||
// Same as forceRemoteDiscoveryNextSync but without acquiring the lock
|
||||
@@ -256,48 +277,56 @@ private:
|
||||
int _transaction;
|
||||
bool _metadataTableIsEmpty;
|
||||
|
||||
// NOTE! when adding a query, don't forget to reset it in SyncJournalDb::close
|
||||
QScopedPointer<SqlQuery> _getFileRecordQuery;
|
||||
QScopedPointer<SqlQuery> _getFileRecordQueryByInode;
|
||||
QScopedPointer<SqlQuery> _getFileRecordQueryByFileId;
|
||||
QScopedPointer<SqlQuery> _getFilesBelowPathQuery;
|
||||
QScopedPointer<SqlQuery> _getAllFilesQuery;
|
||||
QScopedPointer<SqlQuery> _setFileRecordQuery;
|
||||
QScopedPointer<SqlQuery> _setFileRecordChecksumQuery;
|
||||
QScopedPointer<SqlQuery> _setFileRecordLocalMetadataQuery;
|
||||
QScopedPointer<SqlQuery> _getDownloadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _setDownloadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _deleteDownloadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _getUploadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _setUploadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _deleteUploadInfoQuery;
|
||||
QScopedPointer<SqlQuery> _deleteFileRecordPhash;
|
||||
QScopedPointer<SqlQuery> _deleteFileRecordRecursively;
|
||||
QScopedPointer<SqlQuery> _getErrorBlacklistQuery;
|
||||
QScopedPointer<SqlQuery> _setErrorBlacklistQuery;
|
||||
QScopedPointer<SqlQuery> _getSelectiveSyncListQuery;
|
||||
QScopedPointer<SqlQuery> _getChecksumTypeIdQuery;
|
||||
QScopedPointer<SqlQuery> _getChecksumTypeQuery;
|
||||
QScopedPointer<SqlQuery> _insertChecksumTypeQuery;
|
||||
QScopedPointer<SqlQuery> _getDataFingerprintQuery;
|
||||
QScopedPointer<SqlQuery> _setDataFingerprintQuery1;
|
||||
QScopedPointer<SqlQuery> _setDataFingerprintQuery2;
|
||||
QScopedPointer<SqlQuery> _getConflictRecordQuery;
|
||||
QScopedPointer<SqlQuery> _setConflictRecordQuery;
|
||||
QScopedPointer<SqlQuery> _deleteConflictRecordQuery;
|
||||
SqlQuery _getFileRecordQuery;
|
||||
SqlQuery _getFileRecordQueryByInode;
|
||||
SqlQuery _getFileRecordQueryByFileId;
|
||||
SqlQuery _getFilesBelowPathQuery;
|
||||
SqlQuery _getAllFilesQuery;
|
||||
SqlQuery _setFileRecordQuery;
|
||||
SqlQuery _setFileRecordChecksumQuery;
|
||||
SqlQuery _setFileRecordLocalMetadataQuery;
|
||||
SqlQuery _getDownloadInfoQuery;
|
||||
SqlQuery _setDownloadInfoQuery;
|
||||
SqlQuery _deleteDownloadInfoQuery;
|
||||
SqlQuery _getUploadInfoQuery;
|
||||
SqlQuery _setUploadInfoQuery;
|
||||
SqlQuery _deleteUploadInfoQuery;
|
||||
SqlQuery _deleteFileRecordPhash;
|
||||
SqlQuery _deleteFileRecordRecursively;
|
||||
SqlQuery _getErrorBlacklistQuery;
|
||||
SqlQuery _setErrorBlacklistQuery;
|
||||
SqlQuery _getSelectiveSyncListQuery;
|
||||
SqlQuery _getChecksumTypeIdQuery;
|
||||
SqlQuery _getChecksumTypeQuery;
|
||||
SqlQuery _insertChecksumTypeQuery;
|
||||
SqlQuery _getDataFingerprintQuery;
|
||||
SqlQuery _setDataFingerprintQuery1;
|
||||
SqlQuery _setDataFingerprintQuery2;
|
||||
SqlQuery _getConflictRecordQuery;
|
||||
SqlQuery _setConflictRecordQuery;
|
||||
SqlQuery _deleteConflictRecordQuery;
|
||||
|
||||
/* This is the list of paths we called avoidReadFromDbOnNextSync on.
|
||||
* It means that they should not be written to the DB in any case since doing
|
||||
* that would write the etag and would void the purpose of avoidReadFromDbOnNextSync
|
||||
/* Storing etags to these folders, or their parent folders, is filtered out.
|
||||
*
|
||||
* When avoidReadFromDbOnNextSync() is called some etags to _invalid_ in the
|
||||
* database. If this is done during a sync run, a later propagation job might
|
||||
* undo that by writing the correct etag to the database instead. This filter
|
||||
* will prevent this write and instead guarantee the _invalid_ etag stays in
|
||||
* place.
|
||||
*
|
||||
* The list is cleared on close() (end of sync run) and explicitly with
|
||||
* clearEtagStorageFilter() (start of sync run).
|
||||
*
|
||||
* The contained paths have a trailing /.
|
||||
*/
|
||||
QList<QByteArray> _avoidReadFromDbOnNextSyncFilter;
|
||||
QList<QByteArray> _etagStorageFilter;
|
||||
|
||||
/** The journal mode to use for the db.
|
||||
*
|
||||
* Typically WAL initially, but may be set to other modes via environment
|
||||
* variable, for specific filesystems, or when WAL fails in a particular way.
|
||||
*/
|
||||
QString _journalMode;
|
||||
QByteArray _journalMode;
|
||||
};
|
||||
|
||||
bool OCSYNC_EXPORT
|
||||
|
||||
@@ -29,9 +29,20 @@ SyncJournalFileRecord::SyncJournalFileRecord()
|
||||
{
|
||||
}
|
||||
|
||||
QByteArray SyncJournalFileRecord::numericFileId() const
|
||||
QByteArray SyncJournalFileRecord::legacyDeriveNumericFileId() const
|
||||
{
|
||||
// Use the id up until the first non-numeric character
|
||||
// The id property which is stored in _fileId is
|
||||
// leftpad_with_zero(fileid, 8) + instanceid
|
||||
// so if it starts with a 0 we know the first 8 bytes
|
||||
// can be taken.
|
||||
if (_fileId.startsWith('0')) {
|
||||
return _fileId.left(8);
|
||||
}
|
||||
|
||||
// Otherwise we don't know exactly how long it is,
|
||||
// use every digit until the first letter. The instanceid of
|
||||
// oc >= 6 starts with "oc". This will break for older instances
|
||||
// that have a digit as the first character of the instance id.
|
||||
for (int i = 0; i < _fileId.size(); ++i) {
|
||||
if (_fileId[i] < '0' || _fileId[i] > '9') {
|
||||
return _fileId.left(i);
|
||||
|
||||
@@ -45,13 +45,18 @@ public:
|
||||
return !_path.isEmpty();
|
||||
}
|
||||
|
||||
/** Returns the numeric part of the full id in _fileId.
|
||||
/** Returns a guess for the numeric part of the full id in _fileId.
|
||||
*
|
||||
* On the server this is sometimes known as the internal file id.
|
||||
* On the server this is sometimes known as the internal file id, the "fileid" DAV property.
|
||||
*
|
||||
* It is used in the construction of private links.
|
||||
* It is used in the fallback construction of private links.
|
||||
*
|
||||
* New code should not use this function: Request the fileid property from the server.
|
||||
* In the future we might store the fileid instead of the id, but the migration is complex
|
||||
* if we don't want to store both.
|
||||
*/
|
||||
QByteArray numericFileId() const;
|
||||
QByteArray legacyDeriveNumericFileId() const;
|
||||
|
||||
QDateTime modDateTime() const { return Utility::qDateTimeFromTime_t(_modtime); }
|
||||
|
||||
QByteArray _path;
|
||||
@@ -109,23 +114,23 @@ public:
|
||||
QString _file;
|
||||
QString _renameTarget;
|
||||
|
||||
/// The last X-Request-ID of the request that failled
|
||||
QByteArray _requestId;
|
||||
|
||||
bool isValid() const;
|
||||
};
|
||||
|
||||
/** Represents a conflict in the conflicts table.
|
||||
*
|
||||
* In the following the "conflict file" is the file with the "_conflict-"
|
||||
* tag and the base file is the file that its a conflict for. So if
|
||||
* a/foo.txt is the base file, its conflict file could be
|
||||
* a/foo_conflict-1234.txt.
|
||||
* In the following the "conflict file" is the file that has the conflict
|
||||
* tag in the filename, and the base file is the file that it's a conflict for.
|
||||
* So if "a/foo.txt" is the base file, its conflict file could be
|
||||
* "a/foo (conflicted copy 1234).txt".
|
||||
*/
|
||||
class OCSYNC_EXPORT ConflictRecord
|
||||
{
|
||||
public:
|
||||
/** Path to the _conflict- file
|
||||
*
|
||||
* So if a/foo.txt has a conflict, this path would point to
|
||||
* a/foo_conflict-1234.txt.
|
||||
/** Path to the file with the conflict tag in the name
|
||||
*
|
||||
* The path is sync-folder relative.
|
||||
*/
|
||||
@@ -146,6 +151,17 @@ public:
|
||||
*/
|
||||
QByteArray baseEtag;
|
||||
|
||||
/**
|
||||
* The path of the original file at the time the conflict was created
|
||||
*
|
||||
* Note that in nearly all cases one should query the db by baseFileId and
|
||||
* thus retrieve the *current* base path instead!
|
||||
*
|
||||
* maybe be empty if not available
|
||||
*/
|
||||
QByteArray initialBasePath;
|
||||
|
||||
|
||||
bool isValid() const { return !path.isEmpty(); }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -254,15 +254,17 @@ void Utility::usleep(int usec)
|
||||
QThread::usleep(usec);
|
||||
}
|
||||
|
||||
bool Utility::fsCasePreserving()
|
||||
{
|
||||
#ifdef WITH_TESTING
|
||||
// This can be overriden from the tests
|
||||
OCSYNC_EXPORT bool fsCasePreserving_override = []()-> bool {
|
||||
QByteArray env = qgetenv("OWNCLOUD_TEST_CASE_PRESERVING");
|
||||
if (!env.isEmpty())
|
||||
return env.toInt();
|
||||
#endif
|
||||
return Utility::isWindows() || Utility::isMac();
|
||||
}();
|
||||
|
||||
return isWindows() || isMac();
|
||||
bool Utility::fsCasePreserving()
|
||||
{
|
||||
return fsCasePreserving_override;
|
||||
}
|
||||
|
||||
bool Utility::fileNamesEqual(const QString &fn1, const QString &fn2)
|
||||
@@ -542,18 +544,29 @@ QUrl Utility::concatUrlPath(const QUrl &url, const QString &concatPath,
|
||||
return tmpUrl;
|
||||
}
|
||||
|
||||
QString Utility::makeConflictFileName(const QString &fn, const QDateTime &dt)
|
||||
QString Utility::makeConflictFileName(
|
||||
const QString &fn, const QDateTime &dt, const QString &user)
|
||||
{
|
||||
QString conflictFileName(fn);
|
||||
// Add _conflict-XXXX before the extension.
|
||||
// Add conflict tag before the extension.
|
||||
int dotLocation = conflictFileName.lastIndexOf('.');
|
||||
// If no extension, add it at the end (take care of cases like foo/.hidden or foo.bar/file)
|
||||
if (dotLocation <= conflictFileName.lastIndexOf('/') + 1) {
|
||||
dotLocation = conflictFileName.size();
|
||||
}
|
||||
QString timeString = dt.toString("yyyyMMdd-hhmmss");
|
||||
|
||||
conflictFileName.insert(dotLocation, "_conflict-" + timeString);
|
||||
QString conflictMarker = QStringLiteral(" (conflicted copy ");
|
||||
if (!user.isEmpty()) {
|
||||
// Don't allow parens in the user name, to ensure
|
||||
// we can find the beginning and end of the conflict tag.
|
||||
const auto userName = sanitizeForFileName(user).replace('(', '_').replace(')', '_');
|
||||
conflictMarker.append(userName);
|
||||
conflictMarker.append(' ');
|
||||
}
|
||||
conflictMarker.append(dt.toString("yyyy-MM-dd hhmmss"));
|
||||
conflictMarker.append(')');
|
||||
|
||||
conflictFileName.insert(dotLocation, conflictMarker);
|
||||
return conflictFileName;
|
||||
}
|
||||
|
||||
@@ -566,13 +579,28 @@ bool Utility::isConflictFile(const char *name)
|
||||
bname = name;
|
||||
}
|
||||
|
||||
return std::strstr(bname, "_conflict-");
|
||||
// Old pattern
|
||||
if (std::strstr(bname, "_conflict-"))
|
||||
return true;
|
||||
|
||||
// New pattern
|
||||
if (std::strstr(bname, "(conflicted copy"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Utility::isConflictFile(const QString &name)
|
||||
{
|
||||
auto bname = name.midRef(name.lastIndexOf('/') + 1);
|
||||
return bname.contains("_conflict-", Utility::fsCasePreserving() ? Qt::CaseInsensitive : Qt::CaseSensitive);
|
||||
|
||||
if (bname.contains(QStringLiteral("_conflict-")))
|
||||
return true;
|
||||
|
||||
if (bname.contains(QStringLiteral("(conflicted copy")))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QByteArray Utility::conflictFileBaseName(const QByteArray &conflictName)
|
||||
@@ -580,19 +608,44 @@ QByteArray Utility::conflictFileBaseName(const QByteArray &conflictName)
|
||||
// This function must be able to deal with conflict files for conflict files.
|
||||
// To do this, we scan backwards, for the outermost conflict marker and
|
||||
// strip only that to generate the conflict file base name.
|
||||
int from = conflictName.size();
|
||||
while (from != -1) {
|
||||
auto start = conflictName.lastIndexOf("_conflict-", from);
|
||||
if (start == -1)
|
||||
return "";
|
||||
from = start - 1;
|
||||
auto startOld = conflictName.lastIndexOf("_conflict-");
|
||||
|
||||
auto end = conflictName.indexOf('.', start);
|
||||
if (end == -1)
|
||||
end = conflictName.size();
|
||||
return conflictName.left(start) + conflictName.mid(end);
|
||||
// A single space before "(conflicted copy" is considered part of the tag
|
||||
auto startNew = conflictName.lastIndexOf("(conflicted copy");
|
||||
if (startNew > 0 && conflictName[startNew - 1] == ' ')
|
||||
startNew -= 1;
|
||||
|
||||
// The rightmost tag is relevant
|
||||
auto tagStart = qMax(startOld, startNew);
|
||||
if (tagStart == -1)
|
||||
return "";
|
||||
|
||||
// Find the end of the tag
|
||||
auto tagEnd = conflictName.size();
|
||||
auto dot = conflictName.lastIndexOf('.'); // dot could be part of user name for new tag!
|
||||
if (dot > tagStart)
|
||||
tagEnd = dot;
|
||||
if (tagStart == startNew) {
|
||||
auto paren = conflictName.indexOf(')', tagStart);
|
||||
if (paren != -1)
|
||||
tagEnd = paren + 1;
|
||||
}
|
||||
return "";
|
||||
return conflictName.left(tagStart) + conflictName.mid(tagEnd);
|
||||
}
|
||||
|
||||
QString Utility::sanitizeForFileName(const QString &name)
|
||||
{
|
||||
const auto invalid = QStringLiteral("/?<>\\:*|\"");
|
||||
QString result;
|
||||
result.reserve(name.size());
|
||||
for (const auto c : name) {
|
||||
if (!invalid.contains(c)
|
||||
&& c.category() != QChar::Other_Control
|
||||
&& c.category() != QChar::Other_Format) {
|
||||
result.append(c);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -182,9 +182,24 @@ namespace Utility {
|
||||
with the given parent. If no parent is specified, the caller must destroy the settings */
|
||||
OCSYNC_EXPORT std::unique_ptr<QSettings> settingsWithGroup(const QString &group, QObject *parent = 0);
|
||||
|
||||
/** Sanitizes a string that shall become part of a filename.
|
||||
*
|
||||
* Filters out reserved characters like
|
||||
* - unicode control and format characters
|
||||
* - reserved characters: /, ?, <, >, \, :, *, |, and "
|
||||
*
|
||||
* Warning: This does not sanitize the whole resulting string, so
|
||||
* - unix reserved filenames ('.', '..')
|
||||
* - trailing periods and spaces
|
||||
* - windows reserved filenames ('CON' etc)
|
||||
* will pass unchanged.
|
||||
*/
|
||||
OCSYNC_EXPORT QString sanitizeForFileName(const QString &name);
|
||||
|
||||
/** Returns a file name based on \a fn that's suitable for a conflict.
|
||||
*/
|
||||
OCSYNC_EXPORT QString makeConflictFileName(const QString &fn, const QDateTime &dt);
|
||||
OCSYNC_EXPORT QString makeConflictFileName(
|
||||
const QString &fn, const QDateTime &dt, const QString &user);
|
||||
|
||||
/** Returns whether a file name indicates a conflict file
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
PROJECT( CrashReporter )
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
|
||||
list(APPEND crashreporter_SOURCES main.cpp)
|
||||
list(APPEND crashreporter_RC resources.qrc)
|
||||
|
||||
# TODO: differentiate release channel
|
||||
# if(BUILD_RELEASE)
|
||||
# set(CRASHREPORTER_RELEASE_CHANNEL "release")
|
||||
@@ -11,9 +8,27 @@ list(APPEND crashreporter_RC resources.qrc)
|
||||
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
|
||||
# endif()
|
||||
|
||||
# Theme
|
||||
if(DEFINED OEM_THEME_DIR AND EXISTS "${OEM_THEME_DIR}/theme/colored")
|
||||
set(CRASHREPORTER_ICON_DIR "${OEM_THEME_DIR}/theme/colored")
|
||||
else()
|
||||
set(CRASHREPORTER_ICON_DIR "${CMAKE_SOURCE_DIR}/theme/colored")
|
||||
endif()
|
||||
|
||||
set(CRASHREPORTER_ICON_FILENAME "${APPLICATION_ICON_NAME}-icon.png")
|
||||
set(CRASHREPORTER_ICON ":/${CRASHREPORTER_ICON_FILENAME}")
|
||||
set(CRASHREPORTER_ICON_SIZE "128")
|
||||
set(CRASHREPORTER_ICON_PATH "${CRASHREPORTER_ICON_DIR}/${CRASHREPORTER_ICON_SIZE}-${CRASHREPORTER_ICON_FILENAME}")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources.qrc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/resources.qrc)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
|
||||
|
||||
# Sources
|
||||
list(APPEND crashreporter_SOURCES main.cpp)
|
||||
list(APPEND crashreporter_RC "${CMAKE_CURRENT_BINARY_DIR}/resources.qrc")
|
||||
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
@@ -21,15 +36,15 @@ if(NOT BUILD_LIBRARIES_ONLY)
|
||||
${crashreporter_SOURCES}
|
||||
${crashreporter_HEADERS_MOC}
|
||||
${crashreporter_UI_HEADERS}
|
||||
${crashreporter_RC_RCC}
|
||||
${crashreporter_RC}
|
||||
)
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets)
|
||||
|
||||
target_include_directories(${CRASHREPORTER_EXECUTABLE} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTOMOC ON)
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTORCC ON)
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
||||
target_link_libraries(${CRASHREPORTER_EXECUTABLE}
|
||||
crashreporter-gui
|
||||
Qt5::Core Qt5::Widgets
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="owncloud-icon.png">../../theme/colored/owncloud-icon-128.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
5
src/crashreporter/resources.qrc.in
Normal file
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="@CRASHREPORTER_ICON_FILENAME@">@CRASHREPORTER_ICON_PATH@</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -69,36 +69,35 @@ endif()
|
||||
|
||||
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
|
||||
|
||||
set(CSYNC_LIBRARY ocsync)
|
||||
add_library(${CSYNC_LIBRARY} SHARED ${common_SOURCES} ${csync_SRCS})
|
||||
add_library("${csync_NAME}" SHARED ${common_SOURCES} ${csync_SRCS})
|
||||
|
||||
target_include_directories(
|
||||
${CSYNC_LIBRARY}
|
||||
"${csync_NAME}"
|
||||
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std
|
||||
)
|
||||
|
||||
find_package(SQLite3 3.8.0 REQUIRED)
|
||||
if (USE_OUR_OWN_SQLITE3)
|
||||
# make sure that the path for the local sqlite3 is before the system one
|
||||
target_include_directories(${CSYNC_LIBRARY} BEFORE PRIVATE ${SQLITE3_INCLUDE_DIR})
|
||||
target_include_directories("${csync_NAME}" BEFORE PRIVATE ${SQLITE3_INCLUDE_DIR})
|
||||
else()
|
||||
target_include_directories(${CSYNC_LIBRARY} PRIVATE ${SQLITE3_INCLUDE_DIR})
|
||||
target_include_directories("${csync_NAME}" PRIVATE ${SQLITE3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
generate_export_header(${CSYNC_LIBRARY}
|
||||
generate_export_header("${csync_NAME}"
|
||||
EXPORT_MACRO_NAME OCSYNC_EXPORT
|
||||
EXPORT_FILE_NAME ocsynclib.h
|
||||
)
|
||||
|
||||
target_link_libraries(${CSYNC_LIBRARY}
|
||||
target_link_libraries("${csync_NAME}"
|
||||
${CSYNC_REQUIRED_LIBRARIES}
|
||||
${SQLITE3_LIBRARIES}
|
||||
Qt5::Core Qt5::Concurrent
|
||||
)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(${CSYNC_LIBRARY} ZLIB::ZLIB)
|
||||
target_link_libraries("${csync_NAME}" ZLIB::ZLIB)
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
|
||||
@@ -106,11 +105,11 @@ endif(ZLIB_FOUND)
|
||||
if (APPLE)
|
||||
find_library(FOUNDATION_LIBRARY NAMES Foundation)
|
||||
find_library(CORESERVICES_LIBRARY NAMES CoreServices)
|
||||
target_link_libraries(${CSYNC_LIBRARY} ${FOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})
|
||||
target_link_libraries("${csync_NAME}" ${FOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${CSYNC_LIBRARY}
|
||||
"${csync_NAME}"
|
||||
PROPERTIES
|
||||
VERSION
|
||||
${LIBRARY_VERSION}
|
||||
@@ -122,7 +121,7 @@ set_target_properties(
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
INSTALL(
|
||||
TARGETS
|
||||
${CSYNC_LIBRARY}
|
||||
"${csync_NAME}"
|
||||
LIBRARY DESTINATION
|
||||
${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION
|
||||
@@ -133,13 +132,13 @@ if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
else()
|
||||
INSTALL(
|
||||
TARGETS
|
||||
${CSYNC_LIBRARY}
|
||||
"${csync_NAME}"
|
||||
LIBRARY DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION
|
||||
${CMAKE_INSTALL_BINDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -17,4 +17,3 @@
|
||||
#cmakedefine HAVE___MINGW_ASPRINTF 1
|
||||
#cmakedefine HAVE_ASPRINTF 1
|
||||
|
||||
#cmakedefine WITH_TESTING 1
|
||||
|
||||
@@ -126,12 +126,7 @@ int csync_update(CSYNC *ctx) {
|
||||
}
|
||||
|
||||
int csync_reconcile(CSYNC *ctx) {
|
||||
int rc = -1;
|
||||
|
||||
if (ctx == NULL) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
Q_ASSERT(ctx);
|
||||
ctx->status_code = CSYNC_STATUS_OK;
|
||||
|
||||
/* Reconciliation for local replica */
|
||||
@@ -140,54 +135,31 @@ int csync_reconcile(CSYNC *ctx) {
|
||||
|
||||
ctx->current = LOCAL_REPLICA;
|
||||
|
||||
rc = csync_reconcile_updates(ctx);
|
||||
csync_reconcile_updates(ctx);
|
||||
|
||||
qCInfo(lcCSync) << "Reconciliation for local replica took " << timer.elapsed() / 1000.
|
||||
<< "seconds visiting " << ctx->local.files.size() << " files.";
|
||||
|
||||
if (rc < 0) {
|
||||
if (!CSYNC_STATUS_IS_OK(ctx->status_code)) {
|
||||
ctx->status_code = csync_errno_to_status( errno, CSYNC_STATUS_RECONCILE_ERROR );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Reconciliation for remote replica */
|
||||
timer.restart();
|
||||
|
||||
ctx->current = REMOTE_REPLICA;
|
||||
|
||||
rc = csync_reconcile_updates(ctx);
|
||||
csync_reconcile_updates(ctx);
|
||||
|
||||
qCInfo(lcCSync) << "Reconciliation for remote replica took " << timer.elapsed() / 1000.
|
||||
<< "seconds visiting " << ctx->remote.files.size() << " files.";
|
||||
|
||||
if (rc < 0) {
|
||||
if (!CSYNC_STATUS_IS_OK(ctx->status_code)) {
|
||||
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_RECONCILE_ERROR );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
ctx->status |= CSYNC_STATUS_RECONCILE;
|
||||
|
||||
rc = 0;
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* local visitor which calls the user visitor with repacked stat info.
|
||||
*/
|
||||
static int _csync_treewalk_visitor(csync_file_stat_t *cur, CSYNC * ctx) {
|
||||
int rc = 0;
|
||||
csync_treewalk_visit_func *visitor = NULL;
|
||||
_csync_treewalk_context *twctx = NULL;
|
||||
static int _csync_treewalk_visitor(csync_file_stat_t *cur, CSYNC * ctx, const csync_treewalk_visit_func &visitor) {
|
||||
csync_s::FileMap *other_tree = nullptr;
|
||||
|
||||
if (ctx == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* we need the opposite tree! */
|
||||
switch (ctx->current) {
|
||||
case LOCAL_REPLICA:
|
||||
@@ -220,80 +192,41 @@ static int _csync_treewalk_visitor(csync_file_stat_t *cur, CSYNC * ctx) {
|
||||
|
||||
ctx->status_code = CSYNC_STATUS_OK;
|
||||
|
||||
twctx = (_csync_treewalk_context*) ctx->callbacks.userdata;
|
||||
if (twctx == NULL) {
|
||||
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (twctx->instruction_filter > 0 &&
|
||||
!(twctx->instruction_filter & cur->instruction) ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
visitor = (csync_treewalk_visit_func*)(twctx->user_visitor);
|
||||
if (visitor != NULL) {
|
||||
rc = (*visitor)(cur, other, twctx->userdata);
|
||||
|
||||
return rc;
|
||||
}
|
||||
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
|
||||
return -1;
|
||||
Q_ASSERT(visitor);
|
||||
return visitor(cur, other);
|
||||
}
|
||||
|
||||
/*
|
||||
* treewalk function, called from its wrappers below.
|
||||
*
|
||||
* it encapsulates the user visitor function, the filter and the userdata
|
||||
* into a treewalk_context structure and calls the rb treewalk function,
|
||||
* which calls the local _csync_treewalk_visitor in this module.
|
||||
* The user visitor is called from there.
|
||||
*/
|
||||
static int _csync_walk_tree(CSYNC *ctx, csync_s::FileMap *tree, csync_treewalk_visit_func *visitor, int filter)
|
||||
static int _csync_walk_tree(CSYNC *ctx, csync_s::FileMap &tree, const csync_treewalk_visit_func &visitor)
|
||||
{
|
||||
_csync_treewalk_context tw_ctx;
|
||||
int rc = 0;
|
||||
|
||||
tw_ctx.userdata = ctx->callbacks.userdata;
|
||||
tw_ctx.user_visitor = visitor;
|
||||
tw_ctx.instruction_filter = filter;
|
||||
|
||||
ctx->callbacks.userdata = &tw_ctx;
|
||||
|
||||
for (auto &pair : *tree) {
|
||||
if (_csync_treewalk_visitor(pair.second.get(), ctx) < 0) {
|
||||
rc = -1;
|
||||
break;
|
||||
for (auto &pair : tree) {
|
||||
if (_csync_treewalk_visitor(pair.second.get(), ctx, visitor) < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if( rc < 0 ) {
|
||||
if( ctx->status_code == CSYNC_STATUS_OK )
|
||||
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_TREE_ERROR);
|
||||
}
|
||||
ctx->callbacks.userdata = tw_ctx.userdata;
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* wrapper function for treewalk on the remote tree
|
||||
*/
|
||||
int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter)
|
||||
int csync_walk_remote_tree(CSYNC *ctx, const csync_treewalk_visit_func &visitor)
|
||||
{
|
||||
ctx->status_code = CSYNC_STATUS_OK;
|
||||
ctx->current = REMOTE_REPLICA;
|
||||
return _csync_walk_tree(ctx, &ctx->remote.files, visitor, filter);
|
||||
return _csync_walk_tree(ctx, ctx->remote.files, visitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* wrapper function for treewalk on the local tree
|
||||
*/
|
||||
int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter)
|
||||
int csync_walk_local_tree(CSYNC *ctx, const csync_treewalk_visit_func &visitor)
|
||||
{
|
||||
ctx->status_code = CSYNC_STATUS_OK;
|
||||
ctx->current = LOCAL_REPLICA;
|
||||
return _csync_walk_tree(ctx, &ctx->local.files, visitor, filter);
|
||||
return _csync_walk_tree(ctx, ctx->local.files, visitor);
|
||||
}
|
||||
|
||||
int csync_s::reinitialize() {
|
||||
@@ -310,11 +243,8 @@ int csync_s::reinitialize() {
|
||||
renames.folder_renamed_from.clear();
|
||||
renames.folder_renamed_to.clear();
|
||||
|
||||
local_discovery_style = LocalDiscoveryStyle::FilesystemOnly;
|
||||
locally_touched_dirs.clear();
|
||||
|
||||
status = CSYNC_STATUS_INIT;
|
||||
SAFE_FREE(error_string);
|
||||
error_string.clear();
|
||||
|
||||
rc = 0;
|
||||
return rc;
|
||||
@@ -322,7 +252,6 @@ int csync_s::reinitialize() {
|
||||
|
||||
csync_s::~csync_s() {
|
||||
SAFE_FREE(local.uri);
|
||||
SAFE_FREE(error_string);
|
||||
}
|
||||
|
||||
void *csync_get_userdata(CSYNC *ctx) {
|
||||
@@ -368,11 +297,6 @@ CSYNC_STATUS csync_get_status(CSYNC *ctx) {
|
||||
return ctx->status_code;
|
||||
}
|
||||
|
||||
const char *csync_get_status_string(CSYNC *ctx)
|
||||
{
|
||||
return csync_vio_get_status_string(ctx);
|
||||
}
|
||||
|
||||
void csync_request_abort(CSYNC *ctx)
|
||||
{
|
||||
if (ctx != NULL) {
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <config_csync.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <QByteArray>
|
||||
#include "common/remotepermissions.h"
|
||||
@@ -64,40 +65,17 @@ enum csync_status_codes_e {
|
||||
CSYNC_STATUS_ERROR = 1024, /* don't use this code,
|
||||
*/
|
||||
CSYNC_STATUS_UNSUCCESSFUL, /* Unspecific problem happend */
|
||||
CSYNC_STATUS_NO_LOCK, /* OBSOLETE does not happen anymore */
|
||||
CSYNC_STATUS_STATEDB_LOAD_ERROR, /* Statedb can not be loaded. */
|
||||
CSYNC_STATUS_STATEDB_CORRUPTED, /* Statedb is corrupted */
|
||||
CSYNC_STATUS_NO_MODULE, /* URL passed to csync does not start with owncloud:// or ownclouds:// */
|
||||
CSYNC_STATUS_TIMESKEW, /* OBSOLETE */
|
||||
CSYNC_STATUS_FILESYSTEM_UNKNOWN, /* UNUSED */
|
||||
CSYNC_STATUS_TREE_ERROR, /* csync trees could not be created */
|
||||
CSYNC_STATUS_PARAM_ERROR, /* parameter is zero where not expected */
|
||||
CSYNC_STATUS_UPDATE_ERROR, /* general update or discovery error */
|
||||
CSYNC_STATUS_RECONCILE_ERROR, /* general reconcile error */
|
||||
CSYNC_STATUS_PROPAGATE_ERROR, /* OBSOLETE */
|
||||
CSYNC_STATUS_REMOTE_ACCESS_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_REMOTE_CREATE_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_REMOTE_STAT_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_LOCAL_CREATE_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_LOCAL_STAT_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_PROXY_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_LOOKUP_ERROR, /* Neon fails to find proxy. Almost OBSOLETE */
|
||||
CSYNC_STATUS_SERVER_AUTH_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_PROXY_AUTH_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_CONNECT_ERROR, /* neon driven connection failed */
|
||||
CSYNC_STATUS_TIMEOUT, /* UNUSED */
|
||||
CSYNC_STATUS_HTTP_ERROR, /* UNUSED */
|
||||
CSYNC_STATUS_PERMISSION_DENIED, /* */
|
||||
CSYNC_STATUS_NOT_FOUND,
|
||||
CSYNC_STATUS_FILE_EXISTS,
|
||||
CSYNC_STATUS_OUT_OF_SPACE,
|
||||
CSYNC_STATUS_QUOTA_EXCEEDED, /* UNUSED */
|
||||
CSYNC_STATUS_SERVICE_UNAVAILABLE,
|
||||
CSYNC_STATUS_STORAGE_UNAVAILABLE,
|
||||
CSYNC_STATUS_FILE_SIZE_ERROR,
|
||||
CSYNC_STATUS_CONTEXT_LOST,
|
||||
CSYNC_STATUS_MERGE_FILETREE_ERROR,
|
||||
CSYNC_STATUS_CSYNC_STATUS_ERROR,
|
||||
CSYNC_STATUS_OPENDIR_ERROR,
|
||||
CSYNC_STATUS_READDIR_ERROR,
|
||||
CSYNC_STATUS_OPEN_ERROR,
|
||||
@@ -159,7 +137,9 @@ enum ItemType {
|
||||
ItemTypeFile = 0,
|
||||
ItemTypeSoftLink = 1,
|
||||
ItemTypeDirectory = 2,
|
||||
ItemTypeSkip = 3
|
||||
ItemTypeSkip = 3,
|
||||
ItemTypeVirtualFile = 4,
|
||||
ItemTypeVirtualFileDownload = 5
|
||||
};
|
||||
|
||||
|
||||
@@ -305,38 +285,27 @@ CSYNC_STATUS OCSYNC_EXPORT csync_get_status(CSYNC *ctx);
|
||||
/* Used for special modes or debugging */
|
||||
int OCSYNC_EXPORT csync_set_status(CSYNC *ctx, int status);
|
||||
|
||||
typedef int csync_treewalk_visit_func(csync_file_stat_t *cur, csync_file_stat_t *other, void*);
|
||||
using csync_treewalk_visit_func = std::function<int(csync_file_stat_t *cur, csync_file_stat_t *other)>;
|
||||
|
||||
/**
|
||||
* @brief Walk the local file tree and call a visitor function for each file.
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
* @param visitor A callback function to handle the file info.
|
||||
* @param filter A filter, built from or'ed csync_instructions_e
|
||||
*
|
||||
* @return 0 on success, less than 0 if an error occurred.
|
||||
*/
|
||||
int OCSYNC_EXPORT csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter);
|
||||
int OCSYNC_EXPORT csync_walk_local_tree(CSYNC *ctx, const csync_treewalk_visit_func &visitor);
|
||||
|
||||
/**
|
||||
* @brief Walk the remote file tree and call a visitor function for each file.
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
* @param visitor A callback function to handle the file info.
|
||||
* @param filter A filter, built from and'ed csync_instructions_e
|
||||
*
|
||||
* @return 0 on success, less than 0 if an error occurred.
|
||||
*/
|
||||
int OCSYNC_EXPORT csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter);
|
||||
|
||||
/**
|
||||
* @brief Get the csync status string.
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
*
|
||||
* @return A const pointer to a string with more precise status info.
|
||||
*/
|
||||
const char OCSYNC_EXPORT *csync_get_status_string(CSYNC *ctx);
|
||||
int OCSYNC_EXPORT csync_walk_remote_tree(CSYNC *ctx, const csync_treewalk_visit_func &visitor);
|
||||
|
||||
/**
|
||||
* @brief Aborts the current sync run as soon as possible. Can be called from another thread.
|
||||
|
||||
@@ -33,9 +33,12 @@
|
||||
#include "csync_misc.h"
|
||||
|
||||
#include "common/utility.h"
|
||||
#include "../version.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QFileInfo>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
|
||||
/** Expands C-like escape sequences (in place)
|
||||
@@ -217,8 +220,8 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const char *path, bool excludeC
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We create a desktop.ini on Windows for the sidebar icon, make sure we don't sync them. */
|
||||
if (blen == 11) {
|
||||
/* We create a Desktop.ini on Windows for the sidebar icon, make sure we don't sync it. */
|
||||
if (blen == 11 && path == bname) {
|
||||
rc = csync_fnmatch("Desktop.ini", bname, 0);
|
||||
if (rc == 0) {
|
||||
match = CSYNC_FILE_SILENTLY_EXCLUDED;
|
||||
@@ -240,6 +243,7 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const char *path, bool excludeC
|
||||
using namespace OCC;
|
||||
|
||||
ExcludedFiles::ExcludedFiles()
|
||||
: _clientVersion(MIRALL_VERSION_MAJOR, MIRALL_VERSION_MINOR, MIRALL_VERSION_PATCH)
|
||||
{
|
||||
// Windows used to use PathMatchSpec which allows *foo to match abc/deffoo.
|
||||
_wildcardsMatchSlash = Utility::isWindows();
|
||||
@@ -278,6 +282,11 @@ void ExcludedFiles::setWildcardsMatchSlash(bool onoff)
|
||||
prepare();
|
||||
}
|
||||
|
||||
void ExcludedFiles::setClientVersion(ExcludedFiles::Version version)
|
||||
{
|
||||
_clientVersion = version;
|
||||
}
|
||||
|
||||
bool ExcludedFiles::reloadExcludeFiles()
|
||||
{
|
||||
_allExcludes.clear();
|
||||
@@ -290,6 +299,10 @@ bool ExcludedFiles::reloadExcludeFiles()
|
||||
}
|
||||
while (!f.atEnd()) {
|
||||
QByteArray line = f.readLine().trimmed();
|
||||
if (line.startsWith("#!version")) {
|
||||
if (!versionDirectiveKeepNextLine(line))
|
||||
f.readLine();
|
||||
}
|
||||
if (line.isEmpty() || line.startsWith('#'))
|
||||
continue;
|
||||
csync_exclude_expand_escapes(line);
|
||||
@@ -301,6 +314,32 @@ bool ExcludedFiles::reloadExcludeFiles()
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ExcludedFiles::versionDirectiveKeepNextLine(const QByteArray &directive) const
|
||||
{
|
||||
if (!directive.startsWith("#!version"))
|
||||
return true;
|
||||
QByteArrayList args = directive.split(' ');
|
||||
if (args.size() != 3)
|
||||
return true;
|
||||
QByteArray op = args[1];
|
||||
QByteArrayList argVersions = args[2].split('.');
|
||||
if (argVersions.size() != 3)
|
||||
return true;
|
||||
|
||||
auto argVersion = std::make_tuple(argVersions[0].toInt(), argVersions[1].toInt(), argVersions[2].toInt());
|
||||
if (op == "<=")
|
||||
return _clientVersion <= argVersion;
|
||||
if (op == "<")
|
||||
return _clientVersion < argVersion;
|
||||
if (op == ">")
|
||||
return _clientVersion > argVersion;
|
||||
if (op == ">=")
|
||||
return _clientVersion >= argVersion;
|
||||
if (op == "==")
|
||||
return _clientVersion == argVersion;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ExcludedFiles::isExcluded(
|
||||
const QString &filePath,
|
||||
const QString &basePath,
|
||||
|
||||
@@ -66,6 +66,8 @@ class OCSYNC_EXPORT ExcludedFiles : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef std::tuple<int, int, int> Version;
|
||||
|
||||
ExcludedFiles();
|
||||
~ExcludedFiles();
|
||||
|
||||
@@ -114,6 +116,11 @@ public:
|
||||
*/
|
||||
void setWildcardsMatchSlash(bool onoff);
|
||||
|
||||
/**
|
||||
* Sets the client version, only used for testing.
|
||||
*/
|
||||
void setClientVersion(Version version);
|
||||
|
||||
/**
|
||||
* Generate a hook for traversal exclude pattern matching
|
||||
* that csync can use.
|
||||
@@ -131,6 +138,23 @@ public slots:
|
||||
bool reloadExcludeFiles();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Returns true if the version directive indicates the next line
|
||||
* should be skipped.
|
||||
*
|
||||
* A version directive has the form "#!version <op> <version>"
|
||||
* where <op> can be <, <=, ==, >, >= and <version> can be any version
|
||||
* like 2.5.0.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* #!version < 2.5.0
|
||||
* myexclude
|
||||
*
|
||||
* Would enable the "myexclude" pattern only for versions before 2.5.0.
|
||||
*/
|
||||
bool versionDirectiveKeepNextLine(const QByteArray &directive) const;
|
||||
|
||||
/**
|
||||
* @brief Match the exclude pattern against the full path.
|
||||
*
|
||||
@@ -216,6 +240,12 @@ private:
|
||||
*/
|
||||
bool _wildcardsMatchSlash = false;
|
||||
|
||||
/**
|
||||
* The client version. Used to evaluate version-dependent excludes,
|
||||
* see versionDirectiveKeepNextLine().
|
||||
*/
|
||||
Version _clientVersion;
|
||||
|
||||
friend class ExcludedFilesTest;
|
||||
};
|
||||
|
||||
|
||||
@@ -32,19 +32,8 @@
|
||||
* should always be larger than the highest system errno. */
|
||||
#define CSYNC_CUSTOM_ERRNO_BASE 10000
|
||||
|
||||
#define ERRNO_GENERAL_ERROR CSYNC_CUSTOM_ERRNO_BASE+2
|
||||
#define ERRNO_LOOKUP_ERROR CSYNC_CUSTOM_ERRNO_BASE+3
|
||||
#define ERRNO_USER_UNKNOWN_ON_SERVER CSYNC_CUSTOM_ERRNO_BASE+4
|
||||
#define ERRNO_PROXY_AUTH CSYNC_CUSTOM_ERRNO_BASE+5
|
||||
#define ERRNO_CONNECT CSYNC_CUSTOM_ERRNO_BASE+6
|
||||
#define ERRNO_TIMEOUT CSYNC_CUSTOM_ERRNO_BASE+7
|
||||
#define ERRNO_PRECONDITION CSYNC_CUSTOM_ERRNO_BASE+8
|
||||
#define ERRNO_RETRY CSYNC_CUSTOM_ERRNO_BASE+9
|
||||
#define ERRNO_REDIRECT CSYNC_CUSTOM_ERRNO_BASE+10
|
||||
#define ERRNO_WRONG_CONTENT CSYNC_CUSTOM_ERRNO_BASE+11
|
||||
#define ERRNO_ERROR_STRING CSYNC_CUSTOM_ERRNO_BASE+13
|
||||
#define ERRNO_SERVICE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+14
|
||||
#define ERRNO_USER_ABORT CSYNC_CUSTOM_ERRNO_BASE+16
|
||||
#define ERRNO_STORAGE_UNAVAILABLE CSYNC_CUSTOM_ERRNO_BASE+17
|
||||
#define ERRNO_FORBIDDEN CSYNC_CUSTOM_ERRNO_BASE+18
|
||||
|
||||
|
||||
@@ -78,24 +78,6 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
status = CSYNC_STATUS_OK;
|
||||
break;
|
||||
/* The custom errnos first. */
|
||||
case ERRNO_GENERAL_ERROR:
|
||||
status = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
case ERRNO_LOOKUP_ERROR: /* In Neon: Server or proxy hostname lookup failed */
|
||||
status = CSYNC_STATUS_LOOKUP_ERROR;
|
||||
break;
|
||||
case ERRNO_USER_UNKNOWN_ON_SERVER: /* Neon: User authentication on server failed. */
|
||||
status = CSYNC_STATUS_SERVER_AUTH_ERROR;
|
||||
break;
|
||||
case ERRNO_PROXY_AUTH:
|
||||
status = CSYNC_STATUS_PROXY_AUTH_ERROR; /* Neon: User authentication on proxy failed */
|
||||
break;
|
||||
case ERRNO_CONNECT:
|
||||
status = CSYNC_STATUS_CONNECT_ERROR; /* Network: Connection error */
|
||||
break;
|
||||
case ERRNO_TIMEOUT:
|
||||
status = CSYNC_STATUS_TIMEOUT; /* Network: Timeout error */
|
||||
break;
|
||||
case ERRNO_SERVICE_UNAVAILABLE:
|
||||
status = CSYNC_STATUS_SERVICE_UNAVAILABLE; /* Service temporarily down */
|
||||
break;
|
||||
@@ -105,9 +87,6 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
case EFBIG:
|
||||
status = CSYNC_STATUS_FILE_SIZE_ERROR; /* File larger than 2MB */
|
||||
break;
|
||||
case ERRNO_PRECONDITION:
|
||||
case ERRNO_RETRY:
|
||||
case ERRNO_REDIRECT:
|
||||
case ERRNO_WRONG_CONTENT:
|
||||
status = CSYNC_STATUS_HTTP_ERROR;
|
||||
break;
|
||||
@@ -125,14 +104,12 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
case EEXIST: /* File exists */
|
||||
status = CSYNC_STATUS_FILE_EXISTS;
|
||||
break;
|
||||
case EINVAL:
|
||||
status = CSYNC_STATUS_PARAM_ERROR;
|
||||
break;
|
||||
case ENOSPC:
|
||||
status = CSYNC_STATUS_OUT_OF_SPACE;
|
||||
break;
|
||||
|
||||
/* All the remaining basic errnos: */
|
||||
case EINVAL: /* Invalid argument */
|
||||
case EIO: /* I/O error */
|
||||
case ESRCH: /* No such process */
|
||||
case EINTR: /* Interrupted system call */
|
||||
@@ -162,7 +139,6 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
case EMLINK: /* Too many links */
|
||||
case EPIPE: /* Broken pipe */
|
||||
|
||||
case ERRNO_ERROR_STRING:
|
||||
default:
|
||||
status = default_status;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,10 @@ struct OCSYNC_EXPORT csync_s {
|
||||
/* csync error code */
|
||||
enum csync_status_codes_e status_code = CSYNC_STATUS_OK;
|
||||
|
||||
char *error_string = nullptr;
|
||||
/* Some additional string information which is added to the error message corresponding to the error code in errno.
|
||||
* Usually a filename
|
||||
*/
|
||||
QString error_string;
|
||||
|
||||
int status = CSYNC_STATUS_INIT;
|
||||
volatile bool abort = false;
|
||||
@@ -190,20 +193,22 @@ struct OCSYNC_EXPORT csync_s {
|
||||
*/
|
||||
bool read_remote_from_db = false;
|
||||
|
||||
LocalDiscoveryStyle local_discovery_style = LocalDiscoveryStyle::FilesystemOnly;
|
||||
|
||||
/**
|
||||
* List of folder-relative directory paths that should be scanned on the
|
||||
* filesystem if the local_discovery_style suggests it.
|
||||
*
|
||||
* Their parents will be scanned too. The paths don't start with a /.
|
||||
*/
|
||||
std::set<QByteArray> locally_touched_dirs;
|
||||
std::function<bool(const QByteArray &)> should_discover_locally_fn;
|
||||
|
||||
bool ignore_hidden_files = true;
|
||||
|
||||
bool upload_conflict_files = false;
|
||||
|
||||
/**
|
||||
* Whether new remote files should start out as virtual.
|
||||
*/
|
||||
bool new_files_are_virtual = false;
|
||||
|
||||
/**
|
||||
* The suffix to use for virtual files.
|
||||
*/
|
||||
QByteArray virtual_file_suffix;
|
||||
|
||||
csync_s(const char *localUri, OCC::SyncJournalDb *statedb);
|
||||
~csync_s();
|
||||
int reinitialize();
|
||||
@@ -216,17 +221,6 @@ struct OCSYNC_EXPORT csync_s {
|
||||
csync_s &operator=(const csync_s &) = delete;
|
||||
};
|
||||
|
||||
/*
|
||||
* context for the treewalk function
|
||||
*/
|
||||
struct _csync_treewalk_context_s
|
||||
{
|
||||
csync_treewalk_visit_func *user_visitor;
|
||||
int instruction_filter;
|
||||
void *userdata;
|
||||
};
|
||||
typedef struct _csync_treewalk_context_s _csync_treewalk_context;
|
||||
|
||||
void set_errno_from_http_errcode( int err );
|
||||
|
||||
/**
|
||||
|
||||