mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 04:29:35 +08:00

* Application refactor * [windows] refactor out main loop. Create new application struct. Refactor assethandler/assetserver signatures. * Refactor darwin app * Refactor app for linux * Update v2/internal/frontend/assetserver/assethandler.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assethandler.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assetserver.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assetserver.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com>
28 lines
722 B
Go
28 lines
722 B
Go
//go:build !dev && !production && !bindings && windows
|
|
|
|
package app
|
|
|
|
import (
|
|
"os/exec"
|
|
|
|
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
)
|
|
|
|
func (a *App) Run() error {
|
|
return nil
|
|
}
|
|
|
|
// CreateApp creates the app!
|
|
func CreateApp(_ *options.App) (*App, error) {
|
|
result := w32.MessageBox(0,
|
|
`Wails applications will not build without the correct build tags.
|
|
Please use "wails build" or press "OK" to open the documentation on how to use "go build"`,
|
|
"Error",
|
|
w32.MB_ICONERROR|w32.MB_OKCANCEL)
|
|
if result == 1 {
|
|
exec.Command("rundll32", "url.dll,FileProtocolHandler", "https://wails.io/docs/guides/manual-builds").Start()
|
|
}
|
|
return nil, nil
|
|
}
|