mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-04 20:34:17 +02:00
Compare commits
468 Commits
v2.5.0-alp
...
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 | ||
|
|
4892b0ec43 | ||
|
|
21d55c3321 | ||
|
|
7ce009ef49 | ||
|
|
a2b8724adf | ||
|
|
bb85e2ab2c | ||
|
|
33beb7aade | ||
|
|
cae6bbc853 | ||
|
|
cf2fa2ea35 | ||
|
|
5d6817e165 | ||
|
|
261cedce3f | ||
|
|
2d872f2a8d | ||
|
|
009562da1e | ||
|
|
d5a76ea70d | ||
|
|
4a2d0ab9e9 | ||
|
|
6d613fb4d5 | ||
|
|
4e7c033ae5 | ||
|
|
cd36f73f6b | ||
|
|
5722d29e42 | ||
|
|
99aebf292c | ||
|
|
d1c84fd859 | ||
|
|
a7ee1a95a6 | ||
|
|
3abbbab6a0 | ||
|
|
e2c895e61f | ||
|
|
ca92c46970 | ||
|
|
50916bcda5 | ||
|
|
c6491d50bb | ||
|
|
fdc96d3a4f | ||
|
|
e06e04ee93 | ||
|
|
7d68fa17e7 | ||
|
|
a63d34f870 | ||
|
|
c772857054 | ||
|
|
c963259bfb | ||
|
|
efc039863b | ||
|
|
da9f1c412d | ||
|
|
06c34ed617 | ||
|
|
60ef722b60 | ||
|
|
e70bf44aaf | ||
|
|
124a7253a4 | ||
|
|
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 | ||
|
|
ce41e3e42f | ||
|
|
2e516dfc67 | ||
|
|
250c8ff1bf | ||
|
|
5607e27f20 | ||
|
|
43332d3ac7 | ||
|
|
8c178bd035 | ||
|
|
49a16ffb4b | ||
|
|
99b4381591 | ||
|
|
69a201a62d | ||
|
|
56028759d5 | ||
|
|
be3afd1291 | ||
|
|
ac524d8e85 | ||
|
|
82c07236c1 | ||
|
|
76b8d2536b | ||
|
|
de4492a2fd | ||
|
|
1cedb1919f | ||
|
|
09fa5966da | ||
|
|
fe4bb52a6d | ||
|
|
042816bd0d | ||
|
|
c592871f94 | ||
|
|
9916583ffa | ||
|
|
25734afd39 | ||
|
|
ea3558faf6 | ||
|
|
159c0e138f | ||
|
|
aca298ca64 | ||
|
|
2127b2629d | ||
|
|
c26d986dbf | ||
|
|
e55518f820 | ||
|
|
44854beefb | ||
|
|
7e41a811dd | ||
|
|
d2e159c385 | ||
|
|
f6f078d1ee | ||
|
|
ce37235cc4 | ||
|
|
0a58ea76e5 | ||
|
|
e6f835d138 | ||
|
|
33b1fcfe66 | ||
|
|
0a83d3e743 | ||
|
|
a08a32ceca | ||
|
|
6745777ca3 | ||
|
|
70d562668c | ||
|
|
ccd8cff4db | ||
|
|
9f678652f8 | ||
|
|
76916b6c48 | ||
|
|
4878e824e5 | ||
|
|
893ca66af8 | ||
|
|
19120fde9f | ||
|
|
7fe4dd2163 | ||
|
|
863e86138f | ||
|
|
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 | ||
|
|
84a093e450 | ||
|
|
be8b99bf3a | ||
|
|
e7b7b8923f | ||
|
|
a118419f0c | ||
|
|
407d71b305 | ||
|
|
d63e18aa9d | ||
|
|
26ba89c2a8 | ||
|
|
7c5150421c | ||
|
|
462353d0ee | ||
|
|
d31aa7836a | ||
|
|
34e6534813 | ||
|
|
6d464d9dc6 | ||
|
|
2236d05d25 | ||
|
|
f0537b20d1 | ||
|
|
9878559002 | ||
|
|
6b3006b325 | ||
|
|
5dc73ffd8b | ||
|
|
b835bdc55b | ||
|
|
725be9ff54 | ||
|
|
9394fe6e84 | ||
|
|
14aeb6921b | ||
|
|
8adfc28de7 | ||
|
|
a0f0e5617a | ||
|
|
6351c01ee7 | ||
|
|
e32fd58578 | ||
|
|
22a2ab8999 | ||
|
|
4755b8c8a3 | ||
|
|
19d64e6308 | ||
|
|
05d826a954 | ||
|
|
685ceacace | ||
|
|
ee4a848d9a | ||
|
|
7290cf2813 | ||
|
|
131fd4e483 | ||
|
|
be9cd358d4 | ||
|
|
6ad6852045 | ||
|
|
832cbef8e7 | ||
|
|
5514f14e88 | ||
|
|
ea9e2135a1 | ||
|
|
b53003792f | ||
|
|
6facd29663 | ||
|
|
3b157caf09 | ||
|
|
d7e05c9b05 | ||
|
|
8e3e3a4575 | ||
|
|
8d537fdd3c | ||
|
|
4a66cf11d2 | ||
|
|
2698759525 | ||
|
|
1b1add5ead | ||
|
|
e5fdcd2f38 | ||
|
|
ef2529ca44 | ||
|
|
1a891423e5 | ||
|
|
41ebcd0b7e | ||
|
|
77ec3b086d | ||
|
|
88d87bf0ca | ||
|
|
eb43fa1459 | ||
|
|
8793fdbc69 | ||
|
|
4bb7ebb6aa | ||
|
|
3628f3739d | ||
|
|
b28b4705de | ||
|
|
560ce958de | ||
|
|
69d73162aa | ||
|
|
69dc099b17 | ||
|
|
c7d9abbea3 | ||
|
|
a986532442 | ||
|
|
cf56d58241 | ||
|
|
edb04c137c | ||
|
|
c695c50c33 | ||
|
|
5420741edb | ||
|
|
238f0b3610 | ||
|
|
817baf292d | ||
|
|
ca6fa7b341 | ||
|
|
bacbf337d2 | ||
|
|
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 | ||
|
|
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 |
97
.drone.yml
Normal file
97
.drone.yml
Normal file
@@ -0,0 +1,97 @@
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
depth: 1
|
||||
|
||||
pipeline:
|
||||
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
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: qt-5.7
|
||||
- TESTS: qt-5.8
|
||||
- TESTS: qt-5.9
|
||||
- BUILD: AppImage
|
||||
|
||||
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):
|
||||
|
||||
115
.github/release_template.md
vendored
115
.github/release_template.md
vendored
@@ -1,115 +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
|
||||
|
||||
For first Alpha/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 e.g. http://doc.owncloud.org/desktop/1.X/ exists
|
||||
|
||||
For all alphas, betas and RCs (Copy this section for each alpha/beta/rc):
|
||||
* [ ] Add last updates to Changelog in the client source repository.
|
||||
* [ ] Branch off a release branch called VERSION-rcX or VERSION-betaX (without v, v is for tags)
|
||||
* [ ] Edit ```VERSION.cmake``` to set the suffix to beta1, beta2 etc. Commit the result to the release branch only
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'ownCloud'
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'testpilotcloud'
|
||||
* [ ] Only now download the last created source .tar.xz and sign it with gpg. Copy the signature into a new .asc file. (timing issue because currently 'testpilotcloud' re-creates the source .tar.xz)
|
||||
* (no need to copy builds as they are already in testing directory or repository) (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Mac: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Win: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Smoke test of one distro package (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Create a signed tag using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Create a pull request to the owncloud.org repository to update the install page (strings.php, page-desktop.php) and the changelog on owncloud.org. From now on download packages from the staging webserver.
|
||||
* [ ] Inform community mailinglists devel@owncloud.org and testpilots@owncloud.org
|
||||
* [ ] Inform packagers @dragotin (openSUSE) @hefee (Debian)
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Check crash reporter
|
||||
|
||||
One week before the final 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)
|
||||
|
||||
Day before final Release:
|
||||
* [ ] Check the translations coming from transifex: All synchronized?
|
||||
* [ ] Run the tx.pl scripts on the final code tag
|
||||
* [ ] Run ```make test```
|
||||
* [ ] Run smashbox
|
||||
* [ ] Inform product management and marketing that we are 1 day out
|
||||
|
||||
On Release Day (for final release):
|
||||
* [ ] Add last updates to Changelog in the client source repository.
|
||||
* [ ] Branch off a release branch called VERSION-rcX or VERSION-betaX (without v, v is for tags)
|
||||
* [ ] Edit ```VERSION.cmake``` to set the suffix to beta1, beta2 etc. Commit the result to the release branch only
|
||||
* [ ] Make sure to increase the version number of the branched of release, e.g. if you release 2.3.2 then you should change VERSION.cmake in 2.3 to 2.3.3 since that branch now will be 2.3.3
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'ownCloud'
|
||||
* [ ] Create build for using owncloud-client-trigger (uncheck the "nightly build" checkbox, use the proper dropdown for version suffix) for theme 'testpilotcloud'
|
||||
* [ ] Only now download the last created source .tar.xz and sign it with gpg. Copy the signature into a new .asc file. (timing issue because currently 'testpilotcloud' re-creates the source .tar.xz) (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Branch isv:ownCloud:desktop to isv:ownCloud:desktop:client-X.Y.Z before overwriting https://github.com/owncloud/administration/blob/master/jenkins/obs_integration/obs-backup-prj.sh
|
||||
* Check if patches still apply in the linux packages
|
||||
* Update [OBS repository](https://build.opensuse.org/project/show?project=isv%3AownCloud%3Adesktop) `isv:ownCloud:desktop`
|
||||
* [ ] Re-download Mac builds and check signature. Interactive in installer window
|
||||
* [ ] Re-download Win build check signature. From Mac or Linux: ```osslsigncode verify ownCloud-version-setup.exe```
|
||||
* [ ] Mac: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Win: Perform smoke test (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Smoke test of one distro package (Install, make sure it does not explode, and check if all version indicators are correct)
|
||||
* [ ] Linux: Run @SamuAlfageme 's magic Linux-test-all-packages-script
|
||||
* [ ] Linux: Re-enable OBS publishing on the project (check for accidentially disabled packages too)
|
||||
* Let obs build and publish exactly once. then
|
||||
* [ ] disable publishing (on the obs project!) and rebuild the owncloud-client package and all its dependencies.
|
||||
* [ ] double-check that there are no _aggregatepac from other projects
|
||||
* [ ] Create a signed tag using ```git tag -u E94E7B37 tagname``` (https://github.com/owncloud/enterprise/wiki/Desktop-Signing-Knowledge)
|
||||
* [ ] Copy builds from ```testing``` to ```stable``` on download.owncloud.com, double check the download links. (make sure the .asc is there too)
|
||||
* [ ] Create a pull request to the owncloud.org repository to update the install page (strings.php, page-desktop.php). From now on download packages from the staging webserver.
|
||||
* [ ] Announce on https://central.owncloud.org
|
||||
* [ ] Announce on announcements@owncloud.org
|
||||
* [ ] Inform packagers @dragotin (openSUSE) @hefee (Debian)
|
||||
* [ ] Create git signed tag in client repository using ```git tag -u E94E7B37 tagname```
|
||||
* [ ] Send out Social (tweet, blog, other)
|
||||
* [ ] Send out customer communication (if any)
|
||||
* [ ] Inform GCX that the new version is released (gcx@owncloud.com)
|
||||
* [ ] Inform release-coordination@owncloud.com
|
||||
* [ ] Ensure marketing is aware (marketing@owncloud.com)
|
||||
* [ ] Take pride and celebrate!
|
||||
* [ ] Also update the testpilotcloud builds for that release version and make sure they show up on the download page
|
||||
* [ ] Tell GCX to increment the minimum supported version for enterprise customers
|
||||
* [ ] Check if minimum.supported.desktop.version (https://github.com/owncloud/core/blob/master/config/config.sample.php#L1152) needs to be updated in server
|
||||
* [ ] Linux OBS: Update the testing repository to the latest stable version.
|
||||
|
||||
15 minutes after after release:
|
||||
* [ ] Test all advertised download links to have the expected version
|
||||
* [ ] Check for build errors in OBS
|
||||
* [ ] disable publishing in OBS to prevent that accidential rebuilds hit the end users.
|
||||
|
||||
A few days after the release (for final release)
|
||||
* [ ] Review changes in the release branch, merge back into master
|
||||
* [ ] check the crash reporter if auto update is a good idea or we need a new release
|
||||
* [ ] Update the updater script ```clientupdater.php```
|
||||
* [ ] Execute announced deprecations. Disable builds for deprecated platforms. Update accordingly: https://doc.owncloud.org/server/latest/admin_manual/installation/system_requirements.html#desktop
|
||||
* [ ] Increment version number in nightly builds. Special case: after the last release in a branch, jump forward to the 'next release branch'... That may mean, this is nightly is the same as edge then.
|
||||
|
||||
```
|
||||
57
.travis.yml
57
.travis.yml
@@ -1,37 +1,38 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
language: cpp
|
||||
language: generic
|
||||
|
||||
services:
|
||||
- docker
|
||||
- docker
|
||||
|
||||
branches:
|
||||
only:
|
||||
- coverity_scan
|
||||
env:
|
||||
matrix:
|
||||
- BUILD_TYPE=debian
|
||||
|
||||
before_install:
|
||||
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_14.04/Release.key
|
||||
- sudo apt-key add - < Release.key
|
||||
- sudo apt-get update
|
||||
- sudo apt-get -y build-dep owncloud-client
|
||||
- checkout=$(git show-ref --head --hash head)
|
||||
- cd ../
|
||||
- wget https://scan.coverity.com/download/linux-64 --post-data "token=$token&project=owncloud%2Fmirall" -O coverity_tool.tgz
|
||||
- mkdir coverity
|
||||
- tar -xvf coverity_tool.tgz -C coverity --strip-components=1
|
||||
- export PATH=$PATH:$PWD/coverity/bin/
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
- admin/linux/travis-build.sh before_install
|
||||
|
||||
install:
|
||||
- cd ../
|
||||
- mkdir client-build
|
||||
- cd client-build
|
||||
- cmake -DCMAKE_BUILD_TYPE="Debug" $TRAVIS_BUILD_DIR
|
||||
- cov-build --dir cov-int make
|
||||
- tar czvf client.tgz cov-int
|
||||
- curl --form token=$token --form email=lukas@statuscode.ch --form file=@$PWD/client.tgz --form version="$checkout" --form description="$checkout" https://scan.coverity.com/builds?project=owncloud%2Fmirall
|
||||
- admin/linux/travis-build.sh install
|
||||
|
||||
# Hack to stop processing
|
||||
script: true
|
||||
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,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
project(client)
|
||||
@@ -9,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")
|
||||
@@ -183,15 +183,19 @@ if(BUILD_CLIENT)
|
||||
endif()
|
||||
find_package(Sphinx)
|
||||
find_package(PdfLatex)
|
||||
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)
|
||||
|
||||
@@ -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@)
|
||||
|
||||
72
Jenkinsfile
vendored
72
Jenkinsfile
vendored
@@ -1,72 +0,0 @@
|
||||
#!groovy
|
||||
|
||||
//
|
||||
// We now run the tests in Debug mode so that ASSERTs are triggered.
|
||||
// Ideally we should run the tests in both Debug and Release so we catch
|
||||
// all possible error combinations.
|
||||
// See also the top comment in syncenginetestutils.h
|
||||
//
|
||||
// We are building "Linux - GCC" with "make" and "Linux - Clang" with ninja,
|
||||
// the combinations are more or less arbitrarily chosen. We just want to
|
||||
// check that both compilers and both CMake generators work. It's
|
||||
// unlikely that a specific generator only breaks with a specific
|
||||
// compiler.
|
||||
|
||||
// Constructed from the DockerFile in admin/linux/DockerFile
|
||||
def linux = docker.image('dominikschmidt/docker-owncloud-client-linux:latest')
|
||||
// Constructed from the DockerFile in admin/win/docker/DockerFile
|
||||
def win32 = docker.image('dominikschmidt/docker-owncloud-client-win32-cross:latest')
|
||||
|
||||
node('CLIENT') {
|
||||
stage 'Checkout'
|
||||
checkout scm
|
||||
sh '''git submodule update --init'''
|
||||
|
||||
stage 'Linux - Pull Docker Image'
|
||||
linux.pull()
|
||||
|
||||
stage 'Linux - GCC'
|
||||
linux.inside {
|
||||
sh '''
|
||||
export HOME="$(pwd)/home"
|
||||
rm -rf build home
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
make -j4
|
||||
LC_ALL=C.UTF-8 ctest -V --output-on-failure
|
||||
'''
|
||||
}
|
||||
|
||||
stage 'Linux - Clang'
|
||||
linux.inside {
|
||||
sh '''
|
||||
export HOME="$(pwd)/home"
|
||||
rm -rf build home
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
|
||||
ninja -j4
|
||||
LC_ALL=C.UTF-8 ctest -V --output-on-failure
|
||||
'''
|
||||
}
|
||||
|
||||
stage 'Win32 Cross - Pull Docker Image'
|
||||
win32.pull()
|
||||
|
||||
stage 'Win32 Cross'
|
||||
win32.inside {
|
||||
sh '''
|
||||
rm -rf build-win32
|
||||
mkdir build-win32
|
||||
cd build-win32
|
||||
../admin/win/download_runtimes.sh
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
|
||||
make -j4
|
||||
make package
|
||||
ctest .
|
||||
'''
|
||||
}
|
||||
|
||||
// Stage 'macOS' TODO
|
||||
}
|
||||
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" )
|
||||
set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||
39
README.md
39
README.md
@@ -1,60 +1,37 @@
|
||||
# ownCloud Desktop Client
|
||||
|
||||
[](https://jenkins.owncloud.org/job/owncloud-client/job/client/job/master/) [](https://ci.appveyor.com/project/ownclouders/client/branch/master)
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
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.
|
||||
|
||||
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: 34 KiB After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
0
cmake/modules/DBusMacros.cmake
Normal file
0
cmake/modules/DBusMacros.cmake
Normal file
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)
|
||||
@@ -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
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -20,6 +20,7 @@ if( UNIX AND NOT APPLE )
|
||||
message("Dolphin plugin disabled: KDE Frameworks 5.16 not found")
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(libcloudproviders)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
||||
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@
|
||||
|
||||
13003
src/3rdparty/nlohmann/json.hpp
vendored
Normal file
13003
src/3rdparty/nlohmann/json.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,10 @@ elseif(UNIX AND NOT APPLE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/3rdparty
|
||||
)
|
||||
|
||||
add_subdirectory(csync)
|
||||
add_subdirectory(libsync)
|
||||
if (NOT BUILD_LIBRARIES_ONLY)
|
||||
|
||||
@@ -15,6 +15,10 @@ if(UNIX AND NOT APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
add_executable(${cmd_NAME} ${cmd_SRC})
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
|
||||
@@ -188,7 +188,7 @@ void help()
|
||||
std::cout << " --max-sync-retries [n] Retries maximum n times (default to 3)" << std::endl;
|
||||
std::cout << " --uplimit [n] Limit the upload speed of files to n KB/s" << std::endl;
|
||||
std::cout << " --downlimit [n] Limit the download speed of files to n KB/s" << std::endl;
|
||||
std::cout << " -h Sync hidden files,do not ignore them" << std::endl;
|
||||
std::cout << " -h Sync hidden files, do not ignore them" << std::endl;
|
||||
std::cout << " --version, -v Display version and exit" << std::endl;
|
||||
std::cout << " --logdebug More verbose logging" << std::endl;
|
||||
std::cout << "" << std::endl;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcChecksums, "sync.checksums", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcChecksums, "nextcloud.sync.checksums", QtInfoMsg)
|
||||
|
||||
QByteArray makeChecksumHeader(const QByteArray &checksumType, const QByteArray &checksum)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcFileSystem, "sync.filesystem", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcFileSystem, "nextcloud.sync.filesystem", QtInfoMsg)
|
||||
|
||||
QString FileSystem::longWinPath(const QString &inpath)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcSql, "sync.database.sql", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
|
||||
|
||||
SqlDatabase::SqlDatabase()
|
||||
: _db(0)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcDb, "sync.database", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcDb, "nextcloud.sync.database", QtInfoMsg)
|
||||
|
||||
#define GET_FILE_RECORD_QUERY \
|
||||
"SELECT path, inode, modtime, type, md5, fileid, remotePerm, filesize," \
|
||||
@@ -468,6 +468,17 @@ bool SyncJournalDb::checkConnect()
|
||||
return sqlFail("Create table version", createQuery);
|
||||
}
|
||||
|
||||
/* maps the end to end filename in the server/metadata to the actuall filename in disk
|
||||
*/
|
||||
createQuery.prepare("CREATE TABLE IF NOT EXISTS e2efilemap("
|
||||
"mangledname TEXT UNIQUE,"
|
||||
"name TEXT UNIQUE"
|
||||
")");
|
||||
|
||||
if (!createQuery.exec()) {
|
||||
return sqlFail("Create table e2efilemap", createQuery);
|
||||
}
|
||||
|
||||
bool forceRemoteDiscovery = false;
|
||||
|
||||
SqlQuery versionQuery("SELECT major, minor, patch FROM version;", _db);
|
||||
@@ -705,6 +716,16 @@ bool SyncJournalDb::checkConnect()
|
||||
return sqlFail("prepare _setDataFingerprintQuery2", *_setDataFingerprintQuery2);
|
||||
}
|
||||
|
||||
_getE2eFileMangledName.reset(new SqlQuery(_db));
|
||||
if (_getE2eFileMangledName->prepare("SELECT mangledname FROM e2efilemap WHERE name =?1;")) {
|
||||
return sqlFail("prepare _getE2eFileMangledName", *_getE2eFileMangledName);
|
||||
}
|
||||
|
||||
_setE2eFileRelationQuery.reset(new SqlQuery(_db));
|
||||
if (_setE2eFileRelationQuery->prepare("INSERT INTO e2efilemap (mangledname, name) VALUES (?1, ?2);")) {
|
||||
return sqlFail("prepare _setE2eFileRelationQuery", *_setE2eFileRelationQuery);
|
||||
}
|
||||
|
||||
_getConflictRecordQuery.reset(new SqlQuery(_db));
|
||||
if (_getConflictRecordQuery->prepare("SELECT baseFileId, baseModtime, baseEtag FROM conflicts WHERE path=?1;")) {
|
||||
return sqlFail("prepare _getConflictRecordQuery", *_getConflictRecordQuery);
|
||||
@@ -770,6 +791,8 @@ void SyncJournalDb::close()
|
||||
_getDataFingerprintQuery.reset(0);
|
||||
_setDataFingerprintQuery1.reset(0);
|
||||
_setDataFingerprintQuery2.reset(0);
|
||||
_setE2eFileRelationQuery.reset(0);
|
||||
_getE2eFileMangledName.reset(0);
|
||||
_getConflictRecordQuery.reset(0);
|
||||
_setConflictRecordQuery.reset(0);
|
||||
_deleteConflictRecordQuery.reset(0);
|
||||
@@ -1440,6 +1463,65 @@ void SyncJournalDb::setDownloadInfo(const QString &file, const SyncJournalDb::Do
|
||||
}
|
||||
}
|
||||
|
||||
QString SyncJournalDb::getE2eMangledName(const QString& originalName)
|
||||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
qCDebug(lcDb) << "######### Trying to find database entry for name " << originalName << ". #######";
|
||||
|
||||
if (! checkConnect()) {
|
||||
qCDebug(lcDb) << "######### Connection to the database is wrong. #######";
|
||||
return QString{};
|
||||
}
|
||||
|
||||
if (originalName.isEmpty()) {
|
||||
qCDebug(lcDb) << "######### Original Name is Empty. #######";
|
||||
return QString{};
|
||||
}
|
||||
|
||||
_getE2eFileMangledName->reset_and_clear_bindings();
|
||||
_getE2eFileMangledName->bindValue(1, originalName);
|
||||
if (!_getE2eFileMangledName->exec()) {
|
||||
qCDebug(lcDb) << "######### Error Executing query. #######";
|
||||
return QString{};
|
||||
}
|
||||
|
||||
if (!_getE2eFileMangledName->next()) {
|
||||
qCDebug(lcDb) << "######### Query returned empty. #######";
|
||||
return QString{};
|
||||
}
|
||||
|
||||
const QString ret = _getE2eFileMangledName->stringValue(0);
|
||||
|
||||
qCDebug(lcDb) << "The return of the mangled name is" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool SyncJournalDb::setE2eRelation(const QString& mangledName, const QString& originalName)
|
||||
{
|
||||
Q_ASSERT(!mangledName.isEmpty());
|
||||
Q_ASSERT(!originalName.isEmpty());
|
||||
|
||||
if (! checkConnect()) {
|
||||
qCDebug(lcDb) << "######### Connection to the database is wrong. #######";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mangledName.isEmpty()) {
|
||||
qCDebug(lcDb) << "Cant create e2e relation on the database, mangled name is empty.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (originalName.isEmpty()) {
|
||||
qCDebug(lcDb) << "Cant create e2e relation on the database, original name is empty.";
|
||||
return false;
|
||||
}
|
||||
|
||||
_setE2eFileRelationQuery->reset_and_clear_bindings();
|
||||
_setE2eFileRelationQuery->bindValue(1, mangledName);
|
||||
_setE2eFileRelationQuery->bindValue(2, originalName);
|
||||
return _setE2eFileRelationQuery->exec();
|
||||
}
|
||||
|
||||
QVector<SyncJournalDb::DownloadInfo> SyncJournalDb::getAndDeleteStaleDownloadInfos(const QSet<QString> &keep)
|
||||
{
|
||||
QVector<SyncJournalDb::DownloadInfo> empty_result;
|
||||
|
||||
@@ -138,6 +138,10 @@ public:
|
||||
void avoidRenamesOnNextSync(const QString &path) { avoidRenamesOnNextSync(path.toUtf8()); }
|
||||
void avoidRenamesOnNextSync(const QByteArray &path);
|
||||
void setPollInfo(const PollInfo &);
|
||||
|
||||
bool setE2eRelation(const QString& mangledName, const QString& originalName);
|
||||
QString getE2eMangledName(const QString& originalName);
|
||||
|
||||
QVector<PollInfo> getPollInfos();
|
||||
|
||||
enum SelectiveSyncListType {
|
||||
@@ -286,6 +290,10 @@ private:
|
||||
QScopedPointer<SqlQuery> _setConflictRecordQuery;
|
||||
QScopedPointer<SqlQuery> _deleteConflictRecordQuery;
|
||||
|
||||
// End to End Encryption Related Queries/
|
||||
QScopedPointer<SqlQuery> _setE2eFileRelationQuery;
|
||||
QScopedPointer<SqlQuery> _getE2eFileMangledName;
|
||||
|
||||
/* This is the list of paths we called avoidReadFromDbOnNextSync on.
|
||||
* It means that they should not be written to the DB in any case since doing
|
||||
* that would write the etag and would void the purpose of avoidReadFromDbOnNextSync
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcUtility, "sync.utility", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcUtility, "nextcloud.sync.utility", QtInfoMsg)
|
||||
|
||||
bool Utility::writeRandomFile(const QString &fname, int size)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
Q_LOGGING_CATEGORY(lcReconcile, "sync.csync.reconciler", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcReconcile, "nextcloud.sync.csync.reconciler", QtInfoMsg)
|
||||
|
||||
// Needed for PRIu64 on MinGW in C++ mode.
|
||||
#define __STDC_FORMAT_MACROS
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(lcUpdate, "sync.csync.updater", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcUpdate, "nextcloud.sync.csync.updater", QtInfoMsg)
|
||||
|
||||
#ifdef NO_RENAME_EXTENSION
|
||||
/* Return true if the two path have the same extension. false otherwise. */
|
||||
@@ -351,8 +351,17 @@ static int _csync_detect_update(CSYNC *ctx, std::unique_ptr<csync_file_stat_t> f
|
||||
csync_rename_record(ctx, base._path, fs->path);
|
||||
}
|
||||
|
||||
qCDebug(lcUpdate, "remote rename detected based on fileid %s --> %s", base._path.constData(), fs->path.constData());
|
||||
fs->instruction = CSYNC_INSTRUCTION_EVAL_RENAME;
|
||||
/* A remote rename can also mean Encryption Mangled Name.
|
||||
* if we find one of those in the database, we ignore it.
|
||||
*/
|
||||
qCDebug(lcUpdate) << "Tryig to get the mangled name!";
|
||||
QString remoteEncryptedName = ctx->statedb->getE2eMangledName(base._path);
|
||||
if (remoteEncryptedName.isEmpty()) {
|
||||
qCDebug(lcUpdate, "remote rename detected based on fileid %s --> %s", base._path.constData(), fs->path.constData());
|
||||
fs->instruction = CSYNC_INSTRUCTION_EVAL_RENAME;
|
||||
} else {
|
||||
qCDebug(lcUpdate) << "Should *not* rename the file.";
|
||||
}
|
||||
done = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -173,6 +173,16 @@ else()
|
||||
list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_win.cpp )
|
||||
endif()
|
||||
|
||||
IF( NOT WIN32 AND NOT APPLE AND LIBCLOUDPROVIDERS_FOUND)
|
||||
message("Building with libcloudproviderssupport")
|
||||
add_definitions(-DWITH_LIBCLOUDPROVIDERS)
|
||||
set(client_SRCS ${client_SRCS} cloudproviders/cloudprovidermanager.cpp)
|
||||
set(client_SRCS ${client_SRCS} cloudproviders/cloudproviderwrapper.cpp)
|
||||
|
||||
include_directories(${GLib2_INCLUDE_DIRS})
|
||||
include_directories(${GIO_INCLUDE_DIRS})
|
||||
include_directories(${LIBCLOUDPROVIDERS_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
find_package(Qt5LinguistTools)
|
||||
if(Qt5LinguistTools_FOUND)
|
||||
@@ -233,6 +243,10 @@ if(UNIX AND NOT APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
if(NOT WIN32)
|
||||
file(GLOB _icons "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon.png")
|
||||
@@ -280,12 +294,26 @@ set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
)
|
||||
# Only relevant for Linux? On OS X it by default properly checks in the bundle directory next to the exe
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Network Qt5::Xml)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${OS_SPECIFIC_LINK_LIBRARIES} )
|
||||
IF( 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(NOT DBUS_PREFIX)
|
||||
set(LIBCLOUDPROVIDERS_DBUS_BUS_NAME "${DBUS_PREFIX}.${DBUS_VENDOR}.${DBUS_APPLICATION_NAME}")
|
||||
set(LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH "/${DBUS_PREFIX}/${DBUS_VENDOR}/${DBUS_APPLICATION_NAME}")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cloudproviders/cloudproviderconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/cloudproviderconfig.h)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${GLib2_LDFLAGS} ${GIO_LDFLAGS} ${LIBCLOUDPROVIDERS_LIBRARY} )
|
||||
ENDIF()
|
||||
|
||||
|
||||
target_include_directories(${APPLICATION_EXECUTABLE} PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src/3rdparty/QProgressIndicator
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QMessageBox>
|
||||
#include "clientsideencryption.h"
|
||||
|
||||
namespace {
|
||||
static const char urlC[] = "url";
|
||||
@@ -38,7 +40,7 @@ static const char serverVersionC[] = "serverVersion";
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcAccountManager, "gui.account.manager", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcAccountManager, "nextcloud.gui.account.manager", QtInfoMsg)
|
||||
|
||||
AccountManager *AccountManager::instance()
|
||||
{
|
||||
@@ -312,6 +314,9 @@ void AccountManager::deleteAccount(AccountState *account)
|
||||
auto settings = ConfigFile::settingsWithGroup(QLatin1String(accountsC));
|
||||
settings->remove(account->account()->id());
|
||||
|
||||
// Forget E2E keys
|
||||
account->account()->e2e()->forgetSensitiveData();
|
||||
|
||||
emit accountRemoved(account);
|
||||
}
|
||||
|
||||
@@ -321,10 +326,23 @@ AccountPtr AccountManager::createAccount()
|
||||
acc->setSslErrorHandler(new SslDialogErrorHandler);
|
||||
connect(acc.data(), &Account::proxyAuthenticationRequired,
|
||||
ProxyAuthHandler::instance(), &ProxyAuthHandler::handleProxyAuthenticationRequired);
|
||||
|
||||
connect(acc.data()->e2e(), &ClientSideEncryption::mnemonicGenerated,
|
||||
&AccountManager::displayMnemonic);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
void AccountManager::displayMnemonic(const QString& mnemonic)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(tr("Note your encryption passphrase"));
|
||||
msgBox.setDetailedText(mnemonic);
|
||||
msgBox.setIcon(QMessageBox::Information);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
|
||||
msgBox.exec();
|
||||
}
|
||||
void AccountManager::shutdown()
|
||||
{
|
||||
auto accountsCopy = _accounts;
|
||||
|
||||
@@ -97,6 +97,9 @@ public slots:
|
||||
/// Saves account state data, not including the account
|
||||
void saveAccountState(AccountState *a);
|
||||
|
||||
/// Display a Box with the mnemonic so the user can copy it to a safe place.
|
||||
static void displayMnemonic(const QString& mnemonic);
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void accountAdded(AccountState *account);
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "creds/httpcredentialsgui.h"
|
||||
#include "tooltipupdater.h"
|
||||
#include "filesystem.h"
|
||||
#include "clientsideencryptionjobs.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -46,6 +47,7 @@
|
||||
#include <QKeySequence>
|
||||
#include <QIcon>
|
||||
#include <QVariant>
|
||||
#include <QJsonDocument>
|
||||
#include <QToolTip>
|
||||
#include <qstringlistmodel.h>
|
||||
#include <qpropertyanimation.h>
|
||||
@@ -58,7 +60,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcAccountSettings, "gui.account.settings", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcAccountSettings, "nextcloud.gui.account.settings", QtInfoMsg)
|
||||
|
||||
static const char progressBarStyleC[] =
|
||||
"QProgressBar {"
|
||||
@@ -254,6 +256,196 @@ void AccountSettings::doExpand()
|
||||
ui->_folderList->expandToDepth(0);
|
||||
}
|
||||
|
||||
void AccountSettings::slotEncryptionFlagSuccess(const QByteArray& fileId)
|
||||
{
|
||||
if (auto info = _model->infoForFileId(fileId)) {
|
||||
accountsState()->account()->e2e()->setFolderEncryptedStatus(info->_path, true);
|
||||
} else {
|
||||
qCInfo(lcAccountSettings()) << "Could not get information from the current folder.";
|
||||
}
|
||||
auto lockJob = new LockEncryptFolderApiJob(accountsState()->account(), fileId);
|
||||
connect(lockJob, &LockEncryptFolderApiJob::success,
|
||||
this, &AccountSettings::slotLockForEncryptionSuccess);
|
||||
connect(lockJob, &LockEncryptFolderApiJob::error,
|
||||
this, &AccountSettings::slotLockForEncryptionError);
|
||||
lockJob->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotEncryptionFlagError(const QByteArray& fileId, int httpErrorCode)
|
||||
{
|
||||
qDebug() << "Error on the encryption flag";
|
||||
}
|
||||
|
||||
void AccountSettings::slotLockForEncryptionSuccess(const QByteArray& fileId, const QByteArray &token)
|
||||
{
|
||||
accountsState()->account()->e2e()->setTokenForFolder(fileId, token);
|
||||
|
||||
FolderMetadata emptyMetadata(accountsState()->account());
|
||||
auto storeMetadataJob = new StoreMetaDataApiJob(accountsState()->account(), fileId, emptyMetadata.encryptedMetadata());
|
||||
connect(storeMetadataJob, &StoreMetaDataApiJob::success,
|
||||
this, &AccountSettings::slotUploadMetadataSuccess);
|
||||
connect(storeMetadataJob, &StoreMetaDataApiJob::error,
|
||||
this, &AccountSettings::slotUpdateMetadataError);
|
||||
|
||||
storeMetadataJob->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotUploadMetadataSuccess(const QByteArray& folderId)
|
||||
{
|
||||
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
||||
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
||||
this, &AccountSettings::slotUnlockFolderSuccess);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
||||
this, &AccountSettings::slotUnlockFolderError);
|
||||
unlockJob->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode)
|
||||
{
|
||||
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
||||
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
||||
this, &AccountSettings::slotUnlockFolderSuccess);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
||||
this, &AccountSettings::slotUnlockFolderError);
|
||||
unlockJob->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotLockForEncryptionError(const QByteArray& fileId, int httpErrorCode)
|
||||
{
|
||||
qCInfo(lcAccountSettings()) << "Locking error" << httpErrorCode;
|
||||
}
|
||||
|
||||
void AccountSettings::slotUnlockFolderError(const QByteArray& fileId, int httpErrorCode)
|
||||
{
|
||||
qCInfo(lcAccountSettings()) << "Unlocking error!";
|
||||
}
|
||||
void AccountSettings::slotUnlockFolderSuccess(const QByteArray& fileId)
|
||||
{
|
||||
qCInfo(lcAccountSettings()) << "Unlocking success!";
|
||||
}
|
||||
void AccountSettings::slotMarkSubfolderEncrpted(const QByteArray& fileId)
|
||||
{
|
||||
auto job = new OCC::SetEncryptionFlagApiJob(accountsState()->account(), fileId);
|
||||
connect(job, &OCC::SetEncryptionFlagApiJob::success, this, &AccountSettings::slotEncryptionFlagSuccess);
|
||||
connect(job, &OCC::SetEncryptionFlagApiJob::error, this, &AccountSettings::slotEncryptionFlagError);
|
||||
job->start();
|
||||
}
|
||||
|
||||
|
||||
// Order:
|
||||
// 1 - Lock folder,
|
||||
// 2 - Delete Metadata,
|
||||
// 3 - Unlock Folder,
|
||||
// 4 - Mark as Decrypted.
|
||||
void AccountSettings::slotMarkSubfolderDecrypted(const QByteArray& fileId)
|
||||
{
|
||||
qDebug() << "Starting to mark as decrypted";
|
||||
qDebug() << "Locking the folder";
|
||||
auto lockJob = new LockEncryptFolderApiJob(accountsState()->account(), fileId);
|
||||
connect(lockJob, &LockEncryptFolderApiJob::success,
|
||||
this, &AccountSettings::slotLockForDecryptionSuccess);
|
||||
connect(lockJob, &LockEncryptFolderApiJob::error,
|
||||
this, &AccountSettings::slotLockForDecryptionError);
|
||||
lockJob->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotLockForDecryptionSuccess(const QByteArray& fileId, const QByteArray& token)
|
||||
{
|
||||
qDebug() << "Locking success, trying to delete the metadata";
|
||||
accountsState()->account()->e2e()->setTokenForFolder(fileId, token);
|
||||
auto job = new DeleteMetadataApiJob(accountsState()->account(), fileId);
|
||||
connect(job, &DeleteMetadataApiJob::success,
|
||||
this, &AccountSettings::slotDeleteMetadataSuccess);
|
||||
connect(job, &DeleteMetadataApiJob::error,
|
||||
this, &AccountSettings::slotDeleteMetadataError);
|
||||
job->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotDeleteMetadataSuccess(const QByteArray& fileId)
|
||||
{
|
||||
qDebug() << "Metadata successfully deleted, unlocking the folder";
|
||||
auto token = accountsState()->account()->e2e()->tokenForFolder(fileId);
|
||||
auto job = new UnlockEncryptFolderApiJob(accountsState()->account(), fileId, token);
|
||||
connect(job, &UnlockEncryptFolderApiJob::success,
|
||||
this, &AccountSettings::slotUnlockForDecryptionSuccess);
|
||||
connect(job, &UnlockEncryptFolderApiJob::error,
|
||||
this, &AccountSettings::slotUnlockForDecryptionError);
|
||||
job->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotUnlockForDecryptionSuccess(const QByteArray& fileId)
|
||||
{
|
||||
qDebug() << "Unlocked the folder successfully, removing the encrypted bit.";
|
||||
auto job = new OCC::DeleteApiJob(accountsState()->account(),
|
||||
"ocs/v2.php/apps/end_to_end_encryption/api/v1/encrypted/" + QString(fileId));
|
||||
|
||||
// This Delete ApiJob is different than all other jobs used here, sigh.
|
||||
connect(job, &OCC::DeleteApiJob::result, [this, &fileId](int httpResponse) {
|
||||
if (httpResponse == 200) {
|
||||
slotDecryptionFlagSuccess(fileId);
|
||||
} else {
|
||||
slotDecryptionFlagError(fileId, httpResponse);
|
||||
}
|
||||
});
|
||||
job->start();
|
||||
}
|
||||
|
||||
void AccountSettings::slotDecryptionFlagSuccess(const QByteArray& fileId)
|
||||
{
|
||||
if (auto info = _model->infoForFileId(fileId)) {
|
||||
accountsState()->account()->e2e()->setFolderEncryptedStatus(info->_path, false);
|
||||
} else {
|
||||
qCInfo(lcAccountSettings()) << "Could not get information for the current path.";
|
||||
}
|
||||
}
|
||||
|
||||
void AccountSettings::slotDecryptionFlagError(const QByteArray& fileID, int httpReturnCode)
|
||||
{
|
||||
qDebug() << "Error Setting the Decryption Flag";
|
||||
}
|
||||
|
||||
void AccountSettings::slotUnlockForDecryptionError(const QByteArray& fileId, int httpReturnCode)
|
||||
{
|
||||
qDebug() << "Error unlocking folder after decryption";
|
||||
}
|
||||
|
||||
void AccountSettings::slotDeleteMetadataError(const QByteArray& fileId, int httpReturnCode)
|
||||
{
|
||||
qDebug() << "Error deleting the metadata";
|
||||
}
|
||||
void AccountSettings::slotLockForDecryptionError(const QByteArray& fileId, int httpReturnCode)
|
||||
{
|
||||
qDebug() << "Error Locking for decryption";
|
||||
}
|
||||
|
||||
void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index, const QPoint& pos)
|
||||
{
|
||||
QMenu menu;
|
||||
auto ac = menu.addAction(tr("Open folder"));
|
||||
connect(ac, &QAction::triggered, this, &AccountSettings::slotOpenCurrentLocalSubFolder);
|
||||
|
||||
auto fileName = _model->data(index, FolderStatusDelegate::FolderPathRole).toString();
|
||||
if (!QFile::exists(fileName)) {
|
||||
ac->setEnabled(false);
|
||||
}
|
||||
auto info = _model->infoForIndex(index);
|
||||
auto acc = _accountState->account();
|
||||
|
||||
if (acc->capabilities().clientSideEncryptionAvaliable()) {
|
||||
bool isEncrypted = acc->e2e()->isFolderEncrypted(info->_path);
|
||||
ac = menu.addAction( isEncrypted ? tr("Decrypt") : tr("Encrypt"));
|
||||
|
||||
if (not isEncrypted) {
|
||||
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderEncrpted(info->_fileId); });
|
||||
} else {
|
||||
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info->_fileId); });
|
||||
}
|
||||
}
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QTreeView *tv = ui->_folderList;
|
||||
@@ -263,18 +455,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
||||
}
|
||||
|
||||
if (_model->classify(index) == FolderStatusModel::SubFolder) {
|
||||
QMenu *menu = new QMenu(tv);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction *ac = menu->addAction(tr("Open folder"));
|
||||
connect(ac, &QAction::triggered, this, &AccountSettings::slotOpenCurrentLocalSubFolder);
|
||||
|
||||
QString fileName = _model->data(index, FolderStatusDelegate::FolderPathRole).toString();
|
||||
if (!QFile::exists(fileName)) {
|
||||
ac->setEnabled(false);
|
||||
}
|
||||
|
||||
menu->popup(tv->mapToGlobal(pos));
|
||||
slotSubfolderContextMenuRequested(index, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -711,6 +892,15 @@ void AccountSettings::slotAccountStateChanged()
|
||||
_toggleSignInOutAction->setText(tr("Log out"));
|
||||
}
|
||||
}
|
||||
|
||||
if (state == AccountState::State::Connected) {
|
||||
/* TODO: We should probably do something better here.
|
||||
* Verify if the user has a private key already uploaded to the server,
|
||||
* if it has, do not offer to create one.
|
||||
*/
|
||||
qCInfo(lcAccountSettings) << "Accout" << accountsState()->account()->displayName()
|
||||
<< "Client Side Encryption" << accountsState()->account()->capabilities().clientSideEncryptionAvaliable();
|
||||
}
|
||||
}
|
||||
|
||||
void AccountSettings::slotLinkActivated(const QString &link)
|
||||
|
||||
@@ -85,11 +85,34 @@ protected slots:
|
||||
void slotOpenAccountWizard();
|
||||
void slotAccountAdded(AccountState *);
|
||||
void refreshSelectiveSyncStatus();
|
||||
void slotMarkSubfolderEncrpted(const QByteArray& fileId);
|
||||
void slotMarkSubfolderDecrypted(const QByteArray& fileId);
|
||||
void slotSubfolderContextMenuRequested(const QModelIndex& idx, const QPoint& point);
|
||||
void slotCustomContextMenuRequested(const QPoint &);
|
||||
void slotFolderListClicked(const QModelIndex &indx);
|
||||
void doExpand();
|
||||
void slotLinkActivated(const QString &link);
|
||||
|
||||
// Encryption Related Stuff.
|
||||
void slotEncryptionFlagSuccess(const QByteArray &folderId);
|
||||
void slotEncryptionFlagError(const QByteArray &folderId, int httpReturnCode);
|
||||
void slotLockForEncryptionSuccess(const QByteArray& folderId, const QByteArray& token);
|
||||
void slotLockForEncryptionError(const QByteArray &folderId, int httpReturnCode);
|
||||
void slotUnlockFolderSuccess(const QByteArray& folderId);
|
||||
void slotUnlockFolderError(const QByteArray& folderId, int httpReturnCode);
|
||||
void slotUploadMetadataSuccess(const QByteArray& folderId);
|
||||
void slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode);
|
||||
|
||||
// Remove Encryotion Bit.
|
||||
void slotLockForDecryptionSuccess(const QByteArray& folderId, const QByteArray& token);
|
||||
void slotLockForDecryptionError(const QByteArray& folderId, int httpReturnCode);
|
||||
void slotDeleteMetadataSuccess(const QByteArray& folderId);
|
||||
void slotDeleteMetadataError(const QByteArray& folderId, int httpReturnCode);
|
||||
void slotUnlockForDecryptionSuccess(const QByteArray& folderId);
|
||||
void slotUnlockForDecryptionError(const QByteArray& folderId, int httpReturnCode);
|
||||
void slotDecryptionFlagSuccess(const QByteArray& folderId);
|
||||
void slotDecryptionFlagError(const QByteArray& folderId, int httpReturnCode);
|
||||
|
||||
private:
|
||||
void showConnectionLabel(const QString &message,
|
||||
QStringList errors = QStringList());
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcAccountState, "gui.account.state", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcAccountState, "nextcloud.gui.account.state", QtInfoMsg)
|
||||
|
||||
AccountState::AccountState(AccountPtr account)
|
||||
: QObject()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcActivity, "gui.activity", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcActivity, "nextcloud.gui.activity", QtInfoMsg)
|
||||
|
||||
ActivityListModel::ActivityListModel(QWidget *parent)
|
||||
: QAbstractListModel(parent)
|
||||
|
||||
@@ -57,7 +57,7 @@ class QSocket;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcApplication, "gui.application", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcApplication, "nextcloud.gui.application", QtInfoMsg)
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -209,6 +209,9 @@ Application::Application(int &argc, char **argv)
|
||||
if (_showLogWindow) {
|
||||
_gui->slotToggleLogBrowser(); // _showLogWindow is set in parseOptions.
|
||||
}
|
||||
#if WITH_LIBCLOUDPROVIDERS
|
||||
_gui->setupCloudProviders();
|
||||
#endif
|
||||
|
||||
// Enable word wrapping of QInputDialog (#4197)
|
||||
setStyleSheet("QInputDialog QLabel { qproperty-wordWrap:1; }");
|
||||
|
||||
21
src/gui/cloudproviders/cloudproviderconfig.h.in
Normal file
21
src/gui/cloudproviders/cloudproviderconfig.h.in
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) by Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef CLOUDPROVIDERCONFIG_H_IN
|
||||
#define CLOUDPROVIDERCONFIG_H_IN
|
||||
|
||||
#cmakedefine LIBCLOUDPROVIDERS_DBUS_BUS_NAME "@LIBCLOUDPROVIDERS_DBUS_BUS_NAME@"
|
||||
#cmakedefine LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH "@LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH@"
|
||||
|
||||
#endif // CLOUDPROVIDERCONFIG_H_IN
|
||||
71
src/gui/cloudproviders/cloudprovidermanager.cpp
Normal file
71
src/gui/cloudproviders/cloudprovidermanager.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) by Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
extern "C" {
|
||||
#include <glib.h>
|
||||
#include <gio.h>
|
||||
#include <cloudprovidersproviderexporter.h>
|
||||
}
|
||||
#include "cloudproviderwrapper.h"
|
||||
#include "cloudprovidermanager.h"
|
||||
#include "account.h"
|
||||
#include "cloudproviderconfig.h"
|
||||
|
||||
CloudProvidersProviderExporter *_providerExporter;
|
||||
|
||||
void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
|
||||
{
|
||||
Q_UNUSED(name);
|
||||
CloudProviderManager *self;
|
||||
self = static_cast<CloudProviderManager*>(user_data);
|
||||
_providerExporter = cloud_providers_provider_exporter_new(connection, LIBCLOUDPROVIDERS_DBUS_BUS_NAME, LIBCLOUDPROVIDERS_DBUS_OBJECT_PATH);
|
||||
cloud_providers_provider_exporter_set_name (_providerExporter, APPLICATION_NAME);
|
||||
self->registerSignals();
|
||||
}
|
||||
|
||||
void CloudProviderManager::registerSignals()
|
||||
{
|
||||
OCC::FolderMan *folderManager = OCC::FolderMan::instance();
|
||||
connect(folderManager, SIGNAL(folderListChanged(const Folder::Map &)), SLOT(slotFolderListChanged(const Folder::Map &)));
|
||||
slotFolderListChanged(folderManager->map());
|
||||
}
|
||||
|
||||
CloudProviderManager::CloudProviderManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
_map = new QMap<QString, CloudProviderWrapper*>();
|
||||
QString busName = QString(LIBCLOUDPROVIDERS_DBUS_BUS_NAME);
|
||||
g_bus_own_name (G_BUS_TYPE_SESSION, busName.toAscii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, NULL, NULL, this, NULL);
|
||||
}
|
||||
|
||||
void CloudProviderManager::slotFolderListChanged(const Folder::Map &folderMap)
|
||||
{
|
||||
QMapIterator<QString, CloudProviderWrapper*> i(*_map);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (!folderMap.contains(i.key())) {
|
||||
cloud_providers_provider_exporter_remove_account(_providerExporter, i.value()->accountExporter());
|
||||
delete _map->find(i.key()).value();
|
||||
_map->remove(i.key());
|
||||
}
|
||||
}
|
||||
|
||||
Folder::MapIterator j(folderMap);
|
||||
while (j.hasNext()) {
|
||||
j.next();
|
||||
if (!_map->contains(j.key())) {
|
||||
auto *cpo = new CloudProviderWrapper(this, j.value(), _providerExporter);
|
||||
_map->insert(j.key(), cpo);
|
||||
}
|
||||
}
|
||||
}
|
||||
41
src/gui/cloudproviders/cloudprovidermanager.h
Normal file
41
src/gui/cloudproviders/cloudprovidermanager.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) by Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef CLOUDPROVIDERMANAGER_H
|
||||
#define CLOUDPROVIDERMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include "folder.h"
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
class CloudProviderWrapper;
|
||||
|
||||
class CloudProviderManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CloudProviderManager(QObject *parent = nullptr);
|
||||
void registerSignals();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void slotFolderListChanged(const Folder::Map &folderMap);
|
||||
|
||||
private:
|
||||
QMap<QString, CloudProviderWrapper*> *_map;
|
||||
};
|
||||
|
||||
#endif // CLOUDPROVIDERMANAGER_H
|
||||
349
src/gui/cloudproviders/cloudproviderwrapper.cpp
Normal file
349
src/gui/cloudproviders/cloudproviderwrapper.cpp
Normal file
@@ -0,0 +1,349 @@
|
||||
/*
|
||||
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
||||
* Copyright (C) by Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
extern "C" {
|
||||
#include <glib.h>
|
||||
#include <gio.h>
|
||||
#include <cloudprovidersaccountexporter.h>
|
||||
#include <cloudprovidersproviderexporter.h>
|
||||
}
|
||||
|
||||
#include "cloudproviderwrapper.h"
|
||||
#include <account.h>
|
||||
#include <folder.h>
|
||||
#include <accountstate.h>
|
||||
#include <QDesktopServices>
|
||||
#include "openfilemanager.h"
|
||||
#include "owncloudgui.h"
|
||||
#include "application.h"
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
GSimpleActionGroup *actionGroup = NULL;
|
||||
|
||||
static
|
||||
gchar* qstring_to_gchar(const QString &string)
|
||||
{
|
||||
QByteArray ba = string.toUtf8();
|
||||
char* data = ba.data();
|
||||
return g_strdup(data);
|
||||
}
|
||||
|
||||
CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, CloudProvidersProviderExporter* cloudprovider) : QObject(parent)
|
||||
, _folder(folder)
|
||||
{
|
||||
_recentlyChanged = new QList<QPair<QString, QString>>();
|
||||
gchar *accountName = g_strdup_printf ("Account%sFolder%s",
|
||||
qstring_to_gchar(folder->alias()),
|
||||
qstring_to_gchar(folder->accountState()->account()->id()));
|
||||
|
||||
_cloudProvider = CLOUD_PROVIDERS_PROVIDER_EXPORTER(cloudprovider);
|
||||
_cloudProviderAccount = cloud_providers_account_exporter_new(_cloudProvider, accountName);
|
||||
|
||||
gchar* folderName = qstring_to_gchar(folder->shortGuiLocalPath());
|
||||
gchar* folderPath = qstring_to_gchar(folder->cleanPath());
|
||||
cloud_providers_account_exporter_set_name (_cloudProviderAccount, folderName);
|
||||
cloud_providers_account_exporter_set_icon (_cloudProviderAccount, g_icon_new_for_string(APPLICATION_ICON_NAME, NULL));
|
||||
cloud_providers_account_exporter_set_path (_cloudProviderAccount, folderPath);
|
||||
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);
|
||||
cloud_providers_account_exporter_set_menu_model (_cloudProviderAccount, getMenuModel());
|
||||
cloud_providers_account_exporter_set_action_group (_cloudProviderAccount, getActionGroup());
|
||||
|
||||
connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString, ProgressInfo)), this, SLOT(slotUpdateProgress(QString, ProgressInfo)));
|
||||
connect(_folder, SIGNAL(syncStarted()), this, SLOT(slotSyncStarted()));
|
||||
connect(_folder, SIGNAL(syncFinished(SyncResult)), this, SLOT(slotSyncFinished(const SyncResult)));
|
||||
connect(_folder, SIGNAL(syncPausedChanged(Folder*,bool)), this, SLOT(slotSyncPausedChanged(Folder*, bool)));
|
||||
|
||||
_paused = _folder->syncPaused();
|
||||
updatePauseStatus();
|
||||
|
||||
g_free(accountName);
|
||||
g_free(folderName);
|
||||
g_free(folderPath);
|
||||
}
|
||||
|
||||
CloudProviderWrapper::~CloudProviderWrapper()
|
||||
{
|
||||
g_object_unref(_cloudProviderAccount);
|
||||
g_object_unref(_mainMenu);
|
||||
g_object_unref(actionGroup);
|
||||
}
|
||||
|
||||
CloudProvidersAccountExporter* CloudProviderWrapper::accountExporter()
|
||||
{
|
||||
return _cloudProviderAccount;
|
||||
}
|
||||
|
||||
static bool shouldShowInRecentsMenu(const SyncFileItem &item)
|
||||
{
|
||||
return !Progress::isIgnoredKind(item._status)
|
||||
&& item._instruction != CSYNC_INSTRUCTION_EVAL
|
||||
&& item._instruction != CSYNC_INSTRUCTION_NONE;
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const ProgressInfo &progress)
|
||||
{
|
||||
// Only update progress for the current folder
|
||||
Folder *f = FolderMan::instance()->folder(folder);
|
||||
if (f != _folder)
|
||||
return;
|
||||
|
||||
// Build recently changed files list
|
||||
if (!progress._lastCompletedItem.isEmpty() && shouldShowInRecentsMenu(progress._lastCompletedItem)) {
|
||||
QString kindStr = Progress::asResultString(progress._lastCompletedItem);
|
||||
QString timeStr = QTime::currentTime().toString("hh:mm");
|
||||
QString actionText = tr("%1 (%2, %3)").arg(progress._lastCompletedItem._file, kindStr, timeStr);
|
||||
if (f) {
|
||||
QString fullPath = f->path() + '/' + progress._lastCompletedItem._file;
|
||||
if (QFile(fullPath).exists()) {
|
||||
if (_recentlyChanged->length() > 5)
|
||||
_recentlyChanged->removeFirst();
|
||||
_recentlyChanged->append(qMakePair(actionText, fullPath));
|
||||
} else {
|
||||
_recentlyChanged->append(qMakePair(actionText, QString("")));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Build status details text
|
||||
QString msg;
|
||||
if (!progress._currentDiscoveredFolder.isEmpty()) {
|
||||
msg = tr("Checking for changes in '%1'").arg(progress._currentDiscoveredFolder);
|
||||
} else if (progress.totalSize() == 0) {
|
||||
quint64 currentFile = progress.currentFile();
|
||||
quint64 totalFileCount = qMax(progress.totalFiles(), currentFile);
|
||||
if (progress.trustEta()) {
|
||||
msg = tr("Syncing %1 of %2 (%3 left)")
|
||||
.arg(currentFile)
|
||||
.arg(totalFileCount)
|
||||
.arg(Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta));
|
||||
} else {
|
||||
msg = tr("Syncing %1 of %2")
|
||||
.arg(currentFile)
|
||||
.arg(totalFileCount);
|
||||
}
|
||||
} else {
|
||||
QString totalSizeStr = Utility::octetsToString(progress.totalSize());
|
||||
if (progress.trustEta()) {
|
||||
msg = tr("Syncing %1 (%2 left)")
|
||||
.arg(totalSizeStr, Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta));
|
||||
} else {
|
||||
msg = tr("Syncing %1")
|
||||
.arg(totalSizeStr);
|
||||
}
|
||||
}
|
||||
updateStatusText(msg);
|
||||
|
||||
if (!progress._lastCompletedItem.isEmpty()
|
||||
&& shouldShowInRecentsMenu(progress._lastCompletedItem)) {
|
||||
GMenuItem* item;
|
||||
g_menu_remove_all (G_MENU(_recentMenu));
|
||||
if(!_recentlyChanged->isEmpty()) {
|
||||
QList<QPair<QString, QString>>::iterator i;
|
||||
for (i = _recentlyChanged->begin(); i != _recentlyChanged->end(); i++) {
|
||||
gchar *file;
|
||||
QString label = i->first;
|
||||
QString fullPath = i->second;
|
||||
file = g_strdup(qstring_to_gchar(label));
|
||||
item = g_menu_item_new(file, "cloudprovider.showfile");
|
||||
g_menu_item_set_action_and_target_value(item, "cloudprovider.showfile", g_variant_new_string(qstring_to_gchar(fullPath)));
|
||||
g_menu_append_item(_recentMenu, item);
|
||||
}
|
||||
} else {
|
||||
item = g_menu_item_new("No recently changed files", NULL);
|
||||
g_menu_append_item(_recentMenu, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::updateStatusText(QString statusText)
|
||||
{
|
||||
char* state = qstring_to_gchar(_folder->accountState()->stateString(_folder->accountState()->state()));
|
||||
char* statusChar = qstring_to_gchar(statusText);
|
||||
char* status = g_strdup_printf("%s - %s", state, statusChar);
|
||||
cloud_providers_account_exporter_set_status_details(_cloudProviderAccount, status);
|
||||
g_free(state);
|
||||
g_free(statusChar);
|
||||
g_free(status);
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::updatePauseStatus()
|
||||
{
|
||||
if (_paused) {
|
||||
updateStatusText(tr("Sync paused"));
|
||||
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_ERROR);
|
||||
} else {
|
||||
updateStatusText(tr("Syncing"));
|
||||
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_SYNCING);
|
||||
}
|
||||
}
|
||||
|
||||
Folder* CloudProviderWrapper::folder()
|
||||
{
|
||||
return _folder;
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::slotSyncStarted()
|
||||
{
|
||||
cloud_providers_account_exporter_set_status(_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_SYNCING);
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::slotSyncFinished(const SyncResult &result)
|
||||
{
|
||||
if (result.status() == result.Success || result.status() == result.Problem)
|
||||
{
|
||||
cloud_providers_account_exporter_set_status(_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);
|
||||
updateStatusText(result.statusString());
|
||||
return;
|
||||
}
|
||||
cloud_providers_account_exporter_set_status(_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_ERROR);
|
||||
updateStatusText(result.statusString());
|
||||
}
|
||||
|
||||
GMenuModel* CloudProviderWrapper::getMenuModel() {
|
||||
|
||||
GMenu* section;
|
||||
GMenuItem* item;
|
||||
|
||||
_mainMenu = g_menu_new();
|
||||
|
||||
section = g_menu_new();
|
||||
item = g_menu_item_new("Open website", "cloudprovider.openwebsite");
|
||||
g_menu_append_item(section, item);
|
||||
g_menu_append_section(_mainMenu, NULL, G_MENU_MODEL(section));
|
||||
|
||||
_recentMenu = g_menu_new();
|
||||
item = g_menu_item_new("No recently changed files", NULL);
|
||||
g_menu_append_item(_recentMenu, item);
|
||||
section = g_menu_new();
|
||||
item = g_menu_item_new_submenu("Recently changed", G_MENU_MODEL(_recentMenu));
|
||||
g_menu_append_item(section, item);
|
||||
g_menu_append_section(_mainMenu, NULL, G_MENU_MODEL(section));
|
||||
|
||||
section = g_menu_new();
|
||||
item = g_menu_item_new("Pause synchronization", "cloudprovider.pause");
|
||||
g_menu_append_item(section, item);
|
||||
g_menu_append_section(_mainMenu, NULL, G_MENU_MODEL(section));
|
||||
|
||||
section = g_menu_new();
|
||||
item = g_menu_item_new("Help", "cloudprovider.openhelp");
|
||||
g_menu_append_item(section, item);
|
||||
item = g_menu_item_new("Settings", "cloudprovider.opensettings");
|
||||
g_menu_append_item(section, item);
|
||||
item = g_menu_item_new("Log out", "cloudprovider.logout");
|
||||
g_menu_append_item(section, item);
|
||||
item = g_menu_item_new("Quit sync client", "cloudprovider.quit");
|
||||
g_menu_append_item(section, item);
|
||||
g_menu_append_section(_mainMenu, NULL, G_MENU_MODEL(section));
|
||||
|
||||
return G_MENU_MODEL(_mainMenu);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_action_open (GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
{
|
||||
Q_UNUSED(parameter);
|
||||
const gchar *name = g_action_get_name(G_ACTION(action));
|
||||
auto *self = static_cast<CloudProviderWrapper*>(user_data);
|
||||
auto *gui = dynamic_cast<ownCloudGui*>(self->parent()->parent());
|
||||
|
||||
if(g_str_equal(name, "openhelp")) {
|
||||
gui->slotHelp();
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "opensettings")) {
|
||||
gui->slotShowSettings();
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "openwebsite")) {
|
||||
QDesktopServices::openUrl(self->folder()->accountState()->account()->url());
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "openfolder")) {
|
||||
showInFileManager(self->folder()->cleanPath());
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "showfile")) {
|
||||
gchar *path;
|
||||
g_variant_get (parameter, "s", &path);
|
||||
g_print("showfile => %s\n", path);
|
||||
showInFileManager(QString(path));
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "logout")) {
|
||||
self->folder()->accountState()->signOutByUi();
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "quit")) {
|
||||
qApp->quit();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_action_openrecentfile (GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
Q_UNUSED(parameter);
|
||||
auto *self = static_cast<CloudProviderWrapper*>(user_data);
|
||||
QDesktopServices::openUrl(self->folder()->accountState()->account()->url());
|
||||
}
|
||||
|
||||
static void
|
||||
activate_action_pause (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
Q_UNUSED(parameter);
|
||||
auto *self = static_cast<CloudProviderWrapper*>(user_data);
|
||||
GVariant *old_state, *new_state;
|
||||
|
||||
old_state = g_action_get_state (G_ACTION (action));
|
||||
new_state = g_variant_new_boolean (!(bool)g_variant_get_boolean (old_state));
|
||||
self->folder()->setSyncPaused((bool)g_variant_get_boolean(new_state));
|
||||
g_simple_action_set_state (action, new_state);
|
||||
g_variant_unref (old_state);
|
||||
}
|
||||
|
||||
static GActionEntry actions[] = {
|
||||
{ "openwebsite", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "quit", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "logout", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "openfolder", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "showfile", activate_action_open, "s", NULL, NULL, {0,0,0}},
|
||||
{ "openhelp", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "opensettings", activate_action_open, NULL, NULL, NULL, {0,0,0}},
|
||||
{ "openrecentfile", activate_action_openrecentfile, "s", NULL, NULL, {0,0,0}},
|
||||
{ "pause", activate_action_pause, NULL, "false", NULL, {0,0,0}}
|
||||
};
|
||||
|
||||
GActionGroup* CloudProviderWrapper::getActionGroup()
|
||||
{
|
||||
actionGroup = g_simple_action_group_new ();
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (actionGroup), actions, G_N_ELEMENTS (actions), this);
|
||||
bool state = _folder->syncPaused();
|
||||
GAction *pause = g_action_map_lookup_action(G_ACTION_MAP(actionGroup), "pause");
|
||||
g_simple_action_set_state(G_SIMPLE_ACTION(pause), g_variant_new_boolean(state));
|
||||
return G_ACTION_GROUP (actionGroup);
|
||||
}
|
||||
|
||||
void CloudProviderWrapper::slotSyncPausedChanged(Folder *folder, bool state)
|
||||
{
|
||||
Q_UNUSED(folder);
|
||||
_paused = state;
|
||||
GAction *pause = g_action_map_lookup_action(G_ACTION_MAP(actionGroup), "pause");
|
||||
g_simple_action_set_state (G_SIMPLE_ACTION(pause), g_variant_new_boolean(state));
|
||||
updatePauseStatus();
|
||||
}
|
||||
66
src/gui/cloudproviders/cloudproviderwrapper.h
Normal file
66
src/gui/cloudproviders/cloudproviderwrapper.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (C) by Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef CLOUDPROVIDER_H
|
||||
#define CLOUDPROVIDER_H
|
||||
|
||||
#include <QObject>
|
||||
#include "folderman.h"
|
||||
|
||||
/* Forward declaration required since gio header files interfere with QObject headers */
|
||||
struct _CloudProvidersProviderExporter;
|
||||
typedef _CloudProvidersProviderExporter CloudProvidersProviderExporter;
|
||||
struct _CloudProvidersAccountExporter;
|
||||
typedef _CloudProvidersAccountExporter CloudProvidersAccountExporter;
|
||||
struct _GMenuModel;
|
||||
typedef _GMenuModel GMenuModel;
|
||||
struct _GMenu;
|
||||
typedef _GMenu GMenu;
|
||||
struct _GActionGroup;
|
||||
typedef _GActionGroup GActionGroup;
|
||||
typedef char gchar;
|
||||
typedef void* gpointer;
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
class CloudProviderWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CloudProviderWrapper(QObject *parent = nullptr, Folder *folder = nullptr, CloudProvidersProviderExporter* cloudprovider = nullptr);
|
||||
~CloudProviderWrapper();
|
||||
CloudProvidersAccountExporter* accountExporter();
|
||||
Folder* folder();
|
||||
GMenuModel* getMenuModel();
|
||||
GActionGroup* getActionGroup();
|
||||
void updateStatusText(QString statusText);
|
||||
void updatePauseStatus();
|
||||
|
||||
public slots:
|
||||
void slotSyncStarted();
|
||||
void slotSyncFinished(const SyncResult &);
|
||||
void slotUpdateProgress(const QString &folder, const ProgressInfo &progress);
|
||||
void slotSyncPausedChanged(Folder*, bool);
|
||||
|
||||
private:
|
||||
Folder *_folder;
|
||||
CloudProvidersProviderExporter *_cloudProvider;
|
||||
CloudProvidersAccountExporter *_cloudProviderAccount;
|
||||
QList<QPair<QString, QString>> *_recentlyChanged;
|
||||
bool _paused;
|
||||
GMenu* _mainMenu = NULL;
|
||||
GMenu* _recentMenu = NULL;
|
||||
};
|
||||
|
||||
#endif // CLOUDPROVIDER_H
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcGuiCredentials, "gui.credentials", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcGuiCredentials, "nextcloud.gui.credentials", QtInfoMsg)
|
||||
|
||||
namespace CredentialsFactory {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ using namespace QKeychain;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcHttpCredentialsGui, "sync.credentials.http.gui", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcHttpCredentialsGui, "nextcloud.sync.credentials.http.gui", QtInfoMsg)
|
||||
|
||||
void HttpCredentialsGui::askFromUser()
|
||||
{
|
||||
@@ -139,22 +139,21 @@ void HttpCredentialsGui::showDialog()
|
||||
QString HttpCredentialsGui::requestAppPasswordText(const Account *account)
|
||||
{
|
||||
int version = account->serverVersionInt();
|
||||
QString path;
|
||||
auto url = account->url().toString();
|
||||
if (url.endsWith('/'))
|
||||
url.chop(1);
|
||||
|
||||
// Version may not be available before login on new servers!
|
||||
if (!version || version >= Account::makeServerVersion(10, 0, 0)) {
|
||||
path = QLatin1String("/index.php/settings/personal?sectionid=security#apppasswords");
|
||||
} else if (version >= Account::makeServerVersion(9, 1, 0)) {
|
||||
path = QLatin1String("/index.php/settings/personal?section=apppasswords");
|
||||
if (version >= Account::makeServerVersion(13, 0, 0)) {
|
||||
url += QLatin1String("/index.php/settings/user/security");
|
||||
} else if (version >= Account::makeServerVersion(12, 0, 0)) {
|
||||
url += QLatin1String("/index.php/settings/personal#security");
|
||||
} else if (version >= Account::makeServerVersion(11, 0, 0)) {
|
||||
url += QLatin1String("/index.php/settings/personal#apppasswords");
|
||||
} else {
|
||||
// Older server than 9.1 does not have the feature to request App Password
|
||||
return QString();
|
||||
}
|
||||
|
||||
auto baseUrl = account->url().toString();
|
||||
if (baseUrl.endsWith('/'))
|
||||
baseUrl.chop(1);
|
||||
return tr("<a href=\"%1\">Click here</a> to request an app password from the web interface.")
|
||||
.arg(baseUrl + path);
|
||||
.arg(url);
|
||||
}
|
||||
} // namespace OCC
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcOauth, "sync.credentials.oauth", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcOauth, "nextcloud.sync.credentials.oauth", QtInfoMsg)
|
||||
|
||||
OAuth::~OAuth()
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ using namespace QKeychain;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcShibboleth, "gui.credentials.shibboleth", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcShibboleth, "nextcloud.gui.credentials.shibboleth", QtInfoMsg)
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcFolder, "gui.folder", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcFolder, "nextcloud.gui.folder", QtInfoMsg)
|
||||
|
||||
Folder::Folder(const FolderDefinition &definition,
|
||||
AccountState *accountState,
|
||||
|
||||
@@ -65,6 +65,8 @@ public:
|
||||
bool paused;
|
||||
/// whether the folder syncs hidden files
|
||||
bool ignoreHiddenFiles;
|
||||
/// the folder has client side encryption
|
||||
bool isClientSideEncrypted;
|
||||
/// The CLSID where this folder appears in registry for the Explorer navigation pane entry.
|
||||
QUuid navigationPaneClsid;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcFolderMan, "gui.folder.manager", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcFolderMan, "nextcloud.gui.folder.manager", QtInfoMsg)
|
||||
|
||||
FolderMan *FolderMan::_instance = 0;
|
||||
|
||||
@@ -763,6 +763,7 @@ void FolderMan::slotRemoveFoldersForAccount(AccountState *accountState)
|
||||
foreach (const auto &f, foldersToRemove) {
|
||||
removeFolder(f);
|
||||
}
|
||||
emit folderListChanged(_folderMap);
|
||||
}
|
||||
|
||||
void FolderMan::slotForwardFolderSyncStateChange()
|
||||
|
||||
@@ -246,7 +246,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
if (!showProgess) {
|
||||
painter->setFont(subFont);
|
||||
QString elidedRemotePathText = subFm.elidedText(
|
||||
tr("Synchronizing with local folder"),
|
||||
tr("Synchronized with local folder"),
|
||||
Qt::ElideRight, remotePathRect.width());
|
||||
painter->drawText(QStyle::visualRect(option.direction, option.rect, remotePathRect),
|
||||
textAlign, elidedRemotePathText);
|
||||
|
||||
@@ -28,7 +28,7 @@ Q_DECLARE_METATYPE(QPersistentModelIndex)
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcFolderStatus, "gui.folder.model", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcFolderStatus, "nextcloud.gui.folder.model", QtInfoMsg)
|
||||
|
||||
static const char propertyParentIndexC[] = "oc_parentIndex";
|
||||
static const char propertyPermissionMap[] = "oc_permissionMap";
|
||||
@@ -46,6 +46,7 @@ FolderStatusModel::FolderStatusModel(QObject *parent)
|
||||
, _accountState(0)
|
||||
, _dirty(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
FolderStatusModel::~FolderStatusModel()
|
||||
@@ -163,6 +164,8 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
||||
return QColor(Qt::red);
|
||||
}
|
||||
break;
|
||||
case FileIdRole:
|
||||
return x._fileId;
|
||||
case FolderStatusDelegate::FolderPathRole: {
|
||||
auto f = x._folder;
|
||||
if (!f)
|
||||
@@ -393,6 +396,24 @@ FolderStatusModel::SubFolderInfo *FolderStatusModel::infoForIndex(const QModelIn
|
||||
}
|
||||
}
|
||||
|
||||
/* Recursivelly traverse the file info looking for the id */
|
||||
FolderStatusModel::SubFolderInfo *FolderStatusModel::infoForFileId(const QByteArray& fileId, SubFolderInfo* info) const
|
||||
{
|
||||
const QVector<SubFolderInfo>& infoVec = info ? info->_subs : _folders;
|
||||
for(int i = 0, end = infoVec.size(); i < end; i++) {
|
||||
auto *info = const_cast<SubFolderInfo *>(&infoVec[i]);
|
||||
if (info->_fileId == fileId) {
|
||||
return info;
|
||||
} else if (info->_subs.size()) {
|
||||
if (auto *subInfo = infoForFileId(fileId, info)) {
|
||||
return subInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QModelIndex FolderStatusModel::indexForPath(Folder *f, const QString &path) const
|
||||
{
|
||||
if (!f) {
|
||||
@@ -551,10 +572,19 @@ void FolderStatusModel::fetchMore(const QModelIndex &parent)
|
||||
}
|
||||
path += info->_path;
|
||||
}
|
||||
|
||||
//TODO: This is the correct place, but this doesn't seems to be the right
|
||||
// Way to call fetchFolderEncryptedStatus.
|
||||
if (_accountState->account()->capabilities().clientSideEncryptionAvaliable()) {
|
||||
_accountState->account()->e2e()->fetchFolderEncryptedStatus();
|
||||
}
|
||||
|
||||
LsColJob *job = new LsColJob(_accountState->account(), path, this);
|
||||
job->setProperties(QList<QByteArray>() << "resourcetype"
|
||||
<< "http://owncloud.org/ns:size"
|
||||
<< "http://owncloud.org/ns:permissions");
|
||||
<< "http://owncloud.org/ns:permissions"
|
||||
<< "http://owncloud.org/ns:fileid");
|
||||
|
||||
job->setTimeout(60 * 1000);
|
||||
connect(job, &LsColJob::directoryListingSubfolders,
|
||||
this, &FolderStatusModel::slotUpdateDirectories);
|
||||
@@ -655,11 +685,13 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
|
||||
newInfo._folder = parentInfo->_folder;
|
||||
newInfo._pathIdx = parentInfo->_pathIdx;
|
||||
newInfo._pathIdx << newSubs.size();
|
||||
newInfo._size = job->_sizes.value(path);
|
||||
newInfo._isExternal = permissionMap.value(removeTrailingSlash(path)).toString().contains("M");
|
||||
newInfo._path = relativePath;
|
||||
newInfo._name = removeTrailingSlash(relativePath).split('/').last();
|
||||
|
||||
const auto& folderInfo = job->_folderInfos.value(path);
|
||||
newInfo._size = folderInfo.size;
|
||||
newInfo._fileId = folderInfo.fileId;
|
||||
if (relativePath.isEmpty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ class FolderStatusModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum {FileIdRole = Qt::UserRole+1};
|
||||
|
||||
FolderStatusModel(QObject *parent = 0);
|
||||
~FolderStatusModel();
|
||||
void setAccountState(const AccountState *accountState);
|
||||
@@ -79,9 +81,9 @@ public:
|
||||
bool _hasError; // If the last fetching job ended in an error
|
||||
QString _lastErrorString;
|
||||
bool _fetchingLabel; // Whether a 'fetching in progress' label is shown.
|
||||
|
||||
// undecided folders are the big folders that the user has not accepted yet
|
||||
bool _isUndecided;
|
||||
QByteArray _fileId; // the file id for this folder on the server.
|
||||
|
||||
Qt::CheckState _checked;
|
||||
|
||||
@@ -118,7 +120,7 @@ public:
|
||||
FetchLabel };
|
||||
ItemType classify(const QModelIndex &index) const;
|
||||
SubFolderInfo *infoForIndex(const QModelIndex &index) const;
|
||||
|
||||
SubFolderInfo *infoForFileId(const QByteArray &fileId, SubFolderInfo *info = nullptr) const;
|
||||
// If the selective sync check boxes were changed
|
||||
bool isDirty() { return _dirty; }
|
||||
|
||||
@@ -168,7 +170,6 @@ signals:
|
||||
|
||||
// Tell the view that this item should be expanded because it has an undecided item
|
||||
void suggestExpand(const QModelIndex &);
|
||||
|
||||
friend struct SubFolderInfo;
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user