cheapwine 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ Metadata-Version: 2.4
2
+ Name: cheapwine
3
+ Version: 0.1.0
4
+ Summary: A lightweight, project-based Wine prefix and application manager (Wine's version of uv)
5
+ Author: Cheapwine Contributors
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: click>=8.0.0
13
+ Requires-Dist: rich>=12.0.0
14
+ Requires-Dist: pefile>=2023.2.7
15
+ Requires-Dist: Pillow>=10.0.0
16
+
17
+ # 🍷 cheapwine
18
+
19
+ A project-local Wine prefix and application manager (Wine's version of `uv`).
20
+
21
+ `cheapwine` brings modern, declarative, and fast workflow management to Wine environments. Instead of managing a bloated directory of global prefixes (like Lutris or Bottles), `cheapwine` isolates prefixes directly inside your project folders and exposes a clean, git-friendly configuration file named `distillery.json`.
22
+
23
+ > [!NOTE]
24
+ > This project was fully designed and built by **Gemini** and **DeepSeek** (Advanced Agentic Coding AIs) in pair programming with the user! 🤖✨
25
+
26
+ ---
27
+
28
+ ## Key Features
29
+
30
+ * **Project-Local Prefixes**: Automatically sandboxes your Wine environments in `.cheapwine` inside your project directory.
31
+ * **Declarative Distillery Settings (`distillery.json`)**: Declare architectures, Windows versions, environment variables, and application commands in a single, portable JSON file.
32
+ * **Runner Overrides**: Use system Wine, Proton (via Steam), Wine-GE, Kron4ek, Soda, or custom-compiled Wine builds, both globally and overridden per application.
33
+ * **Runner Auto-Downloads**: Automatically download Wine-GE, Proton-GE, Kron4ek, and Soda runners from GitHub by name (e.g. `wine-ge-8-26`, `kron4ek-9.0`).
34
+ * **Custom Runner Versions**: Pin specific runner versions (e.g. `wine-ge-8-26`) globally or per application.
35
+ * **Declarative Winetricks**: Define winetricks components (DLLs, codecs, fonts) in `distillery.json` — applied automatically on prefix init and cached to avoid re-application.
36
+ * **LatencyFleX Support**: Built-in LatencyFleX environment variable configuration for competitive gaming (NVIDIA Reflex-like latency reduction).
37
+ * **Legacy 32-bit Support**: Create isolated 32-bit Wine prefixes (`win32`) on the fly, even for individual applications in a 64-bit project.
38
+ * **Auto-Integration Spam Block**: Prevents Wine from cluttering your Linux host's desktop search menu during app installation by disabling `winemenubuilder` by default.
39
+ * **Manual Desktop Export**: Clean CLI tools (`cheapwine export` / `cheapwine unexport`) to manually generate standard Linux desktop launchers (`.desktop` entries) for only the applications you want.
40
+ * **Auto-Discovery Scanner**: Scans Wine Start Menu shortcuts and `drive_c/Program Files` to automatically detect newly installed programs.
41
+ * **Beautiful CLI & Interactive TUI**: Features a clean, colorful, emoji-rich command-line output (inspired by `uv`) and a live interactive Terminal User Interface (TUI) menu for select-and-run workflows.
42
+ * **EasyDistill TUI Editor**: Full-screen interactive configuration editor (`cheapwine easydistill`) for editing `distillery.json` without touching JSON directly.
43
+
44
+ ---
45
+
46
+ ## Installation
47
+
48
+ To install `cheapwine` locally in editable mode (or from the repository root):
49
+
50
+ ```bash
51
+ pip install -e .
52
+ ```
53
+
54
+ This registers the `cheapwine` and `cw` entrypoints in your shell.
55
+
56
+ ---
57
+
58
+ ## Quick Start
59
+
60
+ ### 1. Initialize a Project
61
+ Create a new directory and initialize the environment. This generates the `distillery.json` settings file and creates the local Wine prefix:
62
+
63
+ ```bash
64
+ mkdir my-project && cd my-project
65
+ cheapwine init
66
+ ```
67
+
68
+ ### 2. Install a Program
69
+ Run your installer (e.g., `setup.exe`) inside the project prefix. `cheapwine` will block it from writing shortcuts to your Linux host applications menu, keeping your desktop clean:
70
+
71
+ ```bash
72
+ cheapwine run setup.exe
73
+ ```
74
+
75
+ ### 3. Scan & List Installed Programs
76
+ Search the prefix for newly installed executables or shortcuts:
77
+
78
+ ```bash
79
+ cheapwine list --all
80
+ # or only show auto-detected ones
81
+ cheapwine list --detected
82
+ ```
83
+
84
+ ### 4. Register the Application by Name
85
+ Register the auto-detected application in `distillery.json` by name only (it will automatically resolve the path to the executable):
86
+
87
+ ```bash
88
+ cheapwine add "My Application"
89
+ ```
90
+
91
+ ### 5. Launch the TUI Menu
92
+ To see a menu of all registered and detected applications, use the arrow keys to navigate, and press Enter to launch:
93
+
94
+ ```bash
95
+ cheapwine
96
+ # or
97
+ cheapwine run
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Configuration (`distillery.json`)
103
+
104
+ Here is an example of a fully configured `distillery.json`:
105
+
106
+ ```json
107
+ {
108
+ "name": "my-legacy-workspace",
109
+ "wine_arch": "win64",
110
+ "wine_version": "system",
111
+ "win_version": "win10",
112
+ "runner": "wine",
113
+ "runner_version": "wine-ge-8-26",
114
+ "latencyflex": false,
115
+ "winetricks": ["corefonts", "vcrun2022"],
116
+ "env": {
117
+ "WINEDEBUG": "-all"
118
+ },
119
+ "apps": {
120
+ "notepad": {
121
+ "exe": "notepad.exe",
122
+ "args": ["/A"],
123
+ "env": {}
124
+ },
125
+ "win95_game": {
126
+ "exe": "C:\\Program Files\\MyGame\\game.exe",
127
+ "win_version": "win95",
128
+ "wine_arch": "win32",
129
+ "runner": "/home/user/wine-ge/bin/wine"
130
+ },
131
+ "my_game": {
132
+ "exe": "C:\\Games\\game.exe",
133
+ "latencyflex": true,
134
+ "winetricks": ["d3dx11_43", "dxvk"],
135
+ "args": ["-dx11"]
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Advanced Configurations
144
+
145
+ ### Running a Legacy 32-bit Windows 95 App
146
+ If you have a game or program that requires a pure 32-bit prefix configured for Windows 95, you can add it with specific overrides:
147
+
148
+ ```bash
149
+ cheapwine add "RetroGame" "C:\Program Files\game.exe" --arch win32 --win-version win95
150
+ ```
151
+ When running `cheapwine run RetroGame`, a separate, isolated 32-bit Wine prefix is created inside `.cheapwine_win32`, and the registry is set to Windows 95 compatibility mode for this app.
152
+
153
+ ### Using Custom Runners (like Proton)
154
+ You can configure a custom Wine runner (such as Proton for Steam games, Bottles runners, or custom builds) either globally or per-application:
155
+
156
+ **Globally:**
157
+ ```bash
158
+ cheapwine init --runner "/home/user/.steam/steam/compatibilitytools.d/GE-Proton8-25/files/bin/wine"
159
+ ```
160
+
161
+ **Per-Application:**
162
+ ```bash
163
+ cheapwine add "SteamApp" "game.exe" --runner "proton run"
164
+ ```
165
+
166
+ ### Auto-Downloading Runners by Name
167
+ Specify a downloadable runner by name and version — cheapwine fetches it from GitHub automatically:
168
+
169
+ ```bash
170
+ cheapwine init --runner "wine-ge" --runner-version "8-26"
171
+ cheapwine init --runner "proton-ge" --runner-version "8-25"
172
+ cheapwine init --runner "kron4ek" --runner-version "9.0"
173
+ cheapwine init --runner "soda" --runner-version "9.0-1"
174
+ ```
175
+
176
+ ### Declarative Winetricks
177
+ Define winetricks components in `distillery.json` and they are applied automatically on prefix init:
178
+
179
+ ```bash
180
+ cheapwine init --runner "wine-ge-8-26"
181
+ # Then edit distillery.json to add:
182
+ # "winetricks": ["corefonts", "vcrun2022", "dxvk"]
183
+ ```
184
+ Components are applied on `cheapwine init` and when running an app that has them configured. Applied components are cached per prefix in `cheapwine_tricks.json` so they are only applied once.
185
+
186
+ Per-application winetricks:
187
+ ```bash
188
+ cheapwine add "MyGame" "game.exe" --tricks d3dx11_43 --tricks dxvk
189
+ ```
190
+
191
+ ### LatencyFleX Support
192
+ Enable LatencyFleX globally or per-application for NVIDIA Reflex-like latency reduction in competitive games:
193
+
194
+ **Globally:**
195
+ ```bash
196
+ cheapwine init --latencyflex
197
+ ```
198
+
199
+ **Per-Application:**
200
+ ```bash
201
+ cheapwine add "CS2" "cs2.exe" --latencyflex
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Command Reference
207
+
208
+ | Command | Options | Description | Example |
209
+ | :--- | :--- | :--- | :--- |
210
+ | **`cheapwine init`** | `--arch [win32\|win64]`, `--win-version`, `--runner`, `--runner-version`, `--latencyflex/--no-latencyflex` | Creates `distillery.json` and initializes the Wine prefix. | `cheapwine init --arch win32 --win-version win95 --latencyflex` |
211
+ | **`cheapwine run`** | `[app_or_exe]`, `[extra_args...]` | Runs a registered app or an executable path. Launches TUI if no app specified. | `cheapwine run mygame -dx11` |
212
+ | **`cheapwine tui`** | *None* | Launches the interactive arrow-key select menu. | `cheapwine tui` |
213
+ | **`cheapwine add`** | `--env`, `--workdir`, `--win-version`, `--arch`, `--runner`, `--runner-version`, `--tricks`, `--latencyflex/--no-latencyflex` | Registers an application. If EXE path omitted, resolves from auto-detected apps. | `cheapwine add steam` |
214
+ | **`cheapwine remove`**| `<name>` | Removes an application definition. | `cheapwine remove steam` |
215
+ | **`cheapwine list`** | `--all` / `-a`, `--detected` / `-d` | Lists registered and/or auto-detected applications. | `cheapwine list --all` |
216
+ | **`cheapwine export`**| `<name>` | Generates a desktop launcher in the host Linux applications menu. | `cheapwine export "RetroGame"` |
217
+ | **`cheapwine unexport`**| `<name>` | Removes an exported desktop launcher from the host. | `cheapwine unexport "RetroGame"` |
218
+ | **`cheapwine wine`** | `[wine_args...]` | Runs a Wine utility in the prefix context. Defaults to `winecfg`. | `cheapwine wine regedit` |
219
+ | **`cheapwine winetricks`**| `[tricks_args...]` | Runs `winetricks` inside the local prefix context. | `cheapwine winetricks corefonts` |
220
+ | **`cheapwine env`** | *None* | Prints shell export commands to manually hook your terminal into the prefix. | `cheapwine env` |
221
+ | **`cheapwine easydistill`**| *None* | Launches the interactive TUI configuration editor for `distillery.json`. | `cheapwine easydistill` |
222
+
223
+ ---
224
+
225
+ ## Development & Testing
226
+
227
+ ### Running Tests
228
+ To run the full suite of unit and integration tests (uses `click.testing.CliRunner` and mocks Wine processes for speed):
229
+
230
+ ```bash
231
+ python3 -m unittest discover -s tests
232
+ ```
233
+
234
+ ---
235
+
236
+ ## License
237
+
238
+ MIT License. See [LICENSE](LICENSE) (if present) for details.
@@ -0,0 +1,222 @@
1
+ # 🍷 cheapwine
2
+
3
+ A project-local Wine prefix and application manager (Wine's version of `uv`).
4
+
5
+ `cheapwine` brings modern, declarative, and fast workflow management to Wine environments. Instead of managing a bloated directory of global prefixes (like Lutris or Bottles), `cheapwine` isolates prefixes directly inside your project folders and exposes a clean, git-friendly configuration file named `distillery.json`.
6
+
7
+ > [!NOTE]
8
+ > This project was fully designed and built by **Gemini** and **DeepSeek** (Advanced Agentic Coding AIs) in pair programming with the user! 🤖✨
9
+
10
+ ---
11
+
12
+ ## Key Features
13
+
14
+ * **Project-Local Prefixes**: Automatically sandboxes your Wine environments in `.cheapwine` inside your project directory.
15
+ * **Declarative Distillery Settings (`distillery.json`)**: Declare architectures, Windows versions, environment variables, and application commands in a single, portable JSON file.
16
+ * **Runner Overrides**: Use system Wine, Proton (via Steam), Wine-GE, Kron4ek, Soda, or custom-compiled Wine builds, both globally and overridden per application.
17
+ * **Runner Auto-Downloads**: Automatically download Wine-GE, Proton-GE, Kron4ek, and Soda runners from GitHub by name (e.g. `wine-ge-8-26`, `kron4ek-9.0`).
18
+ * **Custom Runner Versions**: Pin specific runner versions (e.g. `wine-ge-8-26`) globally or per application.
19
+ * **Declarative Winetricks**: Define winetricks components (DLLs, codecs, fonts) in `distillery.json` — applied automatically on prefix init and cached to avoid re-application.
20
+ * **LatencyFleX Support**: Built-in LatencyFleX environment variable configuration for competitive gaming (NVIDIA Reflex-like latency reduction).
21
+ * **Legacy 32-bit Support**: Create isolated 32-bit Wine prefixes (`win32`) on the fly, even for individual applications in a 64-bit project.
22
+ * **Auto-Integration Spam Block**: Prevents Wine from cluttering your Linux host's desktop search menu during app installation by disabling `winemenubuilder` by default.
23
+ * **Manual Desktop Export**: Clean CLI tools (`cheapwine export` / `cheapwine unexport`) to manually generate standard Linux desktop launchers (`.desktop` entries) for only the applications you want.
24
+ * **Auto-Discovery Scanner**: Scans Wine Start Menu shortcuts and `drive_c/Program Files` to automatically detect newly installed programs.
25
+ * **Beautiful CLI & Interactive TUI**: Features a clean, colorful, emoji-rich command-line output (inspired by `uv`) and a live interactive Terminal User Interface (TUI) menu for select-and-run workflows.
26
+ * **EasyDistill TUI Editor**: Full-screen interactive configuration editor (`cheapwine easydistill`) for editing `distillery.json` without touching JSON directly.
27
+
28
+ ---
29
+
30
+ ## Installation
31
+
32
+ To install `cheapwine` locally in editable mode (or from the repository root):
33
+
34
+ ```bash
35
+ pip install -e .
36
+ ```
37
+
38
+ This registers the `cheapwine` and `cw` entrypoints in your shell.
39
+
40
+ ---
41
+
42
+ ## Quick Start
43
+
44
+ ### 1. Initialize a Project
45
+ Create a new directory and initialize the environment. This generates the `distillery.json` settings file and creates the local Wine prefix:
46
+
47
+ ```bash
48
+ mkdir my-project && cd my-project
49
+ cheapwine init
50
+ ```
51
+
52
+ ### 2. Install a Program
53
+ Run your installer (e.g., `setup.exe`) inside the project prefix. `cheapwine` will block it from writing shortcuts to your Linux host applications menu, keeping your desktop clean:
54
+
55
+ ```bash
56
+ cheapwine run setup.exe
57
+ ```
58
+
59
+ ### 3. Scan & List Installed Programs
60
+ Search the prefix for newly installed executables or shortcuts:
61
+
62
+ ```bash
63
+ cheapwine list --all
64
+ # or only show auto-detected ones
65
+ cheapwine list --detected
66
+ ```
67
+
68
+ ### 4. Register the Application by Name
69
+ Register the auto-detected application in `distillery.json` by name only (it will automatically resolve the path to the executable):
70
+
71
+ ```bash
72
+ cheapwine add "My Application"
73
+ ```
74
+
75
+ ### 5. Launch the TUI Menu
76
+ To see a menu of all registered and detected applications, use the arrow keys to navigate, and press Enter to launch:
77
+
78
+ ```bash
79
+ cheapwine
80
+ # or
81
+ cheapwine run
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Configuration (`distillery.json`)
87
+
88
+ Here is an example of a fully configured `distillery.json`:
89
+
90
+ ```json
91
+ {
92
+ "name": "my-legacy-workspace",
93
+ "wine_arch": "win64",
94
+ "wine_version": "system",
95
+ "win_version": "win10",
96
+ "runner": "wine",
97
+ "runner_version": "wine-ge-8-26",
98
+ "latencyflex": false,
99
+ "winetricks": ["corefonts", "vcrun2022"],
100
+ "env": {
101
+ "WINEDEBUG": "-all"
102
+ },
103
+ "apps": {
104
+ "notepad": {
105
+ "exe": "notepad.exe",
106
+ "args": ["/A"],
107
+ "env": {}
108
+ },
109
+ "win95_game": {
110
+ "exe": "C:\\Program Files\\MyGame\\game.exe",
111
+ "win_version": "win95",
112
+ "wine_arch": "win32",
113
+ "runner": "/home/user/wine-ge/bin/wine"
114
+ },
115
+ "my_game": {
116
+ "exe": "C:\\Games\\game.exe",
117
+ "latencyflex": true,
118
+ "winetricks": ["d3dx11_43", "dxvk"],
119
+ "args": ["-dx11"]
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Advanced Configurations
128
+
129
+ ### Running a Legacy 32-bit Windows 95 App
130
+ If you have a game or program that requires a pure 32-bit prefix configured for Windows 95, you can add it with specific overrides:
131
+
132
+ ```bash
133
+ cheapwine add "RetroGame" "C:\Program Files\game.exe" --arch win32 --win-version win95
134
+ ```
135
+ When running `cheapwine run RetroGame`, a separate, isolated 32-bit Wine prefix is created inside `.cheapwine_win32`, and the registry is set to Windows 95 compatibility mode for this app.
136
+
137
+ ### Using Custom Runners (like Proton)
138
+ You can configure a custom Wine runner (such as Proton for Steam games, Bottles runners, or custom builds) either globally or per-application:
139
+
140
+ **Globally:**
141
+ ```bash
142
+ cheapwine init --runner "/home/user/.steam/steam/compatibilitytools.d/GE-Proton8-25/files/bin/wine"
143
+ ```
144
+
145
+ **Per-Application:**
146
+ ```bash
147
+ cheapwine add "SteamApp" "game.exe" --runner "proton run"
148
+ ```
149
+
150
+ ### Auto-Downloading Runners by Name
151
+ Specify a downloadable runner by name and version — cheapwine fetches it from GitHub automatically:
152
+
153
+ ```bash
154
+ cheapwine init --runner "wine-ge" --runner-version "8-26"
155
+ cheapwine init --runner "proton-ge" --runner-version "8-25"
156
+ cheapwine init --runner "kron4ek" --runner-version "9.0"
157
+ cheapwine init --runner "soda" --runner-version "9.0-1"
158
+ ```
159
+
160
+ ### Declarative Winetricks
161
+ Define winetricks components in `distillery.json` and they are applied automatically on prefix init:
162
+
163
+ ```bash
164
+ cheapwine init --runner "wine-ge-8-26"
165
+ # Then edit distillery.json to add:
166
+ # "winetricks": ["corefonts", "vcrun2022", "dxvk"]
167
+ ```
168
+ Components are applied on `cheapwine init` and when running an app that has them configured. Applied components are cached per prefix in `cheapwine_tricks.json` so they are only applied once.
169
+
170
+ Per-application winetricks:
171
+ ```bash
172
+ cheapwine add "MyGame" "game.exe" --tricks d3dx11_43 --tricks dxvk
173
+ ```
174
+
175
+ ### LatencyFleX Support
176
+ Enable LatencyFleX globally or per-application for NVIDIA Reflex-like latency reduction in competitive games:
177
+
178
+ **Globally:**
179
+ ```bash
180
+ cheapwine init --latencyflex
181
+ ```
182
+
183
+ **Per-Application:**
184
+ ```bash
185
+ cheapwine add "CS2" "cs2.exe" --latencyflex
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Command Reference
191
+
192
+ | Command | Options | Description | Example |
193
+ | :--- | :--- | :--- | :--- |
194
+ | **`cheapwine init`** | `--arch [win32\|win64]`, `--win-version`, `--runner`, `--runner-version`, `--latencyflex/--no-latencyflex` | Creates `distillery.json` and initializes the Wine prefix. | `cheapwine init --arch win32 --win-version win95 --latencyflex` |
195
+ | **`cheapwine run`** | `[app_or_exe]`, `[extra_args...]` | Runs a registered app or an executable path. Launches TUI if no app specified. | `cheapwine run mygame -dx11` |
196
+ | **`cheapwine tui`** | *None* | Launches the interactive arrow-key select menu. | `cheapwine tui` |
197
+ | **`cheapwine add`** | `--env`, `--workdir`, `--win-version`, `--arch`, `--runner`, `--runner-version`, `--tricks`, `--latencyflex/--no-latencyflex` | Registers an application. If EXE path omitted, resolves from auto-detected apps. | `cheapwine add steam` |
198
+ | **`cheapwine remove`**| `<name>` | Removes an application definition. | `cheapwine remove steam` |
199
+ | **`cheapwine list`** | `--all` / `-a`, `--detected` / `-d` | Lists registered and/or auto-detected applications. | `cheapwine list --all` |
200
+ | **`cheapwine export`**| `<name>` | Generates a desktop launcher in the host Linux applications menu. | `cheapwine export "RetroGame"` |
201
+ | **`cheapwine unexport`**| `<name>` | Removes an exported desktop launcher from the host. | `cheapwine unexport "RetroGame"` |
202
+ | **`cheapwine wine`** | `[wine_args...]` | Runs a Wine utility in the prefix context. Defaults to `winecfg`. | `cheapwine wine regedit` |
203
+ | **`cheapwine winetricks`**| `[tricks_args...]` | Runs `winetricks` inside the local prefix context. | `cheapwine winetricks corefonts` |
204
+ | **`cheapwine env`** | *None* | Prints shell export commands to manually hook your terminal into the prefix. | `cheapwine env` |
205
+ | **`cheapwine easydistill`**| *None* | Launches the interactive TUI configuration editor for `distillery.json`. | `cheapwine easydistill` |
206
+
207
+ ---
208
+
209
+ ## Development & Testing
210
+
211
+ ### Running Tests
212
+ To run the full suite of unit and integration tests (uses `click.testing.CliRunner` and mocks Wine processes for speed):
213
+
214
+ ```bash
215
+ python3 -m unittest discover -s tests
216
+ ```
217
+
218
+ ---
219
+
220
+ ## License
221
+
222
+ MIT License. See [LICENSE](LICENSE) (if present) for details.
@@ -0,0 +1,5 @@
1
+ """
2
+ cheapwine: A lightweight, project-based Wine prefix and application manager.
3
+ """
4
+
5
+ __version__ = "0.1.0"