Files
wails/internal/app/default.go
Travis McLane a213e8bcd1 Squashed 'v2/' content from commit 72ef153
git-subtree-dir: v2
git-subtree-split: 72ef15359e36e42b18d9407f74c762f83eb9a099
2020-09-15 19:52:54 -05:00

45 lines
1.0 KiB
Go

// +build !desktop,!hybrid,!server
package app
// This is the default application that will get run if the user compiles using `go build`.
// The reason we want to prevent that is that the `wails build` command does a lot of behind
// the scenes work such as asset compilation. If we allow `go build`, the state of these assets
// will be unknown and the application will not work as expected.
import (
"os"
"github.com/wailsapp/wails/v2/internal/features"
)
// App defines a Wails application structure
type App struct {
Title string
Width int
Height int
Resizable bool
// Indicates if the app is running in debug mode
debug bool
Features *features.Features
}
// CreateApp returns a null application
func CreateApp(options *Options) *App {
return &App{}
}
// Run the application
func (a *App) Run() error {
println(`FATAL: This application was built using "go build". This is unsupported. Please compile using "wails build".`)
os.Exit(1)
return nil
}
// Bind the dummy interface
func (a *App) Bind(dummy interface{}) error {
return nil
}