Skip to content

Commit

Permalink
refactor: switch to using faster method to set win version
Browse files Browse the repository at this point in the history
Co-Authored by: Nate Marti <[email protected]>
  • Loading branch information
ctrlaltf24 committed Jan 14, 2025
1 parent c346e34 commit 165dad8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ou_dedetai/wine.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,15 @@ def set_renderer(app: App, renderer: str):

def set_win_version(app: App, exe: str, windows_version: str):
if exe == "logos":
run_winetricks(app, '-q', 'settings', f'{windows_version}')
# This operation is equivilent to f"winetricks -q settings {windows_version}"
# but faster
process = run_wine_proc(
app.conf.wine_binary,
app,
exe_args=('winecfg', '/v', windows_version)
)
if process:
process.wait()

elif exe == "indexer":
reg = f"HKCU\\Software\\Wine\\AppDefaults\\{app.conf.faithlife_product}Indexer.exe" # noqa: E501
Expand Down

0 comments on commit 165dad8

Please sign in to comment.