Launch another progam, from a different prefix, in the prelaunch script

Just to preface, this is more of a “How should I do this” than a “Why won’t this work” sort of question.

I am working on an alternative League of Legends installer that would allow for an overlay program to be installed (ie Blitz.gg, Overwolf, etc.).

A couple of things work okay:

  • Installing an overlay program
  • Setting up a separate Game entry and launching via the GUI
  • Launching manually with wine (after setting wineprefix, winearch, etc.) the terminal

Where I begin running into an issue is trying to allow the overlay program launch with the game’s launch. I have attempted to do this via a Pre-Launch script, with mixed results.

  • This is somewhat easy for a specific-to-Blitz script, as it can be installed in the same 32-bit prefix and just run from the same prefix via a Pre-launch script.
  • Trying to generalize, or trying to adapt to use Overwolf instead (which needs to be in a 64-bit prefix) is more difficult, as the second I try pointing to another Wine prefix (ie using WINEARCH, WINEPREFIX, referencing the needed wine binary, etc) this fails in the Pre-Launch script.
    • I am presuming because it is still running in the prefix of the game, as again, it can be run via its own runner, from the terminal, and even with the Pre-Launch script when run in a terminal window

What would be the preferred way to go about this task (in the most generalized case of launching another prefix program, of independent wine configuration, alongside the primary game? Or am I going about this incorrectly to begin with?

I’m fairly sure that if you want them to interact, the programs need to be run within the same wineprefix (and possibly in the same Wine process).

The interaction isn’t so much the issue here, as I can point to the other prefix in Blitz via a Z:\ path, it’s more this initial launch that I cannot figure out…

Unless the only interaction these programs have is via the filesystem (one program reads files generater by another), they will have to be run by the same Wine instance to exchange data and whatnot.

The Wine prefix is directly related to the Wine instance; trying to run a program installed in one prefix inside the other (which is what you appear to have attempted), or within the same one but with significantly different Wine version, has the same effect as copy-pasting the program from one Windows machine to another: it can only run if the app doesn’t require any environment customization normally done by its installer (and the app is compatible with the new system).

(Also, changing Wine version/arch used to run a prefix triggers migration process for the prefix, which doesn’t necessarily succeed to turn it the way it’d be had you used this version from the start.)