Skip to content

Commit

Permalink
wine: drop Initialize and Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Oct 13, 2023
1 parent 3a05719 commit ba8804c
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions wine/prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"io"
"log"
"os"
"path/filepath"
)

type Prefix struct {
Expand All @@ -25,28 +24,6 @@ func (p *Prefix) Wine(exe string, arg ...string) *Cmd {
return p.Command("wine", arg...)
}

func (p *Prefix) Setup() error {
if _, err := os.Stat(filepath.Join(p.Dir, "drive_c", "windows")); err == nil {
return nil
}

return p.Initialize()
}

func (p *Prefix) Initialize() error {
log.Printf("Initializing wineprefix at %s", p.Dir)

if err := os.MkdirAll(p.Dir, 0o755); err != nil {
return err
}

if err := p.Command("wineboot", "-i").Run(); err != nil {
return err
}

return p.DisableCrashDialogs()
}

func (p *Prefix) Kill() {
log.Println("Killing wineprefix")

Expand Down

0 comments on commit ba8804c

Please sign in to comment.