lin-ycv / EverythingPowerToys

Everything search plugin for PowerToys Run
Eclipse Public License 2.0
2.21k stars 58 forks source link

[Request] arm version #45

Closed dXrayb closed 1 year ago

dXrayb commented 1 year ago

Describe the bug the plugin could not load well

-------------------------- Begin exception -------------------------- Message: Couldn't load assembly for Everything in C:\Program Files\PowerToys\modules\launcher\Plugins\Everything\Community.PowerToys.Run.Plugin.Everything.dll

Exception full name : System.IO.FileLoadException Exception message : Could not load file or assembly 'Community.PowerToys.Run.Plugin.Everything, Version=0.66.0.0, Culture=neutral, PublicKeyToken=null'. Exception stack trace: at System.Runtime.Loader.AssemblyLoadContext.g__PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16 ilPath, UInt16 niPath, ObjectHandleOnStack retAssembly) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at Wox.Plugin.PluginPair.CreatePluginInstance() Exception source : System.Private.CoreLib Exception target site: Void g__PInvoke|5_0(IntPtr, UInt16, UInt16, System.Runtime.CompilerServices.ObjectHandleOnStack) Exception HResult : -2146232799 -------------------------- End exception --------------------------

lin-ycv commented 1 year ago

It's not a bug, currently it's x64 only. I don't have arm windows, so I couldn't test, so I never compiled it.

lin-ycv commented 1 year ago

@dXrayb sorry for the super delayed solution, finally got around to compiling an ARM64 version can you test this and let me know if it works? Everything.zip

dXrayb commented 1 year ago

@dXrayb sorry for the super delayed solution, finally got around to compiling an ARM64 version can you test this and let me know if it works? Everything.zip

Thank you for support, but this plugin cannot load correctly, here is the log: Version: 0.69.1.0 OS Version: Microsoft Windows NT 10.0.22621.0 IntPtr Length: 8 x64: True Date: 2023/5/21 12:27:25 Exception: System.BadImageFormatException: 试图加载格式不正确的程序。 (0x8007000B) at Community.PowerToys.Run.Plugin.Everything.Interop.NativeMethods.Everything_SetRegex(Boolean bEnable) at Community.PowerToys.Run.Plugin.Everything.Main.UpdateSettings(PowerLauncherPluginSettings settings) at Wox.Plugin.PluginPair.Update(PowerLauncherPluginSettings setting, IPublicAPI api) at PowerLauncher.SettingsReader.ReadSettings() at PowerLauncher.App.<>c__DisplayClass19_0.b0() at Wox.Infrastructure.Stopwatch.Normal(String message, Action action) at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e) at System.Windows.Application.<.ctor>b1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Thank you for the help again.

lin-ycv commented 1 year ago

Ok, so after some research, I've found the issue. While PowerToys and Everything support ARM64, Everything's SDK doesn't support ARM64, at the bottom of their SDK page it states x86 and x64 support. https://www.voidtools.com/support/everything/sdk/

ref: https://github.com/srwi/EverythingToolbar/issues/59 ref: https://www.voidtools.com/forum/viewtopic.php?p=37004

However, void did post "unofficial" dll for ARM64. Not sure what "unofficial" encompasses, maybe it's missing features, or it's not stable, or maybe it works fine, just never released before.

Whatever the case is, you can try replacing the Everything64.dll inside Everything folder with this file here: EverythingARM64_BETA.zip

Please report back if it works. If not, then there's not much I can do.

dXrayb commented 1 year ago

I was using Everything X64 before, so I uninstall Everything first and then install Everything ARM64, after that I extracted plugin to the plugins folder, and used EverythingARM64_BETA.zip's dll to cover plugin folder's dll, at last I reboot the system and I got the same error: Version: 0.70.0.0 OS Version: Microsoft Windows NT 10.0.22621.0 IntPtr Length: 8 x64: True Date: 2023/5/25 15:41:49 Exception: System.BadImageFormatException: 试图加载格式不正确的程序。 (0x8007000B) at Community.PowerToys.Run.Plugin.Everything.Interop.NativeMethods.Everything_SetRegex(Boolean bEnable) at Community.PowerToys.Run.Plugin.Everything.Main.UpdateSettings(PowerLauncherPluginSettings settings) at Wox.Plugin.PluginPair.Update(PowerLauncherPluginSettings setting, IPublicAPI api) at PowerLauncher.SettingsReader.ReadSettings() at PowerLauncher.App.<>c__DisplayClass19_0.b0() at Wox.Infrastructure.Stopwatch.Normal(String message, Action action) at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e) at System.Windows.Application.<.ctor>b1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

lin-ycv commented 1 year ago

so this is a problem with Everything's SDK limitation, sorry, nothing I can do here.

dXrayb commented 1 year ago

Finally, it works, there is new updated dll, rename the file to Everything64.dll, it will works. Everything.ARM-SDK-update1.zip

so this is a problem with Everything's SDK limitation, sorry, nothing I can do here.

lin-ycv commented 1 year ago

Could you let me know where you found this dll? I was sure I was using the newest DLL

dXrayb commented 1 year ago

I asked them from the author, and it is updated by VS2019.

lin-ycv commented 5 months ago

ARM support is officially added and will be part of the next release. Users won't have to manually download a seperate dll.