Commit graph

172 commits

Author SHA1 Message Date
Mathieu Comandon e43cae9715 Add env var to allow using local packages 2023-11-12 05:59:19 -08:00
Mathieu Comandon 414da87d0e Also ignore modules in /var/home 2023-10-16 01:38:44 -07:00
Mathieu Comandon be2c47cb4b Modify sys.path to prevent Python from loading packages from .local/lib 2023-10-16 01:31:29 -07:00
Daniel Johnson 77abb59115 Removing timing code 2023-03-18 16:49:36 -04:00
Daniel Johnson 6de5cde181 Crude hacky effort to load only pixbufs we actually show
Just to see what the peformance looks like.
2023-03-18 11:45:23 -04: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 b007895733 Remove bullshit log message 2021-01-22 21:54:52 -08:00
Wade Berrier fe01f93f85 write errors out to stderr instead of stdout
This fixes listing games in json format to not include this error message.
2020-08-31 15:46:12 -07:00
SwimmingTiger 655d751a70 merge two try/except to one in bin/lutris 2020-06-18 19:11:32 -07:00
SwimmingTiger 40348f9fe0 i18n: find locale dir from the optional configuration file generated by meson 2020-06-18 19:11:32 -07:00
SwimmingTiger 4644e53ad0 i18n: fix the issue that translation cannot be applied on setting dialogs. 2020-06-18 19:11:32 -07:00
Alexandru-Rudi Mățău 3757415a70 Updated bin and gui 2020-04-27 19:52:01 +03:00
Stephan Lachnit ed613320fb improve meson and i18n support
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-04-13 17:16:15 -07:00
Wouter Wijsman 9102071518 Moved lutris-wrapper script
It will now be placed in /usr/share/lutris/bin
2020-03-22 12:33:00 -07:00
Aaron Opfer d7771ae87e lutris-wrapper: poll for game start and exit
Instead of depending on direct descendants of our process exiting as
a signal for checking the process tree, poll 10 times a second
instead. This allows us to build some sensible "game start detection"
which fixes behaviors when the initial game process is considered
excluded (such steam/winesteam games).

It has a minor consequence of making lutris-wrapper much more
complicated. I tried my best to add some comments to explain what
is going on. I also added another test.
2020-01-01 14:18:07 -08:00
Aaron Opfer a178b893cb lutris-wrapper: reaping processes immediately
Rather than waiting for the initial process to exit before we start
reaping child processes, instead launch the initial process async
and use the same wait3->reap loop on the initial process as the
inherited processes.

Refactor util/monitor and util/process to stop emiting logging
information or attempting to track state changes since POSIX signals
don't give us enough opportunity to track this information reliably.
I'm sure some users will be happy to not see their terminal spammed.
2019-12-27 15:27:36 -08:00
Aaron Opfer d394a1750f lutris-wrapper: setproctitle to game name
Makes it slightly easier to identify what game a particular
lutris-wrapper instance is responsible for.
2019-12-27 15:25:21 -08:00
Mathieu Comandon 0913ae694c Silence some pylint warnings 2019-10-16 06:50:43 -07:00
Mathieu Comandon 36e72e3933 Remove fallback locale 2019-10-16 06:25:00 -07:00
Manuel Vögele fefe47521c Use fallback locale if locale is configured incorrectly (fixes #2341) 2019-10-09 15:23:35 +02:00
Mathieu Comandon e0b39596bf It's not required to pass a locale name to setlocale 2019-08-31 13:29:19 -07:00
Devilish Spirits 841ae28701 Created basic meson.build config
Python files are installed into `$DESTDIR/lib/lutris`
	Scripts in `/bin` have been edited to search **ALL** module inside this dir
	Datas are also searched in `</lib/lutris>/../../share/lutris`, this allow weird DESTDIR like `/tmp/lutris` (tested)
	Now Lutris assume that libdir is located in `<bindir>/../lib`

	This is minimalist right now and should work for everyone
2019-08-05 19:02:01 -07:00
Aaron Opfer 260b88260f lutris_wrapper: fix for incomplete shutdowns
If any process lutris was monitoring died in-between it being detected and it having a `kill` attempted on it, lutris-wrapper would have a `ProcessLookupError` exception occur and would stop trying to kill any other processes and halt the shutdown. Fix this by catching this specific exception and ignoring it.

Fixes #2142.
2019-05-18 15:46:52 -07:00
Mathieu Comandon 3a7f5d704a Catch FileNotFoundErrors in lutris-wrapper (Closes #2005) 2019-04-07 23:34:54 -07:00
Aaron Opfer 8303e5c05e lutris-wrapper: apply force stop to excluded procs
An extension to the work done in #1835 and relevant to #1798.

When performing a force stop, also kill processes that would normally be considered "excluded". In addition, perform up to three rounds of process collection/killing in an attempt to beat races involving new processes being created.
2019-03-22 12:52:36 -07:00
Aaron Opfer 16a530ec43 lutris-wrapper: send sigkill if we get 2 sigterms
If `lutris-wrapper` receives and processes a `SIGTERM` but then receives another one, kill all tracked children with `SIGKILL`. This feature is a part of the work necessary to fix #1798.

Added a test for `lutris-wrapper`.
2019-03-14 20:28:01 -07:00
Mathieu Comandon f0f7c7e70b Unset PYTHONPATH in wrapper script to avoid confusing Steam (Closes #1619) 2019-01-18 17:39:17 -08:00
Mathieu Comandon f98fdefcf4 Enable monitor logging in dev mode 2019-01-16 15:23:48 -08:00
Mathieu Comandon 3f1c630979 Add logging to lutris-wrapper 2019-01-10 20:01:55 -08:00
Mathieu Comandon dda4aa7fe2 Add local lutris package to path on dev environments in lutris-wrapper 2019-01-10 12:40:17 -08:00
Mathieu Comandon 3ab8e826a7 Remove set_connect_state, I believe that was for the old menu 2019-01-10 04:31:43 -08:00
Mathieu Comandon fa40c801d9 Move wrapper script to bin directory 2019-01-10 01:11:23 -08:00
Mathieu Comandon 145ba65c71 Remove encoding headers 2018-11-18 16:33:42 -08:00
Mathieu Comandon 648e285492 Consider any executable from /usr to be a system install 2018-05-18 14:46:57 -07:00
Mathieu Comandon cf8cd40438 Invalid locales can also throw ValueErrors 2018-05-16 13:12:48 -07:00
Mathieu Comandon 2f07521731 Provide additional details for unsupported locales (Fixes #660) 2018-05-08 15:37:46 -07:00
Mathieu Comandon c332fc8d03 Catch errors when using an unsupported locale 2017-09-27 21:14:01 -07:00
Patrick Griffis 992e7221a5 Remove unused padsp32 2017-05-19 02:16:00 -04:00
Patrick Griffis eba8a3c11e Don't generate cache files when ran locally 2017-05-19 01:40:24 -04:00
Mathieu Comandon a879f6348d Taking a shot at setting up i18n but I have no idea what I'm doing and quite frankly, I don't evn care about it 2017-05-18 16:14:18 -07:00
Mathieu Comandon dcf0633f58 Remove unused code in launcher script 2017-03-17 18:12:56 -07:00
Patrick Griffis d48d2410ff Properly use Gtk.Application, kill custom DBus service 2016-12-04 08:44:19 -05:00
Mathieu Comandon 541da26c6c Remove --verbose command line flag 2016-09-28 21:57:09 -07:00
Mathieu Comandon 48e7d5c384 No need to replace non existing directory with a dash in json 2016-09-28 20:27:38 -07:00
Mathieu Comandon dbe84eeada Fix list-games command line option (Fixes #370) 2016-09-28 20:18:41 -07:00
Mathieu Comandon 9c95bfc853 Create RuntimeUpdater class 2016-09-18 08:55:08 -07:00
Mathieu Comandon 0e3dc50ba9 Consider this fixed, I believe switching to daemon thread means that we won't encounter this problem soon 2016-08-05 21:18:03 -07:00
Mathieu Comandon db2ae4619c This thing 2016-08-05 21:14:59 -07:00
Mathieu Comandon 580cc5dd39 Add states to Steam games list 2016-08-05 20:53:50 -07:00
Mathieu Comandon b99051cc4e Provide more info with --list-steam-games 2016-08-05 20:48:23 -07:00