mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
New Crowdin updates (#1720)
This commit is contained in:
@@ -2,11 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/wailsapp/wails/v2/internal/s"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/s"
|
||||
)
|
||||
|
||||
const versionFile = "../../cmd/wails/internal/version.txt"
|
||||
@@ -61,15 +62,7 @@ func main() {
|
||||
s.ECHO("Removing old version: " + oldestVersion)
|
||||
s.CD("versioned_docs")
|
||||
s.RMDIR("version-" + oldestVersion)
|
||||
s.CD("version-" + newVersion + "/gettingstarted")
|
||||
s.REPLACEALL("firstproject.mdx", s.Sub{
|
||||
"../../src/components/frameworktabs": "../../../src/components/frameworktabs",
|
||||
})
|
||||
s.REPLACEALL("installation.mdx", s.Sub{
|
||||
"../../src/components/tabinstall": "../../../src/components/tabinstall",
|
||||
})
|
||||
|
||||
s.CD("../../../versioned_sidebars")
|
||||
s.CD("../../versioned_sidebars")
|
||||
s.RM("version-" + oldestVersion + "-sidebars.json")
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Creating a Project
|
||||
|
||||
## Project Generation
|
||||
@@ -10,8 +13,74 @@ Now that the CLI is installed, you can generate a new project by using the `wail
|
||||
|
||||
Pick your favourite framework:
|
||||
|
||||
import TabsFrameworks from "../../src/components/frameworktabs";
|
||||
<TabsFrameworks/>
|
||||
<!-- @formatter:off -->
|
||||
|
||||
<Tabs
|
||||
defaultValue="Svelte"
|
||||
values={[
|
||||
{label: "Svelte", value: "Svelte"},
|
||||
{label: "React", value: "React"},
|
||||
{label: "Vue", value: "Vue"},
|
||||
{label: "Preact", value: "Preact"},
|
||||
{label: "Lit", value: "Lit"},
|
||||
{label: "Vanilla", value: "Vanilla"},
|
||||
]}
|
||||
>
|
||||
<TabItem value="Svelte">
|
||||
Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t svelte
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t svelte-ts
|
||||
</TabItem>
|
||||
<TabItem value="React">
|
||||
Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t react
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t react-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vue">
|
||||
Generate a <a href={"https://vuejs.org/"}>Vue</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vue
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t vue-ts
|
||||
</TabItem>
|
||||
<TabItem value="Preact">
|
||||
Generate a <a href={"https://preactjs.com/"}>Preact</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t preact
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t preact-ts
|
||||
</TabItem>
|
||||
<TabItem value="Lit">
|
||||
Generate a <a href={"https://lit.dev/"}>Lit</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t lit
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t lit-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vanilla">
|
||||
Generate a Vanilla project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vanilla
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t vanilla-ts
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<!-- @formatter:on -->
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Installation
|
||||
|
||||
## Supported Platforms
|
||||
@@ -37,8 +40,40 @@ Run `npm --version` to verify.
|
||||
|
||||
You will also need to install platform specific dependencies:
|
||||
|
||||
import TabsInstaller from "../../src/components/tabinstall";
|
||||
<TabsInstaller />
|
||||
<!-- @formatter:off -->
|
||||
|
||||
<Tabs
|
||||
defaultValue="Windows"
|
||||
values={[
|
||||
{label: "Windows", value: "Windows"},
|
||||
{label: "MacOS", value: "MacOS"},
|
||||
{label: "Linux", value: "Linux"},
|
||||
]}
|
||||
>
|
||||
<TabItem value="MacOS">
|
||||
Wails requires that the xcode command line tools are installed. This can be done by running: <br/>
|
||||
<code>xcode-select --install</code>
|
||||
</TabItem>
|
||||
<TabItem value="Windows">
|
||||
Wails requires that the <a
|
||||
href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a>{" "}
|
||||
runtime is installed. Some Windows installations will already have this installed. You can check using
|
||||
the{" "}
|
||||
<code>wails doctor</code> command (see below).
|
||||
</TabItem>
|
||||
<TabItem value={"Linux"}>
|
||||
Linux required the standard <code>gcc</code> build tools
|
||||
plus <code>libgtk3</code> and <code>libwebkit</code>.
|
||||
Rather than list a ton of commands for different distros, Wails can try to determine
|
||||
what the installation commands are for your specific distribution. Run <code>wails doctor</code> after
|
||||
installation
|
||||
to be shown how to install the dependencies.
|
||||
If your distro/package manager is not supported, please consult the {" "}
|
||||
<a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<!-- @formatter:on -->
|
||||
|
||||
## Optional Dependencies
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ const config = {
|
||||
|
||||
i18n: {
|
||||
defaultLocale: "en",
|
||||
locales: ["en", "zh-Hans", "ja"],
|
||||
locales: ["en", "zh-Hans", "ja", "ru"],
|
||||
localeConfigs: {
|
||||
en: {
|
||||
label: "English",
|
||||
@@ -30,6 +30,11 @@ const config = {
|
||||
direction: "ltr",
|
||||
htmlLang: "zh-Hans",
|
||||
},
|
||||
ru: {
|
||||
label: "Русский",
|
||||
direction: "ltr",
|
||||
htmlLang: "ru-RU",
|
||||
},
|
||||
"ja": {
|
||||
label: "日本語",
|
||||
direction: "ltr",
|
||||
|
||||
@@ -300,4 +300,4 @@
|
||||
"message": "Toggle word wrap 文字列の折り返しの切替",
|
||||
"description": "The title attribute for toggle word wrapping button of code block lines"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -10,7 +10,7 @@ tags:
|
||||
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails.png" width="40%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails.png" width="40%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -31,7 +31,7 @@ No, I'm not joking: *No* *CGO* *dependency* 🤯! The thing about Windows is tha
|
||||
### WebView2 Chromium Renderer
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/devtools.png" width="75%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/devtools.png" width="75%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -47,7 +47,7 @@ Gophers rejoice! The single binary dream lives on!
|
||||
### New Features
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-menus.png" width="60%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails-menus.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -59,7 +59,7 @@ There were a huge number of requests in v1 for the ability to have greater contr
|
||||
There is now the option to generate IDE configuration along with your project. This means that if you open your project in a supported IDE, it will already be configured for building and debugging your application. Currently VSCode is supported but we hope to support other IDEs such as Goland soon.
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/vscode.png" width="100%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/vscode.png" width="100%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -79,7 +79,7 @@ You just pass a single `embed.FS` that contains all your assets into your applic
|
||||
### New Development Experience
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/browser.png" width="60%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/browser.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -101,7 +101,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
|
||||
### Remote Templates
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/remote.png" width="60%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/remote.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
+7
-7
@@ -10,7 +10,7 @@ tags:
|
||||
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-mac.png" width="60%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails-mac.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -24,7 +24,7 @@ So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windo
|
||||
### New Features
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-menus-mac.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails-menus-mac.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -72,7 +72,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
|
||||
### Remote Templates
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/remote-mac.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/remote-mac.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -86,7 +86,7 @@ With v2, I wanted to empower the community by giving you the ability to create a
|
||||
Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wails project now supports M1 native builds:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-arm.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/build-darwin-arm.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -94,7 +94,7 @@ Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wa
|
||||
You can also specify `darwin/amd64` as a target too:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-amd.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/build-darwin-amd.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -102,7 +102,7 @@ You can also specify `darwin/amd64` as a target too:
|
||||
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-universal.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/build-darwin-universal.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -112,7 +112,7 @@ Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
|
||||
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-cross-windows.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/build-cross-windows.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
+4
-4
@@ -10,7 +10,7 @@ tags:
|
||||
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-linux.png" width="40%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails-linux.png" width="40%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -20,7 +20,7 @@ I'm pleased to finally announce that Wails v2 is now in beta for Linux! It is so
|
||||
### New Features
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-menus-linux.png" width="50%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/wails-menus-linux.png" width="50%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -59,7 +59,7 @@ In addition to this, another JS module is dynamically generated wrapping all you
|
||||
### Remote Templates
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/remote-linux.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/remote-linux.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -73,7 +73,7 @@ With v2, I wanted to empower the community by giving you the ability to create a
|
||||
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/linux-build-cross-windows.png" width="80%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/linux-build-cross-windows.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -9,7 +9,7 @@ From the project directory, run `wails build`. This will compile your project an
|
||||
If you run the binary, you should see the default application:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/defaultproject.png" width="50%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/defaultproject.png" width="50%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
+72
-2
@@ -2,6 +2,9 @@
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Creating a Project
|
||||
|
||||
## Project Generation
|
||||
@@ -10,8 +13,75 @@ Now that the CLI is installed, you can generate a new project by using the `wail
|
||||
|
||||
Pick your favourite framework:
|
||||
|
||||
import TabsFrameworks from "../../src/components/frameworktabs";
|
||||
<TabsFrameworks/>
|
||||
|
||||
<!-- @formatter:off -->
|
||||
|
||||
<Tabs
|
||||
defaultValue="Svelte"
|
||||
values={[
|
||||
{label: "Svelte", value: "Svelte"},
|
||||
{label: "React", value: "React"},
|
||||
{label: "Vue", value: "Vue"},
|
||||
{label: "Preact", value: "Preact"},
|
||||
{label: "Lit", value: "Lit"},
|
||||
{label: "Vanilla", value: "Vanilla"},
|
||||
]}
|
||||
>
|
||||
<TabItem value="Svelte">
|
||||
Generate a <a href={"https://svelte.dev/"}>Svelte</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t svelte
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t svelte-ts
|
||||
</TabItem>
|
||||
<TabItem value="React">
|
||||
Generate a <a href={"https://reactjs.org/"}>React</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t react
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t react-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vue">
|
||||
Generate a <a href={"https://vuejs.org/"}>Vue</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vue
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t vue-ts
|
||||
</TabItem>
|
||||
<TabItem value="Preact">
|
||||
Generate a <a href={"https://preactjs.com/"}>Preact</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t preact
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t preact-ts
|
||||
</TabItem>
|
||||
<TabItem value="Lit">
|
||||
Generate a <a href={"https://lit.dev/"}>Lit</a> project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t lit
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t lit-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vanilla">
|
||||
Generate a Vanilla project using Javascript with:<br/><br/>
|
||||
|
||||
wails init -n myproject -t vanilla
|
||||
|
||||
If you would rather use Typescript:<br/>
|
||||
|
||||
wails init -n myproject -t vanilla-ts
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<!-- @formatter:on -->
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
+37
-2
@@ -2,6 +2,9 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Installation
|
||||
|
||||
## Supported Platforms
|
||||
@@ -37,8 +40,40 @@ Run `npm --version` to verify.
|
||||
|
||||
You will also need to install platform specific dependencies:
|
||||
|
||||
import TabsInstaller from "../../src/components/tabinstall";
|
||||
<TabsInstaller />
|
||||
<!-- @formatter:off -->
|
||||
|
||||
<Tabs
|
||||
defaultValue="Windows"
|
||||
values={[
|
||||
{label: "Windows", value: "Windows"},
|
||||
{label: "MacOS", value: "MacOS"},
|
||||
{label: "Linux", value: "Linux"},
|
||||
]}
|
||||
>
|
||||
<TabItem value="MacOS">
|
||||
Wails requires that the xcode command line tools are installed. This can be done by running: <br/>
|
||||
<code>xcode-select --install</code>
|
||||
</TabItem>
|
||||
<TabItem value="Windows">
|
||||
Wails requires that the <a
|
||||
href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a>{" "}
|
||||
runtime is installed. Some Windows installations will already have this installed. You can check using
|
||||
the{" "}
|
||||
<code>wails doctor</code> command (see below).
|
||||
</TabItem>
|
||||
<TabItem value={"Linux"}>
|
||||
Linux required the standard <code>gcc</code> build tools
|
||||
plus <code>libgtk3</code> and <code>libwebkit</code>.
|
||||
Rather than list a ton of commands for different distros, Wails can try to determine
|
||||
what the installation commands are for your specific distribution. Run <code>wails doctor</code> after
|
||||
installation
|
||||
to be shown how to install the dependencies.
|
||||
If your distro/package manager is not supported, please consult the {" "}
|
||||
<a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<!-- @formatter:on -->
|
||||
|
||||
## Optional Dependencies
|
||||
|
||||
|
||||
@@ -313,7 +313,25 @@ jobs:
|
||||
with:
|
||||
node-version: 14
|
||||
# You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
|
||||
- name: Get Wails
|
||||
jobs:
|
||||
package:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [ windows-latest, macos-latest ]
|
||||
go-version: [1.18]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
# You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
|
||||
- name: Get Wails
|
||||
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||
- name: Build Wails app
|
||||
run: |
|
||||
@@ -329,33 +347,6 @@ jobs:
|
||||
# The certificates in a PKCS12 file encoded as a base64 string
|
||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
||||
# The password used to import the PKCS12 file.
|
||||
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
||||
- name: Sign our macOS binary
|
||||
if: matrix.platform == 'macos-latest'
|
||||
run: |
|
||||
echo "Signing Package"
|
||||
gon -log-level=info ./build/darwin/gon-sign.json
|
||||
- name: Sign Windows binaries
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: |
|
||||
echo "Creating certificate file"
|
||||
New-Item -ItemType directory -Path certificate
|
||||
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
|
||||
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
||||
echo "Signing our binaries"
|
||||
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe
|
||||
- name: upload artifacts macOS
|
||||
if: matrix.platform == 'macos-latest'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wails-binaries-macos
|
||||
path: build/bin/*
|
||||
- name: upload artifacts windows
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wails-binaries-windows
|
||||
path: build/bin/*
|
||||
```
|
||||
|
||||
# End notes
|
||||
|
||||
@@ -669,7 +669,7 @@ func main() {
|
||||
The "About" menu item will appear in the app menu:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/reference/about-menu.png" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/reference/about-menu.png" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -677,7 +677,7 @@ The "About" menu item will appear in the app menu:
|
||||
When clicked, that will open an about message box:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/reference/about-dialog.png" width="40%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/reference/about-dialog.png" width="40%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -154,9 +154,8 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
|
||||
```
|
||||
the first button is shown as default:
|
||||
<div class="text--center">
|
||||
<img src="/img/runtime/dialog_no_defaults.png" width="30%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/runtime/dialog_no_defaults.png" width="30%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
And if we specify `DefaultButton` to be "two":
|
||||
@@ -170,7 +169,7 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
|
||||
```
|
||||
the second button is shown as default. When `return` is pressed, the value "two" is returned.
|
||||
<div class="text--center">
|
||||
<img src="/img/runtime/dialog_default_button.png" width="30%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/runtime/dialog_default_button.png" width="30%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -187,7 +186,7 @@ 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:
|
||||
<div class="text--center">
|
||||
<img src="/img/runtime/dialog_default_cancel.png" width="30%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/runtime/dialog_default_cancel.png" width="30%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -220,7 +219,7 @@ type FileFilter struct {
|
||||
Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/runtime/dialog_win_filters.png" width="50%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/runtime/dialog_win_filters.png" width="50%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
@@ -232,7 +231,7 @@ Windows allows you to use multiple file filters in dialog boxes. Each FileFilter
|
||||
Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/runtime/dialog_lin_filters.png" width="50%" style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
<img src="/img/runtime/dialog_lin_filters.png" width="50%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -107,6 +107,6 @@ You should see the application working as expected:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/windows-default-app.png" width="50%"
|
||||
style={{"box-shadow": "rgb(255 255 255 / 20%) 0px 4px 8px 0px, rgb(104 104 104) 0px 6px 20px 0px"}}/>>
|
||||
style={{"box-shadow": "rgb(255 255>>255 / 20%) 0px 1px 2px 0px, rgb(104 104 104) 0px 1px 5px 0px"}}/>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"version.label": {
|
||||
"message": "v2.0.0-beta.38",
|
||||
"description": "The label for version v2.0.0-beta.38"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Getting Started": {
|
||||
"message": "Getting Started",
|
||||
"description": "The label for category Getting Started in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Reference": {
|
||||
"message": "Reference",
|
||||
"description": "The label for category Reference in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Runtime": {
|
||||
"message": "Runtime",
|
||||
"description": "The label for category Runtime in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Community": {
|
||||
"message": "Community",
|
||||
"description": "The label for category Community in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Showcase": {
|
||||
"message": "Showcase",
|
||||
"description": "The label for category Showcase in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Guides": {
|
||||
"message": "Guides",
|
||||
"description": "The label for category Guides in sidebar tutorialSidebar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"version.label": {
|
||||
"message": "v2.0.0-beta.39",
|
||||
"description": "The label for version v2.0.0-beta.39"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Getting Started": {
|
||||
"message": "Getting Started",
|
||||
"description": "The label for category Getting Started in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Reference": {
|
||||
"message": "Reference",
|
||||
"description": "The label for category Reference in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Runtime": {
|
||||
"message": "Runtime",
|
||||
"description": "The label for category Runtime in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Community": {
|
||||
"message": "Community",
|
||||
"description": "The label for category Community in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Showcase": {
|
||||
"message": "Showcase",
|
||||
"description": "The label for category Showcase in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Guides": {
|
||||
"message": "Guides",
|
||||
"description": "The label for category Guides in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Tutorials": {
|
||||
"message": "Tutorials",
|
||||
"description": "The label for category Tutorials in sidebar tutorialSidebar"
|
||||
},
|
||||
"sidebar.tutorialSidebar.category.Contributing": {
|
||||
"message": "Contributing",
|
||||
"description": "The label for category Contributing in sidebar tutorialSidebar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
{
|
||||
"homepage.Features.Title1": {
|
||||
"message": "Feature Rich"
|
||||
},
|
||||
"homepage.Features.Description1": {
|
||||
"message": "Build comprehensive cross-platform applications using native UI elements such as menus, dialogs, etc."
|
||||
},
|
||||
"homepage.Features.Title2": {
|
||||
"message": "Familiar"
|
||||
},
|
||||
"homepage.Features.Description2": {
|
||||
"message": "Use the technologies you already know to build amazing applications."
|
||||
},
|
||||
"homepage.Features.Title3": {
|
||||
"message": "Fast"
|
||||
},
|
||||
"homepage.Features.Description3": {
|
||||
"message": "Quickly generate, build and package your projects using the Wails CLI."
|
||||
},
|
||||
"homepage.Tagline": {
|
||||
"message": "Build beautiful cross-platform applications using Go"
|
||||
},
|
||||
"homepage.ButtonText": {
|
||||
"message": "Get Started"
|
||||
},
|
||||
"homepage.LearnMoreButtonText": {
|
||||
"message": "Learn More"
|
||||
},
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "This page crashed.",
|
||||
"description": "The title of the fallback page when the page crashed"
|
||||
},
|
||||
"theme.ErrorPageContent.tryAgain": {
|
||||
"message": "Try again",
|
||||
"description": "The label of the button to try again when the page crashed"
|
||||
},
|
||||
"theme.NotFound.title": {
|
||||
"message": "Page Not Found",
|
||||
"description": "The title of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p1": {
|
||||
"message": "We could not find what you were looking for.",
|
||||
"description": "The first paragraph of the 404 page"
|
||||
},
|
||||
"theme.NotFound.p2": {
|
||||
"message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
|
||||
"description": "The 2nd paragraph of the 404 page"
|
||||
},
|
||||
"theme.AnnouncementBar.closeButtonAriaLabel": {
|
||||
"message": "Close",
|
||||
"description": "The ARIA label for close button of announcement bar"
|
||||
},
|
||||
"theme.blog.archive.title": {
|
||||
"message": "Archive",
|
||||
"description": "The page & hero title of the blog archive page"
|
||||
},
|
||||
"theme.blog.archive.description": {
|
||||
"message": "Archive",
|
||||
"description": "The page & hero description of the blog archive page"
|
||||
},
|
||||
"theme.BackToTopButton.buttonAriaLabel": {
|
||||
"message": "Scroll back to top",
|
||||
"description": "The ARIA label for the back to top button"
|
||||
},
|
||||
"theme.blog.paginator.navAriaLabel": {
|
||||
"message": "Blog list page navigation",
|
||||
"description": "The ARIA label for the blog pagination"
|
||||
},
|
||||
"theme.blog.paginator.newerEntries": {
|
||||
"message": "Newer Entries",
|
||||
"description": "The label used to navigate to the newer blog posts page (previous page)"
|
||||
},
|
||||
"theme.blog.paginator.olderEntries": {
|
||||
"message": "Older Entries",
|
||||
"description": "The label used to navigate to the older blog posts page (next page)"
|
||||
},
|
||||
"theme.blog.post.readingTime.plurals": {
|
||||
"message": "One min read|{readingTime} min read",
|
||||
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.blog.post.readMoreLabel": {
|
||||
"message": "Read more about {title}",
|
||||
"description": "The ARIA label for the link to full blog posts from excerpts"
|
||||
},
|
||||
"theme.blog.post.readMore": {
|
||||
"message": "Read More",
|
||||
"description": "The label used in blog post item excerpts to link to full blog posts"
|
||||
},
|
||||
"theme.blog.post.paginator.navAriaLabel": {
|
||||
"message": "Blog post page navigation",
|
||||
"description": "The ARIA label for the blog posts pagination"
|
||||
},
|
||||
"theme.blog.post.paginator.newerPost": {
|
||||
"message": "Newer Post",
|
||||
"description": "The blog post button label to navigate to the newer/previous post"
|
||||
},
|
||||
"theme.blog.post.paginator.olderPost": {
|
||||
"message": "Older Post",
|
||||
"description": "The blog post button label to navigate to the older/next post"
|
||||
},
|
||||
"theme.blog.sidebar.navAriaLabel": {
|
||||
"message": "Blog recent posts navigation",
|
||||
"description": "The ARIA label for recent posts in the blog sidebar"
|
||||
},
|
||||
"theme.blog.post.plurals": {
|
||||
"message": "One post|{count} posts",
|
||||
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.blog.tagTitle": {
|
||||
"message": "{nPosts} tagged with \"{tagName}\"",
|
||||
"description": "The title of the page for a blog tag"
|
||||
},
|
||||
"theme.tags.tagsPageLink": {
|
||||
"message": "View All Tags",
|
||||
"description": "The label of the link targeting the tag list page"
|
||||
},
|
||||
"theme.CodeBlock.copyButtonAriaLabel": {
|
||||
"message": "Copy code to clipboard",
|
||||
"description": "The ARIA label for copy code blocks button"
|
||||
},
|
||||
"theme.CodeBlock.copied": {
|
||||
"message": "Copied",
|
||||
"description": "The copied button label on code blocks"
|
||||
},
|
||||
"theme.CodeBlock.copy": {
|
||||
"message": "Copy",
|
||||
"description": "The copy button label on code blocks"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel": {
|
||||
"message": "Switch between dark and light mode (currently {mode})",
|
||||
"description": "The ARIA label for the navbar color mode toggle"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.dark": {
|
||||
"message": "dark mode",
|
||||
"description": "The name for the dark color mode"
|
||||
},
|
||||
"theme.colorToggle.ariaLabel.mode.light": {
|
||||
"message": "light mode",
|
||||
"description": "The name for the light color mode"
|
||||
},
|
||||
"theme.docs.DocCard.categoryDescription": {
|
||||
"message": "{count} items",
|
||||
"description": "The default description for a category card in the generated index about how many items this category includes"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonTitle": {
|
||||
"message": "Expand sidebar",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.expandButtonAriaLabel": {
|
||||
"message": "Expand sidebar",
|
||||
"description": "The ARIA label and title attribute for expand button of doc sidebar"
|
||||
},
|
||||
"theme.docs.paginator.navAriaLabel": {
|
||||
"message": "Docs pages navigation",
|
||||
"description": "The ARIA label for the docs pagination"
|
||||
},
|
||||
"theme.docs.paginator.previous": {
|
||||
"message": "Previous",
|
||||
"description": "The label used to navigate to the previous doc"
|
||||
},
|
||||
"theme.docs.paginator.next": {
|
||||
"message": "Next",
|
||||
"description": "The label used to navigate to the next doc"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonTitle": {
|
||||
"message": "Collapse sidebar",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.docs.sidebar.collapseButtonAriaLabel": {
|
||||
"message": "Collapse sidebar",
|
||||
"description": "The title attribute for collapse button of doc sidebar"
|
||||
},
|
||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": {
|
||||
"message": "Toggle the collapsible sidebar category '{label}'",
|
||||
"description": "The ARIA label to toggle the collapsible sidebar category"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle.nDocsTagged": {
|
||||
"message": "One doc tagged|{count} docs tagged",
|
||||
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.docs.tagDocListPageTitle": {
|
||||
"message": "{nDocsTagged} with \"{tagName}\"",
|
||||
"description": "The title of the page for a docs tag"
|
||||
},
|
||||
"theme.docs.versionBadge.label": {
|
||||
"message": "Version: {versionLabel}"
|
||||
},
|
||||
"theme.docs.versions.unreleasedVersionLabel": {
|
||||
"message": "This is unreleased documentation for {siteTitle} {versionLabel} version.",
|
||||
"description": "The label used to tell the user that he's browsing an unreleased doc version"
|
||||
},
|
||||
"theme.docs.versions.unmaintainedVersionLabel": {
|
||||
"message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.",
|
||||
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionSuggestionLabel": {
|
||||
"message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).",
|
||||
"description": "The label used to tell the user to check the latest version"
|
||||
},
|
||||
"theme.docs.versions.latestVersionLinkLabel": {
|
||||
"message": "latest version",
|
||||
"description": "The label used for the latest version suggestion link label"
|
||||
},
|
||||
"theme.common.editThisPage": {
|
||||
"message": "Edit this page",
|
||||
"description": "The link label to edit the current page"
|
||||
},
|
||||
"theme.common.headingLinkTitle": {
|
||||
"message": "Direct link to heading",
|
||||
"description": "Title for link to heading"
|
||||
},
|
||||
"theme.lastUpdated.atDate": {
|
||||
"message": " on {date}",
|
||||
"description": "The words used to describe on which date a page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.byUser": {
|
||||
"message": " by {user}",
|
||||
"description": "The words used to describe by who the page has been last updated"
|
||||
},
|
||||
"theme.lastUpdated.lastUpdatedAtBy": {
|
||||
"message": "Last updated{atDate}{byUser}",
|
||||
"description": "The sentence used to display when a page has been last updated, and by who"
|
||||
},
|
||||
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
|
||||
"message": "← Back to main menu",
|
||||
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
|
||||
},
|
||||
"theme.navbar.mobileVersionsDropdown.label": {
|
||||
"message": "Versions",
|
||||
"description": "The label for the navbar versions dropdown on mobile view"
|
||||
},
|
||||
"theme.common.skipToMainContent": {
|
||||
"message": "Skip to main content",
|
||||
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
|
||||
},
|
||||
"theme.tags.tagsListLabel": {
|
||||
"message": "Tags:",
|
||||
"description": "The label alongside a tag list"
|
||||
},
|
||||
"theme.TOCCollapsible.toggleButtonLabel": {
|
||||
"message": "On this page",
|
||||
"description": "The label used by the button on the collapsible TOC component"
|
||||
},
|
||||
"theme.navbar.mobileLanguageDropdown.label": {
|
||||
"message": "Languages",
|
||||
"description": "The label for the mobile language switcher dropdown"
|
||||
},
|
||||
"theme.SearchBar.seeAll": {
|
||||
"message": "See all {count} results"
|
||||
},
|
||||
"theme.SearchBar.label": {
|
||||
"message": "Search",
|
||||
"description": "The ARIA label and placeholder for search button"
|
||||
},
|
||||
"theme.SearchPage.documentsFound.plurals": {
|
||||
"message": "One document found|{count} documents found",
|
||||
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
|
||||
},
|
||||
"theme.SearchPage.existingResultsTitle": {
|
||||
"message": "Search results for \"{query}\"",
|
||||
"description": "The search page title for non-empty query"
|
||||
},
|
||||
"theme.SearchPage.emptyResultsTitle": {
|
||||
"message": "Search the documentation",
|
||||
"description": "The search page title for empty query"
|
||||
},
|
||||
"theme.SearchPage.inputPlaceholder": {
|
||||
"message": "Type your search here",
|
||||
"description": "The placeholder for search page input"
|
||||
},
|
||||
"theme.SearchPage.inputLabel": {
|
||||
"message": "Search",
|
||||
"description": "The ARIA label for search page input"
|
||||
},
|
||||
"theme.SearchPage.algoliaLabel": {
|
||||
"message": "Search by Algolia",
|
||||
"description": "The ARIA label for Algolia mention"
|
||||
},
|
||||
"theme.SearchPage.noResultsText": {
|
||||
"message": "No results were found",
|
||||
"description": "The paragraph for empty search result"
|
||||
},
|
||||
"theme.SearchPage.fetchingNewResults": {
|
||||
"message": "Fetching new results...",
|
||||
"description": "The paragraph for fetching new search results"
|
||||
},
|
||||
"theme.tags.tagsPageTitle": {
|
||||
"message": "Tags",
|
||||
"description": "The title of the tag list page"
|
||||
},
|
||||
"theme.docs.breadcrumbs.home": {
|
||||
"message": "Home page",
|
||||
"description": "The ARIA label for the home page in the breadcrumbs"
|
||||
},
|
||||
"theme.docs.breadcrumbs.navAriaLabel": {
|
||||
"message": "Breadcrumbs",
|
||||
"description": "The ARIA label for the breadcrumbs"
|
||||
},
|
||||
"theme.CodeBlock.wordWrapToggle": {
|
||||
"message": "Toggle word wrap",
|
||||
"description": "The title attribute for toggle word wrapping button of code block lines"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
---
|
||||
slug: wails-v2-beta-for-windows
|
||||
title: Wails v2 Beta for Windows
|
||||
authors:
|
||||
- leaanthony
|
||||
tags:
|
||||
- wails
|
||||
- v2
|
||||
---
|
||||
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails.png" width="40%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
When I first announced Wails on Reddit, just over 2 years ago from a train in Sydney, I did not expect it to get much attention. A few days later, a prolific tech vlogger released a tutorial video, gave it a positive review and from that point on, interest in the project has skyrocketed.
|
||||
|
||||
It was clear that people were excited about adding web frontends to their Go projects, and almost immediately pushed the project beyond the proof of concept that I had created. At the time, Wails used the [webview](https://github.com/webview/webview) project to handle the frontend, and the only option for Windows was the IE11 renderer. Many bug reports were rooted in this limitation: poor JavaScript/CSS support and no dev tools to debug it. This was a frustrating development experience but there wasn't much that could have been done to rectify it.
|
||||
|
||||
For a long time, I'd firmly believed that Microsoft would eventually have to sort out their browser situation. The world was moving on, frontend development was booming and IE wasn't cutting it. When Microsoft announced the move to using Chromium as the basis for their new browser direction, I knew it was only a matter of time until Wails could use it, and move the Windows developer experience to the next level.
|
||||
|
||||
Today, I am pleased to announce: **Wails v2 Beta for Windows**! There's a huge amount to unpack in this release, so grab a drink, take a seat and we'll begin...
|
||||
|
||||
### No CGO Dependency!
|
||||
|
||||
No, I'm not joking: *No* *CGO* *dependency* 🤯! The thing about Windows is that, unlike MacOS and Linux, it doesn't come with a default compiler. In addition, CGO requires a mingw compiler and there's a ton of different installation options. Removing the CGO requirement has massively simplified setup, as well as making debugging an awful lot easier. Whilst I have put a fair bit of effort in getting this working, the majority of the credit should go to [John Chadwick](https://github.com/jchv) for not only starting a couple of projects to make this possible, but also being open to someone taking those projects and building on them. Credit also to [Tad Vizbaras](https://github.com/tadvi) whose [winc](https://github.com/tadvi/winc) project started me down this path.
|
||||
|
||||
### WebView2 Chromium Renderer
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/devtools.png" width="75%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
Finally, Windows developers get a first class rendering engine for their applications! Gone are the days of contorting your frontend code to work on Windows. On top of that, you get a first-class developer tools experience!
|
||||
|
||||
The WebView2 component does, however, have a requirement to have the `WebView2Loader.dll` sitting alongside the binary. This makes distribution just that little bit more painful than we gophers are used to. All solutions and libraries (that I know of) that use WebView2 have this dependency.
|
||||
|
||||
However, I'm really excited to announce that Wails applications *have no such requirement*! Thanks to the wizardry of [John Chadwick](https://github.com/jchv), we are able to bundle this dll inside the binary and get Windows to load it as if it were present on disk.
|
||||
|
||||
Gophers rejoice! The single binary dream lives on!
|
||||
|
||||
### New Features
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-menus.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators.
|
||||
|
||||
There were a huge number of requests in v1 for the ability to have greater control of the window itself. I'm happy to announce that there's new runtime APIs specifically for this. It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs.
|
||||
|
||||
There is now the option to generate IDE configuration along with your project. This means that if you open your project in a supported IDE, it will already be configured for building and debugging your application. Currently VSCode is supported but we hope to support other IDEs such as Goland soon.
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/vscode.png" width="100%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
### No requirement to bundle assets
|
||||
|
||||
A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an `<img>` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS.
|
||||
|
||||
> Wow, that sounds like a webserver...
|
||||
|
||||
Yes, it works just like a webserver, except it isn't.
|
||||
|
||||
> So how do I include my assets?
|
||||
|
||||
You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you.
|
||||
|
||||
### New Development Experience
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/browser.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
Now that assets don't need to be bundled, it's enabled a whole new development experience. The new `wails dev` command will build and run your application, but instead of using the assets in the `embed.FS`, it loads them directly from disk.
|
||||
|
||||
It also provides the additional features:
|
||||
|
||||
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
|
||||
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
|
||||
|
||||
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
|
||||
|
||||
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
|
||||
|
||||
In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code!
|
||||
|
||||
### Remote Templates
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/remote.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
|
||||
|
||||
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
|
||||
|
||||
### In Conclusion
|
||||
|
||||
Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome. Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board.
|
||||
|
||||
There were many twists and turns, pivots and u-turns to get to this point. This was due partly to early technical decisions that needed changing, and partly because some core problems we had spent time building workarounds for were fixed upstream: Go’s embed feature is a good example. Fortunately, everything came together at the right time, and today we have the very best solution that we can have. I believe the wait has been worth it - this would not have been possible even 2 months ago.
|
||||
|
||||
I also need to give a huge thank you :pray: to the following people because without them, this release just wouldn't exist:
|
||||
|
||||
- [Misitebao](https://github.com/misitebao) - An absolute workhorse on the Chinese translations and an incredible bug finder.
|
||||
- [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version we have today possible.
|
||||
- [Tad Vizbaras](https://github.com/tadvi) - Experimenting with his [winc](https://github.com/tadvi/winc) project was the first step down the path to a pure Go Wails.
|
||||
- [Mat Ryer](https://github.com/matryer) - His support, encouragement and feedback has really helped drive the project forward.
|
||||
|
||||
And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes.
|
||||
|
||||
I look forward to seeing what people build with Wails in this next exciting phase of the project!
|
||||
|
||||
Lea.
|
||||
|
||||
PS: MacOS and Linux users need not feel left out - porting to this new foundation is actively under way and most of the hard work has already been done. Hang in there!
|
||||
|
||||
PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!
|
||||
@@ -0,0 +1,137 @@
|
||||
---
|
||||
slug: wails-v2-beta-for-mac
|
||||
title: Wails v2 Beta for MacOS
|
||||
authors:
|
||||
- leaanthony
|
||||
tags:
|
||||
- wails
|
||||
- v2
|
||||
---
|
||||
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-mac.png" width="60%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
Today marks the first beta release of Wails v2 for Mac! It's taken quite a while to get to this point and I'm hoping that today's release will give you something that's reasonably useful. There have been a number of twists and turns to get to this point and I'm hoping, with your help, to iron out the crinkles and get the Mac port polished for the final v2 release.
|
||||
|
||||
You mean this isn't ready for production? For your use case, it may well be ready, but there are still a number of known issues so keep your eye on [this project board](https://github.com/wailsapp/wails/projects/7) and if you would like to contribute, you'd be very welcome!
|
||||
|
||||
So what's new for Wails v2 for Mac vs v1? Hint: It's pretty similar to the Windows Beta :wink:
|
||||
|
||||
### New Features
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/wails-menus-mac.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
There were a lot of requests for native menu support. Wails has finally got you covered. Application menus are now available and include support for most native menu features. This includes standard menu items, checkboxes, radio groups, submenus and separators.
|
||||
|
||||
There were a huge number of requests in v1 for the ability to have greater control of the window itself. I'm happy to announce that there's new runtime APIs specifically for this. It's feature-rich and supports multi-monitor configurations. There is also an improved dialogs API: Now, you can have modern, native dialogs with rich configuration to cater for all your dialog needs.
|
||||
|
||||
### Mac Specific Options
|
||||
|
||||
In addition to the normal application options, Wails v2 for Mac also brings some Mac extras:
|
||||
|
||||
- Make your window all funky and translucent, like all the pretty swift apps!
|
||||
- Highly customisable titlebar
|
||||
- We support the NSAppearance options for the application
|
||||
- Simple config to auto-create an "About" menu
|
||||
|
||||
### No requirement to bundle assets
|
||||
|
||||
A huge pain-point of v1 was the need to condense your entire application down to single JS & CSS files. I'm happy to announce that for v2, there is no requirement to bundle assets, in any way, shape or form. Want to load a local image? Use an `<img>` tag with a local src path. Want to use a cool font? Copy it in and add the path to it in your CSS.
|
||||
|
||||
> Wow, that sounds like a webserver...
|
||||
|
||||
Yes, it works just like a webserver, except it isn't.
|
||||
|
||||
> So how do I include my assets?
|
||||
|
||||
You just pass a single `embed.FS` that contains all your assets into your application configuration. They don't even need to be in the top directory - Wails will just work it out for you.
|
||||
|
||||
### New Development Experience
|
||||
|
||||
Now that assets don't need to be bundled, it's enabled a whole new development experience. The new `wails dev` command will build and run your application, but instead of using the assets in the `embed.FS`, it loads them directly from disk.
|
||||
|
||||
It also provides the additional features:
|
||||
|
||||
- Hot reload - Any changes to frontend assets will trigger and auto reload of the application frontend
|
||||
- Auto rebuild - Any changes to your Go code will rebuild and relaunch your application
|
||||
|
||||
In addition to this, a webserver will start on port 34115. This will serve your application to any browser that connects to it. All connected web browsers will respond to system events like hot reload on asset change.
|
||||
|
||||
In Go, we are used to dealing with structs in our applications. It's often useful to send structs to our frontend and use them as state in our application. In v1, this was a very manual process and a bit of a burden on the developer. I'm happy to announce that in v2, any application run in dev mode will automatically generate Typescript models for all structs that are input or output parameters to bound methods. This enables seamless interchange of data models between the two worlds.
|
||||
|
||||
In addition to this, another JS module is dynamically generated wrapping all your bound methods. This provides JSDoc for your methods, providing code completion and hinting in your IDE. It's really cool when you get data models auto-imported when hitting tab in an auto-generated module wrapping your Go code!
|
||||
|
||||
### Remote Templates
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/remote-mac.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
Getting an application up and running quickly was always a key goal for the Wails project. When we launched, we tried to cover a lot of the modern frameworks at the time: react, vue and angular. The world of frontend development is very opinionated, fast moving and hard to keep on top of! As a result, we found our base templates getting out of date pretty quickly and this caused a maintenance headache. It also meant that we didn't have cool modern templates for the latest and greatest tech stacks.
|
||||
|
||||
With v2, I wanted to empower the community by giving you the ability to create and host templates yourselves, rather than rely on the Wails project. So now you can create projects using community supported templates! I hope this will inspire developers to create a vibrant ecosystem of project templates. I'm really quite excited about what our developer community can create!
|
||||
|
||||
### Native M1 Support
|
||||
|
||||
Thanks to the amazing support of [Mat Ryer](https://github.com/matryer/), the Wails project now supports M1 native builds:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-arm.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
You can also specify `darwin/amd64` as a target too:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-amd.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
Oh, I almost forgot.... you can also do `darwin/universal`.... :wink:
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-darwin-universal.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
### Cross Compilation to Windows
|
||||
|
||||
Because Wails v2 for Windows is pure Go, you can target Windows builds without docker.
|
||||
|
||||
<div class="text--center">
|
||||
<img src="/img/build-cross-windows.png" width="80%" className="screenshot"/>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
### WKWebView Renderer
|
||||
|
||||
V1 relied on a (now deprecated) WebView component. V2 uses the most recent WKWebKit component so expect the latest and greatest from Apple.
|
||||
|
||||
### In Conclusion
|
||||
|
||||
As I'd said in the Windows release notes, Wails v2 represents a new foundation for the project. The aim of this release is to get feedback on the new approach, and to iron out any bugs before a full release. Your input would be most welcome! Please direct any feedback to the [v2 Beta](https://github.com/wailsapp/wails/discussions/828) discussion board.
|
||||
|
||||
And finally, I'd like to give a special thank you to all the [project sponsors](/credits#sponsors), including [JetBrains](https://www.jetbrains.com?from=Wails), whose support drive the project in many ways behind the scenes.
|
||||
|
||||
I look forward to seeing what people build with Wails in this next exciting phase of the project!
|
||||
|
||||
Lea.
|
||||
|
||||
PS: Linux users, you're next!
|
||||
|
||||
PPS: If you or your company find Wails useful, please consider [sponsoring the project](https://github.com/sponsors/leaanthony). Thanks!
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user