mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-03 09:11:33 +02:00
Compare commits
608 Commits
v2.4.2
...
e2e-tech-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c04d1f1f69 | ||
|
|
f8d805d78b | ||
|
|
d85c2bf025 | ||
|
|
296f46356e | ||
|
|
dcc9ac7d2e | ||
|
|
d24a1e542e | ||
|
|
f4a50e88f5 | ||
|
|
682bb2ad43 | ||
|
|
d38e5e1529 | ||
|
|
7b123650da | ||
|
|
0c94142c97 | ||
|
|
e8849a2cf9 | ||
|
|
11946d9ef8 | ||
|
|
3c084bb6eb | ||
|
|
e9a7a56359 | ||
|
|
a003d216a5 | ||
|
|
32eaaa0601 | ||
|
|
be817748f8 | ||
|
|
b909bb6977 | ||
|
|
040507fce6 | ||
|
|
e2e99da446 | ||
|
|
bcb9553925 | ||
|
|
aa7e47f525 | ||
|
|
48bce4c6b0 | ||
|
|
84b26e0d4d | ||
|
|
3d162745af | ||
|
|
7a69e19e4d | ||
|
|
02988229b1 | ||
|
|
4892b0ec43 | ||
|
|
21d55c3321 | ||
|
|
72b9beb79c | ||
|
|
883080b557 | ||
|
|
ebfac84c69 | ||
|
|
3c2622d2de | ||
|
|
982c591ec9 | ||
|
|
1782ae3c08 | ||
|
|
7ce009ef49 | ||
|
|
59f2e0634e | ||
|
|
32bb1e6763 | ||
|
|
a2b8724adf | ||
|
|
bb85e2ab2c | ||
|
|
33beb7aade | ||
|
|
cae6bbc853 | ||
|
|
e2b89c5afe | ||
|
|
cf2fa2ea35 | ||
|
|
5d6817e165 | ||
|
|
261cedce3f | ||
|
|
2d872f2a8d | ||
|
|
009562da1e | ||
|
|
d5a76ea70d | ||
|
|
4a2d0ab9e9 | ||
|
|
5a97ddde5a | ||
|
|
b8539eb329 | ||
|
|
b9c7aa8df3 | ||
|
|
6d613fb4d5 | ||
|
|
127e675838 | ||
|
|
c1b5412c16 | ||
|
|
217c6bbcaf | ||
|
|
926609bd74 | ||
|
|
486ccaff56 | ||
|
|
e0cc93c047 | ||
|
|
4337e8532e | ||
|
|
4895b848c8 | ||
|
|
fe3c68b9dd | ||
|
|
4e7c033ae5 | ||
|
|
2a14ba5582 | ||
|
|
2a842a5745 | ||
|
|
cfe9909560 | ||
|
|
8331f04b5b | ||
|
|
cd36f73f6b | ||
|
|
5722d29e42 | ||
|
|
7839c4d4e1 | ||
|
|
969d90d15b | ||
|
|
d8a279c671 | ||
|
|
6d56f30d9b | ||
|
|
86ea5876cd | ||
|
|
bb8468c627 | ||
|
|
fc62e9e9d9 | ||
|
|
15967b1219 | ||
|
|
0656c77da8 | ||
|
|
81c20352e1 | ||
|
|
4e52ee9ebd | ||
|
|
6ee87a77cc | ||
|
|
539d6fd92e | ||
|
|
da98e2aa28 | ||
|
|
1f9763eda9 | ||
|
|
cbf470f17b | ||
|
|
1f12d6344b | ||
|
|
437d45981e | ||
|
|
3ae327ea8e | ||
|
|
1c721e9422 | ||
|
|
5d0aa5f039 | ||
|
|
41798cef18 | ||
|
|
1c11778693 | ||
|
|
3ddd4b6f16 | ||
|
|
d948ed11a1 | ||
|
|
257d8142b1 | ||
|
|
48c55b7d29 | ||
|
|
776bbbf7b1 | ||
|
|
f326bf371d | ||
|
|
99aebf292c | ||
|
|
01f3b82ea5 | ||
|
|
d1c84fd859 | ||
|
|
dbf15fb8dc | ||
|
|
a253129fd6 | ||
|
|
a8ba3ee9e1 | ||
|
|
9613f6437d | ||
|
|
9dc765142c | ||
|
|
585d2b20bd | ||
|
|
a7ee1a95a6 | ||
|
|
3abbbab6a0 | ||
|
|
d0e7f61db6 | ||
|
|
0f8790d993 | ||
|
|
86377aa37a | ||
|
|
3988f3ad77 | ||
|
|
ab9d6285c6 | ||
|
|
e2c895e61f | ||
|
|
ca92c46970 | ||
|
|
50916bcda5 | ||
|
|
c6491d50bb | ||
|
|
fdc96d3a4f | ||
|
|
e06e04ee93 | ||
|
|
7d68fa17e7 | ||
|
|
a63d34f870 | ||
|
|
c772857054 | ||
|
|
c963259bfb | ||
|
|
6e445033c7 | ||
|
|
efc039863b | ||
|
|
da9f1c412d | ||
|
|
06c34ed617 | ||
|
|
60ef722b60 | ||
|
|
e70bf44aaf | ||
|
|
124a7253a4 | ||
|
|
a642d99d4b | ||
|
|
65dfc47ac7 | ||
|
|
0dc7831336 | ||
|
|
b72113a53d | ||
|
|
df5fd3fbe6 | ||
|
|
7be5f0a736 | ||
|
|
d87648c99a | ||
|
|
25d58ccd58 | ||
|
|
dd0528037d | ||
|
|
7e83f0591b | ||
|
|
3760b86e07 | ||
|
|
20198c5c7b | ||
|
|
3c301a8282 | ||
|
|
74bc9213c5 | ||
|
|
679bb1f18e | ||
|
|
14b18b146d | ||
|
|
5e23ca9658 | ||
|
|
b9f094cd94 | ||
|
|
c35b57cfba | ||
|
|
1e899f4172 | ||
|
|
0347cf4e9e | ||
|
|
fc73ad7476 | ||
|
|
b924ad7282 | ||
|
|
4551bbe0e0 | ||
|
|
a48a3e0acc | ||
|
|
ee281963fe | ||
|
|
ab89231ca2 | ||
|
|
d26ade1870 | ||
|
|
a1e6901ecc | ||
|
|
494ae31de9 | ||
|
|
a02246dc65 | ||
|
|
5609a1dbe8 | ||
|
|
aa36cc4a5c | ||
|
|
b9cdc8e922 | ||
|
|
23f832caf4 | ||
|
|
7ef2489f1d | ||
|
|
844e03d000 | ||
|
|
ce41e3e42f | ||
|
|
1940c2f9bf | ||
|
|
83e94c3ec7 | ||
|
|
a7c0cfc8eb | ||
|
|
7ae8ba35de | ||
|
|
8eebc53728 | ||
|
|
2e516dfc67 | ||
|
|
250c8ff1bf | ||
|
|
ee366df58f | ||
|
|
482ee875a1 | ||
|
|
5607e27f20 | ||
|
|
b10edfecfc | ||
|
|
43332d3ac7 | ||
|
|
8c178bd035 | ||
|
|
49a16ffb4b | ||
|
|
3b96097cf6 | ||
|
|
99b4381591 | ||
|
|
69a201a62d | ||
|
|
56028759d5 | ||
|
|
be3afd1291 | ||
|
|
ac524d8e85 | ||
|
|
82c07236c1 | ||
|
|
76b8d2536b | ||
|
|
4dc49ff3b0 | ||
|
|
4369853ddb | ||
|
|
de4492a2fd | ||
|
|
d870729709 | ||
|
|
1cedb1919f | ||
|
|
09fa5966da | ||
|
|
fe4bb52a6d | ||
|
|
f40cceaf04 | ||
|
|
042816bd0d | ||
|
|
c592871f94 | ||
|
|
8a963a67f2 | ||
|
|
586fd346ea | ||
|
|
e5ed8fc90a | ||
|
|
9916583ffa | ||
|
|
25734afd39 | ||
|
|
ea3558faf6 | ||
|
|
159c0e138f | ||
|
|
aca298ca64 | ||
|
|
2127b2629d | ||
|
|
c26d986dbf | ||
|
|
e55518f820 | ||
|
|
44854beefb | ||
|
|
7e41a811dd | ||
|
|
d2e159c385 | ||
|
|
f6f078d1ee | ||
|
|
ce37235cc4 | ||
|
|
0a58ea76e5 | ||
|
|
02283fc686 | ||
|
|
e6f835d138 | ||
|
|
33b1fcfe66 | ||
|
|
cd2057fc04 | ||
|
|
bae00358b9 | ||
|
|
58e8a25869 | ||
|
|
d517d92f6c | ||
|
|
71dcf7fc37 | ||
|
|
0a59faf03d | ||
|
|
7bd48b1327 | ||
|
|
8c652e061d | ||
|
|
a4816d6a8c | ||
|
|
1a503d54f6 | ||
|
|
263668b1cb | ||
|
|
3df65460f5 | ||
|
|
74672d493d | ||
|
|
0a83d3e743 | ||
|
|
a08a32ceca | ||
|
|
6745777ca3 | ||
|
|
f1b7d506ae | ||
|
|
70d562668c | ||
|
|
ccd8cff4db | ||
|
|
9f678652f8 | ||
|
|
76916b6c48 | ||
|
|
4878e824e5 | ||
|
|
893ca66af8 | ||
|
|
19120fde9f | ||
|
|
7fe4dd2163 | ||
|
|
4581d708ff | ||
|
|
e0a14cac5b | ||
|
|
ac844a2a45 | ||
|
|
7230fa6b4f | ||
|
|
e25af4f0dc | ||
|
|
863e86138f | ||
|
|
287670c9d6 | ||
|
|
994f3bb644 | ||
|
|
e5c780ee19 | ||
|
|
1c3d5ab158 | ||
|
|
5d668eca40 | ||
|
|
7ab127ad53 | ||
|
|
dd91f4a86e | ||
|
|
32f38dc5f8 | ||
|
|
79fe71db58 | ||
|
|
ed5385faa3 | ||
|
|
fe234499dd | ||
|
|
66aecb9626 | ||
|
|
6f35cbff6b | ||
|
|
387737d908 | ||
|
|
8c4928d9f6 | ||
|
|
18b456ea2c | ||
|
|
529442e0f8 | ||
|
|
35eb071874 | ||
|
|
a64bd6059b | ||
|
|
a623b14209 | ||
|
|
f609336bfc | ||
|
|
2cacf2547e | ||
|
|
0f60deb043 | ||
|
|
c4d3d0987d | ||
|
|
47b5cd0fbb | ||
|
|
dd903d447f | ||
|
|
d2d2df4c75 | ||
|
|
8c411b32f7 | ||
|
|
ccd050455a | ||
|
|
ffb9f69cf6 | ||
|
|
74c4d27ea0 | ||
|
|
e3050f7456 | ||
|
|
9cbe795045 | ||
|
|
0ee0243595 | ||
|
|
b6e986bb1b | ||
|
|
e0fbdfe175 | ||
|
|
632570a13b | ||
|
|
e6be710cdb | ||
|
|
0b00ab8a15 | ||
|
|
12adff76e2 | ||
|
|
6d145a676b | ||
|
|
5279e2fb37 | ||
|
|
51e355e403 | ||
|
|
45d9323653 | ||
|
|
57e0d7abcb | ||
|
|
8c94601ef2 | ||
|
|
f27ceb7fab | ||
|
|
60bde048c6 | ||
|
|
3b961204e1 | ||
|
|
e9907bc8ae | ||
|
|
6b9b5252de | ||
|
|
84a093e450 | ||
|
|
be8b99bf3a | ||
|
|
d949ec6877 | ||
|
|
e7b7b8923f | ||
|
|
a118419f0c | ||
|
|
407d71b305 | ||
|
|
d63e18aa9d | ||
|
|
26ba89c2a8 | ||
|
|
7c5150421c | ||
|
|
462353d0ee | ||
|
|
d31aa7836a | ||
|
|
0abe7a77fb | ||
|
|
ad408c5717 | ||
|
|
34e6534813 | ||
|
|
6d464d9dc6 | ||
|
|
2236d05d25 | ||
|
|
f0537b20d1 | ||
|
|
9878559002 | ||
|
|
6b3006b325 | ||
|
|
5dc73ffd8b | ||
|
|
b835bdc55b | ||
|
|
725be9ff54 | ||
|
|
aafe7c4732 | ||
|
|
d832312acc | ||
|
|
9394fe6e84 | ||
|
|
14aeb6921b | ||
|
|
8adfc28de7 | ||
|
|
a0f0e5617a | ||
|
|
6351c01ee7 | ||
|
|
e32fd58578 | ||
|
|
22a2ab8999 | ||
|
|
4755b8c8a3 | ||
|
|
19d64e6308 | ||
|
|
05d826a954 | ||
|
|
685ceacace | ||
|
|
ee4a848d9a | ||
|
|
7290cf2813 | ||
|
|
131fd4e483 | ||
|
|
be9cd358d4 | ||
|
|
6ad6852045 | ||
|
|
832cbef8e7 | ||
|
|
5514f14e88 | ||
|
|
ea9e2135a1 | ||
|
|
b53003792f | ||
|
|
6facd29663 | ||
|
|
3b157caf09 | ||
|
|
d7e05c9b05 | ||
|
|
d903afc4bf | ||
|
|
8e3e3a4575 | ||
|
|
c743cc171a | ||
|
|
8d537fdd3c | ||
|
|
4a66cf11d2 | ||
|
|
2698759525 | ||
|
|
1b1add5ead | ||
|
|
e5fdcd2f38 | ||
|
|
ef2529ca44 | ||
|
|
1a891423e5 | ||
|
|
41ebcd0b7e | ||
|
|
77ec3b086d | ||
|
|
88d87bf0ca | ||
|
|
eb43fa1459 | ||
|
|
8793fdbc69 | ||
|
|
4bb7ebb6aa | ||
|
|
3628f3739d | ||
|
|
b28b4705de | ||
|
|
560ce958de | ||
|
|
69d73162aa | ||
|
|
69dc099b17 | ||
|
|
c7d9abbea3 | ||
|
|
a986532442 | ||
|
|
cf56d58241 | ||
|
|
edb04c137c | ||
|
|
c695c50c33 | ||
|
|
5420741edb | ||
|
|
05c1bfb6cf | ||
|
|
17126de5c7 | ||
|
|
d9f6468310 | ||
|
|
10c6951438 | ||
|
|
56e38e6f80 | ||
|
|
238f0b3610 | ||
|
|
817baf292d | ||
|
|
ca6fa7b341 | ||
|
|
bacbf337d2 | ||
|
|
e85a339d94 | ||
|
|
66f0ce6616 | ||
|
|
fb2d31c9ce | ||
|
|
8865405a32 | ||
|
|
476fe66043 | ||
|
|
bb53c2586f | ||
|
|
23f5bb7ed9 | ||
|
|
1a47052aa3 | ||
|
|
e0988f482c | ||
|
|
d83e8819ce | ||
|
|
623eb29845 | ||
|
|
1436d5bac1 | ||
|
|
0b50afe915 | ||
|
|
cfb6e3be8c | ||
|
|
78136a10b0 | ||
|
|
08dfe86f37 | ||
|
|
0f1480728e | ||
|
|
ba3d2a61d5 | ||
|
|
e0d368cbb3 | ||
|
|
4f7265c04f | ||
|
|
6b53b4f257 | ||
|
|
77c0309e02 | ||
|
|
5395fc56b1 | ||
|
|
fd00e180f5 | ||
|
|
60729f1fc4 | ||
|
|
418401a33c | ||
|
|
2111aeaac1 | ||
|
|
69c709714d | ||
|
|
090336c928 | ||
|
|
307dfd195c | ||
|
|
304231811d | ||
|
|
ecb05020a9 | ||
|
|
d2992d92ba | ||
|
|
c358980448 | ||
|
|
42a3098595 | ||
|
|
58e2e6b30b | ||
|
|
8c342cb1dd | ||
|
|
17693a75e5 | ||
|
|
f4bbec1019 | ||
|
|
29b64640fa | ||
|
|
3f4d915a17 | ||
|
|
7e2085375f | ||
|
|
1c85f94b00 | ||
|
|
920047fa70 | ||
|
|
f7e74f520b | ||
|
|
5b51346e83 | ||
|
|
e2091bb0a3 | ||
|
|
9870f39dcb | ||
|
|
9318c487b9 | ||
|
|
1c32f6bb2e | ||
|
|
f9b1c724d6 | ||
|
|
4946848d08 | ||
|
|
f56e1d167d | ||
|
|
bc7e65b395 | ||
|
|
7f51803d04 | ||
|
|
9eabd2a32a | ||
|
|
19c6757a0f | ||
|
|
3636a59830 | ||
|
|
548302c367 | ||
|
|
a64a33c589 | ||
|
|
01bbbb7d08 | ||
|
|
f609ea3bef | ||
|
|
91223b1a3d | ||
|
|
ca0f9825ce | ||
|
|
f202593ce4 | ||
|
|
d8ed9e5bde | ||
|
|
c436b36b89 | ||
|
|
980bab422a | ||
|
|
6fbd3cf61a | ||
|
|
e6e1f765bd | ||
|
|
b2fe501706 | ||
|
|
2bfd85e3c7 | ||
|
|
e1eb374ac3 | ||
|
|
ea2c3828cb | ||
|
|
c1e2bdc3d2 | ||
|
|
09c3043c85 | ||
|
|
0a8c394ee9 | ||
|
|
cd44d8ed77 | ||
|
|
cfc38753b4 | ||
|
|
c424dec7d4 | ||
|
|
78078b714e | ||
|
|
36117336e7 | ||
|
|
d59c146488 | ||
|
|
6583ebdcd9 | ||
|
|
917e2e43c6 | ||
|
|
bdd3dc743b | ||
|
|
9143ddd0ad | ||
|
|
f46440eb67 | ||
|
|
96a6d64500 | ||
|
|
08bc21937b | ||
|
|
f64519bfbd | ||
|
|
494df32ee4 | ||
|
|
bbbd2319ed | ||
|
|
79c775bcd8 | ||
|
|
a3b1597d17 | ||
|
|
ecb4e96794 | ||
|
|
185cb2e39a | ||
|
|
c6610f6fbf | ||
|
|
d76ecf015c | ||
|
|
312f3a9bf3 | ||
|
|
fd9662b803 | ||
|
|
37810c0a19 | ||
|
|
38a76ac5bf | ||
|
|
d100f9ac67 | ||
|
|
5fc864adb6 | ||
|
|
2738d5d9ab | ||
|
|
0936cfee5d | ||
|
|
38962ca694 | ||
|
|
7e677516ae | ||
|
|
cabf7a79d5 | ||
|
|
2b12990f19 | ||
|
|
3184d4bb32 | ||
|
|
0cbbea9796 | ||
|
|
b19677ea97 | ||
|
|
dc0a0841fa | ||
|
|
351e65309c | ||
|
|
e36c8678d9 | ||
|
|
f793de4629 | ||
|
|
cd4908ac6a | ||
|
|
0ad05aee0d | ||
|
|
190f821d93 | ||
|
|
7aca2352be | ||
|
|
3143b32aa5 | ||
|
|
e8a76859c1 | ||
|
|
c219ceea52 | ||
|
|
608f5034ef | ||
|
|
78458662a5 | ||
|
|
800dd485ef | ||
|
|
f4ca43293b | ||
|
|
6161b5519b | ||
|
|
2cac928810 | ||
|
|
05927b68a8 | ||
|
|
b3f90111e2 | ||
|
|
254f6291df | ||
|
|
faa7fd1b32 | ||
|
|
76d95f8b87 | ||
|
|
4e90bd7a5a | ||
|
|
81e32e1a08 | ||
|
|
98ef3050d8 | ||
|
|
4c2e078eac | ||
|
|
dc3c3195b5 | ||
|
|
cda72effe2 | ||
|
|
0f21ed6a5b | ||
|
|
85a93efe51 | ||
|
|
82dd1775eb | ||
|
|
3bc1f63b0a | ||
|
|
2276df1eec | ||
|
|
ec52807e29 | ||
|
|
7f88a3e1cd | ||
|
|
74049e3e92 | ||
|
|
d01c7dc7db | ||
|
|
b92de38c31 | ||
|
|
78b082a23c | ||
|
|
1aa1e7f833 | ||
|
|
4d2261420d | ||
|
|
23153a4866 | ||
|
|
7f75a533d1 | ||
|
|
e47b8ffaca | ||
|
|
a79b0a3791 | ||
|
|
ce51ea34b9 | ||
|
|
0e8ce9c3db | ||
|
|
76faf4937b | ||
|
|
df05042e7f | ||
|
|
e8f17f5b0b | ||
|
|
7d1285d313 | ||
|
|
72131ff4ce | ||
|
|
c03d53e1dd | ||
|
|
bc5a6527f9 | ||
|
|
7ca1107ea0 | ||
|
|
4acb70e79d | ||
|
|
755b18db61 | ||
|
|
bf8151a8ad | ||
|
|
b810ce7768 | ||
|
|
1c0d80c20d | ||
|
|
ed9977a2b3 | ||
|
|
546c7c420a | ||
|
|
bdf3f1e271 | ||
|
|
4e90179065 | ||
|
|
43f85a787b | ||
|
|
a8c33885bb | ||
|
|
3591849279 | ||
|
|
8a094d2b0e | ||
|
|
deb123b80d | ||
|
|
7a97dc1783 | ||
|
|
41f215fd8d | ||
|
|
e0fa5723eb | ||
|
|
4947dc22ab | ||
|
|
157e933ae5 | ||
|
|
7fad474863 | ||
|
|
26dde9b543 | ||
|
|
b43e948167 | ||
|
|
9da3822305 | ||
|
|
61d949730b | ||
|
|
bfc7ea562d | ||
|
|
6d8c98f6b4 | ||
|
|
4aca1b9697 | ||
|
|
f96990b489 | ||
|
|
7280359c66 | ||
|
|
b30c3202f0 | ||
|
|
ac4be17192 | ||
|
|
39e9938cad | ||
|
|
f897a91354 | ||
|
|
5948f26884 | ||
|
|
95579b3de1 | ||
|
|
cba78eb11f | ||
|
|
cc7cb6b650 | ||
|
|
8eb466c9c5 | ||
|
|
cacba220f9 | ||
|
|
cdc5c1db43 | ||
|
|
63d99f3e30 | ||
|
|
067c174e61 | ||
|
|
993e1eb89c | ||
|
|
6cb4131024 | ||
|
|
ceccc661f1 | ||
|
|
53087ac803 | ||
|
|
d810c13304 | ||
|
|
3d2f5b6af1 | ||
|
|
e240904a32 | ||
|
|
58e0c6c630 | ||
|
|
501394ec6f |
174
.drone.yml
174
.drone.yml
@@ -1,91 +1,97 @@
|
||||
#
|
||||
# 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.4
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
pull: true
|
||||
tags: false
|
||||
depth: 1
|
||||
|
||||
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 ..
|
||||
qt-5.7:
|
||||
image: nextcloudci/client-5.7:client-5.7-2
|
||||
commands:
|
||||
# Install QtKeyChain
|
||||
- /bin/bash -c "
|
||||
source /opt/qt57/bin/qt57-env.sh &&
|
||||
cd /tmp &&
|
||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||
cd qtkeychain &&
|
||||
git checkout v0.8.0 &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake ../ &&
|
||||
make &&
|
||||
make install"
|
||||
# Build client
|
||||
- /bin/bash -c "
|
||||
source /opt/qt57/bin/qt57-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 ../ &&
|
||||
make"
|
||||
when:
|
||||
matrix:
|
||||
TESTS: qt-5.7
|
||||
qt-5.8:
|
||||
image: nextcloudci/client-5.8:client-5.8-2
|
||||
commands:
|
||||
# Install QtKeyChain
|
||||
- /bin/bash -c "
|
||||
source /opt/qt58/bin/qt58-env.sh &&
|
||||
cd /tmp &&
|
||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||
cd qtkeychain &&
|
||||
git checkout v0.8.0 &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake ../ &&
|
||||
make &&
|
||||
make install"
|
||||
# Build client
|
||||
- /bin/bash -c "
|
||||
source /opt/qt58/bin/qt58-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 ../ &&
|
||||
make"
|
||||
when:
|
||||
matrix:
|
||||
TESTS: qt-5.8
|
||||
qt-5.9:
|
||||
image: nextcloudci/client-5.9:client-5.9-3
|
||||
commands:
|
||||
# Install QtKeyChain
|
||||
- /bin/bash -c "
|
||||
source /opt/qt59/bin/qt59-env.sh &&
|
||||
cd /tmp &&
|
||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||
cd qtkeychain &&
|
||||
git checkout v0.8.0 &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake ../ &&
|
||||
make &&
|
||||
make install"
|
||||
# Build client
|
||||
- /bin/bash -c "
|
||||
source /opt/qt59/bin/qt59-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 ../ &&
|
||||
make"
|
||||
when:
|
||||
matrix:
|
||||
TESTS: qt-5.9
|
||||
AppImage-5.9:
|
||||
image: nextcloudci/client-appimage-ci:client-appimage-ci-8
|
||||
commands:
|
||||
- /bin/bash -c "./admin/linux/build-appimage.sh"
|
||||
when:
|
||||
matrix:
|
||||
BUILD: AppImage
|
||||
|
||||
building-clang:
|
||||
image: owncloudci/client:latest
|
||||
pull: true
|
||||
environment:
|
||||
- LC_ALL=C.UTF-8
|
||||
commands:
|
||||
- cd clang-build
|
||||
- ninja -j4
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: qt-5.7
|
||||
- TESTS: qt-5.8
|
||||
- TESTS: qt-5.9
|
||||
- BUILD: AppImage
|
||||
|
||||
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 ]
|
||||
branches: [ master, 2.* ]
|
||||
|
||||
60
.github/issue_template.md
vendored
60
.github/issue_template.md
vendored
@@ -1,60 +0,0 @@
|
||||
<!---
|
||||
Please try to only report a bug if it happens with the latest version
|
||||
The latest version can be seen by checking the ChangeLog: https://owncloud.org/changelog/desktop/
|
||||
|
||||
For support try: https://central.owncloud.org/c/desktop-client
|
||||
--->
|
||||
|
||||
|
||||
### Expected behaviour
|
||||
Tell us what should happen
|
||||
|
||||
### Actual behaviour
|
||||
Tell us what happens instead
|
||||
|
||||
### Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Server configuration
|
||||
Operating system:
|
||||
|
||||
Web server:
|
||||
|
||||
Database:
|
||||
|
||||
PHP version:
|
||||
|
||||
ownCloud version:
|
||||
|
||||
Storage backend (external storage):
|
||||
|
||||
### Client configuration
|
||||
Client version:
|
||||
|
||||
Operating system:
|
||||
|
||||
OS language:
|
||||
|
||||
Qt version used by client package (Linux only, see also Settings dialog):
|
||||
|
||||
Client package (From ownCloud or distro) (Linux only):
|
||||
|
||||
Installation path of client:
|
||||
|
||||
### Logs
|
||||
|
||||
Please use Gist (https://gist.github.com/) or a similar code paster for longer
|
||||
logs.
|
||||
|
||||
```Template for output < 10 lines```
|
||||
|
||||
1. Client logfile: Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
|
||||
(On Windows using `cmd.exe`, you might need to first `cd` into the ownCloud directory)
|
||||
(See also http://doc.owncloud.org/desktop/2.2/troubleshooting.html#client-logfile )
|
||||
|
||||
2. Web server error log:
|
||||
|
||||
3. Server logfile: ownCloud log (data/owncloud.log):
|
||||
|
||||
108
.github/release_template.md
vendored
108
.github/release_template.md
vendored
@@ -1,108 +0,0 @@
|
||||
<!--
|
||||
This is the template for new release issues.
|
||||
(originated from https://github.com/owncloud/client/wiki/Release%20Checklist%20Template)
|
||||
-->
|
||||
|
||||
Copy below text into a task and tick the items:
|
||||
|
||||
```
|
||||
Some weeks before the release:
|
||||
* [ ] Check if we should update the bundled sqlite3 (https://github.com/owncloud/client/tree/master/src/3rdparty/sqlite3)
|
||||
* [ ] Check if we should update Sparkle on build machine (https://github.com/sparkle-project/Sparkle/releases)
|
||||
* [ ] Ensure NSIS is up to date on the build machine
|
||||
* [ ] Ensure up-to-date dependencies (e.g. [latest Qt version](http://qt-project.org/downloads#qt-lib) is installed on the machine and picked up (cmake output)
|
||||
* [ ] Ensure the crash reporter server is up
|
||||
* [ ] Check crash reporter for bad crashes
|
||||
* [ ] 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
|
||||
* [ ] 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
|
||||
* [ ] Documentation should be online before the release http://doc.owncloud.org/desktop/1.X/
|
||||
* [ ] QA goes over https://github.com/owncloud/mirall/wiki/Testing-Scenarios
|
||||
* [ ] Make sure to have `client/ChangeLog` updated
|
||||
* use `git log --format=oneline v<lastrelease>...master` if your memory fails you
|
||||
* [ ] check if enterprise issues are fixed
|
||||
|
||||
One week before the release:
|
||||
* [ ] Communicate the release schedule on mailinglist release-coordination@owncloud.com. Give a high level overview of the upcoming new features, changes etc.
|
||||
* [ ] Ensure marketing is aware (marketing@owncloud.com) and prepared for the release (social, .com website, cust. communications)
|
||||
* [ ] Inform GCX knows the next version is about 1 week out (gcx@owncloud.com)
|
||||
|
||||
For all Betas and RCs:
|
||||
* [ ] 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
|
||||
* [ ] Create build for Windows using rotor job owncloud-client-win32 (uncheck the "nightly build" checkbox, check the "sign package" checkboxes) both themes 'ownCloud' and 'testpilotcould'
|
||||
* [ ] Create build for Mac using rotor, job owncloud-client-osx (uncheck the "nightly build" checkbox, check the "sign package" checkboxes) both themes 'ownCloud' and 'testpilotcould'
|
||||
* [ ] Create the beta tarball using Jenkins job ownCloud-client-source
|
||||
* [ ] Create Linux builds using rotor job owncloud-client-linux building (this magically interacts with the ownCloud-client-source job)
|
||||
* [ ] theme 'ownCloud' -> isv:ownCloud:community:testing
|
||||
* [ ] theme 'testpilotcould' -> isv:ownCloud:testpilot:testing
|
||||
* [ ] Copy builds from ```daily``` to ```testing``` on download.owncloud.com, double check the download links.
|
||||
* [ ] 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
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Create a signed tag using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Check crash reporter
|
||||
|
||||
For first Beta of a Major or Minor release:
|
||||
* [ ] branch off master to new version branch (e.g. master -> 2.1, when releasing 2.1)
|
||||
* [ ] Adjust `VERSION.cmake` in master and count up (e.g. 2.2)
|
||||
* [ ] Adjust translation jobs for [client](https://ci.owncloud.org/view/translation-sync/job/translation-sync-client/) and [NSIS](https://ci.owncloud.org/view/translation-sync/job/translation-sync-client-nsis/) to point to the release branch (e.g. 2.1).
|
||||
* [ ] Make sure there is a job for the docs of the new master branch and the current release branch on rotor.
|
||||
|
||||
Day before Release:
|
||||
* [ ] Check the translations coming from transifex: All synchronized?
|
||||
* [ ] Run the tx.pl scripts on the final code tag
|
||||
* [ ] Run ```make test```
|
||||
* [ ] Run smashbox on the final code tag
|
||||
* [ ] Inform product management and marketing that we are 1 day out
|
||||
|
||||
On Release Day (for final release):
|
||||
* [ ] Branch off a release branch called like the version (without v, v is for tags)
|
||||
* [ ] Double check ```VERSION.cmake```: Check the version number settings and suffix (beta etc.) to be removed. Commit change to 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
|
||||
* [ ] Add last updates to Changelog in the client source repository.
|
||||
* [ ] Create tar ball (automated by `ownCloud-client-source` jenkins job) and **immediately** sign it (asc file). (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Create build for Windows using rotor job owncloud-client-win32 (uncheck the "nightly build" checkbox, check the "sign package" checkboxes) both themes 'ownCloud' and 'testpilotcould'
|
||||
* [ ] Create build for Mac using rotor, job owncloud-client-osx (uncheck the "nightly build" checkbox, check the "sign package" checkboxes) both themes 'ownCloud' and 'testpilotcould'
|
||||
* [ ] Stop publishing on OBS
|
||||
* [ ] 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
|
||||
* [ ] Create Linux builds using rotor job owncloud-client-linux (this magically interacts with the ownCloud-client-source job)
|
||||
* 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`
|
||||
* [ ] theme 'ownCloud' -> isv:ownCloud:desktop
|
||||
* [ ] theme 'testpilotcloud' -> isv:ownCloud:testpilot
|
||||
* [ ] Linux: Update the testing repository to the latest stable version.
|
||||
* [ ] Inform GCX that a new tarball is available.
|
||||
* [ ] Copy builds and source tar ball from ```daily``` to ```stable``` on download.owncloud.com, double check the download links.
|
||||
* [ ] Check if the following packages are on download.owncloud.com/desktop/stable:
|
||||
* Windows binary package
|
||||
* Mac binary package
|
||||
* source tarballs
|
||||
* [ ] 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.
|
||||
* [ ] 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
|
||||
* [ ] Linux: Re-enable OBS publishing
|
||||
* Let obs build and publish exactly once. then
|
||||
* [ ] disable publishing and rebuild for the owncloud-client package and all its dependencies.
|
||||
* [ ] double-check that there are no _aggregatepac from other projects, if so disable rebuilding there too.
|
||||
* [ ] Update ASCII Changelog on http://download.owncloud.com/download/changelog-client
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Announce on announcements@owncloud.org
|
||||
* [ ] Create git signed tag in client repository using ```git tag -u E94E7B37 tagname```
|
||||
* [ ] 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
|
||||
* [ ] Days later: Update the updater script ```clientupdater.php``` (check the crash reporter if auto update is a good idea or we need a new release)
|
||||
* [ ] 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
|
||||
```
|
||||
38
.travis.yml
Normal file
38
.travis.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
language: generic
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BUILD_TYPE=debian
|
||||
|
||||
before_install:
|
||||
- admin/linux/travis-build.sh before_install
|
||||
|
||||
install:
|
||||
- admin/linux/travis-build.sh install
|
||||
|
||||
before_script:
|
||||
- admin/linux/travis-build.sh before_script
|
||||
|
||||
script:
|
||||
- admin/linux/travis-build.sh script
|
||||
|
||||
after_success:
|
||||
- admin/linux/travis-build.sh after_success
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: admin/linux/travis-build.sh ppa_deploy
|
||||
on:
|
||||
condition: ($BUILD_TYPE = debian)
|
||||
|
||||
branches:
|
||||
except:
|
||||
- # Do not build tags that we create when we upload to GitHub Releases
|
||||
- /^(?i:continuous)$/
|
||||
@@ -1,9 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_policy(VERSION 2.8.0)
|
||||
if(POLICY CMP0020)
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
project(client)
|
||||
|
||||
@@ -13,7 +9,7 @@ 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 )
|
||||
include ( ${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake )
|
||||
endif()
|
||||
# need this logic to not mess with re/uninstallations via macosx.pkgproj
|
||||
if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient")
|
||||
@@ -61,14 +57,6 @@ if(NOT WITH_CRASHREPORTER)
|
||||
message(STATUS "Build of crashreporter disabled.")
|
||||
endif()
|
||||
|
||||
#####
|
||||
## handle DBUS for Fdo notifications
|
||||
if( UNIX AND NOT APPLE )
|
||||
add_definitions( -DUSE_FDO_NOTIFICATIONS)
|
||||
set(WITH_DBUS ON)
|
||||
endif()
|
||||
####
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(DefineInstallationPaths)
|
||||
include(GenerateExportHeader)
|
||||
@@ -77,6 +65,12 @@ include(GetGitRevisionDescription)
|
||||
|
||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||
|
||||
add_definitions(
|
||||
-DQT_USE_QSTRINGBUILDER
|
||||
-DQT_MESSAGELOGCONTEXT #enable function name and line number in debug output
|
||||
-DQT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
# if we cannot get it from git, directly try .tag (packages)
|
||||
# this will work if the tar balls have been properly created
|
||||
# via git-archive.
|
||||
@@ -189,46 +183,30 @@ if(BUILD_CLIENT)
|
||||
endif()
|
||||
find_package(Sphinx)
|
||||
find_package(PdfLatex)
|
||||
|
||||
find_package(SQLite3 3.8.0 REQUIRED)
|
||||
# On some OS, we want to use our own, not the system sqlite
|
||||
if (USE_OUR_OWN_SQLITE3)
|
||||
include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
|
||||
if (WIN32)
|
||||
add_definitions(-DSQLITE_API=__declspec\(dllimport\))
|
||||
endif()
|
||||
endif()
|
||||
find_package(OpenSSL REQUIRED VERSION 1.0)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(GLib2)
|
||||
find_package(Gio)
|
||||
find_package(Libcloudproviders)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED APPLICATION_ICON_NAME)
|
||||
set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME})
|
||||
endif()
|
||||
|
||||
include(OwnCloudCPack.cmake)
|
||||
include(NextcloudCPack.cmake)
|
||||
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
if( WIN32 )
|
||||
add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
|
||||
add_definitions( -DNOMINMAX )
|
||||
# Get APIs from from Vista onwards.
|
||||
add_definitions( -D_WIN32_WINNT=0x0600)
|
||||
add_definitions( -DWINVER=0x0600)
|
||||
endif( WIN32 )
|
||||
|
||||
include(QtVersionAbstraction)
|
||||
setup_qt()
|
||||
if (${Qt5Core_VERSION_MAJOR} EQUAL "5")
|
||||
if (${Qt5Core_VERSION_MINOR} EQUAL "6" OR ${Qt5Core_VERSION_MINOR} GREATER 6)
|
||||
else()
|
||||
message(STATUS "If possible compile me with Qt 5.6 or higher.")
|
||||
endif()
|
||||
if (${Qt5Core_VERSION_MINOR} EQUAL "9" OR ${Qt5Core_VERSION_MINOR} GREATER 9)
|
||||
else()
|
||||
message(STATUS "For HTTP2 use Qt 5.9.2 or higher.")
|
||||
endif()
|
||||
endif()
|
||||
message("Qt ${Qt5Core_VERSION} at ${Qt5Core_INCLUDE_DIRS}")
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
## Submitting Desktop Client issues
|
||||
|
||||
If you have questions about how to use the ownCloud Desktop Client, please
|
||||
direct these to the [mailing list][mailinglist] or our [forum][forum].
|
||||
If you have questions about how to use the Nextcloud Desktop Client, please
|
||||
visit our [support site][support] or our [forum][forum].
|
||||
We are also available on [IRC][irc].
|
||||
|
||||
### Bug Reporting Guidelines
|
||||
* __Important__: Report the issue using our [template][template], it includes all the
|
||||
information we need to track down the issue.
|
||||
* __SECURITY__: Report any potential security bug to security@owncloud.com following our [security policy](https://owncloud.org/security/) instead of filing an issue in our bug tracker
|
||||
* This repository is *only* for issues within the ownCloud desktop client.
|
||||
* __SECURITY__: Report any potential security bug by following our [security policy](https://nextcloud.com/security/) instead of filing an issue in our bug tracker
|
||||
* This repository is *only* for issues within the Nextcloud desktop client.
|
||||
Issues in other components should be reported in their own repositores:
|
||||
- [ownCloud server](https://github.com/owncloud/core/issues)
|
||||
- [ownCloud apps](https://github.com/owncloud/apps/issues) (e.g. Calendar,
|
||||
Contacts...)
|
||||
- [Android client](https://github.com/owncloud/android/issues)
|
||||
- [iOS client](https://github.com/owncloud/ios-issues/issues)
|
||||
- [Nextcloud server](https://github.com/nextcloud/server/issues)
|
||||
- [Android client](https://github.com/nextcloud/android/issues)
|
||||
- [iOS client](https://github.com/nextcloud/ios/issues)
|
||||
* Search the existing issues first, it's likely that your issue was already
|
||||
reported.
|
||||
|
||||
@@ -23,27 +21,20 @@ If your issue appears to be a bug, and hasn't been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.
|
||||
|
||||
[template]: https://raw.github.com/owncloud/client/master/.github/issue_template.md
|
||||
[mailinglist]: https://mail.kde.org/mailman/listinfo/owncloud
|
||||
[forum]: http://forum.owncloud.org/
|
||||
[irc]: http://webchat.freenode.net/?channels=owncloud&uio=d4
|
||||
[template]: https://raw.githubusercontent.com/nextcloud/appstore/master/.github/issue_template.md
|
||||
[support]: https://nextcloud.com/support/
|
||||
[forum]: https://help.nextcloud.com/categories
|
||||
[irc]: https://webchat.freenode.net/?channels=nextcloud
|
||||
|
||||
## Contributing to Source Code
|
||||
|
||||
Thanks for wanting to contribute source code to ownCloud. That's great!
|
||||
Thanks for wanting to contribute source code to Nextcloud. That's great!
|
||||
|
||||
Before we're able to merge your code to ownCloud Desktop Client, you need to sign
|
||||
our [Contributor Agreement][agreement].
|
||||
You do not need to sign a Contributor Agreement, but we ask that you follow our
|
||||
[Code of Conduct](https://nextcloud.com/code-of-conduct/).
|
||||
|
||||
Please read the [Desktop Client Manual][desktopman] and the [Developer
|
||||
Manuals][devmanual] to get useful info like how to create your first
|
||||
application or how to test the ownCloud code with phpunit.
|
||||
|
||||
[agreement]: http://owncloud.org/about/contributor-agreement/
|
||||
[devmanual]: http://owncloud.org/dev
|
||||
[desktopman]: http://doc.owncloud.org/desktop
|
||||
Please read the [Contribution Guide](https://nextcloud.com/contribute/) to get
|
||||
started.
|
||||
|
||||
## Translations
|
||||
Please submit translations via [Transifex][transifex].
|
||||
|
||||
[transifex]: https://www.transifex.com/projects/p/owncloud/
|
||||
Please submit translations via [Transifex](https://www.transifex.com/nextcloud/nextcloud/).
|
||||
|
||||
@@ -14,7 +14,7 @@ set( OEM_THEME_DIR @OEM_THEME_DIR@ )
|
||||
if ( DEFINED OEM_THEME_DIR AND EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
||||
include ( ${OEM_THEME_DIR}/OEM.cmake )
|
||||
else ()
|
||||
include ( "${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake" )
|
||||
include ( "${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake" )
|
||||
endif()
|
||||
|
||||
set( CRASHREPORTER_EXECUTABLE @CRASHREPORTER_EXECUTABLE@)
|
||||
|
||||
38
ChangeLog
38
ChangeLog
@@ -1,43 +1,7 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
version 2.4.2 (2018-06-xx)
|
||||
* 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-02-xx)
|
||||
* 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)
|
||||
version 2.4.0 (2017-12-XX)
|
||||
* 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)
|
||||
|
||||
22
NEXTCLOUD.cmake
Normal file
22
NEXTCLOUD.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
set( APPLICATION_NAME "Nextcloud-e2e" )
|
||||
set( APPLICATION_SHORTNAME "Nextcloud-e2e" )
|
||||
set( APPLICATION_EXECUTABLE "nextcloud" )
|
||||
set( APPLICATION_DOMAIN "nextcloud.com" )
|
||||
set( APPLICATION_VENDOR "Nextcloud GmbH" )
|
||||
set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE string "URL for updater" )
|
||||
set( APPLICATION_ICON_NAME "Nextcloud" )
|
||||
|
||||
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
|
||||
|
||||
set( THEME_CLASS "NextcloudTheme" )
|
||||
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
|
||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||
|
||||
set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")
|
||||
|
||||
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
||||
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )
|
||||
|
||||
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" )
|
||||
@@ -5,7 +5,7 @@ set( CPACK_PACKAGE_CONTACT "Dominik Schmidt <domme@tomahawk-player.org>" )
|
||||
if ( DEFINED OEM_THEME_DIR AND EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
||||
include ( "${OEM_THEME_DIR}/OEM.cmake" )
|
||||
else ()
|
||||
include ( "${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake" )
|
||||
include ( "${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake" )
|
||||
endif()
|
||||
|
||||
include( VERSION.cmake )
|
||||
@@ -1,22 +0,0 @@
|
||||
set( APPLICATION_NAME "ownCloud" )
|
||||
set( APPLICATION_SHORTNAME "ownCloud" )
|
||||
set( APPLICATION_EXECUTABLE "owncloud" )
|
||||
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( LINUX_PACKAGE_SHORTNAME "owncloud" )
|
||||
|
||||
set( THEME_CLASS "ownCloudTheme" )
|
||||
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||
|
||||
set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")
|
||||
|
||||
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
||||
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )
|
||||
|
||||
option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||
set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE string "URL for crash reporter" )
|
||||
|
||||
38
README.md
38
README.md
@@ -1,59 +1,37 @@
|
||||
# ownCloud Desktop Client
|
||||
|
||||
[](https://drone.owncloud.com/owncloud/client)
|
||||
# Nextcloud Desktop Client
|
||||
|
||||
## Introduction
|
||||
|
||||
The ownCloud Desktop Client is a tool to synchronize files from ownCloud Server
|
||||
The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud Server
|
||||
with your computer.
|
||||
|
||||
## Download
|
||||
|
||||
### Binary packages
|
||||
|
||||
* Refer to the download page https://owncloud.org/install/#install-clients
|
||||
* Refer to the [download page https://nextcloud.com/install/#install-clients](https://nextcloud.com/install/#install-clients)
|
||||
|
||||
### Source code
|
||||
|
||||
The ownCloud Desktop Client is developed in Git. Since Git makes it easy to
|
||||
The Nextcloud Desktop Client is developed in Git. Since Git makes it easy to
|
||||
fork and improve the source code and to adapt it to your need, many copies
|
||||
can be found on the Internet, in particular on GitHub. However, the
|
||||
authoritative repository maintained by the developers is located at
|
||||
https://github.com/owncloud/client.
|
||||
|
||||
## Building the source code
|
||||
|
||||
[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.
|
||||
https://github.com/nextcloud/client.
|
||||
|
||||
## Reporting issues and contributing
|
||||
|
||||
If you find any bugs or have any suggestion for improvement, please
|
||||
file an issue at https://github.com/owncloud/client/issues. Do not
|
||||
file an issue at https://github.com/nextcloud/client/issues. Do not
|
||||
contact the authors directly by mail, as this increases the chance
|
||||
of your report being lost.
|
||||
|
||||
If you created a patch, please submit a [Pull
|
||||
Request](https://github.com/owncloud/client/pulls). For non-trivial
|
||||
patches, we need you to sign the [Contributor
|
||||
Agreement](https://owncloud.org/contribute/agreement) before
|
||||
we can accept your patch.
|
||||
Request](https://github.com/nextcloud/client/pulls).
|
||||
|
||||
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).
|
||||
[#nextcloud-dev](irc://irc.freenode.net/#nextcloud-dev).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
set( MIRALL_VERSION_MAJOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 4 )
|
||||
set( MIRALL_VERSION_PATCH 2 )
|
||||
set( MIRALL_VERSION_YEAR 2018 )
|
||||
set( MIRALL_VERSION_MINOR 5 )
|
||||
set( MIRALL_VERSION_PATCH 0 )
|
||||
set( MIRALL_VERSION_YEAR 2017 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
|
||||
set( MIRALL_VERSION_SUFFIX "git") #e.g. beta1, beta2, rc1
|
||||
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
|
||||
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
||||
|
||||
22
admin/linux/Dockerfile
Normal file
22
admin/linux/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# This DockerFile is used to create the image used for Jenkins, the CI system (see Jenkinsfile)
|
||||
# It is not meant to be used to create the production packages.
|
||||
|
||||
# Distro with Qt 5.6
|
||||
FROM ubuntu:yakkety
|
||||
|
||||
RUN apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends \
|
||||
locales \
|
||||
build-essential \
|
||||
clang \
|
||||
ninja-build \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libcmocka-dev \
|
||||
qt5-default \
|
||||
qttools5-dev-tools \
|
||||
libqt5webkit5-dev \
|
||||
qt5keychain-dev \
|
||||
kio-dev \
|
||||
&& apt-get clean
|
||||
98
admin/linux/build-appimage.sh
Executable file
98
admin/linux/build-appimage.sh
Executable file
@@ -0,0 +1,98 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
mkdir /app
|
||||
mkdir /build
|
||||
|
||||
#Set Qt-5.9
|
||||
export QT_BASE_DIR=/opt/qt59
|
||||
export QTDIR=$QT_BASE_DIR
|
||||
export PATH=$QT_BASE_DIR/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
|
||||
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
#set defaults
|
||||
export SUFFIX=${DRONE_PULL_REQUEST:=master}
|
||||
if [ $SUFFIX != "master" ]; then
|
||||
SUFFIX="PR-$SUFFIX"
|
||||
fi
|
||||
|
||||
#QtKeyChain 0.8.0
|
||||
cd /build
|
||||
git clone https://github.com/frankosterfeld/qtkeychain.git
|
||||
cd qtkeychain
|
||||
git checkout v0.8.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D CMAKE_INSTALL_PREFIX=/usr ../
|
||||
make -j4
|
||||
make DESTDIR=/app install
|
||||
|
||||
#Build client
|
||||
cd /build
|
||||
mkdir build-client
|
||||
cd build-client
|
||||
cmake -D CMAKE_INSTALL_PREFIX=/usr \
|
||||
-D NO_SHIBBOLETH=1 \
|
||||
-D QTKEYCHAIN_LIBRARY=/app/usr/lib/x86_64-linux-gnu/libqt5keychain.so \
|
||||
-D QTKEYCHAIN_INCLUDE_DIR=/app/usr/include/qt5keychain/ \
|
||||
-DMIRALL_VERSION_SUFFIX=PR-$DRONE_PULL_REQUEST \
|
||||
-DMIRALL_VERSION_BUILD=$DRONE_BUILD_NUMBER \
|
||||
$DRONE_WORKSPACE
|
||||
make -j4
|
||||
make DESTDIR=/app install
|
||||
|
||||
# Move stuff around
|
||||
cd /app
|
||||
|
||||
mv ./usr/lib/x86_64-linux-gnu/nextcloud/* ./usr/lib/x86_64-linux-gnu/
|
||||
mv ./usr/lib/x86_64-linux-gnu/* ./usr/lib/
|
||||
rm -rf ./usr/lib/nextcloud
|
||||
rm -rf ./usr/lib/cmake
|
||||
rm -rf ./usr/include
|
||||
rm -rf ./usr/mkspecs
|
||||
rm -rf ./usr/lib/x86_64-linux-gnu/
|
||||
|
||||
# Don't bundle nextcloudcmd as we don't run it anyway
|
||||
rm -rf ./usr/bin/nextcloudcmd
|
||||
|
||||
# Don't bundle the explorer extentions as we can't do anything with them in the AppImage
|
||||
rm -rf ./usr/share/caja-python/
|
||||
rm -rf ./usr/share/nautilus-python/
|
||||
rm -rf ./usr/share/nemo-python/
|
||||
|
||||
# Move sync exlucde to right location
|
||||
mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
|
||||
rm -rf ./etc
|
||||
|
||||
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' usr/share/applications/nextcloud.desktop # Bug in desktop file?
|
||||
cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
|
||||
|
||||
|
||||
# Because distros need to get their shit together
|
||||
cp -P /lib/x86_64-linux-gnu/libssl.so* ./usr/lib/
|
||||
cp -P /lib/x86_64-linux-gnu/libcrypto.so* ./usr/lib/
|
||||
|
||||
# Use linuxdeployqt to deploy
|
||||
cd /build
|
||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt*.AppImage
|
||||
./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract
|
||||
rm ./linuxdeployqt-continuous-x86_64.AppImage
|
||||
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=/app/usr/lib/
|
||||
./squashfs-root/AppRun /app/usr/share/applications/nextcloud.desktop -bundle-non-qt-libs
|
||||
|
||||
# Set origin
|
||||
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/libnextcloudsync.so.0
|
||||
|
||||
# Build AppImage
|
||||
./squashfs-root/AppRun /app/usr/share/applications/nextcloud.desktop -appimage
|
||||
|
||||
mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
||||
|
||||
curl --upload-file $(readlink -f ./Nextcloud*.AppImage) https://transfer.sh/Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
||||
|
||||
echo
|
||||
echo "Get the AppImage at the link above!"
|
||||
31
admin/linux/debian/README
Normal file
31
admin/linux/debian/README
Normal file
@@ -0,0 +1,31 @@
|
||||
- .pbuilderrc:
|
||||
|
||||
COMPONENTS="main restricted universe multiverse"
|
||||
|
||||
OTHERMIRROR="deb [trusted=yes] file:///${HOME}/pbuilder/deps ./"
|
||||
HOOKDIR="${HOME}/pbuilder/hook.d"
|
||||
BINDMOUNTS="${HOME}/pbuilder/deps"
|
||||
|
||||
EXTRAPACKAGES="apt-utils"
|
||||
|
||||
- pbuilder/hook.d/D70setupdeps: hook to create a Packages file for the
|
||||
packages in pbuilder/deps
|
||||
|
||||
- pbuilder-dist trusty create --override-config --othermirror "deb [trusted=yes] file:///${HOME}/pbuilder/deps ./"
|
||||
|
||||
The OTHERMIRROR setting in .pbuilderrc is overridden by pbuilder-dist!
|
||||
|
||||
- scripts:
|
||||
|
||||
config.sh: basic configuration variables
|
||||
|
||||
create_debdir.sh <tag> <version> <distribution>:
|
||||
create the Debian-conformant source directory and .orig.tar.bz2
|
||||
in the build area
|
||||
build.sh <tag> <version> <distribution> <debuild options...>:
|
||||
call create_debdir.sh and then debuild
|
||||
pbuilder.sh <distribution>:
|
||||
build the existing source package with pbuilder-dist.
|
||||
pbuild.sh <distribution>:
|
||||
build the source packages with build.sh and then call
|
||||
pbuilder.sh
|
||||
23
admin/linux/debian/debian.artful/changelog
Normal file
23
admin/linux/debian/debian.artful/changelog
Normal file
@@ -0,0 +1,23 @@
|
||||
nextcloud-client (2.3.3-1.0~artful1) artful; urgency=medium
|
||||
|
||||
* Debian build support for the forked client.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||
|
||||
nextcloud-client (2.3.1-1.0~artful1) artful; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||
|
||||
nextcloud-client (2.3.0-1.0~artful1) artful; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.4~artful1) artful; urgency=medium
|
||||
|
||||
* The locale-specific icon names are correct too
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||
@@ -0,0 +1,4 @@
|
||||
usr/lib/*/libnextclouddolphinpluginhelper.so
|
||||
usr/lib/*/qt5/plugins/kf5/overlayicon/nextclouddolphinoverlayplugin.so
|
||||
usr/lib/*/qt5/plugins/nextclouddolphinactionplugin.so
|
||||
usr/share/kservices5/nextclouddolphinactionplugin.desktop
|
||||
48
admin/linux/debian/debian.stable/changelog
Normal file
48
admin/linux/debian/debian.stable/changelog
Normal file
@@ -0,0 +1,48 @@
|
||||
nextcloud-client (2.3.3-1.0~stable1) stable; urgency=medium
|
||||
|
||||
* Debian build support for the forked client.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||
|
||||
nextcloud-client (2.3.1-1.0) stable; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||
|
||||
nextcloud-client (2.3.0-1.0) stable; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.4) stable; urgency=medium
|
||||
|
||||
* The locale-specific icon names are correct too
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.3) stable; urgency=medium
|
||||
|
||||
* Caja syncstate plugin is built.
|
||||
* The syncstate plugin has application-specific name
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Fri, 27 Jan 2017 19:34:18 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.2) stable; urgency=medium
|
||||
|
||||
* Fixed appname in the Nemo syncstate extension.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 19 Jan 2017 16:46:50 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.1) stable; urgency=medium
|
||||
|
||||
* Added Nautilus and Nemo syncstate extensions.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 17 Jan 2017 19:55:32 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.0) stable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Wed, 14 Dec 2016 20:07:46 +0100
|
||||
80
admin/linux/debian/debian.stable/control
Normal file
80
admin/linux/debian/debian.stable/control
Normal file
@@ -0,0 +1,80 @@
|
||||
Source: nextcloud-client
|
||||
Section: contrib/devel
|
||||
Priority: optional
|
||||
Maintainer: István Váradi <ivaradi@varadiistvan.hu>
|
||||
Build-Depends: cmake,
|
||||
debhelper,
|
||||
cdbs,
|
||||
dh-python,
|
||||
extra-cmake-modules (>= 5.16),
|
||||
kdelibs5-dev,
|
||||
kio-dev,
|
||||
libcmocka-dev,
|
||||
libhttp-dav-perl,
|
||||
libinotify-dev [kfreebsd-any],
|
||||
libqt5webkit5-dev,
|
||||
libsqlite3-dev,
|
||||
libssl-dev (>> 1.0.0),
|
||||
zlib1g-dev,
|
||||
optipng,
|
||||
pkg-kde-tools,
|
||||
python-sphinx | python3-sphinx,
|
||||
python3-all,
|
||||
qt5keychain-dev,
|
||||
qtdeclarative5-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools,
|
||||
xvfb
|
||||
Standards-Version: 3.9.8
|
||||
Homepage: https://github.com/nextcloud/client_theming
|
||||
#Vcs-Git: git://anonscm.debian.org/collab-maint/nextcloud-client.git
|
||||
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/nextcloud-client.git
|
||||
|
||||
Package: nextcloud-client
|
||||
Architecture: any
|
||||
Depends: libnextcloudsync0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, nextcloud-client-l10n
|
||||
Description: Nextcloud desktop sync client
|
||||
Use the desktop client to keep your files synchronized
|
||||
between your Nextcloud server and your desktop. Select
|
||||
one or more directories on your local machine and always
|
||||
have access to your latest files wherever you are.
|
||||
|
||||
Package: libnextcloudsync0
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Nextcloud sync library
|
||||
Used by the Nextcloud desktop client as the synchronization engine.
|
||||
|
||||
Package: libnextcloudsync-dev
|
||||
Architecture: any
|
||||
Section: contrib/libdevel
|
||||
Depends: libnextcloudsync0 (=${binary:Version}), ${misc:Depends}
|
||||
Description: Nextcloud sync library development files
|
||||
The headers and development library for the Nextcloud sync library.
|
||||
|
||||
Package: nextcloud-client-l10n
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}
|
||||
Description: Nextcloud client internatialization files
|
||||
The translation files.
|
||||
|
||||
Package: nextcloud-client-nautilus
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nautilus, nautilus, ${misc:Depends}
|
||||
Description: Nautilus plugin for Nextcloud
|
||||
This package contains a Nautilus plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
|
||||
Package: nextcloud-client-nemo
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nemo, nemo, ${misc:Depends}
|
||||
Description: Nemo plugin for Nextcloud
|
||||
This package contains a Nemo plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
|
||||
Package: nextcloud-client-caja
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-caja, caja, ${misc:Depends}
|
||||
Description: Caja plugin for Nextcloud
|
||||
This package contains a Caja plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
48
admin/linux/debian/debian.yakkety/changelog
Normal file
48
admin/linux/debian/debian.yakkety/changelog
Normal file
@@ -0,0 +1,48 @@
|
||||
nextcloud-client (2.3.3-1.0~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* Debian build support for the forked client.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||
|
||||
nextcloud-client (2.3.1-1.0~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||
|
||||
nextcloud-client (2.3.0-1.0~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.4~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* The locale-specific icon names are correct too
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.3~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* Caja syncstate plugin is built.
|
||||
* The syncstate plugin has application-specific name
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Fri, 27 Jan 2017 19:34:18 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.2~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* Fixed appname in the Nemo syncstate extension.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 19 Jan 2017 16:46:50 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.1~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* Added Nautilus and Nemo syncstate extensions.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 17 Jan 2017 19:55:32 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.0~yakkety1) yakkety; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Wed, 14 Dec 2016 20:07:46 +0100
|
||||
@@ -0,0 +1,4 @@
|
||||
usr/lib/*/libnextclouddolphinpluginhelper.so
|
||||
usr/lib/*/qt5/plugins/kf5/overlayicon/nextclouddolphinoverlayplugin.so
|
||||
usr/lib/*/qt5/plugins/nextclouddolphinactionplugin.so
|
||||
usr/share/kservices5/nextclouddolphinactionplugin.desktop
|
||||
23
admin/linux/debian/debian.zesty/changelog
Normal file
23
admin/linux/debian/debian.zesty/changelog
Normal file
@@ -0,0 +1,23 @@
|
||||
nextcloud-client (2.3.3-1.0~zesty1) zesty; urgency=medium
|
||||
|
||||
* Debian build support for the forked client.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||
|
||||
nextcloud-client (2.3.1-1.0~zesty1) zesty; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||
|
||||
nextcloud-client (2.3.0-1.0~zesty1) zesty; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.4~zesty1) zesty; urgency=medium
|
||||
|
||||
* The locale-specific icon names are correct too
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||
@@ -0,0 +1,4 @@
|
||||
usr/lib/*/libnextclouddolphinpluginhelper.so
|
||||
usr/lib/*/qt5/plugins/kf5/overlayicon/nextclouddolphinoverlayplugin.so
|
||||
usr/lib/*/qt5/plugins/nextclouddolphinactionplugin.so
|
||||
usr/share/kservices5/nextclouddolphinactionplugin.desktop
|
||||
1
admin/linux/debian/debian/101-sync-inotify.conf
Normal file
1
admin/linux/debian/debian/101-sync-inotify.conf
Normal file
@@ -0,0 +1 @@
|
||||
fs.inotify.max_user_watches = 524288
|
||||
48
admin/linux/debian/debian/changelog
Normal file
48
admin/linux/debian/debian/changelog
Normal file
@@ -0,0 +1,48 @@
|
||||
nextcloud-client (2.3.3-1.0~xenial1) xenial; urgency=medium
|
||||
|
||||
* Debian build support for the forked client.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||
|
||||
nextcloud-client (2.3.1-1.0~xenial1) xenial; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||
|
||||
nextcloud-client (2.3.0-1.0~xenial1) xenial; urgency=medium
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.4~xenial1) xenial; urgency=medium
|
||||
|
||||
* The locale-specific icon names are correct too
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.3~xenial1) xenial; urgency=medium
|
||||
|
||||
* Caja syncstate plugin is built.
|
||||
* The syncstate plugin has application-specific name
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Fri, 27 Jan 2017 19:34:18 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.2~xenial1) xenial; urgency=medium
|
||||
|
||||
* Fixed appname in the Nemo syncstate extension.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 19 Jan 2017 16:46:50 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.1~xenial1) xenial; urgency=medium
|
||||
|
||||
* Added Nautilus and Nemo syncstate extensions.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 17 Jan 2017 19:55:32 +0100
|
||||
|
||||
nextcloud-client (2.2.4-1.0~xenial1) xenial; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> Wed, 14 Dec 2016 20:07:46 +0100
|
||||
1
admin/linux/debian/debian/compat
Normal file
1
admin/linux/debian/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
9
|
||||
87
admin/linux/debian/debian/control
Normal file
87
admin/linux/debian/debian/control
Normal file
@@ -0,0 +1,87 @@
|
||||
Source: nextcloud-client
|
||||
Section: contrib/devel
|
||||
Priority: optional
|
||||
Maintainer: István Váradi <ivaradi@varadiistvan.hu>
|
||||
Build-Depends: cmake,
|
||||
debhelper,
|
||||
cdbs,
|
||||
dh-python,
|
||||
extra-cmake-modules (>= 5.16),
|
||||
kdelibs5-dev,
|
||||
kio-dev,
|
||||
libcmocka-dev,
|
||||
libhttp-dav-perl,
|
||||
libinotify-dev [kfreebsd-any],
|
||||
libqt5webkit5-dev,
|
||||
libsqlite3-dev,
|
||||
libssl-dev (>> 1.0.0),
|
||||
zlib1g-dev,
|
||||
optipng,
|
||||
pkg-kde-tools,
|
||||
python-sphinx | python3-sphinx,
|
||||
python3-all,
|
||||
qt5keychain-dev,
|
||||
qtdeclarative5-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools,
|
||||
xvfb
|
||||
Standards-Version: 3.9.8
|
||||
Homepage: https://github.com/nextcloud/client_theming
|
||||
#Vcs-Git: git://anonscm.debian.org/collab-maint/nextcloud-client.git
|
||||
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/nextcloud-client.git
|
||||
|
||||
Package: nextcloud-client
|
||||
Architecture: any
|
||||
Depends: libnextcloudsync0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, nextcloud-client-l10n
|
||||
Description: Nextcloud desktop sync client
|
||||
Use the desktop client to keep your files synchronized
|
||||
between your Nextcloud server and your desktop. Select
|
||||
one or more directories on your local machine and always
|
||||
have access to your latest files wherever you are.
|
||||
|
||||
Package: libnextcloudsync0
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Nextcloud sync library
|
||||
Used by the Nextcloud desktop client as the synchronization engine.
|
||||
|
||||
Package: libnextcloudsync-dev
|
||||
Architecture: any
|
||||
Section: contrib/libdevel
|
||||
Depends: libnextcloudsync0 (=${binary:Version}), ${misc:Depends}
|
||||
Description: Nextcloud sync library development files
|
||||
The headers and development library for the Nextcloud sync library.
|
||||
|
||||
Package: nextcloud-client-l10n
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}
|
||||
Description: Nextcloud client internatialization files
|
||||
The translation files.
|
||||
|
||||
Package: nextcloud-client-nautilus
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nautilus, nautilus, ${misc:Depends}
|
||||
Description: Nautilus plugin for Nextcloud
|
||||
This package contains a Nautilus plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
|
||||
Package: nextcloud-client-nemo
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nemo | nemo-python, nemo, ${misc:Depends}
|
||||
Description: Nemo plugin for Nextcloud
|
||||
This package contains a Nemo plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
|
||||
Package: nextcloud-client-caja
|
||||
Architecture: all
|
||||
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-caja, caja, ${misc:Depends}
|
||||
Description: Caja plugin for Nextcloud
|
||||
This package contains a Caja plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
|
||||
Package: nextcloud-client-dolphin
|
||||
Architecture: any
|
||||
Depends: dolphin (>= 4:15.12.1), libnextcloudsync0 (= ${binary:Version}), nextcloud-client, ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: Dolphin plugin for Nextcloud
|
||||
This package contains a Dolphin plugin to display
|
||||
synchronization status icons for Nextcloud files.
|
||||
3
admin/linux/debian/debian/copyright
Normal file
3
admin/linux/debian/debian/copyright
Normal file
@@ -0,0 +1,3 @@
|
||||
Files: *
|
||||
Copyright: 2012-2015 ownCloud, inc.; Nuernberg, Germany., 2016 Nextcloud GmbH
|
||||
License: GPL-2+
|
||||
3
admin/linux/debian/debian/libnextcloudsync-dev.install
Normal file
3
admin/linux/debian/debian/libnextcloudsync-dev.install
Normal file
@@ -0,0 +1,3 @@
|
||||
usr/include
|
||||
usr/lib/*/libnextcloudsync.so
|
||||
usr/lib/*/nextcloud/libocsync.so
|
||||
3
admin/linux/debian/debian/libnextcloudsync0.install
Normal file
3
admin/linux/debian/debian/libnextcloudsync0.install
Normal file
@@ -0,0 +1,3 @@
|
||||
etc
|
||||
usr/lib/*/libnextcloudsync.so.?*
|
||||
usr/lib/*/nextcloud/libocsync.so.?*
|
||||
1
admin/linux/debian/debian/nextcloud-client-caja.install
Normal file
1
admin/linux/debian/debian/nextcloud-client-caja.install
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/caja-python
|
||||
@@ -0,0 +1,4 @@
|
||||
usr/lib/*/libnextclouddolphinpluginhelper.so
|
||||
usr/lib/*/plugins/kf5/overlayicon/nextclouddolphinoverlayplugin.so
|
||||
usr/lib/*/plugins/nextclouddolphinactionplugin.so
|
||||
usr/share/kservices5/nextclouddolphinactionplugin.desktop
|
||||
@@ -0,0 +1,2 @@
|
||||
nextcloud-client-dolphin: package-name-doesnt-match-sonames
|
||||
nextcloud-client-dolphin: shlib-without-versioned-soname
|
||||
@@ -0,0 +1 @@
|
||||
activate-noawait ldconfig
|
||||
1
admin/linux/debian/debian/nextcloud-client-l10n.install
Normal file
1
admin/linux/debian/debian/nextcloud-client-l10n.install
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/nextcloud/i18n
|
||||
@@ -0,0 +1 @@
|
||||
usr/share/nautilus-python
|
||||
1
admin/linux/debian/debian/nextcloud-client-nemo.install
Normal file
1
admin/linux/debian/debian/nextcloud-client-nemo.install
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/nemo-python
|
||||
4
admin/linux/debian/debian/nextcloud-client.install
Normal file
4
admin/linux/debian/debian/nextcloud-client.install
Normal file
@@ -0,0 +1,4 @@
|
||||
usr/bin
|
||||
usr/share/applications
|
||||
usr/share/icons
|
||||
debian/101-sync-inotify.conf etc/sysctl.d
|
||||
@@ -0,0 +1,3 @@
|
||||
nextcloud-client: binary-or-shlib-defines-rpath
|
||||
nextcloud-client: binary-without-manpage
|
||||
nextcloud-client: license-problem-convert-utf-code
|
||||
12
admin/linux/debian/debian/rules
Executable file
12
admin/linux/debian/debian/rules
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
include /usr/share/cdbs/1/class/cmake.mk
|
||||
|
||||
DEB_SHLIBDEPS_INCLUDE=$(CURDIR)/$(DEB_BUILDDIR)/csync/src
|
||||
|
||||
DEB_SRCDIR=.
|
||||
DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_SKIP_RPATH=OFF -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
|
||||
1
admin/linux/debian/debian/source/format
Normal file
1
admin/linux/debian/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
9
admin/linux/debian/debian/source/lintian-overrides
Normal file
9
admin/linux/debian/debian/source/lintian-overrides
Normal file
@@ -0,0 +1,9 @@
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/bootstrap/static/bootstrap.js line length is 22206 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/bootstrap/static/jquery.js
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/bootstrap/static/jquery.js line length is 32412 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/owncloud_com/static/bootstrap.js line length is 22206 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/owncloud_com/static/jquery.js line length is 32412 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/owncloud_release/static/bootstrap.js line length is 22206 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/owncloud_release/static/jquery.js line length is 32412 characters (>512)
|
||||
nextcloud-client source: source-is-missing client/doc/ocdoc/_shared_assets/themes/owncloud_org/static/js/jquery-1.11.0.min.js
|
||||
nextcloud-client source: license-problem-convert-utf-code
|
||||
BIN
admin/linux/debian/oscrc.enc
Normal file
BIN
admin/linux/debian/oscrc.enc
Normal file
Binary file not shown.
50
admin/linux/debian/scripts/addchange.sh
Executable file
50
admin/linux/debian/scripts/addchange.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
scriptdir=`dirname $0`
|
||||
|
||||
DEFAULT_DIST=yakkety
|
||||
|
||||
package="nextcloud-client"
|
||||
version="$1"
|
||||
comment="$2"
|
||||
distver="${3:-}"
|
||||
|
||||
if test -z "${distver}"; then
|
||||
distver="1"
|
||||
fi
|
||||
|
||||
packagedir="${scriptdir}/../${package}"
|
||||
|
||||
now=`date -R`
|
||||
|
||||
tmpfile="/tmp/addchange.$$"
|
||||
|
||||
for subdir in "${packagedir}/debian"*; do
|
||||
if test -f "${subdir}/changelog"; then
|
||||
echo "${subdir}"
|
||||
bname=`basename "${subdir}"`
|
||||
dist=`echo "${bname}" | sed 's:debian\.\?::'`
|
||||
if test -z "${dist}"; then
|
||||
dist="${DEFAULT_DIST}"
|
||||
fi
|
||||
if test "${dist}" = "stable"; then
|
||||
versuffix=""
|
||||
else
|
||||
versuffix="~${dist}${distver}"
|
||||
fi
|
||||
cat > "${tmpfile}" <<EOF
|
||||
${package} (${version}${versuffix}) ${dist}; urgency=medium
|
||||
|
||||
* ${comment}
|
||||
|
||||
-- István Váradi <ivaradi@varadiistvan.hu> ${now}
|
||||
|
||||
EOF
|
||||
cat "${subdir}/changelog" >> "${tmpfile}"
|
||||
mv "${tmpfile}" "${subdir}/changelog"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f "${tmpfile}"
|
||||
26
admin/linux/debian/scripts/config.sh
Normal file
26
admin/linux/debian/scripts/config.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
# The directory where the sources are found
|
||||
SOURCES="${HOME}/sources/nextcloud/client"
|
||||
|
||||
# The directory into which the packages should be genereated
|
||||
BUILDAREA="${SOURCES}/build-area"
|
||||
|
||||
# The directory containing the Git repositories
|
||||
GITROOTS="${SOURCES}/git"
|
||||
|
||||
# The pbuilder root directory
|
||||
PBUILDER_ROOT="${HOME}/pbuilder"
|
||||
|
||||
# The dependencies directory for pbuilder
|
||||
PBUILDER_DEPS="${PBUILDER_ROOT}/deps"
|
||||
|
||||
# The version of the nextcloud-client package
|
||||
NEXTCLOUD_CLIENT_VERSION=2.4.0
|
||||
|
||||
# The FULL version of the nextcloud-client package
|
||||
NEXTCLOUD_CLIENT_FULL_VERSION="${NEXTCLOUD_CLIENT_VERSION}-1.0~@DISTRIBUTION@1"
|
||||
|
||||
# The tag of the nextcloud-client package
|
||||
NEXTCLOUD_CLIENT_TAG="v${NEXTCLOUD_CLIENT_VERSION}"
|
||||
|
||||
# The number of CPUs that can be used for paralel builds
|
||||
NUMCPUS=4
|
||||
80
admin/linux/debian/scripts/create_debdir.sh
Executable file
80
admin/linux/debian/scripts/create_debdir.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
scriptdir=`dirname $0`
|
||||
scriptdir=`cd "${scriptdir}" && pwd`
|
||||
|
||||
. "${scriptdir}/config.sh"
|
||||
|
||||
package="nextcloud-client"
|
||||
tag="${1}"
|
||||
version="${2}"
|
||||
distribution="${3}"
|
||||
|
||||
gitdir="${GITROOTS}/client"
|
||||
packagedir="${BUILDAREA}/${package}_${version}"
|
||||
origtarname="${package}_${version}.orig.tar.bz2"
|
||||
origtar="${BUILDAREA}/${origtarname}"
|
||||
|
||||
archive_submodules()
|
||||
{
|
||||
local subdir="${1}"
|
||||
local treeish="${2}"
|
||||
|
||||
local dir="${gitdir}"
|
||||
local destdir="${packagedir}"
|
||||
if test "${subdir}"; then
|
||||
echo " copying submodule ${subdir}"
|
||||
dir="${dir}/${subdir}"
|
||||
destdir="${destdir}/${subdir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${destdir}"
|
||||
|
||||
(cd "${dir}"; git archive "${treeish}" | tar xf - -C "${destdir}")
|
||||
|
||||
(cd "${dir}"; git ls-tree "${treeish}" -r) | while read mode type object file; do
|
||||
if test "${type}" = "commit"; then
|
||||
sdir="${file}"
|
||||
if test "${subdir}"; then
|
||||
sdir="${subdir}/${sdir}"
|
||||
fi
|
||||
archive_submodules "${sdir}" "${object}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
rm -rf "${packagedir}"
|
||||
mkdir -p "${packagedir}"
|
||||
|
||||
echo "Updating submodules"
|
||||
commit=`cd "${gitdir}"; git rev-parse HEAD`
|
||||
(cd "${gitdir}"; git checkout "${tag}"; git submodule update --recursive --init)
|
||||
|
||||
echo "Copying sources"
|
||||
archive_submodules "" "${tag}"
|
||||
|
||||
if test -f "${GITROOTS}/${origtarname}"; then
|
||||
echo "Copying orig archive from ${GITROOTS}"
|
||||
cp -a "${GITROOTS}/${origtarname}" "${BUILDAREA}"
|
||||
else
|
||||
echo "Creating orig archive"
|
||||
tar cjf "${origtar}" -C "${BUILDAREA}" "${package}_${version}"
|
||||
fi
|
||||
|
||||
echo "Restoring Git state"
|
||||
(cd "${gitdir}"; git checkout "${commit}")
|
||||
cd "${scriptdir}"
|
||||
|
||||
echo "Copying Debian files"
|
||||
mkdir -p "${packagedir}/debian"
|
||||
tar cf - -C "${scriptdir}/../debian" . | tar xf - -C "${packagedir}/debian"
|
||||
|
||||
if test -d "${scriptdir}/../debian.${distribution}"; then
|
||||
tar cf - -C "${scriptdir}/../debian.${distribution}" . | tar xf - -C "${packagedir}/debian"
|
||||
fi
|
||||
|
||||
"${scriptdir}/git2changelog.py" /tmp/git2changelog "${distribution}"
|
||||
mv "${packagedir}/debian/changelog" "${packagedir}/debian/changelog.old"
|
||||
cat /tmp/git2changelog "${packagedir}/debian/changelog.old" > "${packagedir}/debian/changelog"
|
||||
8
admin/linux/debian/scripts/git2changelog.cfg
Normal file
8
admin/linux/debian/scripts/git2changelog.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
# Use the configuration below with appropriate changes,
|
||||
# if you want to support a new client version using
|
||||
# your own fork. In such a case the tags do not come
|
||||
# accross to the main repo for a pull request, so
|
||||
# some hacking is needed
|
||||
[versionhack]
|
||||
#commit = 30986d6
|
||||
#tag = v2.3.3-beta
|
||||
106
admin/linux/debian/scripts/git2changelog.py
Executable file
106
admin/linux/debian/scripts/git2changelog.py
Executable file
@@ -0,0 +1,106 @@
|
||||
#!//usr/bin/env python2.7
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import os
|
||||
import ConfigParser
|
||||
|
||||
distribution="yakkety"
|
||||
|
||||
versionTagRE = re.compile("^v([0-9]+((\.[0-9]+)+))(-(.+))?$")
|
||||
|
||||
def processVersionTag(tag):
|
||||
m = versionTagRE.match(tag)
|
||||
if m:
|
||||
return (m.group(1), "release" if m.group(4) is None else "beta")
|
||||
else:
|
||||
return None
|
||||
|
||||
def collectEntries(baseCommit, baseVersion, kind):
|
||||
scriptdir = os.path.dirname(__file__)
|
||||
configPath = os.path.join(scriptdir, "git2changelog.cfg")
|
||||
|
||||
newVersionCommit = None
|
||||
newVersionTag = None
|
||||
newVersionOrigTag = None
|
||||
|
||||
if os.path.exists(configPath):
|
||||
config = ConfigParser.SafeConfigParser()
|
||||
config.read(configPath)
|
||||
if config.has_section("versionhack"):
|
||||
if config.has_option("versionhack", "commit") and \
|
||||
config.has_option("versionhack", "tag"):
|
||||
newVersionCommit = config.get("versionhack", "commit")
|
||||
newVersionTag = config.get("versionhack", "tag")
|
||||
|
||||
entries = []
|
||||
|
||||
args = ["git", "log",
|
||||
"--format=%h%x09%an%x09%ae%x09%aD%x09%ad%x09%s",
|
||||
"--date=unix", "--author-date-order", "--reverse"]
|
||||
try:
|
||||
output = subprocess.check_output(args + [baseCommit + ".."])
|
||||
except:
|
||||
output = subprocess.check_output(args)
|
||||
|
||||
|
||||
lastVersionTag = None
|
||||
for line in output.splitlines():
|
||||
(commit, name, email, date, revdate, subject) = line.split("\t")
|
||||
revdate = datetime.datetime.utcfromtimestamp(long(revdate)).strftime("%Y%m%d.%H%M%S")
|
||||
|
||||
if commit==newVersionCommit:
|
||||
result = processVersionTag(newVersionTag)
|
||||
if result:
|
||||
newVersionOrigTag = lastVersionTag
|
||||
(baseVersion, kind) = result
|
||||
|
||||
for tag in subprocess.check_output(["git", "tag",
|
||||
"--points-at",
|
||||
commit]).splitlines():
|
||||
if tag!=newVersionOrigTag:
|
||||
result = processVersionTag(tag)
|
||||
if result:
|
||||
lastVersionTag = tag
|
||||
(baseVersion, kind) = result
|
||||
|
||||
entries.append((commit, name, email, date, revdate, subject,
|
||||
baseVersion, kind))
|
||||
|
||||
entries.reverse()
|
||||
|
||||
return entries
|
||||
|
||||
def genChangeLogEntries(f, entries, distribution):
|
||||
latestBaseVersion = None
|
||||
latestKind = None
|
||||
for (commit, name, email, date, revdate, subject, baseVersion, kind) in entries:
|
||||
if latestBaseVersion is None:
|
||||
latestBaseVersion = baseVersion
|
||||
latestKind = kind
|
||||
upstreamVersion = baseVersion + "-" + revdate
|
||||
if distribution=="stable":
|
||||
version = upstreamVersion
|
||||
else:
|
||||
version = upstreamVersion + "~" + distribution + "1"
|
||||
print >> f, "nextcloud-client (%s) %s; urgency=medium" % (version, distribution)
|
||||
print >> f
|
||||
print >> f, " * " + subject
|
||||
print >> f
|
||||
print >> f, " -- %s <%s> %s" % (name, email, date)
|
||||
print >> f
|
||||
return (latestBaseVersion, latestKind)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
distribution = sys.argv[2]
|
||||
|
||||
#entries = collectEntries("8aade24147b5313f8241a8b42331442b7f40eef9", "2.2.4", "release")
|
||||
entries = collectEntries("f9b1c724d6ab5431e0cd56b7cd834f2dd48cebb1", "2.4.0", "release")
|
||||
|
||||
|
||||
with open(sys.argv[1], "wt") as f:
|
||||
(baseVersion, kind) = genChangeLogEntries(f, entries, distribution)
|
||||
print baseVersion, kind
|
||||
17
admin/linux/debian/scripts/pbuild.sh
Executable file
17
admin/linux/debian/scripts/pbuild.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
scriptdir=`dirname $0`
|
||||
scriptdir=`cd "${scriptdir}" && pwd`
|
||||
|
||||
. "${scriptdir}/config.sh"
|
||||
|
||||
distribution="${1}"
|
||||
shift
|
||||
|
||||
pushd /
|
||||
"${scriptdir}/build.sh" "${distribution}" -S "$@"
|
||||
|
||||
"${scriptdir}/pbuilder.sh" "${distribution}" "$@"
|
||||
popd
|
||||
21
admin/linux/debian/scripts/pbuilder.sh
Executable file
21
admin/linux/debian/scripts/pbuilder.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
scriptdir=`dirname $0`
|
||||
|
||||
. "${scriptdir}/config.sh"
|
||||
|
||||
distribution="${1}"
|
||||
shift
|
||||
|
||||
resultdir="${PBUILDER_ROOT}/${distribution}_result"
|
||||
|
||||
rm -f "${PBUILDER_DEPS}/"*.deb
|
||||
echo -n > "${PBUILDER_DEPS}/Packages"
|
||||
rm -f "${resultdir}/"*
|
||||
|
||||
source "${HOME}/.pbuilderrc"
|
||||
|
||||
dscversion=`echo ${NEXTCLOUD_CLIENT_FULL_VERSION} | sed "s:@DISTRIBUTION@:${distribution}:g"`
|
||||
pbuilder-dist "${distribution}" build --othermirror "${OTHERMIRROR}" --debbuildopts "-j${NUMCPUS}" "$@" "${BUILDAREA}/nextcloud-client_${dscversion}.dsc"
|
||||
BIN
admin/linux/debian/signing-key.txt.enc
Normal file
BIN
admin/linux/debian/signing-key.txt.enc
Normal file
Binary file not shown.
143
admin/linux/debian/travis-build.sh
Executable file
143
admin/linux/debian/travis-build.sh
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
shopt -s extglob
|
||||
|
||||
TRAVIS_BUILD_STEP="$1"
|
||||
|
||||
PPA=ppa:nextcloud-devs/client-alpha
|
||||
PPA_BETA=ppa:nextcloud-devs/client-beta
|
||||
|
||||
OBS_PROJECT=home:ivaradi:alpha
|
||||
OBS_PROJECT_BETA=home:ivaradi:beta
|
||||
OBS_PACKAGE=nextcloud-client
|
||||
|
||||
if [ "$TRAVIS_BUILD_STEP" == "install" ]; then
|
||||
sudo apt-get update -q
|
||||
sudo apt-get install -y devscripts cdbs osc
|
||||
|
||||
if test "$encrypted_585e03da75ed_key" -a "$encrypted_585e03da75ed_iv"; then
|
||||
openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in admin/linux/debian/signing-key.txt.enc -d | gpg --import
|
||||
echo "DEBUILD_DPKG_BUILDPACKAGE_OPTS='-k7D14AA7B'" >> ~/.devscripts
|
||||
|
||||
openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
|
||||
|
||||
touch ~/.has_ppa_keys
|
||||
elif test "$encrypted_8da7a4416c7a_key" -a "$encrypted_8da7a4416c7a_iv"; then
|
||||
openssl aes-256-cbc -K $encrypted_8da7a4416c7a_key -iv $encrypted_8da7a4416c7a_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
|
||||
PPA=ppa:ivaradi/nextcloud-client-exp
|
||||
elif test "$encrypted_c5306c5c5331_key" -a "$encrypted_c5306c5c5331_key"; then
|
||||
openssl aes-256-cbc -K $encrypted_c5306c5c5331_key -iv $encrypted_c5306c5c5331_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
|
||||
PPA=ppa:ivaradi/nextcloud-client-exp
|
||||
elif test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
|
||||
openssl aes-256-cbc -K $encrypted_5dafbd038603_key -iv $encrypted_5dafbd038603_iv -in admin/linux/debian/signing-key.txt.enc -d | gpg --import
|
||||
echo "DEBUILD_DPKG_BUILDPACKAGE_OPTS='-k7D14AA7B'" >> ~/.devscripts
|
||||
|
||||
|
||||
openssl aes-256-cbc -K $encrypted_5dafbd038603_key -iv $encrypted_5dafbd038603_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
|
||||
|
||||
touch ~/.has_ppa_keys
|
||||
fi
|
||||
|
||||
elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then
|
||||
read basever kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
|
||||
|
||||
cd ..
|
||||
|
||||
echo "$kind" > kind
|
||||
kind="release"
|
||||
|
||||
if test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
|
||||
repo=ivaradi/nextcloud-client-exp
|
||||
else
|
||||
if test "$kind" = "beta"; then
|
||||
repo=nextcloud-devs/client-beta
|
||||
else
|
||||
repo=nextcloud-devs/client-alpha
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test -d nextcloud.client; then
|
||||
gitdir="nextcloud.client"
|
||||
else
|
||||
gitdir="client"
|
||||
fi
|
||||
|
||||
origsourceopt=""
|
||||
|
||||
if ! wget http://ppa.launchpad.net/${repo}/ubuntu/pool/main/n/nextcloud-client/nextcloud-client_${basever}.orig.tar.bz2; then
|
||||
mv ${gitdir} nextcloud-client_${basever}
|
||||
tar cjf nextcloud-client_${basever}.orig.tar.bz2 --exclude .git nextcloud-client_${basever}
|
||||
mv nextcloud-client_${basever} ${gitdir}
|
||||
origsourceopt="-sa"
|
||||
fi
|
||||
|
||||
for distribution in xenial zesty artful stable; do
|
||||
rm -rf nextcloud-client_${basever}
|
||||
cp -a ${gitdir} nextcloud-client_${basever}
|
||||
|
||||
cd nextcloud-client_${basever}
|
||||
|
||||
cp -a admin/linux/debian/debian .
|
||||
if test -d admin/linux/debian/debian.${distribution}; then
|
||||
tar cf - -C admin/linux/debian/debian.${distribution} . | tar xf - -C debian
|
||||
fi
|
||||
|
||||
admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog ${distribution}
|
||||
cp /tmp/tmpchangelog debian/changelog
|
||||
if test -f admin/linux/debian/debian.${distribution}/changelog; then
|
||||
cat admin/linux/debian/debian.${distribution}/changelog >> debian/changelog
|
||||
else
|
||||
cat admin/linux/debian/debian/changelog >> debian/changelog
|
||||
fi
|
||||
|
||||
EDITOR=true dpkg-source --commit . local-changes
|
||||
|
||||
if test -f ~/.has_ppa_keys; then
|
||||
debuild -S ${origsourceopt}
|
||||
else
|
||||
debuild -S ${origsourceopt} -us -uc
|
||||
fi
|
||||
|
||||
cd ..
|
||||
done
|
||||
|
||||
elif [ "$TRAVIS_BUILD_STEP" == "ppa_deploy" ]; then
|
||||
cd ..
|
||||
|
||||
kind=`cat kind`
|
||||
|
||||
if test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
|
||||
PPA=ppa:ivaradi/nextcloud-client-exp
|
||||
fi
|
||||
|
||||
echo "kind: $kind"
|
||||
|
||||
if test "$kind" = "beta"; then
|
||||
PPA=$PPA_BETA
|
||||
OBS_PROJECT=$OBS_PROJECT_BETA
|
||||
fi
|
||||
OBS_SUBDIR="${OBS_PROJECT}/${OBS_PACKAGE}"
|
||||
|
||||
if test -f ~/.has_ppa_keys; then
|
||||
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
|
||||
dput $PPA $changes > /dev/null
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir osc
|
||||
cd osc
|
||||
osc co ${OBS_PROJECT} ${OBS_PACKAGE}
|
||||
if test "$(ls ${OBS_SUBDIR})"; then
|
||||
osc delete ${OBS_SUBDIR}/*
|
||||
fi
|
||||
cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-client_*[0-9.][0-9].dsc ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-client_*[0-9.][0-9].debian.tar* ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-client_*[0-9.][0-9]_source.changes ${OBS_SUBDIR}/
|
||||
osc add ${OBS_SUBDIR}/*
|
||||
|
||||
cd ${OBS_SUBDIR}
|
||||
osc commit -m "Travis update"
|
||||
fi
|
||||
19
admin/linux/travis-build.sh
Executable file
19
admin/linux/travis-build.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2017 Marco Trevisan
|
||||
|
||||
set -xe
|
||||
|
||||
TRAVIS_BUILD_STEP="$1"
|
||||
THIS_PATH=$(dirname $0)
|
||||
|
||||
if [ -z "$TRAVIS_BUILD_STEP" ]; then
|
||||
echo "No travis build step defined"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$BUILD_TYPE" == "debian" ]; then
|
||||
admin/linux/debian/travis-build.sh "$@"
|
||||
else
|
||||
echo 'No $BUILD_TYPE defined'
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# Check if varialbe MAC_INSTALLER_BACKGROUND_FILE is defined. That might come
|
||||
# from the OEM.cmake for branded clients or from OWNCLOUD.cmake for the non
|
||||
# from the OEM.cmake for branded clients or from NEXTCLOUD.cmake for the non
|
||||
# branded client.
|
||||
# Make sure that the MAC_INSTALLER_BACKGROUND_FILE contains the full path, ie.
|
||||
# includes CMAKE_SOURCE_DIR or so.
|
||||
@@ -11,7 +11,6 @@ else()
|
||||
set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "0")
|
||||
endif()
|
||||
|
||||
find_package(Qt5 5.6 COMPONENTS Core REQUIRED)
|
||||
configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
|
||||
configure_file(macosx.pkgproj ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)
|
||||
configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh)
|
||||
|
||||
@@ -23,7 +23,7 @@ identity="$3"
|
||||
prjfile=$build_path/admin/osx/macosx.pkgproj
|
||||
|
||||
# The name of the installer package
|
||||
installer="@APPLICATION_SHORTNAME@-qt@Qt5Core_VERSION@-@MIRALL_VERSION_FULL@@MIRALL_VERSION_SUFFIX@"
|
||||
installer="@APPLICATION_SHORTNAME@-@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,7 +22,6 @@ import subprocess
|
||||
import commands
|
||||
import sys
|
||||
from glob import glob
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
def QueryQMake(attrib):
|
||||
return subprocess.check_output([qmake_path, '-query', attrib]).rstrip('\n')
|
||||
@@ -93,8 +92,6 @@ 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 = []
|
||||
@@ -337,19 +334,9 @@ 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:
|
||||
|
||||
@@ -27,8 +27,8 @@ SET(QT_MKSPECS_DIR ${CMAKE_FIND_ROOT_PATH}/share/qt5/mkspecs)
|
||||
SET(QT_QT_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/include)
|
||||
|
||||
# qt tools
|
||||
SET(QT_QMAKE_EXECUTABLE ${MINGW_PREFIX}-qmake )
|
||||
SET(QT_MOC_EXECUTABLE ${MINGW_PREFIX}-moc)
|
||||
SET(QT_RCC_EXECUTABLE ${MINGW_PREFIX}-rcc)
|
||||
SET(QT_UIC_EXECUTABLE ${MINGW_PREFIX}-uic)
|
||||
SET(QT_LRELEASE_EXECUTABLE ${MINGW_PREFIX}-lrelease)
|
||||
SET(QT_QMAKE_EXECUTABLE ${MINGW_PREFIX}-qmake-qt5)
|
||||
SET(QT_MOC_EXECUTABLE ${MINGW_PREFIX}-moc-qt5)
|
||||
SET(QT_RCC_EXECUTABLE ${MINGW_PREFIX}-rcc-qt5)
|
||||
SET(Qt5Widgets_UIC_EXECUTABLE ${MINGW_PREFIX}-uic-qt5)
|
||||
SET(QT_LRELEASE_EXECUTABLE ${MINGW_PREFIX}-lrelease-qt5)
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
FROM opensuse:42.1
|
||||
|
||||
MAINTAINER Daniel Molkentin <danimo@owncloud.com>
|
||||
|
||||
ENV TERM ansi
|
||||
ENV HOME /root
|
||||
|
||||
ENV REFRESHED_AT 20160421
|
||||
ENV REFRESHED_AT 20170113
|
||||
|
||||
RUN zypper --non-interactive --gpg-auto-import-keys refresh
|
||||
RUN zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_Leap_42.1/windows:mingw.repo
|
||||
RUN zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/repositories/isv:ownCloud:toolchains:mingw:win32:2.3/openSUSE_Leap_42.1/isv:ownCloud:toolchains:mingw:win32:2.3.repo
|
||||
RUN zypper --non-interactive --gpg-auto-import-keys install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
||||
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
||||
mingw32-headers mingw32-runtime site-config mingw32-libwebp \
|
||||
mingw32-headers mingw32-runtime site-config mingw32-libwebp mingw32-libssp0 \
|
||||
mingw32-cross-libqt5-qmake mingw32-cross-libqt5-qttools mingw32-libqt5* \
|
||||
mingw32-qt5keychain* mingw32-angleproject* \
|
||||
mingw32-cross-nsis mingw32-libopenssl* \
|
||||
mingw32-sqlite* kdewin-png2ico \
|
||||
mingw32-sqlite* png2ico \
|
||||
osslsigncode wget
|
||||
|
||||
# RPM depends on curl for installs from HTTP
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
45
appveyor.ini
Normal file
45
appveyor.ini
Normal file
@@ -0,0 +1,45 @@
|
||||
[General]
|
||||
Branch = master
|
||||
ShallowClone = True
|
||||
Command=craft
|
||||
|
||||
# Variables defined here override the default value
|
||||
# The variable names are casesensitive
|
||||
[Variables]
|
||||
#Values need to be overwritten to create a chache
|
||||
UseCache = True
|
||||
CreateCache = False
|
||||
|
||||
# Settings applicable for all Crafts matrices
|
||||
# Settings are Category/key=value
|
||||
# Category is case sensitive
|
||||
|
||||
[GeneralSettings]
|
||||
General/EMERGE_PKGDSTDIR=${Variables:APPVEYOR_BUILD_FOLDER}/binaries
|
||||
Paths/python = C:\Python36
|
||||
Paths/python27 = C:\Python27
|
||||
Paths/downloaddir = ${Variables:Root}\downloads
|
||||
ShortPath/Enabled = False
|
||||
ShortPath/EnableJunctions = True
|
||||
ShortPath/JunctionDir = C:\CM-SP\
|
||||
Packager/CacheDir = ${Variables:Root}\cache
|
||||
Packager/UseCache = ${Variables:UseCache}
|
||||
Packager/CreateCache = ${Variables:CreateCache}
|
||||
; Packager/RepositoryUrl = https://files.kde.org/craft/
|
||||
Packager/PackageType = PortablePackager
|
||||
Packager/RepositoryUrl = http://ftp.acc.umu.se/mirror/kde.org/files/craft/master/
|
||||
Compile/BuildType = RelWithDebInfo
|
||||
ContinuousIntegration/Enabled = True
|
||||
|
||||
[BlueprintSettings]
|
||||
# don't try to pip install on the ci
|
||||
python-modules.ignored = True
|
||||
|
||||
libs/qt5.version = 5.9.3
|
||||
craft/craft-core.version = master
|
||||
|
||||
[windows-msvc2017_64-cl]
|
||||
General/ABI = windows-msvc2017_64-cl
|
||||
|
||||
[windows-msvc2017_32-cl]
|
||||
General/ABI = windows-msvc2017_32-cl
|
||||
50
appveyor.yml
Normal file
50
appveyor.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
version: '{build}-{branch}'
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
clone_depth: 50
|
||||
|
||||
|
||||
init:
|
||||
- ps: |
|
||||
function craft($target) {
|
||||
& C:\Python36\python.exe "C:\CraftMaster\CraftMaster\CraftMaster.py" --config "$env:APPVEYOR_BUILD_FOLDER\appveyor.ini" --variables "APPVEYOR_BUILD_FOLDER=$env:APPVEYOR_BUILD_FOLDER" --target $target -c $args
|
||||
if($LASTEXITCODE -ne 0) {exit $LASTEXITCODE}
|
||||
}
|
||||
|
||||
install:
|
||||
- ps: |
|
||||
#use cmd to silence powershell behaviour for stderr
|
||||
& 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 --install-deps owncloud-client
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
craft $env:TARGET --no-cache --src-dir $env:APPVEYOR_BUILD_FOLDER owncloud-client
|
||||
|
||||
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
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- TARGET: windows-msvc2017_32-cl
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- TARGET: windows-msvc2017_64-cl
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
|
||||
artifacts:
|
||||
- path: binaries/*
|
||||
0
cmake/modules/DBusMacros.cmake
Normal file
0
cmake/modules/DBusMacros.cmake
Normal file
332
cmake/modules/ECMAddAppIcon.cmake
Normal file
332
cmake/modules/ECMAddAppIcon.cmake
Normal file
@@ -0,0 +1,332 @@
|
||||
#.rst:
|
||||
# ECMAddAppIcon
|
||||
# -------------
|
||||
#
|
||||
# Add icons to executable files and packages.
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ecm_add_app_icon(<sources_var>
|
||||
# ICONS <icon> [<icon> [...]]
|
||||
# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.4x
|
||||
# [OUTFILE_BASE <name>]) # Since 5.4x
|
||||
# )
|
||||
#
|
||||
# The given icons, whose names must match the pattern::
|
||||
#
|
||||
# <size>-<other_text>.png
|
||||
#
|
||||
# will be added to the executable target whose sources are specified by
|
||||
# ``<sources_var>`` on platforms that support it (Windows and Mac OS X).
|
||||
# Other icon files are ignored but on Mac SVG files can be supported and
|
||||
# it is thus possible to mix those with png files in a single macro call.
|
||||
#
|
||||
# ``<size>`` is a numeric pixel size (typically 16, 32, 48, 64, 128 or 256).
|
||||
# ``<other_text>`` can be any other text. See the platform notes below for any
|
||||
# recommendations about icon sizes.
|
||||
#
|
||||
# ``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.
|
||||
#
|
||||
# ``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.
|
||||
#
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Mac OS X notes
|
||||
# * The executable target must have the ``MACOSX_BUNDLE`` property set.
|
||||
# * Icons are added to the bundle.
|
||||
# * If the ksvg2icns tool from KIconThemes is available, .svg and .svgz
|
||||
# files are accepted; the first that is converted successfully to .icns
|
||||
# will provide the application icon. SVG files are ignored otherwise.
|
||||
# * The tool iconutil (provided by Apple) is required for bitmap icons.
|
||||
# * Supported sizes: 16, 32, 64, 128, 256 (and 512, 1024 after OS X 10.9).
|
||||
# * At least a 128x128px (or an SVG) icon is required.
|
||||
# * Larger sizes are automatically used to substitute for smaller sizes on
|
||||
# "Retina" (high-resolution) displays. For example, a 32px icon, if
|
||||
# provided, will be used as a 32px icon on standard-resolution displays,
|
||||
# and as a 16px-equivalent icon (with an "@2x" tag) on high-resolution
|
||||
# displays. That is why you should provide 64px and 1024px icons although
|
||||
# they are not supported anymore directly. Instead they will be used as
|
||||
# 32px@2x and 512px@2x. ksvg2icns handles this internally.
|
||||
# * This function sets the ``MACOSX_BUNDLE_ICON_FILE`` variable to the name
|
||||
# of the generated icns file, so that it will be used as the
|
||||
# ``MACOSX_BUNDLE_ICON_FILE`` target property when you call
|
||||
# ``add_executable``.
|
||||
# * Sidebar icons should typically provided in 16, 32, 64, 128 and 256px.
|
||||
#
|
||||
# Since 1.7.0.
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
# Copyright 2014 Ralf Habacker <ralf.habacker@freenet.de>
|
||||
# Copyright 2006-2009 Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright 2006, 2007, Laurent Montel, <montel@kde.org>
|
||||
# Copyright 2007 Matthias Kretz <kretz@kde.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(ecm_add_app_icon appsources)
|
||||
set(options)
|
||||
set(oneValueArgs OUTFILE_BASE)
|
||||
set(multiValueArgs ICONS SIDEBAR_ICONS)
|
||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(NOT ARG_ICONS)
|
||||
message(FATAL_ERROR "No ICONS argument given to ecm_add_app_icon")
|
||||
endif()
|
||||
if(ARG_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unexpected arguments to ecm_add_app_icon: ${ARG_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_program(KSVG2ICNS NAMES ksvg2icns)
|
||||
foreach(icon ${ARG_ICONS})
|
||||
get_filename_component(icon_full ${icon} ABSOLUTE)
|
||||
get_filename_component(icon_type ${icon_full} EXT)
|
||||
# do we have ksvg2icns in the path and did we receive an svg (or compressed svg) icon?
|
||||
if(KSVG2ICNS AND (${icon_type} STREQUAL ".svg" OR ${icon_type} STREQUAL ".svgz"))
|
||||
# convert the svg icon to an icon resource
|
||||
execute_process(COMMAND ${KSVG2ICNS} "${icon_full}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE KSVG2ICNS_ERROR)
|
||||
if(${KSVG2ICNS_ERROR})
|
||||
message(AUTHOR_WARNING "ksvg2icns could not generate an OS X application icon from ${icon}")
|
||||
else()
|
||||
# install the icns file we just created
|
||||
get_filename_component(icon_name ${icon_full} NAME_WE)
|
||||
set(MACOSX_BUNDLE_ICON_FILE ${icon_name}.icns PARENT_SCOPE)
|
||||
set(${appsources} "${${appsources}};${CMAKE_CURRENT_BINARY_DIR}/${icon_name}.icns" PARENT_SCOPE)
|
||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${icon_name}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
# we're done now
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
_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")
|
||||
endif()
|
||||
|
||||
set(mac_icons
|
||||
# Icons: https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
|
||||
${icons_at_16px}
|
||||
${icons_at_32px}
|
||||
${icons_at_64px}
|
||||
${icons_at_128px}
|
||||
${icons_at_256px}
|
||||
${icons_at_512px}
|
||||
${icons_at_1024px}
|
||||
|
||||
# Sidebar Icons: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
|
||||
${sidebar_icons_at_16px}
|
||||
${sidebar_icons_at_18px}
|
||||
${sidebar_icons_at_32px}
|
||||
${sidebar_icons_at_36px}
|
||||
${sidebar_icons_at_64px})
|
||||
if (NOT icons_at_128px)
|
||||
message(AUTHOR_WARNING "No 128px icon provided; this will not work on Mac OS X")
|
||||
endif()
|
||||
|
||||
|
||||
set(windows_icons ${icons_at_16px}
|
||||
${icons_at_32px}
|
||||
${icons_at_48px}
|
||||
${icons_at_64px}
|
||||
${icons_at_128px})
|
||||
if (NOT windows_icons)
|
||||
message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
|
||||
endif()
|
||||
|
||||
if (ARG_OUTFILE_BASE)
|
||||
set (_outfilebasename "${ARG_OUTFILE_BASE}")
|
||||
else()
|
||||
set (_outfilebasename "${appsources}")
|
||||
endif()
|
||||
set (_outfilename "${CMAKE_CURRENT_BINARY_DIR}/${_outfilebasename}")
|
||||
|
||||
if (WIN32 AND windows_icons)
|
||||
set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
|
||||
find_package(Png2Ico)
|
||||
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()
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.ico"
|
||||
COMMAND Png2Ico::Png2Ico
|
||||
ARGS "${_outfilename}.ico" ${windows_icons}
|
||||
DEPENDS ${windows_icons}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
# this bit's a little hacky to make the dependency stuff work
|
||||
file(WRITE "${_outfilename}.rc.in" "IDI_ICON1 ICON DISCARDABLE \"${_outfilename}.ico\"\n")
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.rc"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy "${_outfilename}.rc.in" "${_outfilename}.rc"
|
||||
DEPENDS "${_outfilename}.ico"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
endif()
|
||||
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||
else()
|
||||
message(WARNING "Unable to find the png2ico utility - 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,
|
||||
# to create retina compatible icon, you need png source files in pixel resolution 16x16, 32x32, 64x64, 128x128,
|
||||
# 256x256, 512x512, 1024x1024
|
||||
find_program(ICONUTIL_EXECUTABLE NAMES iconutil)
|
||||
if (ICONUTIL_EXECUTABLE)
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.iconset"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E make_directory "${_outfilename}.iconset"
|
||||
)
|
||||
set(iconset_icons)
|
||||
macro(copy_icon filename sizename type)
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.iconset/${type}_${sizename}.png"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy
|
||||
"${filename}"
|
||||
"${_outfilename}.iconset/${type}_${sizename}.png"
|
||||
DEPENDS
|
||||
"${_outfilename}.iconset"
|
||||
"${filename}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
list(APPEND iconset_icons
|
||||
"${_outfilename}.iconset/${type}_${sizename}.png")
|
||||
endmacro()
|
||||
foreach(size 16 32 128 256 512)
|
||||
math(EXPR double_size "2 * ${size}")
|
||||
foreach(file ${icons_at_${size}px})
|
||||
copy_icon("${file}" "${size}x${size}" "icon")
|
||||
endforeach()
|
||||
foreach(file ${icons_at_${double_size}px})
|
||||
copy_icon("${file}" "${size}x${size}@2x" "icon")
|
||||
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()
|
||||
endforeach()
|
||||
|
||||
# generate .icns icon file
|
||||
add_custom_command(
|
||||
OUTPUT "${_outfilename}.icns"
|
||||
COMMAND ${ICONUTIL_EXECUTABLE}
|
||||
ARGS
|
||||
--convert icns
|
||||
--output "${_outfilename}.icns"
|
||||
"${_outfilename}.iconset"
|
||||
DEPENDS "${iconset_icons}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
# This will register the icon into the bundle
|
||||
set(MACOSX_BUNDLE_ICON_FILE "${_outfilebasename}.icns" PARENT_SCOPE)
|
||||
|
||||
# Append the icns file to the sources list so it will be a dependency to the
|
||||
# main target
|
||||
set(${appsources} "${${appsources}};${_outfilename}.icns" PARENT_SCOPE)
|
||||
|
||||
# Install the icon into the Resources dir in the bundle
|
||||
set_source_files_properties("${_outfilename}.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
else()
|
||||
message(STATUS "Unable to find the iconutil utility - application will not have an application icon!")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(_ecm_add_app_icon_categorize_icons icons type known_sizes)
|
||||
set(_${type}_known_sizes)
|
||||
foreach(size ${known_sizes})
|
||||
set(${type}_at_${size}px)
|
||||
list(APPEND _${type}_known_sizes ${size})
|
||||
endforeach()
|
||||
|
||||
|
||||
foreach(icon ${icons})
|
||||
get_filename_component(icon_full ${icon} ABSOLUTE)
|
||||
if (NOT EXISTS "${icon_full}")
|
||||
message(AUTHOR_WARNING "${icon_full} does not exist, ignoring")
|
||||
else()
|
||||
get_filename_component(icon_name ${icon} NAME)
|
||||
string(REGEX MATCH "([0-9]+)\\-[^/]+\\.([a-z]+)$"
|
||||
_dummy "${icon_name}")
|
||||
set(size "${CMAKE_MATCH_1}")
|
||||
set(ext "${CMAKE_MATCH_2}")
|
||||
|
||||
if (NOT (ext STREQUAL "svg" OR ext STREQUAL "svgz"))
|
||||
if (NOT size)
|
||||
message(AUTHOR_WARNING "${icon_full} is not named correctly for ecm_add_app_icon - ignoring")
|
||||
elseif (NOT ext STREQUAL "png")
|
||||
message(AUTHOR_WARNING "${icon_full} is not a png file - ignoring")
|
||||
else()
|
||||
list(FIND _${type}_known_sizes ${size} offset)
|
||||
|
||||
if (offset GREATER -1)
|
||||
list(APPEND ${type}_at_${size}px "${icon_full}")
|
||||
elseif()
|
||||
message(STATUS "not found ${type}_at_${size}px ${icon_full}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
297
cmake/modules/ECMFindModuleHelpers.cmake
Normal file
297
cmake/modules/ECMFindModuleHelpers.cmake
Normal file
@@ -0,0 +1,297 @@
|
||||
#.rst:
|
||||
# ECMFindModuleHelpers
|
||||
# --------------------
|
||||
#
|
||||
# Helper macros for find modules: ecm_find_package_version_check(),
|
||||
# ecm_find_package_parse_components() and
|
||||
# ecm_find_package_handle_library_components().
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ecm_find_package_version_check(<name>)
|
||||
#
|
||||
# Prints warnings if the CMake version or the project's required CMake version
|
||||
# is older than that required by extra-cmake-modules.
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ecm_find_package_parse_components(<name>
|
||||
# RESULT_VAR <variable>
|
||||
# KNOWN_COMPONENTS <component1> [<component2> [...]]
|
||||
# [SKIP_DEPENDENCY_HANDLING])
|
||||
#
|
||||
# This macro will populate <variable> with a list of components found in
|
||||
# <name>_FIND_COMPONENTS, after checking that all those components are in the
|
||||
# list of KNOWN_COMPONENTS; if there are any unknown components, it will print
|
||||
# an error or warning (depending on the value of <name>_FIND_REQUIRED) and call
|
||||
# return().
|
||||
#
|
||||
# The order of components in <variable> is guaranteed to match the order they
|
||||
# are listed in the KNOWN_COMPONENTS argument.
|
||||
#
|
||||
# If SKIP_DEPENDENCY_HANDLING is not set, for each component the variable
|
||||
# <name>_<component>_component_deps will be checked for dependent components.
|
||||
# If <component> is listed in <name>_FIND_COMPONENTS, then all its (transitive)
|
||||
# dependencies will also be added to <variable>.
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ecm_find_package_handle_library_components(<name>
|
||||
# COMPONENTS <component> [<component> [...]]
|
||||
# [SKIP_DEPENDENCY_HANDLING])
|
||||
# [SKIP_PKG_CONFIG])
|
||||
#
|
||||
# Creates an imported library target for each component. The operation of this
|
||||
# macro depends on the presence of a number of CMake variables.
|
||||
#
|
||||
# The <name>_<component>_lib variable should contain the name of this library,
|
||||
# and <name>_<component>_header variable should contain the name of a header
|
||||
# file associated with it (whatever relative path is normally passed to
|
||||
# '#include'). <name>_<component>_header_subdir variable can be used to specify
|
||||
# which subdirectory of the include path the headers will be found in.
|
||||
# ecm_find_package_components() will then search for the library
|
||||
# and include directory (creating appropriate cache variables) and create an
|
||||
# imported library target named <name>::<component>.
|
||||
#
|
||||
# Additional variables can be used to provide additional information:
|
||||
#
|
||||
# If SKIP_PKG_CONFIG, the <name>_<component>_pkg_config variable is set, and
|
||||
# pkg-config is found, the pkg-config module given by
|
||||
# <name>_<component>_pkg_config will be searched for and used to help locate the
|
||||
# library and header file. It will also be used to set
|
||||
# <name>_<component>_VERSION.
|
||||
#
|
||||
# Note that if version information is found via pkg-config,
|
||||
# <name>_<component>_FIND_VERSION can be set to require a particular version
|
||||
# for each component.
|
||||
#
|
||||
# If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property
|
||||
# of the imported target for <component> will be set to contain the imported
|
||||
# targets for the components listed in <name>_<component>_component_deps.
|
||||
# <component>_FOUND will also be set to false if any of the compoments in
|
||||
# <name>_<component>_component_deps are not found. This requires the components
|
||||
# in <name>_<component>_component_deps to be listed before <component> in the
|
||||
# COMPONENTS argument.
|
||||
#
|
||||
# The following variables will be set:
|
||||
#
|
||||
# ``<name>_TARGETS``
|
||||
# the imported targets
|
||||
# ``<name>_LIBRARIES``
|
||||
# the found libraries
|
||||
# ``<name>_INCLUDE_DIRS``
|
||||
# the combined required include directories for the components
|
||||
# ``<name>_DEFINITIONS``
|
||||
# the "other" CFLAGS provided by pkg-config, if any
|
||||
# ``<name>_VERSION``
|
||||
# the value of ``<name>_<component>_VERSION`` for the first component that
|
||||
# has this variable set (note that components are searched for in the order
|
||||
# they are passed to the macro), although if it is already set, it will not
|
||||
# be altered
|
||||
#
|
||||
# Note that these variables are never cleared, so if
|
||||
# ecm_find_package_handle_library_components() is called multiple times with
|
||||
# different components (typically because of multiple find_package() calls) then
|
||||
# ``<name>_TARGETS``, for example, will contain all the targets found in any
|
||||
# call (although no duplicates).
|
||||
#
|
||||
# Since pre-1.0.0.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
macro(ecm_find_package_version_check module_name)
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake")
|
||||
endif()
|
||||
if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
|
||||
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ecm_find_package_parse_components module_name)
|
||||
set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING)
|
||||
set(ecm_fppc_oneValueArgs RESULT_VAR)
|
||||
set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS)
|
||||
cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN})
|
||||
|
||||
if(ECM_FPPC_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unexpected arguments to ecm_find_package_parse_components: ${ECM_FPPC_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT ECM_FPPC_RESULT_VAR)
|
||||
message(FATAL_ERROR "Missing RESULT_VAR argument to ecm_find_package_parse_components")
|
||||
endif()
|
||||
if(NOT ECM_FPPC_KNOWN_COMPONENTS)
|
||||
message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components")
|
||||
endif()
|
||||
if(NOT ECM_FPPC_DEFAULT_COMPONENTS)
|
||||
set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS})
|
||||
endif()
|
||||
|
||||
if(${module_name}_FIND_COMPONENTS)
|
||||
set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS})
|
||||
|
||||
if(NOT ECM_FPPC_SKIP_DEPENDENCY_HANDLING)
|
||||
# Make sure deps are included
|
||||
foreach(ecm_fppc_comp ${ecm_fppc_requestedComps})
|
||||
foreach(ecm_fppc_dep_comp ${${module_name}_${ecm_fppc_comp}_component_deps})
|
||||
list(FIND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}" ecm_fppc_index)
|
||||
if("${ecm_fppc_index}" STREQUAL "-1")
|
||||
if(NOT ${module_name}_FIND_QUIETLY)
|
||||
message(STATUS "${module_name}: ${ecm_fppc_comp} requires ${${module_name}_${ecm_fppc_comp}_component_deps}")
|
||||
endif()
|
||||
list(APPEND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "Skipping dependency handling for ${module_name}")
|
||||
endif()
|
||||
list(REMOVE_DUPLICATES ecm_fppc_requestedComps)
|
||||
|
||||
# This makes sure components are listed in the same order as
|
||||
# KNOWN_COMPONENTS (potentially important for inter-dependencies)
|
||||
set(${ECM_FPPC_RESULT_VAR})
|
||||
foreach(ecm_fppc_comp ${ECM_FPPC_KNOWN_COMPONENTS})
|
||||
list(FIND ecm_fppc_requestedComps "${ecm_fppc_comp}" ecm_fppc_index)
|
||||
if(NOT "${ecm_fppc_index}" STREQUAL "-1")
|
||||
list(APPEND ${ECM_FPPC_RESULT_VAR} "${ecm_fppc_comp}")
|
||||
list(REMOVE_AT ecm_fppc_requestedComps ${ecm_fppc_index})
|
||||
endif()
|
||||
endforeach()
|
||||
# if there are any left, they are unknown components
|
||||
if(ecm_fppc_requestedComps)
|
||||
set(ecm_fppc_msgType STATUS)
|
||||
if(${module_name}_FIND_REQUIRED)
|
||||
set(ecm_fppc_msgType FATAL_ERROR)
|
||||
endif()
|
||||
if(NOT ${module_name}_FIND_QUIETLY)
|
||||
message(${ecm_fppc_msgType} "${module_name}: requested unknown components ${ecm_fppc_requestedComps}")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ecm_find_package_handle_library_components module_name)
|
||||
set(ecm_fpwc_options SKIP_PKG_CONFIG SKIP_DEPENDENCY_HANDLING)
|
||||
set(ecm_fpwc_oneValueArgs)
|
||||
set(ecm_fpwc_multiValueArgs COMPONENTS)
|
||||
cmake_parse_arguments(ECM_FPWC "${ecm_fpwc_options}" "${ecm_fpwc_oneValueArgs}" "${ecm_fpwc_multiValueArgs}" ${ARGN})
|
||||
|
||||
if(ECM_FPWC_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unexpected arguments to ecm_find_package_handle_components: ${ECM_FPWC_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT ECM_FPWC_COMPONENTS)
|
||||
message(FATAL_ERROR "Missing COMPONENTS argument to ecm_find_package_handle_components")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package(PkgConfig)
|
||||
foreach(ecm_fpwc_comp ${ECM_FPWC_COMPONENTS})
|
||||
set(ecm_fpwc_dep_vars)
|
||||
set(ecm_fpwc_dep_targets)
|
||||
if(NOT SKIP_DEPENDENCY_HANDLING)
|
||||
foreach(ecm_fpwc_dep ${${module_name}_${ecm_fpwc_comp}_component_deps})
|
||||
list(APPEND ecm_fpwc_dep_vars "${module_name}_${ecm_fpwc_dep}_FOUND")
|
||||
list(APPEND ecm_fpwc_dep_targets "${module_name}::${ecm_fpwc_dep}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config)
|
||||
pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET
|
||||
${${module_name}_${ecm_fpwc_comp}_pkg_config})
|
||||
endif()
|
||||
|
||||
find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||
NAMES ${${module_name}_${ecm_fpwc_comp}_header}
|
||||
HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir}
|
||||
)
|
||||
find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||
NAMES ${${module_name}_${ecm_fpwc_comp}_lib}
|
||||
HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(${module_name}_${ecm_fpwc_comp}_VERSION "${PKG_${module_name}_${ecm_fpwc_comp}_VERSION}")
|
||||
if(NOT ${module_name}_VERSION)
|
||||
set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp}
|
||||
FOUND_VAR
|
||||
${module_name}_${ecm_fpwc_comp}_FOUND
|
||||
REQUIRED_VARS
|
||||
${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||
${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||
${ecm_fpwc_dep_vars}
|
||||
VERSION_VAR
|
||||
${module_name}_${ecm_fpwc_comp}_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||
${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(${module_name}_${ecm_fpwc_comp}_FOUND)
|
||||
list(APPEND ${module_name}_LIBRARIES
|
||||
"${${module_name}_${ecm_fpwc_comp}_LIBRARY}")
|
||||
list(APPEND ${module_name}_INCLUDE_DIRS
|
||||
"${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}")
|
||||
set(${module_name}_DEFINITIONS
|
||||
${${module_name}_DEFINITIONS}
|
||||
${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS})
|
||||
if(NOT TARGET ${module_name}::${ecm_fpwc_comp})
|
||||
add_library(${module_name}::${ecm_fpwc_comp} UNKNOWN IMPORTED)
|
||||
set_target_properties(${module_name}::${ecm_fpwc_comp} PROPERTIES
|
||||
IMPORTED_LOCATION "${${module_name}_${ecm_fpwc_comp}_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${ecm_fpwc_dep_targets}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${module_name}_TARGETS
|
||||
"${module_name}::${ecm_fpwc_comp}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(${module_name}_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES ${module_name}_LIBRARIES)
|
||||
endif()
|
||||
if(${module_name}_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES ${module_name}_INCLUDE_DIRS)
|
||||
endif()
|
||||
if(${module_name}_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES ${module_name}_DEFINITIONS)
|
||||
endif()
|
||||
if(${module_name}_TARGETS)
|
||||
list(REMOVE_DUPLICATES ${module_name}_TARGETS)
|
||||
endif()
|
||||
endmacro()
|
||||
1
cmake/modules/ECMFindModuleHelpersStub.cmake
Normal file
1
cmake/modules/ECMFindModuleHelpersStub.cmake
Normal file
@@ -0,0 +1 @@
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../modules/ECMFindModuleHelpers.cmake)
|
||||
35
cmake/modules/FindGLib2.cmake
Normal file
35
cmake/modules/FindGLib2.cmake
Normal file
@@ -0,0 +1,35 @@
|
||||
# FindGLib2.cmake
|
||||
|
||||
# GLib2_FOUND - System has GLib2
|
||||
# GLib2_INCLUDES - The GLib2 include directories
|
||||
# GLib2_LIBRARIES - The libraries needed to use GLib2
|
||||
# GLib2_DEFINITIONS - Compiler switches required for using GLib2
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(GLib2 QUIET glib-2.0)
|
||||
set(GLib2_DEFINITIONS ${GLib2_CFLAGS_OTHER})
|
||||
|
||||
find_path(GLib2_INCLUDE_DIR
|
||||
NAMES glib.h glib-object.h
|
||||
HINTS ${GLib2_INCLUDEDIR} ${GLib2_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES glib-2.0)
|
||||
find_path(GLIBCONFIG_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
HINTS ${LIBDIR} ${LIBRARY_DIRS} ${_GLib2_LIBRARY_DIR}
|
||||
${GLib2_INCLUDEDIR} ${GLib2_INCLUDE_DIRS}
|
||||
${CMAKE_EXTRA_INCLUDES} ${CMAKE_EXTRA_LIBRARIES}
|
||||
PATH_SUFFIXES glib-2.0 glib-2.0/include)
|
||||
list(APPEND GLib2_INCLUDE_DIR ${GLIBCONFIG_INCLUDE_DIR})
|
||||
|
||||
find_library(GLib2_LIBRARY
|
||||
NAMES glib-2.0 libglib-2.0
|
||||
HINTS ${GLib2_LIBDIR} ${GLib2_LIBRARY_DIRS})
|
||||
|
||||
set(GLib2_LIBRARIES ${GLib2_LIBRARY})
|
||||
set(GLib2_INCLUDE_DIRS ${GLib2_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLib2 DEFAULT_MSG
|
||||
GLib2_LIBRARY GLib2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLib2_INCLUDE_DIR GLib2_LIBRARY)
|
||||
61
cmake/modules/FindGio.cmake
Normal file
61
cmake/modules/FindGio.cmake
Normal file
@@ -0,0 +1,61 @@
|
||||
# - Try to find Gio
|
||||
# Once done this will define
|
||||
#
|
||||
# GIO_FOUND - system has Gio
|
||||
# GIO_INCLUDE_DIR - the Gio include directory
|
||||
# GIO_LIBRARIES - the libraries needed to use Gio
|
||||
# GIO_DEFINITIONS - Compiler switches required for using Gio
|
||||
|
||||
|
||||
IF (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
# in cache already
|
||||
SET(Gio_FIND_QUIETLY TRUE)
|
||||
ELSE (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
SET(Gio_FIND_QUIETLY FALSE)
|
||||
ENDIF (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
|
||||
IF (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(GIO gio-2.0)
|
||||
#MESSAGE(STATUS "DEBUG: Gio include directory = ${GIO_INCLUDE_DIRS}")
|
||||
#MESSAGE(STATUS "DEBUG: Gio link directory = ${GIO_LIBRARY_DIRS}")
|
||||
#MESSAGE(STATUS "DEBUG: Gio CFlags = ${GIO_CFLAGS}")
|
||||
SET(GIO_DEFINITIONS ${GIO_CFLAGS_OTHER})
|
||||
ENDIF (NOT WIN32)
|
||||
|
||||
FIND_PATH(GIO_INCLUDE_DIR gio.h
|
||||
PATHS
|
||||
${GIO_INCLUDEDIR}
|
||||
${GIO_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES glib-2.0/gio/
|
||||
)
|
||||
|
||||
FIND_LIBRARY(_GioLibs NAMES gio-2.0 libgio-2.0
|
||||
PATHS
|
||||
${GIO_LIBDIR}
|
||||
${GIO_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
SET( GIO_LIBRARIES ${_GioLibs} )
|
||||
SET( GIO_INCLUDE_DIRS ${GIO_INCLUDE_DIR} )
|
||||
|
||||
IF (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
SET(GIO_FOUND TRUE)
|
||||
ELSE (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
SET(GIO_FOUND FALSE)
|
||||
ENDIF (GIO_INCLUDE_DIR AND GIO_LIBRARIES)
|
||||
|
||||
IF (GIO_FOUND)
|
||||
IF (NOT Gio_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Gio libraries: ${GIO_LIBRARIES}")
|
||||
MESSAGE(STATUS "Found Gio includes : ${GIO_INCLUDE_DIR}")
|
||||
ENDIF (NOT Gio_FIND_QUIETLY)
|
||||
ELSE (GIO_FOUND)
|
||||
IF (Gio_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "Could NOT find Gio")
|
||||
ENDIF(Gio_FIND_REQUIRED)
|
||||
ENDIF (GIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(GIO_INCLUDE_DIR _GioLibs)
|
||||
22
cmake/modules/FindLibcloudproviders.cmake
Normal file
22
cmake/modules/FindLibcloudproviders.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
# FindLibcloudproviders.cmake
|
||||
|
||||
find_path(LIBCLOUDPROVIDERS_INCLUDE_DIR
|
||||
NAMES cloudprovidersproviderexporter.h cloudprovidersaccountexporter.h
|
||||
PATH_SUFFIXES cloudproviders
|
||||
)
|
||||
find_library(LIBCLOUDPROVIDERS_LIBRARY
|
||||
NAMES
|
||||
libcloudproviders
|
||||
cloudproviders
|
||||
HINTS
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_ARCH_TRIPLET}
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
message("================> ${LIBCLOUDPROVIDERS_LIBRARY}")
|
||||
|
||||
find_package_handle_standard_args(LIBCLOUDPROVIDERS DEFAULT_MSG LIBCLOUDPROVIDERS_INCLUDE_DIR LIBCLOUDPROVIDERS_LIBRARY)
|
||||
117
cmake/modules/FindPng2Ico.cmake
Normal file
117
cmake/modules/FindPng2Ico.cmake
Normal file
@@ -0,0 +1,117 @@
|
||||
#.rst:
|
||||
# FindPng2Ico
|
||||
# -----------
|
||||
#
|
||||
# Try to find png2ico.
|
||||
#
|
||||
# If the png2ico executable is not in your PATH, you can provide
|
||||
# an alternative name or full path location with the ``Png2Ico_EXECUTABLE``
|
||||
# variable.
|
||||
#
|
||||
# This will define the following variables:
|
||||
#
|
||||
# ``Png2Ico_FOUND``
|
||||
# True if png2ico is available.
|
||||
#
|
||||
# ``Png2Ico_EXECUTABLE``
|
||||
# The png2ico executable.
|
||||
#
|
||||
# If ``Png2Ico_FOUND`` is TRUE, it will also define the following imported
|
||||
# target:
|
||||
#
|
||||
# ``Png2Ico::Png2Ico``
|
||||
# The png2ico executable.
|
||||
#
|
||||
# and the following variables:
|
||||
#
|
||||
# ``Png2Ico_HAS_COLORS_ARGUMENT``
|
||||
# Whether png2ico accepts a ``--colors`` argument. `Matthias Benkmann's
|
||||
# tool <http://www.winterdrache.de/freeware/png2ico/>`_ does, while the
|
||||
# version of png2ico from the `"KDE On Windows" (kdewin)
|
||||
# <https://projects.kde.org/projects/kdesupport/kdewin>`_ project does not.
|
||||
#
|
||||
# ``Png2Ico_HAS_RCFILE_ARGUMENT``
|
||||
# Whether png2ico accepts an ``--rcfile`` argument. The version of png2ico
|
||||
# from the `"KDE On Windows" (kdewin)
|
||||
# <https://projects.kde.org/projects/kdesupport/kdewin>`_ project does,
|
||||
# while `Matthias Benkmann's tool
|
||||
# <http://www.winterdrache.de/freeware/png2ico/>`_ does not.
|
||||
#
|
||||
# Since 1.7.0.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
|
||||
|
||||
ecm_find_package_version_check(Png2Ico)
|
||||
|
||||
# Find png2ico
|
||||
find_program(Png2Ico_EXECUTABLE NAMES png2ico)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Png2Ico
|
||||
FOUND_VAR
|
||||
Png2Ico_FOUND
|
||||
REQUIRED_VARS
|
||||
Png2Ico_EXECUTABLE
|
||||
)
|
||||
|
||||
mark_as_advanced(Png2Ico_EXECUTABLE)
|
||||
|
||||
if (Png2Ico_FOUND)
|
||||
execute_process(
|
||||
COMMAND "${Png2Ico_EXECUTABLE}" --help
|
||||
OUTPUT_VARIABLE _png2ico_help_text
|
||||
ERROR_VARIABLE _png2ico_help_text
|
||||
)
|
||||
if (_png2ico_help_text MATCHES ".*--rcfile .*")
|
||||
set(Png2Ico_HAS_RCFILE_ARGUMENT TRUE)
|
||||
else()
|
||||
set(Png2Ico_HAS_RCFILE_ARGUMENT FALSE)
|
||||
endif()
|
||||
if (_png2ico_help_text MATCHES ".*--colors .*")
|
||||
set(Png2Ico_HAS_COLORS_ARGUMENT TRUE)
|
||||
else()
|
||||
set(Png2Ico_HAS_COLORS_ARGUMENT FALSE)
|
||||
endif()
|
||||
unset(_png2ico_help_text)
|
||||
|
||||
if (NOT TARGET Png2Ico::Png2Ico)
|
||||
add_executable(Png2Ico::Png2Ico IMPORTED)
|
||||
set_target_properties(Png2Ico::Png2Ico PROPERTIES
|
||||
IMPORTED_LOCATION "${Png2Ico_EXECUTABLE}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(Png2Ico PROPERTIES
|
||||
URL "http://www.winterdrache.de/freeware/png2ico/ or https://projects.kde.org/projects/kdesupport/kdewin"
|
||||
DESCRIPTION "Executable that converts a collection of PNG files into a Windows icon file"
|
||||
)
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MIRALL_VERSION_STRING@</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>(C) 2014-2018 @APPLICATION_VENDOR@</string>
|
||||
<string>(C) 2014-2016 @APPLICATION_VENDOR@</string>
|
||||
<key>SUShowReleaseNotes</key>
|
||||
<false/>
|
||||
<key>LSMinimumBundleVersion</key>
|
||||
<string>10.7.0</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>dsa_pub.pem</string>
|
||||
</dict>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# - MACRO_ADD_PLUGIN(name [WITH_PREFIX] file1 .. fileN)
|
||||
#
|
||||
# Create a plugin from the given source files.
|
||||
# If WITH_PREFIX is given, the resulting plugin will have the
|
||||
# prefix "lib", otherwise it won't.
|
||||
#
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
||||
# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
macro (MACRO_ADD_PLUGIN _target_NAME _with_PREFIX)
|
||||
|
||||
if (${_with_PREFIX} STREQUAL "WITH_PREFIX")
|
||||
set(_first_SRC)
|
||||
else (${_with_PREFIX} STREQUAL "WITH_PREFIX")
|
||||
set(_first_SRC ${_with_PREFIX})
|
||||
endif (${_with_PREFIX} STREQUAL "WITH_PREFIX")
|
||||
|
||||
add_library(${_target_NAME} MODULE ${_first_SRC} ${ARGN})
|
||||
|
||||
if (_first_SRC)
|
||||
set_target_properties(${_target_NAME} PROPERTIES PREFIX "")
|
||||
endif (_first_SRC)
|
||||
|
||||
endmacro (MACRO_ADD_PLUGIN _name _sources)
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
# - macro_copy_file(_src _dst)
|
||||
# Copies a file to ${_dst} only if ${_src} is different (newer) than ${_dst}
|
||||
#
|
||||
# Example:
|
||||
# macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/icon.png ${CMAKE_CURRENT_BINARY_DIR}/.)
|
||||
# Copies file icon.png to ${CMAKE_CURRENT_BINARY_DIR} directory
|
||||
#
|
||||
# Copyright (c) 2006-2007 Wengo
|
||||
# Copyright (c) 2006-2008 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING file.
|
||||
|
||||
|
||||
macro (macro_copy_file _src _dst)
|
||||
# Removes all path containing .svn or CVS or CMakeLists.txt during the copy
|
||||
if (NOT ${_src} MATCHES ".*\\.svn|CVS|CMakeLists\\.txt.*")
|
||||
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
message(STATUS "Copy file from ${_src} to ${_dst}")
|
||||
endif (CMAKE_VERBOSE_MAKEFILE)
|
||||
|
||||
# Creates directory if necessary
|
||||
get_filename_component(_path ${_dst} PATH)
|
||||
file(MAKE_DIRECTORY ${_path})
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy_if_different ${_src} ${_dst}
|
||||
OUTPUT_QUIET
|
||||
)
|
||||
endif (NOT ${_src} MATCHES ".*\\.svn|CVS|CMakeLists\\.txt.*")
|
||||
endmacro (macro_copy_file)
|
||||
@@ -461,6 +461,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
|
||||
File "${MING_BIN}\libstdc++-6.dll"
|
||||
File "${MING_BIN}\libwinpthread-1.dll"
|
||||
File "${MING_BIN}\libssp-0.dll"
|
||||
|
||||
;CSync configs
|
||||
File "${SOURCE_PATH}/sync-exclude.lst"
|
||||
@@ -603,6 +604,35 @@ Section Uninstall
|
||||
Abort $UNINSTALL_ABORT
|
||||
owncloud_installed:
|
||||
|
||||
; Delete Navigation Pane entries added for Windows 10.
|
||||
; On 64bit Windows, the client will be writing to the 64bit registry.
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
StrCpy $0 0
|
||||
loop:
|
||||
; Look at every registered explorer namespace for HKCU and check if it was added by our application
|
||||
; (we write to a custom "ApplicationName" value there).
|
||||
EnumRegKey $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace" $0
|
||||
StrCmp $1 "" done
|
||||
|
||||
ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1" "ApplicationName"
|
||||
StrCmp $R0 "${APPLICATION_NAME}" deleteClsid
|
||||
; Increment the index when not deleting the enumerated key.
|
||||
IntOp $0 $0 + 1
|
||||
goto loop
|
||||
|
||||
deleteClsid:
|
||||
DetailPrint "Removing Navigation Pane CLSID $1"
|
||||
; Should match FolderMan::updateCloudStorageRegistry
|
||||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1"
|
||||
DeleteRegKey HKCU "Software\Classes\CLSID\$1"
|
||||
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" $1
|
||||
goto loop
|
||||
done:
|
||||
; Go back to the 32bit registry.
|
||||
SetRegView lastused
|
||||
|
||||
;Delete registry keys.
|
||||
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
|
||||
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
include (MacroOptionalFindPackage)
|
||||
include (MacroLogFeature)
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
if(UNIT_TESTING)
|
||||
find_package(Qt5Test REQUIRED)
|
||||
endif()
|
||||
|
||||
if(NOT TOKEN_AUTH_ONLY)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
if(APPLE)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
endif(APPLE)
|
||||
|
||||
if(NOT NO_SHIBBOLETH)
|
||||
find_package(Qt5WebKitWidgets)
|
||||
find_package(Qt5WebKit)
|
||||
if(NOT Qt5WebKitWidgets_FOUND)
|
||||
message(FATAL_ERROR "Qt5WebKit required for Shibboleth. Use -DNO_SHIBBOLETH=1 to disable it.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We need this to find the paths to qdbusxml2cpp and co
|
||||
if (WITH_DBUS)
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
include_directories(${Qt5DBus_INCLUDES})
|
||||
add_definitions(${Qt5DBus_DEFINITIONS})
|
||||
endif (WITH_DBUS)
|
||||
include_directories(${Qt5Core_INCLUDES})
|
||||
add_definitions(${Qt5Core_DEFINITIONS})
|
||||
if (NOT WIN32) #implied on Win32
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif(NOT WIN32)
|
||||
# set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
|
||||
if(APPLE AND NOT TOKEN_AUTH_ONLY)
|
||||
include_directories(${Qt5MacExtras_INCLUDE_DIRS})
|
||||
add_definitions(${Qt5MacExtras_DEFINITIONS})
|
||||
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5MacExtras_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
macro(qt_wrap_ui)
|
||||
qt5_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
else()
|
||||
# hack
|
||||
SET(QT_UIC_EXECUTABLE "")
|
||||
endif()
|
||||
|
||||
macro(qt_add_resources)
|
||||
qt5_add_resources(${ARGN})
|
||||
endmacro()
|
||||
|
||||
if(NOT TOKEN_AUTH_ONLY)
|
||||
find_package(Qt5LinguistTools)
|
||||
if(Qt5LinguistTools_FOUND)
|
||||
macro(qt_add_translation)
|
||||
qt5_add_translation(${ARGN})
|
||||
endmacro()
|
||||
else()
|
||||
macro(qt_add_translation)
|
||||
endmacro()
|
||||
endif()
|
||||
else()
|
||||
macro(qt_add_translation)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
macro(qt_add_dbus_interface)
|
||||
qt5_add_dbus_interface(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_add_dbus_adaptor)
|
||||
qt5_add_dbus_adaptor(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(qt_wrap_cpp)
|
||||
qt5_wrap_cpp(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(install_qt_executable)
|
||||
install_qt5_executable(${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(setup_qt)
|
||||
endmacro()
|
||||
|
||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||
|
||||
#Enable deprecated symbols
|
||||
add_definitions("-DQT_DISABLE_DEPRECATED_BEFORE=0")
|
||||
|
||||
add_definitions("-DQT_USE_QSTRINGBUILDER") #optimize string concatenation
|
||||
add_definitions("-DQT_MESSAGELOGCONTEXT") #enable function name and line number in debug output
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# - macro_asciidoc2man(inputfile outputfile)
|
||||
#
|
||||
# Create a manpage with asciidoc.
|
||||
# Example: macro_asciidoc2man(foo.txt foo.1)
|
||||
#
|
||||
# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
include(MacroCopyFile)
|
||||
|
||||
macro(MACRO_ASCIIDOC2MAN _a2m_input _a2m_output)
|
||||
find_program(A2X
|
||||
NAMES
|
||||
a2x
|
||||
)
|
||||
#message("+++ A2X: ${A2X}")
|
||||
|
||||
if (A2X)
|
||||
|
||||
#message("+++ ${A2X} --doctype=manpage --format=manpage --destination-dir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input}")
|
||||
macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/${_a2m_input} ${CMAKE_CURRENT_BINARY_DIR}/${_a2m_input})
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${A2X} --doctype=manpage --format=manpage ${_a2m_input}
|
||||
WORKING_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
RESULT_VARIABLE
|
||||
A2M_MAN_GENERATED
|
||||
ERROR_QUIET
|
||||
)
|
||||
|
||||
#message("+++ A2M_MAN_GENERATED: ${A2M_MAN_GENERATED}")
|
||||
if (A2M_MAN_GENERATED EQUAL 0)
|
||||
find_file(A2M_MAN_FILE
|
||||
NAME
|
||||
${_a2m_output}
|
||||
PATHS
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if (A2M_MAN_FILE)
|
||||
get_filename_component(A2M_MAN_CATEGORY ${A2M_MAN_FILE} EXT)
|
||||
string(SUBSTRING ${A2M_MAN_CATEGORY} 1 1 A2M_MAN_CATEGORY)
|
||||
install(
|
||||
FILES
|
||||
${A2M_MAN_FILE}
|
||||
DESTINATION
|
||||
${MAN_INSTALL_DIR}/man${A2M_MAN_CATEGORY}
|
||||
)
|
||||
endif (A2M_MAN_FILE)
|
||||
endif (A2M_MAN_GENERATED EQUAL 0)
|
||||
|
||||
endif (A2X)
|
||||
endmacro(MACRO_ASCIIDOC2MAN _a2m_input _a2m_file)
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
# 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")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
|
||||
@@ -1,460 +0,0 @@
|
||||
/*
|
||||
* libcsync -- a library to sync a directory with another
|
||||
*
|
||||
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include "csync_update.cpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
#include "torture.h"
|
||||
|
||||
#define TESTDB "/tmp/check_csync/journal.db"
|
||||
|
||||
static int firstrun = 1;
|
||||
|
||||
static void statedb_create_metadata_table(sqlite3 *db)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if( db ) {
|
||||
const char *sql = "CREATE TABLE IF NOT EXISTS metadata("
|
||||
"phash INTEGER(8),"
|
||||
"pathlen INTEGER,"
|
||||
"path VARCHAR(4096),"
|
||||
"inode INTEGER,"
|
||||
"uid INTEGER,"
|
||||
"gid INTEGER,"
|
||||
"mode INTEGER,"
|
||||
"modtime INTEGER(8),"
|
||||
"type INTEGER,"
|
||||
"md5 VARCHAR(32),"
|
||||
"fileid VARCHAR(128),"
|
||||
"remotePerm VARCHAR(128),"
|
||||
"filesize BIGINT,"
|
||||
"ignoredChildrenRemote INT,"
|
||||
"contentChecksum TEXT,"
|
||||
"contentChecksumTypeId INTEGER,"
|
||||
"PRIMARY KEY(phash));";
|
||||
|
||||
rc = sqlite3_exec(db, sql, NULL, NULL, NULL);
|
||||
//const char *msg = sqlite3_errmsg(db);
|
||||
assert_int_equal( rc, SQLITE_OK );
|
||||
|
||||
sql = "CREATE TABLE IF NOT EXISTS checksumtype("
|
||||
"id INTEGER PRIMARY KEY,"
|
||||
"name TEXT UNIQUE"
|
||||
");";
|
||||
rc = sqlite3_exec(db, sql, NULL, NULL, NULL);
|
||||
assert_int_equal( rc, SQLITE_OK );
|
||||
}
|
||||
}
|
||||
|
||||
static void statedb_insert_metadata(sqlite3 *db)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if( db ) {
|
||||
char *stmt = sqlite3_mprintf("INSERT INTO metadata"
|
||||
"(phash, pathlen, path, inode, uid, gid, mode, modtime,type,md5) VALUES"
|
||||
"(%lld, %d, '%q', %d, %d, %d, %d, %lld, %d, '%q');",
|
||||
(long long signed int)42,
|
||||
42,
|
||||
"I_was_wurst_before_I_became_wurstsalat",
|
||||
619070,
|
||||
42,
|
||||
42,
|
||||
42,
|
||||
(long long signed int)42,
|
||||
0,
|
||||
"4711");
|
||||
|
||||
char *errmsg;
|
||||
rc = sqlite3_exec(db, stmt, NULL, NULL, &errmsg);
|
||||
sqlite3_free(stmt);
|
||||
assert_int_equal( rc, SQLITE_OK );
|
||||
}
|
||||
}
|
||||
|
||||
static int setup(void **state)
|
||||
{
|
||||
CSYNC *csync;
|
||||
int rc;
|
||||
|
||||
unlink(TESTDB);
|
||||
rc = system("mkdir -p /tmp/check_csync");
|
||||
assert_int_equal(rc, 0);
|
||||
rc = system("mkdir -p /tmp/check_csync1");
|
||||
assert_int_equal(rc, 0);
|
||||
csync_create(&csync, "/tmp/check_csync1");
|
||||
csync_init(csync, TESTDB);
|
||||
|
||||
/* Create a new db with metadata */
|
||||
sqlite3 *db;
|
||||
csync->statedb.file = c_strdup(TESTDB);
|
||||
rc = sqlite3_open(csync->statedb.file, &db);
|
||||
statedb_create_metadata_table(db);
|
||||
if( firstrun ) {
|
||||
statedb_insert_metadata(db);
|
||||
firstrun = 0;
|
||||
}
|
||||
sqlite3_close(db);
|
||||
|
||||
rc = csync_statedb_load(csync, TESTDB, &csync->statedb.db);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
*state = csync;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setup_ftw(void **state)
|
||||
{
|
||||
CSYNC *csync;
|
||||
int rc;
|
||||
|
||||
rc = system("mkdir -p /tmp/check_csync");
|
||||
assert_int_equal(rc, 0);
|
||||
rc = system("mkdir -p /tmp/check_csync1");
|
||||
assert_int_equal(rc, 0);
|
||||
csync_create(&csync, "/tmp");
|
||||
csync_init(csync, TESTDB);
|
||||
|
||||
sqlite3 *db = NULL;
|
||||
rc = sqlite3_open_v2(TESTDB, &db, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, NULL);
|
||||
assert_int_equal(rc, SQLITE_OK);
|
||||
statedb_create_metadata_table(db);
|
||||
rc = sqlite3_close(db);
|
||||
assert_int_equal(rc, SQLITE_OK);
|
||||
|
||||
rc = csync_statedb_load(csync, TESTDB, &csync->statedb.db);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
csync->statedb.file = c_strdup( TESTDB );
|
||||
*state = csync;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int teardown(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
int rc;
|
||||
|
||||
unlink( csync->statedb.file);
|
||||
rc = csync_destroy(csync);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
*state = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int teardown_rm(void **state) {
|
||||
int rc;
|
||||
|
||||
teardown(state);
|
||||
|
||||
rc = system("rm -rf /tmp/check_csync");
|
||||
assert_int_equal(rc, 0);
|
||||
rc = system("rm -rf /tmp/check_csync1");
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* create a file stat, caller must free memory */
|
||||
static csync_vio_file_stat_t* create_fstat(const char *name,
|
||||
ino_t inode,
|
||||
time_t mtime)
|
||||
{
|
||||
csync_vio_file_stat_t *fs = NULL;
|
||||
time_t t;
|
||||
|
||||
fs = csync_vio_file_stat_new();
|
||||
if (fs == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (name && *name) {
|
||||
fs->name = c_strdup(name);
|
||||
} else {
|
||||
fs->name = c_strdup("file.txt");
|
||||
}
|
||||
|
||||
if (fs->name == NULL) {
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fs->fields = CSYNC_VIO_FILE_STAT_FIELDS_NONE;
|
||||
|
||||
fs->type = CSYNC_VIO_FILE_TYPE_REGULAR;
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
|
||||
|
||||
|
||||
if (inode == 0) {
|
||||
fs->inode = 619070;
|
||||
} else {
|
||||
fs->inode = inode;
|
||||
}
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_INODE;
|
||||
|
||||
|
||||
fs->size = 157459;
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_SIZE;
|
||||
|
||||
|
||||
|
||||
if (mtime == 0) {
|
||||
fs->atime = fs->ctime = fs->mtime = time(&t);
|
||||
} else {
|
||||
fs->atime = fs->ctime = fs->mtime = mtime;
|
||||
}
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_ATIME;
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_CTIME;
|
||||
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_MTIME;
|
||||
|
||||
return fs;
|
||||
}
|
||||
|
||||
static int failing_fn(CSYNC *ctx,
|
||||
const char *file,
|
||||
const csync_vio_file_stat_t *fs,
|
||||
int flag)
|
||||
{
|
||||
(void) ctx;
|
||||
(void) file;
|
||||
(void) fs;
|
||||
(void) flag;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* detect a new file */
|
||||
static void check_csync_detect_update(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_file_stat_t *st;
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc;
|
||||
|
||||
fs = create_fstat("file.txt", 0, 1217597845);
|
||||
assert_non_null(fs);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/file.txt",
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
/* the instruction should be set to new */
|
||||
st = (csync_file_stat_t*)c_rbtree_node_data(csync->local.tree->root);
|
||||
assert_int_equal(st->instruction, CSYNC_INSTRUCTION_NEW);
|
||||
|
||||
/* create a statedb */
|
||||
csync_set_status(csync, 0xFFFF);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
/* Test behaviour in case no db is there. For that its important that the
|
||||
* test before this one uses teardown_rm.
|
||||
*/
|
||||
static void check_csync_detect_update_db_none(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_file_stat_t *st;
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc;
|
||||
|
||||
fs = create_fstat("file.txt", 0, 1217597845);
|
||||
assert_non_null(fs);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/file.txt",
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
/* the instruction should be set to new */
|
||||
st = (csync_file_stat_t*)c_rbtree_node_data(csync->local.tree->root);
|
||||
assert_int_equal(st->instruction, CSYNC_INSTRUCTION_NEW);
|
||||
|
||||
|
||||
/* create a statedb */
|
||||
csync_set_status(csync, 0xFFFF);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
static void check_csync_detect_update_db_eval(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_file_stat_t *st;
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc;
|
||||
|
||||
fs = create_fstat("file.txt", 0, 42);
|
||||
assert_non_null(fs);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/file.txt",
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
/* the instruction should be set to new */
|
||||
st = (csync_file_stat_t*)c_rbtree_node_data(csync->local.tree->root);
|
||||
assert_int_equal(st->instruction, CSYNC_INSTRUCTION_NEW);
|
||||
|
||||
/* create a statedb */
|
||||
csync_set_status(csync, 0xFFFF);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
|
||||
static void check_csync_detect_update_db_rename(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
// csync_file_stat_t *st;
|
||||
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc = 0;
|
||||
|
||||
fs = create_fstat("wurst.txt", 0, 42);
|
||||
assert_non_null(fs);
|
||||
csync_set_statedb_exists(csync, 1);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/wurst.txt",
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
/* the instruction should be set to rename */
|
||||
/*
|
||||
* temporarily broken.
|
||||
st = (csync_file_stat_t*)c_rbtree_node_data(csync->local.tree->root);
|
||||
assert_int_equal(st->instruction, CSYNC_INSTRUCTION_RENAME);
|
||||
|
||||
st->instruction = CSYNC_INSTRUCTION_UPDATED;
|
||||
*/
|
||||
/* create a statedb */
|
||||
csync_set_status(csync, 0xFFFF);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
static void check_csync_detect_update_db_new(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_file_stat_t *st;
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc;
|
||||
|
||||
fs = create_fstat("file.txt", 42000, 0);
|
||||
assert_non_null(fs);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/file.txt",
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
/* the instruction should be set to new */
|
||||
st = (csync_file_stat_t*)c_rbtree_node_data(csync->local.tree->root);
|
||||
assert_int_equal(st->instruction, CSYNC_INSTRUCTION_NEW);
|
||||
|
||||
|
||||
/* create a statedb */
|
||||
csync_set_status(csync, 0xFFFF);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
static void check_csync_detect_update_null(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
csync_vio_file_stat_t *fs;
|
||||
int rc;
|
||||
|
||||
fs = create_fstat("file.txt", 0, 0);
|
||||
assert_non_null(fs);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
NULL,
|
||||
fs,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, -1);
|
||||
|
||||
rc = _csync_detect_update(csync,
|
||||
"/tmp/check_csync1/file.txt",
|
||||
NULL,
|
||||
CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, -1);
|
||||
|
||||
csync_vio_file_stat_destroy(fs);
|
||||
}
|
||||
|
||||
static void check_csync_ftw(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
int rc;
|
||||
|
||||
rc = csync_ftw(csync, "/tmp", csync_walker, MAX_DEPTH);
|
||||
assert_int_equal(rc, 0);
|
||||
}
|
||||
|
||||
static void check_csync_ftw_empty_uri(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
int rc;
|
||||
|
||||
rc = csync_ftw(csync, "", csync_walker, MAX_DEPTH);
|
||||
assert_int_equal(rc, -1);
|
||||
}
|
||||
|
||||
static void check_csync_ftw_failing_fn(void **state)
|
||||
{
|
||||
CSYNC *csync = (CSYNC*)*state;
|
||||
int rc;
|
||||
|
||||
rc = csync_ftw(csync, "/tmp", failing_fn, MAX_DEPTH);
|
||||
assert_int_equal(rc, -1);
|
||||
}
|
||||
|
||||
int torture_run_tests(void)
|
||||
{
|
||||
const struct CMUnitTest tests[] = {
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update, setup, teardown_rm),
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update_db_none, setup, teardown),
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update_db_eval, setup, teardown),
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update_db_rename, setup, teardown),
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update_db_new, setup, teardown_rm),
|
||||
cmocka_unit_test_setup_teardown(check_csync_detect_update_null, setup, teardown_rm),
|
||||
|
||||
cmocka_unit_test_setup_teardown(check_csync_ftw, setup_ftw, teardown_rm),
|
||||
cmocka_unit_test_setup_teardown(check_csync_ftw_empty_uri, setup_ftw, teardown_rm),
|
||||
cmocka_unit_test_setup_teardown(check_csync_ftw_failing_fn, setup_ftw, teardown_rm),
|
||||
};
|
||||
|
||||
return cmocka_run_group_tests(tests, NULL, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,7 +38,13 @@ if(SPHINX_FOUND)
|
||||
-D latex_logo=${LATEX_LOGO}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_PDF_DIR} )
|
||||
add_custom_target(doc-pdf $(MAKE) -C ${SPHINX_PDF_DIR} all-pdf
|
||||
|
||||
set(MAKE "make" CACHE FILEPATH "make to be used for documentation generation if not using make as generator anyway")
|
||||
if(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||
set(MAKE "$(MAKE)")
|
||||
endif()
|
||||
|
||||
add_custom_target(doc-pdf ${MAKE} -C ${SPHINX_PDF_DIR} all-pdf
|
||||
DEPENDS doc-latex )
|
||||
add_dependencies(doc doc-pdf)
|
||||
endif(PDFLATEX_FOUND)
|
||||
|
||||
@@ -119,7 +119,7 @@ Preventing Automatic Updates in Linux Environments
|
||||
|
||||
Because the Linux client does not provide automatic updating functionality, there is no
|
||||
need to remove the automatic-update check. However, if you want to disable it edit your desktop
|
||||
client configuration file, ``$HOME/.local/share/data/ownCloud/owncloud.cfg``.
|
||||
client configuration file, ``$HOME/.config/ownCloud/owncloud.cfg``.
|
||||
Add this line to the [General] section::
|
||||
|
||||
skipUpdateCheck=true
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
The ownCloud Client reads a configuration file. You can locate this configuration file as follows:
|
||||
|
||||
On Linux distributions:
|
||||
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
|
||||
``$HOME/.config/ownCloud/owncloud.cfg``
|
||||
|
||||
On Microsoft Windows systems:
|
||||
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
|
||||
``%APPDATA%\ownCloud\owncloud.cfg``
|
||||
|
||||
On MAC OS X systems:
|
||||
``$HOME/Library/Application Support/ownCloud/owncloud.cfg``
|
||||
``$HOME/Library/Preferences/ownCloud/owncloud.cfg``
|
||||
|
||||
|
||||
The configuration file contains settings using the Microsoft Windows .ini file
|
||||
@@ -27,6 +27,8 @@ Some interesting values that can be set on the configuration file are:
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``forceSyncInterval`` | ``7200000`` | The duration of no activity after which a synchronization run shall be triggered automatically. |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``fullLocalDiscoveryInterval`` | ``3600000`` | The interval after which the next synchronization will perform a full local discovery. |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
| ``notificationRefreshInterval`` | ``300000`` | Specifies the default interval of checking for new server notifications in milliseconds. |
|
||||
+---------------------------------+---------------+--------------------------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
@@ -24,6 +24,20 @@ 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.
|
||||
|
||||
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
|
||||
|
||||
.. note::
|
||||
For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous `LTS`_.
|
||||
|
||||
Installation Wizard
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Other command line switches supported by ``owncloudcmd`` include the following:
|
||||
Retries maximum n times (defaults to 3)
|
||||
|
||||
``-h``
|
||||
Sync hidden files,do not ignore them
|
||||
Sync hidden files, do not ignore them
|
||||
|
||||
Credential Handling
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -194,174 +194,6 @@ 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
|
||||
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
@@ -446,10 +278,6 @@ Comment[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
GenericName[ko]=폴더 동기화
|
||||
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
Icon[ko]=@APPLICATION_EXECUTABLE@
|
||||
Comment[lo]=@APPLICATION_NAME@ ການປະສານຂໍ້ມູນຄອມພິວເຕີລູກຂ່າຍ
|
||||
GenericName[lo]=ໂຟນເດີຊິງ
|
||||
Name[lo]=@APPLICATION_NAME@ ຊິງຄອມພິວເຕີລູກຂ່າຍ
|
||||
Icon[lo]=@APPLICATION_EXECUTABLE@
|
||||
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
|
||||
|
||||
@@ -20,4 +20,9 @@ if( UNIX AND NOT APPLE )
|
||||
message("Dolphin plugin disabled: KDE Frameworks 5.16 not found")
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(libcloudproviders)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_subdirectory(windows)
|
||||
endif()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
if(APPLE)
|
||||
# Contrary to popular belief, this is called like this no matter what theme/OEM.
|
||||
set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/ownCloud.icns")
|
||||
set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
|
||||
|
||||
# The bundle identifier and application group need to have compatible values with the client
|
||||
# to be able to open a Mach port across the extension's sandbox boundary.
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
|
||||
******************************************************************************/
|
||||
|
||||
#include <KPluginFactory>
|
||||
#include <KPluginLoader>
|
||||
#include <KCoreAddons/KPluginFactory>
|
||||
#include <KCoreAddons/KPluginLoader>
|
||||
#include <KIOWidgets/kabstractfileitemactionplugin.h>
|
||||
#include <QtNetwork/QLocalSocket>
|
||||
#include <KIOCore/kfileitem.h>
|
||||
@@ -27,10 +27,12 @@
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QEventLoop>
|
||||
#include "ownclouddolphinpluginhelper.h"
|
||||
|
||||
class OwncloudDolphinPluginAction : public KAbstractFileItemActionPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OwncloudDolphinPluginAction(QObject* parent, const QList<QVariant>&)
|
||||
: KAbstractFileItemActionPlugin(parent) { }
|
||||
@@ -38,22 +40,72 @@ public:
|
||||
QList<QAction*> actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) Q_DECL_OVERRIDE
|
||||
{
|
||||
auto helper = OwncloudDolphinPluginHelper::instance();
|
||||
QList<QUrl> urls = fileItemInfos.urlList();
|
||||
if (urls.count() != 1 || !helper->isConnected())
|
||||
if (!helper->isConnected() || !fileItemInfos.isLocal())
|
||||
return {};
|
||||
|
||||
auto url = urls.first();
|
||||
if (!url.isLocalFile())
|
||||
return {};
|
||||
QDir localPath(url.toLocalFile());
|
||||
auto localFile = localPath.canonicalPath();
|
||||
|
||||
// If any of the url is outside of a sync folder, return an empty menu.
|
||||
const QList<QUrl> urls = fileItemInfos.urlList();
|
||||
const auto paths = helper->paths();
|
||||
if (!std::any_of(paths.begin(), paths.end(), [&](const QString &s) {
|
||||
return localFile.startsWith(s);
|
||||
} ))
|
||||
return {};
|
||||
QByteArray files;
|
||||
for (const auto &url : urls) {
|
||||
QDir localPath(url.toLocalFile());
|
||||
auto localFile = localPath.canonicalPath();
|
||||
if (!std::any_of(paths.begin(), paths.end(), [&](const QString &s) {
|
||||
return localFile.startsWith(s);
|
||||
}))
|
||||
return {};
|
||||
|
||||
if (!files.isEmpty())
|
||||
files += '\x1e'; // Record separator
|
||||
files += localFile.toUtf8();
|
||||
}
|
||||
|
||||
if (helper->version() < "1.1") { // in this case, lexicographic order works
|
||||
return legacyActions(fileItemInfos, parentWidget);
|
||||
}
|
||||
|
||||
auto menu = new QMenu(parentWidget);
|
||||
QEventLoop loop;
|
||||
auto con = connect(helper, &OwncloudDolphinPluginHelper::commandRecieved, this, [&](const QByteArray &cmd) {
|
||||
if (cmd.startsWith("GET_MENU_ITEMS:END")) {
|
||||
loop.quit();
|
||||
} else if (cmd.startsWith("MENU_ITEM:")) {
|
||||
auto args = QString::fromUtf8(cmd).split(QLatin1Char(':'));
|
||||
if (args.size() < 4)
|
||||
return;
|
||||
auto action = menu->addAction(args.mid(3).join(QLatin1Char(':')));
|
||||
if (args.value(2).contains(QLatin1Char('d')))
|
||||
action->setDisabled(true);
|
||||
auto call = args.value(1).toLatin1();
|
||||
connect(action, &QAction::triggered, [helper, call, files] {
|
||||
helper->sendCommand(QByteArray(call + ":" + files + "\n"));
|
||||
});
|
||||
}
|
||||
});
|
||||
QTimer::singleShot(100, &loop, SLOT(quit())); // add a timeout to be sure we don't freeze dolphin
|
||||
helper->sendCommand(QByteArray("GET_MENU_ITEMS:" + files + "\n"));
|
||||
loop.exec(QEventLoop::ExcludeUserInputEvents);
|
||||
disconnect(con);
|
||||
if (menu->actions().isEmpty()) {
|
||||
delete menu;
|
||||
return {};
|
||||
}
|
||||
|
||||
auto menuaction = new QAction(parentWidget);
|
||||
menuaction->setText(helper->contextMenuTitle());
|
||||
menuaction->setMenu(menu);
|
||||
return { menuaction };
|
||||
}
|
||||
|
||||
|
||||
QList<QAction *> legacyActions(const KFileItemListProperties &fileItemInfos, QWidget *parentWidget)
|
||||
{
|
||||
QList<QUrl> urls = fileItemInfos.urlList();
|
||||
if (urls.count() != 1)
|
||||
return {};
|
||||
QDir localPath(urls.first().toLocalFile());
|
||||
auto localFile = localPath.canonicalPath();
|
||||
auto helper = OwncloudDolphinPluginHelper::instance();
|
||||
auto menuaction = new QAction(parentWidget);
|
||||
menuaction->setText(helper->contextMenuTitle());
|
||||
auto menu = new QMenu(parentWidget);
|
||||
@@ -61,8 +113,8 @@ public:
|
||||
|
||||
auto shareAction = menu->addAction(helper->shareActionTitle());
|
||||
connect(shareAction, &QAction::triggered, this, [localFile, helper] {
|
||||
helper->sendCommand(QByteArray("SHARE:"+localFile.toUtf8()+"\n"));
|
||||
} );
|
||||
helper->sendCommand(QByteArray("SHARE:" + localFile.toUtf8() + "\n"));
|
||||
});
|
||||
|
||||
if (!helper->copyPrivateLinkTitle().isEmpty()) {
|
||||
auto copyPrivateLinkAction = menu->addAction(helper->copyPrivateLinkTitle());
|
||||
@@ -77,7 +129,6 @@ public:
|
||||
helper->sendCommand(QByteArray("EMAIL_PRIVATE_LINK:" + localFile.toUtf8() + "\n"));
|
||||
});
|
||||
}
|
||||
|
||||
return { menuaction };
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ void OwncloudDolphinPluginHelper::sendCommand(const char* data)
|
||||
|
||||
void OwncloudDolphinPluginHelper::slotConnected()
|
||||
{
|
||||
sendCommand("VERSION:\n");
|
||||
sendCommand("GET_STRINGS:\n");
|
||||
}
|
||||
|
||||
@@ -98,6 +99,16 @@ void OwncloudDolphinPluginHelper::slotReadyRead()
|
||||
_strings[args[1]] = args.mid(2).join(QLatin1Char(':'));
|
||||
}
|
||||
continue;
|
||||
} else if (line.startsWith("VERSION:")) {
|
||||
auto args = line.split(':');
|
||||
auto version = args.value(2);
|
||||
_version = version;
|
||||
if (!version.startsWith("1.")) {
|
||||
// Incompatible version, disconnect forever
|
||||
_connectTimer.stop();
|
||||
_socket.disconnectFromServer();
|
||||
return;
|
||||
}
|
||||
}
|
||||
emit commandRecieved(line);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <QObject>
|
||||
#include <QBasicTimer>
|
||||
#include <QLocalSocket>
|
||||
#include <QRegularExpression>
|
||||
#include "ownclouddolphinpluginhelper_export.h"
|
||||
|
||||
class OWNCLOUDDOLPHINPLUGINHELPER_EXPORT OwncloudDolphinPluginHelper : public QObject {
|
||||
@@ -44,6 +45,8 @@ public:
|
||||
QString copyPrivateLinkTitle() const { return _strings["COPY_PRIVATE_LINK_MENU_TITLE"]; }
|
||||
QString emailPrivateLinkTitle() const { return _strings["EMAIL_PRIVATE_LINK_MENU_TITLE"]; }
|
||||
|
||||
QByteArray version() { return _version; }
|
||||
|
||||
signals:
|
||||
void commandRecieved(const QByteArray &cmd);
|
||||
|
||||
@@ -61,4 +64,5 @@ private:
|
||||
QBasicTimer _connectTimer;
|
||||
|
||||
QMap<QString, QString> _strings;
|
||||
QByteArray _version;
|
||||
};
|
||||
|
||||
57
shell_integration/libcloudproviders/CMakeLists.txt
Normal file
57
shell_integration/libcloudproviders/CMakeLists.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
include(UsePkgConfig)
|
||||
|
||||
MACRO(PKGCONFIG_GETVAR _package _var _output_variable)
|
||||
SET(${_output_variable})
|
||||
|
||||
# if pkg-config has been found
|
||||
IF (PKGCONFIG_EXECUTABLE)
|
||||
|
||||
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
|
||||
|
||||
# and if the package of interest also exists for pkg-config, then get the information
|
||||
IF (NOT _return_VALUE)
|
||||
|
||||
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable ${_var} OUTPUT_VARIABLE ${_output_variable})
|
||||
|
||||
ENDIF (NOT _return_VALUE)
|
||||
|
||||
ENDIF (PKGCONFIG_EXECUTABLE)
|
||||
ENDMACRO(PKGCONFIG_GETVAR _package _var _output_variable)
|
||||
|
||||
macro(dbus_add_activation_service _sources)
|
||||
PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir)
|
||||
foreach (_i ${_sources})
|
||||
get_filename_component(_service_file ${_i} ABSOLUTE)
|
||||
string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
|
||||
set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file})
|
||||
configure_file(${_service_file} ${_target})
|
||||
install(FILES ${_target} DESTINATION ${_install_dir} RENAME "${LIBCLOUDPROVIDERS_DBUS_BUS_NAME}.service")
|
||||
endforeach (_i ${ARGN})
|
||||
endmacro(dbus_add_activation_service _sources)
|
||||
|
||||
macro(libcloudproviders_add_config _sources)
|
||||
set(_install_dir "${CMAKE_INSTALL_PREFIX}/share/cloud-providers")
|
||||
foreach (_i ${_sources})
|
||||
get_filename_component(_service_file ${_i} ABSOLUTE)
|
||||
string(REGEX REPLACE "\\.ini.*$" ".ini" _output_file ${_i})
|
||||
set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file})
|
||||
configure_file(${_service_file} ${_target})
|
||||
install(FILES ${_target} DESTINATION ${_install_dir} RENAME "${LIBCLOUDPROVIDERS_DBUS_BUS_NAME}.ini")
|
||||
endforeach (_i ${ARGN})
|
||||
endmacro(libcloudproviders_add_config _sources)
|
||||
|
||||
|
||||
IF (UNIX AND Qt5DBus_FOUND AND LIBCLOUDPROVIDERS_FOUND)
|
||||
STRING(TOLOWER "${APPLICATION_VENDOR}" DBUS_VENDOR)
|
||||
STRING(REGEX REPLACE "[^A-z0-9]" "" DBUS_VENDOR "${DBUS_VENDOR}")
|
||||
STRING(REGEX REPLACE "[^A-z0-9]" "" DBUS_APPLICATION_NAME "${APPLICATION_SHORTNAME}")
|
||||
if (NOT DBUS_PREFIX)
|
||||
set(DBUS_PREFIX "com")
|
||||
endif ()
|
||||
|
||||
set(LIBCLOUDPROVIDERS_DBUS_BUS_NAME "${DBUS_PREFIX}.${DBUS_VENDOR}.${DBUS_APPLICATION_NAME}")
|
||||
set(LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH "/${DBUS_PREFIX}/${DBUS_VENDOR}/${DBUS_APPLICATION_NAME}")
|
||||
|
||||
dbus_add_activation_service(org.freedesktop.CloudProviders.service.in)
|
||||
libcloudproviders_add_config(org.freedesktop.CloudProviders.ini.in)
|
||||
ENDIF ()
|
||||
@@ -0,0 +1,4 @@
|
||||
[Cloud Providers]
|
||||
BusName=@LIBCLOUDPROVIDERS_DBUS_BUS_NAME@
|
||||
ObjectPath=@LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH@
|
||||
Version=1
|
||||
@@ -0,0 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=@LIBCLOUDPROVIDERS_DBUS_BUS_NAME@
|
||||
Exec=@APPLICATION_EXECUTABLE@
|
||||
|
||||
@@ -24,6 +24,7 @@ if python3:
|
||||
import urllib.parse
|
||||
import socket
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from gi.repository import GObject, Nautilus
|
||||
|
||||
@@ -34,15 +35,12 @@ from gi.repository import GObject, Nautilus
|
||||
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:]
|
||||
if python3:
|
||||
return urllib.parse.unquote(url)
|
||||
else:
|
||||
return urllib.unquote(url).decode('utf-8')
|
||||
unquote = urllib.parse.unquote if python3 else urllib.unquote
|
||||
return unquote(url)
|
||||
|
||||
def get_runtime_dir():
|
||||
"""Returns the value of $XDG_RUNTIME_DIR, a directory path.
|
||||
@@ -63,8 +61,9 @@ class SocketConnect(GObject.GObject):
|
||||
self.registered_paths = {}
|
||||
self._watch_id = 0
|
||||
self._sock = None
|
||||
self._listeners = [self._update_registered_paths]
|
||||
self._remainder = ''.encode('utf-8')
|
||||
self._listeners = [self._update_registered_paths, self._get_version]
|
||||
self._remainder = ''.encode()
|
||||
self.protocolVersion = '1.0'
|
||||
self.nautilusVFSFile_table = {} # not needed in this object actually but shared
|
||||
# all over the other objects.
|
||||
|
||||
@@ -82,7 +81,7 @@ class SocketConnect(GObject.GObject):
|
||||
# print("Server command: " + cmd)
|
||||
if self.connected:
|
||||
try:
|
||||
self._sock.send(cmd.encode('utf-8'))
|
||||
self._sock.send(cmd.encode())
|
||||
except:
|
||||
print("Sending failed.")
|
||||
self.reconnect()
|
||||
@@ -97,45 +96,63 @@ 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 " + sock_file + ". " + str(e))
|
||||
print("Could not connect to unix socket. " + str(e))
|
||||
except Exception as e: # Bad habbit
|
||||
print("Connect could not be established, try again later.")
|
||||
self._sock.close()
|
||||
|
||||
return True # Run again, if enabled via timeout_add()
|
||||
|
||||
# Reads data that becomes available.
|
||||
# New responses can be accessed with get_available_responses().
|
||||
# Returns false if no data was received within timeout
|
||||
def read_socket_data_with_timeout(self, timeout):
|
||||
self._sock.settimeout(timeout)
|
||||
try:
|
||||
self._remainder += self._sock.recv(1024)
|
||||
except socket.timeout:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
finally:
|
||||
self._sock.settimeout(None)
|
||||
|
||||
# Parses response lines out of collected data, returns list of strings
|
||||
def get_available_responses(self):
|
||||
end = self._remainder.rfind('\n'.encode())
|
||||
if end == -1:
|
||||
return []
|
||||
data = self._remainder[:end]
|
||||
self._remainder = self._remainder[end+1:]
|
||||
return data.decode().split('\n')
|
||||
|
||||
# Notify is the raw answer from the socket
|
||||
def _handle_notify(self, source, condition):
|
||||
data = source.recv(1024)
|
||||
# Prepend the remaining data from last call
|
||||
if len(self._remainder) > 0:
|
||||
data = self._remainder + data
|
||||
self._remainder = ''.encode('utf-8')
|
||||
# Blocking is ok since we're notified of available data
|
||||
self._remainder += self._sock.recv(1024)
|
||||
|
||||
if len(data) > 0:
|
||||
# Remember the remainder for next round
|
||||
lastNL = data.rfind('\n'.encode('utf-8'));
|
||||
if lastNL > -1 and lastNL < len(data):
|
||||
self._remainder = data[lastNL+1:]
|
||||
data = data[:lastNL]
|
||||
|
||||
for l in data.split('\n'.encode('utf-8')):
|
||||
self._handle_server_response(l.decode('utf-8'))
|
||||
else:
|
||||
if len(self._remainder) == 0:
|
||||
return False
|
||||
|
||||
for line in self.get_available_responses():
|
||||
self.handle_server_response(line)
|
||||
|
||||
return True # Run again
|
||||
|
||||
def _handle_server_response(self, line):
|
||||
# print("Server response: " + line)
|
||||
def handle_server_response(self, line):
|
||||
print("Server response: " + line)
|
||||
parts = line.split(':')
|
||||
action = parts[0]
|
||||
args = parts[1:]
|
||||
@@ -154,6 +171,10 @@ class SocketConnect(GObject.GObject):
|
||||
if not self.registered_paths:
|
||||
self.reconnect()
|
||||
|
||||
def _get_version(self, action, args):
|
||||
if action == 'VERSION':
|
||||
self.protocolVersion = args[1]
|
||||
|
||||
socketConnect = SocketConnect()
|
||||
|
||||
|
||||
@@ -183,29 +204,89 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
|
||||
def get_file_items(self, window, files):
|
||||
# Show the menu extension to share a file or folder
|
||||
#
|
||||
# Show if file is OK.
|
||||
# Ignore top level folders.
|
||||
# Also show extension for folders
|
||||
# if there is a OK or SYNC underneath.
|
||||
# This is only
|
||||
|
||||
if len(files) != 1:
|
||||
return
|
||||
file = files[0]
|
||||
# Get usable file paths from the uris
|
||||
all_internal_files = True
|
||||
for i, file_uri in enumerate(files):
|
||||
filename = get_local_path(file_uri.get_uri())
|
||||
|
||||
filename = get_local_path(file.get_uri())
|
||||
# Check if its a folder (ends with an /), if yes add a "/"
|
||||
# otherwise it will not find the entry in the table
|
||||
isDir = os.path.isdir(filename + os.sep)
|
||||
if isDir:
|
||||
filename += os.sep
|
||||
# Check if its a folder (ends with an /), if yes add a "/"
|
||||
# otherwise it will not find the entry in the table
|
||||
isDir = os.path.isdir(filename + os.sep)
|
||||
if isDir:
|
||||
filename += os.sep
|
||||
|
||||
# Check if toplevel folder, we need to ignore those as they cannot be shared
|
||||
topLevelFolder, internalFile = self.check_registered_paths(filename)
|
||||
if topLevelFolder or not internalFile:
|
||||
# Check if toplevel folder, we need to ignore those as they cannot be shared
|
||||
topLevelFolder, internalFile = self.check_registered_paths(filename)
|
||||
if not internalFile:
|
||||
all_internal_files = False
|
||||
|
||||
files[i] = filename
|
||||
|
||||
# Don't show a context menu if some selected files aren't in a sync folder
|
||||
if not all_internal_files:
|
||||
return []
|
||||
|
||||
if socketConnect.protocolVersion >= '1.1': # lexicographic!
|
||||
return self.ask_for_menu_items(files)
|
||||
else:
|
||||
return self.legacy_menu_items(files)
|
||||
|
||||
def ask_for_menu_items(self, files):
|
||||
record_separator = '\x1e'
|
||||
filesstring = record_separator.join(files)
|
||||
socketConnect.sendCommand('GET_MENU_ITEMS:{}\n'.format(filesstring))
|
||||
|
||||
done = False
|
||||
start = time.time()
|
||||
timeout = 0.1 # 100ms
|
||||
menu_items = []
|
||||
while not done:
|
||||
dt = time.time() - start
|
||||
if dt >= timeout:
|
||||
break
|
||||
if not socketConnect.read_socket_data_with_timeout(timeout - dt):
|
||||
break
|
||||
for line in socketConnect.get_available_responses():
|
||||
# Process lines we don't care about
|
||||
if done or not (line.startswith('GET_MENU_ITEMS:') or line.startswith('MENU_ITEM:')):
|
||||
socketConnect.handle_server_response(line)
|
||||
continue
|
||||
if line == 'GET_MENU_ITEMS:END':
|
||||
done = True
|
||||
# don't break - we'd discard other responses
|
||||
if line.startswith('MENU_ITEM:'):
|
||||
args = line.split(':')
|
||||
if len(args) < 4:
|
||||
continue
|
||||
menu_items.append([args[1], 'd' not in args[2], ':'.join(args[3:])])
|
||||
|
||||
if not done:
|
||||
return self.legacy_menu_items(files)
|
||||
|
||||
if len(menu_items) == 0:
|
||||
return []
|
||||
|
||||
# Set up the 'ownCloud...' submenu
|
||||
item_owncloud = Nautilus.MenuItem(
|
||||
name='IntegrationMenu', label=self.strings.get('CONTEXT_MENU_TITLE', appname))
|
||||
menu = Nautilus.Menu()
|
||||
item_owncloud.set_submenu(menu)
|
||||
|
||||
for action, enabled, label in menu_items:
|
||||
item = Nautilus.MenuItem(name=action, label=label, sensitive=enabled)
|
||||
item.connect("activate", self.context_menu_action, action, filesstring)
|
||||
menu.append_item(item)
|
||||
|
||||
return [item_owncloud]
|
||||
|
||||
|
||||
def legacy_menu_items(self, files):
|
||||
# No legacy menu for a selection of several files
|
||||
if len(files) != 1:
|
||||
return []
|
||||
filename = files[0]
|
||||
|
||||
entry = socketConnect.nautilusVFSFile_table.get(filename)
|
||||
if not entry:
|
||||
return []
|
||||
@@ -240,7 +321,7 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
item = Nautilus.MenuItem(
|
||||
name='NautilusPython::ShareItem',
|
||||
label=self.strings.get('SHARE_MENU_TITLE', 'Share...'))
|
||||
item.connect("activate", self.context_menu_action, 'SHARE', file)
|
||||
item.connect("activate", self.context_menu_action, 'SHARE', filename)
|
||||
menu.append_item(item)
|
||||
|
||||
# Add permalink menu options, but hide these options for older clients
|
||||
@@ -248,25 +329,24 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
if 'COPY_PRIVATE_LINK_MENU_TITLE' in self.strings:
|
||||
item_copyprivatelink = Nautilus.MenuItem(
|
||||
name='CopyPrivateLink', label=self.strings.get('COPY_PRIVATE_LINK_MENU_TITLE', 'Copy private link to clipboard'))
|
||||
item_copyprivatelink.connect("activate", self.context_menu_action, 'COPY_PRIVATE_LINK', file)
|
||||
item_copyprivatelink.connect("activate", self.context_menu_action, 'COPY_PRIVATE_LINK', filename)
|
||||
menu.append_item(item_copyprivatelink)
|
||||
|
||||
if 'EMAIL_PRIVATE_LINK_MENU_TITLE' in self.strings:
|
||||
item_emailprivatelink = Nautilus.MenuItem(
|
||||
name='EmailPrivateLink', label=self.strings.get('EMAIL_PRIVATE_LINK_MENU_TITLE', 'Send private link by email...'))
|
||||
item_emailprivatelink.connect("activate", self.context_menu_action, 'EMAIL_PRIVATE_LINK', file)
|
||||
item_emailprivatelink.connect("activate", self.context_menu_action, 'EMAIL_PRIVATE_LINK', filename)
|
||||
menu.append_item(item_emailprivatelink)
|
||||
|
||||
return [item_owncloud]
|
||||
|
||||
|
||||
def context_menu_action(self, menu, action, file):
|
||||
filename = get_local_path(file.get_uri())
|
||||
# print("Context menu: " + action + ' ' + filename)
|
||||
def context_menu_action(self, menu, action, filename):
|
||||
print("Context menu: " + action + ' ' + filename)
|
||||
socketConnect.sendCommand(action + ":" + filename + "\n")
|
||||
|
||||
|
||||
class SyncStateExtension(GObject.GObject, Nautilus.InfoProvider):
|
||||
class SyncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
|
||||
def __init__(self):
|
||||
GObject.GObject.__init__(self)
|
||||
|
||||
|
||||
4
shell_integration/windows/CMakeLists.txt
Normal file
4
shell_integration/windows/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_subdirectory(OCContextMenu)
|
||||
add_subdirectory(OCOverlays)
|
||||
add_subdirectory(OCUtil)
|
||||
|
||||
18
shell_integration/windows/OCContextMenu/CMakeLists.txt
Normal file
18
shell_integration/windows/OCContextMenu/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
add_library(OCContextMenu MODULE
|
||||
dllmain.cpp
|
||||
OCClientInterface.cpp
|
||||
OCContextMenu.cpp
|
||||
OCContextMenuFactory.cpp
|
||||
OCContextMenuRegHandler.cpp
|
||||
stdafx.cpp
|
||||
OCContextMenu.rc
|
||||
OCContextMenu.def
|
||||
)
|
||||
|
||||
target_link_libraries(OCContextMenu
|
||||
OCUtil)
|
||||
|
||||
install(TARGETS OCContextMenu
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
@@ -34,7 +34,7 @@ using namespace std;
|
||||
#define PIPE_TIMEOUT 5*1000 //ms
|
||||
#define SOCK_BUFFER 4096
|
||||
|
||||
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo(const std::wstring &files)
|
||||
{
|
||||
auto pipename = CommunicationSocket::DefaultPipePath();
|
||||
|
||||
@@ -45,7 +45,8 @@ OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
if (!socket.Connect(pipename)) {
|
||||
return {};
|
||||
}
|
||||
socket.SendMsg(L"GET_STRINGS\n");
|
||||
socket.SendMsg(L"GET_STRINGS:CONTEXT_MENU_TITLE\n");
|
||||
socket.SendMsg((L"GET_MENU_ITEMS:" + files + L"\n").data());
|
||||
|
||||
ContextMenuInfo info;
|
||||
std::wstring response;
|
||||
@@ -60,16 +61,14 @@ OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
wstring stringName, stringValue;
|
||||
if (!StringUtil::extractChunks(response, stringName, stringValue))
|
||||
continue;
|
||||
if (stringName == L"SHARE_MENU_TITLE")
|
||||
info.shareMenuTitle = move(stringValue);
|
||||
else if (stringName == L"CONTEXT_MENU_TITLE")
|
||||
if (stringName == L"CONTEXT_MENU_TITLE")
|
||||
info.contextMenuTitle = move(stringValue);
|
||||
else if (stringName == L"COPY_PRIVATE_LINK_MENU_TITLE")
|
||||
info.copyLinkMenuTitle = move(stringValue);
|
||||
else if (stringName == L"EMAIL_PRIVATE_LINK_MENU_TITLE")
|
||||
info.emailLinkMenuTitle = move(stringValue);
|
||||
}
|
||||
else if (StringUtil::begins_with(response, wstring(L"GET_STRINGS:END"))) {
|
||||
} else if (StringUtil::begins_with(response, wstring(L"MENU_ITEM:"))) {
|
||||
wstring commandName, flags, title;
|
||||
if (!StringUtil::extractChunks(response, commandName, flags, title))
|
||||
continue;
|
||||
info.menuItems.push_back({ commandName, flags, title });
|
||||
} else if (StringUtil::begins_with(response, wstring(L"GET_MENU_ITEMS:END"))) {
|
||||
break; // Stop once we completely received the last sent request
|
||||
}
|
||||
}
|
||||
@@ -81,22 +80,7 @@ OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
return info;
|
||||
}
|
||||
|
||||
void OCClientInterface::RequestShare(const std::wstring &path)
|
||||
{
|
||||
SendRequest(L"SHARE", path);
|
||||
}
|
||||
|
||||
void OCClientInterface::RequestCopyLink(const std::wstring &path)
|
||||
{
|
||||
SendRequest(L"COPY_PRIVATE_LINK", path);
|
||||
}
|
||||
|
||||
void OCClientInterface::RequestEmailLink(const std::wstring &path)
|
||||
{
|
||||
SendRequest(L"EMAIL_PRIVATE_LINK", path);
|
||||
}
|
||||
|
||||
void OCClientInterface::SendRequest(wchar_t *verb, const std::wstring &path)
|
||||
void OCClientInterface::SendRequest(const wchar_t *verb, const std::wstring &path)
|
||||
{
|
||||
auto pipename = CommunicationSocket::DefaultPipePath();
|
||||
|
||||
|
||||
@@ -46,18 +46,14 @@ public:
|
||||
struct ContextMenuInfo {
|
||||
std::vector<std::wstring> watchedDirectories;
|
||||
std::wstring contextMenuTitle;
|
||||
std::wstring shareMenuTitle;
|
||||
std::wstring copyLinkMenuTitle;
|
||||
std::wstring emailLinkMenuTitle;
|
||||
struct MenuItem
|
||||
{
|
||||
std::wstring command, flags, title;
|
||||
};
|
||||
std::vector<MenuItem> menuItems;
|
||||
};
|
||||
static ContextMenuInfo FetchInfo();
|
||||
|
||||
static void RequestShare(const std::wstring &path);
|
||||
static void RequestCopyLink(const std::wstring &path);
|
||||
static void RequestEmailLink(const std::wstring &path);
|
||||
|
||||
private:
|
||||
static void SendRequest(wchar_t *verb, const std::wstring &path);
|
||||
static ContextMenuInfo FetchInfo(const std::wstring &files);
|
||||
static void SendRequest(const wchar_t *verb, const std::wstring &path);
|
||||
};
|
||||
|
||||
#endif //ABSTRACTSOCKETHANDLER_H
|
||||
|
||||
@@ -22,13 +22,8 @@
|
||||
#include <shellapi.h>
|
||||
#include <StringUtil.h>
|
||||
|
||||
extern HINSTANCE g_hInst;
|
||||
extern long g_cDllRef;
|
||||
|
||||
#define IDM_SHARE 0
|
||||
#define IDM_COPYLINK 1
|
||||
#define IDM_EMAILLINK 2
|
||||
|
||||
OCContextMenu::OCContextMenu(void)
|
||||
: m_cRef(1)
|
||||
{
|
||||
@@ -40,23 +35,6 @@ OCContextMenu::~OCContextMenu(void)
|
||||
InterlockedDecrement(&g_cDllRef);
|
||||
}
|
||||
|
||||
|
||||
void OCContextMenu::OnVerbShare(HWND hWnd)
|
||||
{
|
||||
OCClientInterface::RequestShare(std::wstring(m_szSelectedFile));
|
||||
}
|
||||
|
||||
void OCContextMenu::OnVerbCopyLink(HWND hWnd)
|
||||
{
|
||||
OCClientInterface::RequestCopyLink(std::wstring(m_szSelectedFile));
|
||||
}
|
||||
|
||||
void OCContextMenu::OnVerbEmailLink(HWND hWnd)
|
||||
{
|
||||
OCClientInterface::RequestEmailLink(std::wstring(m_szSelectedFile));
|
||||
}
|
||||
|
||||
|
||||
#pragma region IUnknown
|
||||
|
||||
// Query to the interface the component supported.
|
||||
@@ -97,12 +75,12 @@ IFACEMETHODIMP_(ULONG) OCContextMenu::Release()
|
||||
IFACEMETHODIMP OCContextMenu::Initialize(
|
||||
LPCITEMIDLIST pidlFolder, LPDATAOBJECT pDataObj, HKEY hKeyProgID)
|
||||
{
|
||||
m_selectedFiles.clear();
|
||||
|
||||
if (!pDataObj) {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
HRESULT hr = E_FAIL;
|
||||
|
||||
FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
STGMEDIUM stm;
|
||||
|
||||
@@ -110,14 +88,19 @@ IFACEMETHODIMP OCContextMenu::Initialize(
|
||||
// Get an HDROP handle.
|
||||
HDROP hDrop = static_cast<HDROP>(GlobalLock(stm.hGlobal));
|
||||
if (hDrop) {
|
||||
// Ignore multi-selections
|
||||
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
|
||||
if (nFiles == 1) {
|
||||
for (int i = 0; i < nFiles; ++i) {
|
||||
// Get the path of the file.
|
||||
if (0 != DragQueryFile(hDrop, 0, m_szSelectedFile, ARRAYSIZE(m_szSelectedFile)))
|
||||
{
|
||||
hr = S_OK;
|
||||
wchar_t buffer[MAX_PATH];
|
||||
|
||||
if (!DragQueryFile(hDrop, i, buffer, ARRAYSIZE(buffer))) {
|
||||
m_selectedFiles.clear();
|
||||
break;
|
||||
}
|
||||
|
||||
if (i)
|
||||
m_selectedFiles += L'\x1e';
|
||||
m_selectedFiles += buffer;
|
||||
}
|
||||
|
||||
GlobalUnlock(stm.hGlobal);
|
||||
@@ -128,7 +111,7 @@ IFACEMETHODIMP OCContextMenu::Initialize(
|
||||
|
||||
// If any value other than S_OK is returned from the method, the context
|
||||
// menu item is not displayed.
|
||||
return hr;
|
||||
return m_selectedFiles.empty() ? E_FAIL : S_OK;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -153,17 +136,8 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(0));
|
||||
}
|
||||
|
||||
OCClientInterface::ContextMenuInfo info = OCClientInterface::FetchInfo();
|
||||
bool skip = true;
|
||||
size_t selectedFileLength = wcslen(m_szSelectedFile);
|
||||
for (const std::wstring path : info.watchedDirectories) {
|
||||
if (StringUtil::isDescendantOf(m_szSelectedFile, selectedFileLength, path)) {
|
||||
skip = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (skip) {
|
||||
m_info = OCClientInterface::FetchInfo(m_selectedFiles);
|
||||
if (m_info.menuItems.empty()) {
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(0));
|
||||
}
|
||||
|
||||
@@ -175,7 +149,7 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
|
||||
mii.fMask = MIIM_SUBMENU | MIIM_FTYPE | MIIM_STRING;
|
||||
mii.hSubMenu = hSubmenu;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = &info.contextMenuTitle[0];
|
||||
mii.dwTypeData = &m_info.contextMenuTitle[0];
|
||||
|
||||
if (!InsertMenuItem(hMenu, indexMenu++, TRUE, &mii))
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
@@ -183,133 +157,59 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
|
||||
InsertSeperator(hMenu, indexMenu++);
|
||||
|
||||
UINT indexSubMenu = 0;
|
||||
{
|
||||
assert(!info.shareMenuTitle.empty());
|
||||
for (auto &item : m_info.menuItems) {
|
||||
bool disabled = item.flags.find(L'd') != std::string::npos;
|
||||
|
||||
MENUITEMINFO mii = { sizeof(mii) };
|
||||
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING;
|
||||
mii.wID = idCmdFirst + IDM_SHARE;
|
||||
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING | MIIM_STATE;
|
||||
mii.wID = indexSubMenu;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = &info.shareMenuTitle[0];
|
||||
mii.dwTypeData = &item.title[0];
|
||||
mii.fState = disabled ? MFS_DISABLED : MFS_ENABLED;
|
||||
|
||||
if (!InsertMenuItem(hSubmenu, indexSubMenu++, TRUE, &mii))
|
||||
if (!InsertMenuItem(hSubmenu, indexSubMenu, true, &mii))
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
indexSubMenu++;
|
||||
}
|
||||
{
|
||||
assert(!info.copyLinkMenuTitle.empty());
|
||||
MENUITEMINFO mii = { sizeof(mii) };
|
||||
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING;
|
||||
mii.wID = idCmdFirst + IDM_COPYLINK;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = &info.copyLinkMenuTitle[0];
|
||||
|
||||
if (!InsertMenuItem(hSubmenu, indexSubMenu++, TRUE, &mii))
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
{
|
||||
assert(!info.emailLinkMenuTitle.empty());
|
||||
MENUITEMINFO mii = { sizeof(mii) };
|
||||
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING;
|
||||
mii.wID = idCmdFirst + IDM_EMAILLINK;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = &info.emailLinkMenuTitle[0];
|
||||
|
||||
if (!InsertMenuItem(hSubmenu, indexSubMenu++, TRUE, &mii))
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
|
||||
// Return an HRESULT value with the severity set to SEVERITY_SUCCESS.
|
||||
// Set the code value to the offset of the largest command identifier
|
||||
// that was assigned, plus one (1).
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(IDM_EMAILLINK + 1));
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(indexSubMenu));
|
||||
}
|
||||
|
||||
IFACEMETHODIMP OCContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
|
||||
{
|
||||
std::wstring command;
|
||||
|
||||
// For the Unicode case, if the high-order word is not zero, the
|
||||
// command's verb string is in lpcmi->lpVerbW.
|
||||
if (HIWORD(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW))
|
||||
{
|
||||
// Is the verb supported by this context menu extension?
|
||||
if (StrCmpIW(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW, L"ocshare") == 0) {
|
||||
OnVerbShare(pici->hwnd);
|
||||
}
|
||||
else if (StrCmpIW(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW, L"occopylink") == 0) {
|
||||
OnVerbCopyLink(pici->hwnd);
|
||||
}
|
||||
else if (StrCmpIW(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW, L"ocemaillink") == 0) {
|
||||
OnVerbEmailLink(pici->hwnd);
|
||||
}
|
||||
else {
|
||||
// If the verb is not recognized by the context menu handler, it
|
||||
// must return E_FAIL to allow it to be passed on to the other
|
||||
// context menu handlers that might implement that verb.
|
||||
command = ((CMINVOKECOMMANDINFOEX *)pici)->lpVerbW;
|
||||
} else {
|
||||
// If the command cannot be identified through the verb string, then
|
||||
// check the identifier offset.
|
||||
|
||||
auto offset = LOWORD(pici->lpVerb);
|
||||
if (offset < m_info.menuItems.size())
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
// If the command cannot be identified through the verb string, then
|
||||
// check the identifier offset.
|
||||
else
|
||||
{
|
||||
// Is the command identifier offset supported by this context menu
|
||||
// extension?
|
||||
if (LOWORD(pici->lpVerb) == IDM_SHARE) {
|
||||
OnVerbShare(pici->hwnd);
|
||||
}
|
||||
else if (LOWORD(pici->lpVerb) == IDM_COPYLINK) {
|
||||
OnVerbCopyLink(pici->hwnd);
|
||||
}
|
||||
else if (LOWORD(pici->lpVerb) == IDM_EMAILLINK) {
|
||||
OnVerbEmailLink(pici->hwnd);
|
||||
}
|
||||
else {
|
||||
// If the verb is not recognized by the context menu handler, it
|
||||
// must return E_FAIL to allow it to be passed on to the other
|
||||
// context menu handlers that might implement that verb.
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
command = m_info.menuItems[offset].command;
|
||||
}
|
||||
|
||||
OCClientInterface::SendRequest(command.data(), m_selectedFiles);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
IFACEMETHODIMP OCContextMenu::GetCommandString(UINT_PTR idCommand,
|
||||
UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
|
||||
{
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
|
||||
switch (idCommand) {
|
||||
case IDM_SHARE:
|
||||
if (uFlags == GCS_VERBW) {
|
||||
// GCS_VERBW is an optional feature that enables a caller to
|
||||
// discover the canonical name for the verb passed in through
|
||||
// idCommand.
|
||||
hr = StringCchCopy(reinterpret_cast<PWSTR>(pszName), cchMax,
|
||||
L"OCShareViaOC");
|
||||
}
|
||||
break;
|
||||
case IDM_COPYLINK:
|
||||
if (uFlags == GCS_VERBW) {
|
||||
hr = StringCchCopy(reinterpret_cast<PWSTR>(pszName), cchMax,
|
||||
L"OCCopyLink");
|
||||
}
|
||||
break;
|
||||
case IDM_EMAILLINK:
|
||||
if (uFlags == GCS_VERBW) {
|
||||
hr = StringCchCopy(reinterpret_cast<PWSTR>(pszName), cchMax,
|
||||
L"OCEmailLink");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (idCommand < m_info.menuItems.size() && uFlags == GCS_VERBW) {
|
||||
return StringCchCopyW(reinterpret_cast<PWSTR>(pszName), cchMax,
|
||||
m_info.menuItems[idCommand].command.data());
|
||||
}
|
||||
|
||||
// If the idCommand or uFlags is not supported by this context menu
|
||||
// extension handler, return E_INVALIDARG.
|
||||
|
||||
return hr;
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma endregion
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user