diff --git a/README.md b/README.md index 332967c..6495111 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ nix run .#eqlegends nix run .#eqlogparser ``` -`eqlegends` expects `EQLegends_setup.exe` in the current directory, or set `EQL_INSTALLER=/path/to/EQLegends_setup.exe`. +`eqlegends` fetches the pinned Daybreak LaunchPad installer. Set `EQL_INSTALLER=/path/to/EQLegends_setup.exe` only when testing a different installer. For EQLogParser: diff --git a/docs/eqlegends.md b/docs/eqlegends.md index 3e6e0c7..9e4e0b9 100644 --- a/docs/eqlegends.md +++ b/docs/eqlegends.md @@ -1,18 +1,24 @@ # EverQuest Legends on NixOS via Wine -EverQuest Legends is distributed as a standalone Daybreak/LaunchPad installer, not through Steam. The flake provides an `eqlegends` app that creates a mutable Wine prefix and installs the launcher from `EQLegends_setup.exe`. +EverQuest Legends is distributed as a standalone Daybreak/LaunchPad installer, not through Steam. The flake provides an `eqlegends` app that creates a mutable Wine prefix and installs the launcher from a pinned Daybreak installer URL. -The installer in this repository is a Nullsoft/NSIS installer containing `LaunchPad.exe`, CEF libraries, and `LaunchPad.ini` with `appName=EverQuest Legends` and `id=eqns`. The game data itself is expected to be downloaded later by LaunchPad. +The installer is a Nullsoft/NSIS installer containing `LaunchPad.exe`, CEF libraries, and `LaunchPad.ini` with `appName=EverQuest Legends` and `id=eqns`. The game data itself is expected to be downloaded later by LaunchPad. ## Quick start -From the repository directory containing `EQLegends_setup.exe`: +Run: ```bash nix run .#eqlegends ``` -Or point the wrapper at the installer explicitly: +The flake fetches the installer from: + +```text +https://launch.daybreakgames.com/installer/EQLegends_setup.exe +``` + +To test a different installer, point the wrapper at it explicitly: ```bash EQL_INSTALLER=/path/to/EQLegends_setup.exe nix run .#eqlegends @@ -40,6 +46,7 @@ inside that Wine prefix. | `EQL_WINEPREFIX=/path/to/prefix` | Override the default Wine prefix location. | | `EQL_RESET_PREFIX=1` | Delete and recreate the prefix before launching. | | `EQL_DXVK=1` | Install DXVK DLLs into the prefix before launching. | +| `EQL_FILTER_EGL_WARNINGS=0` | Show repeated CEF/SwiftShader EGL probe warnings. Defaults to filtered. | | `EQL_WINEDEBUG=+seh,+tid` | Override Wine debug logging. Defaults to `-all`. | There is also a reset helper: @@ -70,7 +77,13 @@ EQL_RESET_PREFIX=1 nix run .#eqlegends ## Troubleshooting -If the installer cannot be found, run from the repository root or set `EQL_INSTALLER`. +If the pinned installer hash fails, Daybreak probably replaced the installer. Update the `fetchurl` hash in `packages/eqlegends/package.nix`, or temporarily set `EQL_INSTALLER`. + +The launcher may emit repeated `libEGL warning` lines while CEF probes graphics paths under Wine. The wrapper filters those by default. To see the raw output: + +```bash +EQL_FILTER_EGL_WARNINGS=0 nix run .#eqlegends +``` If LaunchPad installs somewhere unexpected, inspect: diff --git a/packages/eqlegends/package.nix b/packages/eqlegends/package.nix index 2946dc3..43d767c 100644 --- a/packages/eqlegends/package.nix +++ b/packages/eqlegends/package.nix @@ -1,4 +1,5 @@ { lib +, fetchurl , runCommand , writeShellScriptBin , makeDesktopItem @@ -15,6 +16,12 @@ let installDirWin = "C:\\Games\\EverQuestLegends"; installDirUnix = "drive_c/Games/EverQuestLegends"; + installer = fetchurl { + name = "EQLegends_setup.exe"; + url = "https://launch.daybreakgames.com/installer/EQLegends_setup.exe"; + hash = "sha256-MFuIuPt/MlVzlCwiIGjjKkYT0Sm7ov5wm5Mrd1zfzx4="; + }; + setupDxvk = writeShellScriptBin "eqlegends-setup-dxvk" '' set -euo pipefail @@ -47,32 +54,18 @@ let launcher_exe="$(cat "$launcher_path_file")" fi - find_installer() { - if [ -n "''${EQL_INSTALLER:-}" ]; then - printf '%s\n' "$EQL_INSTALLER" - return - fi - - if [ -f "$PWD/EQLegends_setup.exe" ]; then - printf '%s\n' "$PWD/EQLegends_setup.exe" - return - fi - - printf '%s\n' "" - } - if [ "''${EQL_RESET_PREFIX:-0}" = "1" ]; then echo "eqlegends: removing $WINEPREFIX" rm -rf "$WINEPREFIX" fi if [ ! -f "$launcher_exe" ] || [ ! -f "$version_file" ] || [ "$(cat "$version_file" 2>/dev/null || true)" != "${setupVersion}" ]; then - installer="$(find_installer)" - if [ -z "$installer" ] || [ ! -f "$installer" ]; then + installer_path="''${EQL_INSTALLER:-${installer}}" + if [ ! -f "$installer_path" ]; then cat >&2 <<'EOF' -eqlegends: missing EQLegends_setup.exe +eqlegends: EQL_INSTALLER does not point to an existing file. -Run from the repository directory containing EQLegends_setup.exe, or set: +Leave EQL_INSTALLER unset to use the pinned Daybreak installer, or set: EQL_INSTALLER=/path/to/EQLegends_setup.exe nix run .#eqlegends EOF @@ -87,7 +80,7 @@ EOF wineserver -w echo "eqlegends: installing EverQuest Legends LaunchPad with NSIS silent mode..." - wine "$installer" /S "/D=${installDirWin}" + wine "$installer_path" /S "/D=${installDirWin}" # The NSIS installer starts LaunchPad after extraction even in silent mode. # Stop that first instance so setup can finish and the wrapper can launch # the recorded executable itself. @@ -124,6 +117,16 @@ EOF fi cd "$(dirname "$launcher_exe")" + + if [ "''${EQL_FILTER_EGL_WARNINGS:-1}" = "1" ]; then + exec wine "$launcher_exe" "$@" 2> >( + sed \ + -e '/^libEGL warning: /d' \ + -e '/^pci id for fd [0-9][0-9]*: /d' \ + -e '/^$/d' >&2 + ) + fi + exec wine "$launcher_exe" "$@" '';