libreoffice support started, still broken. Some updates to how wine-access gets called.

This commit is contained in:
Storm Dragon committed 2026-10-14 16:24:49 -04:00
1 parent 8e76d2341c
commit 7f78177786
26 files changed
+1173 -21

No files matched your search

+19 -8
View File
@@ -1,4 +1,4 @@
// Package wine supervises the optional installed Cthulhu Wine accessibility
// Package wine supervises the optional installed Wine Access accessibility
// helper. Native Wine objects stay in that process; Go receives D-Bus messages.
package wine
@@ -47,17 +47,28 @@ func New(logger *slog.Logger) *Manager {
}
func helperPath() string {
return findHelper([]string{
filepath.Join(os.Getenv("HOME"), ".local", "libexec", "wine-access", "wine-access.exe"),
filepath.Join(os.Getenv("HOME"), ".local", "libexec", "cthulhu", "wine", "cthulhu-wine-access.exe"),
"/usr/local/libexec/wine-access/wine-access.exe",
"/usr/libexec/wine-access/wine-access.exe",
"/usr/libexec/cthulhu/wine/cthulhu-wine-access.exe",
})
}
func findHelper(candidates []string) string {
if path := os.Getenv("CTHULHU_WINE_ACCESS_HELPER"); executable(path) {
return path
}
if path := filepath.Join(os.Getenv("HOME"), ".local", "libexec", "cthulhu", "wine", "cthulhu-wine-access.exe"); executable(path) {
return path
for _, path := range candidates {
if executable(path) {
return path
}
}
if path := "/usr/libexec/cthulhu/wine/cthulhu-wine-access.exe"; executable(path) {
return path
}
if path, err := exec.LookPath("cthulhu-wine-access.exe"); err == nil {
return path
for _, name := range []string{"wine-access.exe", "cthulhu-wine-access.exe"} {
if path, err := exec.LookPath(name); err == nil {
return path
}
}
return ""
}