157 Commits

Author SHA1 Message Date
R1kaB3rN
a78ea7a12b
ulwgl_test: update test for PROTONPATH not set
- Remove the unnecessary statements and just simply assert the error in this case
2024-02-21 18:34:58 -08:00
GloriousEggroll
0bbd251248 update sniper runtime 2024-02-21 19:13:29 -07:00
R1kaB3rN
6469e62b46
ulwgl_test: update test for non-existent WINEPREFIX
- When the user sets a path to WINEPREFIX that doesn't exists, we should always create the directories and set the environment variable on their behalf.

- Related to 39b48b4c2c
2024-02-21 18:11:21 -08:00
R1kaB3rN
15b78b59c6
ulwgl_run: update format 2024-02-21 11:11:18 -08:00
R1kaB3rN
11bd213088
ulwgl_run: update logic for non-existent WINEPREFIX
- Prefer having two separate branches for when the prefix doesn't exist or in the case it's not set
2024-02-21 11:11:01 -08:00
GloriousEggroll
a610be41d8 fix issue where defined but non-existent WINEPREFIX was ignored and therefore not created 2024-02-20 15:24:36 -07:00
Thomas Crider
429de35ee3
Merge pull request #36 from R1kaB3rN/username
Update tests for usernames with digits
2024-02-20 10:48:49 -07:00
Thomas Crider
65a9d88d9f
Merge pull request #25 from loathingKernel/insteam
Add files required for compatibility with Steam
2024-02-20 10:43:30 -07:00
Thomas Crider
39b48b4c2c
Merge branch 'main' into insteam 2024-02-20 10:43:22 -07:00
Thomas Crider
8ed1f0f5d6
Merge pull request #32 from R1kaB3rN/wineprefix
Remove requirement for setting WINEPREFIX
2024-02-20 10:39:48 -07:00
R1kaB3rN
eea700e75b
ulwgl_test: account for usernames with digits 2024-02-20 07:34:17 -08:00
R1kaB3rN
7c48acbb9a
ulwgl_run: update usage 2024-02-19 18:06:38 -08:00
R1kaB3rN
f6ba346f1c
ulwgl_run: update format 2024-02-19 17:51:55 -08:00
R1kaB3rN
4baebf2e17
Remove requirement for setting WINEPREFIX
- When $WINEPREFIX is not set, create a prefix directory in behalf of the user with the name being the ulwgl id. Currently, we create the directories as ~/Games/ULWGL/<ULWGL_ID>. In effect, the only required environment variable will be $GAMEID.
2024-02-19 17:51:38 -08:00
Stelios Tsampas
681191115a Update compatibilitytool.vdf and toolmanifest.vdf
* Remove ulwgl.vdf and create symlink to `.local/share/ULWGL`
2024-02-20 02:09:16 +02:00
Stelios Tsampas
23b6e3b1a4 Move steam compat files to ULWGL-Runner 2024-02-20 01:58:27 +02:00
Stelios Tsampas
2b3f81a04d Change compatmanager_layer_name to something specific to ULWGL 2024-02-20 00:24:28 +02:00
Stelios Tsampas
bfebd77f24 Add the required files for Steam discovery
There are two files describing the compatibility tool,

* `compatibilitytool.vdf`, useful if ULWGL is installed under
`.local/share/Steam/compatibilitytools.d`

* `ulwgl.vdf`, can be installed in `.local/share/Steam/compatibilitytools.d`
and allows Steam to use ULWGL from the `.local/share/ULWGL` path
2024-02-20 00:24:22 +02:00
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
R1kaB3rN
c116d7dbf9
Merge pull request #31 from loathingKernel/stderr
Do not silence subprocess's exit code and avoid polluting `stdout`
2024-02-19 12:30:48 -08: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
a7c38855bc
ulwgl_dl_util: fix bug for print statements
Co-authored-by: Stelios Tsampas <loathingkernel@gmail.com>
2024-02-19 10:26:26 -08:00
R1kaB3rN
6fdf4f3c3d
Revert "ulwgl_dl_util: fix bug for print statements"
This reverts commit 5a28836a8cb461b95be6264acbc8135f0f9645b6.
2024-02-19 10:23:44 -08:00
R1kaB3rN
5a28836a8c
ulwgl_dl_util: fix bug for print statements
Co-authored-by: Stelios Tsampas <loathingkernel@gmail.com>

