5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:50:15 +08:00

New Crowdin updates (#1726)

* New translations minecraftupdater.mdx (Korean)
[ci skip]

* New translations links.mdx (Korean)
[ci skip]

* New translations templates.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Korean)
[ci skip]

* New translations documenting.mdx (Korean)
[ci skip]

* New translations troubleshooting.mdx (Korean)
[ci skip]

* New translations windows-installer.mdx (Korean)
[ci skip]

* New translations faq.mdx (Korean)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Korean)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Korean)
[ci skip]

* New translations authors.yml (Korean)
[ci skip]

* New translations credits.mdx (Korean)
[ci skip]

* New translations markdown-page.md (Korean)
[ci skip]

* New translations stats.mdx (Korean)
[ci skip]

* New translations faq.mdx (Japanese)
[ci skip]

* New translations faq.mdx (Russian)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations faq.mdx (Chinese Simplified)
[ci skip]

* New translations options.json (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.38.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.39.json (Korean)
[ci skip]

* New translations footer.json (Korean)
[ci skip]

* New translations navbar.json (Korean)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Korean)
[ci skip]

* New translations howdoesitwork.mdx (Korean)
[ci skip]

* New translations windows.mdx (Korean)
[ci skip]

* New translations log.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations linux.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations browser.mdx (Korean)
[ci skip]

* New translations dialog.mdx (Korean)
[ci skip]

* New translations events.mdx (Korean)
[ci skip]

* New translations intro.mdx (Korean)
[ci skip]

* New translations menu.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations window.mdx (Korean)
[ci skip]

* New translations cli.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations menus.mdx (Korean)
[ci skip]

* New translations options.mdx (Korean)
[ci skip]

* New translations project-config.mdx (Korean)
[ci skip]

* New translations _category_.json (Korean)
[ci skip]

* New translations helloworld.mdx (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Chinese Simplified)
[ci skip]

* New translations firstproject.mdx (Japanese)
[ci skip]

* New translations firstproject.mdx (Russian)
[ci skip]

* New translations firstproject.mdx (Chinese Simplified)
[ci skip]

* New translations installation.mdx (Japanese)
[ci skip]

* New translations installation.mdx (Russian)
[ci skip]

* New translations installation.mdx (Chinese Simplified)
[ci skip]

* New translations dynamic-assets.mdx (Japanese)
[ci skip]

* New translations dynamic-assets.mdx (Russian)
[ci skip]

* New translations dynamic-assets.mdx (Chinese Simplified)
[ci skip]

* New translations frameless.mdx (Japanese)
[ci skip]

* New translations frameless.mdx (Russian)
[ci skip]

* New translations frameless.mdx (Chinese Simplified)
[ci skip]

* New translations documenting.mdx (Japanese)
[ci skip]

* New translations documenting.mdx (Russian)
[ci skip]

* New translations frontend.mdx (Japanese)
[ci skip]

* New translations frontend.mdx (Russian)
[ci skip]

* New translations windows.mdx (Chinese Simplified)
[ci skip]

* New translations troubleshooting.mdx (Japanese)
[ci skip]

* New translations troubleshooting.mdx (Russian)
[ci skip]

* New translations troubleshooting.mdx (Chinese Simplified)
[ci skip]

* New translations windows-installer.mdx (Japanese)
[ci skip]

* New translations windows-installer.mdx (Russian)
[ci skip]

* New translations windows-installer.mdx (Chinese Simplified)
[ci skip]

* New translations dialog.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Russian)
[ci skip]

* New translations signing.mdx (Chinese Simplified)
[ci skip]

* New translations migrating.mdx (Russian)
[ci skip]

* New translations ides.mdx (Japanese)
[ci skip]

* New translations ides.mdx (Russian)
[ci skip]

* New translations ides.mdx (Chinese Simplified)
[ci skip]

* New translations migrating.mdx (Japanese)
[ci skip]

* New translations migrating.mdx (Chinese Simplified)
[ci skip]

* New translations signing.mdx (Russian)
[ci skip]

* New translations mouse-buttons.mdx (Japanese)
[ci skip]

* New translations mouse-buttons.mdx (Russian)
[ci skip]

* New translations mouse-buttons.mdx (Chinese Simplified)
[ci skip]

* New translations overscroll.mdx (Japanese)
[ci skip]

* New translations overscroll.mdx (Russian)
[ci skip]

* New translations routing.mdx (Japanese)
[ci skip]

* New translations routing.mdx (Russian)
[ci skip]

* New translations routing.mdx (Chinese Simplified)
[ci skip]

* New translations signing.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Chinese Simplified)
[ci skip]

* New translations project-config.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Chinese Simplified)
[ci skip]

* New translations howdoesitwork.mdx (Japanese)
[ci skip]

* New translations howdoesitwork.mdx (Russian)
[ci skip]

* New translations howdoesitwork.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Japanese)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Russian)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Japanese)
[ci skip]

* New translations options.mdx (Russian)
[ci skip]

* New translations window.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Russian)
[ci skip]

* New translations menu.mdx (Chinese Simplified)
[ci skip]

* New translations window.mdx (Russian)
[ci skip]

* New translations options.mdx (Japanese)
[ci skip]

* New translations cli.mdx (Chinese Simplified)
[ci skip]

* New translations menus.mdx (Japanese)
[ci skip]

* New translations menus.mdx (Russian)
[ci skip]

* New translations menus.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Russian)
[ci skip]

* New translations 2021-11-08-v2-beta2-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations emailit.mdx (Chinese Simplified)
[ci skip]

* New translations modalfilemanager.mdx (Chinese Simplified)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Japanese)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Russian)
[ci skip]

* New translations 2022-02-22-v2-beta3-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations credits.mdx (Japanese)
[ci skip]

* New translations credits.mdx (Russian)
[ci skip]

* New translations credits.mdx (Chinese Simplified)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations developing-new-features.mdx (Japanese)
[ci skip]

* New translations developing-new-features.mdx (Russian)
[ci skip]

* New translations ways-of-contributing.mdx (Japanese)
[ci skip]

* New translations documenting.mdx (Japanese)
[ci skip]

* New translations testing.mdx (Japanese)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Japanese)
[ci skip]

* New translations fixing-bugs.mdx (Japanese)
[ci skip]

* New translations helping-others.mdx (Japanese)
[ci skip]

* New translations ways-of-contributing.mdx (Russian)
[ci skip]

* New translations fixing-bugs.mdx (Chinese Simplified)
[ci skip]

* New translations documenting.mdx (Russian)
[ci skip]

* New translations documenting.mdx (Chinese Simplified)
[ci skip]

* New translations testing.mdx (Chinese Simplified)
[ci skip]

* New translations fixing-bugs.mdx (Russian)
[ci skip]

* New translations ways-of-contributing.mdx (Chinese Simplified)
[ci skip]

* New translations testing.mdx (Russian)
[ci skip]

* New translations helping-others.mdx (Russian)
[ci skip]

* New translations helping-others.mdx (Chinese Simplified)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Chinese Simplified)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Russian)
[ci skip]

* New translations developing-new-features.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Japanese)
[ci skip]

* New translations current.json (Russian)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Japanese)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Russian)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Japanese)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Russian)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Chinese Simplified)
[ci skip]

* New translations installation.mdx (Korean)
[ci skip]

* New translations ways-of-contributing.mdx (Korean)
[ci skip]

* New translations testing.mdx (Korean)
[ci skip]

* New translations developing-new-features.mdx (Korean)
[ci skip]

* New translations documenting.mdx (Korean)
[ci skip]

* New translations fixing-bugs.mdx (Korean)
[ci skip]

* New translations helping-others.mdx (Korean)
[ci skip]

* New translations setting-up-a-dev-environment.mdx (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations options.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Korean)
[ci skip]

* New translations version-v2.0.0-beta.43.json (Korean)
[ci skip]

* New translations footer.json (Korean)
[ci skip]

* New translations navbar.json (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations community-guide.mdx (Japanese)
[ci skip]

* New translations community-guide.mdx (Korean)
[ci skip]

* New translations community-guide.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Japanese)
[ci skip]

* New translations current.json (Russian)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations code.json (Japanese)
[ci skip]

* New translations code.json (Russian)
[ci skip]

* New translations code.json (Chinese Simplified)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations current.json (Korean)
[ci skip]

* New translations code.json (Korean)
[ci skip]

* New translations community-guide.mdx (Japanese)
[ci skip]

* New translations community-guide.mdx (Korean)
[ci skip]

* New translations community-guide.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations vscode.mdx (Japanese)
[ci skip]

* New translations vscode.mdx (Korean)
[ci skip]

* New translations vscode.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Chinese Simplified)
[ci skip]

* New translations current.json (Chinese Simplified)
[ci skip]

* New translations riftshare.mdx (Chinese Simplified)
[ci skip]

* New translations surge.mdx (Chinese Simplified)
[ci skip]

* New translations wally.mdx (Chinese Simplified)
[ci skip]

* New translations encrypteasy.mdx (Chinese Simplified)
[ci skip]

* New translations filehound.mdx (Chinese Simplified)
[ci skip]

* New translations mollywallet.mdx (Chinese Simplified)
[ci skip]

* New translations optimus.mdx (Chinese Simplified)
[ci skip]

* New translations _category_.json (Chinese Simplified)
[ci skip]

* New translations emailit.mdx (Chinese Simplified)
[ci skip]

* New translations modalfilemanager.mdx (Chinese Simplified)
[ci skip]

* New translations browser.mdx (Chinese Simplified)
[ci skip]

* New translations vscode.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Chinese Simplified)
[ci skip]

* New translations browser.mdx (Japanese)
[ci skip]

* New translations browser.mdx (Korean)
[ci skip]

* New translations browser.mdx (Russian)
[ci skip]

* New translations dialog.mdx (Japanese)
[ci skip]

* New translations vscode.mdx (Japanese)
[ci skip]

* New translations dialog.mdx (Korean)
[ci skip]

* New translations dialog.mdx (Russian)
[ci skip]

* New translations dialog.mdx (Chinese Simplified)
[ci skip]

* New translations events.mdx (Japanese)
[ci skip]

* New translations events.mdx (Korean)
[ci skip]

* New translations events.mdx (Russian)
[ci skip]

* New translations events.mdx (Chinese Simplified)
[ci skip]

* New translations intro.mdx (Japanese)
[ci skip]

* New translations intro.mdx (Korean)
[ci skip]

* New translations intro.mdx (Russian)
[ci skip]

* New translations vscode.mdx (Korean)
[ci skip]

* New translations intro.mdx (Chinese Simplified)
[ci skip]

* New translations log.mdx (Japanese)
[ci skip]

* New translations options.mdx (Russian)
[ci skip]

* New translations introduction.mdx (Japanese)
[ci skip]

* New translations options.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Korean)
[ci skip]

* New translations log.mdx (Korean)
[ci skip]

* New translations log.mdx (Russian)
[ci skip]

* New translations log.mdx (Chinese Simplified)
[ci skip]

* New translations menu.mdx (Japanese)
[ci skip]

* New translations menu.mdx (Korean)
[ci skip]

* New translations menu.mdx (Russian)
[ci skip]

* New translations menu.mdx (Chinese Simplified)
[ci skip]

* New translations window.mdx (Japanese)
[ci skip]

* New translations window.mdx (Korean)
[ci skip]

* New translations window.mdx (Russian)
[ci skip]

* New translations window.mdx (Chinese Simplified)
[ci skip]

* New translations options.mdx (Japanese)
[ci skip]

* New translations introduction.mdx (Korean)
[ci skip]

* New translations introduction.mdx (Russian)
[ci skip]

* New translations community-guide.mdx (Chinese Simplified)
[ci skip]

* New translations stats.mdx (Chinese Simplified)
[ci skip]

* New translations faq.mdx (Chinese Simplified)
[ci skip]

* New translations markdown-page.md (Chinese Simplified)
[ci skip]

* New translations introduction.mdx (Chinese Simplified)
[ci skip]

* New translations 2021-09-27-v2-beta1-release-notes.mdx (Chinese Simplified)
[ci skip]

* New translations version-v2.0.0-beta.44.json (Chinese Simplified)
[ci skip]

* Empty-Commit

* Fix crowdin screwups again
This commit is contained in:
Lea Anthony 2022-08-27 20:17:15 +10:00 committed by GitHub
parent 6c3418d199
commit b5e98d5780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
309 changed files with 10772 additions and 1607 deletions

View File

@ -299,5 +299,117 @@
"theme.CodeBlock.wordWrapToggle": {
"message": "Toggle word wrap 文字列の折り返しの切替",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.admonition.note": {
"message": "note",
"description": "The default label used for the Note admonition (:::note)"
},
"theme.admonition.tip": {
"message": "tip",
"description": "The default label used for the Tip admonition (:::tip)"
},
"theme.admonition.danger": {
"message": "danger",
"description": "The default label used for the Danger admonition (:::danger)"
},
"theme.admonition.info": {
"message": "info",
"description": "The default label used for the Info admonition (:::info)"
},
"theme.admonition.caution": {
"message": "caution",
"description": "The default label used for the Caution admonition (:::caution)"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
"message": "Clear the query",
"description": "The label and ARIA label for search box reset button"
},
"theme.SearchModal.searchBox.cancelButtonText": {
"message": "Cancel",
"description": "The label and ARIA label for search box cancel button"
},
"theme.SearchModal.startScreen.recentSearchesTitle": {
"message": "Recent",
"description": "The title for recent searches"
},
"theme.SearchModal.startScreen.noRecentSearchesText": {
"message": "No recent searches",
"description": "The text when no recent searches"
},
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
"message": "Save this search",
"description": "The label for save recent search button"
},
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
"message": "Remove this search from history",
"description": "The label for remove recent search button"
},
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
"message": "Favorite",
"description": "The title for favorite searches"
},
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
"message": "Remove this search from favorites",
"description": "The label for remove favorite search button"
},
"theme.SearchModal.errorScreen.titleText": {
"message": "Unable to fetch results",
"description": "The title for error screen of search modal"
},
"theme.SearchModal.errorScreen.helpText": {
"message": "You might want to check your network connection.",
"description": "The help text for error screen of search modal"
},
"theme.SearchModal.footer.selectText": {
"message": "to select",
"description": "The explanatory text of the action for the enter key"
},
"theme.SearchModal.footer.selectKeyAriaLabel": {
"message": "Enter key",
"description": "The ARIA label for the Enter key button that makes the selection"
},
"theme.SearchModal.footer.navigateText": {
"message": "to navigate",
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
},
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
"message": "Arrow up",
"description": "The ARIA label for the Arrow up key button that makes the navigation"
},
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
"message": "Arrow down",
"description": "The ARIA label for the Arrow down key button that makes the navigation"
},
"theme.SearchModal.footer.closeText": {
"message": "to close",
"description": "The explanatory text of the action for Escape key"
},
"theme.SearchModal.footer.closeKeyAriaLabel": {
"message": "Escape key",
"description": "The ARIA label for the Escape key button that close the modal"
},
"theme.SearchModal.footer.searchByText": {
"message": "Search by",
"description": "The text explain that the search is making by Algolia"
},
"theme.SearchModal.noResultsScreen.noResultsText": {
"message": "No results for",
"description": "The text explains that there are no results for the following search"
},
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
"message": "Try searching for",
"description": "The text for the suggested query when no results are found for the following search"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
"message": "Believe this query should return results?",
"description": "The text for the question where the user thinks there are missing results"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
"message": "Let us know.",
"description": "The text for the link to report missing results"
},
"theme.SearchModal.placeholder": {
"message": "Search docs",
"description": "The placeholder of the input of the DocSearch pop-up modal"
}
}

View File

@ -8,13 +8,15 @@ tags:
- v2
---
<div class="text--center">
<img src="/img/wails.png" width="40%" className="screenshot"/>
<img
src={require("@site/static/img/wails.png").default}
width="40%"
class="screenshot"
/>
</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.
@ -31,10 +33,14 @@ No, I'm not joking: *No* *CGO* *dependency* 🤯! The thing about Windows is tha
### WebView2 Chromium Renderer
<div class="text--center">
<img src="/img/devtools.png" width="75%" className="screenshot"/>
<img
src={require("@site/static/img/devtools.png").default}
width="75%"
class="screenshot"
/>
</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!
@ -47,10 +53,14 @@ Gophers rejoice! The single binary dream lives on!
### New Features
<div class="text--center">
<img src="/img/wails-menus.png" width="60%" className="screenshot"/>
<img
src={require("@site/static/img/wails-menus.png").default}
width="60%"
class="screenshot"
/>
</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.
@ -59,10 +69,14 @@ 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.
<div class="text--center">
<img src="/img/vscode.png" width="100%" className="screenshot"/>
<img
src={require("@site/static/img/vscode.png").default}
width="100%"
class="screenshot"
/>
</div>
<br/>
<br />
### No requirement to bundle assets
@ -79,20 +93,23 @@ You just pass a single `embed.FS` that contains all your assets into your applic
### New Development Experience
<div class="text--center">
<img src="/img/browser.png" width="60%" className="screenshot"/>
<img
src={require("@site/static/img/browser.png").default}
width="60%"
class="screenshot"
/>
</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.
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In addition to this, a webserver will start on port 34115. All connected web browsers will respond to system events like hot reload on asset change. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
@ -101,12 +118,16 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates
<div class="text--center">
<img src="/img/remote.png" width="60%" className="screenshot"/>
<img
src={require("@site/static/img/remote.png").default}
width="60%"
class="screenshot"
/>
</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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. 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.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!

View File

@ -8,12 +8,15 @@ tags:
- v2
---
<div class="text--center">
<img src="/img/wails-mac.png" width="60%" class="screenshot"/>
<img
src={require("@site/static/img/wails-mac.png").default}
width="60%"
class="screenshot"
/>
</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.
@ -24,10 +27,14 @@ So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windo
### New Features
<div class="text--center">
<img src="/img/wails-menus-mac.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/wails-menus-mac.png").default}
width="80%"
class="screenshot"
/>
</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.
@ -37,10 +44,10 @@ There were a huge number of requests in v1 for the ability to have greater contr
In addition to the normal application options, Wails v2 for Mac also brings some Mac extras:
- Make your window all funky and translucent, like all the pretty swift apps!
- Highly customisable titlebar
- We support the NSAppearance options for the application
- Simple config to auto-create an "About" menu
- Make your window all funky and translucent, like all the pretty swift apps!
- Highly customisable titlebar
- We support the NSAppearance options for the application
- Simple config to auto-create an "About" menu
### No requirement to bundle assets
@ -60,10 +67,10 @@ Now that assets don't need to be bundled, it's enabled a whole new development e
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In addition to this, a webserver will start on port 34115. All connected web browsers will respond to system events like hot reload on asset change. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
@ -72,12 +79,16 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates
<div class="text--center">
<img src="/img/remote-mac.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/remote-mac.png").default}
width="80%"
class="screenshot"
/>
</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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. 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.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
@ -86,37 +97,52 @@ 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:
<div class="text--center">
<img src="/img/build-darwin-arm.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/build-darwin-arm.png").default}
width="80%"
class="screenshot"
/>
</div>
<br/>
<br />
You can also specify `darwin/amd64` as a target too:
<div class="text--center">
<img src="/img/build-darwin-amd.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/build-darwin-amd.png").default}
width="80%"
class="screenshot"
/>
</div>
<br/>
<br />
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
<div class="text--center">
<img src="/img/build-darwin-universal.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/build-darwin-universal.png").default}
width="80%"
class="screenshot"
/>
</div>
<br/>
<br />
### Cross Compilation to Windows
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
<div class="text--center">
<img src="/img/build-cross-windows.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/build-cross-windows.png").default}
width="80%"
class="screenshot"
/>
</div>
<br/>
<br />
### WKWebView Renderer

View File

@ -8,22 +8,29 @@ tags:
- v2
---
<div class="text--center">
<img src="/img/wails-linux.png" width="40%" class="screenshot"/>
<img
src={require("@site/static/img/wails-linux.png").default}
width="40%"
class="screenshot"
/>
</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:
### New Features
<div class="text--center">
<img src="/img/wails-menus-linux.png" width="50%" class="screenshot"/>
<img
src={require("@site/static/img/wails-menus-linux.png").default}
width="50%"
class="screenshot"
/>
</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.
@ -47,10 +54,10 @@ Now that assets don't need to be bundled, it's enabled a whole new development e
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In addition to this, a webserver will start on port 34115. All connected web browsers will respond to system events like hot reload on asset change. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
@ -59,12 +66,16 @@ In addition to this, another JS module is dynamically generated wrapping all you
### Remote Templates
<div class="text--center">
<img src="/img/remote-linux.png" width="80%" class="screenshot"/>
<img
src={require("@site/static/img/remote-linux.png").default}
width="80%"
class="screenshot"
/>
</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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. 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.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
@ -73,11 +84,14 @@ 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.
<div class="text--center">
<img src="/img/linux-build-cross-windows.png" width="80%" class="screenshot"/>
<img
src="/img/linux-build-cross-windows.png"
width="80%"
class="screenshot"
/>
</div>
<br/>
<br />
### In Conclusion

View File

@ -3,36 +3,36 @@
"message": "次のバージョン 🚧",
"description": "The label for version current"
},
"sidebar.tutorialSidebar.category.Getting Started": {
"message": "はじめよう",
"description": "The label for category Getting Started in sidebar tutorialSidebar"
"sidebar.docs.category.Getting Started": {
"message": "Getting Started",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.tutorialSidebar.category.Reference": {
"message": "リファレンス",
"description": "The label for category Reference in sidebar tutorialSidebar"
"sidebar.docs.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar docs"
},
"sidebar.tutorialSidebar.category.Runtime": {
"message": "ランタイム",
"description": "The label for category Runtime in sidebar tutorialSidebar"
"sidebar.docs.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar docs"
},
"sidebar.tutorialSidebar.category.Community": {
"message": "コミュニティ",
"description": "The label for category Community in sidebar tutorialSidebar"
"sidebar.docs.category.Community": {
"message": "Community",
"description": "The label for category Community in sidebar docs"
},
"sidebar.tutorialSidebar.category.Showcase": {
"message": "ショーケース",
"description": "The label for category Showcase in sidebar tutorialSidebar"
"sidebar.docs.category.Showcase": {
"message": "Showcase",
"description": "The label for category Showcase in sidebar docs"
},
"sidebar.tutorialSidebar.category.Guides": {
"message": "ガイド",
"description": "The label for category Guides in sidebar tutorialSidebar"
"sidebar.docs.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.tutorialSidebar.category.Tutorials": {
"message": "チュートリアル",
"description": "The label for category Tutorials in sidebar tutorialSidebar"
"sidebar.docs.category.Tutorials": {
"message": "Tutorials",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.tutorialSidebar.category.Contributing": {
"message": "コントリビューション",
"description": "The label for category Contributing in sidebar tutorialSidebar"
"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,8 @@
# EmailIt
<p style={{"text-align": "center"}}>
<img src="/img/showcase/emailit.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/emailit.png").default} />
<br />
</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.

View File

@ -1,8 +1,8 @@
# EncryptEasy
<p style={{"text-align": "center"}}>
<img src="/img/showcase/encrypteasy.jpg"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/encrypteasy.jpg").default} />
<br />
</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.**

View File

@ -1,8 +1,8 @@
# FileHound Export Utility
<p style={{"text-align": "center"}}>
<img src="/img/showcase/filehound.jpg"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/filehound.jpg").default} />
<br />
</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.

View File

@ -0,0 +1,10 @@
# Minecraft Updater
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/showcase/minecraft-mod-updater.jpg").default}
/>
<br />
</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.

View File

@ -1,9 +1,8 @@
# Molley Wallet
<p style={{"text-align": "center"}}>
<img src="/img/showcase/mollywallet.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/mollywallet.png").default} />
<br />
</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.

View File

@ -1,7 +1,8 @@
# October
<p style={{"text-align": "center"}}>
<img src="/img/showcase/october.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/october.png").default} />
<br />
</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).

View File

@ -1,9 +1,8 @@
# Optimus
<p style={{"text-align": "center"}}>
<img src="/img/showcase/optimus.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/optimus.png").default} />
<br />
</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.

View File

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

View File

@ -1,11 +1,10 @@
# Restic Browser
<p style={{"text-align": "center"}}>
<img src="/img/showcase/restic-browser-2.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/showcase/restic-browser-2.png").default}
/>
<br />
</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.

View File

@ -1,19 +1,19 @@
# RiftShare
<p style={{"text-align": "center"}}>
<img src="/img/showcase/riftshare-main.webp"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/riftshare-main.webp").default} />
<br />
</p>
Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app)
## Features
* Easy secure file sharing between computers both in the local network and through the internet
* Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/)
* Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.)
* Automatic zipping of multiple selected files to send at once
* Full animations, progress bar, and cancellation support for sending and receiving
* Native OS File Selection
* Open files in one click once received
* Auto Update - don't worry about having the latest release!
- Easy secure file sharing between computers both in the local network and through the internet
- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/)
- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.)
- Automatic zipping of multiple selected files to send at once
- Full animations, progress bar, and cancellation support for sending and receiving
- Native OS File Selection
- Open files in one click once received
- Auto Update - don't worry about having the latest release!

View File

@ -0,0 +1,8 @@
# ScriptBar
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/scriptbar.png").default} />
<br />
</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.

View File

@ -1,9 +1,8 @@
# Surge
<p style={{"text-align": "center"}}>
<img src="/img/showcase/surge.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/surge.png").default} />
<br />
</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.

View File

@ -1,9 +1,8 @@
# Wally
<p style={{"text-align": "center"}}>
<img src="/img/showcase/wally.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/wally.png").default} />
<br />
</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.

View File

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

View File

@ -1,9 +1,8 @@
# Ytd
<p>
<img src="/img/showcase/ytd.png"></img><br/>
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/ytd.png").default} />
<br />
</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.

View File

@ -27,4 +27,3 @@ on the ticket first.
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::

View File

@ -25,3 +25,10 @@ There isn't usually a reason to update released documentation so we don't genera
The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory.
## Languages
The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions.
### Add new language
If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation.

View File

@ -28,4 +28,3 @@ On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
To revert back to a stable version, run:
`go install github.com/wailsapp/wails/v2/cmd/wails@latest`

View File

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

View File

@ -6,10 +6,10 @@ sidebar_position: 5
You can run your application in development mode by running `wails dev` from your project directory. This will do the following things:
- Build your application and run it
- 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
- 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
- Build your application and run it
- 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
- 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).

View File

@ -32,6 +32,7 @@ import TabItem from "@theme/TabItem";
If you would rather use Typescript:<br/>
wails init -n myproject -t svelte-ts
</TabItem>
<TabItem value="React">
Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/>
@ -40,42 +41,47 @@ If you would rather use Typescript:<br/>
If you would rather use Typescript:<br/>
wails init -n myproject -t react-ts
</TabItem>
<TabItem value="Vue">
Generate a <a href={"https://vuejs.org/"}>Vue</a> project using Javascript with:<br/><br/>
<a href={"https://vuejs.org/"}>Vue</a>用のJavascriptプロジェクトを生成する場合:<br/><br/>
wails init -n myproject -t vue
If you would rather use Typescript:<br/>
Typescriptプロジェクトを生成する場合:<br/>
wails init -n myproject -t vue-ts
</TabItem>
<TabItem value="Preact">
Generate a <a href={"https://preactjs.com/"}>Preact</a> project using Javascript with:<br/><br/>
<a href={"https://preactjs.com/"}>Preact</a>用のJavascriptプロジェクトを生成する場合:<br/><br/>
wails init -n myproject -t preact
If you would rather use Typescript:<br/>
Typescriptプロジェクトを生成する場合:<br/>
wails init -n myproject -t preact-ts
</TabItem>
<TabItem value="Lit">
Generate a <a href={"https://lit.dev/"}>Lit</a> project using Javascript with:<br/><br/>
<a href={"https://lit.dev/"}>Lit</a>用のJavascriptプロジェクトを生成する場合:<br/><br/>
wails init -n myproject -t lit
If you would rather use Typescript:<br/>
Typescriptプロジェクトを生成する場合:<br/>
wails init -n myproject -t lit-ts
</TabItem>
<TabItem value="Vanilla">
Generate a Vanilla project using Javascript with:<br/><br/>
Vanilla用のJavascriptプロジェクトを生成する場合:<br/><br/>
wails init -n myproject -t vanilla
If you would rather use Typescript:<br/>
Typescriptプロジェクトを生成する場合:<br/>
wails init -n myproject -t vanilla-ts
</TabItem>
</Tabs>

View File

@ -38,19 +38,20 @@ Run `npm --version` to verify.
You will also need to install platform specific dependencies:
<!-- @formatter:off -->
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
<Tabs
defaultValue="Windows"
values={[
{label: "Windows", value: "Windows"},
{label: "MacOS", value: "MacOS"},
{label: "Linux", value: "Linux"},
{ label: "Windows", value: "Windows" },
{ label: "MacOS", value: "MacOS" },
{ label: "Linux", value: "Linux" },
]}
>
<TabItem value="MacOS">
Wails requires that the xcode command line tools are installed. This can be done by running: <br/>
Wailsを使用するには、xcodeコマンドラインツールがインストールされている必要があります。 This can be done by running: <br/>
<code>xcode-select --install</code>
</TabItem>
<TabItem value="Windows">
@ -62,12 +63,10 @@ import TabItem from "@theme/TabItem";
</TabItem>
<TabItem value={"Linux"}>
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
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 {" "}
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>
</Tabs>

View File

@ -1,4 +1,3 @@
# Application Development
There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines.
@ -134,8 +133,6 @@ func main() {
}
```
More information on Binding can be found [here](../howdoesitwork.mdx#method-binding).
## Application Menu

View File

@ -1,4 +1,3 @@
# Bleeding Edge
## Overview

View File

@ -76,6 +76,7 @@ DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico'
DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler
Requesting file: favicon.ico
```
As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file.
If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console:
@ -83,34 +84,43 @@ If you right click the main application and select "inspect" to bring up the dev
```
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:
<p className="text--center">
<img src="/img/assetshandler-does-not-exist.png"></img>
<img
src={require("@site/static/img/assetshandler-does-not-exist.png").default}
/>
</p>
However, if we request `go.mod`, we will see the following output:
<p className="text--center">
<img src="/img/assetshandler-go-mod.png"></img>
<img src={require("@site/static/img/assetshandler-go-mod.png").default} />
</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:
```html
<img id="logo" class="logo">
<img id="logo" class="logo">
```
with:
```html
<img src="build/appicon.png" style="width: 300px">
<img src="build/appicon.png" style="width: 300px">
```
Then we would see the following:
<p className="text--center">
<img src="/img/assetshandler-image.png" style={{"width": "75%"}}></img>
<img
src={require("@site/static/img/assetshandler-image.png").default}
style={{ width: "75%" }}
/>
</p>
:::warning
Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access
to your filesystem.
:::

View File

@ -1,8 +1,17 @@
# Frameless Applications
Wails supports applications with no frame. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options).
:::warning The `data-wails-drag` attribute is being deprecated in favour of the following CSS style: `style="--wails-draggable:drag"`. You can use `style="--wails-draggable:no-drag"` to disable the drag behaviour. For this release only, you can test this by setting the following application option:
```go
Experimental: &options.Experimental{
UseCSSDrag: true,
},
```
:::
Wails offers a simple solution for dragging the window: Any HTML element that has the attribute "data-wails-drag" will act as a "drag handle". This property applies to all nested elements. If you need to indicate that a nested element should not drag, then use the attribute 'data-wails-no-drag' on that element.
The default vanilla template uses this, even though it is not frameless. The whole `body` element is tagged as draggable. The `<div id="input" data-wails-no-drag>` is tagged as being not draggable.

View File

@ -1,4 +1,3 @@
# Frontend
## Script Injection
@ -35,7 +34,7 @@ The code below shows where these are injected by default:
To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour:
```html
<meta name="wails-options" content="[options]">
<meta name="wails-options" content="[options]">
```
The options are as follows:

View File

@ -1,4 +1,3 @@
# IDEs
Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup.
@ -8,7 +7,10 @@ Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but a
## Visual Studio Code
<p className="text--center">
<img src="/img/vscode.png" style={{"width": "75%"}}></img>
<img
src={require("@site/static/img/vscode.png").default}
style={{ width: "75%" }}
/>
</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.

View File

@ -1,4 +1,3 @@
# Linux Distro Support
## Overview
@ -88,6 +87,7 @@ type PackageManager interface {
InstallCommand(*Package) string
}
```
- `Name()` should return the name of the package manager
- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies
- `PackageInstalled()` should return `true` if the given package is installed

View File

@ -0,0 +1,18 @@
# Linux
This page has miscellaneous guides related to developing Wails applications for Linux.
## Video tag doesn't fire "ended" event
When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it:
```js
videoTag.addEventListener("timeupdate", (event) => {
if (event.target.duration - event.target.currentTime < 0.2) {
let ended = new Event("ended");
event.target.dispatchEvent(ended);
}
});
```
Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275)

View File

@ -1,4 +1,3 @@
# Manual Builds
The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways.

View File

@ -1,4 +1,3 @@
# Migrating from v1
## Overview
@ -186,4 +185,3 @@ The format of the file is slightly different. Here is a comparison:
| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. |
</p>

View File

@ -3,7 +3,6 @@
The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks:
```javascript
window.addEventListener('mousedown', handleMouseButtonDown);
function handleMouseButtonDown(event) {
@ -21,6 +20,6 @@ function handleMouseButtonDown(event) {
// other mouse button
}
}
```
Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button

View File

@ -1,4 +1,3 @@
# Overscroll
[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS:

View File

@ -1,4 +1,3 @@
# Routing
Routing is a popular way to switch views in an application. This page offers some guidance around how to do that.
@ -25,3 +24,24 @@ The recommended approach for routing in Angular is [HashLocationStrategy](https:
```ts
RouterModule.forRoot(routes, {useHash: true})
```
## React
The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router):
```jsx
import { HashRouter } from "react-router-dom";
ReactDOM.render(
<HashRouter basename={"/"}>
{/* The rest of your app goes here */}
<Routes>
<Route path="/" element={<Page0 />} exact />
<Route path="/page1" element={<Page1 />} />
<Route path="/page2" element={<Page2 />} />
{/* more... */}
</Routes>
</HashRouter>,
root
);
```

View File

@ -3,35 +3,36 @@
This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions.
## Windows
First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine.
It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer.
First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template:
```yaml
name: "example"
on:
workflow_dispatch:
# This Action only starts when you go to Actions and manually run the workflow.
jobs:
package:
strategy:
matrix:
platform: [ windows-latest, macos-latest ]
go-version: [1.18]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
- name: Get Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build Wails app
run: |
wails build
- name: upload artifacts macOS
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v2
with:
go-version: ${{ matrix.go-version }}
- name: setup node
uses: actions/setup-node@v2
name: wails-binaries-macos
path: build/bin/*
- name: upload artifacts windows
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v2
with:
node-version: 14
# You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json.
name: wails-binaries-windows
path: build/bin/*
- name: Get Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build Wails app
@ -52,20 +53,24 @@ jobs:
```
Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12':
```PowerShell
certutil -encode .\my-cert.p12 my-cert-base64.txt
```
You should now have your .txt file with the base64 encoded certificate. It should start with *-----BEGIN CERTIFICATE-----* and end with *-----END CERTIFICATE-----*. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets:
* **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text.
* **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password.
You should now have your .txt file with the base64 encoded certificate. Now you need to make two action secrets on GitHub. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets:
- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text.
- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password.
Now we're ready to implement the signing in our workflow using one of the two methods:
### Method 1: signing with commands
This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process.
After the `"Build Wails app"` step, we can add the following step to our workflow:
```yaml
- name: Sign Windows binaries
if: matrix.platform == 'windows-latest'
@ -78,12 +83,15 @@ After the `"Build Wails app"` step, we can add the following step to our workflo
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd <signing algorithm> /t <timestamping server> /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' <path to binary>
```
This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line:
* **signing algorithm**: usually sha256.
* **timestamping server**: URL to the timestamping server to use with your certificate.
* **path to binary**: path to the binary you want to sign.
- **signing algorithm**: usually sha256.
- **timestamping server**: URL to the timestamping server to use with your certificate.
- **path to binary**: path to the binary you want to sign.
Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow:
```yaml
name: "example"
on:
@ -138,6 +146,7 @@ jobs:
```
### Method 2: automatically signing with Action
It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate).
---
@ -145,14 +154,16 @@ It is possible to use a Windows code signing Action like [this](https://github.c
## MacOS
First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command:
```bash
base64 Certificates.p12 | pbcopy
```
Now you're ready to create some GitHub project secrets, just as with Windows:
* **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate.
* **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password.
* **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage).
- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate.
- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password.
- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage).
Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template:
@ -202,6 +213,7 @@ jobs:
For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide.
After the `Build Wails app` step, add the following to the workflow:
```yaml
- name: MacOS download gon for code signing and app notarization
if: matrix.platform == 'macos-latest'
@ -212,8 +224,9 @@ After the `Build Wails app` step, add the following to the workflow:
Now we need to configure some gon config files in our `build/darwin` directory:
1. gon-sign.json:
```json
{
```json
{
"source" : ["./build/bin/app.app"],
"bundle_id" : "app.myapp",
"apple_id": {
@ -224,14 +237,18 @@ Now we need to configure some gon config files in our `build/darwin` directory:
"application_identity" : "Developer ID Application: My Name"
}
}
```
Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command:
```bash
security find-identity -v -p codesigning
```
```
Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command:
```bash
security find-identity -v -p codesigning
```
2. entitlements.plist:
```plist
<?xml version="1.0" encoding="UTF-8"?>
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@ -247,10 +264,12 @@ Now we need to configure some gon config files in our `build/darwin` directory:
<true/>
</dict>
</plist>
```
In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
```
In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file:
```plist
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
@ -270,6 +289,7 @@ Make sure you have updated your `Info.plist` file with the same bundle ID as you
```
Now we're ready to add the signing step in our workflow after building the Wails app:
```yaml
- name: Import Code-Signing Certificates for macOS
if: matrix.platform == 'macos-latest'
@ -285,10 +305,13 @@ Now we're ready to add the signing step in our workflow after building the Wails
echo "Signing Package"
gon -log-level=info ./build/darwin/gon-sign.json
```
Please note that signing binaries with Apple could take anywhere from minutes to hours.
## Combined workflow file:
Here is our GitHub workflow file with Windows + macOS combined:
```yaml
name: "example combined"
on:
@ -348,4 +371,5 @@ jobs:
```
# End notes
This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml).

View File

@ -1,4 +1,3 @@
# Templates
Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates:
@ -79,7 +78,10 @@ Renaming package-lock.json -> package-lock.tmpl.json...
- You should have a fully functioning Vue3 application:
<div className="text--center">
<img src="/img/vue3-template.png" width="50%" />
<img
src={require("@site/static/img/vue3-template.png").default}
width="50%"
/>
</div>
## Publishing Templates

View File

