forked from evan-buss/openbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: default desktop mode opens the browser.
- Cross compilation becomes A LOT more complicated once CGO is in the mix. Requires the time and energy to get build scripts to work across all platforms, and update the automated Github Actions to build on multiple machines (MacOS requires MacOS runner, Windows / Linux require Linux runner) - This commit adds a build flag "webview" to enable webview desktop support but the default without the build flag is to open the browser on start.
- Loading branch information
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build !webview | ||
// +build !webview | ||
|
||
package desktop | ||
|
||
import "github.com/evan-buss/openbooks/util" | ||
|
||
func StartWebView(url string, debug bool) { | ||
util.OpenBrowser(url) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//go:build !windows | ||
//go:build !windows && webview | ||
// +build !windows,webview | ||
|
||
package desktop | ||
|
||
|
3 changes: 2 additions & 1 deletion
3
desktop/desktop_windows.go → desktop/desktop_webview_windows.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//go:build windows | ||
//go:build windows && webview | ||
// +build windows,webview | ||
|
||
package desktop | ||
|
||
|