-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcbcf8f
commit d656e2b
Showing
8 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
import os | ||
import time | ||
|
||
from bottles.backend.logger import Logger | ||
from bottles.backend.wine.wineprogram import WineProgram | ||
from bottles.backend.wine.winedbg import WineDbg | ||
from bottles.backend.wine.wineboot import WineBoot | ||
|
||
logging = Logger() | ||
|
||
|
||
class WineCfg(WineProgram): | ||
program = "Wine Configuration" | ||
command = "winecfg" | ||
|
||
def set_windows_version(self, version): | ||
logging.info(f"Setting Windows version to {version}") | ||
|
||
winedbg = WineDbg(self.config) | ||
wineboot = WineBoot(self.config) | ||
|
||
wineboot.kill() | ||
|
||
res = self.launch( | ||
args=f"-v {version}", | ||
communicate=True, | ||
environment={ | ||
"DISPLAY": os.environ.get("DISPLAY", ":0"), | ||
"WAYLAND_DISPLAY": os.environ.get("WAYLAND_DISPLAY", ""), | ||
}, | ||
action_name="set_windows_version", | ||
) | ||
|
||
winedbg.wait_for_process("winecfg") | ||
wineboot.restart() | ||
|
||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters