Compare commits

...

11 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
Lea\Anthony
81b3ecb056 v1.16.9 2021-12-10 19:04:22 +11:00
Lea\Anthony
b4d14644ee Only generate ico if not there 2021-12-10 19:04:10 +11:00
Lea\Anthony
69fd584c32 Update sponsors 2021-12-10 19:00:26 +11:00
Lea Anthony
3444ec50a7 Merge pull request #1017 from stffabi/feature/add-upx-info-windows
[docs] Add info about upx and antivirus vendors
2021-12-09 21:55:52 +11:00
stffabi
02d4c65e01 [docs] Add info about upx and antivirus vendors 2021-12-09 11:03:53 +01:00
Lea Anthony
efdcfe9985 [v2] Remove AllowFiles & AllowDirectories 2021-12-09 08:16:45 +11:00
14 changed files with 51 additions and 21 deletions

View File

@@ -106,6 +106,13 @@ Click [here](https://wails.io) if you are interested in trying out v2 Beta for W
This project is supported by these kind people / companies:
<p align="center">
<a href="https://www.easywebadv.it/" style="width:100px;">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
</p>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/silver%20sponsor.png" width="100"/>
</a>

View File

@@ -109,6 +109,13 @@
这个项目由以下这些人或者公司支持:
<p align="center">
<a href="https://www.easywebadv.it/" style="width:100px;">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
</p>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/silver%20sponsor.png" width="100"/>
</a>

View File

@@ -313,10 +313,12 @@ func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error {
return err
}
// Generate icon from PNG
err = generateWindowsIcon(icon, basename+".ico")
if err != nil {
return err
// Generate icon from PNG if it doesn't exist
if !fs.FileExists(basename + ".ico") {
err = generateWindowsIcon(icon, basename+".ico")
if err != nil {
return err
}
}
// Copy manifest

View File

@@ -1,4 +1,4 @@
package cmd
// Version - Wails version
const Version = "v1.16.8"
const Version = "v1.16.9"

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

@@ -84,7 +84,7 @@ func (f *Frontend) openDialog(options *frontend.OpenDialogOptions, multiple bool
// OpenFileDialog prompts the user to select a file
func (f *Frontend) OpenFileDialog(options frontend.OpenDialogOptions) (string, error) {
results, err := f.openDialog(&options, false, options.AllowFiles, options.AllowDirectories)
results, err := f.openDialog(&options, false, true, false)
if err != nil {
return "", err
}
@@ -97,7 +97,7 @@ func (f *Frontend) OpenFileDialog(options frontend.OpenDialogOptions) (string, e
// OpenMultipleFilesDialog prompts the user to select a file
func (f *Frontend) OpenMultipleFilesDialog(options frontend.OpenDialogOptions) ([]string, error) {
return f.openDialog(&options, true, options.AllowFiles, options.AllowDirectories)
return f.openDialog(&options, true, true, false)
}
// SaveFileDialog prompts the user to select a file

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

@@ -19,8 +19,6 @@ type OpenDialogOptions struct {
DefaultFilename string
Title string
Filters []FileFilter
AllowFiles bool
AllowDirectories bool
ShowHiddenFiles bool
CanCreateDirectories bool
ResolvesAliases bool

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

View File

@@ -14,6 +14,13 @@ sidebar_position: 99
<div
dangerouslySetInnerHTML={{
__html: `
<p align="center">
<a href="https://www.easywebadv.it/" style="width:100px;">
<img src="/img/easyweb.png" width="100"/>
</a>
</p>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/img/silver%20sponsor.png" width="100"/>
</a>

View File

@@ -82,6 +82,12 @@ Example:
:::
:::info UPX on Windows
Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437).
:::
## doctor
`wails doctor` will run diagnostics to ensure that your system is ready for development.

View File

@@ -69,8 +69,6 @@ type OpenDialogOptions struct {
DefaultFilename string
Title string
Filters []FileFilter
AllowFiles bool
AllowDirectories bool
ShowHiddenFiles bool
CanCreateDirectories bool
ResolvesAliases bool
@@ -83,8 +81,6 @@ type OpenDialogOptions struct {
| DefaultFilename | The default filename | ✅ | ✅ |
| Title | Title for the dialog | ✅ | ✅ |
| [Filters](#filefilter) | A list of file filters | ✅ | ✅ |
| AllowFiles | Allow files to be selected | | ✅ |
| AllowDirectories | Allow directories to be selected | | ✅ |
| ShowHiddenFiles | Show files hidden by the system | | ✅ |
| CanCreateDirectories | Allow user to create directories | | ✅ |
| ResolvesAliases | If true, returns the file not the alias | | ✅ |

View File

@@ -63,8 +63,6 @@ type OpenDialogOptions struct {
DefaultFilename string
Title string
Filters []FileFilter
AllowFiles bool
AllowDirectories bool
ShowHiddenFiles bool
CanCreateDirectories bool
ResolvesAliases bool
@@ -78,8 +76,6 @@ type OpenDialogOptions struct {
| DefaultFilename | 默认文件名 | ✅ | ✅ |
| Title | 对话框的标题 | ✅ | ✅ |
| [Filters](#文件过滤) | 文件过滤器列表 | ✅ | ✅ |
| AllowFiles | 允许选择文件 | | ✅ |
| AllowDirectories | 允许选择目录 | | ✅ |
| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ |
| CanCreateDirectories | 允许用户创建目录 | | ✅ |
| ResolvesAliases | 如果为 true则返回文件而不是别名 | | ✅ |

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB