Compare commits

..

5 Commits

Author SHA1 Message Date
Lea\Anthony
11c9c34958 Revert "v2.0.0-beta.23"
This reverts commit fa380105f4.
2021-12-15 19:33:03 +11:00
Lea\Anthony
fa380105f4 v2.0.0-beta.23 2021-12-15 19:27:58 +11:00
Lea\Anthony
24eaef1604 [mac] fix dynamically linking UTIFramework during cgo build 2021-12-11 19:43:21 +11:00
Lea\Anthony
62adcab722 [mac] try dynamically linking UTIFramework during cgo build 2021-12-11 19:36:17 +11:00
Lea Anthony
e12b630dfb [mac] Attempt to fix 10.14 compilation issue 2021-12-11 07:29:47 +11:00
3 changed files with 15 additions and 4 deletions

View File

@@ -497,16 +497,16 @@
filters = [filters stringByReplacingOccurrencesOfString:@"*." withString:@""];
filters = [filters stringByReplacingOccurrencesOfString:@" " withString:@""];
NSArray *filterList = [filters componentsSeparatedByString:@";"];
if (@available(macOS 10.16, *)) {
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
[dialog setAllowedContentTypes:contentTypes];
} else {
#else
[dialog setAllowedFileTypes:filterList];
}
#endif
} else {
[dialog setAllowsOtherFileTypes:true];
}

View File

@@ -5,7 +5,7 @@ package darwin
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation -framework Cocoa -framework WebKit -framework UniformTypeIdentifiers
#cgo LDFLAGS: -framework Foundation -framework Cocoa -framework WebKit
#import <Foundation/Foundation.h>
#import "Application.h"
#import "WailsContext.h"

View File

@@ -3,6 +3,7 @@ package build
import (
"bytes"
"fmt"
"github.com/wailsapp/wails/v2/internal/system"
"os"
"os/exec"
"path/filepath"
@@ -319,11 +320,21 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
return "1"
})
if options.Platform == "darwin" {
// Determine verison
info, err := system.GetInfo()
if err != nil {
return err
}
versionSplit := strings.Split(info.OS.Version, ".")
addUTIFramework := versionSplit[0] == "11"
// Set the minimum Mac SDK to 10.13
cmd.Env = upsertEnv(cmd.Env, "CGO_LDFLAGS", func(v string) string {
if v != "" {
v += " "
}
if addUTIFramework {
v += "-framework UniformTypeIdentifiers "
}
v += "-mmacosx-version-min=10.13"
return v