mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 485a983f26 | |||
| 67063d419c | |||
| 03cef1887f | |||
| 929593c5b8 | |||
| 57e718af68 | |||
| f96aab0d44 | |||
| 140e3b5947 | |||
| a8339c9e93 | |||
| 39a7ab5856 | |||
| ec3da8b7ef | |||
| b64b2a8da1 | |||
| 1979bca0f5 | |||
| 0f791c71f4 | |||
| fbe7d4de6b | |||
| c8d203d4d6 | |||
| f335cbd608 | |||
| b67d1e72a7 | |||
| 5e3c736bee | |||
| abc8f71a8d | |||
| cf8bb49093 | |||
| 3f62fa0d86 | |||
| 8b977bcab4 | |||
| 3a1aeaab94 | |||
| a7bf359930 | |||
| 9574bfc054 | |||
| 739ca98597 | |||
| 424e4fc2e8 | |||
| 7f1093dc51 | |||
| a998465034 | |||
| 755e869fe7 | |||
| 7ecbc846b4 | |||
| 767b7d6026 | |||
| 086953bbe9 | |||
| c51df752a1 | |||
| ea3b7ed9dd | |||
| ef6366af61 | |||
| 488666f407 | |||
| 34fd76617e | |||
| 1e8b938d15 | |||
| 3404250ac8 | |||
| eddc949295 | |||
| 49bd33e642 | |||
| 78f638a9bc | |||
| fef6e2a616 | |||
| 2a22933220 | |||
| eae4fe62cd | |||
| b3a9332a5b | |||
| e91b7832ee | |||
| db527c0fc2 | |||
| 0d25edc0c4 | |||
| eb36258c73 | |||
| bdb138d42c | |||
| abe6f520b4 | |||
| 130fab6c01 | |||
| b5f1eab59b | |||
| 5988cdca9a | |||
| 93d7c6b5f3 | |||
| 7d28ad1a3b | |||
| a7278b4224 | |||
| e2b7b68ec9 | |||
| 47af68a8cb | |||
| 77f053068c | |||
| e3edea1cb3 | |||
| a0b7eb4ab6 |
@@ -0,0 +1 @@
|
||||
["leaanthony","stffabi","misitebao","dependabot[bot]","github-actions[bot]","tmclane","bh90210","Lyimmi","ianmjones","konez2k","rh12503","dedo1911","raguay","OlegGulevskyy","napalu","marktohark","codydbentley","ATenderholt","acheong08","akhudek","LGiki","Snider","timkippdev","xijaja","ValentinTrinque","allcontributors[bot]","adalessa","fdidron","hi019","Vaelatern","sebastian0x62","gelleson","ilgityildirim","Chronophylos","antimatter96","gwynforthewyn","avengerweb","achhabra2","willdot","scottopell","JulioDRF","jaesung9507","pierrejoye","marcus-crane","lontten","BillBuilt","albert-sun","phoenix147","Wakeful-Cloud","aayush420","artooro","mondy","redraskal","Ironpark","Juneezee","fallendusk","qaisjp","noahgorstein","Licoy","eft","boreq","wandercn","zllovesuki","Watson-Sei","joshm998","Nexus26404","BuckeyeCoder","edwargix","bdwyertech","oSethoum","SupianIDz","Xhofe","derhasi","i7tsov","NullCode1337","mholt","tk103331","Holmqvist1990","gotid","tong3jie","ckilb","cybertramp","sgosiaco","marvinhosea","ParkourLiu","cuigege","liang-li-dev","joshbuddy","o8x","rnice01","hotafrika","arifali123","almas1992","binyamin","ParvinEyvazov","AlbinoDrought","SheetJSDev","imgbot[bot]","prurigro","KiddoV","shinshin86","Debdut","Gurkengewuerz","giopalma","Maicarons2022","RyoTagami","SamHennessy","h8gi","MyNameIsAres","skamensky","Orijhins","sidwebworks","tomanagle","abtin","andywenk","LukenSkyne","NanoNik","chenxiao1990","daodao97","Yz4230","edwardbrowncross","TechplexEngineer","rayshoo","Junkher","polikow","zandercodes","benjamin-thomas","jicg","gardc","bearsh","stefpap","fengweiqiang","MikeSchaap","GargantuaX","buddyabaddon","flin7","raitonoberu","AlienRecall","meatherly","marcio199226","TAINCER","stankovic98","LanguageAgnostic","Baiyuetribe","diogox","s12chung","aschey","sithembiso","Igogrek","amaury-tobias","SophieAu","alexmat","elie-g","kyoto44","Jarek-SRT","Rested","kraney","mewmew","bt","ocelotsloth","ghost","MagicFun1241","lambdajack","yesgs","kmuchmore"]
|
||||
@@ -0,0 +1,49 @@
|
||||
name: update-contributors-svg
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Can trigger manually
|
||||
schedule:
|
||||
- cron: '0 7 * * *' # Schedule on everyday 7:00
|
||||
|
||||
jobs:
|
||||
update-svg:
|
||||
name: Update contributors SVG
|
||||
runs-on: ubuntu-latest # You can also try macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2.2.2
|
||||
with:
|
||||
version: 7
|
||||
|
||||
- name: Run SVG generation script
|
||||
run: pnpx make-github-contributor-svg -t ${{ secrets.GITHUB_TOKEN }} -o wailsapp -r wails
|
||||
|
||||
- name: Move svg
|
||||
run: mv .github-contributors/*.svg website/static/img/
|
||||
|
||||
- name: Commit
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
message: "chore(workflow): update contributors image"
|
||||
add: "website/static/img/*"
|
||||
new_branch: "chore/update-contributors-svg"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "chore(workflow): update contributors image"
|
||||
title: "chore(workflow): update contributors image"
|
||||
body: "This PR was automatically generated by a GitHub workflow"
|
||||
branch: chore/update-contributors-svg
|
||||
base: master
|
||||
labels: "chore, workflow"
|
||||
@@ -1,9 +1,9 @@
|
||||
name: Label sponsors
|
||||
name: Label Sponsors
|
||||
on:
|
||||
pull_request:
|
||||
types: [ opened ]
|
||||
types: [opened]
|
||||
issues:
|
||||
types: [ opened ]
|
||||
types: [opened]
|
||||
jobs:
|
||||
build:
|
||||
name: is-sponsor-label
|
||||
@@ -11,5 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: JasonEtco/is-sponsor-label-action@v1
|
||||
with:
|
||||
label: Sponsor ❤️
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Sync Translated Documents
|
||||
name: Sync Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,22 +10,30 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set node
|
||||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Sync Translated Documents
|
||||
run: cd scripts && chmod 755 ./sync-translated-documents.sh && ./sync-translated-documents.sh
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
working-directory: ./website
|
||||
run: task crowdin:pull
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: "docs: sync documents"
|
||||
title: "docs: sync documents"
|
||||
commit-message: "docs: sync translations"
|
||||
title: "docs: sync translations"
|
||||
body: "- [x] Sync translated documents"
|
||||
branch: feature/documents
|
||||
branch: chore/sync-translations
|
||||
labels: translation
|
||||
delete-branch: true
|
||||
draft: true
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
name: Push Checks
|
||||
name: Upload Source Documents
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push_files_to_crowdin:
|
||||
@@ -13,25 +14,28 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v11.1
|
||||
id: verify-changed-files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
website/**/*.md
|
||||
website/**/*.json
|
||||
|
||||
- name: Set node
|
||||
if: steps.verify-changed-files.outputs.files_changed != 'true'
|
||||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
|
||||
- name: Push files
|
||||
- name: Setup Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload source documents
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
run: |
|
||||
cd website
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm run crowdin push -b master
|
||||
working-directory: ./website
|
||||
run: task crowdin:push
|
||||
@@ -35,3 +35,4 @@ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
|
||||
/v3/.task
|
||||
/v3/examples/build/bin/testapp
|
||||
/websitev3/site/
|
||||
/v3/examples/plugins/bin/testapp
|
||||
|
||||
@@ -97,6 +97,7 @@ This project is supported by these kind people / companies:
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## FAQ
|
||||
|
||||
- Is this an alternative to Electron?
|
||||
|
||||
+5
-5
@@ -1,24 +1,24 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
GREETING: Hello, World!
|
||||
|
||||
tasks:
|
||||
check-contributors:
|
||||
contributors:check:
|
||||
cmds:
|
||||
- npx -y all-contributors-cli check
|
||||
|
||||
update-contributors:
|
||||
contributors:update:
|
||||
cmds:
|
||||
- go run v3/tasks/contribs/main.go
|
||||
|
||||
build-contributors:
|
||||
contributors:build:
|
||||
cmds:
|
||||
- npx -y all-contributors-cli generate
|
||||
|
||||
release:
|
||||
dir: v2/tools/release
|
||||
cmds:
|
||||
- go run release.go
|
||||
- go run release.go
|
||||
|
||||
Generated
+3
-3
@@ -1775,9 +1775,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.13.0",
|
||||
"resolved": "https://registry.npmmirror.com/undici/-/undici-5.13.0.tgz",
|
||||
"integrity": "sha512-UDZKtwb2k7KRsK4SdXWG7ErXiL7yTGgLWvk2AXO1JMjgjh404nFo6tWSCM2xMpJwMPx3J8i/vfqEh1zOqvj82Q==",
|
||||
"version": "5.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz",
|
||||
"integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==",
|
||||
"dependencies": {
|
||||
"busboy": "^1.6.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd ../website
|
||||
|
||||
npx @crowdin/cli@latest pull -b master --export-only-approved
|
||||
@@ -2,14 +2,15 @@ package flags
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/samber/lo"
|
||||
"github.com/wailsapp/wails/v2/internal/project"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/build"
|
||||
"net"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"github.com/wailsapp/wails/v2/internal/project"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/build"
|
||||
)
|
||||
|
||||
type Dev struct {
|
||||
@@ -126,6 +127,7 @@ func (d *Dev) GenerateBuildOptions() *build.Options {
|
||||
Compiler: d.Compiler,
|
||||
ForceBuild: d.ForceBuild,
|
||||
IgnoreFrontend: d.SkipFrontend,
|
||||
SkipBindings: d.SkipBindings,
|
||||
Verbosity: d.Verbosity,
|
||||
WailsJSDir: d.WailsJSDir,
|
||||
RaceDetector: d.RaceDetector,
|
||||
|
||||
@@ -44,31 +44,6 @@ func sliceToMap(input []string) map[string]struct{} {
|
||||
return result
|
||||
}
|
||||
|
||||
type devFlags struct {
|
||||
ldflags string
|
||||
compilerCommand string
|
||||
assetDir string
|
||||
extensions string
|
||||
reloadDirs string
|
||||
openBrowser bool
|
||||
noReload bool
|
||||
skipBindings bool
|
||||
wailsjsdir string
|
||||
tags string
|
||||
verbosity int
|
||||
loglevel string
|
||||
forceBuild bool
|
||||
debounceMS int
|
||||
devServer string
|
||||
appargs string
|
||||
saveConfig bool
|
||||
raceDetector bool
|
||||
|
||||
frontendDevServerURL string
|
||||
skipFrontend bool
|
||||
noColour bool
|
||||
}
|
||||
|
||||
// Application runs the application in dev mode
|
||||
func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.4.0
|
||||
v2.4.1
|
||||
@@ -41,7 +41,7 @@ func printBulletPoint(text string, args ...any) {
|
||||
fatal(err.Error())
|
||||
}
|
||||
t = strings.Trim(t, "\n\r")
|
||||
pterm.Printf(t, args...)
|
||||
pterm.Printfln(t, args...)
|
||||
}
|
||||
|
||||
func printFooter() {
|
||||
|
||||
@@ -130,6 +130,5 @@ func (f *Frontend) MenuSetApplicationMenu(menu *menu.Menu) {
|
||||
}
|
||||
|
||||
func (f *Frontend) MenuUpdateApplicationMenu() {
|
||||
f.MenuSetApplicationMenu(f.frontendOptions.Menu)
|
||||
f.mainWindow.UpdateApplicationMenu()
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"runtime"
|
||||
@@ -88,6 +87,7 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/assetserver"
|
||||
"github.com/wailsapp/wails/v2/pkg/assetserver/webview"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/binding"
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
@@ -166,10 +166,7 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
|
||||
}
|
||||
result.assets = assets
|
||||
|
||||
// Start 10 processors to handle requests in parallel
|
||||
for i := 0; i < 10; i++ {
|
||||
go result.startRequestProcessor()
|
||||
}
|
||||
go result.startRequestProcessor()
|
||||
}
|
||||
|
||||
go result.startMessageProcessor()
|
||||
@@ -461,50 +458,16 @@ func processMessage(message *C.char) {
|
||||
messageBuffer <- goMessage
|
||||
}
|
||||
|
||||
var requestBuffer = make(chan unsafe.Pointer, 100)
|
||||
var requestBuffer = make(chan webview.Request, 100)
|
||||
|
||||
func (f *Frontend) startRequestProcessor() {
|
||||
for request := range requestBuffer {
|
||||
f.processRequest(request)
|
||||
C.g_object_unref(C.gpointer(request))
|
||||
f.assets.ServeWebViewRequest(request)
|
||||
request.Release()
|
||||
}
|
||||
}
|
||||
|
||||
//export processURLRequest
|
||||
func processURLRequest(request unsafe.Pointer) {
|
||||
// Increment reference counter to allow async processing, will be decremented after the processing
|
||||
// has been finished by a worker.
|
||||
C.g_object_ref(C.gpointer(request))
|
||||
requestBuffer <- request
|
||||
}
|
||||
|
||||
func (f *Frontend) processRequest(request unsafe.Pointer) {
|
||||
req := (*C.WebKitURISchemeRequest)(request)
|
||||
uri := C.webkit_uri_scheme_request_get_uri(req)
|
||||
goURI := C.GoString(uri)
|
||||
|
||||
rw := &webKitResponseWriter{req: req}
|
||||
defer rw.Close()
|
||||
|
||||
f.assets.ProcessHTTPRequestLegacy(
|
||||
rw,
|
||||
func() (*http.Request, error) {
|
||||
method := webkit_uri_scheme_request_get_http_method(req)
|
||||
r, err := http.NewRequest(method, goURI, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r.Header = webkit_uri_scheme_request_get_http_headers(req)
|
||||
|
||||
if r.URL.Host != f.startURL.Host {
|
||||
if r.Body != nil {
|
||||
r.Body.Close()
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("Expected host '%s' in request, but was '%s'", f.startURL.Host, r.URL.Host)
|
||||
}
|
||||
|
||||
return r, nil
|
||||
})
|
||||
|
||||
requestBuffer <- webview.NewRequest(request)
|
||||
}
|
||||
|
||||
@@ -12,10 +12,12 @@ import (
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/linux"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/assetserver/webview"
|
||||
)
|
||||
|
||||
func validateWebKit2Version(options *options.App) {
|
||||
if C.webkit_get_major_version() == 2 && C.webkit_get_minor_version() >= webkit2MinMinorVersion {
|
||||
if C.webkit_get_major_version() == 2 && C.webkit_get_minor_version() >= webview.Webkit2MinMinorVersion {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -24,6 +26,6 @@ func validateWebKit2Version(options *options.App) {
|
||||
msg = options.Linux.Messages
|
||||
}
|
||||
|
||||
v := fmt.Sprintf("2.%d.0", webkit2MinMinorVersion)
|
||||
v := fmt.Sprintf("2.%d.0", webview.Webkit2MinMinorVersion)
|
||||
showModalDialogAndExit("WebKit2GTK", fmt.Sprintf(msg.WebKit2GTKMinRequired, v))
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ window.wails = {
|
||||
defaultCursor: null,
|
||||
borderThickness: 6,
|
||||
shouldDrag: false,
|
||||
deferDragToMouseMove: false,
|
||||
deferDragToMouseMove: true,
|
||||
cssDragProperty: "--wails-draggable",
|
||||
cssDragValue: "drag",
|
||||
}
|
||||
@@ -130,7 +130,7 @@ window.addEventListener('mousedown', (e) => {
|
||||
}
|
||||
}
|
||||
if (window.wails.flags.deferDragToMouseMove) {
|
||||
window.wails.flags.shouldDrag = true;
|
||||
window.wails.flags.shouldDrag = true;
|
||||
} else {
|
||||
e.preventDefault()
|
||||
window.WailsInvoke("drag");
|
||||
@@ -152,10 +152,9 @@ function setResize(cursor) {
|
||||
|
||||
window.addEventListener('mousemove', function (e) {
|
||||
if (window.wails.flags.shouldDrag) {
|
||||
window.wails.flags.shouldDrag = false;
|
||||
let mousePressed = e.buttons !== undefined ? e.buttons : e.which;
|
||||
if(mousePressed <= 0) {
|
||||
window.wails.flags.shouldDrag = false;
|
||||
} else {
|
||||
if (mousePressed > 0) {
|
||||
window.WailsInvoke("drag");
|
||||
return;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user