mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 08:29:40 +08:00
33 lines
710 B
Go
33 lines
710 B
Go
// Package wails is the main package of the Wails project.
|
|
// It is used by client applications.
|
|
package wails
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/internal/app"
|
|
"github.com/wailsapp/wails/v2/internal/runtime"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
)
|
|
|
|
// Runtime is an alias for the runtime.Runtime struct
|
|
type Runtime = runtime.Runtime
|
|
|
|
// Store is an alias for the Store object
|
|
type Store = runtime.Store
|
|
|
|
// Run creates an application based on the given config and executes it
|
|
func Run(options *options.App) error {
|
|
|
|
// Call an Init method manually
|
|
err := Init()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
mainapp, err := app.CreateApp(options)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return mainapp.Run()
|
|
}
|