How to use the protontricks.steam.get_steam_apps function in protontricks

To help you get started, we’ve selected a few protontricks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Matoking / protontricks / tests / test_steam.py View on Github external
def test_get_steam_apps_custom_proton(
            self, default_proton, custom_proton_factory, steam_dir,
            steam_root):
        """
        Create a custom Proton installation and ensure
        'get_steam_apps' can find it
        """
        custom_proton = custom_proton_factory(name="Custom Proton")

        steam_apps = get_steam_apps(
            steam_root=str(steam_root),
            steam_path=str(steam_dir),
            steam_lib_paths=[str(steam_dir)]
        )

        assert len(steam_apps) == 2

        found_custom_proton = next(
            app for app in steam_apps
            if app.name == "Custom Proton"
        )
        assert found_custom_proton.install_path == \
            str(custom_proton.install_path)
github Matoking / protontricks / tests / test_steam.py View on Github external
def test_get_steam_apps_in_library_folder(
            self, default_proton, steam_library_factory, steam_app_factory,
            steam_dir, steam_root):
        """
        Create two games, one installed in the Steam installation directory
        and another in a Steam library folder
        """
        library_dir = steam_library_factory(name="GameDrive")
        steam_app_factory(name="Fake game 1", appid=10)
        steam_app_factory(
            name="Fake game 2", appid=20, library_dir=library_dir)

        steam_apps = get_steam_apps(
            steam_root=str(steam_root),
            steam_path=str(steam_dir),
            steam_lib_paths=[str(steam_dir), str(library_dir)]
        )

        # Two games and the default Proton installation should be found
        assert len(steam_apps) == 3
        steam_app_a = next(app for app in steam_apps if app.appid == 10)
        steam_app_b = next(app for app in steam_apps if app.appid == 20)

        assert steam_app_a.install_path == \
            str(steam_dir / "steamapps" / "common" / "Fake game 1")
        assert steam_app_b.install_path == \
            str(library_dir / "steamapps" / "common" / "Fake game 2")

protontricks

A simple wrapper for running Winetricks commands for Proton-enabled games.

GPL-3.0
Latest version published 11 days ago

Package Health Score

73 / 100
Full package analysis

Similar packages