### Install Protontricks with pipx Source: https://github.com/matoking/protontricks/blob/master/README.md Install the latest version of Protontricks from PyPI using pipx. Ensure Python 3.7+ and pip, setuptools, and virtualenv are installed. ```bash pipx install protontricks ``` -------------------------------- ### Install Development Version with pip Source: https://github.com/matoking/protontricks/blob/master/README.md Install the latest development version of Protontricks from the git repository using pip. Requires git to be installed. ```bash sudo python3 -m pip install git+https://github.com/Matoking/protontricks.git ``` -------------------------------- ### Install Protontricks with pip Source: https://github.com/matoking/protontricks/blob/master/README.md Install the latest release of Protontricks from PyPI using pip. This method is not recommended due to potential conflicts with system packages. Requires pip and setuptools to be installed. ```bash sudo python3 -m pip install protontricks ``` -------------------------------- ### Install mfplat using a custom script Source: https://github.com/matoking/protontricks/wiki/Custom-scripts This command installs mfplat, a component required by some games. Replace with '32' or '64' and with the relative path to the game's executable directory. The is the Steam Application ID. ```bash protontricks -c "wget https://gist.githubusercontent.com/Matoking/2017eeffc1cee82f4797530c67707437/raw/install_mfplat.sh; chmod +x install_mfplat.sh; ./install_mfplat.sh ;" ``` -------------------------------- ### Install Development Version with pipx Source: https://github.com/matoking/protontricks/blob/master/README.md Install the latest development version of Protontricks directly from the git repository using pipx. Requires git to be installed. ```bash pipx install git+https://github.com/Matoking/protontricks.git ``` ```bash pipx install --spec git+https://github.com/Matoking/protontricks.git protontricks ``` -------------------------------- ### Install Protontricks Desktop Integration Source: https://github.com/matoking/protontricks/blob/master/README.md Run this command in the terminal to enable desktop integration for Protontricks, including app shortcuts and executable launching. ```bash protontricks-desktop-install ``` -------------------------------- ### Install Protontricks for Current User with pip Source: https://github.com/matoking/protontricks/blob/master/README.md Install Protontricks for the current user only using pip. This avoids the need for sudo and potential system-wide conflicts. ```bash python3 -m pip install --user protontricks ``` -------------------------------- ### Install vdf using pip Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Install the latest release of the vdf module from PyPI. ```bash pip install vdf ``` -------------------------------- ### Install pipx Dependencies on Gentoo Source: https://github.com/matoking/protontricks/blob/master/README.md Install necessary Python packages for pipx on Gentoo. This includes pip, virtualenv, and setuptools, followed by installing pipx itself and ensuring its path is set. ```bash sudo emerge -av dev-python/pip dev-python/virtualenv dev-python/setuptools python3 -m pip install --user pipx ~/.local/bin/pipx ensurepath ``` -------------------------------- ### Install vdf development version Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Install the current development version of the vdf module directly from GitHub. ```bash pip install git+https://github.com/ValvePython/vdf ``` -------------------------------- ### Upgrade Protontricks with pipx Source: https://github.com/matoking/protontricks/blob/master/README.md Upgrade an existing Protontricks installation managed by pipx to the latest release. ```bash pipx upgrade protontricks ``` -------------------------------- ### Upgrade Protontricks with pip Source: https://github.com/matoking/protontricks/blob/master/README.md Upgrade an existing Protontricks installation managed by pip to the latest release. ```bash sudo python3 -m pip install --upgrade protontricks ``` -------------------------------- ### Set Custom Winetricks Location Source: https://github.com/matoking/protontricks/blob/master/README.md Set the $WINETRICKS environment variable to point to a local Winetricks installation, overriding the system default. ```bash export WINETRICKS= ``` -------------------------------- ### Set Custom Steam Directory Source: https://github.com/matoking/protontricks/blob/master/README.md Export the $STEAM_DIR environment variable to specify a non-default Steam installation directory. ```bash export STEAM_DIR= ``` -------------------------------- ### Add Protontricks Flatpak Aliases Source: https://github.com/matoking/protontricks/blob/master/README.md Add shell aliases to use Protontricks as a command-line application after Flatpak installation. Restart your terminal for changes to take effect. ```bash echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc echo "alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'" >> ~/.bashrc ``` -------------------------------- ### Launch Protontricks GUI Source: https://github.com/matoking/protontricks/blob/master/README.md Opens the graphical user interface for Protontricks, providing a visual way to manage game configurations. ```bash protontricks --gui ``` -------------------------------- ### Display Protontricks Help Message Source: https://github.com/matoking/protontricks/blob/master/README.md Prints the help message for Protontricks, detailing all available commands and options. ```bash protontricks --help ``` -------------------------------- ### Launch Windows Executable with Protontricks Source: https://github.com/matoking/protontricks/blob/master/README.md Launches a Windows executable (.exe) using Protontricks. This is useful for running Windows applications within a Wine prefix. ```bash protontricks-launch ``` -------------------------------- ### Run Custom Command with Protontricks Source: https://github.com/matoking/protontricks/blob/master/README.md Execute a custom command for a selected game using its App ID. ```bash protontricks -c ``` -------------------------------- ### Run Winetricks Commands with Protontricks Source: https://github.com/matoking/protontricks/blob/master/README.md Execute Winetricks commands for a specific game using its App ID. Any parameters after the App ID are passed directly to Winetricks. ```bash protontricks ``` -------------------------------- ### List All Games with Protontricks Source: https://github.com/matoking/protontricks/blob/master/README.md Lists all detected Steam games, which can be useful for identifying the correct App ID. ```bash protontricks -l ``` -------------------------------- ### VDFDict duplicate key handling Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Demonstrates how VDFDict handles duplicate keys by storing them as a list and allows accessing, modifying, or deleting specific duplicates using indexed access. ```python >>> d = vdf.VDFDict() >>> d['key'] = 111 >>> d['key'] = 222 >>> d VDFDict([('key', 111), ('key', 222)]) >>> d.items() [('key', 111), ('key', 222)] >>> d['key'] 111 >>> d[(0, 'key')] # get the first duplicate 111 >>> d[(1, 'key')] # get the second duplicate 222 >>> d.get_all_for('key') [111, 222] >>> d[(1, 'key')] = 123 # reassign specific duplicate >>> d.get_all_for('key') [111, 123] >>> d['key'] = 333 >>> d.get_all_for('key') [111, 123, 333] >>> del d[(1, 'key')] >>> d.get_all_for('key') [111, 333] >>> d[(1, 'key')] 333 ``` -------------------------------- ### Launch Windows Executable for Specific Steam App Source: https://github.com/matoking/protontricks/blob/master/README.md Launches a Windows executable for a specific Steam application, using its App ID to ensure it runs in the correct Wine prefix. ```bash protontricks-launch --appid ``` -------------------------------- ### VDFDict duplicate key output and checks Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Shows how VDFDict represents duplicate keys when dumped to a string and provides methods to check for duplicates and remove them. ```python >>> print vdf.dumps(d) "key" "111" "key" "333" >>> d.has_duplicates() True >>> d.remove_all_for('key') >>> len(d) 0 >>> d.has_duplicates() False ``` -------------------------------- ### Set Custom Wine Prefix Path Source: https://github.com/matoking/protontricks/blob/master/README.md Use the $STEAM_COMPAT_DATA_PATH environment variable to specify a custom path for the Wine prefix. This can be set in Steam game launch options. ```bash WINEPREFIX=$STEAM_COMPAT_DATA_PATH/pfx ``` -------------------------------- ### Parse VDF text and files Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Load VDF data from a file or a string using vdf.load, vdf.loads, vdf.parse. ```python import vdf # parsing vdf from file or string d = vdf.load(open('file.txt')) d = vdf.loads(vdf_text) d = vdf.parse(open('file.txt')) d = vdf.parse(vdf_text) ``` -------------------------------- ### VBKV format with header and CRC checking Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Load and dump VDF data in the VBKV format, including header and CRC checking, using vdf.vbkv_loads and vdf.vbkv_dumps. ```python # VBKV with header and CRC checking d = vdf.vbkv_loads(vbkv_bytes) b = vdf.vbkv_dumps(d) ``` -------------------------------- ### Using OrderedDict or VDFDict as mapper Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Specify collections.OrderedDict or vdf.VDFDict as the mapper when loading VDF strings to preserve key order or handle duplicate keys. ```python d = vdf.loads(vdf_string, mapper=collections.OrderedDict) d = vdf.loads(vdf_string, mapper=vdf.VDFDict) ``` -------------------------------- ### Binary VDF serialization and deserialization Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Load and dump VDF data in binary format using vdf.binary_loads and vdf.binary_dumps. Supports an alternative format with alt_format=True. ```python d = vdf.binary_loads(vdf_bytes) b = vdf.binary_dumps(d) # alternative format - VBKV d = vdf.binary_loads(vdf_bytes, alt_format=True) b = vdf.binary_dumps(d, alt_format=True) ``` -------------------------------- ### Find Game App ID with Protontricks Source: https://github.com/matoking/protontricks/blob/master/README.md Use this command to find a game's App ID by its name. This is often needed for other protontricks commands. ```bash protontricks -s ``` -------------------------------- ### Set Specific Proton Version Source: https://github.com/matoking/protontricks/blob/master/README.md Manually set the Proton version to be used by exporting the $PROTON_VERSION environment variable. Use the name displayed in Steam, e.g., 'Proton 5.0'. ```bash export PROTON_VERSION= ``` -------------------------------- ### Dump Python dict to VDF file Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Write a Python dictionary to a file in VDF format using vdf.dump. Use pretty=True for indented output. ```python # dumping dict as vdf to file vdf.dump(d, open('file2.txt','w'), pretty=True) ``` -------------------------------- ### Dump Python dict to VDF string Source: https://github.com/matoking/protontricks/blob/master/src/protontricks/_vdf/README.rst Convert a Python dictionary into a VDF formatted string using vdf.dumps. Use pretty=True for indented output. ```python # dumping dict as vdf to string vdf_text = vdf.dumps(d) indented_vdf = vdf.dumps(d, pretty=True) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.