OpenAsar/arrpc

Allow windows games to be detected on linux

Closed this issue · 9 comments

The detectable.json database includes my game but it's not detected with arRPC server running
I found my game and it has os set to win32
I have not looked at source code, but I assume they are only being detected if the server runs on windows.

Expected behavior: windows games are detected on linux, even if os key is set to win32
Windows games are runnable on linux through wine and proton, so I don't see a reason to not detect them on linux.

I have not looked at source code, but I assume they are only being detected if the server runs on windows.

No, it is because Windows executables have different names.

includes my game

Specifics examples are helpful :)

No, it is because Windows executables have different names.

How does that matter? The slashes being \ and not /?

Specifics examples are helpful :)

"executables": [
    {
        "is_launcher": false,
        "name": "beton brutal/betonbrutal.exe",
        "os": "win32"
    }
],
$ cat /proc/27526/cmdline
Z:\home\lassebq\Documents\Windows\Games\BETON BRUTAL\BetonBrutal.exe

Actual command line used to start the game is

wine start /Unix "/home/lassebq/Documents/Windows/Games/BETON BRUTAL/BetonBrutal.exe"

but inside a .desktop file to integrate in app launcher

Also, I just checked source, from what I understood os key does determine if it's being checked on the specified operating system. If I read the source wrong, please explain what it actually does

Okay, checked it again and I don't think os key is used at all? But then why didn't it detect the game?

Seems to be a duplicate of #35, but this should be solved by #57, no? Wonder if that's a case sensitivity issue.

Huh, Risk or Rain 2 is detected properly, but not Beton Brutal

"executables": [
    {
        "is_launcher": false,
        "name": "risk of rain 2/risk of rain 2.exe",
        "os": "win32"
    },
    {
        "is_launcher": false,
        "name": "risk of rain 2.exe",
        "os": "win32"
    }
],

The reason why it works is probably because there's an entry which only checks executable name, without prefixed folder
Perhaps folder name is cut off and it only compares filename?
https://github.com/OpenAsar/arrpc/blob/main/src/process/index.js#L43
===? Shouldn't it be something like endsWith if it's supposed to compare folder too?

Gosh, I feel so stupid. I was running an out of date commit. It didn't have that game in the database at all. Closing issue