Opens the user's default browser (xdg-open) while the websocat instance listens for further json outputs from Nexus. Stores it in nexus.env.
IT TOOK ME THREE HOURS TO FIGURE OUT THAT THE DAMN WEBSOCAT INSTANCE WAS CLOSING BEFORE GETTING THE TOKEN
Opens a websocat instance and generates a uuid to send to Nexus' servers, retrieving a connection token and storing it with the UUID in ~/.local/share/modorganizer2/nexus.env
Utilizes the UUID or connection token if they already exist in the .env file.
This uses the winetricks copy downloaded in download_external_resources
.sh and installed to ~/.local/share/modorganizer2/winetricks. Curiously,
it seems like this file was completely unused.
I'm happy to put it to use, as the winetricks verbs are more likely to
succeed the newer the version of winetricks we use, and the downloaded
one is the bleeding-edge latest release.
This makes an important change to our instance directories: we are now
using variables.sh instead of appid.txt.
The latter is inextensible -- we can't just add heroic-related
information to it without using error-prone parsing to determine if it
is a new or old version of that file.
The new file variables.sh can be easily sourced by
modorganizer2-nxm-broker.sh, and can be also extended to add more
information over time as needed.
Some extra code has been added for backwards-compatibility when an
appid.txt file is found.
This introduces a new script, winetricks.sh, to wrap the command. Like
protontricks.sh, we prefer to use the version in the
com.github.Matoking.protontricks flatpak if present.
This introduces the new helper script find-heroic-game-installation.sh
to find games installed by Heroic. It does a bit more work than its
sister script for Steam, find_library_for_file.sh; namely, it looks up
the Wine version and prefix folder set for the game. We need these
because we can't use protontricks later.
In load_gameinfo.sh, we now search in both Steam and Heroic locations to
find the selected game. The current logic is short-circuiting, so if a
Steam game is found, Heroic will not be checked. We could consider
checking both and allowing the user to choose which version they want;
however, I think the likelihood of someone installing the same game in
two different launchers is low enough to not justify the extra code.
This commit downgrades an absent appid from an error to a warning. This
allows us to incrementally add support for GOG/Epic games before adding
Steam support.
We set a new variable, game_launcher, which has the value of "steam" or
"heroic", allowing other scripts to implement different logic for each
launcher.
This check was formerly unreachable. Further, even if it were hit, it
was checking in the wrong folder for the Fallout3Launcher.exe file.
Rather than relying on the presence or absence of $steam_library, script
find-library-for-file.sh now returns different error codes for the
following cases:
0: Success
1: Game not installed
2: Fallout 3 is installed, but must be downgraded