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

[Feature Request] Linux support #187

Closed
jtfen86 opened this issue Mar 25, 2024 · 1 comment
Closed

[Feature Request] Linux support #187

jtfen86 opened this issue Mar 25, 2024 · 1 comment

Comments

@jtfen86
Copy link

jtfen86 commented Mar 25, 2024

I'd love to be able to play DQX with this tool in Linux via WINE/Proton. If this project is mostly Python then what's stopping the project from working? I tried to run the python files only to get stopped here (btw, I'm a noob at this kind of stuff):

/hdd/Downloads/dqxclarity via 🐍 v3.11.8 
❯ python clarity.py
Traceback (most recent call last):
  File "/hdd/Downloads/dqxclarity/clarity.py", line 4, in <module>
    from common.memory import MemWriter
  File "/hdd/Downloads/dqxclarity/common/memory.py", line 3, in <module>
    from pymem.pattern import pattern_scan_all, pattern_scan_module
  File "/hdd/Downloads/dqxclarity/pymem/__init__.py", line 11, in <module>
    import pymem.memory
  File "/hdd/Downloads/dqxclarity/pymem/memory.py", line 5, in <module>
    import pymem.ressources.kernel32
  File "/hdd/Downloads/dqxclarity/pymem/ressources/kernel32.py", line 3, in <module>
    import pymem.ressources.structure
  File "/hdd/Downloads/dqxclarity/pymem/ressources/structure.py", line 7, in <module>
    import pymem.ressources.psapi
  File "/hdd/Downloads/dqxclarity/pymem/ressources/psapi.py", line 3, in <module>
    dll = ctypes.WinDLL("psapi.dll")
          ^^^^^^^^^^^^^
AttributeError: module 'ctypes' has no attribute 'WinDLL'

Or am I wrong and this is primarily a powershell and windows-specific program?

@jmctune
Copy link
Contributor

jmctune commented Mar 30, 2024

Hello,

You don't need powershell to run clarity (it just exists for convenience with windows users), but clarity uses the pymem library, which reads memory using strictly windows api calls. There aren't any decent memory-reading libraries for Python that are:

  • OS agnostic
  • Specifically support 32-bit processes
  • Have memory scanning capabilities

There are additionally a few other calls that are windows-specific, like searching for the running dqx process with TASKLIST that could be ported to work with linux too, but these aren't a priority since the memory lib is the biggest hurdle at the moment.

clarity could implement a split-brain way of using one type of library if linux or another library if windows for memory operations, but this adds a lot of overhead to support and would make testing more painful than it's worth for me (esp. since my main OS isn't a linux variant today).

I'd suggest either dual booting windows or booting DQX up in a VM if you want to use clarity. If dqx ever decides to go 64-bit, perhaps I could reconsider this stance, but not today.

@jmctune jmctune closed this as completed Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants