mirror of
https://github.com/bottlesdevs/Bottles.git
synced 2026-10-29 15:27:13 +08:00
29 lines
635 B
Python
29 lines
635 B
Python
from bottles.backend.logger import Logger
|
|
from bottles.backend.wine.wineprogram import WineProgram
|
|
|
|
logging = Logger()
|
|
|
|
|
|
class CMD(WineProgram):
|
|
program = "Wine Command Line"
|
|
command = "cmd"
|
|
|
|
def run_batch(
|
|
self,
|
|
batch: str,
|
|
terminal: bool = True,
|
|
args: str = "",
|
|
environment: dict | None = None,
|
|
cwd: str | None = None,
|
|
):
|
|
args = f"/c {batch} {args}"
|
|
|
|
self.launch(
|
|
args=args,
|
|
communicate=True,
|
|
terminal=terminal,
|
|
environment=environment,
|
|
cwd=cwd,
|
|
action_name="run_batch",
|
|
)
|