1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2026-04-03 18:11:32 +02:00

Compare commits

...

1017 Commits

Author SHA1 Message Date
Klaas Freitag
600a6d9346 Bumped version to alpha1 2014-08-08 10:57:09 +02:00
Jenkins for ownCloud
0e22864426 [tx-robot] updated from transifex 2014-08-08 01:25:28 -04:00
Daniel Molkentin
5306cdc7a1 Shell Integration: Fix Integration bug when explorer starts before OCC
Also slightly improves performance
2014-08-08 02:40:46 +02:00
Daniel Molkentin
344b98bf13 Shell Integration / MSVC: Fix target platform 2014-08-08 02:40:46 +02:00
Daniel Molkentin
261d7ee688 Ignore binary dir for git exports 2014-08-07 16:50:50 +02:00
Daniel Molkentin
633267c457 Update binary dir 2014-08-07 16:46:57 +02:00
Daniel Molkentin
80f9ed70d3 NSIS: Script to download the VS runtimes 2014-08-07 16:24:09 +02:00
Daniel Molkentin
fa8f6f91c4 NSIS: Add a packaging routine for the overlay icons 2014-08-07 15:54:39 +02:00
Klaas Freitag
c3f8e099f4 tests: Never stumble over an already existing test share dir. 2014-08-07 15:45:17 +02:00
Klaas Freitag
6cb8134690 SocketAPI: Use Win32 function SHChangeNotify to notify Explorer. 2014-08-07 14:59:06 +02:00
Olivier Goffart
95a77e5ccc Merge branch 'il' 2014-08-07 14:29:27 +02:00
Olivier Goffart
21783ecef7 SyncEngine: fix permission detection of moves
Two problems:
- "M" was used instead of "V"
- The extraction of the parent folder of the destination was wrong
2014-08-07 14:27:27 +02:00
Klaas Freitag
d8a8b53fc9 SocketAPI: Also update view when paused. 2014-08-07 14:07:08 +02:00
Klaas Freitag
e71ce01f90 tests: Some more tests with local files and shares. 2014-08-07 12:48:14 +02:00
Olivier Goffart
6827f9977c Merge branch 'il'
Conflicts:
	doc/ocdoc
2014-08-07 12:15:50 +02:00
Olivier Goffart
6d24bd0361 journaldb: Fix that fileid might be missing in the db
When recovering from a inalid move operation, we call
avoidReadFromDbOnNextSync. This will remove the fileid from the db so
we don't detect a move on the next sync.  But we want the next sync to fetch
the file id again, and this can only happen if we don't read them
from the db and do the actual PROPFIND, this is done by avoidReadFromDbOnNextSync

However, if there is propagation in that source directory later, it
will overide the invalid etag with the real one and we will not uissue the PROPFIND
to fetch the fileid.
We must therefore also protect the future write to the DB when calling
avoidReadFromDbOnNextSync
2014-08-07 12:14:45 +02:00
Markus Goetz
22c1629dd3 SyncEngine: Keep csync_journal with proper values for fileId and remotePerm
Before this patch, we had a lot of empty rows because we created
the SyncFileItems with the wrong(=local) data.
2014-08-07 10:14:14 +02:00
Jenkins for ownCloud
bd9d5432f5 [tx-robot] updated from transifex 2014-08-07 02:06:14 -04:00
Jenkins for ownCloud
370ee5c6f6 [tx-robot] updated from transifex 2014-08-07 01:25:25 -04:00
Klaas Freitag
fe2e4d87c5 tests: Fix t5: work with ownCloud 7 sharing. 2014-08-06 17:19:02 +02:00
Klaas Freitag
e9c4635f6b tests: Add another two seconds break, hope to make it work in virt. env.
Tests fail randomly on the CI computer which is virtualized. Maybe this
fix helps.
2014-08-06 11:34:35 +02:00
Jenkins for ownCloud
7337010fd8 [tx-robot] updated from transifex 2014-08-06 05:10:32 -04:00
Daniel Molkentin
f06019ab81 NSIS: First steps at installing the shell extension 2014-08-06 10:44:17 +02:00
Olivier Goffart
55567f8dd2 remove unused variable 2014-08-06 10:20:58 +02:00
Klaas Freitag
2ccfdcb084 NautilusOverlays: return False if sock connection breaks 2014-08-06 09:52:52 +02:00
Daniel Molkentin
084d9de4c9 Add binary submodule 2014-08-06 09:28:18 +02:00
Jenkins for ownCloud
41875c2ddb [tx-robot] updated from transifex 2014-08-06 01:25:31 -04:00
Daniel Molkentin
4ad9ff4301 Merge remote-tracking branch 'origin/win_overlay_icons'
Conflicts:
	.gitignore
2014-08-05 19:27:51 +02:00
Daniel Molkentin
c7ff1e9b3f Windows Shell extension: Add watched directories 2014-08-05 19:23:40 +02:00
Markus Goetz
fe3f751a8a OS X: Slightly improve pkgproj
It is still too much bound to Klaas' machine.
2014-08-05 17:16:17 +02:00
Daniel Molkentin
996b7166d2 Merge pull request #2027 from owncloud/l10n-fix
Use am. eng. since brit. eng. is handled on transifex
2014-08-05 14:11:20 +02:00
Daniel Molkentin
839b2fa8fd SocketAPI: Convert to unix path before comparing with black list 2014-08-05 13:11:52 +02:00
Daniel Molkentin
8b1aebcdba No need to ship the Qt4-based qtkeychain DLL 2014-08-05 13:11:15 +02:00
Klaas Freitag
f4e2041b0b CMake: Fix installation of the icons, path corrected. 2014-08-05 11:46:21 +02:00
Jenkins for ownCloud
24df6f838d [tx-robot] updated from transifex 2014-08-05 01:25:26 -04:00
Markus Goetz
c313cc02f2 Config: Fix loading of configuration
There is a strange bug with Qt, we need to always set the application name, then
we can generate the proper config path.
2014-08-05 00:41:43 +02:00
Klaas Freitag
4e13c882f8 CMake: Install the nautilus plugin. 2014-08-04 18:58:35 +02:00
Klaas Freitag
0fe51d826f Overlays: renamed icons to sensible names. Also removed .DS_Store 2014-08-04 17:22:34 +02:00
Klaas Freitag
b2976baf9b NautilusOverlays: Use the correct icon names, removed unused function. 2014-08-04 17:21:49 +02:00
Klaas Freitag
a0a5a49d7b CMake: Install icons under linux. 2014-08-04 17:20:57 +02:00
Daniel Molkentin
9a1781f613 Support for multiple icons 2014-08-04 15:40:08 +02:00
Klaas Freitag
f983264b5d SocketAPI: Do not allow a trailing slash for directories.
The entries in our sync journal have no trailing slashes for directories.
2014-08-04 12:47:22 +02:00
Klaas Freitag
40cebeedfc SocketAPI: Call csync_exclude with the relative path.
This avoids messing with the windows pathes and csync_exclude is
designed that way.
2014-08-04 12:47:22 +02:00
Klaas Freitag
1f9280c68e GUI: Remove useless comment. 2014-08-04 12:47:22 +02:00
Klaas Freitag
14ed261606 MacOverlays: Rather use FileManager API to check if is directory. 2014-08-04 12:03:01 +02:00
Klaas Freitag
4fb671e7f4 SocketAPI: Send Broadcasts only for Linux, not used on Mac and Win. 2014-08-04 11:09:17 +02:00
Klaas Freitag
aad5c96759 Mac Overlays: No crash on context menu actions.
Disable overlay menus for now.
2014-08-04 11:09:16 +02:00
Jenkins for ownCloud
72b8da317f [tx-robot] updated from transifex 2014-08-04 01:25:28 -04:00
Jenkins for ownCloud
7f9033f1f1 [tx-robot] updated from transifex 2014-08-02 01:25:24 -04:00
Volkan Gezer
a42e384935 Use am. eng. since brit. eng. is handled on transifex
See https://github.com/owncloud/core/pull/10025#issuecomment-50855986 for info.
2014-08-02 04:05:10 +02:00
Klaas Freitag
9b37357513 cmake: Add the icons path to cmake, install the Mac icons properly. 2014-08-01 15:30:13 +02:00
Klaas Freitag
23269c9a08 Mac Overlays: load icons from the proper place in the system. 2014-08-01 15:26:18 +02:00
Klaas Freitag
327f70240c GUI: Load the finder overlay icon script on MacOSX. 2014-08-01 14:28:34 +02:00
Klaas Freitag
0a7642dbe0 Mac Package: New shellscript and packages steering file. 2014-08-01 12:19:08 +02:00
Klaas Freitag
742b036a07 CMake: Follow policy for 2.8.0 (avoid cmake warnings) 2014-08-01 12:18:52 +02:00
Klaas Freitag
6e00989a9e Add directory MacOSX to cmake processing. 2014-08-01 12:18:52 +02:00
Klaas Freitag
68f0227ca1 OverlaysMac: Make use of REGISTER_PATH to learn the synced dirs. 2014-08-01 12:18:52 +02:00
Klaas Freitag
fe9a2e7ba4 SocketAPI: Normalize file names when read from the filesystem.
Otherwise there will be bad encoded file names because of a Qt
upstream error that skips the normalization.
2014-08-01 12:18:52 +02:00
Klaas Freitag
a248fc36fe Remove user XCode file. 2014-08-01 12:18:52 +02:00
Klaas Freitag
e28a7a7ae3 MacOverlays: Start a 5 seconds timer to try connect if unconn.
If mirall is not here, a timer is started to try again later.
2014-08-01 12:18:52 +02:00
Klaas Freitag
b92789825d MacOverlays: Redraw window if registered pathes are empty.
That is the condition after a reconnect to the mirall server.
2014-08-01 12:18:52 +02:00
Klaas Freitag
c3b6aecb79 MacOverlay: Some logging cleanings. 2014-08-01 12:18:52 +02:00
Klaas Freitag
4688126f84 MacOverlays: Export the redraw method of content man. 2014-08-01 12:18:52 +02:00
Klaas Freitag
5a5c03a826 MacOverlays: Registered pathes support.
Remember the pathes that come with the first UPDATE_VIEW msg. That
reduces the number of socket communications.
2014-08-01 12:18:52 +02:00
Klaas Freitag
f3477877d0 Added XCode file. 2014-08-01 12:18:52 +02:00
Klaas Freitag
7bef588851 SocketAPI: Try reconnect if socket was not connected. 2014-08-01 10:59:50 +02:00
Klaas Freitag
72a25cf6ee MacOverlays: Minor cleanups. 2014-08-01 10:59:50 +02:00
Klaas Freitag
74e13f4c70 Use better variable naming. 2014-08-01 10:59:50 +02:00
Klaas Freitag
3c09ef6cbf SocketAPI: rename slot to send UPDATE_VIEW. 2014-08-01 10:59:49 +02:00
Klaas Freitag
68bfcf5d24 SocketAPI: Create the socket API instance in folderman. 2014-08-01 10:59:49 +02:00
Klaas Freitag
b2a10de71a Copyright plus minor beautification. 2014-08-01 10:59:49 +02:00
Klaas Freitag
267b9e5c2f FinderOverlays: Display the error if socket can not connect. 2014-08-01 10:59:49 +02:00
Klaas Freitag
55d94bf15a Overlays: Handle Sharing state and display the correct icons. 2014-08-01 10:59:49 +02:00
Klaas Freitag
629e2a9e1c Overlays: Add the missing icon containers for MacOSX. 2014-08-01 10:59:49 +02:00
Klaas Freitag
86acdf69d9 MocOverlays: Handle the UPDATE_VIEW socket notification correctly.
With UPDATE_VIEW the plugin gets notified to update the overlays.
It invalidates the entries in the file icon cache for the path
that comes with the UPDATE_VIEW and than refreshes the view.
2014-08-01 10:59:49 +02:00
Klaas Freitag
a6987ad703 Mac overlays: Fix allocations, use icns, correct query type. 2014-08-01 10:59:49 +02:00
Klaas Freitag
5642e40bc8 Mac Overlays: Add icon containers 1.st part 2014-08-01 10:59:48 +02:00
Mackie Messer
50d178feaa MacOSX shell integration code plus icons. 2014-08-01 10:59:48 +02:00
Daniel Molkentin
8d71328192 Windows Overlay Icons 2014-07-30 17:20:55 +02:00
Jenkins for ownCloud
17b320f7dc [tx-robot] updated from transifex 2014-07-30 01:25:24 -04:00
Olivier Goffart
f1ad82d0ba t2.pl Fix the test testing that moving a file that was just added do not create duplicate 2014-07-29 13:58:21 +02:00
Jenkins for ownCloud
2fb283749c [tx-robot] updated from transifex 2014-07-29 01:25:24 -04:00
Jenkins for ownCloud
5a4c023fc9 [tx-robot] updated from transifex 2014-07-28 02:06:11 -04:00
Jenkins for ownCloud
e8afac3a01 [tx-robot] updated from transifex 2014-07-28 01:25:19 -04:00
Jenkins for ownCloud
6284517dc9 [tx-robot] updated from transifex 2014-07-27 01:25:21 -04:00
Jenkins for ownCloud
80c096b6f1 [tx-robot] updated from transifex 2014-07-26 01:25:23 -04:00
Markus Goetz
f004d5085d Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
2014-07-25 12:37:27 +02:00
Klaas Freitag
98e21ae0ad SocketAPI: Connect REGISTER_FOLDER to Foldermans events. 2014-07-25 12:20:38 +02:00
Klaas Freitag
00274722ce nautilus plugin: Adopted to latest socket api changes. 2014-07-25 12:11:21 +02:00
Klaas Freitag
8b93678e3d SocketAPI: Added REGISTER_PATH and UNREGISTER_PATH
to inform the plugins about the top sync directories.

Also cleaned the code a bit.
2014-07-25 12:11:21 +02:00
Olivier Goffart
3d0c009719 propagator_qnam: Limit the HTTP buffer size when downloading
Otherwise the buffer might fill up too quickly and get too large and consume
too much memory which could lead to crash in extreme cases

Should fix issue #1974
2014-07-24 15:43:28 +02:00
dark-eye
1b3ec955b1 Merge pull request #2000 from dark-eye/fix_folder_status_ui_ignore_new_line_inoverall_text
Fix folder status ui ignore new line inoverall text
2014-07-24 12:52:15 +03:00
Olivier Goffart
208011f6ab propagator_qnam: add debug output in cae the file changed localy
In order to debug https://github.com/owncloud/core/issues/9781
2014-07-24 11:17:59 +02:00
Daniel Molkentin
f84e0010ee NSIS: ICU rebumped to 5.3 as per build service change 2014-07-24 10:07:46 +02:00
Klaas Freitag
c97f46d403 Bump version to 1.6.2 rc2 plus Changelog 2014-07-24 09:58:23 +02:00
Jenkins for ownCloud
5356898efc [tx-robot] updated from transifex 2014-07-24 01:25:23 -04:00
Klaas Freitag
1fb52f0d8b HTTPCreds: Do delete the WritePasswordJob to not leak memory. 2014-07-23 17:59:02 +02:00
Klaas Freitag
d4de024f15 Propagator: Fix local file name clash detection.
Need to normalize the output of QFileInfo::canonicalFilePath() before
comparing to a server side path.
See https://bugreports.qt-project.org/browse/QTBUG-39622

This fixes #1998 and #1999
2014-07-23 17:56:46 +02:00
Olivier Goffart
1d9d88ca85 Always use the dummy crendential while trying to determine the credentials
Otherwise the SHibbolethCredential may be set and it has hook to intercept 401

This should fix issue #1908
2014-07-23 14:38:50 +02:00
Eran
2ca8805cda Removed uneed code 2014-07-23 15:09:28 +03:00
Eran
8e5c41e6f3 Merge https://github.com/owncloud/mirall into fix_folder_status_ui_ignore_new_line_inoverall_text 2014-07-23 13:53:05 +03:00
Eran
0f7efbc22e fixed bug where the overall text caused in the folder view the to defrom 2014-07-23 13:52:02 +03:00
Jenkins for ownCloud
6b7bd07c97 [tx-robot] updated from transifex 2014-07-23 01:25:21 -04:00
Klaas Freitag
8d85516e72 tx.pl: Add a chunking update test, test for precondition failed. 2014-07-22 18:07:34 +02:00
Klaas Freitag
0f4cf74ae0 SyncEngine: allow to do a post upgrade script in debug mode. 2014-07-22 18:07:02 +02:00
Klaas Freitag
4dfe0fad7d tests: Big file chunking, change an existing big file to trigger update
This failed on oC7
2014-07-22 10:45:03 +02:00
Jenkins for ownCloud
2e91ea8093 [tx-robot] updated from transifex 2014-07-22 01:25:22 -04:00
Klaas Freitag
77e3480b2f csync oC Util: set field flag correctly to avoid etag memleak.
The fields varialbe should contain or'ed flags of the fields set
in the csync_vio_file_stat_t struct. The problem was that the field
for CSYNC_VIO_FILE_STAT_FIELDS_PERM was assigned rather than or'ed
which makes the release function for the struct not freeing the
etag memory => memleak.
2014-07-21 13:19:36 +02:00
Jenkins for ownCloud
bca1ef42fc [tx-robot] updated from transifex 2014-07-21 01:25:21 -04:00
Jenkins for ownCloud
010ab7119e [tx-robot] updated from transifex 2014-07-20 01:25:22 -04:00
Jenkins for ownCloud
3cb93510ac [tx-robot] updated from transifex 2014-07-19 01:25:30 -04:00
Olivier Goffart
8a88ca6f34 Merge branch 'il'
Conflicts:
	src/mirall/propagator_legacy.h
2014-07-18 17:00:38 +02:00
Olivier Goffart
81d786733d Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
	src/mirall/propagator_qnam.cpp
	src/mirall/propagator_qnam.h
2014-07-18 16:59:29 +02:00
Olivier Goffart
336e74b992 csync_owncloud: fix the name of the permissions property 2014-07-18 16:52:04 +02:00
Olivier Goffart
beb9300b4e network limit: Never wait more than 10 seconds
When using the "Limit automatically" limit, we wait for 25% of the time
it took to upload something.
However, if we go to sleep while uploading, the time it took to upload may take
days. And waiting for 25% of a day is too long.
So never wait for more than 10 seconds

This may be related to issue #1880
2014-07-18 12:27:02 +02:00
Klaas Freitag
74b3e2ce3f tests: Another try to get around the jenkins test problem. 2014-07-18 12:20:14 +02:00
Olivier Goffart
c35880d4f1 Fix corruption while trying to resume and the server don't suport it
Issue #1982
2014-07-18 12:03:45 +02:00
Jenkins for ownCloud
ed6e3e4ee2 [tx-robot] updated from transifex 2014-07-18 01:25:23 -04:00
Klaas Freitag
f8bea55b10 SocketAPI: Handle top sync folder correctly. 2014-07-17 19:34:50 +02:00
Daniel Molkentin
72cd84e878 SocketAPI: Exclude drive part from path blacklist check
Otherwise, it always matches the ':' part
2014-07-17 19:26:58 +02:00
Daniel Molkentin
35b6d09615 SocketAPI: Fix separators on Windows 2014-07-17 17:41:20 +02:00
Daniel Molkentin
1ae727e70f SocketAPI: Emit error of binding the server fails 2014-07-17 15:01:01 +02:00
Daniel Molkentin
0e5d0c1170 SocketAPI: Some cleaning up 2014-07-17 15:00:21 +02:00
Daniel Molkentin
7ff62bc577 NSIS: ICU rebumped to 5.3 as per build service change 2014-07-17 14:57:04 +02:00
Klaas Freitag
743c1c2eda SocketAPI: Send an UPDATE_VIEW to the shell plugin on connect.
For each configured sync folder send an UPDATE_VIEW directly after
the socket connect to make the shell integration updating the view.
2014-07-17 11:26:03 +02:00
Klaas Freitag
0e9a08cbbf SocketAPI: rename slot to send UPDATE_VIEW. 2014-07-17 11:25:08 +02:00
Klaas Freitag
d2445ec72d PropagatorQNAM: Never send if-match header for new files. 2014-07-17 11:23:11 +02:00
Klaas Freitag
fef713aaed SocketAPI: Create the socket API instance in folderman. 2014-07-17 11:22:18 +02:00
Klaas Freitag
c4d73688a6 Folderman: Fix path detection in folderForPath(). 2014-07-17 11:21:02 +02:00
Daniel Molkentin
56b721b2eb propagator_qnam: fix warning 2014-07-17 11:05:16 +02:00
Klaas Freitag
2981b37219 Use file size of factor of four because of the createLocalFile algorithm 2014-07-17 10:29:13 +02:00
Jenkins for ownCloud
cfc2f84d3e [tx-robot] updated from transifex 2014-07-17 01:25:28 -04:00
Klaas Freitag
d8ebebaf12 WinInstaller: No hardcoded www in front of the url on final page. 2014-07-16 18:39:51 +02:00
Klaas Freitag
2a5691e575 tests: Fix assertion. 2014-07-16 17:26:06 +02:00
Klaas Freitag
774432066e tests: Reverted previous change, do not append in createLocalFile() 2014-07-16 17:25:18 +02:00
Klaas Freitag
e6c501de8e FolderMan: More useful logging. 2014-07-16 16:59:20 +02:00
Klaas Freitag
af3fae9c28 Bumped to 1.6.2 rc1 2014-07-16 14:32:58 +02:00
Klaas Freitag
d5a8661480 tests: do not use system any more to modify files, rather perl native. 2014-07-16 14:06:57 +02:00
Klaas Freitag
d3b72940fd Updated Changelog for 1.6.2 2014-07-16 11:56:17 +02:00
Daniel Molkentin
e8de3e855a 1.6.2 2014-07-16 11:43:13 +02:00
Klaas Freitag
71338000a4 SetupWizard: Keep initial local folder to compare later for changes.
If the local folder changes, the sync has to be reinitialized as
well. Until now we did not detect that, which led to the case that
the sync folder was not reinitialized in case only the local folder
changed in the setup dialog.
2014-07-16 11:37:46 +02:00
Olivier Goffart
2fdb3cfdfb Merge branch 'il'
Conflicts:
	src/mirall/folder.cpp
	src/mirall/propagator_qnam.cpp
2014-07-16 10:49:16 +02:00
Olivier Goffart
8961e61f60 Merge branch '1.6' into il
Conflicts:
	VERSION.cmake
	src/mirall/syncengine.cpp
	src/mirall/syncengine.h
2014-07-16 09:57:40 +02:00
Jenkins for ownCloud
e5191acd73 [tx-robot] updated from transifex 2014-07-16 01:25:23 -04:00
Olivier Goffart
d697969f36 Use another way to detect that the server was reconfigured
Before, we would only detect it if all the files were removed, and no
file where added or changed. This may not be enough because there might
be a welcome.txt file. Now, we check that none of the file stays the same,
and some files are removed.

Relates issue #1948
2014-07-15 18:09:08 +02:00
Olivier Goffart
51e9c5fd96 propagator_qnam Fix signal slot connection
Fix the signature so it can be connected

This was hapenning if the derver does not support X-OC-MTime

issue #1963
2014-07-15 18:08:26 +02:00
Klaas Freitag
997504c03c FolderMan: Unload folder method added.
unloadFolder now correctly removes a folder from all maps and signal
mappers.
2014-07-15 16:07:23 +02:00
Markus Goetz
0202351a27 Propagator: Fix crash when logging out during upload
Fixes #1957
2014-07-14 19:53:42 +02:00
Jenkins for ownCloud
dde06dfaba [tx-robot] updated from transifex 2014-07-14 01:25:21 -04:00
Jenkins for ownCloud
eb0f074097 [tx-robot] updated from transifex 2014-07-13 02:06:11 -04:00
Jenkins for ownCloud
b6c9b5645c [tx-robot] updated from transifex 2014-07-13 01:25:20 -04:00
Klaas Freitag
a281b36d6f SocketAPI: send the path with UPDATE_VIEW 2014-07-11 12:34:04 +02:00
Klaas Freitag
7772501cdf Remove unused socketPath variable. 2014-07-11 12:33:43 +02:00
Daniel Molkentin
d1b991e198 Fix windows compilation 2014-07-10 22:58:58 +02:00
Klaas Freitag
00f793a841 CMake: Remove accidentially added typo to fix build. 2014-07-10 17:20:40 +02:00
Klaas Freitag
bdb9598227 SocketAPI: Use QTcpSocket all over, rather than QLocalSocket. 2014-07-10 16:35:18 +02:00
Klaas Freitag
c6deb392fd SocketAPI: Enhance SyncFileStatus to have share information.
Added a new class SyncFileStatus to reflect that properly.
2014-07-10 16:28:40 +02:00
Olivier Goffart
3477ea0eeb Fix build with TOKEN_ONLY_AUTH
It was broken by commit 6ff38d8005
2014-07-10 15:26:55 +02:00
Klaas Freitag
9dacad99fa t1.pl: Change the corruption creation command. 2014-07-10 12:07:28 +02:00
Olivier Goffart
73e35c66af owncloudcmd: fix the --trust option
We can't call csync_set_userdata in owncloudcmd because it is
going to be overwritten later in the SyncEngine.
So we had an object of type SyncEngine* that we cast to CmdOptions*
and the trust flag was in the padding, so was some random data.

Therefore we must use global variables in that case in order to
know if we should ignore the certificate.
2014-07-10 11:19:23 +02:00
Olivier Goffart
d3b599b727 Fix build of the test on Qt5 2014-07-10 10:42:02 +02:00
Jenkins for ownCloud
4369151cd8 [tx-robot] updated from transifex 2014-07-10 03:57:24 -04:00
Olivier Goffart
846773efd3 Define Q_DECL_OVERRIDE for Qt4
That macro is new in Qt5, define it as well when compiling with Qt4
so we can use it in mirall

Note: QNetworkCookieJar::deleteCookie was not existing in Qt4.
2014-07-09 23:31:56 +02:00
Olivier Goffart
bcfa34357b Add Q_DECL_OVERRIDE for all function that are overriding something
This was made automatically with
clang-modernize -override-macros -add-override
2014-07-09 23:31:56 +02:00
Olivier Goffart
e0c2e8ed86 folder: remove TOKEN_AUTH_ONLY
Folder is no longer in the libowncloudsync
2014-07-09 22:44:08 +02:00
Olivier Goffart
b80a3876ab cleanup the CMakeLists.txt
Headers need not to be added if they are not going to be installed
The list was incomplete anyway, and most of the _HEADERS variables
were even not used
2014-07-09 22:44:08 +02:00
Olivier Goffart
26e17f58ef Engine: Do not reset the csync log callback in the engine
It is already set in Folder and we don't want to use the Logger
in command line clients
2014-07-09 22:44:08 +02:00
Olivier Goffart
45d1567057 Move Folder, FolderMan, and FolderWatcher outside of owncloudsync
Those class are maintaining the folder for the mirall configuration
They are not usefull in command line clients

Also the FolderWatcher is only used by the folder and not used by the
command line clients
2014-07-09 22:44:08 +02:00
Olivier Goffart
8aacb3f7ec Remove undeeded include 2014-07-09 22:44:08 +02:00
Olivier Goffart
99ee81a489 Utility: Move showInFileManager in its own file
And get rid of GUI in the Utility namespace
2014-07-09 22:44:08 +02:00
Olivier Goffart
517ffbd783 Utility: remove Utility::dataLocation
It is used only from one location, so put the code there
2014-07-09 22:44:08 +02:00
Olivier Goffart
7dd926d4f1 Utility: move raiseDisalog to owncloudGui
Reduce the GUI dependency in the Utility namespace used by libowncloudsync
2014-07-09 22:44:08 +02:00
Olivier Goffart
cbc7942a00 Added t8.pl that test case sensitivity issues
Made some change in the .cpp code in order to be able to test
the code when the file system is case sensitive
2014-07-09 22:44:08 +02:00
Olivier Goffart
63cd5ef563 ProtocolWidget: limit the number of items
That should save memory instead of letting the number of items grow
to infinity
2014-07-09 15:48:03 +02:00
Jenkins for ownCloud
3806905f5b [tx-robot] updated from transifex 2014-07-09 01:25:24 -04:00
Olivier Goffart
82c254fecf propagator_qnam: Avoid using too much memory
The idea here was that the buffer would be maximum 8KiB, not minimum.
2014-07-08 15:30:53 +02:00
Jenkins for ownCloud
2496f23e45 [tx-robot] updated from transifex 2014-07-08 01:25:22 -04:00
Olivier Goffart
86bea9a9af shibboleth: Fix the waiting curser that would not disapear
Fix #1915
2014-07-07 14:08:13 +02:00
Jenkins for ownCloud
4bb1172c84 [tx-robot] updated from transifex 2014-07-05 01:25:23 -04:00
Klaas Freitag
88f26fb548 HTTP Creds: In case of Keychain error, open the interact password dialog
But in case the user clicks cancel in the interactive dialog, invalidate
the credentials. Emit fechted() also in error case.
2014-07-04 13:27:35 +02:00
Klaas Freitag
a9f1de84f0 HTTP Credentials: Read the password from the old location if not found.
Earlier clients used QtKeychain without a QSettings object, which made
QtKeychain to write the password encrypted into a settings default
location, ie. the registry under windows.

If we can not find a password at the new location it is tried to read
the password from the old default location once. That makes people
happy in migration scenarios.
2014-07-04 13:27:22 +02:00
Jenkins for ownCloud
367ff79ef1 [tx-robot] updated from transifex 2014-07-04 01:25:25 -04:00
Daniel Molkentin
2961c44bbe NSIS: look for socketapiclient in the right place 2014-07-03 09:35:45 +02:00
Daniel Molkentin
997559dc6d NSIS: fix typo 2014-07-03 09:17:08 +02:00
Jenkins for ownCloud
79d28bbc35 [tx-robot] updated from transifex 2014-07-03 01:25:24 -04:00
Daniel Molkentin
6bc425f981 NSIS: Add socketapiclient 2014-07-02 12:05:23 +02:00
Daniel Molkentin
2cdfc16829 SocketAPI: rename test client binary to socketapiclient 2014-07-02 12:03:52 +02:00
Daniel Molkentin
e63d45cca9 SocketAPI: put binary into bin/ dir 2014-07-02 11:15:39 +02:00
Daniel Molkentin
553f186b7c SocketAPI: Build test client with Qt5 2014-07-02 11:11:11 +02:00
Daniel Molkentin
623dfc0286 Socket API: Add test client 2014-07-02 10:10:32 +02:00
Jenkins for ownCloud
ffa7f35a87 [tx-robot] updated from transifex 2014-07-02 01:25:30 -04:00
Olivier Goffart
081b7d4aa9 Merge pull request #1913 from owncloud/typo-fix
Typo fix
2014-07-01 20:39:30 +02:00
Olivier Goffart
9c3c4bac66 Merge remote-tracking branch 'origin/il' 2014-07-01 20:37:42 +02:00
Daniel Molkentin
6ec218ef11 FF docs submodules 2014-07-01 16:24:34 +02:00
Daniel Molkentin
ad2eabeb3b SocketAPI: Try to make the folder selection work on windows 2014-07-01 16:24:14 +02:00
Daniel Molkentin
26c377d05b Utility: export new functions 2014-06-30 14:13:45 +02:00
Jenkins for ownCloud
caa75d98be [tx-robot] updated from transifex 2014-06-30 01:25:23 -04:00
Volkan Gezer
3ad9356ca4 Typo fix 2014-06-29 14:14:44 +02:00
Volkan Gezer
dd5296f03c Typo fix
Suggested by [mnestis](https://www.transifex.com/accounts/profile/mnestis/)
2014-06-29 14:06:45 +02:00
Volkan Gezer
e673d76f22 Typo fix
Suggested by [mnestis](https://www.transifex.com/accounts/profile/mnestis/)
2014-06-29 14:04:30 +02:00
Volkan Gezer
393eb7bb4d Typo fix
Suggested by [mnestis](https://www.transifex.com/accounts/profile/mnestis/)
2014-06-29 14:02:50 +02:00
Jenkins for ownCloud
2fa5a5b8c3 [tx-robot] updated from transifex 2014-06-29 01:25:23 -04:00
Jenkins for ownCloud
ca63b79ed8 [tx-robot] updated from transifex 2014-06-28 01:25:25 -04:00
Daniel Molkentin
f8b097669a Merge remote-tracking branch 'origin/1.6'
Conflicts:
	VERSION.cmake
	doc/building.rst
2014-06-27 15:34:20 +02:00
Olivier Goffart
2f284209d8 Permissions: When moving is not allowed, fallback to delete and upload
We decided that we never want to rename a directory behind the
back of the user as the user may be using files in the directory
during the sync.
If moving is not allowed, we just erase the inode form the database so
the next sync will try to do an upload and delete and recover from there
using normal resolution.

This also add some code to update the inode back to the db when it is detected
as changed.
2014-06-27 15:30:08 +02:00
Olivier Goffart
09881040a3 Permissions: fix restoring subdirectories
The sync item vector must be sorted before we call checkForPermission
2014-06-27 13:34:15 +02:00
Olivier Goffart
9066ad5790 t7.pl: Test that deleting a directory restores it and all its sub directories 2014-06-27 11:31:35 +02:00
Olivier Goffart
62d0e670dc Add t7.pl Test for operation of files with restrictions 2014-06-27 11:22:53 +02:00
Jenkins for ownCloud
e7d597045b [tx-robot] updated from transifex 2014-06-27 02:06:13 -04:00
Jenkins for ownCloud
eaa3a2eae2 [tx-robot] updated from transifex 2014-06-27 01:25:23 -04:00
Klaas Freitag
40d765c73a Remove version suffix, final release 1.6.1 2014-06-26 16:09:21 +02:00
Olivier Goffart
21d7d8988a t1.pl: add a sleep to make sure the mtime of the files are different
It could be that the files are changed in the same second if the previous
sync was fast, and therefore the changes not detected.
2014-06-26 13:11:47 +02:00
Klaas Freitag
e76386be4f Revert "ownCloudcmd: Use Account object and ConnectionValidator."
We decided that owncloudcmd should not share the config with mirall.
This reverts commit 5f96de32bb.
2014-06-26 10:16:56 +02:00
Jenkins for ownCloud
b3b3ca0e16 [tx-robot] updated from transifex 2014-06-26 02:06:14 -04:00
Jenkins for ownCloud
730e86c4cd [tx-robot] updated from transifex 2014-06-26 01:25:24 -04:00
Daniel Molkentin
23e0af5cc1 Documentation update from Mark. 2014-06-25 22:04:33 +02:00
Jenkins for ownCloud
a92f1cb055 [tx-robot] updated from transifex 2014-06-25 06:34:41 -04:00
Jenkins for ownCloud
a54162e009 [tx-robot] updated from transifex 2014-06-25 06:31:32 -04:00
Olivier Goffart
48864a6921 httpcredentials: Remove useless mutex
The mutex is not shared with any thread, so it is totaly useless.

Yes: there are possible races here. (with the account, but also with the
user and password)
2014-06-25 12:15:30 +02:00
Olivier Goffart
92f07cb60f Enable C++11
In order to avoid the warning
 warning: anonymous variadic macros were introduced in C99
Due to the use of variadic macro in the qDebug macro in Qt 5.3

C++11 requires a space between string literal and macro to avoid the
ambiguity with user defined litteral
2014-06-25 12:01:27 +02:00
Klaas Freitag
5f96de32bb ownCloudcmd: Use Account object and ConnectionValidator.
That reads the credentials from the mirall config file if it was not
defined on the command line. Moreover, the connection is validated
before, which sets up the credentials properly.
2014-06-24 15:33:42 +02:00
Klaas Freitag
d2436ce23d Networkjobs: Check if reply body is empty before parsing.
This avoids a false warning that the result is not valid JSON.
2014-06-24 15:17:33 +02:00
Olivier Goffart
fbadadc377 propagator: Fix folder duplication if the folder is renamed on the server while uploading
While uploading a new folder, if the folder is renamed on the server
when still uploading, the result will be that the files that are already
uploaded will end up in the new filder name, but the file that were
not still are in the old folder.

After renaming, all the new uploads wil fail with an error on this sync
because the parent directory don't exist.
But they were uploaded with the old name in the next sync because
the renaming was not detected because the file id was not in the DB

Fix the problem by fetching the file id always when creating a new
directory, on the next sync, and saving it in the database ummediatly

https://github.com/owncloud/enterprise/issues/191
2014-06-24 12:00:13 +02:00
Olivier Goffart
9adc30ab9f Shibboleth: keep the cookie from the wizard to the ShibolethCredentials
Otherwise the user is asked twice for autentication on first sync.

Fixes https://github.com/owncloud/enterprise/issues/193
2014-06-24 11:44:52 +02:00
Olivier Goffart
8de3bda0b1 csync_update: update the permission in the db when they change
The current code only update the permissions in the DB when
the permission becomes non-empty.
Now we update the permission each time they change.

That way the code is the same for file id and permission so it is
simpler.
2014-06-24 11:10:50 +02:00
Olivier Goffart
3c4f410a4e cmake compilation flags: don't define -Wdeclaration-after-statement
We are in 2014, let me use C99 already.
2014-06-24 11:02:58 +02:00
Olivier Goffart
9c0a21a5fb Permission: keep a space if the permission is empty
To distinguish no permission present to nothing is allowed.
That was the intention of the old code but it did not work as
the first if was always taken
2014-06-24 10:52:42 +02:00
Olivier Goffart
94ddf7e5d8 Merge remote-tracking branch 'origin/il' 2014-06-24 08:40:27 +02:00
Jenkins for ownCloud
f45dd8e94f [tx-robot] updated from transifex 2014-06-24 01:25:30 -04:00
Olivier Goffart
b735dc07d6 Permissions: Consider and empty remotePerms from csync as NULL
Since remotePerm from csync is never NULL (as it is a buffer),
we consider that if it is empty, there was no permission set
(and therefore everything is allowed)

csync will put a space in the permission if any permission was set
2014-06-23 15:05:48 +02:00
Olivier Goffart
68c902e60b propagator: Fix restoring directory
If the result of a restored directory is SoftError, this prevent
to sync the rest of the directory

Therefore, we introduced a new status Restored,  which means that
the job was a success, but is a restoration and therefore should be
seen as a warning
2014-06-23 13:56:17 +02:00
Olivier Goffart
e19214c3c4 permissions: record them even if the instruction is NONE
when the instruction is NONE, we may return from this function
before having registered the permission in the SyncEngine::_remotePerms
hash.
Move the code a bit up.
2014-06-23 13:35:34 +02:00
Olivier Goffart
4759429702 Fix compilation after merge
Some initializer were added in 1.6 for variable that are gone in master
2014-06-23 12:53:51 +02:00
Olivier Goffart
b626589c07 Merge branch 'il'
Conflicts:
	src/mirall/folderstatusmodel.h
2014-06-23 12:52:03 +02:00
Olivier Goffart
02704cdf74 Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
	csync/src/csync_statedb.c
	src/mirall/syncengine.cpp
	src/mirall/syncfileitem.h
2014-06-23 12:48:34 +02:00
Klaas Freitag
a7d251f8fc Update changelog for 1.6.1 2014-06-23 11:06:39 +02:00
Jenkins for ownCloud
4555d4bcbe [tx-robot] updated from transifex 2014-06-23 01:25:24 -04:00
Jenkins for ownCloud
184e58f5e5 [tx-robot] updated from transifex 2014-06-22 01:25:22 -04:00
Jenkins for ownCloud
5c7f3c1642 [tx-robot] updated from transifex 2014-06-21 01:25:26 -04:00
Daniel Molkentin
7a8a3855b8 Mac: Make <ESC> close the settings dialog again 2014-06-20 16:37:07 +02:00
Daniel Molkentin
603a238eb9 Disable minimize button for Preferences on Mac 2014-06-20 16:31:17 +02:00
Olivier Goffart
b7b6cf4b3f Shibboleth: Always ask for the password if we are going to open the log window
If we don't have the cookie in the keychain (e.g. the keychain is
unavailable) but there is still session cookie in the cookie jar,
showing the browser won't ask for authentication.
2014-06-20 16:25:35 +02:00
Daniel Molkentin
c855b783d9 NSIS: Remove duplicated entry 2014-06-20 15:53:10 +02:00
Daniel Molkentin
f593fc8e4d NSIS: Bump required libpng version to 16 2014-06-20 15:50:42 +02:00
Klaas Freitag
ae5cbb8451 Version: Bumped to rc1 2014-06-20 15:37:50 +02:00
Klaas Freitag
041066a252 Exclude: Add a missing free in case of empty lines.
This fixes Coverity CLT 12893
2014-06-20 15:15:35 +02:00
Daniel Molkentin
9ca82ba14d NSIS: add libwinpthread dependency 2014-06-20 14:58:05 +02:00
Klaas Freitag
36331512bc doc: Updated package list for win32 build. 2014-06-20 14:41:36 +02:00
Olivier Goffart
b29a757b18 Revert "csync file util: Remove compare file function, not needed anymore."
This break the test.
And the function is aleady gone in master anyway

This reverts commit 407b3bebfe.
2014-06-20 14:29:43 +02:00
Daniel Molkentin
485a6926c5 FancyLineEdit: initialize all members
This fixes Coverity CID 12912
2014-06-20 13:46:57 +02:00
Daniel Molkentin
f3de6f46db Folder: Removed unused member _pathWatcher
This fixes Coverity CID 12914
2014-06-20 13:42:26 +02:00
Daniel Molkentin
1309dc27d9 Remove previously unused member
This fixes Coverity CID 12915
2014-06-20 13:40:55 +02:00
Daniel Molkentin
31469d6a3e Folderwizard: Properly initialize all members
This fixes coverity CID 12916
2014-06-20 13:38:36 +02:00
Daniel Molkentin
88776770f7 Legacy Propagator: Properly initialize members
This fixes coverity CID 12919
2014-06-20 13:36:15 +02:00
Daniel Molkentin
bbf8b9f8dd syncengine: properly initialize all members in ctor
This fixes Coverity CID 12922
2014-06-20 13:28:52 +02:00
Daniel Molkentin
6ff38d8005 Cleanup member initialization in Theme
This fixes coverity issue 12925
2014-06-20 13:28:52 +02:00
Daniel Molkentin
6d13b5cc43 wizard setuppage: Clean up and properly initialize members
This fixes Coverity CID 12926
2014-06-20 13:28:52 +02:00
Daniel Molkentin
73ab2804c4 owncloudwizard: properly initialize _account memember
This fixes Coverity CID 12927
2014-06-20 13:28:52 +02:00
Klaas Freitag
db3d2eed5f csync core: Remove logically dead code: Can never be reached.
This fixes Coverity CID 12881
2014-06-20 13:08:03 +02:00
Klaas Freitag
d995d1190f SyncFileItem: Some more proper member initializations.
This fixes a Coverity CID
2014-06-20 12:54:46 +02:00
Klaas Freitag
3217e42a0f SyncJournalDB: Initialize size member properly with 0
This fixes Coverity CID 12924
2014-06-20 12:37:49 +02:00
Klaas Freitag
1dd58a537e owncloudcmd: Fix structurally dead code.
This fixes Coverity CID 12928
2014-06-20 12:34:15 +02:00
Olivier Goffart
3e916cfbb9 remove unused member
CID 12915
CID 12926
2014-06-20 12:08:58 +02:00
Olivier Goffart
4a9ad14e11 Folder: remove unused variable
CID 12914
2014-06-20 12:01:20 +02:00
Olivier Goffart
f80816d88f SyncEngine: silence coverity issue 12885
It was complaining that we use the context later in the function
but the csync context should never be null anyway
2014-06-20 11:53:22 +02:00
Olivier Goffart
b34afa1afc reconcile: use the proper enum type
thankfully the value hapenned to be the same, but the type
is of CSYNC_FTW_..  and not CSYNC_VIO_FILE_TYPE
Detected by coverity (CID 12887)
2014-06-20 11:51:07 +02:00
Olivier Goffart
b7c9fa6d5f csync_owncloud: silent CID 12883 2014-06-20 11:51:07 +02:00
Olivier Goffart
61ad376bf4 accountsettings: silent coverity warning 12884
We use f anyway, so if we are going to test if it's null we can as
well return
2014-06-20 11:51:07 +02:00
Klaas Freitag
407b3bebfe csync file util: Remove compare file function, not needed anymore.
This also fixes Coverity CID 12890 and CID 12898
2014-06-20 11:39:28 +02:00
Olivier Goffart
f04c80dd0e httpbf: silent coverity issue 12905 2014-06-20 11:33:29 +02:00
Olivier Goffart
1e788d3d60 folderwizard: fix possible use of null pointer
Coverity issue 12907
2014-06-20 11:29:28 +02:00
Olivier Goffart
83171bf025 accountsettings: remove unused function
It was moved into owncloudgui before
And it was broken (bad use of QUrl and use of null pointer
2014-06-20 11:27:37 +02:00
Olivier Goffart
2e51721851 owncloudgui: Fix compilation 2014-06-20 11:26:41 +02:00
Olivier Goffart
4d4a0148e4 owncloudgui: use QUrl::fromLocalFile 2014-06-20 11:21:36 +02:00
Klaas Freitag
b144a5bbf9 csync_exclude: Add a missing free of path components.
This fixes Coverity CID 12895
2014-06-20 11:14:50 +02:00
Olivier Goffart
5225fe07e0 csync_owncloud_recursive_propfind: "fix" possible memory leak
This was only leaking memory if ne_path_parent returns 0, which
should never happen

This fixes coverity issue 12897
2014-06-20 11:12:45 +02:00
Klaas Freitag
85cdbd1f1d stateDB: Close the file descriptor even if stat failed.
This fixes Coverity CID 12897
2014-06-20 11:05:40 +02:00
Klaas Freitag
e4f8a136f1 StateDB: Free locale string also if attribs are invalid.
This fixes Coverity CID 12898
2014-06-20 11:05:40 +02:00
Daniel Molkentin
c263c38cdf statedb.c: fix potential memory leak on win32
This fixes coverity issue 12898
2014-06-20 10:58:03 +02:00
Daniel Molkentin
df8553e878 httpbf.c: Fix resource leak
This fixes Coverity CID 12902
2014-06-20 10:58:03 +02:00
Daniel Molkentin
bec66c85d4 Fix potential memory leak
This fixes Coverity CID 12893
2014-06-20 10:58:03 +02:00
Daniel Molkentin
f9710cc1d5 c_time: Fix resource leak in error case
This fixes Coverity CID 12903
2014-06-20 10:58:03 +02:00
Daniel Molkentin
6b041b0846 Fix use-after-free in QNAM propagator
This fixes Coverity CID 12929
2014-06-20 10:58:03 +02:00
Klaas Freitag
d0c992c991 Updater: Free tmp variable that might point to temp malloced memory
This fixes Coverity CID 12900
2014-06-20 10:41:01 +02:00
Klaas Freitag
9ee86cf06b Fix resource leak in win32 code path, added free of locale filename.
This fixes Coverity CID 12901
2014-06-20 10:25:00 +02:00
Jenkins for ownCloud
817f89d586 [tx-robot] updated from transifex 2014-06-20 01:25:21 -04:00
Olivier Goffart
458645101b SocketApi: query the database for the Shared flag 2014-06-19 15:37:29 +02:00
Olivier Goffart
1e306012ec SocketApi: Fix recursiveFolderStatus
If only one file is EVAL or NEW, this mean the folder need to be sync
2014-06-19 15:25:30 +02:00
Olivier Goffart
db2c198feb SocketAPI: Merge command_RETRIEVE_FOLDER_STATUS and command_RETRIEVE_FILE_STATUS
They do the same thing because fileStatus calls recursiveFolderStatus
for directories anyway
2014-06-19 15:02:27 +02:00
Markus Goetz
71a901a24e TokenCredentials: Fix cookie behaviour
parseCookies did not work as expected. Now we just hard-set the
token credentials into the Cookie header for QNAM jobs.
This is the same behaviour as for neon jobs.

(cherry picked from commit 855a8c0a335f76b82b8e647a8c5a4ae692065d3b)
2014-06-19 14:41:47 +02:00
Olivier Goffart
f4ea34e63b SyncJournalDb: use QByteArray for etag and fileid 2014-06-19 14:27:04 +02:00
Olivier Goffart
0d54b88ab2 Socket API: Make it work with Qt5's QUrl
QUrl default constructor has a different behaviour in Qt5
One must not forget to call QUrl::fromLocalFile in Qt5
2014-06-19 14:22:03 +02:00
Olivier Goffart
da0bd14bf3 Socket API: move the code that gets the status out of the folder
Move the code in socketapi.cpp where it belongs
2014-06-19 14:08:30 +02:00
Jenkins for ownCloud
6ce746b9ea [tx-robot] updated from transifex 2014-06-19 01:25:20 -04:00
Olivier Goffart
02355696ff engine: When restoring the file, use the mtime and fileid from the server
Important to switch the things around as we are going to write them in the DB
2014-06-18 16:15:14 +02:00
Olivier Goffart
38254125c9 csync: fix the size in strncpy for the remote perms
We must only do strncpy with size one smaller than
the size of the buffer in order to leave at least
one '\0' at the end
2014-06-18 15:56:13 +02:00
Olivier Goffart
e5b3363ecf csync_statedb: remove noisy output 2014-06-18 15:40:26 +02:00
Olivier Goffart
646eafb05d Legacy propagator jobs: Do not limit bandwidth when aborting
When aborting, we want the last job to be as fast as possible
as it blocks the UI.  So don't limit the bandwidth in that case
2014-06-18 15:09:19 +02:00
Olivier Goffart
0880444e37 Syncengine: Wait for the neon thead to be finished before destroying the Propagator and calling csync_commit
The legacy job might still need the neon session and the propagator.
We need to make sure the thread exits before.

This fixes crash when pausing a sync made with the legacy jobs
(for example when there is network limitation)
This should fix https://github.com/owncloud/enterprise/issues/200
2014-06-18 15:08:23 +02:00
Jenkins for ownCloud
6c3eb06b65 [tx-robot] updated from transifex 2014-06-18 01:25:22 -04:00
Olivier Goffart
0a953b91f9 csync_vio_local: fix memory leak on windows 2014-06-17 16:40:38 +02:00
Klaas Freitag
b71881d300 SyncEngine: Use QSet for the seenFiles rather than QHash.
We can save some memory here as the seenFiles list can be long.
2014-06-17 16:30:11 +02:00
Daniel Molkentin
b91967f4d9 Fix regression over 1.5: Fix non-fba auth for Shib IdPs 2014-06-17 14:53:23 +02:00
Olivier Goffart
c759e8bb8f permission: read them from the tree 2014-06-17 14:50:24 +02:00
Olivier Goffart
b83f6c0b3a sync engine: try to respect permission
This is still Work in progress
2014-06-17 14:44:58 +02:00
Olivier Goffart
ade92d8ac1 csync test: fix warning 2014-06-17 14:16:42 +02:00
Jenkins for ownCloud
08398784e4 [tx-robot] updated from transifex 2014-06-17 01:25:29 -04:00
dark-eye
afea881d90 Merge pull request #1717 from dark-eye/master
Issue-142 : added time estimation and bandwidth indicator to the systray
2014-06-17 08:16:52 +03:00
Olivier Goffart
194bba2118 Merge remote-tracking branch 'origin/il' into tmp_master 2014-06-16 16:58:57 +02:00
Markus Goetz
a5967e4ecd CSync: Fix win32 compile 2014-06-16 16:53:10 +02:00
Olivier Goffart
21e22a50c5 Merge remote-tracking branch 'origin/il' into master 2014-06-16 16:43:48 +02:00
Olivier Goffart
2f361278d2 Merge remote-tracking branch 'origin/1.6' into 'il' 2014-06-16 16:41:48 +02:00
Markus Goetz
319cf76417 CSync: Move compiler ifdef outwards 2014-06-16 16:26:00 +02:00
Markus Goetz
be7b08b50a CMake: Fix token auth compile 2014-06-16 15:34:46 +02:00
Klaas Freitag
2d234cd96f Propagator: Handle file open error properly and log error message. 2014-06-16 13:35:50 +02:00
Klaas Freitag
1230e87330 Propagator: Give a more specific error message on file remove.
If the file is removed during it is synced up, there is now a correct
error message saying that, rather than "the file has changed during
upload."
2014-06-16 13:34:59 +02:00
Jenkins for ownCloud
22c01748ce [tx-robot] updated from transifex 2014-06-16 02:06:11 -04:00
Jenkins for ownCloud
02809d5016 [tx-robot] updated from transifex 2014-06-16 01:25:22 -04:00
Jenkins for ownCloud
d21f312936 [tx-robot] updated from transifex 2014-06-14 01:25:22 -04:00
Daniel Molkentin
b2966fecc7 Shib: remove slotLoadFinished() from webview dtor
This is a relict from when the webview was reused.
It is now pointless, since it's now destruct-on-close.
2014-06-14 03:00:18 +02:00
Daniel Molkentin
4abe00ff6c Shib: Ensure browser view gets closed before QNAM
Otherwise, QWebPage tries to delete its QNetworkReplies, which have
already been deleted by the QNAM destruction, who is their parent.

Fixes #1840
2014-06-14 03:00:18 +02:00
Markus Goetz
357b041bb4 CSync: Give ctx to proxy callback
This fixes a crash.
2014-06-13 16:46:51 +02:00
Markus Goetz
61999a67cd CSync: Give ctx to proxy callback
This fixes a crash.
2014-06-13 15:36:00 +02:00
Daniel Molkentin
8da97a7c6f Merge remote-tracking branch 'origin/1.6' 2014-06-13 13:31:50 +02:00
Klaas Freitag
e1db834ec9 Add missing cmakedefine for HAVE_ASPRINTF and minor cleanup.
Fixes windows build.
2014-06-13 13:30:59 +02:00
Olivier Goffart
2caa69e0cb blacklist: use the _ERROR instruction instead of _IGNORE
When something is in the blacklist, still use the _ERROR instruction
that way the applications can still report errors for blacklisted
items
2014-06-13 11:19:31 +02:00
Jenkins for ownCloud
c5932569f8 [tx-robot] updated from transifex 2014-06-13 01:25:21 -04:00
Klaas Freitag
c72c72a106 FolderWizard: Get folder map from FolderMan rather than store locally.
If the Folder::Map object is kept locally in the wizard, changes to
the map are not reflected there, as they happen when signing out.
This fixes bug #1875
2014-06-12 23:17:13 +02:00
Eran
1921d1a5be Merge branch 'dark-eye-master' 2014-06-12 12:51:56 +03:00
Daniel Molkentin
4a5ef8f173 Fix a possible crash caused by a dangling pointer 2014-06-12 10:29:17 +02:00
Jenkins for ownCloud
8745a684ae [tx-robot] updated from transifex 2014-06-12 02:06:12 -04:00
Jenkins for ownCloud
892cd962f8 [tx-robot] updated from transifex 2014-06-12 01:25:22 -04:00
Jenkins for ownCloud
3f543b881d [tx-robot] updated from transifex 2014-06-11 02:06:11 -04:00
Jenkins for ownCloud
4a1d0eb80e [tx-robot] updated from transifex 2014-06-11 01:25:22 -04:00
Klaas Freitag
ed26bcb3e7 Theme: Show the stringified app version rather than the major version.
This was a regression, we changed that by accident in 1.6.0.

(cherry picked from commit 760ecd71fc)
2014-06-10 17:05:15 +02:00
Klaas Freitag
760ecd71fc Theme: Show the stringified app version rather than the major version.
This was a regression, we changed that by accident in 1.6.0.
2014-06-10 13:48:27 +02:00
Jenkins for ownCloud
04f1026cd8 [tx-robot] updated from transifex 2014-06-10 01:25:24 -04:00
Jenkins for ownCloud
b03c4cc62e [tx-robot] updated from transifex 2014-06-08 01:25:21 -04:00
Olivier Goffart
18e9357aaf network limits: Fix warning
About the order of initialization
2014-06-07 12:20:54 +02:00
Olivier Goffart
46b8260693 network limits: Do not read them from the config file in the engine
Do that from the folder, because the engine can be used in app where
the MirallConfigFile is not accessible
2014-06-07 12:09:22 +02:00
Olivier Goffart
d5bd3190d4 csync unit tests: fix cimpilation 2014-06-07 12:08:58 +02:00
Jenkins for ownCloud
e497b6d458 [tx-robot] updated from transifex 2014-06-07 02:06:12 -04:00
Jenkins for ownCloud
2e4320ee05 [tx-robot] updated from transifex 2014-06-07 01:25:22 -04:00
Eran
3406fcdce4 Merge branch 'master' of https://github.com/owncloud/mirall into dark-eye-master
Conflicts:
	src/mirall/progressdispatcher.h
2014-06-06 18:56:58 +03:00
Klaas Freitag
14a5ff6747 overlayIcons: First version of the nautilus overlay python module 2014-06-06 17:49:19 +02:00
Markus Goetz
8dbfcd782b CSync: Fetch permissions from server for whole tree on server update 2014-06-06 17:10:07 +02:00
Olivier Goffart
abf0f90a13 SocketAPI: broadcast change when an item is done 2014-06-06 15:52:55 +02:00
Klaas Freitag
4d5c74c019 SocketAPI: Add another API call for stat of file and folder separately. 2014-06-06 15:38:20 +02:00
Markus Goetz
70ff928381 CSync & statedb: Parse 'perm' from server
ownCloud 6 sends this.
2014-06-06 15:24:17 +02:00
Markus Goetz
b48ab79a92 CSync & statedb: Remove uid/gid
Columns are still in the DB as we don't want to break any compatibility.
2014-06-06 13:41:16 +02:00
Markus Goetz
9a7fbd4f71 csync_owncloud: Parse properties in one function 2014-06-06 13:41:16 +02:00
Jenkins for ownCloud
ef3b4956ad [tx-robot] updated from transifex 2014-06-06 01:25:21 -04:00
Markus Goetz
fd4642d827 Folder: Don't add ignored files on startup
Before each sync is enough.
(We could do it at startup only, but so far it is good to have
it at each sync so we can easier see stuff in the log)
2014-06-05 17:50:18 +02:00
Olivier Goffart
6dd248e527 csync: fix warnings
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2014-06-05 15:48:53 +02:00
Olivier Goffart
7d00c3646a csync: remove unused variable 2014-06-05 15:45:15 +02:00
Olivier Goffart
e355e12385 Fix crash in tests 2014-06-05 15:43:27 +02:00
Markus Goetz
34b31c0146 CSync: Fix test compile
The previously applied pull request apparantly broke the compile
because it re-ordered entries in the CMakeLists
2014-06-05 14:22:10 +02:00
Daniel Molkentin
3934fa019e SocketAPI: proper name for pipe on windows 2014-06-05 12:02:57 +02:00
Daniel Molkentin
dc53e96f92 [Janitor] Bump version on master to 1.7.0prealpha 2014-06-05 12:02:00 +02:00
Daniel Molkentin
7fcf6f9f79 Merge branch '1.6' 2014-06-05 12:01:50 +02:00
Daniel Molkentin
b814b45e50 Add version and product information to installer properties 2014-06-05 11:51:12 +02:00
Daniel Molkentin
ded8914df2 [Janitor] Bump version to 1.6.1pre 2014-06-05 11:51:12 +02:00
Olivier Goffart
bd48ab23c3 Merge pull request #1835 from zizzfizzix/cmake_fixes
A little CMake cleanup
2014-06-05 11:48:40 +02:00
Markus Goetz
4e28ba73bb Windows: Fix build harder. 2014-06-05 10:13:20 +02:00
Jenkins for ownCloud
16cb37ecd0 [tx-robot] updated from transifex 2014-06-05 01:25:23 -04:00
Olivier Goffart
7a7b0e8939 propagator: Ignore new directory inside removed directory.
This fixes te bug if one create a tree of folders and subfolders
and delete them while they are uploading. Some folder would
reappears
2014-06-04 16:37:46 +02:00
Markus Goetz
d4d630b2e9 Windows: Fix build 2014-06-04 12:47:17 +02:00
Olivier Goffart
a4f6370774 propagator: do not update perent directory etag before sub directories are removed
Direcotries are removed at the end, and we don't want to update
parent directory etag before the delete is performed, or the next
sync may read from db and think the files are not removed.

Issue #1845
2014-06-04 12:31:30 +02:00
Markus Goetz
2ff27cdd63 Merge pull request #1844 from owncloud/csyncStdlibReduction
Csync reduction

Reviewed offline by @dragotin
2014-06-04 11:28:35 +02:00
Markus Goetz
2f81167164 CSync: Remove more unused things 2014-06-04 11:19:09 +02:00
Markus Goetz
6897c5d41f CSync: Always have statedb enabled 2014-06-04 11:06:41 +02:00
Markus Goetz
233450d850 CSync: Remove config dir setting 2014-06-04 10:56:56 +02:00
Markus Goetz
7428a8fa63 CSync: Remove unused std functions 2014-06-04 10:33:19 +02:00
Markus Goetz
18359d7871 StateDB: Remove _csync_win32_hide_file and use other implementation 2014-06-04 09:46:31 +02:00
Jenkins for ownCloud
df12a58e3d [tx-robot] updated from transifex 2014-06-04 01:25:24 -04:00
Kuba Serafinowski
4b3d124b5a put man docs in the correct /man1 directory
man doesn't work here when the docs are in a /man directory
2014-06-04 00:10:18 +03:00
Kuba Serafinowski
51e941e7b5 look for Sparkle only on OS X 2014-06-04 00:10:17 +03:00
Kuba Serafinowski
62ea6f316f don't look for CMocka if we're not building unit tests 2014-06-04 00:10:16 +03:00
Olivier Goffart
6605a89990 csync_statedb: Fix wrong % code in debug output
%ld is for long, but int64_t is larger than long on windows
2014-06-03 18:28:31 +02:00
Olivier Goffart
4cb9b3a85b Test: fix compilation 2014-06-03 17:54:43 +02:00
Olivier Goffart
806ab8ea46 csync: remove the local mode
It is no longer used for a long time
2014-06-03 17:52:07 +02:00
Olivier Goffart
582a8fe7fd Merge branch '1.6' 2014-06-03 17:27:12 +02:00
Olivier Goffart
08ca8b54b1 test fles with '%' and '#' 2014-06-03 17:27:06 +02:00
Olivier Goffart
abafbef985 Optimize move
Do not send the mtime for each file without a directory, because the server now keeps it
2014-06-03 17:27:06 +02:00
Olivier Goffart
6e10b8c5c4 Propagator: Recover from 'precondition failed' error
When we detect a precondition failed, it is possible that it is
because the etag in the database is wrong.  We must therefore not
read from the database on the next sync.  In order to avoid that, we
reset the etag of parent directories to invalid values

Fixes #1767
2014-06-03 17:22:40 +02:00
Markus Goetz
06863ca9c6 Merge pull request #1839 from owncloud/directDownload
Direct download URL support + global variable refactoring

Reviewed offline by @dragotin
2014-06-03 16:44:05 +02:00
Markus Goetz
e49b8981dd CSync: Shorten WebDAV property name 2014-06-03 16:41:57 +02:00
Olivier Goffart
24616bead4 Fix syncing a folder with '#' in the name
Or an url with '#'

Fixes #1838

The problem is a bug fixed in Qt5 now breaks.
In Qt4, QUrl::setPath() did not properly handle path with '#' in them
and QUrl::toString would restitute the '#'.

But csync will blindly do  "uri + path" before passing the path to
VIO.  because csync_update has no idea that the VIO plugin need special
encoding, the encoding cannot be done there.  But csync_owncloud then
encodes the full path.  So if the uri contains '#', it must not be already
encoded or there will be two encoding.
2014-06-03 15:45:10 +02:00
Markus Goetz
2e91557c28 CSync: Rename callback functions 2014-06-03 15:01:35 +02:00
Markus Goetz
4d4eab8b1c CSync & Propagator: Support a direct download URL
This is for server file backends that support sending a
direct URL.
2014-06-03 14:55:34 +02:00
Olivier Goffart
13f9970257 Fix some possible "Precondition Failed" bug
The problem was if there was a false conflict: the file has been touched
both on the server and the client.
 - etag has changed on the server
 - mtime has changed on the server and the client and is the same
 - and file size is the same on both the server and the client

This may also happen if the file is uploaded on the server, but the client
looses connection (or crashes) before it get notified of the etag.

In both tree, the instruction is EVAL, but we reduce it to a NONE because
we detected that the conflict is 'false'.  Still, we need to update the db
with the new etag.  (_should_update_db)
The problem was that we would set the flag on the wrong tree.
This was not a problem when the file was NEW on both side since  we checked
for null etag and used the other one then.
2014-06-03 12:23:30 +02:00
Markus Goetz
4d4ae9374b CSync: Remove old defines 2014-06-03 11:51:12 +02:00
Markus Goetz
b8e20b412c CSync: We can access the context directly 2014-06-03 11:51:12 +02:00
Markus Goetz
e36f3c5b10 CSync: Remove one VIO layering 2014-06-03 11:51:12 +02:00
Markus Goetz
8a55f831f4 CSync: Use context instead of global variable 2014-06-03 11:51:12 +02:00
Markus Goetz
0dcc9be5c1 CSync: Remove owncloud_stat
We get already all metadata with the readdir
2014-06-03 11:51:12 +02:00
Markus Goetz
5ee00a8df7 CSync: Simplify csync_owncloud stat/resource handling 2014-06-03 11:51:12 +02:00
Klaas Freitag
1af3d3f18b More descriptive error message when querying the database without hit. 2014-06-03 09:50:09 +02:00
Klaas Freitag
f54248c0a7 Minor cleanups and changes 2014-06-03 09:50:09 +02:00
Klaas Freitag
2911c0e1c4 Add a recursiveFolderStatus method 2014-06-03 09:50:09 +02:00
Klaas Freitag
16d35c1489 Avoid crash on csync_ctx is NULL. 2014-06-03 09:50:09 +02:00
Daniel Molkentin
746c15b4aa Remove debug layout 2014-06-02 19:38:04 +02:00
Daniel Molkentin
7e65c9741e [Shib] Ensure only one fetch job can open the browser 2014-06-02 17:41:49 +02:00
Jenkins for ownCloud
a50e7c1b48 [tx-robot] updated from transifex 2014-06-02 01:25:23 -04:00
Jenkins for ownCloud
0ae82e2041 [tx-robot] updated from transifex 2014-06-01 02:06:11 -04:00
Jenkins for ownCloud
22af756fe3 [tx-robot] updated from transifex 2014-06-01 01:25:21 -04:00
Jenkins for ownCloud
2f1bec28dd [tx-robot] updated from transifex 2014-05-31 01:25:23 -04:00
Markus Goetz
022a3fcd92 OS X: Fix localFileNameClash
We need to compare the other way round and compare only the file name
because our sync directory might be symlinked and then resolve to
another canonical path (but we were only interested in the filename part
anyway)
2014-05-30 15:47:53 +02:00
Daniel Molkentin
064dcdb25a 1.6.0 final 2014-05-30 12:38:44 +02:00
Jenkins for ownCloud
938dce7fa6 [tx-robot] updated from transifex 2014-05-30 01:25:21 -04:00
Olivier Goffart
0151682a53 Make sure that OwncloudPropgator::finished is only emit once
When we abort, each job currently running may result in a call to finished().
It used to cause a crash because we would unlock the _syncMutex twice

Fixes #1793
2014-05-29 12:15:13 +02:00
Olivier Goffart
864f2cdc7d remove the _syncMutex and replace it by a simple bool 2014-05-29 11:35:13 +02:00
Jenkins for ownCloud
77ddedc859 [tx-robot] updated from transifex 2014-05-29 01:25:27 -04:00
Eran
cd82a8585a change the text to be a little more descriptive and use shorthand in the context menu 2014-05-29 00:09:02 +03:00
Daniel Molkentin
0c1ab533e6 Do not trim serial numbers
This broke in a refactoring. The 'true' was interpreted as length of 1.

Fixes part of #1436
2014-05-28 21:16:00 +02:00
Olivier Goffart
1dd7f736d0 Fix another crash at exit
Fixes #1794
2014-05-28 19:59:35 +02:00
Olivier Goffart
571c199db8 remove broken connection
Fixes #1822
2014-05-28 18:11:39 +02:00
Daniel Molkentin
40715cbc77 Update ChangeLog 2014-05-28 16:33:01 +02:00
Daniel Molkentin
3d2a2df86f Allow to set a smaller timeout value in the config file
Added to debug #1724
2014-05-28 16:28:22 +02:00
Daniel Molkentin
86a48b52e9 Shib: Show a notification whenever the shib session times out
This is designed as a passive popup notification so that it will
not surprise or annoy the users.

Fixes Enterprise issue #179
2014-05-28 15:25:43 +02:00
Olivier Goffart
ebe1f986f1 Only remove session cookies
This should disconnect without loosing long lived cookie
2014-05-28 15:24:14 +02:00
Eran
6927fc80c3 change the mapping to use short hand and also made the mapping logic a little losser 2014-05-28 13:09:30 +03:00
Olivier Goffart
dd1152dd4f Clear all cookies when loging out 2014-05-28 11:41:06 +02:00
Olivier Goffart
ce9bfd319a Fix the sib window re-appearing.
When the windows is accepted, do not emit fetched which means the process is finished
one must first check the username is valid
2014-05-28 10:18:57 +02:00
Daniel Molkentin
f591ac6549 CookieJar: Reduce debug noise 2014-05-28 10:05:32 +02:00
Daniel Molkentin
4fd368c992 ShibCredentials: Ensure that _stillValid is not reset while the browser window is open
This will cause the browser window to open again after it has been told to close
if a network job has run in the background while the browser window was visible.

Fixes #1814
2014-05-28 10:05:32 +02:00
Eran
89a95d6445 fixed comment spelling 2014-05-28 08:28:03 +03:00
Jenkins for ownCloud
93f453057b [tx-robot] updated from transifex 2014-05-28 01:25:21 -04:00
Klaas Freitag
5a069d274b Pushed version suffix to rc3 2014-05-27 11:41:01 +02:00
Klaas Freitag
e275ad3866 Emit the sync finished signal a bit delayed.
This allows folder watcher events comnig in before the sync is marked
finished. This avoids "endless syncing" as described in bug #1808
2014-05-27 11:35:07 +02:00
Olivier Goffart
5813f63df8 Do not runs the check connection timer when there is no configured account
in order to avoid popup of the wizzard every 32 seconds

Fixes #1812
2014-05-27 11:05:09 +02:00
Jenkins for ownCloud
9a1f8ccf7b [tx-robot] updated from transifex 2014-05-27 01:25:28 -04:00
Klaas Freitag
449c00f019 No need to check for case preserving filesystem here.
That is done in the utility function instead.
2014-05-26 18:28:52 +02:00
Klaas Freitag
6017eb7ca6 Case clash check for local remove plus native separators. 2014-05-26 18:28:25 +02:00
Klaas Freitag
f1b2417967 Add check for case clash for legacy propagator download. 2014-05-26 18:28:25 +02:00
Klaas Freitag
181383e5f1 Check for case preserving file system in localCaseClash 2014-05-26 18:28:25 +02:00
Markus Goetz
c1b9d5c653 Propagator: Implement localFileNameClash for OS X 2014-05-26 17:36:52 +02:00
Klaas Freitag
964c3ac7bf Check for local file name clash before local renaming.
Return a proper error message in case.
2014-05-26 17:00:40 +02:00
Daniel Molkentin
6d8afabf41 Find export macro 2014-05-26 16:33:04 +02:00
Daniel Molkentin
0a7dbeb778 Export CookieJar 2014-05-26 16:29:26 +02:00
Olivier Goffart
3228fde4af Only set should_update_etag for directories in the update case
If there is an error during the local rename for a file, we don't
want to write the entry for the destination before because there might be
an error
2014-05-26 16:11:05 +02:00
Daniel Molkentin
0582abe8dd Shib: Wizard: Return to IdP selection when returning to creds page 2014-05-26 15:57:01 +02:00
Eran
f9192e27fa added "/s" to the bandwidth 2014-05-26 16:25:33 +03:00
Olivier Goffart
81f410970f ammend previous change 2014-05-26 15:01:26 +02:00
Olivier Goffart
e75c5236f2 Properly report errors when renaming a file
That is especially usefull when renaming to an existing file with a different case
2014-05-26 14:51:53 +02:00
Olivier Goffart
8a671c40d1 Make FolderMan a member of the application
The goal here is that it is going to be destroyed with the application
It need to be destoyed so the folder are destroyed, which is required
for properly finishing the sync while exiting.

It must not be destroyed after the application because the QSQLite plugin
may be already destroyed in that case.

Since the constructor of FolderMan is called earlier, we can't call the
config file too early

 fixes 1793
2014-05-26 14:37:15 +02:00
Olivier Goffart
50ce0f9681 Fix crash at exit when there is a log after the Logger has been destroyed
Use a proper static Logger instead of allocating one,  and cleanup
the QTMessageLogger when it is destroyed
2014-05-26 14:37:14 +02:00
Daniel Molkentin
a60902b33d Make sure the settings window is brought up when minimized
Fixes #1804
2014-05-26 14:32:08 +02:00
Olivier Goffart
5220786cf2 do not blacklist fatal error 2014-05-26 12:27:16 +02:00
Olivier Goffart
99cead68f5 Fix crash when aborting
When aborting, the slotFinished will destroy all the Jobs, but they need
one more even loop to finish cleanups

Fixes #1793
2014-05-26 12:23:25 +02:00
Olivier Goffart
7a209ba376 leak fix 2014-05-26 12:07:00 +02:00
Olivier Goffart
f9263da3de Fix crash when the account config is gone and there are still folder
In rare case (due to a bug in QSettings) the account config may disapear
We should not crash in that case
2014-05-26 11:08:32 +02:00
Daniel Molkentin
3f724e1c6a Fix Pref window for good
This was forgotten in 18677dbc3f
2014-05-26 09:37:43 +02:00
Jenkins for ownCloud
c9d3f7a0eb [tx-robot] updated from transifex 2014-05-26 01:25:25 -04:00
Eran
ba5e955ccb chaned the design a little 2014-05-25 22:43:41 +03:00
Jenkins for ownCloud
072af16f3b [tx-robot] updated from transifex 2014-05-25 02:06:12 -04:00
Jenkins for ownCloud
d2b6c626b5 [tx-robot] updated from transifex 2014-05-25 01:25:28 -04:00
Daniel Molkentin
115276408a Merge pull request #1805 from wakeup/master
Fix some typos
2014-05-24 15:26:06 +02:00
Volkan Gezer
9abffdb1a6 fix typo 2014-05-24 15:04:42 +02:00
Volkan Gezer
5b0307446a fix spacing 2014-05-24 15:03:45 +02:00
Jenkins for ownCloud
0f20a4f546 [tx-robot] updated from transifex 2014-05-24 01:25:29 -04:00
Klaas Freitag
1b2875c20a Use the moved implementation of the name clash detection method. 2014-05-23 18:58:21 +02:00
Klaas Freitag
bbdf7bf955 Check for case clash on downloads. 2014-05-23 18:58:21 +02:00
Klaas Freitag
57359968ed Added method localFileNameClash
Also reordered the implementations a bit.
2014-05-23 18:58:08 +02:00
Klaas Freitag
ea9f302b7a Read the blacklist entries case insensitive in case the file
system is only case preserving.
2014-05-23 16:13:35 +02:00
Klaas Freitag
ef0a3c212e Add a utility function fsCasePreserving.
Returns true if the underlying file system is case preserving instead
of case sensitive. That is true for Mac and Windows currently. Only
Linux has a case sensitive file system usually.
2014-05-23 16:13:35 +02:00
Daniel Molkentin
18677dbc3f Fix on-top/below-others window problem
- Don't give the settings window an always-on-top hint, or else
  sub dialogs will pop-under. Also, people seem to (ab-)use it
  as a status monitor... well

- raiseWidget() can only really do one thing: remove the dialog status
  from dialogs without a parent due to a bug in Qt. The previous
  implementation never really worked. Tested on Mac and Gnome 3 so far.

Fixes #1795
Fixes parts of #1775
2014-05-23 16:00:50 +02:00
Klaas Freitag
7e8b403116 More progress on the CI problem detection. 2014-05-22 17:12:59 +02:00
Klaas Freitag
1303379c9e Remove useless global varialbe for auth callback. 2014-05-22 12:54:14 +02:00
Daniel Molkentin
b995cd318c Fix/cleanup PropagateLocalMkDir::start() 2014-05-22 10:16:33 +02:00
Daniel Molkentin
ed19107161 Remove useless check. QFile::exists() is CI on CI filesystems
Tested on OS X and Windows
2014-05-22 10:06:10 +02:00
Jenkins for ownCloud
1b67f253dc [tx-robot] updated from transifex 2014-05-22 01:25:23 -04:00
Markus Goetz
667c835c49 Revert "remove auth callback setting in the csync module."
This commit broke syncing.
We need the callback to supply the password.

This reverts commit 8738128504.
2014-05-21 20:02:22 +02:00
Daniel Molkentin
5b298abba1 Revert "Set an "active" role for the menubar icon on Mac"
Apart from a small mistake in this commit, there seems to be
something else wrong.

This reverts commit 97362cff32.
2014-05-21 13:00:20 +02:00
Daniel Molkentin
4edbeece49 Fix connection following the update of the QtSingleApplication classes 2014-05-21 12:31:44 +02:00
Daniel Molkentin
97362cff32 Set an "active" role for the menubar icon on Mac
Fixes #1730
2014-05-21 11:19:38 +02:00
Daniel Molkentin
3db3c7b876 Update QtSingleApplication and QtLockedFile
Fixes stale temp file issues, and is needed for blocking support.
2014-05-21 11:19:38 +02:00
Klaas Freitag
8738128504 remove auth callback setting in the csync module. 2014-05-21 11:09:02 +02:00
Klaas Freitag
069eaf9170 Clear the authentication callbacks set before. 2014-05-21 11:09:02 +02:00
Klaas Freitag
d0b9b002e4 Show the sync icon in case the status is not yet defined.
This fixes the problem that on the first sync, no proper status icon is
shown on a potential long update phase.
2014-05-21 11:09:01 +02:00
Eran
fae3e46a59 made the code a little cleaner 2014-05-20 16:56:39 +03:00
Olivier Goffart
bdba56f60b Always wait on the thread before emiting finished
This ensure that there would be no way to have two thread running

Refactor all the location where finished is called in a single function
2014-05-20 12:32:06 +02:00
Jenkins for ownCloud
7087dbc445 [tx-robot] updated from transifex 2014-05-20 01:25:31 -04:00
Daniel Molkentin
7ade4bb6e6 AccountSettings: Handle button states more correctly
Fixes #1779
2014-05-19 15:46:23 +02:00
Daniel Molkentin
86117aed0d autostart unix impl: use mkpath instead of mkdir
Fixes TestUtility::testLaunchOnStartup(), if .config/ does not exist.
2014-05-19 12:42:04 +02:00
Jenkins for ownCloud
ed3d9a7479 [tx-robot] updated from transifex 2014-05-19 01:25:29 -04:00
Jenkins for ownCloud
3746a2efff [tx-robot] updated from transifex 2014-05-18 01:25:29 -04:00
Jenkins for ownCloud
9b53cc66e7 [tx-robot] updated from transifex 2014-05-17 01:25:38 -04:00
Klaas Freitag
43fe7b0d55 Detect directory case sensitivity clash on windows 2014-05-16 15:24:01 +02:00
Daniel Molkentin
5aa6f81ef3 1.6.0rc2 2014-05-16 09:50:50 +02:00
Jenkins for ownCloud
f838f28185 [tx-robot] updated from transifex 2014-05-16 01:25:29 -04:00
Olivier Goffart
e1f8eb5aa5 Another way to force a sync when choosing 'Keep files' 2014-05-15 19:36:01 +02:00
Olivier Goffart
f40a054cb7 Revert "Re-sync immediatly after "Keep files" when all files were removed"
This causes infinite sync loops

This reverts commit 8b469d3992.
2014-05-15 19:29:40 +02:00
Daniel Molkentin
adfb163593 1.6.0rc1 2014-05-15 17:22:01 +02:00
Eran
3777074e84 Remove extra space between the parenthesis when displaying estimation in the system tray 2014-05-15 17:46:25 +03:00
Daniel Molkentin
81c768099e Folder: Correctly reflect paused state after restart 2014-05-15 15:04:48 +02:00
Daniel Molkentin
4bcaebb322 Decrease debug noise 2014-05-15 15:04:48 +02:00
Olivier Goffart
8b469d3992 Re-sync immediatly after "Keep files" when all files were removed
Fixes #1710
2014-05-15 11:48:01 +02:00
Olivier Goffart
bb929db7e6 fix warning 2014-05-15 11:29:23 +02:00
Olivier Goffart
90ee274744 We need to call csync_commit in every error cases
Else there will still be outdated tree in the memory and the further sync
will be confused

Relates to #1710
2014-05-15 11:18:06 +02:00
Daniel Molkentin
9f6e9f8e1b Fix crash: if the credentials cannot be cast, don't deref, assume change 2014-05-15 11:12:18 +02:00
Klaas Freitag
943f9f60e3 Documented core dump catching 2014-05-15 11:11:13 +02:00
Klaas Freitag
f89bfce068 Enable core dumping if the env variable OWNCLOUD_CORE_DUMP is defined
Set OWNCLOUD_CORE_DUMP to anything to get a core dump in case of
crashing.
2014-05-15 11:01:21 +02:00
Klaas Freitag
ef44a59bed Better debugability. 2014-05-15 09:45:50 +02:00
Klaas Freitag
d96139f698 Commented verbose logging. 2014-05-15 09:45:50 +02:00
Daniel Molkentin
de970eb0a5 Fix wizard flow with shibboleth 2014-05-15 09:43:26 +02:00
Jenkins for ownCloud
7a28b44128 [tx-robot] updated from transifex 2014-05-15 01:25:29 -04:00
Eran
5310a3cc1d better time prediction 2014-05-14 16:57:14 +03:00
Daniel Molkentin
17a2e224c4 Fix memleak 2014-05-14 12:53:12 +02:00
Klaas Freitag
87386ce001 Fix testcase.
It failed because the directory where change happened triggered a
notification within the second before, so the event was skipped.
2014-05-14 12:49:11 +02:00
Daniel Molkentin
5ed4710d64 Merge pull request #1726 from owncloud/debian_bsd
Make Debian GNU/kFreeBSD compile
2014-05-14 12:20:17 +02:00
Klaas Freitag
5493c22584 Do not dispatch invalid progress information to avoid "unknown" messages 2014-05-14 11:52:22 +02:00
Klaas Freitag
64f4d1b387 Removed block parameter from terminateSync.
Do not pretend to immediately terminate the sync but let csync
finish planfully and free the mutex.
2014-05-14 11:52:22 +02:00
Daniel Molkentin
cdd8c8165b Add missing header to fix Qt5 compilation 2014-05-14 11:22:56 +02:00
Daniel Molkentin
16ffd7fbe4 Merge pull request #1765 from owncloud/shibcookies
CookieJar refactoring required to overcome issues in Shibboleth support
2014-05-14 11:14:42 +02:00
Daniel Molkentin
ba959f7cf9 CookieJar refactoring required to overcome issues in Shibboleth support
The shibboleth implementation no longer maintains its own QNAM.

Instead, MirallAccessManager now holds a custom QNAM implementation
which saves cookies to a file on disk.

This patch also reduces some complexity wrt the browser window,
which used to be deleted via a roundtrip to its callee, which
is not longer required.

Fixes #1764 and Enterprise bug #165

Going forward, AbstractCredentials::getQNAM() could maybe removed entirely.
2014-05-14 11:11:45 +02:00
Eran
1509c4ffba made the time description more malleable ,added support for none size update estimation (ie.. deletion), made the estimation more responsive at start and less jittery after some time 2014-05-14 10:55:04 +03:00
Jenkins for ownCloud
cf145feed8 [tx-robot] updated from transifex 2014-05-14 01:25:29 -04:00
hefee
07f57b1982 make Debian GNU/kFreeBSD compile 2014-05-13 16:51:42 +02:00
Klaas Freitag
e62eb62a01 Merge pull request #1179 from tomswartz07/master
Add exclusion for OSX ._<filename> files
2014-05-13 15:35:50 +02:00
Olivier Goffart
574e030caf Use a different key than "user" to store the shib user
There is a HACK from commit fa0a2764a4
Which save the http user as a user for all credidentials, but that
cannot work with shibboleth

Fixes https://github.com/owncloud/enterprise/issues/175
2014-05-13 11:54:36 +02:00
Klaas Freitag
3705a42375 Remove misleading error message of "unknown error" for custom errnos. 2014-05-13 10:39:37 +02:00
Jenkins for ownCloud
a9ffd1d0cf [tx-robot] updated from transifex 2014-05-13 01:26:28 -04:00
Eran
71ea2b582c changed the systray to display total size and estimated time when the syncronization actually has size changed the descriptive time logic to be more generic 2014-05-12 17:36:27 +03:00
Klaas Freitag
f86dd1cbbf Merge pull request #1747 from owncloud/doc_optional
install doc targets in any case. Thanks for the patch!
2014-05-12 11:35:59 +02:00
Jenkins for ownCloud
af066cc733 [tx-robot] updated from transifex 2014-05-12 01:26:26 -04:00
Eran
219098c182 Changed the time estimate string to be more textual, also added lower limit to the estimate to prevents starting estimation jittering 2014-05-12 00:26:17 +03:00
hefee
822650719b RemoveADir test should realy test, if it is notified 2014-05-11 17:08:30 +02:00
Jenkins for ownCloud
95747fbaea [tx-robot] updated from transifex 2014-05-10 01:26:26 -04:00
Jenkins for ownCloud
321058ef74 [tx-robot] updated from transifex 2014-05-09 01:26:28 -04:00
hefee
71c11373d8 install doc targets in any case.
If a user only builds some parts of the documentation and afterwards
wants to install owncloud-client afterwards via "make install", the
built parts should be installed in any case.
2014-05-08 13:44:35 +02:00
Jenkins for ownCloud
d5ba288dd5 [tx-robot] updated from transifex 2014-05-08 01:26:27 -04:00
Olivier Goffart
091e9bbd52 Fix crash when _engine is not available
Fixes #1671 and #1675
2014-05-07 16:17:08 +02:00
Olivier Goffart
ce09e11011 Revert "Do not dereference the _engine member variable without check."
bubbleUpSyncResult is only called from slotSyncFinished, so if _engine
is invalid there, it is also invalid in slotSyncFinished

This reverts commit aee7515d42.
2014-05-07 16:13:43 +02:00
Olivier Goffart
d7a226e0e6 Silent warning:
warning: no previous prototype for ‘set_csync_file_locked_or_open_ext’ [-Wmissing-prototypes]
2014-05-07 12:38:57 +02:00
Olivier Goffart
f034bcb9ae only increment the progressbar for files when the file has been fully transfered 2014-05-07 12:35:02 +02:00
Jenkins for ownCloud
4c77a04514 [tx-robot] updated from transifex 2014-05-07 01:26:27 -04:00
Klaas Freitag
a50c39cd0c Maintain the original inode value for renamed files.
In case two renames are done on the same file/folder very quickly we
lost the information that the second operation was also a rename. That
was because we tried to get the inode value from a stat on the file once
the first rename was finished. But at that point, the file was already
gone because of the second rename.

Now the original inode is kept and written to db in case the file can
not be stat'ed.

This fixes bug #1737
2014-05-06 12:55:54 +02:00
Klaas Freitag
370dd99e47 Super useful source comment. 2014-05-06 09:30:50 +02:00
Jenkins for ownCloud
f97fbe868f [tx-robot] updated from transifex 2014-05-05 01:26:30 -04:00
Jenkins for ownCloud
2ce6560b6e [tx-robot] updated from transifex 2014-05-04 01:26:32 -04:00
Jenkins for ownCloud
2b4e14c4fc [tx-robot] updated from transifex 2014-05-03 01:26:31 -04:00
Olivier Goffart
1631cfdaf1 Fix not blacklisting error 5xx 2014-05-02 17:26:28 +02:00
Olivier Goffart
2e76fe87c2 Fix reporting the right error in a GET
We always reported the lack of e-tag instead of the real error
2014-05-02 17:26:28 +02:00
Markus Goetz
6c44f53645 Set network timeout to 300 sec
As per previously used values (see source and changelog)
2014-05-02 15:35:40 +02:00
Olivier Goffart
988c162d2f Have only one place where we read the timeout 2014-05-02 13:04:53 +02:00
Olivier Goffart
3d8d4fecd7 delete dead code 2014-05-02 11:50:20 +02:00
Jenkins for ownCloud
f8525fa5a0 [tx-robot] updated from transifex 2014-05-02 01:27:04 -04:00
Jenkins for ownCloud
6e48eb9397 [tx-robot] updated from transifex 2014-05-01 01:26:48 -04:00
Olivier Goffart
88cb047197 Add a timeout when using the QNAM propagation 2014-04-30 18:17:49 +02:00
Klaas Freitag
7f7154ed40 Auto generate the Export header.
This should fix oem builds.
2014-04-30 13:55:40 +02:00
Klaas Freitag
a8c1ffc2f4 Add a header file for owncloudcmd.cpp to avoid (auto)moc problems. 2014-04-30 13:55:40 +02:00
Klaas Freitag
df8b5b1ea6 Removed unused Q_OBJECT 2014-04-30 13:55:40 +02:00
Olivier Goffart
ce50cdecf1 Add one byte per files in the computation of the progress bar
So it feels like the progress bar is moving when operating of file
that are empty or when deleting or renaming files
2014-04-30 13:20:20 +02:00
Olivier Goffart
77c7439329 Don't include the directory size in the overall progress
We don't include them in the total amout of files so it should
not be included in the progress either.

Also, for some reasons directories seems to be 16kB on windows
2014-04-30 12:57:30 +02:00
Olivier Goffart
752112dbaa Initialize the size properly on windows 2014-04-30 12:06:55 +02:00
Markus Goetz
925c6485e6 Propagator: Dont show silly string for non-error 2014-04-30 11:36:57 +02:00
Olivier Goffart
d62deabf9b Fix updating mtime
Fixup commit 9193286fc1
Use the right URL for the PROPPATCH and HEAD, do not let other
jobs start when we wait for the UpdateMTimeAndETagJob
Update the etag and the fileid of the real item.
2014-04-30 10:24:17 +02:00
Jenkins for ownCloud
47c23dae30 [tx-robot] updated from transifex 2014-04-30 01:26:47 -04:00
Markus Goetz
3bf15541c6 Add set_csync_file_locked_or_open_ext
Without using function, there were problems with DLL import/export
2014-04-29 18:37:34 +02:00
Markus Goetz
876de8fd69 Networkjobs: Remove stray include 2014-04-29 17:55:26 +02:00
Olivier Goffart
983f9c5dde The job restore job need to be run with QMetaObject::invoke
Because the job might be in a different thread.
2014-04-29 16:58:24 +02:00
Olivier Goffart
9193286fc1 Support old server which do not have the x-oc-mtime support
Owncloud 4.5
Or owncloud 5 with chunking

Fixes https://github.com/owncloud/core/issues/8392
2014-04-29 16:58:24 +02:00
Olivier Goffart
1b8d11182b Add missing include
This was required so the compiler sees the declaration of
CredentialsFactory::create which should be exported
2014-04-29 16:04:24 +02:00
Olivier Goffart
dcc5c105eb fix forward declaration of CredentialsFactory::create 2014-04-29 15:50:19 +02:00
Klaas Freitag
64b42333b0 Fix typo. 2014-04-29 15:36:13 +02:00
Olivier Goffart
3ee729bc4a Add export macro to all classes that need to be exported 2014-04-29 15:31:14 +02:00
Daniel Molkentin
a268b03990 Try to not have windows stay-on-top 2014-04-29 15:31:03 +02:00
Klaas Freitag
6471a45a8a Added changelog beta1 -> beta2 2014-04-29 14:46:17 +02:00
Klaas Freitag
7c27638f36 Set release suffix to beta2 2014-04-29 14:09:43 +02:00
Olivier Goffart
0bffdfb256 Fix compiler warnings, and be less spammy in the log 2014-04-29 12:30:13 +02:00
Olivier Goffart
9f0848ba15 Merge remote-tracking branch 'origin/libowncloudsync_noqtgui' 2014-04-29 12:23:15 +02:00
Olivier Goffart
f159b028b4 Add a compile option to not blacklist error code 5xx 2014-04-29 11:39:46 +02:00
Olivier Goffart
7e702778a1 Add missing line break 2014-04-29 11:27:31 +02:00
Eran
35b3ddd61f Made the estimated time only appear in the systray when the sync has actual size. 2014-04-29 02:43:35 +03:00
Eran
a892b79dba Seperated the systray estimation text to a seperate action, fixed an integer rounding bug 2014-04-29 02:31:27 +03:00
Eran
cd22a1846f Fixed Indentation and multiple concurrent files syncing case ...
..Also increased the height of folder progress bar alittle in order to accommodate the added estimation data
2014-04-28 18:49:27 +03:00
Markus Goetz
4489a56c65 Csync: Set error at correct place 2014-04-28 17:25:18 +02:00
Markus Goetz
7f752c7e93 Csync: Plug code for csync_file_locked_or_open 2014-04-28 16:57:56 +02:00
Markus Goetz
b39359c929 Csync: Add hook for checking if a file is in use already 2014-04-28 14:18:58 +02:00
Klaas Freitag
b42d3ced15 Another fix for make install on MacOSX 2014-04-28 11:19:25 +02:00
Klaas Freitag
1c73a8d4ad Fix installation for MacOSX 2014-04-28 10:24:12 +02:00
Daniel Molkentin
2d3ea59755 Limit the mac workaround to the Mac OS X platform 2014-04-28 10:13:53 +02:00
Jenkins for ownCloud
b8b064836c [tx-robot] updated from transifex 2014-04-28 02:07:38 -04:00
Jenkins for ownCloud
3ab1330f63 [tx-robot] updated from transifex 2014-04-28 01:26:40 -04:00
Jenkins for ownCloud
ab711ddc36 [tx-robot] updated from transifex 2014-04-27 02:06:35 -04:00
Jenkins for ownCloud
2a1e67e587 [tx-robot] updated from transifex 2014-04-27 01:25:42 -04:00
Eran
eadcdab8e7 Issue-#142 : Added support for current file completion estimation.
Changed the account settings estimation to display both current file and overwhole estimation.
Decresed the progress font size to fit the added information
2014-04-27 00:48:12 +03:00
Jenkins for ownCloud
1d3febe053 [tx-robot] updated from transifex 2014-04-26 01:25:42 -04:00
Olivier Goffart
165e35c750 t1.pl: change assertLocalAndRemoteDir so we actually test something 2014-04-25 14:35:20 +02:00
Olivier Goffart
9da261acd8 Do not read from the database when upgrading from 1.5
We need to make sure that the file id are updated (if the user
had upgraded from owncloud 5 to owncloud 6 while using owncloud 1.5)
2014-04-25 13:31:44 +02:00
Jenkins for ownCloud
7544f4d367 [tx-robot] updated from transifex 2014-04-25 02:06:36 -04:00
Jenkins for ownCloud
a29a56bce8 [tx-robot] updated from transifex 2014-04-25 01:25:42 -04:00
Eran
46ffd1c29a Issue-142 : added time estimation and bandwidth indicator to the systry and active download 2014-04-25 01:08:25 +03:00
Olivier Goffart
642c16b09b Missing EXPORT 2014-04-24 23:57:42 +02:00
Olivier Goffart
5c92c190f0 Add EXPORT macro to owncloudsync library
Not all the class are exported currently, only the one that seems to be used
by the command line tools
2014-04-24 23:45:20 +02:00
Olivier Goffart
cc7826e087 Add a compile option to disable renaming when the extension changes
This is only used for a very specific server that do not support
changing the extension of files without re-uploading the file.

Since the change is small and self contained, it is guarded by a #ifdef

(Removed old BLACKLIST_ON_ERROR option that is no longer in use)
2014-04-24 11:51:48 +02:00
Jenkins for ownCloud
a154656311 [tx-robot] updated from transifex 2014-04-24 01:25:45 -04:00
hefee
9b7a3d00ee Using QFile::decodeName instead of QLatin1String 2014-04-23 18:59:40 +02:00
Sandro Knauß
1d862b77af merged 1.5 into master 2014-04-23 18:54:49 +02:00
Klaas Freitag
888843e655 Removed another file for Jenkins. 2014-04-23 13:22:06 +02:00
Klaas Freitag
28970393f6 Removed a test file as jenkins fails on it. 2014-04-23 13:18:28 +02:00
Klaas Freitag
1af7dc952c Update to latest GNUInstallDirs cmake module
This version correctly detects debians multiarch lib handling and
lets us remove the manually set CMAKE_LIB_INSTALL_DIRS from the rules
file.
2014-04-23 13:04:16 +02:00
Jenkins for ownCloud
62dcfe85e4 [tx-robot] updated from transifex 2014-04-23 01:25:49 -04:00
Markus Goetz
f6711b2842 CMake: Find libraries also on Win host compile 2014-04-22 21:02:08 +02:00
Olivier Goffart
f2519e9d87 Fix function signature: pass argument by const reference 2014-04-22 19:52:09 +02:00
Markus Goetz
94f380c1f0 Updater: Ignore files matching with CSYNC_CONFLICT_FILE_USERNAME 2014-04-22 17:05:59 +02:00
Markus Goetz
197d180cb9 Propagator: Add support for CSYNC_CONFLICT_FILE_USERNAME 2014-04-22 16:17:49 +02:00
Markus Goetz
4be20db670 Propagator: Add makeConflictFileName function 2014-04-22 16:07:18 +02:00
Olivier Goffart
46d6191bc2 Also list folder for which the alias starts with '.'
Fixes #1695
2014-04-22 14:26:08 +02:00
Olivier Goffart
ee22f377af Start the folder watcher when new folder are added
Before, we would only set up a file system watcher when we read the
config at startup.  But we also need to do it in the other case when
the user configure new folder to watch
2014-04-22 14:15:43 +02:00
Olivier Goffart
44a04227f1 Update dynamically the error message in the account settings
This let the error be shown when the conneciton is missing at startup

And also remove the red background when there is no longer an error
2014-04-22 14:08:37 +02:00
Olivier Goffart
707c6fcc5d An abort on the reply is not usually a password error.
Copy the code from HTTPCredidentials
2014-04-22 12:52:13 +02:00
Olivier Goffart
edb1f61241 Fix compilation without the BUILD_ONLY_LIBRARIES mode 2014-04-22 12:44:01 +02:00
Olivier Goffart
3fac5f91c8 In case of error, report the right error instead of missing etag
also, missing etag is not a fatal error
2014-04-22 12:43:38 +02:00
Olivier Goffart
1338c08622 Fix compilation on linux with BUILD_LIBRARIES_ONLY 2014-04-22 11:33:38 +02:00
Olivier Goffart
0cf8091705 Merge pull request #1700 from wakeup/master
Fix non-closed p tag
2014-04-22 10:08:29 +02:00
Klaas Freitag
521373f075 More specific log output. 2014-04-22 09:33:07 +02:00
Klaas Freitag
c24732f641 More debugable code. 2014-04-22 09:33:07 +02:00
Jenkins for ownCloud
655188d7b3 [tx-robot] updated from transifex 2014-04-22 01:25:41 -04:00
Markus Goetz
77ac092975 WiP: Attempt to compile without UI 2014-04-21 19:57:15 +02:00
Volkan Gezer
78e5e4ab66 Fix non-closed p tag 2014-04-21 15:29:42 +02:00
Jenkins for ownCloud
934eda128b [tx-robot] updated from transifex 2014-04-21 01:27:00 -04:00
Daniel Molkentin
ece41921ff Merge pull request #1697 from wakeup/master
Space fix
2014-04-20 15:44:03 +02:00
Volkan Gezer
9b71643c1c Space fix 2014-04-20 14:54:40 +02:00
Jenkins for ownCloud
ed48b4bbf2 [tx-robot] updated from transifex 2014-04-20 01:26:54 -04:00
Olivier Goffart
b08284e4cc Fix the background check job for the connection
We can't use the quota job for that as it needs the credidentials and therefore
may re-enter the credidential code when we are currently trying to fetch the credentials.

The quotainfo.cpp part of this patch is basically a revert of d836b80153
2014-04-19 09:49:52 +02:00
Jenkins for ownCloud
4731b506e5 [tx-robot] updated from transifex 2014-04-19 01:27:02 -04:00
Olivier Goffart
7d3b0fe0c5 Fix memory leak: Don't need to call strdup here
The other_node outlive the trav structure, so we can just use the same pointer
2014-04-18 19:16:10 +02:00
Olivier Goffart
fa38bf7029 Make sure the fileid are saved to the database when upgrading from owncloud5 to owncloud6
We fetch the id from the server, but don't save them in the database.

I Could have used INSTRUCTION_UPDATED for that, but then i would need to update the
reconcile algorithm to take in account the fact that UPDATED is possible there.

Instead, use should_update_etag  which means the db is going to be written again

Remove reference to old instruction _UPDATED and _DELETED which does not make sens with
the new propagator

Improve the test to test this case,  and that etags are properly writen to the DB
when there is a fake conflict
2014-04-18 18:27:27 +02:00
Olivier Goffart
bfdf638334 Add the files required by the tests.
Somehow they got removed with all the moving and merging.
Especially kernelcrash.txt is required for t1.pl
2014-04-18 17:20:42 +02:00
Jenkins for ownCloud
e6664c7790 [tx-robot] updated from transifex 2014-04-17 15:03:55 -04:00
Mr. Jenkins
a90779910a [tx-robot] updated from transifex 2014-04-17 01:26:53 -04:00
Mr. Jenkins
edc7a9596a [tx-robot] updated from transifex 2014-04-16 01:26:58 -04:00
Volkan Gezer
a7a19fad71 Fix note template label 2014-04-16 03:53:37 +02:00
Klaas Freitag
d143044f4a Add missing cases to avoid "unknown action" under some circumstances.
Most of the translations are not used because they translate pre
propagation states.

Fixes #1674
2014-04-15 16:54:49 +02:00
Klaas Freitag
aee7515d42 Do not dereference the _engine member variable without check.
This can cause the crash because the _engine member is deleted in the
sync finished slot. The solution is to store the stopWatch object
before the engine is destroyed.

Fixes bug #1675
2014-04-15 16:28:18 +02:00
Klaas Freitag
82ab5fdcb9 Fix condition if network limit change is logged or not. 2014-04-15 16:28:18 +02:00
Klaas Freitag
4c6e6f6302 Add initialisations for member variables.
Avoids some valgrind warnings.
2014-04-15 16:28:18 +02:00
Klaas Freitag
0a2791270a Add a reset method. 2014-04-15 16:28:18 +02:00
Klaas Freitag
c920f81562 Add braces. 2014-04-15 16:28:18 +02:00
Mr. Jenkins
9dcbafc307 [tx-robot] updated from transifex 2014-04-15 01:26:01 -04:00
Daniel Molkentin
d836b80153 Fix reconnect after server disconnect
Fixes #1679
Fixes #1568
Fixes #1659
2014-04-14 17:51:57 +02:00
Daniel Molkentin
efc4ff4d88 Fix redirects in CheckServerJob 2014-04-14 15:12:38 +02:00
Daniel Molkentin
dc043b5765 Try scheme://host/owncloud if scheme://host/ did not work
Fixes #1680
2014-04-14 15:10:08 +02:00
Daniel Molkentin
ef9a318cd9 AbstractNetworkJob Allow finished() to defer Job deletion
This allows to reuse the Job
2014-04-14 15:08:43 +02:00
Mr. Jenkins
9f4ffd44d6 [tx-robot] updated from transifex 2014-04-14 01:25:55 -04:00
Mr. Jenkins
598bfe6d1a [tx-robot] updated from transifex 2014-04-13 01:25:56 -04:00
Mr. Jenkins
5f37c7b1b8 [tx-robot] updated from transifex 2014-04-12 01:26:00 -04:00
Volkan Gezer
8250fb81b3 Fix typo. 2014-04-11 15:10:47 +02:00
Klaas Freitag
30a14b9f45 Install ocsync library to private lib directory, use rpath to find it. 2014-04-11 13:28:11 +02:00
Mr. Jenkins
b0734f2791 [tx-robot] updated from transifex 2014-04-11 01:25:58 -04:00
Mr. Jenkins
d66b0910c6 [tx-robot] updated from transifex 2014-04-10 01:26:05 -04:00
Klaas Freitag
09e05392bf Ignore all sync log files in the sync dir. 2014-04-09 22:02:28 +02:00
Daniel Molkentin
d3d202de68 Fix dataLocation on Linux/BSD
From the Qt 5 documentation:

  Note: when porting QDesktopServices::DataLocation(obsolete)
        to QStandardPaths::DataLocation, a different path will
        be returned.

        QDesktopServices::DataLocation was GenericDataLocation
        + "/data/organization/application", while
        QStandardPaths::DataLocation is GenericDataLocation
        + "/organization/application".

We'll resort to the deprecated version, since we'll need to fix
data locations to be XDG compliant sooner than later anyway
(currently scheduled for 1.8)
2014-04-09 14:59:08 +02:00
Daniel Molkentin
87010fbe1a SSL Button: Fix issues around printing Hash sums
- Use SHA 265 instead of obsolete MD5 where possible (Qt5)
- Remove <tt> formatting: that simply looked ugly
- Wrap SHA 265 hash
- Use spaces as separators

As usual, the default needs to remain ':' separation, because
it's needed to pass valid hashes to csync.
2014-04-09 14:30:51 +02:00
Jenkins for ownCloud
f302da81b1 [tx-robot] updated from transifex 2014-04-09 02:07:10 -04:00
Mr. Jenkins
3af53f5984 [tx-robot] updated from transifex 2014-04-09 01:26:26 -04:00
Klaas Freitag
7c40dc1a9a Ignore changes on .owncloudsync.log in the linux filewatcher.
Also remove some verbose and unused logging.
2014-04-08 13:06:34 +02:00
Daniel Molkentin
af3af94a01 Allow tests to run against SSL-self-signed servers 2014-04-08 12:39:46 +02:00
Klaas Freitag
7d79d3d30d Fix Search for Qt5 version Qt4 2014-04-08 12:08:01 +02:00
Klaas Freitag
990e2f0beb Ignore the new sync log file in the sync dir.
It is required to have all ownCloud system files in the ignore list
that have to be ignored, because the ignore list is fed into the
folderwatcher, which needs to ignore changes to both the journal and
the logfile.
2014-04-08 11:55:31 +02:00
Daniel Molkentin
b34b4e37aa Add Qt Keychain also when building with Qt5 2014-04-08 10:56:07 +02:00
Mr. Jenkins
02697a7c4d [tx-robot] updated from transifex 2014-04-08 01:27:22 -04:00
Daniel Molkentin
4ff39d8114 Cleanups, build if Qt5 is not on system 2014-04-07 18:08:28 +02:00
Daniel Molkentin
69bdccfd2f Include correct QtKeychain headers
..depending on Qt version
2014-04-07 17:46:06 +02:00
Daniel Molkentin
9f8d867ce2 About correctly when Qt5Keychain isn't found 2014-04-07 17:41:33 +02:00
Daniel Molkentin
d416c97eac Fix Qt5 detection 2014-04-07 17:38:30 +02:00
Daniel Molkentin
1d70426bb7 Build with BOTH Qt4 and 5 2014-04-07 17:25:25 +02:00
Daniel Molkentin
6a2fe6be67 Build fix: QAtomicInt has no implicit integer conversion in Qt5 2014-04-07 16:49:01 +02:00
Klaas Freitag
8ed0fdcfa5 Fix info print in test script. 2014-04-07 16:36:35 +02:00
Klaas Freitag
ebf3c78237 More fine granular chunking test - improved t6.pl 2014-04-07 16:30:02 +02:00
Klaas Freitag
3d67d203fe Fix content-length calculation for sizes multiple of the chunk size. 2014-04-07 16:29:06 +02:00
Klaas Freitag
fc06945b26 use the lowercase app name for icon in the desktop file.
fixes #1642
2014-04-07 15:14:58 +02:00
Klaas Freitag
9cdcc925c1 Do not log useless stuff. 2014-04-07 15:10:55 +02:00
Klaas Freitag
fc2923aa9b Unlink the compare file after the remote cleanup. 2014-04-07 15:10:55 +02:00
Jenkins for ownCloud
6d325e6557 [tx-robot] updated from transifex 2014-04-07 02:07:45 -04:00
Daniel Molkentin
7d7d03071a Add Copyright.txt for cmake modules
Fixes #1438
2014-04-07 01:27:59 +02:00
Mr. Jenkins
657f7613a1 [tx-robot] updated from transifex 2014-04-06 01:26:58 -04:00
Markus Goetz
d35c0f3ade Propagator: Fix chunking for real
The reset() (using seek()) didn't work.
2014-04-05 14:26:24 +02:00
Mr. Jenkins
069e9526a8 [tx-robot] updated from transifex 2014-04-05 01:27:01 -04:00
Klaas Freitag
5aeee6d1f2 Use curl to get the file back, fix the LWP based download later. 2014-04-04 17:00:20 +02:00
Klaas Freitag
a759c93fb6 Add a new test script to check for big file chunking. 2014-04-04 16:33:57 +02:00
Daniel Molkentin
57c59850e1 Fix installation paths 2014-04-04 15:52:41 +02:00
Markus Goetz
0f7d448058 Propagator: Fix chunking 2014-04-04 15:41:35 +02:00
Klaas Freitag
ab8868eacd Changelog updated. 2014-04-04 12:21:18 +02:00
Daniel Molkentin
00cd5875c0 Bump to beta1 2014-04-04 11:22:30 +02:00
Klaas Freitag
435e7e3eec HACK to avoid continuation: See task #1448
We do not know the _modtime from the server, at this point, so just set
the current one.  (rather than the one locally)
2014-04-04 10:56:33 +02:00
Klaas Freitag
08dd9796d1 HACK to avoid continuation: See task #1448
We do not know the _modtime from the server, at this point, so just set
the current one.  (rather than the one locally)
2014-04-04 10:50:40 +02:00
Daniel Molkentin
4bcd620c29 Avoid build attempts with Qt4 on Windows and Linux 2014-04-04 09:29:01 +02:00
Mr. Jenkins
5f60c97f59 [tx-robot] updated from transifex 2014-04-04 01:26:59 -04:00
Olivier Goffart
20e850501d Make sure we do not remove files that are replaced by a symlink
As we ignore symlink, we should not remove on the server the files that
are ignored.

Change tested in t4.pl

Relates to #1299
2014-04-03 17:47:49 +02:00
Olivier Goffart
462ba7d942 Don't dead lock when all the files are removed
SyncEngine is on the main thread, no need of the legacy BlockingConnection
2014-04-03 17:47:49 +02:00
Klaas Freitag
cf87fdff7f Keep the updater data in the log struct for the synclog.
Also, shorten the timestamp and add the sync direction.
2014-04-03 16:56:50 +02:00
Markus Goetz
565bb540d6 Propagator: Add debug message regarding legacy vs QNAM 2014-04-03 16:37:40 +02:00
Klaas Freitag
062a0907db Remove HTTP::DAV fragment and hardcode required version in Test.pm 2014-04-03 10:16:09 +02:00
Thomas Müller
95726eeab1 properly adding Turkish language support 2014-04-03 08:59:31 +02:00
Jenkins for ownCloud
6c2d286f10 [tx-robot] updated from transifex 2014-04-03 02:07:48 -04:00
Mr. Jenkins
6af3e9afc7 [tx-robot] updated from transifex 2014-04-03 01:26:59 -04:00
Klaas Freitag
ead935e0a6 Add an open to open the dav connection. 2014-04-02 16:45:31 +02:00
Olivier Goffart
eaf5681f61 Put the sync log in the actual folder 2014-04-02 16:36:32 +02:00
Olivier Goffart
03ef2aadde Remove undeeded includes
And don't use 'using namespace' in headers
2014-04-02 16:23:57 +02:00
Olivier Goffart
f09076180d don't add the list of field on the log for every sync 2014-04-02 16:21:07 +02:00
Olivier Goffart
d5d3c1a23a Fix compilation with Qt5
We don't need QtWidgets,  and we don't need Uility::escape
2014-04-02 16:21:06 +02:00
Markus Goetz
b18f1ad386 SyncEngine: Removed unused signal 2014-04-02 12:47:15 +02:00
Mr. Jenkins
fc553a8c04 [tx-robot] updated from transifex 2014-04-02 01:27:06 -04:00
Klaas Freitag
cba160706a Minor cleanup 2014-04-01 16:14:24 +02:00
Klaas Freitag
fa453296c9 Enable SSL for testing. 2014-04-01 16:14:24 +02:00
Klaas Freitag
58aaad3fed Add options to createRemoteDir 2014-04-01 16:14:24 +02:00
Klaas Freitag
8625ec250b Add a trust ssl certificate switch 2014-04-01 16:14:24 +02:00
Klaas Freitag
d731f4718d Add an simple SSL error handler for owncloudcmd. 2014-04-01 16:14:24 +02:00
Olivier Goffart
607e48a68b let configure the default count of the blacklist 2014-04-01 13:54:47 +02:00
Olivier Goffart
bfe6a50b19 Fix some error cases in the SyncEngine
Always cleanup properly when we bail out.

Also fix thread safety of the SyncJournalDB
2014-04-01 13:41:47 +02:00
Mr. Jenkins
ded21c5826 [tx-robot] updated from transifex 2014-04-01 01:26:57 -04:00
Mr. Jenkins
9bd6019905 [tx-robot] updated from transifex 2014-03-30 01:26:33 -04:00
Mr. Jenkins
dcac2796dd [tx-robot] updated from transifex 2014-03-29 01:26:34 -04:00
Klaas Freitag
ab439f8f0f Proper cleanup of the shared directory. 2014-03-28 16:15:59 +01:00
Daniel Molkentin
9822002480 Spell APPLICATION_SHORTNAME correctly
Fixes #1547
2014-03-28 15:56:35 +01:00
Klaas Freitag
384a8d0d72 Added t5.pl which does basic testing with a Shared directory. 2014-03-28 15:04:14 +01:00
Daniel Molkentin
70eb688e86 fix frameworks during signing 2014-03-28 14:46:08 +01:00
Daniel Molkentin
4e0b6179f9 Libocsync is a library, not a plugin
This is needed to deploy the library correct in OS X.
2014-03-28 14:46:08 +01:00
Olivier Goffart
3acdfc0004 Make configurable the maximum amount of job in parallel
Bia the environement variable OWNCLOUD_MAX_PARALLEL
2014-03-28 11:20:07 +01:00
Olivier Goffart
a1fc7f0a25 Make the chunk size configurable via an environement variable
OWNCLOUD_CHUNK_SIZE
2014-03-28 11:11:02 +01:00
Olivier Goffart
5bceb6f787 fix test compilation 2014-03-28 11:02:18 +01:00
Olivier Goffart
8de9bec122 Remove progress info from csync
csync doesn't do no propagation no more
2014-03-28 10:50:15 +01:00
Olivier Goffart
5204a992b2 Remove HBF stuff from csync_owncloud
csync doesn't do no propagation no more
2014-03-28 10:41:48 +01:00
Olivier Goffart
765a18b74a Fix compilation with Qt4 2014-03-28 10:26:42 +01:00
Olivier Goffart
350283fe06 Remove obsolete code that removed the sync journal when the sync directory is deleted
Since the journal is now in the same directory, we don't need this
security anymore

When the directory is removed, the sync will error out saying that the
journal cannot be loaded or created
2014-03-28 10:23:09 +01:00
Olivier Goffart
2ba62b79b4 Make the size of the log maximum 1MiB 2014-03-28 10:13:35 +01:00
Olivier Goffart
e0b6395d18 Use sane datastructure in Utility::StopWatch
We don't want to logging to be O(N^2)

Also avoid usage of macro when possible
2014-03-28 09:50:13 +01:00
Olivier Goffart
ba896b0550 Avoid copies of the StopWatch 2014-03-28 09:39:50 +01:00
Olivier Goffart
36a2c861c2 Only build the static library when BUILD_LIBRARIES_ONLY is defined 2014-03-28 09:34:21 +01:00
Olivier Goffart
7f975e0b2f Avoid macro when it can easily be done with a local variable 2014-03-28 09:27:05 +01:00
Jenkins for ownCloud
359dd2b986 [tx-robot] updated from transifex 2014-03-28 02:07:21 -04:00
Mr. Jenkins
a636fd7801 [tx-robot] updated from transifex 2014-03-28 01:26:40 -04:00
Olivier Goffart
69fcbd3b0d Fix Qt4 compilation
And a typo
2014-03-27 18:19:56 +01:00
Olivier Goffart
d6525a979d Do not let user change it's login while using shibbolet
Fixes #915
2014-03-27 17:59:50 +01:00
Markus Goetz
67f4d0c85b CSync: Debug message if no exclude file defined 2014-03-27 17:11:19 +01:00
Markus Goetz
54313338cd SyncEngine: new aboutToPropagate signal 2014-03-27 17:04:31 +01:00
Markus Goetz
09e6207ce9 SyncEngine: Fix typo 2014-03-27 15:19:02 +01:00
Denis Dzyubenko
000e0bb600 Fast forwarded qtmacgoodies 2014-03-27 10:39:56 +01:00
Olivier Goffart
353f21e856 Add a FAQ item for the .eml problem
Fixes #1403
2014-03-27 09:55:25 +01:00
Mr. Jenkins
51e961e694 [tx-robot] updated from transifex 2014-03-27 01:26:35 -04:00
Olivier Goffart
de2335c1db Show the folders when in the accountsettings in the first start 2014-03-26 19:31:37 +01:00
Olivier Goffart
332c6cf726 Fix invalid signal connection 2014-03-26 19:31:37 +01:00
Klaas Freitag
5481215813 Remove unused variable. 2014-03-26 18:18:20 +01:00
Klaas Freitag
086dd07d69 Log the processed items to a logfile. 2014-03-26 18:16:27 +01:00
Klaas Freitag
dd6b71bad6 Use a stopwatch to meassure the time consumed. 2014-03-26 18:16:27 +01:00
Klaas Freitag
9af2339596 Store the request duration and timestamp to final item 2014-03-26 18:16:27 +01:00
Klaas Freitag
0fcef5f604 Add data to store interesting info from the sync run (other tree) 2014-03-26 18:16:27 +01:00
Klaas Freitag
c41935d49d Add a class to write a machine readable sync log file. 2014-03-26 18:16:27 +01:00
Klaas Freitag
7b84defd56 Add a stopwatch utility class with lap times.
Allows to meassure the duration of something that started at a
point of time, with some small convenience methods.
2014-03-26 18:16:27 +01:00
Klaas Freitag
505429b582 Add a duration and the repsonse timestamp to the jobs. 2014-03-26 18:16:27 +01:00
Klaas Freitag
033fee6f53 Fix include path 2014-03-26 18:16:27 +01:00
Klaas Freitag
67ae541e2a Safe use of c_strdup 2014-03-26 18:16:27 +01:00
Klaas Freitag
11bbad79e2 Use QTimer as object member rather than pointer based.
Avoid crashes if timer is zero.
2014-03-26 18:16:27 +01:00
Klaas Freitag
6e6f647c63 Change data type for fileId to QByteArray. 2014-03-26 18:12:22 +01:00
Klaas Freitag
c5100a789b Collect data from the "other" tree for the treewalk functions.
This enables us to log all relevant information that were used
to decide on sync activity.
2014-03-26 18:12:22 +01:00
Olivier Goffart
2ad7b0aae0 Fix crash on first run when no account are configured 2014-03-26 17:42:05 +01:00
Olivier Goffart
588633a0f2 Fix leak: don't leak the settings 2014-03-26 17:42:05 +01:00
Markus Goetz
d5659442b2 SyncEngine: Sanity bail out if DB does not exist suddenly
The update/reconcile worked for me, but the Propagate step had an invalid DB
path but still went on (and then messed things up)
2014-03-26 16:57:50 +01:00
Markus Goetz
c6e5f39f7f SyncJournalDb: Verbose log on load failure 2014-03-26 16:40:00 +01:00
Markus Goetz
7bef166d6c CSync: Debug file_id on walk 2014-03-26 15:32:45 +01:00
Olivier Goffart
38344589c4 Exxtract the exception message from reply to PUT
Might be usefull to debug Internal Server Error

Fixes #1366
2014-03-26 12:02:22 +01:00
Olivier Goffart
98d7ff5116 Don't create .ctmp of sync journal
Fixes #1559
2014-03-26 10:25:50 +01:00
Denis Dzyubenko
6c28151e0f Fast forwarded qtmacgoodies submodule 2014-03-26 10:15:35 +01:00
Daniel Molkentin
411cffd3d5 NSIS: libcrypto-10 dependency got lost somehow 2014-03-26 09:10:01 +01:00
Daniel Molkentin
1c4af687ea Compile on Mac again 2014-03-26 07:20:24 +01:00
Mr. Jenkins
2de83b95e3 [tx-robot] updated from transifex 2014-03-26 01:26:42 -04:00
Daniel Molkentin
c3d37efa6c Fix OS X compilation 2014-03-25 23:33:46 +01:00
Daniel Molkentin
7c7fad78f7 Qt5: QtLocation is not needed 2014-03-25 22:52:28 +01:00
Daniel Molkentin
3ac1849963 Don't moc twice 2014-03-25 20:55:04 +01:00
Olivier Goffart
b4f992b944 Merge pull request #1446 from owncloud/remove-tooltip
remove superfluous tooltip from server address input field
2014-03-25 20:16:26 +01:00
Daniel Molkentin
1c8e5ef4ee Fix typo 2014-03-25 20:05:06 +01:00
Daniel Molkentin
45ec489f71 Merge branch 'master' of github.com:shadone/mirall into shadone-master
Conflicts:
	cmake/modules/QtVersionAbstraction.cmake
	src/CMakeLists.txt
	src/mirall/owncloudgui.cpp
2014-03-25 19:56:45 +01:00
Daniel Molkentin
1b5e14fbc5 Update owncloudcmd docs
Fixes #1587
2014-03-25 19:04:05 +01:00
Daniel Molkentin
dddec8b250 -fPIC is implied on Windows 2014-03-25 19:04:05 +01:00
Daniel Molkentin
06082b585a Add translations when using Qt5 as well 2014-03-25 19:04:05 +01:00
Daniel Molkentin
4bf0a2b188 NSIS: depend on Qt5-based installations 2014-03-25 19:04:05 +01:00
Daniel Molkentin
e2fe4972d9 Don't show ocsync version, it's part of mirall now 2014-03-25 19:04:05 +01:00
dragotin
efee9c689c Merge pull request #1611 from Absolight/freebsd-port
Freebsd port - Thanks a lot!
2014-03-25 17:28:06 +01:00
Mathieu Arnold
84b4872938 And make it runnable on FreeBSD too.
Patch by:	Tobias Berner
2014-03-25 17:23:11 +01:00
Mathieu Arnold
3f9bd1d72a Fix build on FreeBSD.
We use libinotify, so the linux folderwatcher works.

Based on a patch by:	Tobias Berner
2014-03-25 17:22:54 +01:00
Mr. Jenkins
1898e32b6a [tx-robot] updated from transifex 2014-03-24 01:26:24 -04:00
Mr. Jenkins
9addd9bc27 [tx-robot] updated from transifex 2014-03-23 01:26:21 -04:00
Markus Goetz
91f416ffc7 Fix compile after changing Account::davPath() 2014-03-22 09:41:32 +01:00
Mr. Jenkins
28559ab657 [tx-robot] updated from transifex 2014-03-22 01:26:24 -04:00
Sandro Knauß
47274f1075 Merge remote-tracking branch 'respect-XDG_CONFIG_HOME' into 1.5 2014-03-21 17:20:15 +01:00
Markus Goetz
384eef4d6d csync_owncloud: Add a debug message 2014-03-21 17:19:07 +01:00
Markus Goetz
ff95cbd04b Account: Don't hardcode WebDAV path 2014-03-21 17:14:04 +01:00
Markus Goetz
cc5fabdab0 Engine: Introduce jobCompleted() signal 2014-03-21 17:13:02 +01:00
Markus Goetz
ff95e233bc Token Credentials: Support actual tokens 2014-03-21 17:12:26 +01:00
Markus Goetz
f72e1cc837 Log: Don't override level for csync
The level shall be set from Folder or owncloudCmd only.
2014-03-21 13:52:35 +01:00
Olivier Goffart
8e6674e784 Merge branch '1.5'
Conflicts:
	src/owncloudcmd/owncloudcmd.cpp
2014-03-21 10:06:45 +01:00
Olivier Goffart
8aace3284f owncloudcmd: Fix an error during update phase would not terminate
the QApplication::quit()  would be run before the exec() and would
be a noop,   and then exec would just wait forever.
2014-03-21 10:03:11 +01:00
Olivier Goffart
922e004fc6 Make it an error instead of a crash when dav_connect fails.
Fixes #1591
2014-03-21 09:54:26 +01:00
Mr. Jenkins
2fc61479f7 [tx-robot] updated from transifex 2014-03-21 01:26:37 -04:00
Olivier Goffart
bb9d6b34c7 Remove FIXME and TODO
They are outdated
2014-03-20 16:42:43 +01:00
Olivier Goffart
07025c7432 Remove a FIXME
The commit message say that this line should be necessary to show
the information when the setting dialog is open,  but this is working
now via the signals
2014-03-20 16:42:43 +01:00
Olivier Goffart
b65601aaa4 Remove FIXME
This has been refactored since the comment was added and is no longer a hack
2014-03-20 16:42:43 +01:00
Olivier Goffart
756e1c4a12 Prefer the use of _isDirectory over item._type == SyncFileItem::Directory 2014-03-20 16:42:42 +01:00
Olivier Goffart
c5f8a2555d Rename _dir to _direction
(to avoid confusion with directory)
2014-03-20 16:42:42 +01:00
Olivier Goffart
a1ab9c84c7 Remove FIXME in syncengine 2014-03-20 16:42:42 +01:00
Klaas Freitag
e4966ec9d1 Added documentation about owncloudcmd. 2014-03-20 16:35:43 +01:00
Olivier Goffart
23f3a6b319 restore the last change menu
It was not yet implemented after the progress refactoring
2014-03-20 14:43:10 +01:00
Olivier Goffart
ebeb668a62 QNAM jobs: Make sure there is an etag is proper and not changed when one resume
Those tests are existing on the legacy jobs.

We check there is an etag so we make sure a proxy is not in between.
(We have seen user complaining because their proxy is replacing the
pages with one that says they need to enter their login and password)

Also it is important to check that the etag has not changed if we resume
(this may happen if the file is changed on the server between the update
phase and the propagate phase,  and that we resume this file)
2014-03-20 13:31:42 +01:00
Klaas Freitag
d2e1923694 Fix compile warning. 2014-03-20 12:57:57 +01:00
Klaas Freitag
a5ede054d6 Fix statedb tests. 2014-03-20 12:35:16 +01:00
Klaas Freitag
ba2ff4ec46 Copy test database into the build tree. 2014-03-20 12:35:16 +01:00
Klaas Freitag
ca536f467a Proper initialization to avoid build warnings. 2014-03-20 12:35:16 +01:00
Olivier Goffart
05d3273591 Detect the error that may happen when downloading a file 2014-03-20 11:35:30 +01:00
Klaas Freitag
39924d79cb Add new test to test the csync database code. 2014-03-20 11:15:28 +01:00
Klaas Freitag
f7866aabde Add C++ extern "C" 2014-03-20 11:15:28 +01:00
Klaas Freitag
eb59f98ec9 Fix quoting of query by text. 2014-03-20 11:15:28 +01:00
Klaas Freitag
c3cee3426e Improved database access code for csync.
- Use precompiled database statements
- Store them in the csync context struct
- Hand whole context as parameter to db access functions
2014-03-20 11:15:28 +01:00
Klaas Freitag
f21dd05c2d Streamline logging. 2014-03-20 11:15:28 +01:00
Klaas Freitag
6005b9c16e Remove some superflous logging. 2014-03-20 11:15:28 +01:00
Mr. Jenkins
77bf37c6f6 [tx-robot] updated from transifex 2014-03-20 01:26:23 -04:00
Mr. Jenkins
8e133dc8ea [tx-robot] updated from transifex 2014-03-19 01:26:24 -04:00
Daniel Molkentin
d10aec6055 NSIS: Install owncloudcmd on Windows 2014-03-18 23:56:50 +01:00
Klaas Freitag
9d1208baa4 Also allow http and https protocols. 2014-03-18 17:10:03 +01:00
Klaas Freitag
8e914deb99 Revert "Do not rely on the url scheme owncloud(s) any more."
This reverts commit 34dd3b207e.
It can be implemented simpler.
2014-03-18 16:57:01 +01:00
Klaas Freitag
34dd3b207e Do not rely on the url scheme owncloud(s) any more.
If it is not owncloud or ownclouds, rely on the scheme
that was given by the user.
2014-03-18 14:16:50 +01:00
Klaas Freitag
68e8d659fb Remove unused code. 2014-03-18 14:16:06 +01:00
Mr. Jenkins
f79765a536 [tx-robot] updated from transifex 2014-03-18 01:26:28 -04:00
Daniel Molkentin
eef57032f8 OCUpdater: Compare to the current version
Fixes #1548
2014-03-18 00:28:26 +01:00
Olivier Goffart
6377dca4b0 Add the file and line number of the debug in the debug view 2014-03-17 12:15:45 +01:00
Olivier Goffart
f05320c32c Clean the debug a bit 2014-03-17 12:15:16 +01:00
Olivier Goffart
b0f8a24c20 CSyncThread was renamed, give proper names in Folder
take in account that the object live in the same thread
2014-03-17 11:47:23 +01:00
Olivier Goffart
c841b9c0c4 Remove unused libsync_HEADERS
This was unused and is redudent with owncloudsync_HEADERS
2014-03-17 11:36:53 +01:00
Olivier Goffart
7b482c0e96 Rename CSyncThread to SyncEngine
CSyncThread has not been a thread for a long time now
2014-03-17 11:34:51 +01:00
Olivier Goffart
bf5091d862 Merge branch '1.5' 2014-03-17 11:26:28 +01:00
Olivier Goffart
5c45ede4a5 Read the quota as double
The server is sending floating point number when the amount of storage
is set to a custom number (say 1.2GB)

This should fix #1374
2014-03-17 10:37:06 +01:00
Olivier Goffart
cabcdd890e Only run the CheckQuota job if the account is connected
We use another job to check the connection.
And this may cause wrong password failure as we are still in the wizzard

Fixes #1567
2014-03-17 10:35:43 +01:00
Olivier Goffart
0a5e691ba3 Remove debug output that might cause a crash
The account may not be finilized when this is called while the
wizzard is still running on first connection
2014-03-17 10:22:14 +01:00
Olivier Goffart
ba300c2fc1 Fix memory leak: Don't use raw pointers 2014-03-17 10:04:42 +01:00
Mr. Jenkins
c74e7550af [tx-robot] updated from transifex 2014-03-17 01:26:59 -04:00
Jenkins for ownCloud
0f385db314 [tx-robot] updated from transifex 2014-03-16 03:17:49 -04:00
Mr. Jenkins
2396831846 [tx-robot] updated from transifex 2014-03-16 02:19:35 -04:00
Mr. Jenkins
adb868a63b [tx-robot] updated from transifex 2014-03-15 01:26:42 -04:00
Olivier Goffart
62e95e540b Remove Progress::Kind
It's not really used,  one need to  look at the instruction of the items
being processed to see what happens
2014-03-14 18:43:23 +01:00
Olivier Goffart
d744b5e481 Fix the file count in the progress
And clear the ignored files between syncs
2014-03-14 18:29:23 +01:00
Olivier Goffart
f9b82d852c Do not destroy the settings dialog when it is hidden.
That way the protocol widget stay filled.
And the state is kept
2014-03-14 17:39:20 +01:00
Olivier Goffart
33289bde29 Merge remote-tracking branch 'origin/1.5'
Conflicts:
	CMakeLists.txt
	VERSION.cmake
	src/CMakeLists.txt
2014-03-14 17:27:50 +01:00
Olivier Goffart
9053662fe8 remove Progress::SyncProblem and the problem slots
They are merged into normal progress
2014-03-14 17:18:26 +01:00
Markus Goetz
07904e078a CSyncThread: Emit a signal for each file before propagate
This can be used to display info before the sync is happening
2014-03-14 14:08:32 +01:00
Olivier Goffart
aacc278583 Refactor the progress
Consider that there might be several files processed at the same time
2014-03-14 13:32:32 +01:00
Klaas Freitag
57aa86910c Add dependency on mingw32-sqlite, needed for make package 2014-03-13 14:02:48 +01:00
Mr. Jenkins
7071c895df [tx-robot] updated from transifex 2014-03-13 01:26:36 -04:00
Daniel Molkentin
87f3755b1f Deploy with Qt5 2014-03-13 00:52:01 +01:00
Daniel Molkentin
3f4bcbbd62 Find Qt5 version of QtKeychain when built with Qt5 2014-03-12 18:38:59 +01:00
Daniel Molkentin
955b932806 Qt5: QtLocation is not required 2014-03-12 18:23:45 +01:00
Daniel Molkentin
e7b6560c39 cmake: Remove debug 2014-03-12 18:20:45 +01:00
Daniel Molkentin
80e583c337 Error out if a Qt module is missing
Fixes #1487
2014-03-12 18:18:02 +01:00
Daniel Molkentin
bc3d298491 Find QtKeychain on multiarch Debian/Ubuntu 2014-03-12 18:17:43 +01:00
Daniel Molkentin
28cf9ce1a4 Properly abort if QtKeychain is not found
Fixes #1486
2014-03-12 17:55:30 +01:00
Markus Goetz
d5fd6309ed CMake: Fix target_link_libraries parameters 2014-03-12 15:03:11 +01:00
Markus Goetz
a2467b5dea CMake: Do options one directory above
This fixes linking when keychain was not desired.
2014-03-12 14:20:38 +01:00
Mr. Jenkins
f723d11d90 [tx-robot] updated from transifex 2014-03-12 01:25:59 -04:00
Denis Dzyubenko
aee4c06b8d Renamed a member variable to have underscore prefix for consistency 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
89a4833cae Fixed a memory leak in FSEvents folderwatcher backend 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
255d255217 Fixed ignored paths matching on OS X.
We now listen to changes to files and when an event is received we first match
the file name to the "ignored paths list" and only if the the file that was
changed didn't match figure out which directory needs to be synced.
2014-03-11 20:34:00 +01:00
Denis Dzyubenko
902de2dc93 Fixed a memory leak in FSEvents file system watcher 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
f7c075099b Removed bogus commented out line 2014-03-11 20:34:00 +01:00
Markus Goetz
0bbcee7354 CMake: Fix else 2014-03-11 17:56:29 +01:00
Markus Goetz
8a18cf811e CMake: Fix warning 2014-03-11 17:33:45 +01:00
Markus Goetz
4e7e25c569 Improve libowncloudsync
* Introduce TokenCredentials
* Introduce static compiling
* Have compile flags for smaller compile
2014-03-11 17:05:44 +01:00
Markus Goetz
c24c97703a CMake: Ignore failure when working as submodule 2014-03-11 17:05:44 +01:00
Mr. Jenkins
de84e8012e [tx-robot] updated from transifex 2014-03-11 06:50:19 -04:00
Thomas Müller
f6ff20ca17 Switching to transifex.com 2014-03-11 11:46:50 +01:00
Thomas Müller
b7a85525cd Switching to transifex.com 2014-03-11 11:45:16 +01:00
Klaas Freitag
bc41e6bc99 Allow proper translation for sync activity through GuiLog.
This fixes bug #1550
2014-03-11 10:55:20 +01:00
Klaas Freitag
aa4e90acfc Put ocsync to a private library - WIP 2014-03-11 10:18:07 +01:00
Klaas Freitag
c8a8eb35fa Disable the folder if it is going to be removed. 2014-03-10 12:22:06 +01:00
Daniel Molkentin
2656cc70d1 1.5.3 final 2014-03-10 10:15:50 +01:00
Jenkins for ownCloud
4018338725 [tx-robot] updated from transifex 2014-03-10 02:06:43 -04:00
Mr. Jenkins
e33c1b2b75 [tx-robot] updated from transifex 2014-03-10 01:25:57 -04:00
Mr. Jenkins
75d6c26e2e [tx-robot] updated from transifex 2014-03-09 01:25:59 -05:00
Mr. Jenkins
7f2deaf722 [tx-robot] updated from transifex 2014-03-08 01:26:02 -05:00
Klaas Freitag
8bf2c54b56 Install include dirs app name aware. 2014-03-07 13:05:17 +01:00
Klaas Freitag
0c85100c93 Updated build instructions.
Conflicts:
	doc/building.rst
2014-03-07 10:02:51 +01:00
Jenkins for ownCloud
d617c40ee7 [tx-robot] updated from transifex 2014-03-07 02:07:26 -05:00
Mr. Jenkins
8aebbefb28 [tx-robot] updated from transifex 2014-03-07 01:26:50 -05:00
Olivier Goffart
7cab77e879 Call the start method assyncroniously
That was my intention, which is why i did not do a direct call to start.

This should fix issue #1536
2014-03-06 21:01:08 +01:00
Olivier Goffart
feb49b2768 Saner defaults 2014-03-06 20:34:11 +01:00
Olivier Goffart
4e25595520 Better error classification 2014-03-06 20:33:17 +01:00
Olivier Goffart
4aaa256b11 Do not beleive that the credidential are wrong when the job is cancelled
Otherwise, aborting the sync will make the client beleive the credidentials
are wrong.
2014-03-06 20:31:48 +01:00
Markus Goetz
630f61142a Proxy: Try to fix issue
See eb7074e9f0 for discussion
2014-03-06 17:48:18 +01:00
Olivier Goffart
ac393c6374 Do not sent more chunk and cancel the upload when the file change while uploading chunks 2014-03-06 16:04:32 +01:00
Olivier Goffart
114c8de814 Remove the check_csync_treewalk
because it runs csync_update which need to browse the owncloud directory
And there is no server
2014-03-06 15:30:36 +01:00
Olivier Goffart
5e012366ab Keep string translatable
(In french, one may want to add a space before the colon.
Other languages may want to change the order)

Also use the two argument version of arg() to avoid issues if the first
string contains a '%1' sign
2014-03-06 15:01:34 +01:00
Olivier Goffart
ed1294d668 Avoid double delete 2014-03-06 14:28:58 +01:00
Olivier Goffart
7f07385fd7 Remove check_csync_treewalk_remote
Since we removed the vio abstraction, we cannot use the file system anymore
as a remote.  and because we unfortunately can't use a real server,
just disable that test.
2014-03-06 14:24:53 +01:00
Olivier Goffart
ed2316a53f Add missing line break
(silent warning)
2014-03-06 14:10:42 +01:00
Olivier Goffart
e5a8cd4521 Merge branch '1.5'
Conflicts:
	VERSION.cmake
2014-03-06 14:10:08 +01:00
Olivier Goffart
3f3577d0b1 Merge pull request #1534 from owncloud/clarify-space-usage
Clarify space usage
2014-03-06 14:07:25 +01:00
Mr. Jenkins
950ffc6418 [tx-robot] updated from transifex 2014-03-06 01:26:40 -05:00
Klaas Freitag
f348499bbe For Windows, add the __USE_MINGW_ANSI_STDIO=1 switch 2014-03-05 15:39:49 +01:00
Jan-Christoph Borchardt
5ce4763868 move percent indicator of space usage to correct location 2014-03-05 12:55:32 +01:00
Jan-Christoph Borchardt
bafc90cfd8 clarify which space is used, fix #1517 2014-03-05 12:54:47 +01:00
Klaas Freitag
7a3abac833 Bump version to 1.5.3rc1 2014-03-05 10:49:58 +01:00
Mr. Jenkins
b5349b66c6 [tx-robot] updated from transifex 2014-03-05 01:26:40 -05:00
Markus Goetz
eb7074e9f0 csync: Don't free proxy settings on commit
Should fix #1502 and #1524
and #1459 and #1521
2014-03-04 18:44:52 +01:00
Klaas Freitag
66b152ac69 Remove left over member variables. 2014-03-03 18:12:12 +01:00
Olivier Goffart
6df00ad08c Only removes the password from the credidentials if it has been fetched before
Also only run the propfind job if the credidentials are readon, and fetch them
otherwise
2014-03-03 17:55:15 +01:00
Olivier Goffart
76b24ff00d Revert "Do not wipe the credentials from config for reconnect."
This reverts commit 9eb3452a71.

We need that or wrong password can never be changed
2014-03-03 17:21:20 +01:00
Olivier Goffart
60a1d50ec9 Keep the rentrency flag when asking the user for the password 2014-03-03 17:16:57 +01:00
Klaas Freitag
9eb3452a71 Do not wipe the credentials from config for reconnect.
This should fix bug #1491
2014-03-03 16:39:38 +01:00
Klaas Freitag
228de7eede Make the CheckServerJob ignoring credential fails. 2014-03-03 16:37:29 +01:00
Klaas Freitag
2164f5d9b7 Remove a superflous MessageBox. User is asked for Password instead. 2014-03-03 16:36:59 +01:00
Klaas Freitag
4240010046 Add method clearCookieJar which wipes QNAMs cookies. 2014-03-03 16:36:30 +01:00
Klaas Freitag
1eb0875518 Use the mirall config file for all Keychain jobs.
Also set the job as parent to get proper deletion of the
settings object.
2014-03-03 16:35:57 +01:00
Klaas Freitag
b8e52304bd Do proper initialization of _fetchJobInProgress.
That confused win32, since this flag was true very often.
2014-03-03 16:33:59 +01:00
Mr. Jenkins
8d2c43a9f0 [tx-robot] updated from transifex 2014-03-01 01:26:14 -05:00
Markus Goetz
6906b8d30c csync: Remove outdated tests 2014-02-28 16:43:15 +01:00
Olivier Goffart
0658802048 Fix layout of the network tab
Fixes #1491
2014-02-28 13:17:04 +01:00
Olivier Goffart
eeb68919bf Do not erase the username and password from the config if we never connected
If we never fetched the credidentials, the _user and _password will be empty,
we should therefore not try to save them because it would just erase them.

Version 1.5.2 always try to fetch the creds at startup.  But now we only
do it if we detect an internet connection
2014-02-28 12:51:06 +01:00
Olivier Goffart
9a60732542 Do not erase the full account config if an old version of the client stored the password 2014-02-28 12:51:06 +01:00
Daniel Molkentin
f8d996258e OS X: Make script more even robust 2014-02-28 11:16:25 +01:00
Daniel Molkentin
c8714be1d2 mac os sign script: quote all params 2014-02-28 10:23:02 +01:00
Markus Goetz
1c8f279214 csync: Remove more vio abstraction 2014-02-28 09:13:40 +01:00
Mr. Jenkins
0cc0eed8a8 [tx-robot] updated from transifex 2014-02-28 01:26:23 -05:00
Daniel Molkentin
36cd9d9ced Shibboleth: Move browser window to the offset of the setup wizard 2014-02-27 17:07:59 +01:00
Daniel Molkentin
9c70ee68d2 Mask password lineedit 2014-02-27 17:07:59 +01:00
Olivier Goffart
e809a59049 Remove spurious error message.
Sometimes 'success' is false without apparent reason.
Just remove the message
2014-02-27 17:03:42 +01:00
Olivier Goffart
96c535d712 Make the parrallel uploaded also check for problem in Shared 2014-02-27 14:13:22 +01:00
Markus Goetz
5d58a8164c csync: Remove get_etag 2014-02-27 14:03:17 +01:00
Markus Goetz
71cc74a0d6 csync: Remove csync_get_local_username 2014-02-27 13:55:34 +01:00
Markus Goetz
77d9256e03 csync: Remove more unneeded code 2014-02-27 13:52:30 +01:00
Markus Goetz
e7fb84a491 csync: Remove capabilities 2014-02-27 13:42:20 +01:00
Markus Goetz
a652fec5a0 csync: Remove more unused stuff 2014-02-27 13:33:22 +01:00
Markus Goetz
0d34a2bca5 csync: Remove unused vio stuff 2014-02-27 13:25:31 +01:00
Markus Goetz
a2e8bfd962 csync: Remove unix_extensions 2014-02-27 13:23:35 +01:00
Daniel Molkentin
33ae2eb19f Try to handle auth requests by a Shibboleth IdP 2014-02-27 13:18:53 +01:00
Markus Goetz
eff2427a03 csync: Remove time_sync_required 2014-02-27 13:12:21 +01:00
Olivier Goffart
d4fa955950 Don't fetch credidentials from application.cpp
They will be fetched by the connection validator after doing
the status.php check
2014-02-27 13:06:29 +01:00
Olivier Goffart
869793592d Merge branch '1.5'
Conflicts:
	VERSION.cmake
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-27 11:40:34 +01:00
Mr. Jenkins
417dbcc9ac [tx-robot] updated from transifex 2014-02-27 01:26:23 -05:00
Jenkins for ownCloud
3cb6fc82dd [tx-robot] updated from transifex 2014-02-25 02:07:10 -05:00
Mr. Jenkins
7d398b20f2 [tx-robot] updated from transifex 2014-02-25 01:26:24 -05:00
Mr. Jenkins
b03e49f492 [tx-robot] updated from transifex 2014-02-23 01:26:46 -05:00
Mr. Jenkins
3ed5f43e90 [tx-robot] updated from transifex 2014-02-22 01:26:39 -05:00
Markus Goetz
4630244b51 Windows: Special case csync_vio_local_stat
By not calling tstat _and_ GetFileInformationByHandle, but only
GetFileInformationByHandle, we can save some precious msec in the local
update phase.
2014-02-21 14:15:34 +01:00
Mr. Jenkins
7ec534067e [tx-robot] updated from transifex 2014-02-21 01:26:44 -05:00
dragotin
c38c3ce6e2 Merge pull request #1450 from owncloud/remove-file-string
remove 'File' word from notification
2014-02-20 17:31:57 +01:00
Mr. Jenkins
aa02ce2481 [tx-robot] updated from transifex 2014-02-20 03:17:59 -05:00
Markus Goetz
6a55324261 OwncloudCmd: Struct needs to be zeroed
Else the --silent was always true on Windows where memory did not get
zeroed.
2014-02-19 17:50:15 +01:00
Markus Goetz
f1fa1f125d Fix previous commit 2014-02-19 17:39:11 +01:00
Markus Goetz
141f005c34 Ignore conflict files all the time
The OwncloudCmd currently does not load the exclude files.
It is safer to just always ignore conflict files.
2014-02-19 17:16:10 +01:00
Mr. Jenkins
e32ca49c31 [tx-robot] updated from transifex 2014-02-19 09:42:10 -05:00
Olivier Goffart
f5e16540a1 Merge branch '1.5'
Conflicts:
	src/mirall/owncloudpropagator.cpp
2014-02-19 15:38:03 +01:00
Markus Goetz
65ffe53c20 Register metatype at better place 2014-02-19 14:53:31 +01:00
Markus Goetz
06f2989ac8 Fix build on Qt4
Unfortunately I had to remove the 'static'
2014-02-19 13:29:00 +01:00
Markus Goetz
399b08ad40 OwncloudCmd: Register a meta type 2014-02-19 12:00:38 +01:00
Olivier Goffart
5b561e4462 Use AUTOMOC
This should also fix the compilation of owncloudcmd.cpp
Since we have a Q_OBJECT in a .cpp file and qt_wrap_cpp would not generate
the moc file.
2014-02-19 11:55:08 +01:00
Olivier Goffart
1be322579c Merge remote-tracking branch 'origin/master'
Conflicts:
	src/owncloudcmd/owncloudcmd.cpp
2014-02-19 11:19:56 +01:00
Markus Goetz
b7c7c9f3eb Accountsettings: Fix warning 2014-02-19 10:59:57 +01:00
Markus Goetz
9237293cc0 OwncloudCmd: Fixup URL
Allow users to specify owncloud(s) or http(s)
2014-02-19 10:57:29 +01:00
Markus Goetz
63083a558b OwncloudCmd: Print update phase duration values 2014-02-19 10:51:04 +01:00
Olivier Goffart
d4bd327fef Merge branch 'parallel_upload'
Conflicts:
	src/mirall/csyncthread.cpp
2014-02-19 10:24:34 +01:00
Olivier Goffart
2de288c5f3 Merge remote-tracking branch 'origin/1.5'
Conflicts:
	VERSION.cmake
2014-02-19 10:21:23 +01:00
Markus Goetz
fcc0e89044 Update phase: Allow benchmarking / progress update 2014-02-18 21:41:20 +01:00
Jan-Christoph Borchardt
8267b9e590 remove 'File' word from notification 2014-02-18 18:42:49 +01:00
Jan-Christoph Borchardt
5a68e5f58d remove superfluous tooltip from server address input field 2014-02-18 17:21:25 +01:00
Olivier Goffart
496d900fee Refactor the renameReplace in its own function
Share a bit more code between legacy and qnam download job
2014-02-18 14:05:52 +01:00
Olivier Goffart
58bda69f8b PropagateRemoteRename is not a legacy job
move it back to propagatorjobs.cpp
2014-02-18 13:52:40 +01:00
Olivier Goffart
89b5ddec56 Fix the logs in the update phase
Since csync use a thread local variable for the logs, we need
to reset it when we enter the update thread
2014-02-18 13:48:13 +01:00
Olivier Goffart
f7419094f3 move the file system helpers in their own file 2014-02-18 12:54:40 +01:00
Olivier Goffart
432f377750 Use the legacy jobs when using bandwidth limiting
Or if a environement variable is set
2014-02-18 12:24:35 +01:00
Olivier Goffart
c32beb957d Move the jobs around between files
Renamed owncloudpropagator_qnam  to propagator_qnam
Move the jobs in propagatorjobs.cpp
Move the neon jobs that have a qnam equivalent into propagator_legacy.cpp and
rename the jobs accordingly
2014-02-18 12:21:05 +01:00
Jenkins for ownCloud
ee7c8d3c94 [tx-robot] updated from transifex 2014-02-18 06:14:46 -05:00
Mr. Jenkins
3a15502a62 [tx-robot] updated from transifex 2014-02-18 04:23:22 -05:00
Denis Dzyubenko
a51cb0982b Added Mac-specific settings dialog that looks more native 2014-02-18 02:22:16 +01:00
Olivier Goffart
a39caa1cda Make owncloudcmd work with the parallel upload/download
Also make it work when there syncing a remote subfolder
2014-02-17 17:31:03 +01:00
Olivier Goffart
a4ee8d6f6f Remove unused function 2014-02-17 15:25:47 +01:00
Olivier Goffart
b35e38f80f Parallel download 2014-02-17 13:48:56 +01:00
Jenkins for ownCloud
e34122ad54 [tx-robot] updated from transifex 2014-02-15 07:19:10 -05:00
Mr. Jenkins
03824baba4 [tx-robot] updated from transifex 2014-02-15 06:22:15 -05:00
Mr. Jenkins
34b86cb0db [tx-robot] updated from transifex 2014-02-14 05:08:22 -05:00
Olivier Goffart
7b6269b4bf Fix chunking
- Do not start them in parallel, start them in sequence instead, as they are quite
  and there are already other jobs running in parallel normaly
- Do not load the fill into memory
- Support resuming
2014-02-13 14:02:05 +01:00
Jenkins for ownCloud
842c6c0e9e [tx-robot] updated from transifex 2014-02-13 03:19:10 -05:00
Mr. Jenkins
a81d7823a9 [tx-robot] updated from transifex 2014-02-13 03:09:11 -05:00
Daniel Molkentin
aa26fc1e80 Bump version 2014-02-12 21:20:54 +01:00
Daniel Molkentin
beb9752f09 Merge remote-tracking branch 'origin/1.5' 2014-02-12 21:17:06 +01:00
Olivier Goffart
a4442ebb40 Merge branch 'master' into parallel_upload
Conflicts:
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-12 16:50:45 +01:00
Olivier Goffart
93f31fa9d7 Merge branch '1.5' 2014-02-12 16:44:24 +01:00
Olivier Goffart
f35b1f8a2b Only starts 6 jobs in parallel 2014-02-12 16:33:55 +01:00
Olivier Goffart
6db8daabf7 Make abort work even when there are parallel uploads 2014-02-12 16:33:55 +01:00
Olivier Goffart
7ae40e13ec Update the docs now that csync is included 2014-02-12 11:32:19 +01:00
Olivier Goffart
a5379ef2aa make BUILD_WITH_QT4 off by default
Rationale:
When Qt5 is not found, the script will automatically use Qt4.
However, without this change, when Qt4 is not found, it will not
try to find Qt5 because BUILD_WITH_QT4 is ON by default forbidding the
use of Qt5 even if it is installed.

Also, other packages default to Qt5 including qtkeychain

See also issue #1418
2014-02-12 11:25:08 +01:00
Olivier Goffart
01c0a3c099 use Utility::sleep 2014-02-12 11:16:27 +01:00
Jenkins for ownCloud
9815ccb760 [tx-robot] updated from transifex 2014-02-12 02:14:56 -05:00
Mr. Jenkins
814f40c1c7 [tx-robot] updated from transifex 2014-02-12 02:05:48 -05:00
Markus Goetz
19c128ba12 Update building.rst 2014-02-11 11:45:00 +01:00
Thomas Müller
60ca442728 Adding quotes - necessary for themes containing spaces in APPLICATION_NAME 2014-02-11 11:23:34 +01:00
Jenkins for ownCloud
3ffd7034c9 [tx-robot] updated from transifex 2014-02-11 02:07:14 -05:00
Mr. Jenkins
95469a9886 [tx-robot] updated from transifex 2014-02-11 01:26:45 -05:00
Markus Goetz
8c9a65635f Propagator: Fix compilation
It is still protected on Qt4
2014-02-10 15:46:09 +01:00
Markus Goetz
104cf680a6 OS X: Workaround Qt5 QNAM bug
This made the sign out/sign in handling not work.
2014-02-10 15:42:46 +01:00
Klaas Freitag
b84253054a Read configuration from /etc/ownCloud/t1.cfg 2014-02-10 15:08:40 +01:00
Markus Goetz
43345dc236 Icon: Make png2ico / windres failure non-fatal 2014-02-10 14:36:32 +01:00
Markus Goetz
79d14f0760 Propagator: Use cross platform sleep function 2014-02-10 14:34:48 +01:00
Klaas Freitag
6387777c18 Added chunking for the new uploading. 2014-02-10 13:00:22 +01:00
Mr. Jenkins
1e9c508c92 [tx-robot] updated from transifex 2014-02-10 06:17:19 -05:00
Jenkins for ownCloud
88e9014dad [tx-robot] updated from transifex 2014-02-09 04:30:28 -05:00
Mr. Jenkins
313ad56d11 [tx-robot] updated from transifex 2014-02-09 04:20:08 -05:00
Jenkins for ownCloud
8152b7ebcf [tx-robot] updated from transifex 2014-02-08 02:21:31 -05:00
Mr. Jenkins
e36d314218 [tx-robot] updated from transifex 2014-02-08 01:26:49 -05:00
Klaas Freitag
593d528b6a Removed unused function. 2014-02-07 11:57:10 +01:00
Klaas Freitag
3649869650 Optimize restoring of the remote tree from database.
If the etag of a directory hasn't changed, the content for the csync
tree can be restored from database. The code doing that is now optimized
so that this does not take so long any more.
2014-02-07 11:53:58 +01:00
Klaas Freitag
41a4f1fc37 Only wait half a second before the next folder sync is started. 2014-02-07 11:53:58 +01:00
Olivier Goffart
f67d2e6418 Start all the jobs in parallel 2014-02-06 12:11:45 +01:00
Olivier Goffart
9a6275a5e3 use QNAM for the PUT
Not yet supported:
 - chunking
 - if the file changes while uploading
 - aborting
 - owncloudcmd  (because of the dependency to the account and the credidentials)
2014-02-06 11:50:16 +01:00
Olivier Goffart
2d9c0b6c31 Move CSyncThread in the main thread, and just do the neon jobs in a thread
It is important because then we can do assynchronious job that needs
QNAM in the main thread
2014-02-05 20:18:03 +01:00
hefee
4e0496f74d respect XDG_CONFIG_HOME for getting user config dir.
Under linux the XDG Base Directory Specification define different
enviroment variables where to store what.
2013-12-31 02:10:44 +01:00
Tom Swartz
738f026c41 Merge pull request #1 from owncloud/master
Merge with owncloud:master
2013-11-25 12:29:22 -08:00
Tom Swartz
32e205f6ce Add exclusion for OSX ._<filename> files
Exclude older OSX metadata ._<filename> files from sync, improving
cross-platform sync experience.

Tested-on: arcturus <20 Nov 2013>
2013-11-20 10:26:36 -05:00
653 changed files with 94708 additions and 31121 deletions

1
.gitattributes vendored
View File

@@ -2,3 +2,4 @@
.gitignore export-ignore
.gitattributes export-ignore
.commit-template export-ignore
/binary export-ignore

150
.gitignore vendored
View File

@@ -16,3 +16,153 @@ build*
cscope.*
tags
t1.cfg
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Roslyn cache directories
*.ide/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Mac OS X specific
shell_integration/MacOSX/LiferayNativity.xcworkspace/xcuserdata/
**/.DS_Store
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
*.pubxml
# NuGet Packages
packages/*
*.nupkg
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config
# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Microsoft Fakes
FakesAssemblies/

6
.gitmodules vendored
View File

@@ -1,3 +1,9 @@
[submodule "doc/ocdoc"]
path = doc/ocdoc
url = https://github.com/owncloud/documentation
[submodule "src/3rdparty/qtmacgoodies"]
path = src/3rdparty/qtmacgoodies
url = git://github.com/shadone/qtmacgoodies.git
[submodule "binary"]
path = binary
url = git://github.com/owncloud/owncloud-client-binary.git

View File

@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.8.0)
project(mirall)
set(PACKAGE "mirall")
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
@@ -41,6 +43,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1)
# if we cannot get it from git, directly try .tag (packages)
# this will work if the tar balls have been properly created
# via git-archive.
if (GIT_SHA1)
if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
file(READ ${CMAKE_SOURCE_DIR}/.tag sha1_candidate)
string(REPLACE "\n" "" sha1_candidate ${sha1_candidate})
@@ -49,6 +52,7 @@ if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
set (GIT_SHA1 "${sha1_candidate}")
endif()
endif()
endif()
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(DATADIR ${DATA_INSTALL_DIR})
@@ -72,30 +76,65 @@ else()
endif()
#####
# this option removes Http authentication, keychain, shibboleth etc and is intended for
# external authentication mechanisms
option(TOKEN_AUTH_ONLY "TOKEN_AUTH_ONLY" OFF)
if(TOKEN_AUTH_ONLY)
message("Compiling with token authentication")
add_definitions(-DTOKEN_AUTH_ONLY=1)
endif()
# this option creates only libocsync and libowncloudsync
option(BUILD_LIBRARIES_ONLY "BUILD_LIBRARIES_ONLY" OFF)
# When this option is enabled, 5xx errors are not added to the clacklist
# Normaly you don't want to enable this option because if a particular file
# trigger a bug on the server, you want the file to be blacklisted.
option(OWNCLOUD_5XX_NO_BLACKLIST "OWNCLOUD_5XX_NO_BLACKLIST" OFF)
if(OWNCLOUD_5XX_NO_BLACKLIST)
add_definitions(-DOWNCLOUD_5XX_NO_BLACKLIST=1)
endif()
#### find libs
#find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui QtXml QtNetwork QtTest QtWebkit REQUIRED )
#if( UNIX AND NOT APPLE ) # Fdo notifications
# find_package(Qt4 4.7.0 COMPONENTS QtDBus REQUIRED )
#endif()
find_package(Neon REQUIRED)
find_package(QtKeychain REQUIRED)
Find_package(Sparkle)
if(NOT TOKEN_AUTH_ONLY)
if (Qt5Core_DIR)
find_package(Qt5Keychain REQUIRED)
else()
find_package(QtKeychain REQUIRED)
endif()
endif()
if(APPLE)
find_package(Sparkle)
endif(APPLE)
if(UNIX)
find_package(INotify REQUIRED)
find_package(INotify REQUIRED)
else()
find_package(INotify)
find_package(INotify)
endif()
find_package(Sphinx)
find_package(PdfLatex)
set(WITH_QTKEYCHAIN ${QTKEYCHAIN_FOUND})
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(test/test_journal.db "${CMAKE_BINARY_DIR}/test/test_journal.db" COPYONLY)
include(OwnCloudCPack.cmake)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)
if( WIN32 )
add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
endif( WIN32 )
# Handle Translations, pick all mirall_* files from trans directory.
file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/mirall_*.ts)
@@ -103,6 +142,7 @@ set(TRANSLATIONS ${TRANS_FILES})
add_subdirectory(csync)
add_subdirectory(src)
add_subdirectory(shell_integration)
add_subdirectory(doc)
if(UNIT_TESTING)

View File

@@ -1,8 +1,90 @@
ChangeLog
=========
version 1.6.2 (release 2014-07-x )
* 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
* Qt5 compile issues fixed
* Ignore sync log file in filewatcher
* Install libocsync to private library dir and use rpath to localize
* Fix reconnect after server disconnect
* Fix "unknown action" display in Activity window
* Fix memory leaks
* Respect XDG_CONFIG_HOME environment var
* Handle empty fileids in the journal correctly
* 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
(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
* Speed up file stat code on Windows
* Enforce Qt5 for Windows and Mac OS X builds
* Improved owncloudcmd: SSL support, documentation
* Added advanced logging of operations (file .???.log in sync
directory)
* Avoid creating a temporary copy of the sync database (.ctmp)
* Enable support for TLS 1.2 negotiation on platforms that use
Qt 5.2 or later
* Forward server exception messages to client error messages
* Mac OS X: Support Notification Center in OS X 10.8+
* Mac OS X: Use native settings dialog
* Mac OS X: Fix UI inconsistencies on Mavericks
* Shibboleth: Warn if authenticating with a different user
* 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 )
* Fix usage of proxies after first sync run (#1502, #1524, #1459, #1521)
* Do not wipe the credentials from config for reconnect (#1499, #1503)
* Do not erase the full account config if an old version of the client stored
the password (related to above)
* Fix layout of the network tab (fixes #1491)
* Handle authentication requests by a Shibboleth IdP
* Shibboleth: If no connection is available, don't open the login window
* [Packaging] Debian/Ubuntu: ship sync-exclude.lst
* [Packaging] Fix issues with access to gnome keychain in Fedora and RHEL6
* [Packaging] Ensure all sub packages get updated
* [Packaging] Fix incorrect path in desktop file (RHEL6/CentOS6)
version 1.5.2 (release 2014-02-26 )
* Fix behavior when attempting to rename Shared folder
* Fix potential endless sync loops on Mac OS (#1463)
* Fix potential crash when pausing during update phase (#1442)
@@ -20,9 +102,6 @@ version 1.5.2 (release 2014-02-26 )
* Shibboleth: Avoid auth on restart by storing cookies in the wallet
* Fix license headers
ChangeLog
=========
version 1.5.1 (release 2014-02-13 )
* Added an auto updater that updates the client if a
more recent version was found automatically (Windows, Mac OS X)
@@ -90,7 +169,6 @@ version 1.5.0 (release 2013-12-12 ), csync 0.91.4 required
* Windows: Fix move file operation
version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
* Do not show the warning icon in the tray (#944)
* Fix manual proxy support when switching (#1016)
* Add folder column to detailed sync protocol (#1037)

View File

@@ -17,7 +17,8 @@ It uses OCSync as its syncing backend.
## Building the source code
Please refer to [Building the Client](http://doc.owncloud.org/desktop/1.5/building.html)
Please refer to doc/building.rst, or
[Building the Client](http://doc.owncloud.org/desktop/1.5/building.html)
in the ownCloud client manual.
## Authors

View File

@@ -1,10 +1,10 @@
set( MIRALL_VERSION_MAJOR 1 )
set( MIRALL_VERSION_MINOR 5 )
set( MIRALL_VERSION_PATCH 2 )
set( MIRALL_VERSION_MINOR 7 )
set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX ) #e.g. beta1, beta2, rc1
set( MIRALL_VERSION_SUFFIX "alpha1") #e.g. beta1, beta2, rc1
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
if( NOT DEFINED MIRALL_VERSION_BUILD )

45
admin/osx/create_mac_pkg.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
# Script to create the Mac installer using the packages tool from
# http://s.sudre.free.fr/Software/Packages/about.html
#
# the path of installation must be given as parameter
if [ -z "$1" ]; then
echo "ERROR: Provide the CMAKE_INSTALL_DIR to this script."
exit 1
fi
prjfile="admin/osx/macosx.pkgproj"
if [ ! -f $prjfile ]; then
echo "ERROR: macosx.pkgproj not in admin dir, start from CMAKE_SOURCE_DIR!"
exit 2
fi
pack="admin/ownCloud Installer.pkg"
rm -f $pack
install_path=$1
# The name of the installer package
installer=ownCloud\ Installer.pkg
# The command line tool of the "Packages" tool, see link above.
pkgbuild=/usr/local/bin/packagesbuild
$pkgbuild -F $install_path $prjfile
rc=$?
if [ $rc == 0 ]; then
echo "Successfully created $pack"
else
echo "Failed to create $pack"
exit 3
fi
# FIXME: Sign the finished package.
# See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5
# certname=gdbsign
# productsign --cert $certname admin/$installer ./$installer

1426
admin/osx/macosx.pkgproj Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,18 +2,39 @@
[ "$#" -lt 2 ] && echo "Usage: sign_dmg.sh <dmg> <identity>" && exit
src_dmg=$1
tmp_dmg=writable_$1
signed_dmg=signed_$1
identity=$2
mount="/Volumes/$(basename $src_dmg|cut -d"-" -f1)"
src_dmg="$1"
tmp_dmg="writable_$1"
signed_dmg="signed_$1"
identity="$2"
test -e $tmp_dmg && rm -rf $tmp_dmg
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
hdiutil attach $tmp_dmg
pushd $mount
codesign -s "$identity" $mount/*.app
QT_FMWKS=`basename ${TMP_APP}/Contents/Frameworks`/Qt*
QT_FMWK_VERSION="5"
fix_frameworks() {
TMP_APP=$1
QT_FMWK_PATH=$2
QT_FMWKS=$3/Qt*.framework
echo "Patching Qt frameworks..."
for FMWK in $QT_FMWKS; do
FMWK_NAME=`basename -s .framework $FMWK`
FMWK=`basename $FMWK`
FMWK_PATH="${TMP_APP}/Contents/Frameworks/${FMWK}"
mkdir -p "${FMWK_PATH}/Versions/${QT_FMWK_VERSION}/Resources/"
cp -avf "${QT_FMWK_PATH}/${FMWK}/Contents/Info.plist" "${FMWK_PATH}/Versions/${QT_FMWK_VERSION}/Resources"
(cd "${FMWK_PATH}" && ln -sf "Versions/${QT_FMWK_VERSION}/Resources" "Resources")
perl -pi -e "s/${FMWK_NAME}_debug/${FMWK_NAME}/" "${FMWK_PATH}/Resources/Info.plist"
done
}
mount="/Volumes/$(basename "$src_dmg"|sed 's,-\([0-9]\)\(.*\),,')"
test -e "$tmp_dmg" && rm -rf "$tmp_dmg"
hdiutil convert "$src_dmg" -format UDRW -o "$tmp_dmg"
hdiutil attach "$tmp_dmg"
pushd "$mount"
fix_frameworks "$mount"/*.app `qmake -query QT_INSTALL_LIBS` "$mount"/*.app/Contents/Frameworks
codesign -s "$identity" --deep "$mount"/*.app
popd
diskutil eject $mount
test -e $signed_dmg && rm -rf $signed_dmg
hdiutil convert $tmp_dmg -format UDBZ -o $signed_dmg
diskutil eject "$mount"
test -e "$signed_dmg" && rm -rf "$signed_dmg"
hdiutil convert "$tmp_dmg" -format UDBZ -o "$signed_dmg"

19
admin/win/download_runtimes.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh -x
#VS2013
base_url=http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3
tmp_path=/tmp/.vcredist
mkdir -p $tmp_path
copy_cached_file() {
file=$1
if [ ! -e $tmp_path/$file ]; then
wget -O $tmp_path/$file $base_url/$file
fi
cp -a $tmp_path/$file $PWD
}
copy_cached_file "vcredist_x64.exe"
copy_cached_file "vcredist_x86.exe"

View File

@@ -1,8 +1,8 @@
[main]
host = https://www.transifex.net
host = https://www.transifex.com
[owncloud.mirall-wininstaller]
host = https://www.transifex.net
host = https://www.transifex.com
source_file = pofiles/messages.pot
source_lang = en
type = PO

View File

@@ -1,12 +1,15 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Erakutsi bertsio-berritze oharrak"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "kill prozesua ez da aurkitu!"
StrCpy $PageReinstall_NEW_Field_2 "Desinstalatu instalatu baino lehen"
StrCpy $PageReinstall_NEW_Field_3 "Ez desinstalatu"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Dagoeneko Instalatuta"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Hautatu nola nahi duzun ${APPLICATION_NAME} instalatzea."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} dagoeneko instalatuta dago.\nHautatu zer operazio egin nahi duzu eta klikatu Hurrengoa jarraitzeko."
StrCpy $PageReinstall_SAME_Field_2 "Gehitu/Berrinstalatu osagaiak"
StrCpy $PageReinstall_SAME_Field_3 "Desinstalatu ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalatu ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Hautatu zer mantenu aukera egin nahi duzun."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Hasierako Menuko Lasterbidea"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Hasierako Menuan ${APPLICATION_NAME}rako Abiarazle bizkorra sortzen."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Mahaigaineko Lasterbidea"
@@ -29,14 +32,13 @@ StrCpy $INIT_INSTALLER_RUNNING "Instalatzailea dagoeneko martxan da."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Desinstalatzaile honek administratzaile baimenak behar ditu, saiatu berriro"
StrCpy $INIT_UNINSTALLER_RUNNING "Desinstalatzailea dagoeneko martxan da."
StrCpy $SectionGroup_Shortcuts "Lasterbideak"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Show release notes"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $PageReinstall_NEW_Field_1 "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Choose the maintenance option to perform."
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"

View File

@@ -1,44 +1,46 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar les notes de versió"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "S'ha trobat el(s) procés ${APPLICATION_EXECUTABLE} que s'ha d'aturar.$\nVoleu que l'instal·lador l'aturi?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "S'estan matant els processos ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Procés per matar no trobat!"
StrCpy $PageReinstall_NEW_Field_1 "Una versió anterior de ${APPLICATION_NAME} està instal·lada en el vostre sistema. Es recomana desinstal·lar la versió actual abans d'instal·lar. Seleccioneu l'operació que desitjeu realitzar i feu clic a Següent per continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstal·lar abans d'instal·lar"
StrCpy $PageReinstall_NEW_Field_3 "No instal·lar"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Ja instal·lat"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Trieu la manera com voleu instal·lar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Una versió més recent de ${APPLICATION_NAME} ja està instal.lada!! No es recomana instal.lar una versió més antiga. Si realment voleu instal.lar una versió més antiga, és millor primer desinstal.lar la versió actual. Seleccioni l'operació que desitjeu realitzar i feu clic a Següent per a continuar."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} ja està instal.lat.↩\nSeleccioneu l'operació que desitjeu realitzar i feu clic a Següent per continuar."
StrCpy $PageReinstall_SAME_Field_2 "Afegir/Reinstal.lar components"
StrCpy $PageReinstall_SAME_Field_3 "Desinstal.lar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstal.lar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolliu l'opció de manteniment per executar-ho."
StrCpy $SEC_APPLICATION_DETAILS "Instal·lant ${APPLICATION_NAME} essencial."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Accés directe del programa al menú d'inici"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Afegint la drecera per ${APPLICATION_NAME} al menú d'inici."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Drecera a l'escriptori"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creant les dreceres a l'escriptori"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Drecera d'inici ràpid"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Creant la drecera per l'inici ràpid"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essencial."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Drecera ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Drecera a l'escrptori per ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Drecera d'inici ràpid per ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Esborra la carpeta de dades de ${APPLICATION_NAME} del vostre equip."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Voleu esborrar la carpeta de dades de ${APPLICATION_NAME}?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Deixeu-ho sense marcar per mantenir la carpeta de dades per un ús posterior o marqueu-ho per esborrar la carpeta de dades."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Sí, esborra la carpeta de dades."
StrCpy $UNINSTALLER_FILE_Detail "Escrivint el desinstal·lador"
StrCpy $UNINSTALLER_REGISTRY_Detail "Escrivint les claus del registre de l'instal·lador"
StrCpy $UNINSTALLER_FINISHED_Detail "Acabat"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_2 "Add/Reinstall components"
StrCpy $PageReinstall_SAME_Field_3 "Uninstall ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Uninstall ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Choose the maintenance option to perform."
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Start Menu Program Shortcut"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adding shortcut for ${APPLICATION_NAME} to the Start Menu."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Desktop Shortcut"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creating Desktop Shortcuts"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Creating Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME} shortcut."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Desktop shortcut for ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Quick Launch shortcut for ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Remove ${APPLICATION_NAME}'s data folder from your computer."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Do you want to delete ${APPLICATION_NAME}'s data folder?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Yes, delete this data folder."
StrCpy $UNINSTALLER_FILE_Detail "Writing Uninstaller"
StrCpy $UNINSTALLER_REGISTRY_Detail "Writing Installer Registry Keys"
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $UNINSTALL_ABORT "Uninstall aborted by user"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "This installer requires admin access, try again"
StrCpy $INIT_INSTALLER_RUNNING "The installer is already running."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "This uninstaller requires admin access, try again"
StrCpy $INIT_UNINSTALLER_RUNNING "The uninstaller is already running."
StrCpy $SectionGroup_Shortcuts "Shortcuts"
StrCpy $UNINSTALL_MESSAGEBOX "No sembla que ${APPLICATION_NAME} estigui instal·lat en la carpeta '$INSTDIR'.$\n$\nContinuo igualment (no recomanat)?"
StrCpy $UNINSTALL_ABORT "La desinstal·lació s'ha cancel·lat."
StrCpy $INIT_NO_QUICK_LAUNCH "Drecera d'inici ràpid (N/A)"
StrCpy $INIT_NO_DESKTOP "Drecera de l'escrpitori (sobreescriu l'existent)"
StrCpy $UAC_ERROR_ELEVATE "No es pot elevar, error:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Aquest instal·lador requereix accés d'administrador, intenteu-ho de nou"
StrCpy $INIT_INSTALLER_RUNNING "L'instal·lador ja s'està executant."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Aquest desinstal·lador requereix accés d'administrador, intenteu-ho de nou."
StrCpy $INIT_UNINSTALLER_RUNNING "El desinstal·lador ja s'està executant."
StrCpy $SectionGroup_Shortcuts "Dreceres"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,5 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Zobrazit poznámky k vydání"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Nalezen proces(y) ${APPLICATION_EXECUTABLE}, které je nutné ukončit .$\nPřejete si, aby je instalátor za vás ukončil?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Ukončuji procesy ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Proces k ukončení nebyl nalezen! "
StrCpy $PageReinstall_NEW_Field_1 "Starší verze ${APPLICATION_NAME} je nainstalována na tomto systému. Doporučuje se předem tuto verzi odinstalovat. Zvolte operaci, kterou chcete uskutečnit, a klikněte na tlačítko Další pro pokračování."
StrCpy $PageReinstall_NEW_Field_2 "Odinstalovat před instalací"
@@ -13,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Odinstalovat ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Odinstalovat ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Vyberte možnost údržby k provedení."
StrCpy $SEC_APPLICATION_DETAILS "Instalují se náležitosti ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Stavová ikona pro Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instaluji stavovou ikonu pro Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Zástupce v Nabídce Start"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Přidávám zástupce pro ${APPLICATION_NAME} do Nabídky Start."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Zástupce na ploše"
@@ -33,12 +37,10 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Dokončeno"
StrCpy $UNINSTALL_MESSAGEBOX "Nezdá se, že ${APPLICATION_NAME} je nainstalována ve složce '$INSTDIR'.\nChcete pokračovat (nedoporučuje se)?"
StrCpy $UNINSTALL_ABORT "Odinstalace zrušena uživatelem"
StrCpy $INIT_NO_QUICK_LAUNCH "Zástupce rychlého spuštění (není k dispozici)"
StrCpy $INIT_NO_DESKTOP "Zástupce na ploše (přepíše existující)"
StrCpy $UAC_ERROR_ELEVATE "Nelze zvýšit, chyba:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tento instalátor vyžaduje správcovská oprávnění, opakujte znovu"
StrCpy $INIT_INSTALLER_RUNNING "Instalátor je již spuštěn."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tento odinstalátor vyžaduje správcovská oprávnění, opakujte znovu"
StrCpy $INIT_UNINSTALLER_RUNNING "Odinstalátor je již spuštěn."
StrCpy $SectionGroup_Shortcuts "Zástupci"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"

View File

@@ -1,12 +1,12 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "toon releaseopmerkingen"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Toon releaseopmerkingen"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Gevonden ${APPLICATION_EXECUTABLE} proces(sen) moet worden gestopt.$\nWilt u dat het installatieprogramma dat voor u doet?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Stoppen ${APPLICATION_EXECUTABLE} processen."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Het te stoppen proces is niet gevonden!"
StrCpy $PageReinstall_NEW_Field_1 "Er is een oudere versie van ${APPLICATION_NAME} geïnstalleerd op uw systeem. geadviseerd wordt om de huidige versie te de-installeren voordat de nieuwe versie wordt geïnstalleerd. Selecteer de uit te voeren actie en klik op Verder om door te gaan."
StrCpy $PageReinstall_NEW_Field_2 "De-installeren voor installeren"
StrCpy $PageReinstall_NEW_Field_3 "Niet de-installeren"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Reeds geinstalleerd"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Al geïnstalleerd"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Kies hoe u ${APPLICATION_NAME} wilt installeren."
StrCpy $PageReinstall_OLD_Field_1 "Er is al een recentere versie van ${APPLICATION_NAME} geïnstalleerd! Installeren van een oudere versie wordt niet aangeraden. Als u echt de oudere versie wilt installeren, adviseren we de huidige versie eerst te verwijderen. Kies de actie die u wilt uitvoeren en druk op Verder om door te gaan."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is al geïnstalleerd.\nKies de actie die u wilt uitvoeren en druk op Verder om door te gaan."
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "De-installeer ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "De-installeer ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Kies de uit te voeren onderhoudsoptie."
StrCpy $SEC_APPLICATION_DETAILS "Installeren ${APPLICATION_NAME} basis."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Statuspictogrammen voor Windows Verkenner"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installeren statuspictogrammen voor Windows Verkenner"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Startmenu snelkoppeling"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Toevoegen snelkoppeling voor ${APPLICATION_NAME} aan het Startmenu."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Werkblad snelkoppeling"
@@ -27,7 +29,7 @@ StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Werkblad snelkoppeling voor ${APPLICATIO
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Snelstart snelkoppeling voor ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Verwijder ${APPLICATION_NAME}'s data map van uw computer."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Wilt u de ${APPLICATION_NAME}'s data map verwijderen?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Niet aankruisen om de datamap te bewaren of aankruisen om de datamap te verwijderen."
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Niet aankruisen om de datamap te bewaren, wel aankruisen om de datamap te verwijderen."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Ja, verwijder deze data map."
StrCpy $UNINSTALLER_FILE_Detail "Wegschrijven Uninstaller"
StrCpy $UNINSTALLER_REGISTRY_Detail "Wegschrijven installer Registersleutels"
@@ -35,10 +37,10 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Klaar"
StrCpy $UNINSTALL_MESSAGEBOX "Het lijkt er niet op dat ${APPLICATION_NAME} is geïnstalleerd in de map '$INSTDIR'.$\n$\nToch doorgaan (niet aangeraden)?"
StrCpy $UNINSTALL_ABORT "De-installatie afgebroken door de gebruiker"
StrCpy $INIT_NO_QUICK_LAUNCH "Snelstart snelkoppeling (N/A)"
StrCpy $INIT_NO_DESKTOP "Desktop snelkoppeleng (overschrijft huidige)"
StrCpy $INIT_NO_DESKTOP "Bureaublad snelkoppeling (overschrijft huidige)"
StrCpy $UAC_ERROR_ELEVATE "Kan niet verhogen, fout:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Dit installatieprogramma vereist administrator rechten. Probeer het opnieuw"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Dit installatieprogramma vereist beheerdersrechten. Probeer het opnieuw"
StrCpy $INIT_INSTALLER_RUNNING "De Installer is al gestart."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Deze uninstaller vereist administrator toegang, probeer opnieuw"
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Deze uninstaller vereist Beheerderstoegang, probeer opnieuw"
StrCpy $INIT_UNINSTALLER_RUNNING "De uninstaller is al gestart."
StrCpy $SectionGroup_Shortcuts "Snelkoppelingen"

View File

@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Uninstall ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Uninstall ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Choose the maintenance option to perform."
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Start Menu Program Shortcut"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adding shortcut for ${APPLICATION_NAME} to the Start Menu."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Desktop Shortcut"

View File

@@ -1,5 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Näita väljalaske märkmeid"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Leitud protsess(id) ${processName} mis tuleks peatada. $\nKas soovid, et installer seiskaks need?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "${APPLICATION_EXECUTABLE} protsessi lõpetamine."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Ei leitud protsessi, mida tappa!"
StrCpy $PageReinstall_NEW_Field_1 "Üks vanem versioon ${APPLICATION_NAME} on juba paigaldatud. On soovitav see eemaldada enne uue paigaldamist. Vali tehtav toiming ning kliki Jätka."
StrCpy $PageReinstall_NEW_Field_2 "Eemalda enne paigaldamist"
@@ -33,12 +35,12 @@ StrCpy $UNINSTALLER_FINISHED_Detail "L
StrCpy $UNINSTALL_MESSAGEBOX "Ei leia, et ${APPLICATION_NAME} oleks paigaldatud kataloogi '$INSTDIR'.$\n$\nJätkata sellele vaatamata (pole soovitav)?"
StrCpy $UNINSTALL_ABORT "Desinstallimine on kasutaja poolt katkestatud"
StrCpy $INIT_NO_QUICK_LAUNCH "Kiirvaliku viit (N/A)"
StrCpy $INIT_NO_DESKTOP "Ikoon töölaual (kirjutab olemasoleva üle)"
StrCpy $UAC_ERROR_ELEVATE "Ei suuda ülendada õigusi, viga: "
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "See paigaldaja vajab admini ligipääsu, proovi uuesti"
StrCpy $INIT_INSTALLER_RUNNING "Paigaldaja on juba käimas."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "See desinstallija vajab admini ligipääsu, proovi uuesti"
StrCpy $INIT_UNINSTALLER_RUNNING "See desinstallija on juba käimas"
StrCpy $SectionGroup_Shortcuts "Viidad"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,28 +1,39 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Näytä julkaisutiedot"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Havaittiin sovelluksen ${APPLICATION_EXECUTABLE} prosessi (tai prosesseja) jotka pitäisi pysäyttää.\nHaluatko että asennusohjelma pysäyttää nämä puolestasi?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Pysäytetään sovelluksen ${APPLICATION_EXECUTABLE} prosessit."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Tapettavaa prosessia ei löytynyt!"
StrCpy $PageReinstall_NEW_Field_1 "Vanhempi versio sovelluksesta ${APPLICATION_NAME} on jo asennettu. On suositeltavaa että poistat vanhan asennuksen ensin. Valitse mikä toiminto suoritetaan ja napsauta Seuraava jatkaaksesi."
StrCpy $PageReinstall_NEW_Field_2 "Poista ennen asentamista"
StrCpy $PageReinstall_NEW_Field_3 "Älä poista"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Asennettu jo"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Valitse miten ${APPLICATION_NAME} asennetaan."
StrCpy $PageReinstall_OLD_Field_1 "Uudempi versio sovelluksesta ${APPLICATION_NAME} on jo asennettu! Vanhan version asennus ei ole suositeltavaa. Jos todella haluat asentaa vanhemman version, kannattaa poistaa nykyisen version asennus ensin. Valitse minkä toimenpiteen haluat suorittaa ja paina Seuraava jatkaaksesi."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} on jo asennettu.\nValitse suoritettava toimenpide ja napsauta Seuraava jatkaaksesi."
StrCpy $PageReinstall_SAME_Field_2 "Lisää/uudelleenasenna komponentteja"
StrCpy $PageReinstall_SAME_Field_3 "Poista ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Poista ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Valitse suoritettava huoltotoimenpide."
StrCpy $SEC_APPLICATION_DETAILS "Asennetaan sovelluksen ${APPLICATION_NAME} välttämättömyyksiä."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Tilakuvakkeet Windows Explorerille"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Asennetaan tilakuvakkeet Windows Explorerille"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Käynnistä-valikon pikakuvake"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Lisätään ${APPLICATION_NAME}-pikakuvake Käynnistä-valikkoon."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Työpöydän pikakuvake"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Luodaan työpöydän pikakuvakkeet"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Pikakäynnistyksen pikakuvake"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Luodaan pikakuvaketta pikakäynnistykseen"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} välttämättömyydet."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME}-pikakuvake."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Sovelluksen ${APPLICATION_NAME} työpyötäpikakuvake."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Pikakäynnistyksen pikakuvake sovellukselle ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Poista ${APPLICATION_NAME}-datakansio tietokoneelta."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Haluatko varmasti poistaa ${APPLICATION_NAME}-datakansion?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Jätä valinta ruksimatta säilyttääksesti datakansion myöhempää käyttöä varten tai täytä ruksi jos haluat poistaa datakansion ja siinä olevat tiedostot."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Kyllä, poista tämä datakansio."
StrCpy $UNINSTALLER_REGISTRY_Detail "Kirjoitetaan asennusohjelman rekisteriavaimia"
StrCpy $UNINSTALLER_FINISHED_Detail "Valmis"
StrCpy $UNINSTALL_MESSAGEBOX "Vaikuttaa siltä että sovellus ${APPLICATION_NAME} on asennettu kansioon '$INSTDIR'.\n\nHaluatko jatkaa tästä huolimatta (ei suositeltavaa)?"
StrCpy $UNINSTALL_ABORT "Poistaminen keskeytettiin käyttäjän toimesta"
StrCpy $INIT_NO_DESKTOP "Työpöydän pikakuvake (korvaa nykyinen)"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tämä asennusohjelma vaatii ylläpitäjän oikeudet, yritä uudelleen."
@@ -30,15 +41,6 @@ StrCpy $INIT_INSTALLER_RUNNING "Asennusohjelma on jo k
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tämä poisto-ohjelma vaatii ylläpitäjän oikeudet, yritä uudelleen."
StrCpy $INIT_UNINSTALLER_RUNNING "Poisto-ohjelma on jo käynnissä."
StrCpy $SectionGroup_Shortcuts "Pikakuvakkeet"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $PageReinstall_NEW_Field_1 "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_2 "Add/Reinstall components"
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALLER_FILE_Detail "Writing Uninstaller"
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"

View File

@@ -1,5 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Montrer les notes de version"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Le(s) processus en cours dexécution ${APPLICATION_EXECUTABLE} doit être stoppé afin de poursuivre.$\nVoulez-vous que le programme dinstallation sen charge pour vous ?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Fermeture du processus ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Les processus à stopper n'ont pas été trouvés."
StrCpy $PageReinstall_NEW_Field_1 "Une vieille version de ${APPLICATION_NAME} est installée sur votre système. Il est recommandé que vous désinstalliez cette version avant l'installation. Sélectionnez l'opération que vous voulez exécuter et cliquez sur Suivant pour continuer."
StrCpy $PageReinstall_NEW_Field_2 "Désinstaller avant d'installer à nouveau"
@@ -33,12 +35,12 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Terminé"
StrCpy $UNINSTALL_MESSAGEBOX "Il semble que ${APPLICATION_NAME} ne soit pas installée dans le dossier '$INSTDIR'.$\n$\nVoulez-vous poursuivre (non recommandé) ?"
StrCpy $UNINSTALL_ABORT "Désinstallation interrompue par l'utilisateur"
StrCpy $INIT_NO_QUICK_LAUNCH "Raccourci de lancement rapide (N/A)"
StrCpy $INIT_NO_DESKTOP "Raccourci bureau (remplace lexistant)"
StrCpy $UAC_ERROR_ELEVATE "Echec d'élévation, erreur :"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Cet installateur requiert les droits administrateur, essayez à nouveau"
StrCpy $INIT_INSTALLER_RUNNING "Une installation est déjà en cours."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Ce désinstallateur requiert les droits administrateur, essayez à nouveau"
StrCpy $INIT_UNINSTALLER_RUNNING "Une désinstallation est déjà en cours."
StrCpy $SectionGroup_Shortcuts "Raccourcis"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolla a opción de mantemento a realizar."
StrCpy $SEC_APPLICATION_DETAILS "Instalando ${APPLICATION_NAME} esenciais."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Iconas de estado para Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instalando as iconas de estado para Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Acceso directo ao programa no menú de inicio"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Engadindo o acceso directo ao ${APPLICATION_NAME} no menú de inicio"
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Acceso directo no escritorio"

View File

@@ -1,6 +1,6 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Release-Informationen anzeigen"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "${APPLICATION_EXECUTABLE} gefundene Prozess(e), die gestoppt werden müssen.$\nWollen Sie, dass der Installer diese nun für Sie stoppt?"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "${APPLICATION_EXECUTABLE} Prozess(e) gefunden, die gestoppt werden müssen.$\nWollen Sie, dass der Installer diese nun für Sie stoppt?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Stoppe ${APPLICATION_EXECUTABLE} Prozess(e)."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Prozess zum Beenden nicht gefunden!"
StrCpy $PageReinstall_NEW_Field_1 "Eine ältere Version von ${APPLICATION_NAME} ist auf Ihrem System installiert. Es wird empfohlen, diese Version zunächst zu entfernen. Wählen Sie unter folgenden Vorgehenweisen und wählen Sie $\"Weiter$\"."
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} entfernen"
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} entfernen"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Wählen Sie zur Ausführung die Wartungsoption."
StrCpy $SEC_APPLICATION_DETAILS "Installiere ${APPLICATION_NAME} Basis."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status-Icons für den Windows-Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installiere Status-Icons für den Windows-Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Installiere Verknüpfung im Programmmenü"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Füge Verknüpfung für ${APPLICATION_NAME} dem Startmenü hinzu."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Desktop-Verknüpfung"

View File

@@ -1,13 +1,15 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Εμφάνιση σημειώσεων έκδοσης"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Βρέθηκε η(οι) διεργασία(ες) ${APPLICATION_EXECUTABLE} η(οι) οποία(ες) θα πρέπει να τερματιστεί(ούν).$\nΘα θέλατε να την(τις) τερματίσει ο βοηθός εγκατάστασης για εσάς;"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Τερματισμός διεργασιών ${APPLICATION_EXECUTABLE}."
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_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_OLD_Field_1 "Μια νεώτερη έκδοση της ${APPLICATION_NAME} είναι ήδη εγκατεστημένη! Δεν συνίσταται να εγκαταστείσετε μια παλαιότερη έκδοση. Εάν θέλετε πραγματικά να εγκαταστήσετε αυτή την παλαιότερη έκδοση, είναι καλύτερο να απεγκαταστήσετε την τρέχουσα έκδοση πρώτα. Επιλέξτε τη διαδικασία που επιθυμείτε να πραγματοποιείσετε και επιλέξτε Επόμενο για να συνεχίσετε."
StrCpy $PageReinstall_SAME_Field_1 "Η ${APPLICATION_NAME} ${VERSION} είναι ήδη εγκατεστημένη.\n\nΕπιλέξτε τη διαδικασία που επιθυμείτε να πραγματοποιείσετε και επιλέξτε Επόμενο για να συνεχίσετε."
StrCpy $PageReinstall_OLD_Field_1 "Μια νεώτερη έκδοση της ${APPLICATION_NAME} είναι ήδη εγκατεστημένη! Δεν συνίσταται να εγκαταστείσετε μια παλαιότερη έκδοση. Εάν θέλετε πραγματικά να εγκαταστήσετε αυτήν την παλαιότερη έκδοση, είναι καλύτερο να απεγκαταστήσετε την τρέχουσα έκδοση πρώτα. Επιλέξτε τη διαδικασία που επιθυμείτε να εκτελέσετε και επιλέξτε Επόμενο για να συνεχίσετε."
StrCpy $PageReinstall_SAME_Field_1 "Η ${APPLICATION_NAME} ${VERSION} είναι ήδη εγκατεστημένη.\n\nΕπιλέξτε τη διαδικασία που επιθυμείτε να εκτελέσετε και επιλέξτε Επόμενο για να συνεχίσετε."
StrCpy $PageReinstall_SAME_Field_2 "Προσθήκη/ Επανεγκατάσταση συνιστωσών"
StrCpy $PageReinstall_SAME_Field_3 "Απεγκατάσταση ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Απεγκατάσταση ${APPLICATION_NAME}"
@@ -21,24 +23,24 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Δημιουργία Συντόμευσης Ταχείας Εκκίνησης"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "Βάση ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Συντόμευση ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Συντόμευση στην επιφάνεια εργασίας της "
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Συντόμευση Ταχείας Εκκίνησης της "
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Αφαίρεση του φακέλου δεδομένων της ${APPLICATION_NAME} από τον υπολογιστή σας"
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Συντόμευση επιφάνειας εργασίας της ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Συντόμευση Ταχείας Εκκίνησης της ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Αφαίρεση του φακέλου δεδομένων της ${APPLICATION_NAME} από τον υπολογιστή σας."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Θέλετε να αφαιρέσετε τον φάκελο δεδομένων της ${APPLICATION_NAME};"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Αφήστε κενό για να διατηρήσετε τον φάκελο δεδομένων για μελλοντική χρήση ή επιλέξτε για να διγράψετε το φάκελο δεδομένων."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Να διαγραφεί ο φάκελος δεδομένων."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Ναι, διαγραφή αυτού του φακέλου δεδομένων."
StrCpy $UNINSTALLER_FILE_Detail "Εγγραφή Εφαρμογής Απεγκατάστασης"
StrCpy $UNINSTALLER_REGISTRY_Detail "Εγγραφή Κλειδιών μητρώου (Registry) της Εφαρμογής Εγκατάστασης"
StrCpy $UNINSTALLER_FINISHED_Detail "Ολοκλήρωση"
StrCpy $UNINSTALL_MESSAGEBOX "Φαίνεται πως η ${APPLICATION_NAME} είναι εγκατεστημένη στον κατάλογο '$INSTDIR'.$\n$\nΣυνέχιση παρ' όλα αυτά (δεν συνίσταται);"
StrCpy $UNINSTALLER_FINISHED_Detail "Ολοκληρώθηκε"
StrCpy $UNINSTALL_MESSAGEBOX "Δεν φαίνεται να είναι εγκατεστημένηη η ${APPLICATION_NAME} στον κατάλογο '$INSTDIR'.$\n$\nΣυνέχιση παρ' όλα αυτά (δεν συνίσταται);"
StrCpy $UNINSTALL_ABORT "Η απεγκατάσταση ματαιώθηκε από το χρήστη"
StrCpy $INIT_NO_QUICK_LAUNCH "Συντόμευση Ταχείας Εκκίνησης (Μ/Δ)"
StrCpy $INIT_NO_DESKTOP "Συντόμευση Επιφάνειας Εργασίας (αντικαθιστά υπάρχουσα)"
StrCpy $UAC_ERROR_ELEVATE "Αδυναμία ανύψωσης, σφάλμα:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Αυτή η εφαρμογή εγκατάστασης απαιτεί πρόσβαση διαχειριστή, δοκιμάστε ξανά"
StrCpy $INIT_INSTALLER_RUNNING "Η εφαρμογή εγκατάστασης λειτουργεί ήδη."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Αυτή η εφαρμογή απεγκατάστασης απαιτεί πρόσβαση διαχειριστή, δοκιμάστε ξανά"
StrCpy $INIT_UNINSTALLER_RUNNING "Η εφαρμογή απεγκατάστασης λειτουργεί ήδη."
StrCpy $SectionGroup_Shortcuts "Συντομεύσεις"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,21 +1,31 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Kiadási jegyzetek megtekintése"
StrCpy $PageReinstall_NEW_Field_2 "Eltávolítás telepítés előtt"
StrCpy $PageReinstall_NEW_Field_3 "Ne távolítsa el"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Már telepítve"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Válaszd ki, hogy szeretnéd telepíteni a következő alkalmazást ${APPLICATION_NAME}."
StrCpy $PageReinstall_SAME_Field_2 "Komponens hozzáadása/újratelepítése"
StrCpy $PageReinstall_SAME_Field_3 "Eltávolitani ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Eltávolitani ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} eltávolítása"
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} eltávolítása"
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Igen, törölje ezt az adatkönyvtárat."
StrCpy $UNINSTALLER_FINISHED_Detail "Befejezve"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Show release notes"
StrCpy $UNINSTALL_ABORT "Az eltávolítást egy felhasználó megszakította"
StrCpy $INIT_NO_QUICK_LAUNCH "Gyorsindító Hivatkozás (N/A)"
StrCpy $INIT_NO_DESKTOP "Asztali Hivatkozás (felülírja a meglévőt)"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "A telepítő futtatásához adminisztrátori hozzáférés szükséges, próbáld újra."
StrCpy $INIT_INSTALLER_RUNNING "A telepítő már fut."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Az eltávolító futtatásához adminisztrátori hozzáférés szükséges, próbáld újra."
StrCpy $INIT_UNINSTALLER_RUNNING "Az eltávolító már fut."
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Process to kill not found!"
StrCpy $PageReinstall_NEW_Field_1 "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_NEW_Field_2 "Uninstall before installing"
StrCpy $PageReinstall_NEW_Field_3 "Do not uninstall"
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Choose the maintenance option to perform."
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Start Menu Program Shortcut"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adding shortcut for ${APPLICATION_NAME} to the Start Menu."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Desktop Shortcut"
@@ -29,16 +39,8 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Quick Launch shortcut for ${APPLICA
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Remove ${APPLICATION_NAME}'s data folder from your computer."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Do you want to delete ${APPLICATION_NAME}'s data folder?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Yes, delete this data folder."
StrCpy $UNINSTALLER_FILE_Detail "Writing Uninstaller"
StrCpy $UNINSTALLER_REGISTRY_Detail "Writing Installer Registry Keys"
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $UNINSTALL_ABORT "Uninstall aborted by user"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "This installer requires admin access, try again"
StrCpy $INIT_INSTALLER_RUNNING "The installer is already running."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "This uninstaller requires admin access, try again"
StrCpy $INIT_UNINSTALLER_RUNNING "The uninstaller is already running."
StrCpy $SectionGroup_Shortcuts "Shortcuts"

View File

@@ -1,7 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostra le note di rilascio"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Trovati i processi ${APPLICATION_EXECUTABLE} che dovrebbero essere fermati.$\nVuoi che il programma di installazione li fermi per te?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Sto terminando i processi ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Trovati ${APPLICATION_EXECUTABLE} processi che dovrebbero essere fermati.$\nVuoi che il programma di installazione li fermi al posto tuo?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Sto terminando ${APPLICATION_EXECUTABLE} processi."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Il processo da terminare non è stato trovato!"
StrCpy $PageReinstall_NEW_Field_1 "Una versione più datata di ${APPLICATION_NAME} è installata sul tuo sistema. Si consiglia di disinstallare la versione attuale prima di installare. Seleziona l'operazione da eseguire e fai clic su Avanti per continuare."
StrCpy $PageReinstall_NEW_Field_2 "Disinstalla prima di installare"
@@ -14,9 +14,11 @@ StrCpy $PageReinstall_SAME_Field_2 "Aggiungi/Reinstalla i componenti"
StrCpy $PageReinstall_SAME_Field_3 "Disinstalla ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Disinstalla ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Scegli l'opzione di manutenzione da eseguire."
StrCpy $SEC_APPLICATION_DETAILS "Installazione degli elementi fondamentali di${APPLICATION_NAME}"
StrCpy $SEC_APPLICATION_DETAILS "Installazione degli elementi fondamentali di ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Icone di stato per Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installazione delle icone di stato per Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Scorciatoia di programma menu Start"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Aggiunta della scorciatoia per ${APPLICATION_NAME} al menu Start"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Aggiunta della scorciatoia per ${APPLICATION_NAME} al menu Start."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Scorciatoia del desktop"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creazione delle scorciatoie del desktop"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Scorciatoia dell'avvio veloce"
@@ -35,7 +37,7 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Completato"
StrCpy $UNINSTALL_MESSAGEBOX "Non sembra che ${APPLICATION_NAME} sia installato nella cartella '$INSTDIR'.$\nVuoi continuare comunque (non consigliato)?"
StrCpy $UNINSTALL_ABORT "Disinstallazione interrotta dall'utente"
StrCpy $INIT_NO_QUICK_LAUNCH "Scorciatoia dell'avvio veloce (N/D)"
StrCpy $INIT_NO_DESKTOP "Scorciatoia sul desktop (sovrascrivi se esistente)"
StrCpy $INIT_NO_DESKTOP "Scorciatoia del desktop (sovrascrivi se esistente)"
StrCpy $UAC_ERROR_ELEVATE "Impossibile elevare, errore:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Il programma di installazione necessita delle credenziali di amministrazione, riprova"
StrCpy $INIT_INSTALLER_RUNNING "Il programma di installazione è già in esecuzione."

View File

@@ -8,13 +8,15 @@ StrCpy $PageReinstall_NEW_Field_2 "
StrCpy $PageReinstall_NEW_Field_3 "アンインストールしない"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "インストール済"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "${APPLICATION_NAME} のインストール方法を選択する"
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} の最新バージョンがにインストールされています。\n旧バージョンのインストールはお勧めしません。旧バージョンのインストールが本当に必要な場合は、まず最新バージョンをアンインストールしてから、旧バージョンをインストールしてください。\nオペレーションを選択し、次へをクリックする。"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} はにインストールされています。\n実行するオペレーションを選択し、次へをクリックする"
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} の最新バージョンがすでにインストールされています。\n旧バージョンのインストールはお勧めしません。旧バージョンのインストールが本当に必要な場合は、まず最新バージョンをアンインストールしてから、旧バージョンをインストールしてください。\nオペレーションを選択し、次へをクリックする。"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} はすでにインストールされています。\n実行するオペレーションを選択し、次へをクリックする"
StrCpy $PageReinstall_SAME_Field_2 "追加/再インストールコンポーネント"
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} をアンインストール"
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} をアンインストール"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "実行するには、メンテナンスオプションを選択してください。"
StrCpy $SEC_APPLICATION_DETAILS "${APPLICATION_NAME} の重要なパッケージをインストール中"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Windowsエクスプローラの状態アイコン"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Windowsエクスプローラの状態アイコンをインストール中"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "スタートメニューショートカット"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "スタートメニューに${APPLICATION_NAME} のショートカットの追加"
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "デスクトップショートカット"
@@ -35,10 +37,10 @@ StrCpy $UNINSTALLER_FINISHED_Detail "
StrCpy $UNINSTALL_MESSAGEBOX "${APPLICATION_NAME} は'$INSTDIR'.$$  ディレクトリにインストールされていません。エラーを無視し、進みますか (非推奨)"
StrCpy $UNINSTALL_ABORT "アンインストールは、ユーザーによって中止されました。"
StrCpy $INIT_NO_QUICK_LAUNCH "クイック起動ショートカット(N/A)"
StrCpy $INIT_NO_DESKTOP "デスクトップショートカット作成(にある場合は上書き)"
StrCpy $INIT_NO_DESKTOP "デスクトップショートカット作成(すでにある場合は上書き)"
StrCpy $UAC_ERROR_ELEVATE "エスカレーション不可です、エラー:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "このインストーラーは、管理者権限が必要です。インストールを再試行してください。"
StrCpy $INIT_INSTALLER_RUNNING "インストーラーは、に起動しています。"
StrCpy $INIT_INSTALLER_RUNNING "インストーラーは、すでに起動しています。"
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "このアンインストーラーは、管理者権限が必要です。アンインストールを再試行してください。"
StrCpy $INIT_UNINSTALLER_RUNNING "アンインストーラーは、に起動しています。"
StrCpy $INIT_UNINSTALLER_RUNNING "アンインストーラーは、すでに起動しています。"
StrCpy $SectionGroup_Shortcuts "ショートカット"

View File

@@ -1,44 +1,46 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Pokaż informacje o wydaniu"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Proces ${APPLICATION_EXECUTABLE} musi zostać zatrzymany $\nCzy chcesz aby instalator zatrzymał je dla ciebie?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Zamykam proces ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Nie znaleziono procesu!"
StrCpy $PageReinstall_NEW_Field_1 "W Twoim systemie jest zainstalowana starsza wersja ${APPLICATION_NAME}. Zalecane jest jej usunięcie przed dalszą instalacją. Wybierz operację którą chcesz wykonać i naciśnij przycisk Dalej."
StrCpy $PageReinstall_NEW_Field_2 "Odinstaluj przed instalacja"
StrCpy $PageReinstall_NEW_Field_3 "Nie usuwaj "
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Już zainstalowane"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Wybierz jak chcesz zainstalować ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Zainstalowana jest nowsza wersja ${APPLICATION_NAME}! Niezalecane jest instalowanie starszej wersji. Jeśli naprawdę chcesz zainstalować starszą wersję lepiej najpierw odinstalować obecną aplikację. Wybierz operację którą chcesz wykonać i naciśnij przycisk Dalej."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} jest już zainstalowany.\nWybierz operację którą chcesz wykonać i naciśnij przycisk Dalej."
StrCpy $PageReinstall_SAME_Field_2 "Doda/Przeinstaluj komponenty"
StrCpy $PageReinstall_SAME_Field_3 "Odinstaluj ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Odinstaluj ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Wybierz sposób utrzymywania."
StrCpy $SEC_APPLICATION_DETAILS "Instaluje niezbędne pliki ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Skrót w Menu Start"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Dodaję skrót ${APPLICATION_NAME} w Menu Start."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Skrót na Pulpicie"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Utworzy skrót na Pulpicie"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Skrót na Pasku Zadań"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Tworzę skrót na Pasku Zadań"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "Niezbędne pliki ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Skrót ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Skrót ${APPLICATION_NAME} na pulpicie."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Skrót ${APPLICATION_NAME} na Pasku Zadań."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Usuń folder z danymi ${APPLICATION_NAME} z komputera."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Czy chcesz usunąć folder z danymi ${APPLICATION_NAME}?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Zostaw niezaznaczone aby zachować folder z danymi lub zaznacz aby go usunąć."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Tak, usuń folder z danymi."
StrCpy $UNINSTALLER_FILE_Detail "Tworzę dezinstalator"
StrCpy $UNINSTALLER_REGISTRY_Detail "Tworzę wpisy w rejestrze"
StrCpy $UNINSTALLER_FINISHED_Detail "Zakończony"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Show release notes"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Process to kill not found!"
StrCpy $PageReinstall_NEW_Field_1 "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Choose how you want to install ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Choose the maintenance option to perform."
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Start Menu Program Shortcut"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adding shortcut for ${APPLICATION_NAME} to the Start Menu."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Creating Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME} shortcut."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Desktop shortcut for ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Quick Launch shortcut for ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Remove ${APPLICATION_NAME}'s data folder from your computer."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Do you want to delete ${APPLICATION_NAME}'s data folder?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Yes, delete this data folder."
StrCpy $UNINSTALLER_FILE_Detail "Writing Uninstaller"
StrCpy $UNINSTALLER_REGISTRY_Detail "Writing Installer Registry Keys"
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $UNINSTALL_ABORT "Uninstall aborted by user"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "This installer requires admin access, try again"
StrCpy $INIT_INSTALLER_RUNNING "The installer is already running."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "This uninstaller requires admin access, try again"
StrCpy $INIT_UNINSTALLER_RUNNING "The uninstaller is already running."
StrCpy $SectionGroup_Shortcuts "Shortcuts"
StrCpy $UNINSTALL_MESSAGEBOX "Nie wygląda na to że ${APPLICATION_NAME} jest zainstalowane w katalogu '$INSTDIR'.$$ Kontynuować mimo tego (nie zalecane)?"
StrCpy $UNINSTALL_ABORT "Dezinstalacja przerwana przez użytkownika"
StrCpy $INIT_NO_QUICK_LAUNCH "Skrót na Pasku Zadań (NIE DOTYCZY)"
StrCpy $INIT_NO_DESKTOP "Skróty na pulpicie (nadpisuje obecne)"
StrCpy $UAC_ERROR_ELEVATE "Niemożność podniesienia, błąd:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Ten instalator potrzebuje uprawnień administratora, spróbuj ponownie"
StrCpy $INIT_INSTALLER_RUNNING "Instalator już jest uruchomiony."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Ten dezinstalator potrzebuje uprawnień administratora, spróbuj ponownie"
StrCpy $INIT_UNINSTALLER_RUNNING "Dezinstalator już jest uruchomiony."
StrCpy $SectionGroup_Shortcuts "Skróty"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,11 +1,11 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar notas de lançamento"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Encontrados ${APPLICATION_EXECUTABLE} processos que precisam de ser parados.$\nDeseja que o instalador os pare ?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar ${APPLICATION_EXECUTABLE} processos."
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Encontrados processos ${APPLICATION_EXECUTABLE} que precisam de ser parados.$\nDeseja que o instalador os pare ?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar processos ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Processo para terminar não foi encontrado!"
StrCpy $PageReinstall_NEW_Field_1 "Está instalada uma versão anterior de ${APPLICATION_NAME} no seu sistema. Recomenda-se que desinstale primeiro a versão atual antes de instalar. Selecione a operação que pretende fazer, e clique Seguinte para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "Não instalar"
StrCpy $PageReinstall_NEW_Field_3 "Não desinstalar"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Já instalado"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Escolha como pretende instalar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Já esta instalada uma nova versão dfe ${APPLICATION_NAME}! Não se recomenda instalar uma versão anterior. Se quer mesmo instalar esta versão mais antiga, é melhor desinstalar primeiro a versão atual. Selecione a operação que pretende fazer e clique Seguinte para continuar."
@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolha a opção de manutenção a fazer."
StrCpy $SEC_APPLICATION_DETAILS "A instalar o essencial de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Icons de estado para Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "A instalar icons de estado para Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Atalho do progama no Menu Inicial"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "A adicionar o atalho de ${APPLICATION_NAME} ao Menu Inicial."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Atalho da área de trabalho"
@@ -26,18 +28,18 @@ StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Atalho de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Atalho no ambiente de trabalho de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Atalho de início rápido de ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Remover a pasta de dados de ${APPLICATION_NAME} do seu computador."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Deseja apagar a pasta de dados de ${APPLICATION_NAME}?"
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Deseja remover a pasta de dados de ${APPLICATION_NAME}?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Não assinale para manter a pasta de dados para uso mais tarde, ou assinale para apagar a pasta de dados."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Sim, apagar esta pasta de dados."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Sim, remover esta pasta."
StrCpy $UNINSTALLER_FILE_Detail "A escrever o Desinstalador"
StrCpy $UNINSTALLER_REGISTRY_Detail "A escrever chaves de registo do instalador"
StrCpy $UNINSTALLER_FINISHED_Detail "Acabou"
StrCpy $UNINSTALLER_FINISHED_Detail "Terminado"
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que ${APPLICATION_NAME} esteja instalado no diretório '$INSTDIR'.$\n$\nContinuar na mesma (não recomendado)?"
StrCpy $UNINSTALL_ABORT "Desinstalação abortada pelo utilizador"
StrCpy $UNINSTALL_ABORT "Desinstalação cancelada pelo utilizador"
StrCpy $INIT_NO_QUICK_LAUNCH "Atalho de Início Rápido (N/A)"
StrCpy $INIT_NO_DESKTOP "Atalho do Ambiente de Trabalho (sobrepõe o existente)"
StrCpy $UAC_ERROR_ELEVATE "Incapaz de elevar, erro:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador precisa de acessos de administrador; tente novamente"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador precisa de permissões de administrador, tente novamente"
StrCpy $INIT_INSTALLER_RUNNING "O instalador já está a correr."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Este desinstalador precisa de acesso de administrador; tente novamente"
StrCpy $INIT_UNINSTALLER_RUNNING "O desinstalador já está a correr."

View File

@@ -6,7 +6,7 @@ StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Processo para eliminar n
StrCpy $PageReinstall_NEW_Field_1 "Uma versão mais antiga de ${APPLICATION_NAME} está instalado em seu sistema. É recomendado que você desinstale a versão atual antes de instalar. Selecione a operação que deseja executar e clique em Avançar para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "Não desinstale"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "instalado"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Instalado"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Escolha como você deseja instalar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "A versão mais recente do ${APPLICATION_NAME} já está instalado! Não é recomendado que você instale uma versão mais antiga. Se você realmente deseja instalar esta versão mais antiga, é melhor desinstalar a versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${version} já está instalado. \nSelecione a operação que deseja executar e clique em Avançar para continuar."
@@ -15,8 +15,10 @@ StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Escolha a opção de realizar manutenção."
StrCpy $SEC_APPLICATION_DETAILS "Instalando ${APPLICATION_NAME} fundamentos."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Ícones de status para Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instalando os ícones de status para o Windows Explorer"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Menu Iniciar Programa Atalho"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adicionando atalho para ${APPLICATION_NAME} para o Menu Iniciar."
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Adicionando atalho para ${APPLICATION_NAME} ao Menu Iniciar."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Atalho Desktop"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Criando Atalhos de Desktop"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Atalho Rápido"
@@ -29,13 +31,13 @@ StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Remover ${APPLICATION_NAME} pasta de dado
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Você quer apagar ${APPLICATION_NAME} 's pasta de dados?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Deixe desmarcada para manter a pasta de dados para uso posterior ou cheque para excluir a pasta de dados."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Sim, excluir essa pasta de dados."
StrCpy $UNINSTALLER_FILE_Detail "Escrevendo Desinstalador"
StrCpy $UNINSTALLER_REGISTRY_Detail "Escrevendo Chaves de Registro do Inslalador"
StrCpy $UNINSTALLER_FILE_Detail "Gravando Desinstalador"
StrCpy $UNINSTALLER_REGISTRY_Detail "Gravando Chaves de Registro do Inslalador"
StrCpy $UNINSTALLER_FINISHED_Detail "Finalizado"
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que ${APPLICATION_NAME} está instalado no diretório '$INSTDIR'.$\n$\nContinuar assim mesmo (não recomendado)?"
StrCpy $UNINSTALL_ABORT "Desinstalação abortada pelo usuário"
StrCpy $INIT_NO_QUICK_LAUNCH "Atalho de Inicialização Rápida (N/A)"
StrCpy $INIT_NO_DESKTOP "Atalho Desktop (substituições existente)"
StrCpy $INIT_NO_DESKTOP "Atalho Desktop (substitui os existente)"
StrCpy $UAC_ERROR_ELEVATE "Incapaz de elevar, erro:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este programa de instalação requer acesso de administrador, tente novamente"
StrCpy $INIT_INSTALLER_RUNNING "O instalador já está em execução."

View File

@@ -1,5 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Показать примечания к выпуску"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Обнаружены процес(сы) ${APPLICATION_EXECUTABLE}, которые должны быть остановлены.$\nХотите программа установки сделает это самостоятельно?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Завершение процессов ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Не найдены процессы, которые нужно завершить!"
StrCpy $PageReinstall_NEW_Field_1 "Обнаружена более старая версия ${APPLICATION_NAME}. Рекомендуется удалить её перед установкой. Выберите желаемое действие и нажмите $\"Далее$\"."
StrCpy $PageReinstall_NEW_Field_2 "Удалить перед установкой"
@@ -33,12 +35,12 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Завершено"
StrCpy $UNINSTALL_MESSAGEBOX "Скорее всего, приложение ${APPLICATION_NAME} уже установлено в директорию '$INSTDIR'.\nВсе равно продолжить (не рекомендуется)?"
StrCpy $UNINSTALL_ABORT "Удаление отменено пользователем"
StrCpy $INIT_NO_QUICK_LAUNCH "Ярлык быстрого запуска (недоступен)"
StrCpy $INIT_NO_DESKTOP "Ярлык на рабочем столе (перезаписать существующий)"
StrCpy $UAC_ERROR_ELEVATE "Невозможно поднять, ошибка:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Для установки необходимы права администратора, попробуйте ещё раз."
StrCpy $INIT_INSTALLER_RUNNING "Установщик уже запущен."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Этот деинсталятор требует права администратора, попытайтесь ещё"
StrCpy $INIT_UNINSTALLER_RUNNING "Программа удаления уже выполняется."
StrCpy $SectionGroup_Shortcuts "Ярлыки"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -0,0 +1,46 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "查看版本日志"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "有 ${APPLICATION_EXECUTABLE} 项进程需要关闭。$\n您想让安装程序关闭这些进程吗"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "杀死${APPLICATION_EXECUTABLE}进程。"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "未找到要杀死的进程!"
StrCpy $PageReinstall_NEW_Field_1 "您的系统已经安装${APPLICATION_NAME}较老版本。建议安装前卸载当前版本。选择将要执行的操作,点击下一步继续。"
StrCpy $PageReinstall_NEW_Field_2 "在安装前先卸载"
StrCpy $PageReinstall_NEW_Field_3 "不要卸载"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "已经安装"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "选择如何安装${APPLICATION_NAME}。"
StrCpy $PageReinstall_OLD_Field_1 "较新版本的 ${APPLICATION_NAME} 已经安装!安装较旧版本的程序是不推荐的。如果您希望继续安装较旧版本,建议先卸载较新版本。选择您想要执行的操作并点击下一步以继续。"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} 已经安装。\n请选择想要执行的操作并点击下一步。"
StrCpy $PageReinstall_SAME_Field_2 "增加/重装组件"
StrCpy $PageReinstall_SAME_Field_3 "卸载${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "卸载${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "选择需要执行的维护选项。"
StrCpy $SEC_APPLICATION_DETAILS "安装${APPLICATION_NAME}基本组件。"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "开始菜单程序快捷方式"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "添加 ${APPLICATION_NAME} 快捷方式到开始菜单。"
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "桌面快捷方式"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "创建桌面快捷方式"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "快速启动栏快捷方式"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "创建快速启动栏快捷方式"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME}基本组件。"
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME}快捷方式。"
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "${APPLICATION_NAME}桌面快捷方式。"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "${APPLICATION_NAME}快速启动栏快捷方式。"
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "从电脑中移除 ${APPLICATION_NAME} 数据文件夹。"
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "移除 ${APPLICATION_NAME} 数据文件夹?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "选择以删除数据文件夹,不选择以保留数据文件夹内容供后续使用。"
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "删除数据文件。"
StrCpy $UNINSTALLER_FILE_Detail "覆盖卸载器"
StrCpy $UNINSTALLER_REGISTRY_Detail "正在写入注册表"
StrCpy $UNINSTALLER_FINISHED_Detail "完成"
StrCpy $UNINSTALL_MESSAGEBOX "${APPLICATION_NAME} 可能并没有安装在 $INSTDIR。$\n$\n仍然继续吗(不推荐)"
StrCpy $UNINSTALL_ABORT "用户取消了卸载"
StrCpy $INIT_NO_QUICK_LAUNCH "快速启动栏快捷方式(N/A)"
StrCpy $INIT_NO_DESKTOP "桌面快捷方式(覆盖)"
StrCpy $UAC_ERROR_ELEVATE "无法获得权限,错误:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "安装程序需要管理员权限,请重试"
StrCpy $INIT_INSTALLER_RUNNING "安装程序已经运行。"
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "卸载程序需要管理员权限,请重试"
StrCpy $INIT_UNINSTALLER_RUNNING "卸载程序已经运行。"
StrCpy $SectionGroup_Shortcuts "快捷方式"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,7 +1,9 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Zobrazi<EFBFBD> zoznam zmien"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Našli sa ${APPLICATION_EXECUTABLE} proces (y), ktoré je potrebné zastavi<76>.$\nChcete, aby ich inštalátor zastavil?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Ukonèujem ${APPLICATION_EXECUTABLE} procesy."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Proces ukonèenia nebol nájdený!"
StrCpy $PageReinstall_NEW_Field_1 "Staršia verzia ${APPLICATION_NAME} je nainštalovaná vo vašom systéme. Odporúèam vám odinštalova<76> aktuálnu verziu pred inštaláciou. Vyberte operáciu, ktorú chcete vykona<6E>, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
StrCpy $PageReinstall_NEW_Field_1 "Staršia verzia ${APPLICATION_NAME} je nainštalovaná vo vašom poèítaèi. Odporúèam vám odinštalova<76> aktuálnu verziu pred inštaláciou. Vyberte operáciu, ktorú chcete vykona<6E>, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
StrCpy $PageReinstall_NEW_Field_2 "Odinštalova<EFBFBD> pred inštaláciou"
StrCpy $PageReinstall_NEW_Field_3 "Neodinštalova<EFBFBD>"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Už je nainštalovaný"
@@ -33,12 +35,12 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Dokon
StrCpy $UNINSTALL_MESSAGEBOX "Nezdá sa, že ${APPLICATION_NAME} je nainštalovaný v prieèinku '$INSTDIR'.$\n$\nNapriek tomu pokraèova<76> (neodporúèa sa)?"
StrCpy $UNINSTALL_ABORT "Odinštalácia prerušená používate¾om"
StrCpy $INIT_NO_QUICK_LAUNCH "Zástupca na paneli úloh (N/A)"
StrCpy $INIT_NO_DESKTOP "Zástupca na ploche (prepíše existujúci)"
StrCpy $UAC_ERROR_ELEVATE "Nemožno povýši<C5A1>, chyba:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tento inštalátor vyžaduje admin prístup, skúste to znova"
StrCpy $INIT_INSTALLER_RUNNING "Inštalátor je už spustený."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tento odinštalátor vyžaduje admin prístup, skúste to znova"
StrCpy $INIT_UNINSTALLER_RUNNING "Odinštalátor je už spustený."
StrCpy $SectionGroup_Shortcuts "Zástupcovia"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -1,5 +1,7 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Pokaži opombe k objavi"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Zaznana so dejavna opravila programa ${APPLICATION_EXECUTABLE}, ki pa morajo biti pred nadaljevanjem zaustavljena.$\nAli želite izvajanje teh dejanj končati?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Poteka zaustavljanje opravil programa ${APPLICATION_EXECUTABLE}"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Opravila, določenega za uničenje, ni mogoče najti!"
StrCpy $PageReinstall_NEW_Field_1 "Nameščena je starejša različica ${APPLICATION_NAME}. Priporočljivo je najprej odstraniti obstoječo namestitev in šele nato namestiti novo. Izberite ustrezno možnost in kliknite za nadaljevanje."
StrCpy $PageReinstall_NEW_Field_2 "Pred namestitvijo je treba obstoječo različico odstraniti"
@@ -33,12 +35,12 @@ StrCpy $UNINSTALLER_FINISHED_Detail "Kon
StrCpy $UNINSTALL_MESSAGEBOX "Ni videti, da bi bil program ${APPLICATION_NAME} nameščen v mapi '$INSTDIR'.$\n$\nAli želite vseeno nadaljevati (ni priporočeno)?"
StrCpy $UNINSTALL_ABORT "Odstranjevanje namestitve je bilo prekinjeno s strani uporabnika"
StrCpy $INIT_NO_QUICK_LAUNCH "Bližnjica za hiter dostop (N/A)"
StrCpy $INIT_NO_DESKTOP "Bližnjica namizja (obstajajo predmeti za prepis)"
StrCpy $UAC_ERROR_ELEVATE "Ni mogoče dvigniti; napaka:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Namestilnik zahteva skrbniška dovoljenja."
StrCpy $INIT_INSTALLER_RUNNING "Namestilnik je že zagnan."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Program za odstranjevanje namestitve zahteva skrbniška dovoljenja."
StrCpy $INIT_UNINSTALLER_RUNNING "Program za odstranjevanje namestitve je že zagnan."
StrCpy $SectionGroup_Shortcuts "Bližnjice"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $INIT_NO_DESKTOP "Desktop Shortcut (overwrites existing)"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -15,6 +15,8 @@ StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Desinstalar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Elija la opcion de mantenimiento a realizar."
StrCpy $SEC_APPLICATION_DETAILS "Instalando ${APPLICATION_NAME} esenciales."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Íconos de estado para el Explorador de Windows"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Instalando íconos de estado para el Explorador de Windows"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Acceso Directo al Programa Menú de Inicio"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Añadiendo accesos directos para ${APPLICATION_NAME} en el Menú de Inicio."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Acceso directo de Escritorio"

View File

@@ -0,0 +1,46 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar notas de la versión"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Parando el proceso ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Proceso a detener no encontrado!"
StrCpy $PageReinstall_NEW_Field_1 "Una versión anterior de ${APPLICATION_NAME} esta instalada en el sistema. Es recomendado que quite esta versión antes de instalar. Elija la operación a realizar y seleccione Siguiente para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Des-instale antes de Instalar."
StrCpy $PageReinstall_NEW_Field_3 "No des-instalar."
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Actualmente Instalado."
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Elija como desea instalar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Una versión mas reciente de ${APPLICATION_NAME} esta actualmente instalada! No es recomendado que instale una versión antigua. Si realmente desea instalar esta versión obsoleta, es mejor que des-instale la versión actual primero. Seleccione la operación que desea realizar y presione en Siguiente para continuar. "
StrCpy $PageReinstall_SAME_Field_2 "Agregar/Re-Instalar componentes"
StrCpy $PageReinstall_SAME_Field_3 "Des-instalar ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Des-instalar ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Elija la opción de mantenimiento a realizar."
StrCpy $SEC_APPLICATION_DETAILS "Instalar esenciales ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Acceso Directo en Menú de Programas"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Agregando el Acceso Directo al Menú de Inicio para ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Acceso directo en Escritorio"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Creando Accesos Directos en Escritorio"
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Acceso directo de ${APPLICATION_NAME}"
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Acceso Directo al Escritorio para ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Quitar la carpeta de datos ${APPLICATION_NAME} de la computadora."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Desea borrar la carpeta de datos de ${APPLICATION_NAME}?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Dejar des-tildado para mantener la carpeta de datos para posterior uso o tildar para borrar la carpeta de datos."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Si, eliminar esta carpeta de datos."
StrCpy $UNINSTALLER_FILE_Detail "Escribiendo Des-Instalador."
StrCpy $UNINSTALLER_REGISTRY_Detail "Escribiendo claves de Registro del Instalador"
StrCpy $UNINSTALLER_FINISHED_Detail "Terminado"
StrCpy $UNINSTALL_ABORT "Des-instalación abortada por el usuario"
StrCpy $INIT_NO_DESKTOP "Acceso Directo en Escritorio (Sobrescribe existentes)"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Este instalador requiere acceso Administrador, intente de nuevo. "
StrCpy $INIT_INSTALLER_RUNNING "El instalador ya esta corriendo."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Este des-instalador requiere acceso administrador, intente de nuevo"
StrCpy $INIT_UNINSTALLER_RUNNING "El des-instalador ya esta corriendo"
StrCpy $SectionGroup_Shortcuts "Accesos Directos"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.\r\nSelect the operation you want to perform and click Next to continue."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Creating Quick Launch Shortcut"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Quick Launch shortcut for ${APPLICATION_NAME}."
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"

View File

@@ -0,0 +1,46 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Visa versionsinformationen"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Hittade ${APPLICATION_EXECUTABLE} process(er) som behöver stoppas.$\nVill du att installationsprogrammet ska stoppa dessa åt dig?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Dödar ${APPLICATION_EXECUTABLE} processer."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Processen att döda hittades inte!"
StrCpy $PageReinstall_NEW_Field_1 "En tidigare version av ${APPLICATION_NAME} är installerad på ditt system. Det är rekommenderat att du avinstallerar den nuvarande versionen före installation. Välj den åtgärd du vill utföra och klicka Nästa för att fortsätta."
StrCpy $PageReinstall_NEW_Field_2 "Avinstallera före installation"
StrCpy $PageReinstall_NEW_Field_3 "Avinstallera inte"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Redan installerad"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Välj hur du vill installera ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "En nyare version av ${APPLICATION_NAME} är redan installerad! Det rekommenderas inte att du installerar en äldre version. Om du verkligen vill installera denna äldre versionen, är det bättre att du avinstallerar den nuvarande versionen först. Välj den åtgärd du vill utföra och klicka Nästa för att fortsätta."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} är redan installerad.\nVälj den åtgärd du vill utföra och klicka Nästa för att fortsätta."
StrCpy $PageReinstall_SAME_Field_2 "Lägg till/Ominstallera komponenter"
StrCpy $PageReinstall_SAME_Field_3 "Avinstallera ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Avinstallera ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Välj underhålls alternativ att utföra."
StrCpy $SEC_APPLICATION_DETAILS "Installerar ${APPLICATION_NAME} väsentligheter."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Start-meny program genväg"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Lägger till genväg för ${APPLICATION_NAME} till Start-menyn."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Skrivbordsgenväg"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Skapar skrivbordsgenvägar"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Snabbstartsgenväg"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Skapar snabbstartsgenväg"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} väsentligheter."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME} genväg."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Skrivbordsgenväg för ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Snabbstartsgenväg för ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Tag bort ${APPLICATION_NAME}s data mapp från din dator."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Vill du radera ${APPLICATION_NAME}s data mapp?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Lämna omarkerad för att behålla data mappen för senare användning eller markera för att radera data mappen.."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Ja, radera denna data mappen."
StrCpy $UNINSTALLER_FILE_Detail "Skriver avinstallationsprogram"
StrCpy $UNINSTALLER_REGISTRY_Detail "Skriver installationsprogrammets registernycklar"
StrCpy $UNINSTALLER_FINISHED_Detail "Klar"
StrCpy $UNINSTALL_MESSAGEBOX "Det verkar inte som ${APPLICATION_NAME} är installerad i katalogen '$INSTDIR'.$\n$\nFortsätt ändå (rekommenderas ej)?"
StrCpy $UNINSTALL_ABORT "Avinstallering avbröts av användare"
StrCpy $INIT_NO_QUICK_LAUNCH "Snabbstartsgenväg (N/A)"
StrCpy $INIT_NO_DESKTOP "Skrivbordsgenväg (skriver över nuvarande)"
StrCpy $UAC_ERROR_ELEVATE "Kunde inte få förhöjda rättigheter, fel:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Detta installationsprogram kräver adminstratörs rättigheter, försök igen"
StrCpy $INIT_INSTALLER_RUNNING "Installationsprogrammet körs redan."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Detta avinstallationsprogram kräver administratörs rättigheter, försök igen"
StrCpy $INIT_UNINSTALLER_RUNNING "Avinstallationsprogrammet körs redan."
StrCpy $SectionGroup_Shortcuts "Genvägar"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Status icons for Windows Explorer"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installing status icons for Windows Explorer"

View File

@@ -9,12 +9,14 @@ StrCpy $PageReinstall_NEW_Field_3 "Kald
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_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_3 "${APPLICATION_NAME} uygulamasını kaldır"
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} uygulamasını kaldır"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Yapmak istediğiniz bakım işlemini seçin."
StrCpy $SEC_APPLICATION_DETAILS "${APPLICATION_NAME} gereklilikleri yükleniyor."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Windows Gezgini için durum simgeleri"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Windows Gezgini için durum simgeleri yükleniyor"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Başlat Menüsü Program Kısayolu"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "${APPLICATION_NAME} için Başlat Menüsü'ne kısayol ekleniyor."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Masaüstü Kısayolu"

View File

@@ -15,6 +15,8 @@ Var PageReinstall_SAME_Field_3
Var UNINSTALLER_APPDATA_TITLE
Var PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE
Var SEC_APPLICATION_DETAILS
Var OPTION_SECTION_SC_SHELL_EXT_SECTION
Var OPTION_SECTION_SC_SHELL_EXT_DetailPrint
Var OPTION_SECTION_SC_START_MENU_SECTION
Var OPTION_SECTION_SC_START_MENU_DetailPrint
Var OPTION_SECTION_SC_DESKTOP_SECTION

View File

@@ -1,7 +1,9 @@
; Auto-generated - do not modify
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "French"
@@ -10,6 +12,7 @@
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Basque"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"

View File

@@ -85,6 +85,14 @@ msgstr "Choose the maintenance option to perform."
msgid "Installing ${APPLICATION_NAME} essentials."
msgstr "Installing ${APPLICATION_NAME} essentials."
#. OPTION_SECTION_SC_SHELL_EXT_SECTION
msgid "Status icons for Windows Explorer"
msgstr "Status icons for Windows Explorer"
#. OPTION_SECTION_SC_SHELL_EXT_DetailPrint
msgid "Installing status icons for Windows Explorer"
msgstr "Installing status icons for Windows Explorer"
#. OPTION_SECTION_SC_START_MENU_SECTION
msgid "Start Menu Program Shortcut"
msgstr "Start Menu Program Shortcut"

1
binary Submodule

Submodule binary added at 1645f4df2f

View File

@@ -66,7 +66,7 @@ macro (KDE4_ADD_APP_ICON appsources pattern)
message(STATUS "Unable to find a related icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
endif(_icons)
else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
message(FATAL_ERROR "Unable to find the png2ico or windres utilities - application will not have an application icon!")
message(WARNING "Unable to find the png2ico or windres utilities - application will not have an application icon!")
endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
endif(WIN32)
if (APPLE)

View File

@@ -0,0 +1,13 @@
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -13,7 +13,7 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
if (NOT CSYNC_STATIC_COMPILE_DIR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -D_GNU_SOURCE")

View File

@@ -13,17 +13,17 @@ if (UNIX)
CACHE PATH "Base directory for files which go to share/"
)
SET(DATA_INSTALL_PREFIX
"${SHARE_INSTALL_PREFIX}/${APPLICATION_SHORT_NAME}"
"${SHARE_INSTALL_PREFIX}"
CACHE PATH "The parent directory where applications can install their data")
# The following are directories where stuff will be installed to
SET(BIN_INSTALL_DIR
"${CMAKE_INSTALL_BINDIR}"
CACHE PATH "The ${APPLICATION_SHORT_NAME} binary install dir (default prefix/bin)"
CACHE PATH "The ${APPLICATION_SHORTNAME} binary install dir (default prefix/bin)"
)
SET(SBIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/sbin"
CACHE PATH "The ${APPLICATION_SHORT_NAME} sbin install dir (default prefix/sbin)"
CACHE PATH "The ${APPLICATION_SHORTNAME} sbin install dir (default prefix/sbin)"
)
SET(LIB_INSTALL_DIR
"${CMAKE_INSTALL_LIBDIR}"
@@ -33,9 +33,13 @@ if (UNIX)
"${EXEC_INSTALL_PREFIX}/libexec"
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
)
SET(LIB_PRIVATE_INSTALL_DIR
"${LIB_INSTALL_DIR}"
CACHE PATH "The subdirectory relative to the install prefix where private libs are installed"
)
SET(PLUGIN_INSTALL_DIR
"${LIB_INSTALL_DIR}/${APPLICATION_SHORT_NAME}"
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_SHORT_NAME})"
"${LIB_INSTALL_DIR}"
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_SHORTNAME})"
)
SET(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_PREFIX}/include"
@@ -44,7 +48,7 @@ if (UNIX)
SET(DATA_INSTALL_DIR
"${DATA_INSTALL_PREFIX}"
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORT_NAME})"
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORTNAME})"
)
SET(HTML_INSTALL_DIR
"${DATA_INSTALL_PREFIX}/doc/HTML"
@@ -79,15 +83,15 @@ if (UNIX)
SET(SYSCONF_INSTALL_DIR
"${SYSCONFDIR_INSTALL_PREFIX}/etc"
CACHE PATH "The ${APPLICATION_SHORT_NAME} sysconfig install dir (default prefix/etc)"
CACHE PATH "The ${APPLICATION_SHORTNAME} sysconfig install dir (default prefix/etc)"
)
SET(MAN_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/man"
CACHE PATH "The ${APPLICATION_SHORT_NAME} man install dir (default prefix/man)"
CACHE PATH "The ${APPLICATION_SHORTNAME} man install dir (default prefix/man)"
)
SET(INFO_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/info"
CACHE PATH "The ${APPLICATION_SHORT_NAME} info install dir (default prefix/info)"
CACHE PATH "The ${APPLICATION_SHORTNAME} info install dir (default prefix/info)"
)
endif (UNIX)

View File

@@ -0,0 +1,381 @@
# - Functions to help assemble a standalone Qt5 executable.
# A collection of CMake utility functions useful for deploying
# Qt5 executables.
#
# The following functions are provided by this module:
# write_qt5_conf
# resolve_qt5_paths
# fixup_qt5_executable
# install_qt5_plugin_path
# install_qt5_plugin
# install_qt5_executable
# Requires CMake 2.6 or greater because it uses function and
# PARENT_SCOPE. Also depends on BundleUtilities.cmake.
#
# WRITE_QT5_CONF(<qt_conf_dir> <qt_conf_contents>)
# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
#
# RESOLVE_QT5_PATHS(<paths_var> [<executable_path>])
# Loop through <paths_var> list and if any don't exist resolve them
# relative to the <executable_path> (if supplied) or the CMAKE_INSTALL_PREFIX.
#
# FIXUP_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
# Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a
# Qt5 executable using BundleUtilities so it is standalone and can be
# drag-and-drop copied to another machine as long as all of the system
# libraries are compatible.
#
# <executable> should point to the executable to be fixed-up.
#
# <qtplugins> should contain a list of the names or paths of any Qt plugins
# to be installed.
#
# <libs> will be passed to BundleUtilities and should be a list of any already
# installed plugins, libraries or executables to also be fixed-up.
#
# <dirs> will be passed to BundleUtilities and should contain and directories
# to be searched to find library dependencies.
#
# <plugins_dir> allows an custom plugins directory to be used.
#
# <request_qt_conf> will force a qt.conf file to be written even if not needed.
#
# INSTALL_QT5_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
# Install (or copy) a resolved <plugin> to the default plugins directory
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>.
#
# If <copy> is set to TRUE then the plugins will be copied rather than
# installed. This is to allow this module to be used at CMake time rather than
# install time.
#
# If <component> is set then anything installed will use this COMPONENT.
#
# INSTALL_QT5_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
# Install (or copy) an unresolved <plugin> to the default plugins directory
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>. See documentation of INSTALL_QT5_PLUGIN_PATH.
#
# INSTALL_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
# a Qt5 executable using BundleUtilities so it is standalone and can be
# drag-and-drop copied to another machine as long as all of the system
# libraries are compatible. The executable will be fixed-up at install time.
# <component> is the COMPONENT used for bundle fixup and plugin installation.
# See documentation of FIXUP_QT5_BUNDLE.
#=============================================================================
# Copyright 2011 Mike McQuaid <m...@mikemcquaid.com>
# Copyright 2013 Mihai Moldovan <io...@ionic.de>
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# The functions defined in this file depend on the fixup_bundle function
# (and others) found in BundleUtilities.cmake
include(BundleUtilities)
set(DeployQt5_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
set(DeployQt5_apple_plugins_dir "PlugIns")
function(write_qt5_conf qt_conf_dir qt_conf_contents)
set(qt_conf_path "${qt_conf_dir}/qt.conf")
message(STATUS "Writing ${qt_conf_path}")
file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
endfunction()
function(resolve_qt5_paths paths_var)
set(executable_path ${ARGV1})
set(paths_resolved)
foreach(path ${${paths_var}})
if(EXISTS "${path}")
list(APPEND paths_resolved "${path}")
else()
if(${executable_path})
list(APPEND paths_resolved
"${executable_path}/${path}")
else()
list(APPEND paths_resolved
"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
endif()
endif()
endforeach()
set(${paths_var} ${paths_resolved} PARENT_SCOPE)
endfunction()
function(fixup_qt5_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
message(STATUS "fixup_qt5_executable")
message(STATUS " executable='${executable}'")
message(STATUS " qtplugins='${qtplugins}'")
message(STATUS " libs='${libs}'")
message(STATUS " dirs='${dirs}'")
message(STATUS " plugins_dir='${plugins_dir}'")
message(STATUS " request_qt_conf='${request_qt_conf}'")
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(APPLE)
set(qt_conf_dir "${executable}/Contents/Resources")
set(executable_path "${executable}")
set(write_qt_conf TRUE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt5_apple_plugins_dir}")
endif()
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
set(executable_path ".")
endif()
set(qt_conf_dir "${executable_path}")
set(write_qt_conf ${request_qt_conf})
endif()
foreach(plugin ${qtplugins})
set(installed_plugin_path "")
install_qt5_plugin("${plugin}" "${executable}" 1
installed_plugin_path)
list(APPEND libs ${installed_plugin_path})
endforeach()
foreach(lib ${libs})
if(NOT EXISTS "${lib}")
message(FATAL_ERROR "Library does not exist: ${lib}")
endif()
endforeach()
resolve_qt5_paths(libs "${executable_path}")
if(write_qt_conf)
set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
write_qt5_conf("${qt_conf_dir}" "${qt_conf_contents}")
endif()
fixup_bundle("${executable}" "${libs}" "${dirs}")
endfunction()
function(install_qt5_plugin_path plugin executable copy
installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
set(configurations ${ARGV6})
if(EXISTS "${plugin}")
if(APPLE)
if(NOT plugins_dir)
set(plugins_dir
"${DeployQt5_apple_plugins_dir}")
endif()
set(plugins_path
"${executable}/Contents/${plugins_dir}")
else()
get_filename_component(plugins_path "${executable}"
PATH)
if(NOT plugins_path)
set(plugins_path ".")
endif()
if(plugins_dir)
set(plugins_path
"${plugins_path}/${plugins_dir}")
endif()
endif()
set(plugin_group "")
get_filename_component(plugin_path "${plugin}" PATH)
get_filename_component(plugin_parent_path "${plugin_path}" PATH)
get_filename_component(plugin_parent_dir_name
"${plugin_parent_path}" NAME)
get_filename_component(plugin_name "${plugin}" NAME)
string(TOLOWER "${plugin_parent_dir_name}"
plugin_parent_dir_name)
if("${plugin_parent_dir_name}" STREQUAL "plugins")
get_filename_component(plugin_group "${plugin_path}"
NAME)
set(${plugin_group_var} "${plugin_group}")
endif()
set(plugins_path "${plugins_path}/${plugin_group}")
if(${copy})
file(MAKE_DIRECTORY "${plugins_path}")
file(COPY "${plugin}" DESTINATION "${plugins_path}")
else()
if(configurations AND (CMAKE_CONFIGURATION_TYPES OR
CMAKE_BUILD_TYPE))
set(configurations CONFIGURATIONS
${configurations})
else()
unset(configurations)
endif()
install(FILES "${plugin}" DESTINATION "${plugins_path}"
${configurations} ${component})
endif()
set(${installed_plugin_path_var}
"${plugins_path}/${plugin_name}" PARENT_SCOPE)
endif()
endfunction()
function(install_qt5_plugin plugin executable copy installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
if(EXISTS "${plugin}")
install_qt5_plugin_path("${plugin}" "${executable}" "${copy}"
"${installed_plugin_path_var}" "${plugins_dir}" "${component}")
else()
#string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
set(plugin_release)
set(plugin_debug)
set(plugin_tmp_path)
set(plugin_find_path "${Qt5Core_DIR}/../../../plugins/")
get_filename_component(plugin_find_path "${plugin_find_path}"
REALPATH)
set(plugin_find_release_filename "lib${plugin}.dylib")
set(plugin_find_debug_filename "lib${plugin}_debug.dylib")
file(GLOB_RECURSE pluginlist "${plugin_find_path}"
"${plugin_find_path}/*/lib*.dylib")
foreach(found_plugin ${pluginlist})
get_filename_component(curname "${found_plugin}" NAME)
if("${curname}" STREQUAL "${plugin_find_release_filename}")
set(plugin_tmp_release_path "${found_plugin}")
endif()
if("${curname}" STREQUAL "${plugin_find_debug_filename}")
set(plugin_tmp_debug_path "${found_plugin}")
endif()
endforeach()
if((NOT DEFINED plugin_tmp_release_path OR NOT EXISTS
"${plugin_tmp_release_path}") AND (NOT DEFINED plugin_tmp_debug_PATH OR NOT
EXISTS "${plugin_tmp_debug_path}"))
message(WARNING "Qt plugin \"${plugin}\" not recognized
or found.")
endif()
if(EXISTS "${plugin_tmp_release_path}")
set(plugin_release "${plugin_tmp_release_path}")
elseif(EXISTS "${plugin_tmp_debug_path}")
set(plugin_release "${plugin_tmp_debug_path}")
endif()
if(EXISTS "${plugin_tmp_debug_path}")
set(plugin_debug "${plugin_tmp_debug_path}")
elseif(EXISTS "${plugin_tmp_release_path}")
set(plugin_debug "${plugin_tmp_release_path}")
endif()
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
install_qt5_plugin_path("${plugin_release}"
"${executable}" "${copy}" "${installed_plugin_path_var}_release"
"${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
install_qt5_plugin_path("${plugin_debug}"
"${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}"
"${component}" "Debug")
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
set(${installed_plugin_path_var}
${${installed_plugin_path_var}_debug})
else()
set(${installed_plugin_path_var}
${${installed_plugin_path_var}_release})
endif()
else()
install_qt5_plugin_path("${plugin_release}"
"${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}"
"${component}")
endif()
endif()
set(${installed_plugin_path_var} ${${installed_plugin_path_var}}
PARENT_SCOPE)
endfunction()
function(install_qt5_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
set(component ${ARGV6})
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(component)
set(component COMPONENT ${component})
else()
unset(component)
endif()
get_filename_component(executable_absolute "${executable}" ABSOLUTE)
if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
gp_file_type("${executable_absolute}"
"${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}"
qtcore_type)
endif()
if(qtcore_type STREQUAL "system")
set(qt_plugins_dir "")
endif()
if(QT_IS_STATIC)
message(WARNING "Qt built statically: not installing plugins.")
else()
foreach(plugin ${qtplugins})
message(STATUS "trying to install plugin ${plugin}")
set(installed_plugin_paths "")
install_qt5_plugin("${plugin}" "${executable}" 0
installed_plugin_paths "${plugins_dir}" "${component}")
list(APPEND libs ${installed_plugin_paths})
endforeach()
endif()
resolve_qt5_paths(libs "")
install(CODE
"include(\"${DeployQt5_cmake_dir}/DeployQt5.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
FIXUP_QT5_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\"
\"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
${component}
)
endfunction()

View File

@@ -31,7 +31,7 @@ HINTS
find_library(NEON_LIBRARIES
NAMES
neon
neon neon-27
HINTS
${_NEON_LIBDIR}
${CMAKE_INSTALL_LIBDIR}

View File

@@ -0,0 +1,29 @@
# - Try to find QtKeychain
# Once done this will define
# QTKEYCHAIN_FOUND - System has QtKeychain
# QTKEYCHAIN_INCLUDE_DIRS - The QtKeychain include directories
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
find_path(QTKEYCHAIN_INCLUDE_DIR qt5keychain/keychain.h)
find_library(QTKEYCHAIN_LIBRARY
NAMES
qt5keychain
lib5qtkeychain
PATHS
/usr/lib
/usr/lib/${CMAKE_ARCH_TRIPLET}
/usr/local/lib
/opt/local/lib
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set QTKEYCHAIN_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Qt5Keychain DEFAULT_MSG
QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)

View File

@@ -1,18 +1,29 @@
# - Try to find QtKeyChain
# - Try to find QtKeychain
# Once done this will define
# QTKEYCHAIN_FOUND - System has QtKeyChain
# QTKEYCHAIN_INCLUDE_DIRS - The QtKeyChain include directories
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeyChain
# QTKEYCHAIN_FOUND - System has QtKeychain
# QTKEYCHAIN_INCLUDE_DIRS - The QtKeychain include directories
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
find_path(QTKEYCHAIN_INCLUDE_DIR qtkeychain/keychain.h)
find_library(QTKEYCHAIN_LIBRARY NAMES libqtkeychain qtkeychain)
find_library(QTKEYCHAIN_LIBRARY
NAMES
qtkeychain
libqtkeychain
PATHS
/usr/lib
/usr/lib/${CMAKE_ARCH_TRIPLET}
/usr/local/lib
/opt/local/lib
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set QTKEYCHAIN_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(QtKeyChain DEFAULT_MSG
find_package_handle_standard_args(QtKeychain DEFAULT_MSG
QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY )
mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)

View File

@@ -30,7 +30,7 @@ find_path(SQLITE3_INCLUDE_DIR
find_library(SQLITE3_LIBRARY
NAMES
sqlite3
sqlite3 sqlite3-0
PATHS
${_SQLITE3_LIBDIR}
)

View File

@@ -1,32 +1,49 @@
# - Define GNU standard installation directories
#.rst:
# GNUInstallDirs
# --------------
#
# Define GNU standard installation directories
#
# Provides install directory variables as defined for GNU software:
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
#
# ::
#
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
#
# Inclusion of this module defines the following variables:
# CMAKE_INSTALL_<dir> - destination for files of a given type
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
#
# ::
#
# CMAKE_INSTALL_<dir> - destination for files of a given type
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
#
# where <dir> is one of:
# BINDIR - user executables (bin)
# SBINDIR - system admin executables (sbin)
# LIBEXECDIR - program executables (libexec)
# SYSCONFDIR - read-only single-machine data (etc)
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
# LOCALSTATEDIR - modifiable single-machine data (var)
# LIBDIR - object code libraries (lib or lib64)
# INCLUDEDIR - C header files (include)
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
# DATAROOTDIR - read-only architecture-independent data root (share)
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
# INFODIR - info documentation (DATAROOTDIR/info)
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
# MANDIR - man documentation (DATAROOTDIR/man)
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
# install() commands for the corresponding file type. If the includer does
# not define a value the above-shown default will be used and the value will
# appear in the cache for editing by the user.
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
# from the corresponding destination by prepending (if necessary) the value
# of CMAKE_INSTALL_PREFIX.
#
# ::
#
# BINDIR - user executables (bin)
# SBINDIR - system admin executables (sbin)
# LIBEXECDIR - program executables (libexec)
# SYSCONFDIR - read-only single-machine data (etc)
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
# LOCALSTATEDIR - modifiable single-machine data (var)
# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
# INCLUDEDIR - C header files (include)
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
# DATAROOTDIR - read-only architecture-independent data root (share)
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
# INFODIR - info documentation (DATAROOTDIR/info)
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
# MANDIR - man documentation (DATAROOTDIR/man)
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
#
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION
# options of install() commands for the corresponding file type. If the
# includer does not define a value the above-shown default will be used
# and the value will appear in the cache for editing by the user. Each
# CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
# from the corresponding destination by prepending (if necessary) the
# value of CMAKE_INSTALL_PREFIX.
#=============================================================================
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
@@ -68,30 +85,90 @@ if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
endif()
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
# We check if the variable was manually set and not cached, in order to
# allow projects to set the values as normal variables before including
# GNUInstallDirs to avoid having the entries cached or user-editable. It
# replaces the "if(NOT DEFINED CMAKE_INSTALL_XXX)" checks in all the
# other cases.
# If CMAKE_INSTALL_LIBDIR is defined, if _libdir_set is false, then the
# variable is a normal one, otherwise it is a cache one.
get_property(_libdir_set CACHE CMAKE_INSTALL_LIBDIR PROPERTY TYPE SET)
if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
AND DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX
AND NOT "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_INSTALL_PREFIX}"))
# If CMAKE_INSTALL_LIBDIR is not defined, it is always executed.
# Otherwise:
# * if _libdir_set is false it is not executed (meaning that it is
# not a cache variable)
# * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is not defined it is
# not executed
# * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX and
# CMAKE_INSTALL_PREFIX are the same string it is not executed.
# _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is updated after the
# execution, of this part of code, therefore at the next inclusion
# of the file, CMAKE_INSTALL_LIBDIR is defined, and the 2 strings
# are equal, meaning that the if is not executed the code the
# second time.
set(_LIBDIR_DEFAULT "lib")
# Override this default 'lib' with 'lib64' iff:
# - we are on Linux system but NOT cross-compiling
# - we are NOT on debian
# - we are on a 64 bits system
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
# Note that the future of multi-arch handling may be even
# more complicated than that: http://wiki.debian.org/Multiarch
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
AND NOT CMAKE_CROSSCOMPILING
AND NOT EXISTS "/etc/debian_version")
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
message(AUTHOR_WARNING
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
"Please enable at least one language before including GNUInstallDirs.")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(_LIBDIR_DEFAULT "lib64")
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
# and CMAKE_INSTALL_PREFIX is "/usr"
# See http://wiki.debian.org/Multiarch
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
set(__LAST_LIBDIR_DEFAULT "lib")
# __LAST_LIBDIR_DEFAULT is the default value that we compute from
# _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX, not a cache entry for
# the value that was last used as the default.
# This value is used to figure out whether the user changed the
# CMAKE_INSTALL_LIBDIR value manually, or if the value was the
# default one. When CMAKE_INSTALL_PREFIX changes, the value is
# updated to the new default, unless the user explicitly changed it.
endif()
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
AND NOT CMAKE_CROSSCOMPILING)
if (EXISTS "/etc/debian_version") # is this a debian system ?
if(CMAKE_LIBRARY_ARCHITECTURE)
if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX
AND "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
set(__LAST_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
endif()
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
message(AUTHOR_WARNING
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
"Please enable at least one language before including GNUInstallDirs.")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(_LIBDIR_DEFAULT "lib64")
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
set(__LAST_LIBDIR_DEFAULT "lib64")
endif()
endif()
endif()
endif()
endif()
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
elseif(DEFINED __LAST_LIBDIR_DEFAULT
AND "${__LAST_LIBDIR_DEFAULT}" STREQUAL "${CMAKE_INSTALL_LIBDIR}")
set_property(CACHE CMAKE_INSTALL_LIBDIR PROPERTY VALUE "${_LIBDIR_DEFAULT}")
endif()
endif()
# Save for next run
set(_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "CMAKE_INSTALL_PREFIX during last run")
unset(_libdir_set)
unset(__LAST_LIBDIR_DEFAULT)
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")

View File

@@ -4,6 +4,7 @@
!define APPLICATION_NAME "@APPLICATION_NAME@"
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
!define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe"
!define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
@@ -15,6 +16,7 @@
!define OPTION_LICENSE_AGREEMENT
!endif
!define OPTION_UAC_PLUGIN_ENHANCED
!define OPTION_SECTION_SC_SHELL_EXT
!define OPTION_SECTION_SC_START_MENU
!define OPTION_SECTION_SC_DESKTOP
!define OPTION_SECTION_SC_QUICK_LAUNCH
@@ -34,9 +36,10 @@
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
!define QT_DLL_PATH "${MING_BIN}"
!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt4/plugins/accessible"
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt5/plugins/accessible"
!define SQLITE_DLL_PATH "${MING_LIB}/qt5/plugins/sqldrivers"
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
!define PLATFORMS_DLL_PATH "${MING_LIB}/qt5/plugins/platforms"
!define CSYNC_LIBRARY_DIR "@CSYNC_LIBRARY_DIR@"
!define CSYNC_CONFIG_DIR "@CSYNC_CONFIG_DIR@"
@@ -92,6 +95,7 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
!include WordFunc.nsh ;Used by VersionCompare macro function.
!include FileFunc.nsh ;Used to read out parameters
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
!include x64.nsh ;Used to determine the right arch for the shell extensions
;-----------------------------------------------------------------------------
; Memento selections stored in registry.
@@ -109,8 +113,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_FINISHPAGE_LINK "www.${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
@@ -149,6 +153,12 @@ UninstPage custom un.UnPageUserAppData un.UnPageUserAppDataLeave
!include ${source_path}/admin/win/nsi/l10n/languages.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
Function ${un}SetLang
# load the selected language file
@@ -267,10 +277,60 @@ FunctionEnd
no_process_${processName}_to_end:
!macroend
!macro StartExplorerAsUserMacro un
Function ${un}StartExplorerAsUser
Exec "$WINDIR\explorer.exe"
FunctionEnd
!macroend
!insertmacro StartExplorerAsUserMacro ""
!insertmacro StartExplorerAsUserMacro "un."
!macro StartExplorer un
DetailPrint "Starting Explorer..."
${UAC.CallFunctionAsUser} ${un}StartExplorerAsUser
!macroend
!macro StopExplorer
DetailPrint "Terminated Explorer..."
FindWindow $R0 "Shell_TrayWnd"
SendMessage $R0 0x5B4 0 0
#Processes::KillProcess explorer.exe
Sleep 1500
DetailPrint "Continuing..."
!macroend
Function EnsureOwncloudShutdown
!insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
FunctionEnd
Function RegisterShellExt
SetOutPath "$INSTDIR\shellext"
${If} ${RunningX64}
ExecWait '"$SYSDIR\regsvr32.exe" /s "$OUTDIR\OCOverlays_x64.dll"'
${Else}
ExecWait '"$SYSDIR\regsvr32.exe" /s "$OUTDIR\OCOverlays_x86.dll"'
${EndIf}
FunctionEnd
Function Un.RegisterShellExt
${If} ${RunningX64}
ExecWait '"$SYSDIR\regsvr32.exe" /u /s "$INSTDIR\shellext\OCOverlays_x64.dll"'
${Else}
ExecWait '"$SYSDIR\regsvr32.exe" /u /s "$INSTDIR\shellext\OCOverlays_x86.dll"'
${EndIf}
FunctionEnd
Function InstallRedistributables
${If} ${RunningX64}
ExecWait '"$OUTDIR\vcredist_x64.exe" /install /quiet'
${Else}
ExecWait '"$OUTDIR\vcredist_x86.exe" /install /quiet'
${EndIf}
Delete "$OUTDIR\vcredist_x86.exe"
Delete "$OUTDIR\vcredist_x64.exe"
FunctionEnd
##############################################################################
# #
# RE-INSTALLER FUNCTIONS #
@@ -361,25 +421,28 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
;Main executable & csync
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
File "${BUILD_PATH}\bin\socketapiclient.exe"
File "${BUILD_PATH}\src\lib${APPLICATION_SHORTNAME}sync.dll"
File "${BUILD_PATH}\csync\src\libocsync.dll"
File "${BUILD_PATH}\src\mirall_*.qm"
; Make sure only to copy qt, not qt_help, etc
File "${MING_SHARE}\qt4\translations\qt_??.qm"
File "${MING_SHARE}\qt4\translations\qt_??_??.qm"
File "${MING_SHARE}\qt4\translations\qtkeychain_*.qm"
File "${MING_SHARE}\qt5\translations\qt_??.qm"
File "${MING_SHARE}\qt5\translations\qt_??_??.qm"
File "${MING_SHARE}\qt5\translations\qtkeychain_*.qm"
SetOutPath "$INSTDIR\platforms"
File "${PLATFORMS_DLL_PATH}\qwindows.dll"
SetOutPath "$INSTDIR\accessible"
File "${ACCESSIBLE_DLL_PATH}\qtaccessiblewidgets4.dll"
File "${ACCESSIBLE_DLL_PATH}\qtaccessiblewidgets.dll"
SetOutPath "$INSTDIR\imageformats"
File "${IMAGEFORMATS_DLL_PATH}\qgif4.dll"
File "${IMAGEFORMATS_DLL_PATH}\qjpeg4.dll"
File "${IMAGEFORMATS_DLL_PATH}\qico4.dll"
File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
File "${IMAGEFORMATS_DLL_PATH}\qico.dll"
SetOutPath "$INSTDIR\sqldrivers"
File "${SQLITE_DLL_PATH}\qsqlite4.dll"
File "${SQLITE_DLL_PATH}\qsqlite.dll"
SetOutPath "$INSTDIR"
;License & release notes.
@@ -387,23 +450,45 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
;Qt stuff:
File "${QT_DLL_PATH}\QtCore4.dll"
File "${QT_DLL_PATH}\QtGui4.dll"
File "${QT_DLL_PATH}\QtNetwork4.dll"
File "${QT_DLL_PATH}\QtSql4.dll"
File "${QT_DLL_PATH}\QtXml4.dll"
File "${QT_DLL_PATH}\QtWebKit4.dll"
File "${QT_DLL_PATH}\Qt5Core.dll"
File "${QT_DLL_PATH}\Qt5Gui.dll"
File "${QT_DLL_PATH}\Qt5Network.dll"
File "${QT_DLL_PATH}\Qt5OpenGL.dll"
File "${QT_DLL_PATH}\Qt5PrintSupport.dll"
File "${QT_DLL_PATH}\Qt5Qml.dll"
File "${QT_DLL_PATH}\Qt5Quick.dll"
File "${QT_DLL_PATH}\Qt5Sensors.dll"
File "${QT_DLL_PATH}\Qt5Sql.dll"
File "${QT_DLL_PATH}\Qt5WebKit.dll"
File "${QT_DLL_PATH}\Qt5WebKitWidgets.dll"
File "${QT_DLL_PATH}\Qt5Widgets.dll"
File "${QT_DLL_PATH}\Qt5Xml.dll"
;Qt deps
File "${MING_BIN}\libpng15-15.dll"
File "${MING_BIN}\libpng16-16.dll"
File "${MING_BIN}\icudata53.dll"
File "${MING_BIN}\icui18n53.dll"
File "${MING_BIN}\icuuc53.dll"
File "${MING_BIN}\libEGL.dll"
File "${MING_BIN}\libGLESv2.dll"
File "${MING_BIN}\libjpeg-8.dll"
File "${MING_BIN}\libpcre16-0.dll"
File "${MING_BIN}\libproxy.dll"
File "${MING_BIN}\libsqlite3-0.dll"
File "${MING_BIN}\libcrypto-10.dll"
File "${MING_BIN}\libssl-10.dll"
File "${MING_BIN}\libstdc++-6.dll"
File "${MING_BIN}\libwebp-4.dll"
File "${MING_BIN}\libxslt-1.dll"
File "${MING_BIN}\zlib1.dll"
;QtSql and csync dep
File "${MING_BIN}\libsqlite3-0.dll"
;QtKeyChain stuff
File "${MING_BIN}\libqtkeychain.dll"
File "${MING_BIN}\libqt5keychain.dll"
; ownCloud plugin
;ownCloud plugin
File "${MING_BIN}\libintl-8.dll"
File "${MING_BIN}\libneon-27.dll"
File "${MING_BIN}\libproxy.dll"
@@ -413,19 +498,32 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
;MinGW stuff
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
File "${MING_BIN}\libstdc++-6.dll"
File "${MING_BIN}\libwinpthread-1.dll"
; Other
;File "${MING_BIN}\libpng15-15.dll"
File "${MING_BIN}\libjpeg-8.dll"
File "${MING_BIN}\zlib1.dll"
File "${MING_BIN}\libcrypto-10.dll"
File "${MING_BIN}\libssl-10.dll"
; CSync configs
;CSync configs
File "${SOURCE_PATH}/sync-exclude.lst"
SectionEnd
!ifdef OPTION_SECTION_SC_SHELL_EXT
${MementoSection} $OPTION_SECTION_SC_SHELL_EXT_SECTION SEC_SHELL_EXT
SectionIn 1 2
SetDetailsPrint textonly
DetailPrint $OPTION_SECTION_SC_SHELL_EXT_DetailPrint
SetOutPath "$INSTDIR\shellext"
File "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll"
File "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll"
File "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll"
File "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll"
File "${BUILD_PATH}\vcredist_x86.exe"
File "${BUILD_PATH}\vcredist_x64.exe"
Call InstallRedistributables
Call RegisterShellExt
!insertMacro StopExplorer
!insertMacro StartExplorer ""
${MementoSectionEnd}
!endif
SectionGroup $SectionGroup_Shortcuts
!ifdef OPTION_SECTION_SC_START_MENU
@@ -573,6 +671,15 @@ Section Uninstall
DeleteRegKey HKCR "${APPLICATION_NAME}"
;Shell extension
!ifdef OPTION_SECTION_SC_SHELL_EXT
${If} ${HasSection} SEC_SHELL_EXT
!insertmacro StopExplorer
Call Un.RegisterShellExt
!insertmacro StartExplorer "Un."
${EndIf}
!endif
;Start menu shortcut
!ifdef OPTION_SECTION_SC_START_MENU
SetShellVarContext all

View File

@@ -1,76 +1,102 @@
include (MacroOptionalFindPackage)
include (MacroLogFeature)
option(BUILD_WITH_QT4 "Build with Qt4 no matter if Qt5 was found" OFF)
option(BUILD_WITH_QT4 "Build with Qt4 no matter if Qt5 was found" ON)
if( NOT BUILD_WITH_QT4 )
if( BUILD_WITH_QT4 )
message(STATUS "Search for Qt5 was disalbed by option BUILD_WITH_QT4")
else( BUILD_WITH_QT4 )
find_package(Qt5Core QUIET)
if( Qt5Core_DIR )
find_package(Qt5Widgets QUIET)
find_package(Qt5Quick QUIET)
find_package(Qt5PrintSupport QUIET)
find_package(Qt5WebKit QUIET)
find_package(Qt5Location QUIET)
find_package(Qt5Network QUIET)
find_package(Qt5Sensors QUIET)
find_package(Qt5Xml QUIET)
# find_package(Qt5WebKitWidgets QUIET)
endif( BUILD_WITH_QT4 )
message(STATUS "Using Qt 5!")
if( Qt5Core_FOUND )
message(STATUS "Found Qt5 core, checking for further dependencies...")
find_package(Qt5Network REQUIRED)
find_package(Qt5Xml REQUIRED)
if(NOT TOKEN_AUTH_ONLY)
find_package(Qt5WebKitWidgets REQUIRED)
find_package(Qt5WebKit REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Widgets REQUIRED)
if(APPLE)
find_package(Qt5MacExtras REQUIRED)
endif(APPLE)
endif()
# We need this to find the paths to qdbusxml2cpp and co
if (WITH_DBUS)
find_package(Qt5DBus REQUIRED)
include_directories(${Qt5DBus_INCLUDES})
add_definitions(${Qt5DBus_DEFINITIONS})
endif (WITH_DBUS)
else( Qt5Core_FOUND )
if(WIN32 OR APPLE)
message(FATAL_ERROR "Qt 5 not found, but application depends on Qt5 on Windows and Mac OS X")
endif(WIN32 OR APPLE)
endif( Qt5Core_FOUND )
include_directories(${Qt5Widgets_INCLUDES})
add_definitions(${Qt5Widgets_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if( Qt5Core_FOUND )
message(STATUS "Using Qt 5!")
# We need this to find the paths to qdbusxml2cpp and co
if (WITH_DBUS)
find_package(Qt5DBus REQUIRED)
include_directories(${Qt5DBus_INCLUDES})
add_definitions(${Qt5DBus_DEFINITIONS})
endif (WITH_DBUS)
include_directories(${Qt5Core_INCLUDES})
add_definitions(${Qt5Core_DEFINITIONS})
if (NOT WIN32) #implied on Win32
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif(NOT WIN32)
# set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
# find_package(Qt5LinguistTools REQUIRED)
macro(qt_add_translation)
# qt5_add_translation(${ARGN})
endmacro()
macro(qt_add_dbus_interface)
qt5_add_dbus_interface(${ARGN})
endmacro()
macro(qt_add_dbus_adaptor)
qt5_add_dbus_adaptor(${ARGN})
endmacro()
macro(qt_wrap_cpp)
qt5_wrap_cpp(${ARGN})
endmacro()
macro(install_qt_executable)
install_qt5_executable(${ARGN})
endmacro()
macro(setup_qt)
endmacro()
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
#Enable deprecated symbols
add_definitions("-DQT_DISABLE_DEPRECATED_BEFORE=0")
if(APPLE AND NOT TOKEN_AUTH_ONLY)
include_directories(${Qt5MacExtras_INCLUDE_DIRS})
add_definitions(${Qt5MacExtras_DEFINITIONS})
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5MacExtras_LIBRARIES})
endif()
if(NOT BUILD_LIBRARIES_ONLY)
macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
else()
# hack
SET(QT_UIC_EXECUTABLE "")
endif()
if( NOT Qt5Core_DIR )
macro(qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
find_package(Qt5LinguistTools REQUIRED)
macro(qt_add_translation)
qt5_add_translation(${ARGN})
endmacro()
macro(qt_add_dbus_interface)
qt5_add_dbus_interface(${ARGN})
endmacro()
macro(qt_add_dbus_adaptor)
qt5_add_dbus_adaptor(${ARGN})
endmacro()
macro(qt_wrap_cpp)
qt5_wrap_cpp(${ARGN})
endmacro()
macro(install_qt_executable)
install_qt5_executable(${ARGN})
endmacro()
macro(setup_qt)
endmacro()
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
#Enable deprecated symbols
add_definitions("-DQT_DISABLE_DEPRECATED_BEFORE=0")
endif( Qt5Core_FOUND )
if(NOT Qt5Core_FOUND)
message(STATUS "Could not find Qt5, searching for Qt4 instead...")
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork" "QtGui" "QtWebkit")
@@ -78,8 +104,8 @@ if( NOT Qt5Core_DIR )
list(APPEND NEEDED_QT4_COMPONENTS "QtTest")
endif()
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://www.qt-project.org" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
macro(qt5_use_modules)
endmacro()
@@ -122,6 +148,8 @@ if( NOT Qt5Core_DIR )
include( ${QT_USE_FILE} )
endmacro()
add_definitions("-DQ_DECL_OVERRIDE=override")
endif()
if( Qt5Core_DIR )

View File

@@ -6,9 +6,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER MATCHES "clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(CMAKE_CXX_COMPILER MATCHES "clang")
# TODO: handle msvc compilers warnings?

View File

@@ -27,10 +27,6 @@ include(MacroCopyFile)
if (NOT WIN32)
find_package(Iconv)
endif (NOT WIN32)
find_package(CMocka)
if (CMOCKA_FOUND AND UNIT_TESTING)
include(AddCMockaTest)
endif (CMOCKA_FOUND AND UNIT_TESTING)
include(ConfigureChecks.cmake)
@@ -47,9 +43,13 @@ endif (MEM_NULL_TESTS)
add_subdirectory(src)
if (CMOCKA_FOUND AND UNIT_TESTING)
add_subdirectory(tests)
endif (CMOCKA_FOUND AND UNIT_TESTING)
if (UNIT_TESTING)
find_package(CMocka)
if (CMOCKA_FOUND)
include(AddCMockaTest)
add_subdirectory(tests)
endif (CMOCKA_FOUND)
endif (UNIT_TESTING)
configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
configure_file(config_test.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_test.h)

View File

@@ -37,11 +37,6 @@ if (HAVE_LIBDL)
endif (HAVE_LIBDL)
check_function_exists(asprintf HAVE_ASPRINTF)
if(NOT HAVE_ASPRINTF)
if(MINGW)
add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
endif()
endif()
check_function_exists(fnmatch HAVE_FNMATCH)
if(NOT HAVE_FNMATCH AND WIN32)

View File

@@ -22,7 +22,6 @@
#cmakedefine HAVE_UTIMES 1
#cmakedefine HAVE_LSTAT 1
#cmakedefine HAVE_FNMATCH 1
#cmakedefine HAVE___MINGW_ASPRINTF 1
#cmakedefine HAVE_ICONV 1
#cmakedefine HAVE_ICONV_CONST 1
@@ -31,5 +30,6 @@
#endif
#cmakedefine HAVE___MINGW_ASPRINTF 1
#cmakedefine HAVE_ASPRINTF 1
#cmakedefine WITH_UNIT_TESTING 1

View File

@@ -32,7 +32,6 @@ set(CSYNC_LIBRARY
)
set(CSYNC_LINK_LIBRARIES
${CSYNC_LIBRARY}
${CSTDLIB_LIBRARY}
${CSYNC_REQUIRED_LIBRARIES}
${SQLITE3_LIBRARIES}
@@ -45,11 +44,10 @@ if(HAVE_ICONV AND WITH_ICONV)
list(APPEND CSYNC_LINK_LIBRARIES ${ICONV_LIBRARIES})
endif()
set(BLACKLIST_ON_ERROR 0 CACHE BOOL
"If an errors occurs three times on the same file, do not attempt to process that file any further.")
if(BLACKLIST_ON_ERROR)
add_definitions(-DBLACKLIST_ON_ERROR)
# Specific option for builds tied to servers that do not support renaming extensions
set(NO_RENAME_EXTENSION 0 CACHE BOOL "Do not issue rename if the extension changes")
if(NO_RENAME_EXTENSION)
add_definitions(-DNO_RENAME_EXTENSION)
endif()
set(csync_SRCS
@@ -57,7 +55,6 @@ set(csync_SRCS
csync_exclude.c
csync_log.c
csync_statedb.c
csync_dbtree.c
csync_time.c
csync_util.c
csync_misc.c
@@ -68,7 +65,6 @@ set(csync_SRCS
csync_rename.cc
vio/csync_vio.c
vio/csync_vio_handle.c
vio/csync_vio_file_stat.c
vio/csync_vio_local.c
@@ -100,8 +96,10 @@ include_directories(
)
add_library(${CSYNC_LIBRARY} SHARED ${csync_SRCS})
#add_library(${CSYNC_LIBRARY}_static STATIC ${csync_SRCS})
target_link_libraries(${CSYNC_LINK_LIBRARIES})
target_link_libraries(${CSYNC_LIBRARY} ${CSYNC_LINK_LIBRARIES})
#target_link_libraries(${CSYNC_LIBRARY}_static ${CSYNC_LINK_LIBRARIES})
set_target_properties(
${CSYNC_LIBRARY}
@@ -111,17 +109,29 @@ set_target_properties(
SOVERSION
${LIBRARY_SOVERSION}
)
INSTALL(
if(BUILD_OWNCLOUD_OSX_BUNDLE)
INSTALL(
TARGETS
${CSYNC_LIBRARY}
LIBRARY DESTINATION
${LIB_INSTALL_DIR}
ARCHIVE DESTINATION
${LIB_INSTALL_DIR}
RUNTIME DESTINATION
${BIN_INSTALL_DIR}
)
else()
INSTALL(
TARGETS
${CSYNC_LIBRARY}
LIBRARY DESTINATION
${LIB_INSTALL_DIR}
${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}
ARCHIVE DESTINATION
${LIB_INSTALL_DIR}
${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}
RUNTIME DESTINATION
${BIN_INSTALL_DIR}
)
${BIN_INSTALL_DIR}/${APPLICATION_EXECUTABLE}
)
endif()
# INSTALL(
# FILES

View File

@@ -56,6 +56,11 @@
#include "csync_log.h"
#include "csync_rename.h"
#include "c_jhash.h"
// Breaking the abstraction for fun and profit.
#include "csync_owncloud.h"
static int _key_cmp(const void *key, const void *data) {
uint64_t a;
@@ -91,8 +96,6 @@ static int _data_cmp(const void *key, const void *data) {
int csync_create(CSYNC **csync, const char *local, const char *remote) {
CSYNC *ctx;
size_t len = 0;
char *home;
int rc;
ctx = c_malloc(sizeof(CSYNC));
if (ctx == NULL) {
@@ -124,35 +127,6 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
}
ctx->status_code = CSYNC_STATUS_OK;
ctx->options.max_depth = MAX_DEPTH;
ctx->options.max_time_difference = MAX_TIME_DIFFERENCE;
ctx->options.unix_extensions = 0;
ctx->options.with_conflict_copys=false;
ctx->options.local_only_mode = false;
ctx->pwd.uid = getuid();
ctx->pwd.euid = geteuid();
home = csync_get_user_home_dir();
if (home == NULL) {
SAFE_FREE(ctx->local.uri);
SAFE_FREE(ctx->remote.uri);
SAFE_FREE(ctx);
errno = ENOMEM;
ctx->status_code = CSYNC_STATUS_MEMORY_ERROR;
return -1;
}
rc = asprintf(&ctx->options.config_dir, "%s/%s", home, CSYNC_CONF_DIR);
SAFE_FREE(home);
if (rc < 0) {
SAFE_FREE(ctx->local.uri);
SAFE_FREE(ctx->remote.uri);
SAFE_FREE(ctx);
errno = ENOMEM;
ctx->status_code = CSYNC_STATUS_MEMORY_ERROR;
return -1;
}
ctx->local.list = 0;
ctx->remote.list = 0;
@@ -166,8 +140,6 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
int csync_init(CSYNC *ctx) {
int rc;
time_t timediff = -1;
char *config = NULL;
if (ctx == NULL) {
errno = EBADF;
@@ -181,81 +153,17 @@ int csync_init(CSYNC *ctx) {
return 1;
}
/* check for uri */
if (csync_fnmatch("owncloud://*", ctx->remote.uri, 0) == 0 && csync_fnmatch("ownclouds://*", ctx->remote.uri, 0) == 0) {
ctx->status_code = CSYNC_STATUS_NO_MODULE;
rc = -1;
goto out;
}
ctx->local.type = LOCAL_REPLICA;
/* check for uri */
if ( !ctx->options.local_only_mode && csync_fnmatch("*://*", ctx->remote.uri, 0) == 0) {
size_t len;
len = strstr(ctx->remote.uri, "://") - ctx->remote.uri;
/* get protocol */
if (len > 0) {
char *module = NULL;
/* module name */
module = c_strndup(ctx->remote.uri, len);
if (module == NULL) {
rc = -1;
ctx->status_code = CSYNC_STATUS_MEMORY_ERROR;
goto out;
}
/* load module */
retry_vio_init:
rc = csync_vio_init(ctx, module, NULL);
if (rc < 0) {
len = strlen(module);
if (len > 0 && module[len-1] == 's') {
module[len-1] = '\0';
goto retry_vio_init;
}
/* Now vio init finally failed which means a module could not be found. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"The csync module %s could not be loaded.", module);
SAFE_FREE(module);
ctx->status_code = CSYNC_STATUS_NO_MODULE;
goto out;
}
SAFE_FREE(module);
ctx->remote.type = REMOTE_REPLICA;
}
} else {
ctx->remote.type = LOCAL_REPLICA;
}
if(!ctx->options.local_only_mode) {
if(ctx->module.capabilities.time_sync_required) {
timediff = csync_timediff(ctx);
if (timediff > ctx->options.max_time_difference) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Clock skew detected. The time difference is greater than %d seconds!",
ctx->options.max_time_difference);
ctx->status_code = CSYNC_STATUS_TIMESKEW;
rc = -1;
goto out;
} else if (timediff < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Synchronisation is not possible!");
ctx->status_code = CSYNC_STATUS_TIMESKEW;
rc = -1;
goto out;
}
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Module does not need time synchronization.");
}
if(ctx->module.capabilities.unix_extensions == -1) { /* detect */
if (csync_unix_extensions(ctx) < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Could not detect filesystem type.");
ctx->status_code = CSYNC_STATUS_FILESYSTEM_UNKNOWN;
rc = -1;
goto out;
}
} else {
/* The module specifies the value for the unix_extensions. */
ctx->options.unix_extensions = ctx->module.capabilities.unix_extensions;
}
}
if (ctx->options.timeout)
csync_vio_set_property(ctx, "timeout", &ctx->options.timeout);
owncloud_init(ctx);
ctx->remote.type = REMOTE_REPLICA;
if (c_rbtree_create(&ctx->local.tree, _key_cmp, _data_cmp) < 0) {
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
@@ -271,15 +179,12 @@ retry_vio_init:
ctx->status = CSYNC_STATUS_INIT;
csync_set_module_property(ctx, "csync_context", ctx);
/* initialize random generator */
srand(time(NULL));
rc = 0;
out:
SAFE_FREE(config);
return rc;
}
@@ -294,7 +199,6 @@ int csync_update(CSYNC *ctx) {
ctx->status_code = CSYNC_STATUS_OK;
/* create/load statedb */
if (! csync_is_statedb_disabled(ctx)) {
rc = asprintf(&ctx->statedb.file, "%s/.csync_journal.db",
ctx->local.uri);
if (rc < 0) {
@@ -308,12 +212,15 @@ int csync_update(CSYNC *ctx) {
rc = -1;
return rc;
}
}
ctx->status_code = CSYNC_STATUS_OK;
csync_memstat_check();
if (!ctx->excludes) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "No exclude file loaded or defined!");
}
/* update detection for local replica */
csync_gettime(&start);
ctx->current = LOCAL_REPLICA;
@@ -333,33 +240,26 @@ int csync_update(CSYNC *ctx) {
c_secdiff(finish, start), c_rbtree_size(ctx->local.tree));
csync_memstat_check();
if (rc < 0) {
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
return -1;
}
/* update detection for remote replica */
if( ! ctx->options.local_only_mode ) {
csync_gettime(&start);
ctx->current = REMOTE_REPLICA;
ctx->replica = ctx->remote.type;
csync_gettime(&start);
ctx->current = REMOTE_REPLICA;
ctx->replica = ctx->remote.type;
rc = csync_ftw(ctx, ctx->remote.uri, csync_walker, MAX_DEPTH);
if (rc < 0) {
if(ctx->status_code == CSYNC_STATUS_OK)
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_UPDATE_ERROR);
return -1;
}
csync_gettime(&finish);
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"Update detection for remote replica took %.2f seconds "
"walking %zu files.",
c_secdiff(finish, start), c_rbtree_size(ctx->remote.tree));
csync_memstat_check();
rc = csync_ftw(ctx, ctx->remote.uri, csync_walker, MAX_DEPTH);
if (rc < 0) {
if(ctx->status_code == CSYNC_STATUS_OK)
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_UPDATE_ERROR);
return -1;
}
csync_gettime(&finish);
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"Update detection for remote replica took %.2f seconds "
"walking %zu files.",
c_secdiff(finish, start), c_rbtree_size(ctx->remote.tree));
csync_memstat_check();
ctx->status |= CSYNC_STATUS_UPDATE;
return 0;
@@ -396,7 +296,7 @@ int csync_reconcile(CSYNC *ctx) {
return -1;
}
/* Reconciliation for local replica */
/* Reconciliation for remote replica */
csync_gettime(&start);
ctx->current = REMOTE_REPLICA;
@@ -432,6 +332,8 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
c_rbtree_visit_func *visitor = NULL;
_csync_treewalk_context *twctx = NULL;
TREE_WALK_FILE trav;
c_rbtree_t *other_tree = NULL;
c_rbnode_t *other_node = NULL;
cur = (csync_file_stat_t *) obj;
ctx = (CSYNC *) data;
@@ -440,6 +342,34 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
return -1;
}
/* we need the opposite tree! */
switch (ctx->current) {
case LOCAL_REPLICA:
other_tree = ctx->remote.tree;
break;
case REMOTE_REPLICA:
other_tree = ctx->local.tree;
break;
default:
break;
}
other_node = c_rbtree_find(other_tree, &cur->phash);
if (!other_node) {
/* Check the renamed path as well. */
int len;
uint64_t h = 0;
char *renamed_path = csync_rename_adjust_path(ctx, cur->path);
if (!c_streq(renamed_path, cur->path)) {
len = strlen( renamed_path );
h = c_jhash64((uint8_t *) renamed_path, len, 0);
other_node = c_rbtree_find(other_tree, &h);
}
SAFE_FREE(renamed_path);
}
if (obj == NULL || data == NULL) {
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
return -1;
@@ -462,24 +392,42 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
trav.path = cur->path;
trav.size = cur->size;
trav.modtime = cur->modtime;
trav.uid = cur->uid;
trav.gid = cur->gid;
trav.mode = cur->mode;
trav.type = cur->type;
trav.instruction = cur->instruction;
trav.rename_path = cur->destpath;
trav.etag = cur->etag;
trav.file_id = cur->file_id;
trav.remotePerm = cur->remotePerm;
trav.directDownloadUrl = cur->directDownloadUrl;
trav.directDownloadCookies = cur->directDownloadCookies;
trav.inode = cur->inode;
trav.error_status = cur->error_status;
trav.should_update_etag = cur->should_update_etag;
if( other_node ) {
csync_file_stat_t *other_stat = (csync_file_stat_t*)other_node->data;
trav.other.etag = other_stat->etag;
trav.other.file_id = other_stat->file_id;
trav.other.instruction = other_stat->instruction;
trav.other.modtime = other_stat->modtime;
trav.other.size = other_stat->size;
} else {
trav.other.etag = 0;
trav.other.file_id = 0;
trav.other.instruction = CSYNC_INSTRUCTION_NONE;
trav.other.modtime = 0;
trav.other.size = 0;
}
rc = (*visitor)(&trav, twctx->userdata);
cur->instruction = trav.instruction;
if (trav.etag != cur->etag) {
if (trav.etag != cur->etag) { // FIXME It would be nice to have this documented
SAFE_FREE(cur->etag);
cur->etag = c_strdup(trav.etag);
}
return rc;
}
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
@@ -535,6 +483,7 @@ int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int
if(ctx != NULL) {
ctx->status_code = CSYNC_STATUS_OK;
ctx->current = REMOTE_REPLICA;
tree = ctx->remote.tree;
}
@@ -553,6 +502,7 @@ int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int fi
if (ctx != NULL) {
ctx->status_code = CSYNC_STATUS_OK;
ctx->current = LOCAL_REPLICA;
tree = ctx->local.tree;
}
@@ -618,13 +568,13 @@ int csync_commit(CSYNC *ctx) {
ctx->status_code = CSYNC_STATUS_OK;
if (ctx->statedb.db != NULL
&& csync_statedb_close(ctx->statedb.file, ctx->statedb.db, 0) < 0) {
&& csync_statedb_close(ctx) < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "ERR: closing of statedb failed.");
rc = -1;
}
ctx->statedb.db = NULL;
rc = csync_vio_commit(ctx);
rc = owncloud_commit(ctx);
if (rc < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "commit failed: %s",
ctx->error_string ? ctx->error_string : "");
@@ -634,6 +584,8 @@ int csync_commit(CSYNC *ctx) {
_csync_clean_ctx(ctx);
ctx->remote.read_from_db = 0;
ctx->read_from_db_disabled = 0;
/* Create new trees */
rc = c_rbtree_create(&ctx->local.tree, _key_cmp, _data_cmp);
@@ -648,11 +600,6 @@ int csync_commit(CSYNC *ctx) {
goto out;
}
/* reset the progress */
ctx->overall_progress.file_count = 0;
ctx->overall_progress.current_file_no = 0;
ctx->overall_progress.byte_sum = 0;
ctx->overall_progress.byte_current = 0;
ctx->status = CSYNC_STATUS_INIT;
SAFE_FREE(ctx->error_string);
@@ -673,14 +620,12 @@ int csync_destroy(CSYNC *ctx) {
ctx->status_code = CSYNC_STATUS_OK;
if (ctx->statedb.db != NULL
&& csync_statedb_close(ctx->statedb.file, ctx->statedb.db, 0) < 0) {
&& csync_statedb_close(ctx) < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "ERR: closing of statedb failed.");
rc = -1;
}
ctx->statedb.db = NULL;
csync_vio_shutdown(ctx);
/* destroy exclude list */
csync_exclude_destroy(ctx);
@@ -688,9 +633,10 @@ int csync_destroy(CSYNC *ctx) {
SAFE_FREE(ctx->local.uri);
SAFE_FREE(ctx->remote.uri);
SAFE_FREE(ctx->options.config_dir);
SAFE_FREE(ctx->error_string);
owncloud_destroy(ctx);
#ifdef WITH_ICONV
c_close_iconv();
#endif
@@ -722,70 +668,6 @@ void csync_clear_exclude_list(CSYNC *ctx)
csync_exclude_clear(ctx);
}
const char *csync_get_config_dir(CSYNC *ctx) {
if (ctx == NULL) {
return NULL;
}
return ctx->options.config_dir;
}
int csync_set_config_dir(CSYNC *ctx, const char *path) {
if (ctx == NULL || path == NULL) {
return -1;
}
SAFE_FREE(ctx->options.config_dir);
ctx->options.config_dir = c_strdup(path);
if (ctx->options.config_dir == NULL) {
ctx->status_code = CSYNC_STATUS_MEMORY_ERROR;
return -1;
}
return 0;
}
int csync_enable_statedb(CSYNC *ctx) {
if (ctx == NULL) {
return -1;
}
ctx->status_code = CSYNC_STATUS_OK;
if (ctx->status & CSYNC_STATUS_INIT) {
fprintf(stderr, "This function must be called before initialization.");
ctx->status_code = CSYNC_STATUS_CSYNC_STATUS_ERROR;
return -1;
}
ctx->statedb.disabled = 0;
return 0;
}
int csync_disable_statedb(CSYNC *ctx) {
if (ctx == NULL) {
return -1;
}
ctx->status_code = CSYNC_STATUS_OK;
if (ctx->status & CSYNC_STATUS_INIT) {
fprintf(stderr, "This function must be called before initialization.");
ctx->status_code = CSYNC_STATUS_CSYNC_STATUS_ERROR;
return -1;
}
ctx->statedb.disabled = 1;
return 0;
}
int csync_is_statedb_disabled(CSYNC *ctx) {
if (ctx == NULL) {
return -1;
}
return ctx->statedb.disabled;
}
int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb) {
if (ctx == NULL || cb == NULL) {
return -1;
@@ -801,15 +683,6 @@ int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb) {
return 0;
}
const char *csync_get_statedb_file(CSYNC *ctx) {
if (ctx == NULL) {
return NULL;
}
ctx->status_code = CSYNC_STATUS_OK;
return c_strdup(ctx->statedb.file);
}
void *csync_get_userdata(CSYNC *ctx) {
if (ctx == NULL) {
return NULL;
@@ -853,49 +726,6 @@ CSYNC_STATUS csync_get_status(CSYNC *ctx) {
return ctx->status_code;
}
int csync_enable_conflictcopys(CSYNC* ctx){
if (ctx == NULL) {
return -1;
}
if (ctx->status & CSYNC_STATUS_INIT) {
fprintf(stderr, "This function must be called before initialization.");
ctx->status_code = CSYNC_STATUS_CSYNC_STATUS_ERROR;
return -1;
}
ctx->options.with_conflict_copys=true;
return 0;
}
int csync_set_local_only(CSYNC *ctx, bool local_only) {
if (ctx == NULL) {
return -1;
}
ctx->status_code = CSYNC_STATUS_OK;
if (ctx->status & CSYNC_STATUS_INIT) {
fprintf(stderr, "csync_set_local_only: This function must be called before initialization.");
ctx->status_code = CSYNC_STATUS_CSYNC_STATUS_ERROR;
return -1;
}
ctx->options.local_only_mode=local_only;
return 0;
}
bool csync_get_local_only(CSYNC *ctx) {
if (ctx == NULL) {
return -1;
}
ctx->status_code = CSYNC_STATUS_OK;
return ctx->options.local_only_mode;
}
const char *csync_get_status_string(CSYNC *ctx)
{
return csync_vio_get_status_string(ctx);
@@ -940,6 +770,8 @@ int csync_abort_requested(CSYNC *ctx)
void csync_file_stat_free(csync_file_stat_t *st)
{
if (st) {
SAFE_FREE(st->directDownloadUrl);
SAFE_FREE(st->directDownloadCookies);
SAFE_FREE(st->etag);
SAFE_FREE(st->destpath);
SAFE_FREE(st);
@@ -948,30 +780,13 @@ void csync_file_stat_free(csync_file_stat_t *st)
int csync_set_module_property(CSYNC* ctx, const char* key, void* value)
{
return csync_vio_set_property(ctx, key, value);
return owncloud_set_property(ctx, key, value);
}
int csync_set_progress_callback(CSYNC* ctx, csync_progress_callback cb)
int csync_set_read_from_db(CSYNC* ctx, int enabled)
{
if (ctx == NULL) {
return -1;
}
if (cb == NULL ) {
ctx->status_code = CSYNC_STATUS_PARAM_ERROR;
return -1;
}
ctx->callbacks.progress_cb = cb;
ctx->status_code = CSYNC_STATUS_OK;
return 0;
ctx->read_from_db_disabled = !enabled;
return 0;
}
csync_progress_callback csync_get_progress_callback(CSYNC *ctx)
{
if (ctx == NULL) {
return NULL;
}
return ctx->callbacks.progress_cb;
}

View File

@@ -44,13 +44,6 @@
extern "C" {
#endif
/*
* csync file declarations
*/
#define CSYNC_CONF_DIR ".ocsync"
#define CSYNC_CONF_FILE "ocsync.conf"
#define CSYNC_EXCLUDE_FILE "ocsync_exclude.conf"
/**
* Instruction enum. In the file traversal structure, it describes
* the csync state of a file.
@@ -59,7 +52,7 @@ enum csync_status_codes_e {
CSYNC_STATUS_OK = 0,
CSYNC_STATUS_ERROR = 1024, /* don't use this code,
just use in csync_status_ok */
*/
CSYNC_STATUS_UNSUCCESSFUL,
CSYNC_STATUS_NO_LOCK, /* OBSOLETE does not happen anymore */
CSYNC_STATUS_STATEDB_LOAD_ERROR,
@@ -102,7 +95,8 @@ enum csync_status_codes_e {
/* Codes for file individual status: */
CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK,
CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST,
CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS
CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS,
CYSNC_STATUS_FILE_LOCKED_OR_OPEN
};
typedef enum csync_status_codes_e CSYNC_STATUS;
@@ -130,10 +124,7 @@ enum csync_instructions_e {
CSYNC_INSTRUCTION_IGNORE = 0x00000020, /* The file is ignored (UPDATE|RECONCILE) */
CSYNC_INSTRUCTION_SYNC = 0x00000040, /* The file need to be pushed to the other remote (RECONCILE) */
CSYNC_INSTRUCTION_STAT_ERROR = 0x00000080,
CSYNC_INSTRUCTION_ERROR = 0x00000100,
/* instructions for the propagator */
CSYNC_INSTRUCTION_DELETED = 0x00000200,
CSYNC_INSTRUCTION_UPDATED = 0x00000400
CSYNC_INSTRUCTION_ERROR = 0x00000100
};
enum csync_ftw_type_e {
@@ -154,26 +145,13 @@ enum csync_notify_type_e {
CSYNC_NOTIFY_FINISHED_SYNC_SEQUENCE,
CSYNC_NOTIFY_START_DELETE,
CSYNC_NOTIFY_END_DELETE,
CSYNC_NOTIFY_ERROR
CSYNC_NOTIFY_ERROR,
CSYNC_NOTIFY_START_LOCAL_UPDATE,
CSYNC_NOTIFY_FINISHED_LOCAL_UPDATE,
CSYNC_NOTIFY_START_REMOTE_UPDATE,
CSYNC_NOTIFY_FINISHED_REMOTE_UPDATE
};
struct csync_progress_s {
enum csync_notify_type_e kind;
/* individual file progress information */
const char *path;
int64_t curr_bytes;
int64_t file_size;
/* overall progress */
int64_t overall_transmission_size;
int64_t current_overall_bytes;
int64_t overall_file_count;
int64_t current_file_no;
};
typedef struct csync_progress_s CSYNC_PROGRESS;
/**
* CSync File Traversal structure.
*
@@ -185,14 +163,8 @@ typedef struct csync_progress_s CSYNC_PROGRESS;
struct csync_tree_walk_file_s {
const char *path;
int64_t size;
int64_t inode;
time_t modtime;
#ifdef _WIN32
uint32_t uid;
uint32_t gid;
#else
uid_t uid;
gid_t gid;
#endif
mode_t mode;
enum csync_ftw_type_e type;
enum csync_instructions_e instruction;
@@ -203,6 +175,17 @@ struct csync_tree_walk_file_s {
const char *rename_path;
const char *etag;
const char *file_id;
const char *remotePerm;
char *directDownloadUrl;
char *directDownloadCookies;
struct {
int64_t size;
time_t modtime;
const char *etag;
const char *file_id;
enum csync_instructions_e instruction;
} other;
CSYNC_STATUS error_status;
};
typedef struct csync_tree_walk_file_s TREE_WALK_FILE;
@@ -220,14 +203,6 @@ typedef void (*csync_log_callback) (int verbosity,
const char *buffer,
void *userdata);
/**
* @brief Check internal csync status.
*
* @param csync The context to check.
*
* @return true if status is error free, false for error states.
*/
bool csync_status_ok(CSYNC *ctx);
/**
* @brief Allocate a csync context.
@@ -339,62 +314,6 @@ int csync_add_exclude_list(CSYNC *ctx, const char *path);
*/
void csync_clear_exclude_list(CSYNC *ctx);
/**
* @brief Get the config directory.
*
* @param ctx The csync context.
*
* @return The path of the config directory or NULL on error.
*/
const char *csync_get_config_dir(CSYNC *ctx);
/**
* @brief Change the config directory.
*
* @param ctx The csync context.
*
* @param path The path to the new config directory.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_set_config_dir(CSYNC *ctx, const char *path);
/**
* @brief Remove the complete config directory.
*
* @param ctx The csync context.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_remove_config_dir(CSYNC *ctx);
/**
* @brief Enable the usage of the statedb. It is enabled by default.
*
* @param ctx The csync context.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_enable_statedb(CSYNC *ctx);
/**
* @brief Disable the usage of the statedb. It is enabled by default.
*
* @param ctx The csync context.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_disable_statedb(CSYNC *ctx);
/**
* @brief Check if the statedb usage is enabled.
*
* @param ctx The csync context.
*
* @return 1 if it is enabled, 0 if it is disabled.
*/
int csync_is_statedb_disabled(CSYNC *ctx);
/**
* @brief Get the userdata saved in the context.
*
@@ -487,40 +406,6 @@ void *csync_get_log_userdata(void);
*/
int csync_set_log_userdata(void *data);
/**
* @brief Get the path of the statedb file used.
*
* @param ctx The csync context.
*
* @return The path to the statedb file, NULL if an error occured.
*/
const char *csync_get_statedb_file(CSYNC *ctx);
/**
* @brief Enable the creation of backup copys if files are changed on both sides
*
* @param ctx The csync context.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_enable_conflictcopys(CSYNC *ctx);
/**
* @brief Flag to tell csync that only a local run is intended. Call before csync_init
*
* @param local_only Bool flag to indicate local only mode.
*
* @return 0 on success, less than 0 if an error occured.
*/
int csync_set_local_only( CSYNC *ctx, bool local_only );
/**
* @brief Retrieve the flag to tell csync that only a local run is intended.
*
* @return 1: stay local only, 0: local and remote mode
*/
bool csync_get_local_only( CSYNC *ctx );
/* Used for special modes or debugging */
CSYNC_STATUS csync_get_status(CSYNC *ctx);
@@ -584,25 +469,6 @@ int csync_set_iconv_codec(const char *from);
*/
int csync_set_module_property(CSYNC *ctx, const char *key, void *value);
/**
* @brief Callback definition for file progress callback.
*
* @param progress A struct containing progress information.
*
* @param userdata User defined data for the callback.
*/
typedef void (*csync_progress_callback)( CSYNC_PROGRESS *progress, void *userdata);
/**
* @brief Set a progress callback.
*
* This callback reports about up- or download progress of a individual file
* as well as overall progress.
*/
int csync_set_progress_callback( CSYNC *ctx, csync_progress_callback cb);
csync_progress_callback csync_get_progress_callback(CSYNC *ctx);
/**
* @brief Aborts the current sync run as soon as possible. Can be called from another thread.
*
@@ -624,6 +490,11 @@ void csync_resume(CSYNC *ctx);
*/
int csync_abort_requested(CSYNC *ctx);
/**
* Specify if it is allowed to read the remote tree from the DB (default to enabled)
*/
int csync_set_read_from_db(CSYNC* ctx, int enabled);
#ifdef __cplusplus
}
#endif

View File

@@ -1,235 +0,0 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2012 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config_csync.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "csync_dbtree.h"
#include "c_lib.h"
#include "csync_private.h"
#include "csync_statedb.h"
#include "csync_util.h"
#include "c_macro.h"
#define CSYNC_LOG_CATEGORY_NAME "csync.dbtree"
#include "csync_log.h"
struct dir_listing {
c_list_t *list;
unsigned int cnt;
c_list_t *entry;
char *dir;
};
csync_vio_method_handle_t *csync_dbtree_opendir(CSYNC *ctx, const char *name)
{
char *column = NULL;
const char *path = NULL;
csync_vio_file_stat_t *fs = NULL;
unsigned int c = 0;
c_strlist_t *list = NULL;
struct dir_listing *listing = NULL;
/* "phash INTEGER(8),"
"pathlen INTEGER,"
"path VARCHAR(4096),"
"inode INTEGER,"
"uid INTEGER,"
"gid INTEGER,"
"mode INTEGER,"
"modtime INTEGER(8),"
"type INTEGER,"
"md5 VARCHAR(32)," // That's the etag
*/
int col_count = 10;
if( strlen(name) < strlen(ctx->remote.uri)+1) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "name does not contain remote uri!");
return NULL;
}
path = name + strlen(ctx->remote.uri)+1;
list = csync_statedb_get_below_path(ctx, path);
if( ! list ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Query result list is NULL!");
return NULL;
}
/* list count must be a multiple of col_count */
if( list->count % col_count != 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Wrong size of query result list");
c_strlist_destroy( list );
return NULL;
}
listing = c_malloc(sizeof(struct dir_listing));
ZERO_STRUCTP(listing);
if( listing == NULL ) {
c_strlist_destroy( list );
errno = ENOMEM;
return NULL;
}
listing->dir = c_strdup(path);
for( c = 0; c < (list->count / col_count); c++) {
int base = c*col_count;
int cnt = 0;
int tpath_len = 0;
int type = 0;
char *tpath = list->vector[base+1];
/* check if the result points to a file directly below the search path
* by checking if there is another / in the result.
* If yes, skip it.
* FIXME: Find a better filter solution here.
*/
tpath += strlen(path)+1; /* jump over the search path */
tpath_len = strlen( tpath );
while( cnt < tpath_len ) {
if(*(tpath+cnt) == '/') {
/* CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Skipping entry: %s", list->vector[base+1]); */
break;
}
cnt++;
}
if( cnt < tpath_len ) continue;
if (!list->vector[base+8][0])
continue; /* If etag is empty, the file was removed on the server */
fs = csync_vio_file_stat_new();
fs->fields = CSYNC_VIO_FILE_STAT_FIELDS_NONE;
column = list->vector[base+0]; /* phash */
column = list->vector[base+1]; /* path */
fs->name = c_strdup(column+strlen(path)+1);
column = list->vector[base+2]; /* inode */
fs->inode = atoll(column);
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_INODE;
column = list->vector[base+3]; /* uid */
fs->uid = atoi(column);
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_UID;
column = list->vector[base+4]; /* gid */
fs->gid = atoi(column);
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_GID;
column = list->vector[base+5]; /* mode */
fs->mode = atoi(column);
// fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_M;
column = list->vector[base+6]; /* modtime */
fs->mtime = strtoul(column, NULL, 10);
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_MTIME;
column = list->vector[base+7]; /* type */
type = atoi(column);
/* Attention: the type of csync_ftw_type_e which is the source for
* the database entry is different from csync_vio_file_type_e which
* is the target file type here. Mapping is needed!
*/
switch( type ) {
case CSYNC_FTW_TYPE_DIR:
fs->type = CSYNC_VIO_FILE_TYPE_DIRECTORY;
break;
case CSYNC_FTW_TYPE_FILE:
fs->type = CSYNC_VIO_FILE_TYPE_REGULAR;
break;
case CSYNC_FTW_TYPE_SLINK:
fs->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
break;
default:
fs->type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
}
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
column = list->vector[base+8]; /* etag */
fs->etag = c_strdup(column);
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_ETAG;
column = list->vector[base+9]; /* file id */
csync_vio_file_stat_set_file_id(fs, column);
/* store into result list. */
listing->list = c_list_append( listing->list, fs );
listing->cnt++;
}
if(listing->cnt)
listing->entry = c_list_first( listing->list );
c_strlist_destroy( list );
return listing;
}
int csync_dbtree_closedir(CSYNC *ctx, csync_vio_method_handle_t *dhandle)
{
struct dir_listing *dl = NULL;
int rc = 0;
(void) ctx;
if( dhandle != NULL ) {
dl = (struct dir_listing*) dhandle;
c_list_free(dl->list);
SAFE_FREE(dl->dir);
SAFE_FREE(dl);
}
return rc;
}
csync_vio_file_stat_t *csync_dbtree_readdir(CSYNC *ctx, csync_vio_method_handle_t *dhandle)
{
csync_vio_file_stat_t *fs = NULL;
struct dir_listing *dl = NULL;
(void) ctx;
if( dhandle != NULL ) {
dl = (struct dir_listing*) dhandle;
if( dl->entry != NULL ) {
fs = (csync_vio_file_stat_t*) dl->entry->data;
dl->entry = c_list_next( dl->entry);
}
}
return fs;
}
/* vim: set ts=8 sw=2 et cindent: */

View File

@@ -1,60 +0,0 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2012 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file csync_dbtree.h
*
* @brief Private interface of csync
*
* @defgroup csyncdbtreeInternals csync statedb internals
* @ingroup csyncInternalAPI
*
* @{
*/
#ifndef _CSYNC_DBTREE_H
#define _CSYNC_DBTREE_H
#include "c_lib.h"
#include "csync_private.h"
#include "vio/csync_vio_handle.h"
/**
* @brief Open a directory based on the statedb.
*
* This function reads the list of files within a directory from statedb and
* builds up a list in memory.
*
* @param ctx The csync context.
* @param name The directory name.
*
* @return 0 on success, less than 0 if an error occured with errno set.
*/
csync_vio_method_handle_t *csync_dbtree_opendir(CSYNC *ctx, const char *name);
int csync_dbtree_closedir(CSYNC *ctx, csync_vio_method_handle_t *dhandle);
csync_vio_file_stat_t *csync_dbtree_readdir(CSYNC *ctx, csync_vio_method_handle_t *dhandle);
/**
* }@
*/
#endif /* _CSYNC_DBTREE_H */
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */

View File

@@ -20,12 +20,18 @@
#include "config_csync.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "c_lib.h"
#include "c_private.h"
#include "csync_private.h"
#include "csync_exclude.h"
@@ -144,11 +150,11 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
char *bname = NULL;
char *dname = NULL;
char *prev_dname = NULL;
char *conflict = NULL;
int rc = -1;
CSYNC_EXCLUDE_TYPE match = CSYNC_NOT_EXCLUDED;
CSYNC_EXCLUDE_TYPE type = CSYNC_NOT_EXCLUDED;
if (! ctx->options.unix_extensions) {
for (p = path; *p; p++) {
switch (*p) {
case '\\':
@@ -164,7 +170,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
break;
}
}
}
/* split up the path */
dname = c_dirname(path);
@@ -185,13 +190,40 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
goto out;
}
SAFE_FREE(bname);
SAFE_FREE(dname);
rc = csync_fnmatch(".owncloudsync.log*", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);
goto out;
}
/* Always ignore conflict files, not only via the exclude list */
rc = csync_fnmatch("*_conflict-*", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);
goto out;
}
if (getenv("CSYNC_CONFLICT_FILE_USERNAME")) {
asprintf(&conflict, "*_conflict_%s-*", getenv("CSYNC_CONFLICT_FILE_USERNAME"));
rc = csync_fnmatch(conflict, path, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
SAFE_FREE(conflict);
SAFE_FREE(bname);
SAFE_FREE(dname);
goto out;
}
SAFE_FREE(conflict);
}
SAFE_FREE(bname);
SAFE_FREE(dname);
if (ctx->excludes == NULL) {
if (ctx == NULL || ctx->excludes == NULL) {
goto out;
}
@@ -203,6 +235,7 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
type = CSYNC_FILE_EXCLUDE_LIST;
if (strlen(pattern) < 1) {
SAFE_FREE(pattern_stored);
continue;
}
/* Ecludes starting with ']' means it can be cleanup */
@@ -238,6 +271,9 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
if (bname == NULL || dname == NULL) {
match = CSYNC_NOT_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);
SAFE_FREE(pattern_stored);
goto out;
}

View File

@@ -47,94 +47,6 @@
#include "csync_macros.h"
#include "csync_log.h"
#ifdef _WIN32
char *csync_get_user_home_dir(void) {
wchar_t tmp[MAX_PATH];
char *szPath = NULL;
if( SHGetFolderPathW( NULL,
CSIDL_PROFILE|CSIDL_FLAG_CREATE,
NULL,
0,
tmp) == S_OK ) {
szPath = c_utf8_from_locale(tmp);
return szPath;
}
return NULL;
}
char *csync_get_local_username(void) {
DWORD size = 0;
wchar_t *user;
/* get the size */
GetUserName(NULL, &size);
user = (wchar_t *) c_malloc(2*size);
if (user == NULL) {
return NULL;
}
if (GetUserName(user, &size)) {
char *uuser = c_utf8_from_locale(user);
SAFE_FREE(user);
return uuser;
}
return NULL;
}
#else /* ************* !WIN32 ************ */
#ifndef NSS_BUFLEN_PASSWD
#define NSS_BUFLEN_PASSWD 4096
#endif /* NSS_BUFLEN_PASSWD */
char *csync_get_user_home_dir(void) {
const char *envp;
struct passwd pwd;
struct passwd *pwdbuf;
char buf[NSS_BUFLEN_PASSWD];
int rc;
envp = getenv("HOME");
if (envp != NULL && envp[0] != '\0') {
return c_strdup(envp);
}
/* Still nothing found, read the password file */
rc = getpwuid_r(getuid(), &pwd, buf, NSS_BUFLEN_PASSWD, &pwdbuf);
if (rc != 0) {
return c_strdup(pwd.pw_dir);
}
return NULL;
}
char *csync_get_local_username(void) {
struct passwd pwd;
struct passwd *pwdbuf;
char buf[NSS_BUFLEN_PASSWD];
char *name;
int rc;
rc = getpwuid_r(getuid(), &pwd, buf, NSS_BUFLEN_PASSWD, &pwdbuf);
if (rc != 0) {
return NULL;
}
name = c_strdup(pwd.pw_name);
if (name == NULL) {
return NULL;
}
return name;
}
#endif /* ************* WIN32 ************ */
#ifdef HAVE_FNMATCH
#include <fnmatch.h>

View File

@@ -35,9 +35,6 @@
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
#endif
char *csync_get_user_home_dir(void);
char *csync_get_local_username(void);
int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags);
/**
@@ -50,20 +47,6 @@ int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags);
*/
CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status);
struct csync_hbf_info_s {
int start_id;
int transfer_id;
};
typedef struct csync_hbf_info_s csync_hbf_info_t;
typedef struct {
int64_t file_count;
int64_t current_file_no;
int64_t byte_sum;
int64_t byte_current;
} csync_overall_progress_t;
char *csync_normalize_etag(const char *);
#endif /* _CSYNC_MISC_H */

File diff suppressed because it is too large Load Diff

View File

@@ -21,161 +21,18 @@
#ifndef CSYNC_OWNCLOUD_H
#define CSYNC_OWNCLOUD_H
#include <errno.h>
#include <stdio.h>
#include <time.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "config_csync.h"
#ifdef NEON_WITH_LFS /* Switch on LFS in libneon. Never remove the NE_LFS! */
#define NE_LFS
#endif
#include <neon/ne_basic.h>
#include <neon/ne_socket.h>
#include <neon/ne_session.h>
#include <neon/ne_request.h>
#include <neon/ne_props.h>
#include <neon/ne_auth.h>
#include <neon/ne_dates.h>
#include <neon/ne_compress.h>
#include <neon/ne_redirect.h>
#include "c_rbtree.h"
#include "c_lib.h"
#include "csync.h"
#include "csync_misc.h"
#include "csync_macros.h"
#include "c_private.h"
#include "httpbf.h"
#include "vio/csync_vio_module.h"
#include "vio/csync_vio_file_stat.h"
#include "vio/csync_vio.h"
#include "csync_log.h"
#define DEBUG_WEBDAV(...) csync_log( 9, "oc_module", __VA_ARGS__);
enum resource_type {
resr_normal = 0,
resr_collection,
resr_reference,
resr_error
};
/* Struct to store data for each resource found during an opendir operation.
* It represents a single file entry.
*/
typedef struct resource {
char *uri; /* The complete uri */
char *name; /* The filename only */
enum resource_type type;
int64_t size;
time_t modtime;
char* md5;
char file_id[FILE_ID_BUF_SIZE+1];
struct resource *next;
} resource;
/* Struct to hold the context of a WebDAV PropFind operation to fetch
* a directory listing from the server.
*/
struct listdir_context {
struct resource *list; /* The list of result resources */
struct resource *currResource; /* A pointer to the current resource */
char *target; /* Request-URI of the PROPFIND */
unsigned int result_count; /* number of elements stored in list */
int ref; /* reference count, only destroy when it reaches 0 */
};
/* Our cache, key is a char* */
extern c_rbtree_t *propfind_recursive_cache;
/* Values are propfind_recursive_element: */
struct propfind_recursive_element {
struct resource *self;
struct resource *children;
struct propfind_recursive_element *parent;
};
typedef struct propfind_recursive_element propfind_recursive_element_t;
void clear_propfind_recursive_cache(void);
struct listdir_context *get_listdir_context_from_recursive_cache(const char *curi);
void fill_recursive_propfind_cache(const char *uri, const char *curi);
struct listdir_context *get_listdir_context_from_cache(const char *curi);
void fetch_resource_list_recursive(const char *uri, const char *curi);
typedef int (*csync_owncloud_redirect_callback_t)(CSYNC* ctx, const char* uri);
/* Struct with the WebDAV session */
struct dav_session_s {
ne_session *ctx;
char *user;
char *pwd;
char *proxy_type;
char *proxy_host;
int proxy_port;
char *proxy_user;
char *proxy_pwd;
char *session_key;
char *error_string;
int read_timeout;
CSYNC *csync_ctx;
csync_hbf_info_t *chunk_info;
bool no_recursive_propfind;
int64_t hbf_block_size;
int64_t hbf_threshold;
/* If 0, it is disabled. If >0, in Byte/seconds. If < 0, in % of the available bandwidth*/
int bandwidth_limit_upload;
int bandwidth_limit_download;
csync_overall_progress_t *overall_progress_data;
csync_owncloud_redirect_callback_t redir_callback;
};
extern struct dav_session_s dav_session;
/* The list of properties that is fetched in PropFind on a collection */
static const ne_propname ls_props[] = {
{ "DAV:", "getlastmodified" },
{ "DAV:", "getcontentlength" },
{ "DAV:", "resourcetype" },
{ "DAV:", "getetag"},
{ "http://owncloud.org/ns", "id"},
{ NULL, NULL }
};
void set_errno_from_http_errcode( int err );
void set_error_message( const char *msg );
void set_errno_from_neon_errcode( int neon_code );
int http_result_code_from_session(void);
void set_errno_from_session(void);
time_t oc_httpdate_parse( const char *date );
char *_cleanPath( const char* uri );
int _stat_perms( int type );
csync_vio_file_stat_t *resourceToFileStat( struct resource *res );
void oc_notify_progress(const char *file, enum csync_notify_type_e kind, int64_t current_size, int64_t full_size);
// Public API used by csync
csync_vio_handle_t *owncloud_opendir(CSYNC* ctx, const char *uri);
csync_vio_file_stat_t *owncloud_readdir(CSYNC* ctx, csync_vio_handle_t *dhandle);
int owncloud_closedir(CSYNC* ctx, csync_vio_handle_t *dhandle);
int owncloud_commit(CSYNC* ctx);
void owncloud_destroy(CSYNC* ctx);
char *owncloud_error_string(CSYNC* ctx);
void owncloud_init(CSYNC* ctx);
int owncloud_set_property(CSYNC* ctx, const char *key, void *data);
#endif /* CSYNC_OWNCLOUD_H */

View File

@@ -0,0 +1,201 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2011 by Andreas Schneider <asn@cryptomilk.org>
* Copyright (c) 2012 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef CSYNC_OWNCLOUD_PRIVATE_H
#define CSYNC_OWNCLOUD_PRIVATE_H
#include <errno.h>
#include <stdio.h>
#include <time.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "config_csync.h"
#ifdef NEON_WITH_LFS /* Switch on LFS in libneon. Never remove the NE_LFS! */
#define NE_LFS
#endif
#include <neon/ne_basic.h>
#include <neon/ne_socket.h>
#include <neon/ne_session.h>
#include <neon/ne_request.h>
#include <neon/ne_props.h>
#include <neon/ne_auth.h>
#include <neon/ne_dates.h>
#include <neon/ne_compress.h>
#include <neon/ne_redirect.h>
#include "c_rbtree.h"
#include "c_lib.h"
#include "csync.h"
#include "csync_misc.h"
#include "csync_macros.h"
#include "c_private.h"
#include "httpbf.h"
#include "vio/csync_vio_file_stat.h"
#include "vio/csync_vio.h"
#include "csync_log.h"
#include "csync_owncloud.h"
#define DEBUG_WEBDAV(...) csync_log( 9, "oc_module", __VA_ARGS__);
typedef int (*csync_owncloud_redirect_callback_t)(CSYNC* ctx, const char* uri);
/* Struct with the WebDAV session */
struct dav_session_s {
ne_session *ctx;
char *user;
char *pwd;
char *proxy_type;
char *proxy_host;
int proxy_port;
char *proxy_user;
char *proxy_pwd;
char *session_key;
char *error_string;
int read_timeout;
bool no_recursive_propfind;
csync_owncloud_redirect_callback_t redir_callback;
};
struct csync_owncloud_ctx_s {
CSYNC *csync_ctx;
// For the PROPFIND results
bool is_first_propfind;
struct listdir_context *propfind_cache;
c_rbtree_t *propfind_recursive_cache;
int propfind_recursive_cache_depth;
int propfind_recursive_cache_file_count;
int propfind_recursive_cache_folder_count;
// For the WebDAV connection
struct dav_session_s dav_session; /* The DAV Session, initialised in dav_connect */
int _connected; /* flag to indicate if a connection exists, ie.
the dav_session is valid */
};
typedef struct csync_owncloud_ctx_s csync_owncloud_ctx_t;
//typedef csync_owncloud_ctx_t* csync_owncloud_ctx_p;
enum resource_type {
resr_normal = 0,
resr_collection,
resr_reference,
resr_error
};
/* The list of properties that is fetched in PropFind on a collection */
static const ne_propname ls_props[] = {
{ "DAV:", "getlastmodified" },
{ "DAV:", "getcontentlength" },
{ "DAV:", "resourcetype" },
{ "DAV:", "getetag"},
{ "http://owncloud.org/ns", "id"},
{ "http://owncloud.org/ns", "dDU"},
{ "http://owncloud.org/ns", "dDC"},
{ "http://owncloud.org/ns", "permissions"},
{ NULL, NULL }
};
/* Struct to store data for each resource found during an opendir operation.
* It represents a single file entry.
*/
typedef struct resource {
char *uri; /* The complete uri */
char *name; /* The filename only */
enum resource_type type;
int64_t size;
time_t modtime;
char* md5;
char file_id[FILE_ID_BUF_SIZE+1];
// Those two are optional from the server. We can use those URL to download the file directly
// without going through the ownCloud instance.
char *directDownloadUrl;
char *directDownloadCookies;
// See https://github.com/owncloud/core/issues/8322
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
struct resource *next;
} resource;
/* Struct to hold the context of a WebDAV PropFind operation to fetch
* a directory listing from the server.
*/
struct listdir_context {
struct resource *list; /* The list of result resources */
struct resource *currResource; /* A pointer to the current resource */
char *target; /* Request-URI of the PROPFIND */
unsigned int result_count; /* number of elements stored in list */
int ref; /* reference count, only destroy when it reaches 0 */
};
/* Values are propfind_recursive_element: */
struct propfind_recursive_element {
struct resource *self;
struct resource *children;
struct propfind_recursive_element *parent;
};
typedef struct propfind_recursive_element propfind_recursive_element_t;
void clear_propfind_recursive_cache(csync_owncloud_ctx_t *ctx);
struct listdir_context *get_listdir_context_from_recursive_cache(csync_owncloud_ctx_t *ctx, const char *curi);
void fill_recursive_propfind_cache(csync_owncloud_ctx_t *ctx, const char *uri, const char *curi);
struct listdir_context *get_listdir_context_from_cache(csync_owncloud_ctx_t *ctx, const char *curi);
void fetch_resource_list_recursive(csync_owncloud_ctx_t *ctx, const char *uri, const char *curi);
void set_errno_from_http_errcode( int err );
void set_error_message( csync_owncloud_ctx_t *ctx, const char *msg );
void set_errno_from_neon_errcode(csync_owncloud_ctx_t *ctx, int neon_code );
int http_result_code_from_session(csync_owncloud_ctx_t *ctx);
void set_errno_from_session(csync_owncloud_ctx_t *ctx);
time_t oc_httpdate_parse( const char *date );
char *_cleanPath( const char* uri );
void fill_webdav_properties_into_resource(struct resource* newres, const ne_prop_result_set *set);
void resourceToFileStat( csync_vio_file_stat_t *lfs, struct resource *res );
void resource_free(struct resource* o);
struct resource* resource_dup(struct resource* o);
void free_fetchCtx( struct listdir_context *ctx );
const char* csync_owncloud_get_platform(void);
#endif // CSYNC_OWNCLOUD_PRIVATE_H

View File

@@ -20,42 +20,7 @@
*/
#include "csync_owncloud.h"
c_rbtree_t *propfind_recursive_cache = NULL;
int propfind_recursive_cache_depth = 0;
int propfind_recursive_cache_file_count = 0;
int propfind_recursive_cache_folder_count = 0;
static struct resource* resource_dup(struct resource* o) {
struct resource *r = c_malloc (sizeof( struct resource ));
ZERO_STRUCTP(r);
r->uri = c_strdup(o->uri);
r->name = c_strdup(o->name);
r->type = o->type;
r->size = o->size;
r->modtime = o->modtime;
if( o->md5 ) {
r->md5 = c_strdup(o->md5);
}
r->next = o->next;
csync_vio_set_file_id(r->file_id, o->file_id);
return r;
}
static void resource_free(struct resource* o) {
struct resource* old = NULL;
while (o)
{
old = o;
o = o->next;
SAFE_FREE(old->uri);
SAFE_FREE(old->name);
SAFE_FREE(old->md5);
SAFE_FREE(old);
}
}
#include "csync_owncloud_private.h"
static void _tree_destructor(void *data) {
propfind_recursive_element_t *element = data;
@@ -64,27 +29,27 @@ static void _tree_destructor(void *data) {
SAFE_FREE(element);
}
void clear_propfind_recursive_cache(void)
void clear_propfind_recursive_cache(csync_owncloud_ctx_t *ctx)
{
if (propfind_recursive_cache) {
if (ctx->propfind_recursive_cache) {
DEBUG_WEBDAV("clear_propfind_recursive_cache Invalidating..");
c_rbtree_destroy(propfind_recursive_cache, _tree_destructor);
propfind_recursive_cache = NULL;
c_rbtree_destroy(ctx->propfind_recursive_cache, _tree_destructor);
ctx->propfind_recursive_cache = NULL;
}
}
struct listdir_context *get_listdir_context_from_recursive_cache(const char *curi)
struct listdir_context *get_listdir_context_from_recursive_cache(csync_owncloud_ctx_t *ctx, const char *curi)
{
propfind_recursive_element_t *element = NULL;
struct listdir_context *fetchCtx = NULL;
struct resource *iterator, *r;
if (!propfind_recursive_cache) {
if (!ctx->propfind_recursive_cache) {
DEBUG_WEBDAV("get_listdir_context_from_recursive_cache No cache");
return NULL;
}
element = c_rbtree_node_data(c_rbtree_find(propfind_recursive_cache, curi));
element = c_rbtree_node_data(c_rbtree_find(ctx->propfind_recursive_cache, curi));
if (!element) {
DEBUG_WEBDAV("get_listdir_context_from_recursive_cache No element %s in cache found", curi);
return NULL;
@@ -128,83 +93,53 @@ static int _data_cmp(const void *a, const void *b) {
const propfind_recursive_element_t *elementB = b;
return ne_path_compare(elementA->self->uri, elementB->self->uri);
}
static void propfind_results_recursive(void *userdata,
static void propfind_results_recursive_callback(void *userdata,
const ne_uri *uri,
const ne_prop_result_set *set)
{
struct resource *newres = 0;
const char *clength, *modtime, *file_id = NULL;
const char *resourcetype = NULL;
const char *md5sum = NULL;
const ne_status *status = NULL;
char *path = ne_path_unescape( uri->path );
char *parentPath;
char *propfindRootUri = (char*) userdata;
propfind_recursive_element_t *element = NULL;
propfind_recursive_element_t *pElement = NULL;
int depth = 0;
csync_owncloud_ctx_t *ctx = (csync_owncloud_ctx_t*) userdata;
(void) status;
(void) propfindRootUri;
if (!propfind_recursive_cache) {
c_rbtree_create(&propfind_recursive_cache, _key_cmp, _data_cmp);
if (!ctx->propfind_recursive_cache) {
c_rbtree_create(&ctx->propfind_recursive_cache, _key_cmp, _data_cmp);
}
/* Fill the resource structure with the data about the file */
newres = c_malloc(sizeof(struct resource));
ZERO_STRUCTP(newres);
newres->uri = path; /* no need to strdup because ne_path_unescape already allocates */
newres->name = c_basename( path );
fill_webdav_properties_into_resource(newres, set);
modtime = ne_propset_value( set, &ls_props[0] );
clength = ne_propset_value( set, &ls_props[1] );
resourcetype = ne_propset_value( set, &ls_props[2] );
md5sum = ne_propset_value( set, &ls_props[3] );
file_id = ne_propset_value( set, &ls_props[4] );
newres->type = resr_normal;
if( resourcetype && strncmp( resourcetype, "<DAV:collection>", 16 ) == 0) {
newres->type = resr_collection;
propfind_recursive_cache_folder_count++;
if( newres->type == resr_collection) {
ctx->propfind_recursive_cache_folder_count++;
} else {
/* DEBUG_WEBDAV("propfind_results_recursive %s [%d]", newres->uri, newres->type); */
propfind_recursive_cache_file_count++;
ctx->propfind_recursive_cache_file_count++;
}
if (modtime) {
newres->modtime = oc_httpdate_parse(modtime);
}
/* DEBUG_WEBDAV("Parsing Modtime: %s -> %llu", modtime, (unsigned long long) newres->modtime ); */
newres->size = 0;
if (clength) {
newres->size = atoll(clength);
/* DEBUG_WEBDAV("Parsed File size for %s from %s: %lld", newres->name, clength, (long long)newres->size ); */
}
if( md5sum ) {
newres->md5 = csync_normalize_etag(md5sum);
}
csync_vio_set_file_id(newres->file_id, file_id);
/*
DEBUG_WEBDAV("propfind_results_recursive %s [%s] %s", newres->uri, newres->type == resr_collection ? "collection" : "file", newres->md5);
*/
/* Create new item in rb tree */
if (newres->type == resr_collection) {
DEBUG_WEBDAV("propfind_results_recursive %s is a folder", newres->uri);
/* Check if in rb tree */
element = c_rbtree_node_data(c_rbtree_find(propfind_recursive_cache,uri->path));
element = c_rbtree_node_data(c_rbtree_find(ctx->propfind_recursive_cache,uri->path));
/* If not, create a new item and insert it */
if (!element) {
element = c_malloc(sizeof(propfind_recursive_element_t));
element->self = resource_dup(newres);
element->self->next = 0;
element->children = NULL;
element->parent = NULL;
c_rbtree_insert(propfind_recursive_cache, element);
c_rbtree_insert(ctx->propfind_recursive_cache, element);
/* DEBUG_WEBDAV("results_recursive Added collection %s", newres->uri); */
}
}
@@ -214,7 +149,7 @@ static void propfind_results_recursive(void *userdata,
if (parentPath) {
propfind_recursive_element_t *parentElement = NULL;
parentElement = c_rbtree_node_data(c_rbtree_find(propfind_recursive_cache,parentPath));
parentElement = c_rbtree_node_data(c_rbtree_find(ctx->propfind_recursive_cache,parentPath));
free(parentPath);
if (parentElement) {
@@ -230,22 +165,21 @@ static void propfind_results_recursive(void *userdata,
depth++;
pElement = pElement->parent;
}
if (depth > propfind_recursive_cache_depth) {
if (depth > ctx->propfind_recursive_cache_depth) {
DEBUG_WEBDAV("propfind_results_recursive %s new maximum tree depth %d", newres->uri, depth);
propfind_recursive_cache_depth = depth;
ctx->propfind_recursive_cache_depth = depth;
}
/* DEBUG_WEBDAV("results_recursive Added child %s to collection %s", newres->uri, element->self->uri); */
} else {
/* DEBUG_WEBDAV("results_recursive No parent %s found for child %s", parentPath, newres->uri); */
resource_free(newres);
newres = NULL;
return;
}
}
resource_free(newres);
newres = NULL;
}
void fetch_resource_list_recursive(const char *uri, const char *curi)
void fetch_resource_list_recursive(csync_owncloud_ctx_t *ctx, const char *uri, const char *curi)
{
int ret = 0;
ne_propfind_handler *hdl = NULL;
@@ -257,10 +191,10 @@ void fetch_resource_list_recursive(const char *uri, const char *curi)
DEBUG_WEBDAV("fetch_resource_list_recursive Starting recursive propfind %s %s", uri, curi);
/* do a propfind request and parse the results in the results function, set as callback */
hdl = ne_propfind_create(dav_session.ctx, curi, depth);
hdl = ne_propfind_create(ctx->dav_session.ctx, curi, depth);
if(hdl) {
ret = ne_propfind_named(hdl, ls_props, propfind_results_recursive, (void*)curi);
ret = ne_propfind_named(hdl, ls_props, propfind_results_recursive_callback, ctx);
request = ne_propfind_get_request( hdl );
req_status = ne_get_status( request );
}
@@ -272,15 +206,14 @@ void fetch_resource_list_recursive(const char *uri, const char *curi)
DEBUG_WEBDAV("ERROR: Request failed: status %d (%s)", req_status->code,
req_status->reason_phrase);
ret = NE_CONNECT;
set_error_message(req_status->reason_phrase);
oc_notify_progress(uri, CSYNC_NOTIFY_ERROR, req_status->code, (intptr_t)(req_status->reason_phrase));
set_error_message(ctx, req_status->reason_phrase);
}
DEBUG_WEBDAV("Recursive propfind result code %d.", req_status ? req_status->code : 0);
} else {
if( ret == NE_ERROR && req_status->code == 404) {
errno = ENOENT;
} else {
set_errno_from_neon_errcode(ret);
set_errno_from_neon_errcode(ctx, ret);
}
}
@@ -295,7 +228,7 @@ void fetch_resource_list_recursive(const char *uri, const char *curi)
DEBUG_WEBDAV("ERROR: Content type of propfind request not XML: %s.",
content_type ? content_type: "<empty>");
errno = ERRNO_WRONG_CONTENT;
set_error_message("Server error: PROPFIND reply is not XML formatted!");
set_error_message(ctx, "Server error: PROPFIND reply is not XML formatted!");
ret = NE_CONNECT;
}
}
@@ -303,7 +236,7 @@ void fetch_resource_list_recursive(const char *uri, const char *curi)
if( ret != NE_OK ) {
const char *err = NULL;
err = ne_get_error( dav_session.ctx );
err = ne_get_error( ctx->dav_session.ctx );
DEBUG_WEBDAV("WRN: propfind named failed with %d, request error: %s", ret, err ? err : "<nil>");
}
@@ -318,22 +251,21 @@ void fetch_resource_list_recursive(const char *uri, const char *curi)
}
/* Called by owncloud_opendir()->fetch_resource_list() to fill the cache */
extern struct listdir_context *propfind_cache;
void fill_recursive_propfind_cache(const char *uri, const char *curi) {
fetch_resource_list_recursive(uri, curi);
void fill_recursive_propfind_cache(csync_owncloud_ctx_t *ctx, const char *uri, const char *curi) {
fetch_resource_list_recursive(ctx, uri, curi);
if (propfind_recursive_cache_depth <= 2) {
if (ctx->propfind_recursive_cache_depth <= 2) {
DEBUG_WEBDAV("fill_recursive_propfind_cache %s Server maybe did not give us an 'infinity' depth result", curi);
/* transform the cache to the normal cache in propfind_cache */
propfind_cache = get_listdir_context_from_recursive_cache(curi);
ctx->propfind_cache = get_listdir_context_from_recursive_cache(ctx, curi);
/* clear the cache, it is bogus since the server returned only results for Depth 1 */
clear_propfind_recursive_cache();
clear_propfind_recursive_cache(ctx);
} else {
DEBUG_WEBDAV("fill_recursive_propfind_cache %s We received %d elements deep for 'infinity' depth (%d folders, %d files)",
curi,
propfind_recursive_cache_depth,
propfind_recursive_cache_folder_count,
propfind_recursive_cache_file_count);
ctx->propfind_recursive_cache_depth,
ctx->propfind_recursive_cache_folder_count,
ctx->propfind_recursive_cache_file_count);
}
}

View File

@@ -20,13 +20,15 @@
*/
#include "csync_owncloud.h"
#include "csync_owncloud_private.h"
#include "csync_misc.h"
void set_error_message( const char *msg )
void set_error_message( csync_owncloud_ctx_t *ctx, const char *msg )
{
SAFE_FREE(dav_session.error_string);
SAFE_FREE(ctx->dav_session.error_string);
if( msg )
dav_session.error_string = c_strdup(msg);
ctx->dav_session.error_string = c_strdup(msg);
}
void set_errno_from_http_errcode( int err ) {
@@ -104,12 +106,12 @@ void set_errno_from_http_errcode( int err ) {
errno = new_errno;
}
int http_result_code_from_session() {
const char *p = ne_get_error( dav_session.ctx );
int http_result_code_from_session(csync_owncloud_ctx_t *ctx) {
const char *p = ne_get_error( ctx->dav_session.ctx );
char *q;
int err;
set_error_message(p); /* remember the error message */
set_error_message(ctx, p); /* remember the error message */
err = strtol(p, &q, 10);
if (p == q) {
@@ -118,8 +120,8 @@ int http_result_code_from_session() {
return err;
}
void set_errno_from_session() {
int err = http_result_code_from_session();
void set_errno_from_session(csync_owncloud_ctx_t *ctx) {
int err = http_result_code_from_session(ctx);
if( err == EIO || err == ERRNO_ERROR_STRING) {
errno = err;
@@ -128,7 +130,7 @@ void set_errno_from_session() {
}
}
void set_errno_from_neon_errcode( int neon_code ) {
void set_errno_from_neon_errcode(csync_owncloud_ctx_t *ctx, int neon_code ) {
if( neon_code != NE_OK ) {
DEBUG_WEBDAV("Neon error code was %d", neon_code);
@@ -137,7 +139,7 @@ void set_errno_from_neon_errcode( int neon_code ) {
switch(neon_code) {
case NE_OK: /* Success, but still the possiblity of problems */
case NE_ERROR: /* Generic error; use ne_get_error(session) for message */
set_errno_from_session(); /* Something wrong with http communication */
set_errno_from_session(ctx); /* Something wrong with http communication */
break;
case NE_LOOKUP: /* Server or proxy hostname lookup failed */
errno = ERRNO_LOOKUP_ERROR;
@@ -279,19 +281,9 @@ time_t oc_httpdate_parse( const char *date ) {
/*
* helper: convert a resource struct to file_stat struct.
*/
csync_vio_file_stat_t *resourceToFileStat( struct resource *res )
void resourceToFileStat(csync_vio_file_stat_t *lfs, struct resource *res )
{
csync_vio_file_stat_t *lfs = NULL;
if( ! res ) {
return NULL;
}
lfs = c_malloc(sizeof(csync_vio_file_stat_t));
if (lfs == NULL) {
errno = ENOMEM;
return NULL;
}
ZERO_STRUCTP(lfs);
lfs->name = c_strdup( res->name );
@@ -312,55 +304,177 @@ csync_vio_file_stat_t *resourceToFileStat( struct resource *res )
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_SIZE;
if( res->md5 ) {
lfs->etag = c_strdup(res->md5);
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_ETAG;
}
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_ETAG;
csync_vio_file_stat_set_file_id(lfs, res->file_id);
return lfs;
}
/* WebDAV does not deliver permissions. Set a default here. */
int _stat_perms( int type ) {
int ret = 0;
if( type == CSYNC_VIO_FILE_TYPE_DIRECTORY ) {
/* DEBUG_WEBDAV("Setting mode in stat (dir)"); */
/* directory permissions */
ret = S_IFDIR | S_IRUSR | S_IWUSR | S_IXUSR /* directory, rwx for user */
| S_IRGRP | S_IXGRP /* rx for group */
| S_IROTH | S_IXOTH; /* rx for others */
} else {
/* regualar file permissions */
/* DEBUG_WEBDAV("Setting mode in stat (file)"); */
ret = S_IFREG | S_IRUSR | S_IWUSR /* regular file, user read & write */
| S_IRGRP /* group read perm */
| S_IROTH; /* others read perm */
if (res->directDownloadUrl) {
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADURL;
lfs->directDownloadUrl = c_strdup(res->directDownloadUrl);
}
if (res->directDownloadCookies) {
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES;
lfs->directDownloadCookies = c_strdup(res->directDownloadCookies);
}
if (strlen(res->remotePerm) > 0) {
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERM;
strncpy(lfs->remotePerm, res->remotePerm, sizeof(lfs->remotePerm));
}
return ret;
}
void oc_notify_progress(const char *file, enum csync_notify_type_e kind, int64_t current_size, int64_t full_size)
void fill_webdav_properties_into_resource(struct resource* newres, const ne_prop_result_set *set)
{
csync_progress_callback progress_cb = csync_get_progress_callback(dav_session.csync_ctx);
const char *clength, *modtime, *file_id = NULL;
const char *directDownloadUrl = NULL;
const char *directDownloadCookies = NULL;
const char *resourcetype = NULL;
const char *etag = NULL;
const char *perm = NULL;
csync_overall_progress_t overall_progress;
ZERO_STRUCT(overall_progress);
modtime = ne_propset_value( set, &ls_props[0] );
clength = ne_propset_value( set, &ls_props[1] );
resourcetype = ne_propset_value( set, &ls_props[2] );
etag = ne_propset_value( set, &ls_props[3] );
file_id = ne_propset_value( set, &ls_props[4] );
directDownloadUrl = ne_propset_value( set, &ls_props[5] );
directDownloadCookies = ne_propset_value( set, &ls_props[6] );
perm = ne_propset_value( set, &ls_props[7] );
if( dav_session.overall_progress_data) {
overall_progress = *dav_session.overall_progress_data;
}
if( resourcetype && strncmp( resourcetype, "<DAV:collection>", 16 ) == 0) {
newres->type = resr_collection;
} else {
newres->type = resr_normal;
}
if (progress_cb) {
CSYNC_PROGRESS progress;
progress.kind = kind;
progress.path = file;
progress.curr_bytes = current_size;
progress.file_size = full_size;
progress.overall_transmission_size = overall_progress.byte_sum;
progress.current_overall_bytes = overall_progress.byte_current+current_size;
progress.overall_file_count = overall_progress.file_count;
progress.current_file_no = overall_progress.current_file_no;
if (modtime) {
newres->modtime = oc_httpdate_parse(modtime);
}
progress_cb(&progress, csync_get_userdata(dav_session.csync_ctx));
}
/* DEBUG_WEBDAV("Parsing Modtime: %s -> %llu", modtime, (unsigned long long) newres->modtime ); */
newres->size = 0;
if (clength) {
newres->size = atoll(clength);
/* DEBUG_WEBDAV("Parsed File size for %s from %s: %lld", newres->name, clength, (long long)newres->size ); */
}
if( etag ) {
newres->md5 = csync_normalize_etag(etag);
}
csync_vio_set_file_id(newres->file_id, file_id);
/*
DEBUG_WEBDAV("propfind_results_recursive %s [%s] %s", newres->uri, newres->type == resr_collection ? "collection" : "file", newres->md5);
*/
if (directDownloadUrl) {
newres->directDownloadUrl = c_strdup(directDownloadUrl);
}
if (directDownloadCookies) {
newres->directDownloadCookies = c_strdup(directDownloadCookies);
}
if (perm && !perm[0]) {
// special meaning for our code: server returned permissions but are empty
// meaning only reading is allowed for this resource
newres->remotePerm[0] = ' ';
// see _csync_detect_update()
} else if (perm && strlen(perm) < sizeof(newres->remotePerm)) {
strncpy(newres->remotePerm, perm, sizeof(newres->remotePerm));
} else {
// old server, keep newres->remotePerm empty
}
}
struct resource* resource_dup(struct resource* o) {
struct resource *r = c_malloc (sizeof( struct resource ));
ZERO_STRUCTP(r);
r->uri = c_strdup(o->uri);
r->name = c_strdup(o->name);
r->type = o->type;
r->size = o->size;
r->modtime = o->modtime;
if( o->md5 ) {
r->md5 = c_strdup(o->md5);
}
if (o->directDownloadUrl) {
r->directDownloadUrl = c_strdup(o->directDownloadUrl);
}
if (o->directDownloadCookies) {
r->directDownloadCookies = c_strdup(o->directDownloadCookies);
}
if (o->remotePerm) {
strncpy(r->remotePerm, o->remotePerm, sizeof(r->remotePerm));
}
r->next = o->next;
csync_vio_set_file_id(r->file_id, o->file_id);
return r;
}
void resource_free(struct resource* o) {
struct resource* old = NULL;
while (o)
{
old = o;
o = o->next;
SAFE_FREE(old->uri);
SAFE_FREE(old->name);
SAFE_FREE(old->md5);
SAFE_FREE(old->directDownloadUrl);
SAFE_FREE(old->directDownloadCookies);
SAFE_FREE(old);
}
}
void free_fetchCtx( struct listdir_context *ctx )
{
struct resource *newres, *res;
if( ! ctx ) return;
newres = ctx->list;
res = newres;
ctx->ref--;
if (ctx->ref > 0) return;
SAFE_FREE(ctx->target);
while( res ) {
SAFE_FREE(res->uri);
SAFE_FREE(res->name);
SAFE_FREE(res->md5);
memset( res->file_id, 0, FILE_ID_BUF_SIZE+1 );
SAFE_FREE(res->directDownloadUrl);
SAFE_FREE(res->directDownloadCookies);
newres = res->next;
SAFE_FREE(res);
res = newres;
}
SAFE_FREE(ctx);
}
// as per http://sourceforge.net/p/predef/wiki/OperatingSystems/
// extend as required
const char* csync_owncloud_get_platform() {
#if defined (_WIN32)
return "Windows";
#elif defined(__APPLE__)
return "Macintosh";
#elif defined(__gnu_linux__)
return "Linux";
#elif defined(__DragonFly__)
/* might also define __FreeBSD__ */
return "DragonFlyBSD";
#elif defined(__FreeBSD__)
return "FreeBSD";
#elif defined(__NetBSD__)
return "NetBSD";
#elif defined(__OpenBSD__)
return "OpenBSD";
#elif defined(sun) || defined(__sun)
return "Solaris";
#else
return "Unknown OS";
#endif
}

View File

@@ -37,8 +37,8 @@
#include <sqlite3.h>
#include "config_csync.h"
#include "c_lib.h"
#include "c_private.h"
#include "std/c_lib.h"
#include "std/c_private.h"
#include "csync.h"
#include "csync_misc.h"
#include "vio/csync_vio_file_stat.h"
@@ -54,7 +54,6 @@
#include <sys/iconv.h>
#endif
#include "vio/csync_vio_method.h"
#include "csync_macros.h"
/**
@@ -62,18 +61,6 @@
*/
#define MAX_DEPTH 50
/**
* Maximum time difference between two replicas in seconds
*/
#define MAX_TIME_DIFFERENCE 10
/**
* Maximum size of a buffer for transfer
*/
#ifndef MAX_XFER_BUF_SIZE
#define MAX_XFER_BUF_SIZE (16 * 1024)
#endif
#define CSYNC_STATUS_INIT 1 << 0
#define CSYNC_STATUS_UPDATE 1 << 1
#define CSYNC_STATUS_RECONCILE 1 << 2
@@ -91,13 +78,14 @@ enum csync_replica_e {
typedef struct csync_file_stat_s csync_file_stat_t;
struct csync_owncloud_ctx_s; // csync_owncloud.c
/**
* @brief csync public structure
*/
struct csync_s {
struct {
csync_auth_callback auth_function;
csync_progress_callback progress_cb;
void *userdata;
} callbacks;
c_strlist_t *excludes;
@@ -106,7 +94,10 @@ struct csync_s {
char *file;
sqlite3 *db;
int exists;
int disabled;
sqlite3_stmt* by_hash_stmt;
sqlite3_stmt* by_fileid_stmt;
sqlite3_stmt* by_inode_stmt;
} statedb;
struct {
@@ -126,34 +117,11 @@ struct csync_s {
c_list_t *ignored_cleanup;
} remote;
struct {
csync_vio_method_t *method;
csync_vio_method_finish_fn finish_fn;
csync_vio_capabilities_t capabilities;
} module;
struct {
int max_depth;
int max_time_difference;
int sync_symbolic_links;
int unix_extensions;
char *config_dir;
bool with_conflict_copys;
bool local_only_mode;
int timeout;
#if defined(HAVE_ICONV) && defined(WITH_ICONV)
iconv_t iconv_cd;
#endif
} options;
struct {
uid_t uid;
uid_t euid;
} pwd;
csync_overall_progress_t overall_progress;
struct csync_progressinfo_s *progress_info;
iconv_t iconv_cd;
} options;
#endif
/* replica we are currently walking */
enum csync_replica_e current;
@@ -173,6 +141,9 @@ struct csync_s {
int status;
volatile int abort;
void *rename_info;
int read_from_db_disabled;
struct csync_owncloud_ctx_s *owncloud_context;
};
@@ -185,8 +156,6 @@ struct csync_file_stat_s {
int64_t size; /* u64 */
size_t pathlen; /* u64 */
uint64_t inode; /* u64 */
uid_t uid; /* u32 */
gid_t gid; /* u32 */
mode_t mode; /* u32 */
int nlink; /* u32 */
int type; /* u32 */
@@ -196,6 +165,10 @@ struct csync_file_stat_s {
char *destpath; /* for renames */
const char *etag;
char file_id[FILE_ID_BUF_SIZE+1]; /* the ownCloud file id is fixed width of 21 byte. */
char *directDownloadUrl;
char *directDownloadCookies;
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
CSYNC_STATUS error_status;
enum csync_instructions_e instruction; /* u32 */
@@ -222,6 +195,7 @@ struct _csync_treewalk_context_s
};
typedef struct _csync_treewalk_context_s _csync_treewalk_context;
/**
* }@
*/

View File

@@ -35,6 +35,39 @@
#define ACCEPTED_TIME_DIFF 5
#define ONE_HOUR 3600
/* Check if a file is ignored because one parent is ignored.
* return the node of the ignored directoy if it's the case, or NULL if it is not ignored */
static c_rbnode_t *_csync_check_ignored(c_rbtree_t *tree, const char *path, int pathlen) {
uint64_t h = 0;
c_rbnode_t *node = NULL;
/* compute the size of the parent directory */
int parentlen = pathlen - 1;
while (parentlen > 0 && path[parentlen] != '/') {
parentlen--;
}
if (parentlen <= 0) {
return NULL;
}
h = c_jhash64((uint8_t *) path, parentlen, 0);
node = c_rbtree_find(tree, &h);
if (node) {
csync_file_stat_t *n = (csync_file_stat_t*)node->data;
if (n->instruction == CSYNC_INSTRUCTION_IGNORE) {
/* Yes, we are ignored */
return node;
} else {
/* Not ignored */
return NULL;
}
} else {
/* Try if the parent itself is ignored */
return _csync_check_ignored(tree, path, parentlen);
}
}
/*
* We merge replicas at the file level. The merged replica contains the
* superset of files that are on the local machine and server copies of
@@ -86,6 +119,11 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
}
SAFE_FREE(renamed_path);
}
if (!node) {
/* Check if it is ignored */
node = _csync_check_ignored(tree, cur->path, cur->pathlen);
/* If it is ignored, other->instruction will be IGNORE so this one will also be ignored */
}
/* file only found on current replica */
if (node == NULL) {
@@ -101,11 +139,11 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
case CSYNC_INSTRUCTION_EVAL_RENAME:
if(ctx->current == LOCAL_REPLICA ) {
/* use the old name to find the "other" node */
tmp = csync_statedb_get_stat_by_inode(ctx->statedb.db, cur->inode);
tmp = csync_statedb_get_stat_by_inode(ctx, cur->inode);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Finding opposite temp through inode %" PRIu64 ": %s",
cur->inode, tmp ? "true":"false");
} else if( ctx->current == REMOTE_REPLICA ) {
tmp = csync_statedb_get_stat_by_file_id(ctx->statedb.db, cur->file_id);
tmp = csync_statedb_get_stat_by_file_id(ctx, cur->file_id);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Finding opposite temp through file ID %s: %s",
cur->file_id, tmp ? "true":"false");
} else {
@@ -145,6 +183,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
if( !c_streq(cur->file_id, "") ) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_etag = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
other->instruction = CSYNC_INSTRUCTION_RENAME;
@@ -153,7 +193,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
if( !c_streq(cur->file_id, "") ) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_etag = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
@@ -185,38 +226,43 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
/* file on current replica is changed or new */
case CSYNC_INSTRUCTION_EVAL:
case CSYNC_INSTRUCTION_NEW:
// This operation is usually a no-op and will by default return false
if (csync_file_locked_or_open(ctx->local.uri, cur->path)) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "[Reconciler] IGNORING file %s/%s since it is locked / open", ctx->local.uri, cur->path);
cur->instruction = CSYNC_INSTRUCTION_ERROR;
if (cur->error_status == CSYNC_STATUS_OK) // don't overwrite error
cur->error_status = CYSNC_STATUS_FILE_LOCKED_OR_OPEN;
break;
} else {
//CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "[Reconciler] not ignoring file %s/%s", ctx->local.uri, cur->path);
}
switch (other->instruction) {
/* file on other replica is changed or new */
case CSYNC_INSTRUCTION_NEW:
case CSYNC_INSTRUCTION_EVAL:
if (other->type == CSYNC_VIO_FILE_TYPE_DIRECTORY &&
cur->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) {
if (other->type == CSYNC_FTW_TYPE_DIR &&
cur->type == CSYNC_FTW_TYPE_DIR) {
is_equal_files = (other->modtime == cur->modtime);
} else {
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
}
if (is_equal_files) {
/* The files are considered equal. */
cur->instruction = CSYNC_INSTRUCTION_UPDATED; /* update the DB */
cur->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 */
if (ctx->current == LOCAL_REPLICA) {
other->should_update_etag = true;
} else {
cur->should_update_etag = true;
}
} else if(ctx->current == REMOTE_REPLICA) {
if(ctx->options.with_conflict_copys) {
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
other->instruction = CSYNC_INSTRUCTION_NONE;
} else {
cur->instruction = CSYNC_INSTRUCTION_SYNC;
other->instruction = CSYNC_INSTRUCTION_NONE;
}
} else {
if(ctx->options.with_conflict_copys) {
cur->instruction = CSYNC_INSTRUCTION_NONE;
other->instruction = CSYNC_INSTRUCTION_CONFLICT;
} else {
cur->instruction = CSYNC_INSTRUCTION_NONE;
other->instruction = CSYNC_INSTRUCTION_SYNC;
}
}
break;

View File

@@ -53,19 +53,6 @@ struct csync_rename_s {
std::vector<renameop> todo;
};
static int _csync_rename_record(void *obj, void *data) {
CSYNC *ctx = reinterpret_cast<CSYNC*>(data);
csync_rename_s* d = csync_rename_s::get(ctx);
csync_file_stat_t *st = reinterpret_cast<csync_file_stat_t *>(obj);
if ( st->instruction != CSYNC_INSTRUCTION_RENAME)
return 0;
csync_rename_s::renameop op = { st };
d->todo.push_back(op);
return 0;
}
extern "C" {
void csync_rename_destroy(CSYNC* ctx)
{

View File

@@ -32,6 +32,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <inttypes.h>
#include "c_lib.h"
#include "csync_private.h"
@@ -48,9 +49,6 @@
#include "csync_rename.h"
#define BUF_SIZE 16
#define HASH_QUERY "SELECT * FROM metadata WHERE phash=?1"
static sqlite3_stmt* _by_hash_stmt = NULL;
void csync_set_statedb_exists(CSYNC *ctx, int val) {
ctx->statedb.exists = val;
@@ -60,29 +58,6 @@ int csync_get_statedb_exists(CSYNC *ctx) {
return ctx->statedb.exists;
}
/* Set the hide attribute in win32. That makes it invisible in normal explorers */
static void _csync_win32_hide_file( const char *file ) {
#ifdef _WIN32
mbchar_t *fileName;
DWORD dwAttrs;
if( !file ) return;
fileName = c_utf8_to_locale( file );
dwAttrs = GetFileAttributesW(fileName);
if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
if (!(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
}
c_free_locale_string(fileName);
#else
(void) file;
#endif
}
static int _csync_check_db_integrity(sqlite3 *db) {
c_strlist_t *result = NULL;
int rc = -1;
@@ -158,6 +133,8 @@ static int _csync_statedb_check(const char *statedb) {
}
}
}
} else {
close(fd);
}
/* if it comes here, the database is broken and should be recreated. */
_tunlink(wstatedb);
@@ -169,7 +146,7 @@ static int _csync_statedb_check(const char *statedb) {
rc = sqlite3_open(statedb, &db);
if (rc == SQLITE_OK) {
sqlite3_close(db);
_csync_win32_hide_file(statedb);
csync_win32_set_file_hidden(statedb, true);
return 1;
}
sqlite3_close(db);
@@ -190,13 +167,26 @@ static int _csync_statedb_is_empty(sqlite3 *db) {
return rc;
}
#ifndef NDEBUG
static void sqlite_profile( void *x, const char* sql, sqlite3_uint64 time)
{
(void)x;
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"_SQL_ %s: %llu", sql, time);
}
#endif
int csync_statedb_load(CSYNC *ctx, const char *statedb, sqlite3 **pdb) {
int rc = -1;
int check_rc = -1;
c_strlist_t *result = NULL;
char *statedb_tmp = NULL;
sqlite3 *db = NULL;
if( !ctx ) {
return -1;
}
/* csync_statedb_check tries to open the statedb and creates it in case
* its not there.
*/
@@ -208,30 +198,8 @@ int csync_statedb_load(CSYNC *ctx, const char *statedb, sqlite3 **pdb) {
goto out;
}
/*
* We want a two phase commit for the jounal, so we create a temporary copy
* of the database.
* The intention is that if something goes wrong we will not loose the
* statedb.
*/
rc = asprintf(&statedb_tmp, "%s.ctmp", statedb);
if (rc < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_NOTICE, "ERR: could not create statedb name - bail out.");
rc = -1;
goto out;
}
if (c_copy(statedb, statedb_tmp, 0644) < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_NOTICE, "ERR: Failed to copy statedb -> statedb_tmp - bail out.");
rc = -1;
goto out;
}
_csync_win32_hide_file( statedb_tmp );
/* Open or create the temporary database */
if (sqlite3_open(statedb_tmp, &db) != SQLITE_OK) {
if (sqlite3_open(statedb, &db) != SQLITE_OK) {
const char *errmsg= sqlite3_errmsg(ctx->statedb.db);
CSYNC_LOG(CSYNC_LOG_PRIORITY_NOTICE, "ERR: Failed to sqlite3 open statedb - bail out: %s.",
errmsg ? errmsg : "<no sqlite3 errormsg>");
@@ -239,7 +207,6 @@ int csync_statedb_load(CSYNC *ctx, const char *statedb, sqlite3 **pdb) {
rc = -1;
goto out;
}
SAFE_FREE(statedb_tmp);
/* If check_rc == 1 the database is new and empty as a result. */
if ((check_rc == 1) || _csync_statedb_is_empty(db)) {
@@ -255,327 +222,302 @@ int csync_statedb_load(CSYNC *ctx, const char *statedb, sqlite3 **pdb) {
result = csync_statedb_query(db, "PRAGMA case_sensitive_like = ON;");
c_strlist_destroy(result);
#ifndef NDEBUG
sqlite3_profile(db, sqlite_profile, 0 );
#endif
*pdb = db;
return 0;
out:
sqlite3_close(db);
SAFE_FREE(statedb_tmp);
return rc;
}
int csync_statedb_close(const char *statedb, sqlite3 *db, int jwritten) {
char *statedb_tmp = NULL;
mbchar_t* wstatedb_tmp = NULL;
int csync_statedb_close(CSYNC *ctx) {
int rc = 0;
mbchar_t *mb_statedb = NULL;
if (!ctx) {
return -1;
}
/* deallocate query resources */
rc = sqlite3_finalize(_by_hash_stmt);
_by_hash_stmt = NULL;
/* close the temporary database */
sqlite3_close(db);
if (asprintf(&statedb_tmp, "%s.ctmp", statedb) < 0) {
return -1;
if( ctx->statedb.by_hash_stmt ) {
rc = sqlite3_finalize(ctx->statedb.by_hash_stmt);
ctx->statedb.by_hash_stmt = NULL;
}
/* If we successfully synchronized, overwrite the original statedb */
/*
* Check the integrity of the tmp db. If ok, overwrite the old database with
* the tmp db.
*/
if (jwritten) {
/* statedb check returns either
* 0 : database exists and is fine
* 1 : new database was set up
* -1 : error.
*/
if (_csync_statedb_check(statedb_tmp) >= 0) {
/* New statedb is valid. */
mb_statedb = c_utf8_to_locale(statedb);
/* Move the tmp-db to the real one. */
if (c_rename(statedb_tmp, statedb) < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"Renaming tmp db to original db failed. (errno=%d)", errno);
rc = -1;
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"Successfully moved tmp db to original db.");
}
} else {
mb_statedb = c_utf8_to_locale(statedb_tmp);
_tunlink(mb_statedb);
/* new statedb_tmp is not integer. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, " ## csync tmp statedb corrupt. Original one is not replaced. ");
rc = -1;
}
c_free_locale_string(mb_statedb);
if( ctx->statedb.by_fileid_stmt ) {
rc = sqlite3_finalize(ctx->statedb.by_fileid_stmt);
ctx->statedb.by_fileid_stmt = NULL;
}
wstatedb_tmp = c_utf8_to_locale(statedb_tmp);
if (wstatedb_tmp) {
_tunlink(wstatedb_tmp);
c_free_locale_string(wstatedb_tmp);
if( ctx->statedb.by_inode_stmt ) {
rc = sqlite3_finalize(ctx->statedb.by_inode_stmt);
ctx->statedb.by_inode_stmt = NULL;
}
SAFE_FREE(statedb_tmp);
sqlite3_close(ctx->statedb.db);
return rc;
}
// This funciton parses a line from the metadata table into the given csync_file_stat
// structure which it is also allocating.
// Note that this function calls laso sqlite3_step to actually get the info from db and
// returns the sqlite return type.
static int _csync_file_stat_from_metadata_table( csync_file_stat_t **st, sqlite3_stmt *stmt )
{
int rc = SQLITE_ERROR;
int column_count;
int len;
if( ! stmt ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Fatal: Statement is NULL.");
return SQLITE_ERROR;
}
column_count = sqlite3_column_count(stmt);
rc = sqlite3_step(stmt);
if( rc == SQLITE_ROW ) {
if(column_count > 7) {
const char *name;
/* phash, pathlen, path, inode, uid, gid, mode, modtime */
len = sqlite3_column_int(stmt, 1);
*st = c_malloc(sizeof(csync_file_stat_t) + len + 1);
if (*st == NULL) {
return SQLITE_NOMEM;
}
/* clear the whole structure */
ZERO_STRUCTP(*st);
/* The query suceeded so use the phash we pass to the function. */
(*st)->phash = sqlite3_column_int64(stmt, 0);
(*st)->pathlen = sqlite3_column_int(stmt, 1);
name = (const char*) sqlite3_column_text(stmt, 2);
memcpy((*st)->path, (len ? name : ""), len + 1);
(*st)->inode = sqlite3_column_int64(stmt,3);
(*st)->mode = sqlite3_column_int(stmt, 6);
(*st)->modtime = strtoul((char*)sqlite3_column_text(stmt, 7), NULL, 10);
if(*st && column_count > 8 ) {
(*st)->type = sqlite3_column_int(stmt, 8);
}
if(column_count > 9 && sqlite3_column_text(stmt, 9)) {
(*st)->etag = c_strdup( (char*) sqlite3_column_text(stmt, 9) );
}
if(column_count > 10 && sqlite3_column_text(stmt,10)) {
csync_vio_set_file_id((*st)->file_id, (char*) sqlite3_column_text(stmt, 10));
}
if(column_count > 11 && sqlite3_column_text(stmt,11)) {
strncpy((*st)->remotePerm,
(char*) sqlite3_column_text(stmt, 11),
REMOTE_PERM_BUF_SIZE);
}
}
}
return rc;
}
/* caller must free the memory */
csync_file_stat_t *csync_statedb_get_stat_by_hash(sqlite3 *db,
csync_file_stat_t *csync_statedb_get_stat_by_hash(CSYNC *ctx,
uint64_t phash)
{
csync_file_stat_t *st = NULL;
size_t len = 0;
int column_count = 0;
int rc;
if( _by_hash_stmt == NULL ) {
rc = sqlite3_prepare_v2(db, HASH_QUERY, strlen(HASH_QUERY), &_by_hash_stmt, NULL);
if( rc != SQLITE_OK ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Unable to create stmt for hash query.");
if( !ctx ) {
return NULL;
}
}
if( _by_hash_stmt == NULL ) {
if( ctx->statedb.by_hash_stmt == NULL ) {
const char *hash_query = "SELECT * FROM metadata WHERE phash=?1";
rc = sqlite3_prepare_v2(ctx->statedb.db, hash_query, strlen(hash_query), &ctx->statedb.by_hash_stmt, NULL);
if( rc != SQLITE_OK ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Unable to create stmt for hash query.");
return NULL;
}
}
if( ctx->statedb.by_hash_stmt == NULL ) {
return NULL;
}
column_count = sqlite3_column_count(_by_hash_stmt);
sqlite3_bind_int64(ctx->statedb.by_hash_stmt, 1, (long long signed int)phash);
sqlite3_bind_int64(_by_hash_stmt, 1, (long long signed int)phash);
rc = sqlite3_step(_by_hash_stmt);
if( rc == SQLITE_ROW ) {
if(column_count > 7) {
/* phash, pathlen, path, inode, uid, gid, mode, modtime */
len = sqlite3_column_int(_by_hash_stmt, 1);
st = c_malloc(sizeof(csync_file_stat_t) + len + 1);
if (st == NULL) {
return NULL;
}
/* clear the whole structure */
ZERO_STRUCTP(st);
/*
* FIXME:
* We use an INTEGER(8) which is signed to the phash in the sqlite3 db,
* but the phash is an uint64_t. So for some values we get a string like
* "1.66514565505016e+19". For such a string strtoull() returns 1.
* phash = 1
*
* st->phash = strtoull(result->vector[0], NULL, 10);
*/
/* The query suceeded so use the phash we pass to the function. */
st->phash = phash;
st->pathlen = sqlite3_column_int(_by_hash_stmt, 1);
memcpy(st->path, (len ? (char*) sqlite3_column_text(_by_hash_stmt, 2) : ""), len + 1);
st->inode = sqlite3_column_int64(_by_hash_stmt,3);
st->uid = sqlite3_column_int(_by_hash_stmt, 4);
st->gid = sqlite3_column_int(_by_hash_stmt, 5);
st->mode = sqlite3_column_int(_by_hash_stmt, 6);
st->modtime = strtoul((char*)sqlite3_column_text(_by_hash_stmt, 7), NULL, 10);
if(st && column_count > 8 ) {
st->type = sqlite3_column_int(_by_hash_stmt, 8);
}
if(column_count > 9 && sqlite3_column_text(_by_hash_stmt, 9)) {
st->etag = c_strdup( (char*) sqlite3_column_text(_by_hash_stmt, 9) );
}
if(column_count > 10 && sqlite3_column_text(_by_hash_stmt,10)) {
csync_vio_set_file_id(st->file_id, (char*) sqlite3_column_text(_by_hash_stmt, 10));
}
}
} else {
/* SQLITE_DONE says there is no further row. That's not an error. */
if (rc != SQLITE_DONE) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "sqlite hash query fail: %s", sqlite3_errmsg(db));
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "No result record found for phash = %llu",
(long long unsigned int) phash);
SAFE_FREE(st);
if( _csync_file_stat_from_metadata_table(&st, ctx->statedb.by_hash_stmt) < 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Could not get line from metadata!");
}
sqlite3_reset(_by_hash_stmt);
sqlite3_reset(ctx->statedb.by_hash_stmt);
return st;
}
csync_file_stat_t *csync_statedb_get_stat_by_file_id( sqlite3 *db,
const char *file_id ) {
csync_file_stat_t *st = NULL;
c_strlist_t *result = NULL;
char *stmt = NULL;
size_t len = 0;
csync_file_stat_t *csync_statedb_get_stat_by_file_id(CSYNC *ctx,
const char *file_id ) {
csync_file_stat_t *st = NULL;
int rc = 0;
if (!file_id) {
return 0;
}
if (c_streq(file_id, "")) {
return 0;
}
stmt = sqlite3_mprintf("SELECT * FROM metadata WHERE fileid='%q'",
file_id);
if (!file_id) {
return 0;
}
if (c_streq(file_id, "")) {
return 0;
}
if (stmt == NULL) {
return NULL;
}
if( !ctx ) {
return NULL;
}
result = csync_statedb_query(db, stmt);
sqlite3_free(stmt);
if (result == NULL) {
return NULL;
}
if( ctx->statedb.by_fileid_stmt == NULL ) {
const char *query = "SELECT * FROM metadata WHERE fileid=?1";
if (result->count <= 6) {
c_strlist_destroy(result);
return NULL;
}
rc = sqlite3_prepare_v2(ctx->statedb.db, query, strlen(query), &ctx->statedb.by_fileid_stmt, NULL);
if( rc != SQLITE_OK ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Unable to create stmt for file id query.");
return NULL;
}
}
/* phash, pathlen, path, inode, uid, gid, mode, modtime */
len = strlen(result->vector[2]);
st = c_malloc(sizeof(csync_file_stat_t) + len + 1);
if (st == NULL) {
c_strlist_destroy(result);
return NULL;
}
/* clear the whole structure */
ZERO_STRUCTP(st);
/* bind the query value */
sqlite3_bind_text(ctx->statedb.by_fileid_stmt, 1, file_id, -1, SQLITE_STATIC);
st->phash = atoll(result->vector[0]);
st->pathlen = atoi(result->vector[1]);
memcpy(st->path, (len ? result->vector[2] : ""), len + 1);
st->inode = atoll(result->vector[3]);
st->uid = atoi(result->vector[4]);
st->gid = atoi(result->vector[5]);
st->mode = atoi(result->vector[6]);
st->modtime = strtoul(result->vector[7], NULL, 10);
st->type = atoi(result->vector[8]);
if( result->vector[9] )
st->etag = c_strdup(result->vector[9]);
csync_vio_set_file_id(st->file_id, file_id);
c_strlist_destroy(result);
return st;
}
if( _csync_file_stat_from_metadata_table(&st, ctx->statedb.by_fileid_stmt) < 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Could not get line from metadata!");
}
// clear the resources used by the statement.
sqlite3_reset(ctx->statedb.by_fileid_stmt);
return st;
}
/* caller must free the memory */
csync_file_stat_t *csync_statedb_get_stat_by_inode(sqlite3 *db,
uint64_t inode) {
csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx,
uint64_t inode)
{
csync_file_stat_t *st = NULL;
c_strlist_t *result = NULL;
char *stmt = NULL;
size_t len = 0;
int rc;
if (!inode) {
return NULL;
}
stmt = sqlite3_mprintf("SELECT * FROM metadata WHERE inode='%lld'",
(long long signed int) inode);
if (stmt == NULL) {
if( !ctx ) {
return NULL;
}
if( ctx->statedb.by_inode_stmt == NULL ) {
const char *inode_query = "SELECT * FROM metadata WHERE inode=?1";
rc = sqlite3_prepare_v2(ctx->statedb.db, inode_query, strlen(inode_query), &ctx->statedb.by_inode_stmt, NULL);
if( rc != SQLITE_OK ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Unable to create stmt for inode query.");
return NULL;
}
}
if( ctx->statedb.by_inode_stmt == NULL ) {
return NULL;
}
result = csync_statedb_query(db, stmt);
sqlite3_free(stmt);
if (result == NULL) {
return NULL;
sqlite3_bind_int64(ctx->statedb.by_inode_stmt, 1, (long long signed int)inode);
if( _csync_file_stat_from_metadata_table(&st, ctx->statedb.by_inode_stmt) < 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Could not get line from metadata by inode!");
}
if (result->count <= 6) {
c_strlist_destroy(result);
return NULL;
}
/* phash, pathlen, path, inode, uid, gid, mode, modtime */
len = strlen(result->vector[2]);
st = c_malloc(sizeof(csync_file_stat_t) + len + 1);
if (st == NULL) {
c_strlist_destroy(result);
return NULL;
}
/* clear the whole structure */
ZERO_STRUCTP(st);
st->phash = atoll(result->vector[0]);
st->pathlen = atoi(result->vector[1]);
memcpy(st->path, (len ? result->vector[2] : ""), len + 1);
st->inode = atoll(result->vector[3]);
st->uid = atoi(result->vector[4]);
st->gid = atoi(result->vector[5]);
st->mode = atoi(result->vector[6]);
st->modtime = strtoul(result->vector[7], NULL, 10);
st->type = atoi(result->vector[8]);
if( result->vector[9] )
st->etag = c_strdup(result->vector[9]);
csync_vio_set_file_id( st->file_id, result->vector[10]);
c_strlist_destroy(result);
sqlite3_reset(ctx->statedb.by_inode_stmt);
return st;
}
/* Get the etag. (it is called unique id for legacy reason
* and it is the field md5 in the database for legacy reason */
char *csync_statedb_get_uniqId( CSYNC *ctx, uint64_t jHash, csync_vio_file_stat_t *buf ) {
/* Get the etag. */
char *csync_statedb_get_etag( CSYNC *ctx, uint64_t jHash ) {
char *ret = NULL;
c_strlist_t *result = NULL;
char *stmt = NULL;
(void)buf;
csync_file_stat_t *fs = NULL;
if( !ctx ) {
return NULL;
}
if( ! csync_get_statedb_exists(ctx)) return ret;
stmt = sqlite3_mprintf("SELECT md5, fileid FROM metadata WHERE phash='%lld'", jHash);
result = csync_statedb_query(ctx->statedb.db, stmt);
sqlite3_free(stmt);
if (result == NULL) {
return NULL;
fs = csync_statedb_get_stat_by_hash(ctx, jHash );
if( fs ) {
if( fs->etag ) {
ret = c_strdup(fs->etag);
}
csync_file_stat_free(fs);
}
if (result->count == 2) {
ret = c_strdup( result->vector[0] );
csync_vio_file_stat_set_file_id(buf, result->vector[1]);
}
c_strlist_destroy(result);
return ret;
}
c_strlist_t *csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
c_strlist_t *list = NULL;
char *stmt = NULL;
#define BELOW_PATH_QUERY "SELECT phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm FROM metadata WHERE path LIKE(?)"
stmt = sqlite3_mprintf("SELECT phash, path, inode, uid, gid, mode, modtime, type, md5, fileid "
"FROM metadata WHERE path LIKE('%q/%%')", path);
if (stmt == NULL) {
return NULL;
int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
int rc;
sqlite3_stmt *stmt = NULL;
int64_t cnt = 0;
char *likepath;
int asp;
if( !path ) {
return -1;
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "SQL: %s", stmt);
if( !ctx ) {
return -1;
}
list = csync_statedb_query( ctx->statedb.db, stmt );
rc = sqlite3_prepare_v2(ctx->statedb.db, BELOW_PATH_QUERY, -1, &stmt, NULL);
if( rc != SQLITE_OK ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "WRN: Unable to create stmt for hash query.");
return -1;
}
sqlite3_free(stmt);
if (stmt == NULL) {
return -1;
}
return list;
asp = asprintf( &likepath, "%s/%%%%", path);
if (asp < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
return -1;
}
sqlite3_bind_text(stmt, 1, likepath, -1, SQLITE_STATIC);
cnt = 0;
do {
csync_file_stat_t *st = NULL;
rc = _csync_file_stat_from_metadata_table( &st, stmt);
if( st ) {
/* store into result list. */
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
SAFE_FREE(st);
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
break;
}
cnt++;
}
} while( rc == SQLITE_ROW );
if( rc != SQLITE_DONE ) {
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "%" PRId64 " entries read below path %s from db.", cnt, path);
}
sqlite3_finalize(stmt);
SAFE_FREE(likepath);
return 0;
}
/* query the statedb, caller must free the memory */

View File

@@ -33,6 +33,10 @@
#ifndef _CSYNC_STATEDB_H
#define _CSYNC_STATEDB_H
#ifdef __cplusplus
extern "C" {
#endif
#include "c_lib.h"
#include "csync_private.h"
@@ -54,16 +58,15 @@ int csync_get_statedb_exists(CSYNC *ctx);
*/
int csync_statedb_load(CSYNC *ctx, const char *statedb, sqlite3 **pdb);
int csync_statedb_close(const char *statedb, sqlite3 *db, int jwritten);
int csync_statedb_close(CSYNC *ctx);
csync_file_stat_t *csync_statedb_get_stat_by_hash(sqlite3 *db, uint64_t phash);
csync_file_stat_t *csync_statedb_get_stat_by_hash(CSYNC *ctx, uint64_t phash);
csync_file_stat_t *csync_statedb_get_stat_by_inode(sqlite3 *db, uint64_t inode);
csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx, uint64_t inode);
csync_file_stat_t *csync_statedb_get_stat_by_file_id( sqlite3 *db,
const char *file_id );
csync_file_stat_t *csync_statedb_get_stat_by_file_id(CSYNC *ctx, const char *file_id);
char *csync_statedb_get_uniqId(CSYNC *ctx, uint64_t jHash, csync_vio_file_stat_t *buf);
char *csync_statedb_get_etag(CSYNC *ctx, uint64_t jHash);
/**
* @brief Query all files metadata inside and below a path.
@@ -82,7 +85,7 @@ char *csync_statedb_get_uniqId(CSYNC *ctx, uint64_t jHash, csync_vio_file_stat_t
*
* @return A stringlist containing a multiple of 9 entries.
*/
c_strlist_t *csync_statedb_get_below_path(CSYNC *ctx, const char *path);
int csync_statedb_get_below_path(CSYNC *ctx, const char *path);
/**
* @brief A generic statedb query.
@@ -116,6 +119,10 @@ typedef struct csync_progressinfo_s {
char *error_string;
} csync_progressinfo_t;
#ifdef __cplusplus
}
#endif
/**
* }@
*/

View File

@@ -62,115 +62,4 @@ int csync_gettime(struct timespec *tp)
#undef CSYNC_CLOCK
/* check time difference between the replicas */
time_t csync_timediff(CSYNC *ctx) {
time_t timediff = -1;
char errbuf[256] = {0};
char *luri = NULL;
char *ruri = NULL;
csync_vio_handle_t *fp = NULL;
csync_vio_file_stat_t *st = NULL;
csync_vio_handle_t *dp = NULL;
/* try to open remote dir to get auth */
ctx->replica = ctx->remote.type;
dp = csync_vio_opendir(ctx, ctx->remote.uri);
if (dp == NULL) {
/*
* To prevent problems especially with pam_csync we shouldn't try to create the
* remote directory here. Just fail!
*/
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Access dienied to remote uri: %s - %s",
ctx->remote.uri,
errbuf);
ctx->status_code = CSYNC_STATUS_REMOTE_ACCESS_ERROR;
return -1;
}
csync_vio_closedir(ctx, dp);
if (asprintf(&luri, "%s/.csync_timediff.ctmp", ctx->local.uri) < 0) {
goto out;
}
if (asprintf(&ruri, "%s/.csync_timediff.ctmp", ctx->remote.uri) < 0) {
goto out;
}
/* create temporary file on local */
ctx->replica = ctx->local.type;
fp = csync_vio_creat(ctx, luri, 0644);
if (fp == NULL) {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Unable to create temporary file: %s - %s",
luri,
errbuf);
ctx->status_code = CSYNC_STATUS_LOCAL_CREATE_ERROR;
goto out;
}
csync_vio_close(ctx, fp);
/* Get the modification time */
st = csync_vio_file_stat_new();
if (csync_vio_stat(ctx, luri, st) < 0) {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Synchronisation is not possible! %s - %s",
luri,
errbuf);
ctx->status_code = CSYNC_STATUS_LOCAL_STAT_ERROR;
goto out;
}
timediff = st->mtime;
csync_vio_file_stat_destroy(st);
st = NULL;
/* create temporary file on remote replica */
ctx->replica = ctx->remote.type;
fp = csync_vio_creat(ctx, ruri, 0644);
if (fp == NULL) {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Unable to create temporary file: %s - %s",
ruri,
errbuf);
ctx->status_code = CSYNC_STATUS_REMOTE_CREATE_ERROR;
goto out;
}
csync_vio_close(ctx, fp);
/* Get the modification time */
st = csync_vio_file_stat_new();
if (csync_vio_stat(ctx, ruri, st) < 0) {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL,
"Synchronisation is not possible! %s - %s",
ruri,
errbuf);
ctx->status_code = CSYNC_STATUS_REMOTE_STAT_ERROR;
goto out;
}
/* calc time difference */
timediff = llabs(timediff - st->mtime);
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Time difference: %ld seconds", timediff);
out:
csync_vio_file_stat_destroy(st);
ctx->replica = ctx->local.type;
csync_vio_unlink(ctx, luri);
SAFE_FREE(luri);
ctx->replica = ctx->remote.type;
csync_vio_unlink(ctx, ruri);
SAFE_FREE(ruri);
return timediff;
}
/* vim: set ts=8 sw=2 et cindent: */

View File

@@ -26,6 +26,5 @@
#include "csync_private.h"
int csync_gettime(struct timespec *tp);
time_t csync_timediff(CSYNC *ctx);
#endif /* _CSYNC_TIME_H */

View File

@@ -79,6 +79,26 @@ static uint64_t _hash_of_file(CSYNC *ctx, const char *file) {
return h;
}
#ifdef NO_RENAME_EXTENSION
/* Return true if the two path have the same extension. false otherwise. */
static bool _csync_sameextension(const char *p1, const char *p2) {
/* Find pointer to the extensions */
const char *e1 = strrchr(p1, '.');
const char *e2 = strrchr(p2, '.');
/* If the found extension contains a '/', it is because the . was in the folder name
* => no extensions */
if (e1 && strchr(e1, '/')) e1 = NULL;
if (e2 && strchr(e2, '/')) e2 = NULL;
/* If none have extension, it is the same extension */
if (!e1 && !e2)
return true;
/* c_streq takes care of the rest */
return c_streq(e1, e2);
}
#endif
static int _csync_detect_update(CSYNC *ctx, const char *file,
const csync_vio_file_stat_t *fs, const int type) {
@@ -154,8 +174,6 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
ctx->status_code = CSYNC_STATUS_MEMORY_ERROR;
return -1;
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "==> file: %s - hash %llu, mtime: %llu, fileId: %s",
path, (unsigned long long ) h, (unsigned long long) fs->mtime, fs->file_id);
/* Set instruction by default to none */
st->instruction = CSYNC_INSTRUCTION_NONE;
@@ -170,7 +188,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
if (fs->mtime == 0) {
tmp = csync_statedb_get_stat_by_hash(ctx->statedb.db, h);
tmp = csync_statedb_get_stat_by_hash(ctx, h);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s - mtime is zero!", path);
if (tmp == NULL) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s - not found in db, IGNORE!", path);
@@ -206,7 +224,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
* does not change on rename.
*/
if (csync_get_statedb_exists(ctx)) {
tmp = csync_statedb_get_stat_by_hash(ctx->statedb.db, h);
tmp = csync_statedb_get_stat_by_hash(ctx, h);
if(tmp && tmp->phash == h ) { /* there is an entry in the database */
/* we have an update! */
@@ -236,20 +254,36 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
st->instruction = CSYNC_INSTRUCTION_EVAL;
goto out;
}
bool metadata_differ = (ctx->current == REMOTE_REPLICA && (!c_streq(fs->file_id, tmp->file_id)
|| !c_streq(fs->remotePerm, tmp->remotePerm)))
|| (ctx->current == LOCAL_REPLICA && fs->inode != tmp->inode);
if (type == CSYNC_FTW_TYPE_DIR && ctx->current == REMOTE_REPLICA
&& c_streq(fs->file_id, tmp->file_id)) {
&& !metadata_differ && !ctx->read_from_db_disabled) {
/* If both etag and file id are equal for a directory, read all contents from
* the database. */
* the database.
* The metadata comparison ensure that we fetch all the file id or permission when
* upgrading owncloud
*/
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Reading from database: %s", path);
ctx->remote.read_from_db = true;
}
if (metadata_differ) {
/* file id or permissions has changed. Which means we need to update them in the DB. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
st->should_update_etag = true;
}
st->instruction = CSYNC_INSTRUCTION_NONE;
} else {
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 */
if (ctx->current == LOCAL_REPLICA) {
tmp = csync_statedb_get_stat_by_inode(ctx->statedb.db, fs->inode);
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);
/* translate the file type between the two stat types csync has. */
if( tmp && tmp->type == 0 ) {
@@ -261,8 +295,12 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
if (tmp && tmp->inode == fs->inode && tmp_vio_type == fs->type
&& (tmp->modtime == fs->mtime || fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY)) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "inodes: %" PRId64 " <-> %" PRId64, (uint64_t) tmp->inode, (uint64_t) fs->inode);
&& (tmp->modtime == fs->mtime || fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY)
#ifdef NO_RENAME_EXTENSION
&& _csync_sameextension(tmp->path, path)
#endif
) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "pot rename detected based on inode # %" PRId64 "", (uint64_t) fs->inode);
/* inode found so the file has been renamed */
st->instruction = CSYNC_INSTRUCTION_EVAL_RENAME;
if (fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) {
@@ -276,7 +314,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
} else {
/* Remote Replica Rename check */
tmp = csync_statedb_get_stat_by_file_id(ctx->statedb.db, fs->file_id);
tmp = csync_statedb_get_stat_by_file_id(ctx, fs->file_id);
if(tmp ) { /* tmp existing at all */
if ((tmp->type == CSYNC_FTW_TYPE_DIR && fs->type != CSYNC_VIO_FILE_TYPE_DIRECTORY) ||
(tmp->type == CSYNC_FTW_TYPE_FILE && fs->type != CSYNC_VIO_FILE_TYPE_REGULAR)) {
@@ -328,8 +366,6 @@ out:
st->mode = fs->mode;
st->size = fs->size;
st->modtime = fs->mtime;
st->uid = fs->uid;
st->gid = fs->gid;
st->nlink = fs->nlink;
st->type = type;
st->etag = NULL;
@@ -338,6 +374,17 @@ out:
st->etag = c_strdup(fs->etag);
}
csync_vio_set_file_id(st->file_id, fs->file_id);
if (fs->fields & CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADURL) {
SAFE_FREE(st->directDownloadUrl);
st->directDownloadUrl = c_strdup(fs->directDownloadUrl);
}
if (fs->fields & CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES) {
SAFE_FREE(st->directDownloadCookies);
st->directDownloadCookies = c_strdup(fs->directDownloadCookies);
}
if (fs->fields & CSYNC_VIO_FILE_STAT_FIELDS_PERM) {
strncpy(st->remotePerm, fs->remotePerm, REMOTE_PERM_BUF_SIZE);
}
fastout: /* target if the file information is read from database into st */
st->phash = h;
@@ -383,11 +430,11 @@ int csync_walker(CSYNC *ctx, const char *file, const csync_vio_file_stat_t *fs,
switch (flag) {
case CSYNC_FTW_FLAG_FILE:
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s", file);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s [file_id=%s]", file, fs->file_id);
type = CSYNC_FTW_TYPE_FILE;
break;
case CSYNC_FTW_FLAG_DIR: /* enter directory */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "directory: %s", file);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "directory: %s [file_id=%s]", file, fs->file_id);
type = CSYNC_FTW_TYPE_DIR;
break;
case CSYNC_FTW_FLAG_NSTAT: /* not statable file */
@@ -397,7 +444,7 @@ int csync_walker(CSYNC *ctx, const char *file, const csync_vio_file_stat_t *fs,
if( h == 0 ) {
return 0;
}
st = csync_statedb_get_stat_by_hash(ctx->statedb.db, h);
st = csync_statedb_get_stat_by_hash(ctx, h);
if( !st ) {
return 0;
}
@@ -423,10 +470,28 @@ int csync_walker(CSYNC *ctx, const char *file, const csync_vio_file_stat_t *fs,
return rc;
}
static bool fill_tree_from_db(CSYNC *ctx, const char *uri)
{
const char *path = NULL;
if( strlen(uri) < strlen(ctx->remote.uri)+1) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "name does not contain remote uri!");
return false;
}
path = uri + strlen(ctx->remote.uri)+1;
if( csync_statedb_get_below_path(ctx, path) < 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "StateDB could not be read!");
return false;
}
return true;
}
/* File tree walker */
int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
unsigned int depth) {
char errbuf[256] = {0};
char *filename = NULL;
char *d_name = NULL;
csync_vio_handle_t *dh = NULL;
@@ -447,24 +512,32 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
read_from_db = ctx->remote.read_from_db;
if ((dh = csync_vio_opendir(ctx, uri)) == NULL) {
int asp = 0;
/* permission denied */
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_OPENDIR_ERROR);
if (errno == EACCES) {
return 0;
} else if(errno == ENOENT) {
asp = asprintf( &ctx->error_string, "%s", uri);
if (asp < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
// if the etag of this dir is still the same, its content is restored from the
// database.
if( do_read_from_db ) {
if( ! fill_tree_from_db(ctx, uri) ) {
errno = ENOENT;
ctx->status_code = CSYNC_STATUS_OPENDIR_ERROR;
goto error;
}
} else {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR,
"opendir failed for %s - %s (errno %d)",
uri, errbuf, errno);
}
goto error;
goto done;
}
if ((dh = csync_vio_opendir(ctx, uri)) == NULL) {
int asp = 0;
/* permission denied */
ctx->status_code = csync_errno_to_status(errno, CSYNC_STATUS_OPENDIR_ERROR);
if (errno == EACCES) {
return 0;
} else if(errno == ENOENT) {
asp = asprintf( &ctx->error_string, "%s", uri);
if (asp < 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
}
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "opendir failed for %s - errno %d", uri, errno);
}
goto error;
}
while ((dirent = csync_vio_readdir(ctx, dh))) {
@@ -527,13 +600,13 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
continue;
}
/* == see if really stat has to be called. */
if( do_read_from_db ) {
fs = dirent;
res = 0;
} else {
/* Only for the local replica we have to stat(), for the remote one we have all data already */
if (ctx->replica == LOCAL_REPLICA) {
fs = csync_vio_file_stat_new();
res = csync_vio_stat(ctx, filename, fs);
} else {
fs = dirent;
res = 0;
}
if( res == 0) {
@@ -564,16 +637,18 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
char *etag = NULL;
int len = strlen( path );
uint64_t h = c_jhash64((uint8_t *) path, len, 0);
etag = csync_statedb_get_uniqId( ctx, h, fs );
etag = csync_statedb_get_etag( ctx, h );
if( etag ) {
SAFE_FREE(fs->etag);
fs->etag = etag;
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_ETAG;
}
if( c_streq(etag, "")) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Uniq ID from Database is EMPTY: %s", path);
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Uniq ID from Database: %s -> %s", path, fs->etag ? fs->etag : "<NULL>" );
if( c_streq(etag, "")) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Uniq ID from Database is EMPTY: %s", path);
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Uniq ID from Database: %s -> %s", path, fs->etag ? fs->etag : "<NULL>" );
}
}
}
@@ -587,10 +662,9 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
previous_fs->child_modified = ctx->current_fs->child_modified;
}
if( ! do_read_from_db ) {
/* Only for the local replica we have to destroy stat(), for the remote one it is a pointer to dirent */
if (ctx->replica == LOCAL_REPLICA) {
csync_vio_file_stat_destroy(fs);
} else {
SAFE_FREE(fs->etag);
}
if (rc < 0) {
@@ -617,9 +691,9 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
}
}
if (ctx->current_fs && (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW ||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL_RENAME)) {
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->should_update_etag = true;
}

View File

@@ -55,8 +55,6 @@ static const _instr_code_struct _instr[] =
{ "INSTRUCTION_SYNC", CSYNC_INSTRUCTION_SYNC },
{ "INSTRUCTION_STAT_ERR", CSYNC_INSTRUCTION_STAT_ERROR },
{ "INSTRUCTION_ERROR", CSYNC_INSTRUCTION_ERROR },
{ "INSTRUCTION_DELETED", CSYNC_INSTRUCTION_DELETED },
{ "INSTRUCTION_UPDATED", CSYNC_INSTRUCTION_UPDATED },
{ NULL, CSYNC_INSTRUCTION_ERROR }
};
@@ -106,40 +104,6 @@ void csync_memstat_check(void) {
m.size * 4, m.resident * 4, m.shared * 4);
}
int csync_unix_extensions(CSYNC *ctx) {
int rc = -1;
char *uri = NULL;
csync_vio_handle_t *fp = NULL;
ctx->options.unix_extensions = 0;
rc = asprintf(&uri, "%s/csync_unix_extension*test.ctmp", ctx->remote.uri);
if (rc < 0) {
goto out;
}
ctx->replica = ctx->remote.type;
fp = csync_vio_creat(ctx, uri, 0644);
if (fp == NULL) {
rc = 0;
CSYNC_LOG(CSYNC_LOG_PRIORITY_INFO,
"Disabled unix filesystem synchronization");
goto out;
}
csync_vio_close(ctx, fp);
ctx->options.unix_extensions = 1;
CSYNC_LOG(CSYNC_LOG_PRIORITY_INFO, "Enabled unix filesystem synchronization");
rc = 1;
out:
csync_vio_unlink(ctx, uri);
SAFE_FREE(uri);
return rc;
}
void csync_win32_set_file_hidden( const char *file, bool h ) {
#ifdef _WIN32
const mbchar_t *fileName;
@@ -149,12 +113,12 @@ void csync_win32_set_file_hidden( const char *file, bool h ) {
fileName = c_utf8_to_locale( file );
dwAttrs = GetFileAttributesW(fileName);
if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
}
}
c_free_locale_string(fileName);
@@ -164,55 +128,21 @@ void csync_win32_set_file_hidden( const char *file, bool h ) {
#endif
}
csync_vio_file_stat_t *csync_vio_convert_file_stat(csync_file_stat_t *st) {
csync_vio_file_stat_t *vfs = NULL;
if (st == NULL) {
return NULL;
}
vfs = csync_vio_file_stat_new();
if (vfs == NULL) {
return NULL;
}
vfs->acl = NULL;
if (st->pathlen > 0) {
vfs->name = c_strdup(st->path);
}
vfs->uid = st->uid;
vfs->gid = st->gid;
vfs->atime = 0;
vfs->mtime = st->modtime;
vfs->ctime = 0;
vfs->size = st->size;
vfs->blksize = 0; /* Depricated. */
vfs->blkcount = 0;
vfs->mode = st->mode;
vfs->device = 0;
vfs->inode = st->inode;
vfs->nlink = st->nlink;
/* fields. */
vfs->fields = CSYNC_VIO_FILE_STAT_FIELDS_TYPE
+ CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS
+ CSYNC_VIO_FILE_STAT_FIELDS_INODE
+ CSYNC_VIO_FILE_STAT_FIELDS_LINK_COUNT
+ CSYNC_VIO_FILE_STAT_FIELDS_SIZE
+ CSYNC_VIO_FILE_STAT_FIELDS_MTIME
+ CSYNC_VIO_FILE_STAT_FIELDS_UID
+ CSYNC_VIO_FILE_STAT_FIELDS_GID;
if (st->type == CSYNC_FTW_TYPE_DIR)
vfs->type = CSYNC_VIO_FILE_TYPE_DIRECTORY;
else if (st->type == CSYNC_FTW_TYPE_FILE)
vfs->type = CSYNC_VIO_FILE_TYPE_REGULAR;
else if (st->type == CSYNC_FTW_TYPE_SLINK)
vfs->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
else
vfs->type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
return vfs;
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*)) {
csync_file_locked_or_open_ext = f;
}
bool csync_file_locked_or_open( const char *dir, const char *fname) {
char *tmp_uri = NULL;
bool ret;
if (!csync_file_locked_or_open_ext) {
return false;
}
asprintf(&tmp_uri, "%s/%s", dir, fname);
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "csync_file_locked_or_open %s", tmp_uri);
ret = csync_file_locked_or_open_ext(tmp_uri);
SAFE_FREE(tmp_uri);
return ret;
}

View File

@@ -30,11 +30,7 @@ const char *csync_instruction_str(enum csync_instructions_e instr);
void csync_memstat_check(void);
int csync_unix_extensions(CSYNC *ctx);
void csync_win32_set_file_hidden( const char *file, bool hidden );
/* Convert a csync_file_stat_t to csync_vio_file_stat_t */
csync_vio_file_stat_t *csync_vio_convert_file_stat(csync_file_stat_t *st);
bool csync_file_locked_or_open( const char *dir, const char *fname);
#endif /* _CSYNC_UTIL_H */

View File

@@ -204,9 +204,9 @@ void hbf_free_transfer( hbf_transfer_t *transfer ) {
for( cnt = 0; cnt < transfer->block_cnt; cnt++ ) {
hbf_block_t *block = transfer->block_arr[cnt];
if( !block ) continue;
if( block->http_error_msg ) free( block->http_error_msg );
if( block->etag ) free( block->etag );
if( block ) free(block);
}
free( transfer->block_arr );
free( transfer->url );
@@ -536,8 +536,8 @@ Hbf_State hbf_transfer( ne_session *session, hbf_transfer_t *transfer, const cha
} else {
state = HBF_MEMORY_FAIL;
}
free( transfer_url );
}
free( transfer_url );
}
/* do the source file validation finally (again). */

View File

@@ -20,8 +20,6 @@ set(CSTDLIB_LINK_LIBRARIES
set(cstdlib_SRCS
c_alloc.c
c_dir.c
c_file.c
c_list.c
c_path.c
c_rbtree.c

View File

@@ -1,189 +0,0 @@
/*
* cynapses libc functions
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "c_private.h"
#include "c_macro.h"
#include "c_alloc.h"
#include "c_dir.h"
#include "c_string.h"
int c_mkdirs(const char *path, mode_t mode) {
int tmp;
csync_stat_t sb;
mbchar_t *wpath = c_utf8_to_locale(path);
mbchar_t *swpath = NULL;
if (path == NULL) {
errno = EINVAL;
return -1;
}
if (_tstat(wpath, &sb) == 0) {
if (! S_ISDIR(sb.st_mode)) {
errno = ENOTDIR;
c_free_locale_string(wpath);
return -1;
}
}
tmp = strlen(path);
while(tmp > 0 && path[tmp - 1] == '/') --tmp;
while(tmp > 0 && path[tmp - 1] != '/') --tmp;
while(tmp > 0 && path[tmp - 1] == '/') --tmp;
if (tmp > 0) {
char subpath[tmp + 1];
memcpy(subpath, path, tmp);
subpath[tmp] = '\0';
swpath = c_utf8_to_locale(subpath);
if (_tstat(swpath, &sb) == 0) {
if (! S_ISDIR(sb.st_mode)) {
c_free_locale_string(swpath);
c_free_locale_string(wpath);
errno = ENOTDIR;
return -1;
}
} else if (errno != ENOENT) {
c_free_locale_string(wpath);
c_free_locale_string(swpath);
return -1;
} else if (c_mkdirs(subpath, mode) < 0) {
c_free_locale_string(swpath);
c_free_locale_string(wpath);
return -1;
}
}
tmp = _tmkdir(wpath, mode);
c_free_locale_string(swpath);
c_free_locale_string(wpath);
if ((tmp < 0) && (errno == EEXIST)) {
return 0;
}
return tmp;
}
int c_rmdirs(const char *path) {
_TDIR *d;
struct _tdirent *dp;
csync_stat_t sb;
char *fname = NULL;
mbchar_t *wfname = NULL;
mbchar_t *wpath = c_utf8_to_locale(path);
char *rd_name = NULL;
if ((d = _topendir(wpath)) != NULL) {
while( _tstat(wpath, &sb) == 0) {
/* if we can remove the directory we're done */
if (_trmdir(wpath) == 0) {
break;
}
switch (errno) {
case ENOTEMPTY:
case EEXIST:
case EBADF:
break; /* continue */
default:
_tclosedir(d);
c_free_locale_string(wpath);
return 0;
}
while ((dp = _treaddir(d)) != NULL) {
size_t len;
rd_name = c_utf8_from_locale(dp->d_name);
/* skip '.' and '..' */
if( c_streq( rd_name, "." ) || c_streq( rd_name, ".." ) ) {
c_free_locale_string(rd_name);
continue;
}
len = strlen(path) + strlen(rd_name) + 2;
fname = c_malloc(len);
if (fname == NULL) {
_tclosedir(d);
c_free_locale_string(rd_name);
c_free_locale_string(wpath);
return -1;
}
snprintf(fname, len, "%s/%s", path, rd_name);
wfname = c_utf8_to_locale(fname);
/* stat the file */
if (_tstat(wfname, &sb) != -1) {
#ifdef __unix__
if (S_ISDIR(sb.st_mode) && !S_ISLNK(sb.st_mode)) {
#else
if (S_ISDIR(sb.st_mode)) {
#endif
if (_trmdir(wfname) < 0) { /* can't be deleted */
if (errno == EACCES) {
_tclosedir(d);
SAFE_FREE(fname);
c_free_locale_string(wfname);
c_free_locale_string(rd_name);
c_free_locale_string(wpath);
return -1;
}
c_rmdirs(fname);
}
} else {
_tunlink(wfname);
}
} /* lstat */
SAFE_FREE(fname);
c_free_locale_string(wfname);
c_free_locale_string(rd_name);
} /* readdir */
_trewinddir(d);
}
} else {
c_free_locale_string(wpath);
return -1;
}
c_free_locale_string(wpath);
_tclosedir(d);
return 0;
}
int c_isdir(const char *path) {
csync_stat_t sb;
mbchar_t *wpath = c_utf8_to_locale(path);
int re = 0;
if (path != NULL) {
if (_tstat (wpath, &sb) == 0 && S_ISDIR(sb.st_mode)) {
re = 1;
}
}
c_free_locale_string(wpath);
return re;
}

View File

@@ -1,86 +0,0 @@
/*
* cynapses libc functions
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file c_dir.h
*
* @brief Interface of the cynapses libc directory function
*
* @defgroup cynDirInternals cynapses libc directory functions
* @ingroup cynLibraryAPI
*
* @{
*/
#ifndef _C_DIR_H
#define _C_DIR_H
#include <sys/types.h>
/**
* @brief Create parent directories as needed.
*
* The newly created directory will be owned by the effective user ID of the
* process.
*
* @param path The path to the directory to create.
*
* @param mode Specifies the permissions to use. It is modified
* by the process's umask in the usual way: the
* permissions of the created file are (mode & ~umask).
*
* @return 0 on success, < 0 on error with errno set:
* - EACCES The parent directory does not allow write
* permission to the process, or one of the directories
* - ENOTDIR if durl is not a directory
* - EINVAL NULL durl passed or smbc_init not called.
* - ENOMEM Insufficient memory was available.
*
* @see mkdir()
*/
int c_mkdirs(const char *path, mode_t mode);
/**
* @brief Remove the directory and subdirectories including the content.
*
* This removes all directories and files recursivly.
*
* @param dir The directory to remove recusively.
*
* @return 0 on success, < 0 on error with errno set.
*/
int c_rmdirs(const char *dir);
/**
* @brief Check if a path is a directory.
*
* @param path The path to check.
*
* @return 1 if the path is a directory, 0 if the path doesn't exist, is a
* file or can't be accessed.
*/
int c_isdir(const char *path);
/**
* }@
*/
#endif /* _CDIR_H */

View File

@@ -1,346 +0,0 @@
/*
* cynapses libc functions
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
* Copyright (c) 2012-2013 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef _WIN32
#include <windef.h>
#include <winbase.h>
#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include "c_file.h"
#include "c_string.h"
#include "c_private.h"
#ifdef _WIN32
/* check if path is a symlink */
int c_islink(const char *path) {
int re = 0;
mbchar_t *wpath = 0;
DWORD dwAttrs;
WIN32_FIND_DATAW FindFileData;
HANDLE hFind;
wpath = c_utf8_to_locale(path);
dwAttrs = GetFileAttributesW(wpath);
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
if ((dwAttrs & FILE_ATTRIBUTE_REPARSE_POINT)) {
hFind = FindFirstFileW(wpath, &FindFileData );
if (hFind != INVALID_HANDLE_VALUE) {
if( (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
(FindFileData.dwReserved0 & IO_REPARSE_TAG_SYMLINK) ) {
re = 1;
}
}
FindClose(hFind);
}
}
c_free_locale_string(wpath);
return re;
}
#endif
/* check if path is a file */
int c_isfile(const char *path) {
csync_stat_t sb;
mbchar_t *wpath = c_utf8_to_locale(path);
int re = _tstat(wpath, &sb);
c_free_locale_string(wpath);
if (re< 0) {
return 0;
}
#ifdef __unix__
if (S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) {
#else
if (S_ISREG(sb.st_mode)) {
#endif
return 1;
}
return 0;
}
/* copy file from src to dst, overwrites dst */
#ifdef _WIN32
int c_copy(const char* src, const char *dst, mode_t mode) {
int rc = -1;
mbchar_t *wsrc = 0;
mbchar_t *wdst = 0;
(void) mode; /* unused on win32 */
if(src && dst) {
wsrc = c_utf8_to_locale(src);
wdst = c_utf8_to_locale(dst);
if (CopyFileW(wsrc, wdst, FALSE)) {
rc = 0;
}
c_free_locale_string(wsrc);
c_free_locale_string(wdst);
if( rc < 0 ) {
errno = GetLastError();
}
}
return rc;
}
#else
int c_copy(const char* src, const char *dst, mode_t mode) {
int srcfd = -1;
int dstfd = -1;
int rc = -1;
ssize_t bread, bwritten;
csync_stat_t sb;
char buf[4096];
if (c_streq(src, dst)) {
return -1;
}
srcfd = open(src, O_RDONLY, 0);
if (srcfd < 0) {
goto out;
}
rc = _tfstat(srcfd, &sb);
if (rc < 0) {
goto out;
}
if (S_ISDIR(sb.st_mode)) {
errno = EISDIR;
rc = -1;
goto out;
}
if (mode == 0) {
mode = sb.st_mode;
}
dstfd = open(dst, O_CREAT|O_WRONLY|O_TRUNC, mode);
if (dstfd < 0) {
rc = -1;
goto out;
}
rc = _tfstat(dstfd, &sb);
if (rc == 0) {
if (S_ISDIR(sb.st_mode)) {
errno = EISDIR;
rc = -1;
goto out;
}
}
for (;;) {
bread = read(srcfd, buf, sizeof(buf));
if (bread == 0) {
/* done */
break;
} else if (bread < 0) {
errno = ENODATA;
rc = -1;
goto out;
}
bwritten = write(dstfd, buf, bread);
if (bwritten < 0) {
errno = ENODATA;
rc = -1;
goto out;
}
if (bread != bwritten) {
errno = EFAULT;
rc = -1;
goto out;
}
}
#ifdef __unix__
fsync(dstfd);
#endif
rc = 0;
out:
if (srcfd >= 0) {
close(srcfd);
}
if (dstfd >= 0) {
close(dstfd);
}
if (rc < 0 && c_isfile(dst)) {
unlink(dst);
}
return rc;
}
#endif
int c_rename( const char *src, const char *dst ) {
mbchar_t *nuri = NULL;
mbchar_t *ouri = NULL;
int rc = 0;
nuri = c_utf8_to_locale(dst);
if (nuri == NULL) {
return -1;
}
ouri = c_utf8_to_locale(src);
if (ouri == NULL) {
c_free_locale_string(nuri);
return -1;
}
#ifdef _WIN32
{
#define MAX_TRIES_RENAME 3
int err = 0;
int cnt = 0;
do {
BOOL ok;
ok = MoveFileExW(ouri,
nuri,
MOVEFILE_COPY_ALLOWED +
MOVEFILE_REPLACE_EXISTING +
MOVEFILE_WRITE_THROUGH);
if (!ok) {
/* error */
err = GetLastError();
if( (err == ERROR_ACCESS_DENIED ||
err == ERROR_LOCK_VIOLATION ||
err == ERROR_SHARING_VIOLATION) && cnt < MAX_TRIES_RENAME ) {
cnt++;
Sleep(cnt*100);
continue;
}
}
break;
} while( 1 );
if( err != 0 ) {
errno = err;
rc = -1;
}
}
#else
rc = rename(ouri, nuri);
#endif
c_free_locale_string(nuri);
c_free_locale_string(ouri);
return rc;
}
int c_compare_file( const char *f1, const char *f2 ) {
mbchar_t *wf1, *wf2;
int fd1 = -1, fd2 = -1;
size_t size1, size2;
char buffer1[BUFFER_SIZE];
char buffer2[BUFFER_SIZE];
csync_stat_t stat1;
csync_stat_t stat2;
int rc = -1;
if(f1 == NULL || f2 == NULL) return -1;
wf1 = c_utf8_to_locale(f1);
if(wf1 == NULL) {
return -1;
}
wf2 = c_utf8_to_locale(f2);
if(wf2 == NULL) {
c_free_locale_string(wf1);
return -1;
}
#ifdef _WIN32
_fmode = _O_BINARY;
#endif
fd1 = _topen(wf1, O_RDONLY);
if(fd1 < 0) {
rc = -1;
goto out;
}
fd2 = _topen(wf2, O_RDONLY);
if(fd2 < 0) {
rc = -1;
goto out;
}
/* compare size first. */
rc = _tfstat(fd1, &stat1);
if (rc < 0) {
goto out;
}
rc = _tfstat(fd2, &stat2);
if (rc < 0) {
goto out;
}
/* if sizes are different, the files can not be equal. */
if (stat1.st_size != stat2.st_size) {
rc = 0;
goto out;
}
while( (size1 = read(fd1, buffer1, BUFFER_SIZE)) > 0 ) {
size2 = read( fd2, buffer2, BUFFER_SIZE );
if( size1 != size2 ) {
rc = 0;
goto out;
}
if(memcmp(buffer1, buffer2, size1) != 0) {
/* buffers are different */
rc = 0;
goto out;
}
}
rc = 1;
out:
if(fd1 > -1) close(fd1);
if(fd2 > -1) close(fd2);
c_free_locale_string( wf1 );
c_free_locale_string( wf2 );
return rc;
}

View File

@@ -1,102 +0,0 @@
/*
* cynapses libc functions
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
* Copyright (c) 2012-2013 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file c_file.h
*
* @brief Interface of the cynapses libc file function
*
* @defgroup cynFileInternals cynapses libc file functions
* @ingroup cynLibraryAPI
*
* @{
*/
#ifndef _C_FILE_H
#define _C_FILE_H
#include <sys/types.h>
#include <stdio.h>
#ifndef BUFFER_SIZE
#define BUFFER_SIZE (16 * 1024)
#endif
#ifdef _WIN32
/**
* @brief Check if a path is a link.
*
* @param path The path to check.
*
* @return 1 if the path is a symbolic link, 0 if the path doesn't
* exist or is something else.
*/
int c_islink(const char *path);
#endif
/**
* @brief Check if a path is a regular file or a link.
*
* @param path The path to check.
*
* @return 1 if the path is a file, 0 if the path doesn't exist, is
* something else or can't be accessed.
*/
int c_isfile(const char *path);
/**
* @brief copy a file from source to destination.
*
* @param src Path to the source file
* @param dst Path to the destination file
* @param mode File creation mode of the destination. If mode is 0 then the
* mode from the source will be used.
*
* @return 0 on success, less than 0 on error with errno set.
* EISDIR if src or dst is a file.
*/
int c_copy(const char *src, const char *dst, mode_t mode);
/**
* @brief Compare the content of two files byte by byte.
* @param f1 Path of file 1
* @param f2 Path of file 2
*
* @return 0 if the files differ, 1 if the files are equal or -1 on
* error with errno set.
*/
int c_compare_file( const char *f1, const char *f2 );
/**
* @brief move a file from source to destination.
*
* @param src Path to the source file
* @param dst Path to the destination file
*
* @return 0 on success, less than 0 on error with errno set.
*/
int c_rename( const char *src, const char *dst );
/**
* }@
*/
#endif /* _C_FILE_H */

View File

@@ -23,45 +23,9 @@
#include "c_macro.h"
#include "c_alloc.h"
#include "c_dir.h"
#include "c_file.h"
#include "c_list.h"
#include "c_path.h"
#include "c_rbtree.h"
#include "c_string.h"
#include "c_time.h"
#include "c_private.h"
#ifndef UNIT_TESTING
#ifdef malloc
#undef malloc
#endif
#define malloc(x) DO_NOT_CALL_MALLOC__USE_C_MALLOC_INSTEAD
#ifdef calloc
#undef calloc
#endif
#define calloc(x,y) DO_NOT_CALL_CALLOC__USE_C_CALLOC_INSTEAD
#endif
#ifdef realloc
#undef realloc
#endif
#define realloc(x,y) DO_NOT_CALL_REALLOC__USE_C_REALLOC_INSTEAD
#ifdef dirname
#undef dirname
#endif
#define dirname(x) DO_NOT_CALL_MALLOC__USE_C_DIRNAME_INSTEAD
#ifdef basename
#undef basename
#endif
#define basename(x) DO_NOT_CALL_MALLOC__USE_C_BASENAME_INSTEAD
#ifdef strdup
#undef strdup
#endif
#define strdup(x) DO_NOT_CALL_STRDUP__USE_C_STRDUP_INSTEAD

View File

@@ -55,9 +55,6 @@
/** Get the size of an array */
#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
* get the "discarding const" warning by the compiler. That doesn't actually

View File

@@ -117,81 +117,6 @@ char *c_basename (const char *path) {
return newbuf;
}
char *c_tmpname(const char *templ) {
char *tmp = NULL;
char *target = NULL;
int rc;
int i = 0;
if (!templ) {
goto err;
}
/* If the template does not contain the XXXXXX it will be appended. */
if( !strstr( templ, "XXXXXX" )) {
/* split up the path */
char *path = c_dirname(templ);
char *base = c_basename(templ);
if (!base) {
if (path) {
SAFE_FREE(path);
}
goto err;
}
/* Create real hidden files for unixoide. */
if( path ) {
#ifdef _WIN32
rc = asprintf(&target, "%s/%s.~XXXXXX", path, base);
#else
rc = asprintf(&target, "%s/.%s.~XXXXXX", path, base);
#endif
} else {
#ifdef _WIN32
rc = asprintf(&target, "%s.~XXXXXX", base);
#else
rc = asprintf(&target, ".%s.~XXXXXX", base);
#endif
}
SAFE_FREE(path);
SAFE_FREE(base);
if (rc < 0) {
goto err;
}
} else {
target = c_strdup(templ);
}
if (!target) {
goto err;
}
tmp = strstr( target, "XXXXXX" );
if (!tmp) {
goto err;
}
for (i = 0; i < 6; ++i) {
#ifdef _WIN32
/* in win32 MAX_RAND is 32767, thus we can not shift that far,
* otherwise the last three chars are 0
*/
int hexdigit = (rand() >> (i * 2)) & 0x1f;
#else
int hexdigit = (rand() >> (i * 5)) & 0x1f;
#endif
tmp[i] = hexdigit > 9 ? hexdigit + 'a' - 10 : hexdigit + '0';
}
return target;
err:
errno = EINVAL;
return NULL;
}
int c_parse_uri(const char *uri,
char **scheme,
char **user, char **passwd,
@@ -470,84 +395,3 @@ int c_parse_uri(const char *uri,
return -1;
}
/*
* http://refactormycode.com/codes/1345-extracting-directory-filename-and-extension-from-a-path
* Allocate a block of memory that holds the PATHINFO at the beginning
* followed by the actual path. Two extra bytes are allocated (+3 instead
* of just +1) to deal with shifting the filename and extension to protect the trailing '/'
* and the leading '.'. These extra bytes also double as the empty string, as
* well as a pad to keep from reading past the memory block.
*
*/
C_PATHINFO * c_split_path(const char* pathSrc)
{
size_t length = strlen(pathSrc);
size_t len=0;
C_PATHINFO * pathinfo = (C_PATHINFO *) c_malloc(sizeof(C_PATHINFO) + length + 3);
if (pathinfo)
{
char * path = (char *) &pathinfo[1]; // copy of the path
char * theEnd = &path[length + 1]; // second null terminator
char * extension;
char * lastSep;
// Copy the original string and double null terminate it.
strcpy(path, pathSrc);
*theEnd = '\0';
pathinfo->directory = theEnd; // Assume no path
pathinfo->extension = theEnd; // Assume no extension
pathinfo->filename = path; // Assume filename only
lastSep = strrchr(path, '/');
if (lastSep)
{
pathinfo->directory = path; // Pick up the path
memmove(lastSep + 1, lastSep, strlen(lastSep));
*lastSep++ ='/';
*lastSep++ ='\0'; // Truncate directory
pathinfo->filename = lastSep; // Pick up name after path
}
// Start at the second character of the filename to handle
// filenames that start with '.' like ".login".
// We don't overrun the buffer in the cases of an empty path
// or a path that looks like "/usr/bin/" because of the extra
// byte.
extension = strrchr(&pathinfo->filename[1], '.');
if (extension)
{
// Shift the extension over to protect the leading '.' since
// we need to truncate the filename.
memmove(extension + 1, extension, strlen(extension));
pathinfo->extension = extension + 1;
*extension = '\0'; // Truncate filename
}
else
{
len=strlen(pathinfo->filename);
if(len>1)
{
//tmp files from kate/kwrite "somefile~": '~' should be the extension
if(pathinfo->filename[len-1]=='~')
{
extension = &pathinfo->filename[len-1];
memmove(extension + 1, extension, strlen(extension));
pathinfo->extension = extension + 1;
*extension = '\0'; // Truncate filename
}
}
}
}
return pathinfo;
}

View File

@@ -66,19 +66,6 @@ char *c_dirname(const char *path);
*/
char *c_basename (const char *path);
/**
* @brief Make a temporary filename.
*
* @param templ The template to replace. If the template contains six X like
* 'XXXXXX', these are replaced by a random string. If not, the
* templ is interpreted as a path, and a name to a hidden file
* with six random is returned.
* The caller has to free the memory.
*
* @return a poitner to the random hidden filename or NULL.
*/
char *c_tmpname(const char *templ);
/**
* @brief parse a uri and split it into components.
*
@@ -120,15 +107,6 @@ typedef struct
char * extension;
} C_PATHINFO;
/**
* @brief Extracting directory, filename and extension from a path.
*
* @param pathSrc The path to parse.
*
* @return Returns a C_PATHINFO structure that should be freed using SAFE_FREE().
*/
C_PATHINFO * c_split_path(const char* pathSrc);
/**
* }@

View File

@@ -239,69 +239,6 @@ void c_strlist_destroy(c_strlist_t *strlist) {
SAFE_FREE(strlist);
}
char *c_strreplace(char *src, const char *pattern, const char *repl) {
char *p = NULL;
while ((p = strstr(src, pattern)) != NULL) {
size_t of = p - src;
size_t l = strlen(src);
size_t pl = strlen(pattern);
size_t rl = strlen(repl);
if (rl > pl) {
src = (char *) c_realloc(src, strlen(src) + rl - pl + 1);
}
if (rl != pl) {
memmove(src + of + rl, src + of + pl, l - of - pl + 1);
}
strncpy(src + of, repl, rl);
}
return src;
}
char *c_uppercase(const char* str) {
char *new;
char *p;
if (str == NULL) {
return NULL;
}
new = c_strdup(str);
if (new == NULL) {
return NULL;
}
for (p = new; *p; p++) {
*p = toupper(*p);
}
return new;
}
char *c_lowercase(const char* str) {
char *new;
char *p;
if (str == NULL) {
return NULL;
}
new = c_strdup(str);
if (new == NULL) {
return NULL;
}
for (p = new; *p; p++) {
*p = tolower(*p);
}
return new;
}
/* Convert a wide multibyte String to UTF8 */
char* c_utf8_from_locale(const mbchar_t *wstr)
{

View File

@@ -119,37 +119,6 @@ void c_strlist_clear(c_strlist_t *strlist);
*/
void c_strlist_destroy(c_strlist_t *strlist);
/**
* @breif Replace a string with another string in a source string.
*
* @param src String to search for pattern.
*
* @param pattern Pattern to search for in the source string.
*
* @param repl The string which which should replace pattern if found.
*
* @return Return a pointer to the source string.
*/
char *c_strreplace(char *src, const char *pattern, const char *repl);
/**
* @brief Uppercase a string.
*
* @param str The String to uppercase.
*
* @return The malloced uppered string or NULL on error.
*/
char *c_uppercase(const char* str);
/**
* @brief Lowercase a string.
*
* @param str The String to lowercase.
*
* @return The malloced lowered string or NULL on error.
*/
char *c_lowercase(const char* str);
/**
* @brief Convert a platform locale string to utf8.
*

View File

@@ -135,7 +135,8 @@ int c_utimes(const char *uri, const struct timeval *times) {
if(!SetFileTime(hFile, NULL, &LastAccessTime, &LastModificationTime)) {
//can this happen?
errno=ENOENT;
CloseHandle(hFile);
CloseHandle(hFile);
c_free_locale_string(wuri);
return -1;
}

View File

@@ -24,9 +24,9 @@
#include <errno.h>
#include <stdio.h>
#include <assert.h>
#include "csync_private.h"
#include "csync_dbtree.h"
#include "csync_util.h"
#include "vio/csync_vio.h"
#include "vio/csync_vio_handle_private.h"
@@ -34,356 +34,27 @@
#include "csync_statedb.h"
#include "std/c_jhash.h"
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#define CSYNC_LOG_CATEGORY_NAME "csync.vio.main"
#ifdef _WIN32
#include <wchar.h>
#define MODULE_EXTENSION "dll"
#else
#define MODULE_EXTENSION "so"
#endif
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#include "csync_log.h"
int csync_vio_init(CSYNC *ctx, const char *module, const char *args) {
csync_vio_method_t *m = NULL;
csync_vio_method_init_fn init_fn;
/* The owncloud module used to be dynamically loaded, but now it's just statically linked */
extern csync_vio_method_t *vio_module_init(const char *method_name, const char *config_args, csync_auth_callback cb, void *userdata);
extern void vio_module_shutdown(csync_vio_method_t *);
init_fn = vio_module_init;
ctx->module.finish_fn = vio_module_shutdown;
/* get the method struct */
m = init_fn(module, args, csync_get_auth_callback(ctx), csync_get_userdata(ctx));
if (m == NULL) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "module %s returned a NULL method", module);
return -1;
}
/* Useful defaults to the module capabilities */
ctx->module.capabilities.atomar_copy_support = false;
ctx->module.capabilities.do_post_copy_stat = true;
ctx->module.capabilities.time_sync_required = true;
ctx->module.capabilities.unix_extensions = -1; /* detect automatically */
ctx->module.capabilities.use_send_file_to_propagate = false; /* do use read/write by default */
/* Load the module capabilities from the module if it implements the it. */
if( VIO_METHOD_HAS_FUNC(m, get_capabilities)) {
ctx->module.capabilities = *(m->get_capabilities());
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: atomar copy support: %s",
ctx->module.capabilities.atomar_copy_support ? "yes": "no");
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: post copy stat: %s",
ctx->module.capabilities.do_post_copy_stat ? "yes": "no");
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: time sync required: %s",
ctx->module.capabilities.time_sync_required ? "yes": "no");
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: unix extensions: %d",
ctx->module.capabilities.unix_extensions );
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: use send_file: %s",
ctx->module.capabilities.use_send_file_to_propagate ? "yes" : "no" );
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: get support: %s",
ctx->module.capabilities.get_support ? "yes" : "no" );
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: put support: %s",
ctx->module.capabilities.put_support? "yes" : "no" );
/* Some basic checks */
if (m->method_table_size == 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "module %s method table size is 0", module);
return -1;
}
if (! VIO_METHOD_HAS_FUNC(m, opendir)) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "module %s has no opendir fn", module);
return -1;
}
/* Useful defaults to the module capabilities */
ctx->module.capabilities.atomar_copy_support = false;
ctx->module.capabilities.put_support = false;
ctx->module.capabilities.get_support = false;
/* Load the module capabilities from the module if it implements the it. */
if( VIO_METHOD_HAS_FUNC(m, get_capabilities)) {
ctx->module.capabilities = *(m->get_capabilities());
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "module %s has no capabilities fn", module);
}
if (! VIO_METHOD_HAS_FUNC(m, get_etag)) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "module %s has no get_etag fn", module);
}
ctx->module.method = m;
return 0;
}
void csync_vio_shutdown(CSYNC *ctx) {
/* shutdown the plugin */
if (ctx->module.finish_fn != NULL) {
(*ctx->module.finish_fn)(ctx->module.method);
}
ctx->module.method = NULL;
ctx->module.finish_fn = NULL;
}
csync_vio_handle_t *csync_vio_open(CSYNC *ctx, const char *uri, int flags, mode_t mode) {
csync_vio_handle_t *h = NULL;
csync_vio_method_handle_t *mh = NULL;
switch(ctx->replica) {
case REMOTE_REPLICA:
mh = ctx->module.method->open(uri, flags, mode);
break;
case LOCAL_REPLICA:
mh = csync_vio_local_open(uri, flags, mode);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
h = csync_vio_handle_new(uri, mh);
if (h == NULL) {
return NULL;
}
return h;
}
csync_vio_handle_t *csync_vio_creat(CSYNC *ctx, const char *uri, mode_t mode) {
csync_vio_handle_t *h = NULL;
csync_vio_method_handle_t *mh = NULL;
switch(ctx->replica) {
case REMOTE_REPLICA:
mh = ctx->module.method->creat(uri, mode);
break;
case LOCAL_REPLICA:
mh = csync_vio_local_creat(uri, mode);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
h = csync_vio_handle_new(uri, mh);
if (h == NULL) {
return NULL;
}
return h;
}
int csync_vio_close(CSYNC *ctx, csync_vio_handle_t *fhandle) {
int rc = -1;
if (fhandle == NULL) {
errno = EBADF;
return -1;
}
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->close(fhandle->method_handle);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_close(fhandle->method_handle);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
/* handle->method_handle is free'd by the above close */
SAFE_FREE(fhandle->uri);
SAFE_FREE(fhandle);
return rc;
}
int csync_vio_getfd(csync_vio_handle_t *fhandle) {
int fd = -1;
if (fhandle == NULL) {
errno = EBADF;
return -1;
}
fd = csync_vio_local_getfd( fhandle );
// Return the correct handle here.
return fd;
}
int csync_vio_put(CSYNC *ctx,
csync_vio_handle_t *flocal,
csync_vio_handle_t *fremote,
csync_file_stat_t *st) {
int rc = 0;
csync_vio_file_stat_t *vfs = csync_vio_convert_file_stat(st);
if (flocal == NULL) {
rc = -1;
}
if (vfs == NULL) {
rc = -1;
}
if (rc == 0) {
rc = ctx->module.method->put(flocal->method_handle,
fremote->method_handle,
vfs);
}
csync_vio_file_stat_destroy(vfs);
return rc;
}
int csync_vio_get(CSYNC *ctx,
csync_vio_handle_t *flocal,
csync_vio_handle_t *fremote,
csync_file_stat_t *st) {
int rc = 0;
csync_vio_file_stat_t *vfs = csync_vio_convert_file_stat(st);
if (flocal == NULL) {
rc = -1;
}
if (vfs == NULL) {
rc = -1;
}
if (rc == 0) {
rc = ctx->module.method->get(flocal->method_handle,
fremote->method_handle,
vfs);
}
csync_vio_file_stat_destroy(vfs);
return rc;
}
ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count) {
ssize_t rs = 0;
if (fhandle == NULL) {
errno = EBADF;
return -1;
}
switch(ctx->replica) {
case REMOTE_REPLICA:
rs = ctx->module.method->read(fhandle->method_handle, buf, count);
break;
case LOCAL_REPLICA:
rs = csync_vio_local_read(fhandle->method_handle, buf, count);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rs;
}
ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count) {
ssize_t rs = 0;
if (fhandle == NULL) {
errno = EBADF;
return -1;
}
switch(ctx->replica) {
case REMOTE_REPLICA:
rs = ctx->module.method->write(fhandle->method_handle, buf, count);
break;
case LOCAL_REPLICA:
rs = csync_vio_local_write(fhandle->method_handle, buf, count);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rs;
}
int csync_vio_sendfile(CSYNC *ctx, csync_vio_handle_t *sfp, csync_vio_handle_t *dst) {
int rc = 0;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->sendfile(sfp->method_handle, dst->method_handle);
break;
case LOCAL_REPLICA:
rc = ctx->module.method->sendfile(dst->method_handle, sfp->method_handle);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int64_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, int64_t offset, int whence) {
int64_t ro = 0;
switch(ctx->replica) {
case REMOTE_REPLICA:
ro = ctx->module.method->lseek(fhandle->method_handle, offset, whence);
break;
case LOCAL_REPLICA:
ro = csync_vio_local_lseek(fhandle->method_handle, offset, whence);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return ro;
}
#include "csync_owncloud.h"
csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name) {
csync_vio_handle_t *h = NULL;
csync_vio_method_handle_t *mh = NULL;
switch(ctx->replica) {
case REMOTE_REPLICA:
if(ctx->remote.read_from_db) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Reading directory %s from database", name);
mh = csync_dbtree_opendir(ctx, name);
} else {
mh = ctx->module.method->opendir(name);
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Read from db flag is true, should not!" );
}
return owncloud_opendir(ctx, name);
break;
case LOCAL_REPLICA:
mh = csync_vio_local_opendir(name);
return csync_vio_local_opendir(name);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
h = csync_vio_handle_new(name, mh);
if (h == NULL) {
return NULL;
}
return h;
return NULL;
}
int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle) {
@@ -395,161 +66,55 @@ int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle) {
}
switch(ctx->replica) {
case REMOTE_REPLICA:
if(ctx->remote.read_from_db) {
rc = csync_dbtree_closedir(ctx, dhandle->method_handle);
} else {
rc = ctx->module.method->closedir(dhandle->method_handle);
case REMOTE_REPLICA:
if( ctx->remote.read_from_db ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Remote ReadFromDb is true, should not!");
}
rc = owncloud_closedir(ctx, dhandle);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_closedir(dhandle->method_handle);
case LOCAL_REPLICA:
rc = csync_vio_local_closedir(dhandle);
break;
default:
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
SAFE_FREE(dhandle->uri);
SAFE_FREE(dhandle);
return rc;
}
csync_vio_file_stat_t *csync_vio_readdir(CSYNC *ctx, csync_vio_handle_t *dhandle) {
csync_vio_file_stat_t *fs = NULL;
switch(ctx->replica) {
case REMOTE_REPLICA:
if(ctx->remote.read_from_db) {
fs = csync_dbtree_readdir(ctx, dhandle->method_handle);
} else {
fs = ctx->module.method->readdir(dhandle->method_handle);
if( ctx->remote.read_from_db ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "Remote readfromdb is true, should not!");
}
return owncloud_readdir(ctx, dhandle);
break;
case LOCAL_REPLICA:
fs = csync_vio_local_readdir(dhandle->method_handle);
return csync_vio_local_readdir(dhandle);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return fs;
return NULL;
}
int csync_vio_mkdir(CSYNC *ctx, const char *uri, mode_t mode) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->mkdir(uri, mode);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_mkdir(uri, mode);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int csync_vio_mkdirs(CSYNC *ctx, const char *uri, mode_t mode) {
int tmp = 0;
char errbuf[256] = {0};
csync_vio_file_stat_t *st = NULL;
if (uri == NULL) {
errno = EINVAL;
return -1;
}
tmp = strlen(uri);
while(tmp > 0 && uri[tmp - 1] == '/') --tmp;
while(tmp > 0 && uri[tmp - 1] != '/') --tmp;
while(tmp > 0 && uri[tmp - 1] == '/') --tmp;
if (tmp > 0) {
char suburi[tmp + 1];
memcpy(suburi, uri, tmp);
suburi[tmp] = '\0';
st = csync_vio_file_stat_new();
if (csync_vio_stat(ctx, suburi, st) == 0) {
if (! S_ISDIR(st->mode)) {
csync_vio_file_stat_destroy(st);
errno = ENOTDIR;
return -1;
}
} else if (errno != ENOENT) {
C_STRERROR(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "csync_vio_mkdirs stat failed: %s",
errbuf);
csync_vio_file_stat_destroy(st);
return -1;
} else if (csync_vio_mkdirs(ctx, suburi, mode) < 0) {
csync_vio_file_stat_destroy(st);
return -1;
}
csync_vio_file_stat_destroy(st);
}
tmp = csync_vio_mkdir(ctx, uri, mode);
if ((tmp < 0) && (errno == EEXIST)) {
return 0;
}
return tmp;
}
int csync_vio_rmdir(CSYNC *ctx, const char *uri) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->rmdir(uri);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_rmdir(uri);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
const char *csync_vio_get_etag(CSYNC *ctx, const char *path)
{
const char *re = NULL;
/* We always use the remote method here. */
if(ctx->module.method &&
VIO_METHOD_HAS_FUNC(ctx->module.method, get_etag)) {
re = ctx->module.method->get_etag(path);
}
return re;
}
int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->stat(uri, buf);
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "ERROR: Cannot call remote stat, not implemented");
assert(ctx->replica != REMOTE_REPLICA);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_stat(uri, buf);
if (rc < 0) {
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;
default:
break;
@@ -558,119 +123,9 @@ int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf) {
return rc;
}
int csync_vio_rename(CSYNC *ctx, const char *olduri, const char *newuri) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->rename(olduri, newuri);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_rename(olduri, newuri);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int csync_vio_unlink(CSYNC *ctx, const char *uri) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->unlink(uri);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_unlink(uri);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int csync_vio_chmod(CSYNC *ctx, const char *uri, mode_t mode) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->chmod(uri, mode);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_chmod(uri, mode);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int csync_vio_chown(CSYNC *ctx, const char *uri, uid_t owner, gid_t group) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->chown(uri, owner, group);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_chown(uri, owner, group);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
int csync_vio_utimes(CSYNC *ctx, const char *uri, const struct timeval *times) {
int rc = -1;
switch(ctx->replica) {
case REMOTE_REPLICA:
rc = ctx->module.method->utimes(uri, times);
break;
case LOCAL_REPLICA:
rc = csync_vio_local_utimes(uri, times);
break;
default:
CSYNC_LOG(CSYNC_LOG_PRIORITY_ALERT, "Invalid replica (%d)", (int)ctx->replica);
break;
}
return rc;
}
char *csync_vio_get_status_string(CSYNC *ctx) {
if(ctx->error_string) {
return ctx->error_string;
}
if(VIO_METHOD_HAS_FUNC(ctx->module.method, get_error_string)) {
return ctx->module.method->get_error_string();
}
return NULL;
}
int csync_vio_set_property(CSYNC* ctx, const char* key, void* data) {
int rc = -1;
if(VIO_METHOD_HAS_FUNC(ctx->module.method, set_property))
rc = ctx->module.method->set_property(key, data);
return rc;
}
int csync_vio_commit(CSYNC *ctx) {
int rc = 0;
if (VIO_METHOD_HAS_FUNC(ctx->module.method, commit)) {
rc = ctx->module.method->commit();
if(ctx->error_string) {
return ctx->error_string;
}
return rc;
return owncloud_error_string(ctx);
}

View File

@@ -33,43 +33,13 @@ typedef struct fhandle_s {
int fd;
} fhandle_t;
int csync_vio_init(CSYNC *ctx, const char *module, const char *args);
void csync_vio_shutdown(CSYNC *ctx);
csync_vio_handle_t *csync_vio_open(CSYNC *ctx, const char *uri, int flags, mode_t mode);
csync_vio_handle_t *csync_vio_creat(CSYNC *ctx, const char *uri, mode_t mode);
int csync_vio_close(CSYNC *ctx, csync_vio_handle_t *handle);
ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count);
ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count);
int csync_vio_sendfile(CSYNC *ctx, csync_vio_handle_t *sfp, csync_vio_handle_t *dst);
int64_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, int64_t offset, int whence);
int csync_vio_put(CSYNC *ctx, csync_vio_handle_t *flocal, csync_vio_handle_t *fremote, csync_file_stat_t *st);
int csync_vio_get(CSYNC *ctx, csync_vio_handle_t *flocal, csync_vio_handle_t *fremote, csync_file_stat_t *st);
csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name);
int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle);
csync_vio_file_stat_t *csync_vio_readdir(CSYNC *ctx, csync_vio_handle_t *dhandle);
int csync_vio_mkdir(CSYNC *ctx, const char *uri, mode_t mode);
int csync_vio_mkdirs(CSYNC *ctx, const char *uri, mode_t mode);
int csync_vio_rmdir(CSYNC *ctx, const char *uri);
const char *csync_vio_get_etag(CSYNC *ctx, const char *path);
int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf);
int csync_vio_rename(CSYNC *ctx, const char *olduri, const char *newuri);
int csync_vio_unlink(CSYNC *ctx, const char *uri);
int csync_vio_chmod(CSYNC *ctx, const char *uri, mode_t mode);
int csync_vio_chown(CSYNC *ctx, const char *uri, uid_t owner, gid_t group);
int csync_vio_utimes(CSYNC *ctx, const char *uri, const struct timeval *times);
int csync_vio_set_property(CSYNC *ctx, const char *key, void *data);
char *csync_vio_get_status_string(CSYNC *ctx);
int csync_vio_commit(CSYNC *ctx);
int csync_vio_getfd(csync_vio_handle_t *fhandle);
#endif /* _CSYNC_VIO_H */

View File

@@ -22,14 +22,8 @@
#include "vio/csync_vio_file_stat.h"
csync_vio_file_stat_t *csync_vio_file_stat_new(void) {
csync_vio_file_stat_t *file_stat = NULL;
file_stat = (csync_vio_file_stat_t *) c_malloc(sizeof(csync_vio_file_stat_t));
if (file_stat == NULL) {
return NULL;
}
file_stat->etag = NULL;
memset(file_stat->file_id, 0, FILE_ID_BUF_SIZE+1);
csync_vio_file_stat_t *file_stat = (csync_vio_file_stat_t *) c_malloc(sizeof(csync_vio_file_stat_t));
ZERO_STRUCTP(file_stat);
return file_stat;
}
@@ -39,15 +33,11 @@ void csync_vio_file_stat_destroy(csync_vio_file_stat_t *file_stat) {
return;
}
if (file_stat->fields & CSYNC_VIO_FILE_STAT_FIELDS_SYMLINK_NAME) {
SAFE_FREE(file_stat->u.symlink_name);
}
if (file_stat->fields & CSYNC_VIO_FILE_STAT_FIELDS_CHECKSUM) {
SAFE_FREE(file_stat->u.checksum);
}
if (file_stat->fields & CSYNC_VIO_FILE_STAT_FIELDS_ETAG) {
SAFE_FREE(file_stat->etag);
}
SAFE_FREE(file_stat->directDownloadUrl);
SAFE_FREE(file_stat->directDownloadCookies);
SAFE_FREE(file_stat->name);
SAFE_FREE(file_stat);
}

View File

@@ -25,7 +25,7 @@
* cannot include csync_private here because
* that would cause circular inclusion
*/
#include "c_private.h"
#include "std/c_private.h"
#include "csync.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -34,6 +34,9 @@
#define FILE_ID_BUF_SIZE 21
// currently specified at https://github.com/owncloud/core/issues/8322 are 9 to 10
#define REMOTE_PERM_BUF_SIZE 15
typedef struct csync_vio_file_stat_s csync_vio_file_stat_t;
enum csync_vio_file_flags_e {
@@ -56,48 +59,44 @@ enum csync_vio_file_type_e {
enum csync_vio_file_stat_fields_e {
CSYNC_VIO_FILE_STAT_FIELDS_NONE = 0,
CSYNC_VIO_FILE_STAT_FIELDS_TYPE = 1 << 0,
CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS = 1 << 1,
CSYNC_VIO_FILE_STAT_FIELDS_MODE = 1 << 1, // local POSIX mode
CSYNC_VIO_FILE_STAT_FIELDS_FLAGS = 1 << 2,
CSYNC_VIO_FILE_STAT_FIELDS_DEVICE = 1 << 3,
CSYNC_VIO_FILE_STAT_FIELDS_INODE = 1 << 4,
CSYNC_VIO_FILE_STAT_FIELDS_LINK_COUNT = 1 << 5,
CSYNC_VIO_FILE_STAT_FIELDS_SIZE = 1 << 6,
CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_COUNT = 1 << 7, /* will be removed */
CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_SIZE = 1 << 8, /* will be removed */
// CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_COUNT = 1 << 7, /* will be removed */
// CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_SIZE = 1 << 8, /* will be removed */
CSYNC_VIO_FILE_STAT_FIELDS_ATIME = 1 << 9,
CSYNC_VIO_FILE_STAT_FIELDS_MTIME = 1 << 10,
CSYNC_VIO_FILE_STAT_FIELDS_CTIME = 1 << 11,
CSYNC_VIO_FILE_STAT_FIELDS_SYMLINK_NAME = 1 << 12,
CSYNC_VIO_FILE_STAT_FIELDS_CHECKSUM = 1 << 13,
CSYNC_VIO_FILE_STAT_FIELDS_ACL = 1 << 14,
CSYNC_VIO_FILE_STAT_FIELDS_UID = 1 << 15,
CSYNC_VIO_FILE_STAT_FIELDS_GID = 1 << 16,
// CSYNC_VIO_FILE_STAT_FIELDS_SYMLINK_NAME = 1 << 12,
// CSYNC_VIO_FILE_STAT_FIELDS_CHECKSUM = 1 << 13,
// CSYNC_VIO_FILE_STAT_FIELDS_ACL = 1 << 14,
// CSYNC_VIO_FILE_STAT_FIELDS_UID = 1 << 15,
// CSYNC_VIO_FILE_STAT_FIELDS_GID = 1 << 16,
CSYNC_VIO_FILE_STAT_FIELDS_ETAG = 1 << 17,
CSYNC_VIO_FILE_STAT_FIELDS_FILE_ID = 1 << 18
CSYNC_VIO_FILE_STAT_FIELDS_FILE_ID = 1 << 18,
CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADURL = 1 << 19,
CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES = 1 << 20,
CSYNC_VIO_FILE_STAT_FIELDS_PERM = 1 << 21 // remote oC perm
};
struct csync_vio_file_stat_s {
union {
char *symlink_name;
char *checksum;
} u;
void *acl;
char *name;
char *etag;
char *etag; // FIXME: Should this be inlined like file_id and perm?
char file_id[FILE_ID_BUF_SIZE+1];
uid_t uid;
gid_t gid;
char *directDownloadUrl;
char *directDownloadCookies;
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
time_t atime;
time_t mtime;
time_t ctime;
int64_t size;
int64_t blksize; /* will be removed in future, not used in csync */
unsigned long blkcount; /* will be removed in future, not used in csync */
mode_t mode;
@@ -109,10 +108,6 @@ struct csync_vio_file_stat_s {
enum csync_vio_file_type_e type;
enum csync_vio_file_flags_e flags;
void *reserved1;
void *reserved2;
void *reserved3;
};
csync_vio_file_stat_t *csync_vio_file_stat_new(void);

View File

@@ -1,50 +0,0 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "c_lib.h"
#include "vio/csync_vio_handle_private.h"
csync_vio_handle_t *csync_vio_handle_new(const char *uri, csync_vio_method_handle_t *method_handle) {
csync_vio_handle_t *new = NULL;
if (uri == NULL || method_handle == NULL) {
return NULL;
}
new = c_malloc(sizeof(csync_vio_handle_t));
if (new == NULL) {
return NULL;
}
new->uri = c_strdup(uri);
new->method_handle = method_handle;
return new;
}
void csync_vio_handle_destroy(csync_vio_handle_t *handle) {
if (handle == NULL || handle->uri == NULL) {
return;
}
SAFE_FREE(handle->uri);
SAFE_FREE(handle);
}

View File

@@ -21,7 +21,6 @@
#ifndef _CSYNC_VIO_HANDLE_H
#define _CSYNC_VIO_HANDLE_H
typedef void csync_vio_method_handle_t;
typedef struct csync_vio_handle_s csync_vio_handle_t;
typedef void csync_vio_handle_t;
#endif /* _CSYNC_VIO_HANDLE_H */

View File

@@ -23,13 +23,4 @@
#include "vio/csync_vio_handle.h"
struct csync_vio_handle_s {
char *uri;
csync_vio_method_handle_t *method_handle;
};
csync_vio_handle_t *csync_vio_handle_new(const char *uri, csync_vio_method_handle_t *method_handle);
void csync_vio_handle_destroy(csync_vio_handle_t *handle);
#endif /* _CSYNC_VIO_HANDLE_PRIVATE_H */

Some files were not shown because too many files have changed in this diff Show More