Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Add icon to the Explorer context menu #4627

Closed
gig13 opened this issue Mar 30, 2016 · 16 comments · Fixed by #8661
Closed

[Windows] Add icon to the Explorer context menu #4627

gig13 opened this issue Mar 30, 2016 · 16 comments · Fixed by #8661

Comments

@gig13
Copy link

gig13 commented Mar 30, 2016

Reference #4472

Feature of adding an application icon in the Finder contextual menu for Windows Explorer


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@gig13 gig13 changed the title [Windows] Add icon to the IE context menu [Windows] Add icon to the Explorer context menu Mar 30, 2016
@guruz
Copy link
Contributor

guruz commented Mar 30, 2016

Note there is a single DLL on Windows responsible for all brandings. So we don't have the luxury like on OS X to have a Finder extension in each .app

@jturcotte regarding Windows says:

We currently don't build the shell extension as part of the build on windows since we need MinGW for ownCloud but MSVC for the shell extension. The binaries are therefore pre-built and can't be customized at all by ownBrander.

Officially building binaries with MSVC would make it possible to solve it the same way as OS X, but this is not trivial to do.

We both think it would also be possible (like it used to be for OS X) for the client to tell the icon path via the socket API, then the DLL would load the icon from there.

@MTRichards
Copy link

Level of effort to make this possible, and likely issues or implications of such a change?

@guruz
Copy link
Contributor

guruz commented Mar 31, 2016

We don't think this is much effort. 1 to 2 days?
Might be some implications if the user wants to uninstall the client but the DLLs are still loaded by Explorer. Maybe we need to somehow make sure it does not keep a handle to the .ico file..
(Although the uninstaller already does some magic for the DLLs itself, they will afaik then be removed on reboot)

@MegaV0lt
Copy link

MegaV0lt commented Mar 17, 2017

Almost one year... Any news? Would be much nicer with an icon in the contextmenu:

@jturcotte
Copy link
Member

jturcotte commented Mar 17, 2017

The issue is that the extension binaries are built on the developper's machine, and then packaged in all branding variants of ownCloud. We'd need to build official binaries using MSVC in order for this to be easy to package (where we could configure at build time which icon to use).

Essentially depends on #2717, but there is no concrete plans to go this way at the moment since all the Windows build infrastructure is based on OBS and MinGW.

@MegaV0lt
Copy link

Can it be done manually? some registryhack maybe?

@jturcotte
Copy link
Member

Shouldn't be too difficult but the code is not there, so you'd need to implement it in shell_integration/windows and use your own build instead of what's in the binary submodule.

@MegaV0lt
Copy link

And how to do it? i have no idea what you mean

@jturcotte
Copy link
Member

I have no idea either at the moment. I'd have to google it and figure out which API needs to be used, and add the necessary code in https://github.com/owncloud/client/blob/master/shell_integration/windows/OCContextMenu/OCContextMenu.cpp.

@TheOneRing
Copy link
Member

image

@jnweiger
Copy link
Contributor

jnweiger commented Aug 26, 2021

Tested with owncloud-client 2.9.0-beta3 on windows10
Tested with testpilotcloud-client 2.9.0-beta3 on Linux Mint, using testpilotcloud-client-nemo-2.9.0-beta3

In both cases, no menu icons:

image
image

The log shows V2/GET_CLIENT_ICON: on windows, but not on Linux.

Expected behavior: V2/GET_CLIENT_ICON: seen also on Linux. Icon shows on both Windows and Linux.

testpilotcloud-log.zip

ownCloud-logdir.zip

@TheOneRing
Copy link
Member

Only implemented in dolphin

@jnweiger
Copy link
Contributor

Retested on a fresh Win10 20H1 machine:

  • No owncloud client eve installed on that system.
  • Installed testpilotcloud client with
    image

On every startup, the client receives icon data:

