First rendition of wine support (needs some work still)

This commit is contained in:
Belac Darkstorm
2016-09-14 02:31:04 -05:00
parent f4ca2115d4
commit e5d0b6a9a2
3 changed files with 63 additions and 11 deletions
+13
View File
@@ -24,6 +24,7 @@ type prtap struct {
cat string
ex string
desc string
wine bool
}
func main() {
@@ -116,6 +117,18 @@ func processApp(fi *os.File) (out prtap) {
}
}
}
for _, v := range fis {
fil, err := os.Open(wd + "/" + fi.Name() + "/" + v.Name())
if err == nil {
stat, _ := fil.Stat()
if !stat.IsDir() && strings.HasSuffix(stat.Name(), "exe") {
out.wine = true
out.ex = wd + "/" + fi.Name() + "/" + v.Name()
out.name += " (Wine)"
return
}
}
}
return prtap{}
}