mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
423 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0394bcaea7 | |||
| 793191a479 | |||
| efc86c1056 | |||
| 39d44d2644 | |||
| 9584a2ce5a | |||
| 95b8ceb87a | |||
| 37b99b9cb8 | |||
| 86354e9fc0 | |||
| b49f135e31 | |||
| fff266f50d | |||
| 7cfea7c22c | |||
| 6141e5a8ce | |||
| ed58949d24 | |||
| c1d85bd3d9 | |||
| 8d3324465e | |||
| 8c72746edb | |||
| ea3509d2e7 | |||
| bb3a0cc54f | |||
| d808654d99 | |||
| a6cfdbb403 | |||
| 2f7c6834d0 | |||
| ebdd57a7c4 | |||
| 4ff6d74054 | |||
| 0d8b4aafd5 | |||
| 0cca7e9189 | |||
| a5812578c5 | |||
| 350b411afe | |||
| 9ca86c6093 | |||
| 01729ae22a | |||
| 9196dc2216 | |||
| b925335bbb | |||
| 965f939967 | |||
| 00feccbb77 | |||
| b6fc66ba0d | |||
| c40debc0e9 | |||
| 3b31d70865 | |||
| afa8b62de7 | |||
| 70fd15de2d | |||
| c54d330f89 | |||
| 4028560d12 | |||
| 3c28c28623 | |||
| a958fa06e7 | |||
| 4d39e9e15a | |||
| 679ec49e64 | |||
| d98e1d3693 | |||
| be3b7d754e | |||
| ae524c4f84 | |||
| d390cac8db | |||
| 17e20ab029 | |||
| 34b9b9b508 | |||
| 47fd06a445 | |||
| b140ce546f | |||
| 08ec2beb7c | |||
| 5833f0f109 | |||
| eb2ad258ed | |||
| 708aef53e4 | |||
| e893c1c205 | |||
| 3e74255127 | |||
| b8d7eed607 | |||
| 8eb62fb483 | |||
| ee67bff9e3 | |||
| 21e47dcccf | |||
| 38ddcf59f8 | |||
| 4a62b6a5c7 | |||
| 6afbcb69f3 | |||
| 4bb522d303 | |||
| f107173a73 | |||
| eb5aff755f | |||
| 2384ae0819 | |||
| 4a5663c1cb | |||
| 9416e01042 | |||
| 54fcacfed1 | |||
| 69ac5caa4b | |||
| cecbc156d5 | |||
| 8ca550cc9e | |||
| d44c8eba1c | |||
| 6edd667bdf | |||
| 499ff50903 | |||
| 5e1f29eda3 | |||
| e5571defb7 | |||
| 125d8a6f78 | |||
| 21790dc3ee | |||
| cdf48e0589 | |||
| 2f9f63771b | |||
| 93335b3843 | |||
| f50c8f447e | |||
| bd9f7deb98 | |||
| 2171192934 | |||
| 3352ebef6e | |||
| 2a51ddadfc | |||
| 0745aea4d6 | |||
| 4804b34208 | |||
| 841289f1d1 | |||
| c367ef461e | |||
| ffed41553a | |||
| 79deb37675 | |||
| 77ca8fe9e6 | |||
| 25e58edf28 | |||
| 0f2d19c56e | |||
| 8bde3d7522 | |||
| c169d26d95 | |||
| 946a4c56a0 | |||
| 23e87e0ad7 | |||
| 7d678154c6 | |||
| 0b9fec3f87 | |||
| 763c7708f4 | |||
| 5f2c1f4534 | |||
| 3ac557ccb1 | |||
| e6c691a376 | |||
| ee8eb001c2 | |||
| db836b7a48 | |||
| 543b18dd54 | |||
| ec0731d5d8 | |||
| cc5c7d1d29 | |||
| e79c1b7ea3 | |||
| 6cbead5bfe | |||
| 429bb2bf17 | |||
| c03c41cb21 | |||
| ee29faecbf | |||
| d1d0105276 | |||
| 1059e36b52 | |||
| 15f602f867 | |||
| 13be4a333f | |||
| 2553fa1f74 | |||
| f0f5011484 | |||
| 5671f3527b | |||
| adb26fa99f | |||
| 805429a7c6 | |||
| 39af86e59d | |||
| ecf970d6fe | |||
| c9ce17a4d5 | |||
| a6e279f0d3 | |||
| 842bc3733e | |||
| 5e76a5e76a | |||
| 52c3c49f25 | |||
| 705239ad7d | |||
| dc865404a9 | |||
| ba7ab2e607 | |||
| d6cfe4414d | |||
| ecbb135949 | |||
| fcb98e6523 | |||
| e7e5597c95 | |||
| 7f0479d8b4 | |||
| f5c78f365d | |||
| 1fc5f9b12d | |||
| 3f55ce6dfc | |||
| 1d562d3c27 | |||
| f3974deb88 | |||
| 1945616328 | |||
| 7db6604227 | |||
| 12ce6c5ac3 | |||
| 5d9bc4ca81 | |||
| c0b4a3ff35 | |||
| f0bf8cd827 | |||
| 10144adf61 | |||
| 3efab5ba23 | |||
| 3d323ab9d2 | |||
| 16ce9e562f | |||
| 90e66a7ad4 | |||
| 6b59216b32 | |||
| 9764ba6334 | |||
| da5929ff34 | |||
| e419822c77 | |||
| b62ce4440e | |||
| 3c81fb06e8 | |||
| c27366a270 | |||
| 5b6f6c1bff | |||
| 3fcac435b2 | |||
| 03a3edcdc9 | |||
| 5737b3cc7b | |||
| b898b79aaf | |||
| 3827ca2d78 | |||
| 4de5e1b9f1 | |||
| eb18f02fd2 | |||
| 1a7d105917 | |||
| de5cff799e | |||
| 67cada78f6 | |||
| 5a40f25d03 | |||
| 1a09a8a4c8 | |||
| daa0cf83d9 | |||
| e92858f64d | |||
| d52c26e82f | |||
| 83900b03d4 | |||
| c123430f22 | |||
| 33e20cbc77 | |||
| e942312c4c | |||
| de2e78b507 | |||
| da4a7ac64b | |||
| e44fbc26ba | |||
| bef454f950 | |||
| 94e1ec91ad | |||
| 56d11ab419 | |||
| c96cccab2e | |||
| 989ef1b4a8 | |||
| 45cfbe917e | |||
| 2e313005e0 | |||
| 722c3a653c | |||
| 76672facfe | |||
| 8f075b5d8d | |||
| b317efaf2c | |||
| 29b9c5200f | |||
| 4d2b4b4ee7 | |||
| 9f8f095a78 | |||
| 59c09ebee1 | |||
| 5f81a87912 | |||
| 7f6151d573 | |||
| 9816960995 | |||
| 3355d5f0af | |||
| ab38b20444 | |||
| f278229179 | |||
| 552390fb84 | |||
| 68573cdc48 | |||
| cdf397aaa9 | |||
| ed27558011 | |||
| 50387948df | |||
| 9b48cc1799 | |||
| 86f2ac0e96 | |||
| 1537a002cc | |||
| ae9b158b04 | |||
| 72ec10b181 | |||
| eed4002a4a | |||
| 155e34c7a8 | |||
| 22cc649e81 | |||
| 367ca745c3 | |||
| 01e2e46e0d | |||
| c03078ca16 | |||
| 49e62aebe3 | |||
| dc4daaebac | |||
| f855b30c9f | |||
| b614e2b100 | |||
| eafbbab233 | |||
| 72a4e9cf6e | |||
| 1dbe100a43 | |||
| 287d3d066c | |||
| 9387d18e88 | |||
| 1600bcb1d0 | |||
| 2b2defb7c0 | |||
| 6d786902eb | |||
| 286ce206f0 | |||
| 7535f098bd | |||
| b517461fbe | |||
| ffbe67e21f | |||
| 833671d30c | |||
| ae691b8e52 | |||
| 2b56b7b6b9 | |||
| 81a5380f67 | |||
| 7c45e3ac13 | |||
| d1932c36ce | |||
| adb7ddf8d2 | |||
| 3b0a57ca6d | |||
| 4ee75e93c9 | |||
| ff218e5323 | |||
| df0969d1c6 | |||
| 23d7ac0e58 | |||
| f9a87944cf | |||
| eff456aa1a | |||
| 1ce07cd67c | |||
| fc7952ff3b | |||
| bb28bdf565 | |||
| 04d5842124 | |||
| 1a12890556 | |||
| d021d885ca | |||
| 3433b8ce8f | |||
| 6092730acc | |||
| ba4ffe4ecc | |||
| 55b3e2d35a | |||
| 6b926ec463 | |||
| 9b686b5417 | |||
| 82ec56bc7d | |||
| 798e51d4d3 | |||
| 35c41552de | |||
| 19be7f61ac | |||
| bbf0e8cdad | |||
| 7e2d2a29a1 | |||
| 671dc2aa3a | |||
| 294a2c701e | |||
| 01f03c552d | |||
| dc46154d94 | |||
| 87737c23eb | |||
| 6e6f099a99 | |||
| 4cb3321c39 | |||
| 6a2343a1a0 | |||
| f2d6dba2cf | |||
| dd1ef7fae9 | |||
| 527cff9ec3 | |||
| ba150eccae | |||
| fa74986f1e | |||
| d1085b5bea | |||
| 4d0a14d2eb | |||
| 8c3439b733 | |||
| a0534d527a | |||
| a5b52f2795 | |||
| b526ebd679 | |||
| 51b9315ae9 | |||
| 8edf44dc31 | |||
| 9b7626e59e | |||
| 6dd092c7a9 | |||
| 46a0d467c0 | |||
| e3b164ae93 | |||
| d8f58ab20f | |||
| 0de2bccd28 | |||
| 2eaf724710 | |||
| 58138ac09b | |||
| 143f090422 | |||
| f8f466ba7e | |||
| cb28de47f8 | |||
| 4ad2475ed6 | |||
| 0172078536 | |||
| 0bb1fb512a | |||
| b6940d95a2 | |||
| 75f0457375 | |||
| ffe31b6265 | |||
| 8963610722 | |||
| 66bfcf0e36 | |||
| 0b3559abfe | |||
| 773389ee5e | |||
| 4c04991d4d | |||
| d56bb59b72 | |||
| 6e92a4f71e | |||
| 1f6217c0d8 | |||
| 17204bebd0 | |||
| 728e2019d8 | |||
| 7f3fdd6977 | |||
| e8798f8371 | |||
| 402b743553 | |||
| f08ae2fc62 | |||
| 178ea9c8c5 | |||
| 7c63cee9e8 | |||
| 4a60dfc373 | |||
| 829a829cb4 | |||
| 34896ccb4e | |||
| 5df5eb6a04 | |||
| 31ba36baf3 | |||
| bf10f71760 | |||
| 8aa61fff6d | |||
| f645b530da | |||
| 27573d191e | |||
| d6b4fdf979 | |||
| 39c834b83f | |||
| f210357bfe | |||
| 3094c19cf3 | |||
| 225437f1e8 | |||
| a23bb1e350 | |||
| 2fbb21a84e | |||
| 5c08fcb43e | |||
| cc59655cb1 | |||
| 8ff0a2b0ff | |||
| fe549af784 | |||
| a4549c94c1 | |||
| 706256d3f0 | |||
| 3049773e7f | |||
| 9da5df354e | |||
| 54ba6d47f4 | |||
| 17647e2c2f | |||
| 9da5cea88d | |||
| 3784746ddb | |||
| 281f6335c1 | |||
| 5129c0f4e2 | |||
| 5078e89a71 | |||
| 41aef27631 | |||
| 754d0934bf | |||
| be2d616190 | |||
| ba34e47c4b | |||
| a485b188b3 | |||
| 718e89ad1e | |||
| 9453a60254 | |||
| f87ec9d401 | |||
| cb1859a710 | |||
| 1ed95164db | |||
| ac5d0e54f0 | |||
| b1e79411e7 | |||
| a9d834d715 | |||
| 68cfd130d3 | |||
| 93a4b823c8 | |||
| 769662d77a | |||
| 7fd627f169 | |||
| b91468b6f2 | |||
| 0b9cd4be5d | |||
| 4c587ee1b8 | |||
| 19e1e8b8a6 | |||
| 67e9522c67 | |||
| a829b38a34 | |||
| c8dae94b5b | |||
| 87267758ac | |||
| 5f72df81fb | |||
| 1ed270fe05 | |||
| 19a654a2b1 | |||
| f9bbc11711 | |||
| 42b1807c36 | |||
| 647982de1a | |||
| f5557c612a | |||
| f4749db8b3 | |||
| 86a1de6788 | |||
| 792c5e2d95 | |||
| 6758580be9 | |||
| 6f246eed4a | |||
| fc3725d3f4 | |||
| 00c6f0dfdb | |||
| cf7b4e2458 | |||
| f682e44367 | |||
| 9d1f86c410 | |||
| dac281ac32 | |||
| 29a58086a3 | |||
| cb8eb755a7 | |||
| 1e8fc29ee4 | |||
| 9a05b49e3d | |||
| 79f8d92084 | |||
| 6e56542586 | |||
| c53443b62b | |||
| 1128662c89 | |||
| 676787417f | |||
| 57422dccf3 | |||
| 7f3f51e36b | |||
| ef184ec8bf | |||
| 9bfe3094dd | |||
| 3547b4d010 | |||
| 1222e3aa1b | |||
| cff3ee5079 | |||
| c91aa462aa | |||
| 62b3775e2f | |||
| 54bf8c1142 | |||
| c4f613e4c5 | |||
| a66d9ab0b1 |
@@ -0,0 +1,120 @@
|
||||
name: Build + Test v3 alpha
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [v3-alpha]
|
||||
paths-ignore:
|
||||
- 'mkdocs-website/**/*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest]
|
||||
go-version: [1.21]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
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@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v3
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v3
|
||||
run: go test -v ./...
|
||||
|
||||
test_js:
|
||||
name: Run JS Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test_go
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
template:
|
||||
[
|
||||
svelte,
|
||||
svelte-ts,
|
||||
vue,
|
||||
vue-ts,
|
||||
react,
|
||||
react-ts,
|
||||
preact,
|
||||
preact-ts,
|
||||
lit,
|
||||
lit-ts,
|
||||
vanilla,
|
||||
vanilla-ts,
|
||||
]
|
||||
go-version: [1.21]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Build Wails3 CLI
|
||||
run: |
|
||||
cd ./v3/cmd/wails3
|
||||
go install
|
||||
wails3 -help
|
||||
|
||||
- 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: Generate template '${{ matrix.template }}'
|
||||
run: |
|
||||
go install github.com/go-task/task/v3/cmd/task@latest
|
||||
mkdir -p ./test-${{ matrix.template }}
|
||||
cd ./test-${{ matrix.template }}
|
||||
wails3 init -n ${{ matrix.template }} -t ${{ matrix.template }}
|
||||
cd ${{ matrix.template }}
|
||||
wails3 build
|
||||
@@ -26,29 +26,6 @@ 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
|
||||
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/semgrep.yml
|
||||
schedule:
|
||||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
||||
- cron: 14 16 * * *
|
||||
name: Semgrep
|
||||
jobs:
|
||||
semgrep:
|
||||
name: semgrep/ci
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
container:
|
||||
image: returntocorp/semgrep
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: semgrep ci
|
||||
@@ -0,0 +1,35 @@
|
||||
name: v3 docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3-alpha
|
||||
paths:
|
||||
- 'mkdocs-website/**/*'
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.fork == false
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./mkdocs-website
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
- run: sudo apt-get install pngquant
|
||||
- run: pip install pillow cairosvg
|
||||
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
- run: mkdocs build --config-file mkdocs.insiders.yml
|
||||
- run: mkdocs gh-deploy --force
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Créer des applications de bureau avec Go et les technologies Web.
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Sommaire
|
||||
|
||||
- [Sommaire](#sommaire)
|
||||
- [Introduction](#introduction)
|
||||
- [Fonctionnalités](#fonctionnalités)
|
||||
- [Feuille de route](#feuille-de-route)
|
||||
- [Démarrage](#démarrage)
|
||||
- [Les sponsors](#les-sponsors)
|
||||
- [Foire aux questions](#foire-aux-questions)
|
||||
- [Les étoiles au fil du temps](#les-étoiles-au-fil-du-temps)
|
||||
- [Les contributeurs](#les-contributeurs)
|
||||
- [License](#license)
|
||||
- [Inspiration](#inspiration)
|
||||
|
||||
## Introduction
|
||||
|
||||
La méthode traditionnelle pour fournir des interfaces web aux programmes Go consiste à utiliser un serveur web intégré. Wails propose une approche différente : il offre la possibilité d'intégrer à la fois le code Go et une interface web dans un seul binaire. Des outils sont fournis pour vous faciliter la tâche en gérant la création, la compilation et le regroupement des projets. Il ne vous reste plus qu'à faire preuve de créativité!
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- Utiliser Go pour le backend
|
||||
- Utilisez n'importe quelle technologie frontend avec laquelle vous êtes déjà familier pour construire votre interface utilisateur.
|
||||
- Créez rapidement des interfaces riches pour vos programmes Go à l'aide de modèles prédéfinis.
|
||||
- Appeler facilement des méthodes Go à partir de Javascript
|
||||
- Définitions Typescript auto-générées pour vos structures et méthodes Go
|
||||
- Dialogues et menus natifs
|
||||
- Prise en charge native des modes sombre et clair
|
||||
- Prise en charge des effets modernes de translucidité et de "frosted window".
|
||||
- Système d'événements unifié entre Go et Javascript
|
||||
- Outil puissant pour générer et construire rapidement vos projets
|
||||
- Multiplateforme
|
||||
- Utilise des moteurs de rendu natifs - _pas de navigateur intégré_ !
|
||||
|
||||
### Feuille de route
|
||||
|
||||
La feuille de route du projet peut être consultée [ici](https://github.com/wailsapp/wails/discussions/1484). Veuillez consulter avant d'ouvrir une demande d'amélioration.
|
||||
|
||||
## Démarrage
|
||||
|
||||
Les instructions d'installation se trouvent sur le site [site officiel](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Les sponsors
|
||||
|
||||
Ce projet est soutenu par ces personnes aimables et entreprises:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## Foire aux questions
|
||||
|
||||
- S'agit-il d'une alternative à Electron ?
|
||||
|
||||
Cela dépend de vos besoins. Il est conçu pour permettre aux programmeurs Go de créer facilement des applications de bureau légères ou d'ajouter une interface à leurs applications existantes. Wails offre des éléments natifs tels que des menus et des boîtes de dialogue, il peut donc être considéré comme une alternative légère à electron.
|
||||
|
||||
- À qui s'adresse ce projet ?
|
||||
|
||||
Les programmeurs Go qui souhaitent intégrer une interface HTML/JS/CSS à leurs applications, sans avoir à créer un serveur et à ouvrir un navigateur pour l'afficher.
|
||||
|
||||
- Pourquoi ce nom ??
|
||||
|
||||
Lorsque j'ai vu WebView, je me suis dit : "Ce que je veux vraiment, c'est un outil pour construire une application WebView, un peu comme Rails l'est pour Ruby". Au départ, il s'agissait donc d'un jeu de mots (Webview on Rails). Il se trouve que c'est aussi un homophone du nom anglais du [Pays](https://en.wikipedia.org/wiki/Wales) d'où je viens. Il s'est donc imposé.
|
||||
|
||||
## Les étoiles au fil du temps
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Les contributeurs
|
||||
|
||||
La liste des contributeurs devient trop importante pour le readme ! Toutes les personnes extraordinaires qui ont contribué à ce projet ont leur propre page [ici](https://wails.io/credits#contributors).
|
||||
|
||||
## License
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Inspiration
|
||||
|
||||
Ce projet a été principalement codé sur les albums suivants :
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
+52
-23
@@ -44,7 +44,7 @@
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -54,16 +54,17 @@
|
||||
|
||||
- [目次](#目次)
|
||||
- [はじめに](#はじめに)
|
||||
- [特徴](#特徴)
|
||||
- [公式サイト](#公式サイト)
|
||||
- [ロードマップ](#ロードマップ)
|
||||
- [始め方](#始め方)
|
||||
- [特徴](#特徴)
|
||||
- [スポンサー](#スポンサー)
|
||||
- [始め方](#始め方)
|
||||
- [FAQ](#faq)
|
||||
- [スター数の推移](#スター数の推移)
|
||||
- [コントリビューター](#コントリビューター)
|
||||
- [特記事項](#特記事項)
|
||||
- [スペシャルサンクス](#スペシャルサンクス)
|
||||
- [ライセンス](#ライセンス)
|
||||
- [インスピレーション](#インスピレーション)
|
||||
|
||||
|
||||
## はじめに
|
||||
|
||||
@@ -71,35 +72,44 @@ Go プログラムにウェブインタフェースを提供する従来の方
|
||||
Wails では Go のコードとウェブフロントエンドを単一のバイナリにまとめる機能を提供します。
|
||||
また、プロジェクトの作成、コンパイル、ビルドを行うためのツールが提供されています。あなたがすべきことは創造性を発揮することです!
|
||||
|
||||
## 特徴
|
||||
### 公式サイト
|
||||
|
||||
- バックエンドには Go を利用しています
|
||||
- 使い慣れたフロントエンド技術を利用して UI を構築できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを素早く作成できます
|
||||
- JavaScript から Go のメソッドを簡単に呼び出すことができます
|
||||
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されます
|
||||
- ネイティブのダイアログとメニューが利用できます
|
||||
- ネイティブなダーク/ライトモードをサポートします
|
||||
- モダンな半透明や「frosted window」エフェクトをサポートしています
|
||||
- Go と JavaScript 間で統一されたイベント・システムを備えています
|
||||
- プロジェクトを素早く生成して構築する強力な cli ツールを用意しています
|
||||
- マルチプラットフォームに対応しています
|
||||
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んでいるわけではありません!_
|
||||
Version 2:
|
||||
|
||||
Wails v2 が 3 つのプラットフォームでベータ版としてリリースされました。興味のある方は[新しいウェブサイト](https://wails.io)をご覧ください。
|
||||
|
||||
レガシー版 v1:
|
||||
|
||||
レガシー版 v1 のドキュメントは[https://wails.app](https://wails.app)で見ることができます。
|
||||
|
||||
### ロードマップ
|
||||
|
||||
プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
|
||||
機能拡張のリクエストを出す前にご覧ください。
|
||||
|
||||
## 始め方
|
||||
## 特徴
|
||||
|
||||
インストール方法は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されています。
|
||||
- バックエンドには Go を利用しています
|
||||
- 使い慣れたフロントエンド技術を利用して UI を構築できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを作成できます
|
||||
- JavaScript から Go のメソッドを簡単に呼び出すことができます
|
||||
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されます
|
||||
- ネイティブのダイアログとメニューが利用できます
|
||||
- モダンな半透明や「frosted window」エフェクトをサポートしています
|
||||
- Go と JavaScript 間で統一されたイベント・システムを備えています
|
||||
- プロジェクトを素早く生成して構築する強力な cli ツールを用意しています
|
||||
- マルチプラットフォームに対応しています
|
||||
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んでいるわけではありません!_
|
||||
|
||||
## スポンサー
|
||||
|
||||
このプロジェクトは、以下の方々・企業によって支えられています。
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
## 始め方
|
||||
|
||||
インストール方法は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されています。
|
||||
|
||||
## FAQ
|
||||
|
||||
- Electron の代替品になりますか?
|
||||
@@ -127,11 +137,13 @@ Wails では Go のコードとウェブフロントエンドを単一のバイ
|
||||
貢献してくれた方のリストが大きくなりすぎて、readme に入りきらなくなりました!
|
||||
このプロジェクトに貢献してくれた素晴らしい方々のページは[こちら](https://wails.io/credits#contributors)です。
|
||||
|
||||
## ライセンス
|
||||
## 特記事項
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
このプロジェクトは以下の方々の協力がなければ、実現しなかったと思います。
|
||||
|
||||
## インスピレーション
|
||||
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - 彼のサポートとフィードバックはとても大きいものでした。
|
||||
- [Serge Zaitsev](https://github.com/zserge) - Wails のウィンドウで使用している[Webview](https://github.com/zserge/webview)の作者です。
|
||||
- [Byron](https://github.com/bh90210) - 時には Byron が一人でこのプロジェクトを存続させてくれたこともありました。彼の素晴らしいインプットがなければ v1 に到達することはなかったでしょう。
|
||||
|
||||
プロジェクトを進める際に、以下のアルバムたちも支えてくれています。
|
||||
|
||||
@@ -149,3 +161,20 @@ Wails では Go のコードとウェブフロントエンドを単一のバイ
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
|
||||
## スペシャルサンクス
|
||||
|
||||
<p align="center" style="text-align: center">
|
||||
<a href="https://pace.dev"><img src="/assets/images/pace.jpeg"/></a><br/>
|
||||
このプロジェクトを後援し、WailsをApple Siliconに移植する取り組みを支援してくれた <a href="https://pace.dev">Pace</a> に <i>とても</i>感謝しています!<br/><br/>
|
||||
パワフルで素早く簡単に使えるプロジェクト管理ツールをお探しなら、ぜひチェックしてみてください!<br/><br/>
|
||||
</p>
|
||||
|
||||
<p align="center" style="text-align: center">
|
||||
ライセンスを提供していただいたJetBrains社に感謝します!<br/><br/>
|
||||
ロゴをクリックして、感謝の気持ちを伝えてください!<br/><br/>
|
||||
<a href="https://www.jetbrains.com?from=Wails"><img src="/assets/images/jetbrains-grayscale.png" width="30%"></a>
|
||||
</p>
|
||||
|
||||
## ライセンス
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) · [Francais](README.fr.md)
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -52,7 +52,7 @@
|
||||
- [Содержание](#содержание)
|
||||
- [Вступление](#вступление)
|
||||
- [Особенности](#особенности)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Быстрый старт](#быстрый-старт)
|
||||
- [Спонсоры](#спонсоры)
|
||||
- [FAQ](#faq)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md)
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
@@ -16,6 +16,11 @@ includes:
|
||||
dir: v3
|
||||
optional: true
|
||||
|
||||
docs:
|
||||
taskfile: mkdocs-website
|
||||
dir: mkdocs-website
|
||||
optional: true
|
||||
|
||||
tasks:
|
||||
contributors:check:
|
||||
cmds:
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# v3 Docs
|
||||
|
||||
This is the documentation for Wails v3. It is currently a work in progress.
|
||||
|
||||
If you do not wish to build it locally, it is available online at [https://wailsapp.github.io/wails/](https://wailsapp.github.io/wails/).
|
||||
|
||||
## Recommended Setup Steps
|
||||
|
||||
Install the wails3 CLI if you haven't already:
|
||||
|
||||
```shell
|
||||
go install github.com/wailsapp/wails/v3/cmd/wails3@latest
|
||||
```
|
||||
|
||||
The documentation uses mkdocs, so you will need to install [Python](https://www.python.org/). Once installed,
|
||||
you can setup the documentation by running the following command:
|
||||
|
||||
```bash
|
||||
wails3 task docs:setup
|
||||
```
|
||||
|
||||
This will install the required dependencies for you.
|
||||
|
||||
If you have installed the wails3 CLI, you can run the following command to build the documentation and serve it locally:
|
||||
|
||||
```bash
|
||||
wails3 task docs:serve
|
||||
```
|
||||
|
||||
### Manual Setup
|
||||
|
||||
To install manually, you will need to do the following:
|
||||
|
||||
- Install [Python](https://www.python.org/)
|
||||
- Run `pip install -r requirements.txt` to install the required dependencies
|
||||
- Run `mkdocs serve` to serve the documentation locally
|
||||
- Run `mkdocs build` to build the documentation
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
If you would like to contribute to the documentation, please feel free to open a PR!
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
setup:
|
||||
summary: Setup the project
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.txt --user
|
||||
|
||||
setup:insiders:
|
||||
summary: Setup the project (insiders)
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.insiders.txt --user
|
||||
|
||||
upgrade:insiders:
|
||||
summary: Upgrade the project (insiders)
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.insiders.txt --upgrade --user
|
||||
|
||||
build:
|
||||
summary: Builds the documentation
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs build
|
||||
|
||||
serve:
|
||||
summary: Builds the documentation and serves it locally
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs serve
|
||||
|
||||
serve:insiders:
|
||||
summary: Builds the documentation and serves it locally
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs serve --config-file mkdocs.insiders.yml
|
||||
@@ -0,0 +1,36 @@
|
||||
# Changelog
|
||||
|
||||
<!--
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
||||
-->
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
### Added
|
||||
* [darwin] add getPrimaryScreen/getScreens to impl by @tmclane in https://github.com/wailsapp/wails/pull/2618
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed background colours of examples on Windows by [mmgvh](https://github.com/mmghv) in [#2750](https://github.com/wailsapp/wails/pull/2750).
|
||||
- Fixed default context menus by [mmgvh](https://github.com/mmghv) in [#2753](https://github.com/wailsapp/wails/pull/2753).
|
||||
|
||||
### Changed
|
||||
|
||||
### Removed
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Security
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
# Changes for v3
|
||||
|
||||
!!! note
|
||||
This is currently an unsorted brain dump of changes. It will be organised into a more readable format soon.
|
||||
|
||||
## Options
|
||||
|
||||
The application options have been revised since v2.
|
||||
|
||||
## Events
|
||||
|
||||
In v3, there are 3 types of events:
|
||||
|
||||
- Application Events
|
||||
- Window Events
|
||||
- Custom Events
|
||||
|
||||
### Application Events
|
||||
|
||||
Application events are events that are emitted by the application. These events include native events such as `ApplicationDidFinishLaunching` on macOS.
|
||||
|
||||
### Window Events
|
||||
|
||||
Window events are events that are emitted by a window. These events include native events such as `WindowDidBecomeMain` on macOS. Common events are also defined, so they work cross-platform, e.g. `WindowClosing`.
|
||||
|
||||
### Custom Events
|
||||
|
||||
Events that the user defines are called `WailsEvents`. This is to differentiate them from the `Event` object that is used to communicate with the browser. WailsEvents are now objects that encapsulate all the details of an event. This includes the event name, the data, and the source of the event.
|
||||
|
||||
The data associated with a WailsEvent is now a single value. If multiple values are required, then a struct can be used.
|
||||
|
||||
### Event callbacks and `Emit` function signature
|
||||
|
||||
The signatures events callbacks (as used by `On`, `Once` & `OnMultiple`) have changed. In v2, the callback function received optional data. In v3, the callback function receives a `WailsEvent` object that contains all data related to the event.
|
||||
|
||||
Similarly, the `Emit` function has changed. Instead of taking a name and optional data, it now takes a single `WailsEvent` object that it will emit.
|
||||
|
||||
### `Off` and `OffAll`
|
||||
|
||||
In v2, `Off` and `OffAll` calls would remove events in both JS and Go. Due to the multi-window nature of v3, this has been changed so that these methods only apply to the context they are called in. For example, if you call `Off` in a window, it will only remove events for that window. If you use `Off` in Go, it will only remove events for Go.
|
||||
|
||||
### Hooks
|
||||
|
||||
Event Hooks are a new feature in v3. They allow you to hook into the event system and perform actions when certain events are emitted. For example, you can hook into the `WindowClosing` event and perform some cleanup before the window closes.
|
||||
Hooks can be registered at the application level or at the window level using `RegisterHook`. Application level are for application events. Window level hooks will only be called for the window they are registered with.
|
||||
|
||||
### Logging
|
||||
|
||||
Logging in v2 was confusing as both application logs and system (internal) logs were using the same logger. We have simplified this as follows:
|
||||
|
||||
- Internal logs are now handled using the standard Go `slog` logger. This is configured using the `logger` option in the application options. By default, this uses the [tint](https://github.com/lmittmann/tint) logger.
|
||||
- Application logs can now be achieved through the new `log` plugin which utilises `slog` under the hood. This plugin provides a simple API for logging to the console. It is available in both Go and JS.
|
||||
|
||||
|
||||
### Developer notes
|
||||
|
||||
When emitting an event in Go, it will dispatch the event to local Go listeners and also each window in the application.
|
||||
When emitting an event in JS, it now sends the event to the application. This will be processed as if it was emitted in Go, however the sender ID will be that of the window.
|
||||
|
||||
## Window
|
||||
|
||||
The Window API has largely remained the same, however the methods are now on an instance of a window rather than the runtime.
|
||||
Some notable differences are:
|
||||
- Windows now have a Name that identifies them. This is used to identify the window when emitting events.
|
||||
- Windows have even more methods on the that were previously unavailable, such as `AbsolutePosition` and `ToggleDevTools`.
|
||||
- Windows can now accept files via native drag and drop. See the Drag and Drop section for more details.
|
||||
|
||||
## ClipBoard
|
||||
|
||||
The clipboard API has been simplified. There is now a single `Clipboard` object that can be used to read and write to the clipboard. The `Clipboard` object is available in both Go and JS. `SetText()` to set the text and `Text()` to get the text.
|
||||
|
||||
## Bindings
|
||||
|
||||
Bindings work in a similar way to v2, by providing a means to bind struct methods to the frontend.
|
||||
These can be called in the frontend using the binding wrappers generated by the `wails3 generate bindings` command:
|
||||
|
||||
```javascript
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import {main} from './models';
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet greets a person
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.GreetPerson
|
||||
* GreetPerson greets a person
|
||||
* @param person {main.Person}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
GreetPerson: function(person) { wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
```
|
||||
|
||||
Bound methods are obfuscated by default, and are identified using uint32 IDs, calculated using the [FNV hashing algorithm](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function). This is to prevent the method name from being exposed in production builds.
|
||||
In debug mode, the method IDs are logged along with the calculated ID of the method to aid in debugging. If you wish to add an extra layer of obfuscation, you can use the `BindAliases` option. This allows you to specify a map of alias IDs to method IDs. When the frontend calls a method using an ID, the method ID will be looked up in the alias map first for a match. If it does not find it, it assumes it's a standard method ID and tries to find the method in the usual way.
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
app := application.New(application.Options{
|
||||
Bind: []any{
|
||||
&GreetService{},
|
||||
},
|
||||
BindAliases: map[uint32]uint32{
|
||||
1: 1411160069,
|
||||
2: 4021313248,
|
||||
},
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
Mac: application.MacOptions{
|
||||
ApplicationShouldTerminateAfterLastWindowClosed: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
We can now call using this alias in the frontend: `wails.Call(1, "world!")`.
|
||||
|
||||
### Insecure calls
|
||||
|
||||
If you don't mind your calls being available in plain text in your binary and have no intention of using [garble](https://github.com/burrowers/garble),
|
||||
then you can use the insecure `wails.CallByName()` method. This method takes the fully qualified name of the method to call and the arguments to pass to it.
|
||||
Example:
|
||||
|
||||
```go
|
||||
wails.CallByName("main.GreetService.Greet", "world!")
|
||||
```
|
||||
|
||||
!!! danger
|
||||
|
||||
This is only provided as a convenience method for development. It is not recommended to use this in production.
|
||||
|
||||
|
||||
## Dialogs
|
||||
|
||||
Dialogs are now available in JavaScript!
|
||||
|
||||
### Windows
|
||||
|
||||
Dialog buttons in Windows are not configurable and are constant depending on the type of dialog. To trigger a callback when a button is pressed, create a button with the same name as the button you wish to have the callback attached to.
|
||||
Example: Create a button with the label `Ok` and use `OnClick()` to set the callback method:
|
||||
```go
|
||||
dialog := app.QuestionDialog().
|
||||
SetTitle("Update").
|
||||
SetMessage("The cancel button is selected when pressing escape")
|
||||
ok := dialog.AddButton("Ok")
|
||||
ok.OnClick(func() {
|
||||
// Do something
|
||||
})
|
||||
no := dialog.AddButton("Cancel")
|
||||
dialog.SetDefaultButton(ok)
|
||||
dialog.SetCancelButton(no)
|
||||
dialog.Show()
|
||||
```
|
||||
|
||||
## Drag and Drop
|
||||
|
||||
Native drag and drop can be enabled per-window. Simply set the `EnableDragAndDrop` window config option to `true` and the window will allow files to be dragged onto it. When this happens, the `events.FilesDropped` event will be emitted. The filenames can then be retrieved from the `WindowEvent.Context()` using the `DroppedFiles()` method. This returns a slice of strings containing the filenames.
|
||||
|
||||
## Context Menus
|
||||
|
||||
Context menus are contextual menus that are shown when the user right-clicks on an element. Creating a context menu is the same as creating a standard menu , by using `app.NewMenu()`. To make the context menu available to a window, call `window.RegisterContextMenu(name, menu)`. The name will be the id of the context menu and used by the frontend.
|
||||
|
||||
To indicate that an element has a context menu, add the `data-contextmenu` attribute to the element. The value of this attribute should be the name of a context menu previously registered with the window.
|
||||
|
||||
It is possible to register a context menu at the application level, making it available to all windows. This can be done using `app.RegisterContextMenu(name, menu)`. If a context menu cannot be found at the window level, the application context menus will be checked. A demo of this can be found in `v3/examples/contextmenus`.
|
||||
|
||||
## Wails Markup Language (WML)
|
||||
|
||||
The Wails Markup Language is a simple markup language that allows you to add functionality to standard HTML elements without the use of Javascript.
|
||||
|
||||
The following tags are currently supported:
|
||||
|
||||
### `data-wml-event`
|
||||
|
||||
This specifies that a Wails event will be emitted when the element is clicked. The value of the attribute should be the name of the event to emit.
|
||||
|
||||
Example:
|
||||
```html
|
||||
<button data-wml-event="myevent">Click Me</button>
|
||||
```
|
||||
Sometimes you need the user to confirm an action. This can be done by adding the `data-wml-confirm` attribute to the element. The value of this attribute will be the message to display to the user.
|
||||
|
||||
Example:
|
||||
```html
|
||||
<button data-wml-event="delete-all-items" data-wml-confirm="Are you sure?">Delete All Items</button>
|
||||
```
|
||||
|
||||
### `data-wml-window`
|
||||
|
||||
Any `wails.window` method can be called by adding the `data-wml-window` attribute to an element. The value of the attribute should be the name of the method to call. The method name should be in the same case as the method.
|
||||
|
||||
```html
|
||||
<button data-wml-window="Close">Close Window</button>
|
||||
```
|
||||
|
||||
### `data-wml-trigger`
|
||||
|
||||
This attribute specifies which javascript event should trigger the action. The default is `click`.
|
||||
|
||||
```html
|
||||
<button data-wml-event="hover-box" data-wml-trigger="mouseover">Hover over me!</button>
|
||||
```
|
||||
|
||||
|
||||
## Systray
|
||||
|
||||
Wails 3 comes with a built-in systray. This is a fully featured systray that has been designed to be as simple as possible to use.
|
||||
It is possible to set the icon, tooltip and menu of the systray. It is possible to also "attach" a window to the systray. Doing this will provide the following functionality:
|
||||
|
||||
- Clicking the systray icon with toggle the window visibility
|
||||
- Right-clicking the systray will open the menu, if there is one
|
||||
|
||||
On macOS, if there is no attached window, the systray will use the default method of displaying the menu (any button).
|
||||
If there is an attached window but no menu, the systray will toggle the window regardless of the button pressed.
|
||||
|
||||
## Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Wails application.
|
||||
|
||||
### Creating a plugin
|
||||
|
||||
Plugins are standard Go structure that adhere to the following interface:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
The `Name()` method returns the name of the plugin. This is used for logging purposes.
|
||||
|
||||
The `Init(*application.App) error` method is called when the plugin is loaded. The `*application.App`
|
||||
parameter is the application that the plugin is being loaded into. Any errors will prevent
|
||||
the application from starting.
|
||||
|
||||
The `Shutdown()` method is called when the application is shutting down.
|
||||
|
||||
The `CallableByJS()` method returns a list of exported functions that can be called from
|
||||
the frontend. These method names must exactly match the names of the methods exported
|
||||
by the plugin.
|
||||
|
||||
The `InjectJS()` method returns JavaScript that should be injected into all windows as they are created. This is useful for adding custom JavaScript functions that complement the plugin.
|
||||
|
||||
### Tips
|
||||
|
||||
#### Enums
|
||||
|
||||
In Go, enums are often defined as a type and a set of constants. For example:
|
||||
|
||||
```go
|
||||
type MyEnum int
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
Due to incompatibility between Go and JavaScript, custom types cannot be used in this way. The best strategy is to use a type alias for float64:
|
||||
|
||||
```go
|
||||
type MyEnum = float64
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
In Javascript, you can then use the following:
|
||||
|
||||
```js
|
||||
const MyEnum = {
|
||||
MyEnumOne: 0,
|
||||
MyEnumTwo: 1,
|
||||
MyEnumThree: 2
|
||||
}
|
||||
```
|
||||
|
||||
- Why use `float64`? Can't we use `int`?
|
||||
- Because JavaScript doesn't have a concept of `int`. Everything is a `number`, which translates to `float64` in Go. There are also restrictions on casting types in Go's reflection package, which means using `int` doesn't work.
|
||||
|
||||
### BackgroundColour
|
||||
|
||||
In v2, this was a pointer to an `RGBA` struct. In v3, this is an `RGBA` struct value.
|
||||
|
||||
### WindowIsTranslucent
|
||||
|
||||
This flag has been removed. Now there is a `BackgroundType` flag that can be used to set the type of background the window should have.
|
||||
This flag can be set to any of the following values:
|
||||
- `BackgroundTypeSolid` - The window will have a solid background
|
||||
- `BackgroundTypeTransparent` - The window will have a transparent background
|
||||
- `BackgroundTypeTranslucent` - The window will have a translucent background
|
||||
|
||||
On Windows, if the `BackgroundType` is set to `BackgroundTypeTranslucent`, the type of translucency can be set using the
|
||||
`BackdropType` flag in the `WindowsWindow` options. This can be set to any of the following values:
|
||||
- `Auto` - The window will use an effect determined by the system
|
||||
- `None` - The window will have no background
|
||||
- `Mica` - The window will use the Mica effect
|
||||
- `Acrylic` - The window will use the acrylic effect
|
||||
- `Tabbed` - The window will use the tabbed effect
|
||||
|
||||
|
||||
## Windows Application Options
|
||||
|
||||
### WndProcInterceptor
|
||||
|
||||
If this is set, the WndProc will be intercepted and the function will be called. This allows you to handle Windows
|
||||
messages directly. The function should have the following signature:
|
||||
|
||||
```go
|
||||
func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnValue uintptr, shouldReturn)
|
||||
```
|
||||
|
||||
The `shouldReturn` value should be set to `true` if the returnValue should be returned by the main wndProc method.
|
||||
If it is set to `false`, the return value will be ignored and the message will continue to be processed by the main
|
||||
wndProc method.
|
||||
|
||||
## Hide Window on Close + OnBeforeClose
|
||||
|
||||
In v2, there was the `HideWindowOnClose` flag to hide the window when it closed. There was a logical overlap between
|
||||
this flag and the `OnBeforeClose` callback. In v3, the `HideWindowOnClose` flag has been removed and the `OnBeforeClose`
|
||||
callback has been renamed to `ShouldClose`. The `ShouldClose` callback is called when the user attempts to close a
|
||||
window. If the callback returns `true`, the window will close. If it returns `false`, the window will not close.
|
||||
This can be used to hide the window instead of closing it.
|
||||
|
||||
## Window Drag
|
||||
|
||||
In v2, the `--wails-drag` attribute was used to indicate that an element could be used to drag the window.
|
||||
In v3, this has been replaced with `--webkit-app-region` to be more in line with the way other frameworks
|
||||
handle this. The `--webkit-app-region` attribute can be set to any of the following values:
|
||||
- `drag` - The element can be used to drag the window
|
||||
- `no-drag` - The element cannot be used to drag the window
|
||||
|
||||
We would have ideally liked to use `app-region`, however this is not supported by the `getComputedStyle` call on
|
||||
webkit on macOS.
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
# Introduction
|
||||
|
||||
!!! note
|
||||
This guide is a work in progress.
|
||||
|
||||
Thanks for wanting to help out with development of Wails! This guide will help you get started.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Git clone this repository. Checkout the `v3-alpha` branch.
|
||||
- Install the CLI: `cd v3/cmd/wails3 && go install`
|
||||
|
||||
- Optional: If you are wanting to use the build system to build frontend code, you will need to install [npm](https://nodejs.org/en/download).
|
||||
|
||||
## Building
|
||||
|
||||
For simple programs, you can use the standard `go build` command. It's also possible to use `go run`.
|
||||
|
||||
Wails also comes with a build system that can be used to build more complex projects. It utilises the awesome [Task](https://taskfile.dev) build system.
|
||||
For more information, check out the task homepage or run `wails task --help`.
|
||||
|
||||
## Project layout
|
||||
|
||||
The project has the following structure:
|
||||
|
||||
```
|
||||
v3
|
||||
├── cmd/wails3 // CLI
|
||||
├── examples // Examples of Wails apps
|
||||
├── internal // Internal packages
|
||||
| ├── runtime // The Wails JS runtime
|
||||
| └── templates // The supported project templates
|
||||
├── pkg
|
||||
| ├── application // The core Wails library
|
||||
| └── events // The event definitions
|
||||
| └── mac // macOS specific code used by plugins
|
||||
| └── w32 // Windows specific code
|
||||
├── plugins // Supported plugins
|
||||
├── tasks // General tasks
|
||||
└── Taskfile.yaml // Development tasks configuration
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Adding window functionality
|
||||
|
||||
The preferred way to add window functionality is to add a new function to the `pkg/application/webview_window.go` file. This should implement all the functionality required for all platforms. Any platform specific code should be called via a `webviewWindowImpl` interface method. This interface is implemented by each of the target platforms to provide the platform specific functionality. In some cases, this may do nothing.
|
||||
Once you've added the interface method, ensure each platform implements it. A good example of this is the `SetMinSize` method.
|
||||
|
||||
- Mac: `webview_window_darwin.go`
|
||||
- Windows: `webview_window_windows.go`
|
||||
- Linux: `webview_window_linux.go`
|
||||
|
||||
Most, if not all, of the platform specific code should be run on the main thread. To simplify this, there are a number of `invokeSync` methods defined in `application.go`.
|
||||
|
||||
### Updating the runtime
|
||||
|
||||
The runtime is located in `v3/internal/runtime`. When the runtime is updated, the following steps need to be taken:
|
||||
|
||||
```shell
|
||||
wails3 task runtime:build
|
||||
```
|
||||
|
||||
### Events
|
||||
|
||||
Events are defined in `v3/pkg/events`. When adding a new event, the following steps need to be taken:
|
||||
|
||||
- Add the event to the `events.txt` file
|
||||
- Run `wails3 task events:generate`
|
||||
|
||||
There are a number of types of events: platform specific application and window events + common events. The common events are useful for cross-platform event handling, but you aren't limited to the "lowest common denominator". You can use the platform specific events if you need to.
|
||||
|
||||
When adding a common event, ensure that the platform specific events are mapped. An example of this is in `window_webview_darwin.go`:
|
||||
|
||||
```go
|
||||
// Translate ShouldClose to common WindowClosing event
|
||||
w.parent.On(events.Mac.WindowShouldClose, func(_ *WindowEventContext) {
|
||||
w.parent.emit(events.Common.WindowClosing)
|
||||
})
|
||||
```
|
||||
|
||||
NOTE: We may try to automate this in the future by adding the mapping to the event definition.
|
||||
|
||||
### Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Wails application.
|
||||
|
||||
#### Creating a plugin
|
||||
|
||||
Plugins are standard Go structure that adhere to the following interface:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
The `Name()` method returns the name of the plugin. This is used for logging purposes.
|
||||
|
||||
The `Init(*application.App) error` method is called when the plugin is loaded. The `*application.App`
|
||||
parameter is the application that the plugin is being loaded into. Any errors will prevent
|
||||
the application from starting.
|
||||
|
||||
The `Shutdown()` method is called when the application is shutting down.
|
||||
|
||||
The `CallableByJS()` method returns a list of exported functions that can be called from
|
||||
the frontend. These method names must exactly match the names of the methods exported
|
||||
by the plugin.
|
||||
|
||||
The `InjectJS()` method returns JavaScript that should be injected into all windows as they are created. This is useful for adding custom JavaScript functions that complement the plugin.
|
||||
|
||||
|
||||
## Misc Tasks
|
||||
|
||||
### Upgrading Taskfile
|
||||
|
||||
The Wails CLI uses the [Task](https://taskfile.dev) build system. It is imported as a library and used to run the tasks defined in `Taskfile.yaml`.
|
||||
The main interfacing with Task happens in `v3/internal/commands/task.go`.
|
||||
|
||||
To check if there's an upgrade for Taskfile, run `wails3 task -version` and check against the Task website.
|
||||
|
||||
To upgrade the version of Taskfile used, run:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
If there are incompatibilities then they should appear in the `v3/internal/commands/task.go` file.
|
||||
|
||||
Usually the best way to fix incompatibilities is to clone the task repo at `https://github.com/go-task/task` and look at the git history to determine what has changed and why.
|
||||
|
||||
To check all changes have worked correctly, re-install the CLI and check the version again:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
||||
## Opening a PR
|
||||
|
||||
Make sure that all PRs have a ticket associated with them providing context to the change. If there is no ticket, please create one first.
|
||||
Ensure that all PRs have updated the CHANGELOG.md file with the changes made. The CHANGELOG.md file is located in the `v3` directory.
|
||||
|
||||
|
||||
## Misc Tasks
|
||||
|
||||
### Upgrading Taskfile
|
||||
|
||||
The Wails CLI uses the [Task](https://taskfile.dev) build system. It is imported as a library and used to run the tasks defined in `Taskfile.yaml`.
|
||||
The main interfacing with Task happens in `v3/internal/commands/task.go`.
|
||||
|
||||
To check if there's an upgrade for Taskfile, run `wails3 task -version` and check against the Task website.
|
||||
|
||||
To upgrade the version of Taskfile used, run:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
If there are incompatibilities then they should appear in the `v3/internal/commands/task.go` file.
|
||||
|
||||
Usually the best way to fix incompatibilities is to clone the task repo at `https://github.com/go-task/task` and look at the git history to determine what has changed and why.
|
||||
|
||||
To check all changes have worked correctly, re-install the CLI and check the version again:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
||||
@@ -0,0 +1,413 @@
|
||||
# Status
|
||||
|
||||
Status of features in v3.
|
||||
|
||||
!!! note
|
||||
|
||||
This list is a mixture of public and internal API support.<br/>
|
||||
It is not complete and probably not up to date.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- Linux is not yet up to feature parity with Windows/Mac
|
||||
|
||||
## Application
|
||||
|
||||
Application interface methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|---------------------------------------------------------------|---------|-------|-----|-------|
|
||||
| run() error | Y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| setApplicationMenu(menu *Menu) | Y | Y | Y | |
|
||||
| name() string | | Y | Y | |
|
||||
| getCurrentWindowID() uint | Y | Y | Y | |
|
||||
| showAboutDialog(name string, description string, icon []byte) | | Y | Y | |
|
||||
| setIcon(icon []byte) | - | Y | Y | |
|
||||
| on(id uint) | | | Y | |
|
||||
| dispatchOnMainThread(fn func()) | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| getPrimaryScreen() (*Screen, error) | | Y | Y | |
|
||||
| getScreens() ([]*Screen, error) | | Y | Y | |
|
||||
|
||||
## Webview Window
|
||||
|
||||
Webview Window Interface Methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|----------------------------------------------------|---------|-------|-----|------------------------------------------|
|
||||
| center() | Y | Y | Y | |
|
||||
| close() | y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| execJS(js string) | y | Y | Y | |
|
||||
| focus() | Y | Y | | |
|
||||
| forceReload() | | Y | Y | |
|
||||
| fullscreen() | Y | Y | Y | |
|
||||
| getScreen() (*Screen, error) | y | Y | Y | |
|
||||
| getZoom() float64 | | Y | Y | |
|
||||
| height() int | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| isFullscreen() bool | Y | Y | Y | |
|
||||
| isMaximised() bool | Y | Y | Y | |
|
||||
| isMinimised() bool | Y | Y | Y | |
|
||||
| maximise() | Y | Y | Y | |
|
||||
| minimise() | Y | Y | Y | |
|
||||
| nativeWindowHandle() (uintptr, error) | Y | Y | | |
|
||||
| on(eventID uint) | y | | Y | |
|
||||
| openContextMenu(menu *Menu, data *ContextMenuData) | y | | Y | |
|
||||
| relativePosition() (int, int) | Y | Y | Y | |
|
||||
| reload() | y | Y | Y | |
|
||||
| run() | Y | Y | Y | |
|
||||
| setAlwaysOnTop(alwaysOnTop bool) | Y | Y | Y | |
|
||||
| setBackgroundColour(color RGBA) | Y | Y | Y | |
|
||||
| setEnabled(bool) | | Y | Y | |
|
||||
| setFrameless(bool) | | Y | Y | |
|
||||
| setFullscreenButtonEnabled(enabled bool) | - | Y | Y | There is no fullscreen button in Windows |
|
||||
| setHTML(html string) | Y | Y | Y | |
|
||||
| setMaxSize(width, height int) | Y | Y | Y | |
|
||||
| setMinSize(width, height int) | Y | Y | Y | |
|
||||
| setRelativePosition(x int, y int) | Y | Y | Y | |
|
||||
| setResizable(resizable bool) | Y | Y | Y | |
|
||||
| setSize(width, height int) | Y | Y | Y | |
|
||||
| setTitle(title string) | Y | Y | Y | |
|
||||
| setURL(url string) | Y | Y | Y | |
|
||||
| setZoom(zoom float64) | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| size() (int, int) | Y | Y | Y | |
|
||||
| toggleDevTools() | Y | Y | Y | |
|
||||
| unfullscreen() | Y | Y | Y | |
|
||||
| unmaximise() | Y | Y | Y | |
|
||||
| unminimise() | Y | Y | Y | |
|
||||
| width() int | Y | Y | Y | |
|
||||
| zoom() | | Y | Y | |
|
||||
| zoomIn() | Y | Y | Y | |
|
||||
| zoomOut() | Y | Y | Y | |
|
||||
| zoomReset() | Y | Y | Y | |
|
||||
|
||||
## Runtime
|
||||
|
||||
### Application
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|-------|
|
||||
| Quit | Y | Y | Y | |
|
||||
| Hide | Y | | Y | |
|
||||
| Show | Y | | Y | |
|
||||
|
||||
### Dialogs
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|----------|---------|-------|-----|-------|
|
||||
| Info | Y | Y | Y | |
|
||||
| Warning | Y | Y | Y | |
|
||||
| Error | Y | Y | Y | |
|
||||
| Question | Y | Y | Y | |
|
||||
| OpenFile | Y | | Y | |
|
||||
| SaveFile | Y | | Y | |
|
||||
|
||||
### Clipboard
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|-------|
|
||||
| SetText | Y | | Y | |
|
||||
| Text | Y | | Y | |
|
||||
|
||||
### ContextMenu
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------------|---------|-------|-----|-------|
|
||||
| OpenContextMenu | Y | | Y | |
|
||||
| On By Default | | | | |
|
||||
| Control via HTML | Y | | | |
|
||||
|
||||
The default context menu is enabled by default for all elements that are `contentEditable: true`, `<input>`
|
||||
or `<textarea>` tags or have the `--default-contextmenu: true` style set.
|
||||
The `--default-contextmenu: show` style will always show the context menu
|
||||
The `--default-contextmenu: hide` style will always hide the context menu
|
||||
|
||||
Anything nested under a tag with `--default-contextmenu: hide` style will not show the context menu unless it is
|
||||
explicitly set with `--default-contextmenu: show`.
|
||||
|
||||
### Screens
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------|---------|-------|-----|-------|
|
||||
| GetAll | Y | Y | Y | |
|
||||
| GetPrimary | Y | Y | Y | |
|
||||
| GetCurrent | Y | Y | Y | |
|
||||
|
||||
### System
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------|---------|-------|-----|-------|
|
||||
| IsDarkMode | | | Y | |
|
||||
|
||||
### Window
|
||||
|
||||
Y = Supported
|
||||
U = Untested
|
||||
|
||||
- = Not available
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------------------|---------|-------|-----|--------------------------------------------------------------------------------------|
|
||||
| Center | Y | Y | Y | |
|
||||
| Focus | Y | Y | | |
|
||||
| FullScreen | Y | Y | Y | |
|
||||
| GetZoom | Y | Y | Y | Get current view scale |
|
||||
| Height | Y | Y | Y | |
|
||||
| Hide | Y | Y | Y | |
|
||||
| Maximise | Y | Y | Y | |
|
||||
| Minimise | Y | Y | Y | |
|
||||
| RelativePosition | Y | Y | Y | |
|
||||
| Screen | Y | Y | Y | Get screen for window |
|
||||
| SetAlwaysOnTop | Y | Y | Y | |
|
||||
| SetBackgroundColour | Y | Y | Y | https://github.com/MicrosoftEdge/WebView2Feedback/issues/1621#issuecomment-938234294 |
|
||||
| SetEnabled | Y | U | U | Set the window to be enabled/disabled |
|
||||
| SetMaxSize | Y | Y | Y | |
|
||||
| SetMinSize | Y | Y | Y | |
|
||||
| SetRelativePosition | Y | Y | Y | |
|
||||
| SetResizable | Y | Y | Y | |
|
||||
| SetSize | Y | Y | Y | |
|
||||
| SetTitle | Y | Y | Y | |
|
||||
| SetZoom | Y | Y | Y | Set view scale |
|
||||
| Show | Y | Y | Y | |
|
||||
| Size | Y | Y | Y | |
|
||||
| UnFullscreen | Y | Y | Y | |
|
||||
| UnMaximise | Y | Y | Y | |
|
||||
| UnMinimise | Y | Y | Y | |
|
||||
| Width | Y | Y | Y | |
|
||||
| ZoomIn | Y | Y | Y | Increase view scale |
|
||||
| ZoomOut | Y | Y | Y | Decrease view scale |
|
||||
| ZoomReset | Y | Y | Y | Reset view scale |
|
||||
|
||||
### Window Options
|
||||
|
||||
A 'Y' in the table below indicates that the option has been tested and is applied when the window is created.
|
||||
An 'X' indicates that the option is not supported by the platform.
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------------------------------|---------|-------|-----|--------------------------------------------|
|
||||
| AlwaysOnTop | Y | | | |
|
||||
| BackgroundColour | Y | Y | | |
|
||||
| BackgroundType | | | | Acrylic seems to work but the others don't |
|
||||
| CSS | Y | Y | | |
|
||||
| DevToolsEnabled | Y | Y | Y | |
|
||||
| DisableResize | Y | Y | | |
|
||||
| EnableDragAndDrop | | Y | | |
|
||||
| EnableFraudulentWebsiteWarnings | | | | |
|
||||
| Focused | Y | Y | | |
|
||||
| Frameless | Y | Y | | |
|
||||
| FullscreenButtonEnabled | Y | | | |
|
||||
| Height | Y | Y | | |
|
||||
| Hidden | Y | Y | | |
|
||||
| HTML | Y | Y | | |
|
||||
| JS | Y | Y | | |
|
||||
| Mac | - | - | | |
|
||||
| MaxHeight | Y | Y | | |
|
||||
| MaxWidth | Y | Y | | |
|
||||
| MinHeight | Y | Y | | |
|
||||
| MinWidth | Y | Y | | |
|
||||
| Name | Y | Y | | |
|
||||
| OpenInspectorOnStartup | | | | |
|
||||
| StartState | Y | | | |
|
||||
| Title | Y | Y | | |
|
||||
| URL | Y | Y | | |
|
||||
| Width | Y | Y | | |
|
||||
| Windows | Y | - | - | |
|
||||
| X | Y | Y | | |
|
||||
| Y | Y | Y | | |
|
||||
| Zoom | | | | |
|
||||
| ZoomControlEnabled | | | | |
|
||||
|
||||
### Log
|
||||
|
||||
To log or not to log? System logger vs custom logger.
|
||||
|
||||
## Menu
|
||||
|
||||
| Event | Windows | Linux | Mac | Notes |
|
||||
|--------------------------|---------|-------|-----|-------|
|
||||
| Default Application Menu | Y | Y | Y | |
|
||||
|
||||
## Tray Menus
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|--------------------|---------|-------|-----|----------------------------------------------------------------------|
|
||||
| Icon | Y | | Y | Windows has default icons for light/dark mode & supports PNG or ICO. |
|
||||
| Label | - | | Y | |
|
||||
| Label (ANSI Codes) | - | | | |
|
||||
| Menu | Y | | Y | |
|
||||
|
||||
### Methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|-------------------------------|---------|-------|-----|-------|
|
||||
| setLabel(label string) | - | | Y | |
|
||||
| run() | Y | | Y | |
|
||||
| setIcon(icon []byte) | Y | | Y | |
|
||||
| setMenu(menu *Menu) | Y | | Y | |
|
||||
| setIconPosition(position int) | - | | Y | |
|
||||
| setTemplateIcon(icon []byte) | - | | Y | |
|
||||
| destroy() | Y | | Y | |
|
||||
| setDarkModeIcon(icon []byte) | Y | | Y | |
|
||||
|
||||
## Cross Platform Events
|
||||
|
||||
Mapping native events to cross-platform events.
|
||||
|
||||
| Event | Windows | Linux | Mac | Notes |
|
||||
|--------------------------|---------|-------|-----------------|-------|
|
||||
| WindowWillClose | | | WindowWillClose | |
|
||||
| WindowDidClose | | | | |
|
||||
| WindowDidResize | | | | |
|
||||
| WindowDidHide | | | | |
|
||||
| ApplicationWillTerminate | | | | |
|
||||
|
||||
... Add more
|
||||
|
||||
## Bindings Generation
|
||||
|
||||
Working well.
|
||||
|
||||
## Models Generation
|
||||
|
||||
Working well.
|
||||
|
||||
## Task file
|
||||
|
||||
Contains a lot needed for development.
|
||||
|
||||
## Theme
|
||||
|
||||
| Mode | Windows | Linux | Mac | Notes |
|
||||
|--------|---------|-------|-----|-------|
|
||||
| Dark | Y | | | |
|
||||
| Light | Y | | | |
|
||||
| System | Y | | | |
|
||||
|
||||
## NSIS Installer
|
||||
|
||||
TBD
|
||||
|
||||
## Templates
|
||||
|
||||
All templates are working.
|
||||
|
||||
## Plugins
|
||||
|
||||
Built-in plugin support:
|
||||
|
||||
| Plugin | Windows | Linux | Mac | Notes |
|
||||
|-----------------|---------|-------|-----|-------|
|
||||
| Browser | Y | | Y | |
|
||||
| KV Store | Y | Y | Y | |
|
||||
| Log | Y | Y | Y | |
|
||||
| Single Instance | Y | | Y | |
|
||||
| SQLite | Y | Y | Y | |
|
||||
| Start at login | Y | | Y | |
|
||||
| Server | | | | |
|
||||
|
||||
TODO:
|
||||
|
||||
- Ensure each plugin has a JS wrapper that can be injected into the window.
|
||||
|
||||
## Packaging
|
||||
|
||||
| | Windows | Linux | Mac | Notes |
|
||||
|-----------------|---------|-------|-----|-------|
|
||||
| Icon Generation | Y | | Y | |
|
||||
| Icon Embedding | Y | | Y | |
|
||||
| Info.plist | - | | Y | |
|
||||
| NSIS Installer | | | - | |
|
||||
| Mac bundle | - | | Y | |
|
||||
| Windows exe | Y | | - | |
|
||||
|
||||
## Frameless Windows
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|------------------------------------------------|
|
||||
| Resize | Y | | Y | |
|
||||
| Drag | Y | Y | Y | Linux - can always drag with `Meta`+left mouse |
|
||||
|
||||
## Mac Specific
|
||||
|
||||
- [x] Translucency
|
||||
|
||||
### Mac Options
|
||||
|
||||
| Feature | Default | Notes |
|
||||
|-------------------------|-------------------|------------------------------------------------------|
|
||||
| Backdrop | MacBackdropNormal | Standard solid window |
|
||||
| DisableShadow | false | |
|
||||
| TitleBar | | Standard window decorations by default |
|
||||
| Appearance | DefaultAppearance | |
|
||||
| InvisibleTitleBarHeight | 0 | Creates an invisible title bar for frameless windows |
|
||||
| DisableShadow | false | Disables the window drop shadow |
|
||||
|
||||
## Windows Specific
|
||||
|
||||
- [x] Translucency
|
||||
- [x] Custom Themes
|
||||
|
||||
### Windows Options
|
||||
|
||||
| Feature | Default | Notes |
|
||||
|-----------------------------------|---------------|---------------------------------------------|
|
||||
| BackdropType | Solid | |
|
||||
| DisableIcon | false | |
|
||||
| Theme | SystemDefault | |
|
||||
| CustomTheme | nil | |
|
||||
| DisableFramelessWindowDecorations | false | |
|
||||
| WindowMask | nil | Makes the window the contents of the bitmap |
|
||||
|
||||
## Linux Specific
|
||||
|
||||
Implementation details for the functions utilized by the `*_linux.go` files are located in the following files:
|
||||
|
||||
- linux_cgo.go: CGo implementation
|
||||
- linux_purego.go: PureGo implementation
|
||||
|
||||
### CGO
|
||||
|
||||
By default CGO is utilized to compile the Linux port. This prevents easy cross-compilation and so the PureGo
|
||||
implementation is also being simultaneously developed.
|
||||
|
||||
### Purego
|
||||
|
||||
The examples can be compiled using the following command:
|
||||
|
||||
CGO_ENABLED=0 go build -tags purego
|
||||
|
||||
Note: things are currently not working after the refactor
|
||||
|
||||
## Examples
|
||||
|
||||
| Example | Windows | Linux | Mac |
|
||||
|--------------|----------------------|-------|-----|
|
||||
| binding | NO | | |
|
||||
| build | Yes (Debug + Prod) | | |
|
||||
| clipboard | Yes | | |
|
||||
| contextmenus | Yes | | |
|
||||
| dialogs | Almost | | |
|
||||
| drag-n-drop | NO | | |
|
||||
| events | NO | | |
|
||||
| frameless | Yes | | |
|
||||
| kitchensink | Yes | | |
|
||||
| menu | Yes | | |
|
||||
| plain | Yes | | |
|
||||
| plugins | Yes | | |
|
||||
| screen | Yes | | |
|
||||
| systray | Yes | | Yes |
|
||||
| window | Yes | | |
|
||||
| windowjs | Example not complete | | |
|
||||
| wml | Yes | | |
|
||||
|
||||
# Alpha Release TODO
|
||||
|
||||
- [ ] Check all runtime methods are available in the JS runtime
|
||||
|
||||
# Beta Release TODO
|
||||
|
||||
- [ ] Make better looking examples
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user