joshua-software-dev / LMeter

A Dalamud Plugin to display ACT combat log data in FFXIV
GNU General Public License v3.0
10 stars 5 forks source link

TotallyNotCef cannot be started in linux #3

Open Calvariaa opened 1 year ago

Calvariaa commented 1 year ago

dalamud.log

2023-06-04 00:51:32.659 +08:00 [INF] [LMeter] EXE : Z:\home\calvaria\.xlcore_cn\installedPlugins\LMeter\TotallyNotCef/TotallyNotCef.exe
2023-06-04 00:51:32.659 +08:00 [INF] [LMeter] ARGS: https://quisquous.github.io/cactbot/ui/raidboss/raidboss.html?OVERLAY_WS=ws://127.0.0.1:10501/ws 8080

...

System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'Z:\home\calvaria\.xlcore_cn\installedPlugins\LMeter\TotallyNotCef/TotallyNotCef.exe' with working directory 'Z:\home\calvaria\.xlcore_cn\ffxiv\game'. File not found.

Arch Linux, xlcore_cn, LMeter v0.2.0.4 Guess it's the path problem caused by /

Calvariaa commented 1 year ago

hmm, seems that still have some other problem.

1 2

joshua-software-dev commented 1 year ago

So there seems to be two different problems here.

1) That the exe could not be found.

Wine is pretty good about handling mismatched forward slash and back slash, so I don't actually think the path looking a bit odd is why it failed to launch (this is also fixed anyway in newer builds by obtaining the full path using Path.Join instead of manipulating the path as a string).

There seems to be two different causes for the issues that people are mostly bumping into with this:

The first symptom has a workaround in the form of downloading https://github.com/joshua-software-dev/TotallyNotCef/releases manually, and placing it in the appropriate folder ahead of time.

I have no idea what the actual cause of the second symptom is, so I can't say how it can be fixed, but there is another workaround, and its the same as the workaround for issue 2.

2) TotallyNotCef's browser subprocess crashes

This is more esoteric, and I cannot rightly say what caused this. However, a workaround exists, and it will also work for the previous issue's second symptom. TotallyNotCef has a linux native version as well, so its possible to launch the linux version manually before the game starts, and connect to it while disabling the plugins auto start browser process. I plan to write some more thorough documentation on how this can be done soon, but its as simple as: ./TotallyNotCef <url> <httpPort> <enableAudio=1/0>

and a more complete example looks like:

./TotallyNotCef 'https://quisquous.github.io/cactbot/ui/raidboss/raidboss.html?OVERLAY_WS=ws://127.0.0.1:10501/ws' 8080 1

or:

nohup ./TotallyNotCef 'https://quisquous.github.io/cactbot/ui/raidboss/raidboss.html?OVERLAY_WS=ws://127.0.0.1:10501/ws' 8080 1 & disown

and I haven't tested this, but steam deck users might be able put this in a script, chmod +x it, and then add it to their steam launch options like /path/to/script %command%

#!/bin/bash

./path/to/TotallyNotCef 'https://quisquous.github.io/cactbot/ui/raidboss/raidboss.html?OVERLAY_WS=ws://127.0.0.1:10501/ws' 8080 1 &
exec "$@"