Maselkov / GW2RPC

Discord Rich Presence addon for Guild Wars 2
https://gw2rpc.info
GNU General Public License v3.0
46 stars 12 forks source link

Can't be run using wine. #23

Open edwloef opened 2 years ago

edwloef commented 2 years ago

This results in GW2RPC being unusable on MacOS and Linux.

wine gw2rpc.exe Traceback (most recent call last): File "run.py", line 4, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "gw2rpc\gw2rpc.py", line 18, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "gw2rpc\api.py", line 5, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "gw2rpc\settings.py", line 83, in File "gw2rpc\settings.py", line 51, in init File "configparser.py", line 960, in getitem KeyError: 'API' 05f8:fixme:imm:ImeSetActiveContext (0000000000281D00, 1): stub 05f8:fixme:imm:ImmReleaseContext (00000000000400B2, 0000000000281D00): stub 05f8:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000011FD70 05f4:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000011FD70

n1tr0-5urf3r commented 2 years ago

For now there are very many dependencies built in which are only usable under windows. If there is big enough interest I will think about a way to port it to Unix like Systems, but that would need a major rewrite. I'm not even sure if you can directly read from the Mumble Link API there.

TacoCake commented 2 years ago

I'd like to manifest some interest in it being ported to linux / wine, as I only play on linux

n1tr0-5urf3r commented 2 years ago

I investigated further and tried to get it to run under wine. Turned out that I was somehow able to get gw2rpc started, but it needs to directly connect to discord. Meaning it is not able to send game data from inside the wine container to the outside natively running discord client. Having another full discord client running inside the same wine container seems a bit overkill, and I also couldn't get it to work either.

I'm out of ideas atm as long as there is no native GW2 client for Linux.

jimmon89 commented 11 months ago

in the Unofficial Final Fantasy 14 Online Launcher XIVLauncher & Dalamud Discord that has support for linux they use wine-discord-ipc-bridge to pass the discord rich presence from within wine to discord running natively on linux i use my own wrapper to run gw2 and additional programs simultaneously from steam which could easilly be modified to run gw2, gw2rpc and wine-discord-ipc-bridge

n1tr0-5urf3r commented 11 months ago

It appears that running GW2RPC under wine is currently causing issues with the psutil library's ability to detect the GW2-64.exe and GW2RPC.exe processes, resulting in the error message:

OSError: [WinError 87] Invalid parameter: '(originated from NtQuerySystemInformation)'

I've experimented with using direct WMI calls as an alternative to the psutil library, but implementing this change would require a significant overhaul of the code. I'll continue exploring potential solutions to address this issue.