mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[mac] Fix linking issue. Removed warnings.
This commit is contained in:
@@ -3,13 +3,15 @@ package build
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/wailsapp/wails/v2/internal/system"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/system"
|
||||
|
||||
"github.com/leaanthony/gosod"
|
||||
wailsRuntime "github.com/wailsapp/wails/v2/internal/frontend/runtime"
|
||||
"github.com/wailsapp/wails/v2/internal/frontend/runtime/wrapper"
|
||||
@@ -320,13 +322,18 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
return "1"
|
||||
})
|
||||
if options.Platform == "darwin" {
|
||||
// Determine verison
|
||||
// Determine version so we can link to newer frameworks
|
||||
// Why doesn't CGO have this option?!?!
|
||||
info, err := system.GetInfo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
versionSplit := strings.Split(info.OS.Version, ".")
|
||||
addUTIFramework := versionSplit[0] == "11"
|
||||
majorVersion, err := strconv.Atoi(versionSplit[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
addUTIFramework := majorVersion >= 11
|
||||
// Set the minimum Mac SDK to 10.13
|
||||
cmd.Env = upsertEnv(cmd.Env, "CGO_LDFLAGS", func(v string) string {
|
||||
if v != "" {
|
||||
|
||||
Reference in New Issue
Block a user