@ -14,6 +14,7 @@ Check that your application includes the assets from the correct directory. In y
//go:embed frontend/dist
var assets embed.FS
```
Check that `frontend/dist` contains your application assets.
### Mac
@ -35,7 +36,10 @@ Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433
If your built application looks like this in finder:
<p className="text--center">
<img src="/img/troubleshooting/invalid_mac_app.png"></img>
<img
src={require("@site/static/img/troubleshooting/invalid_mac_app.png").default}
width="40%"
class="screenshot"/>
</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.
@ -43,12 +47,15 @@ it''s likely that your application''s `info.plist` is invalid. Update the file i
## Cannot call backend method from frontend with variadic arguments
If you have a backend method defined with variadic parameters, eg:
```go
func (a *App) TestFunc(msg string, args ...interface{}) error {
// Code
}
```
calling this method from the frontend like this will fail:
```js
var msg = "Hello: "
var args = ["Go", "JS"]
@ -58,7 +65,9 @@ window.go.main.App.TestFunc(msg, ...args).then((result) => {
//handle error
});
```
Workaround:
```js
var msg = "Hello "
var args = ["Go", "JS"]
@ -68,19 +77,24 @@ window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots
//handle error
});
```
Credit: https://github.com/wailsapp/wails/issues/1186
## I''m having getting proxy errors when trying to install Wails
If you are getting errors like this:
```
"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
```
it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg:
```
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
```
Source: https://github.com/wailsapp/wails/issues/1233
## The generated Typescript doesn''t have the correct types

View File

@ -0,0 +1,82 @@
# Visual Studio Code
This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails.
## Vetur Configuration
Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349).
Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following:
Create a file named `vetur.config.js` in the project's root.
```javascript
// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
// **optional** default: `{}`
// override vscode settings
// Notice: It only affects the settings used by Vetur.
settings: {
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true
},
// **optional** default: `[{ root: './' }]`
// support monorepos
projects: [
{
// **required**
// Where is your project?
// It is relative to `vetur.config.js`.
// root: './packages/repo1',
root: './frontend',
// **optional** default: `'package.json'`
// Where is `package.json` in the project?
// We use it to determine the version of vue.
// It is relative to root property.
package: './package.json',
// **optional**
// Where is TypeScript config file in the project?
// It is relative to root property.
tsconfig: './tsconfig.json',
// **optional** default: `'./.vscode/vetur/snippets'`
// Where is vetur custom snippets folders?
snippetFolder: './.vscode/vetur/snippets',
// **optional** default: `[]`
// Register globally Vue component glob.
// If you set it, you can get completion by that components.
// It is relative to root property.
// Notice: It won't actually do it. You need to use `require.context` or `Vue.component`
globalComponents: [
'./src/components/**/*.vue'
]
}
]
}
```
Next, configure `frontend/tsconfig.json`:
```javascript
{
"compilerOptions": {
"module": "system",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"outFile": "../../built/local/tsc.js",
"allowJs": true
},
"exclude": [
"node_modules",
"**/*.spec.ts"
],
"include": [
"src/**/*",
"wailsjs/**/*.ts"
]
}
```
This should enable you to now use Vetur as expected.

View File

@ -1,7 +1,11 @@
# NSIS installer
<p style={{"text-align": "center"}}>
<img src="/img/nsis.png" style={{"max-width":"50%"}}></img><br/>
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/nsis.png").default}
style={{ "max-width": "50%" }}
/>
<br />
</p>
Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/).
@ -13,9 +17,11 @@ Wails supports generating Windows installers using the [NSIS installer](https://
The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page.
If you use the chocolatey package manager, run the following script:
```
choco install nsis
```
If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows.
### Linux
@ -42,6 +48,7 @@ When a new project is created, Wails generates the NSIS configuration files in `
```
To generate an installer for your application, use the `-nsis` flag with `wails build`:
```
wails build -nsis
```

View File

@ -7,7 +7,7 @@ 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.
<div className="text--center">
<img src="/img/architecture.svg" width="75%" />
<img src={require("@site/static/img/architecture.png").default} width="75%" />
</div>
## The Main Application
@ -106,7 +106,7 @@ The `Bind` option is one of the most important options in a Wails application. I
:::info Note
Wails requires that you pass in an *instance* of the struct for it to bind it correctly
Wails requires that you pass in an *instance* of the struct for it to bind it correctly
:::
@ -173,9 +173,10 @@ You may bind as many structs as you like. Just make sure you create an instance
```
When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following:
- Javascript bindings for all bound methods
- Typescript declarations for all bound methods
- Typescript definitions for all Go structs used as inputs or outputs by the bound methods
- Javascript bindings for all bound methods
- Typescript declarations for all bound methods
- Typescript definitions for all Go structs used as inputs or outputs by the bound methods
This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures.
@ -199,11 +200,12 @@ wailsjs
├─App.d.ts
└─App.js
```
Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function:
```javascript
// ...
import {Greet} from '../wailsjs/go/main/App'
// ...
import {Greet} from '../wailsjs/go/main/App'
function doGreeting(name) {
Greet(name).then((result) => {
@ -211,6 +213,7 @@ Here we can see that there is a `main` package that contains the Javascript bind
})
}
```
The Typescript declaration file gives you the correct types for the bound methods:
```ts
@ -323,7 +326,7 @@ export namespace main {
So long as you have TypeScript as part of your frontend build configuration, you can use these models in the following way:
```js title="mycode.js"
import {Greet} from '../wailsjs/go/main/App'
import {Greet} from '../wailsjs/go/main/App'
import {main} from '../wailsjs/go/models'
function generate() {

View File

@ -4,56 +4,68 @@ sidebar_position: 1
# Introduction
## Overview
Wails is a project that enables you to write desktop apps using Go and web technologies.
Consider it a lightweight and fast Electron alternative for Go. You can easily build applications with the flexibility and power of Go, combined with a rich, modern frontend.
Wails doesn't hold back with the eye candy either! 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.
### Features
- Native Menus, Dialogs, Theming and Translucency
- Windows, macOS and linux support
- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS
- Easily call Go methods from Javascript
- Automatic Go struct to Typescript model generation
- No CGO or external DLLs required on Windows
- Live development mode using the power of [Vite](https://vite.net/)
- Powerful CLI to easily Create, Build and Package applications
- A rich [runtime library](/docs/next/reference/runtime)
- 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.
<p class="text--center">
<a href="https://varly.app/">
<img src="/img/varly.png" width="75%"/>
<img src={require("@site/static/img/varly.png").default} width="75%" />
</a>
</p>
## Quick Start Templates
### Quick Start Templates
Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template.
## Native Elements
### Native Elements
Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications.
**It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium.
## Go & Javascript Interoperability
### Go & Javascript Interoperability
Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript versions of the structs used by your Go methods, so you can pass the same data structures between Go and Javascript.
Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript.
## Runtime Library
### Runtime Library
Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc.
## Live Development Experience
### Live Development Experience
### Automatic Rebuilds
#### Automatic Rebuilds
When you run your application in "dev" mode, Wails will build your application as a native desktop application, but will read your assets from disk. It will detect any changes to your Go code and automatically rebuild and relaunch your application.
### Automatic Reloads
#### Automatic Reloads
When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately.
### Develop your application in a Browser
#### Develop your application in a Browser
If you prefer to debug and develop in a browser then Wails has you covered. The running application also has a webserver that will run your application in any browser that connects to it. It will even refresh when your assets change on disk.
## Production-ready Native Binaries
### Production-ready Native Binaries
When you're ready to do the final build of your application, the CLI will compile it down to a single executable, with all the assets bundled into it. On Windows and MacOS, it is possible to create a native package for distribution. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built.
## Tooling
### Tooling
The Wails CLI provides a hassle-free way to generate, build and bundle your applications. It will do the heavy lifting of creating icons, compiling your application with optimal settings and delivering a distributable, production ready binary. Choose from a number of starter templates to get up and running quickly!

View File

@ -39,9 +39,9 @@ A list of community maintained templates can be found [here](../community/templa
:::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.
:::
@ -80,13 +80,13 @@ Example:
:::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
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).
:::
@ -107,12 +107,12 @@ Supported platforms are:
| linux/amd64 | Linux AMD64 |
| linux/arm64 | Linux ARM64 |
## doctor
`wails doctor` will run diagnostics to ensure that your system is ready for development.
Example:
```
Wails CLI v2.0.0-beta
@ -145,15 +145,15 @@ Your system is ready for Wails development!
`wails dev` is used to run your application in a "live development" mode. This means:
- The application's `go.mod` will be updated to use the same version of Wails as the CLI
- The application is compiled and run automatically
- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files
- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions
- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload
- A JS module is generated that provides the following:
- The application's `go.mod` will be updated to use the same version of Wails as the CLI
- The application is compiled and run automatically
- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files
- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions
- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload
- A JS module is generated that provides the following:
- Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting
- TypeScript versions of your Go structs, that can be constructed and passed to your go methods
- A second JS module is generated that provides a wrapper + TS declaration for the runtime
- A second JS module is generated that provides a wrapper + TS declaration for the runtime
| Flag | Description | Default |
|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- |
@ -183,10 +183,10 @@ Example:
This command will do the following:
- Build the application and run it (more details [here](../guides/manual-builds.mdx)
- Generate the Wails JS modules in `./frontend/src`
- Watch for updates to files in `./frontend/dist` and reload on any change
- Open a browser and connect to the application
- Build the application and run it (more details [here](../guides/manual-builds.mdx)
- Generate the Wails JS modules in `./frontend/src`
- Watch for updates to files in `./frontend/dist` and reload on any change
- Open a browser and connect to the application
There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading).
@ -216,7 +216,6 @@ The `wails generate module` command allows you to manually generate the `wailsjs
| -pre | Update to latest pre-release version |
| -version "version" | Install a specific version of the CLI |
## version
`wails version` will simply output the current CLI version.

View File

@ -31,10 +31,9 @@ An example of how to create a menu:
},
)
// ...
````
```
It is also possible to dynamically update the menu, by updating the menu struct and calling
[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu).
```` It is also possible to dynamically update the menu, by updating the menu struct and calling \[MenuUpdateApplicationMenu\](../reference/runtime/menu.mdx#menuupdateapplicationmenu).
The example above uses helper methods, however it's possible to build the menu structs manually.
@ -42,6 +41,11 @@ The example above uses helper methods, however it's possible to build the menu s
A Menu is a collection of MenuItems:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
## Menu
A Menu is a collection of MenuItems:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
type Menu struct {
Items []*MenuItem
@ -179,6 +183,7 @@ const (
ControlKey Modifier = "ctrl"
)
```
A number of helper methods are available to create Accelerators using modifiers:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
@ -218,6 +223,7 @@ func Radio(label string, selected bool, accelerator *keys.Accelerator, click Cal
func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem
func SubMenu(label string, menu *Menu) *Menu
```
You can also create menu items directly on a menu by using the "Add" helpers:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
@ -228,7 +234,6 @@ func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Acceler
func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI
```
A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them.
### Callback
@ -249,7 +254,7 @@ The function is given a `CallbackData` struct which indicates which menu item tr
:::info Roles
Roles are currently supported on Mac only.
Roles are currently supported on Mac only.
:::
@ -259,4 +264,3 @@ A menu item may have a role, which is essentially a pre-defined menu item. We cu
| ------------ | ------------------------------------------------------------------------ |
| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` |
| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` |

View File

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

View File

@ -4,8 +4,6 @@ sidebar_position: 5
# Dialog
## Overview
This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes.
:::info Javascript
@ -16,46 +14,39 @@ This part of the runtime provides access to native dialogs, such as File Selecto
Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions).
Go Signature: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
Returns: Selected directory (blank if the user cancelled) or an error
### OpenFileDialog
Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions).
Go Signature: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
Returns: Selected file (blank if the user cancelled) or an error
### OpenMultipleFilesDialog
Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions).
Go Signature: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)`
Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)`
Returns: Selected files (nil if the user cancelled) or an error
### SaveFileDialog
Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions).
Go Signature: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)`
Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)`
Returns: The selected file (blank if the user cancelled) or an error
### MessageDialog
Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions).
Go Signature: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)`
Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)`
Returns: The text of the selected button or an error
@ -75,6 +66,7 @@ type OpenDialogOptions struct {
TreatPackagesAsDirectories bool
}
```
| Field | Description | Win | Mac | Lin |
| -------------------------- | ---------------------------------------------- | --- | --- | --- |
| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ |
@ -86,7 +78,6 @@ type OpenDialogOptions struct {
| ResolvesAliases | If true, returns the file not the alias | | ✅ | |
| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | |
### SaveDialogOptions
```go
@ -123,6 +114,7 @@ type MessageDialogOptions struct {
CancelButton string
}
```
| Field | Description | Win | Mac | Lin |
| ------------- | ------------------------------------------------------------------------- | --- | --- | --- |
| Type | The type of message dialog, eg question, info... | ✅ | ✅ | ✅ |
@ -145,6 +137,7 @@ Linux has standard dialog types in which the buttons are not customisable. The v
A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key.
For the following code:
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@ -152,13 +145,21 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Buttons: []string{"one", "two", "three", "four"},
})
```
the first button is shown as default:
<div class="text--center">
<img src="/img/runtime/dialog_no_defaults.png" width="30%" class="screenshot"/>
<img
src="/img/runtime/dialog_no_defaults.png"
width="30%"
class="screenshot"
/>
</div>
<br/>
<br />
And if we specify `DefaultButton` to be "two":
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@ -167,14 +168,21 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
DefaultButton: "two",
})
```
the second button is shown as default. When `return` is pressed, the value "two" is returned.
<div class="text--center">
<img src="/img/runtime/dialog_default_button.png" width="30%" class="screenshot"/>
<img
src="/img/runtime/dialog_default_button.png"
width="30%"
class="screenshot"
/>
</div>
<br/>
<br />
If we now specify `CancelButton` to be "three":
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@ -184,15 +192,20 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
CancelButton: "three",
})
```
the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned:
<div class="text--center">
<img src="/img/runtime/dialog_default_cancel.png" width="30%" class="screenshot"/>
<img
src="/img/runtime/dialog_default_cancel.png"
width="30%"
class="screenshot"
/>
</div>
<br/>
<br/>
<br/>
<br />
<br />
<br />
#### DialogType
@ -219,31 +232,39 @@ 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:
<div class="text--center">
<img src="/img/runtime/dialog_win_filters.png" width="50%" class="screenshot"/>
<img
src="/img/runtime/dialog_win_filters.png"
width="50%"
class="screenshot"
/>
</div>
<br/>
<br/>
<br/>
<br />
<br />
<br />
#### Linux
Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog:
<div class="text--center">
<img src="/img/runtime/dialog_lin_filters.png" width="50%" class="screenshot"/>
<img
src="/img/runtime/dialog_lin_filters.png"
width="50%"
class="screenshot"
/>
</div>
<br/>
<br/>
<br/>
<br />
<br />
<br />
#### Mac
Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined.
Example:
```go
selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{
Title: "Select File",
@ -258,4 +279,5 @@ Example:
},
})
```
This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter.

View File

@ -4,46 +4,35 @@ sidebar_position: 2
# Events
## Overview
The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types.
### EventsOn
Go Signature: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS Signature: `EventsOn(eventName string, callback function(optionalData?: any))`
This method sets up a listener for the given event name. When an event of type `eventName` is [emitted](#EventsEmit), the callback is triggered. Any additional data sent with the emitted event will be passed to the callback.
Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`<br/> JS: `EventsOn(eventName string, callback function(optionalData?: any))`
### EventsOff
Go Signature: `EventsOff(ctx context.Context, eventName string)`
JS Signature: `EventsOff(eventName string)`
This method unregisters the listener for the given event name.
Go: `EventsOff(ctx context.Context, eventName string)`<br/> JS: `EventsOff(eventName string)`
### EventsOnce
Go Signature: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS Signature: `EventsOnce(eventName string, callback function(optionalData?: any))`
This method sets up a listener for the given event name, but will only trigger once.
Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`<br/> JS: `EventsOnce(eventName string, callback function(optionalData?: any))`
### EventsOnMultiple
Go Signature: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS Signature: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)`
This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times.
Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`<br/> JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)`
### EventsEmit
Go Signature: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS Signature: `EventsEmit(ctx context, optionalData function(optionalData?: any))`
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))`

View File

@ -6,6 +6,15 @@ 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.
It has utility methods for:
- [Window](window.mdx)
- [Menu](menu.mdx)
- [Dialog](dialog.mdx)
- [Events](events.mdx)
- [Browser](browser.mdx)
- [Log](log.mdx)
The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks.
:::info Note
@ -18,7 +27,7 @@ The Javascript library is available to the frontend via the `window.runtime` map
### Hide
Go Signature: `Hide(ctx context.Context)`
Go: `Hide(ctx context.Context)`<br/> JS: `Hide()`
Hides the application.
@ -26,30 +35,39 @@ Hides the application.
### Show
Go Signature: `Show(ctx context.Context)`
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`. :::
### Quit
Go: `Show(ctx context.Context)`<br/> JS: `Show()`
Go Signature: `Quit(ctx context.Context)`
### Quit
Quits the application.
### Environment
Go: `Quit(ctx context.Context)`<br/> JS: `Quit()`
Go Signature: `Environment(ctx context.Context) EnvironmentInfo`
### Environment
Returns details of the current environment.
Go: `Environment(ctx context.Context) EnvironmentInfo`<br/> JS: `Environment(): Promise<EnvironmentInfo>`
#### EnvironmentInfo
Go:
```go
type EnvironmentInfo struct {
BuildType string // Either "production", "debug" or "dev"
BuildType string
Platform string
Arch string
}
```
JS:
```ts
interface EnvironmentInfo {
buildType: string;
platform: string;
arch: string;
}
```

