Compare commits

...

62 commits

Author SHA1 Message Date
Lea Anthony
ce28215300
Update blog 2022-09-22 10:30:11 +10:00
Lea Anthony
5b4129ba07
Update changelog, blog post, workflow 2022-09-22 08:27:55 +10:00
Lea Anthony
be0f358b4a
update wails init 2022-09-22 08:07:50 +10:00
Lea Anthony
10cee781a7
Add -ci flag to wails init 2022-09-22 08:00:41 +10:00
Lea Anthony
aebd50db0a
Update release workflow 2022-09-22 07:00:56 +10:00
Lea Anthony
e9e22434f7
Update release workflow 2022-09-22 06:40:44 +10:00
Lea Anthony
6748e2f983
Update release workflow 2022-09-22 06:32:53 +10:00
Lea Anthony
4cfe7124b2
Update release workflow 2022-09-22 06:20:54 +10:00
Lea Anthony
157619d942
Update release workflow 2022-09-22 05:59:26 +10:00
Lea Anthony
5003c8d7a5
Update workflow 2022-09-22 05:52:18 +10:00
Misite Bao
118fd95646 chore: update stale lable 2022-09-22 00:04:45 +08:00
Misite Bao
5ce650d08b Update README 2022-09-22 00:04:22 +08:00
Misite Bao
b92953aa96 feat(website): remove redundant files and sync documents 2022-09-21 23:59:34 +08:00
Lea Anthony
8e4ce3a2bb
v2.0.0 docs 2022-09-21 20:37:15 +10:00
Lea Anthony
0bb8147f5c
Revert "feat: remove documentation for "beta" and "rc" versions"
This reverts commit f587457e7e.
2022-09-21 20:30:21 +10:00
Lea Anthony
76338d4e50
Update contributors. Remove ko/ru lang for now. 2022-09-21 12:16:05 +10:00
Lea Anthony
ac5cd0dd90
crwodin -> crowdin 2022-09-21 12:03:52 +10:00
Lea Anthony
16119187be chore: update sponsors.svg 2022-09-21 01:28:37 +00:00
Lea Anthony
84ef7e1e82
Update sponsor image workflow 2022-09-21 11:27:59 +10:00
Lea Anthony
98bc3d5bb7
Update sponsor image workflow 2022-09-21 11:21:14 +10:00
Lea Anthony
1918401240
Update sponsor image workflow 2022-09-21 11:16:31 +10:00
Lea Anthony
7bb74d7ffe
Update sponsor image workflow 2022-09-21 11:15:55 +10:00
Lea Anthony
ded9b1fa28
Update sponsor image workflow 2022-09-21 11:07:14 +10:00
Lea Anthony
74c63799d1
Update sponsor image workflow 2022-09-21 10:57:22 +10:00
Lea Anthony
16e80913bf
Update architecture diagram - Thanks @bketelsen 2022-09-21 10:54:44 +10:00
Misite Bao
1022d3cd61 chore: migrate to script 2022-09-21 02:06:26 +08:00
Misite Bao
2238d6b206 fix(website): fix broken links 2022-09-21 01:27:35 +08:00
Misite Bao
2dd2deadc1 feat(website): update Chinese and Japanese and temporarily remove other language translations
Reason: The translation progress of other languages has not yet met the requirements
2022-09-21 00:39:42 +08:00
Misite Bao
11d54cc875 feat(website): update en docs 2022-09-20 23:41:42 +08:00
Misite Bao
f587457e7e feat: remove documentation for "beta" and "rc" versions 2022-09-20 23:06:51 +08:00
Lea Anthony
3dee8a931a
update sponsorkit generation 2022-09-20 21:59:28 +10:00
Lea Anthony
d3b8a7e4af
Add package.json 2022-09-20 21:57:58 +10:00
Lea Anthony
db70a0de58
Update scheduler workflow 2022-09-20 21:55:42 +10:00
Lea Anthony
15759b38bf
Add sponsor label workflow. Generate sponsor svg. 2022-09-20 21:52:20 +10:00
Lea Anthony
449764943f
Slight text change 2022-09-20 19:52:00 +10:00
Lea Anthony
7254c575d6
More CSS changes 2022-09-20 18:20:53 +10:00
Lea Anthony
7a59bdd09b
More CSS changes 2022-09-20 17:41:11 +10:00
Lea Anthony
ba3e697a00
Better mobile experience 2 2022-09-20 17:25:55 +10:00
Lea Anthony
b370e0e7f0
Better mobile experience 2022-09-20 17:05:23 +10:00
Lea Anthony
6805b5a3e9
Fix LHS blog navigation. Updated blog. Add missing garble flags in CLI doc 2022-09-20 10:29:27 +10:00
Lea Anthony
01ea9496e7
Fix RHS page navigation. Add OnSuspend and OnResume to options example. 2022-09-20 09:57:24 +10:00
Lea Anthony
2661eca2cc
Rename TranslucencyType -> BackdropType. Rename BackdropType consts. Add documentation for this option. 2022-09-20 09:49:13 +10:00
Lea Anthony
23593b3c4d
Fix bullet-points of community guide 2022-09-20 07:48:02 +10:00
Lea Anthony
e323b04bb2
Make frontpage container rules more specific 2022-09-20 07:44:04 +10:00
Lea Anthony
32af38875f
Remove "Built with docusaurus" text 2022-09-20 07:36:25 +10:00
Lea Anthony
c4964d6f46
Fix features spacing + blockqoute spacing 2022-09-20 07:32:48 +10:00
Lea Anthony
2a3cd47d0c
Fix 2 column layout, quote and footer 2022-09-20 07:12:48 +10:00
Lea Anthony
662a406e85 2 column 2022-09-19 20:37:45 +08:00
Misite Bao
b2a79e656f feat(website): add Chinese translation 2022-09-19 20:35:29 +08:00
Misite Bao
07a3973f9a feat(website): optimize and improve documentation 2022-09-19 20:02:30 +08:00
Lea Anthony
840d3f1e85
Set maximum carousel width 2022-09-19 19:03:31 +10:00
Lea Anthony
2de06a0684 Tidy CSS 2022-09-19 16:49:22 +08:00
Lea Anthony
08ed902b7a Improved CSS 2022-09-19 16:49:22 +08:00
Lea Anthony
3c17905155 Fix slider images. Resize varly image and limit max width. Remove announcement. 2022-09-19 16:49:22 +08:00
Lea Anthony
7bd1355663 Add quote 2022-09-19 16:49:21 +08:00
Misite Bao
a17aeee712 feat: add translation 2022-09-19 16:49:21 +08:00
Misite Bao
428f839c84 feat: move blog images to a separate directory 2022-09-19 16:49:21 +08:00
Lea Anthony
7ab969195c Updated blog 2022-09-19 16:49:20 +08:00
Lea Anthony
1a6f308494 Updated README.md + copy to v2 directory 2022-09-19 16:49:19 +08:00
Lea Anthony
21b4f643dd Updated README.md + copy to v2 directory 2022-09-19 16:49:19 +08:00
Lea Anthony
a07dbb2368 Updated README.md 2022-09-19 16:49:18 +08:00
Lea Anthony
c4f9a43ff6 Blog post 2022-09-19 16:49:17 +08:00
444 changed files with 13027 additions and 10308 deletions

View file

@ -655,7 +655,6 @@
"avatar_url": "https://avatars.githubusercontent.com/u/14013111?v=4", "avatar_url": "https://avatars.githubusercontent.com/u/14013111?v=4",
"profile": "https://github.com/GargantuaX", "profile": "https://github.com/GargantuaX",
"contributions": [ "contributions": [
"doc",
"financial" "financial"
] ]
}, },
@ -1319,6 +1318,36 @@
"contributions": [ "contributions": [
"doc" "doc"
] ]
},
{
"login": "KiddoV",
"name": "kiddov",
"avatar_url": "https://avatars.githubusercontent.com/u/28552977?v=4",
"profile": "https://github.com/KiddoV",
"contributions": [
"doc",
"financial",
"test",
"ideas"
]
},
{
"login": "Ilshidur",
"name": "Nicolas Coutin",
"avatar_url": "https://avatars.githubusercontent.com/u/6564012?v=4",
"profile": "https://nicolas-coutin.com/",
"contributions": [
"financial"
]
},
{
"login": "ParvinEyvazov",
"name": "Parvin Eyvazov",
"avatar_url": "https://avatars.githubusercontent.com/u/32189770?v=4",
"profile": "https://github.com/ParvinEyvazov",
"contributions": [
"doc"
]
} }
], ],
"contributorsPerLine": 8, "contributorsPerLine": 8,

2
.github/stale.yml vendored
View file

@ -10,7 +10,7 @@ exemptLabels:
- inprogress - inprogress
- "Selected For Development" - "Selected For Development"
# Label to use when marking an issue as stale # Label to use when marking an issue as stale
staleLabel: wontfix staleLabel: "Wont Fix"
# Comment to post when marking an issue as stale. Set to `false` to disable # Comment to post when marking an issue as stale. Set to `false` to disable
markComment: > markComment: >
This issue has been automatically marked as stale because it has not had This issue has been automatically marked as stale because it has not had

View file

@ -0,0 +1,33 @@
name: Generate Sponsor Image
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches: [ master ]
jobs:
update-sponsors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set node
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Update sponsors
run: cd scripts/sponsors && chmod 755 ./generate-sponsor-image.sh && ./generate-sponsor-image.sh
env:
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
SPONSORKIT_GITHUB_LOGIN: wailsapp
- name: Commit
uses: EndBug/add-and-commit@v4
with:
message: "chore: update sponsors.svg"
add: "website/static/img/sponsors.svg"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/label-sponsors.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Label sponsors
on:
pull_request:
types: [ opened ]
issues:
types: [ opened ]
jobs:
build:
name: is-sponsor-label
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -66,6 +66,6 @@ jobs:
run: | run: |
mkdir -p ./test-${{ matrix.template }} mkdir -p ./test-${{ matrix.template }}
cd ./test-${{ matrix.template }} cd ./test-${{ matrix.template }}
wails init -n ${{ matrix.template }} -t ${{ matrix.template }} wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci
cd ${{ matrix.template }} cd ${{ matrix.template }}
wails build -v 2 wails build -v 2

2
.gitignore vendored
View file

@ -29,3 +29,5 @@ v2/test/kitchensink/build/darwin/desktop/kitchensink
v2/test/kitchensink/frontend/package.json.md5 v2/test/kitchensink/frontend/package.json.md5
.idea/ .idea/
v2/cmd/wails/internal/commands/initialise/templates/testtemplates/ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
.env
/website/static/img/.cache.json

View file

