mirror of
https://github.com/taigrr/wails.git
synced 2026-04-03 13:48:55 -07:00
Compare commits
5 Commits
v1.16.9
...
obfuscatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11c9c34958 | ||
|
|
fa380105f4 | ||
|
|
24eaef1604 | ||
|
|
62adcab722 | ||
|
|
e12b630dfb |
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user