How to use the protontricks.steam.find_appid_proton_prefix 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
steam_library_factory):
        """
        Find the proton prefix directory for a game located inside
        a "SteamApps" directory instead of the default "steamapps".

        Regression test for #33.
        """
        library_dir = steam_library_factory("TestLibrary")
        steam_app_factory(name="Test game", appid=10, library_dir=library_dir)

        os.rename(
            str(library_dir / "steamapps"),
            str(library_dir / "SteamApps")
        )

        path = find_appid_proton_prefix(
            appid=10, steam_lib_paths=[str(steam_dir), str(library_dir)]
        )

        assert path == str(
            library_dir / "SteamApps" / "compatdata" / "10" / "pfx"
        )
github Matoking / protontricks / tests / test_steam.py View on Github external
# Give the copy in library B the most recent modification timestamp
        os.utime(
            str(library_dir_a / "steamapps" / "compatdata" / "10" / "pfx.lock"),
            (time.time() - 100, time.time() - 100)
        )
        os.utime(
            str(library_dir_b / "steamapps" / "compatdata" / "10" / "pfx.lock"),
            (time.time() - 25, time.time() - 25)
        )
        os.utime(
            str(library_dir_c / "steamapps" / "compatdata" / "10" / "pfx.lock"),
            (time.time() - 50, time.time() - 50)
        )

        path = find_appid_proton_prefix(
            appid=10,
            steam_lib_paths=[
                str(library_dir_a), str(library_dir_b), str(library_dir_c)
            ]
        )
        assert path == str(
            library_dir_b / "steamapps" / "compatdata" / "10" / "pfx"
        )

protontricks

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

GPL-3.0
Latest version published 3 days ago

Package Health Score

73 / 100
Full package analysis

Similar packages