Add Support for 64 bit Firefox Installations (#87)

Should fix up #87 and all the other related issues. Haven't wrote any golang for a year but I think it was a pretty simple fix so I took it on; however ff someone wouldn't mind giving it a second set of eyes that would be awesome. I'm stoked to try the app out, it's looks so cool :P

Cheers
pull/114/head
traBpUkciP 2018-07-10 15:49:25 -03:00 zatwierdzone przez Thomas Buckley-Houston
rodzic d79b8810dc
commit 78b021f822
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -104,7 +104,14 @@ func ensureFirefoxBinary() {
}
}
if _, err := os.Stat(*firefoxBinary); os.IsNotExist(err) {
Shutdown(errors.New("Firefox binary not found: " + *firefoxBinary))
if runtime.GOOS == "windows" {
*firefoxBinary = `c:\Program Files\Mozilla Firefox\firefox.exe`
if _, err := os.Stat(*firefoxBinary); os.IsNotExist(err) {
Shutdown(errors.New("Firefox binary not found in: " + *firefoxBinary + " or c:\Program Files (x86)\Mozilla Firefox\firefox.exe"))
}
} else {
Shutdown(errors.New("Firefox binary not found: " + *firefoxBinary))
}
}
}