protontool
A comprehensive tool for managing Wine/Proton prefixes with built-in component installation (DLLs, fonts, runtimes, applications), custom verb creation, intelligent error detection, and Steam game integration.
Features
- Prefix Management - Create, configure, and manage Wine/Proton prefixes for Steam games and standalone applications
- Built-in Verbs - Install common components like vcrun, dotnet, dxvk, fonts, and more
- Custom Verbs - Create and share your own installation verbs via TOML files
- Smart Logging - Automatic detection and explanation of Wine errors with a curated database of known issues
- GUI Support - Interactive dialogs via zenity or yad for prefix selection, verb installation, and verb creation
- Steam Integration - Automatic detection of Steam libraries, games, and Proton versions
Building
The binaries will be placed in target/release/:
protontool- Main CLI toolprotontool-launch- Launch Windows executablesprotontool-desktop-install- Install desktop shortcuts
Usage
Install components for a game
Search for games
List all installed games
List available verbs
Launch GUI
Prefix Manager GUI
Run a custom command
Launch a Windows executable
Custom Verbs
Create your own installation verbs using TOML files in ~/.protontool/verb/.
Example: Simple Verb
[]
= "myapp"
= "Install My Application"
= "apps"
[[]]
= "download"
= "https://example.com/installer.exe"
= "installer.exe"
[[]]
= "run"
= "installer.exe"
= ["/S"]
Example: Advanced Verb with Registry
[]
= "tweaks"
= "Apply performance tweaks"
= "settings"
[[]]
= "reg"
= "HKCU\\Software\\Wine\\Direct3D"
= "UseGLSL"
= "enabled"
Verb Actions
| Action | Description |
|---|---|
download |
Download a file from URL |
run |
Execute a Windows program |
copy |
Copy files to prefix |
reg |
Set registry values |
override |
Set DLL overrides |
winecfg |
Apply winecfg settings |
Logging
Protontool automatically logs all Wine output and detects known errors:
- Logs stored in
~/.protontool/log/ - Automatic log rotation (5MB max, keeps 5 backups)
- Known error detection with human-readable explanations
- Covers Wine SEH exceptions, HRESULT codes, NTSTATUS codes, and common patterns
Example Error Output
┌─ wine ─────────────────────────────────────────
│ Code: WINE-SEH-NODLL
│ Details: DLL not found - missing dependency
└────────────────────────────────────────────────
Compile-time Configuration
Custom paths can be set at compile time using feature flags and environment variables:
# Custom Steam directory
protontool_DEFAULT_STEAM_DIR=/custom/steam \
# Custom GUI provider (yad or zenity)
protontool_DEFAULT_GUI_PROVIDER=yad \
# Custom Steam Runtime path
protontool_STEAM_RUNTIME_PATH=/custom/runtime \
Environment Variables
| Variable | Description |
|---|---|
STEAM_DIR |
Path to custom Steam installation |
PROTON_VERSION |
Name of preferred Proton installation |
WINE |
Path to custom wine executable |
WINESERVER |
Path to custom wineserver executable |
STEAM_RUNTIME |
0 = disable, 1 = enable, or path to custom runtime |
protontool_GUI |
GUI provider (yad or zenity) |
Variables set by protontool
| Variable | Description |
|---|---|
STEAM_APPID |
App ID of the current game |
STEAM_APP_PATH |
Path to the game's installation directory |
PROTON_PATH |
Path to the Proton installation |
Directory Structure
Protontool uses ~/.protontool/ for all user data:
~/.protontool/
├── verb/ # Custom verb TOML files
├── pfx/ # Custom (non-Steam) prefixes
├── tmp/ # Temporary downloads
└── log/ # Log files with rotation
Project Structure
src/
├── main.rs # protontool entry point
├── lib.rs # Library root
├── bin/
│ ├── launch.rs # protontool-launch binary
│ └── desktop_install.rs
├── cli/
│ ├── mod.rs # CLI logic, GUI handlers, verb creator
│ └── util.rs # Argument parsing
├── config.rs # Configuration and path defaults
├── gui.rs # Zenity/YAD dialog wrappers
├── log.rs # Logging with error detection
├── wine_data.rs # Auto-generated Wine debug data
├── steam.rs # Steam installation detection
├── util.rs # Utilities (run_command, which, etc.)
├── vdf/
│ ├── mod.rs
│ ├── parser.rs # Valve Data Format parser
│ └── vdict.rs # VDF dictionary structure
└── winetricks/
├── mod.rs # Winetricks module root
├── wine.rs # WineContext for prefix operations
├── verbs.rs # Built-in verb registry
├── custom.rs # Custom TOML verb loader
├── download.rs # File download utilities
└── ...
tools/
└── wine-extract/ # Dev tool for Wine source extraction
├── src/main.rs
├── Cargo.toml
└── README.md
Development Tools
wine-extract
A development tool to extract debug information from Wine/Proton source code and regenerate wine_data.rs:
# Regenerate wine_data.rs from Wine source
This extracts:
- 539+ debug channels from Wine DLLs
- Curated error patterns for known Wine/Proton issues
Use this when Valve updates their Wine fork to pick up new debug channels.
Requirements
- Rust 1.70+ (for building)
- Steam with Proton installed
zenityoryad(for GUI dialogs)curlorwget(for verb downloads)
License
MIT