Commit graph

242 commits

Author SHA1 Message Date
ItsAllAboutTheCode ed0f86e6f6 Add Vita3K runner support
A Unit Test script has also been added to validate the runner options.

resolves #5357
2024-03-18 17:47:11 -07:00
Mathieu Comandon 24f8fee432 Re-enable imports sorting 2024-02-24 21:14:32 -08:00
Mathieu Comandon 38fbe9f05e Ruff reformat 2024-02-24 21:02:06 -08:00
Mathieu Comandon de70ab6cb0 Rename PGA_DB to DB_PATH 2024-02-17 20:12:46 -08:00
Mathieu Comandon bdfb77771f Reorder display options and simplify driver version logging 2024-02-01 03:55:25 -08:00
Mathieu Comandon a663f8006e Accept more formats in the playtime edit widget, add tests 2024-01-10 18:26:41 -08:00
Mathieu Comandon 85444a0b77 Rename common.py to game_common.py 2023-12-28 15:29:42 -08:00
Daniel Johnson 0ce76eed22 And the big one - replace the FILE_NOT_FOUND error code with an exception, MissingGameExecutableError, that provides the custom message. 2023-12-27 18:41:08 -05:00
Daniel Johnson 4b0592c8cd Update unit tests to represent the new rounding behavior
Truncating the minutes part of a playtime was unstable; format(parse(x) didn't result in 'x'; rounding fixes that. But the unit tests were impacted, so let's update them.

Resolves #5191
2023-12-17 17:21:03 -05:00
Daniel Johnson 32841b9ab6 Fix up the PCX2 test, so it will work even though PCSX2 is not there.
This isn't as fancy as MagicMock, but I need to stub out a couple of functions in the runner being testing, so MagicMock doesn't work.
2023-12-16 11:27:42 -05:00
Daniel Johnson 382d5681d5 Fix "scope" option and restore "Default installation folder"
This was the only option to use the 'scope' feature, and in 0.5.14 it was available in system and runner options, but not games.

This fix restores that behavior.

The trick is to pass the config_level through to the various option boxes, not just the config_section. The first is which dialog you are in (roughly) and the second is which tab.
2023-12-12 18:47:46 -05:00
Daniel Johnson e52f3add18 Make all my new error messages for localization. 2023-11-29 19:16:01 -05:00
Daniel Johnson 22e8305314 Rework the mocks so the PCSX2 tests will still run even when it's not installed. 2023-11-29 19:16:01 -05:00
Daniel Johnson 2eec736fd9 Replace add_url_tags() with gtk_safe_urls(), which does both conversion and escaping.
add_url_tags() isn't correct- it does not handle escaping and can't be safely combined with gtk_safe(), as is done in two places.

But URLs can explicitly contain &, and that must be escaped. Text not inside URLs needs to be escaped, but escaping before or after the anchors breaks the URLs.

This function splits the text up into URLs and not-URLs and handles each case.
2023-11-04 07:36:28 -04:00
K900 1f1d554df3 scummvm: handle runner not being available in get_command, add/fix test 2023-10-29 15:51:53 -07:00
Mathieu Comandon 97600fdca7 Remove 'and' between hours and minutes 2023-08-25 17:00:39 -07:00
Mathieu Comandon 41c300fefd Group delegate classes in the delegates module 2023-06-14 00:49:10 -07:00
Daniel Johnson a245387b03
Merge pull request #4866 from lengau/nvidia
Make Nvidia info not depend on /proc access
2023-05-31 15:10:42 -04:00
Daniel Johnson 14ae02536e First cut at version compatibility restrictions
This code looks for a '.lutris_compat.json' file at the root of a
component's version's directory.

This contains, in JSON, the minimum Lutris version required. If Lutris
finds this to be too late, it will try earlier versions.

The code is messy and this could download a lot of versions, since
it tries them one at a time. But it's a start.
2023-05-29 11:37:44 -07:00
Alex Lowe 5415015f6f Typing additions for drivers file 2023-05-20 22:27:16 -04:00
Alex Lowe d4daf92de5 Make NVIDIA checks work without /proc access
Some environments don't have access to /proc, or may only have access
to specific files in /proc. We can use other methods to find the same
information.
2023-05-20 22:05:59 -04:00
Daniel Johnson 31f327b50e Update PCSX2 unit test
The switches have all changed, and config-file support is gone entirely.
2023-05-14 06:32:29 -04:00
Mathieu Comandon 021a687fea Build a cache with game paths 2023-01-30 19:25:16 -08:00
Daniel Johnson 59abef7f69 Placate flake8!
Every single change is just whitespace. Python!
2023-01-24 17:26:28 -05:00
Mathieu Comandon 157bbee6c8 Allow tests to run without moddb installed 2023-01-19 20:03:27 -08:00
Antoine Mazeas 133c8ab29d some code cleanup
Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas b167143453 Code style and formatting
Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas bf7d7f91a1 Add test for handling noop when missing lib
Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas 97ac480c67 Guard against mirror urls to avoid long hangs
Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas 88a004c86d Revert requiring MODDB: prefix
Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas 10c4c8fcdf Add mandatory MODDB: prefix as per maintainer wish
+ add more test coverage

Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Antoine Mazeas 18c2f97002 Add ModDB download helper
This helper facility will seamlessly swap a "File" url (e.g. "https://www.moddb.com/games/tribes/downloads/starsiege-tribes-retro-version") into a mirror download link.

This enables installer authors to specify files to be downloaded directly from ModDB, e.g.

```
files:
    - t1_setup:
        url: https://www.moddb.com/games/tribes/downloads/starsiege-tribes-retro-version
        filename: t1retro.exe
        referer: https://www.moddb.com/games/tribes/downloads
```

Signed-off-by: Antoine Mazeas <antoine@karthanis.net>
2023-01-19 19:43:53 -08:00
Daniel Johnson 725368a8dc Add support for launch configs with lutris: URLs
The URLs can now have a 3-part path, like this:
"lutris:rungame/fear/F.E.A.R. Extraction Point"

The third part- which can only exist if the action is also present- is the name of a launch config. We use the config name as there's no launch config "slug" to use.

I also added unquoting to the URL, so "F.E.A.R.%20Extraction Point" will work too.
2022-12-27 03:44:52 -08:00
Daniel Johnson bcc69327cc Placate flake8!
These imports were using for tests that have been removed.
2022-10-30 15:00:25 -04:00
Mathieu Comandon 90b83caa4a Remove broken tests 2022-10-25 11:15:32 -07:00
Mathieu Comandon bb0b483cd0 Fix tests 2022-03-15 21:14:31 -07:00
Mathieu Comandon eb6654f4e5 Remove platforms from steam list and test that never worked 2022-01-25 15:34:22 -08:00
Rachmadani Haryono 57be9f7c62 test(cli): print steam list and steam folder 2021-12-15 11:55:45 -08:00
Mathieu Comandon 4e7e74b0a7 Style fix 2021-12-14 14:03:59 -08:00
Mathieu Comandon 83c4c4a1c9 Remove deletion of SQLite database in tests 2021-12-14 13:58:45 -08:00
Alexander Ravenheart f5e8e007b3 - Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-11-17 21:17:43 -08:00
Mathieu Comandon 922c7680cf Add winemenubuilder to dll overrides in test 2021-10-16 11:42:36 -07:00
Christian Clauss cdea86c9b4 Placate flake8 2021-08-02 13:44:18 -07:00
Mathieu Comandon ff33ab73c2 Fix tests 2021-04-26 22:42:38 -07:00
Mathieu Comandon 1d5569ba16 Fix unit tests 2021-02-19 15:44:12 -08:00
Mathieu Comandon 2f170e961f Fix process watcher 2021-02-15 19:36:13 -08:00
Mathieu Comandon 838b46d0e1 Further configuration to skip initialization during tests 2021-02-15 16:23:07 -08:00
Mathieu Comandon 449a00d390 Simplify process watcher 2021-02-02 22:54:09 -08:00
Mathieu Comandon 6131f50a25 Add tests for get_formatted_playtime 2021-01-13 21:12:42 -08:00
Mathieu Comandon 427ef2f8ec Allow downloading of GOG extras (Closes #2945) 2020-10-11 17:10:19 -07:00