mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
v2.11.0
This commit is contained in:
parent
cb1c2d86c0
commit
ac867f6587
604 changed files with 55328 additions and 45 deletions
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Clustta
|
||||
description: File manager and project management tool for creative professionals.
|
||||
slug: /community/showcase/clustta
|
||||
image: /img/showcase/clustta.png
|
||||
---
|
||||
|
||||
<div className="text--center">
|
||||
<img src="/img/showcase/clustta.png" alt="Clustta screenshot" loading="lazy" />
|
||||
</div>
|
||||
|
||||
[Clustta](https://clustta.com) is a file manager and project management tool designed for creative professionals. Built with Wails, it simplifies file management, collaboration, and version control for creative workflows.
|
||||
|
||||
## Features
|
||||
|
||||
- **File Management**: Track all projects and files with easy access even months after completion.
|
||||
- **Version Control**: Save unlimited revisions with descriptive notes, without duplicating files.
|
||||
- **Collaboration**: Share files or entire projects securely through simple user tags with fine-grained permissions.
|
||||
- **Recovery**: Restore corrupted files from saved checkpoints if your software crashes.
|
||||
- **Templates**: Quick start with preset project and task templates.
|
||||
- **Kanban Boards**: Visual task tracking to keep tasks organized.
|
||||
- **Dependencies**: Track and version project resources and dependencies.
|
||||
- **Checkpoints**: Create memorable milestones and explore alternate creative directions non-destructively.
|
||||
- **Search & Filters**: Powerful instant search with metadata filtering (task types, tags, status, file extensions).
|
||||
- **Workspaces**: Save search and filter combinations for easy access to specific task sets.
|
||||
- **Integrations**: Connect with creative software packages and production management tools like Blender and Kitsu.
|
||||
- **Self-Hosting**: Host private instances for teams or studios on your own servers.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# grpcmd-gui
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/grpcmd-gui.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[grpcmd-gui](https://grpc.md/gui) is a modern cross-platform desktop app and API client for gRPC development and testing.
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Kafka-King
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/kafka-King-img_3.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[Kafka-King](https://github.com/Bronya0/Kafka-King) is a kafka GUI client that supports various systems and is compact and easy to use.
|
||||
This is made of Wails+vue3
|
||||
|
||||
# Kafka-King function list
|
||||
- [x] View the cluster node list, support dynamic configuration of broker and topic configuration items
|
||||
- [x] Supports consumer clients, consumes the specified topic, size, and timeout according to the specified group, and displays the message information in various dimensions in a table
|
||||
- [x] Supports PLAIN, SSL, SASL, kerberos, sasl_plaintext, etc. etc.
|
||||
- [x] Create topics (support batches), delete topics, specify replicas, partitions
|
||||
- [x] Support statistics of the total number of messages, total number of submissions, and backlog for each topic based on consumer groups
|
||||
- [x] Support viewing topics Detailed information (offset) of the partition, and support adding additional partitions
|
||||
- [x] Support simulated producers, batch sending messages, specify headers, partitions
|
||||
- [x] Health check
|
||||
- [x] Support viewing consumer groups , Consumer- ……
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Marasi
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/marasi.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[Marasi](https://marasi.app/) is an open source application security testing proxy, it lets you intercept, inspect, modify, and extend requests as they flow through your applications. Read more about it on the [blog](https://marasi.app/blog/2025/introducing_marasi/).
|
||||
|
||||
## Features
|
||||
|
||||
- Desktop GUI Interface: Cross-platform desktop application built with Wails
|
||||
- HTTP/HTTPS Proxy: TLS-capable proxy server with certificate management
|
||||
- Request/Response Interception: Modify traffic in real-time with an intuitive interface
|
||||
- Lua Extensions: Scriptable proxy behavior with built-in extensions
|
||||
- Project Management: SQLite-based storage for all proxy data (requests, responses, metadata)
|
||||
- Launchpad: Replay and modify HTTP requests
|
||||
- Scope Management: Filter traffic with inclusion/exclusion rules
|
||||
- Waypoints: Override hostnames for request routing
|
||||
- Chrome Integration: Auto-configure Chrome with proxy settings
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Minesweeper XP
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/minesweeper-xp.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[Minesweeper-XP](https://git.new/Minesweeper-XP) allows you to experience the classic Minesweeper XP (+ 98 and 3.1) on macOS, Windows, and Linux!
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Resizem
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/resizem.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[Resizem](https://github.com/barats/resizem) - is an app designed for bulk image process. It is particularly useful for users who need to resize, convert, and manage large numbers of image files at once.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# WailsTerm
|
||||
|
||||
```mdx-code-block
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img src={require("@site/static/img/showcase/wailsterm.webp").default} />
|
||||
<br />
|
||||
</p>
|
||||
```
|
||||
|
||||
[WailsTerm](https://github.com/rlshukhov/wailsterm) is a simple translucent terminal app powered by Wails and Xterm.js.
|
||||
|
|
@ -27,8 +27,8 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
|
|||
- [wails-template-quasar-js](https://github.com/sgosiaco/wails-template-quasar-js) - A template using JavaScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier)
|
||||
- [wails-template-quasar-ts](https://github.com/sgosiaco/wails-template-quasar-ts) - A template using TypeScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier, Composition API with <script setup>)
|
||||
- [wails-template-naive](https://github.com/tk103331/wails-template-naive) - Wails template based on Naive UI (A Vue 3 Component Library)
|
||||
- [wails-template-nuxt](https://github.com/gornius/wails-template-nuxt) - Wails template using clean Nuxt3 and TypeScript with auto-imports for wails js runtime
|
||||
- [Wails-Tool-Template](https://github.com/xisuo67/Wails-Tool-Template) - Wails template using Vue+TypeScript+Vite+Element-plus(仿网易云)
|
||||
- [wails-template-primevue-sakai](https://github.com/TekWizely/wails-template-primevue-sakai) - Wails starter using [PrimeVue's Sakai Application Template](https://sakai.primevue.org) (Vite, Vue, PrimeVue, TailwindCSS, Vue Router, Themes, Dark Mode, UI Components, and more)
|
||||
- [wails-template-tdesign-js](https://github.com/tongque0/wails-template-tdesign-js) - Wails template based on TDesign UI (a Vue 3 UI library by Tencent), using Vite, Pinia, Vue Router, ESLint, and Prettier.
|
||||
|
||||
## Angular
|
||||
|
||||
|
|
@ -41,19 +41,21 @@ 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
|
||||
- [wails-template-nextjs-app-router](https://github.com/thisisvk-in/wails-template-nextjs-app-router) - A template using Next.js and TypeScript with App router
|
||||
- [wails-template-nextjs-app-router-src](https://github.com/edai-git/wails-template-nextjs-app-router) - A template using Next.js and TypeScript with App router src + example
|
||||
- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS
|
||||
- [Wails-vite-ts-tailwindcss-shadcn-template-2025](https://github.com/darkb0ts/Wails-vite-ts-tailwindcss-shadcn-template-2025) - A template for React + TypeScript + Vite
|
||||
- [wails-vite-react-ts-tailwind-shadcnui-template](https://github.com/Mahcks/wails-vite-react-tailwind-shadcnui-ts) - A template with Vite, React, TypeScript, TailwindCSS, and shadcn/ui
|
||||
|
||||
- [wails-nextjs-tailwind-template](https://github.com/kairo913/wails-nextjs-tailwind-template) - A template using Next.js and Typescript with TailwindCSS
|
||||
|
||||
## Svelte
|
||||
|
||||
- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte
|
||||
- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite
|
||||
- [wails-vite-svelte-ts-tailwind-template](https://github.com/xvertile/wails-vite-svelte-tailwind-template) - A template using Wails, Svelte, Vite, TypeScript, and TailwindCSS v3
|
||||
- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3
|
||||
- [wails-svelte-tailwind-vite-template](https://github.com/PylotLight/wails-vite-svelte-tailwind-template/tree/master) - An updated template using Svelte v4.2.0 and Vite with TailwindCSS v3.3.3
|
||||
- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit
|
||||
- [wails-template-shadcn-svelte](https://github.com/xijaja/wails-template-shadcn-svelte) - A template using Sveltekit and Shadcn-Svelte
|
||||
- [wails-template-sveltekit-less-prettier-eslint](https://github.com/Alex6357/wails-template-sveltekit-less-prettier-eslint) - A template using SvelteKit with less, Prettier and ESlint
|
||||
- [wails-template-svelte-ts-less-prettier-eslint-vite](https://github.com/Alex6357/wails-template-svelte-ts-less-prettier-eslint-vite) - A template using Svelte5 + TypeScript + less + Prettier + ESlint + Vite
|
||||
|
||||
## Solid
|
||||
|
||||
|
|
@ -67,6 +69,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
|
|||
|
||||
## HTMX
|
||||
|
||||
- [wails-htmx-tailwind-daisyui-template](https://github.com/ltcovalt/wails-htmx-tailwind-daisyui-template) - HTMX template using Tailwind CSS + daisyUI for styling and the Go standard library for routing and HTML templating
|
||||
- [wails-htmx-templ-chi-tailwind](https://github.com/PylotLight/wails-hmtx-templ-template) - Use a unique combination of pure htmx for interactivity plus templ for creating components and forms
|
||||
|
||||
## Pure JavaScript (Vanilla)
|
||||
|
|
@ -7,7 +7,7 @@ sidebar_position: 1
|
|||
## Supported Platforms
|
||||
|
||||
- Windows 10/11 AMD64/ARM64
|
||||
- MacOS 10.13+ AMD64
|
||||
- MacOS 10.15+ AMD64 for development, MacOS 10.13+ for release
|
||||
- MacOS 11.0+ ARM64
|
||||
- Linux AMD64/ARM64
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ sidebar_position: 1
|
|||
|
||||
Wails has a number of common dependencies that are required before installation:
|
||||
|
||||
- Go 1.20+
|
||||
- Go 1.21+ (macOS 15+ requires Go 1.23.3+)
|
||||
- NPM (Node 15+)
|
||||
|
||||
### Go
|
||||
|
|
@ -60,6 +60,12 @@ import TabItem from "@theme/TabItem";
|
|||
Linux requires 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.
|
||||
<br/><strong>Note:</strong><br/>
|
||||
If you are using latest Linux version (example: Ubuntu 24.04) and it is not supporting <code>libwebkit2gtk-4.0-dev</code>, then you might encounter an issue in <code>wails doctor</code>: <code>libwebkit</code> not found. To resolve this issue you can install <code>libwebkit2gtk-4.1-dev</code> and during your build use the tag <code>-tags webkit2_41</code>.
|
||||
<br/><br/>
|
||||
After installing Wails via Go, ensure you run the following commands to update your PATH:
|
||||
<br/>
|
||||
<code>export PATH=$PATH:$(go env GOPATH)/bin</code>
|
||||
<br/>
|
||||
<code>source ~/.bashrc</code> or <code>source ~/.zshrc</code>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
```
|
||||
|
|
@ -78,7 +84,9 @@ Note: If you get an error similar to this:
|
|||
```shell
|
||||
....\Go\pkg\mod\github.com\wailsapp\wails\v2@v2.1.0\pkg\templates\templates.go:28:12: pattern all:ides/*: no matching files found
|
||||
```
|
||||
|
||||
please check you have Go 1.18+ installed:
|
||||
|
||||
```shell
|
||||
go version
|
||||
```
|
||||
|
|
@ -258,7 +258,7 @@ create files on the fly or process POST/PUT requests.
|
|||
GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be
|
||||
forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler`
|
||||
if specified.
|
||||
It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option.
|
||||
It's also possible to only use the `AssetsHandler` by specifying `nil` as the `Assets` option.
|
||||
|
||||
## Built in Dev Server
|
||||
|
||||
|
|
@ -60,6 +60,6 @@ jobs:
|
|||
This example offers opportunities for various enhancements, including:
|
||||
- Caching dependencies
|
||||
- Code signing
|
||||
- Uploading to platforms like S3, Supbase, etc.
|
||||
- Uploading to platforms like S3, Supabase, etc.
|
||||
- Injecting secrets as environment variables
|
||||
- Utilizing environment variables as build variables (such as version variable extracted from the current Git tag)
|
||||
|
|
@ -45,7 +45,7 @@ The options are as follows:
|
|||
| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` |
|
||||
| noautoinject | Disable all autoinjection of scripts |
|
||||
|
||||
Multiple options may be used provided they are comma seperated.
|
||||
Multiple options may be used provided they are comma separated.
|
||||
|
||||
This code is perfectly valid and operates the same as the autoinjection version:
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ This is an example entitlements file from the [RiftShare](https://github.com/ach
|
|||
```
|
||||
|
||||
**Add the Embedded Provisioning Profile**
|
||||
The Provisioning Profile created above needs to be added to the root of the applicaton. It needs to be named embedded.provisionprofile.
|
||||
The Provisioning Profile created above needs to be added to the root of the application. It needs to be named embedded.provisionprofile.
|
||||
|
||||
#### Build and Sign the App Package
|
||||
|
||||
|
|
@ -81,9 +81,9 @@ wails build -platform darwin/universal -clean
|
|||
|
||||
cp ./embedded.provisionprofile "./build/bin/$APP_NAME.app/Contents"
|
||||
|
||||
codesign --timestamp --options=runtime -s "$APP_CERTIFICATE" -v --entitlements ./build/darwin/entitlements.plist ./build/bin/$APP_NAME.app
|
||||
codesign --timestamp --options=runtime -s "$APP_CERTIFICATE" -v --entitlements ./build/darwin/entitlements.plist "./build/bin/$APP_NAME.app"
|
||||
|
||||
productbuild --sign "$PKG_CERTIFICATE" --component ./build/bin/$APP_NAME.app /Applications ./$APP_NAME.pkg
|
||||
productbuild --sign "$PKG_CERTIFICATE" --component "./build/bin/$APP_NAME.app" /Applications "./$APP_NAME.pkg"
|
||||
```
|
||||
|
||||
#### Upload App Bundle
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# NixOS FontSize Bug
|
||||
|
||||
NixOS/Wayland can cause a bug where the `font-size` css property doesnt affect the rendered page. To fix this add the following to your devShell.
|
||||
NixOS/Wayland can cause a bug where the `font-size` css property doesn't affect the rendered page. To fix this add the following to your devShell.
|
||||
|
||||
```shell
|
||||
shellHook = with pkgs; ''
|
||||
|
|
@ -254,7 +254,7 @@ Now we need to configure some gon config files in our `build/darwin` directory:
|
|||
"bundle_id": "app.myapp",
|
||||
"apple_id": {
|
||||
"username": "my-appleid@email.com",
|
||||
"password": "@env:APPLE_PASSWORD",
|
||||
"password": "your-app-specific-password",
|
||||
"provider": "ABCDE12345"
|
||||
},
|
||||
"sign": {
|
||||
|
|
@ -268,11 +268,13 @@ Here is a brief break down of the above fields:
|
|||
- `source`: The location of your wails binary to be signed
|
||||
- `apple_id`:
|
||||
- `username`: Your Apple ID email address
|
||||
- `password`: Your app-specific password, referenced using Gon's environment variable syntax
|
||||
- `password`: Your app-specific password
|
||||
- `provider`: Your team ID for your App Store Connect account
|
||||
- `sign`:
|
||||
- `application_identity`: Your Apple developer identity
|
||||
|
||||
The (https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool)[deprecated Apple's altool]'s syntax supporting `@env:` is no longer available since Apple has migrated to the new notarytool.
|
||||
|
||||
Your developer identity and team ID can both by found on macOS by running the following command:
|
||||
|
||||
```bash
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# SvelteKit
|
||||
|
||||
This guide will go into:
|
||||
1. Miminal Installation Steps - The steps needed to get a minimum Wails setup working for SvelteKit.
|
||||
1. Minimal Installation Steps - The steps needed to get a minimum Wails setup working for SvelteKit.
|
||||
2. Install Script - Bash script for accomplishing the Minimal Installation Steps with optional Wails branding.
|
||||
3. Important Notes - Issues that can be encountered when using SvelteKit + Wails and fixes.
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ This guide will go into:
|
|||
- Navigate into your newly created myapp folder.
|
||||
- Delete the folder named "frontend"
|
||||
|
||||
##### While in the Wails project root. Use your favorite package manager and install SvelteKit as the new frontend. Follow the prompts.
|
||||
- `npm create svelte@latest frontend`
|
||||
##### While in the Wails project root. Use the Svelte CLI to create a SvelteKit project as the new frontend. Follow the prompts, nothing Wails specific is needed here.
|
||||
- `npx sv create frontend`
|
||||
|
||||
##### Modify wails.json.
|
||||
- Add `"wailsjsdir": "./frontend/src/lib",` Do note that this is where your Go and runtime functions will appear.
|
||||
|
|
@ -108,7 +108,7 @@ wails dev
|
|||
```
|
||||
See https://wails.io/docs/guides/frontend for more information.
|
||||
|
||||
##### Inital data can be loaded and refreshed from +page.ts/+page.js to +page.svelte.
|
||||
##### Initial data can be loaded and refreshed from +page.ts/+page.js to +page.svelte.
|
||||
- +page.ts/+page.js works well with load() https://kit.svelte.dev/docs/load#page-data
|
||||
- invalidateAll() in +page.svelte will call load() from +page.ts/+page.js https://kit.svelte.dev/docs/load#rerunning-load-functions-manual-invalidation.
|
||||
|
||||
|
|
@ -53,6 +53,12 @@ Also, you should specify path to fixed version of webview2 runtime in the `windo
|
|||
Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version
|
||||
mismatch or invalid path to a runtime.
|
||||
|
||||
The downloaded file will be compressed (extension `.cab`), so you must extract it before using it, according to the instructions on the [official site](https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) should run in a terminal the following command to extract the file:
|
||||
|
||||
```
|
||||
expand {path to the package} -F:* {path to the destination folder}
|
||||
```
|
||||
|
||||
## Spawning other programs
|
||||
|
||||
When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window,
|
||||
|
|
@ -69,10 +69,11 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
|
|||
| -nsis | Generate NSIS installer for Windows | |
|
||||
| -o filename | Output filename | |
|
||||
| -obfuscated | Obfuscate the application using [garble](https://github.com/burrowers/garble) | |
|
||||
| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.<br/>arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. |
|
||||
| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.<br/>arch = `GOARCH` environment variable if given else `runtime.GOARCH`. |
|
||||
| -race | Build with Go's race detector | |
|
||||
| -s | Skip building the frontend | |
|
||||
| -skipbindings | Skip bindings generation | |
|
||||
| -skipembedcreate | Skip automatic creation of non-existent embed directories and gitkeep files | |
|
||||
| -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | |
|
||||
| -trimpath | Remove all file system paths from the resulting executable. | |
|
||||
| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | |
|
||||
|
|
@ -103,6 +104,13 @@ There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Ap
|
|||
|
||||
:::
|
||||
|
||||
:::info Set minimal version for MacOS
|
||||
|
||||
You can override default [minimal version](../gettingstarted/installation#supported-platforms) of macOS for your app by providing version via `CGO_CFLAGS` and `CGO_LDFLAGS` environment variables.
|
||||
e.g. `CGO_CFLAGS=-mmacosx-version-min=10.15.0 CGO_LDFLAGS=-mmacosx-version-min=10.15.0 wails build`
|
||||
|
||||
:::
|
||||
|
||||
:::info UPX on Windows
|
||||
|
||||
Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437).
|
||||
|
|
@ -186,6 +194,7 @@ Your system is ready for Wails development!
|
|||
| -extensions | Extensions to trigger rebuilds (comma separated) | go |
|
||||
| -forcebuild | Force build of application | |
|
||||
| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" |
|
||||
| -viteservertimeout | The timeout in seconds for Vite server detection when frontend dev server url is set to 'auto' | 10 |
|
||||
| -ldflags "flags" | Additional ldflags to pass to the compiler | |
|
||||
| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug |
|
||||
| -nocolour | Turn off colour cli output | false |
|
||||
|
|
@ -194,8 +203,9 @@ Your system is ready for Wails development!
|
|||
| -race | Build with Go's race detector | false |
|
||||
| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` |
|
||||
| -s | Skip building the frontend | false |
|
||||
| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | |
|
||||
| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver`, `frontenddevserverurl` and `viteservertimeout` flags in `wails.json` to become the defaults for subsequent invocations. | |
|
||||
| -skipbindings | Skip bindings generation | |
|
||||
| -skipembedcreate | Skip automatic creation of non-existent embed directories and gitkeep files | |
|
||||
| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | |
|
||||
| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 |
|
||||
| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` |
|
||||
|
|
@ -15,15 +15,21 @@ An example of how to create a menu:
|
|||
app := NewApp()
|
||||
|
||||
AppMenu := menu.NewMenu()
|
||||
if runtime.GOOS == "darwin" {
|
||||
AppMenu.Append(menu.AppMenu()) // On macOS platform, this must be done right after `NewMenu()`
|
||||
}
|
||||
FileMenu := AppMenu.AddSubmenu("File")
|
||||
FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile)
|
||||
FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), func(_ *menu.CallbackData) {
|
||||
// do something
|
||||
})
|
||||
FileMenu.AddSeparator()
|
||||
FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
|
||||
runtime.Quit(app.ctx)
|
||||
// `rt` is an alias of "github.com/wailsapp/wails/v2/pkg/runtime" to prevent collision with standard package
|
||||
rt.Quit(app.ctx)
|
||||
})
|
||||
|
||||
if runtime.GOOS == "darwin" {
|
||||
AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut
|
||||
AppMenu.Append(menu.EditMenu()) // On macOS platform, EditMenu should be appended to enable Cmd+C, Cmd+V, Cmd+Z... shortcuts
|
||||
}
|
||||
|
||||
err := wails.Run(&options.App{
|
||||
|
|
@ -73,8 +73,9 @@ func main() {
|
|||
Windows: &windows.Options{
|
||||
WebviewIsTransparent: false,
|
||||
WindowIsTranslucent: false,
|
||||
ContentProtection: false,
|
||||
BackdropType: windows.Mica,
|
||||
DisablePinchZoom: false,
|
||||
DisablePinchZoom: false,
|
||||
DisableWindowIcon: false,
|
||||
DisableFramelessWindowDecorations: false,
|
||||
WebviewUserDataPath: "",
|
||||
|
|
@ -99,7 +100,9 @@ func main() {
|
|||
// OnResume is called when Windows resumes from low power mode
|
||||
OnResume: func(),
|
||||
// Disable GPU hardware acceleration for the webview
|
||||
WebviewGpuDisabled: false,
|
||||
WebviewGpuDisabled: false,
|
||||
// Class name for the window. If empty, 'wailsWindow' will be used.
|
||||
WindowClassName: "MyWindow",
|
||||
},
|
||||
Mac: &mac.Options{
|
||||
TitleBar: &mac.TitleBar{
|
||||
|
|
@ -115,6 +118,7 @@ func main() {
|
|||
Appearance: mac.NSAppearanceNameDarkAqua,
|
||||
WebviewIsTransparent: true,
|
||||
WindowIsTranslucent: false,
|
||||
ContentProtection: false,
|
||||
About: &mac.AboutInfo{
|
||||
Title: "My Application",
|
||||
Message: "© 2021 Me",
|
||||
|
|
@ -130,6 +134,7 @@ func main() {
|
|||
Debug: options.Debug{
|
||||
OpenInspectorOnStartup: false,
|
||||
},
|
||||
BindingsAllowedOrigins: "https://my.topapp,https://*.wails.isgreat",
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
|
@ -322,7 +327,7 @@ If not defined, the result is the following in cases where the Handler would hav
|
|||
|
||||
:::info
|
||||
|
||||
This does not work with vite v5.0.0+ and wails v2 due to changes in vite.
|
||||
This does not work with vite v5.0.0+ and wails v2 due to changes in vite.
|
||||
Changes are planned in v3 to support similar functionality under vite v5.0.0+.
|
||||
If you need this feature, stay with vite v4.0.0+.
|
||||
See [issue 3240](https://github.com/wailsapp/wails/issues/3240) for details
|
||||
|
|
@ -485,21 +490,13 @@ services of Apple and Microsoft.
|
|||
Name: EnableFraudulentWebsiteDetection<br/>
|
||||
Type: `bool`
|
||||
|
||||
### ZoomFactor
|
||||
### DisablePanicRecovery
|
||||
|
||||
Name: ZoomFactor<br/>
|
||||
Type: `float64`
|
||||
DisablePanicRecovery disables the automatic recovery from panics in message processing. By default, Wails will recover from panics in message processing and log the error. If you want to handle panics yourself, set this to `true`.
|
||||
|
||||
This defines the zoom factor for the WebView2. This is the option matching the Edge user activated zoom in or out.
|
||||
|
||||
### IsZoomControlEnabled
|
||||
|
||||
Name: IsZoomControlEnabled<br/>
|
||||
Name: DisablePanicRecovery<br/>
|
||||
Type: `bool`
|
||||
|
||||
This enables the zoom factor to be changed by the user. Please note that the zoom factor can be set in the options while
|
||||
disallowing the user to change it at runtime (f.e. for a kiosk application or similar).
|
||||
|
||||
### Bind
|
||||
|
||||
A slice of struct instances defining methods that need to be bound to the frontend.
|
||||
|
|
@ -619,6 +616,17 @@ by Windows. To configure this, use the [BackdropType](#BackdropType) option.
|
|||
Name: WindowIsTranslucent<br/>
|
||||
Type: `bool`
|
||||
|
||||
#### ContentProtection
|
||||
|
||||
Prevents window contents from being captured by other applications.
|
||||
|
||||
On Windows it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`.
|
||||
For Windows 10 version 2004 and later the window will be completely removed from capture.
|
||||
Older Windows versions will call SetWindowDisplayAffinity with `WDA_MONITOR`, capturing a black window.
|
||||
|
||||
Name: ContentProtection<br/>
|
||||
Type: `bool`
|
||||
|
||||
#### BackdropType
|
||||
|
||||
:::note
|
||||
|
|
@ -642,6 +650,21 @@ The value can be one of the following:
|
|||
| Mica | Use [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) effect |
|
||||
| Tabbed | Use Tabbed. This is a backdrop that is similar to Mica. |
|
||||
|
||||
#### ZoomFactor
|
||||
|
||||
Name: ZoomFactor<br/>
|
||||
Type: `float64`
|
||||
|
||||
This defines the zoom factor for the WebView2. This is the option matching the Edge user activated zoom in or out.
|
||||
|
||||
#### IsZoomControlEnabled
|
||||
|
||||
Name: IsZoomControlEnabled<br/>
|
||||
Type: `bool`
|
||||
|
||||
This enables the zoom factor to be changed by the user. Please note that the zoom factor can be set in the options while
|
||||
disallowing the user to change it at runtime (f.e. for a kiosk application or similar).
|
||||
|
||||
#### DisablePinchZoom
|
||||
|
||||
Setting this to `true` will disable pinch zoom gestures.
|
||||
|
|
@ -804,6 +827,13 @@ Setting this to `true` will enable swipe gestures for the webview.
|
|||
Name: EnableSwipeGestures<br/>
|
||||
Type: `bool`
|
||||
|
||||
#### WindowClassName
|
||||
|
||||
Class name for the window. If empty, 'wailsWindow' will be used.
|
||||
|
||||
Name: WindowClassName<br/>
|
||||
Type: `string`
|
||||
|
||||
### Mac
|
||||
|
||||
This defines [Mac specific options](#mac).
|
||||
|
|
@ -907,6 +937,15 @@ with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applic
|
|||
Name: WindowIsTranslucent<br/>
|
||||
Type: `bool`
|
||||
|
||||
#### ContentProtection
|
||||
|
||||
Prevents window contents from being captured by other applications.
|
||||
|
||||
On MacOS it sets the NSWindow's sharingType to NSWindowSharingNone, removing the window from capture entirely.
|
||||
|
||||
Name: ContentProtection<br/>
|
||||
Type: `bool`
|
||||
|
||||
#### OnFileOpen
|
||||
|
||||
Callback that is called when a file is opened with the application.
|
||||
|
|
@ -1091,3 +1130,12 @@ Setting this to `true` will open the WebInspector on startup of the application.
|
|||
|
||||
Name: OpenInspectorOnStartup<br/>
|
||||
Type: `bool`
|
||||
|
||||
### BindingsAllowedOrigins
|
||||
|
||||
Comma-separated list of additional allowed origins for JS ↔ Go bindings.
|
||||
Supports “*” wildcards in hostnames for subdomain matching.
|
||||
Example: `"https://*.myapp.com, https://example.com"`
|
||||
|
||||
Name: BindingsAllowedOrigins<br/>
|
||||
Type: `string`<br/>
|
||||
|
|
@ -18,6 +18,8 @@ The project config resides in the `wails.json` file in the project directory. Th
|
|||
"reloaddirs": "",
|
||||
// The directory where the build files reside. Defaults to 'build'
|
||||
"build:dir": "",
|
||||
// Additional tags to include at build time regardless of environment
|
||||
"build:tags": "",
|
||||
// Relative path to the frontend directory. Defaults to 'frontend'
|
||||
"frontend:dir": "",
|
||||
// The command to install node dependencies, run in the frontend directory - often `npm install`
|
||||
|
|
@ -34,6 +36,8 @@ The project config resides in the `wails.json` file in the project directory. Th
|
|||
"frontend:dev:watcher": "",
|
||||
// URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output
|
||||
"frontend:dev:serverUrl": "",
|
||||
// The timeout in seconds for Vite server detection when frontend:dev:serverUrl is set to 'auto'. Default: 10
|
||||
"viteServerTimeout": 10,
|
||||
// Relative path to the directory that the auto-generated JS modules will be created
|
||||
"wailsjsdir": "",
|
||||
// The name of the binary
|
||||
|
|
@ -124,7 +128,7 @@ The project config resides in the `wails.json` file in the project directory. Th
|
|||
|
||||
This file is read by the Wails CLI when running `wails build` or `wails dev`.
|
||||
|
||||
The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config
|
||||
The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver`, `frontenddevserverurl` and `viteservertimeout` flags in `wails build/dev` will update the project config
|
||||
and thus become defaults for subsequent runs.
|
||||
|
||||
The JSON Schema for this file is located [here](https://wails.io/schemas/config.v2.json).
|
||||
|
|
@ -18,7 +18,7 @@ JS: `EventsOn(eventName string, callback function(optionalData?: any)): () => vo
|
|||
|
||||
### EventsOff
|
||||
|
||||
This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`.
|
||||
This method unregisters the listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`.
|
||||
|
||||
Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`<br/>
|
||||
JS: `EventsOff(eventName string, ...additionalEventNames)`
|
||||
|
|
@ -235,7 +235,7 @@ JS: `WindowSetBackgroundColour(R, G, B, A)`
|
|||
|
||||
### WindowPrint
|
||||
|
||||
Opens tha native print dialog.
|
||||
Opens the native print dialog.
|
||||
|
||||
Go: `WindowPrint(ctx context.Context)`<br/>
|
||||
JS: `WindowPrint()`
|
||||
Loading…
Add table
Add a link
Reference in a new issue