Skip to content

Commit 34d431f

Browse files
committed
Merge branch 'master' into feature/folder-rename-via-GUI
2 parents 920faa1 + fe799e9 commit 34d431f

File tree

139 files changed

+8760
-3843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8760
-3843
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
path: /drone/build
1010
commands:
1111
- cd /drone/build
12-
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
12+
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
1313
- name: compile
1414
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
1515
volumes:
@@ -53,7 +53,7 @@ steps:
5353
path: /drone/build
5454
commands:
5555
- cd /drone/build
56-
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
56+
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
5757
- name: compile
5858
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
5959
volumes:

.tx/nextcloud.client-desktop/oc_translation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ Icon=@APPLICATION_EXECUTABLE@
2222

2323
# Translations
2424
Icon[oc]=@APPLICATION_ICON_NAME@
25+
Name[oc]=@APPLICATION_NAME@ Burèu
2526
Comment[oc]=@APPLICATION_NAME@ client de sincronizacion
2627
GenericName[oc]=Sincro. dossièr

.tx/nextcloud.client-desktop/sv_translation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ Icon=@APPLICATION_EXECUTABLE@
2222

2323
# Translations
2424
Icon[sv]=@APPLICATION_ICON_NAME@
25+
Name[sv]=@APPLICATION_NAME@ Skrivbord
2526
Comment[sv]=@APPLICATION_NAME@ desktopssynkroniseringsklient
2627
GenericName[sv]=Mappsynkronisering

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.6)
22
set(CMAKE_CXX_STANDARD 14)
3+
cmake_policy(SET CMP0071 NEW) # Enable use of QtQuick compiler/generated code
34

45
project(client)
56

@@ -96,7 +97,7 @@ endif()
9697
message(STATUS "GIT_SHA1 ${GIT_SHA1}")
9798

9899
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
99-
set(SHAREDIR ${CMAKE_INSTALL_DATADIR})
100+
set(SHAREDIR ${CMAKE_INSTALL_FULL_DATADIR})
100101

101102
# Build MacOS app bundle if wished
102103
if(APPLE AND BUILD_OWNCLOUD_OSX_BUNDLE)
@@ -106,6 +107,9 @@ if(APPLE AND BUILD_OWNCLOUD_OSX_BUNDLE)
106107
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
107108
endif()
108109

110+
111+
option(QUICK_COMPILER "Use QtQuick compiler to improve performance" OFF)
112+
109113
# this option removes Http authentication, keychain, shibboleth etc and is intended for
110114
# external authentication mechanisms
111115
option(TOKEN_AUTH_ONLY "TOKEN_AUTH_ONLY" OFF)
@@ -182,6 +186,7 @@ if(BUILD_CLIENT)
182186
pkg_check_modules(CLOUDPROVIDERS cloudproviders IMPORTED_TARGET)
183187

184188
if(CLOUDPROVIDERS_FOUND)
189+
pkg_check_modules(DBUS-1 REQUIRED dbus-1 IMPORTED_TARGET)
185190
pkg_check_modules(GIO REQUIRED gio-2.0 IMPORTED_TARGET)
186191
pkg_check_modules(GLIB2 REQUIRED glib-2.0 IMPORTED_TARGET)
187192
endif()

admin/win/msi/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ install(FILES
2626
${CMAKE_CURRENT_BINARY_DIR}/make-msi.bat
2727
Platform.wxi
2828
Nextcloud.wxs
29+
RegistryCleanup.vbs
30+
RegistryCleanupCustomAction.wxs
2931
gui/banner.bmp
3032
gui/dialog.bmp
3133
DESTINATION msi/)

admin/win/msi/Nextcloud.wxs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,16 @@
7676

7777
<!-- Uninstall: Remove sync folders from Explorer's Navigation Pane, only effective for the current user (home users) -->
7878
<Custom Action="RemoveNavigationPaneEntries" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
79+
80+
<!-- Uninstall: Cleanup the Registry -->
81+
<Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
7982

