github.com/secoba/wails/v2@v2.6.4/internal/app/app_default_windows.go (about)

     1  //go:build !dev && !production && !bindings && windows
     2  
     3  package app
     4  
     5  import (
     6  	"os/exec"
     7  
     8  	"github.com/secoba/wails/v2/internal/frontend/desktop/windows/winc/w32"
     9  	"github.com/secoba/wails/v2/pkg/options"
    10  )
    11  
    12  func (a *App) Run() error {
    13  	return nil
    14  }
    15  
    16  // CreateApp creates the app!
    17  func CreateApp(_ *options.App) (*App, error) {
    18  	result := w32.MessageBox(0,
    19  		`Wails applications will not build without the correct build tags. 
    20  Please use "wails build" or press "OK" to open the documentation on how to use "go build"`,
    21  		"Error",
    22  		w32.MB_ICONERROR|w32.MB_OKCANCEL)
    23  	if result == 1 {
    24  		exec.Command("rundll32", "url.dll,FileProtocolHandler", "https://wails.io/docs/guides/manual-builds").Start()
    25  	}
    26  	return nil, nil
    27  }