20210827_1313_owncloud.log.0:08-27 13:13:43:515 [ info gui.socketapi ]:	Sending SocketAPI message --> "V2/GET_CLIENT_ICON_RESULT:{\"arguments\":{\"png\":\"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB0ElEQVQ4ja2Tz0tUURTHP/fNvAEty3n4tHShIyEIUdMiyKUSrQpatW0ls4q28z+0qTbBuFUQgmhRlFCChQZCLYSYEY1BMTS1ZMznPOe9e4+L+ZE+nCjqC3dxzz3ne86553sgAhFJi8gTEVkUkUrtLNZs6aj/0cAWEcmJiJHmMDWflpOCZ34TGMXMMZIa6680xsjE+Lhks1nJ5/PNSHJHezYiIkZr2Xw3J2MPHwkggLiuK57nNWsnHQcygALQvs/B6hqf5ufp6+1lMNVPf9sZCg8e0912lq57oyg7Xi9cARkLGKlbSi/f4D9/xd2Bi0xcv8Xc7Cz3E0k6fu4TbG1TXl6K/v2IBaT2v66z+f4DpRdTAPSEQmfJ47Rts7K3S2VlDblgk/84SuF1htAv1QlSlhjDxtRbvC9FYsl27PNdqFgMgMuOy8LOdtV15wAUeN8/863wFBOGAFhoXTRBiC77JIaH2B1eJujeA+CS47LwYwsA3Vlp1O2vb7A6+QygaCnbnu64dhUVjyMJGxSEAwHtN29w5VwPS4GPc+c2pk8B0OoMcqp1iISTBJg+NsaqBrQYU70arcVo3ZhbGJQbb/UxniikP0Tu/0n5n5cpQvRX63wIsLNNBngaiCkAAAAASUVORK5CYII=\"},\"id\":\"0\"}" to QLocalSocket(0x1fba186b830)

But no icon is displayed.

@jnweiger jnweiger reopened this Aug 27, 2021
@michaelstingl michaelstingl modified the milestones: 2.9.0, 2.10.0 Aug 27, 2021
@TheOneRing
Copy link
Member

image

@jnweiger
Copy link
Contributor

jnweiger commented Aug 27, 2021

Retested with a fresh Win10 21H1 image

  1. Online updates
  2. Guest extensions
  3. owncloud-client 2.9.0-rc1
  4. reboot
  • Installed with all defaults, and again with all options clicked to "Entire Feature"
  • Tested with VFS and also without VFS,
  • Tested with demo.owncloud.org, damkencloud, and local 10.8 running in docker.

No icon seen.

image

Am I looking at the wrong menu?

@jnweiger
Copy link
Contributor

jnweiger commented Sep 7, 2021

Seen with 2.9.0-rc2

09-07 04:54:27:746 [ info gui.socketapi ]:      Sending SocketAPI message --> "V2/GET_CLIENT_ICON_RESULT:{\"arguments\":{\"png\":\"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABqElEQVQ4jZ2Sz0uTcRzHX9/Hx/n4hG1uurCh0zFB0REeVPyRxCCCMDwmeNhBvIj/QHTQczDGjiIR3iSNDkEFCupG7pDlQSEoEgxT6jA2nyny+MVvh6Ahz4i59/XD+/V5vz98BLdG2nSXvqhgQAh0ypBSSAEZacuY0JujKQR3yzE6SaRFVXP0otzNpZJolZoBhEDXSg1c1TrTsTG2383zZGbivxDH9qmJUSbHH9LT3Y4QgkhHiGzuhNX0J/YPjhwAR4Lbfh/ZnMWHj3vs7H1j98s+j+4PsrmSxKw1nDX0lqgCCLcGeHCvl8TcDN8PjvB66vB6bgJweal4/T6FaRgkFpZZ39q5WqHGVc3GSpLD498A/Pj5i3BroBhTE4SDAe50hRnuixDsf4xVOCtWME2DBp+b7o4Qr96mcNfdIH9S+AdQSmFfSAAMw8XaUpyh3ggAVZq7be783CZvnRJqaeLz7lc624M8ffYcv6+evFVgNv6CRq8Hs7aG+PxLmvw+lt+sk81ZxRtUqpJ/cC2AUshKzX9fGTKVAgRkNGnLGIr0dZIohUSRlraM/QFdU4n8YwAx9gAAAABJRU5ErkJggg==\"},\"id\":\"0\"}" to QLocalSocket(0x1bafb812ea0)
09-07 04:54:27:872 [ critical  ]:       QWindowsPipeWriter: asynchronous write failed. (The pipe has been ended.)
09-07 04:54:27:934 [ info gui.socketapi ]:      Lost connection  QLocalSocket(0x1bafb812ea0)

On a VM with 1 CPU, the icon never shows.
On a VM with 2 CPUs, the icon sometimes shows.
On a VM with 4 CPUs, the icon always shows :-)

image

Confirmed fixed.

@jnweiger jnweiger closed this as completed Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.