Compare commits

..

1 Commits

Author SHA1 Message Date
Lea Anthony 2c24c4c643 v2.7.0 2023-12-09 16:32:29 +11:00
59 changed files with 93 additions and 1500 deletions
+11 -13
View File
@@ -2,7 +2,7 @@ name: Build + Test v2
on:
push:
branches: [release/*, master, bugfix/*]
branches: [release/*, master]
workflow_dispatch:
jobs:
@@ -12,32 +12,31 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-11]
go-version: ['1.20']
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.18, 1.19]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: ./v2/go.sum
- name: Run tests (mac)
if: matrix.os == 'macos-latest' || matrix.os == 'macos-11'
if: matrix.os == 'macos-latest'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v2
run: go test -v ./...
- name: Run tests (!mac)
if: matrix.os != 'macos-latest' && matrix.os != 'macos-11'
if: matrix.os != 'macos-latest'
working-directory: ./v2
run: go test -v ./...
@@ -51,7 +50,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
@@ -90,16 +89,15 @@ jobs:
vanilla-ts,
plain,
]
go-version: ['1.20']
go-version: [1.18, 1.19]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: ./v2/go.sum
- name: Build Wails CLI
run: |
+23 -23
View File
@@ -26,28 +26,28 @@ jobs:
run: |
echo "::warning::Feature branch does not contain any changes to the website."
# lint_go:
# name: Run Go Linters
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: "1.21"
#
# - name: Update go modules
# working-directory: ./v2
# run: go mod tidy
#
# - name: Run Linter
# uses: golangci/golangci-lint-action@v3
# with:
# version: v1.54
# working-directory: ./v2
# args: --timeout=10m0s --config ./.golangci.yml
lint_go:
name: Run Go Linters
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Update go modules
working-directory: ./v2
run: go mod tidy
- name: Run Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
working-directory: ./v2
args: --timeout=10m0s --config ./.golangci.yml
test_go:
name: Run Go Tests
@@ -56,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.19]
go-version: [1.18, 1.19]
steps:
- name: Checkout code
+1 -1
View File
@@ -120,7 +120,7 @@ Wails では Go のコードとウェブフロントエンドを単一のバイ
## スター数の推移
[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
[![スター数の推移](https://starchart.cc/wailsapp/wails.svg)](https://starchart.cc/wailsapp/wails)
## コントリビューター
+1 -7
View File
@@ -122,13 +122,7 @@ This project is supported by these kind people / companies:
## Stargazers over time
<a href="https://star-history.com/#wailsapp/wails&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
</picture>
</a>
[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
## Contributors
-4
View File
@@ -104,10 +104,6 @@ func diagnoseEnvironment(f *flags.Doctor) error {
if len(gpu.GraphicsCards) > 1 {
prefix = "GPU " + strconv.Itoa(idx+1) + " "
}
if card.DeviceInfo == nil {
systemTabledata = append(systemTabledata, []string{prefix, "Unknown"})
continue
}
details := fmt.Sprintf("%s (%s) - Driver: %s", card.DeviceInfo.Product.Name, card.DeviceInfo.Vendor.Name, card.DeviceInfo.Driver)
systemTabledata = append(systemTabledata, []string{prefix, details})
}
+1 -1
View File
@@ -1 +1 @@
v2.7.1
v2.7.0
+3 -3
View File
@@ -1,6 +1,6 @@
module github.com/wailsapp/wails/v2
go 1.20
go 1.18
require (
github.com/Masterminds/semver v1.5.0
@@ -33,7 +33,7 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/samber/lo v1.38.1
github.com/stretchr/testify v1.8.1
github.com/tc-hib/winres v0.2.1
github.com/tc-hib/winres v0.1.5
github.com/tidwall/sjson v1.1.7
github.com/tkrajina/go-reflector v0.5.6
github.com/wailsapp/go-webview2 v1.0.10
@@ -94,7 +94,7 @@ require (
github.com/yuin/goldmark-emoji v1.0.1 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/image v0.12.0 // indirect
golang.org/x/image v0.10.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
+6 -4
View File
@@ -208,8 +208,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tc-hib/winres v0.2.1 h1:YDE0FiP0VmtRaDn7+aaChp1KiF4owBiJa5l964l5ujA=
github.com/tc-hib/winres v0.2.1/go.mod h1:C/JaNhH3KBvhNKVbvdlDWkbMDO9H4fKKDaN7/07SSuk=
github.com/tc-hib/winres v0.1.5 h1:2dA5yfjdoEA3UyRaOC92HNMt3jap66pLzoW4MjpC/0M=
github.com/tc-hib/winres v0.1.5/go.mod h1:pe6dOR40VOrGz8PkzreVKNvEKnlE8t4yR8A8naL+t7A=
github.com/tidwall/gjson v1.8.0/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk=
github.com/tidwall/gjson v1.9.3 h1:hqzS9wAHMO+KVBBkLxYdkEeeFHuqr95GfClRLKlgK0E=
github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
@@ -255,8 +255,9 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.10.0 h1:gXjUUtwtx5yOE0VKWq1CH4IJAClq4UGgUA3i+rpON9M=
golang.org/x/image v0.10.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
@@ -315,6 +316,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -396,7 +396,7 @@ void ReleaseContext(void *inctx) {
// Credit: https://stackoverflow.com/q/33319295
void WindowPrint(void *inctx) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
// Check if macOS 11.0 or newer
if (@available(macOS 11.0, *)) {
ON_MAIN_THREAD(
WailsContext *ctx = (__bridge WailsContext*) inctx;
@@ -424,5 +424,4 @@ void WindowPrint(void *inctx) {
[po runOperationModalForWindow:ctx.mainWindow delegate:ctx.mainWindow.delegate didRunSelector:nil contextInfo:nil];
)
}
#endif
}
@@ -219,27 +219,23 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
config.preferences.tabFocusesLinks = *preferences.tabFocusesLinks;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
if (@available(macOS 11.3, *)) {
if (preferences.textInteractionEnabled != NULL) {
config.preferences.textInteractionEnabled = *preferences.textInteractionEnabled;
}
}
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120300
if (@available(macOS 12.3, *)) {
if (preferences.fullscreenEnabled != NULL) {
config.preferences.elementFullscreenEnabled = *preferences.fullscreenEnabled;
}
if (preferences.fullscreenEnabled != NULL) {
config.preferences.elementFullscreenEnabled = *preferences.fullscreenEnabled;
}
}
#endif
// [config.preferences setValue:[NSNumber numberWithBool:true] forKey:@"developerExtrasEnabled"];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
if (@available(macOS 10.15, *)) {
config.preferences.fraudulentWebsiteWarningEnabled = fraudulentWebsiteWarningEnabled;
}
#endif
WKUserContentController* userContentController = [WKUserContentController new];
[userContentController addScriptMessageHandler:self name:@"external"];
@@ -435,11 +431,10 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
openPanel.allowsMultipleSelection = parameters.allowsMultipleSelection;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (@available(macOS 10.14, *)) {
openPanel.canChooseDirectories = parameters.allowsDirectories;
}
#endif
[openPanel
beginSheetModalForWindow:webView.window
completionHandler:^(NSInteger result) {
@@ -563,18 +558,14 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
#endif
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
[dialog setAllowedContentTypes:contentTypes];
}
#endif
#else
[dialog setAllowedFileTypes:filterList];
#endif
@@ -647,21 +638,17 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
#endif
}
if( contentTypes.count == 0) {
[dialog setAllowsOtherFileTypes:true];
} else {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
[dialog setAllowedContentTypes:contentTypes];
}
#endif
}
#else
@@ -23,7 +23,6 @@ extern void processMessage(const char *message);
@end
void showInspector(void *inctx) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
ON_MAIN_THREAD(
if (@available(macOS 12.0, *)) {
WailsContext *ctx = (__bridge WailsContext*) inctx;
@@ -48,7 +47,7 @@ void showInspector(void *inctx) {
NSLog(@"Opening the inspector needs at least MacOS 12");
}
);
#endif
}
void setupF12hotkey() {
@@ -1,11 +1,10 @@
//go:build linux && !qt
// +build linux,!qt
//go:build linux
// +build linux
package desktop
import (
"context"
"github.com/wailsapp/wails/v2/internal/binding"
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/frontend/desktop/linux"
@@ -1,18 +0,0 @@
//go:build qt
// +build qt
package desktop
import (
"context"
"github.com/wailsapp/wails/v2/internal/binding"
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/frontend/desktop/qt"
"github.com/wailsapp/wails/v2/internal/logger"
"github.com/wailsapp/wails/v2/pkg/options"
)
func NewFrontend(ctx context.Context, appoptions *options.App, logger *logger.Logger, appBindings *binding.Bindings, dispatcher frontend.Dispatcher) frontend.Frontend {
return qt.NewFrontend(ctx, appoptions, logger, appBindings, dispatcher)
}
@@ -4,9 +4,8 @@
package linux
import (
"unsafe"
"github.com/wailsapp/wails/v2/internal/frontend"
"unsafe"
)
/*
@@ -105,6 +105,7 @@ const startURL = "wails://wails/"
var secondInstanceBuffer = make(chan options.SecondInstanceData, 1)
type Frontend struct {
// Context
ctx context.Context

Some files were not shown because too many files have changed in this diff Show More