To retain Steam's calling convention, check if the first argument is a
known verb. If it is and `PROTON_VERB` is unset, assign it to `PROTON_VERB`
and remove it from the arguments list.
This is a bit hacky but works as PoC
* Return the exitcode of the subprocess from `main` in case the caller
wants to do something this it.
* Catch any exceptions during execution and return an error exitcode.
- When the user does not specify the PROTONPATH, attempt to download the latest Proton if Proton cannot be found in either the Steam compat tools or local cache. Otherwise, prioritize referring to existing ones -- $HOME/.local/share/Steam/compatibilitytools.d and $HOME/.cache/ULWGL.
- Effectively, new installations will always download the latest Proton, while existing ones will simply be warned of a later version. Downloading is avoided if the latest version already exists in the cache, and the cache will be used as a last resort to set the variable. When we're unable to find an existing Proton or download one, we raise an error.
- Setup can fail when creating the symlink if the pfx somehow exists already. One case this can probably happen is if the user references a Steam created prefix as the WINEPREFIX since pfx directory would exist.
- Also, update the test to check for expected environment variables in the dictionary. Notably, when a valid ULWGL_ID is set, the STEAM_COMPAT_ID and related env var should be the stripped ULWGL_ID.
- Before, the executable and its options were joined as a single string to be executed. Instead, prefer separating them as distinct arguments. As a result, the command as an Array becomes something like:
['/home/foo/.local/share/ULWGL/ULWGL', '--verb', 'waitforexitandrun', '--', '/home/foo/GE-Proton8-30/proton', 'waitforexitandrun', '/home/foo/foo.exe', '-foo', '-bar', '-baz']
- After specifying the executable, all arguments following the first were ignored unless they were escaped to be interpreted as part of the first argument.