Open-shell-menu: Support for ARM x64

Created on 1 Dec 2020  路  2Comments  路  Source: Open-Shell/Open-Shell-Menu

Current builds of OpenShell are x86 and x64, but they don't support ARM variants. Due to the "growing" popularity of ARM64 Windows systems, a native ARM x64 build would be amazing.

If I'm not mistaken, adding new targets that support the new architecture should "work" (don't quote me on that, please!). I have no idea if this is the only thing needed. I can help out the devs with access to a Lumia 950XL running Windows 10 2H20.

Dosbox-X is another project that already has native support for ARM64 Windows, and it does run pretty nice over there!

And by the way, running the x86-x64 on the ARM64 Windows doesn't work at all.

EnhancemenFeature Request

Most helpful comment

Thank you for letting us know there is somebody with ARM64 device out there :)

I'd like to work on ARM64 version (I even have Surface Pro X device at hand). But honestly, there are just few people that would use it (yup, I hope it will get better over time).

Most of code should work well after recompilation to ARM64.
But since Open-Shell does kind of hacks in system (hooking, etc), these may require some modifications (or maybe not).

I'll try to get to this during my Xmas vacation.

All 2 comments

Thank you for letting us know there is somebody with ARM64 device out there :)

I'd like to work on ARM64 version (I even have Surface Pro X device at hand). But honestly, there are just few people that would use it (yup, I hope it will get better over time).

Most of code should work well after recompilation to ARM64.
But since Open-Shell does kind of hacks in system (hooking, etc), these may require some modifications (or maybe not).

I'll try to get to this during my Xmas vacation.

Ah, yes, the infamous hooks! Right, I didn't dive deep in the code to check if there are ASM thunks, but in the worst case that could be modified :) I tried to add ARM64 in the vs configurations but I failed miserably because for some reason the "Lib" is being compiled for x86 (even after a full clean).

Edit: I was missing half of the libraries. I did manage to build it, tho I'm not sure if that was enough. I copied the ARM64 folder from the root of the repo to the target, ran the StartMenu.exe, it "tried to load" but then explorer crashed. it restarted, and crashed again. All this time I saw StartMenu.exe open. I've managed to kill it, but seems like it left some weird traces behind, like the task buttons use ALL the space on the taskbar and the size of the rect of each element on the desktop is really wide.
image
I'm attaching a picture of the aftermath.

I'll try to setup the remote debugger, but I'm not sure if it'll be that easy to debug the .dll when it gets loaded on explorer.exe. Do you have any insights on this?

Edit2: I've managed to setup remote debugging and I've pinpointed the issue on the SetWindowsHookEx() of https://github.com/Open-Shell/Open-Shell-Menu/blob/283c0fce03f0804a6d8a79728b2630e588e6dcb2/Src/StartMenu/StartMenu.cpp#L101

I've validated that hHookModule and thread point to a valid element (i.e. hHookModule points to StartMenuDLL.dll's hInstance and thread seems to be the thread of the taskbar PID).

Edit3: I've stubbed out the HookDesktopThread() on StartMenuDLL.cpp (i..e returning the CallNextHookEx), and it still crashes. I found out that UpdateTaskBars() makes the thing crash instantly. Haven't dive deep enough to validate this. I'm relying on the LogToFile to debug the DLL, which is kinda a pain...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gitterman picture gitterman  路  19Comments

nyanpasu64 picture nyanpasu64  路  22Comments

coddec picture coddec  路  25Comments

Braxusz picture Braxusz  路  23Comments

paraworlds2 picture paraworlds2  路  28Comments