@ -17,9 +17,6 @@
<a href="https://pkg.go.dev/github.com/wailsapp/wails"> <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"/> <img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a> </a>
<a href="https://www.codefactor.io/repository/github/wailsapp/wails">
<img src="https://www.codefactor.io/repository/github/wailsapp/wails/badge" alt="CodeFactor" />
</a>
<a href="https://github.com/wailsapp/wails/issues"> <a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" /> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a> </a>
@ -29,6 +26,9 @@
<a href="https://github.com/avelino/awesome-go" rel="nofollow"> <a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" /> <img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a> </a>
<a href="https://app.slack.com/client/T029RQSE6/CJ4P9F7MZ">
<img alt="Slack" src="https://img.shields.io/badge/slack-gophers%2Fwails%20-blue?logo=slack"/>
</a>
<br/> <br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow"> <a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow">
<img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" /> <img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" />
@ -48,19 +48,8 @@
</strong> </strong>
</div> </div>
<hr/>
<h3 align="center">
<strong>
注意v2のリリースが近づいているため、v1の新しい機能リクエストやバグレポートは受け付けておりません。重要な問題がある場合はチケットを開き、なぜそれが重要なのかを明記してください。
</strong>
</h3>
<hr/>
## 目次 ## 目次
<details>
<summary>クリックすることで、ディレクトリ一覧の開閉が可能です。</summary>
- [目次](#目次) - [目次](#目次)
- [はじめに](#はじめに) - [はじめに](#はじめに)
- [公式サイト](#公式サイト) - [公式サイト](#公式サイト)
@ -74,8 +63,6 @@
- [スペシャルサンクス](#スペシャルサンクス) - [スペシャルサンクス](#スペシャルサンクス)
- [ライセンス](#ライセンス) - [ライセンス](#ライセンス)
</details>
## はじめに ## はじめに
Go プログラムにウェブインタフェースを提供する従来の方法は内蔵のウェブサーバを経由するものですが、 Wails では異なるアプローチを提供します。 Go プログラムにウェブインタフェースを提供する従来の方法は内蔵のウェブサーバを経由するものですが、 Wails では異なるアプローチを提供します。
@ -114,108 +101,7 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
## スポンサー ## スポンサー
このプロジェクトは、以下の方々・企業によって支えられています。 このプロジェクトは、以下の方々・企業によって支えられています。
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/assets/images/sponsors/silver-sponsor.png" width="100"/>
</a>
<a href="https://github.com/selvindev" style="width:100px;">
<img src="https://github.com/selvindev.png?size=100" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/assets/images/sponsors/bronze-sponsor.png" width="100"/>
</a>
<a href="https://github.com/codydbentley" style="width:100px">
<img src="https://github.com/codydbentley.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
<img src="https://github.com/matryer.png" width="100"/>
</a>
<a href="https://github.com/tc-hib" style="width:55px">
<img src="https://github.com/tc-hib.png?size=55" width="55"/>
</a>
<a href="https://github.com/picatz" style="width:50px">
<img src="https://github.com/picatz.png?size=50" width="50"/>
</a>
<a href="https://github.com/tylertravisty" style="width:50px">
<img src="https://github.com/tylertravisty.png?size=50" width="50"/>
</a>
<a href="https://github.com/akhudek" style="width:50px">
<img src="https://github.com/akhudek.png?size=50" width="50"/>
</a>
<a href="https://github.com/trea" style="width:50px">
<img src="https://github.com/trea.png?size=50" width="50"/>
</a>
<a href="https://github.com/LanguageAgnostic" style="width:55px">
<img src="https://github.com/LanguageAgnostic.png?size=55" width="55"/>
</a>
<a href="https://github.com/fcjr" style="width:55px">
<img src="https://github.com/fcjr.png?size=55" width="55"/>
</a>
<a href="https://github.com/nickarellano" style="width:60px">
<img src="https://github.com/nickarellano.png?size=60" width="60"/>
</a>
<a href="https://github.com/bglw" style="width:65px">
<img src="https://github.com/bglw.png?size=65" width="65"/>
</a>
<a href="https://github.com/marcus-crane" style="width:65px">
<img src="https://github.com/marcus-crane.png?size=65" width="65"/>
</a>
<a href="https://github.com/bbergshaven" style="width:45px">
<img src="https://github.com/bbergshaven.png?size=45" width="45"/>
</a>
<a href="https://github.com/Gilgames000" style="width:45px">
<img src="https://github.com/Gilgames000.png?size=45" width="45"/>
</a>
<a href="https://github.com/ilgityildirim" style="width:50px">
<img src="https://github.com/ilgityildirim.png?size=50" width="50"/>
</a>
<a href="https://github.com/questrail" style="width:50px">
<img src="https://github.com/questrail.png?size=50" width="50"/>
</a>
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
</a>
<a href="https://github.com/michaelolson1996" style="width:55px">
<img src="https://github.com/michaelolson1996.png?size=55" width="55"/>
</a>
<a href="https://github.com/GargantuaX" style="width:45px">
<img src="https://github.com/GargantuaX.png?size=45" width="45"/>
</a>
<a href="https://github.com/CharlieGo88" style="width:55px">
<img src="https://github.com/CharlieGo88.png?size=55" width="55"/>
</a>
<a href="https://github.com/Bironou" style="width:55px">
<img src="https://github.com/Bironou.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<a href="https://github.com/boostchicken" style="width:65px">
<img src="https://github.com/boostchicken.png?size=65" width="65"/>
</a>
<a href="https://github.com/iansinnott" style="width:55px">
<img src="https://github.com/iansinnott.png?size=55" width="55"/>
</a>
<a href="https://github.com/Ilshidur" style="width:50px">
<img src="https://github.com/Ilshidur.png?size=50" width="50"/>
</a>
<a href="https://github.com/KiddoV" style="width:45px">
<img src="https://github.com/KiddoV.png?size=45" width="45"/>
</a>
## 始め方 ## 始め方

185
README.md
View file

@ -1,5 +1,3 @@
<h1 align="center">Wails</h1>
<p align="center" style="text-align: center"> <p align="center" style="text-align: center">
<img src="./assets/images/logo-universal.png" width="55%"><br/> <img src="./assets/images/logo-universal.png" width="55%"><br/>
</p> </p>
@ -17,9 +15,6 @@
<a href="https://pkg.go.dev/github.com/wailsapp/wails"> <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"/> <img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a> </a>
<a href="https://www.codefactor.io/repository/github/wailsapp/wails">
<img src="https://www.codefactor.io/repository/github/wailsapp/wails/badge" alt="CodeFactor" />
</a>
<a href="https://github.com/wailsapp/wails/issues"> <a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" /> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a> </a>
@ -29,6 +24,9 @@
<a href="https://github.com/avelino/awesome-go" rel="nofollow"> <a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" /> <img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a> </a>
<a href="https://app.slack.com/client/T029RQSE6/CJ4P9F7MZ">
<img alt="Slack" src="https://img.shields.io/badge/slack-gophers%2Fwails%20-blue?logo=slack"/>
</a>
<br/> <br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow"> <a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow">
<img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" /> <img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" />
@ -48,33 +46,18 @@
</strong> </strong>
</div> </div>
<hr/>
<h3 align="center">
<strong>
PLEASE NOTE: As we are approaching the v2 release, we are not accepting any new feature requests or bug reports for v1. If you have a critical issue, please open a ticket and state why it is critical.
</strong>
</h3>
<hr/>
## Table of Contents ## Table of Contents
<details>
<summary>Click me to Open/Close the directory listing</summary>
- [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents)
- [Introduction](#introduction) - [Introduction](#introduction)
- [Official Website](#official-website)
- [Roadmap](#roadmap)
- [Features](#features) - [Features](#features)
- [Sponsors](#sponsors) - [Roadmap](#roadmap)
- [Getting Started](#getting-started) - [Getting Started](#getting-started)
- [Sponsors](#sponsors)
- [FAQ](#faq) - [FAQ](#faq)
- [Contributors](#contributors) - [Contributors](#contributors)
- [Special Mentions](#special-mentions)
- [Special Thanks](#special-thanks)
- [License](#license) - [License](#license)
- [Inspiration](#inspiration)
</details>
## Introduction ## Introduction
@ -90,145 +73,34 @@ make this easy for you by handling project creation, compilation and bundling. A
- Easily call Go methods from Javascript - Easily call Go methods from Javascript
- Auto-generated Typescript definitions for your Go structs and methods - Auto-generated Typescript definitions for your Go structs and methods
- Native Dialogs & Menus - Native Dialogs & Menus
- Native Dark / Light mode support
- Supports modern translucency and "frosted window" effects - Supports modern translucency and "frosted window" effects
- Unified eventing system between Go and Javascript - Unified eventing system between Go and Javascript
- Powerful cli tool to quickly generate and build your projects - Powerful cli tool to quickly generate and build your projects
- Multiplatform - Multiplatform
- Uses native rendering engines - _no embedded browser_! - Uses native rendering engines - _no embedded browser_!
### Official Website
Version 2:
Wails v2 has been released in Beta for all 3 platforms. Check out the [new website](https://wails.io) if you are
interested in trying it out.
Legacy v1 Website:
The legacy v1 docs can be found at [https://wails.app](https://wails.app).
### Roadmap ### Roadmap
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
this before open up an enhancement request. this before open up an enhancement request.
## Sponsors
This project is supported by these kind people / companies:
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/assets/images/sponsors/silver-sponsor.png" width="100"/>
</a>
<a href="https://github.com/selvindev" style="width:100px;">
<img src="https://github.com/selvindev.png?size=100" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/assets/images/sponsors/bronze-sponsor.png" width="100"/>
</a>
<a href="https://github.com/codydbentley" style="width:100px">
<img src="https://github.com/codydbentley.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
<img src="https://github.com/matryer.png" width="100"/>
</a>
<a href="https://github.com/tc-hib" style="width:55px">
<img src="https://github.com/tc-hib.png?size=55" width="55"/>
</a>
<a href="https://github.com/picatz" style="width:50px">
<img src="https://github.com/picatz.png?size=50" width="50"/>
</a>
<a href="https://github.com/tylertravisty" style="width:50px">
<img src="https://github.com/tylertravisty.png?size=50" width="50"/>
</a>
<a href="https://github.com/akhudek" style="width:50px">
<img src="https://github.com/akhudek.png?size=50" width="50"/>
</a>
<a href="https://github.com/trea" style="width:50px">
<img src="https://github.com/trea.png?size=50" width="50"/>
</a>
<a href="https://github.com/LanguageAgnostic" style="width:55px">
<img src="https://github.com/LanguageAgnostic.png?size=55" width="55"/>
</a>
<a href="https://github.com/fcjr" style="width:55px">
<img src="https://github.com/fcjr.png?size=55" width="55"/>
</a>
<a href="https://github.com/nickarellano" style="width:60px">
<img src="https://github.com/nickarellano.png?size=60" width="60"/>
</a>
<a href="https://github.com/bglw" style="width:65px">
<img src="https://github.com/bglw.png?size=65" width="65"/>
</a>
<a href="https://github.com/marcus-crane" style="width:65px">
<img src="https://github.com/marcus-crane.png?size=65" width="65"/>
</a>
<a href="https://github.com/bbergshaven" style="width:45px">
<img src="https://github.com/bbergshaven.png?size=45" width="45"/>
</a>
<a href="https://github.com/Gilgames000" style="width:45px">
<img src="https://github.com/Gilgames000.png?size=45" width="45"/>
</a>
<a href="https://github.com/ilgityildirim" style="width:50px">
<img src="https://github.com/ilgityildirim.png?size=50" width="50"/>
</a>
<a href="https://github.com/questrail" style="width:50px">
<img src="https://github.com/questrail.png?size=50" width="50"/>
</a>
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
</a>
<a href="https://github.com/michaelolson1996" style="width:55px">
<img src="https://github.com/michaelolson1996.png?size=55" width="55"/>
</a>
<a href="https://github.com/GargantuaX" style="width:45px">
<img src="https://github.com/GargantuaX.png?size=45" width="45"/>
</a>
<a href="https://github.com/CharlieGo88" style="width:55px">
<img src="https://github.com/CharlieGo88.png?size=55" width="55"/>
</a>
<a href="https://github.com/Bironou" style="width:55px">
<img src="https://github.com/Bironou.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<a href="https://github.com/boostchicken" style="width:65px">
<img src="https://github.com/boostchicken.png?size=65" width="65"/>
</a>
<a href="https://github.com/iansinnott" style="width:55px">
<img src="https://github.com/iansinnott.png?size=55" width="55"/>
</a>
<a href="https://github.com/Ilshidur" style="width:50px">
<img src="https://github.com/Ilshidur.png?size=50" width="50"/>
</a>
<a href="https://github.com/KiddoV" style="width:45px">
<img src="https://github.com/KiddoV.png?size=45" width="45"/>
</a>
## Getting Started ## Getting Started
The installation instructions are on the [official website](https://wails.io/docs/gettingstarted/installation). The installation instructions are on the [official website](https://wails.io/docs/gettingstarted/installation).
## Sponsors
This project is supported by these kind people / companies:
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
## FAQ ## FAQ
- Is this an alternative to Electron? - Is this an alternative to Electron?
Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop
applications or add a frontend to their existing applications. Wails v2 does offer native elements such as menus applications or add a frontend to their existing applications. Wails does offer native elements such as menus
and dialogs, so it is becoming a lightweight electron alternative. and dialogs, so it could be considered a lightweight electron alternative.
- Who is this project aimed at? - Who is this project aimed at?
@ -250,16 +122,11 @@ The installation instructions are on the [official website](https://wails.io/doc
The contributors list is getting too big for the readme! All the amazing people who have contributed to this The contributors list is getting too big for the readme! All the amazing people who have contributed to this
project have their own page [here](https://wails.io/credits#contributors). project have their own page [here](https://wails.io/credits#contributors).
## Special Mentions ## License
Without the following people, this project would never have existed: [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been immense. More patience than ## Inspiration
you can throw a stick at (Not long now Dustin!).
- [Serge Zaitsev](https://github.com/zserge) - Creator of [Webview](https://github.com/zserge/webview) which Wails uses
for the windowing.
- [Byron](https://github.com/bh90210) - At times, Byron has single handedly kept this project alive. Without his
incredible input, we never would have got to v1.
This project was mainly coded to the following albums: This project was mainly coded to the following albums:
@ -276,21 +143,3 @@ This project was mainly coded to the following albums:
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB) - [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF) - [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v) - [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
## Special Thanks
<p align="center" style="text-align: center">
<a href="https://pace.dev"><img src="/assets/images/pace.jpeg"/></a><br/>
A <i>huge</i> thanks to <a href="https://pace.dev">Pace</a> for sponsoring the project and helping the efforts to get Wails ported to Apple Silicon!<br/><br/>
If you are looking for a Project Management tool that's powerful but quick and easy to use, check them out!<br/><br/>
</p>
<p align="center" style="text-align: center">
A special thank you to JetBrains for donating licenses to us!<br/><br/>
Please click the logo to let them know your appreciation!<br/><br/>
<a href="https://www.jetbrains.com?from=Wails"><img src="/assets/images/jetbrains-grayscale.png" width="30%"></a>
</p>
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)

View file

@ -17,9 +17,6 @@
<a href="https://pkg.go.dev/github.com/wailsapp/wails"> <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"/> <img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
</a> </a>
<a href="https://www.codefactor.io/repository/github/wailsapp/wails">
<img src="https://www.codefactor.io/repository/github/wailsapp/wails/badge" alt="CodeFactor" />
</a>
<a href="https://github.com/wailsapp/wails/issues"> <a href="https://github.com/wailsapp/wails/issues">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" /> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
</a> </a>
@ -29,6 +26,9 @@
<a href="https://github.com/avelino/awesome-go" rel="nofollow"> <a href="https://github.com/avelino/awesome-go" rel="nofollow">
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" /> <img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
</a> </a>
<a href="https://app.slack.com/client/T029RQSE6/CJ4P9F7MZ">
<img alt="Slack" src="https://img.shields.io/badge/slack-gophers%2Fwails%20-blue?logo=slack"/>
</a>
<br/> <br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow"> <a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow">
<img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" /> <img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" />
@ -48,53 +48,24 @@
</strong> </strong>
</div> </div>
<hr/>
<h3 align="center">
<strong>
请注意:随着我们接近 v2 版本,我们不接受 v1 的任何新功能请求或错误报告。如果您有一个关键问题请开一个Issue并说明为什么它很关键。
</strong>
</h3>
<hr/>
## 内容目录 ## 内容目录
<details>
<summary>点我 打开/关闭 目录列表</summary>
- [内容目录](#内容目录) - [内容目录](#内容目录)
- [项目介绍](#项目介绍) - [项目介绍](#项目介绍)
- [官方网站](#官方网站)
- [路线图](#路线图)
- [功能](#功能) - [功能](#功能)
- [赞助商](#赞助商) - [路线图](#路线图)
- [快速入门](#快速入门) - [快速入门](#快速入门)
- [赞助商](#赞助商)
- [常见问题](#常见问题) - [常见问题](#常见问题)
- [贡献者](#贡献者) - [贡献者](#贡献者)
- [特别提及](#特别提及)
- [特别感谢](#特别感谢)
- [许可证](#许可证) - [许可证](#许可证)
- [灵感](#灵感)
</details>
## 项目介绍 ## 项目介绍
为 Go 程序提供 Web 界面的传统方法是通过内置 Web 服务器。Wails 提供了一种不同的方法:它提供了将 Go 代码和 Web 为 Go 程序提供 Web 界面的传统方法是通过内置 Web 服务器。Wails 提供了一种不同的方法:它提供了将 Go 代码和 Web
前端一起打包成单个二进制文件的能力。通过提供的工具,可以很轻松的完成项目的创建、编译和打包。你所要做的就是发挥创造力! 前端一起打包成单个二进制文件的能力。通过提供的工具,可以很轻松的完成项目的创建、编译和打包。你所要做的就是发挥创造力!
### 官方网站
V2
Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝试一下,请查看[新网站](https://wails.io)。
旧版 V1
旧版 v1 文档可以在[https://wails.app](https://wails.app)找到。
### 路线图
项目路线图可在[此处](https://github.com/wailsapp/wails/discussions/1484)找到。在提出增强请求之前请查阅此内容。
## 功能 ## 功能
- 后端使用标准 Go - 后端使用标准 Go
@ -104,120 +75,24 @@ Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝
- 为您的 Go 结构体和方法自动生成 Typescript 声明 - 为您的 Go 结构体和方法自动生成 Typescript 声明
- 原生对话框和菜单 - 原生对话框和菜单
- 支持现代半透明和“磨砂窗”效果 - 支持现代半透明和“磨砂窗”效果
- Go 和 Javascript 之间统一事件系统 - Go 和 Javascript 之间统一事件系统
- 强大的 CLI 工具,可快速生成和构建您的项目 - 强大的命令行工具,可快速生成和构建您的项目
- 跨平台 - 跨平台
- 使用原生渲染引擎 - _没有嵌入式浏览器_ - 使用原生渲染引擎 - _没有嵌入浏览器_
### 路线图
项目路线图可在 [此处](https://github.com/wailsapp/wails/discussions/1484) 找到。在提出增强请求之前请查阅此内容。
## 快速入门
使用说明在 [官网](https://wails.io/docs/gettingstarted/installation)。
## 赞助商 ## 赞助商
这个项目由以下这些人或者公司支持: 这个项目由以下这些人或者公司支持:
<a href="https://github.com/sponsors/leaanthony" style="width:100px;"> <img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
<img src="/assets/images/sponsors/silver-sponsor.png" width="100"/>
</a>
<a href="https://github.com/selvindev" style="width:100px;">
<img src="https://github.com/selvindev.png?size=100" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="/assets/images/sponsors/bronze-sponsor.png" width="100"/>
</a>
<a href="https://github.com/codydbentley" style="width:100px">
<img src="https://github.com/codydbentley.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
<img src="https://github.com/matryer.png" width="100"/>
</a>
<a href="https://github.com/tc-hib" style="width:55px">
<img src="https://github.com/tc-hib.png?size=55" width="55"/>
</a>
<a href="https://github.com/picatz" style="width:50px">
<img src="https://github.com/picatz.png?size=50" width="50"/>
</a>
<a href="https://github.com/tylertravisty" style="width:50px">
<img src="https://github.com/tylertravisty.png?size=50" width="50"/>
</a>
<a href="https://github.com/akhudek" style="width:50px">
<img src="https://github.com/akhudek.png?size=50" width="50"/>
</a>
<a href="https://github.com/trea" style="width:50px">
<img src="https://github.com/trea.png?size=50" width="50"/>
</a>
<a href="https://github.com/LanguageAgnostic" style="width:55px">
<img src="https://github.com/LanguageAgnostic.png?size=55" width="55"/>
</a>
<a href="https://github.com/fcjr" style="width:55px">
<img src="https://github.com/fcjr.png?size=55" width="55"/>
</a>
<a href="https://github.com/nickarellano" style="width:60px">
<img src="https://github.com/nickarellano.png?size=60" width="60"/>
</a>
<a href="https://github.com/bglw" style="width:65px">
<img src="https://github.com/bglw.png?size=65" width="65"/>
</a>
<a href="https://github.com/marcus-crane" style="width:65px">
<img src="https://github.com/marcus-crane.png?size=65" width="65"/>
</a>
<a href="https://github.com/bbergshaven" style="width:45px">
<img src="https://github.com/bbergshaven.png?size=45" width="45"/>
</a>
<a href="https://github.com/Gilgames000" style="width:45px">
<img src="https://github.com/Gilgames000.png?size=45" width="45"/>
</a>
<a href="https://github.com/ilgityildirim" style="width:50px">
<img src="https://github.com/ilgityildirim.png?size=50" width="50"/>
</a>
<a href="https://github.com/questrail" style="width:50px">
<img src="https://github.com/questrail.png?size=50" width="50"/>
</a>
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
</a>
<a href="https://github.com/michaelolson1996" style="width:55px">
<img src="https://github.com/michaelolson1996.png?size=55" width="55"/>
</a>
<a href="https://github.com/GargantuaX" style="width:45px">
<img src="https://github.com/GargantuaX.png?size=45" width="45"/>
</a>
<a href="https://github.com/CharlieGo88" style="width:55px">
<img src="https://github.com/CharlieGo88.png?size=55" width="55"/>
</a>
<a href="https://github.com/Bironou" style="width:55px">
<img src="https://github.com/Bironou.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<a href="https://github.com/boostchicken" style="width:65px">
<img src="https://github.com/boostchicken.png?size=65" width="65"/>
</a>
<a href="https://github.com/iansinnott" style="width:55px">
<img src="https://github.com/iansinnott.png?size=55" width="55"/>
</a>
<a href="https://github.com/Ilshidur" style="width:50px">
<img src="https://github.com/Ilshidur.png?size=50" width="50"/>
</a>
<a href="https://github.com/KiddoV" style="width:45px">
<img src="https://github.com/KiddoV.png?size=45" width="45"/>
</a>
## 快速入门
使用说明在[官网](https://wails.io/docs/gettingstarted/installation)。
## 常见问题 ## 常见问题
@ -242,15 +117,13 @@ Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝
贡献者列表对于 README 文件来说太大了!所有为这个项目做出贡献的了不起的人在[这里](https://wails.io/credits#contributors)都有自己的页面。 贡献者列表对于 README 文件来说太大了!所有为这个项目做出贡献的了不起的人在[这里](https://wails.io/credits#contributors)都有自己的页面。
## 特别提及 ## 许可证
如果没有以下人员,此项目或许永远不会存在: [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](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 。
编写项目代码时伴随着以下专辑: 项目灵感主要来自以下专辑:
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA) - [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) - [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
@ -265,21 +138,3 @@ Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB) - [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF) - [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v) - [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/>
<i>非常</i> 感谢<a href="https://pace.dev">Pace</a>对项目的赞助,并帮助将 Wails 移植到 Apple Silicon !<br/><br/>
如果您正在寻找一个强大并且快速和易于使用的项目管理工具,可以看看他们!<br/><br/>
</p>
<p align="center" style="text-align: center">
特别感谢 JetBrains 向我们捐赠许可!<br/><br/>
请点击 logo 让他们知道你的感激之情!<br/><br/>
<a href="https://www.jetbrains.com?from=Wails"><img src="/assets/images/jetbrains-grayscale.png" width="30%"></a>
</p>
## 许可证
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
npm install
npx sponsorkit -o ../../website/static/img/

3606
scripts/sponsors/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,15 @@
{
"name": "scripts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sponsorkit": "^0.5.2"
}
}

View file

@ -0,0 +1,206 @@
import {defineConfig} from 'sponsorkit';
const helpers = {
avatar: {
size: 45
},
boxWidth: 55,
boxHeight: 55,
container: {
sidePadding: 30
},
};
const coffee = {
avatar: {
size: 50
},
boxWidth: 65,
boxHeight: 65,
container: {
sidePadding: 30
},
};
const breakfast = {
avatar: {
size: 55
},
boxWidth: 75,
boxHeight: 75,
container: {
sidePadding: 20
},
name: {
maxLength: 10
}
};
const costs = {
avatar: {
size: 65
},
boxWidth: 90,
boxHeight: 80,
container: {
sidePadding: 30
},
name: {
maxLength: 10
}
};
const bronze = {
avatar: {
size: 85
},
boxWidth: 110,
boxHeight: 100,
container: {
sidePadding: 30
},
name: {
maxLength: 20
}
};
const silver = {
avatar: {
size: 100
},
boxWidth: 110,
boxHeight: 110,
container: {
sidePadding: 20
},
name: {
maxLength: 20
}
};
const gold = {
avatar: {
size: 150
},
boxWidth: 175,
boxHeight: 175,
container: {
sidePadding: 25
},
name: {
maxLength: 25
}
};
const champion = {
avatar: {
size: 175
},
boxWidth: 200,
boxHeight: 200,
container: {
sidePadding: 30
},
name: {
maxLength: 30
}
};
const partner = {
avatar: {
size: 200
},
boxWidth: 225,
boxHeight: 225,
container: {
sidePadding: 40
},
name: {
maxLength: 40
},
};
export default defineConfig({
github: {
login: 'leaanthony',
type: 'user',
},
// Rendering configs
width: 800,
formats: ['svg'],
tiers: [
{
title: 'Helpers',
preset: helpers,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Buying Coffee',
monthlyDollars: 5,
preset: coffee,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Buying Breakfast',
monthlyDollars: 10,
preset: breakfast,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Covering Costs',
monthlyDollars: 20,
preset: costs,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Bronze Sponsors',
monthlyDollars: 50,
preset: bronze,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Silver Sponsors',
monthlyDollars: 100,
preset: silver,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Gold Sponsors',
monthlyDollars: 200,
preset: gold,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Champion',
monthlyDollars: 500,
preset: champion,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
{
title: 'Partner',
monthlyDollars: 1000,
preset: partner,
composeAfter: function (composer, tierSponsors, config) {
composer.addSpan(20);
}
},
],
});

View file

@ -1,40 +0,0 @@
# Packing linux
* create app, app.desktop, app.png (512x512)
* chmod +x app!
* ./linuxdeploy-x86_64.AppImage --appdir AppDir -i react.png -d react.desktop -e react --output appimage
# Wails Doctor
Tested on:
* Debian 8
* Ubuntu 20.04
* Ubuntu 19.10
* Solus 4.1
* Centos 8
* Gentoo
* OpenSUSE/leap
* Fedora 31
### Development
Add a new package manager processor here: `v2/internal/system/packagemanager/`. IsAvailable should work even if the package is installed.
Add your new package manager to the list of package managers in `v2/internal/system/packagemanager/packagemanager.go`:
```
var db = map[string]PackageManager{
"eopkg": NewEopkg(),
"apt": NewApt(),
"yum": NewYum(),
"pacman": NewPacman(),
"emerge": NewEmerge(),
"zypper": NewZypper(),
}
```
## Gentoo
* Setup docker image using: emerge-webrsync -x -v

View file

@ -1,6 +1,238 @@
# Wails v2 ALPHA <p align="center" style="text-align: center">
<img src="../assets/images/logo-universal.png" width="55%"><br/>
</p>
This branch contains WORK IN PROGRESS! There are no guarantees. Use at your peril! <p align="center">
Build desktop applications using Go & Web Technologies.
<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>
<br/>
<a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow">
<img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?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>
This document will be updated as progress is made. <div align="center">
<strong>
<samp>
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md)
</samp>
</strong>
</div>
## Table of Contents
<details>
<summary>Click me to Open/Close the directory listing</summary>
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Roadmap](#roadmap)
- [Features](#features)
- [Sponsors](#sponsors)
- [Getting Started](#getting-started)
- [FAQ](#faq)
- [Contributors](#contributors)
- [License](#license)
</details>
## Introduction
The traditional method of providing web interfaces to Go programs is via a built-in web server. Wails offers a different
approach: it provides the ability to wrap both Go code and a web frontend into a single binary. Tools are provided to
make this easy for you by handling project creation, compilation and bundling. All you have to do is get creative!
## Features
- Use standard Go for the backend
- Use any frontend technology you are already familiar with to build your UI
- Quickly create rich frontends for your Go programs using pre-built templates
- Easily call Go methods from Javascript
- Auto-generated Typescript definitions for your Go structs and methods
- Native Dialogs & Menus
- Native Dark / Light mode support
- Supports modern translucency and "frosted window" effects
- Unified eventing system between Go and Javascript
- Powerful cli tool to quickly generate and build your projects
- Multiplatform
- Uses native rendering engines - _no embedded browser_!
### Roadmap
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
this before open up an enhancement request.
## Sponsors
This project is supported by these kind people / companies:
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="../website/static/img/silver%20sponsor.webp" width="100"/>
</a>
<a href="https://github.com/selvindev" style="width:100px;">
<img src="https://github.com/selvindev.png?size=100" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="../website/static/img/bronze%20sponsor.webp" width="100"/>
</a>
<a href="https://github.com/codydbentley" style="width:100px">
<img src="https://github.com/codydbentley.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="../website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
<img src="https://github.com/matryer.png" width="100"/>
</a>
<a href="https://github.com/tc-hib" style="width:55px">
<img src="https://github.com/tc-hib.png?size=55" width="55"/>
</a>
<a href="https://github.com/picatz" style="width:50px">
<img src="https://github.com/picatz.png?size=50" width="50"/>
</a>
<a href="https://github.com/tylertravisty" style="width:50px">
<img src="https://github.com/tylertravisty.png?size=50" width="50"/>
</a>
<a href="https://github.com/akhudek" style="width:50px">
<img src="https://github.com/akhudek.png?size=50" width="50"/>
</a>
<a href="https://github.com/trea" style="width:50px">
<img src="https://github.com/trea.png?size=50" width="50"/>
</a>
<a href="https://github.com/fcjr" style="width:55px">
<img src="https://github.com/fcjr.png?size=55" width="55"/>
</a>
<a href="https://github.com/nickarellano" style="width:60px">
<img src="https://github.com/nickarellano.png?size=60" width="60"/>
</a>
<a href="https://github.com/bglw" style="width:65px">
<img src="https://github.com/bglw.png?size=65" width="65"/>
</a>
<a href="https://github.com/marcus-crane" style="width:65px">
<img src="https://github.com/marcus-crane.png?size=65" width="65"/>
</a>
<a href="https://github.com/bbergshaven" style="width:45px">
<img src="https://github.com/bbergshaven.png?size=45" width="45"/>
</a>
<a href="https://github.com/ilgityildirim" style="width:50px">
<img src="https://github.com/ilgityildirim.png?size=50" width="50"/>
</a>
<a href="https://github.com/questrail" style="width:50px">
<img src="https://github.com/questrail.png?size=50" width="50"/>
</a>
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
</a>
<a href="https://github.com/michaelolson1996" style="width:55px">
<img src="https://github.com/michaelolson1996.png?size=55" width="55"/>
</a>
<a href="https://github.com/GargantuaX" style="width:45px">
<img src="https://github.com/GargantuaX.png?size=45" width="45"/>
</a>
<a href="https://github.com/CharlieGo88" style="width:55px">
<img src="https://github.com/CharlieGo88.png?size=55" width="55"/>
</a>
<a href="https://github.com/Shackelford-Arden" style="width:55px">
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
</a>
<a href="https://github.com/boostchicken" style="width:65px">
<img src="https://github.com/boostchicken.png?size=65" width="65"/>
</a>
<a href="https://github.com/iansinnott" style="width:55px">
<img src="https://github.com/iansinnott.png?size=55" width="55"/>
</a>
<a href="https://github.com/Ilshidur" style="width:50px">
<img src="https://github.com/Ilshidur.png?size=50" width="50"/>
</a>
<a href="https://github.com/KiddoV" style="width:45px">
<img src="https://github.com/KiddoV.png?size=45" width="45"/>
</a>
## Getting Started
The installation instructions are on the [official website](https://wails.io/docs/gettingstarted/installation).
## FAQ
- Is this an alternative to Electron?
Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop
applications or add a frontend to their existing applications. Wails does offer native elements such as menus
and dialogs, so it could be considered a lightweight electron alternative.
- Who is this project aimed at?
Go programmers who want to bundle an HTML/JS/CSS frontend with their applications, without resorting to creating a
server and opening a browser to view it.
- What's with the name?
When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to
Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the
English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck.
## Stargazers over time
[![Stargazers over time](https://starchart.cc/wailsapp/wails.svg)](https://starchart.cc/wailsapp/wails)
## Contributors
The contributors list is getting too big for the readme! All the amazing people who have contributed to this
project have their own page [here](https://wails.io/credits#contributors).
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
## Inspiration
This project was mainly coded to the following albums:
- [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)

View file

@ -1,8 +1,10 @@
package initialise package initialise
import ( import (
"bufio"
"fmt" "fmt"
"io" "io"
"log"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
@ -36,6 +38,10 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
projectName := "" projectName := ""
command.StringFlag("n", "Name of project", &projectName) command.StringFlag("n", "Name of project", &projectName)
// For CI
ciMode := false
command.BoolFlag("ci", "CI Mode", &ciMode).Hidden()
// Setup project directory // Setup project directory
projectDirectory := "" projectDirectory := ""
command.StringFlag("d", "Project directory", &projectDirectory) command.StringFlag("d", "Project directory", &projectDirectory)
@ -131,14 +137,14 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
// Try to discover author details from git config // Try to discover author details from git config
findAuthorDetails(options) findAuthorDetails(options)
return initProject(options, quiet) return initProject(options, quiet, ciMode)
}) })
return nil return nil
} }
// initProject is our main init command // initProject is our main init command
func initProject(options *templates.Options, quiet bool) error { func initProject(options *templates.Options, quiet bool, ciMode bool) error {
// Start Time // Start Time
start := time.Now() start := time.Now()
@ -155,19 +161,34 @@ func initProject(options *templates.Options, quiet bool) error {
return err return err
} }
// Run `go mod tidy` to ensure `go.sum` is up to date err = os.Chdir(options.TargetDir)
cmd := exec.Command("go", "mod", "tidy")
cmd.Dir = options.TargetDir
cmd.Stderr = os.Stderr
if !quiet {
println("")
cmd.Stdout = os.Stdout
}
err = cmd.Run()
if err != nil { if err != nil {
return err return err
} }
if !ciMode {
// Run `go mod tidy` to ensure `go.sum` is up to date
cmd := exec.Command("go", "mod", "tidy")
cmd.Dir = options.TargetDir
cmd.Stderr = os.Stderr
if !quiet {
println("")
cmd.Stdout = os.Stdout
}
err = cmd.Run()
if err != nil {
return err
}
} else {
// Update go mod
workspace := os.Getenv("GITHUB_WORKSPACE")
println("GitHub workspace:", workspace)
if workspace == "" {
os.Exit(1)
}
updateReplaceLine(workspace)
}
if options.InitGit { if options.InitGit {
err = initGit(options) err = initGit(options)
if err != nil { if err != nil {
@ -243,3 +264,41 @@ func findAuthorDetails(options *templates.Options) {
} }
} }
} }
func updateReplaceLine(targetPath string) {
file, err := os.Open("go.mod")
if err != nil {
log.Fatal(err)
}
var lines []string
scanner := bufio.NewScanner(file)
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
err = file.Close()
if err != nil {
log.Fatal(err)
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
for i, line := range lines {
println(line)
if strings.HasPrefix(line, "// replace") {
println("Found replace line")
splitLine := strings.Split(line, " ")
splitLine[5] = targetPath + "/v2"
lines[i] = strings.Join(splitLine[1:], " ")
continue
}
}
err = os.WriteFile("go.mod", []byte(strings.Join(lines, "\n")), 0644)
if err != nil {
log.Fatal(err)
}
}

View file

@ -1 +1 @@
v2.0.0-rc.1.1 v2.0.0

View file

@ -17,14 +17,9 @@ const DwmwaSystemBackdropType DWMWINDOWATTRIBUTE = 38
const SPI_GETHIGHCONTRAST = 0x0042 const SPI_GETHIGHCONTRAST = 0x0042
const HCF_HIGHCONTRASTON = 0x00000001 const HCF_HIGHCONTRASTON = 0x00000001
// BackdropType defines the type of translucency we wish to use
type BackdropType int32 type BackdropType int32
const DwmsbtAuto BackdropType = 0
const DwmsbtDisable = 1 // None
const DwmsbtMainWindow = 2 // Mica
const DwmsbtTransientWindow = 3 // Acrylic
const DwmsbtTabbedWindow = 4 // Tabbed
func dwmSetWindowAttribute(hwnd uintptr, dwAttribute DWMWINDOWATTRIBUTE, pvAttribute unsafe.Pointer, cbAttribute uintptr) { func dwmSetWindowAttribute(hwnd uintptr, dwAttribute DWMWINDOWATTRIBUTE, pvAttribute unsafe.Pointer, cbAttribute uintptr) {
ret, _, err := procDwmSetWindowAttribute.Call( ret, _, err := procDwmSetWindowAttribute.Call(
hwnd, hwnd,
@ -46,10 +41,18 @@ func SupportsCustomThemes() bool {
return IsWindowsVersionAtLeast(10, 0, 17763) return IsWindowsVersionAtLeast(10, 0, 17763)
} }
func SupportsBackdropTypes() bool {
return IsWindowsVersionAtLeast(10, 0, 22621)
}
func SupportsImmersiveDarkMode() bool {
return IsWindowsVersionAtLeast(10, 0, 18985)
}
func SetTheme(hwnd uintptr, useDarkMode bool) { func SetTheme(hwnd uintptr, useDarkMode bool) {
if IsWindowsVersionAtLeast(10, 0, 17763) { if SupportsThemes() {
attr := DwmwaUseImmersiveDarkModeBefore20h1 attr := DwmwaUseImmersiveDarkModeBefore20h1
if IsWindowsVersionAtLeast(10, 0, 18985) { if SupportsImmersiveDarkMode() {
attr = DwmwaUseImmersiveDarkMode attr = DwmwaUseImmersiveDarkMode
} }
var winDark int32 var winDark int32
@ -61,10 +64,10 @@ func SetTheme(hwnd uintptr, useDarkMode bool) {
} }
func EnableTranslucency(hwnd uintptr, backdrop BackdropType) { func EnableTranslucency(hwnd uintptr, backdrop BackdropType) {
if IsWindowsVersionAtLeast(10, 0, 22579) { if SupportsBackdropTypes() {
dwmSetWindowAttribute(hwnd, DwmwaSystemBackdropType, unsafe.Pointer(&backdrop), unsafe.Sizeof(backdrop)) dwmSetWindowAttribute(hwnd, DwmwaSystemBackdropType, unsafe.Pointer(&backdrop), unsafe.Sizeof(backdrop))
} else { } else {
println("Warning: Translucency unavailable on Windows < 22579") println("Warning: Translucency type unavailable on Windows < 22621")
} }
} }

View file

@ -105,11 +105,10 @@ func NewWindow(parent winc.Controller, appoptions *options.App, versionInfo *ope
result.OnSuspend = appoptions.Windows.OnSuspend result.OnSuspend = appoptions.Windows.OnSuspend
result.OnResume = appoptions.Windows.OnResume result.OnResume = appoptions.Windows.OnResume
if appoptions.Windows.WindowIsTranslucent { if appoptions.Windows.WindowIsTranslucent {
// TODO: Migrate to win32 package if !win32.SupportsBackdropTypes() {
if !win32.IsWindowsVersionAtLeast(10, 0, 22579) {
result.SetTranslucentBackground() result.SetTranslucentBackground()
} else { } else {
win32.EnableTranslucency(result.Handle(), win32.BackdropType(appoptions.Windows.TranslucencyType)) win32.EnableTranslucency(result.Handle(), win32.BackdropType(appoptions.Windows.BackdropType))
} }
} }

View file

@ -27,11 +27,11 @@ const (
type BackdropType int32 type BackdropType int32
const ( const (
Auto BackdropType = 0 Auto BackdropType = 0
Disable BackdropType = 1 // None None BackdropType = 1
MainWindow BackdropType = 2 // Mica Mica BackdropType = 2
TransientWindow BackdropType = 3 // Acrylic Acrylic BackdropType = 3
TabbedWindow BackdropType = 4 // Tabbed Tabbed BackdropType = 4
) )
func RGB(r, g, b uint8) int32 { func RGB(r, g, b uint8) int32 {
@ -81,8 +81,8 @@ type Options struct {
// Custom settings for dark/light mode // Custom settings for dark/light mode
CustomTheme *ThemeSettings CustomTheme *ThemeSettings
// Windows 11 22579 minimum // Select the type of translucent backdrop. Requires Windows 11 22621 or later.
TranslucencyType BackdropType BackdropType BackdropType
// User messages that can be customised // User messages that can be customised
Messages *Messages Messages *Messages

View file

@ -47,6 +47,8 @@ func main() {
var newVersion string var newVersion string
if len(os.Args) > 1 { if len(os.Args) > 1 {
newVersion = os.Args[1] newVersion = os.Args[1]
err := os.WriteFile(versionFile, []byte(newVersion), 0755)
checkError(err)
} else { } else {
newVersion = updateVersion() newVersion = updateVersion()
} }

View file

@ -1,22 +0,0 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"vueIndentScriptAndStyle": false,
"parser": "mdx"
}

View file

@ -5,17 +5,45 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta
### Installation ### Installation
``` ```
$ yarn $ npm
``` ```
### Local Development ### Local Development
``` ```
$ yarn start $ npm run start
``` ```
Other languages:
```
npm run start -- --locale <language>
```
language - The language code configured in the i18n field in the docusaurus.config.js file.
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Translate
After the English source file is updated, run the following command to submit the source file to Crowdin:
```
npm run crowdin push -- -b <branch>
```
branch - Branch name in crowdin project
Run the following command to pull the translated files in crowdin to the local:
```
npm run crowdin pull -- -b <branch> -l <languageCode>
```
languageCode - **Note** that this refers to the language code in the crowdin project.
The recommended practice is to update the English source file locally, then translate the file in crowdin, and finally pull the translated file to the local.
### Build ### Build
``` ```
@ -23,19 +51,3 @@ $ yarn build
``` ```
This command generates static content into the `build` directory and can be served using any static contents hosting service. This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

View file

@ -1,3 +1,3 @@
module.exports = { module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
}; };

View file

@ -197,7 +197,7 @@ months ago.
I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist: I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist:
- [Misitebao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder. - [Misite Bao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder.
- [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and - [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and
[go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible. [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible.
- [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails. - [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails.

View file

@ -0,0 +1,97 @@
---
slug: wails-v2-released
title: Wails v2 Released
authors: [leaanthony]
tags: [wails, v2]
---
```mdx-code-block
<div class="text--center">
<img
src={require("@site/static/img/blog/montage.png").default}
width="75%"
class="screenshot"
/>
</div>
<br />
```
# It's here!
Today marks the release of [Wails](https://wails.io) v2. It's been about 18 months since the first v2 alpha and about a year from the first beta release. I'm truly grateful to everyone involved in the evolution of the project.
Part of the reason it took that long was due to wanting to get to some definition of completeness before officially calling it v2. The truth is, there's never a perfect time to tag a release - there's always outstanding issues or "just one more" feature to squeeze in. What tagging an imperfect major release does do, however, is to provide a bit of stability for users of the project, as well as a bit of a reset for the developers.
This release is more than I'd ever expected it to be. I hope it gives you as much pleasure as it has given us to develop it.
# What _is_ Wails?
If you are unfamiliar with Wails, it is a project that enables Go programmers to provide rich frontends for their Go programs using familiar web technologies. It's a lightweight, Go alternative to Electron. Much more information can be found on the [official site](https://wails.io/docs/introduction).
# What's new?
The v2 release is a huge leap forward for the project, addressing many of the pain points of v1. If you have not read any of the blog posts on the Beta releases for [macOS](/blog/wails-v2-beta-for-mac), [Windows](/blog/wails-v2-beta-for-windows) or [Linux](/blog/wails-v2-beta-for-linux), then I encourage you to do so
as it covers all the major changes in more detail. In summary:
- Webview2 component for Windows that supports modern web standards and debugging capabilities.
- [Dark / Light theme](/docs/reference/options#theme) + [custom theming](/docs/reference/options#customtheme) on Windows.
- Windows now has no CGO requirements.
- Out-of-the-box support for Svelte, Vue, React, Preact, Lit & Vanilla project templates.
- [Vite](https://vitejs.dev/) integration providing a hot-reload development environment for your application.
- Native application [menus](/docs/guides/application-development#application-menu) and [dialogs](/docs/reference/runtime/dialog).
- Native window translucency effects for [Windows](/docs/reference/options#windowistranslucent) and [macOS](/docs/reference/options#windowistranslucent-1). Support for Mica & Acrylic backdrops.
- Easily generate an [NSIS installer](/docs/guides/windows-installer) for Windows deployments.
- A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging.
- Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble).
- Support for compressing your application using [UPX](https://upx.github.io/).
- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods).
- No extra libraries or DLLs are required to be shipped with your application. For any platform.
- No requirement to bundle frontend assets. Just develop your application like any other web application.
# Credit & Thanks
Getting to v2 has been a huge effort. There have been ~2.2K commits by 89 contributors between the initial alpha and the release today, and many, many more that have provided translations, testing, feedback and help on the discussion forums as well as the issue tracker. I'm so unbelievably grateful to each one of you. I'd also like to give an extra special thank you to all the project sponsors who have provided guidance, advice and feedback. Everything you do is hugely appreciated.
There are a few people I'd like to give special mention to:
Firstly, a **huge** thank you to [@stffabi](https://github.com/stffabi) who has provided so many contributions which we all benefit from, as well as providing a lot of support on many issues. He has provided some key features such as the external dev server support which transformed our dev mode offering by allowing us to hook into [Vite](https://vitejs.dev/)'s superpowers. It's fair to say that Wails v2 would be a far less exciting release without his [incredible contributions](https://github.com/wailsapp/wails/commits?author=stffabi&since=2020-01-04). Thank you so much @stffabi!
I'd also like to give a huge shout-out to [@misitebao](https://github.com/misitebao) who has tirelessly been maintaining the website, as well as providing Chinese translations, managing Crowdin and helping new translators get up to speed. This is a hugely important task, and I'm extremely grateful for all the time and effort put into this! You rock!
Last, but not least, a huge thank you to Mat Ryer who has provided advice and support during the development of v2. Writing xBar together using an early Alpha of v2 was helpful in shaping the direction of v2, as well as give me an understanding of some design flaws in the early releases. I'm happy to announce that as of today, we will start to port xBar to Wails v2, and it will become the flagship application for the project. Cheers Mat!
# Lessons Learnt
There are a number of lessons learnt in getting to v2 that will shape development moving forward.
## Smaller, Quicker, Focused Releases
In the course of developing v2, there were many features and bug fixes that were developed on an ad-hoc basis. This led to longer release cycles and were harder to debug. Moving forward, we are going to create releases more often that will include a reduced number of features. A release will involve updates to documentation as well as thorough testing. Hopefully, these smaller, quicker, focussed releases will lead to fewer regressions and better quality documentation.
## Encourage Engagement
When starting this project, I wanted to immediately help everyone who had a problem. Issues were "personal" and I wanted them resolved as quickly as possible. This is unsustainable and ultimately works against the longevity of the project. Moving forward, I will be giving more space for people to get involved in answering questions and triaging issues. It would be good to get some tooling to help with this so if you have any suggestions, please join in the discussion [here](https://github.com/wailsapp/wails/discussions/1855).
## Learning to say No
The more people that engage with an Open Source project, the more requests there will be for additional features that may or may not be useful to the majority of people. These features will take an initial amount of time to develop and debug, and incur an ongoing maintenance cost from that point on. I myself am the most guilty of this, often wanting to "boil the sea" rather than provide the minimum viable feature. Moving forward, we will need to say "No" a bit more to adding core features and focus our energies on a way to empower developers to provide that functionality themselves. We are looking seriously into plugins for this scenario. This will allow anyone to extend the project as they see fit, as well as providing an easy way to contribute towards the project.
# Looking to the Future
There are so many core features we are looking at to add to Wails in the next major development cycle already. The [roadmap](https://github.com/wailsapp/wails/discussions/1484) is full of interesting ideas, and I'm keen to start work on them. One of the big asks has been for multiple window support. It's a tricky one and to do it right, and we may need to look at providing an alternative API, as the current one was not designed with this in mind. Based on some preliminary ideas and feedback, I think you'll like where we're looking to go with it.
I'm personally very excited at the prospect of getting Wails apps running on mobile. We already have a demo project showing that it is possible to run a Wails app on Android, so I'm really keen to explore where we can go with this!
A final point I'd like to raise is that of feature parity. It has long been a core principle that we wouldn't add anything to the project without there being full cross-platform support for it. Whilst this has proven to be (mainly) achievable so far, it has really held the project back in releasing new features. Moving forward, we will be adopting a slightly different approach: any new feature that cannot be immediately released for all platforms will be released under an experimental configuration or API. This allows early adopters on certain platforms to try the feature and provide feedback that will feed into the final design of the feature. This, of course, means that there are no guarantees of API stability until it is fully supported by all the platforms it can be supported on, but at least it will unblock development.
# Final Words
I'm really proud of what we've been able to achieve with the V2 release. It's amazing to see what people have already been able to build using the beta releases so far. Quality applications like [Varly](https://varly.app/), [Surge](https://getsurge.io/) and [October](https://october.utf9k.net/). I encourage you to check them out.
This release was achieved through the hard work of many contributors. Whilst it is free to download and use, it has not come about through zero cost. Make no mistakes, this project has come at considerable cost. It has not only been my time and the time of each and every contributor, but also the cost of absence from friends and families of each of those people too. That's why I'm extremely grateful for every second that has been dedicated to making this project happen. The more contributors we have, the more this effort can be spread out and the more we can achieve together. I'd like to encourage you all to pick one thing that you can contribute, whether it is confirming someone's bug, suggesting a fix, making a documentation change or helping out someone who needs it. All of these small things have such a huge impact! It would be so awesome if you too were part of the story in getting to v3.
Enjoy!
&dash; Lea
PS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!

View file

@ -8,7 +8,7 @@ You can run your application in development mode by running `wails dev` from you
- Build your application and run it - Build your application and run it
- Bind your Go code to the frontend so it can be called from Javascript - Bind your Go code to the frontend so it can be called from Javascript
- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change - Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change
- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console
To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev).

View file

@ -20,7 +20,7 @@ Wails has a number of common dependencies that are required before installation:
### Go ### Go
Download Go from the [Go Downloads Page](https://go.dev/doc/install). Download Go from the [Go Downloads Page](https://go.dev/dl/).
Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks:

View file

@ -14,7 +14,7 @@ To customise the obfuscation settings, you can use the `-garbleargs` flag:
wails build -obfuscate -garbleargs "-literals -tiny -seed=myrandomseed" wails build -obfuscate -garbleargs "-literals -tiny -seed=myrandomseed"
``` ```
These settings may be persisted in your [project config](/guides/reference/project-config). These settings may be persisted in your [project config](../reference/project-config).
## How it works ## How it works

View file

@ -12,7 +12,7 @@ Javascript methods that can be called, just as if they were local Javascript met
```mdx-code-block ```mdx-code-block
<div className="text--center"> <div className="text--center">
<img src={require("@site/static/img/architecture.webp").default} width="75%" /> <img src={require("@site/static/img/architecture.webp").default} style={{"width":"75%", "max-width":"800px"}} />
</div> </div>
``` ```

View file

@ -19,7 +19,7 @@ and power of Go, combined with a rich, modern frontend.
- No CGO or external DLLs required on Windows - No CGO or external DLLs required on Windows
- Live development mode using the power of [Vite](https://vitejs.dev/) - Live development mode using the power of [Vite](https://vitejs.dev/)
- Powerful CLI to easily Create, Build and Package applications - Powerful CLI to easily Create, Build and Package applications
- A rich [runtime library](/docs/next/reference/runtime/intro) - A rich [runtime library](/docs/reference/runtime/intro)
- Applications built with Wails are Apple & Microsoft Store compliant - Applications built with Wails are Apple & Microsoft Store compliant
This is [varly](https://varly.app) - a desktop application for This is [varly](https://varly.app) - a desktop application for
@ -29,7 +29,10 @@ you'd expect from a modern native app.
```mdx-code-block ```mdx-code-block
<p class="text--center"> <p class="text--center">
<a href="https://varly.app/"> <a href="https://varly.app/">
<img src={require("@site/static/img/varly.webp").default} width="75%" /> <img
src={require("@site/static/img/showcase/varly2.webp").default}
style={{ width: "75%", "max-width": "800px" }}
/>
</a> </a>
</p> </p>
``` ```

View file

@ -53,7 +53,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
`wails build` is used for compiling your project to a production-ready binary. `wails build` is used for compiling your project to a production-ready binary.
| Flag | Description | Default | | Flag | Description | Default |
| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | |:---------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------|
| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.<br/>arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | | -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.<br/>arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. |
| -clean | Cleans the `build/bin` directory | | | -clean | Cleans the `build/bin` directory | |
| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | | -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go |
@ -71,7 +71,9 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | | -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false |
| -trimpath | Remove all file system paths from the resulting executable. | false | | -trimpath | Remove all file system paths from the resulting executable. | false |
| -race | Build with Go's race detector | false | | -race | Build with Go's race detector | false |
| -windowsconsole | Keep the console window for Windows builds | false | | -windowsconsole | Keep the console window for Windows builds | |
| -obfuscate | Obfuscate the application using [garble](https://github.com/burrowers/garble) | false |
| -garbleargs | Arguments to pass to garble | `-literals -tiny -seed=random` |
For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide.

View file

@ -48,6 +48,7 @@ func main() {
Windows: &windows.Options{ Windows: &windows.Options{
WebviewIsTransparent: false, WebviewIsTransparent: false,
WindowIsTranslucent: false, WindowIsTranslucent: false,
BackdropType: windows.Mica,
DisableWindowIcon: false, DisableWindowIcon: false,
DisableFramelessWindowDecorations: false, DisableFramelessWindowDecorations: false,
WebviewUserDataPath: "", WebviewUserDataPath: "",
@ -63,6 +64,10 @@ func main() {
}, },
// User messages that can be customised // User messages that can be customised
Messages *windows.Messages Messages *windows.Messages
// OnSuspend is called when Windows enters low power mode
OnSuspend func()
// OnResume is called when Windows resumes from low power mode
OnResume func()
}, },
Mac: &mac.Options{ Mac: &mac.Options{
TitleBar: &mac.TitleBar{ TitleBar: &mac.TitleBar{
@ -364,7 +369,7 @@ Type: `[]interface{}`
### Windows ### Windows
This defines [Windows specific options](#windows-specific-options). This defines [Windows specific options](#windows).
Name: Windows<br/> Name: Windows<br/>
Type: `*windows.Options` Type: `*windows.Options`
@ -381,11 +386,39 @@ Type: `bool`
#### WindowIsTranslucent #### WindowIsTranslucent
Setting this to `true` will make the window background translucent. Often combined Setting this to `true` will make the window background translucent. Often combined
with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. with [WebviewIsTransparent](#WebviewIsTransparent).
For Windows 11 versions before build 22621, this will use the [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw)
method for translucency, which can be slow. For Windows 11 versions after build 22621, this will enable the
newer translucency types that are much faster. By default, the type of translucency used will be determined
by Windows. To configure this, use the [BackdropType](#BackdropType) option.
Name: WindowIsTranslucent<br/> Name: WindowIsTranslucent<br/>
Type: `bool` Type: `bool`
#### BackdropType
:::note
Requires Windows 11 build 22621 or later.
:::
Sets the translucency type of the window. This is only applicable if [WindowIsTranslucent](#WindowIsTranslucent) is set to `true`.
Name: BackdropType<br/>
Type `windows.BackdropType`
The value can be one of the following:
| Value | Description |
|---------|-------------------------------------------------------------------------------------------|
| Auto | Let Windows decide which backdrop to use |
| None | Do not use translucency |
| Acrylic | Use [Acrylic](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) effect |
| Mica | Use [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) effect |
| Tabbed | Use Tabbed. This is a backdrop that is similar to Mica. |
#### DisableWindowIcon #### DisableWindowIcon
Setting this to `true` will remove the icon in the top left corner of the title bar. Setting this to `true` will remove the icon in the top left corner of the title bar.
@ -515,21 +548,21 @@ Type: `uint16`
#### OnSuspend #### OnSuspend
If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) If set, this function will be called when Windows initiates a switch to low power mode (suspend/hibernate)
Name: OnSuspend<br/> Name: OnSuspend<br/>
Type: `func()` Type: `func()`
#### OnResume #### OnResume
If set, this function will be called when windows resumes from low power mode (suspend/hibernate) If set, this function will be called when Windows resumes from low power mode (suspend/hibernate)
Name: OnResume<br/> Name: OnResume<br/>
Type: `func()` Type: `func()`
### Mac ### Mac
This defines [Mac specific options](#mac-specific-options). This defines [Mac specific options](#mac).
Name: Mac<br/> Name: Mac<br/>
Type: `*mac.Options` Type: `*mac.Options`
@ -695,7 +728,7 @@ When clicked, that will open an about message box:
### Linux ### Linux
This defines [Linux specific options](#linux-specific-options). This defines [Linux specific options](#linux).
Name: Linux<br/> Name: Linux<br/>
Type: `*linux.Options` Type: `*linux.Options`

View file

@ -18,7 +18,7 @@ const config = {
i18n: { i18n: {
defaultLocale: "en", defaultLocale: "en",
locales: ["en", "zh-Hans", "ja", "ru", "ko"], locales: ["en", "zh-Hans", "ja"],
localeConfigs: { localeConfigs: {
en: { en: {
label: "English", label: "English",
@ -217,7 +217,7 @@ const config = {
], ],
}, },
], ],
copyright: `Copyright © ${new Date().getFullYear()} Lea Anthony. Built with Docusaurus.`, copyright: `Copyright © ${new Date().getFullYear()} Lea Anthony`,
}, },
tableOfContents: { tableOfContents: {
minHeadingLevel: 2, minHeadingLevel: 2,
@ -232,13 +232,6 @@ const config = {
disableSwitch: false, disableSwitch: false,
respectPrefersColorScheme: true, respectPrefersColorScheme: true,
}, },
announcementBar: {
id: "announcement-bar",
content: "Wails v2 is currently in Beta",
backgroundColor: "#b00",
textColor: "#FFF",
isCloseable: false,
},
algolia: { algolia: {
appId: "AWTCNFZ4FF", appId: "AWTCNFZ4FF",
apiKey: "a6c0adbe611ee2535f3da5e8fd7b2200", apiKey: "a6c0adbe611ee2535f3da5e8fd7b2200",

View file

@ -3,7 +3,7 @@
"message": "Feature Rich" "message": "Feature Rich"
}, },
"homepage.Features.Description1": { "homepage.Features.Description1": {
"message": "Build comprehensive cross-platform applications using native UI elements such as menus, dialogs, etc." "message": "Build comprehensive cross-platform applications using native UI elements such as menus and dialogs."
}, },
"homepage.Features.Title2": { "homepage.Features.Title2": {
"message": "Familiar" "message": "Familiar"

View file

@ -1,38 +0,0 @@
{
"version.label": {
"message": "v2.0.0-beta.44",
"description": "The label for version v2.0.0-beta.44"
},
"sidebar.tutorialSidebar.category.Getting Started": {
"message": "Getting Started",
"description": "The label for category Getting Started in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Community": {
"message": "Community",
"description": "The label for category Community in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Tutorials": {
"message": "Tutorials",
"description": "The label for category Tutorials in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Contributing": {
"message": "Contributing",
"description": "The label for category Contributing in sidebar tutorialSidebar"
}
}

View file

@ -0,0 +1,38 @@
{
"version.label": {
"message": "v2.0.0",
"description": "The label for version v2.0.0"
},
"sidebar.docs.category.Getting Started": {
"message": "Getting Started",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.docs.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar docs"
},
"sidebar.docs.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar docs"
},
"sidebar.docs.category.Community": {
"message": "Community",
"description": "The label for category Community in sidebar docs"
},
"sidebar.docs.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar docs"
},
"sidebar.docs.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "Tutorials",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.link.Contributing": {
"message": "Contributing",
"description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing"
}
}

View file

@ -44,7 +44,7 @@
"description": "The label of footer link with label=Blog linking to /blog" "description": "The label of footer link with label=Blog linking to /blog"
}, },
"copyright": { "copyright": {
"message": "Copyright © 2022 Lea Anthony. Built with Docusaurus.", "message": "Copyright © 2022 Lea Anthony",
"description": "The footer copyright" "description": "The footer copyright"
}, },
"link.item.label.Awesome": { "link.item.label.Awesome": {

View file

@ -3,7 +3,7 @@
"message": "豊富な機能" "message": "豊富な機能"
}, },
"homepage.Features.Description1": { "homepage.Features.Description1": {
"message": "メニューやダイアログなどのネイティブUI要素を使用して、クロスプラットフォームアプリを構築しましょう。" "message": "Build comprehensive cross-platform applications using native UI elements such as menus and dialogs."
}, },
"homepage.Features.Title2": { "homepage.Features.Title2": {
"message": "使い慣れた技術" "message": "使い慣れた技術"

View file

@ -8,6 +8,7 @@ tags:
- v2 - v2
--- ---
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails.webp").default} src={require("@site/static/img/wails.webp").default}
@ -15,8 +16,8 @@ tags:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
When I first announced Wails on Reddit, just over 2 years ago from a train in Sydney, I did not expect it to get much attention. A few days later, a prolific tech vlogger released a tutorial video, gave it a positive review and from that point on, interest in the project has skyrocketed. When I first announced Wails on Reddit, just over 2 years ago from a train in Sydney, I did not expect it to get much attention. A few days later, a prolific tech vlogger released a tutorial video, gave it a positive review and from that point on, interest in the project has skyrocketed.
@ -32,6 +33,7 @@ No, I'm not joking: *No* *CGO* *dependency* 🤯! The thing about Windows is tha
### WebView2 Chromium Renderer ### WebView2 Chromium Renderer
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/devtools.png").default} src={require("@site/static/img/devtools.png").default}
@ -39,8 +41,8 @@ No, I'm not joking: *No* *CGO* *dependency* 🤯! The thing about Windows is tha
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Finally, Windows developers get a first class rendering engine for their applications! Gone are the days of contorting your frontend code to work on Windows. On top of that, you get a first-class developer tools experience! Finally, Windows developers get a first class rendering engine for their applications! Gone are the days of contorting your frontend code to work on Windows. On top of that, you get a first-class developer tools experience!
@ -52,6 +54,7 @@ Gophers rejoice! The single binary dream lives on!
### New Features ### New Features
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails-menus.webp").default} src={require("@site/static/img/wails-menus.webp").default}
@ -59,8 +62,8 @@ Gophers rejoice! The single binary dream lives on!
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators.
@ -68,6 +71,7 @@ There were a huge number of requests in v1 for the ability to have greater contr
There is now the option to generate IDE configuration along with your project. This means that if you open your project in a supported IDE, it will already be configured for building and debugging your application. Currently VSCode is supported but we hope to support other IDEs such as Goland soon. There is now the option to generate IDE configuration along with your project. This means that if you open your project in a supported IDE, it will already be configured for building and debugging your application. Currently VSCode is supported but we hope to support other IDEs such as Goland soon.
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/vscode.webp").default} src={require("@site/static/img/vscode.webp").default}
@ -75,8 +79,8 @@ There is now the option to generate IDE configuration along with your project. T
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
### No requirement to bundle assets ### No requirement to bundle assets
@ -92,6 +96,7 @@ You just pass a single `embed.FS` that contains all your assets into your applic
### New Development Experience ### New Development Experience
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/browser.webp").default} src={require("@site/static/img/browser.webp").default}
@ -99,8 +104,8 @@ You just pass a single `embed.FS` that contains all your assets into your applic
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Now that assets don't need to be bundled, it's enabled a whole new development experience. The new `wails dev` command will build and run your application, but instead of using the assets in the `embed.FS`, it loads them directly from disk. Now that assets don't need to be bundled, it's enabled a whole new development experience. The new `wails dev` command will build and run your application, but instead of using the assets in the `embed.FS`, it loads them directly from disk.
@ -117,6 +122,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates ### Remote Templates
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/remote.webp").default} src={require("@site/static/img/remote.webp").default}
@ -124,8 +130,8 @@ In addition to this, another JS module is dynamically generated wrapping all you
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
@ -139,7 +145,7 @@ There were many twists and turns, pivots and u-turns to get to this point. This
I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist: I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist:
- [Misitebao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder. - [Misite Bao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder.
- [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible. - [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible.
- [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails. - [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails.
- [Mat Ryer](https://github.com/matryer) - His support, encouragement and feedback has really helped drive the project forward. - [Mat Ryer](https://github.com/matryer) - His support, encouragement and feedback has really helped drive the project forward.

View file

@ -8,6 +8,7 @@ tags:
- v2 - v2
--- ---
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails-mac.webp").default} src={require("@site/static/img/wails-mac.webp").default}
@ -15,8 +16,8 @@ tags:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Today marks the first beta release of Wails v2 for Mac! It's taken quite a while to get to this point and I'm hoping that today's release will give you something that's reasonably useful. There have been a number of twists and turns to get to this point and I'm hoping, with your help, to iron out the crinkles and get the Mac port polished for the final v2 release. Today marks the first beta release of Wails v2 for Mac! It's taken quite a while to get to this point and I'm hoping that today's release will give you something that's reasonably useful. There have been a number of twists and turns to get to this point and I'm hoping, with your help, to iron out the crinkles and get the Mac port polished for the final v2 release.
@ -26,6 +27,7 @@ So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windo
### New Features ### New Features
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails-menus-mac.webp").default} src={require("@site/static/img/wails-menus-mac.webp").default}
@ -33,8 +35,8 @@ So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windo
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators.
@ -78,6 +80,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates ### Remote Templates
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/remote-mac.webp").default} src={require("@site/static/img/remote-mac.webp").default}
@ -85,8 +88,8 @@ In addition to this, another JS module is dynamically generated wrapping all you
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
@ -96,6 +99,7 @@ With v2, I wanted to empower the community by giving you the ability to create a
Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wails project now supports M1 native builds: Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wails project now supports M1 native builds:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/build-darwin-arm.webp").default} src={require("@site/static/img/build-darwin-arm.webp").default}
@ -103,11 +107,12 @@ Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wa
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
You can also specify `darwin/amd64` as a target too: You can also specify `darwin/amd64` as a target too:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/build-darwin-amd.webp").default} src={require("@site/static/img/build-darwin-amd.webp").default}
@ -115,11 +120,12 @@ You can also specify `darwin/amd64` as a target too:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink: Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/build-darwin-universal.webp").default} src={require("@site/static/img/build-darwin-universal.webp").default}
@ -127,13 +133,14 @@ Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
### Cross Compilation to Windows ### Cross Compilation to Windows
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker. Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/build-cross-windows.webp").default} src={require("@site/static/img/build-cross-windows.webp").default}
@ -141,8 +148,8 @@ Because Wails v2 for Windows is pure Go, you can target Windows builds without d
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
### WKWebView Renderer ### WKWebView Renderer

View file

@ -8,6 +8,7 @@ tags:
- v2 - v2
--- ---
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails-linux.webp").default} src={require("@site/static/img/wails-linux.webp").default}
@ -15,13 +16,14 @@ tags:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
I'm pleased to finally announce that Wails v2 is now in beta for Linux! It is somewhat ironic that the very first experiments with v2 was on Linux and yet it has ended up as the last release. That being said, the v2 we have today is very different from those first experiments. So without further ado, let's go over the new features: I'm pleased to finally announce that Wails v2 is now in beta for Linux! It is somewhat ironic that the very first experiments with v2 was on Linux and yet it has ended up as the last release. That being said, the v2 we have today is very different from those first experiments. So without further ado, let's go over the new features:
### New Features ### New Features
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/wails-menus-linux.webp").default} src={require("@site/static/img/wails-menus-linux.webp").default}
@ -29,8 +31,8 @@ I'm pleased to finally announce that Wails v2 is now in beta for Linux! It is so
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators. There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators.
@ -65,6 +67,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates ### Remote Templates
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/remote-linux.webp").default} src={require("@site/static/img/remote-linux.webp").default}
@ -72,8 +75,8 @@ In addition to this, another JS module is dynamically generated wrapping all you
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! It also meant that we didn't have cool modern templates for the latest and greatest tech stacks. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
@ -83,15 +86,16 @@ With v2, I wanted to empower the community by giving you the ability to create a
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker. Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/linux-build-cross-windows.webp" src={require("@site/static/img/linux-build-cross-windows.webp").default}
width="80%" width="80%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
### In Conclusion ### In Conclusion

View file

@ -0,0 +1,99 @@
---
slug: wails-v2-released
title: Wails v2 Released
authors:
- leaanthony
tags:
- wails
- v2
---
```mdx-code-block
<div class="text--center">
<img
src={require("@site/static/img/blog/montage.png").default}
width="75%"
class="screenshot"
/>
</div>
<br />
```
# It's here!
Today marks the release of [Wails](https://wails.io) v2. It's been about 18 months since the first v2 alpha and about a year from the first beta release. I'm truly grateful to everyone involved in the evolution of the project.
Part of the reason it took that long was due to wanting to get to some definition of completeness before officially calling it v2. The truth is, there's never a perfect time to tag a release - there's always outstanding issues or "just one more" feature to squeeze in. What tagging an imperfect major release does do, however, is to provide a bit of stability for users of the project, as well as a bit of a reset for the developers.
This release is more than I'd ever expected it to be. I hope it gives you as much pleasure as it has given us to develop it.
# What _is_ Wails?
If you are unfamiliar with Wails, it is a project that enables Go programmers to provide rich frontends for their Go programs using familiar web technologies. It's a lightweight, Go alternative to Electron. Much more information can be found on the [official site](https://wails.io/docs/introduction).
# What's new?
The v2 release is a huge leap forward for the project, addressing many of the pain points of v1. If you have not read any of the blog posts on the Beta releases for [macOS](/blog/wails-v2-beta-for-mac), [Windows](/blog/wails-v2-beta-for-windows) or [Linux](/blog/wails-v2-beta-for-linux), then I encourage you to do so as it covers all the major changes in more detail. In summary:
- Webview2 component for Windows that supports modern web standards and debugging capabilities.
- [Dark / Light theme](/docs/reference/options#theme) + [custom theming](/docs/reference/options#customtheme) on Windows.
- Windows now has no CGO requirements.
- Out-of-the-box support for Svelte, Vue, React, Preact, Lit & Vanilla project templates.
- [Vite](https://vitejs.dev/) integration providing a hot-reload development environment for your application.
- Native application [menus](/docs/guides/application-development#application-menu) and [dialogs](/docs/reference/runtime/dialog).
- Native window translucency effects for [Windows](/docs/reference/options#windowistranslucent) and [macOS](/docs/reference/options#windowistranslucent-1). Support for Mica & Acrylic backdrops.
- Easily generate an [NSIS installer](/docs/guides/windows-installer) for Windows deployments.
- A rich [runtime library](/docs/reference/runtime/intro) providing utility methods for window manipulation, eventing, dialogs, menus and logging.
- Support for [obfuscating](/docs/guides/obfuscated) your application using [garble](https://github.com/burrowers/garble).
- Support for compressing your application using [UPX](https://upx.github.io/).
- Automatic Typescript generation of Go structs. More info [here](/docs/howdoesitwork#calling-bound-go-methods).
- No extra libraries or DLLs are required to be shipped with your application. For any platform.
- No requirement to bundle frontend assets. Just develop your application like any other web application.
# Credit & Thanks
Getting to v2 has been a huge effort. There have been ~2.2K commits by 89 contributors between the initial alpha and the release today, and many, many more that have provided translations, testing, feedback and help on the discussion forums as well as the issue tracker. I'm so unbelievably grateful to each one of you. I'd also like to give an extra special thank you to all the project sponsors who have provided guidance, advice and feedback. Everything you do is hugely appreciated.
There are a few people I'd like to give special mention to:
Firstly, a **huge** thank you to [@stffabi](https://github.com/stffabi) who has provided so many contributions which we all benefit from, as well as providing a lot of support on many issues. He has provided some key features such as the external dev server support which transformed our dev mode offering by allowing us to hook into [Vite](https://vitejs.dev/)'s superpowers. It's fair to say that Wails v2 would be a far less exciting release without his [incredible contributions](https://github.com/wailsapp/wails/commits?author=stffabi&since=2020-01-04). Thank you so much @stffabi!
I'd also like to give a huge shout-out to [@misitebao](https://github.com/misitebao) who has tirelessly been maintaining the website, as well as providing Chinese translations, managing Crowdin and helping new translators get up to speed. This is a hugely important task, and I'm extremely grateful for all the time and effort put into this! You rock!
Last, but not least, a huge thank you to Mat Ryer who has provided advice and support during the development of v2. Writing xBar together using an early Alpha of v2 was helpful in shaping the direction of v2, as well as give me an understanding of some design flaws in the early releases. I'm happy to announce that as of today, we will start to port xBar to Wails v2, and it will become the flagship application for the project. Cheers Mat!
# Lessons Learnt
There are a number of lessons learnt in getting to v2 that will shape development moving forward.
## Smaller, Quicker, Focused Releases
In the course of developing v2, there were many features and bug fixes that were developed on an ad-hoc basis. This led to longer release cycles and were harder to debug. Moving forward, we are going to create releases more often that will include a reduced number of features. A release will involve updates to documentation as well as thorough testing. Hopefully, these smaller, quicker, focussed releases will lead to fewer regressions and better quality documentation.
## Encourage Engagement
When starting this project, I wanted to immediately help everyone who had a problem. Issues were "personal" and I wanted them resolved as quickly as possible. This is unsustainable and ultimately works against the longevity of the project. Moving forward, I will be giving more space for people to get involved in answering questions and triaging issues. It would be good to get some tooling to help with this so if you have any suggestions, please join in the discussion [here](https://github.com/wailsapp/wails/discussions/1855).
## Learning to say No
The more people that engage with an Open Source project, the more requests there will be for additional features that may or may not be useful to the majority of people. These features will take an initial amount of time to develop and debug, and incur an ongoing maintenance cost from that point on. I myself am the most guilty of this, often wanting to "boil the sea" rather than provide the minimum viable feature. Moving forward, we will need to say "No" a bit more to adding core features and focus our energies on a way to empower developers to provide that functionality themselves. We are looking seriously into plugins for this scenario. This will allow anyone to extend the project as they see fit, as well as providing an easy way to contribute towards the project.
# Looking to the Future
There are so many core features we are looking at to add to Wails in the next major development cycle already. The [roadmap](https://github.com/wailsapp/wails/discussions/1484) is full of interesting ideas, and I'm keen to start work on them. One of the big asks has been for multiple window support. It's a tricky one and to do it right, and we may need to look at providing an alternative API, as the current one was not designed with this in mind. Based on some preliminary ideas and feedback, I think you'll like where we're looking to go with it.
I'm personally very excited at the prospect of getting Wails apps running on mobile. We already have a demo project showing that it is possible to run a Wails app on Android, so I'm really keen to explore where we can go with this!
A final point I'd like to raise is that of feature parity. It has long been a core principle that we wouldn't add anything to the project without there being full cross-platform support for it. Whilst this has proven to be (mainly) achievable so far, it has really held the project back in releasing new features. Moving forward, we will be adopting a slightly different approach: any new feature that cannot be immediately released for all platforms will be released under an experimental configuration or API. This allows early adopters on certain platforms to try the feature and provide feedback that will feed into the final design of the feature. This, of course, means that there are no guarantees of API stability until it is fully supported by all the platforms it can be supported on, but at least it will unblock development.
# Final Words
I'm really proud of what we've been able to achieve with the V2 release. It's amazing to see what people have already been able to build using the beta releases so far. Quality applications like [Varly](https://varly.app/), [Surge](https://getsurge.io/) and [October](https://october.utf9k.net/). I encourage you to check them out.
This release was achieved through the hard work of many contributors. Whilst it is free to download and use, it has not come about through zero cost. Make no mistakes, this project has come at considerable cost. It has not only been my time and the time of each and every contributor, but also the cost of absence from friends and families of each of those people too. That's why I'm extremely grateful for every second that has been dedicated to making this project happen. The more contributors we have, the more this effort can be spread out and the more we can achieve together. I'd like to encourage you all to pick one thing that you can contribute, whether it is confirming someone's bug, suggesting a fix, making a documentation change or helping out someone who needs it. All of these small things have such a huge impact! It would be so awesome if you too were part of the story in getting to v3.
Enjoy!
&dash; Lea
PS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!

View file

@ -1,8 +1,10 @@
# EmailIt # EmailIt
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/emailit.webp").default} /> <img src={require("@site/static/img/showcase/emailit.webp").default} />
<br /> <br />
</p> </p>
```
[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. Its built using Wails2 and Svelte, and the download is a universal macOS application. [EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. Its built using Wails2 and Svelte, and the download is a universal macOS application.

View file

@ -1,9 +1,11 @@
# EncryptEasy # EncryptEasy
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/encrypteasy.webp").default} /> <img src={require("@site/static/img/showcase/encrypteasy.webp").default} />
<br /> <br />
</p> </p>
```
**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** **[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.**

View file

@ -1,9 +1,11 @@
# FileHound Export Utility # FileHound Export Utility
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/filehound.webp").default} /> <img src={require("@site/static/img/showcase/filehound.webp").default} />
<br /> <br />
</p> </p>
```
[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. [FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities.

View file

@ -1,10 +1,14 @@
# Minecraft Updater # Minecraft Updater
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/showcase/minecraft-mod-updater.webp").default} src={
require("@site/static/img/showcase/minecraft-mod-updater.webp").default
}
/> />
<br /> <br />
</p> </p>
```
[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. Its built using Wails2 and React with [antd](https://ant.design/) as frontend framework. [Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. Its built using Wails2 and React with [antd](https://ant.design/) as frontend framework.

View file

@ -1,11 +1,13 @@
# Modal File Manager # Modal File Manager
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/showcase/modalfilemanager.webp").default} src={require("@site/static/img/showcase/modalfilemanager.webp").default}
/> />
<br /> <br />
</p> </p>
```
[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. [Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions.

View file

@ -1,8 +1,10 @@
# Molley Wallet # Molley Wallet
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/mollywallet.webp").default} /> <img src={require("@site/static/img/showcase/mollywallet.webp").default} />
<br /> <br />
</p> </p>
```
[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. [Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.

View file

@ -1,9 +1,11 @@
# October # October
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/october.webp").default} /> <img src={require("@site/static/img/showcase/october.webp").default} />
<br /> <br />
</p> </p>
```
[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). [October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io).

View file

@ -1,8 +1,10 @@
# Optimus # Optimus
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/optimus.webp").default} /> <img src={require("@site/static/img/showcase/optimus.webp").default} />
<br /> <br />
</p> </p>
```
[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. [Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats.

View file

@ -1,8 +1,10 @@
# Portfall # Portfall
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/portfall.webp").default} /> <img src={require("@site/static/img/showcase/portfall.webp").default} />
<br /> <br />
</p> </p>
```
[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs [Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs

View file

@ -1,10 +1,12 @@
# Restic Browser # Restic Browser
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/showcase/restic-browser-2.png").default} src={require("@site/static/img/showcase/restic-browser-2.png").default}
/> />
<br /> <br />
</p> </p>
```
[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. [Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories.

View file

@ -1,9 +1,11 @@
# RiftShare # RiftShare
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/riftshare-main.webp").default} /> <img src={require("@site/static/img/showcase/riftshare-main.webp").default} />
<br /> <br />
</p> </p>
```
Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app)

View file

@ -1,8 +1,10 @@
# ScriptBar # ScriptBar
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/scriptbar.webp").default} /> <img src={require("@site/static/img/showcase/scriptbar.webp").default} />
<br /> <br />
</p> </p>
```
[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. [ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites.

View file

@ -1,8 +1,10 @@
# Surge # Surge
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/surge.png").default} /> <img src={require("@site/static/img/showcase/surge.png").default} />
<br /> <br />
</p> </p>
```
[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. [Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source.

View file

@ -1,8 +1,10 @@
# Wally # Wally
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/wally.webp").default} /> <img src={require("@site/static/img/showcase/wally.webp").default} />
<br /> <br />
</p> </p>
```
[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. [Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world.

View file

@ -1,8 +1,10 @@
# Wombat # Wombat
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/wombat.webp").default} /> <img src={require("@site/static/img/showcase/wombat.webp").default} />
<br /> <br />
</p> </p>
```
[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. [Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client.

View file

@ -1,8 +1,10 @@
# Ytd # Ytd
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/ytd.webp").default} /> <img src={require("@site/static/img/showcase/ytd.webp").default} />
<br /> <br />
</p> </p>
```
[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. [Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player.

View file

@ -14,12 +14,14 @@ Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wail
:::warning Attention :::warning Attention
**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** **The Wails project does not maintain, is not responsible nor liable for 3rd party templates!**
If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed.
::: :::
## Vue ## Vue
- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) - [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript)

View file

@ -8,6 +8,7 @@ From the project directory, run `wails build`. This will compile your project an
If you run the binary, you should see the default application: If you run the binary, you should see the default application:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/defaultproject.webp").default} src={require("@site/static/img/defaultproject.webp").default}
@ -15,7 +16,7 @@ If you run the binary, you should see the default application:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build). For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build).

View file

@ -8,7 +8,7 @@ You can run your application in development mode by running `wails dev` from you
- Build your application and run it - Build your application and run it
- Bind your Go code to the frontend so it can be called from Javascript - Bind your Go code to the frontend so it can be called from Javascript
- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change - Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change
- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console
To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev).

View file

@ -10,8 +10,7 @@ Now that the CLI is installed, you can generate a new project by using the `wail
Pick your favourite framework: Pick your favourite framework:
<!-- @formatter:off --> ```mdx-code-block
import Tabs from "@theme/Tabs"; import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"; import TabItem from "@theme/TabItem";
@ -19,17 +18,18 @@ import TabItem from "@theme/TabItem";
defaultValue="Svelte" defaultValue="Svelte"
values={[ values={[
{label: "Svelte", value: "Svelte"}, {label: "Svelte", value: "Svelte"},
{label: "React", value: "React"}, {label: "React", value: "React"},
{label: "Vue", value: "Vue"}, {label: "Vue", value: "Vue"},
{label: "Preact", value: "Preact"}, {label: "Preact", value: "Preact"},
{label: "Lit", value: "Lit"}, {label: "Lit", value: "Lit"},
{label: "Vanilla", value: "Vanilla"}, {label: "Vanilla", value: "Vanilla"},
]} ]}
> >
<TabItem value="Svelte"> <TabItem value="Svelte">
Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using Javascript with:<br/><br/> Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using Javascript with:<br/><br/>
wails init -n myproject -t svelte wails init -n myproject -t svelte
If you would rather use Typescript:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t svelte-ts wails init -n myproject -t svelte-ts
@ -39,54 +39,54 @@ If you would rather use Typescript:<br/>
Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/> Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/>
wails init -n myproject -t react wails init -n myproject -t react
If you would rather use Typescript:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t react-ts wails init -n myproject -t react-ts
</TabItem> </TabItem>
<TabItem value="Vue"> <TabItem value="Vue">
<a href={"https://vuejs.org/"}>Vue</a>用のJavascriptプロジェクトを生成する場合:<br/><br/> Generate a <a href={"https://vuejs.org/"}>Vue</a> project using Javascript with:<br/><br/>
wails init -n myproject -t vue wails init -n myproject -t vue
Typescriptプロジェクトを生成する場合:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t vue-ts wails init -n myproject -t vue-ts
</TabItem> </TabItem>
<TabItem value="Preact"> <TabItem value="Preact">
<a href={"https://preactjs.com/"}>Preact</a>用のJavascriptプロジェクトを生成する場合:<br/><br/> Generate a <a href={"https://preactjs.com/"}>Preact</a> project using Javascript with:<br/><br/>
wails init -n myproject -t preact wails init -n myproject -t preact
Typescriptプロジェクトを生成する場合:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t preact-ts wails init -n myproject -t preact-ts
</TabItem> </TabItem>
<TabItem value="Lit"> <TabItem value="Lit">
<a href={"https://lit.dev/"}>Lit</a>用のJavascriptプロジェクトを生成する場合:<br/><br/> Generate a <a href={"https://lit.dev/"}>Lit</a> project using Javascript with:<br/><br/>
wails init -n myproject -t lit wails init -n myproject -t lit
Typescriptプロジェクトを生成する場合:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t lit-ts wails init -n myproject -t lit-ts
</TabItem> </TabItem>
<TabItem value="Vanilla"> <TabItem value="Vanilla">
Vanilla用のJavascriptプロジェクトを生成する場合:<br/><br/> Generate a Vanilla project using Javascript with:<br/><br/>
wails init -n myproject -t vanilla wails init -n myproject -t vanilla
Typescriptプロジェクトを生成する場合:<br/> If you would rather use Typescript:<br/>
wails init -n myproject -t vanilla-ts wails init -n myproject -t vanilla-ts
</TabItem> </TabItem>
</Tabs> </Tabs>
```
<!-- @formatter:on -->
<hr /> <hr />

View file

@ -20,7 +20,7 @@ Wails has a number of common dependencies that are required before installation:
### Go ### Go
Download Go from the [Go Downloads Page](https://go.dev/doc/install). Download Go from the [Go Downloads Page](https://go.dev/dl/).
Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks:
@ -37,8 +37,7 @@ Run `npm --version` to verify.
You will also need to install platform specific dependencies: You will also need to install platform specific dependencies:
<!-- @formatter:off --> ```mdx-code-block
import Tabs from "@theme/Tabs"; import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"; import TabItem from "@theme/TabItem";
@ -46,32 +45,22 @@ import TabItem from "@theme/TabItem";
defaultValue="Windows" defaultValue="Windows"
values={[ values={[
{ label: "Windows", value: "Windows" }, { label: "Windows", value: "Windows" },
{ label: "MacOS", value: "MacOS" }, { label: "MacOS", value: "MacOS" },
{ label: "Linux", value: "Linux" }, { label: "Linux", value: "Linux" },
]} ]}
> >
<TabItem value="MacOS"> <TabItem value="MacOS">
Wailsを使用するには、xcodeコマンドラインツールがインストールされている必要があります。 This can be done by running: <br/> Wails requires that the xcode command line tools are installed. This can be
<code>xcode-select --install</code> done by running <code>xcode-select --install</code>.
</TabItem> </TabItem>
<TabItem value="Windows"> <TabItem value="Windows">
Wails requires that the <a Wails requires that the <a href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a> runtime is installed. Some Windows installations will already have this installed. You can check using the <code>wails doctor</code> command.
href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a>{" "}
runtime is installed. Some Windows installations will already have this installed. You can check using
the{" "}
<code>wails doctor</code> command (see below).
</TabItem> </TabItem>
<TabItem value={"Linux"}> <TabItem value={"Linux"}>
Linux required the standard <code>gcc</code> build tools Linux required the standard <code>gcc</code> build tools plus <code>libgtk3</code> and <code>libwebkit</code>. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run <code>wails doctor</code> after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the <a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
plus <code>libgtk3</code> and <code>libwebkit</code>. Rather than list a ton of commands for different distros, Wails can try to determine
what the installation commands are for your specific distribution. Run <code>wails doctor</code> after
installation
to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the {" "}
<a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
</TabItem> </TabItem>
</Tabs> </Tabs>
```
<!-- @formatter:on -->
## Optional Dependencies ## Optional Dependencies

View file

@ -87,17 +87,21 @@ let response = await fetch('does-not-exist.txt');
This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler:
```mdx-code-block
<p className="text--center"> <p className="text--center">
<img <img
src={require("@site/static/img/assetshandler-does-not-exist.webp").default} src={require("@site/static/img/assetshandler-does-not-exist.webp").default}
/> />
</p> </p>
```
However, if we request `go.mod`, we will see the following output: However, if we request `go.mod`, we will see the following output:
```mdx-code-block
<p className="text--center"> <p className="text--center">
<img src={require("@site/static/img/assetshandler-go-mod.webp").default} /> <img src={require("@site/static/img/assetshandler-go-mod.webp").default} />
</p> </p>
```
This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image:
@ -113,14 +117,18 @@ with:
Then we would see the following: Then we would see the following:
```mdx-code-block
<p className="text--center"> <p className="text--center">
<img <img
src={require("@site/static/img/assetshandler-image.webp").default} src={require("@site/static/img/assetshandler-image.webp").default}
style={{ width: "75%" }} style={{ width: "75%" }}
/> />
</p> </p>
```
:::warning :::warning
Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access
to your filesystem.
Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access to your filesystem.
::: :::

View file

@ -4,7 +4,6 @@ Wails supports application that have no frames. This can be achieved by using th
Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element.
```html ```html
<html> <html>
<head> <head>
@ -66,19 +65,21 @@ func main() {
```html title=index.html ```html title=index.html
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>alwaysontop</title> <title>alwaysontop</title>
</head> </head>
<body style="widows: 1"> <body style="widows: 1">
<div id="app"></div> <div id="app"></div>
<script src="./src/main.js" type="module"></script> <script src="./src/main.js" type="module"></script>
</body> </body>
</html> </html>
``` ```
:::info Fullscreen :::info Fullscreen
If you allow your application to go fullscreen, this drag functionality will be disabled.
If you allow your application to go fullscreen, this drag functionality will be disabled.
::: :::

View file

@ -6,12 +6,14 @@ Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but a
## Visual Studio Code ## Visual Studio Code
```mdx-code-block
<p className="text--center"> <p className="text--center">
<img <img
src={require("@site/static/img/vscode.webp").default} src={require("@site/static/img/vscode.webp").default}
style={{ width: "75%" }} style={{ width: "75%" }}
/> />
</p> </p>
```
When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application.
@ -108,6 +110,7 @@ The `tasks.json` file is simple for the default project as there is no `npm inst
:::info Future Enhancement :::info Future Enhancement
In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically.
::: :::

View file

@ -97,5 +97,8 @@ type PackageManager interface {
Take a look at the other package managers code to get an idea how this works. Take a look at the other package managers code to get an idea how this works.
:::info Remember :::info Remember
If you add support for a new package manager, don't forget to also update this page! If you add support for a new package manager, don't forget to also update this page!
::: :::

View file

@ -0,0 +1,42 @@
# Obfuscated Builds
Wails includes support for obfuscating your application using [garble](https://github.com/burrowers/garble).
To produce an obfuscated build, you can use the `-obfuscate` flag with the `wails build` command:
```bash
wails build -obfuscate
```
To customise the obfuscation settings, you can use the `-garbleargs` flag:
```bash
wails build -obfuscate -garbleargs "-literals -tiny -seed=myrandomseed"
```
These settings may be persisted in your [project config](../reference/project-config).
## How it works
In a standard build, all bound methods are available in the frontend under the `window.go` variable. When these methods are called, the corresponding backend method is called using the fully qualified function name. When using an obfuscated build, methods are bound using an ID instead of a name. The bindings generated in the `wailsjs` directory use these IDs to call the backend functions.
:::note
To ensure that your application will work in obfuscated mode, you must use the generated bindings under the `wailsjs` directory in your application.
:::
## Example
Importing the "Greet" method from the bindings like this:
```js
import { Greet } from "../../wailsjs/go/main/App";
// snip
Greet("World");
```
will ensure that the method will work correctly in obfuscated mode, as the bindings will be regenerated with IDs and the call mechanism updated.

View file

@ -4,7 +4,7 @@
```css ```css
html { html {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
``` ```

View file

@ -77,12 +77,14 @@ Renaming package-lock.json -> package-lock.tmpl.json...
- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` - Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe`
- You should have a fully functioning Vue3 application: - You should have a fully functioning Vue3 application:
```mdx-code-block
<div className="text--center"> <div className="text--center">
<img <img
src={require("@site/static/img/vue3-template.png").default} src={require("@site/static/img/vue3-template.png").default}
width="50%" width="50%"
/> />
</div> </div>
```
## Publishing Templates ## Publishing Templates

View file

@ -35,9 +35,15 @@ Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433
If your built application looks like this in finder: If your built application looks like this in finder:
```mdx-code-block
<p className="text--center"> <p className="text--center">
<img src={require("/img/troubleshooting/invalid_mac_app.png")}/> <img
src={
require("@site/static/img/troubleshooting/invalid_mac_app.png").default
}
/>
</p> </p>
```
it's likely that your application's `info.plist` is invalid. Update the file in `build/<yourapp>.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. it's likely that your application's `info.plist` is invalid. Update the file in `build/<yourapp>.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory.
@ -54,25 +60,30 @@ func (a *App) TestFunc(msg string, args ...interface{}) error {
calling this method from the frontend like this will fail: calling this method from the frontend like this will fail:
```js ```js
var msg = "Hello: " var msg = "Hello: ";
var args = ["Go", "JS"] var args = ["Go", "JS"];
window.go.main.App.TestFunc(msg, ...args).then((result) => { window.go.main.App.TestFunc(msg, ...args)
.then((result) => {
//do things here //do things here
}).catch((error) => { })
.catch((error) => {
//handle error //handle error
}); });
``` ```
Workaround: Workaround:
```js ```js
var msg = "Hello " var msg = "Hello ";
var args = ["Go", "JS"] var args = ["Go", "JS"];
window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots window.go.main.App.TestFunc(msg, args)
.then((result) => {
//without the 3 dots
//do things here //do things here
}).catch((error) => { })
.catch((error) => {
//handle error //handle error
}); });
``` ```
Credit: https://github.com/wailsapp/wails/issues/1186 Credit: https://github.com/wailsapp/wails/issues/1186
@ -104,8 +115,8 @@ If you navigate away from `index.html` to a new html file, the context will be l
```html ```html
<head> <head>
<script src="/wails/ipc.js"></script> <script src="/wails/ipc.js"></script>
<script src="/wails/runtime.js"></script> <script src="/wails/runtime.js"></script>
</head> </head>
``` ```
@ -132,6 +143,6 @@ In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/Sy
#define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
``` ```
This is *normally* due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. This is _normally_ due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version.
Source: https://github.com/wailsapp/wails/issues/1806 Source: https://github.com/wailsapp/wails/issues/1806

View file

@ -1,12 +1,14 @@
# NSIS installer # NSIS installer
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/nsis.webp").default} src={require("@site/static/img/nsis.webp").default}
style={{ "max-width": "50%" }} style={{ "max-width": "50%" }}
/> />
<br /> <br />
</p> </p>
```
Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/).

View file

@ -6,9 +6,11 @@ sidebar_position: 20
A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods.
```mdx-code-block
<div className="text--center"> <div className="text--center">
<img src={require("@site/static/img/architecture.webp").default} width="75%" /> <img src={require("@site/static/img/architecture.webp").default} style={{"width":"75%", "max-width":"800px"}} />
</div> </div>
```
## The Main Application ## The Main Application
@ -106,10 +108,12 @@ The `Bind` option is one of the most important options in a Wails application. I
:::info Note :::info Note
Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。
::: :::
In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`:
```go {16,24} title="main.go" ```go {16,24} title="main.go"
@ -225,9 +229,13 @@ The generated methods return a Promise. A successful call will result in the fir
All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields! All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields!
:::info Note :::info Note
Anonymous nested structs are not supported at this time. Anonymous nested structs are not supported at this time.
::: :::
It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code.
There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript.

View file

@ -16,19 +16,23 @@ Consider it a lightweight and fast Electron alternative for Go. You can easily b
- Easily call Go methods from Javascript - Easily call Go methods from Javascript
- Automatic Go struct to Typescript model generation - Automatic Go struct to Typescript model generation
- No CGO or external DLLs required on Windows - No CGO or external DLLs required on Windows
- Live development mode using the power of [Vite](https://vite.net/) - Live development mode using the power of [Vite](https://vitejs.dev/)
- Powerful CLI to easily Create, Build and Package applications - Powerful CLI to easily Create, Build and Package applications
- A rich [runtime library](/docs/next/reference/runtime) - A rich [runtime library](/docs/reference/runtime/intro)
- Applications built with Wails are Apple & Microsoft Store compliant - Applications built with Wails are Apple & Microsoft Store compliant
This is [varly](https://varly.app) - a desktop application for MacOS & Windows written using Wails. Not only does it look great, it uses native menus and translucency - everything you'd expect from a modern native app. This is [varly](https://varly.app) - a desktop application for MacOS & Windows written using Wails. Not only does it look great, it uses native menus and translucency - everything you'd expect from a modern native app.
```mdx-code-block
<p class="text--center"> <p class="text--center">
<a href="https://varly.app/"> <a href="https://varly.app/">
<img src={require("@site/static/img/varly.webp").default} width="75%" /> <img
src={require("@site/static/img/showcase/varly2.webp").default}
style={{ width: "75%", "max-width": "800px" }}
/>
</a> </a>
</p> </p>
```
### Quick Start Templates ### Quick Start Templates

View file

@ -39,12 +39,14 @@ A list of community maintained templates can be found [here](../community/templa
:::warning Attention :::warning Attention
**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** **The Wails project does not maintain, is not responsible nor liable for 3rd party templates!**
If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed.
::: :::
## build ## build
`wails build` is used for compiling your project to a production-ready binary. `wails build` is used for compiling your project to a production-ready binary.
@ -59,7 +61,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
| -o filename | Output filename | | | -o filename | Output filename | |
| -s | Skip building the frontend | false | | -s | Skip building the frontend | false |
| -f | Force build application | false | | -f | Force build application | false |
| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | | -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | |
| -upx | Compress final binary using "upx" | | | -upx | Compress final binary using "upx" | |
| -upxflags | Flags to pass to upx | | | -upxflags | Flags to pass to upx | |
| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | | -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 |
@ -68,7 +70,9 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | | -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false |
| -trimpath | Remove all file system paths from the resulting executable. | false | | -trimpath | Remove all file system paths from the resulting executable. | false |
| -race | Build with Go's race detector | false | | -race | Build with Go's race detector | false |
| -windowsconsole | Keep the console window for Windows builds | false | | -windowsconsole | Keep the console window for Windows builds | |
| -obfuscate | Obfuscate the application using [garble](https://github.com/burrowers/garble) | false |
| -garbleargs | Arguments to pass to garble | `-literals -tiny -seed=random` |
For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide.
@ -80,16 +84,20 @@ Example:
:::info UPX on Apple Silicon :::info UPX on Apple Silicon
There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon.
::: :::
:::info UPX on Windows :::info UPX on Windows
Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437).
::: :::
### Platforms ### Platforms
Supported platforms are: Supported platforms are:

View file

@ -106,57 +106,23 @@ Example:
Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used:
- `backspace` | | | | |
- `tab` |:-----------:|:-----:|:-----:|:---------:|
- `return` | `backspace` | `f1` | `f16` | `f31` |
- `enter` | `tab` | `f2` | `f17` | `f32` |
- `escape` | `return` | `f3` | `f18` | `f33` |
- `left` | `enter` | `f4` | `f19` | `f34` |
- `right` | `escape` | `f5` | `f20` | `f35` |
- `up` | `left` | `f6` | `f21` | `numlock` |
- `down` | `right` | `f7` | `f22` | |
- `space` | `up` | `f8` | `f23` | |
- `delete` | `down` | `f9` | `f24` | |
- `home` | `space` | `f10` | `f25` | |
- `end` | `delete` | `f11` | `f36` | |
- `page up` | `home` | `f12` | `f37` | |
- `page down` | `end` | `f13` | `f38` | |
- `f1` | `page up` | `f14` | `f39` | |
- `f2` | `page down` | `f15` | `f30` | |
- `f3`
- `f4`
- `f5`
- `f6`
- `f7`
- `f8`
- `f9`
- `f10`
- `f11`
- `f12`
- `f13`
- `f14`
- `f15`
- `f16`
- `f17`
- `f18`
- `f19`
- `f20`
- `f21`
- `f22`
- `f23`
- `f24`
- `f25`
- `f26`
- `f27`
- `f28`
- `f29`
- `f30`
- `f31`
- `f32`
- `f33`
- `f34`
- `f35`
- `numlock`
Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files.
@ -254,10 +220,12 @@ The function is given a `CallbackData` struct which indicates which menu item tr
:::info Roles :::info Roles
Roles are currently supported on Mac only. Roles are currently supported on Mac only.
::: :::
A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles:
| Role | Description | | Role | Description |

View file

@ -47,6 +47,7 @@ func main() {
Windows: &windows.Options{ Windows: &windows.Options{
WebviewIsTransparent: false, WebviewIsTransparent: false,
WindowIsTranslucent: false, WindowIsTranslucent: false,
BackdropType: windows.Mica,
DisableWindowIcon: false, DisableWindowIcon: false,
DisableFramelessWindowDecorations: false, DisableFramelessWindowDecorations: false,
WebviewUserDataPath: "", WebviewUserDataPath: "",
@ -62,6 +63,10 @@ func main() {
}, },
// User messages that can be customised // User messages that can be customised
Messages *windows.Messages Messages *windows.Messages
// OnSuspend is called when Windows enters low power mode
OnSuspend func()
// OnResume is called when Windows resumes from low power mode
OnResume func()
}, },
Mac: &mac.Options{ Mac: &mac.Options{
TitleBar: &mac.TitleBar{ TitleBar: &mac.TitleBar{
@ -96,92 +101,93 @@ func main() {
The text shown in the window's title bar. The text shown in the window's title bar.
Type: string Name: Title<br/> Type: `string`
### Width ### Width
The initial width of the window. The initial width of the window.
Name: Width Name: Width<br/> Type: `int`<br/> Default: 1024.
### Height ### Height
The initial height of the window. The initial height of the window.
Type: [AppearanceType](#appearance-type) Name: Height<br/> Type: `int`<br/> Default: 768
### DisableResize ### DisableResize
By default, the main window is resizable. Setting this to `true` will keep it a fixed size. By default, the main window is resizable. Setting this to `true` will keep it a fixed size.
Type: int Name: DisableResize<br/> Type: `bool`
### Fullscreen ### Fullscreen
Setting this to `true` will make the window fullscreen at startup. Setting this to `true` will make the window fullscreen at startup.
Type: int Name: Fullscreen<br/> Type: `bool`
### Frameless ### Frameless
When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx).
Type: int Name: Frameless<br/> Type: `bool`
### MinWidth ### MinWidth
This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default.
Type: bool Name: MinWidth<br/> Type: `int`
### MinHeight ### MinHeight
This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default.
Type: bool Name: MinHeight<br/> Type: `int`
### MaxWidth ### MaxWidth
This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default.
Type: bool Name: MaxWidth<br/> Type: `int`
### MaxHeight ### MaxHeight
This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default.
Type: bool Name: MaxHeight<br/> Type: `int`
### StartHidden ### StartHidden
When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called.
Type: int Name: StartHidden<br/> Type: `bool`
### HideWindowOnClose ### HideWindowOnClose
By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead. By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead.
hide the window instead. hide the window instead.
Type: int Name: HideWindowOnClose<br/> Type: `bool`
### BackgroundColour ### BackgroundColour
This value is the default background colour of the window. Default: white This value is the default background colour of the window. Default: white
Type: *options.RGBA Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency Name: BackgroundColour<br/> Type: `*options.RGBA`<br/> Default: white
### AlwaysOnTop ### AlwaysOnTop
Indicates that the window should stay above other windows when losing focus. Indicates that the window should stay above other windows when losing focus.
Type: int Name: AlwaysOnTop<br/> Type: `bool`
### Assets ### Assets
The frontend assets to be used by the application. Requires an `index.html` file. The frontend assets to be used by the application. Requires an `index.html` file.
Name: StartHidden Name: Assets<br/> Type: `embed.FS`
### AssetsHandler ### AssetsHandler
@ -208,51 +214,57 @@ NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.
NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension.
Type: http.Handler Name: AssetsHandler<br/> Type: `http.Handler`
### Menu ### Menu
The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx).
NOTE: On Mac, if no menu is specified, a default menu will be created. ::: :::note
Type: \*menu.Menu
On Mac, if no menu is specified, a default menu will be created.
:::
Name: Menu<br/> Type: `*menu.Menu`
### Logger ### Logger
The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx).
Type: bool Name: Logger<br/> Type: `logger.Logger`<br/> Default: Logs to Stdout
### LogLevel ### LogLevel
The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx).
Name: Assets Name: LogLevel<br/> Type: `logger.LogLevel`<br/> Default: `Info` in dev mode, `Error` in production mode
### LogLevelProduction ### LogLevelProduction
The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx).
Type: logger.LogLevel Name: LogLevelProduction<br/> Type: `logger.LogLevel`<br/> Default: `Error`
### OnStartup ### OnStartup
This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context.
Name: AssetsHandler Name: OnStartup<br/> Type: `func(ctx context.Context)`
### OnDomReady ### OnDomReady
This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context.
Name: AssetsHandler Name: OnDomReady<br/> Type: `func(ctx context.Context)`
### OnShutdown ### OnShutdown
This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context.
Name: AssetsHandler Name: OnShutdown<br/> Type: `func(ctx context.Context)`
### OnBeforeClose ### OnBeforeClose
@ -275,7 +287,7 @@ func (b *App) beforeClose(ctx context.Context) (prevent bool) {
} }
``` ```
Type: func(ctx context.Context) bool Name: OnBeforeClose<br/> Type: `func(ctx context.Context) bool`
### WindowStartState ### WindowStartState
@ -287,77 +299,89 @@ Defines how the window should present itself at startup.
| Maximised | ✅ | ✅ | ✅ | | Maximised | ✅ | ✅ | ✅ |
| Minimised | ✅ | ❌ | ✅ | | Minimised | ✅ | ❌ | ✅ |
Name: Logger Name: WindowStartState<br/> Type: `options.WindowStartState`
### CSSDragProperty ### CSSDragProperty
Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`.
Type: string Name: CSSDragProperty<br/> Type: `string`
### CSSDragValue ### CSSDragValue
Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`.
Type: string Name: CSSDragValue<br/> Type: `string`
### Bind ### Bind
A slice of struct instances defining methods that need to be bound to the frontend. A slice of struct instances defining methods that need to be bound to the frontend.
Default: Logger to Stdout Name: Bind<br/> Type: `[]interface{}`
### Windows ### Windows
This defines [Windows specific options](#windows-specific-options). This defines [Windows specific options](#windows).
Name: LogLevel Name: Windows<br/> Type: `*windows.Options`
### Mac #### WebviewIsTransparent
This defines [Mac specific options](#mac-specific-options).
Default: `Info` in dev mode, `Error` in production mode
### Linux
This defines [Linux specific options](#linux-specific-options).
Name: LogLevelProduction
## Windows Specific Options
### WebviewIsTransparent
Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications.
Type: int Name: WebviewIsTransparent<br/> Type: `bool`
### WindowIsTranslucent #### WindowIsTranslucent
Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent).
Type: int For Windows 11 versions before build 22621, this will use the [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw) method for translucency, which can be slow. For Windows 11 versions after build 22621, this will enable the newer translucency types that are much faster. By default, the type of translucency used will be determined by Windows. To configure this, use the [BackdropType](#BackdropType) option.
### DisableWindowIcon Name: WindowIsTranslucent<br/> Type: `bool`
#### BackdropType
:::note
Requires Windows 11 build 22621 or later.
:::
Sets the translucency type of the window. This is only applicable if [WindowIsTranslucent](#WindowIsTranslucent) is set to `true`.
Name: BackdropType<br/> Type `windows.BackdropType`
The value can be one of the following:
| Value | Description |
| ------- | ----------------------------------------------------------------------------------------- |
| Auto | Let Windows decide which backdrop to use |
| None | Do not use translucency |
| Acrylic | Use [Acrylic](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) effect |
| Mica | Use [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) effect |
| Tabbed | Use Tabbed. This is a backdrop that is similar to Mica. |
#### DisableWindowIcon
Setting this to `true` will remove the icon in the top left corner of the title bar. Setting this to `true` will remove the icon in the top left corner of the title bar.
Type: int Name: DisableWindowIcon<br/> Type: `bool`
### DisableFramelessWindowDecorations #### DisableFramelessWindowDecorations
Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11.
Type: int Name: DisableFramelessWindowDecorations<br/> Type: `bool`
### WebviewUserDataPath #### WebviewUserDataPath
This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used.
Type: string Name: WebviewUserDataPath<br/> Type: `string`
### WebviewBrowserPath #### WebviewBrowserPath
This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used.
@ -367,9 +391,9 @@ Important information about distribution of fixed version runtime:
- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) - [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version)
- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions)
Type: string Name: WebviewBrowserPath<br/> Type: `string`
### Theme #### Theme
Minimum Windows Version: Windows 10 2004/20H1 Minimum Windows Version: Windows 10 2004/20H1
@ -381,17 +405,23 @@ This defines the theme that the application should use:
| Dark | The application will use a dark theme exclusively | | Dark | The application will use a dark theme exclusively |
| Light | The application will use a light theme exclusively | | Light | The application will use a light theme exclusively |
Type: `windows.Theme` Name: Theme<br/> Type: `windows.Theme`
### CustomTheme #### CustomTheme
:::note
Minimum Windows Version: Windows 10/11 2009/21H2 Build 22000
:::
Name: WindowStartState
Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive.
Type: `windows.CustomTheme` Name: CustomTheme<br/> Type: `windows.CustomTheme`
#### Name: CustomTheme ##### CustomTheme type
The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`.
@ -435,67 +465,45 @@ Example:
}, },
``` ```
### Messages #### Messages
A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. A struct of strings used by the webview2 installer if a valid webview2 runtime is not found.
Type: `*windows.Messages` Name: Messages<br/> Type: `*windows.Messages`
Customise this for any language you choose to support. Customise this for any language you choose to support.
### ResizeDebounceMS #### ResizeDebounceMS
ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can.
Type: \*mac.Options Name: ResizeDebounceMS<br/> Type: `uint16`
### OnSuspend #### OnSuspend
If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) If set, this function will be called when Windows initiates a switch to low power mode (suspend/hibernate)
Name: Linux Name: OnSuspend<br/> Type: `func()`
### OnResume #### OnResume
If set, this function will be called when windows resumes from low power mode (suspend/hibernate) If set, this function will be called when Windows resumes from low power mode (suspend/hibernate)
Name: Linux Name: OnResume<br/> Type: `func()`
## Mac Specific Options ### Mac
### TitleBar This defines [Mac specific options](#mac).
Name: Mac<br/> Type: `*mac.Options`
#### TitleBar
The TitleBar struct provides the ability to configure the look and feel of the title bar. The TitleBar struct provides the ability to configure the look and feel of the title bar.
Type: bool Name: TitleBar<br/> Type: [`*mac.TitleBar`](#titlebar-struct)
##### Titlebar struct
### Appearance
Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names.
Name: WindowIsTranslucent
### WebviewIsTransparent
Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications.
Type: int
### WindowIsTranslucent
Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications.
Type: int
### About
This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role.
Name: DisableFramelessWindowDecorations
#### Titlebar struct
The titlebar of the application can be customised by using the TitleBar options: The titlebar of the application can be customised by using the TitleBar options:
@ -537,7 +545,13 @@ Mac: &mac.Options{
Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar.
#### Appearance type #### Appearance
Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names.
Name: Appearance<br/> Type: [`mac.AppearanceType`](#appearance-type)
##### Appearance type
You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc).
@ -560,9 +574,28 @@ Mac: &mac.Options{
} }
``` ```
#### About struct #### WebviewIsTransparent
Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications.
Name: WebviewIsTransparent<br/> Type: `bool`
#### WindowIsTranslucent
Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications.
Name: WindowIsTranslucent<br/> Type: `bool`
#### About
This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role.
Name: About<br/> Type: [`*mac.AboutInfo`](#about-struct)
##### About struct
```go ```go
type AboutInfo struct { type AboutInfo struct {
Title string Title string
Message string Message string
@ -591,17 +624,19 @@ func main() {
The "About" menu item will appear in the app menu: The "About" menu item will appear in the app menu:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/reference/about-menu.webp").default} src={require("@site/static/img/reference/about-menu.webp").default}
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
When clicked, that will open an about message box: When clicked, that will open an about message box:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/reference/about-dialog.webp").default} src={require("@site/static/img/reference/about-dialog.webp").default}
@ -609,16 +644,20 @@ When clicked, that will open an about message box:
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
## Linux Specific Options ### Linux
### Icon This defines [Linux specific options](#linux).
Name: Linux<br/> Type: `*linux.Options`
#### Icon
Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified).
Type: []byte Name: Icon<br/> Type: `[]byte`
Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.

View file

@ -13,11 +13,11 @@ The project config resides in the `wails.json` file in the project directory. Th
"reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]",
"frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]",
"frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]",
"frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. If this command is also not specified will falls back to frontend:build]", "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]",
"frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]",
"frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]",
"frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]",
"frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. If this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]",
"wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]",
"version": "[Project config version]", "version": "[Project config version]",
"outputfilename": "[The name of the binary]", "outputfilename": "[The name of the binary]",
@ -42,7 +42,9 @@ The project config resides in the `wails.json` file in the project directory. Th
"copyright": "[The copyright of the product. Default: 'Copyright.........']", "copyright": "[The copyright of the product. Default: 'Copyright.........']",
"comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']"
}, },
"nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']" "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']",
"obfuscated": "[Whether the app should be obfuscated. Default: false]",
"garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]"
} }
``` ```

View file

@ -11,4 +11,3 @@ These methods are related to the system browser.
Opens the given URL in the system browser. Opens the given URL in the system browser.
Go: `BrowserOpenURL(ctx context.Context, url string)`<br/> JS: `BrowserOpenURL(url string)` Go: `BrowserOpenURL(ctx context.Context, url string)`<br/> JS: `BrowserOpenURL(url string)`

View file

@ -7,9 +7,13 @@ sidebar_position: 5
This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes.
:::info Javascript :::info Javascript
Dialog is currently unsupported in the JS runtime.
Dialog is currently unsupported in the JS runtime.
::: :::
### OpenDirectoryDialog ### OpenDirectoryDialog
Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions). Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions).
@ -148,15 +152,16 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
the first button is shown as default: the first button is shown as default:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/runtime/dialog_no_defaults.png" src={require("@site/static/img/runtime/dialog_no_defaults.png").default}
width="30%" width="30%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
And if we specify `DefaultButton` to be "two": And if we specify `DefaultButton` to be "two":
@ -171,15 +176,16 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
the second button is shown as default. When `return` is pressed, the value "two" is returned. the second button is shown as default. When `return` is pressed, the value "two" is returned.
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/runtime/dialog_default_button.png" src={require("@site/static/img/runtime/dialog_default_button.png").default}
width="30%" width="30%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
```
If we now specify `CancelButton` to be "three": If we now specify `CancelButton` to be "three":
@ -195,17 +201,18 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/runtime/dialog_default_cancel.png" src={require("@site/static/img/runtime/dialog_default_cancel.png").default}
width="30%" width="30%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
<br /> <br />
<br /> <br />
```
#### DialogType #### DialogType
@ -231,33 +238,35 @@ type FileFilter struct {
Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/runtime/dialog_win_filters.png" src={require("@site/static/img/runtime/dialog_win_filters.png").default}
width="50%" width="50%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
<br /> <br />
<br /> <br />
```
#### Linux #### Linux
Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src="/img/runtime/dialog_lin_filters.png" src={require("@site/static/img/runtime/dialog_lin_filters.png").default}
width="50%" width="50%"
class="screenshot" class="screenshot"
/> />
</div> </div>
<br /> <br />
<br /> <br />
<br /> <br />
```
#### Mac #### Mac

View file

@ -14,7 +14,7 @@ Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData
### EventsOff ### EventsOff
This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`. このメソッドは、指定されたイベント名のイベントリスナー設定を解除します。引数の`additionalEventNames`を使用することで、複数のリスナーを一度に解除できます。
Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`<br/> JS: `EventsOff(eventName string, ...additionalEventNames)` Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`<br/> JS: `EventsOff(eventName string, ...additionalEventNames)`
@ -35,4 +35,3 @@ Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optio
This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners.
Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))`

View file

@ -6,7 +6,7 @@ sidebar_position: 1
The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible.
It has utility methods for: ユーティリティメソッドには次のようなものがあります:
- [Window](window.mdx) - [Window](window.mdx)
- [Menu](menu.mdx) - [Menu](menu.mdx)
@ -19,10 +19,12 @@ The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/
:::info Note :::info Note
Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready).
::: :::
The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory.
### Hide ### Hide
@ -31,13 +33,25 @@ Go: `Hide(ctx context.Context)`<br/> JS: `Hide()`
Hides the application. Hides the application.
:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: :::info Note
Macでこのメソッドを使用すると、標準のMacアプリケーションにおけるメニュー項目の`Hide`と同じ方法で、アプリケーションが非表示になります。 This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`.
:::
### Show ### Show
Shows the application. Shows the application.
:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: :::info Note
Macでこのメソッドを使用すると、アプリケーションがフォアグラウンドに戻ります。 For Windows and Linux, this is currently the same as `WindowShow`.
:::
Go: `Show(ctx context.Context)`<br/> JS: `Show()` Go: `Show(ctx context.Context)`<br/> JS: `Show()`
@ -56,6 +70,7 @@ Go: `Environment(ctx context.Context) EnvironmentInfo`<br/> JS: `Environment():
#### EnvironmentInfo #### EnvironmentInfo
Go: Go:
```go ```go
type EnvironmentInfo struct { type EnvironmentInfo struct {
BuildType string BuildType string
@ -63,11 +78,13 @@ type EnvironmentInfo struct {
Arch string Arch string
} }
``` ```
JS: JS:
```ts ```ts
interface EnvironmentInfo { interface EnvironmentInfo {
buildType: string; buildType: string;
platform: string; platform: string;
arch: string; arch: string;
} }
``` ```

View file

@ -7,9 +7,13 @@ sidebar_position: 6
These methods are related to the application menu. These methods are related to the application menu.
:::info Javascript :::info Javascript
Menu is currently unsupported in the JS runtime.
Menu is currently unsupported in the JS runtime.
::: :::
### MenuSetApplicationMenu ### MenuSetApplicationMenu
Sets the application menu to the given [menu](../menus.mdx). Sets the application menu to the given [menu](../menus.mdx).

View file

@ -28,7 +28,7 @@ Go: `WindowUnfullscreen(ctx context.Context)`<br/> JS: `WindowUnfullscreen()`
Returns true if the window is full screen. Returns true if the window is full screen.
Go: `WindowCenter(ctx context.Context)`<br/> JS: `WindowCenter()` Go: `WindowIsFullscreen(ctx context.Context) bool`<br/> JS: `WindowIsFullscreen() bool`
### WindowCenter ### WindowCenter
@ -88,7 +88,7 @@ Go: `WindowSetSize(ctx context.Context, width int, height int)`<br/> JS: `Window
Returns true if the window not minimised, maximised or fullscreen. Returns true if the window not minimised, maximised or fullscreen.
Go: `WindowGetSize(ctx context.Context) (width int, height int)`<br/> JS: `WindowGetSize() : Size` Go: `WindowIsNormal(ctx context.Context) bool`<br/> JS: `WindowIsNormal() bool`
### WindowSetSize ### WindowSetSize
@ -152,7 +152,7 @@ Go: `WindowMinimise(ctx context.Context)`<br/> JS: `WindowMinimise()`
Returns true if the window is maximised. Returns true if the window is maximised.
Go: `WindowUnminimise(ctx context.Context)`<br/> JS: `WindowUnminimise()` Go: `WindowIsMaximised(ctx context.Context) bool`<br/> JS: `WindowIsMaximised() bool`
### WindowToggleMaximise ### WindowToggleMaximise
@ -176,7 +176,7 @@ Go: `WindowUnminimise(ctx context.Context)`<br/> JS: `WindowUnminimise()`
Returns true if the window is minimised. Returns true if the window is minimised.
Go: `WindowIsMinimised(ctx context.Context) bool` JS: `WindowIsMinimised() bool` Go: `WindowIsMinimised(ctx context.Context) bool`<br/> JS: `WindowIsMinimised() bool`
### WindowSetBackgroundColour ### WindowSetBackgroundColour
@ -184,7 +184,13 @@ Sets the background colour of the window to the given RGBA colour definition. Th
Valid values for R, G, B and A are 0-255. Valid values for R, G, B and A are 0-255.
Any value that is not 0 will be considered 255. Any value that is not 0 will be considered 255. ::: :::info Windows
On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 will be considered 255.
:::
Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`<br/> JS: `WindowSetBackgroundColour(R, G, B, A)` Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`<br/> JS: `WindowSetBackgroundColour(R, G, B, A)`

View file

@ -4,6 +4,7 @@ sidebar_position: 20
# Dogs API # Dogs API
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/tutorials/dogsapi/img.webp").default} src={require("@site/static/img/tutorials/dogsapi/img.webp").default}
@ -11,10 +12,16 @@ sidebar_position: 20
className="screenshot" className="screenshot"
/> />
</div> </div>
<br /> <br />
```
:::note
This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples).
:::
:::note This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). :::
In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them.
@ -146,6 +153,7 @@ import (
Add the following lines to `frontend/src/App.svelte`: Add the following lines to `frontend/src/App.svelte`:
<!-- prettier-ignore-start -->
```html ```html
<script> <script>
import { GetRandomImageUrl } from "../wailsjs/go/main/App.js"; import { GetRandomImageUrl } from "../wailsjs/go/main/App.js";
@ -229,6 +237,9 @@ Add the following lines to `frontend/src/App.svelte`:
</style> </style>
``` ```
<!-- prettier-ignore-end -->
### Testing the application ### Testing the application
To generate the bindings and test the application, run `wails dev`. To generate the bindings and test the application, run `wails dev`.
@ -236,8 +247,3 @@ To generate the bindings and test the application, run `wails dev`.
### Compiling the application ### Compiling the application
To compile the application to a single, production grade binary, run `wails build`. To compile the application to a single, production grade binary, run `wails build`.

View file

@ -11,10 +11,13 @@ The aim of this tutorial is to get you up and running with the most basic applic
- Run the application - Run the application
:::note :::note
This tutorial uses Windows as the target platform. Output will vary slightly
depending on your operating system.
This tutorial uses Windows as the target platform. Output will vary slightly depending on your operating system.
::: :::
## Create a new Wails application ## Create a new Wails application
To create a new Wails application using the default vanilla JS template, you need to run the following command: To create a new Wails application using the default vanilla JS template, you need to run the following command:
@ -91,14 +94,15 @@ This has compiled the application and saved it in the `build/bin` directory.
If we view the `build/bin` directory in Windows Explorer, we should see our project binary: If we view the `build/bin` directory in Windows Explorer, we should see our project binary:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/helloworld-app-icon.webp").default} src={require("@site/static/img/helloworld-app-icon.webp").default}
width="134px" width="134px"
/> />
</div> </div>
<br /> <br />
```
We can run it by simply double-clicking the `helloworld.exe` file. We can run it by simply double-clicking the `helloworld.exe` file.
@ -108,6 +112,7 @@ On Linux, you can run the application using `./helloworld` from the `build/bin`
You should see the application working as expected: You should see the application working as expected:
```mdx-code-block
<div class="text--center"> <div class="text--center">
<img <img
src={require("@site/static/img/windows-default-app.webp").default} src={require("@site/static/img/windows-default-app.webp").default}
@ -116,3 +121,4 @@ You should see the application working as expected:
/> />
</div> </div>
<br /> <br />
```

View file

@ -1,38 +0,0 @@
{
"version.label": {
"message": "v2.0.0-beta.44",
"description": "The label for version v2.0.0-beta.44"
},
"sidebar.tutorialSidebar.category.Getting Started": {
"message": "Getting Started",
"description": "The label for category Getting Started in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Community": {
"message": "Community",
"description": "The label for category Community in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Tutorials": {
"message": "Tutorials",
"description": "The label for category Tutorials in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.Contributing": {
"message": "Contributing",
"description": "The label for category Contributing in sidebar tutorialSidebar"
}
}

View file

@ -26,7 +26,7 @@ This is [varly](https://varly.app) - a desktop application for MacOS & Windows w
<p class="text--center"> <p class="text--center">
<a href="https://varly.app/"> <a href="https://varly.app/">
<img src={require("@site/static/img/varly.webp").default} width="75%" /> <img src={require("@site/static/img/showcase/varly2.webp").default} style={{'width': '75%', 'max-width': '800px'}} />
</a> </a>
</p> </p>

View file

@ -0,0 +1,38 @@
{
"version.label": {
"message": "v2.0.0",
"description": "The label for version v2.0.0"
},
"sidebar.docs.category.Getting Started": {
"message": "Getting Started",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.docs.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar docs"
},
"sidebar.docs.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar docs"
},
"sidebar.docs.category.Community": {
"message": "Community",
"description": "The label for category Community in sidebar docs"
},
"sidebar.docs.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar docs"
},
"sidebar.docs.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "Tutorials",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.link.Contributing": {
"message": "Contributing",
"description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing"
}
}

View file

@ -1,8 +1,10 @@
# EmailIt # EmailIt
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/emailit.webp").default} /> <img src={require("@site/static/img/showcase/emailit.webp").default} />
<br /> <br />
</p> </p>
```
[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. Its built using Wails2 and Svelte, and the download is a universal macOS application. [EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. Its built using Wails2 and Svelte, and the download is a universal macOS application.

View file

@ -1,9 +1,11 @@
# EncryptEasy # EncryptEasy
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/encrypteasy.webp").default} /> <img src={require("@site/static/img/showcase/encrypteasy.webp").default} />
<br /> <br />
</p> </p>
```
**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** **[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.**

View file

@ -1,9 +1,11 @@
# FileHound Export Utility # FileHound Export Utility
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/filehound.webp").default} /> <img src={require("@site/static/img/showcase/filehound.webp").default} />
<br /> <br />
</p> </p>
```
[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. [FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities.

View file

@ -1,10 +1,14 @@
# Minecraft Updater # Minecraft Updater
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/showcase/minecraft-mod-updater.webp").default} src={
require("@site/static/img/showcase/minecraft-mod-updater.webp").default
}
/> />
<br /> <br />
</p> </p>
```
[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. Its built using Wails2 and React with [antd](https://ant.design/) as frontend framework. [Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. Its built using Wails2 and React with [antd](https://ant.design/) as frontend framework.

View file

@ -1,11 +1,13 @@
# Modal File Manager # Modal File Manager
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img <img
src={require("@site/static/img/showcase/modalfilemanager.webp").default} src={require("@site/static/img/showcase/modalfilemanager.webp").default}
/> />
<br /> <br />
</p> </p>
```
[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. [Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions.

View file

@ -1,8 +1,10 @@
# Molley Wallet # Molley Wallet
```mdx-code-block
<p style={{ "text-align": "center" }}> <p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/mollywallet.webp").default} /> <img src={require("@site/static/img/showcase/mollywallet.webp").default} />
<br /> <br />
</p> </p>
```
[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. [Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.

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