1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-25 12:42:48 +02:00
Commit Graph

114 Commits

Author SHA1 Message Date
Michael Schuster
6979b12488
[stable-3.0] 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:23:49 +02:00
Michael Schuster
1537577ade Windows MSI: Let CMake install Shell Extensions WiX fragment to "msi/"
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-21 15:36:32 +00:00
Michael Schuster
fc79e035c6
Fix spacing
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 4df8db4ff6)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:32:06 +02:00
Michael Schuster
ee332dcaec
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>
(cherry picked from commit db05f65e0d)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:31:56 +02:00
Michael Schuster
b5fc4f86a7
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>
(cherry picked from commit 11632da7ea)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:31:23 +02:00
Michael Schuster
3ac99c75b0
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>
(cherry picked from commit 0ba5df597f)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:28:18 +02:00
Michael Schuster
a02e4a2913
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>
(cherry picked from commit 8ce13b7bdb)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:28:10 +02:00
Hannah von Reth
a7b93e36ff
Remove dead code
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 4675869fb3)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:28:02 +02:00
Hannah von Reth
a742a42f4c
2.7 has less automatic includes on Windows
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit bfd7707ff4)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:53 +02:00
Hannah von Reth
2537f0cd4c
Cleanup Windows shell extensions
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 34e9e2f288)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:44 +02:00
Hannah von Reth
4e44f46b9e
Remove outdated visual studio projects, we now use cmake
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 6c9a31f6ee)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:35 +02:00
Dominik Schmidt
b86bc92875
Avoid warning because /MT overrides /MD flag
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 13d4b91935)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:27 +02:00
Dominik Schmidt
c3b1e4bd9a
Make OCUtil helper lib static and link it statically against crt
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit e4b53b12e1)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:11 +02:00
Olivier Goffart
3fd3f85558
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>
(cherry picked from commit 906556640d)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:27:01 +02:00
Christian Kamm
811b0eb6db
Windows shellext: Update copyrights and company name
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 77cc262337)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:26:52 +02:00
Olivier Goffart
7acc7dae35
windows shell extension: add OCUtil/resource.h
It's a copy from OCContextMenu/resources.h

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 6274462036)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:26:42 +02:00
Christian Kamm
4c9e19b82c
Windows shellext: Add rc for OCUtil #6554
To set the dll's metadata.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit c6fc46aa09)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-08-20 21:26:12 +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
Jocelyn Turcotte
03a90bf03f shell/windows: Build 43, add missing 32 bit binaries
Also include a minor change from #5025
2016-07-26 14:54:27 +02:00
Jocelyn Turcotte
ff7b2381e9 shell/windows: Add missing Win32 configuration changes
The changes in build location were only done on the x64 configuration.
2016-07-26 14:53:14 +02:00
arthurchiao
7a2a439426 fix #5015 overlay icon not show: compare folder paths with no case-sensitivity 2016-07-01 13:03:42 +08:00
Jocelyn Turcotte
ba96fb89a5 shell_integration/windows: Set VS output directory in the binary submodule
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.
2016-06-27 15:23:37 +02:00