From f7976a5c85bb1743bb0f24062659249628e0df1e Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 19 Jul 2022 20:58:11 +1000 Subject: [PATCH] v2.0.0-beta.39 --- v2/cmd/wails/internal/version.txt | 2 +- website/src/pages/changelog.md | 43 ++++++ .../community/showcase/surge.mdx | 9 -- .../gettingstarted/installation.mdx | 78 ----------- .../guides/developing-wails.mdx | 39 ------ .../appendix/_category_.json | 0 .../community/_category_.json | 0 .../community/links.mdx | 0 .../community/showcase/_category_.json | 0 .../community/showcase/encrypteasy.mdx | 3 +- .../community/showcase/filehound.mdx | 3 +- .../community/showcase/mollywallet.mdx | 3 +- .../community/showcase/october.mdx | 11 ++ .../community/showcase/optimus.mdx | 3 +- .../community/showcase/portfall.mdx | 3 +- .../community/showcase/restic-browser.mdx | 10 ++ .../community/showcase/riftshare.mdx | 3 +- .../community/showcase/surge.mdx | 8 ++ .../community/showcase/wally.mdx | 3 +- .../community/showcase/wombat.mdx | 3 +- .../community/showcase/ytd.mdx | 3 +- .../community/templates.mdx | 3 - .../contributing/_category_.json | 4 + .../contributing/developing_new_features.mdx | 35 +++++ .../contributing/documenting.mdx | 39 ++++++ .../contributing/fixing_bugs.mdx | 30 +++++ .../contributing/helping_others.mdx | 17 +++ .../setting_up_a_dev_environment.mdx | 34 +++++ .../contributing/testing.mdx | 21 +++ .../contributing/ways_of_contributing.mdx | 22 ++++ .../gettingstarted/_category_.json | 0 .../gettingstarted/building.mdx | 3 +- .../gettingstarted/development.mdx | 0 .../gettingstarted/firstproject.mdx | 73 ++++++----- .../gettingstarted/installation.mdx | 91 +++++++++++++ .../guides/_category_.json | 0 .../guides/application-development.mdx | 45 ++++++- .../guides/bleeding-edge.mdx | 1 - .../guides/dynamic-assets.mdx | 123 ++++++++++++++++++ .../guides/frameless.mdx | 3 +- .../guides/frontend.mdx | 1 - .../guides/ides.mdx | 1 - .../guides/linux-distro-support.mdx | 2 +- .../guides/manual-builds.mdx | 7 +- .../guides/migrating.mdx | 37 +++--- .../guides/mouse-buttons.mdx | 28 ++++ .../guides/overscroll.mdx | 1 - .../guides/routing.mdx | 1 - .../guides/signing.mdx | 24 ++-- .../guides/templates.mdx | 5 +- .../guides/troubleshooting.mdx | 48 ++++++- .../guides/windows-installer.mdx | 2 +- .../guides/windows.mdx | 18 ++- .../howdoesitwork.mdx | 8 +- .../introduction.mdx | 0 .../reference/_category_.json | 0 .../reference/cli.mdx | 22 ++-- .../reference/menus.mdx | 6 +- .../reference/options.mdx | 119 ++++++++++++----- .../reference/project-config.mdx | 15 ++- .../reference/runtime/_category_.json | 0 .../reference/runtime/browser.mdx | 0 .../reference/runtime/dialog.mdx | 17 ++- .../reference/runtime/events.mdx | 0 .../reference/runtime/intro.mdx | 0 .../reference/runtime/log.mdx | 0 .../reference/runtime/menu.mdx | 2 +- .../reference/runtime/window.mdx | 14 +- .../tutorials/_category_.json | 4 + .../tutorials/helloworld.mdx | 114 ++++++++++++++++ ...n => version-v2.0.0-beta.39-sidebars.json} | 0 website/versions.json | 4 +- 72 files changed, 966 insertions(+), 305 deletions(-) delete mode 100644 website/versioned_docs/version-v2.0.0-beta.37/community/showcase/surge.mdx delete mode 100644 website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/installation.mdx delete mode 100644 website/versioned_docs/version-v2.0.0-beta.37/guides/developing-wails.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/appendix/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/links.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/encrypteasy.mdx (91%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/filehound.mdx (93%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/mollywallet.mdx (83%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/community/showcase/october.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/optimus.mdx (81%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/portfall.mdx (77%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/community/showcase/restic-browser.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/riftshare.mdx (92%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/community/showcase/surge.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/wally.mdx (87%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/wombat.mdx (71%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/showcase/ytd.mdx (86%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/community/templates.mdx (95%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/_category_.json create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/developing_new_features.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/documenting.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/fixing_bugs.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/helping_others.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/setting_up_a_dev_environment.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/testing.mdx create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/contributing/ways_of_contributing.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/gettingstarted/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/gettingstarted/building.mdx (71%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/gettingstarted/development.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/gettingstarted/firstproject.mdx (56%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/installation.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/application-development.mdx (85%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/bleeding-edge.mdx (99%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/frameless.mdx (92%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/frontend.mdx (99%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/ides.mdx (99%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/linux-distro-support.mdx (99%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/manual-builds.mdx (95%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/migrating.mdx (74%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/guides/mouse-buttons.mdx rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/overscroll.mdx (99%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/routing.mdx (99%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/signing.mdx (94%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/templates.mdx (97%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/troubleshooting.mdx (52%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/windows-installer.mdx (95%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/guides/windows.mdx (70%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/howdoesitwork.mdx (97%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/introduction.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/cli.mdx (89%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/menus.mdx (97%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/options.mdx (84%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/project-config.mdx (64%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/_category_.json (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/browser.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/dialog.mdx (91%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/events.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/intro.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/log.mdx (100%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/menu.mdx (90%) rename website/versioned_docs/{version-v2.0.0-beta.37 => version-v2.0.0-beta.39}/reference/runtime/window.mdx (92%) create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/tutorials/_category_.json create mode 100644 website/versioned_docs/version-v2.0.0-beta.39/tutorials/helloworld.mdx rename website/versioned_sidebars/{version-v2.0.0-beta.37-sidebars.json => version-v2.0.0-beta.39-sidebars.json} (100%) diff --git a/v2/cmd/wails/internal/version.txt b/v2/cmd/wails/internal/version.txt index 7bdae6b2a9f..500aad178b3 100644 --- a/v2/cmd/wails/internal/version.txt +++ b/v2/cmd/wails/internal/version.txt @@ -1 +1 @@ -v2.0.0-beta.38 \ No newline at end of file +v2.0.0-beta.39 \ No newline at end of file diff --git a/website/src/pages/changelog.md b/website/src/pages/changelog.md index 99be4d38d4a..a526d23b9ef 100644 --- a/website/src/pages/changelog.md +++ b/website/src/pages/changelog.md @@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v2.0.0-beta.39] - 2022-07-19 + +## 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 +* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 +* 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 + +* 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 +* Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534 +* Fix checking for installed apt package in none English session. by @ianmjones + in https://github.com/wailsapp/wails/pull/1548 +* Fix OnBeforeClose code for Mac by @leaanthony in https://github.com/wailsapp/wails/pull/1558 +* Support Maps in TS conversion by @leaanthony in https://github.com/wailsapp/wails/pull/1435 +* 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 + +* 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 +* Update vscode template by @leaanthony in https://github.com/wailsapp/wails/pull/1398 +* Bump svelte from 3.42.2 to 3.49.0 in /v2/internal/frontend/runtime/dev by @dependabot + in https://github.com/wailsapp/wails/pull/1572 +* Bump svelte from 3.42.5 to 3.49.0 in /v2/internal/frontend/runtime by @dependabot + in https://github.com/wailsapp/wails/pull/1573 +* 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 + +* @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 + +**Full Changelog**: https://github.com/wailsapp/wails/compare/v2.0.0-beta.38...v2.0.0-beta.39 + ## [v2.0.0-beta.38] - 2022-06-27 ### Added diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/surge.mdx b/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/surge.mdx deleted file mode 100644 index 774e86e70e5..00000000000 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/surge.mdx +++ /dev/null @@ -1,9 +0,0 @@ - -# Surge - -

-
-

- -[Surge](https://surge.rule110.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. - diff --git a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/installation.mdx b/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/installation.mdx deleted file mode 100644 index 3b4cd33cc3e..00000000000 --- a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/installation.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Installation - -## Supported Platforms - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## Dependencies - -Wails has a number of common dependencies that are required before installation: - -- Go 1.17+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://golang.org/dl/). - -Ensure that you follow the official [Go installation instructions](https://golang.org/doc/install.mdx#install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: - -- Check Go is installed correctly: `go version` -- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin` - -### NPM - -Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against. - -Run `npm --version` to verify. - -## Platform Specific Dependencies - -You will also need to install platform specific dependencies: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails requires that the xcode command line tools are installed. This can be done by running:
- - xcode-select --install -
- - Wails requires that the WebView2{" "} - runtime is installed. Some Windows installations will already have this installed. You can check using the{" "} - wails doctor command (see below). - - Linux required the standard gcc build tools plus libgtk3 and libwebkit. - 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 wails doctor after installation - to be shown how to install the dependencies. - If your distro/package manager is not supported, please consult the Add Linux Distro guide. -
- -## Optional Dependencies - -- [UPX](https://upx.github.io/) for compressing your applications. - -## Installing Wails - -Run `go install github.com/wailsapp/wails/v2/cmd/wails@latest` to install the Wails CLI. - -## System Check - -Running `wails doctor` will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems. diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/developing-wails.mdx b/website/versioned_docs/version-v2.0.0-beta.37/guides/developing-wails.mdx deleted file mode 100644 index 58f9e9bd82c..00000000000 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/developing-wails.mdx +++ /dev/null @@ -1,39 +0,0 @@ - -# Contributing - -This page is a guide on how to contribute to the Wails project. - -First, a word of warning: Wails v2 has been through a number of iterations and pivots. There is a lot of code that -is either on hold or deprecated. Reading the whole project and trying to understand it may be confusing. This document -aims to focus on what is current and how to understand that. - -## Bugs - -For raising bugs, please open a ticket on GitHub and give it the \[v2\] label. Include the output of `wails doctor` -in the ticket to help us understand your environment. - -For fixing bugs, please comment on a ticket that you'd like to take it on and we will put a label on the ticket. -It is best to use Windows as it is done in pure Go, making debugging much easier. - -## Features - -To request a new feature, raise a ticket so that it may be discussed. The ticket should be given the -"Feature Request" label. These will be discussed and if selected for development will be given the label -"Ready for Development". - -To implement a new feature, raise a ticket as above or select a ticket with the "Ready for Development" label. - -When raising a PR, be mindful to state what platforms the PR has been tested on. Any new feature will not be accepted unless it works -on all platforms (if it can). - -:::warning What not to do - -PRs for features with no tickets aren't helpful as there's no context to the PR and it will not be prioritised. - -::: - -## Documentation - -Contributing to the documentation is easy by clicking on the "Edit this page" link on any of the pages. Documentation -updates can be done ad-hoc, without a ticket. - diff --git a/website/versioned_docs/version-v2.0.0-beta.37/appendix/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/appendix/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/appendix/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/appendix/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/community/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/community/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/community/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/links.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/links.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/community/links.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/links.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/encrypteasy.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/encrypteasy.mdx similarity index 91% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/encrypteasy.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/encrypteasy.mdx index 31d7b6ad5bb..32833f3494f 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/encrypteasy.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/encrypteasy.mdx @@ -1,8 +1,7 @@ - # EncryptEasy

-
+

**[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.** diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/filehound.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/filehound.mdx similarity index 93% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/filehound.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/filehound.mdx index 687be3870b6..ff992964019 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/filehound.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/filehound.mdx @@ -1,8 +1,7 @@ - # FileHound Export Utility

-
+

diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/mollywallet.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/mollywallet.mdx similarity index 83% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/mollywallet.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/mollywallet.mdx index b752380280f..24912f0ab11 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/mollywallet.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/mollywallet.mdx @@ -1,8 +1,7 @@ - # Molley Wallet

-
+

[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. diff --git a/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/october.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/october.mdx new file mode 100644 index 00000000000..83bc64672e5 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/october.mdx @@ -0,0 +1,11 @@ +# October + +

+
+

+ +[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. \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/optimus.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/optimus.mdx similarity index 81% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/optimus.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/optimus.mdx index 36cbf2fdf8d..bb0b0d4a1e3 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/optimus.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/optimus.mdx @@ -1,8 +1,7 @@ - # Optimus

-
+

[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/portfall.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/portfall.mdx similarity index 77% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/portfall.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/portfall.mdx index 2110094249d..792821349dd 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/portfall.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/portfall.mdx @@ -1,8 +1,7 @@ - # Portfall

-
+

[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/restic-browser.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/restic-browser.mdx new file mode 100644 index 00000000000..77c724dafdd --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/restic-browser.mdx @@ -0,0 +1,10 @@ +# Restic Browser + +

+
+

+ +[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. + + + diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/riftshare.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/riftshare.mdx similarity index 92% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/riftshare.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/riftshare.mdx index 59680bdb3a3..cbbbcdf4810 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/riftshare.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/riftshare.mdx @@ -1,8 +1,7 @@ - # RiftShare

-
+

Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) diff --git a/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/surge.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/surge.mdx new file mode 100644 index 00000000000..e2facf6484b --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/surge.mdx @@ -0,0 +1,8 @@ +# Surge + +

+
+

+ +[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. + diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wally.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wally.mdx similarity index 87% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wally.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wally.mdx index 3e842af4016..2a0d14ab093 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wally.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wally.mdx @@ -1,8 +1,7 @@ - # Wally

-
+

[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. diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wombat.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wombat.mdx similarity index 71% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wombat.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wombat.mdx index 8fdbe7cd82b..d806f8c92b3 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/wombat.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/wombat.mdx @@ -1,8 +1,7 @@ - # Wombat

-
+

diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/ytd.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/ytd.mdx similarity index 86% rename from website/versioned_docs/version-v2.0.0-beta.37/community/showcase/ytd.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/showcase/ytd.mdx index 7ccd32e26b9..fe3c4791225 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/showcase/ytd.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/showcase/ytd.mdx @@ -1,8 +1,7 @@ - # Ytd

-
+

diff --git a/website/versioned_docs/version-v2.0.0-beta.37/community/templates.mdx b/website/versioned_docs/version-v2.0.0-beta.39/community/templates.mdx similarity index 95% rename from website/versioned_docs/version-v2.0.0-beta.37/community/templates.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/community/templates.mdx index 2ed94f04ee2..6d090bb3de0 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/community/templates.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/community/templates.mdx @@ -37,9 +37,6 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for - [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 -# Solid -- [wails-solid-template](https://github.com/sidwebworks/wails-solid-template) - A template using Solid JS - ## Svelte - [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/contributing/_category_.json new file mode 100644 index 00000000000..fad21931ad2 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Contributing", + "position": 99 +} diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/developing_new_features.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/developing_new_features.mdx new file mode 100644 index 00000000000..1aa5ea145ab --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/developing_new_features.mdx @@ -0,0 +1,35 @@ +--- +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/_` +- 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. +::: + diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/documenting.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/documenting.mdx new file mode 100644 index 00000000000..1655a44fe71 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/documenting.mdx @@ -0,0 +1,39 @@ +--- +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. + diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/fixing_bugs.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/fixing_bugs.mdx new file mode 100644 index 00000000000..7e1c78ad37b --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/fixing_bugs.mdx @@ -0,0 +1,30 @@ +--- +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/_` +- 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. +::: \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/helping_others.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/helping_others.mdx new file mode 100644 index 00000000000..340f51a2aa3 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/helping_others.mdx @@ -0,0 +1,17 @@ +--- +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 +::: diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/setting_up_a_dev_environment.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/setting_up_a_dev_environment.mdx new file mode 100644 index 00000000000..b5cfd8eca4c --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/setting_up_a_dev_environment.mdx @@ -0,0 +1,34 @@ +--- +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 => ` + +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` + diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/testing.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/testing.mdx new file mode 100644 index 00000000000..d01204651fc --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/testing.mdx @@ -0,0 +1,21 @@ +--- +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. diff --git a/website/versioned_docs/version-v2.0.0-beta.39/contributing/ways_of_contributing.mdx b/website/versioned_docs/version-v2.0.0-beta.39/contributing/ways_of_contributing.mdx new file mode 100644 index 00000000000..cfe50b654fb --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/contributing/ways_of_contributing.mdx @@ -0,0 +1,22 @@ +--- +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. \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/building.mdx b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/building.mdx similarity index 71% rename from website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/building.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/building.mdx index 8c6957117b9..741659e811c 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/building.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/building.mdx @@ -10,7 +10,8 @@ This will compile your project and save the production-ready binary in the `buil If you run the binary, you should see the default application:
- +

diff --git a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/development.mdx b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/development.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/development.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/development.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/firstproject.mdx b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/firstproject.mdx similarity index 56% rename from website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/firstproject.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/firstproject.mdx index b5ee1fa4669..949b05b1a59 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/gettingstarted/firstproject.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/firstproject.mdx @@ -13,6 +13,7 @@ Pick your favourite framework: + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; @@ -27,60 +28,60 @@ import TabItem from "@theme/TabItem"; {label: "Vanilla", value: "Vanilla"}, ]} > - - Generate a Svelte project using Javascript with:
+ + Generate a Svelte project using Javascript with:
- wails init -n myproject -t svelte + wails init -n myproject -t svelte - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t svelte-ts -
- - Generate a React project using Javascript with:
+ wails init -n myproject -t svelte-ts +
+ + Generate a React project using Javascript with:
- wails init -n myproject -t react + wails init -n myproject -t react - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t react-ts -
- - Generate a Vue project using Javascript with:
+ wails init -n myproject -t react-ts +
+ + Generate a Vue project using Javascript with:
- wails init -n myproject -t vue + wails init -n myproject -t vue - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t vue-ts -
- - Generate a Preact project using Javascript with:
+ wails init -n myproject -t vue-ts +
+ + Generate a Preact project using Javascript with:
- wails init -n myproject -t preact + wails init -n myproject -t preact - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t preact-ts -
- - Generate a Lit project using Javascript with:
+ wails init -n myproject -t preact-ts +
+ + Generate a Lit project using Javascript with:
- wails init -n myproject -t lit + wails init -n myproject -t lit - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t lit-ts -
- - Generate a Vanilla project using Javascript with:
+ wails init -n myproject -t lit-ts +
+ + Generate a Vanilla project using Javascript with:
- wails init -n myproject -t vanilla + wails init -n myproject -t vanilla - If you would rather use Typescript: + If you would rather use Typescript: - wails init -n myproject -t vanilla-ts -
+ wails init -n myproject -t vanilla-ts +

diff --git a/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/installation.mdx b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/installation.mdx new file mode 100644 index 00000000000..5b8b397104d --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/gettingstarted/installation.mdx @@ -0,0 +1,91 @@ +--- +sidebar_position: 1 +--- + +# Installation + +## Supported Platforms + +- Windows 10/11 AMD64/ARM64 +- MacOS 10.13+ AMD64 +- MacOS 11.0+ ARM64 +- Linux AMD64/ARM64 + +## Dependencies + +Wails has a number of common dependencies that are required before installation: + +- Go 1.17+ +- NPM (Node 15+) + +### Go + +Download Go from the [Go Downloads Page](https://go.dev/doc/install). + +Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: + +- Check Go is installed correctly: `go version` +- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin` + +### NPM + +Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against. + +Run `npm --version` to verify. + +## Platform Specific Dependencies + +You will also need to install platform specific dependencies: + + + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + + + + Wails requires that the xcode command line tools are installed. This can be done by running:
+ + xcode-select --install +
+ + Wails requires that the WebView2{" "} + runtime is installed. Some Windows installations will already have this installed. You can check using the{" "} + wails doctor command (see below). + + Linux required the standard gcc build tools + plus libgtk3 and libwebkit. + 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 wails doctor after + installation + to be shown how to install the dependencies. + If your distro/package manager is not supported, please consult the Add Linux Distro guide. +
+ +## Optional Dependencies + +- [UPX](https://upx.github.io/) for compressing your applications. + +## Installing Wails + +Run `go install github.com/wailsapp/wails/v2/cmd/wails@latest` to install the Wails CLI. + +## System Check + +Running `wails doctor` will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems. + +## The `wails` command appears to be missing? + +If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide +correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment +variable. You will also normally need to close and reopen any open command prompts so that changes to the environment +made by the installer are reflected at the command prompt. \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/guides/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/guides/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/application-development.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/application-development.mdx similarity index 85% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/application-development.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/application-development.mdx index 039cb227d64..03710de05ce 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/application-development.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/application-development.mdx @@ -1,4 +1,3 @@ - # Application Development There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. @@ -28,13 +27,13 @@ func (a *App) shutdown(ctx context.Context) { ``` - The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, - setting up event listeners and anything else the application needs at startup. - It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the - [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. - In dev mode, the error will be output to the console. +setting up event listeners and anything else the application needs at startup. +It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the +[runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. +In dev mode, the error will be output to the console. - The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate - memory and perform any shutdown tasks. +memory and perform any shutdown tasks. The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in @@ -113,6 +112,40 @@ func main() { This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). +### Dealing with context when binding multiple structs + +If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you +can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances +: + +```go +func main() { + + app := NewApp() + otherStruct := NewOtherStruct() + + err := wails.Run(&options.App{ + Title: "My App", + Width: 800, + Height: 600, + OnStartup: func(ctx context.Context){ + app.SetContext(ctx) + otherStruct.SetContext(ctx) + }, + OnShutdown: app.shutdown, + Bind: []interface{}{ + app, + otherStruct + }, + }) + if err != nil { + log.Fatal(err) + } +} +``` + + + More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). ## Application Menu diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/bleeding-edge.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/bleeding-edge.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/bleeding-edge.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/bleeding-edge.mdx index 292b9d5231c..a44a155de4c 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/bleeding-edge.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/bleeding-edge.mdx @@ -1,4 +1,3 @@ - # Bleeding Edge ## Overview diff --git a/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx new file mode 100644 index 00000000000..8b07e823bb7 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx @@ -0,0 +1,123 @@ +# Dynamic Assets + +If you want to load or generate assets for your frontend dynamically, you can achieve that using the +[AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will +be called for any non GET request on the assets server and for GET requests which can not be served from the +bundled assets because the file is not found. + +By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. + +## Example + +In our example project, we will create a simple assets handler which will load files off disk: + +```go title=main.go {16-35,49} +package main + +import ( + "embed" + "fmt" + "github.com/wailsapp/wails/v2" + "github.com/wailsapp/wails/v2/pkg/options" + "net/http" + "os" + "strings" +) + +//go:embed frontend/dist +var assets embed.FS + +type FileLoader struct { + http.Handler +} + +func NewFileLoader() *FileLoader { + return &FileLoader{} +} + +func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { + var err error + requestedFilename := strings.TrimPrefix(req.URL.Path, "/") + println("Requesting file:", requestedFilename) + fileData, err := os.ReadFile(requestedFilename) + if err != nil { + res.WriteHeader(http.StatusBadRequest) + res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) + } + + res.Write(fileData) +} + +func main() { + // Create an instance of the app structure + app := NewApp() + + // Create application with options + err := wails.Run(&options.App{ + Title: "helloworld", + Width: 1024, + Height: 768, + Assets: assets, + BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, + OnStartup: app.startup, + AssetsHandler: NewFileLoader(), + Bind: []interface{}{ + app, + }, + }) + + if err != nil { + println("Error:", err) + } +} +``` + +When we run the application in dev mode using `wails dev`, we will see the following output: + +``` +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: + +``` +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: + +

+ +

+ +However, if we request `go.mod`, we will see the following output: + +

+ +

+ +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 + +``` +with: +```html + +``` +Then we would see the following: + +

+ +

+ +:::warning +Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access +to your filesystem. +::: + diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/frameless.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/frameless.mdx similarity index 92% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/frameless.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/frameless.mdx index cd78d393747..c98aef3fd3f 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/frameless.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/frameless.mdx @@ -1,4 +1,3 @@ - # Frameless Applications Wails supports applications with no frame. This can be achieved by using the [frameless](../reference/options.mdx#frameless) @@ -31,5 +30,5 @@ The `
` is tagged as being not draggable. ``` :::info Fullscreen - If you allow your application to go fullscreen, this drag functionality will be disabled. +If you allow your application to go fullscreen, this drag functionality will be disabled. ::: diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/frontend.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/frontend.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/frontend.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/frontend.mdx index 6c9d0cf2721..7b94345adfe 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/frontend.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/frontend.mdx @@ -1,4 +1,3 @@ - # Frontend ## Script Injection diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/ides.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/ides.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/ides.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/ides.mdx index 5e47152b300..14adde0d0fc 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/ides.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/ides.mdx @@ -1,4 +1,3 @@ - # IDEs Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/linux-distro-support.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/linux-distro-support.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/linux-distro-support.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/linux-distro-support.mdx index 36649fc1bc0..a050ccc5305 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/linux-distro-support.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/linux-distro-support.mdx @@ -1,4 +1,3 @@ - # Linux Distro Support ## Overview @@ -11,6 +10,7 @@ manager. Currently, we support the following package managers: - dnf - emerge - eopkg +- nixpkgs - pacman - zypper diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/manual-builds.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/manual-builds.mdx similarity index 95% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/manual-builds.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/manual-builds.mdx index e3be40d0bab..4594e527a87 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/manual-builds.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/manual-builds.mdx @@ -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. @@ -24,10 +23,10 @@ When either `wails build` or `wails dev` are used, the Wails CLI performs a comm - If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step - An MD5 sum is generated from the `package.json` file contents - It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) - with the one generated to see if the contents have changed. If they are the same, this step is skipped +with the one generated to see if the contents have changed. If they are the same, this step is skipped - If `package.json.md5` does not exist, it creates it using the generated MD5 sum - If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is - executed in the frontend directory +executed in the frontend directory #### Manual Steps @@ -75,7 +74,7 @@ This step could be done from the command line or a script with `npm run build` o - If the `-clean` flag is provided, the `build` directory is deleted and recreated - For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` - For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` +- On Windows, `-ldflags "-w -h -H windowsgui"` - Additional tags passed to the CLI using `-tags` are added to the defaults - Additional ldflags passed to the CLI using `-ldflags` are added to the defaults - The `-o` flag is passed through diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/migrating.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/migrating.mdx similarity index 74% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/migrating.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/migrating.mdx index 1474131f834..c391596a832 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/migrating.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/migrating.mdx @@ -1,4 +1,3 @@ - # Migrating from v1 ## Overview @@ -184,23 +183,25 @@ The format of the file is slightly different. Here is a comparison:

-| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | 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. | + | v1 | v2 | Notes | + | ------------------ | ---------------- | --------------------------------------------------- | + | name | name | | + | description | | Removed | + | author / name | author / name | | + | author / email | author / email | | + | version | version | | + | binaryname | outputfilename | Changed | + | frontend / dir | | Removed | + | frontend / install | frontend:install | Changed | + | frontend / build | frontend:build | Changed | + | frontend / bridge | | Removed | + | frontend / serve | | Removed | + | tags | | Removed | + | | wailsjsdir | The directory to generate wailsjs modules | + | | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be + left empty. | + | | 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. |

diff --git a/website/versioned_docs/version-v2.0.0-beta.39/guides/mouse-buttons.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/mouse-buttons.mdx new file mode 100644 index 00000000000..570f45c7e77 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/mouse-buttons.mdx @@ -0,0 +1,28 @@ +# Mouse Buttons + +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) { + if (event.button === 0) { + // left mouse button + } else if (event.button === 1) { + // middle mouse button + } else if (event.button === 2) { + // right mouse button + } else if (event.button === 3) { + // back mouse button + } else if (event.button === 4) { + // forward mouse button + } else { + // other mouse button + } +} + +``` +Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/overscroll.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/overscroll.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/overscroll.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/overscroll.mdx index bbe593bc7b3..e5f5edb6af1 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/overscroll.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/overscroll.mdx @@ -1,4 +1,3 @@ - # Overscroll [Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/routing.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/routing.mdx similarity index 99% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/routing.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/routing.mdx index 3e1f255d8e5..d4a55ee61b0 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/routing.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/routing.mdx @@ -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. diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/signing.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/signing.mdx similarity index 94% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/signing.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/signing.mdx index 3da981dfa8b..b8a5b70dbdd 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/signing.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/signing.mdx @@ -10,11 +10,11 @@ Please note that an EV certificate is not required unless you need to write kern 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. +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. +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. @@ -66,13 +66,13 @@ 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': +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 +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. @@ -220,8 +220,8 @@ jobs: path: build/bin/* ``` -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. +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 @@ -247,8 +247,8 @@ Now we need to configure some gon config files in our `build/darwin` directory: } } ``` - 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: +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 ``` @@ -271,9 +271,9 @@ Now we need to configure some gon config files in our `build/darwin` directory: ``` - 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`. +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 diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/templates.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/templates.mdx similarity index 97% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/templates.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/templates.mdx index 090cf8a9e89..d2517423f11 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/templates.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/templates.mdx @@ -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 @@ -61,7 +60,7 @@ the template. We will now walk through how to create a Vue 3 template: - Install the vue cli: `npm install -g @vue/cli` - Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` +- Select `Default (Vue 3) ([Vue 3] babel, eslint)` - After the project has been generated, run: ```shell @@ -81,7 +80,7 @@ Renaming package-lock.json -> package-lock.tmpl.json... - You should have a fully functioning Vue3 application:
- +
## Publishing Templates diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/troubleshooting.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/troubleshooting.mdx similarity index 52% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/troubleshooting.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/troubleshooting.mdx index 1ab08d6f3cb..90c7d78dcb8 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/troubleshooting.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/troubleshooting.mdx @@ -1,8 +1,14 @@ - # Troubleshooting An assortment of troubleshooting tips. +## The `wails` command appears to be missing? + +If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide +correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment +variable. You will also normally need to close and reopen any open command prompts so that changes to the environment +made by the installer are reflected at the command prompt. + ## My application is displaying a white/blank screen Check that your application includes the assets from the correct directory. In your `main.go` file, you will have @@ -14,6 +20,20 @@ var assets embed.FS ``` Check that `frontend/dist` contains your application assets. +### Mac + +If this happens on Mac, try adding the following to your `Info.plist`: + +```xml +NSAppTransportSecurity + + NSAllowsLocalNetworking + + +``` + +Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 + ## Mac application not valid If your built application looks like this in finder: @@ -22,7 +42,7 @@ If your built application looks like this in finder:

-it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` +it''s likely that your application''s `info.plist` is invalid. Update the file in `build/.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. @@ -56,7 +76,7 @@ window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots ``` Credit: https://github.com/wailsapp/wails/issues/1186 -## I'm having getting proxy errors when trying to install Wails +## I''m having getting proxy errors when trying to install Wails If you are getting errors like this: ``` @@ -68,4 +88,24 @@ 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 \ No newline at end of file +Source: https://github.com/wailsapp/wails/issues/1233 + +## The generated Typescript doesn''t have the correct types + +Sometimes the generated Typescript doesn''t have the correct types. To mitigate this, +it is possible to specify what types should be generated using the `ts_type` struct tag. For +more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). + +## When I navigate away from `index.html`, I am unable to call methods on the frontend + +If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding +the following imports to the `` section of any new page you navigate to: + +```html + + + + +``` + +Source: https://github.com/wailsapp/wails/discussions/1512 \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/windows-installer.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/windows-installer.mdx similarity index 95% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/windows-installer.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/windows-installer.mdx index f6a5b2f39f6..76f91dd704a 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/windows-installer.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/windows-installer.mdx @@ -1,7 +1,7 @@ # NSIS installer

-
+

Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). diff --git a/website/versioned_docs/version-v2.0.0-beta.37/guides/windows.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/windows.mdx similarity index 70% rename from website/versioned_docs/version-v2.0.0-beta.37/guides/windows.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/guides/windows.mdx index e0ec17d5f6d..e3c2ee0277e 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/guides/windows.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/windows.mdx @@ -1,4 +1,3 @@ - # Windows This page has miscellaneous guides related to developing Wails applications for Windows. @@ -35,3 +34,20 @@ up to the user. ### Error If no suitable runtime is found, an error is given to the user and no further action taken. + +## Fixed version runtime + +Another way of dealing with webview2 dependency is shipping it yourself. +You can download [fixed version runtime](https://developer.microsoft.com/ru-ru/microsoft-edge/webview2/#download-section) and bundle or download it with your application. + +Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. + +```go + wails.Run(&options.App{ + Windows: &windows.Options{ + WebviewBrowserPath: "", + }, + }) +``` + +Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. \ No newline at end of file diff --git a/website/versioned_docs/version-v2.0.0-beta.37/howdoesitwork.mdx b/website/versioned_docs/version-v2.0.0-beta.39/howdoesitwork.mdx similarity index 97% rename from website/versioned_docs/version-v2.0.0-beta.37/howdoesitwork.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/howdoesitwork.mdx index a66e8cb9aed..c22aada7a24 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/howdoesitwork.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/howdoesitwork.mdx @@ -11,7 +11,7 @@ version of the runtime library. Finally, it is possible to bind Go methods to th Javascript methods that can be called, just as if they were local Javascript methods.
- +
## The Main Application @@ -130,7 +130,7 @@ by the frontend code. :::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 ::: @@ -215,8 +215,8 @@ the frontend and your Go code are: - Calling runtime methods [^1]: - There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and - workarounds for such cases. +There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and +workarounds for such cases. ### Calling bound Go methods diff --git a/website/versioned_docs/version-v2.0.0-beta.37/introduction.mdx b/website/versioned_docs/version-v2.0.0-beta.39/introduction.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/introduction.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/introduction.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/reference/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/reference/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/cli.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/cli.mdx similarity index 89% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/cli.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/cli.mdx index 4dcc559318f..14081ca937f 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/cli.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/cli.mdx @@ -24,7 +24,7 @@ The Wails CLI has a number of commands that are used for managing your projects. | -f | Force build application | false | Example: - `wails init -n test -d mytestproject -g -ide vscode -q` +`wails init -n test -d mytestproject -g -ide vscode -q` This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. @@ -36,15 +36,15 @@ More information on using IDEs with Wails can be found [here](../guides/ides.mdx Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. Example: - `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` +`wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` A list of community maintained templates can be found [here](../community/templates.mdx) :::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. ::: @@ -68,8 +68,10 @@ A list of community maintained templates can be found [here](../community/templa | -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | | -webview2 | WebView2 installer strategy: download,embed,browser,error | download | | -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application | false | +| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | | -trimpath | Remove all file system paths from the resulting executable. | false | +| -race | Build with Go's race detector | false | +| -windowsconsole | Keep the console window for Windows builds | false | For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. @@ -82,13 +84,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). ::: @@ -153,8 +155,8 @@ Your system is ready for Wails development! - 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 +- 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 | Flag | Description | Default | @@ -168,6 +170,7 @@ Your system is ready for Wails development! | -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | | -loglevel "loglevel"| Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | | -noreload | Disable automatic reload when assets change | | +| -nogen | Disable generate module | | | -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | | -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | | -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | @@ -176,6 +179,7 @@ Your system is ready for Wails development! | -appargs "args" | Arguments passed to the application in shell style | | | -platform "platform" | Platform/Arch to target | `runtime.GOOS` | | -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | +| -race | Build with Go's race detector | false | Example: diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/menus.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/menus.mdx similarity index 97% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/menus.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/menus.mdx index bab6235868f..94f08b2e267 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/menus.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/menus.mdx @@ -18,6 +18,10 @@ An example of how to create a menu: FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { runtime.Quit() }) + + if runtime.GOOS == "darwin" { + AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut + } err := wails.Run(&options.App{ Title: "Menus Demo", @@ -254,7 +258,7 @@ using radio groups that may share a callback. :::info Roles - Roles are currently supported on Mac only. +Roles are currently supported on Mac only. ::: diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/options.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx similarity index 84% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/options.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx index eb31776333b..4e8b43cc979 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/options.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx @@ -15,30 +15,31 @@ import "github.com/wailsapp/wails/v2/pkg/options" func main() { err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - RGBA: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, + Title: "Menus Demo", + Width: 800, + Height: 600, + DisableResize: false, + Fullscreen: false, + Frameless: true, + MinWidth: 400, + MinHeight: 400, + MaxWidth: 1280, + MaxHeight: 1024, + StartHidden: false, + HideWindowOnClose: false, + BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, + AlwaysOnTop: false, + Assets: assets, + AssetsHandler: assetsHandler, + Menu: app.applicationMenu(), + Logger: nil, + LogLevel: logger.DEBUG, + LogLevelProduction: logger.ERROR, + OnStartup: app.startup, + OnDomReady: app.domready, + OnShutdown: app.shutdown, + OnBeforeClose: app.beforeClose, + WindowStartState: options.Maximised, Bind: []interface{}{ app, }, @@ -48,6 +49,7 @@ func main() { DisableWindowIcon: false, DisableFramelessWindowDecorations: false, WebviewUserDataPath: "", + WebviewBrowserPath: "", Theme: windows.SystemDefault, CustomTheme: &windows.ThemeSettings{ DarkModeTitleBar: windows.RGB(20, 20, 20), @@ -196,14 +198,14 @@ Type: bool By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead. -### RGBA +### BackgroundColour -Name: RGBA +Name: BackgroundColour Type: int (0xRRGGBBAA) Example: 0xFF000088 - Red at 50% transparency -This value is the RGBA value to set the window by default. +This value is the default background colour of the window. Default: 0xFFFFFFFF. ### AlwaysOnTop @@ -222,8 +224,9 @@ Type: embed.FS The frontend assets to be used by the application. Requires an `index.html` file. -### AssetsHandler +### AssetsHandler + Name: AssetsHandler @@ -284,6 +287,16 @@ Default: `Info` in dev mode, `Error` in production mode The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). +### LogLevelProduction + +Name: LogLevelProduction + +Type: logger.LogLevel + +Default: `Error` + +The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). + ### OnStartup Name: OnStartup @@ -392,7 +405,7 @@ Name: WebviewIsTransparent Type: bool Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. -This means that if you use `rgba(0,0,0,0)`, the host window will show through. +This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. ### WindowIsTranslucent @@ -430,6 +443,19 @@ Type: string This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. +### WebviewBrowserPath + +Name: WebviewBrowserPath + +Type: string + +This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. + +Important information about distribution of fixed version runtime: +- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) +- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) +- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) + ### Theme Name: Theme @@ -511,6 +537,33 @@ Type: `*windows.Messages` A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. Customise this for any language you choose to support. +### ResizeDebounceMS + +Name: ResizeDebounceMS + +Type: uint16 + +ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. +The default value (0) will perform redraws as fast as it can. + +### OnSuspend + +Name: OnSuspend + +Type: func() + +If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) + +### OnResume + +Name: OnResume + +Type: func() + +If set, this function will be called when windows resumes from low power mode (suspend/hibernate) + + + ## Mac Specific Options ### TitleBar @@ -536,7 +589,7 @@ Name: WebviewIsTransparent Type: bool Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. -This means that if you use `rgba(0,0,0,0)`, the host window will show through. +This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. ### WindowIsTranslucent @@ -649,14 +702,16 @@ func main() { The "About" menu item will appear in the app menu:
- +

When clicked, that will open an about message box:
- +

diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/project-config.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/project-config.mdx similarity index 64% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/project-config.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/project-config.mdx index de612d5f797..503c7089c14 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/project-config.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/project-config.mdx @@ -15,7 +15,7 @@ The project config resides in the `wails.json` file in the project directory. Th "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", "frontend:dev": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:build]", "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite", + "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. If this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", "version": "[Project config version]", "outputfilename": "[The name of the binary]", @@ -23,11 +23,16 @@ The project config resides in the `wails.json` file in the project directory. Th "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", "appargs": "[Arguments passed to the application in shell style when in dev mode]", "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" + "preBuildHooks": { + "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", + "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", + "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" }, + "postBuildHooks": { + "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", + "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", + "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" + }, "info": { // Data used to populate manifests and version info. "companyName": "[The company name. Default: [The project name]]", "productName": "[The product name. Default: [The project name]]", diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/_category_.json similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/_category_.json rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/_category_.json diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/browser.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/browser.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/browser.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/browser.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/dialog.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/dialog.mdx similarity index 91% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/dialog.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/dialog.mdx index 88fc5ea4046..1f8a4000c49 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/dialog.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/dialog.mdx @@ -9,7 +9,7 @@ sidebar_position: 5 This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. :::info Javascript - Dialog is currently unsupported in the JS runtime. +Dialog is currently unsupported in the JS runtime. ::: ### OpenDirectoryDialog @@ -157,7 +157,8 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ ``` the first button is shown as default:
- +

@@ -172,7 +173,8 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ ``` the second button is shown as default. When `return` is pressed, the value "two" is returned.
- +

@@ -188,7 +190,8 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ ``` the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned:
- +


@@ -221,7 +224,8 @@ Windows allows you to use multiple file filters in dialog boxes. Each FileFilter dialog:
- +


@@ -233,7 +237,8 @@ Linux allows you to use multiple file filters in dialog boxes. Each FileFilter w dialog:
- +


diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/events.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/events.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/events.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/events.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/intro.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/intro.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/intro.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/intro.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/log.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/log.mdx similarity index 100% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/log.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/log.mdx diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/menu.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/menu.mdx similarity index 90% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/menu.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/menu.mdx index 7d2d0178345..95bed2d9715 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/menu.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/menu.mdx @@ -9,7 +9,7 @@ sidebar_position: 6 These methods are related to the application menu. :::info Javascript - Menu is currently unsupported in the JS runtime. +Menu is currently unsupported in the JS runtime. ::: ### MenuSetApplicationMenu diff --git a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/window.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/window.mdx similarity index 92% rename from website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/window.mdx rename to website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/window.mdx index 915ca9ac4a7..baf6222e50e 100644 --- a/website/versioned_docs/version-v2.0.0-beta.37/reference/runtime/window.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/runtime/window.mdx @@ -127,6 +127,14 @@ Will resize the window if the window is currently larger than the given dimensio Setting a size of `0,0` will disable this constraint. +### WindowSetAlwaysOnTop +Go Signature: `WindowSetAlwaysOnTop(ctx context.Context, b bool)` + +JS Signature: `WindowSetAlwaysOnTop(b: Boolen)` + +Sets the window AlwaysOnTop or not on top. + + ### WindowSetPosition Go Signature: `WindowSetPosition(ctx context.Context, x int, y int)` @@ -176,10 +184,10 @@ JS Signature: `WindowUnminimise()` Restores the window to the dimensions and position prior to minimising. -### WindowSetRGBA -Go Signature: `WindowSetRGBA(ctx context.Context, R, G, B, A uint8)` +### WindowSetBackgroundColour +Go Signature: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)` -JS Signature: `WindowSetRGBA(R, G, B, A)` +JS Signature: `WindowSetBackgroundColour(R, G, B, A)` Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. diff --git a/website/versioned_docs/version-v2.0.0-beta.39/tutorials/_category_.json b/website/versioned_docs/version-v2.0.0-beta.39/tutorials/_category_.json new file mode 100644 index 00000000000..dfac1d175e6 --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/tutorials/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Tutorials", + "position": 70 +} diff --git a/website/versioned_docs/version-v2.0.0-beta.39/tutorials/helloworld.mdx b/website/versioned_docs/version-v2.0.0-beta.39/tutorials/helloworld.mdx new file mode 100644 index 00000000000..86ebae7e21e --- /dev/null +++ b/website/versioned_docs/version-v2.0.0-beta.39/tutorials/helloworld.mdx @@ -0,0 +1,114 @@ +--- +sidebar_position: 10 +--- + +# Hello World + +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 + +:::note +This tutorial uses Windows as the target platform. Output will vary slightly +depending on your operating system. +::: + +## Create a new Wails application + +To create a new Wails application using the default vanilla JS template, +you need to run the following command: + +```bash +wails init -n helloworld +``` + +You should see something similar to the following: + +``` +Wails CLI v2.0.0 + +Initialising Project 'helloworld' +--------------------------------- + +Project Name: helloworld +Project Directory: C:\Users\leaan\tutorial\helloworld +Project Template: vanilla +Template Support: https://wails.io + +Initialised project 'helloworld' in 232ms. +``` + +This will create a new directory called `helloworld` in the current directory. +In this directory, you will find a number of files: + +``` +build/ - Contains the build files + compiled application +frontend/ - Contains the frontend files +app.go - Contains the application code +main.go - The main program with the application configuration +wails.json - The project configuration file +go.mod - The go module file +go.sum - The go module checksum file +``` + +## Build the application + +To build the application, change to the new `helloworld` project directory and run the following command: + +```bash +wails build +``` + +You should see something like the following: + +``` +Wails CLI v2.0.0 + +App Type: desktop +Platforms: windows/amd64 +Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe +Build Mode: Production +Skip Frontend: false +Compress: false +Package: true +Clean Build Dir: false +LDFlags: "" +Tags: [] +Race Detector: false + +Building target: windows/amd64 +------------------------------ + - Installing frontend dependencies: Done. + - Compiling frontend: Done. + - Generating bundle assets: Done. + - Compiling application: Done. +Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. +``` + +This has compiled the application and saved it in the `build/bin` directory. + +## Run the application + +If we view the `build/bin` directory in Windows Explorer, we should see our project binary: + +
+ +
+
+ +We can run it by simply double-clicking the `helloworld.exe` file. + +On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. + +On Linux, you can run the application using `./helloworld` from the `build/bin` directory. + +You should see the application working as expected: + +
+ +
+
diff --git a/website/versioned_sidebars/version-v2.0.0-beta.37-sidebars.json b/website/versioned_sidebars/version-v2.0.0-beta.39-sidebars.json similarity index 100% rename from website/versioned_sidebars/version-v2.0.0-beta.37-sidebars.json rename to website/versioned_sidebars/version-v2.0.0-beta.39-sidebars.json diff --git a/website/versions.json b/website/versions.json index 3b9e55047d3..ab4a34ce8fe 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,4 @@ [ - "v2.0.0-beta.38", - "v2.0.0-beta.37" + "v2.0.0-beta.39", + "v2.0.0-beta.38" ] \ No newline at end of file