- Do not print to stdout when finding or downloading Proton as it is not intended to be processed directly as input for other applications.

- Related to https://github.com/Open-Wine-Components/ULWGL-launcher/pull/31#issue-2142440694
2024-02-19 10:20:23 -08: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
8af0f0590e
ulwgl_dl_util: close the connection after req
- The connection should be closed manually after making a request.
2024-02-17 20:21:18 -08:00
Thomas Crider
b034600a9d
Merge pull request #30 from R1kaB3rN/download
Add download functionality to ulwgl_run
2024-02-17 21:08:44 -07:00
R1kaB3rN
45d8ce39c2
ulwgl_dl_util: update types 2024-02-17 19:15:29 -08:00
R1kaB3rN
642357280a
ulwgl_dl_util: update comments 2024-02-17 19:07:55 -08:00
R1kaB3rN
811ea0a8b8
ulwgl_dl_util: add types to _cleanup 2024-02-17 19:07:03 -08:00
R1kaB3rN
5e23219c44
ulwgl_dl_util: fix bug when printing tarball in cache
- In the case the cache is empty '  found in: None' can be printed.
2024-02-17 19:04:07 -08:00
R1kaB3rN
8f6d383c9f
ulwgl_test: add tests for when retrieving latest Proton release 2024-02-17 18:54:42 -08:00
R1kaB3rN
dfa8f975db
ulwgl_test: update test when interrupting cache extraction
- Removes assertions that check for state of variables when an error is raised and updates comments
2024-02-17 18:50:19 -08:00
R1kaB3rN
63fba6c892
ulwgl_test: add tests for cache 2024-02-17 17:35:16 -08:00
R1kaB3rN
15c483ed60
ulwgl_test: add tests for steam compat 2024-02-17 17:34:54 -08:00
R1kaB3rN
88a47e3ea0
ulwgl_dl_util: fix bug when referencing old Proton from cache
- Fixes a logic error by terminating prematurely when referencing an old Proton version that has been saved in the cache
2024-02-17 17:32:58 -08:00
R1kaB3rN
9a425dd784
ulwgl_test: update test when removing files
- Creates more test files within the compat/cache directories to verify that there wasn't any side effects after executing _cleanup
2024-02-17 15:13:23 -08:00
R1kaB3rN
ae6d5675d0
ulwgl_test: add test when removing files
- Arguably the most important test of this test suite as we do **not** want to remove files that isn't ours. We test both the positive and negative case. In the latter, the state of the cache or Steam compat should be left the same state as it was before executing the function when passed files that do not exist.
2024-02-17 15:02:45 -08:00
R1kaB3rN
3c0534edd2
ulwgl_test: add test when extracting files 2024-02-17 14:57:21 -08:00
R1kaB3rN
679cbffc2a
ulwgl_dl_util: format 2024-02-17 14:56:05 -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
9f2de76c5a
ulwgl_dl_util: prefer creating a var for the Proton dir
- Referencing the tuple element within the array for the tarball name then parsing it was becoming highly error prone/unreadable.
2024-02-17 12:18:43 -08:00
R1kaB3rN
71eaff0ca5
ulwgl_dl_util: change GE-Proton -> ULWGL-Proton 2024-02-17 12:16:27 -08:00
R1kaB3rN
744cedc6b8
ulwgl_dl_util: be smarter about imports 2024-02-17 10:37:12 -08:00
R1kaB3rN
3e5e1e138b
ulwgl_dl_util: delete references to requests module 2024-02-16 18:40:00 -08:00