microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.28k stars 6.55k forks source link

[FR] Add 32bit preview managers for greater compatibility. #15991

Closed boromyr closed 1 year ago

boromyr commented 2 years ago

Description of the new feature / enhancement

Hi, the feature request is very simple, as per the title I want to propose that 32bit version should be added to the existing preview managers.

Scenario when this would be used?

This feature is exclusively to improve compatibility with other apps available only in 32bit. In the GUI nothing should change, activating the preview for a file format will add both 64bit and 32bit versions.

Supporting information

Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.ComponentModel.Win32Exception (5023): Non è stato possibile impostare la finestra padre Win32 del controllo.
   at System.Windows.Forms.Control.SetParentHandle(IntPtr value)
   at System.Windows.Forms.Control.ControlCollection.Add(Control value)
   at System.Windows.Forms.Form.ControlCollection.Add(Control value)
   at Microsoft.PowerToys.PreviewHandler.Monaco.MonacoPreviewHandlerControl.<>c__DisplayClass6_1`1.<<DoPreview>b__3>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)

************** Assembly caricati **************
System.Private.CoreLib
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Private.CoreLib.dll
----------------------------------------
PowerToys.MonacoPreviewHandler
    Versione assembly: 0.55.1.0
    Versione Win32: 0.55.1.0
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.MonacoPreviewHandler.dll
----------------------------------------
PowerToys.PreviewHandlerCommon
    Versione assembly: 0.55.1.0
    Versione Win32: 0.55.1.0
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.PreviewHandlerCommon.dll
----------------------------------------
System.Runtime
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.dll
----------------------------------------
System.Drawing.Primitives
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Drawing.Primitives.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.ComponentModel.TypeConverter.dll
----------------------------------------
System.Runtime.InteropServices
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.InteropServices.dll
----------------------------------------
System.Windows.Forms
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56701
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Windows.Forms.dll
----------------------------------------
System.ComponentModel.Primitives
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56701
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Windows.Forms.Primitives.dll
----------------------------------------
System.Collections.Specialized
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Collections.Specialized.dll
----------------------------------------
System.Drawing.Common
    Versione assembly: 5.0.0.2
    Versione Win32: 5.0.1221.52207
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Drawing.Common.dll
----------------------------------------
System.Diagnostics.TraceSource
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Diagnostics.TraceSource.dll
----------------------------------------
System.Collections
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Collections.dll
----------------------------------------
Microsoft.Win32.Primitives
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/Microsoft.Win32.Primitives.dll
----------------------------------------
System.Threading
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Threading.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.ComponentModel.EventBasedAsync.dll
----------------------------------------
System.Threading.Thread
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Threading.Thread.dll
----------------------------------------
Accessibility
    Versione assembly: 4.0.0.0
    Versione Win32: 5.0.1321.56701
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/Accessibility.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.20.51904
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Runtime.Extensions
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.Extensions.dll
----------------------------------------
System.Buffers
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Buffers.dll
----------------------------------------
System.Collections.NonGeneric
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Collections.NonGeneric.dll
----------------------------------------
Microsoft.Web.WebView2.WinForms
    Versione assembly: 1.0.961.33
    Versione Win32: 1.0.961.33
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Web.WebView2.WinForms.dll
----------------------------------------
System.Threading.ThreadPool
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Threading.ThreadPool.dll
----------------------------------------
Microsoft.Web.WebView2.Core
    Versione assembly: 1.0.961.33
    Versione Win32: 1.0.961.33
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/Microsoft.Web.WebView2.Core.dll
----------------------------------------
mscorlib
    Versione assembly: 4.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/mscorlib.dll
----------------------------------------
System.IO.FileSystem
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.IO.FileSystem.dll
----------------------------------------
PowerToys.Common.UI
    Versione assembly: 0.55.1.0
    Versione Win32: 0.55.1.0
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.Common.UI.dll
----------------------------------------
PowerToys.ManagedCommon
    Versione assembly: 0.55.1.0
    Versione Win32: 0.55.1.0
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/PowerToys.ManagedCommon.dll
----------------------------------------
netstandard
    Versione assembly: 2.1.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/netstandard.dll
----------------------------------------
ControlzEx
    Versione assembly: 4.0.0.0
    Versione Win32: 4.4.0.50
    Base di codice: file:///C:/Program%20Files/PowerToys/modules/FileExplorerPreview/ControlzEx.dll
----------------------------------------
PresentationCore
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56702
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/PresentationCore.dll
----------------------------------------
PresentationFramework
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56702
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/PresentationFramework.dll
----------------------------------------
WindowsBase
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56702
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/WindowsBase.dll
----------------------------------------
DirectWriteForwarder
    Versione assembly: 5.0.13.0
    Versione Win32: 5,0,1321,56702 @Commit: 9d281216b007da60fe4b7c317156f0ed90fa5283
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/DirectWriteForwarder.dll
----------------------------------------
System.Runtime.CompilerServices.VisualC
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.CompilerServices.VisualC.dll
----------------------------------------
System.Diagnostics.Debug
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Diagnostics.Debug.dll
----------------------------------------
Microsoft.Win32.Registry
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/Microsoft.Win32.Registry.dll
----------------------------------------
System.ObjectModel
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.ObjectModel.dll
----------------------------------------
System.ComponentModel
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.ComponentModel.dll
----------------------------------------
System.Xaml
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56702
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Xaml.dll
----------------------------------------
System.Private.Uri
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Private.Uri.dll
----------------------------------------
System.Configuration.ConfigurationManager
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.20.51904
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Configuration.ConfigurationManager.dll
----------------------------------------
System.Diagnostics.Process
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Diagnostics.Process.dll
----------------------------------------
System.Xml.ReaderWriter
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Private.Xml.dll
----------------------------------------
System.Net.WebClient
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Net.WebClient.dll
----------------------------------------
System.Net.Primitives
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Net.Primitives.dll
----------------------------------------
System.Net.Requests
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Net.Requests.dll
----------------------------------------
System.Net.WebHeaderCollection
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Net.WebHeaderCollection.dll
----------------------------------------
System.Memory
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Memory.dll
----------------------------------------
System.Security.Cryptography.Algorithms
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Security.Cryptography.Algorithms.dll
----------------------------------------
System.Text.Encoding.Extensions
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Text.Encoding.Extensions.dll
----------------------------------------
System.Linq
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Linq.dll
----------------------------------------
PresentationFramework-SystemXml
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56702
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/PresentationFramework-SystemXml.dll
----------------------------------------
System.Runtime.InteropServices.RuntimeInformation
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.InteropServices.RuntimeInformation.dll
----------------------------------------
System
    Versione assembly: 4.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.dll
----------------------------------------
System.Text.Json
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Text.Json.dll
----------------------------------------
System.Numerics.Vectors
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Numerics.Vectors.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
System.Threading.Tasks
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Threading.Tasks.dll
----------------------------------------
System.Drawing
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56701
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/System.Drawing.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 5.0.13.0
    Versione Win32: 5.0.1321.56701
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/5.0.13/it/System.Windows.Forms.resources.dll
----------------------------------------
System.Diagnostics.StackTrace
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Versione assembly: 5.0.0.0
    Versione Win32: 5.0.1321.56516
    Base di codice: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/5.0.13/System.Collections.Immutable.dll
----------------------------------------

************** Debug JIT **************

This is an error message obtained by XYplorer(32bit) after adding preview to developer text files. The computer has all .NET 6, 5 and .NET Core runtimes, both 32bit and 64bit.

Aaron-Junker commented 2 years ago

@stefansjfw I'm not sure if this is possible. Any ideas?

boromyr commented 2 years ago

For a compilation or integration issue in PowerToys? I am not an expert, but since .NET 5 is available in 32bit, I thought it was possible to compile both. Perhaps your concern is with PT handling two different versions?

GitMensch commented 2 years ago

Perhaps your concern is with PT handling two different versions?

This actually works quite fine with a lot of addons for Explorer.exe like TortoiseSVN - if you install the 32bit version you'll only have the features in "file open" of 32bit executables, when you install the 64bit version you get it working in both - because the 32bit dll's are included, too. For 32bit all registered DLLs for explorer.exe are suffixed with "32" and registered that way (the executables they start are all 64bit).

crutkas commented 1 year ago

No plans for x86 support