8083
<!-- Schedule Reboot for the Shell Extensions (in silent installation mode only, or if SCHEDULE_REBOOT argument is set-->
8184
<ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR NOT (UILevel=2)</ScheduleReboot>
8285
</InstallExecuteSequence>
8386

8487
<!-- "Add or Remove" Programs Entries -->
88+
<Property Id="APPNAME">$(var.AppName)</Property>
8589
<Property Id="ARPPRODUCTICON">$(var.AppIcon)</Property>
8690
<Property Id="ARPHELPLINK">$(var.AppHelpLink)</Property>
8791
<Property Id="ARPURLINFOABOUT">$(var.AppInfoLink)</Property>

admin/win/msi/RegistryCleanup.vbs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
On Error goto 0
2+
3+
Const HKEY_LOCAL_MACHINE = &H80000002
4+
5+
Const strObjRegistry = "winmgmts:\\.\root\default:StdRegProv"
6+
7+
Function RegistryDeleteKeyRecursive(regRoot, strKeyPath)
8+
Set objRegistry = GetObject(strObjRegistry)
9+
objRegistry.EnumKey regRoot, strKeyPath, arrSubkeys
10+
If IsArray(arrSubkeys) Then
11+
For Each strSubkey In arrSubkeys
12+
RegistryDeleteKeyRecursive regRoot, strKeyPath & "\" & strSubkey
13+
Next
14+
End If
15+
objRegistry.DeleteKey regRoot, strKeyPath
16+
End Function
17+
18+
Function RegistryListSubkeys(regRoot, strKeyPath)
19+
Set objRegistry = GetObject(strObjRegistry)
20+
objRegistry.EnumKey regRoot, strKeyPath, arrSubkeys
21+
RegistryListSubkeys = arrSubkeys
22+
End Function
23+
24+
Function GetUserSID()
25+
Dim objWshNetwork, objUserAccount
26+
27+
Set objWshNetwork = CreateObject("WScript.Network")
28+
29+
Set objUserAccount = GetObject("winmgmts://" & objWshNetwork.UserDomain & "/root/cimv2").Get("Win32_UserAccount.Domain='" & objWshNetwork.ComputerName & "',Name='" & objWshNetwork.UserName & "'")
30+
GetUserSID = objUserAccount.SID
31+
End Function
32+
33+
Function RegistryCleanupSyncRootManager()
34+
strSyncRootManagerKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager"
35+
36+
arrSubKeys = RegistryListSubkeys(HKEY_LOCAL_MACHINE, strSyncRootManagerKeyPath)
37+
38+
If IsArray(arrSubkeys) Then
39+
arrSubkeys=Filter(arrSubkeys, Session.Property("APPNAME"))
40+
End If
41+
If IsArray(arrSubkeys) Then
42+
arrSubkeys=Filter(arrSubkeys, GetUserSID())
43+
End If
44+
45+
If IsArray(arrSubkeys) Then
46+
For Each strSubkey In arrSubkeys
47+
RegistryDeleteKeyRecursive HKEY_LOCAL_MACHINE, strSyncRootManagerKeyPath & "\" & strSubkey
48+
Next
49+
End If
50+
End Function
51+
52+
Function RegistryCleanup()
53+
RegistryCleanupSyncRootManager()
54+
End Function
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Fragment>
4+
<Binary Id="RegistryCleanup" SourceFile="RegistryCleanup.vbs"/>
5+
<CustomAction Id='RegistryCleanupCustomAction' BinaryKey="RegistryCleanup" VBScriptCall="RegistryCleanup" Return="ignore" Execute="immediate"/>
6+
</Fragment>
7+
</Wix>

admin/win/msi/make-msi.bat.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Rem Generate collect.wxs
1717
if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
1818

1919
Rem Compile en-US (https://www.firegiant.com/wix/tutorial/transforms/morphing-installers/)
20-
"%WIX%\bin\candle.exe" -dcodepage=1252 -dPlatform=%BuildArch% -arch %BuildArch% -dHarvestAppDir="%HarvestAppDir%" -ext WixUtilExtension NCMsiHelper.wxs WinShellExt.wxs collect.wxs Nextcloud.wxs
20+
"%WIX%\bin\candle.exe" -dcodepage=1252 -dPlatform=%BuildArch% -arch %BuildArch% -dHarvestAppDir="%HarvestAppDir%" -ext WixUtilExtension NCMsiHelper.wxs WinShellExt.wxs collect.wxs Nextcloud.wxs RegistryCleanupCustomAction.wxs
2121
if %ERRORLEVEL% neq 0 exit %ERRORLEVEL%
2222

2323
Rem Link MSI package
24-
"%WIX%\bin\light.exe" -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us NCMsiHelper.wixobj WinShellExt.wixobj collect.wixobj Nextcloud.wixobj -out "@MSI_INSTALLER_FILENAME@"
24+
"%WIX%\bin\light.exe" -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us NCMsiHelper.wixobj WinShellExt.wixobj collect.wixobj Nextcloud.wixobj RegistryCleanupCustomAction.wixobj -out "@MSI_INSTALLER_FILENAME@"
2525

2626
exit %ERRORLEVEL%

doc/architecture.rst

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ result, the Nextcloud Client runs on Linux, Windows, and MacOS.
2121
The Synchronization Process
2222
---------------------------
2323

24-
The process of synchronization keeps files in two separate repositories the
24+
The process of synchronization keeps files in two separate repositories the
2525
same. When synchronized:
2626

2727
- If a file is added to one repository it is copied to the other synchronized repository.
@@ -93,7 +93,7 @@ traverses the file tree and compares the modification time of each file with an
9393
expected value stored in its database. If the value is not the same, the client
9494
determines that the file has been modified in the local repository.
9595

96-
.. note:: On the local side, the modification time is a good attribute to use for
96+
.. note:: On the local side, the modification time is a good attribute to use for
9797
detecting changes, because
9898
the value does not depend on time shifts and such.
9999

@@ -122,7 +122,7 @@ Conflict files are always created on the client and never on the server.
122122
123123
In ownCloud 10.0 we implemented a checksum feature which checks the file integrity on upload and download by computing a checksum after the file transfer finishes.
124124
The client queries the server capabilities after login to decide which checksum algorithm to use.
125-
Currently, SHA1 is hard-coded in the official server release and can't be changed by the end-user.
125+
Currently, SHA1 is hard-coded in the official server release and can't be changed by the end-user.
126126
Note that the server additionally also supports MD5 and Adler-32, but the desktop client will always use the checksum algorithm announced in the capabilities:
127127

128128
::
@@ -202,14 +202,14 @@ Conflict files are always created on the client and never on the server.
202202
Upload
203203
~~~~~~
204204

205-
A checksum is calculated with the previously negotiated algorithm by the client and sent along with the file in an HTTP Header.
205+
A checksum is calculated with the previously negotiated algorithm by the client and sent along with the file in an HTTP Header.
206206
```OC-Checksum: [algorithm]:[checksum]```
207207

208208
.. image:: ./images/checksums/client-activity.png
209209

210-
During file upload, the server computes SHA1, MD5, and Adler-32 checksums and compares one of them to the checksum supplied by the client.
210+
During file upload, the server computes SHA1, MD5, and Adler-32 checksums and compares one of them to the checksum supplied by the client.
211211

212-
On mismatch, the server returns HTTP Status code 400 (Bad Request) thus signaling the client that the upload failed.
212+
On mismatch, the server returns HTTP Status code 400 (Bad Request) thus signaling the client that the upload failed.
213213
The server then discards the upload, and the client blacklists the file:
214214

215215
.. image:: ./images/checksums/testing-checksums.png
@@ -223,29 +223,29 @@ Conflict files are always created on the client and never on the server.
223223
client.</s:message>
224224
</d:error>
225225

226-
The client retries the upload using exponential back-off.
226+
The client retries the upload using exponential back-off.
227227
On success (matching checksum) the computed checksums are stored by the server in ``oc_filecache`` alongside the file.
228228

229229
Chunked Upload
230230
~~~~~~~~~~~~~~
231231

232-
Mostly same as above.
233-
The checksum of the full file is sent with every chunk of the file.
232+
Mostly same as above.
233+
The checksum of the full file is sent with every chunk of the file.
234234
But the server only compares the checksum after receiving the checksum sent with the last chunk.
235235

236236
Download
237237
~~~~~~~~
238238

239239
The server sends the checksum in an HTTP header with the file. (same format as above).
240-
If no checksum is found in ``oc_filecache`` (freshly mounted external storage) it is computed and stored in ``oc_filecache`` on the first download.
241-
The checksum is then provided on all subsequent downloads but not on the first.
240+
If no checksum is found in ``oc_filecache`` (freshly mounted external storage) it is computed and stored in ``oc_filecache`` on the first download.
241+
The checksum is then provided on all subsequent downloads but not on the first.
242242

243243
.. _ignored-files-label:
244244

245245
Ignored Files
246246
-------------
247247

248-
The Nextcloud Client supports the ability to exclude or ignore certain files from the synchronization process.
248+
The Nextcloud Client supports the ability to exclude or ignore certain files from the synchronization process.
249249
Some system wide file patterns that are used to exclude or ignore files are included with the client by default and the Nextcloud Client provides the ability to add custom patterns.
250250

251251
By default, the Nextcloud Client ignores the following files:
@@ -262,18 +262,18 @@ By default, the Nextcloud Client ignores the following files:
262262
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
263263
a line in the exclude file starts with the character ``]`` directly followed by
264264
the file pattern), files matching the pattern are considered *fleeting meta
265-
data*.
265+
data*.
266266

