mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[mac] Make it compile
This commit is contained in:
32
v2/internal/appng/app_default_darwin.go
Normal file
32
v2/internal/appng/app_default_darwin.go
Normal file
@@ -0,0 +1,32 @@
|
||||
//go:build !dev && !production && darwin
|
||||
|
||||
package appng
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
)
|
||||
|
||||
// App defines a Wails application structure
|
||||
type App struct{}
|
||||
|
||||
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").Start()
|
||||
// }
|
||||
|
||||
err := fmt.Errorf(`Wails applications will not build without the correct build tags.`)
|
||||
|
||||
return nil, err
|
||||
}
|
||||
@@ -3,9 +3,10 @@
|
||||
package appng
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
|
||||
"github.com/leaanthony/winc/w32"
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// App defines a Wails application structure
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"log"
|
||||
"runtime"
|
||||
|
||||
"github.com/leaanthony/winc"
|
||||
"github.com/wailsapp/wails/v2/internal/binding"
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
"github.com/wailsapp/wails/v2/internal/frontend/assetserver"
|
||||
@@ -234,7 +233,7 @@ func (f *Frontend) WindowSetRGBA(col *options.RGBA) {
|
||||
}
|
||||
|
||||
func (f *Frontend) Quit() {
|
||||
winc.Exit()
|
||||
//winc.Exit()
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package windows
|
||||
|
||||
|
||||
Reference in New Issue
Block a user