19 Commits

Author SHA1 Message Date
Stelios Tsampas
b24ef40afa Support a Steam verb as the first argument
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
2024-02-20 00:08:10 +02:00
GloriousEggroll
33bd82851a allow using shortname of proton version as alternative to full file path 2024-02-19 14:30:20 -07:00
Stelios Tsampas
ffd22ca1a1 ulwg_run.py: print to stderr only
* Avoid polluting `stdout` since the caller might expect the output of
the command there.
2024-02-19 22:25:41 +02:00
Stelios Tsampas
709e0bd67a ulwlg_run.py: Capture and return the exit code of the subprocess
* 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.
2024-02-19 22:25:37 +02:00
R1kaB3rN
9a3c07d792
ulwgl_run: prefer using .joinpath for path segments
Co-authored-by: Stelios Tsampas <loathingkernel@gmail.com>
2024-02-18 10:40:44 -08:00
R1kaB3rN
af5b50da49
ulwgl_run: fix bug that caused stdout to be silenced
Co-authored-by: Paweł Lidwin <lidwinpawel@gmail.com>
2024-02-18 10:21:05 -08:00
R1kaB3rN
38ec2eb258
Revert 'ulwgl_run: fix bug that caused stdout to be silenced'
This reverts commit fdc782fb0f508a1f0613939245b8eb93f232b2ad.
2024-02-18 10:20:04 -08:00
R1kaB3rN
fdc782fb0f
ulwgl_run: fix bug that caused stdout to be silenced
Co-authored-by: imLinguin lidwinpawel@gmail.com
2024-02-18 10:00:46 -08:00
R1kaB3rN
f666c8f8d0
ulwgl_run: change error msg
- Prefer a shorter message when download fails or Proton cannot be found, and reference ULWGL-Proton Github repository instead of GE-Proton
2024-02-17 12:29:15 -08:00
R1kaB3rN
9de0628fb0
ulwgl_run: only import the func 2024-02-16 12:06:30 -08:00
R1kaB3rN
d1c24b16e6
Add download functionality to ulwgl_run
- 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.
2024-02-15 08:22:23 -08:00
R1kaB3rN
e23ed300ee
ulwgl_run: prefer referencing parent than cwd
- Related to 29827d076f
2024-02-14 09:21:25 -08:00
R1kaB3rN
3bb00480b9
ulwgl_run.py: check dir before creating the symlink
- 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.
2024-02-13 22:04:45 -08:00
R1kaB3rN
4ba702565d
ulwgl_run.py: always recreate the symlink
- Related to https://github.com/Open-Wine-Components/ULWGL-launcher/issues/27
2024-02-13 17:56:25 -08:00
R1kaB3rN
14b323e3dc
Add ULWGL_ID to dict
- 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.
2024-02-12 18:20:15 -08:00
R1kaB3rN
6987fde6c3
Change parsing of arguments
- 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']
2024-02-12 17:19:58 -08:00
R1kaB3rN
2e8faa1f41
Delete print statements 2024-02-12 00:29:20 -08:00
R1kaB3rN
f73ef0f268
Fix bug that ignores arguments
- After specifying the executable, all arguments following the first were ignored unless they were escaped to be interpreted as part of the first argument.
2024-02-12 00:27:30 -08:00
R1kaB3rN
d6eb1c8484
Rename gamelauncher files 2024-02-12 00:12:29 -08:00