mirror of
https://github.com/taigrr/wails.git
synced 2026-04-03 21:52:45 -07:00
Compare commits
11 Commits
v2.0.0-bet
...
obfuscatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11c9c34958 | ||
|
|
fa380105f4 | ||
|
|
24eaef1604 | ||
|
|
62adcab722 | ||
|
|
e12b630dfb | ||
|
|
81b3ecb056 | ||
|
|
b4d14644ee | ||
|
|
69fd584c32 | ||
|
|
3444ec50a7 | ||
|
|
02d4c65e01 | ||
|
|
efdcfe9985 |
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
const Version = "v1.16.8"
|
||||
const Version = "v1.16.9"
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -19,8 +19,6 @@ type OpenDialogOptions struct {
|
||||
DefaultFilename string
|
||||
Title string
|
||||
Filters []FileFilter
|
||||
AllowFiles bool
|
||||
AllowDirectories bool
|
||||
ShowHiddenFiles bool
|
||||
CanCreateDirectories bool
|
||||
ResolvesAliases bool
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 | | ✅ |
|
||||
|
||||
@@ -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,则返回文件而不是别名 | | ✅ |
|
||||
|
||||
BIN
website/static/img/easyweb.png
Normal file
BIN
website/static/img/easyweb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
Reference in New Issue
Block a user