267267
These files are ignored and *removed* by the client if found in the
268-
synchronized folder.
268+
synchronized folder.
269269
This is suitable for meta files created by some applications that have no sustainable meaning.
270270

271-
If a pattern ends with the forward slash (``/``) character, only directories are matched.
271+
If a pattern ends with the forward slash (``/``) character, only directories are matched.
272272
The pattern is only applied for directory components of filenames selected using the checkbox.
273273

274274
To match filenames against the exclude patterns, the UNIX standard C library
275-
function ``fnmatch`` is used.
276-
This process checks the filename against the specified pattern using standard shell wildcard pattern matching.
275+
function ``fnmatch`` is used.
276+
This process checks the filename against the specified pattern using standard shell wildcard pattern matching.
277277
For more information, please refer to `The opengroup website
278278
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`_.
279279

@@ -369,7 +369,7 @@ is renamed or moved.
369369
Example:
370370

371371
<oc:id>00000020oc5cfy6qqizm</oc:id>
372-
372+
373373
End-to-end Encryption
374374
---------------------
375375

@@ -440,13 +440,3 @@ Files that must be removed from the local storage only, need to be dehydrated vi
440440

441441
.. note::
442442
* End-to-end Encryption works with Virtual Files (VFS) but only on a per-folder level. Folders with E2EE can be made available offline in their entirety, but the individual files in them can not be retrieved on demand. This is mainly due to two technical reasons. First, the Windows VFS API is not designed for handling encrypted files. Second, while the VFS is designed to deal mostly with large files, E2EE is mostly recommended for use with small files as encrypting and decrypting large files puts large demands on the computer infrastructure.
443-
444-
445-
User Status
446-
-----------
447-
448-
Starting from 3.2.0, user status is displayed in the Nextcloud desktop client's tray window. The icon and a text message are displayed as long as those are set in the user's account menu in the Web UI (server's website). At the moment, setting the status from the desktop client is not available.
449-
The status is updated almost immediately after it is set in the Web UI. Default user status is always "Online" if no other status is available from the server-side.
450-
451-
.. image:: images/status_feature_example.png
452-
:alt: User Status feature in the tray window

0 commit comments

Comments
 (0)