Skip to content

Commit

Permalink
closes #1492
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed May 19, 2022
1 parent 18cb539 commit ebd0743
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/backend/wine/eject.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class Eject(WineProgram):
program = "Wine Eject CLI"
command = "eject"

def cdrom(self, drive: str, unmount_only: bool = False) -> None:
def cdrom(self, drive: str, unmount_only: bool = False):
args = drive
if unmount_only:
args += " -u"
return self.launch(args=args, comunicate=True, action_name="cdrom")

def all(self) -> None:
def all(self):
args = "-a"
return self.launch(args=args, comunicate=True, action_name="all")
19 changes: 19 additions & 0 deletions src/backend/wine/expand.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from typing import NewType

from bottles.backend.logger import Logger # pyright: reportMissingImports=false
from bottles.backend.wine.wineprogram import WineProgram

logging = Logger()


class Expand(WineProgram):
program = "Wine cabinet expander"
command = "expand"

def extract(self, cabinet: str, filename: str):
args = f"{cabinet} {filename}"
return self.launch(args=args, comunicate=True, action_name="extract")

def extract_all(self, cabinet: str, filenames: list):
for filename in filenames:
self.extract(cabinet, filename)
3 changes: 2 additions & 1 deletion src/backend/wine/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ bottles_sources = [
'regsvr32.py',
'winebridge.py',
'explorer.py',
'drives.py',,
'drives.py',
'eject.py',
'expand.py',
]

install_data(bottles_sources, install_dir: winedir)

0 comments on commit ebd0743

Please sign in to comment.