View File

@ -4,123 +4,103 @@ sidebar_position: 3
# Log
## Overview
The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels:
- Trace
- Debug
- Info
- Warning
- Error
- Fatal
- Trace
- Debug
- Info
- Warning
- Error
- Fatal
The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages.
### LogPrint
Go Signature: `LogPrint(ctx context.Context, message string)`
JS Signature: `LogPrint(message: string)`
Logs the given message as a raw message.
Go: `LogPrint(ctx context.Context, message string)`<br/> JS: `LogPrint(message: string)`
### LogPrintf
Go Signature: `LogPrintf(ctx context.Context, format string, args ...interface{})`
Logs the given message as a raw message.
Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`<br/>
### LogTrace
Go Signature: `LogTrace(ctx context.Context, message string)`
JS Signature: `LogTrace(message: string)`
Logs the given message at the `Trace` log level.
Go: `LogTrace(ctx context.Context, message string)`<br/> JS: `LogTrace(message: string)`
### LogTracef
Go Signature: `LogTracef(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Trace` log level.
Go: `LogTracef(ctx context.Context, format string, args ...interface{})`<br/>
### LogDebug
Go Signature: `LogDebug(ctx context.Context, message string)`
JS Signature: `LogDebug(message: string)`
Logs the given message at the `Debug` log level.
Go: `LogDebug(ctx context.Context, message string)`<br/> JS: `LogDebug(message: string)`
### LogDebugf
Go Signature: `LogDebugf(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Debug` log level.
Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`<br/>
### LogInfo
Go Signature: `LogInfo(ctx context.Context, message string)`
JS Signature: `LogInfo(message: string)`
Logs the given message at the `Info` log level.
Go: `LogInfo(ctx context.Context, message string)`<br/> JS: `LogInfo(message: string)`
### LogInfof
Go Signature: `LogInfof(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Info` log level.
Go: `LogInfof(ctx context.Context, format string, args ...interface{})`<br/>
### LogWarning
Go Signature: `LogWarning(ctx context.Context, message string)`
JS Signature: `LogWarning(message: string)`
Logs the given message at the `Warning` log level.
Go: `LogWarning(ctx context.Context, message string)`<br/> JS: `LogWarning(message: string)`
### LogWarningf
Go Signature: `LogWarningf(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Warning` log level.
Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`<br/>
### LogError
Go Signature: `LogError(ctx context.Context, message string)`
JS Signature: `LogError(message: string)`
Logs the given message at the `Error` log level.
Go: `LogError(ctx context.Context, message string)`<br/> JS: `LogError(message: string)`
### LogErrorf
Go Signature: `LogErrorf(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Error` log level.
Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`<br/>
### LogFatal
Go Signature: `LogFatal(ctx context.Context, message string)`
JS Signature: `LogFatal(message: string)`
Logs the given message at the `Fatal` log level.
Go: `LogFatal(ctx context.Context, message string)`<br/> JS: `LogFatal(message: string)`
### LogFatalf
Go Signature: `LogFatalf(ctx context.Context, format string, args ...interface{})`
Logs the given message at the `Fatal` log level.
Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`<br/>
### LogSetLogLevel
Go Signature: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS Signature: `LogSetLogLevel(level: number)`
Sets the log level. In Javascript, the number relates to the following log levels:
| Value | Log Level |
@ -131,6 +111,8 @@ Sets the log level. In Javascript, the number relates to the following log level
| 4 | Warning |
| 5 | Error |
Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`<br/> JS: `LogSetLogLevel(level: number)`
## Using a Custom Logger
A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`:
@ -146,4 +128,3 @@ type Logger interface {
Fatal(message string)
}
```

View File

@ -4,8 +4,6 @@ sidebar_position: 6
# Menu
## Overview
These methods are related to the application menu.
:::info Javascript
@ -13,13 +11,13 @@ These methods are related to the application menu.
:::
### MenuSetApplicationMenu
Go Signature: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)`
Sets the application menu to the given [menu](../menus.mdx) .
Sets the application menu to the given [menu](../menus.mdx).
Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)`
### MenuUpdateApplicationMenu
Go Signature: `MenuUpdateApplicationMenu(ctx context.Context)`
Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`.
Go: `MenuUpdateApplicationMenu(ctx context.Context)`

View File

@ -4,199 +4,169 @@ sidebar_position: 4
# Window
## Overview
These methods give control of the application window.
### WindowSetTitle
Go Signature: `WindowSetTitle(ctx context.Context, title string)`
JS Signature: `WindowSetTitle(title: string)`
Sets the text in the window title bar.
### WindowFullscreen
Go Signature: `WindowFullscreen(ctx context.Context)`
Go: `WindowSetTitle(ctx context.Context, title string)`<br/> JS: `WindowSetTitle(title: string)`
JS Signature: `WindowFullscreen()`
### WindowFullscreen
Makes the window full screen.
### WindowUnfullscreen
Go Signature: `WindowUnfullscreen(ctx context.Context)`
Go: `WindowFullscreen(ctx context.Context)`<br/> JS: `WindowFullscreen()`
JS Signature: `WindowUnfullscreen()`
### WindowUnfullscreen
Restores the previous window dimensions and position prior to full screen.
### WindowCenter
Go Signature: `WindowCenter(ctx context.Context)`
Go: `WindowUnfullscreen(ctx context.Context)`<br/> JS: `WindowUnfullscreen()`
JS Signature: `WindowCenter()`
### WindowCenter
Centers the window on the monitor the window is currently on.
### WindowReload
Go Signature: `WindowReload(ctx context.Context)`
Go: `WindowCenter(ctx context.Context)`<br/> JS: `WindowCenter()`
JS Signature: `WindowReload()`
### WindowReload
Performs a "reload" (Reloads current page).
### WindowReloadApp
Go Signature: `WindowReloadApp(ctx context.Context)`
Go: `WindowReload(ctx context.Context)`<br/> JS: `WindowReload()`
JS Signature: `WindowReloadApp()`
### WindowReloadApp
Reloads the application frontend.
### WindowSetSy
Go: `WindowReloadApp(ctx context.Context)`<br/> JS: `WindowReloadApp()`
### WindowSetSystemDefaultTheme
Go Signature: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS Signature: `WindowSetSystemDefaultTheme()`
Windows only.
Go: `WindowSetSystemDefaultTheme(ctx context.Context)`<br/> JS: `WindowSetSystemDefaultTheme()`
Sets window theme to system default (dark/light).
### WindowSetLightTheme
Go Signature: `WindowSetLightTheme(ctx context.Context)`
JS Signature: `WindowSetLightTheme()`
Windows only.
Go: `WindowSetLightTheme(ctx context.Context)`<br/> JS: `WindowSetLightTheme()`
Sets window theme to light.
### WindowSetDarkTheme
Go Signature: `WindowSetDarkTheme(ctx context.Context)`
JS Signature: `WindowSetDarkTheme()`
Windows only.
Go: `WindowSetDarkTheme(ctx context.Context)`<br/> JS: `WindowSetDarkTheme()`
Sets window theme to dark.
### WindowShow
Go Signature: `WindowShow(ctx context.Context)`
JS Signature: `WindowShow()`
Shows the window, if it is currently hidden.
### WindowHide
Go Signature: `WindowHide(ctx context.Context)`
Go: `WindowShow(ctx context.Context)`<br/> JS: `WindowShow()`
JS Signature: `WindowHide()`
### WindowHide
Hides the window, if it is currently visible.
### WindowSetSize
Go Signature: `WindowSetSize(ctx context.Context, width int, height int)`
Go: `WindowHide(ctx context.Context)`<br/> JS: `WindowHide()`
JS Signature: `WindowSetSize(size: Size)`
### WindowSetSize
Sets the width and height of the window.
### WindowGetSize
Go Signature: `WindowGetSize(ctx context.Context) (width int, height int)`
Go: `WindowSetSize(ctx context.Context, width int, height int)`<br/> JS: `WindowSetSize(size: Size)`
JS Signature: `WindowGetSize() : Size`
### WindowGetSize
Gets the width and height of the window.
### WindowSetMinSize
Go Signature: `WindowSetMinSize(ctx context.Context, width int, height int)`
Go: `WindowGetSize(ctx context.Context) (width int, height int)`<br/> JS: `WindowGetSize() : Size`
JS Signature: `WindowSetMinSize(size: Size)`
### WindowSetMinSize
Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions.
Setting a size of `0,0` will disable this constraint.
### WindowSetMaxSize
Go Signature: `WindowSetMaxSize(ctx context.Context, width int, height int)`
Go: `WindowSetMinSize(ctx context.Context, width int, height int)`<br/> JS: `WindowSetMinSize(size: Size)`
JS Signature: `WindowSetMaxSize(size: Size)`
### WindowSetMaxSize
Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions.
Setting a size of `0,0` will disable this constraint.
### WindowSetAlwaysOnTop
Go Signature: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`<br/> JS: `WindowSetMaxSize(size: Size)`
JS Signature: `WindowSetAlwaysOnTop(b: Boolen)`
### WindowSetAlwaysOnTop
Sets the window AlwaysOnTop or not on top.
Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`<br/> JS: `WindowSetAlwaysOnTop(b: Boolen)`
### WindowSetPosition
Go Signature: `WindowSetPosition(ctx context.Context, x int, y int)`
JS Signature: `WindowSetPosition(position: Position)`
Sets the window position relative to the monitor the window is currently on.
### WindowGetPosition
Go Signature: `WindowGetPosition(ctx context.Context) (x int, y int)`
Go: `WindowSetPosition(ctx context.Context, x int, y int)`<br/> JS: `WindowSetPosition(position: Position)`
JS Signature: `WindowGetPosition() : Position`
### WindowGetPosition
Gets the window position relative to the monitor the window is currently on.
### WindowMaximise
Go Signature: `WindowMaximise(ctx context.Context)`
Go: `WindowGetPosition(ctx context.Context) (x int, y int)`<br/> JS: `WindowGetPosition() : Position`
JS Signature: `WindowMaximise()`
### WindowMaximise
Maximises the window to fill the screen.
### WindowUnmaximise
Go Signature: `WindowUnmaximise(ctx context.Context)`
Go: `WindowMaximise(ctx context.Context)`<br/> JS: `WindowMaximise()`
JS Signature: `WindowUnmaximise()`
### WindowUnmaximise
Restores the window to the dimensions and position prior to maximising.
### WindowToggleMaximise
Go Signature: `WindowToggleMaximise(ctx context.Context)`
Go: `WindowUnmaximise(ctx context.Context)`<br/> JS: `WindowUnmaximise()`
JS Signature: `WindowToggleMaximise()`
### WindowToggleMaximise
Toggles between Maximised and UnMaximised.
### WindowMinimise
Go Signature: `WindowMinimise(ctx context.Context)`
Go: `WindowToggleMaximise(ctx context.Context)`<br/> JS: `WindowToggleMaximise()`
JS Signature: `WindowMinimise()`
### WindowMinimise
Minimises the window.
### WindowUnminimise
Go Signature: `WindowUnminimise(ctx context.Context)`
Go: `WindowMinimise(ctx context.Context)`<br/> JS: `WindowMinimise()`
JS Signature: `WindowUnminimise()`
### WindowUnminimise
Restores the window to the dimensions and position prior to minimising.
### WindowSetBackgroundColour
Go Signature: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
Go: `WindowUnminimise(ctx context.Context)`<br/> JS: `WindowUnminimise()`
JS Signature: `WindowSetBackgroundColour(R, G, B, A)`
### WindowSetBackgroundColour
Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
Valid values for R, G, B and A are 0-255.
:::info Windows
On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 will be considered 255.
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)`
## Typescript Object Definitions
### Position
@ -216,5 +186,3 @@ interface Size {
h: number;
}
```

View File

@ -6,9 +6,9 @@ sidebar_position: 10
The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to:
- Create a new Wails application
- Build the application
- Run the application
- Create a new Wails application
- Build the application
- Run the application
:::note
This tutorial uses Windows as the target platform. Output will vary slightly
@ -92,10 +92,13 @@ 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:
<div class="text--center">
<img src="/img/helloworld-app-icon.png" width="134px"/>
<img
src={require("@site/static/img/helloworld-app-icon.png").default}
width="134px"
/>
</div>
<br/>
<br />
We can run it by simply double-clicking the `helloworld.exe` file.
@ -106,7 +109,10 @@ On Linux, you can run the application using `./helloworld` from the `build/bin`
You should see the application working as expected:
<div class="text--center">
<img src="/img/windows-default-app.png" width="50%"
className="screenshot"/>
<img
src={require("@site/static/img/windows-default-app.png").default}
width="50%"
className="screenshot"
/>
</div>
<br/>
<br />

View File

@ -0,0 +1,38 @@
{
"version.label": {
"message": "v2.0.0-beta.43",
"description": "The label for version v2.0.0-beta.43"
},
"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-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

@ -4,16 +4,52 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased][]
## [v2.0.0-beta.44 2022-08-20]
### Deprecation Notice
The `data-wails-drag` attribute is being deprecated in favour of the following CSS style: `style="--wails-draggable:drag"`. You can use `style="--wails-draggable:no-drag"` to disable the drag behaviour. For this release only, you can test this by setting the following application option:
```go
Experimental: &options.Experimental{
UseCSSDrag: true,
},
```
### Added
* Set file permissions for generated files by @leaanthony in https://github.com/wailsapp/wails/pull/1763
* Experimental support for CSS Drag detection by @leaanthony in https://github.com/wailsapp/wails/pull/1750
### Fixed
* Bug fix collecting of output binaries for platforms by @stffabi in https://github.com/wailsapp/wails/pull/1715
* Fix registration of exposed fields by @ValentinTrinque in https://github.com/wailsapp/wails/pull/1727
* Fix column widths for doctor command's dependencies table by @ianmjones in https://github.com/wailsapp/wails/pull/1717
* Do not generate bindings for `OnBeforeClose` method
### What's Changed
* Misc code refactors and removal by @leaanthony in https://github.com/wailsapp/wails/pull/1713
* Add react-router to routing.mdx by @Maicarons2022 in https://github.com/wailsapp/wails/pull/1755
* Add Japanese to doc by @RyoTagami in https://github.com/wailsapp/wails/pull/1716
* Added EmailIt and Modal File Manager by @raguay in https://github.com/wailsapp/wails/pull/1728
* Adding my ScriptBar program by @raguay in https://github.com/wailsapp/wails/pull/1761
* Link to general webview2 runtime download page and not to a specific language by @stffabi in https://github.com/wailsapp/wails/pull/1764
* Updated translations in https://github.com/wailsapp/wails/pull/1719 and https://github.com/wailsapp/wails/pull/1720
* Remove text outside style's brackets by @DragoSpiro98 in https://github.com/wailsapp/wails/pull/1765
### New Contributors
* @RyoTagami made their first contribution in https://github.com/wailsapp/wails/pull/1716
* @raguay made their first contribution in https://github.com/wailsapp/wails/pull/1728
* @Maicarons2022 made their first contribution in https://github.com/wailsapp/wails/pull/1755
* @DragoSpiro98 made their first contribution in https://github.com/wailsapp/wails/pull/1765
## [v2.0.0-beta.43] - 2022-08-08
## Added
### Added
* Add support for retrieving the release notes from Github by @leaanthony in https://github.com/wailsapp/wails/pull/1679
* Add `frontend:dev:install` configuration by @LGiki in https://github.com/wailsapp/wails/pull/1666
## Fixed
### Fixed
* Fix formatting of some error messages by @stffabi in https://github.com/wailsapp/wails/pull/1665
* Windows dialogs now work when window is not visible yet by @leaanthony in https://github.com/wailsapp/wails/pull/1662
@ -23,7 +59,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Better support for doubleclick events in drag regions by @leaanthony in https://github.com/wailsapp/wails/pull/1704
* Allow MacOS frameless window to be miniturisable by @leaanthony in https://github.com/wailsapp/wails/pull/1705
## What's Changed
### What's Changed
* add wails-sveltekit-template by @h8gi in https://github.com/wailsapp/wails/pull/1671
* wails doctor now reports correct MacOS os id by @stffabi in https://github.com/wailsapp/wails/pull/1673
@ -33,18 +69,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Build frontend only before starting the dev watcher command by @stffabi in https://github.com/wailsapp/wails/pull/1694
* Improve error message for auto dev server discovery without a dev watcher by @stffabi in https://github.com/wailsapp/wails/pull/1711
## New Contributors
### New Contributors
* @h8gi made their first contribution in https://github.com/wailsapp/wails/pull/1671
* @SamHennessy made their first contribution in https://github.com/wailsapp/wails/pull/1682
## [v2.0.0-beta.42] - 2022-07-25
## Added
### Added
* Added `options.NewRGBA` and `options.NewRGB` functions to create `*options.RGBA` by @leaanthony
## Fixed
### Fixed
* Fixed initial build of frontend when using `wails dev` on new projects by @leaanthony in https://github.com/wailsapp/wails/pull/1650
* Ignore empty install command when running `wails dev` by @stffabi in https://github.com/wailsapp/wails/pull/1651
@ -54,13 +90,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [v2.0.0-beta.40] - 2022-07-24
## Added
### Added
* Add Show() and Hide() to runtime to show/hide application by @leaanthony in https://github.com/wailsapp/wails/pull/1599
* Override target platform/arch using GOOS and GOARCH environment variables by @leaanthony in https://github.com/wailsapp/wails/pull/1618
* Add option to skip frontend rebuild in dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1632
## Fixed
### Fixed
* Update svelte templates to use vite 3 by @leaanthony in https://github.com/wailsapp/wails/pull/1643
* Fix plain template by @stffabi in https://github.com/wailsapp/wails/pull/1609
@ -68,33 +104,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Fixed typo in documentation page docs/howdoesitwork by @MyNameIsAres in https://github.com/wailsapp/wails/pull/1636
* Use scaling when setting min/max window by @leaanthony in https://github.com/wailsapp/wails/pull/1557
## Changed
### Changed
* Install dev dependencies before starting dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1615
* Translate and fix website text by @misitebao in https://github.com/wailsapp/wails/pull/1525
* docs: add MyNameIsAres as a contributor for doc by @allcontributors in https://github.com/wailsapp/wails/pull/1638
* Deprecate Fullscreen appoption by @acheong08 in https://github.com/wailsapp/wails/pull/1640
## Deprecated
### Deprecated
* The `Fullscreen` application option is deprecated. Please use [`WindowStartState`](https://wails.io/docs/reference/options#windowstartstate) instead.
## New Contributors
### New Contributors
* @MyNameIsAres made their first contribution in https://github.com/wailsapp/wails/pull/1636
## [v2.0.0-beta.39.2] - 2022-07-20
## Added
### Added
* Update example for macOS Menu by @acheong08 in https://github.com/wailsapp/wails/pull/1600
## Fixed
### Fixed
* Reinstate Go 1.17 compatibility by @leaanthony in https://github.com/wailsapp/wails/pull/1605
## [v2.0.0-beta.39] - 2022-07-19
## Added
### Added
* New screen dimensions runtime API by @skamensky in https://github.com/wailsapp/wails/pull/1519
* Auto discover vite devserver port by @leaanthony in https://github.com/wailsapp/wails/pull/1547
@ -102,7 +139,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* New pre-build hooks feature by @leaanthony in https://github.com/wailsapp/wails/pull/1578
* New production log level option by @leaanthony in https://github.com/wailsapp/wails/pull/1555
## Fixed
### Fixed
* Fix stack corruption in Windows when using ICoreWebView2HttpHeadersCollectionIterator by @stffabi in https://github.com/wailsapp/wails/pull/1589
* Move WindowGet* to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1464
@ -113,7 +150,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Check for line length when scanning for local devserver url by @leaanthony in https://github.com/wailsapp/wails/pull/1566
* Remove usage of unsafe.Pointer in winc by @stffabi and @leaanthony in https://github.com/wailsapp/wails/pull/1556
## Changed
### Changed
* Rename WindowSetRGBA -> WindowSetBackgroundColour by @leaanthony in https://github.com/wailsapp/wails/pull/1506
* Improvements to the dev command by @stffabi in https://github.com/wailsapp/wails/pull/1510
@ -123,7 +160,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Add troubleshooting for `Not Found` error by @acheong08 in https://github.com/wailsapp/wails/pull/1586
* Docs/better homepage by @leaanthony in https://github.com/wailsapp/wails/pull/1591
## New Contributors
### New Contributors
* @skamensky made their first contribution in https://github.com/wailsapp/wails/pull/1519
* @acheong08 made their first contribution in https://github.com/wailsapp/wails/pull/1586
@ -167,7 +204,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Better signal handling by @leaanthony in https://github.com/wailsapp/wails/pull/1488
* Chore/react 18 create root by @tomanagle in https://github.com/wailsapp/wails/pull/1489
## New Contributors
### New Contributors
* @jaesung9507 made their first contribution in https://github.com/wailsapp/wails/pull/1430
* @LukenSkyne made their first contribution in https://github.com/wailsapp/wails/pull/1449
@ -330,5 +367,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- The docs have been improved and updated
- Added troubleshooting guide
[Unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD
[v2.0.0-beta.33]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.32...v2.0.0-beta.33

View File

@ -0,0 +1,142 @@
# Community Guide
The number of Wails users is growing at an incredible rate, and if you're reading this, chances are you're ready to join. So... welcome!
## Resources
### Code of Conduct
coming soon...
### Stay in the Know
- Follow our [official Twitter account](https://twitter.com/wailsapp).
### Get Support
- [GitHub](https://github.com/wailsapp/wails) - If you have a bug to report or feature to request, that's what the GitHub issues are for. Please respect the rules specified in each repository's issue template.
- [Slack](https://gophers.slack.com/messages/CJ4P9F7MZ/) - A place for Wails devs to meet and chat in real time.
- [QQ Group(中文)](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - A Wails group for Chinese developers to communicate, where you can get help from other developers.
### Explore the Ecosystem
- [The Awesome Wails Page](https://github.com/wailsapp/awesome-wails) - See what other awesome resources have been published by other awesome people.
## Ways of contributing
Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes.
There are many ways to contribute to the project:
- Developing new features
- Fixing bugs
- Testing
- Documenting features
- Writing tutorials / guides
- Helping others on the issues + discussions boards
Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion.
### Developing New Features
We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows:
- Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
- Before developing, check that the ticket includes the following information:
- The purpose of the enhancement
- What is out of scope for the enhancement
- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason)
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details
- Comment on the ticket stating you wish to develop the feature
- Clone the repository and create a branch with the format `feature/<ticket_number>_<ticket_title>`
- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes
- Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion
on the ticket first.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::
### Fixing Bugs
The process for fixing bugs are as follows:
- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix
- Before developing, check that the ticket includes the following information:
- The scope of the issue including platforms affected
- The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example
- The output of `wails doctor`
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket.
- Comment on the ticket stating you wish to develop a fix
- Clone the repository and create a branch with the format `bugfix/<ticket_number>_<ticket_title>`
- Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
bugfixes should be discussed as the approach may have unintended side effects.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::
### Testing
Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project:
- Testing if a bug is reproducible on your local system
- Testing PRs to ensure that they work correctly
If you chose to test if someone's bug report is reproducible on your local system, then feel free to add a comment on the ticket confirming this with the output of `wails doctor`.
To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR.
If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion or on slack.
### Documenting
This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code.
We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started.
To set up a local documentation development environment, do the following:
- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install)
- `cd website`
- `npm install`
- `npm run start`
After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser.
#### Versioning
We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that.
There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories.
The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory.
#### Languages
The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions.
##### Add new language
If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation.
### Helping Others
A great way to contribute to the project is to help others who are experiencing difficulty. This is normally reported as a ticket or a message on the Wails slack channel. Even just clarifying the issue can really help out. Sometimes, when an issue is discussed and gets resolved, we create a guide out of it to help others who face the same issues.
To join the Wails slack channel, accept the invite [here](https://gophers.slack.com/join/shared_invite/zt-197vymgt3-sJt4oyakb6nqlVKjXTyeVw#/shared-invite/email) and join us on the channel by following [this link](https://gophers.slack.com/?redir=%2Fmessages%2FCJ4P9F7MZ%2F).
:::note
Work In Progress
:::

View File

@ -0,0 +1,29 @@
---
sidebar_position: 20
---
# Developing New Features
We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows:
- Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
- Before developing, check that the ticket includes the following information:
- The purpose of the enhancement
- What is out of scope for the enhancement
- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason)
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details
- Comment on the ticket stating you wish to develop the feature
- Clone the repository and create a branch with the format `feature/<ticket_number>_<ticket_title>`
- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes
- Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion
on the ticket first.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::

View File

@ -0,0 +1,34 @@
---
sidebar_position: 40
---
# Documenting
This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's *as important* as the code.
We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started.
To set up a local documentation development environment, do the following:
- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install)
- `cd website`
- `npm install`
- `npm run start`
After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser.
## Versioning
We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that.
There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories.
The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory.
## Languages
The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions.
### Add new language
If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation.

View File

@ -0,0 +1,27 @@
---
sidebar_position: 30
---
# Fixing Bugs
The process for fixing bugs are as follows:
- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix
- Before developing, check that the ticket includes the following information:
- The scope of the issue including platforms affected
- The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example
- The output of `wails doctor`
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket.
- Comment on the ticket stating you wish to develop a fix
- Clone the repository and create a branch with the format `bugfix/<ticket_number>_<ticket_title>`
- Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
bugfixes should be discussed as the approach may have unintended side effects.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::

View File

@ -0,0 +1,13 @@
---
sidebar_position: 50
---
# Helping Others
A great way to contribute to the project is to help others who are experiencing difficulty. This is normally reported as a ticket or a message on the Wails slack channel. Even just clarifying the issue can really help out. Sometimes, when an issue is discussed and gets resolved, we create a guide out of it to help others who face the same issues.
To join the Wails slack channel, accept the invite [here](https://gophers.slack.com/join/shared_invite/zt-197vymgt3-sJt4oyakb6nqlVKjXTyeVw#/shared-invite/email) and join us on the channel by following [this link](https://gophers.slack.com/?redir=%2Fmessages%2FCJ4P9F7MZ%2F).
:::note
Work In Progress
:::

View File

@ -0,0 +1,30 @@
---
sidebar_position: 10
---
# Setting up a Development Environment
You can set up a development environment by doing the following:
- Install the latest versions of Go and Git
- `git clone https://github.com/wailsapp/wails`
- `cd wails/v2/cmd/wails`
- `go install`
NOTE: The directory that you cloned the project into will now be called "clonedir".
The Wails CLI will now be at the very latest version.
To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file:
`replace github.com/wailsapp/wails/v2 => <clonedir>`
Example:
On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2`
On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
To revert back to a stable version, run:
`go install github.com/wailsapp/wails/v2/cmd/wails@latest`

View File

@ -0,0 +1,16 @@
---
sidebar_position: 35
---
# Testing
Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project:
- Testing if a bug is reproducible on your local system
- Testing PRs to ensure that they work correctly
If you chose to test if someone's bug report is reproducible on your local system, then feel free to add a comment on the ticket confirming this with the output of `wails doctor`.
To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR.
If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion or on slack.

View File

@ -0,0 +1,18 @@
---
sidebar_position: 1
---
# Ways of contributing
Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes.
There are many ways to contribute to the project:
- Developing new features
- Fixing bugs
- Testing
- Documenting features
- Writing tutorials / guides
- Helping others on the issues + discussions boards
Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion.

View File

@ -24,70 +24,70 @@
</a>
<a href="https://github.com/codydbentley" style="width:100px">
<img src="https://github.com/codydbentley.png?size=100" width="100"/>
<img src="https://github.com/codydbentley.png?size=100" width="100" />
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="/img/easyweb.png" width="100"/>
<img src="/img/easyweb.png" width="100" />
</a>
<br/>
<br/>
<br />
<br />
<a href="https://github.com/matryer" style="width:100px">
<img src="https://github.com/matryer.png" width="100"/>
<img src="https://github.com/matryer.png" width="100" />
</a>
<a href="https://www.jetbrains.com?from=Wails" style="width:100px">
<img src="/img/jetbrains-grayscale.png" width="100"/>
<img src="/img/jetbrains-grayscale.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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<img src="https://github.com/charlie-dee.png?size=55" width="55" />
</a>
directory
<a href="https://github.com/michaelolson1996" style="width:55px">
@ -282,6 +282,9 @@ directory
<td align="center"><a href="https://github.com/acheong08"><img src="https://avatars.githubusercontent.com/u/36258159?v=4?s=75" width="75px;" alt=""/><br /><sub><b>Antonio</b></sub></a><br /><a href="https://github.com/wailsapp/wails/commits?author=acheong08" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/MyNameIsAres"><img src="https://avatars.githubusercontent.com/u/32432637?v=4?s=75" width="75px;" alt=""/><br /><sub><b>MyNameIsAres</b></sub></a><br /><a href="https://github.com/wailsapp/wails/commits?author=MyNameIsAres" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="http://mai.car.ons"><img src="https://avatars.githubusercontent.com/u/101958587?v=4?s=75" width="75px;" alt=""/><br /><sub><b>Maicarons J</b></sub></a><br /><a href="https://github.com/wailsapp/wails/commits?author=Maicarons2022" title="Documentation">📖</a></td>
</tr>
</table>
<!-- markdownlint-restore -->

View File

@ -0,0 +1,9 @@
# FAQ
## 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.
## 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 v2 does offer native elements such as menus and dialogs, so it is becoming a lightweight electron alternative.

415
website/i18n/ko/code.json Normal file
View File

@ -0,0 +1,415 @@
{
"homepage.Features.Title1": {
"message": "풍부한 기능"
},
"homepage.Features.Description1": {
"message": "메뉴, 대화상자 등과 같은 네이티브 UI 요소를 사용하여 크로스 플랫폼 애플리케이션을 빌드하세요."
},
"homepage.Features.Title2": {
"message": "친숙함"
},
"homepage.Features.Description2": {
"message": "이미 알고 있는 기술로 멋진 애플리케이션을 빌드하세요."
},
"homepage.Features.Title3": {
"message": "빠른 구성"
},
"homepage.Features.Description3": {
"message": "Wails CLI를 사용하여 프로젝트를 빠르게 생성, 빌드 및 패키징할 수 있습니다."
},
"homepage.Tagline": {
"message": "Go에서 아름다운 크로스 플랫폼 애플리케이션 빌드"
},
"homepage.ButtonText": {
"message": "시작하기"
},
"homepage.LearnMoreButtonText": {
"message": "자세히 보기"
},
"theme.ErrorPageContent.title": {
"message": "페이지가 충돌했습니다.",
"description": "The title of the fallback page when the page crashed"
},
"theme.ErrorPageContent.tryAgain": {
"message": "재시도",
"description": "The label of the button to try again when the page crashed"
},
"theme.NotFound.title": {
"message": "페이지를 찾을 수 없습니다.",
"description": "The title of the 404 page"
},
"theme.NotFound.p1": {
"message": "요청한 페이지를 찾을 수 없습니다.",
"description": "The first paragraph of the 404 page"
},
"theme.NotFound.p2": {
"message": "링크 제공자에게 이 페이지가 유효하지 않다고 알려주세요.",
"description": "The 2nd paragraph of the 404 page"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "닫기",
"description": "The ARIA label for close button of announcement bar"
},
"theme.blog.archive.title": {
"message": "아카이브",
"description": "The page & hero title of the blog archive page"
},
"theme.blog.archive.description": {
"message": "아카이브",
"description": "The page & hero description of the blog archive page"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "맨위로",
"description": "The ARIA label for the back to top button"
},
"theme.blog.paginator.navAriaLabel": {
"message": "블로그 목록 페이지 탐색",
"description": "The ARIA label for the blog pagination"
},
"theme.blog.paginator.newerEntries": {
"message": "최근 글",
"description": "The label used to navigate to the newer blog posts page (previous page)"
},
"theme.blog.paginator.olderEntries": {
"message": "이전 글",
"description": "The label used to navigate to the older blog posts page (next page)"
},
"theme.blog.post.readingTime.plurals": {
"message": "읽는 데 1분 걸림|읽는 데 {readingTime}분 걸림",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.post.readMoreLabel": {
"message": "{title}에 대해 더 읽어보기",
"description": "The ARIA label for the link to full blog posts from excerpts"
},
"theme.blog.post.readMore": {
"message": "더 읽어보기",
"description": "The label used in blog post item excerpts to link to full blog posts"
},
"theme.blog.post.paginator.navAriaLabel": {
"message": "블로그 글 페이지 탐색",
"description": "The ARIA label for the blog posts pagination"
},
"theme.blog.post.paginator.newerPost": {
"message": "최근 글",
"description": "The blog post button label to navigate to the newer/previous post"
},
"theme.blog.post.paginator.olderPost": {
"message": "이전 글",
"description": "The blog post button label to navigate to the older/next post"
},
"theme.blog.sidebar.navAriaLabel": {
"message": "블로그 최근 글 탐색",
"description": "The ARIA label for recent posts in the blog sidebar"
},
"theme.blog.post.plurals": {
"message": "1개의 글|{count}개의 글",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "\"{tagName}\" 태그가 붙은 {nPosts}개의 글",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "모든 태그 보기",
"description": "The label of the link targeting the tag list page"
},
"theme.CodeBlock.copyButtonAriaLabel": {
"message": "클립보드에 코드 복사",
"description": "The ARIA label for copy code blocks button"
},
"theme.CodeBlock.copied": {
"message": "복사됨",
"description": "The copied button label on code blocks"
},
"theme.CodeBlock.copy": {
"message": "복사",
"description": "The copy button label on code blocks"
},
"theme.colorToggle.ariaLabel": {
"message": "다크 모드와 라이트 모드 전환하기 (현재: {mode})",
"description": "The ARIA label for the navbar color mode toggle"
},
"theme.colorToggle.ariaLabel.mode.dark": {
"message": "다크 모드",
"description": "The name for the dark color mode"
},
"theme.colorToggle.ariaLabel.mode.light": {
"message": "라이트 모드",
"description": "The name for the light color mode"
},
"theme.docs.DocCard.categoryDescription": {
"message": "{count}개",
"description": "The default description for a category card in the generated index about how many items this category includes"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "사이드바 펼치기",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.expandButtonAriaLabel": {
"message": "사이드바 펼치기",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.paginator.navAriaLabel": {
"message": "문서 페이지 탐색",
"description": "The ARIA label for the docs pagination"
},
"theme.docs.paginator.previous": {
"message": "이전",
"description": "The label used to navigate to the previous doc"
},
"theme.docs.paginator.next": {
"message": "다음",
"description": "The label used to navigate to the next doc"
},
"theme.docs.sidebar.collapseButtonTitle": {
"message": "사이드바 접기",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.collapseButtonAriaLabel": {
"message": "사이드바 접기",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
"message": "'{label}' 카테고리 사이드바 접기/펼치기",
"description": "The ARIA label to toggle the collapsible sidebar category"
},
"theme.docs.tagDocListPageTitle.nDocsTagged": {
"message": "1개의 문서에 태그가 지정되었습니다.|{count}개의 문서에 태그가 지정되었습니다.",
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.docs.tagDocListPageTitle": {
"message": "\"{tagName}\" 태그가 붙은 {nDocsTagged}개의 문서",
"description": "The title of the page for a docs tag"
},
"theme.docs.versionBadge.label": {
"message": "버전: {versionLabel}"
},
"theme.docs.versions.unreleasedVersionLabel": {
"message": "{siteTitle} {versionLabel} 문서는 아직 정식 공개되지 않았습니다.",
"description": "The label used to tell the user that he's browsing an unreleased doc version"
},
"theme.docs.versions.unmaintainedVersionLabel": {
"message": "이 문서는 {siteTitle} {versionLabel} 버전에 관한 문서이며, 더 이상 유지보수되지 않습니다.",
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionSuggestionLabel": {
"message": "최신 문서는 {latestVersionLink} ({versionLabel})을 확인하세요.",
"description": "The label used to tell the user to check the latest version"
},
"theme.docs.versions.latestVersionLinkLabel": {
"message": "최신 버전",
"description": "The label used for the latest version suggestion link label"
},
"theme.common.editThisPage": {
"message": "이 페이지 편집하기",
"description": "The link label to edit the current page"
},
"theme.common.headingLinkTitle": {
"message": "제목으로 바로 가기",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": " {date}에 ",
"description": "The words used to describe on which date a page has been last updated"
},
"theme.lastUpdated.byUser": {
"message": "{user}이(가) ",
"description": "The words used to describe by who the page has been last updated"
},
"theme.lastUpdated.lastUpdatedAtBy": {
"message": "{byUser}{atDate}마지막으로 갱신함",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
"message": "← 메인 메뉴로 돌아가기",
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
},
"theme.navbar.mobileVersionsDropdown.label": {
"message": "버전",
"description": "The label for the navbar versions dropdown on mobile view"
},
"theme.common.skipToMainContent": {
"message": "메인 콘텐츠로 건너뛰기",
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
},
"theme.tags.tagsListLabel": {
"message": "태그:",
"description": "The label alongside a tag list"
},
"theme.TOCCollapsible.toggleButtonLabel": {
"message": "이 페이지",
"description": "The label used by the button on the collapsible TOC component"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "언어",
"description": "The label for the mobile language switcher dropdown"
},
"theme.SearchBar.seeAll": {
"message": "{count}개의 결과 모두 보기"
},
"theme.SearchBar.label": {
"message": "검색",
"description": "The ARIA label and placeholder for search button"
},
"theme.SearchPage.documentsFound.plurals": {
"message": "{count}개의 문서를 찾았습니다.",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
"message": "\"{query}\"에 대한 검색 결과",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
"message": "문서 검색",
"description": "The search page title for empty query"
},
"theme.SearchPage.inputPlaceholder": {
"message": "검색어를 입력하세요.",
"description": "The placeholder for search page input"
},
"theme.SearchPage.inputLabel": {
"message": "검색",
"description": "The ARIA label for search page input"
},
"theme.SearchPage.algoliaLabel": {
"message": "Algolia에 의해 검색",
"description": "The ARIA label for Algolia mention"
},
"theme.SearchPage.noResultsText": {
"message": "검색 결과가 없습니다.",
"description": "The paragraph for empty search result"
},
"theme.SearchPage.fetchingNewResults": {
"message": "새로운 검색 결과를 불러오는 중 입니다...",
"description": "The paragraph for fetching new search results"
},
"theme.tags.tagsPageTitle": {
"message": "태그",
"description": "The title of the tag list page"
},
"theme.docs.breadcrumbs.home": {
"message": "홈페이지",
"description": "The ARIA label for the home page in the breadcrumbs"
},
"theme.docs.breadcrumbs.navAriaLabel": {
"message": "탐색 경로",
"description": "The ARIA label for the breadcrumbs"
},
"theme.CodeBlock.wordWrapToggle": {
"message": "자동 줄바꿈",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.admonition.note": {
"message": "note",
"description": "The default label used for the Note admonition (:::note)"
},
"theme.admonition.tip": {
"message": "tip",
"description": "The default label used for the Tip admonition (:::tip)"
},
"theme.admonition.danger": {
"message": "danger",
"description": "The default label used for the Danger admonition (:::danger)"
},
"theme.admonition.info": {
"message": "info",
"description": "The default label used for the Info admonition (:::info)"
},
"theme.admonition.caution": {
"message": "caution",
"description": "The default label used for the Caution admonition (:::caution)"
},
"theme.SearchModal.searchBox.resetButtonTitle": {
"message": "Clear the query",
"description": "The label and ARIA label for search box reset button"
},
"theme.SearchModal.searchBox.cancelButtonText": {
"message": "Cancel",
"description": "The label and ARIA label for search box cancel button"
},
"theme.SearchModal.startScreen.recentSearchesTitle": {
"message": "Recent",
"description": "The title for recent searches"
},
"theme.SearchModal.startScreen.noRecentSearchesText": {
"message": "No recent searches",
"description": "The text when no recent searches"
},
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": {
"message": "Save this search",
"description": "The label for save recent search button"
},
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": {
"message": "Remove this search from history",
"description": "The label for remove recent search button"
},
"theme.SearchModal.startScreen.favoriteSearchesTitle": {
"message": "Favorite",
"description": "The title for favorite searches"
},
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": {
"message": "Remove this search from favorites",
"description": "The label for remove favorite search button"
},
"theme.SearchModal.errorScreen.titleText": {
"message": "Unable to fetch results",
"description": "The title for error screen of search modal"
},
"theme.SearchModal.errorScreen.helpText": {
"message": "You might want to check your network connection.",
"description": "The help text for error screen of search modal"
},
"theme.SearchModal.footer.selectText": {
"message": "to select",
"description": "The explanatory text of the action for the enter key"
},
"theme.SearchModal.footer.selectKeyAriaLabel": {
"message": "Enter key",
"description": "The ARIA label for the Enter key button that makes the selection"
},
"theme.SearchModal.footer.navigateText": {
"message": "to navigate",
"description": "The explanatory text of the action for the Arrow up and Arrow down key"
},
"theme.SearchModal.footer.navigateUpKeyAriaLabel": {
"message": "Arrow up",
"description": "The ARIA label for the Arrow up key button that makes the navigation"
},
"theme.SearchModal.footer.navigateDownKeyAriaLabel": {
"message": "Arrow down",
"description": "The ARIA label for the Arrow down key button that makes the navigation"
},
"theme.SearchModal.footer.closeText": {
"message": "to close",
"description": "The explanatory text of the action for Escape key"
},
"theme.SearchModal.footer.closeKeyAriaLabel": {
"message": "Escape key",
"description": "The ARIA label for the Escape key button that close the modal"
},
"theme.SearchModal.footer.searchByText": {
"message": "Search by",
"description": "The text explain that the search is making by Algolia"
},
"theme.SearchModal.noResultsScreen.noResultsText": {
"message": "No results for",
"description": "The text explains that there are no results for the following search"
},
"theme.SearchModal.noResultsScreen.suggestedQueryText": {
"message": "Try searching for",
"description": "The text for the suggested query when no results are found for the following search"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsText": {
"message": "Believe this query should return results?",
"description": "The text for the question where the user thinks there are missing results"
},
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": {
"message": "Let us know.",
"description": "The text for the link to report missing results"
},
"theme.SearchModal.placeholder": {
"message": "Search docs",
"description": "The placeholder of the input of the DocSearch pop-up modal"
}
}

View File

@ -0,0 +1,155 @@
---
slug: wails-v2-beta-for-windows
title: Wails v2 Beta for Windows
authors:
- leaanthony
tags:
- wails
- v2
---
<div class="text--center">
<img
src={require("@site/static/img/wails.png").default}
width="40%"
class="screenshot"
/>
</div>
<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.
It was clear that people were excited about adding web frontends to their Go projects, and almost immediately pushed the project beyond the proof of concept that I had created. At the time, Wails used the [webview](https://github.com/webview/webview) project to handle the frontend, and the only option for Windows was the IE11 renderer. Many bug reports were rooted in this limitation: poor JavaScript/CSS support and no dev tools to debug it. This was a frustrating development experience but there wasn't much that could have been done to rectify it.
For a long time, I'd firmly believed that Microsoft would eventually have to sort out their browser situation. The world was moving on, frontend development was booming and IE wasn't cutting it. When Microsoft announced the move to using Chromium as the basis for their new browser direction, I knew it was only a matter of time until Wails could use it, and move the Windows developer experience to the next level.
Today, I am pleased to announce: **Wails v2 Beta for Windows**! There's a huge amount to unpack in this release, so grab a drink, take a seat and we'll begin...
### No CGO Dependency!
No, I'm not joking: _No_ _CGO_ _dependency_ 🤯! The thing about Windows is that, unlike MacOS and Linux, it doesn't come with a default compiler. In addition, CGO requires a mingw compiler and there's a ton of different installation options. Removing the CGO requirement has massively simplified setup, as well as making debugging an awful lot easier. Whilst I have put a fair bit of effort in getting this working, the majority of the credit should go to [John Chadwick](https://github.com/jchv) for not only starting a couple of projects to make this possible, but also being open to someone taking those projects and building on them. Credit also to [Tad Vizbaras](https://github.com/tadvi) whose [winc](https://github.com/tadvi/winc) project started me down this path.
### WebView2 Chromium Renderer
<div class="text--center">
<img
src={require("@site/static/img/devtools.png").default}
width="75%"
class="screenshot"
/>
</div>
<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!
The WebView2 component does, however, have a requirement to have the `WebView2Loader.dll` sitting alongside the binary. This makes distribution just that little bit more painful than we gophers are used to. All solutions and libraries (that I know of) that use WebView2 have this dependency.
However, I'm really excited to announce that Wails applications _have no such requirement_! Thanks to the wizardry of [John Chadwick](https://github.com/jchv), we are able to bundle this dll inside the binary and get Windows to load it as if it were present on disk.
Gophers rejoice! The single binary dream lives on!
### New Features
<div class="text--center">
<img
src={require("@site/static/img/wails-menus.png").default}
width="60%"
class="screenshot"
/>
</div>
<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 huge number of requests in v1 for the ability to have greater control of the window itself. I'm happy to announce that there's new runtime APIs specifically for this. It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs.
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.
<div class="text--center">
<img
src={require("@site/static/img/vscode.png").default}
width="100%"
class="screenshot"
/>
</div>
<br />
### No requirement to bundle assets
A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an `<img>` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS.
> Wow, that sounds like a webserver...
Yes, it works just like a webserver, except it isn't.
> So how do I include my assets?
You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you.
### New Development Experience
<div class="text--center">
<img
src={require("@site/static/img/browser.png").default}
width="60%"
class="screenshot"
/>
</div>
<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.
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code!
### Remote Templates
<div class="text--center">
<img
src={require("@site/static/img/remote.png").default}
width="60%"
class="screenshot"
/>
</div>
<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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
### In Conclusion
Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome. Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board.
There were many twists and turns, pivots and u-turns to get to this point. This was due partly to early technical decisions that needed changing, and partly because some core problems we had spent time building workarounds for were fixed upstream: Gos embed feature is a good example. Fortunately, everything came together at the right time, and today we have the very best solution that we can have. I believe the wait has been worth it - this would not have been possible even 2 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:
- [Misitebao](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.
- [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.
And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes.
I look forward to seeing what people build with Wails in this next exciting phase of the project!
Lea.
PS: MacOS and Linux users need not feel left out - porting to this new foundation is actively under way and most of the hard work has already been done. Hang in there!
PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!

View File

@ -0,0 +1,163 @@
---
slug: wails-v2-beta-for-mac
title: Wails v2 Beta for MacOS
authors:
- leaanthony
tags:
- wails
- v2
---
<div class="text--center">
<img
src={require("@site/static/img/wails-mac.png").default}
width="60%"
class="screenshot"
/>
</div>
<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.
You mean this isn't ready for production? For your use case, it may well be ready, but there are still a number of known issues so keep your eye on [this project board](https://github.com/wailsapp/wails/projects/7) and if you would like to contribute, you'd be very welcome!
So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windows Beta :wink:
### New Features
<div class="text--center">
<img
src={require("@site/static/img/wails-menus-mac.png").default}
width="80%"
class="screenshot"
/>
</div>
<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 huge number of requests in v1 for the ability to have greater control of the window itself. I'm happy to announce that there's new runtime APIs specifically for this. It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs.
### Mac Specific Options
In addition to the normal application options, Wails v2 for Mac also brings some Mac extras:
- Make your window all funky and translucent, like all the pretty swift apps!
- Highly customisable titlebar
- We support the NSAppearance options for the application
- Simple config to auto-create an "About" menu
### No requirement to bundle assets
A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an `<img>` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS.
> Wow, that sounds like a webserver...
Yes, it works just like a webserver, except it isn't.
> So how do I include my assets?
You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you.
### New Development Experience
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.
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code!
### Remote Templates
<div class="text--center">
<img
src={require("@site/static/img/remote-mac.png").default}
width="80%"
class="screenshot"
/>
</div>
<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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
### Native M1 Support
Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wails project now supports M1 native builds:
<div class="text--center">
<img
src={require("@site/static/img/build-darwin-arm.png").default}
width="80%"
class="screenshot"
/>
</div>
<br />
You can also specify `darwin/amd64` as a target too:
<div class="text--center">
<img
src={require("@site/static/img/build-darwin-amd.png").default}
width="80%"
class="screenshot"
/>
</div>
<br />
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
<div class="text--center">
<img
src={require("@site/static/img/build-darwin-universal.png").default}
width="80%"
class="screenshot"
/>
</div>
<br />
### Cross Compilation to Windows
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
<div class="text--center">
<img
src={require("@site/static/img/build-cross-windows.png").default}
width="80%"
class="screenshot"
/>
</div>
<br />
### WKWebView Renderer
V1 relied on a (now deprecated) WebView component. V2 uses the most recent WKWebKit component so expect the latest and greatest from Apple.
### In Conclusion
As I'd said in the Windows release notes, Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome! Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board.
And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes.
I look forward to seeing what people build with Wails in this next exciting phase of the project!
Lea.
PS: Linux users, you're next!
PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!

View File

@ -0,0 +1,110 @@
---
slug: wails-v2-beta-for-linux
title: Wails v2 Beta for Linux
authors:
- leaanthony
tags:
- wails
- v2
---
<div class="text--center">
<img
src={require("@site/static/img/wails-linux.png").default}
width="40%"
class="screenshot"
/>
</div>
<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:
### New Features
<div class="text--center">
<img
src={require("@site/static/img/wails-menus-linux.png").default}
width="50%"
class="screenshot"
/>
</div>
<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 huge number of requests in v1 for the ability to have greater control of the window itself. I'm happy to announce that there's new runtime APIs specifically for this. It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs.
### No requirement to bundle assets
A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an `<img>` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS.
> Wow, that sounds like a webserver...
Yes, it works just like a webserver, except it isn't.
> So how do I include my assets?
You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you.
### New Development Experience
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.
It also provides the additional features:
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code!
### Remote Templates
<div class="text--center">
<img
src={require("@site/static/img/remote-linux.png").default}
width="80%"
class="screenshot"
/>
</div>
<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! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
### Cross Compilation to Windows
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
<div class="text--center">
<img
src="/img/linux-build-cross-windows.png"
width="80%"
class="screenshot"
/>
</div>
<br />
### In Conclusion
As I'd said in the Windows release notes, Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome! Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board.
Linux is **hard** to support. We expect there to be a number of quirks with the beta. Please help us to help you by filing detailed bug reports!
Finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors) whose support drive the project in many ways behind the scenes.
I look forward to seeing what people build with Wails in this next exciting phase of the project!
Lea.
PS: The v2 release isn't far off now!
PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!

View File

@ -0,0 +1,10 @@
leaanthony:
name: Lea Anthony
title: Maintainer of Wails
url: https://github.com/leaanthony
image_url: https://github.com/leaanthony.png
misitebao:
name: Misite Bao
title: Architect
url: https://github.com/misitebao
image_url: https://github.com/misitebao.png

View File

@ -0,0 +1,14 @@
{
"title": {
"message": "블로그",
"description": "The title for the blog used in SEO"
},
"description": {
"message": "블로그",
"description": "The description for the blog used in SEO"
},
"sidebar.title": {
"message": "최근 글",
"description": "The label for the left sidebar"
}
}

View File

@ -0,0 +1,38 @@
{
"version.label": {
"message": "다음 버전 🚧",
"description": "The label for version current"
},
"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

@ -0,0 +1,4 @@
{
"label": "Appendix",
"position": 70
}

View File

@ -0,0 +1,4 @@
{
"label": "Community",
"position": 50
}

View File

@ -0,0 +1,23 @@
---
sidebar_position: 2
---
# Links
This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links.
## Awesome Wails
The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails.
## Support Channels
- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/)
- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/)
- [Github Issues](https://github.com/wailsapp/wails/issues)
- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828)
## Social Media
- [Twitter](https://twitter.com/wailsapp)
- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054

View File

@ -0,0 +1,4 @@
{
"label": "Showcase",
"position": 1
}

View File

@ -0,0 +1,8 @@
# EmailIt
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/emailit.png").default} />
<br />
</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.

View File

@ -0,0 +1,10 @@
# EncryptEasy
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/encrypteasy.jpg").default} />
<br />
</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.**
Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy.

View File

@ -0,0 +1,14 @@
# FileHound Export Utility
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/filehound.jpg").default} />
<br />
</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.
The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats.
Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2
Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6

View File

@ -0,0 +1,10 @@
# Minecraft Updater
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/showcase/minecraft-mod-updater.jpg").default}
/>
<br />
</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.

View File

@ -0,0 +1,12 @@
# Modal File Manager
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/showcase/modalfilemanager.png").default}
/>
<br />
</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.
This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers.

View File

@ -0,0 +1,8 @@
# Molley Wallet
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/mollywallet.png").default} />
<br />
</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.

View File

@ -0,0 +1,12 @@
# October
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/october.png").default} />
<br />
</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).
It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)!
In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes.

View File

@ -0,0 +1,8 @@
# Optimus
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/optimus.png").default} />
<br />
</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.

View File

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

View File

@ -0,0 +1,10 @@
# Restic Browser
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/showcase/restic-browser-2.png").default}
/>
<br />
</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.

View File

@ -0,0 +1,19 @@
# RiftShare
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/riftshare-main.webp").default} />
<br />
</p>
Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app)
## Features
- Easy secure file sharing between computers both in the local network and through the internet
- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/)
- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.)
- Automatic zipping of multiple selected files to send at once
- Full animations, progress bar, and cancellation support for sending and receiving
- Native OS File Selection
- Open files in one click once received
- Auto Update - don't worry about having the latest release!

View File

@ -0,0 +1,8 @@
# ScriptBar
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/scriptbar.png").default} />
<br />
</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.

View File

@ -0,0 +1,8 @@
# Surge
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/surge.png").default} />
<br />
</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.

View File

@ -0,0 +1,8 @@
# Wally
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/wally.png").default} />
<br />
</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.

View File

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

View File

@ -0,0 +1,8 @@
# Ytd
<p style={{ "text-align": "center" }}>
<img src={require("@site/static/img/showcase/ytd.png").default} />
<br />
</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.

View File

@ -0,0 +1,48 @@
---
sidebar_position: 1
---
# Templates
This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide.
To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]`
If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used.
Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue`
:::warning Attention
**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.
:::
## 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-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features)
- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier
## Angular
- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n
## React
- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs
- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development
- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript
## Svelte
- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte
- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite
- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3
- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit
## Elm
- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket:

View File

@ -0,0 +1,4 @@
{
"label": "Contributing",
"position": 99
}

View File

@ -0,0 +1,29 @@
---
sidebar_position: 20
---
# Developing New Features
We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows:
- Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
- Before developing, check that the ticket includes the following information:
- The purpose of the enhancement
- What is out of scope for the enhancement
- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason)
- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details
- Comment on the ticket stating you wish to develop the feature
- Clone the repository and create a branch with the format `feature/<ticket_number>_<ticket_title>`
- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes
- Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion
on the ticket first.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
:::

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