zserge / lorca

Build cross-platform modern desktop apps in Go + HTML5
MIT License
8.04k stars 535 forks source link

If chrome/Chromiom is not installed, what is supported fallback? #12

Closed Abhinav1217 closed 6 years ago

Abhinav1217 commented 6 years ago

I have just downloaded today and have been trying out few snippets and modifying examples at work. It was working fine.

At home when I tried to explore it more, It failed.. Because being a firefox user, I haven't yet installed Google chrome on my freshly installed Fedora. I did have Brave Browser ( which is based on libchromium ) but example programs didn't pick it up for some reason.

So what I wanted to ask is,

  1. Is there any fallback for someone who doesn't have chrome installed at default location ( like portable chrome in windows, Or chromium based browser which have its own path )
  2. Is there any plan to support multiple backend for webview ( Edge for windows, Safari for Mac, Firefox on linux )
Abhinav1217 commented 6 years ago

P.S I have tried playing with lorca.ChromeExecutable variable trying to force it to use brave browser. But I guess libchromium is not chromium.

zserge commented 6 years ago

At the moment only Chrome is supported, because Lorca is using Chrome DevTools Protocol. In theory, other browsers could be supported as long as they have adapters - https://github.com/ChromeDevTools/awesome-chrome-devtools#browser-adapters - but I haven't tried these yet.

You are right, ChromeExecutable should be used to provide a custom location of the Chrome browser, but it has to be a very much compatible browser at the moment.

Also, if you want to use native browser engines (MSHTML/WebKit etc) instead of Chrome - you might find https://github.com/zserge/webview useful.