Commit b34a901838 ("Use FindPkgConfig to find libcloudproviders and
related libs") introduced the usage of cmake's FindPkgConfig module
which provides `pkg_get_variable` since version 3.4 that can be used
instead of the custom `PKGCONFIG_GETVAR` macro
Signed-off-by: Marvin Schmidt <marv@exherbo.org>
Instead of installing a .desktop file, it is now converted
to JSON and compiled into the plugin itself. The plugin is
also installed into a different directory.
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,modernize-use-nodiscard' -fix
under linux with most part of our code covered
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
For development a app bundle is not needed. The app bundle is only
needed for distribution and macdeployqt takes a lot of time.
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
It appears that several extension can be loaded at the same time, but their
classname for the extension need to be different, otherwise only the last
loaded one would be active.
Issue #6524
Use CMake to generate a WXI fragment to handle the DLL registration and file deployment for the shellext components.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Previously side by side installation with ownCloud or other NC custom builds would break the shell integration because the same GUIDs and registry keys were used.
Now we specify our custom GUIDs in NEXTCLOUD.cmake and use CMake to generate a header file and WiX (MSI) include file with these constants.
Note: Using generators like "guidgen" or "uuidgen" ensures that GUIDs are unique, as manual changes are not guaranteed to be.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Make the codebase consistent, we already have a lot of implicit pointer comparisons.
Exception: Stay explicit on return's, example:
return _db != nullptr;
Signed-off-by: Michael Schuster <michael@schuster.ms>
Merging PR #2057 caused the Windows build to fail:
shell_integration\windows\OCUtil\RegistryUtil.cpp(43): error C2664: 'LSTATUS RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY)': cannot convert argument 3 from 'nullptr' to 'DWORD'
The previous implementation prior the PR supplied NULL as the argument 3 to RegOpenKeyEx,
so it was silently accepted and translated to zero, satisfying the DWORD's type requirement.
Signed-off-by: Michael Schuster <michael@schuster.ms>
We keep NULL in the pure C files in src/csync/std and test/csync.
We also replace Doxygen documentation referring to "NULL" to
"\c nullptr" (formatted as code).
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
This both removes older Qt from the CI and also adjust all the
find_package calls in CMakeLists.txt
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Fixes issue #1948: https://github.com/nextcloud/desktop/issues/1948
The client already resolves symlinks when adding new paths to the
sync-list, but the Nautilus plugin did not do this yet, causing it
to not recognise synced folders if they were accessed via a symlink.
Signed-off-by: Daniel Vedder <d.vedder@web.de>
config.h needs to be included in the header already since we use APPLICATION_ICON_NAME there. This got introduced in 6fc877577c
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
When the filename contains a ':' it gets split too much and tokens[2] does not contain the full filename any more. Read the name from the original line instead.
Fixes#686
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
The nextcloud client can be started by any other application consuming libcloudproviers.
Make sure that the client won't pop-up if we open the file manager.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Get rid of a bunch of such warnings from configuring the Dolphin plugin:
CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:345 (message):
BIN_INSTALL_DIR is deprecated, use KDE_INSTALL_BINDIR instead.
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:433 (_define_relative)
shell_integration/dolphin/CMakeLists.txt:23 (include)
Modified from https://github.com/owncloud/client/pull/6922
Original author: Dominik Schmidt <dev@dominik-schmidt.de>
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.
Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.
Relates to issue: #6406
As per XDG Base Directories specification:
> If $XDG_RUNTIME_DIR is not set applications should fall back
> to a replacement directory [...]
In practice, the ownCloud client has the fallback, but the plugin
helper does not, and if $XDG_RUNTIME_DIR is not set, the plugin
mysteriously does not work.
Previously no menu would ever be shown if more than one file is
selected. Now the GET_MENU_ITEMS command is sent with all selected files
as an argument - similar to what is done for the dolphin integration.
This partially reverts commit 1c721e9422.
This caused the overlay plugin to be installed at the wrong place
because the kcoreaddons_add_plugin macto still use deprecated
${PLUGIN_INSTALL_DIR}.
I guess we'll have to live with the warnings.
cmake/modules/ECMAddAppIcon.cmake is heavily patched to support sidebar icons, OUTFILE_BASE parameter and to not include 64 and 64@2x icons on macOS which are not supported. All changes are made in a way that we can upstream this.
This commit integrates support for libcloudproviders
desktop integration API. If build with the library it
will check on startup if the DBus interface is available
and then use it instead of the legacy status icon.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Having to update the plugins to add a submenu in the context menu,
it's more cost-effective to remove support for legacy macOS versions
than implementing and testing this setup.
* SocketAPI has COPL_LOCAL_LINK / EMAIL_LOCAL_LINK commands
* The nautilus and dolphing shell integrations show a submenu from which
one can share as well as access the private link.
* The SocketAPI provides a new GET_STRINGS command to access localized
strings.
* The private link can also be accessed from the user/group sharing
dialog.
* The numeric file id is extracted from the full id to create the
private link url.
IsMemberOf is called for every file (in the ownCloud directory or not) and
with every instance of OCOverlay (we have 5) when displaying a list of
files in Explorer.
Refactor the code to avoid copying the list of watched directories, as
well as creating a wstring from a PWWSTR for files outside watched
directories.
Also change some calls of begin_with to use isDescendantOf since it
properly handles parent paths not ending with a backslash, which could
lead to SocketAPI queries for sibling folders with a name that starts with
a watched folder name.
Since StateError == 0, if this was the status used when the path
isn't in the map already, the view would not be updated since the
new state would be the same as the default-constructed state in the
map. Fix by explicitly inserting in that case, this also avoid aving
to do two lookups in the map when a path already has an entry.
The client now tries to only push STATUS messages to connections
unless they previously requested it with a RETRIEVE_FILE_STATUS,
but this means that we now have to make sure that a new connection
will rerequest every icon that the user will see on files from that
point on.
To that end, we now send a SHChangeNotify for every file in the cache
when we lose the connection (or on UNREGISTER_PATH) to make sure that
what's on the screen matches what's in the cache. We also remove the
_oldCache logic that made this more difficult to enforce.
The client has been able to reliably push status updates on macOS
for a few versions now, and we don't need it on Windows either. The
_oldCache mechanism was to avoid sending to many update requests
when receiving an UPDATE_VIEW.
Also fixes#4766
The SocketAPI now only sends status pushes for paths requested by the
shell. We have to make sure that Finder doesn't just show the entry
from its cache after a reconnect.
Tell cmake not to escape shell strings adding backslashes before
spaces by passing the VERBATIM optiton. Also add the quotes to
whole command line arguments to prevent quotes from appearing on the
XCode side, because of the VERBATIM option.
This only affects themed clients since the default theme doesn't
have space in its APPLICATION_NAME.
OEM configurability creates binaries with OEM names which the .desktop
file doesn't take into account and thus dolphin integration does not
work if OEM changes the binary's name(s).
These changes are now integrated into the .desktop file at compile time.
Caja is a fork of nautilus maintained by the Mate project.
This adds a script to create a caja plugin from the nautilus plugin.
It replaces all occurences of nautilus with caja (case sensitive).
This is done in the same way the nemo plugin is generated from the nautilus one.
Issue #4608
* folder state is either OK or SYNC usually
* this extension does not know about if a folder is shareable
* a OK folder is shareable
* a SYNC folder could be uploaded or not uploaded
* this commit looks into file entries below this folder
* if one exists with state OK or SYNC
this folder must have been uploaded
* better would be if the server (gui) tells us
if the folder is uploaded
This allows creating a new build simply by hitting F7 in visual studio
and then committing the changed files in the binary submodules without
having to know which files to move where.
Since this isn't yet built together with the rest, we can't reliably
use the client version without having to rebuilt the extension manually
on each release. But it would still be nice to be able to tell if a user
has the right version or not loaded, so instead just tag each update of
the DLLs with a separate release version.
This means that every time we update those binaries we'll have to manually
increment the number in the header, but worst case we'll forget from time
to time but we'll be able to know if we didn't, and know if we can rely on
the number or not.
* Fix nautilus and nemo plugin branding strings.
Fix for owncloud/enterprise#1314
* nautilus plugin: Add a comment why the line needs to stay unchanged.
If the user tries to install an older version of a branded client
with shell extensions, and also install the 2.1 ownCloud client
side-by-side, both shell extensions DLLs will be registered and might
lead to both DLLs versions being loaded by exlorer, causing a system
crash.
Since we don't support both branded and non-branded shell extensions
to work at the same time, at least make sure to unregister any legacy
CLSID that could cause explorer to load the previous version DLL.
This script creates the Nemo plugin out of the Nautilus plugin.
Both are source compatible, but need to include the right modules
depending on the name of the file manager.
The script is called by cmake.
The bug seems to be in Windows when it upscales an smaller icon for
HiDPI displays. It works fine if we provide a 256x256 size in the
ico files.
Use the new square icons also used on OS X that removes the share badge
and instead has a share icon only for the OK state. This means that we
can also remove 3 icons and release 3 slots in the registry for
overlay icons (only the first few are actually loaded by explorer).
This also adds a script that uses ImageMagick to convert our SVG icons
to Windows ico files. Since ImageMagick seems to have issue doing
proper antialiasing with pixels on the edge of icons, this also
slightly scale the icons to leave 2px on each edge, out of its
logical 128px width.
... by replacing CONFIG by NO_MODULE option in find package
From the manual: "The CONFIG option may be used to skip Module mode
explicitly and switch to Config mode. It is synonymous to using
NO_MODULE."