[mac] Make it compile

This commit is contained in:
Lea Anthony
2021-09-19 17:32:57 +10:00
parent eac8f23341
commit 3ac4982fc5
4 changed files with 36 additions and 3 deletions

View 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
}

View File

@@ -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

View File

@@ -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()
}
/*

View File

@@ -1,4 +1,5 @@
//go:build windows
// +build windows
package windows