wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

WezTerm Shell Context Menu for Windows 11

Open DevX-Cipher opened this issue 8 months ago • 9 comments

WezTerm Shell Context Menu for Windows 11: Using MSIX Package and Self-Signing

DevX-Cipher avatar Mar 06 '25 10:03 DevX-Cipher

Thank you for contributing! However, I won't take this PR in its current form; here are the things to address:

  • There are binaries present here; I don't know their provenance and cannot trust them, and I will not publish untrusted binaries to my users. The PR should build all binaries from source.
  • There appears to be a significant amount of Microsoft code contained here. There are too many files to review (both in terms of the time it takes to read them all, and Github has trouble even opening the PR to let me see them). In addition MS traditionally does not allow redistribution of their source code, so licensing is a big concern and it isn't clear from a quick glance that the usage here is appropriate. Please remove any and all source code that is not essential for this PR. If you need to link against an external library, we need to find some other way to ensure that the appropriate code is present for the build
  • There is no CI for this build, so it cannot be built and deployed in an automated fashion, and cannot be built and verified as part of the PR process.

On top of this, it's not clear exactly what the deployment story is for this component; how should it be installed? Can it be integrated as part of the setup.exe installer and so on.

Thanks!

wez avatar Mar 06 '25 14:03 wez

@wez Are you referring to the Microsoft packages included in the PR? If so, you're right that Visual Studio is typically required to build them, as they use Microsoft-specific tools and libraries.

Regarding the shell context menu, it's true that implementing it relies on the IExplorerCommand interface, which is part of the Windows API. This functionality is usually built using tools like C++

DevX-Cipher avatar Mar 06 '25 14:03 DevX-Cipher

Hi @wez,

I’ve removed the packages as requested. Additionally, please note that the MSIX package cannot be installed unless it is signed with a trusted certificate. For example, you can purchase a code-signing certificate from a trusted Certificate Authority (CA) such as DigiCert, Sectigo, or GlobalSign.

Alternatively, you can use the Microsoft Store to sign the MSIX package, or you can utilize the batch script I created for signing.

Regarding the installation, it is possible to include the .dll file as part of the setup.exe without adding the WezTerm files. However, in that case, you'll need to modify the source code in dllmain.cpp to ensure proper functionality.

Please let me know if you need further

DevX-Cipher avatar Mar 06 '25 14:03 DevX-Cipher

I'll make some adjustments tomorrow, but just to clarify, all the paths are based on the MSIX package. The .dll will be in the same path as the .exe inside the MSIX package. However, I can modify the code if you don't want to create a full MSIX package. It was a good example, but I'll make the necessary changes and update you.

DevX-Cipher avatar Mar 06 '25 16:03 DevX-Cipher

@wez i have made some changes to the commit

DevX-Cipher avatar Mar 08 '25 13:03 DevX-Cipher

@wez i have never done a GitHub Action before

DevX-Cipher avatar Mar 08 '25 17:03 DevX-Cipher

@wez did you have time to review the code now

DevX-Cipher avatar Mar 11 '25 14:03 DevX-Cipher

I understand that you're eager to have a review here, but please stop at-mentioning me so frequently. I have limited time and I get a great many notifications from github. When you at-mention me it pings my phone and interrupts what I'm doing, and it is most unwelcome!

Please do not ping me to try to hasten my review: I have many things across a wide range of areas that need my attention and limited time to do so. I tend to review based on my current context to avoid the overhead of context switching, which makes things more efficient for the use of my time but which is "unfair" in terms of load balancing across issues and PRs. Unfortunately, it is not possible for me to "do better" at this because I simply do not have the time to dedicate to that effort.

I thank you in advance for your patience.

wez avatar Mar 11 '25 15:03 wez

Thank you for the feedback, and I sincerely apologise for the frequent @-mentions. I completely understand that your time is limited, and I didn’t intend to cause any disruptions. I’ll be more mindful in the future and refrain from pinging you unnecessarily. I appreciate your efforts and the time you take to review everything. Thanks again for your patience, and I’ll await your review when you have the opportunity.

DevX-Cipher avatar Mar 11 '25 16:03 DevX-Cipher