Compare commits
270 Commits
v1.6.0-bet
...
v1.6.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc1121ef00 | ||
|
|
6f9938a2b2 | ||
|
|
a650dce17f | ||
|
|
7ddd3a36c7 | ||
|
|
c46f1aba89 | ||
|
|
2ab19b23d7 | ||
|
|
d770f9cc1a | ||
|
|
9d3b09159e | ||
|
|
819cb74cc3 | ||
|
|
2407469104 | ||
|
|
c1faff513e | ||
|
|
e5b4438d5c | ||
|
|
7ec43e9f36 | ||
|
|
c4dabe7ed2 | ||
|
|
6b4f11f4aa | ||
|
|
1edf3dd503 | ||
|
|
1daf9bc80b | ||
|
|
b7a91a6998 | ||
|
|
69dffc8882 | ||
|
|
753aa9132e | ||
|
|
cfdfd6a860 | ||
|
|
0c9d57228d | ||
|
|
5254c9785c | ||
|
|
0f37484b8a | ||
|
|
3d0c009719 | ||
|
|
208011f6ab | ||
|
|
f84e0010ee | ||
|
|
c97f46d403 | ||
|
|
1fb52f0d8b | ||
|
|
d4de024f15 | ||
|
|
1d9d88ca85 | ||
|
|
beb9300b4e | ||
|
|
c35880d4f1 | ||
|
|
d8ebebaf12 | ||
|
|
af3fae9c28 | ||
|
|
d3b72940fd | ||
|
|
e8de3e855a | ||
|
|
71338000a4 | ||
|
|
d697969f36 | ||
|
|
51e9c5fd96 | ||
|
|
0202351a27 | ||
|
|
63cd5ef563 | ||
|
|
82c254fecf | ||
|
|
86bea9a9af | ||
|
|
88f26fb548 | ||
|
|
a9f1de84f0 | ||
|
|
40d765c73a | ||
|
|
23e0af5cc1 | ||
|
|
e17243bc1f | ||
|
|
0e45dd7a3d | ||
|
|
65f313f1b4 | ||
|
|
da4958c716 | ||
|
|
653b8494f5 | ||
|
|
6ed6f84f6e | ||
|
|
ff0ba56bc3 | ||
|
|
e795d04f30 | ||
|
|
8d3806b080 | ||
|
|
5597ebe455 | ||
|
|
9adc30ab9f | ||
|
|
a7d251f8fc | ||
|
|
7a8a3855b8 | ||
|
|
603a238eb9 | ||
|
|
b7b6cf4b3f | ||
|
|
c855b783d9 | ||
|
|
f593fc8e4d | ||
|
|
ae5cbb8451 | ||
|
|
041066a252 | ||
|
|
9ca82ba14d | ||
|
|
b29a757b18 | ||
|
|
485a6926c5 | ||
|
|
f3de6f46db | ||
|
|
1309dc27d9 | ||
|
|
31469d6a3e | ||
|
|
88776770f7 | ||
|
|
bbf8b9f8dd | ||
|
|
6ff38d8005 | ||
|
|
6d13b5cc43 | ||
|
|
73ab2804c4 | ||
|
|
db3d2eed5f | ||
|
|
d995d1190f | ||
|
|
3217e42a0f | ||
|
|
1dd58a537e | ||
|
|
b34afa1afc | ||
|
|
b7c9fa6d5f | ||
|
|
61ad376bf4 | ||
|
|
407b3bebfe | ||
|
|
f04c80dd0e | ||
|
|
1e788d3d60 | ||
|
|
83171bf025 | ||
|
|
2e51721851 | ||
|
|
4d4a0148e4 | ||
|
|
b144a5bbf9 | ||
|
|
5225fe07e0 | ||
|
|
85cdbd1f1d | ||
|
|
e4f8a136f1 | ||
|
|
c263c38cdf | ||
|
|
df8553e878 | ||
|
|
bec66c85d4 | ||
|
|
f9710cc1d5 | ||
|
|
6b041b0846 | ||
|
|
d0c992c991 | ||
|
|
9ee86cf06b | ||
|
|
646eafb05d | ||
|
|
0880444e37 | ||
|
|
0a953b91f9 | ||
|
|
b71881d300 | ||
|
|
b91967f4d9 | ||
|
|
2d234cd96f | ||
|
|
1230e87330 | ||
|
|
b2966fecc7 | ||
|
|
4abe00ff6c | ||
|
|
e1db834ec9 | ||
|
|
c72c72a106 | ||
|
|
4a5ef8f173 | ||
|
|
ed26bcb3e7 | ||
|
|
b814b45e50 | ||
|
|
ded8914df2 | ||
|
|
7a7b0e8939 | ||
|
|
a4f6370774 | ||
|
|
6605a89990 | ||
|
|
6e10b8c5c4 | ||
|
|
24616bead4 | ||
|
|
13f9970257 | ||
|
|
746c15b4aa | ||
|
|
7e65c9741e | ||
|
|
a50e7c1b48 | ||
|
|
0ae82e2041 | ||
|
|
22af756fe3 | ||
|
|
2f1bec28dd | ||
|
|
022a3fcd92 | ||
|
|
064dcdb25a | ||
|
|
938dce7fa6 | ||
|
|
0151682a53 | ||
|
|
864f2cdc7d | ||
|
|
77ddedc859 | ||
|
|
0c1ab533e6 | ||
|
|
1dd7f736d0 | ||
|
|
571c199db8 | ||
|
|
40715cbc77 | ||
|
|
3d2a2df86f | ||
|
|
86a48b52e9 | ||
|
|
ebe1f986f1 | ||
|
|
dd1152dd4f | ||
|
|
ce9bfd319a | ||
|
|
f591ac6549 | ||
|
|
4fd368c992 | ||
|
|
93f453057b | ||
|
|
5a069d274b | ||
|
|
e275ad3866 | ||
|
|
5813f63df8 | ||
|
|
9a1f8ccf7b | ||
|
|
449c00f019 | ||
|
|
6017eb7ca6 | ||
|
|
f1b2417967 | ||
|
|
181383e5f1 | ||
|
|
c1b9d5c653 | ||
|
|
964c3ac7bf | ||
|
|
6d8afabf41 | ||
|
|
0a7dbeb778 | ||
|
|
3228fde4af | ||
|
|
0582abe8dd | ||
|
|
81f410970f | ||
|
|
e75c5236f2 | ||
|
|
8a671c40d1 | ||
|
|
50ce0f9681 | ||
|
|
a60902b33d | ||
|
|
5220786cf2 | ||
|
|
99cead68f5 | ||
|
|
7a209ba376 | ||
|
|
f9263da3de | ||
|
|
3f724e1c6a | ||
|
|
c9d3f7a0eb | ||
|
|
072af16f3b | ||
|
|
d2b6c626b5 | ||
|
|
115276408a | ||
|
|
9abffdb1a6 | ||
|
|
5b0307446a | ||
|
|
0f20a4f546 | ||
|
|
1b2875c20a | ||
|
|
bbdf7bf955 | ||
|
|
57359968ed | ||
|
|
ea9f302b7a | ||
|
|
ef0a3c212e | ||
|
|
18677dbc3f | ||
|
|
7e8b403116 | ||
|
|
1303379c9e | ||
|
|
b995cd318c | ||
|
|
ed19107161 | ||
|
|
1b67f253dc | ||
|
|
667c835c49 | ||
|
|
5b298abba1 | ||
|
|
4edbeece49 | ||
|
|
97362cff32 | ||
|
|
3db3c7b876 | ||
|
|
8738128504 | ||
|
|
069eaf9170 | ||
|
|
d0b9b002e4 | ||
|
|
bdba56f60b | ||
|
|
7087dbc445 | ||
|
|
7ade4bb6e6 | ||
|
|
86117aed0d | ||
|
|
ed3d9a7479 | ||
|
|
3746a2efff | ||
|
|
9b53cc66e7 | ||
|
|
43fe7b0d55 | ||
|
|
5aa6f81ef3 | ||
|
|
f838f28185 | ||
|
|
e1f8eb5aa5 | ||
|
|
f40a054cb7 | ||
|
|
adfb163593 | ||
|
|
81c768099e | ||
|
|
4bcaebb322 | ||
|
|
8b469d3992 | ||
|
|
bb929db7e6 | ||
|
|
90ee274744 | ||
|
|
9f6e9f8e1b | ||
|
|
943f9f60e3 | ||
|
|
f89bfce068 | ||
|
|
ef44a59bed | ||
|
|
d96139f698 | ||
|
|
de970eb0a5 | ||
|
|
7a28b44128 | ||
|
|
17a2e224c4 | ||
|
|
87386ce001 | ||
|
|
5ed4710d64 | ||
|
|
5493c22584 | ||
|
|
64f4d1b387 | ||
|
|
cdd8c8165b | ||
|
|
16ffd7fbe4 | ||
|
|
ba959f7cf9 | ||
|
|
cf145feed8 | ||
|
|
07f57b1982 | ||
|
|
e62eb62a01 | ||
|
|
574e030caf | ||
|
|
3705a42375 | ||
|
|
a9ffd1d0cf | ||
|
|
f86dd1cbbf | ||
|
|
af066cc733 | ||
|
|
822650719b | ||
|
|
95747fbaea | ||
|
|
321058ef74 | ||
|
|
71c11373d8 | ||
|
|
d5ba288dd5 | ||
|
|
091e9bbd52 | ||
|
|
ce09e11011 | ||
|
|
d7a226e0e6 | ||
|
|
f034bcb9ae | ||
|
|
4c77a04514 | ||
|
|
a50c39cd0c | ||
|
|
370dd99e47 | ||
|
|
f97fbe868f | ||
|
|
2ce6560b6e | ||
|
|
2b4e14c4fc | ||
|
|
1631cfdaf1 | ||
|
|
2e76fe87c2 | ||
|
|
6c44f53645 | ||
|
|
988c162d2f | ||
|
|
3d8d4fecd7 | ||
|
|
f8525fa5a0 | ||
|
|
6e48eb9397 | ||
|
|
88cb047197 | ||
|
|
7f7154ed40 | ||
|
|
a8c1ffc2f4 | ||
|
|
df8b5b1ea6 | ||
|
|
ce50cdecf1 | ||
|
|
77c7439329 | ||
|
|
752112dbaa | ||
|
|
925c6485e6 | ||
|
|
738f026c41 | ||
|
|
32e205f6ce |
2
.gitmodules
vendored
@@ -3,4 +3,4 @@
|
|||||||
url = https://github.com/owncloud/documentation
|
url = https://github.com/owncloud/documentation
|
||||||
[submodule "src/3rdparty/qtmacgoodies"]
|
[submodule "src/3rdparty/qtmacgoodies"]
|
||||||
path = src/3rdparty/qtmacgoodies
|
path = src/3rdparty/qtmacgoodies
|
||||||
url = git://github.com/shadone/qtmacgoodies.git
|
url = git://github.com/guruz/qtmacgoodies.git
|
||||||
|
|||||||
55
ChangeLog
@@ -1,18 +1,66 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
version 1.6.0 (release 2014-04- )
|
version 1.6.3 (release 2014-09-03)
|
||||||
|
* Fixed updater on OS X
|
||||||
|
* Fixed memory leak in SSL button that could lead to quick memory draining
|
||||||
|
* Fixed upload problem with files >4 GB
|
||||||
|
* MacOSX, Linux: Bring Settings window to front properly
|
||||||
|
* Branded clients: If no configuration is detected, try to import the data
|
||||||
|
from a previously configured community edition.
|
||||||
|
|
||||||
|
version 1.6.2 (release 2014-07-28 )
|
||||||
|
* Limit the HTTP buffer size when downloading to limit memory consumption.
|
||||||
|
* Another small mem leak fixed in HTTP Credentials.
|
||||||
|
* Fix local file name clash detection for MacOSX.
|
||||||
|
* Limit maximum wait time to ten seconds in network limiting.
|
||||||
|
* Fix data corruption while trying to resume and the server does
|
||||||
|
not support it.
|
||||||
|
* HTTP Credentials: Read password from legacy place if not found.
|
||||||
|
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
|
||||||
|
* Limit memory usage to avoid mem wasting and crashes
|
||||||
|
* Propagator: Fix crash when logging out during upload (#1957)
|
||||||
|
* Propagator_qnam: Fix signal slot connection (#1963)
|
||||||
|
* Use more elaborated way to detect that the server was reconfigured (#1948)
|
||||||
|
* Setup Wizard: Reconfigure Server also if local path was changed (#1948)
|
||||||
|
|
||||||
|
version 1.6.1 (release 2014-06-26 )
|
||||||
|
* Fix 'precondition failed' bug with broken upload
|
||||||
|
* Fix openSSL problems for windows deployment
|
||||||
|
* Fix syncing a folder with '#' in the name
|
||||||
|
* Fix #1845: do not update parent directory etag before sub
|
||||||
|
directories are removed
|
||||||
|
* Fix reappearing directories if dirs are removed during its
|
||||||
|
upload
|
||||||
|
* Fix app version in settings dialog, General tab
|
||||||
|
* Fix crash in FolderWizard when going offline
|
||||||
|
* Shibboleth fixes
|
||||||
|
* More specific error messages (file remove during upload, open
|
||||||
|
local sync file)
|
||||||
|
* Use QSet rather than QHash in SyncEngine (save memory)
|
||||||
|
* Fix some memory leaks
|
||||||
|
* Fix some thread race problems, ie. wait for neon thread to finish
|
||||||
|
before the propagator is shut down
|
||||||
|
* Fix a lot of issues and warnings found by Coverity
|
||||||
|
* Fix Mac some settings dialog problems
|
||||||
|
|
||||||
|
|
||||||
|
version 1.6.0 (release 2014-05-30 )
|
||||||
* Minor GUI improvements
|
* Minor GUI improvements
|
||||||
* Qt5 compile issues fixed
|
* Qt5 compile issues fixed
|
||||||
* Ignore sync log file in filewatcher
|
* Ignore sync log file in filewatcher
|
||||||
* Install libocsync to private library dir and use rpath to localize
|
* Install libocsync to private library dir and use rpath to localize
|
||||||
* Fix reconnect after server disconnect
|
* Fix reconnect after server disconnect
|
||||||
* Fix crashes
|
|
||||||
* Fix "unknown action" display in Activity window
|
* Fix "unknown action" display in Activity window
|
||||||
* Fix memory leaks
|
* Fix memory leaks
|
||||||
* Respect XDG_CONFIG_HOME environment var
|
* Respect XDG_CONFIG_HOME environment var
|
||||||
* Handle empty fileids in the journal correctly
|
* Handle empty fileids in the journal correctly
|
||||||
* Add abilility to compile libowncloudsync without GUI dependendy
|
* Add abilility to compile libowncloudsync without GUI dependendy
|
||||||
|
* Fix SSL error with previously-expired CAs on Windows
|
||||||
|
* Fix incorrect folder pause state after start
|
||||||
|
* Fix a couple of actual potential crashes
|
||||||
|
* Improve Cookie support (e.g. for cookie-based load-balancers)
|
||||||
|
* Introduce a general timeout of 300s for network operations
|
||||||
|
* Improve error handling, blacklisting
|
||||||
* Job-based change propagation, enables faster parallel up/downloads
|
* Job-based change propagation, enables faster parallel up/downloads
|
||||||
(right now only if no bandwidth limit is set and no proxy is used)
|
(right now only if no bandwidth limit is set and no proxy is used)
|
||||||
* Significantly reduced CPU load when checking for local and remote changes
|
* Significantly reduced CPU load when checking for local and remote changes
|
||||||
@@ -30,6 +78,7 @@ version 1.6.0 (release 2014-04- )
|
|||||||
* Mac OS X: Fix UI inconsistencies on Mavericks
|
* Mac OS X: Fix UI inconsistencies on Mavericks
|
||||||
* Shibboleth: Warn if authenticating with a different user
|
* Shibboleth: Warn if authenticating with a different user
|
||||||
* Remove vio abstraction in csync
|
* Remove vio abstraction in csync
|
||||||
|
* Avoid data loss when a client file system is not case sensitive
|
||||||
|
|
||||||
version 1.5.3 (release 2014-03-10 )
|
version 1.5.3 (release 2014-03-10 )
|
||||||
* Fix usage of proxies after first sync run (#1502, #1524, #1459, #1521)
|
* Fix usage of proxies after first sync run (#1502, #1524, #1459, #1521)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
set( MIRALL_VERSION_MAJOR 1 )
|
set( MIRALL_VERSION_MAJOR 1 )
|
||||||
set( MIRALL_VERSION_MINOR 6 )
|
set( MIRALL_VERSION_MINOR 6 )
|
||||||
set( MIRALL_VERSION_PATCH 0 )
|
set( MIRALL_VERSION_PATCH 3 )
|
||||||
set( MIRALL_SOVERSION 0 )
|
set( MIRALL_SOVERSION 0 )
|
||||||
|
|
||||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||||
set( MIRALL_VERSION_SUFFIX "beta2" ) #e.g. beta1, beta2, rc1
|
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
|
||||||
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||||
|
|
||||||
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "
|
|||||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Βρέθηκε η(οι) διεργασία(ες) ${APPLICATION_EXECUTABLE} η(οι) οποία(ες) θα πρέπει να τερματιστεί(ούν).$\nΘα θέλατε να την(τις) τερματίσει ο βοηθός εγκατάστασης για εσάς;"
|
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Βρέθηκε η(οι) διεργασία(ες) ${APPLICATION_EXECUTABLE} η(οι) οποία(ες) θα πρέπει να τερματιστεί(ούν).$\nΘα θέλατε να την(τις) τερματίσει ο βοηθός εγκατάστασης για εσάς;"
|
||||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Τερματισμός διεργασιών ${APPLICATION_EXECUTABLE}."
|
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Τερματισμός διεργασιών ${APPLICATION_EXECUTABLE}."
|
||||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Δεν βρέθηκε διεργασία για βίαιο τερματισμό!"
|
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Δεν βρέθηκε διεργασία για βίαιο τερματισμό!"
|
||||||
StrCpy $PageReinstall_NEW_Field_1 "Μια παλαιότερη έκδοση της ${APPLICATION_NAME} είναι εγκατεστημένη στο σύστημά σας. Είναι προτεινόμενο να απεγκαταστήσετε την τρέχουσα έκδοση πριν την εγκατάσταση. Επιλέξτε τη διαδικασία που επιθυμείτε να πραγματοποιείσετε και πατήστε Επόμενο για να συνεχίσετε."
|
StrCpy $PageReinstall_NEW_Field_1 "Μια παλαιότερη έκδοση της ${APPLICATION_NAME} είναι εγκατεστημένη στο σύστημά σας. Είναι προτεινόμενο να απεγκαταστήσετε την τρέχουσα έκδοση πριν την εγκατάσταση. Επιλέξτε τη διαδικασία που επιθυμείτε να εκτελέσετε και πατήστε Επόμενο για να συνεχίσετε."
|
||||||
StrCpy $PageReinstall_NEW_Field_2 "Απεγκατάσταση πριν την εγκατάσταση"
|
StrCpy $PageReinstall_NEW_Field_2 "Απεγκατάσταση πριν την εγκατάσταση"
|
||||||
StrCpy $PageReinstall_NEW_Field_3 "Να μην απεγκατασταθεί"
|
StrCpy $PageReinstall_NEW_Field_3 "Να μην απεγκατασταθεί"
|
||||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Ήδη εγκατεστημένο"
|
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Ήδη εγκατεστημένη"
|
||||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Επιλέξτε πώς θέλετε να εγκαταστήσετε την ${APPLICATION_NAME}."
|
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Επιλέξτε πώς θέλετε να εγκαταστήσετε την ${APPLICATION_NAME}."
|
||||||
StrCpy $PageReinstall_OLD_Field_1 "Μια νεώτερη έκδοση της ${APPLICATION_NAME} είναι ήδη εγκατεστημένη! Δεν συνίσταται να εγκαταστείσετε μια παλαιότερη έκδοση. Εάν θέλετε πραγματικά να εγκαταστήσετε αυτή την παλαιότερη έκδοση, είναι καλύτερο να απεγκαταστήσετε την τρέχουσα έκδοση πρώτα. Επιλέξτε τη διαδικασία που επιθυμείτε να πραγματοποιείσετε και επιλέξτε Επόμενο για να συνεχίσετε."
|
StrCpy $PageReinstall_OLD_Field_1 "Μια νεώτερη έκδοση της ${APPLICATION_NAME} είναι ήδη εγκατεστημένη! Δεν συνίσταται να εγκαταστείσετε μια παλαιότερη έκδοση. Εάν θέλετε πραγματικά να εγκαταστήσετε αυτήν την παλαιότερη έκδοση, είναι καλύτερο να απεγκαταστήσετε την τρέχουσα έκδοση πρώτα. Επιλέξτε τη διαδικασία που επιθυμείτε να εκτελέσετε και επιλέξτε Επόμενο για να συνεχίσετε."
|
||||||
StrCpy $PageReinstall_SAME_Field_1 "Η ${APPLICATION_NAME} ${VERSION} είναι ήδη εγκατεστημένη.\n\nΕπιλέξτε τη διαδικασία που επιθυμείτε να πραγματοποιείσετε και επιλέξτε Επόμενο για να συνεχίσετε."
|
StrCpy $PageReinstall_SAME_Field_1 "Η ${APPLICATION_NAME} ${VERSION} είναι ήδη εγκατεστημένη.\n\nΕπιλέξτε τη διαδικασία που επιθυμείτε να εκτελέσετε και επιλέξτε Επόμενο για να συνεχίσετε."
|
||||||
StrCpy $PageReinstall_SAME_Field_2 "Προσθήκη/ Επανεγκατάσταση συνιστωσών"
|
StrCpy $PageReinstall_SAME_Field_2 "Προσθήκη/ Επανεγκατάσταση συνιστωσών"
|
||||||
StrCpy $PageReinstall_SAME_Field_3 "Απεγκατάσταση ${APPLICATION_NAME}"
|
StrCpy $PageReinstall_SAME_Field_3 "Απεγκατάσταση ${APPLICATION_NAME}"
|
||||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Απεγκατάσταση ${APPLICATION_NAME}"
|
StrCpy $UNINSTALLER_APPDATA_TITLE "Απεγκατάσταση ${APPLICATION_NAME}"
|
||||||
@@ -23,16 +23,16 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "
|
|||||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Δημιουργία Συντόμευσης Ταχείας Εκκίνησης"
|
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Δημιουργία Συντόμευσης Ταχείας Εκκίνησης"
|
||||||
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "Βάση ${APPLICATION_NAME}."
|
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "Βάση ${APPLICATION_NAME}."
|
||||||
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Συντόμευση ${APPLICATION_NAME}."
|
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Συντόμευση ${APPLICATION_NAME}."
|
||||||
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Συντόμευση στην επιφάνεια εργασίας της "
|
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Συντόμευση επιφάνειας εργασίας της ${APPLICATION_NAME}."
|
||||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Συντόμευση Ταχείας Εκκίνησης της "
|
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Συντόμευση Ταχείας Εκκίνησης της ${APPLICATION_NAME}."
|
||||||
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Αφαίρεση του φακέλου δεδομένων της ${APPLICATION_NAME} από τον υπολογιστή σας"
|
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Αφαίρεση του φακέλου δεδομένων της ${APPLICATION_NAME} από τον υπολογιστή σας."
|
||||||
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Θέλετε να αφαιρέσετε τον φάκελο δεδομένων της ${APPLICATION_NAME};"
|
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Θέλετε να αφαιρέσετε τον φάκελο δεδομένων της ${APPLICATION_NAME};"
|
||||||
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Αφήστε κενό για να διατηρήσετε τον φάκελο δεδομένων για μελλοντική χρήση ή επιλέξτε για να διγράψετε το φάκελο δεδομένων."
|
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Αφήστε κενό για να διατηρήσετε τον φάκελο δεδομένων για μελλοντική χρήση ή επιλέξτε για να διγράψετε το φάκελο δεδομένων."
|
||||||
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Να διαγραφεί ο φάκελος δεδομένων."
|
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Ναι, διαγραφή αυτού του φακέλου δεδομένων."
|
||||||
StrCpy $UNINSTALLER_FILE_Detail "Εγγραφή Εφαρμογής Απεγκατάστασης"
|
StrCpy $UNINSTALLER_FILE_Detail "Εγγραφή Εφαρμογής Απεγκατάστασης"
|
||||||
StrCpy $UNINSTALLER_REGISTRY_Detail "Εγγραφή Κλειδιών μητρώου (Registry) της Εφαρμογής Εγκατάστασης"
|
StrCpy $UNINSTALLER_REGISTRY_Detail "Εγγραφή Κλειδιών μητρώου (Registry) της Εφαρμογής Εγκατάστασης"
|
||||||
StrCpy $UNINSTALLER_FINISHED_Detail "Ολοκλήρωση"
|
StrCpy $UNINSTALLER_FINISHED_Detail "Ολοκληρώθηκε"
|
||||||
StrCpy $UNINSTALL_MESSAGEBOX "Φαίνεται πως η ${APPLICATION_NAME} είναι εγκατεστημένη στον κατάλογο '$INSTDIR'.$\n$\nΣυνέχιση παρ' όλα αυτά (δεν συνίσταται);"
|
StrCpy $UNINSTALL_MESSAGEBOX "Δεν φαίνεται να είναι εγκατεστημένηη η ${APPLICATION_NAME} στον κατάλογο '$INSTDIR'.$\n$\nΣυνέχιση παρ' όλα αυτά (δεν συνίσταται);"
|
||||||
StrCpy $UNINSTALL_ABORT "Η απεγκατάσταση ματαιώθηκε από το χρήστη"
|
StrCpy $UNINSTALL_ABORT "Η απεγκατάσταση ματαιώθηκε από το χρήστη"
|
||||||
StrCpy $INIT_NO_QUICK_LAUNCH "Συντόμευση Ταχείας Εκκίνησης (Μ/Δ)"
|
StrCpy $INIT_NO_QUICK_LAUNCH "Συντόμευση Ταχείας Εκκίνησης (Μ/Δ)"
|
||||||
StrCpy $INIT_NO_DESKTOP "Συντόμευση Επιφάνειας Εργασίας (αντικαθιστά υπάρχουσα)"
|
StrCpy $INIT_NO_DESKTOP "Συντόμευση Επιφάνειας Εργασίας (αντικαθιστά υπάρχουσα)"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "Kald
|
|||||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Zaten Yüklü"
|
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Zaten Yüklü"
|
||||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "${APPLICATION_NAME} uygulamasını nasıl yüklemek istediğinizi seçin."
|
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "${APPLICATION_NAME} uygulamasını nasıl yüklemek istediğinizi seçin."
|
||||||
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} uygulamasının daha yeni sürümü zaten yüklü! Daha eski bir sürümünü yüklemeniz önerilmez. Gerçekten bu eski sürümü yüklemek isterseniz, ilk olarak geçerli sürümü kaldırmanız tavsiye edilir. Yapmak istediğiniz işlemi seçin ve devam etmek üzere İleri tıklayın."
|
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} uygulamasının daha yeni sürümü zaten yüklü! Daha eski bir sürümünü yüklemeniz önerilmez. Gerçekten bu eski sürümü yüklemek isterseniz, ilk olarak geçerli sürümü kaldırmanız tavsiye edilir. Yapmak istediğiniz işlemi seçin ve devam etmek üzere İleri tıklayın."
|
||||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} zaten yüklü.\nYapmak istediğiniz işlemi seçin ve devam etmek için İleri tıklayın."
|
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} zaten yüklü.\n\nYapmak istediğiniz işlemi seçin ve devam etmek için İleri tıklayın."
|
||||||
StrCpy $PageReinstall_SAME_Field_2 "Bileşenleri ekle/yeniden yükle"
|
StrCpy $PageReinstall_SAME_Field_2 "Bileşenleri ekle/yeniden yükle"
|
||||||
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} uygulamasını kaldır"
|
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} uygulamasını kaldır"
|
||||||
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} uygulamasını kaldır"
|
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} uygulamasını kaldır"
|
||||||
|
|||||||
@@ -111,8 +111,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|||||||
!define MUI_HEADERIMAGE
|
!define MUI_HEADERIMAGE
|
||||||
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
!define MUI_FINISHPAGE_LINK "www.${APPLICATION_DOMAIN}"
|
!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
@@ -151,6 +151,12 @@ UninstPage custom un.UnPageUserAppData un.UnPageUserAppDataLeave
|
|||||||
!include ${source_path}/admin/win/nsi/l10n/languages.nsh
|
!include ${source_path}/admin/win/nsi/l10n/languages.nsh
|
||||||
!include ${source_path}/admin/win/nsi/l10n/declarations.nsh
|
!include ${source_path}/admin/win/nsi/l10n/declarations.nsh
|
||||||
|
|
||||||
|
; Set version strings with english locale
|
||||||
|
VIProductVersion "${VERSION}"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPLICATION_NAME}"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${APPLICATION_VENDOR}"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
||||||
|
|
||||||
!macro SETLANG un
|
!macro SETLANG un
|
||||||
Function ${un}SetLang
|
Function ${un}SetLang
|
||||||
# load the selected language file
|
# load the selected language file
|
||||||
@@ -407,15 +413,14 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
|||||||
File "${QT_DLL_PATH}\Qt5Xml.dll"
|
File "${QT_DLL_PATH}\Qt5Xml.dll"
|
||||||
|
|
||||||
;Qt deps
|
;Qt deps
|
||||||
File "${MING_BIN}\libpng15-15.dll"
|
File "${MING_BIN}\libpng16-16.dll"
|
||||||
File "${MING_BIN}\icudata51.dll"
|
File "${MING_BIN}\icudata53.dll"
|
||||||
File "${MING_BIN}\icui18n51.dll"
|
File "${MING_BIN}\icui18n53.dll"
|
||||||
File "${MING_BIN}\icuuc51.dll"
|
File "${MING_BIN}\icuuc53.dll"
|
||||||
File "${MING_BIN}\libEGL.dll"
|
File "${MING_BIN}\libEGL.dll"
|
||||||
File "${MING_BIN}\libGLESv2.dll"
|
File "${MING_BIN}\libGLESv2.dll"
|
||||||
File "${MING_BIN}\libjpeg-8.dll"
|
File "${MING_BIN}\libjpeg-8.dll"
|
||||||
File "${MING_BIN}\libpcre16-0.dll"
|
File "${MING_BIN}\libpcre16-0.dll"
|
||||||
File "${MING_BIN}\libpng15-15.dll"
|
|
||||||
File "${MING_BIN}\libproxy.dll"
|
File "${MING_BIN}\libproxy.dll"
|
||||||
File "${MING_BIN}\libqt5keychain.dll"
|
File "${MING_BIN}\libqt5keychain.dll"
|
||||||
File "${MING_BIN}\libsqlite3-0.dll"
|
File "${MING_BIN}\libsqlite3-0.dll"
|
||||||
@@ -442,6 +447,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
|||||||
;MinGW stuff
|
;MinGW stuff
|
||||||
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
|
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
|
||||||
File "${MING_BIN}\libstdc++-6.dll"
|
File "${MING_BIN}\libstdc++-6.dll"
|
||||||
|
File "${MING_BIN}\libwinpthread-1.dll"
|
||||||
|
|
||||||
; CSync configs
|
; CSync configs
|
||||||
File "${SOURCE_PATH}/sync-exclude.lst"
|
File "${SOURCE_PATH}/sync-exclude.lst"
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#cmakedefine HAVE_UTIMES 1
|
#cmakedefine HAVE_UTIMES 1
|
||||||
#cmakedefine HAVE_LSTAT 1
|
#cmakedefine HAVE_LSTAT 1
|
||||||
#cmakedefine HAVE_FNMATCH 1
|
#cmakedefine HAVE_FNMATCH 1
|
||||||
#cmakedefine HAVE___MINGW_ASPRINTF 1
|
|
||||||
#cmakedefine HAVE_ICONV 1
|
#cmakedefine HAVE_ICONV 1
|
||||||
#cmakedefine HAVE_ICONV_CONST 1
|
#cmakedefine HAVE_ICONV_CONST 1
|
||||||
|
|
||||||
@@ -31,5 +30,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#cmakedefine HAVE___MINGW_ASPRINTF 1
|
#cmakedefine HAVE___MINGW_ASPRINTF 1
|
||||||
|
#cmakedefine HAVE_ASPRINTF 1
|
||||||
|
|
||||||
#cmakedefine WITH_UNIT_TESTING 1
|
#cmakedefine WITH_UNIT_TESTING 1
|
||||||
|
|||||||
@@ -191,15 +191,12 @@ int csync_init(CSYNC *ctx) {
|
|||||||
ctx->local.type = LOCAL_REPLICA;
|
ctx->local.type = LOCAL_REPLICA;
|
||||||
|
|
||||||
if ( !ctx->options.local_only_mode) {
|
if ( !ctx->options.local_only_mode) {
|
||||||
owncloud_init(csync_get_auth_callback(ctx), csync_get_userdata(ctx));
|
owncloud_init(csync_get_userdata(ctx));
|
||||||
ctx->remote.type = REMOTE_REPLICA;
|
ctx->remote.type = REMOTE_REPLICA;
|
||||||
} else {
|
} else {
|
||||||
ctx->remote.type = LOCAL_REPLICA;
|
ctx->remote.type = LOCAL_REPLICA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->options.timeout)
|
|
||||||
csync_vio_set_property(ctx, "timeout", &ctx->options.timeout);
|
|
||||||
|
|
||||||
if (c_rbtree_create(&ctx->local.tree, _key_cmp, _data_cmp) < 0) {
|
if (c_rbtree_create(&ctx->local.tree, _key_cmp, _data_cmp) < 0) {
|
||||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
||||||
rc = -1;
|
rc = -1;
|
||||||
@@ -280,11 +277,6 @@ int csync_update(CSYNC *ctx) {
|
|||||||
c_secdiff(finish, start), c_rbtree_size(ctx->local.tree));
|
c_secdiff(finish, start), c_rbtree_size(ctx->local.tree));
|
||||||
csync_memstat_check();
|
csync_memstat_check();
|
||||||
|
|
||||||
if (rc < 0) {
|
|
||||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* update detection for remote replica */
|
/* update detection for remote replica */
|
||||||
if( ! ctx->options.local_only_mode ) {
|
if( ! ctx->options.local_only_mode ) {
|
||||||
csync_gettime(&start);
|
csync_gettime(&start);
|
||||||
@@ -447,6 +439,7 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
|
|||||||
trav.rename_path = cur->destpath;
|
trav.rename_path = cur->destpath;
|
||||||
trav.etag = cur->etag;
|
trav.etag = cur->etag;
|
||||||
trav.file_id = cur->file_id;
|
trav.file_id = cur->file_id;
|
||||||
|
trav.inode = cur->inode;
|
||||||
|
|
||||||
trav.error_status = cur->error_status;
|
trav.error_status = cur->error_status;
|
||||||
trav.should_update_etag = cur->should_update_etag;
|
trav.should_update_etag = cur->should_update_etag;
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ enum csync_notify_type_e {
|
|||||||
struct csync_tree_walk_file_s {
|
struct csync_tree_walk_file_s {
|
||||||
const char *path;
|
const char *path;
|
||||||
int64_t size;
|
int64_t size;
|
||||||
|
int64_t inode;
|
||||||
time_t modtime;
|
time_t modtime;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
uint32_t uid;
|
uint32_t uid;
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
|
|||||||
|
|
||||||
type = CSYNC_FILE_EXCLUDE_LIST;
|
type = CSYNC_FILE_EXCLUDE_LIST;
|
||||||
if (strlen(pattern) < 1) {
|
if (strlen(pattern) < 1) {
|
||||||
|
SAFE_FREE(pattern_stored);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Ecludes starting with ']' means it can be cleanup */
|
/* Ecludes starting with ']' means it can be cleanup */
|
||||||
@@ -264,6 +265,9 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
|
|||||||
|
|
||||||
if (bname == NULL || dname == NULL) {
|
if (bname == NULL || dname == NULL) {
|
||||||
match = CSYNC_NOT_EXCLUDED;
|
match = CSYNC_NOT_EXCLUDED;
|
||||||
|
SAFE_FREE(bname);
|
||||||
|
SAFE_FREE(dname);
|
||||||
|
SAFE_FREE(pattern_stored);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ struct dav_session_s dav_session; /* The DAV Session, initialised in dav_connect
|
|||||||
int _connected = 0; /* flag to indicate if a connection exists, ie.
|
int _connected = 0; /* flag to indicate if a connection exists, ie.
|
||||||
the dav_session is valid */
|
the dav_session is valid */
|
||||||
|
|
||||||
csync_auth_callback _authcb;
|
|
||||||
void *_userdata;
|
void *_userdata;
|
||||||
long long chunked_total_size = 0;
|
long long chunked_total_size = 0;
|
||||||
long long chunked_done = 0;
|
long long chunked_done = 0;
|
||||||
@@ -123,6 +123,7 @@ static int verify_sslcert(void *userdata, int failures,
|
|||||||
char buf[MAX(NE_SSL_DIGESTLEN, NE_ABUFSIZ)];
|
char buf[MAX(NE_SSL_DIGESTLEN, NE_ABUFSIZ)];
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
const ne_ssl_certificate *cert = certificate;
|
const ne_ssl_certificate *cert = certificate;
|
||||||
|
csync_auth_callback authcb = NULL;
|
||||||
|
|
||||||
(void) userdata;
|
(void) userdata;
|
||||||
memset( problem, 0, LEN );
|
memset( problem, 0, LEN );
|
||||||
@@ -160,11 +161,14 @@ static int verify_sslcert(void *userdata, int failures,
|
|||||||
}
|
}
|
||||||
addSSLWarning( problem, "Do you want to accept the certificate chain anyway?\nAnswer yes to do so and take the risk: ", LEN );
|
addSSLWarning( problem, "Do you want to accept the certificate chain anyway?\nAnswer yes to do so and take the risk: ", LEN );
|
||||||
|
|
||||||
if( _authcb ){
|
if( dav_session.csync_ctx ) {
|
||||||
|
authcb = csync_get_auth_callback( dav_session.csync_ctx );
|
||||||
|
}
|
||||||
|
if( authcb ){
|
||||||
/* call the csync callback */
|
/* call the csync callback */
|
||||||
DEBUG_WEBDAV("Call the csync callback for SSL problems");
|
DEBUG_WEBDAV("Call the csync callback for SSL problems");
|
||||||
memset( buf, 0, NE_ABUFSIZ );
|
memset( buf, 0, NE_ABUFSIZ );
|
||||||
(*_authcb) ( problem, buf, NE_ABUFSIZ-1, 1, 0, _userdata );
|
(*authcb) ( problem, buf, NE_ABUFSIZ-1, 1, 0, _userdata );
|
||||||
if( buf[0] == 'y' || buf[0] == 'Y') {
|
if( buf[0] == 'y' || buf[0] == 'Y') {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -184,6 +188,8 @@ static int ne_auth( void *userdata, const char *realm, int attempt,
|
|||||||
char *username, char *password)
|
char *username, char *password)
|
||||||
{
|
{
|
||||||
char buf[NE_ABUFSIZ];
|
char buf[NE_ABUFSIZ];
|
||||||
|
csync_auth_callback authcb = NULL;
|
||||||
|
int re = attempt;
|
||||||
|
|
||||||
(void) userdata;
|
(void) userdata;
|
||||||
(void) realm;
|
(void) realm;
|
||||||
@@ -199,24 +205,29 @@ static int ne_auth( void *userdata, const char *realm, int attempt,
|
|||||||
if( dav_session.pwd && strlen( dav_session.pwd ) < NE_ABUFSIZ ) {
|
if( dav_session.pwd && strlen( dav_session.pwd ) < NE_ABUFSIZ ) {
|
||||||
strcpy( password, dav_session.pwd );
|
strcpy( password, dav_session.pwd );
|
||||||
}
|
}
|
||||||
} else if( _authcb != NULL ){
|
|
||||||
/* call the csync callback */
|
|
||||||
DEBUG_WEBDAV("Call the csync callback for %s", realm );
|
|
||||||
memset( buf, 0, NE_ABUFSIZ );
|
|
||||||
(*_authcb) ("Enter your username: ", buf, NE_ABUFSIZ-1, 1, 0, _userdata );
|
|
||||||
if( strlen(buf) < NE_ABUFSIZ ) {
|
|
||||||
strcpy( username, buf );
|
|
||||||
}
|
|
||||||
memset( buf, 0, NE_ABUFSIZ );
|
|
||||||
(*_authcb) ("Enter your password: ", buf, NE_ABUFSIZ-1, 0, 0, _userdata );
|
|
||||||
if( strlen(buf) < NE_ABUFSIZ) {
|
|
||||||
strcpy( password, buf );
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_WEBDAV("I can not authenticate!");
|
if( dav_session.csync_ctx ) {
|
||||||
|
authcb = csync_get_auth_callback( dav_session.csync_ctx );
|
||||||
|
}
|
||||||
|
if( authcb != NULL ){
|
||||||
|
/* call the csync callback */
|
||||||
|
DEBUG_WEBDAV("Call the csync callback for %s", realm );
|
||||||
|
memset( buf, 0, NE_ABUFSIZ );
|
||||||
|
(*authcb) ("Enter your username: ", buf, NE_ABUFSIZ-1, 1, 0, _userdata );
|
||||||
|
if( strlen(buf) < NE_ABUFSIZ ) {
|
||||||
|
strcpy( username, buf );
|
||||||
|
}
|
||||||
|
memset( buf, 0, NE_ABUFSIZ );
|
||||||
|
(*authcb) ("Enter your password: ", buf, NE_ABUFSIZ-1, 0, 0, _userdata );
|
||||||
|
if( strlen(buf) < NE_ABUFSIZ) {
|
||||||
|
strcpy( password, buf );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
re = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return attempt;
|
return re;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -508,10 +519,10 @@ static int dav_connect(const char *base_url) {
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dav_session.read_timeout == 0)
|
if (dav_session.read_timeout != 0) {
|
||||||
dav_session.read_timeout = 300; // set 300 seconds as default.
|
ne_set_read_timeout(dav_session.ctx, dav_session.read_timeout);
|
||||||
|
DEBUG_WEBDAV("Timeout set to %u seconds", dav_session.read_timeout );
|
||||||
ne_set_read_timeout(dav_session.ctx, dav_session.read_timeout);
|
}
|
||||||
|
|
||||||
snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) csyncoC/%s",
|
snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) csyncoC/%s",
|
||||||
get_platform(), CSYNC_STRINGIFY( LIBCSYNC_VERSION ));
|
get_platform(), CSYNC_STRINGIFY( LIBCSYNC_VERSION ));
|
||||||
@@ -685,7 +696,7 @@ static struct listdir_context *fetch_resource_list(const char *uri, int depth)
|
|||||||
ret = NE_CONNECT;
|
ret = NE_CONNECT;
|
||||||
set_error_message(req_status->reason_phrase);
|
set_error_message(req_status->reason_phrase);
|
||||||
}
|
}
|
||||||
DEBUG_WEBDAV("Simple propfind result code %d.", req_status->code);
|
DEBUG_WEBDAV("Simple propfind result code %d.", req_status ? req_status->code : -1);
|
||||||
} else {
|
} else {
|
||||||
if( ret == NE_ERROR && req_status->code == 404) {
|
if( ret == NE_ERROR && req_status->code == 404) {
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
@@ -982,8 +993,10 @@ int owncloud_commit(void) {
|
|||||||
|
|
||||||
clean_caches();
|
clean_caches();
|
||||||
|
|
||||||
if( dav_session.ctx )
|
if( dav_session.ctx ) {
|
||||||
ne_session_destroy( dav_session.ctx );
|
ne_forget_auth(dav_session.ctx);
|
||||||
|
ne_session_destroy( dav_session.ctx );
|
||||||
|
}
|
||||||
/* DEBUG_WEBDAV( "********** vio_module_shutdown" ); */
|
/* DEBUG_WEBDAV( "********** vio_module_shutdown" ); */
|
||||||
|
|
||||||
dav_session.ctx = 0;
|
dav_session.ctx = 0;
|
||||||
@@ -1047,10 +1060,9 @@ int owncloud_set_property(const char *key, void *data) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void owncloud_init(csync_auth_callback cb, void *userdata) {
|
void owncloud_init(void *userdata) {
|
||||||
|
|
||||||
_userdata = userdata;
|
_userdata = userdata;
|
||||||
_authcb = cb;
|
|
||||||
_connected = 0; /* triggers dav_connect to go through the whole neon setup */
|
_connected = 0; /* triggers dav_connect to go through the whole neon setup */
|
||||||
|
|
||||||
memset(&dav_session, 0, sizeof(dav_session));
|
memset(&dav_session, 0, sizeof(dav_session));
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ int owncloud_closedir(csync_vio_handle_t *dhandle);
|
|||||||
int owncloud_stat(const char *uri, csync_vio_file_stat_t *buf);
|
int owncloud_stat(const char *uri, csync_vio_file_stat_t *buf);
|
||||||
int owncloud_commit(void);
|
int owncloud_commit(void);
|
||||||
char *owncloud_error_string(void);
|
char *owncloud_error_string(void);
|
||||||
void owncloud_init(csync_auth_callback cb, void *userdata);
|
void owncloud_init(void *userdata);
|
||||||
int owncloud_set_property(const char *key, void *data);
|
int owncloud_set_property(const char *key, void *data);
|
||||||
|
|
||||||
#endif /* CSYNC_OWNCLOUD_H */
|
#endif /* CSYNC_OWNCLOUD_H */
|
||||||
|
|||||||
@@ -236,13 +236,12 @@ static void propfind_results_recursive(void *userdata,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* DEBUG_WEBDAV("results_recursive Added child %s to collection %s", newres->uri, element->self->uri); */
|
/* DEBUG_WEBDAV("results_recursive Added child %s to collection %s", newres->uri, element->self->uri); */
|
||||||
} else {
|
return;
|
||||||
/* DEBUG_WEBDAV("results_recursive No parent %s found for child %s", parentPath, newres->uri); */
|
|
||||||
resource_free(newres);
|
|
||||||
newres = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource_free(newres);
|
||||||
|
newres = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fetch_resource_list_recursive(const char *uri, const char *curi)
|
void fetch_resource_list_recursive(const char *uri, const char *curi)
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||||||
if( !c_streq(cur->file_id, "") ) {
|
if( !c_streq(cur->file_id, "") ) {
|
||||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||||
}
|
}
|
||||||
|
other->inode = cur->inode;
|
||||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||||
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
|
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
|
||||||
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||||
@@ -191,7 +192,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||||||
if( !c_streq(cur->file_id, "") ) {
|
if( !c_streq(cur->file_id, "") ) {
|
||||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||||
}
|
}
|
||||||
|
other->inode = cur->inode;
|
||||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||||
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
|
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
|
||||||
@@ -237,8 +238,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||||||
/* file on other replica is changed or new */
|
/* file on other replica is changed or new */
|
||||||
case CSYNC_INSTRUCTION_NEW:
|
case CSYNC_INSTRUCTION_NEW:
|
||||||
case CSYNC_INSTRUCTION_EVAL:
|
case CSYNC_INSTRUCTION_EVAL:
|
||||||
if (other->type == CSYNC_VIO_FILE_TYPE_DIRECTORY &&
|
if (other->type == CSYNC_FTW_TYPE_DIR &&
|
||||||
cur->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) {
|
cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||||
is_equal_files = (other->modtime == cur->modtime);
|
is_equal_files = (other->modtime == cur->modtime);
|
||||||
} else {
|
} else {
|
||||||
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
|
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
|
||||||
@@ -248,8 +249,12 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
|||||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||||
|
|
||||||
if( !cur->etag && other->etag ) cur->etag = c_strdup(other->etag);
|
/* update DB with new etag from remote */
|
||||||
cur->should_update_etag = true; /* update DB */
|
if (ctx->current == LOCAL_REPLICA) {
|
||||||
|
other->should_update_etag = true;
|
||||||
|
} else {
|
||||||
|
cur->should_update_etag = true;
|
||||||
|
}
|
||||||
} else if(ctx->current == REMOTE_REPLICA) {
|
} else if(ctx->current == REMOTE_REPLICA) {
|
||||||
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
|
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
|
||||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "c_lib.h"
|
#include "c_lib.h"
|
||||||
#include "csync_private.h"
|
#include "csync_private.h"
|
||||||
@@ -68,12 +69,11 @@ static void _csync_win32_hide_file( const char *file ) {
|
|||||||
fileName = c_utf8_to_locale( file );
|
fileName = c_utf8_to_locale( file );
|
||||||
dwAttrs = GetFileAttributesW(fileName);
|
dwAttrs = GetFileAttributesW(fileName);
|
||||||
|
|
||||||
if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
|
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
|
||||||
|
if (!(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
||||||
if (!(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
|
||||||
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c_free_locale_string(fileName);
|
c_free_locale_string(fileName);
|
||||||
#else
|
#else
|
||||||
(void) file;
|
(void) file;
|
||||||
@@ -155,6 +155,8 @@ static int _csync_statedb_check(const char *statedb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
/* if it comes here, the database is broken and should be recreated. */
|
/* if it comes here, the database is broken and should be recreated. */
|
||||||
_tunlink(wstatedb);
|
_tunlink(wstatedb);
|
||||||
@@ -529,7 +531,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
|
|||||||
if( rc != SQLITE_DONE ) {
|
if( rc != SQLITE_DONE ) {
|
||||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
||||||
} else {
|
} else {
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "%ld entries read below path %s from db.", cnt, path);
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "%" PRId64 " entries read below path %s from db.", cnt, path);
|
||||||
}
|
}
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
SAFE_FREE(likepath);
|
SAFE_FREE(likepath);
|
||||||
|
|||||||
@@ -274,8 +274,13 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
|||||||
} else {
|
} else {
|
||||||
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
|
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
|
||||||
|
|
||||||
|
/* tmp might point to malloc mem, so free it here before reusing tmp */
|
||||||
|
SAFE_FREE(tmp);
|
||||||
|
|
||||||
/* check if it's a file and has been renamed */
|
/* check if it's a file and has been renamed */
|
||||||
if (ctx->current == LOCAL_REPLICA) {
|
if (ctx->current == LOCAL_REPLICA) {
|
||||||
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Checking for rename based on inode # %" PRId64 "", (uint64_t) fs->inode);
|
||||||
|
|
||||||
tmp = csync_statedb_get_stat_by_inode(ctx, fs->inode);
|
tmp = csync_statedb_get_stat_by_inode(ctx, fs->inode);
|
||||||
|
|
||||||
/* translate the file type between the two stat types csync has. */
|
/* translate the file type between the two stat types csync has. */
|
||||||
@@ -476,7 +481,6 @@ static bool fill_tree_from_db(CSYNC *ctx, const char *uri)
|
|||||||
/* File tree walker */
|
/* File tree walker */
|
||||||
int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||||
unsigned int depth) {
|
unsigned int depth) {
|
||||||
char errbuf[256] = {0};
|
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *d_name = NULL;
|
char *d_name = NULL;
|
||||||
csync_vio_handle_t *dh = NULL;
|
csync_vio_handle_t *dh = NULL;
|
||||||
@@ -520,10 +524,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
|||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
C_STRERROR(errno, errbuf, sizeof(errbuf));
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "opendir failed for %s - errno %d", uri, errno);
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR,
|
|
||||||
"opendir failed for %s - %s (errno %d)",
|
|
||||||
uri, errbuf, errno);
|
|
||||||
}
|
}
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -671,7 +672,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->current_fs && (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
|
if (flag == CSYNC_FTW_FLAG_DIR && ctx->current_fs
|
||||||
|
&& (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
|
||||||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW ||
|
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW ||
|
||||||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL_RENAME)) {
|
ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL_RENAME)) {
|
||||||
ctx->current_fs->should_update_etag = true;
|
ctx->current_fs->should_update_etag = true;
|
||||||
|
|||||||
@@ -113,12 +113,12 @@ void csync_win32_set_file_hidden( const char *file, bool h ) {
|
|||||||
fileName = c_utf8_to_locale( file );
|
fileName = c_utf8_to_locale( file );
|
||||||
dwAttrs = GetFileAttributesW(fileName);
|
dwAttrs = GetFileAttributesW(fileName);
|
||||||
|
|
||||||
if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
|
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
|
||||||
|
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
||||||
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
|
||||||
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
|
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
||||||
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
|
||||||
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c_free_locale_string(fileName);
|
c_free_locale_string(fileName);
|
||||||
@@ -182,6 +182,7 @@ csync_vio_file_stat_t *csync_vio_convert_file_stat(csync_file_stat_t *st) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool (*csync_file_locked_or_open_ext) (const char*) = 0; // filled in by library user
|
bool (*csync_file_locked_or_open_ext) (const char*) = 0; // filled in by library user
|
||||||
|
void set_csync_file_locked_or_open_ext(bool (*f) (const char*));
|
||||||
void set_csync_file_locked_or_open_ext(bool (*f) (const char*)) {
|
void set_csync_file_locked_or_open_ext(bool (*f) (const char*)) {
|
||||||
csync_file_locked_or_open_ext = f;
|
csync_file_locked_or_open_ext = f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,9 +204,9 @@ void hbf_free_transfer( hbf_transfer_t *transfer ) {
|
|||||||
|
|
||||||
for( cnt = 0; cnt < transfer->block_cnt; cnt++ ) {
|
for( cnt = 0; cnt < transfer->block_cnt; cnt++ ) {
|
||||||
hbf_block_t *block = transfer->block_arr[cnt];
|
hbf_block_t *block = transfer->block_arr[cnt];
|
||||||
|
if( !block ) continue;
|
||||||
if( block->http_error_msg ) free( block->http_error_msg );
|
if( block->http_error_msg ) free( block->http_error_msg );
|
||||||
if( block->etag ) free( block->etag );
|
if( block->etag ) free( block->etag );
|
||||||
if( block ) free(block);
|
|
||||||
}
|
}
|
||||||
free( transfer->block_arr );
|
free( transfer->block_arr );
|
||||||
free( transfer->url );
|
free( transfer->url );
|
||||||
@@ -536,8 +536,8 @@ Hbf_State hbf_transfer( ne_session *session, hbf_transfer_t *transfer, const cha
|
|||||||
} else {
|
} else {
|
||||||
state = HBF_MEMORY_FAIL;
|
state = HBF_MEMORY_FAIL;
|
||||||
}
|
}
|
||||||
free( transfer_url );
|
|
||||||
}
|
}
|
||||||
|
free( transfer_url );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do the source file validation finally (again). */
|
/* do the source file validation finally (again). */
|
||||||
|
|||||||
@@ -55,9 +55,6 @@
|
|||||||
/** Get the size of an array */
|
/** Get the size of an array */
|
||||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||||
|
|
||||||
/** Macro to make strerror_r work with -Werror=unused-result */
|
|
||||||
#define C_STRERROR(errno, buf, size) if(strerror_r(errno, buf, size)) {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a hack to fix warnings. The idea is to use this everywhere that we
|
* This is a hack to fix warnings. The idea is to use this everywhere that we
|
||||||
* get the "discarding const" warning by the compiler. That doesn't actually
|
* get the "discarding const" warning by the compiler. That doesn't actually
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ int c_utimes(const char *uri, const struct timeval *times) {
|
|||||||
if(!SetFileTime(hFile, NULL, &LastAccessTime, &LastModificationTime)) {
|
if(!SetFileTime(hFile, NULL, &LastAccessTime, &LastModificationTime)) {
|
||||||
//can this happen?
|
//can this happen?
|
||||||
errno=ENOENT;
|
errno=ENOENT;
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
c_free_locale_string(wuri);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,11 +113,6 @@ int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf) {
|
|||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Local stat failed, errno %d", errno);
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Local stat failed, errno %d", errno);
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
|
||||||
else {
|
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Win32: STAT-inode for %s: %llu", uri, buf->inode );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -240,6 +240,9 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
|
|||||||
/* printf("Index: %I64i\n", FileIndex.QuadPart); */
|
/* printf("Index: %I64i\n", FileIndex.QuadPart); */
|
||||||
buf->inode = FileIndex.QuadPart;
|
buf->inode = FileIndex.QuadPart;
|
||||||
|
|
||||||
|
buf->size = (fileInfo.nFileSizeHigh * (int64_t)(MAXDWORD+1)) + fileInfo.nFileSizeLow;
|
||||||
|
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_SIZE;
|
||||||
|
|
||||||
/* Get the file time with a win32 call rather than through stat. See
|
/* Get the file time with a win32 call rather than through stat. See
|
||||||
* http://www.codeproject.com/Articles/1144/Beating-the-Daylight-Savings-Time-bug-and-getting
|
* http://www.codeproject.com/Articles/1144/Beating-the-Daylight-Savings-Time-bug-and-getting
|
||||||
* for deeper explanation.
|
* for deeper explanation.
|
||||||
@@ -257,6 +260,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
|
|||||||
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_CTIME;
|
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_CTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c_free_locale_string(wuri);
|
||||||
CloseHandle(h);
|
CloseHandle(h);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -243,19 +243,6 @@ static void check_csync_statedb_get_stat_by_hash_not_found(void **state)
|
|||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_csync_statedb_get_stat_by_inode(void **state)
|
|
||||||
{
|
|
||||||
CSYNC *csync = *state;
|
|
||||||
csync_file_stat_t *tmp;
|
|
||||||
|
|
||||||
tmp = csync_statedb_get_stat_by_inode(csync, (ino_t) 23);
|
|
||||||
assert_non_null(tmp);
|
|
||||||
|
|
||||||
assert_int_equal(tmp->phash, 42);
|
|
||||||
assert_int_equal(tmp->inode, 23);
|
|
||||||
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void check_csync_statedb_get_stat_by_inode_not_found(void **state)
|
static void check_csync_statedb_get_stat_by_inode_not_found(void **state)
|
||||||
{
|
{
|
||||||
@@ -272,14 +259,10 @@ int torture_run_tests(void)
|
|||||||
unit_test_setup_teardown(check_csync_statedb_query_statement, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_query_statement, setup, teardown),
|
||||||
unit_test_setup_teardown(check_csync_statedb_create_error, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_create_error, setup, teardown),
|
||||||
unit_test_setup_teardown(check_csync_statedb_insert_statement, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_insert_statement, setup, teardown),
|
||||||
/* unit_test_setup_teardown(check_csync_statedb_is_empty, setup, teardown), */
|
|
||||||
/* unit_test_setup_teardown(check_csync_statedb_create_tables, setup, teardown), */
|
|
||||||
unit_test_setup_teardown(check_csync_statedb_drop_tables, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_drop_tables, setup, teardown),
|
||||||
unit_test_setup_teardown(check_csync_statedb_insert_metadata, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_insert_metadata, setup, teardown),
|
||||||
unit_test_setup_teardown(check_csync_statedb_write, setup, teardown),
|
unit_test_setup_teardown(check_csync_statedb_write, setup, teardown),
|
||||||
/* unit_test_setup_teardown(check_csync_statedb_get_stat_by_hash, setup_db, teardown), */
|
|
||||||
unit_test_setup_teardown(check_csync_statedb_get_stat_by_hash_not_found, setup_db, teardown),
|
unit_test_setup_teardown(check_csync_statedb_get_stat_by_hash_not_found, setup_db, teardown),
|
||||||
/* unit_test_setup_teardown(check_csync_statedb_get_stat_by_inode, setup_db, teardown), */
|
|
||||||
unit_test_setup_teardown(check_csync_statedb_get_stat_by_inode_not_found, setup_db, teardown),
|
unit_test_setup_teardown(check_csync_statedb_get_stat_by_inode_not_found, setup_db, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ use LWP::UserAgent;
|
|||||||
use LWP::Protocol::https;
|
use LWP::Protocol::https;
|
||||||
use HTTP::Request::Common qw( POST GET DELETE );
|
use HTTP::Request::Common qw( POST GET DELETE );
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
use POSIX qw/strftime/;
|
||||||
|
|
||||||
use Encode qw(from_to);
|
use Encode qw(from_to);
|
||||||
use utf8;
|
use utf8;
|
||||||
@@ -128,8 +129,9 @@ sub initTesting(;$)
|
|||||||
# $d->DebugLevel(3);
|
# $d->DebugLevel(3);
|
||||||
$prefix = "t1" unless( defined $prefix );
|
$prefix = "t1" unless( defined $prefix );
|
||||||
|
|
||||||
my $dirId = sprintf("%#.3o", rand(1000));
|
my $dirId = sprintf("%02d", rand(100));
|
||||||
my $dir = sprintf( "%s-%s/", $prefix, $dirId );
|
my $dateTime = strftime('%Y%m%d%H%M%S',localtime);
|
||||||
|
my $dir = sprintf( "%s-%s-%s/", $prefix, $dateTime, $dirId );
|
||||||
|
|
||||||
$localDir = $dir;
|
$localDir = $dir;
|
||||||
$localDir .= "/" unless( $localDir =~ /\/$/ );
|
$localDir .= "/" unless( $localDir =~ /\/$/ );
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if(SPHINX_FOUND)
|
|||||||
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
|
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
|
||||||
# HTML output directory
|
# HTML output directory
|
||||||
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
|
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
|
||||||
set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man")
|
set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1")
|
||||||
set(SPHINX_PDF_DIR "${CMAKE_CURRENT_BINARY_DIR}/latex")
|
set(SPHINX_PDF_DIR "${CMAKE_CURRENT_BINARY_DIR}/latex")
|
||||||
set(SPHINX_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/qthelp")
|
set(SPHINX_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/qthelp")
|
||||||
set(SPHINX_HTMLHELP_DIR "${CMAKE_CURRENT_BINARY_DIR}/htmlhelp")
|
set(SPHINX_HTMLHELP_DIR "${CMAKE_CURRENT_BINARY_DIR}/htmlhelp")
|
||||||
@@ -12,12 +12,15 @@ if(SPHINX_FOUND)
|
|||||||
# assets
|
# assets
|
||||||
set(LATEX_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/logo-blue.pdf")
|
set(LATEX_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/logo-blue.pdf")
|
||||||
|
|
||||||
|
install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
|
||||||
|
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL)
|
||||||
|
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
|
||||||
|
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
|
||||||
|
|
||||||
if(WITH_DOC)
|
if(WITH_DOC)
|
||||||
add_custom_target(doc ALL DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
add_custom_target(doc ALL DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||||
install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
|
||||||
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR})
|
|
||||||
else(WITH_DOC)
|
else(WITH_DOC)
|
||||||
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||||
endif(WITH_DOC)
|
endif(WITH_DOC)
|
||||||
@@ -39,9 +42,6 @@ if(SPHINX_FOUND)
|
|||||||
add_custom_target(doc-pdf $(MAKE) -C ${SPHINX_PDF_DIR} all-pdf
|
add_custom_target(doc-pdf $(MAKE) -C ${SPHINX_PDF_DIR} all-pdf
|
||||||
DEPENDS doc-latex )
|
DEPENDS doc-latex )
|
||||||
add_dependencies(doc doc-pdf)
|
add_dependencies(doc doc-pdf)
|
||||||
if (WITH_DOC)
|
|
||||||
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
|
||||||
endif (WITH_DOC)
|
|
||||||
endif(PDFLATEX_FOUND)
|
endif(PDFLATEX_FOUND)
|
||||||
if (EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
|
if (EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
|
||||||
add_custom_target( doc-qch-sphinx ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-qch-sphinx ${SPHINX_EXECUTABLE}
|
||||||
@@ -53,9 +53,6 @@ if(SPHINX_FOUND)
|
|||||||
${SPHINX_QCH_DIR}/*.qhcp
|
${SPHINX_QCH_DIR}/*.qhcp
|
||||||
DEPENDS doc-qch-sphinx )
|
DEPENDS doc-qch-sphinx )
|
||||||
add_dependencies(doc doc-qch)
|
add_dependencies(doc doc-qch)
|
||||||
if (WITH_DOC)
|
|
||||||
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
|
||||||
endif (WITH_DOC)
|
|
||||||
endif()
|
endif()
|
||||||
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
|
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
|
||||||
-q -c . -b html
|
-q -c . -b html
|
||||||
|
|||||||
@@ -1,45 +1,42 @@
|
|||||||
Setting up an Account
|
Setting up an Account
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
If no account has been configured, the ownCloud Client will automatically
|
If no account has been configured, the ownCloud Client automatically assist in
|
||||||
assist in connecting to your ownCloud server after the application has been
|
connecting to your ownCloud server after the application has been started.
|
||||||
started.
|
|
||||||
|
|
||||||
As a first step, specify the URL to your Server. This is the same address
|
To set up an account:
|
||||||
that is used in the browser.
|
|
||||||
|
1. Specify the URL to your Server. This is the same address that is used in the browser.
|
||||||
|
|
||||||
.. image:: images/wizard_url.png
|
.. image:: images/wizard_url.png
|
||||||
:scale: 50 %
|
:scale: 50 %
|
||||||
|
|
||||||
.. note:: Make sure to use ``https://`` if the server supports it. Otherwise,
|
.. note:: Make sure to use ``https://`` if the server supports it. Otherwise,
|
||||||
your password and all data will be transferred to the server unencrypted.
|
your password and all data will be transferred to the server unencrypted. This
|
||||||
This makes it easy for third parties to intercept your communication, and
|
makes it easy for third parties to intercept your communication, and getting
|
||||||
getting hold of your password!
|
hold of your password!
|
||||||
|
|
||||||
Next, enter the username and password. These are the same credentials used
|
2. Enter the username and password. These are the same credentials used to log into the web interface.
|
||||||
to log into the web interface.
|
|
||||||
|
|
||||||
.. image:: images/wizard_user.png
|
.. image:: images/wizard_user.png
|
||||||
:scale: 50 %
|
:scale: 50 %
|
||||||
|
|
||||||
Finally, choose the folder that ownCloud Client is supposed to sync the
|
3. Choose the folder with which you want the ownCloud Client to synchronize the
|
||||||
contents of your ownCloud account with. By default, this is a folder
|
contents of your ownCloud account. By default, this is a folder called
|
||||||
called `ownCloud`, which will be created in the home directory.
|
`ownCloud`. This folder is created in the home directory.
|
||||||
|
|
||||||
.. image:: images/wizard_targetfolder.png
|
.. image:: images/wizard_targetfolder.png
|
||||||
:scale: 50 %
|
:scale: 50 %
|
||||||
|
|
||||||
At this time, the synchronization between the root directories of the
|
The synchronization between the root directories of the ownCloud server begins.
|
||||||
ownCloud server will begin.
|
|
||||||
|
|
||||||
.. image:: images/wizard_overview.png
|
.. image:: images/wizard_overview.png
|
||||||
:scale: 50 %
|
:scale: 50 %
|
||||||
|
|
||||||
If selecting a local folder that already contains data, there are
|
When selecting a local folder that already contains data, you can choose from two options:
|
||||||
two options that exist.
|
|
||||||
|
|
||||||
* Keep local data: If selected, the files in the local folder on the
|
* :guilabel:`Keep local data`: When selected, the files in the local folder on
|
||||||
client will be synced up to the ownCloud server.
|
the client are synchronized to the ownCloud server.
|
||||||
* Start a clean sync: If selected, all files in the local folder on
|
|
||||||
the client will be deleted and therefore not synced to the ownCloud
|
* :guilabel:`Start a clean sync`: When selected, all files in the local folder on the
|
||||||
server.
|
client are deleted. These files are not syncrhonized to the ownCloud server.
|
||||||
|
|||||||
@@ -1,88 +1,96 @@
|
|||||||
Appendix B: Architecture
|
Appendix B: History and Architecture
|
||||||
========================
|
====================================
|
||||||
|
|
||||||
.. index:: architecture
|
.. index:: architecture
|
||||||
|
|
||||||
The ownCloud project provides desktop sync clients to synchronize the
|
ownCloud provides desktop sync clients to synchronize the contents of local
|
||||||
contents of local directories on the desktop machines to the ownCloud.
|
directories from computers, tablets, and handheld devices to the ownCloud
|
||||||
|
server.
|
||||||
|
|
||||||
The syncing is done with csync_, a bidirectional file synchronizing tool which
|
Synchronization is accomplished using csync_, a bidirectional file
|
||||||
provides both a command line client as well as a library. A special module for
|
synchronizing tool that provides both a command line client as well as a
|
||||||
csync was written to synchronize with ownCloud’s built-in WebDAV server.
|
library. A special module for csync was written to synchronize with the
|
||||||
|
ownCloud built-in WebDAV server.
|
||||||
|
|
||||||
The ownCloud sync client is based on a tool called mirall initially written by
|
The ownCloud sync client is based on a tool called *mirall*, initially written
|
||||||
Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to work
|
by Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to
|
||||||
with ownCloud server.
|
function with the ownCloud server.
|
||||||
|
|
||||||
ownCloud Client is written in C++ using the `Qt Framework`_. As a result, the
|
The ownCloud Client software is written in C++ using the `Qt Framework`_. As a
|
||||||
ownCloud Client runs on the three important platforms Linux, Windows and MacOS.
|
result, the ownCloud Client runs on Linux, Windows, and MacOS.
|
||||||
|
|
||||||
.. _csync: http://www.csync.org
|
.. _csync: http://www.csync.org
|
||||||
.. _`Qt Framework`: http://www.qt-project.org
|
.. _`Qt Framework`: http://www.qt-project.org
|
||||||
|
|
||||||
The Sync Process
|
The Synchronization Process
|
||||||
----------------
|
---------------------------
|
||||||
|
|
||||||
First it is important to recall what syncing is: It tries to keep the files
|
The process of synchronization keeps files in two separate repositories the same. When syncrhonized:
|
||||||
on two repositories the same. That means if a file is added to one repository
|
|
||||||
it is going to be copied to the other repository. If a file is changed on one
|
|
||||||
repository, the change is propagated to the other repository. Also, if a file
|
|
||||||
is deleted on one side, it is deleted on the other. As a matter of fact, in
|
|
||||||
ownCloud syncing we do not have a typical client/server system where the
|
|
||||||
server is always master.
|
|
||||||
|
|
||||||
This is the major difference to other systems like a file backup where just
|
- If a file is added to one repository it is copied to the other synchronized repository.
|
||||||
changes and new files are propagated but files never get deleted.
|
- When a file is changed in one repository, the change is propagated to any
|
||||||
|
syncrhonized other repositories- If a file is deleted in one repository, it
|
||||||
|
is deleted in any other.
|
||||||
|
|
||||||
The ownCloud Client checks both repositories for changes frequently after a
|
It is important to note that the ownCloud synchronization process does not use
|
||||||
certain time span. That is refered to as a sync run. In between the local
|
a typical client/server system where the server is always master. This is a
|
||||||
repository is monitored by a file system monitor system that starts a sync run
|
major difference between the ownCloud syncrhonizatin process and other systems
|
||||||
immediately if something was edited, added or removed.
|
like a file backup, where only changes to files or folders and the addition of
|
||||||
|
new files are propagated, but these files and folders are never deleted unless
|
||||||
|
explicitly deleted in the backup.
|
||||||
|
|
||||||
Sync by Time versus ETag
|
During synchronization, the ownCloud Client checks both repositories for
|
||||||
------------------------
|
changes frequently. This process is referred to as a *sync run*. In between
|
||||||
.. index:: time stamps, file times, etag, unique id
|
sync runs, the local repository is monitored by a file system monitoring
|
||||||
|
process that starts a sync run immediately if something was edited, added, or
|
||||||
|
removed.
|
||||||
|
|
||||||
Until the release of ownCloud 4.5 and ownCloud Client 1.1, ownCloud employed
|
Synchronization by Time versus ETag
|
||||||
a single file property to decide which file is newer and hence needs to be
|
-----------------------------------
|
||||||
synced to the other repository: the files modification time.
|
.. index:: time stamps, file times, etag, unique id
|
||||||
|
|
||||||
|
Until the release of ownCloud 4.5 and ownCloud Client 1.1, the ownCloud
|
||||||
|
synchronization process employed a single file property -- the file modificatin
|
||||||
|
time -- to decide which file was newer and needed to be synchronized to the
|
||||||
|
other repository.
|
||||||
|
|
||||||
The *modification timestamp* is part of the files metadata. It is available on
|
The *modification timestamp* is part of the files metadata. It is available on
|
||||||
every relevant filesystem and is the natural indicator for a file change.
|
every relevant filesystem and is the typical indicator for a file change.
|
||||||
Modification timestamps do not require special action to create and have
|
Modification timestamps do not require special action to create, and have a
|
||||||
a general meaning. One design goal of csync is to not require a special server
|
general meaning. One design goal of csync is to not require a special server
|
||||||
component, that’s why it was chosen as the backend component.
|
component. This design goal is why csync was chosen as the backend component.
|
||||||
|
|
||||||
To compare the modification times of two files from different systems,
|
To compare the modification times of two files from different systems, csync
|
||||||
it is needed to operate on the same base. Before version 1.1.0,
|
must operate on the same base. Before ownCloud Client version 1.1.0, csync
|
||||||
csync requires both sides running on the exact same time, which can
|
required both device repositories to run on the exact same time. This
|
||||||
be achieved through enterprise standard `NTP time synchronisation`_ on all
|
requirement was achieved through the use of enterprise standard `NTP time
|
||||||
machines.
|
synchronisation`_ on all machines.
|
||||||
|
|
||||||
Since this strategy is rather fragile without NTP, ownCloud 4.5 introduced a
|
Because this timing strategy is rather fragile without the use of NTP, ownCloud
|
||||||
unique number, which changes whenever the file changes. Although it is a unique
|
4.5 introduced a unique number (for each file?) that changes whenever the file
|
||||||
value, it is not a hash of the file, but a randomly chosen number, which it will
|
changes. Although this number is a unique value, it is not a hash of the file.
|
||||||
transmit in the Etag_ field. Since the file number is guaranteed to change if
|
Instead, it is a randomly chosen number, that is transmitted in the Etag_
|
||||||
the file changes, it can now be used to determine if one of the files has
|
field. Because the file number changes if the file changes, its use is
|
||||||
changed.
|
guaranteed to determine if one of the files has changed and, thereby, launching
|
||||||
|
a synchronization process.
|
||||||
|
|
||||||
.. note:: ownCloud Client 1.1 and newer require file ID capabilities on the
|
.. note:: ownCloud Client release 1.1 and later requires file ID capabilities
|
||||||
ownCloud server, hence using them with a server earlier than 4.5.0 is
|
on the ownCloud server. Servers that run with release earlier than 4.5.0 do
|
||||||
not supported.
|
not support using the file ID functionality.
|
||||||
|
|
||||||
Before the 1.3.0 release of the client the sync process might create faux
|
Before the 1.3.0 release of the Desktop Client, the synchronization process
|
||||||
conflict files if time deviates. The original and the conflict files only
|
might create faux conflict files if time deviates. Original and changed files
|
||||||
differed in the timestamp, but not in content. This behaviour was changed
|
conflict only in their timestamp, but not in their content. This behaviour was
|
||||||
towards a binary check if the files are different.
|
changed to employ a binary check if files differ.
|
||||||
|
|
||||||
Just like files, directories also hold a unique id, which changes whenever
|
Like files, directories also hold a unique ID that changes whenever one of the
|
||||||
one of the contained files or directories gets modified. Since this is a
|
contained files or directories is modified. Because this is a recursive
|
||||||
recursive process, it significantly reduces the effort required for a sync
|
process, it significantly reduces the effort required for a synchronization
|
||||||
cycle, because the client will only walk directories with a modified unique id.
|
cycle, because the client only analyzes directories with a modified ID.
|
||||||
|
|
||||||
|
|
||||||
This table outlines the different sync methods attempted depending
|
The following table outlines the different synchronization methods used,
|
||||||
on server/client combination:
|
depending on server/client combination:
|
||||||
|
|
||||||
.. index:: compatiblity table
|
.. index:: compatiblity table
|
||||||
|
|
||||||
@@ -98,10 +106,10 @@ on server/client combination:
|
|||||||
| 4.5 or later | 1.1 or later | File ID, Time Stamp |
|
| 4.5 or later | 1.1 or later | File ID, Time Stamp |
|
||||||
+--------------------+-------------------+----------------------------+
|
+--------------------+-------------------+----------------------------+
|
||||||
|
|
||||||
It is highly recommended to upgrade to ownCloud 4.5 or later with ownCloud
|
We strongly recommend using ownCloud Server release 4.5 or later when using
|
||||||
Client 1.1 or later, since the time stamp-based sync mechanism can
|
ownCloud Client 1.1 or later. Using incompatible time stamp-based
|
||||||
lead to data loss in certain edge-cases, especially when multiple clients
|
synchronization mechanism can lead to data loss in rare cases, especially when
|
||||||
are involved and one of them is not in sync with NTP time.
|
multiple clients are involved and one utilizes a non-synchronized NTP time.
|
||||||
|
|
||||||
.. _`NTP time synchronisation`: http://en.wikipedia.org/wiki/Network_Time_Protocol
|
.. _`NTP time synchronisation`: http://en.wikipedia.org/wiki/Network_Time_Protocol
|
||||||
.. _Etag: http://en.wikipedia.org/wiki/HTTP_ETag
|
.. _Etag: http://en.wikipedia.org/wiki/HTTP_ETag
|
||||||
@@ -109,27 +117,28 @@ are involved and one of them is not in sync with NTP time.
|
|||||||
Comparison and Conflict Cases
|
Comparison and Conflict Cases
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
In a sync run the client first has to detect if one of the two repositories have
|
As mentioned above, during a *sync run* the client must first detect if one of
|
||||||
changed files. On the local repository, the client traverses the file
|
the two repositories have changed files. On the local repository, the client
|
||||||
tree and compares the modification time of each file with the value it was
|
traverses the file tree and compares the modification time of each file with an
|
||||||
before. The previous value is stored in the client's database. If it is not, it
|
expected value stored in its database. If the value is not the same, the client
|
||||||
means that the file has been added to the local repository. Note that on
|
determines that the file has been modified in the local repository.
|
||||||
the local side, the modificaton time a good attribute to detect changes because
|
|
||||||
it does not depend on time shifts and such.
|
|
||||||
|
|
||||||
For the remote (ie. ownCloud) repository, the client compares the ETag of each
|
.. note:: On the local side, the modificaton time a good attribute to use for detecting changes, because
|
||||||
file with it's previous value. Again the previous value is queried from the
|
the value does not depend on time shifts and such.
|
||||||
database. If the ETag is still the same, the file has not changed.
|
|
||||||
|
|
||||||
In case a file has changed on both, the local and the remote repository since
|
For the remote (that is, ownCloud server) repository, the client compares the
|
||||||
the last sync run, it can not easily be decided which version of the file is
|
ETag of each file with its expected value. Again, the expected ETag value is
|
||||||
the one that should be used. However, changes to any side must not be lost.
|
queried from the client database. If the ETag is the same, the file has not
|
||||||
|
changed and no synchronization occurs.
|
||||||
|
|
||||||
That is called a **conflict case**. The client solves it by creating a conflict
|
In the event a file has changed on both the local and the remote repository
|
||||||
file of the older of the two files and save the newer one under the original
|
since the last sync run, it can not easily be decided which version of the file
|
||||||
file name. Conflict files are always created on the client and never on the
|
is the one that should be used. However, changes to any side be lost. Instead,
|
||||||
server. The conflict file has the same name as the original file appended with
|
a *conflict case* is created. The client resolves this conflic by creating a
|
||||||
the timestamp of the conflict detection.
|
conflict file of the older of the two files and saving the newer file under the
|
||||||
|
original file name. Conflict files are always created on the client and never
|
||||||
|
on the server. The conflict file uses the same name as the original file, but
|
||||||
|
is appended with the timestamp of the conflict detection.
|
||||||
|
|
||||||
|
|
||||||
.. _ignored-files-label:
|
.. _ignored-files-label:
|
||||||
@@ -137,40 +146,40 @@ the timestamp of the conflict detection.
|
|||||||
Ignored Files
|
Ignored Files
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
ownCloud Client supports that certain files are excluded or ignored from
|
The ownCloud Client supports the ability to exclude or ignore certain files
|
||||||
the synchronization. There are a couple of system wide file patterns which
|
from the synchronization process. Some system wide file patterns that are used
|
||||||
come with the client. Custom patterns can be added by the user.
|
to exclude or ignore files are included with the client by default and the
|
||||||
|
ownCloud Client provides the ability to add custom patterns.
|
||||||
|
|
||||||
ownCloud Client will ignore the following files:
|
By default, the ownCloud Client ignores the following files:
|
||||||
|
|
||||||
* Files matched by one of the pattern in :ref:`ignoredFilesEditor-label`
|
- Files matched by one of the patterns defined in :ref:`ignoredFilesEditor-label`.
|
||||||
* Files containing characters that do not work on certain file systems.
|
- Files containing characters that do not work on certain file systems (`\, :, ?, *, ", >, <, |`).
|
||||||
Currently, these characters are: `\, :, ?, *, ", >, <, |`
|
* Files starting in ``.csync_journal.db*``, as these files are reserved for journalling.
|
||||||
* Files starting in ``.csync_journal.db*`` (reserved for journalling)
|
|
||||||
|
|
||||||
If a pattern is checkmarked in the `ignoredFilesEditor-label` (or if a line in
|
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
|
||||||
the exclude file starts with the character `]` directly followed
|
a line in the exclude file starts with the character `]` directly followed by
|
||||||
by the file pattern), files matching this pattern are considered fleeting
|
the file pattern), files matching the pattern are considered *fleeting meta
|
||||||
meta data. These files are ingored and *removed* by the client if found
|
data*. These files are ingored and *removed* by the client if found in the
|
||||||
in the sync folder. This is suitable for meta files created by some
|
synchronized folder. This is suitable for meta files created by some
|
||||||
applications that have no sustainable meaning.
|
applications that have no sustainable meaning.
|
||||||
|
|
||||||
If a pattern is ending with character `/` it means that only directories are
|
If a pattern ends with the backslash (`/`) character, only directories are
|
||||||
matched. The pattern is only applied for directory components of the checked
|
matched. The pattern is only applied for directory components of filenames
|
||||||
filename.
|
selected using the checkbox.
|
||||||
|
|
||||||
To match file names against the exclude patterns, the unix standard C
|
To match filenames against the exclude patterns, the unix standard C library
|
||||||
library function fnmatch is used. It checks the filename against the pattern
|
function fnmatch is used. This procesx checks the filename against the
|
||||||
using standard shell wildcard pattern matching. Check `The opengroup website
|
specified pattern using standard shell wildcard pattern matching. For more
|
||||||
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`
|
information, please refer to `The opengroup website
|
||||||
for the gory details.
|
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`.
|
||||||
|
|
||||||
The path that is checked is the relative path unter the sync root directory.
|
The path that is checked is the relative path under the sync root directory.
|
||||||
|
|
||||||
|
**Pattern and File Match Examples:**
|
||||||
|
|
||||||
Examples:
|
|
||||||
^^^^^^^^^
|
|
||||||
+-----------+------------------------------+
|
+-----------+------------------------------+
|
||||||
| Pattern | Matches |
|
| Pattern | File Matches |
|
||||||
+===========+==============================+
|
+===========+==============================+
|
||||||
| ``~$*`` | ``~$foo``, ``~$example.doc`` |
|
| ``~$*`` | ``~$foo``, ``~$example.doc`` |
|
||||||
+-----------+------------------------------+
|
+-----------+------------------------------+
|
||||||
@@ -183,15 +192,17 @@ Examples:
|
|||||||
The Sync Journal
|
The Sync Journal
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The client stores the ETag number in a per-directory database,
|
The client stores the ETag number in a per-directory database, called the
|
||||||
called the journal. It is a hidden file right in the directory
|
*journal*. This database is a hidden file contained in the directory to be
|
||||||
to be synced.
|
synchronized.
|
||||||
|
|
||||||
If the journal database gets removed, ownCloud Client's CSync backend will
|
If the journal database is removed, the ownCloud Client CSync backend rebuilds
|
||||||
rebuild the database by comparing the files and their modification times. Thus
|
the database by comparing the files and their modification times. This process
|
||||||
it should be made sure that both server and client synchronized with NTP time
|
ensures that both server and client are synchronized using the appropriate NTP
|
||||||
before restarting the client after a database removal.
|
time before restarting the client following a database removal.
|
||||||
|
|
||||||
Pressing ``F5`` in the Account Settings Dialog that allows to "reset" the
|
Pressing ``F5`` while in the Account Settings Dialog enables you to "reset" the
|
||||||
journal. That can be used to recreate the journal database. Use this only
|
journal. This function can be used to recreate the journal database.
|
||||||
if advised to do so by the developer or support staff.
|
|
||||||
|
.. note:: We recommend that you use this function only when advised to do so by
|
||||||
|
ownCloud support staff.
|
||||||
|
|||||||
@@ -1,81 +1,126 @@
|
|||||||
The Automatic Updater
|
The Automatic Updater
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
To ensure you're always using the latest version of ownCloud Client, an
|
To ensure that you are always using the latest version of the ownCloud client,
|
||||||
auto-update mechanism has been added in Version 1.5.1. It will ensure
|
an auto-update mechanism has been added in Version 1.5.1. The Automatic Updater
|
||||||
that will automatically profit from the latest features and bugfixes.
|
ensures that you automatically profit from the latest features and bugfixes.
|
||||||
|
|
||||||
The updater works differently depending on the operating system.
|
.. note:: The Automatic Updater functions differently, depending on the operating system.
|
||||||
|
|
||||||
Basic Workflow
|
Basic Workflow
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
The following sections describe how to use the Automatic Updater on different operating systems:
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
ownCloud client will check for updates and download the update if one
|
The ownCloud client checks for updates and downloads them when available. You
|
||||||
is available. You can view the status under ``Settings -> General -> Updates``.
|
can view the update status under ``Settings -> General -> Updates`` in the
|
||||||
If an update is available and has been successfully downloaded, ownCloud
|
ownCloud client.
|
||||||
Client will start a silent update prior to its next launch and then start itself.
|
|
||||||
If the silent update fails, the client offers a manual download.
|
|
||||||
|
|
||||||
.. note:: The user needs to be able to attain administrative privileges
|
If an update is available, and has been successfully downloaded, the ownCloud
|
||||||
to successfully perform the update.
|
client starts a silent update prior to its next launch and then restarts
|
||||||
|
itself. Should the silent update fail, the client offers a manual download.
|
||||||
|
|
||||||
|
.. note:: Administrative privileges are required to perform the update.
|
||||||
|
|
||||||
Mac OS X
|
Mac OS X
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
If a new update is available, ownCloud client will ask the user to update
|
If a new update is available, the ownCloud client initializes a pop-up dialog
|
||||||
to the latest version using a pop-up dialog. This is the default for Mac
|
to alert you of the update and requesting that you update to the latest
|
||||||
OS X applications which use the Sparkle framework.
|
version. Due to their use of the Sparkle frameworks, this is the default
|
||||||
|
process for Mac OS X applications.
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
Since distributions provide their own update tool, ownCloud Client on Linux
|
Linux distributions provide their own update tool, so ownCloud clients that use
|
||||||
will not perform any updates on its own. It will, however, check for the
|
the Linux operating system do not perform any updates on their own. Linux
|
||||||
latest version and passively notify the user (``Settings -> General -> Updates``)
|
operating systems do, however, check for the latest version of the ownCloud
|
||||||
if an update is available.
|
client and passively notify the user (``Settings -> General -> Updates``) when
|
||||||
|
an update is available.
|
||||||
|
|
||||||
|
|
||||||
Preventing Auto Updates
|
Preventing Automatic Updates
|
||||||
-----------------------
|
----------------------------
|
||||||
|
|
||||||
In controlled environment such as companies or universities, the auto-update
|
In controlled environments, such as companies or universities, you might not
|
||||||
mechanism might not be desired as it interferes with controlled deployment
|
want to enable the auto-update mechanism, as it interferes with controlled
|
||||||
tools and policies. In this case, it is possible to disable the auto-updater
|
deployment tools and policies. To address this case, it is possible to disable
|
||||||
entirely:
|
the auto-updater entirely. The following sections describe how to disable the
|
||||||
|
auto-update mechanism for different operating systems.
|
||||||
|
|
||||||
Windows
|
Preventing Automatic Updates in Windows Environents
|
||||||
^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
There are two alternative approaches:
|
You can prevent automatic updates from occuring in Windows environments using
|
||||||
|
one of two methods. The first method allows users to override the automatic
|
||||||
|
update check mechanism whereas the second method prevents any manual overrides.
|
||||||
|
|
||||||
1. In ``HKEY_LOCAL_MACHINE\Software\ownCloud\ownCloud``, add a key ``skipUpdateCheck`` (of type DWORD) with the value 1 to the machine. This key
|
To prevent automatic updates, but allow manual overrides:
|
||||||
can be manually overrideen by the same value in ``HKEY_CURRENT_USER``.
|
|
||||||
|
|
||||||
2. In ``HKEY_LOCAL_MACHINE\Software\Policies\ownCloud\ownCloud``, add a key
|
1. Migrate to the following directory::
|
||||||
``skipUpdateCheck`` (of type DWORD) with the value 1 to the machine.
|
|
||||||
Setting the value here cannot be overridden by the user and is the preferred
|
|
||||||
way to control the updater behavior via Group Policies.
|
|
||||||
|
|
||||||
Mac OS X
|
HKEY_LOCAL_MACHINE\Software\ownCloud\ownCloud
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
You can disable the update check via a system-wide ``.plist`` file located
|
2. Add the key ``skipUpdateCheck`` (of type DWORD).
|
||||||
at ``/Library/Preferences/com.owncloud.desktopclient.plist``. Add a new root
|
|
||||||
level item of type bool and the name ``skipUpdateCheck`` and set it to ``true``.
|
3. Specify a value of ``1`` to the machine.
|
||||||
You can also just copy the file
|
|
||||||
``owncloud.app/Contents/Resources/deny_autoupdate_com.owncloud.desktopclient.plist```
|
To manually override this key, use the same value in ``HKEY_CURRENT_USER``.
|
||||||
|
|
||||||
|
To prevent automatic updates and disallow manual overrides:
|
||||||
|
|
||||||
|
.. note::This is the preferred method of controlling the updater behavior using Group Policies.
|
||||||
|
|
||||||
|
1. Migrate to the following directory::
|
||||||
|
|
||||||
|
HKEY_LOCAL_MACHINE\Software\Policies\ownCloud\ownCloud
|
||||||
|
|
||||||
|
2. Add the key ``skipUpdateCheck`` (of type DWORD).
|
||||||
|
|
||||||
|
3. Specify a value of ``1`` to the machine.
|
||||||
|
|
||||||
|
|
||||||
|
Preventing Automatic Updates in Mac OS X Environments
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can disable the automatic update mechanism in MAC OS X operating systems
|
||||||
|
using the system-wide ``.plist`` file. To access this file:
|
||||||
|
|
||||||
|
1. Using the Windows explorer, migrate to the following location::
|
||||||
|
|
||||||
|
/Library/Preferences/
|
||||||
|
|
||||||
|
2. Locate and open the following file::
|
||||||
|
|
||||||
|
com.owncloud.desktopclient.plist
|
||||||
|
|
||||||
|
3. Add a new root level item of type ``bool``.
|
||||||
|
|
||||||
|
4. Name the item ``skipUpdateCheck``.
|
||||||
|
|
||||||
|
5. Set the item to ``true``.
|
||||||
|
|
||||||
|
Alternatively, you can copy the file
|
||||||
|
``owncloud.app/Contents/Resources/deny_autoupdate_com.owncloud.desktopclient.plist``
|
||||||
to ``/Library/Preferences/com.owncloud.desktopclient.plist``.
|
to ``/Library/Preferences/com.owncloud.desktopclient.plist``.
|
||||||
|
|
||||||
Linux
|
Preventing Automatic Updates in Linux Environments
|
||||||
^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Since there is no updating functionality, there is no need to remove the check.
|
Because Linux does not provide automatic updating functionality, there is no
|
||||||
If you want to disable the check nontheless, open a file called
|
need to remove the automatic-update check. However, if you want to disable
|
||||||
``/etc/ownCloud/ownCloud.conf`` and add the following content::
|
this check:
|
||||||
|
|
||||||
[General]
|
1. Locate and open the following file::
|
||||||
skipUpdateCheck=true
|
|
||||||
|
/etc/ownCloud/ownCloud.conf
|
||||||
|
|
||||||
|
2. Add the following content to the file::
|
||||||
|
|
||||||
|
[General]
|
||||||
|
skipUpdateCheck=true
|
||||||
|
|
||||||
|
|||||||
160
doc/building.rst
@@ -3,20 +3,20 @@
|
|||||||
Appendix A: Building the Client
|
Appendix A: Building the Client
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
This section explains how to build the ownCloud Client from source
|
This section explains how to build the ownCloud Client from source for all
|
||||||
for all major platforms. You should read this section if you want
|
major platforms. You should read this section if you want to develop for the
|
||||||
to development on the desktop client.
|
desktop client.
|
||||||
|
|
||||||
Note that the building instruction are subject to change as development
|
.. note:: Building instruction are subject to change as development proceeds.
|
||||||
proceeds. It is important to check the version which is to built.
|
Please check the version for which you want to built.
|
||||||
|
|
||||||
This instructions were updated to work with ownCloud Client 1.5.
|
The instructions contained in this topic were updated to work with version 1.5 of the ownCloud Client.
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
-----
|
-----
|
||||||
|
|
||||||
1. Add the `ownCloud repository from OBS`_.
|
1. Add the `ownCloud repository from OBS`_.
|
||||||
2. Install the dependencies (as root, or via sudo):
|
2. Install the dependencies (as root, or using ``sudo``) using the following commands for your specific Linux distribution:
|
||||||
|
|
||||||
* Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client``
|
* Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client``
|
||||||
* openSUSE: ``zypper ref; zypper si -d owncloud-client``
|
* openSUSE: ``zypper ref; zypper si -d owncloud-client``
|
||||||
@@ -27,47 +27,51 @@ Linux
|
|||||||
Mac OS X
|
Mac OS X
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Next to XCode (and the command line tools!), you will need some
|
In additon to needing XCode (along with the command line tools), developing in
|
||||||
extra dependencies.
|
the MAC OS X environment requires extra dependencies. You can install these
|
||||||
|
dependencies through MacPorts_ or Homebrew_. These dependencies are required
|
||||||
|
only on the build machine, because non-standard libs are deployed in the app
|
||||||
|
bundle.
|
||||||
|
|
||||||
You can install these dependencies via MacPorts_ or Homebrew_.
|
The tested and preferred way to develop in this environment is through the use
|
||||||
This is only needed on the build machine, since non-standard libs
|
of HomeBrew_. The ownCloud team has its own repository containing non-standard
|
||||||
will be deployed in the app bundle.
|
recipes.
|
||||||
|
|
||||||
The tested and preferred way is to use HomeBrew_. The ownCloud team has
|
To set up your build enviroment for development using HomeBrew_:
|
||||||
its own repository which contains non-standard recipes. Add it with::
|
|
||||||
|
1. Add the ownCloud repository using the following command::
|
||||||
|
|
||||||
brew tap owncloud/owncloud
|
brew tap owncloud/owncloud
|
||||||
|
|
||||||
Next, install the missing dependencies::
|
2. Install any missing dependencies::
|
||||||
|
|
||||||
brew install $(brew deps mirall)
|
brew install $(brew deps mirall)
|
||||||
|
|
||||||
|
|
||||||
To build mirall, follow the `generic build instructions`_.
|
To build mirall, follow the `generic build instructions`_.
|
||||||
|
|
||||||
.. note::
|
.. note:: Because the product from the mirall build is an app bundle, do not
|
||||||
You should not call ``make install`` at any time, since the product of the
|
call ``make install`` at any time. Instead, call ``make package`` to create an
|
||||||
mirall build is an app bundle. Call ``make package`` instead to create an
|
install-ready disk image.
|
||||||
install-ready disk image.
|
|
||||||
|
|
||||||
Windows (cross-compile)
|
Windows (Cross-Compile)
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
Due to the amount of dependencies, building the client for Windows
|
Due to the large number of dependencies, building the client for Windows is
|
||||||
is **currently only supported on openSUSE**, by using the MinGW
|
**currently only supported on openSUSE**, by using the MinGW cross compiler.
|
||||||
cross compiler. You can set up openSUSE 12.1, 12.2 or 13.1 in a virtual machine
|
You can set up openSUSE 12.1, 12.2, or 13.1 in a virtual machine if you do not
|
||||||
if you do not have it installed already.
|
have it installed already.
|
||||||
|
|
||||||
In order to cross-compile, the following repositories need to be added
|
To cross-compile:
|
||||||
via YaST or ``zypper ar`` (adjust when using openSUSE 12.2 or 13.1)::
|
|
||||||
|
|
||||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1/windows:mingw:win32.repo
|
1. Add the following repositories using YaST or ``zypper ar`` (adjust when using openSUSE 12.2 or 13.1):
|
||||||
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.1/windows:mingw.repo
|
|
||||||
|
|
||||||
Next, install the cross-compiler packages and the cross-compiled dependencies::
|
- ``zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1/windows:mingw:win32.repo``
|
||||||
|
|
||||||
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
- ``zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.1/windows:mingw.repo``
|
||||||
|
|
||||||
|
2. Install the cross-compiler packages and the cross-compiled dependencies::
|
||||||
|
|
||||||
|
``zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
|
||||||
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
|
||||||
mingw32-headers mingw32-runtime site-config mingw32-libqt4-sql \
|
mingw32-headers mingw32-runtime site-config mingw32-libqt4-sql \
|
||||||
mingw32-libqt4-sql-sqlite mingw32-sqlite mingw32-libsqlite-devel \
|
mingw32-libqt4-sql-sqlite mingw32-sqlite mingw32-libsqlite-devel \
|
||||||
@@ -78,74 +82,86 @@ Next, install the cross-compiler packages and the cross-compiled dependencies::
|
|||||||
mingw32-libpng-devel mingw32-libsqlite mingw32-qtkeychain \
|
mingw32-libpng-devel mingw32-libsqlite mingw32-qtkeychain \
|
||||||
mingw32-qtkeychain-devel mingw32-dlfcn mingw32-libintl-devel \
|
mingw32-qtkeychain-devel mingw32-dlfcn mingw32-libintl-devel \
|
||||||
mingw32-libneon-devel mingw32-libopenssl-devel mingw32-libproxy-devel \
|
mingw32-libneon-devel mingw32-libopenssl-devel mingw32-libproxy-devel \
|
||||||
mingw32-libxml2-devel mingw32-zlib-devel
|
mingw32-libxml2-devel mingw32-zlib-devel``
|
||||||
|
|
||||||
For the installer, the NSIS installer package is also required::
|
3. For the installer, install the NSIS installer package::
|
||||||
|
|
||||||
zypper install mingw32-cross-nsis
|
``zypper install mingw32-cross-nsis``
|
||||||
|
|
||||||
.. Usually, the following would be needed as well, but due to a bug in mingw, they
|
4. Install the following plugin::
|
||||||
will currently not build properly from source.
|
|
||||||
|
|
||||||
mingw32-cross-nsis-plugin-processes mingw32-cross-nsis-plugin-uac
|
``mingw32-cross-nsis-plugin-processes mingw32-cross-nsis-plugin-uac``
|
||||||
|
|
||||||
You will also need to manually download and install the following files with
|
.. note:: This plugin is typically required. However, due to a current bug
|
||||||
``rpm -ivh <package>`` (They will also work with openSUSE 12.2 and newer)::
|
in ``mingw``, the plugins do not currently build properly from source.
|
||||||
|
|
||||||
rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
|
5. Manually download and install the following files using ``rpm -ivh <package>``:
|
||||||
rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
|
|
||||||
|
|
||||||
Now, follow the `generic build instructions`_, but pay attention to
|
..note:: These files operate using openSUSE 12.2 and newer.
|
||||||
the following differences:
|
|
||||||
|
|
||||||
For building for windows a special toolchain file has to be specified.
|
- ``rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm``
|
||||||
That makes cmake finding the platform specific tools. This parameter
|
|
||||||
has to be added to the call to cmake:
|
|
||||||
|
|
||||||
``-DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``
|
- ``rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm``
|
||||||
|
|
||||||
Finally, just build by running ``make``. ``make package`` will produce
|
6. Follow the `generic build instructions`_
|
||||||
an NSIS-based installer, provided the NSIS mingw32 packages are installed.
|
|
||||||
|
.. note:: When building for Windows platforms, you must specify a special
|
||||||
|
toolchain file that enables cmake to locate the platform-specific tools. To add
|
||||||
|
this parameter to the call to cmake, enter
|
||||||
|
``DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``.
|
||||||
|
|
||||||
|
7. Build by running ``make``.
|
||||||
|
|
||||||
|
..note:: Using ``make package`` produces an NSIS-based installer, provided
|
||||||
|
the NSIS mingw32 packages are installed.
|
||||||
|
|
||||||
Generic Build Instructions
|
Generic Build Instructions
|
||||||
--------------------------
|
--------------------------
|
||||||
.. _`generic build instructions`
|
.. _`generic build instructions`
|
||||||
|
|
||||||
Compared to previous versions building of Mirall has become more easy.
|
Compared to previous versions, building Mirall has become easier. Unlike
|
||||||
CSync, which is the sync engine library of Mirall, is now part of the
|
earlier versions, CSync, which is the sync engine library of Mirall, is now
|
||||||
Mirall source repository, not, like it was before, a separate module.
|
part of the Mirall source repository and not a separate module.
|
||||||
|
|
||||||
Mirall can be downloaded at ownCloud's `Client Download Page`_.
|
You can download Mirall from the ownCloud `Client Download Page`_.
|
||||||
|
|
||||||
If you want to build the leading edge version of the client, you should
|
To build the most up to date version of the client:
|
||||||
use the latest versions of Mirall via Git_, like so::
|
|
||||||
|
|
||||||
git clone git://github.com/owncloud/mirall.git
|
1. Clone the latest versions of Mirall from Git_ as follows:
|
||||||
|
|
||||||
Next, create build directories::
|
``git clone git://github.com/owncloud/mirall.git``
|
||||||
|
|
||||||
mkdir mirall-build
|
2. Create build directories:
|
||||||
|
|
||||||
Now build mirall::
|
``mkdir mirall-build``
|
||||||
|
|
||||||
cd ../mirall-build
|
3. Build mirall:
|
||||||
cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall
|
|
||||||
|
|
||||||
Note that it is important to use absolute pathes for the include- and library
|
``cd ../mirall-build``
|
||||||
directories. If this succeeds, call ``make``. The owncloud binary should appear
|
``cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall``
|
||||||
in the ``bin`` directory. You can also run ``make install`` to install the client to
|
|
||||||
``/usr/local/bin``.
|
|
||||||
|
|
||||||
To build an installer/app bundle (requires the mingw32-cross-nsis packages on Windows)::
|
..note:: You must use absolute pathes for the ``include`` and ``library`` directories.
|
||||||
|
|
||||||
make package
|
4. Call ``make``.
|
||||||
|
|
||||||
Known cmake parameters:
|
The owncloud binary appear in the ``bin`` directory.
|
||||||
|
|
||||||
* QTKEYCHAIN_LIBRARY=/path/to/qtkeychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path/to/qtkeychain/: Use QtKeychain for stored credentials. When compiling with Qt5, the library is called qt5keychain.dylib. You need to compile QtKeychain with the same Qt version.
|
5. (Optional) Call ``make install`` to install the client to the ``/usr/local/bin`` directory.
|
||||||
* WITH_DOC=TRUE: create doc and manpages via running ``make``; also adds install statements to be able to install it via ``make install``.
|
|
||||||
* CMAKE_PREFIX_PATH=/path/to/Qt5.2.0/5.2.0/yourarch/lib/cmake/ : to build with Qt5
|
6. (Optional) Call ``make package`` to build an installer/app bundle
|
||||||
* BUILD_WITH_QT4=ON : to build with Qt4 even if Qt5 is found
|
|
||||||
|
..note:: This step requires the ``mingw32-cross-nsis`` packages be installed on Windows.
|
||||||
|
|
||||||
|
The following are known cmake parameters:
|
||||||
|
|
||||||
|
* ``QTKEYCHAIN_LIBRARY=/path/to/qtkeychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path/to/qtkeychain/``:
|
||||||
|
Used for stored credentials. When compiling with Qt5, the library is called ``qt5keychain.dylib.``
|
||||||
|
You need to compile QtKeychain with the same Qt version.
|
||||||
|
* ``WITH_DOC=TRUE``: Creates doc and manpages through running ``make``; also
|
||||||
|
* adds install statements, providing the ability to install using ``make
|
||||||
|
* install``.
|
||||||
|
* ``CMAKE_PREFIX_PATH=/path/to/Qt5.2.0/5.2.0/yourarch/lib/cmake/``: Builds using Qt5.
|
||||||
|
* ``BUILD_WITH_QT4=ON``: Builds using Qt4 (even if Qt5 is found).
|
||||||
|
|
||||||
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
|
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
|
||||||
.. _CSync: http://www.csync.org
|
.. _CSync: http://www.csync.org
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
ownCloud Client reads a configuration file.
|
The ownCloud Client reads a configuration file. You can locate this configuration files as follows:
|
||||||
|
|
||||||
On Linux it can be found in:
|
- On Linux distributions:
|
||||||
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
|
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
|
||||||
|
|
||||||
On Windows it can be found in:
|
- In Microsoft Windows systems:
|
||||||
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
|
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
|
||||||
|
|
||||||
On Mac it can be found in:
|
- In MAC OS X systems:
|
||||||
``$HOME/Library/Application Support/ownCloud``
|
``$HOME/Library/Application Support/ownCloud``
|
||||||
|
|
||||||
|
|
||||||
It contains settings in the ini file format known from Windows.
|
The configuration file contains settings using the Microsoft Windows .ini file
|
||||||
|
format. You can overwrite changes using the ownCloud configuration dialog.
|
||||||
|
|
||||||
.. note:: Changes here should be done carefully as wrong settings can cause disfunctionality.
|
.. note:: Use caution when making changes to the ownCloud Client configuration
|
||||||
|
file. Incorrect settings can produce unintended results.
|
||||||
|
|
||||||
.. note:: Changes may be overwritten by using ownCloud's configuration dialog.
|
You can change the following configuration settings:
|
||||||
|
|
||||||
These are config settings that may be changed:
|
- ``remotePollInterval`` (default: ``30000``) -- Specifies the poll time for the remote repository in milliseconds.
|
||||||
|
|
||||||
``remotePollInterval`` (default: ``30000``)
|
- ``maxLogLines`` (default: ``20000``) -- Specifies the maximum number of log lines displayed in the log window.
|
||||||
Poll time for the remote repository in milliseconds
|
|
||||||
|
|
||||||
``maxLogLines`` (default: ``20000``)
|
|
||||||
Maximum count of log lines shown in the log window
|
|
||||||
|
|
||||||
|
|||||||
19
doc/faq.rst
@@ -1,16 +1,17 @@
|
|||||||
FAQ
|
FAQ
|
||||||
===
|
===
|
||||||
|
|
||||||
Some files are continuously uploaded to the server even when they are not modified
|
**Issue:**
|
||||||
----------------------------------------------------------------------------------
|
|
||||||
|
Some files are continuously uploaded to the server, even when they are not modified.
|
||||||
|
|
||||||
|
**Resolution:**
|
||||||
|
|
||||||
It is possible that another program is changing the modification date of the file.
|
It is possible that another program is changing the modification date of the file.
|
||||||
|
|
||||||
If the file is a ``.eml`` file, Windows automatically change all file all the time unless you remove
|
If the file is uses the ``.eml`` extention, Windows automatically and
|
||||||
``\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers`` from
|
continually changes all files, unless you remove
|
||||||
the windows registry.
|
``\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers`
|
||||||
See http://petersteier.wordpress.com/2011/10/22/windows-indexer-changes-modification-dates-of-eml-files/
|
from the windows registry.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
See http://petersteier.wordpress.com/2011/10/22/windows-indexer-changes-modification-dates-of-eml-files/ for more information.
|
||||||
|
|||||||
BIN
doc/images/client_setup_wizard_components.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
doc/images/client_setup_wizard_install_finish.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
doc/images/client_setup_wizard_install_progress.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
doc/images/client_setup_wizard_location.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
doc/images/client_setup_wizard_main.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
doc/images/client_setup_wizard_reinstall.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
doc/images/client_setup_wizard_uninstall.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
doc/images/client_setup_wizard_uninstall_2.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
doc/images/client_setup_wizard_uninstall_3.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
doc/images/download_button.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
doc/images/log_output_window.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
doc/images/oc_client_download_options.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
doc/images/oc_client_linux_download.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
doc/images/oc_client_macosx_download.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
doc/images/oc_client_windows_download.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
doc/images/oc_client_windows_option.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
doc/images/oc_connection_wizard_credentials.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
doc/images/oc_connection_wizard_finish.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
doc/images/oc_connection_wizard_localfolder.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
doc/images/oc_connection_wizard_server.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
doc/images/oc_website.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
doc/images/owncloud_logo_transparent.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
doc/images/owncloud_small_wh_bl.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/images/save_log_file.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
doc/images/security_warning_windows.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
@@ -4,11 +4,12 @@ Contents
|
|||||||
========
|
========
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 3
|
||||||
|
|
||||||
introduction
|
introduction
|
||||||
|
installing
|
||||||
accountsetup
|
accountsetup
|
||||||
visualtour
|
navigating
|
||||||
advancedusage
|
advancedusage
|
||||||
autoupdate
|
autoupdate
|
||||||
|
|
||||||
|
|||||||
208
doc/installing-linux.rst
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
.. _installing-linux:
|
||||||
|
|
||||||
|
Installing the Linux Desktop Client
|
||||||
|
===================================
|
||||||
|
|
||||||
|
The ownCloud Desktop Client is provided for a wide range of Linux
|
||||||
|
distributions. The following table provides a list of Linux operating systems
|
||||||
|
and the specific distributions on which you can install the Desktop Client.
|
||||||
|
|
||||||
|
+------------------+-------------------------+
|
||||||
|
| Operating System | Distribution |
|
||||||
|
+==================+=========================+
|
||||||
|
| CentOS (Redhat) | - Red Hat RHEL-6 |
|
||||||
|
| | - CentOS CentOS-6 |
|
||||||
|
+------------------+-------------------------+
|
||||||
|
| Debian | - Debian 7.0 |
|
||||||
|
| | - Fedora 19 |
|
||||||
|
| | - Fedora 20 |
|
||||||
|
+------------------+-------------------------+
|
||||||
|
| openSUSE | - openSUSE |
|
||||||
|
| | - Factory PPC |
|
||||||
|
| | - openSUSE Factory ARM |
|
||||||
|
| | - openSUSE Factory |
|
||||||
|
| | - openSUSE 13.1 Ports |
|
||||||
|
| | - openSUSE 13.1 |
|
||||||
|
| | - openSUSE 12.3 Ports |
|
||||||
|
| | - openSUSE 12.3 |
|
||||||
|
| | - openSUSE 12.2 |
|
||||||
|
+------------------+-------------------------+
|
||||||
|
| SUSE (SLE) | - SLE 11 SP3 |
|
||||||
|
+------------------+-------------------------+
|
||||||
|
| Ubuntu | - xUbuntu 14.04 |
|
||||||
|
| | - xUbuntu 13.10 |
|
||||||
|
| | - xUbuntu 12.10 |
|
||||||
|
| | - xUbuntu 12.04 |
|
||||||
|
+------------------+-------------------------+
|
||||||
|
|
||||||
|
General instructions for how to install the ownCloud Desktop Client on any
|
||||||
|
supported Linux distribution can be found on the `ownCloud download page
|
||||||
|
<http://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client>`_.
|
||||||
|
|
||||||
|
Linux Installation Methods
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
You can install the ownCloud Desktop Client using either of the following three methods:
|
||||||
|
|
||||||
|
- One Click Install (openSUSE and SUSE SLE distributions only) — Installs the
|
||||||
|
ownCloud Desktop using a bundled installation package.
|
||||||
|
- Adding the ownCloud package repository — Installs the ownCloud Desktop client
|
||||||
|
using a Linux terminal and keeps it up to date using the distribution's
|
||||||
|
package manager.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Manual command line installation requires that you perform the installation as root.
|
||||||
|
|
||||||
|
- Binary package — Installs the ownCloud Desktop Client using a raw binary package.
|
||||||
|
|
||||||
|
Installing the Desktop Client on Redhat or CentOS Linux Operating Systems
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on a Redhat or CentOS operating system manually:
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
|
||||||
|
2. Specify the directory in which you want to install the client.
|
||||||
|
|
||||||
|
``cd /etc/yum.repos.d/``
|
||||||
|
|
||||||
|
3. Choose and download the client for your specific distribution:
|
||||||
|
|
||||||
|
* Red Hat RHEL-6: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/RedHat_RHEL-6/isv:ownCloud:desktop.repo``
|
||||||
|
* CentOS CentOS-6: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/CentOS_CentOS-6/isv:ownCloud:desktop.repo``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``yum install owncloud-client``
|
||||||
|
|
||||||
|
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
**Installing the Desktop Client on Debian 7.0 Linux Operating Systems Manually**
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on the Debian 7.0 distribution manually:
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
|
||||||
|
2. Download the client.
|
||||||
|
|
||||||
|
``echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud-client.list``
|
||||||
|
|
||||||
|
3. Download the package lists from any repositories and updates them to ensure the latest package versions and their dependencies.
|
||||||
|
|
||||||
|
``apt-get update``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``apt-get install owncloud-client``
|
||||||
|
|
||||||
|
5. (Optional) Download the apt-key for the Debian repository
|
||||||
|
|
||||||
|
``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_7.0/Release.key``
|
||||||
|
|
||||||
|
6. After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
Installing the Desktop Client on Fedora Linux Operating Systems
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on the Fedora operating system manually:
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
2. Specify the directory in which you want to install the client.
|
||||||
|
|
||||||
|
cd /etc/yum.repos.d/
|
||||||
|
|
||||||
|
3. Choose and download the client for your specific distribution
|
||||||
|
|
||||||
|
* Fedora 19: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Fedora_19/isv:ownCloud:desktop.repo``
|
||||||
|
* Fedora 20: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Fedora_20/isv:ownCloud:desktop.repo``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``yum install owncloud-client``
|
||||||
|
|
||||||
|
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
Installing the Desktop Client on openSUSE Linux Operating Systems
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on the openSUSE operating system manually:
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
|
||||||
|
2. Choose and download the client for your specific distribution:
|
||||||
|
|
||||||
|
* Factory PPC: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory_PPC/isv:ownCloud:desktop.repo``
|
||||||
|
* **Factory ARM**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory_ARM/isv:ownCloud:desktop.repo``
|
||||||
|
* **Factory**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory/isv:ownCloud:desktop.repo``
|
||||||
|
* **13.1 Ports**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_13.1_Ports/isv:ownCloud:desktop.repo``
|
||||||
|
* **13.1**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_13.1/isv:ownCloud:desktop.repo``
|
||||||
|
* **12.3 Ports**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.3_Ports/isv:ownCloud:desktop.repo``
|
||||||
|
* **12.3**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.3/isv:ownCloud:desktop.repo``
|
||||||
|
* **12.2**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.2/isv:ownCloud:desktop.repo``
|
||||||
|
|
||||||
|
3. Download any package metadata from the medium and store it in local cache.
|
||||||
|
|
||||||
|
``zypper refresh``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``zypper install owncloud-client``
|
||||||
|
|
||||||
|
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
Installing the Desktop Client on SLE Linux Operating Systems
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on the SUSE Linux Enterprise (SLE) operating system.
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
|
||||||
|
2. Download the client.
|
||||||
|
|
||||||
|
``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/SLE_11_SP3/isv:ownCloud:desktop.repo``
|
||||||
|
|
||||||
|
3. Download any package metadata from the medium and store it in local cache.
|
||||||
|
|
||||||
|
``zypper refresh``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``zypper install owncloud-client``
|
||||||
|
|
||||||
|
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
Installing the Desktop Client on Ubuntu Linux Operating Systems
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To install the ownCloud Desktop Client on the Ubuntu operating system:
|
||||||
|
|
||||||
|
1. Open a Linux terminal window.
|
||||||
|
|
||||||
|
2. Choose and download the client for your specific distribution:
|
||||||
|
|
||||||
|
* **xUbuntu 14.04**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
|
||||||
|
* **xUbuntu 13.10**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_13.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
|
||||||
|
* **xUbuntu 12.10**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
|
||||||
|
* **xUbuntu 12.04**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
|
||||||
|
|
||||||
|
3. Download the package lists from any repositories and updates them to ensure the latest package versions and their dependencies.
|
||||||
|
|
||||||
|
``apt-get update``
|
||||||
|
|
||||||
|
4. Install the client.
|
||||||
|
|
||||||
|
``sudo apt-get install owncloud-client``
|
||||||
|
|
||||||
|
5. (Optional) Download the apt-key for the Ubuntu repository:
|
||||||
|
|
||||||
|
* **xUbuntu 14.04**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key``
|
||||||
|
* **xUbuntu 13.10**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_13.10/Release.key``
|
||||||
|
* **xUbuntu 12.10**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.10/Release.key``
|
||||||
|
* **xUbuntu 12.04**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.04/Release.key``
|
||||||
|
|
||||||
|
6. (Optional) Add the apt key.
|
||||||
|
|
||||||
|
``sudo apt-key add - < Release.key``
|
||||||
|
|
||||||
|
7. After the installation completes, go to `Setting Up the ownCloud Desktop Client`_.
|
||||||
4
doc/installing-macosx.rst
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.. _installing-macosx:
|
||||||
|
|
||||||
|
Installing the MAC OSX Desktop Client
|
||||||
|
=====================================
|
||||||
102
doc/installing-windows.rst
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
.. _installing-windows:
|
||||||
|
|
||||||
|
Installing the Windows Desktop Client
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
The ownCloud desktop client for Windows is provided as a Nullsoft Scriptable Install System (NSIS) setup file for machine-wide installation.
|
||||||
|
|
||||||
|
To install the ownCloud desktop client:
|
||||||
|
|
||||||
|
1. Access the ownCloud website.
|
||||||
|
|
||||||
|
The ownCloud web page opens.
|
||||||
|
|
||||||
|
.. image:: images/oc_website.png
|
||||||
|
|
||||||
|
ownCloud Web Page
|
||||||
|
|
||||||
|
2. Select Products > Desktop Clients from the website menu.
|
||||||
|
|
||||||
|
The Desktop Client download page opens.
|
||||||
|
|
||||||
|
.. image:: images/oc_client_download_options.png
|
||||||
|
|
||||||
|
Desktop client download selections
|
||||||
|
|
||||||
|
3. Click the 'Download for Windows' option.
|
||||||
|
The Desktop Client download page opens.
|
||||||
|
|
||||||
|
.. image:: images/oc_client_windows_download.png
|
||||||
|
|
||||||
|
ownCloud Windows Client Download
|
||||||
|
|
||||||
|
4. Click the 'download' button.
|
||||||
|
|
||||||
|
The Microsoft Windows client download begins. Depending on your browser
|
||||||
|
settings, the client installation file might launch automatically.
|
||||||
|
|
||||||
|
5. Once the download completes, locate the client installation file in your system Downloads folder.
|
||||||
|
|
||||||
|
6. Double-click the client installation file to start the download.
|
||||||
|
|
||||||
|
The Open File - Security Warning dialog box opens.
|
||||||
|
|
||||||
|
.. image:: images/security_warning_windows.png
|
||||||
|
|
||||||
|
Open File - Security Warning dialog box
|
||||||
|
|
||||||
|
7. Click 'Run' in the dialog box to begin the installation.
|
||||||
|
|
||||||
|
On systems running virus protection software, you might have to verify
|
||||||
|
that you want to install the ownCloud Desktop Client software.
|
||||||
|
|
||||||
|
8. Click 'Yes' to continue with the software installation.
|
||||||
|
|
||||||
|
The ownCloud Setup Wizard window opens.
|
||||||
|
|
||||||
|
.. image:: images/client_setup_wizard_main.png
|
||||||
|
|
||||||
|
ownCloud Setup Wizard Window
|
||||||
|
|
||||||
|
9. Click 'Next' to continue.
|
||||||
|
|
||||||
|
The Choose Components window opens.
|
||||||
|
|
||||||
|
.. image:: images/client_setup_wizard_components.png
|
||||||
|
|
||||||
|
Choose Components Window
|
||||||
|
|
||||||
|
10. Choose the components that you want to install for the Desktop Client.
|
||||||
|
|
||||||
|
All relevant components for your platform are selected by default.
|
||||||
|
However, you can choose to exlude different components from the installation.
|
||||||
|
|
||||||
|
11. Click Next to continue.
|
||||||
|
|
||||||
|
The Choose Install Location window opens.
|
||||||
|
|
||||||
|
.. image:: images/client_setup_wizard_location.png
|
||||||
|
|
||||||
|
Choose Install Location window
|
||||||
|
|
||||||
|
12. Verify the destination folder for the Desktop Client installation and then click Install.
|
||||||
|
|
||||||
|
The Installing window opens.
|
||||||
|
|
||||||
|
.. image:: images/client_setup_wizard_install_progress.png
|
||||||
|
|
||||||
|
Installing window
|
||||||
|
|
||||||
|
13. Once the installation completes, click 'Next' to continue.
|
||||||
|
|
||||||
|
The Setup Wizard Completion window opens.
|
||||||
|
|
||||||
|
.. image:: images/client_setup_wizard_install_finish.png
|
||||||
|
|
||||||
|
Completion window
|
||||||
|
|
||||||
|
You can choose to launch the Desktop Client from this window or launch the application at another time.
|
||||||
|
|
||||||
|
14. Click 'Finish' to complete the installation.
|
||||||
|
|
||||||
|
After the installation completes, go to Setting Up the ownCloud Desktop Client.
|
||||||
13
doc/installing.rst
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Installing the Synchronization Client
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
The latest version of the ownCloud Synchronization Client can be obtained from
|
||||||
|
the `ownCloud Website <http://www.owncloud.com>`_. You can download and install
|
||||||
|
the client on Windows, MAC OSX, and various Linux software distrubutions. The
|
||||||
|
following sections describe specific support and installation procedures for
|
||||||
|
the different software platforms:
|
||||||
|
|
||||||
|
- :ref:`installing-windows`
|
||||||
|
- :ref:`installing-macosx`
|
||||||
|
- :ref:`installing-linux`
|
||||||
|
|
||||||
@@ -1,32 +1,14 @@
|
|||||||
Introduction
|
Introduction
|
||||||
============
|
============
|
||||||
|
|
||||||
The ownCloud Sync Client is a desktop program installed on a user’s computer.
|
Available for Windows, MAC OS X, and various Linux distributions, the ownCloud
|
||||||
It allows a user to specify one or more directories on the local machine to
|
Sync client is a desktop program installed on your computer. The client enables
|
||||||
sync to the ownCloud server. It allows the user to always have the latest
|
you to:
|
||||||
files wherever they may be. When a change is made to the file on the
|
|
||||||
computer, it will sync to the ownCloud server via the sync client.
|
|
||||||
|
|
||||||
The ownCloud Sync Client is available for Windows, MAC OS X, and various
|
- Specify one or more directories on your computer that you want to synchronize
|
||||||
Linux distributions.
|
to the ownCloud server.
|
||||||
|
- Always have the latest files synchronized, wherever they are located.
|
||||||
|
|
||||||
Obtaining the Client
|
Changes made to any synchronized file on the computer are automatically made to
|
||||||
--------------------
|
the files on the ownCloud server using the sync client.
|
||||||
|
|
||||||
The latest version of the Client can be obtained on the ownCloud web site.
|
|
||||||
|
|
||||||
ownCloud client for **Windows** is provided as a NSIS-based setup file for
|
|
||||||
machine-wide install. Installing the ownCloud client on **Mac OS** follows
|
|
||||||
the normal app bundle installation pattern:
|
|
||||||
|
|
||||||
1. Download the installation file: Click ``ownCloud-x.y.z.dmg``, a window with
|
|
||||||
the ownCloud icon opens.
|
|
||||||
2. In that window, drag the ownCloud application into the ``Applications``
|
|
||||||
folder.
|
|
||||||
3. On the right hand side From ``Applications``, choose ``ownCloud``.
|
|
||||||
|
|
||||||
The ownCloud client is also provided as in a convenient repository for a wide
|
|
||||||
range of popular **Linux distributions**.
|
|
||||||
|
|
||||||
Supported distributions are Fedora, openSUSE, Ubuntu and Debian.
|
|
||||||
To support other distributions, a is required, see :ref:`building-label`
|
|
||||||
|
|||||||
313
doc/navigating.rst
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
Using the Synchronization Client
|
||||||
|
================================
|
||||||
|
|
||||||
|
.. index:: navigating, usage
|
||||||
|
|
||||||
|
The ownCloud Client remains in the background and is visible as an icon in the
|
||||||
|
system tray (Windows, KDE), status bar (MAC OS X), or notification area
|
||||||
|
(Ubuntu).
|
||||||
|
|
||||||
|
.. image:: images/icon.png
|
||||||
|
|
||||||
|
**ownCloud Desktop Client icon**
|
||||||
|
|
||||||
|
Using the Desktop Client Menu
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
A right click on the icon (left click on Ubuntu and Mac OS X) provides the
|
||||||
|
following menu:
|
||||||
|
|
||||||
|
.. image:: images/menu.png
|
||||||
|
|
||||||
|
**ownCloud Desktop Client menu**
|
||||||
|
|
||||||
|
The Desktop Client menu provides the following options:
|
||||||
|
|
||||||
|
* ``Open ownCloud in browser``: Launches the ownCloud WEB interface.
|
||||||
|
* ``Open folder 'ownCloud'``: Opens the ownCloud local folder. If you have defined multiple synchronization targets, the window displays each local folder.
|
||||||
|
* **Disk space indicator**: Indicates the amount of space currently used on the server.
|
||||||
|
* Operation indicator: Displays the status of the current synchronization process or indicates ``Up to date`` if the server and client are in sync.
|
||||||
|
* **Recent Changes**: Displays the last six files modified by the synchronization operations and provides access to the current synchronization status listing all changes since the last restart of the ownCloud client.
|
||||||
|
* ``Settings...``: Provides access to the settings menu.
|
||||||
|
* ``Help``: Opens a browser to display ownCloud Desktop Client Guide.
|
||||||
|
* ``Sign out``: Disables the client from continued synchronizations.
|
||||||
|
* ``Quit ownCloud``: Quits the ownCloud Client, ending any currently running
|
||||||
|
synchronizations.
|
||||||
|
|
||||||
|
Using the Account Settings Window
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
.. index:: account settings, user, password, Server URL
|
||||||
|
|
||||||
|
The ``Account`` window provides a summary for general settings associated with the ownCloud account. This window enalbes you to manage any synchronized folders in the account and enables you to modify them.
|
||||||
|
|
||||||
|
To access and modify the account settings:
|
||||||
|
|
||||||
|
.. image:: images/settings_account.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
The fields and options in this window include:
|
||||||
|
|
||||||
|
* ``Connected to <ownCloud instance> as <user>`` field: Indicates the ownCloud server to which the client is synchronizing and the user account on that server.
|
||||||
|
|
||||||
|
* ``Add Folder...`` button: Provides the ability to add another folder to the synchronization process (see ``Adding a Folder``).
|
||||||
|
|
||||||
|
* ``Pause/Resume`` button: Pauses the current sync (or prevents the client from starting a new sync) or resumes the sync process.
|
||||||
|
|
||||||
|
* ``Remove`` button: Removes the selected folder from the sync process. This button is used when you want to synchronize only a few folders and not the root folder. If only the root folder is available, you must first remove the root from the synchronization and then add individual folders that you want to synchronize as desired.
|
||||||
|
|
||||||
|
* ``Storage Usage`` field: Indicates the storage utilization on the ownCloud server.
|
||||||
|
|
||||||
|
* ``Edit Ignored Files`` button: Launches the Ignored Files Editor.
|
||||||
|
|
||||||
|
* ``Modify Account`` button: Enables you to change the ownCloud server to which you are synchronizing. This option launches the ``Setting up an Account`` windows (See ??).
|
||||||
|
|
||||||
|
|
||||||
|
Adding a Folder
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The ``Add a Folder ...`` button enables you to add a new folder to the syncrhonization process.
|
||||||
|
|
||||||
|
To add a new folder:
|
||||||
|
|
||||||
|
1. Click the ``Add a Folder ...`` button in the Account window.
|
||||||
|
|
||||||
|
The ``Add Folder...`` window opens
|
||||||
|
|
||||||
|
.. image:: images/folderwizard_local.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
**``Add Folder...`` window (local folder)**
|
||||||
|
|
||||||
|
2. Specify a *unique* path and alias name to the folder or use the ``Choose...`` button to locate the new folder on your system to which you want to synchronize.
|
||||||
|
|
||||||
|
..note:: Nested synchronizations are not supported. In other words, you
|
||||||
|
cannot add a folder that is already contained within another synchronized
|
||||||
|
folder. In addition, you cannot add a higher level (parent) folder that
|
||||||
|
contains a folder to which you are already synchronizing. By default, the
|
||||||
|
ownCloud Set Up Wizard syncrhonizes your entire ownCloud account to the root
|
||||||
|
folder of the ownCloud server. Due to this default setup, you must first remove
|
||||||
|
the top-level folder prior to specifying new synchronizations.
|
||||||
|
|
||||||
|
3. Click 'Next' to continue.
|
||||||
|
|
||||||
|
A window opens prompting you to select a remote destination folder on the
|
||||||
|
ownCloud server to which you want to synchronize.
|
||||||
|
|
||||||
|
.. image:: images/folderwizard_remote.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
**``Add Folder...`` window (remote destination)**
|
||||||
|
|
||||||
|
4. Select a folder on the ownCloud server to which you want to synchronize your newly added folder.
|
||||||
|
|
||||||
|
..note:: A server folder can only be synchronized with a particular client once.
|
||||||
|
If you attempt to sync the root directory, you cannot sync with other folders
|
||||||
|
on the server. Similarly, if you sync with folder ``/a``, you cannot create
|
||||||
|
another sync with ``/a/b``, since ``b`` is already being synched.
|
||||||
|
|
||||||
|
Editing Ignored Files
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The :guilabel:`Ignored Files Editor` provides a list of preconfigured files
|
||||||
|
that are ignored (that is, not synchronized) by the client and server during
|
||||||
|
synchronizations. The Ignored Files Editor enables you to add patterns for
|
||||||
|
files or directories that you want to exclude from the synchronization process.
|
||||||
|
In addition to using standard characters, the Ignored Files Editor enables you
|
||||||
|
to use wild cards (for example, using an asterisk ‘*’ to indicate multiple
|
||||||
|
characters or a question mark ‘?’ to incidate a single character).
|
||||||
|
|
||||||
|
For additional information about this editor, see `Using the Ignored Files Editor`_
|
||||||
|
|
||||||
|
Using the Activity Settings Window
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
.. index:: activity, recent changes, sync activity
|
||||||
|
|
||||||
|
The Activity window provides an in-depth account of recent synchronization
|
||||||
|
activity. It shows files that have not been synchronized because they are on
|
||||||
|
the ignored files list or because they cannot be synced in a cross-platform
|
||||||
|
manner due to containing special characters that cannot be stored on certain
|
||||||
|
file systems.
|
||||||
|
|
||||||
|
.. image:: images/settings_activity.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
**Activity settings window**
|
||||||
|
|
||||||
|
You can open the Activity window in one of the following ways:
|
||||||
|
|
||||||
|
- Click 'Activity' in the left frame of the ownCloud Settings window.
|
||||||
|
|
||||||
|
- Invoke the window from the ownCloud Desktop Client menu by selecting ``Recent
|
||||||
|
Changes`` > ``Details...``. (See Using the Desktop Client Menu.)
|
||||||
|
|
||||||
|
Using the General Settings Window
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
.. index:: general settings, auto start, startup, desktop notifications
|
||||||
|
|
||||||
|
The General settings window enables you to set general settings for the
|
||||||
|
ownCloud Desktop Client and provides information about the software version,
|
||||||
|
its creator, and the existance of any updates.
|
||||||
|
|
||||||
|
.. image:: images/settings_general.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
**General settings window**
|
||||||
|
|
||||||
|
The settings and information contained in this window are as follows:
|
||||||
|
|
||||||
|
* ``Launch on System Startup`` checkbox: Provides the option to check (enable)
|
||||||
|
or uncheck (disable) whether the ownCloud Desktop Client launches upon system
|
||||||
|
startup. By default, this option is enabled (checked)once you have configured
|
||||||
|
your account.
|
||||||
|
|
||||||
|
* ``Show Desktop Nofications`` checkbox: Provides the option to check (enable)
|
||||||
|
or uncheck (disable) bubble notifications alerting you as to when a set of
|
||||||
|
synchronization operations is performed.
|
||||||
|
|
||||||
|
* ``Use Monochrome Icons`` checkbox: Provides the option to check (enable) or
|
||||||
|
uncheck (disable) the use of monochrome (visually less obtrusive) icons.
|
||||||
|
|
||||||
|
.. note:: This option can be useful on MAC OSX platforms.
|
||||||
|
|
||||||
|
* ``About`` field: Provides information about the software authors along with
|
||||||
|
pertinent build conditions.
|
||||||
|
|
||||||
|
.. note:: Information in this field can be valuable when submitting a support request.
|
||||||
|
|
||||||
|
* ``Updates`` field: Provides information about any available updates for the
|
||||||
|
ownCloud Desktop Client.
|
||||||
|
|
||||||
|
Using the Network Settings Window
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
.. index:: proxy settings, SOCKS, bandwith, throttling, limiting
|
||||||
|
|
||||||
|
The Network settings window enables you to define network proxy settings as
|
||||||
|
well as limit the download and upload bandwidth utilization of file
|
||||||
|
synchronizations.
|
||||||
|
|
||||||
|
.. image:: images/settings_network.png
|
||||||
|
:scale: 50 %
|
||||||
|
|
||||||
|
**Network settings window**
|
||||||
|
|
||||||
|
Specifying Proxy Settings
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
A proxy server is a server (for example, a computer system or an application)
|
||||||
|
that functions as an intermediary contact for requests from clients that are
|
||||||
|
seeking resources from other servers. For the ownCloud Desktop Client, you can
|
||||||
|
define the following proxy settings:
|
||||||
|
|
||||||
|
* ``No Proxy`` option: Specifies that the ownCloud Client circumvent the default proxy configured on the system.
|
||||||
|
* ``Use system proxy`` option: Default setting. Follows the systems proxy
|
||||||
|
settings. On Linux systems, this setting uses the value of the variable
|
||||||
|
``http_proxy``.
|
||||||
|
* ``Specify proxy manually as`` option: Enables you to specify
|
||||||
|
the following custom proxy settings:
|
||||||
|
- ``HTTP(S)``: Used when you are required to use an HTTP(S) proxy server (for example, Squid or Microsoft Forefront TMG).
|
||||||
|
- ``SOCKSv5``: Typically used in special company LAN setups, or in combination with the OpenSSH
|
||||||
|
dynamic application level forwarding feature (see ``ssh -D``).
|
||||||
|
- ``Host``: Host name or IP address of the proxy server along with the port number. HTTP proxies
|
||||||
|
typically listen over Ports 8080 (default) or 3128. SOCKS servers typically listen over port 1080.
|
||||||
|
* ``Proxy Server requires authentication`` checkbox: Provides the option to check (enable/require) or
|
||||||
|
uncheck (disable/not require) proxy server authentication. When not checked, the proxy server must
|
||||||
|
be configured to allow anonymous usage. When checked, a proxy server username and password is required.
|
||||||
|
|
||||||
|
Bandwidth Limiting
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Synchronization of files between a client and server can utilized a lot of
|
||||||
|
bandwidth. Bandwidth limiting can assist in shaping the total download or
|
||||||
|
upload bandwidth (or both) of your client/server connection to a more
|
||||||
|
manageable level. By limiting your bandwidth usage, you can maintain free
|
||||||
|
bandwidth for other applications to use.
|
||||||
|
|
||||||
|
The ownCloud Desktop Client enables you to limit (throttle) the bandwidth usage
|
||||||
|
for both file downloads and file uploads. The Download Bandwidth field (for
|
||||||
|
data flowing from the ownCloud server to the client) provides the following
|
||||||
|
options:
|
||||||
|
|
||||||
|
- ``No limit`` option: The default setting for the client; specifies that there
|
||||||
|
are no limit settings on the amount of data downloaded from the server.
|
||||||
|
|
||||||
|
- ``Limit to <value> KBytes/s`` option: Limits (throttles) the bandwidth to
|
||||||
|
a customized value (in KBytes/second).
|
||||||
|
|
||||||
|
The Upload Bandwidth field (for data flowing from the ownCloud client to the
|
||||||
|
server) provides the following options:
|
||||||
|
|
||||||
|
- ``No limit`` option: The default setting for the client; specifies that there
|
||||||
|
are no limit settings on the amount of data downloaded from the server.
|
||||||
|
|
||||||
|
- ``Limit automatically``: When enabled, the ownCloud client surrenders
|
||||||
|
available bandwidth to other applications. Use this option if there are
|
||||||
|
issues with real time communication (for example, the use of IP phone or live
|
||||||
|
streaming) in conjunction with the ownCloud Client.
|
||||||
|
|
||||||
|
- ``Limit to <value> KBytes/s`` option: Limits (throttles) the bandwidth to a
|
||||||
|
customized value (in KBytes/second).
|
||||||
|
|
||||||
|
|
||||||
|
.. _ignoredFilesEditor-label:
|
||||||
|
|
||||||
|
Using the Ignored Files Editor
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
.. index:: ignored files, exclude files, pattern
|
||||||
|
|
||||||
|
You might have some files or directories that you do not want to backup and
|
||||||
|
store on the server. To identify and exclude these files or directories, you
|
||||||
|
can use the *Ignored Files Editor* that is embedded in the ownCloud Desktop
|
||||||
|
Client.
|
||||||
|
|
||||||
|
.. image:: images/ignored_files_editor.png
|
||||||
|
:scale: 50%
|
||||||
|
|
||||||
|
Ignored Files Editor window
|
||||||
|
|
||||||
|
The :guilabel:`Ignored Files Editor` enables you to define customized patterns that the
|
||||||
|
ownCloud Client uses to identify files and directories that you want to exclude
|
||||||
|
from the synchronization process. For your convenience, the editor is
|
||||||
|
pre-populated with a default list of typically ignore patterns. These patterns
|
||||||
|
are contained in a system file (typically ``sync-exclude.lst``) located in the
|
||||||
|
ownCloud Client application directory. You cannot modify these pre-populated
|
||||||
|
patterns directly from the editor. However, if necessary, you can hover over
|
||||||
|
any pattern in the list to show the path and filename associated with that
|
||||||
|
pattern, locate the file, and edit the ``sync-exclude.lst`` file.
|
||||||
|
|
||||||
|
.. note:: Modifying the global exclude definition file might render the client
|
||||||
|
unusable or result in undesired behavior.
|
||||||
|
|
||||||
|
Each line in the editor contains an ignore pattern string. When creating custom
|
||||||
|
patterns, in addition to being able to use normal characters to define an
|
||||||
|
ignore pattern, you can use wildcards characters for matching values. As an
|
||||||
|
example, you can use an asterisk (``*``) to idenfify an arbitrary number of
|
||||||
|
characters or a question mark (``?``) to identify a single character.
|
||||||
|
|
||||||
|
Patterns that end with a slash character (``/``) are applied to only directory
|
||||||
|
components of the path being checked.
|
||||||
|
|
||||||
|
.. note:: Custom entries are currently not validated for syntactical
|
||||||
|
correctness by the editor, but might fail to load correctly.
|
||||||
|
|
||||||
|
Each pattern string in the list is preceded by a checkbox. When the check box
|
||||||
|
contains a check mark, in addition to ignoring the file or directory component
|
||||||
|
matched by the pattern, any matched files are also deemed "fleeting metadata"
|
||||||
|
and removed by the client.
|
||||||
|
|
||||||
|
In addition to excluding files and directories that use patterns defined in
|
||||||
|
this list:
|
||||||
|
|
||||||
|
- The ownCloud Client always excludes files containing characters that cannot
|
||||||
|
be synchronized to other file systems.
|
||||||
|
|
||||||
|
- As of ownCloud Desktop Client version 1.5.0, files are removed that cause
|
||||||
|
individual errors three times during a synchronization. However, the client
|
||||||
|
provides the option of retrying a synchronization three additional times on
|
||||||
|
files that produce errors.
|
||||||
|
|
||||||
|
For more detailed information see :ref:`ignored-files-label`.
|
||||||
@@ -1,24 +1,23 @@
|
|||||||
When invoking the client from the command line, the following options are supported:
|
When invoking the client from the command line, the following options are supported:
|
||||||
|
|
||||||
``-h``, ``--help``
|
``-h``, ``--help``
|
||||||
shows all the below options (opens a window on Windows)
|
Displays all the options below or, when used on Windows, opens a window displaying all options.
|
||||||
|
|
||||||
``--logwindow``
|
``--logwindow``
|
||||||
open a window to show log output.
|
Opens a window displaying log output.
|
||||||
|
|
||||||
``--logfile`` `<filename>`
|
``--logfile`` `<filename>`
|
||||||
write log output to file <filename>. To write to stdout, specify `-`
|
Write log output to the file specified. To write to stdout, specify `-` as the filename.
|
||||||
as filename
|
|
||||||
|
|
||||||
``--logdir`` `<name>`
|
``--logdir`` `<name>`
|
||||||
write each sync log output in a new file in directory <name>
|
Writes each synchronization log output in a new file in the specified directory.
|
||||||
|
|
||||||
``--logexpire`` `<hours>`
|
``--logexpire`` `<hours>`
|
||||||
removes logs older than <hours> hours. (to be used with --logdir)
|
Removes logs older than the value specified (in hours). This command is used with ``--logdir``.
|
||||||
|
|
||||||
``--logflush``
|
``--logflush``
|
||||||
flush the log file after every write.
|
Clears (flushes) the log file after each write action.
|
||||||
|
|
||||||
``--confdir`` `<dirname>`
|
``--confdir`` `<dirname>`
|
||||||
Use the given configuration directory.
|
Uses the specified configuration directory.
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,9 @@ SYNOPSIS
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
ownCloud is a file synchronisation desktop utility based on mirall.
|
The ownCloud Client is a file synchronization desktop utility based on mirall. It synchronizes files on your local computer, tablet, or handheld device with an ownCloud Server. If you make a change to the files on one device, the change is propagated to all other syncrhonized devices using the desktop synchronization clients.
|
||||||
It synchronizes files on your local machine with an ownCloud Server. If you
|
|
||||||
make a change to the files on one computer, it will flow across the others
|
|
||||||
using this desktop sync clients.
|
|
||||||
|
|
||||||
Normally you start the client by click on the desktop icon or start from the
|
Normally, you start the client by clicking on the desktop icon or by starting it from the client application menu. After starting, an ownCloud icon appears in the computer system tray or on your tablet or handheld device.
|
||||||
application menu. After starting an ownCloud icon appears in the system tray.
|
|
||||||
|
|
||||||
Options
|
Options
|
||||||
=======
|
=======
|
||||||
|
|||||||
@@ -9,38 +9,38 @@ SYNOPSIS
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
owncloudcmd is the command line tool for the ownCloud file synchronisation
|
owncloudcmd is the command line tool used for the ownCloud file synchronization
|
||||||
desktop utility, based on mirall.
|
desktop utility. This command line tool is based on mirall.
|
||||||
|
|
||||||
Contrary to the :manpage:`owncloud(1)` GUI client, `owncloudcmd` will only
|
Contrary to the :manpage:`owncloud(1)` GUI client, `owncloudcmd` only performs
|
||||||
perform a single sync run and then exit. It thus replaces the `ocsync` binary
|
a single sync run and then exits. In so doing, `owncloudcmd` replaces the
|
||||||
used for the same purpose in earlier releases.
|
`ocsync` binary used for the same purpose in earlier releases.
|
||||||
|
|
||||||
A sync run will sync a single local directory with a WebDAV share on a
|
A *sync run* synchronizes a single local directory using a WebDAV share on a
|
||||||
remote ownCloud server.
|
remote ownCloud server.
|
||||||
|
|
||||||
To invoke the command line client, provide the local and the remote repository:
|
To invoke the command line client, provide the local and the remote repository:
|
||||||
The first parameter is the local directory. The second parameter is
|
The first parameter is the local directory. The second parameter is
|
||||||
the server URL.
|
the server URL.
|
||||||
|
|
||||||
.. note:: Prior to 1.6, the tool only accepted ``owncloud://`` or ``ownclouds://``
|
.. note:: Prior to the 1.6 release of owncloudcmd, the tool only accepted
|
||||||
in place of ``http://`` and ``https://`` as a scheme. See ``Examples``
|
``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
|
||||||
for details.
|
a scheme. See ``Examples`` for details.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
=======
|
=======
|
||||||
``--confdir`` `PATH`
|
``--confdir`` `PATH`
|
||||||
The configuration dir where `csync.conf` is located
|
Specifies the configuration directory where `csync.conf` is located.
|
||||||
|
|
||||||
``--silent``
|
``--silent``
|
||||||
Don't give verbose log output
|
Inhibits verbose log output.
|
||||||
|
|
||||||
``--httpproxy http://[user@pass:]<server>:<port>``
|
``--httpproxy http://[user@pass:]<server>:<port>``
|
||||||
Use ``server`` as HTTP proxy
|
Uses ``server`` as HTTP proxy.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
=======
|
=======
|
||||||
To sync the ownCloud directory ``Music`` to the local directory ``media/music``
|
To synchronize the ownCloud directory ``Music`` to the local directory ``media/music``
|
||||||
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
|
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
|
||||||
the command line would be::
|
the command line would be::
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ the command line would be::
|
|||||||
https://server/owncloud/remote.php/webdav/Music
|
https://server/owncloud/remote.php/webdav/Music
|
||||||
|
|
||||||
|
|
||||||
Using the legacy scheme, it would look like this::
|
Using the legacy scheme, it would be::
|
||||||
|
|
||||||
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
||||||
$HOME/media/music \
|
$HOME/media/music \
|
||||||
|
|||||||
@@ -1,44 +1,43 @@
|
|||||||
The ownCloud Client packages come with a command line client which
|
The ownCloud Client packages contain a command line client that can be used to
|
||||||
can be used to synchronize ownCloud files to client machines. The
|
synchronize ownCloud files to client machines. The command line client is
|
||||||
command line client is called ``owncloudcmd``.
|
called ``owncloudcmd``.
|
||||||
|
|
||||||
owncloudcmd performs a single sync run and then exits.
|
owncloudcmd performs a single *sync run* and then exits the synchronization
|
||||||
That means that it processes the differences between client- and
|
process. In this manner, owncloudcmd processes the differences between client
|
||||||
server directory and propagates the files to get both repositories
|
and server directories and propagates the files to bring both repositories to
|
||||||
on the same status. Contrary to the GUI based client, it does not
|
the same state. Contrary to the GUI-based client, owncloudcmd does not repeat
|
||||||
repeat syncs on its own. It does also not monitor for file system
|
synchronizations on its own. It also does not monitor for file system changes.
|
||||||
changes.
|
|
||||||
|
|
||||||
To invoke the command line client, the user has to provide the local
|
To invoke the owncloudcmd, you must provide the local and the remote repository
|
||||||
and the remote repository urls::
|
urls using the following command::
|
||||||
|
|
||||||
owncloudcmd [OPTIONS...] sourcedir owncloudurl
|
owncloudcmd [OPTIONS...] sourcedir owncloudurl
|
||||||
|
|
||||||
where ``sourcedir`` is the local directory and ``owncloudurl`` is
|
where ``sourcedir`` is the local directory and ``owncloudurl`` is
|
||||||
the server url.
|
the server URL.
|
||||||
|
|
||||||
.. note:: Prior to 1.6, the tool only accepted ``owncloud://`` or
|
.. note:: Prior to the 1.6 version of owncloudcmd, the tool only accepted
|
||||||
``ownclouds://`` in place of ``http://`` and ``https://``
|
``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
|
||||||
as a scheme. See ``Examples`` for details.
|
a scheme. See ``Examples`` for details.
|
||||||
|
|
||||||
These are other comand line switches supported by owncloudcmd:
|
Other comand line switches supported by owncloudcmd include the following:
|
||||||
|
|
||||||
``--silent``
|
- ``--silent``
|
||||||
Don't give verbose log output
|
Supresses verbose log output.
|
||||||
|
|
||||||
``--confdir`` `PATH`
|
- ``--confdir`` `PATH`
|
||||||
Fetch or store configuration in this custom config directory
|
Fetches or stores configuration in the specified configuration directory.
|
||||||
|
|
||||||
``--httpproxy http://[user@pass:]<server>:<port>``
|
- ``--httpproxy http://[user@pass:]<server>:<port>``
|
||||||
Use ``server`` as HTTP proxy
|
Uses the specified ``server`` as the HTTP proxy.
|
||||||
|
|
||||||
Credential Handling
|
Credential Handling
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
By default, owncloudcmd reads the client configuration and uses the credentials
|
By default, owncloudcmd reads the client configuration and uses the credentials
|
||||||
of the GUI sync client. If no client was configured or to use a different user
|
of the GUI syncrhonization client. If no client is configured, or if you choose
|
||||||
to sync, the user password setting can be specified with the usual URL pattern,
|
to use a different user to synchronize, you can specify the user password
|
||||||
for example::
|
setting with the usual URL pattern. For example::
|
||||||
|
|
||||||
https://user:secret@192.168.178.2/remote.php/webdav
|
https://user:secret@192.168.178.2/remote.php/webdav
|
||||||
|
|
||||||
@@ -46,16 +45,16 @@ for example::
|
|||||||
Example
|
Example
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
To sync the ownCloud directory ``Music`` to the local directory ``media/music``
|
To synchronize the ownCloud directory ``Music`` to the local directory
|
||||||
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
|
``media/music`, through a proxy listening on port ``8080``, and on a gateway
|
||||||
the command line would be::
|
machine using IP address ``192.168.178.1``, the command line would be::
|
||||||
|
|
||||||
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
||||||
$HOME/media/music \
|
$HOME/media/music \
|
||||||
https://server/owncloud/remote.php/webdav/Music
|
https://server/owncloud/remote.php/webdav/Music
|
||||||
|
|
||||||
|
|
||||||
Using the legacy scheme, it would look like this::
|
Using the legacy scheme, the command line would be::
|
||||||
|
|
||||||
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
|
||||||
$HOME/media/music \
|
$HOME/media/music \
|
||||||
|
|||||||
@@ -1,136 +1,223 @@
|
|||||||
Appendix C: Troubleshooting
|
Appendix C: Troubleshooting
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
If the client fails to start syncing it basically can have two
|
The following two general issues can result in failed synchronization:
|
||||||
basic reasons: Either the server setup has a problem or the client
|
|
||||||
has a bug. When reporting bugs, it is crucial to find out what part
|
|
||||||
of the system causes the problem.
|
|
||||||
|
|
||||||
Identifying basic functionality problems
|
- The server setup is incorrect.
|
||||||
|
- The client contains a bug.
|
||||||
|
|
||||||
|
When reporting bugs, it is helpful if you first determine what part of the
|
||||||
|
system is causing the issue.
|
||||||
|
|
||||||
|
Identifying Basic Functionality Problems
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
:Perform a general ownCloud Server test:
|
:Performing a general ownCloud Server test:
|
||||||
A very first check is to verify that you can log on to ownClouds web
|
The first step in troubleshooting synchronization issues is to verify that
|
||||||
application. Assuming your ownCloud instance is installed at
|
you can log on to the ownCloud web application. To verify connectivity to the
|
||||||
``http://yourserver.com/owncloud``, type
|
ownCloud server:
|
||||||
``http://yourserver.com/owncloud/`` into your browsers address bar.
|
|
||||||
|
- Open a browser window and enter the server address to your own server in the location/address bar.
|
||||||
|
|
||||||
|
For example, if your ownCloud instance is installed at URL address
|
||||||
|
``http://yourserver.com/owncloud``, enter ``http://yourserver.com/owncloud/``
|
||||||
|
into your browsers location/address bar.
|
||||||
|
|
||||||
If you are not prompted to enter your user name and password, or if you
|
If you are not prompted for your username and password, or if a red warning
|
||||||
see a red warning box on the page, your server setup is not correct or needs
|
box appears on the page, your server setup requires modification. Please verify
|
||||||
fixes. Please verify that your server installation is working correctly.
|
that your server installation is working correctly.
|
||||||
|
|
||||||
:Ensure the WebDAV API is working:
|
:Ensure the WebDAV API is working:
|
||||||
If all desktop clients fail to connect to ownCloud, but the access via the
|
If all desktop clients fail to connect to the ownCloud Server, but access
|
||||||
web interface works, the problem often is a mis-configuration of the WebDAV
|
using the web interface functions properly, the problem is often a
|
||||||
API.
|
misconfiguration of the WebDAV API.
|
||||||
|
|
||||||
The ownCloud client uses the built-in WebDAV access of the server content.
|
The ownCloud Client uses the built-in WebDAV access of the server content.
|
||||||
Verify that you can log on to ownClouds WebDAV server. Assuming your ownCloud
|
Verify that you can log on to ownClouds WebDAV server. To verify connectivity
|
||||||
instance is installed at ``http://yourserver.com/owncloud``, type
|
with the ownCloud WebDAV server:
|
||||||
``http://yourserver.com/owncloud/remote.php/webdav`` into your browsers
|
|
||||||
address bar.
|
|
||||||
|
|
||||||
If you are prompted, but the authentication fails even though the credentials
|
- Open a browser window and enter the address to the ownCloud WebDAV server.
|
||||||
your provided are correct, please ensure that your authentication backend
|
|
||||||
is configured properly.
|
For example, if your ownCloud instance is installed at
|
||||||
|
``http://yourserver.com/owncloud``, your WebDAV server address is
|
||||||
|
``http://yourserver.com/owncloud/remote.php/webdav``.
|
||||||
|
|
||||||
|
If you are prompted for your username and password but, after providing the
|
||||||
|
correct credentials, authentication fails, please ensure that your
|
||||||
|
authentication backend is configured properly.
|
||||||
|
|
||||||
:Use a WebDAV command line tool to test:
|
:Use a WebDAV command line tool to test:
|
||||||
A more sophisticated test is to use a WebDAV command line client and log
|
A more sophisticated test method for troubleshooting syncrhonization issues
|
||||||
into the ownCloud WebDAV server, such as a little app called cadaver,
|
is to use a WebDAV command line client and log into the ownCloud WebDAV server.
|
||||||
available on Linux. It can be used to further verify that the WebDAV server is
|
One such command line client -- called cadaver -- is available for Linux
|
||||||
running properly, for example by performing PROPFIND calls:
|
distributions. You can use this application to further verify that the WebDAV
|
||||||
|
server is running properly using PROPFIND calls.
|
||||||
|
|
||||||
|
As an example, after installing the cadaver app, you can issue the
|
||||||
|
``propget`` command to obtain various properties pertaining to the current
|
||||||
|
directory and also verify WebDAV server connection.
|
||||||
|
|
||||||
``propget .`` called within cadaver will return some properties of the current
|
|
||||||
directory and thus be a successful WebDAV connect.
|
|
||||||
|
|
||||||
Isolating other issues
|
Isolating other issues
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
If the sync result is unreliable, please ensure that the folder synced with
|
Other issues can affect synchronization of your ownCloud files:
|
||||||
ownCloud is not shared with other syncing apps.
|
|
||||||
|
|
||||||
.. note:: Syncing the same directory with ownCloud and other sync software such
|
- If you find that the results of the synchronizations are unreliable, please
|
||||||
as Unison, rsync, Microsoft Windows Offline Folders or cloud services
|
ensure that the folder to which you are synchronizing is not shared with
|
||||||
such as DropBox or Microsoft SkyDrive is not supported and should
|
other synchronization applications.
|
||||||
not be attempted. In the worst case, doing so can result in data
|
|
||||||
loss.
|
|
||||||
|
|
||||||
If some files do not get take a look at the sync protocol. Some files are
|
.. note:: Synchronizing the same directory with ownCloud and other
|
||||||
automatically automatically being ignored because they are system files,
|
synchronization software such as Unison, rsync, Microsoft Windows Offline
|
||||||
others get ignored because their file name contains characters that cannot
|
Folders, or other cloud services such as DropBox or Microsoft SkyDrive is not
|
||||||
be represented on certain file systems. See :ref:`_ignored-files-label` for
|
supported and should not be attempted. In the worst case, it is possible that
|
||||||
details.
|
synchronizing folders or files using ownCloud and other synchronization
|
||||||
|
software or services can result in data loss.
|
||||||
|
|
||||||
If you are operating your own server and use the local storage backend (the
|
- If you find that only specific files are not synrchronized, the
|
||||||
default), make sure that ownCloud has exclusive access to the directory.
|
synchronization protocol might be having an effect. Some files are
|
||||||
|
automatically ignored because they are system files, other files might be
|
||||||
|
ignored because their filename contains characters that are not supported on
|
||||||
|
certain file systems. For more information about ignored files, see
|
||||||
|
:ref:`_ignored-files-label`.
|
||||||
|
|
||||||
.. note:: The data directory on the server is exclusive to ownCloud and must
|
- If you are operating your own server, and use the local storage backend (the
|
||||||
not be modified manually.
|
default), make sure that ownCloud has exclusive access to the directory.
|
||||||
|
|
||||||
If you are using a different backend, you can try to exclude a bug in the
|
.. note:: The data directory on the server is exclusive to ownCloud and must not be modified manually.
|
||||||
backend by reverting to the local backend.
|
|
||||||
|
|
||||||
Logfiles
|
If you are using a different file backend on the server, you can try to exclude a bug in the
|
||||||
--------
|
backend by reverting to the built-in backend.
|
||||||
|
|
||||||
Doing effective debugging requires to provide as much as relevant logs as
|
Log Files
|
||||||
possible. The log output can help you with tracking down problem, and if you
|
---------
|
||||||
report a bug, you're advised to include the output.
|
|
||||||
|
|
||||||
Client Logfile
|
Effectively debugging software requires as much relative information as can be
|
||||||
~~~~~~~~~~~~~~
|
obtained. To assist the ownCloud support personnel, please try to provide as
|
||||||
|
many relevant logs as possible. Log output can help with tracking down
|
||||||
|
problems and, if you report a bug, log output can help to resolve an issue more
|
||||||
|
quickly.
|
||||||
|
|
||||||
Start the client with ``--logwindow``. That opens a window providing a view
|
Obtaining the Client Log File
|
||||||
on the current log. It provides a Save button to let you save the log to a
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
file.
|
|
||||||
|
|
||||||
You can also open a log window for an already running session, by simply
|
To obtain the client log file:
|
||||||
starting the client again with this parameter. Syntax:
|
|
||||||
|
1. Open the ownCloud Desktop Client.
|
||||||
|
|
||||||
|
2. Press F12 on your keyboard.
|
||||||
|
|
||||||
|
The Log Output window opens.
|
||||||
|
|
||||||
|
.. image:: images/log_output_window.png
|
||||||
|
|
||||||
|
3. Click the 'Save' button.
|
||||||
|
|
||||||
|
The Save Log File window opens.
|
||||||
|
|
||||||
|
.. image:: images/save_log_file.png
|
||||||
|
|
||||||
|
4. Migrate to a location on your system where you want to save your log file.
|
||||||
|
|
||||||
|
5. Name the log file and click the 'Save' button.
|
||||||
|
|
||||||
|
The log files is saved in the location specifed.
|
||||||
|
|
||||||
|
Alternatively, you can launch the ownCloud Log Output window using the
|
||||||
|
``--logwindow`` command. After issuing this command, the Log Output window
|
||||||
|
opens to show the current log. You can then follow the same procedures
|
||||||
|
mentioned above to save the log to a file.
|
||||||
|
|
||||||
|
.. note:: You can also open a log window for an already running session, by
|
||||||
|
restarting the client using the following command:
|
||||||
|
|
||||||
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
|
||||||
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
|
||||||
* Linux: ``owncloud --logwindow``
|
* Linux: ``owncloud --logwindow``
|
||||||
|
|
||||||
It is also possible to directly log to a directory, which is an useful option
|
Saving Files Directly
|
||||||
in case the problem only happens ocassionally. In that case it is better to
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
create a huge amount of data, as the log window has a limited buffer.
|
|
||||||
|
|
||||||
To write logs to disk, start the client with ``--logfile <file>``, where
|
The ownCloud client enables you to save log files directly to a predefined file
|
||||||
``<file`` is the file you want to log to, or ``--logdir <dir>``, where ``<dir>``
|
or directory. This is a useful option for troubleshooting sporadic issues as
|
||||||
is an existing directory. In case of ``--logdir``, each sync run will create a
|
it enables you to log large amounts of data and bypasses the limited buffer
|
||||||
new file. To limit the amount of data that accumulates over time, there is another
|
settings associated with the log window.
|
||||||
useful parameter: ``--logexpire <hours>```. If that is combined with ```--logdir```
|
|
||||||
the client automatically erases log data in that directory that is older than the
|
|
||||||
given expiry period.
|
|
||||||
|
|
||||||
For example, for a long running test where you intend to keep the log data of the
|
To save log files to a file or a directory:
|
||||||
last two days, this would be the command line:
|
|
||||||
|
1. To save to a file, start the client using the ``--logfile <file>`` command,
|
||||||
|
where ``<file>`` is the filename to which you want to save the file.
|
||||||
|
|
||||||
|
2. To save to a directory, start the client using the ``--logdir <dir>`` command, where ``<dir>``
|
||||||
|
is an existing directory.
|
||||||
|
|
||||||
|
When using the ``--logdir`` command, each sync run creates a new file. To limit
|
||||||
|
the amount of data that accumulates over time, you can specify the
|
||||||
|
``--logexpire <hours>`` command. When combined with the ``--logdir`` command,
|
||||||
|
the client automatically erases saved log data in the directory that is older
|
||||||
|
than the specified number of hours.
|
||||||
|
|
||||||
|
As an example, to define a test where you keep log data for two days, you can
|
||||||
|
issue the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
owncloud --logdir /tmp/owncloud_logs --logexpire 48
|
owncloud --logdir /tmp/owncloud_logs --logexpire 48
|
||||||
```
|
```
|
||||||
|
|
||||||
ownCloud server Logfile
|
ownCloud server Log File
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The ownCloud server maintains an ownCloud specific logfile as well. It can and
|
The ownCloud server also maintains an ownCloud specific log file. This log file
|
||||||
must be enabled through the ownCloud Administration page. There you can adjust
|
must be enabled through the ownCloud Administration page. On that page, you can
|
||||||
the loglevel. It is advisable to set it to a verbose level like ``Debug`` or
|
adjust the log level. We recommend that when setting the log file level that
|
||||||
``Info``.
|
you set it to a verbose level like ``Debug`` or ``Info``.
|
||||||
|
|
||||||
The logfile can be viewed either in the web interface or can be found in the
|
You can view the server log file using the web interface or you can open it
|
||||||
filesystem in the ownCloud server data dir.
|
directly from the file system in the ownCloud server data directory.
|
||||||
|
|
||||||
Webserver Logfiles
|
.. todo:: Need more information on this. How is the log file accessed?
|
||||||
~~~~~~~~~~~~~~~~~~
|
Need to explore procedural steps in access and in saving this file ... similar
|
||||||
|
to how the log file is managed for the client. Perhaps it is detailed in the
|
||||||
|
Admin Guide and a link should be provided from here. I will look into that
|
||||||
|
when I begin heavily editing the Admin Guide.
|
||||||
|
|
||||||
Also, please take a look at your webservers error log file to check if there
|
Webserver Log Files
|
||||||
are problems. For Apache on Linux, the error logs usually can be found at
|
~~~~~~~~~~~~~~~~~~~
|
||||||
``/var/log/apache2``. A file called ``error_log`` shows errors like PHP code
|
|
||||||
problems. A file called ``access_log`` usually records all requests handled
|
It can be helpful to view your webservers error log file to isolate any
|
||||||
by the server. Especially the access_log is a very good debugging tool as the
|
ownCloud-related problems. For Apache on Linux, the error logs are typically
|
||||||
log line contains a lot of information of every request and it's result.
|
located in the ``/var/log/apache2`` directory. Some helpful files include the
|
||||||
|
following:
|
||||||
|
|
||||||
|
- ``error_log`` -- Maintains errors associated with PHP code.
|
||||||
|
- ``access_log`` -- Typically records all requests handled by the server; very
|
||||||
|
useful as a debugging tool because the log line contains information specific
|
||||||
|
to each request and its result.
|
||||||
|
|
||||||
More information about the apache logging can be found at
|
You can find more information about Apache logging at
|
||||||
``http://httpd.apache.org/docs/current/logs.html``.
|
``http://httpd.apache.org/docs/current/logs.html``.
|
||||||
|
|
||||||
|
Core Dumps
|
||||||
|
----------
|
||||||
|
|
||||||
|
On MAC OS X and Linux systems, and in the unlikely event the client software
|
||||||
|
crashes, the client is able to write a core dump file. Obtaining a core dump
|
||||||
|
file can assist ownCloud Customer Support tremendously in the debugging
|
||||||
|
process.
|
||||||
|
|
||||||
|
To enable the writing of core dump files, you must define the
|
||||||
|
``OWNCLOUD_CORE_DUMP`` environment variable on the system.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
OWNCLOUD_CORE_DUMP=1 owncloud
|
||||||
|
```
|
||||||
|
|
||||||
|
This command starts the client with core dumping enabled and saves the files in
|
||||||
|
the current working directory.
|
||||||
|
|
||||||
|
.. note:: Core dump files can be fairly large. Before enabling core dumps on
|
||||||
|
your system, ensure that you have enough disk space to accommodate these files.
|
||||||
|
Also, due to their size, we strongly recommend that you properly compress any
|
||||||
|
core dump files prior to sending them to ownCloud Customer Support.
|
||||||
|
|||||||
2
src/3rdparty/fancylineedit/fancylineedit.cpp
vendored
@@ -317,7 +317,7 @@ void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
|
|||||||
// IconButton - helper class to represent a clickable icon
|
// IconButton - helper class to represent a clickable icon
|
||||||
|
|
||||||
IconButton::IconButton(QWidget *parent)
|
IconButton::IconButton(QWidget *parent)
|
||||||
: QAbstractButton(parent), m_autoHide(false)
|
: QAbstractButton(parent), m_iconOpacity(0), m_autoHide(false)
|
||||||
{
|
{
|
||||||
setCursor(Qt::ArrowCursor);
|
setCursor(Qt::ArrowCursor);
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
|||||||
2
src/3rdparty/qtlockedfile/README.txt
vendored
@@ -1,5 +1,5 @@
|
|||||||
This is the src directory of the QtLockedFile
|
This is the src directory of the QtLockedFile
|
||||||
solution integrated over from Qt's Qt Creator.
|
solution integrated over from Qt's Qt Creator.
|
||||||
|
|
||||||
It is required by the QtSingleApplication solution.
|
It is required by the QtSingleApplication solution.
|
||||||
|
|
||||||
|
|||||||
41
src/3rdparty/qtlockedfile/qtlockedfile.cpp
vendored
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtlockedfile.h"
|
#include "qtlockedfile.h"
|
||||||
|
|
||||||
|
|||||||
41
src/3rdparty/qtlockedfile/qtlockedfile.h
vendored
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#ifndef QTLOCKEDFILE_H
|
#ifndef QTLOCKEDFILE_H
|
||||||
#define QTLOCKEDFILE_H
|
#define QTLOCKEDFILE_H
|
||||||
|
|||||||
11
src/3rdparty/qtlockedfile/qtlockedfile.pri
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
DEPENDPATH += $$PWD
|
||||||
|
HEADERS += $$PWD/qtlockedfile.h
|
||||||
|
SOURCES += $$PWD/qtlockedfile.cpp
|
||||||
|
|
||||||
|
unix:SOURCES += $$PWD/qtlockedfile_unix.cpp
|
||||||
|
win32:SOURCES += $$PWD/qtlockedfile_win.cpp
|
||||||
|
|
||||||
|
win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
|
||||||
|
DEFINES += QT_QTLOCKEDFILE_EXPORT=__declspec(dllexport)
|
||||||
|
}
|
||||||
42
src/3rdparty/qtlockedfile/qtlockedfile_unix.cpp
vendored
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtlockedfile.h"
|
#include "qtlockedfile.h"
|
||||||
|
|
||||||
@@ -96,6 +95,7 @@ bool QtLockedFile::unlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_lock_mode = NoLock;
|
m_lock_mode = NoLock;
|
||||||
|
remove();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
44
src/3rdparty/qtlockedfile/qtlockedfile_win.cpp
vendored
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtlockedfile.h"
|
#include "qtlockedfile.h"
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ static QString errorCodeToString(DWORD errorCode)
|
|||||||
if (data != 0)
|
if (data != 0)
|
||||||
LocalFree(data);
|
LocalFree(data);
|
||||||
|
|
||||||
if (result.endsWith('\n'))
|
if (result.endsWith(QLatin1Char('\n')))
|
||||||
result.truncate(result.length() - 1);
|
result.truncate(result.length() - 1);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -168,6 +167,7 @@ bool QtLockedFile::unlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_lock_mode = QtLockedFile::NoLock;
|
m_lock_mode = QtLockedFile::NoLock;
|
||||||
|
remove();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
src/3rdparty/qtmacgoodies
vendored
2
src/3rdparty/qtsingleapplication/README.txt
vendored
@@ -1,5 +1,5 @@
|
|||||||
This is the src directory of the QtSingleApplication solution
|
This is the src directory of the QtSingleApplication solution
|
||||||
integrated over from Qt's Qt Creator project.
|
integrated over from Qt's Qt Creator project.
|
||||||
|
|
||||||
It additionally requires the QtLockedFile solution.
|
It additionally requires the QtLockedFile solution.
|
||||||
|
|
||||||
|
|||||||
102
src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtlocalpeer.h"
|
#include "qtlocalpeer.h"
|
||||||
|
|
||||||
@@ -47,7 +46,31 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
|
|||||||
|
|
||||||
namespace SharedTools {
|
namespace SharedTools {
|
||||||
|
|
||||||
const char *QtLocalPeer::ack = "ack";
|
static const char ack[] = "ack";
|
||||||
|
|
||||||
|
QString QtLocalPeer::appSessionId(const QString &appId)
|
||||||
|
{
|
||||||
|
QByteArray idc = appId.toUtf8();
|
||||||
|
quint16 idNum = qChecksum(idc.constData(), idc.size());
|
||||||
|
//### could do: two 16bit checksums over separate halves of id, for a 32bit result - improved uniqeness probability. Every-other-char split would be best.
|
||||||
|
|
||||||
|
QString res = QLatin1String("qtsingleapplication-")
|
||||||
|
+ QString::number(idNum, 16);
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
if (!pProcessIdToSessionId) {
|
||||||
|
QLibrary lib(QLatin1String("kernel32"));
|
||||||
|
pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId");
|
||||||
|
}
|
||||||
|
if (pProcessIdToSessionId) {
|
||||||
|
DWORD sessionId = 0;
|
||||||
|
pProcessIdToSessionId(GetCurrentProcessId(), &sessionId);
|
||||||
|
res += QLatin1Char('-') + QString::number(sessionId, 16);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
res += QLatin1Char('-') + QString::number(::getuid(), 16);
|
||||||
|
#endif
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
|
QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
|
||||||
: QObject(parent), id(appId)
|
: QObject(parent), id(appId)
|
||||||
@@ -55,26 +78,7 @@ QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
|
|||||||
if (id.isEmpty())
|
if (id.isEmpty())
|
||||||
id = QCoreApplication::applicationFilePath(); //### On win, check if this returns .../argv[0] without casefolding; .\MYAPP == .\myapp on Win
|
id = QCoreApplication::applicationFilePath(); //### On win, check if this returns .../argv[0] without casefolding; .\MYAPP == .\myapp on Win
|
||||||
|
|
||||||
QByteArray idc = id.toUtf8();
|
socketName = appSessionId(id);
|
||||||
quint16 idNum = qChecksum(idc.constData(), idc.size());
|
|
||||||
//### could do: two 16bit checksums over separate halves of id, for a 32bit result - improved uniqeness probability. Every-other-char split would be best.
|
|
||||||
|
|
||||||
socketName = QLatin1String("qtsingleapplication-")
|
|
||||||
+ QString::number(idNum, 16);
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
if (!pProcessIdToSessionId) {
|
|
||||||
QLibrary lib("kernel32");
|
|
||||||
pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId");
|
|
||||||
}
|
|
||||||
if (pProcessIdToSessionId) {
|
|
||||||
DWORD sessionId = 0;
|
|
||||||
pProcessIdToSessionId(GetCurrentProcessId(), &sessionId);
|
|
||||||
socketName += QLatin1Char('-') + QString::number(sessionId, 16);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
server = new QLocalServer(this);
|
server = new QLocalServer(this);
|
||||||
QString lockName = QDir(QDir::tempPath()).absolutePath()
|
QString lockName = QDir(QDir::tempPath()).absolutePath()
|
||||||
+ QLatin1Char('/') + socketName
|
+ QLatin1Char('/') + socketName
|
||||||
@@ -100,7 +104,7 @@ bool QtLocalPeer::isClient()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QtLocalPeer::sendMessage(const QString &message, int timeout)
|
bool QtLocalPeer::sendMessage(const QString &message, int timeout, bool block)
|
||||||
{
|
{
|
||||||
if (!isClient())
|
if (!isClient())
|
||||||
return false;
|
return false;
|
||||||
@@ -130,6 +134,8 @@ bool QtLocalPeer::sendMessage(const QString &message, int timeout)
|
|||||||
bool res = socket.waitForBytesWritten(timeout);
|
bool res = socket.waitForBytesWritten(timeout);
|
||||||
res &= socket.waitForReadyRead(timeout); // wait for ack
|
res &= socket.waitForReadyRead(timeout); // wait for ack
|
||||||
res &= (socket.read(qstrlen(ack)) == ack);
|
res &= (socket.read(qstrlen(ack)) == ack);
|
||||||
|
if (block) // block until peer disconnects
|
||||||
|
socket.waitForDisconnected(-1);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,8 +146,11 @@ void QtLocalPeer::receiveConnection()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Why doesn't Qt have a blocking stream that takes care of this shait???
|
// Why doesn't Qt have a blocking stream that takes care of this shait???
|
||||||
while (socket->bytesAvailable() < static_cast<int>(sizeof(quint32)))
|
while (socket->bytesAvailable() < static_cast<int>(sizeof(quint32))) {
|
||||||
socket->waitForReadyRead();
|
if (!socket->isValid()) // stale request
|
||||||
|
return;
|
||||||
|
socket->waitForReadyRead(1000);
|
||||||
|
}
|
||||||
QDataStream ds(socket);
|
QDataStream ds(socket);
|
||||||
QByteArray uMsg;
|
QByteArray uMsg;
|
||||||
quint32 remaining;
|
quint32 remaining;
|
||||||
@@ -166,8 +175,7 @@ void QtLocalPeer::receiveConnection()
|
|||||||
QString message = QString::fromUtf8(uMsg.constData(), uMsg.size());
|
QString message = QString::fromUtf8(uMsg.constData(), uMsg.size());
|
||||||
socket->write(ack, qstrlen(ack));
|
socket->write(ack, qstrlen(ack));
|
||||||
socket->waitForBytesWritten(1000);
|
socket->waitForBytesWritten(1000);
|
||||||
delete socket;
|
emit messageReceived(message, socket); // ##(might take a long time to return)
|
||||||
emit messageReceived(message); // ##(might take a long time to return)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace SharedTools
|
} // namespace SharedTools
|
||||||
|
|||||||
51
src/3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
@@ -1,34 +1,33 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtlockedfile.h"
|
#include <qtlockedfile.h>
|
||||||
|
|
||||||
#include <QLocalServer>
|
#include <QLocalServer>
|
||||||
#include <QLocalSocket>
|
#include <QLocalSocket>
|
||||||
@@ -43,12 +42,13 @@ class QtLocalPeer : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
|
explicit QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
|
||||||
bool isClient();
|
bool isClient();
|
||||||
bool sendMessage(const QString &message, int timeout);
|
bool sendMessage(const QString &message, int timeout, bool block);
|
||||||
QString applicationId() const
|
QString applicationId() const
|
||||||
{ return id; }
|
{ return id; }
|
||||||
|
static QString appSessionId(const QString &appId);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void messageReceived(const QString &message);
|
void messageReceived(const QString &message, QObject *socket);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
void receiveConnection();
|
void receiveConnection();
|
||||||
@@ -58,9 +58,6 @@ protected:
|
|||||||
QString socketName;
|
QString socketName;
|
||||||
QLocalServer* server;
|
QLocalServer* server;
|
||||||
QtLockedFile lockFile;
|
QtLockedFile lockFile;
|
||||||
|
|
||||||
private:
|
|
||||||
static const char* ack;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace SharedTools
|
} // namespace SharedTools
|
||||||
|
|||||||
@@ -1,96 +1,123 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtsingleapplication.h"
|
#include "qtsingleapplication.h"
|
||||||
#include "qtlocalpeer.h"
|
#include "qtlocalpeer.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <qtlockedfile.h>
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
|
#include <QSharedMemory>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
namespace SharedTools {
|
namespace SharedTools {
|
||||||
|
|
||||||
void QtSingleApplication::sysInit(const QString &appId)
|
static const int instancesSize = 1024;
|
||||||
|
|
||||||
|
static QString instancesLockFilename(const QString &appSessionId)
|
||||||
{
|
{
|
||||||
actWin = 0;
|
const QChar slash(QLatin1Char('/'));
|
||||||
firstPeer = new QtLocalPeer(this, appId);
|
QString res = QDir::tempPath();
|
||||||
connect(firstPeer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
|
if (!res.endsWith(slash))
|
||||||
pidPeer = new QtLocalPeer(this, appId + QLatin1Char('-') + QString::number(QCoreApplication::applicationPid(), 10));
|
res += slash;
|
||||||
connect(pidPeer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
|
return res + appSessionId + QLatin1String("-instances");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled)
|
|
||||||
: QApplication(argc, argv, GUIenabled)
|
|
||||||
{
|
|
||||||
sysInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
|
QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
|
||||||
: QApplication(argc, argv)
|
: QApplication(argc, argv),
|
||||||
|
firstPeer(-1),
|
||||||
|
pidPeer(0)
|
||||||
{
|
{
|
||||||
this->appId = appId;
|
this->appId = appId;
|
||||||
sysInit(appId);
|
|
||||||
|
const QString appSessionId = QtLocalPeer::appSessionId(appId);
|
||||||
|
|
||||||
|
// This shared memory holds a zero-terminated array of active (or crashed) instances
|
||||||
|
instances = new QSharedMemory(appSessionId, this);
|
||||||
|
actWin = 0;
|
||||||
|
block = false;
|
||||||
|
|
||||||
|
// First instance creates the shared memory, later instances attach to it
|
||||||
|
const bool created = instances->create(instancesSize);
|
||||||
|
if (!created) {
|
||||||
|
if (!instances->attach()) {
|
||||||
|
qWarning() << "Failed to initialize instances shared memory: "
|
||||||
|
<< instances->errorString();
|
||||||
|
delete instances;
|
||||||
|
instances = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// QtLockedFile is used to workaround QTBUG-10364
|
||||||
|
QtLockedFile lockfile(instancesLockFilename(appSessionId));
|
||||||
|
|
||||||
|
lockfile.open(QtLockedFile::ReadWrite);
|
||||||
|
lockfile.lock(QtLockedFile::WriteLock);
|
||||||
|
qint64 *pids = static_cast<qint64 *>(instances->data());
|
||||||
|
if (!created) {
|
||||||
|
// Find the first instance that it still running
|
||||||
|
// The whole list needs to be iterated in order to append to it
|
||||||
|
for (; *pids; ++pids) {
|
||||||
|
if (firstPeer == -1 && isRunning(*pids))
|
||||||
|
firstPeer = *pids;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Add current pid to list and terminate it
|
||||||
|
*pids++ = QCoreApplication::applicationPid();
|
||||||
|
*pids = 0;
|
||||||
|
pidPeer = new QtLocalPeer(this, appId + QLatin1Char('-') +
|
||||||
|
QString::number(QCoreApplication::applicationPid()));
|
||||||
|
connect(pidPeer, SIGNAL(messageReceived(QString,QObject*)), SIGNAL(messageReceived(QString,QObject*)));
|
||||||
|
pidPeer->isClient();
|
||||||
|
lockfile.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QtSingleApplication::~QtSingleApplication()
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
|
||||||
QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
|
|
||||||
: QApplication(argc, argv, type)
|
|
||||||
{
|
{
|
||||||
sysInit();
|
if (!instances)
|
||||||
|
return;
|
||||||
|
const qint64 appPid = QCoreApplication::applicationPid();
|
||||||
|
QtLockedFile lockfile(instancesLockFilename(QtLocalPeer::appSessionId(appId)));
|
||||||
|
lockfile.open(QtLockedFile::ReadWrite);
|
||||||
|
lockfile.lock(QtLockedFile::WriteLock);
|
||||||
|
// Rewrite array, removing current pid and previously crashed ones
|
||||||
|
qint64 *pids = static_cast<qint64 *>(instances->data());
|
||||||
|
qint64 *newpids = pids;
|
||||||
|
for (; *pids; ++pids) {
|
||||||
|
if (*pids != appPid && isRunning(*pids))
|
||||||
|
*newpids++ = *pids;
|
||||||
|
}
|
||||||
|
*newpids = 0;
|
||||||
|
lockfile.unlock();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
|
||||||
QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE colormap)
|
|
||||||
: QApplication(dpy, visual, colormap)
|
|
||||||
{
|
|
||||||
sysInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
|
|
||||||
: QApplication(dpy, argc, argv, visual, cmap)
|
|
||||||
{
|
|
||||||
sysInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId,
|
|
||||||
int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE colormap)
|
|
||||||
: QApplication(dpy, argc, argv, visual, colormap)
|
|
||||||
{
|
|
||||||
this->appId = appId;
|
|
||||||
sysInit(appId);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool QtSingleApplication::event(QEvent *event)
|
bool QtSingleApplication::event(QEvent *event)
|
||||||
{
|
{
|
||||||
@@ -104,31 +131,26 @@ bool QtSingleApplication::event(QEvent *event)
|
|||||||
|
|
||||||
bool QtSingleApplication::isRunning(qint64 pid)
|
bool QtSingleApplication::isRunning(qint64 pid)
|
||||||
{
|
{
|
||||||
if (pid == -1)
|
if (pid == -1) {
|
||||||
return firstPeer->isClient();
|
pid = firstPeer;
|
||||||
|
if (pid == -1)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QtLocalPeer peer(this, appId + QLatin1Char('-') + QString::number(pid, 10));
|
QtLocalPeer peer(this, appId + QLatin1Char('-') + QString::number(pid, 10));
|
||||||
return peer.isClient();
|
return peer.isClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtSingleApplication::initialize(bool)
|
|
||||||
{
|
|
||||||
firstPeer->isClient();
|
|
||||||
pidPeer->isClient();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QtSingleApplication::sendMessage(const QString &message, int timeout, qint64 pid)
|
bool QtSingleApplication::sendMessage(const QString &message, int timeout, qint64 pid)
|
||||||
{
|
{
|
||||||
if (pid == -1)
|
if (pid == -1) {
|
||||||
return firstPeer->sendMessage(message, timeout);
|
pid = firstPeer;
|
||||||
|
if (pid == -1)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QtLocalPeer peer(this, appId + QLatin1Char('-') + QString::number(pid, 10));
|
QtLocalPeer peer(this, appId + QLatin1Char('-') + QString::number(pid, 10));
|
||||||
return peer.sendMessage(message, timeout);
|
return peer.sendMessage(message, timeout, block);
|
||||||
}
|
|
||||||
|
|
||||||
QString QtSingleApplication::id() const
|
|
||||||
{
|
|
||||||
return firstPeer->applicationId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QtSingleApplication::applicationId() const
|
QString QtSingleApplication::applicationId() const
|
||||||
@@ -136,16 +158,20 @@ QString QtSingleApplication::applicationId() const
|
|||||||
return appId;
|
return appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtSingleApplication::setBlock(bool value)
|
||||||
|
{
|
||||||
|
block = value;
|
||||||
|
}
|
||||||
|
|
||||||
void QtSingleApplication::setActivationWindow(QWidget *aw, bool activateOnMessage)
|
void QtSingleApplication::setActivationWindow(QWidget *aw, bool activateOnMessage)
|
||||||
{
|
{
|
||||||
actWin = aw;
|
actWin = aw;
|
||||||
if (activateOnMessage) {
|
if (!pidPeer)
|
||||||
connect(firstPeer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
|
return;
|
||||||
connect(pidPeer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
|
if (activateOnMessage)
|
||||||
} else {
|
connect(pidPeer, SIGNAL(messageReceived(QString,QObject*)), this, SLOT(activateWindow()));
|
||||||
disconnect(firstPeer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
|
else
|
||||||
disconnect(pidPeer, SIGNAL(messageReceived(QString)), this, SLOT(activateWindow()));
|
disconnect(pidPeer, SIGNAL(messageReceived(QString,QObject*)), this, SLOT(activateWindow()));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,39 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _SHAREDTOOLS_SINGLEAPPLICATION
|
#ifndef QTSINGLEAPPLICATION_H
|
||||||
#define _SHAREDTOOLS_SINGLEAPPLICATION
|
#define QTSINGLEAPPLICATION_H
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
QT_FORWARD_DECLARE_CLASS(QSharedMemory)
|
||||||
|
|
||||||
namespace SharedTools {
|
namespace SharedTools {
|
||||||
|
|
||||||
class QtLocalPeer;
|
class QtLocalPeer;
|
||||||
@@ -42,50 +43,37 @@ class QtSingleApplication : public QApplication
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
|
|
||||||
QtSingleApplication(const QString &id, int &argc, char **argv);
|
QtSingleApplication(const QString &id, int &argc, char **argv);
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
~QtSingleApplication();
|
||||||
QtSingleApplication(int &argc, char **argv, Type type);
|
|
||||||
#endif
|
|
||||||
#if defined(Q_WS_X11)
|
|
||||||
explicit QtSingleApplication(Display *dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
|
||||||
QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool isRunning(qint64 pid = -1);
|
bool isRunning(qint64 pid = -1);
|
||||||
|
|
||||||
QString id() const;
|
|
||||||
|
|
||||||
void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
|
void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
|
||||||
QWidget* activationWindow() const;
|
QWidget* activationWindow() const;
|
||||||
bool event(QEvent *event);
|
bool event(QEvent *event);
|
||||||
|
|
||||||
QString applicationId() const;
|
QString applicationId() const;
|
||||||
|
void setBlock(bool value);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
bool sendMessage(const QString &message, int timeout = 5000, qint64 pid = -1);
|
bool sendMessage(const QString &message, int timeout = 5000, qint64 pid = -1);
|
||||||
void activateWindow();
|
void activateWindow();
|
||||||
|
|
||||||
//Obsolete methods:
|
|
||||||
public:
|
|
||||||
void initialize(bool = true);
|
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
|
||||||
QtSingleApplication(Display* dpy, const QString &id, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
|
||||||
#endif
|
|
||||||
// end obsolete methods
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void messageReceived(const QString &message);
|
void messageReceived(const QString &message, QObject *socket);
|
||||||
void fileOpenRequest(const QString &file);
|
void fileOpenRequest(const QString &file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sysInit(const QString &appId = QString());
|
QString instancesFileName(const QString &appId);
|
||||||
QtLocalPeer *firstPeer;
|
|
||||||
|
qint64 firstPeer;
|
||||||
|
QSharedMemory *instances;
|
||||||
QtLocalPeer *pidPeer;
|
QtLocalPeer *pidPeer;
|
||||||
QWidget *actWin;
|
QWidget *actWin;
|
||||||
QString appId;
|
QString appId;
|
||||||
|
bool block;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace SharedTools
|
} // namespace SharedTools
|
||||||
#endif // _SHAREDTOOLS_SINGLEAPPLICATION
|
|
||||||
|
#endif // QTSINGLEAPPLICATION_H
|
||||||
|
|||||||
15
src/3rdparty/qtsingleapplication/qtsingleapplication.pri
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
DEPENDPATH += $$PWD
|
||||||
|
HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h
|
||||||
|
SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp
|
||||||
|
|
||||||
|
QT *= network
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h)
|
||||||
|
isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri)
|
||||||
|
|
||||||
|
|
||||||
|
win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
|
||||||
|
DEFINES += QT_QTSINGLEAPPLICATION_EXPORT=__declspec(dllexport)
|
||||||
|
}
|
||||||
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include "qtsinglecoreapplication.h"
|
#include "qtsinglecoreapplication.h"
|
||||||
#include "qtlocalpeer.h"
|
#include "qtlocalpeer.h"
|
||||||
@@ -37,6 +36,7 @@ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv)
|
|||||||
: QCoreApplication(argc, argv)
|
: QCoreApplication(argc, argv)
|
||||||
{
|
{
|
||||||
peer = new QtLocalPeer(this);
|
peer = new QtLocalPeer(this);
|
||||||
|
block = false;
|
||||||
connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
|
connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ bool QtSingleCoreApplication::isRunning()
|
|||||||
|
|
||||||
bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout)
|
bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout)
|
||||||
{
|
{
|
||||||
return peer->sendMessage(message, timeout);
|
return peer->sendMessage(message, timeout, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -66,4 +66,9 @@ QString QtSingleCoreApplication::id() const
|
|||||||
return peer->applicationId();
|
return peer->applicationId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtSingleCoreApplication::setBlock(bool value)
|
||||||
|
{
|
||||||
|
block = value;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace SharedTools
|
} // namespace SharedTools
|
||||||
|
|||||||
@@ -1,32 +1,31 @@
|
|||||||
/**************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
**
|
**
|
||||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
** This file is part of Qt Creator.
|
||||||
**
|
|
||||||
** Contact: http://www.qt-project.org/
|
|
||||||
**
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
**
|
**
|
||||||
** This file may be used under the terms of the GNU Lesser General Public
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
** License version 2.1 as published by the Free Software Foundation and
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
||||||
** Please review the following information to ensure the GNU Lesser General
|
|
||||||
** Public License version 2.1 requirements will be met:
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Nokia gives you certain additional
|
|
||||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
** Other Usage
|
****************************************************************************/
|
||||||
**
|
|
||||||
** Alternatively, this file may be used in accordance with the terms and
|
|
||||||
** conditions contained in a signed written agreement between you and Nokia.
|
|
||||||
**
|
|
||||||
**
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
@@ -44,6 +43,7 @@ public:
|
|||||||
|
|
||||||
bool isRunning();
|
bool isRunning();
|
||||||
QString id() const;
|
QString id() const;
|
||||||
|
void setBlock(bool value);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
bool sendMessage(const QString &message, int timeout = 5000);
|
bool sendMessage(const QString &message, int timeout = 5000);
|
||||||
@@ -55,6 +55,7 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QtLocalPeer* peer;
|
QtLocalPeer* peer;
|
||||||
|
bool block;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace SharedTools
|
} // namespace SharedTools
|
||||||
|
|||||||
14
src/3rdparty/qtsingleapplication/qtsinglecoreapplication.pri
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
DEPENDPATH += $$PWD
|
||||||
|
HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h
|
||||||
|
SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp
|
||||||
|
|
||||||
|
QT *= network
|
||||||
|
|
||||||
|
gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h)
|
||||||
|
isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri)
|
||||||
|
|
||||||
|
|
||||||
|
win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
|
||||||
|
DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport)
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
set(CMAKE_AUTOMOC TRUE)
|
set(CMAKE_AUTOMOC TRUE)
|
||||||
|
include(GenerateExportHeader)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ if (APPLE)
|
|||||||
list(APPEND 3rdparty_SRC
|
list(APPEND 3rdparty_SRC
|
||||||
3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
||||||
3rdparty/qtmacgoodies/src/macstandardicon.mm
|
3rdparty/qtmacgoodies/src/macstandardicon.mm
|
||||||
|
3rdparty/qtmacgoodies/src/macwindow.mm
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -81,6 +83,7 @@ set(libsync_SRCS
|
|||||||
mirall/folderman.cpp
|
mirall/folderman.cpp
|
||||||
mirall/folder.cpp
|
mirall/folder.cpp
|
||||||
mirall/folderwatcher.cpp
|
mirall/folderwatcher.cpp
|
||||||
|
mirall/authenticationdialog.cpp
|
||||||
mirall/syncresult.cpp
|
mirall/syncresult.cpp
|
||||||
mirall/mirallconfigfile.cpp
|
mirall/mirallconfigfile.cpp
|
||||||
mirall/syncengine.cpp
|
mirall/syncengine.cpp
|
||||||
@@ -103,6 +106,8 @@ set(libsync_SRCS
|
|||||||
mirall/quotainfo.cpp
|
mirall/quotainfo.cpp
|
||||||
mirall/clientproxy.cpp
|
mirall/clientproxy.cpp
|
||||||
mirall/syncrunfilelog.cpp
|
mirall/syncrunfilelog.cpp
|
||||||
|
mirall/cookiejar.cpp
|
||||||
|
mirall/accountmigrator.cpp
|
||||||
creds/dummycredentials.cpp
|
creds/dummycredentials.cpp
|
||||||
creds/abstractcredentials.cpp
|
creds/abstractcredentials.cpp
|
||||||
creds/credentialsfactory.cpp
|
creds/credentialsfactory.cpp
|
||||||
@@ -120,12 +125,8 @@ else()
|
|||||||
${libsync_SRCS}
|
${libsync_SRCS}
|
||||||
creds/httpcredentials.cpp
|
creds/httpcredentials.cpp
|
||||||
creds/shibbolethcredentials.cpp
|
creds/shibbolethcredentials.cpp
|
||||||
creds/shibboleth/shibbolethaccessmanager.cpp
|
|
||||||
creds/shibboleth/shibbolethcookiejar.cpp
|
|
||||||
creds/shibboleth/shibbolethwebview.cpp
|
creds/shibboleth/shibbolethwebview.cpp
|
||||||
creds/shibboleth/shibbolethrefresher.cpp
|
creds/shibboleth/shibbolethrefresher.cpp
|
||||||
creds/shibboleth/shibbolethconfigfile.cpp
|
|
||||||
creds/shibboleth/authenticationdialog.cpp
|
|
||||||
creds/shibboleth/shibbolethuserjob.cpp
|
creds/shibboleth/shibbolethuserjob.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -195,6 +196,14 @@ if(NEON_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${synclib_NAME} SHARED ${libsync_SRCS} ${syncMoc})
|
add_library(${synclib_NAME} SHARED ${libsync_SRCS} ${syncMoc})
|
||||||
|
GENERATE_EXPORT_HEADER( ${synclib_NAME}
|
||||||
|
BASE_NAME ${synclib_NAME}
|
||||||
|
EXPORT_MACRO_NAME OWNCLOUDSYNC_EXPORT
|
||||||
|
EXPORT_FILE_NAME owncloudlib.h
|
||||||
|
STATIC_DEFINE OWNCLOUD_BUILT_AS_STATIC
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if(TOKEN_AUTH_ONLY)
|
if(TOKEN_AUTH_ONLY)
|
||||||
qt5_use_modules(${synclib_NAME} Network Xml Sql)
|
qt5_use_modules(${synclib_NAME} Network Xml Sql)
|
||||||
else()
|
else()
|
||||||
@@ -239,7 +248,7 @@ else()
|
|||||||
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||||
if (SPARKLE_FOUND)
|
if (SPARKLE_FOUND)
|
||||||
install(DIRECTORY "${SPARKLE_LIBRARY}"
|
install(DIRECTORY "${SPARKLE_LIBRARY}"
|
||||||
DESTINATION "${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks")
|
DESTINATION "${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks" USE_SOURCE_PERMISSIONS)
|
||||||
endif (SPARKLE_FOUND)
|
endif (SPARKLE_FOUND)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ HttpCredentials::HttpCredentials()
|
|||||||
: _user(),
|
: _user(),
|
||||||
_password(),
|
_password(),
|
||||||
_ready(false),
|
_ready(false),
|
||||||
_fetchJobInProgress(false)
|
_fetchJobInProgress(false),
|
||||||
|
_readPwdFromDeprecatedPlace(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +142,11 @@ void HttpCredentials::syncContextPreStart (CSYNC* ctx)
|
|||||||
|
|
||||||
bool HttpCredentials::changed(AbstractCredentials* credentials) const
|
bool HttpCredentials::changed(AbstractCredentials* credentials) const
|
||||||
{
|
{
|
||||||
HttpCredentials* other(dynamic_cast< HttpCredentials* >(credentials));
|
HttpCredentials* other(qobject_cast< HttpCredentials* >(credentials));
|
||||||
|
|
||||||
|
if (!other) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!other || (other->user() != this->user())) {
|
if (!other || (other->user() != this->user())) {
|
||||||
return true;
|
return true;
|
||||||
@@ -226,6 +231,7 @@ void HttpCredentials::fetch(Account *account)
|
|||||||
job->setProperty("account", QVariant::fromValue(account));
|
job->setProperty("account", QVariant::fromValue(account));
|
||||||
job->start();
|
job->start();
|
||||||
_fetchJobInProgress = true;
|
_fetchJobInProgress = true;
|
||||||
|
_readPwdFromDeprecatedPlace = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool HttpCredentials::stillValid(QNetworkReply *reply)
|
bool HttpCredentials::stillValid(QNetworkReply *reply)
|
||||||
@@ -257,18 +263,40 @@ void HttpCredentials::slotReadJobDone(QKeychain::Job *job)
|
|||||||
_ready = true;
|
_ready = true;
|
||||||
emit fetched();
|
emit fetched();
|
||||||
} else {
|
} else {
|
||||||
if( error != NoError ) {
|
// we come here if the password is empty or any other keychain
|
||||||
qDebug() << "Error while reading password" << job->errorString();
|
// error happend.
|
||||||
|
// In all error conditions it should
|
||||||
|
// ask the user for the password interactively now.
|
||||||
|
if( _readPwdFromDeprecatedPlace ) {
|
||||||
|
// there simply was not a password. Lets restart a read job without
|
||||||
|
// a settings object as we did it in older client releases.
|
||||||
|
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
|
||||||
|
|
||||||
|
const QString kck = keychainKey(account->url().toString(), _user);
|
||||||
|
job->setKey(kck);
|
||||||
|
|
||||||
|
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotReadJobDone(QKeychain::Job*)));
|
||||||
|
job->setProperty("account", QVariant::fromValue(account));
|
||||||
|
job->start();
|
||||||
|
_readPwdFromDeprecatedPlace = false; // do try that only once.
|
||||||
|
_fetchJobInProgress = true;
|
||||||
|
// Note: if this read job succeeds, the value from the old place is still
|
||||||
|
// NOT persisted into the new account.
|
||||||
|
} else {
|
||||||
|
// interactive password dialog starts here
|
||||||
|
bool ok;
|
||||||
|
QString pwd = queryPassword(&ok);
|
||||||
|
_fetchJobInProgress = false;
|
||||||
|
if (ok) {
|
||||||
|
_password = pwd;
|
||||||
|
_ready = true;
|
||||||
|
persist(account);
|
||||||
|
} else {
|
||||||
|
_password = QString::null;
|
||||||
|
_ready = false;
|
||||||
|
}
|
||||||
|
emit fetched();
|
||||||
}
|
}
|
||||||
bool ok;
|
|
||||||
QString pwd = queryPassword(&ok);
|
|
||||||
_fetchJobInProgress = false;
|
|
||||||
if (ok) {
|
|
||||||
_password = pwd;
|
|
||||||
_ready = true;
|
|
||||||
persist(account);
|
|
||||||
}
|
|
||||||
emit fetched();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,6 +366,8 @@ void HttpCredentials::slotWriteJobDone(QKeychain::Job *job)
|
|||||||
default:
|
default:
|
||||||
qDebug() << "Error while writing password" << job->errorString();
|
qDebug() << "Error while writing password" << job->errorString();
|
||||||
}
|
}
|
||||||
|
WritePasswordJob *wjob = qobject_cast<WritePasswordJob*>(job);
|
||||||
|
wjob->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
|
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ private:
|
|||||||
QString _password;
|
QString _password;
|
||||||
bool _ready;
|
bool _ready;
|
||||||
bool _fetchJobInProgress; //True if the keychain job is in progress or the input dialog visible
|
bool _fetchJobInProgress; //True if the keychain job is in progress or the input dialog visible
|
||||||
|
bool _readPwdFromDeprecatedPlace;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // ns Mirall
|
} // ns Mirall
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QNetworkCookieJar>
|
|
||||||
|
|
||||||
#include "creds/shibboleth/shibbolethaccessmanager.h"
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
ShibbolethAccessManager::ShibbolethAccessManager(const QNetworkCookie& cookie, QObject* parent)
|
|
||||||
: MirallAccessManager (parent),
|
|
||||||
_cookie(cookie)
|
|
||||||
{}
|
|
||||||
|
|
||||||
QNetworkReply* ShibbolethAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData)
|
|
||||||
{
|
|
||||||
if (!_cookie.name().isEmpty()) {
|
|
||||||
QNetworkCookieJar* jar(cookieJar());
|
|
||||||
QUrl url(request.url());
|
|
||||||
QList<QNetworkCookie> cookies;
|
|
||||||
Q_FOREACH(const QNetworkCookie& cookie, jar->cookiesForUrl(url)) {
|
|
||||||
if (!cookie.name().startsWith("_shibsession_")) {
|
|
||||||
cookies << cookie;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cookies << _cookie; // this line and the line above replace all cookies with self and then add the shibboleth cookie (filtering the current shib cookie)
|
|
||||||
jar->setCookiesFromUrl(cookies, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
qDebug() << "Creating a request to " << request.url().toString() << " with shibboleth cookie:" << _cookie.name();
|
|
||||||
|
|
||||||
return MirallAccessManager::createRequest (op, request, outgoingData);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShibbolethAccessManager::setCookie(const QNetworkCookie& cookie)
|
|
||||||
{
|
|
||||||
qDebug() << "Got new shibboleth cookie:" << cookie.name();
|
|
||||||
_cookie = cookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MIRALL_WIZARD_SHIBBOLETH_ACCESS_MANAGER_H
|
|
||||||
#define MIRALL_WIZARD_SHIBBOLETH_ACCESS_MANAGER_H
|
|
||||||
|
|
||||||
#include <QNetworkCookie>
|
|
||||||
|
|
||||||
#include "mirall/mirallaccessmanager.h"
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
class ShibbolethAccessManager : public MirallAccessManager
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
ShibbolethAccessManager(const QNetworkCookie& cookie, QObject* parent = 0);
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
|
||||||
void setCookie(const QNetworkCookie& cookie);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData = 0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QNetworkCookie _cookie;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QTextStream>
|
|
||||||
|
|
||||||
#include "creds/shibboleth/shibbolethconfigfile.h"
|
|
||||||
#include "creds/shibboleth/shibbolethcookiejar.h"
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
|
|
||||||
const char otherCookiesC[] = "otherCookies";
|
|
||||||
|
|
||||||
} // ns
|
|
||||||
|
|
||||||
void ShibbolethConfigFile::storeCookies(const QMap<QUrl, QList<QNetworkCookie> >& cookiesForUrl)
|
|
||||||
{
|
|
||||||
if (cookiesForUrl.isEmpty()) {
|
|
||||||
removeData(QString(), QString::fromLatin1(otherCookiesC));
|
|
||||||
} else {
|
|
||||||
QByteArray data;
|
|
||||||
QTextStream stream(&data);
|
|
||||||
|
|
||||||
Q_FOREACH (const QUrl& url, cookiesForUrl.keys()) {
|
|
||||||
const QList<QNetworkCookie>& cookies(cookiesForUrl[url]);
|
|
||||||
|
|
||||||
if (cookies.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
stream << "URL: " << url.toString().toUtf8() << "\n";
|
|
||||||
qDebug() << "URL: " << url.toString().toUtf8();
|
|
||||||
|
|
||||||
Q_FOREACH (const QNetworkCookie& cookie, cookies) {
|
|
||||||
stream << cookie.toRawForm(QNetworkCookie::NameAndValueOnly) << "\n";
|
|
||||||
qDebug() << cookie.toRawForm(QNetworkCookie::NameAndValueOnly);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stream.flush();
|
|
||||||
|
|
||||||
const QByteArray encodedCookies(data.toBase64());
|
|
||||||
|
|
||||||
qDebug() << "Raw cookies:\n" << data;
|
|
||||||
qDebug() << "Encoded cookies: " << encodedCookies;
|
|
||||||
|
|
||||||
storeData(QString(), QString::fromLatin1(otherCookiesC), QVariant(encodedCookies));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ShibbolethCookieJar* ShibbolethConfigFile::createCookieJar() const
|
|
||||||
{
|
|
||||||
ShibbolethCookieJar* jar = new ShibbolethCookieJar();
|
|
||||||
const QVariant variant(retrieveData(QString(), QString::fromLatin1(otherCookiesC)));
|
|
||||||
|
|
||||||
if (variant.isValid()) {
|
|
||||||
QByteArray data(QByteArray::fromBase64(variant.toByteArray()));
|
|
||||||
QTextStream stream (&data);
|
|
||||||
const QString urlHeader(QString::fromLatin1("URL: "));
|
|
||||||
QUrl currentUrl;
|
|
||||||
QList<QNetworkCookie> currentCookies;
|
|
||||||
|
|
||||||
qDebug() << "Got valid cookies variant: " << data;
|
|
||||||
|
|
||||||
while (!stream.atEnd()) {
|
|
||||||
const QString line(stream.readLine());
|
|
||||||
|
|
||||||
qDebug() << line;
|
|
||||||
|
|
||||||
if (line.startsWith(urlHeader)) {
|
|
||||||
if (!currentUrl.isEmpty() && !currentCookies.isEmpty()) {
|
|
||||||
jar->setCookiesFromUrl(currentCookies, currentUrl);
|
|
||||||
currentCookies.clear();
|
|
||||||
currentUrl.clear();
|
|
||||||
}
|
|
||||||
currentUrl = QUrl(line.mid(5));
|
|
||||||
} else if (!currentUrl.isEmpty()) {
|
|
||||||
const int equalPos(line.indexOf('='));
|
|
||||||
|
|
||||||
currentCookies << QNetworkCookie(line.left(equalPos).toUtf8(), line.mid(equalPos + 1).toUtf8());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!currentUrl.isEmpty() && !currentCookies.isEmpty()) {
|
|
||||||
jar->setCookiesFromUrl(currentCookies, currentUrl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return jar;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MIRALL_CREDS_SHIBBOLETH_CONFIG_FILE_H
|
|
||||||
#define MIRALL_CREDS_SHIBBOLETH_CONFIG_FILE_H
|
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QMap>
|
|
||||||
#include <QNetworkCookie>
|
|
||||||
#include <QUrl>
|
|
||||||
|
|
||||||
#include "mirall/mirallconfigfile.h"
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
class ShibbolethCookieJar;
|
|
||||||
|
|
||||||
class ShibbolethConfigFile : public MirallConfigFile
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
void storeCookies(const QMap<QUrl, QList<QNetworkCookie> >& cookies);
|
|
||||||
ShibbolethCookieJar* createCookieJar() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "creds/shibboleth/shibbolethcookiejar.h"
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
ShibbolethCookieJar::ShibbolethCookieJar (QObject* parent)
|
|
||||||
: QNetworkCookieJar (parent)
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool ShibbolethCookieJar::setCookiesFromUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
|
|
||||||
{
|
|
||||||
if (QNetworkCookieJar::setCookiesFromUrl (cookieList, url)) {
|
|
||||||
Q_EMIT newCookiesForUrl (cookieList, url);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MIRALL_WIZARD_SHIBBOLETH_COOKIE_JAR_H
|
|
||||||
#define MIRALL_WIZARD_SHIBBOLETH_COOKIE_JAR_H
|
|
||||||
|
|
||||||
#include <QNetworkCookieJar>
|
|
||||||
#include <QList>
|
|
||||||
|
|
||||||
class QUrl;
|
|
||||||
class QNetworkCookie;
|
|
||||||
|
|
||||||
namespace Mirall
|
|
||||||
{
|
|
||||||
|
|
||||||
class ShibbolethCookieJar : public QNetworkCookieJar
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
ShibbolethCookieJar (QObject* parent = 0);
|
|
||||||
|
|
||||||
virtual bool setCookiesFromUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void newCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // ns Mirall
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -47,7 +47,7 @@ bool ShibbolethUserJob::finished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString user = json.value("ocs").toMap().value("data").toMap().value("id").toString();
|
QString user = json.value("ocs").toMap().value("data").toMap().value("id").toString();
|
||||||
qDebug() << "cloud/user: " << json << "->" << user;
|
//qDebug() << "cloud/user: " << json << "->" << user;
|
||||||
emit userFetched(user);
|
emit userFetched(user);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,15 +26,13 @@ class ShibbolethUserJob : public AbstractNetworkJob {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ShibbolethUserJob(Account *account, QObject* parent = 0);
|
explicit ShibbolethUserJob(Account *account, QObject* parent = 0);
|
||||||
|
public slots:
|
||||||
void start();
|
void start();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// is always emitted when the job is finished. user is empty in case of error.
|
// is always emitted when the job is finished. user is empty in case of error.
|
||||||
void userFetched(const QString &user);
|
void userFetched(const QString &user);
|
||||||
|
|
||||||
// Another job need to be created
|
|
||||||
void tryAgain();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
virtual bool finished();
|
virtual bool finished();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,106 +14,95 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QNetworkCookie>
|
#include <QNetworkCookie>
|
||||||
|
#include <QNetworkCookieJar>
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
#include <QWebPage>
|
#include <QWebPage>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QAuthenticator>
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
#include "creds/shibboleth/shibbolethcookiejar.h"
|
|
||||||
#include "creds/shibboleth/shibbolethwebview.h"
|
#include "creds/shibboleth/shibbolethwebview.h"
|
||||||
#include "creds/shibboleth/authenticationdialog.h"
|
#include "creds/shibbolethcredentials.h"
|
||||||
#include "mirall/account.h"
|
#include "mirall/account.h"
|
||||||
|
#include "mirall/logger.h"
|
||||||
#include "mirall/mirallaccessmanager.h"
|
#include "mirall/mirallaccessmanager.h"
|
||||||
#include "mirall/theme.h"
|
#include "mirall/theme.h"
|
||||||
|
|
||||||
namespace Mirall
|
namespace Mirall
|
||||||
{
|
{
|
||||||
|
|
||||||
void ShibbolethWebView::setup(Account *account, ShibbolethCookieJar* jar)
|
ShibbolethWebView::ShibbolethWebView(Account* account, QWidget* parent)
|
||||||
|
: QWebView(parent)
|
||||||
|
, _account(account)
|
||||||
|
, _accepted(false)
|
||||||
|
, _cursorOverriden(false)
|
||||||
{
|
{
|
||||||
_account = account;
|
// no minimize
|
||||||
MirallAccessManager* nm = new MirallAccessManager(this);
|
setWindowFlags(Qt::Dialog);
|
||||||
// we need our own QNAM, but the we offload the SSL error handling to
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
// the account object, which already can do this
|
|
||||||
connect(nm, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
|
|
||||||
account, SLOT(slotHandleErrors(QNetworkReply*,QList<QSslError>)));
|
|
||||||
connect(nm, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
|
|
||||||
SLOT(slotHandleAuthentication(QNetworkReply*,QAuthenticator*)));
|
|
||||||
|
|
||||||
QWebPage* page = new QWebPage(this);
|
QWebPage* page = new QWebPage(this);
|
||||||
|
page->setNetworkAccessManager(account->networkAccessManager());
|
||||||
jar->setParent(this);
|
|
||||||
connect(jar, SIGNAL (newCookiesForUrl (QList<QNetworkCookie>, QUrl)),
|
|
||||||
this, SLOT (onNewCookiesForUrl (QList<QNetworkCookie>, QUrl)));
|
|
||||||
connect(page, SIGNAL(loadStarted()),
|
connect(page, SIGNAL(loadStarted()),
|
||||||
this, SLOT(slotLoadStarted()));
|
this, SLOT(slotLoadStarted()));
|
||||||
connect(page, SIGNAL(loadFinished(bool)),
|
connect(page, SIGNAL(loadFinished(bool)),
|
||||||
this, SLOT(slotLoadFinished(bool)));
|
this, SLOT(slotLoadFinished(bool)));
|
||||||
|
|
||||||
nm->setCookieJar(jar);
|
|
||||||
page->setNetworkAccessManager(nm);
|
connect(page->networkAccessManager()->cookieJar(),
|
||||||
|
SIGNAL(newCookiesForUrl (QList<QNetworkCookie>, QUrl)),
|
||||||
|
this, SLOT(onNewCookiesForUrl (QList<QNetworkCookie>, QUrl)));
|
||||||
page->mainFrame()->load(account->url());
|
page->mainFrame()->load(account->url());
|
||||||
this->setPage(page);
|
this->setPage(page);
|
||||||
setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI()));
|
setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI()));
|
||||||
}
|
|
||||||
|
|
||||||
ShibbolethWebView::ShibbolethWebView(Account* account, QWidget* parent)
|
// If we have a valid cookie, it's most likely expired. We can use this as
|
||||||
: QWebView(parent)
|
// as a criteria to tell the user why the browser window pops up
|
||||||
{
|
QNetworkCookie shibCookie = ShibbolethCredentials::findShibCookie(_account, ShibbolethCredentials::accountCookies(_account));
|
||||||
setup(account, new ShibbolethCookieJar(this));
|
if (shibCookie != QNetworkCookie()) {
|
||||||
|
Logger::instance()->postOptionalGuiLog(tr("Reauthentication required"), tr("Your session has expired. You need to re-login to continue to use the client."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShibbolethWebView::~ShibbolethWebView()
|
ShibbolethWebView::~ShibbolethWebView()
|
||||||
{
|
{
|
||||||
slotLoadFinished();
|
|
||||||
}
|
|
||||||
|
|
||||||
ShibbolethWebView::ShibbolethWebView(Account* account, ShibbolethCookieJar* jar, QWidget* parent)
|
|
||||||
: QWebView(parent)
|
|
||||||
{
|
|
||||||
setup(account, jar);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShibbolethWebView::onNewCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
|
void ShibbolethWebView::onNewCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
|
||||||
{
|
{
|
||||||
QList<QNetworkCookie> otherCookies;
|
if (url.host() == _account->url().host()) {
|
||||||
QNetworkCookie shibCookie;
|
QNetworkCookie shibCookie = ShibbolethCredentials::findShibCookie(_account, cookieList);
|
||||||
|
if (shibCookie != QNetworkCookie()) {
|
||||||
Q_FOREACH (const QNetworkCookie& cookie, cookieList) {
|
Q_EMIT shibbolethCookieReceived(shibCookie, _account);
|
||||||
if (cookie.name().startsWith ("_shibsession_")) {
|
accept();
|
||||||
if (shibCookie.name().isEmpty()) {
|
close();
|
||||||
shibCookie = cookie;
|
}
|
||||||
} else {
|
|
||||||
qWarning() << "Too many Shibboleth session cookies at once!";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
otherCookies << cookie;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!otherCookies.isEmpty()) {
|
|
||||||
Q_EMIT otherCookiesReceived(otherCookies, url);
|
|
||||||
}
|
|
||||||
if (!shibCookie.name().isEmpty()) {
|
|
||||||
Q_EMIT shibbolethCookieReceived(shibCookie, _account);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShibbolethWebView::hideEvent(QHideEvent* event)
|
void ShibbolethWebView::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
Q_EMIT viewHidden();
|
if (_cursorOverriden) {
|
||||||
QWebView::hideEvent(event);
|
QApplication::restoreOverrideCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_accepted) {
|
||||||
|
Q_EMIT rejected();
|
||||||
|
}
|
||||||
|
QWebView::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShibbolethWebView::slotLoadStarted()
|
void ShibbolethWebView::slotLoadStarted()
|
||||||
{
|
{
|
||||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
if (!_cursorOverriden) {
|
||||||
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||||
|
_cursorOverriden = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShibbolethWebView::slotLoadFinished(bool success)
|
void ShibbolethWebView::slotLoadFinished(bool success)
|
||||||
{
|
{
|
||||||
QApplication::restoreOverrideCursor();
|
if (_cursorOverriden) {
|
||||||
|
QApplication::restoreOverrideCursor();
|
||||||
|
}
|
||||||
|
|
||||||
if (!title().isNull()) {
|
if (!title().isNull()) {
|
||||||
setWindowTitle(tr("%1 - %2").arg(Theme::instance()->appNameGUI(), title()));
|
setWindowTitle(tr("%1 - %2").arg(Theme::instance()->appNameGUI(), title()));
|
||||||
@@ -125,21 +114,9 @@ void ShibbolethWebView::slotLoadFinished(bool success)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShibbolethWebView::slotHandleAuthentication(QNetworkReply *reply, QAuthenticator *authenticator)
|
void ShibbolethWebView::accept()
|
||||||
{
|
{
|
||||||
Q_UNUSED(reply)
|
_accepted = true;
|
||||||
QUrl url = reply->url();
|
|
||||||
// show only scheme, host and port
|
|
||||||
QUrl reducedUrl;
|
|
||||||
reducedUrl.setScheme(url.scheme());
|
|
||||||
reducedUrl.setHost(url.host());
|
|
||||||
reducedUrl.setPort(url.port());
|
|
||||||
|
|
||||||
AuthenticationDialog dialog(authenticator->realm(), reducedUrl.toString(), this);
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
|
||||||
authenticator->setUser(dialog.user());
|
|
||||||
authenticator->setPassword(dialog.password());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ns Mirall
|
} // ns Mirall
|
||||||
|
|||||||
@@ -37,23 +37,25 @@ public:
|
|||||||
ShibbolethWebView(Account *account, ShibbolethCookieJar* jar, QWidget* parent = 0);
|
ShibbolethWebView(Account *account, ShibbolethCookieJar* jar, QWidget* parent = 0);
|
||||||
~ShibbolethWebView();
|
~ShibbolethWebView();
|
||||||
|
|
||||||
protected:
|
void closeEvent(QCloseEvent *event);
|
||||||
void hideEvent(QHideEvent* event);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void shibbolethCookieReceived(const QNetworkCookie& cookie, Account* account);
|
void shibbolethCookieReceived(const QNetworkCookie &cookie, Account *account);
|
||||||
void viewHidden();
|
void rejected();
|
||||||
void otherCookiesReceived(const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onNewCookiesForUrl(const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
void onNewCookiesForUrl(const QList<QNetworkCookie>& cookieList, const QUrl& url);
|
||||||
void slotLoadStarted();
|
void slotLoadStarted();
|
||||||
void slotLoadFinished(bool success = true);
|
void slotLoadFinished(bool success);
|
||||||
void slotHandleAuthentication(QNetworkReply*,QAuthenticator*);
|
|
||||||
|
protected:
|
||||||
|
void accept();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setup(Account *account, ShibbolethCookieJar* jar);
|
void setup(Account *account, ShibbolethCookieJar* jar);
|
||||||
QPointer<Account> _account;
|
QPointer<Account> _account;
|
||||||
|
bool _accepted;
|
||||||
|
bool _cursorOverriden;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // ns Mirall
|
} // ns Mirall
|
||||||
|
|||||||