1
0
Fork 0
Commit Graph

118 Commits

Author SHA1 Message Date
allexzander 871210326f Windows. Nextcloud Overlay Identifiers. Set 16 spaces before each identifier's name.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-14 16:15:02 +03:00
Hannah von Reth bff386e5c1 Fix int uint warning
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-06 07:35:59 +00:00
Christian Kamm 2b20985875
winvfs: initial work
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Michael Schuster 61dc4b9137
Update comments
Everyone uses their private mail, so ensure people can get in touch.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-10-15 02:18:52 +02:00
Michael Schuster fc365df5de
Windows MSI: Let CMake install Shell Extensions WiX fragment to "msi/"
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-21 16:40:19 +02:00
Michael Schuster 4df8db4ff6
Fix spacing
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Michael Schuster db05f65e0d
Windows shell extensions: Add WiX (MSI) fragment
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>
2020-08-20 18:50:05 +02:00
Michael Schuster 11632da7ea
Windows shell extensions: Change NCUtil Pipe name from ownCloud to APPLICATION_EXECUTABLE
Avoid interference with foreign pipes as this is always a bad idea ;p

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Michael Schuster 0ba5df597f
Windows shell extensions: Rename all files and classes from OC* to NC*, update version info
This also ensures a clear separation in the system registry.

SelfReg is not recommended by Microsoft and will be handled by the MSI package to allow proper Repair and Uninstall.
However, we keep it for backward compatibility with the NSIS installer.

For details see:
https://stackoverflow.com/questions/364187/how-do-you-register-a-win32-com-dll-file-in-wix-3#364210
https://docs.microsoft.com/en-us/windows/win32/msi/selfreg-table#remarks

Another fix by this commit:
The "Version" registry value in the NCOverlays self reg should be a key and not a value.

Details: https://wixtoolset.org/documentation/manual/v3/xsd/wix/class.html

Example:

  [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Version]
  @="1.0.0.0"

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Michael Schuster 8ce13b7bdb
Windows shell extensions: Use custom GUIDs via CMake and prepare MSI reg
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>
2020-08-20 18:50:05 +02:00
Hannah von Reth 4675869fb3
Remove dead code
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Hannah von Reth bfd7707ff4
2.7 has less automatic includes on Windows
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Hannah von Reth 34e9e2f288
Cleanup Windows shell extensions
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Hannah von Reth 6c9a31f6ee
Remove outdated visual studio projects, we now use cmake
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Dominik Schmidt 13d4b91935
Avoid warning because /MT overrides /MD flag
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Dominik Schmidt e4b53b12e1
Make OCUtil helper lib static and link it statically against crt
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Olivier Goffart 906556640d
Windows Shell Integration: Don't limit the size of the buffer
Otherwise we can't have operation that has many many filename

As reported in #6780

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Christian Kamm 77cc262337
Windows shellext: Update copyrights and company name
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Olivier Goffart 6274462036
windows shell extension: add OCUtil/resource.h
It's a copy from OCContextMenu/resources.h

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Christian Kamm c6fc46aa09
Windows shellext: Add rc for OCUtil #6554
To set the dll's metadata.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 18:50:05 +02:00
Kevin Ottens c50a968a1e
Add more raw string literals missed previously
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 09:48:29 +02:00
Michael Schuster 456c1eadbe
Simplify nullptr comparisons where appropriate
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>
2020-06-11 00:27:30 +02:00
Michael Schuster 2b680cadd3 Fix nullptr regression in RegistryUtil::ReadRegistry
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>
2020-06-09 18:34:43 +02:00
Stephan Beyer ea16804751 Replace NULL by nullptr in all C++ files
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>
2020-06-08 20:07:50 +02:00
Kevin Ottens bfdb1e730a Fix leak in FileUtil::IsChildFile
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-12 14:32:34 +02:00
Christian Kamm a704cca090 Windows: Fix context menu handling only own verbs #7004
Previously it'd handle all verbs as if they were our own.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-03-03 18:56:09 +01:00
Dominique Fuchs 9a256fcbfe usage of UINT as iterator here because comparing with UINT retval from DragQueryFile
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-07 21:42:10 +02:00
Dominique Fuchs 112d2bfe11 Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-07 21:28:12 +02:00
Dominique Fuchs 69a11a7ec1 Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-07 21:26:40 +02:00
Dominique Fuchs 3960ffea3f Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-07 20:58:20 +02:00
Olivier Goffart 0d0bff4bf5
Windows Shell extention: Fix clicking on the menu entries
Issue #6553
2018-06-21 19:21:07 +02:00
Olivier Goffart 883080b557 Windows shell extension: port to the new protocol 2018-01-23 14:02:56 +01:00
Dominik Schmidt fc62e9e9d9 Fix .def and .rc files not being compiled into windows shell extensions 2018-01-13 21:01:09 +01:00
Dominik Schmidt 15967b1219 Install all dlls to BINDIR so craft does not ignore them 2018-01-13 13:58:17 +01:00
Dominik Schmidt 4e52ee9ebd Build Explorer extension if building with MSVC 2018-01-13 13:58:17 +01:00
Martin cd2057fc04 Update Overlay Icon naming 2017-12-12 10:18:00 +01:00
Jocelyn Turcotte af4f1083b7 shell/windows Build 46: Private links context menu 2017-07-07 18:10:48 +02:00
Christian Kamm ca2ffd4fb3 SocketAPI: Change strings to a consistent _MENU_TITLE postfix 2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 7a4daf799a shell/windows: Use a submenu to include private link actions
Refactor things a bit to be able to reuse some code and
clean things up.
2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 9daef50ce6 shell/Windows: Update binaries to build 45 2017-06-14 14:17:50 +02:00
Frederik Juul Christiani fae178f70b shell_integration/windows: Create _newQueries as a non-signaled auto-reset event.
Since ResetEvent() is never called, the call to WaitForMultipleObjects()
can always return immediately once the event has been signaled.
2017-06-14 12:14:22 +02:00
Frederik Juul Christiani 744208f701 Initialize stop variable.
Avoid stopping the worker thread immediately if the stop variable happens to be true.
2017-06-14 12:14:21 +02:00
Christian Kamm cdf16dd905 Remove unreachable code #5582 2017-03-07 13:23:47 +01:00
Jocelyn Turcotte 166ef85a51 shell/Windows: Update binaries to build 44 2017-01-18 13:34:02 +01:00
Jocelyn Turcotte 47fbfbc006 shell/Windows: Avoid memory allocations and copies when querying icons
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.
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte e131c142ff shell/Windows: Fix the view not being updated on StateError
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.
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte 1b99ff2e91 shell/Windows: Remove the UPDATE_VIEW message handling
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
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte 3e85d47a57 shell/Windows: Convert tabs to space
It was a mix of both and the rest of the code uses spaces.
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte e709d75d56 shell/Windows: Remove unused files
The real OCContextMenu.cpp is in the OCContextMenu folder.
2017-01-18 12:15:52 +01:00
Daniel Molkentin b575ded464 More GmbH -> Inc Copyright header fixes 2016-07-26 16:53:11 +02:00