WebView Source Builder

Create self-contained binary of HTML sources in a WebView

Dependencies
Debian/Ubuntu
The following dependencies are required in order to build for Debian-based operating systems. For alternate OS's (e.g. BSD, Windows) refer to the webview preqequisites install instructions.
$ apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
Single-page application support
This does NOT work with SPA (Single-page applications) due to CORS restrictions. To work around this limitation see WebView App Builder
Quick and Easy
Compile the Go application and run the example in one command:
$ make
Build from source
Install the new build using gmake.
$ make install
Cross-compile to support Windows, OSX, etc ..
$ make build-<darwin|linux|windows>
Running the application
Once compiled it should be as easy as..
$ webview-src
Note: Using --debug will enable WebView browser Developer Tools.
Go application structure
lib // Go package dependencies.
src // HTML markup and related sources.
src.go // main
Supported elements
Currently the only HTML element not supported is inline <style> usage due to browser Cross-origin resource sharing (CORS) restrictions.
As an alternative you should include your stylesheets using:
<link rel="stylesheet" type="text/css" href="path/to/file.css" />
Closing the WebView
Outside of the UI close button, you can trigger the WebView termination event by adding id="webview-close" to an anchor link.
Example
<a id="webview-close">Exit</a>
References
- webview_go - Go language binding for the webview library.
Contributions
If you fix a bug, or have a code you want to contribute, please send a pull-request with your changes. (Note: Before committing your code please ensure that you run golint and gofmt on contributed files).
Versioning
This package is maintained under the Semantic Versioning guidelines.
License and Warranty
This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
go-webview-src-builder is provided under the terms of the MIT license
Author
Marc S. Brooks