Skip to content

Commit 773dca7

Browse files
committed
Single Instance feature.
Fix missing events on darwin.
1 parent 7cee957 commit 773dca7

23 files changed

+1313
-252
lines changed

docs/src/content/docs/changelog.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
- New `wails3 generate webview2bootstrapper` command by [@leaanthony](https://github.com/leaanthony)
3434
- Added `init()` method in runtime to allow manual initialisation of the runtime by [@leaanthony](https://github.com/leaanthony)
3535
- Added `WindowDidMoveDebounceMS` option to Window's WindowOptions by [@leaanthony](https://github.com/leaanthony)
36+
- Added Single Instance feature by [@leaanthony](https://github.com/leaanthony). Based on the [v2 PR](https://github.com/wailsapp/wails/pull/2951) by @APshenkin.
3637

3738
### Fixed
3839

docs/src/content/docs/guides/cli.mdx

+105-107
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ sidebar:
55
order: 1
66
---
77

8-
import { Tabs, TabItem } from "@astrojs/starlight/components";
9-
108
The Wails CLI provides a comprehensive set of commands to help you develop, build, and maintain your Wails applications.
119

1210
## Core Commands
@@ -133,21 +131,21 @@ wails3 generate bindings [flags] [patterns...]
133131
```
134132

135133
#### Flags
136-
| Flag | Description | Default |
137-
|------|-------------|---------|
138-
| `-f` | Additional Go build flags | |
139-
| `-d` | Output directory | `frontend/bindings` |
140-
| `-models` | Models filename | `models` |
141-
| `-internal` | Internal filename | `internal` |
142-
| `-index` | Index filename | `index` |
143-
| `-ts` | Generate TypeScript | `false` |
144-
| `-i` | Use TS interfaces | `false` |
145-
| `-b` | Use bundled runtime | `false` |
146-
| `-names` | Use names instead of IDs | `false` |
147-
| `-noindex` | Skip index files | `false` |
148-
| `-dry` | Dry run | `false` |
149-
| `-silent` | Silent mode | `false` |
150-
| `-v` | Debug output | `false` |
134+
| Flag | Description | Default |
135+
|-------------|---------------------------|---------------------|
136+
| `-f` | Additional Go build flags | |
137+
| `-d` | Output directory | `frontend/bindings` |
138+
| `-models` | Models filename | `models` |
139+
| `-internal` | Internal filename | `internal` |
140+
| `-index` | Index filename | `index` |
141+
| `-ts` | Generate TypeScript | `false` |
142+
| `-i` | Use TS interfaces | `false` |
143+
| `-b` | Use bundled runtime | `false` |
144+
| `-names` | Use names instead of IDs | `false` |
145+
| `-noindex` | Skip index files | `false` |
146+
| `-dry` | Dry run | `false` |
147+
| `-silent` | Silent mode | `false` |
148+
| `-v` | Debug output | `false` |
151149

152150
### `generate build-assets`
153151
Generates build assets for your application.
@@ -157,18 +155,18 @@ wails3 generate build-assets [flags]
157155
```
158156

159157
#### Flags
160-
| Flag | Description | Default |
161-
|------|-------------|---------|
162-
| `-name` | Project name | |
163-
| `-dir` | Output directory | `build` |
164-
| `-silent` | Suppress output | `false` |
165-
| `-company` | Company name | |
166-
| `-productname` | Product name | |
167-
| `-description` | Product description | |
168-
| `-version` | Product version | |
169-
| `-identifier` | Product identifier | `com.wails.[name]` |
170-
| `-copyright` | Copyright notice | |
171-
| `-comments` | File comments | |
158+
| Flag | Description | Default |
159+
|----------------|---------------------|--------------------|
160+
| `-name` | Project name | |
161+
| `-dir` | Output directory | `build` |
162+
| `-silent` | Suppress output | `false` |
163+
| `-company` | Company name | |
164+
| `-productname` | Product name | |
165+
| `-description` | Product description | |
166+
| `-version` | Product version | |
167+
| `-identifier` | Product identifier | `com.wails.[name]` |
168+
| `-copyright` | Copyright notice | |
169+
| `-comments` | File comments | |
172170

173171
### `generate icons`
174172
Generates application icons.
@@ -178,13 +176,13 @@ wails3 generate icons [flags]
178176
```
179177

180178
#### Flags
181-
| Flag | Description | Default |
182-
|------|-------------|---------|
183-
| `-input` | Input PNG file | Required |
184-
| `-windows` | Windows output filename | |
185-
| `-mac` | macOS output filename | |
186-
| `-sizes` | Icon sizes (comma-separated) | `256,128,64,48,32,16` |
187-
| `-example` | Generate example icon | `false` |
179+
| Flag | Description | Default |
180+
|------------|------------------------------|-----------------------|
181+
| `-input` | Input PNG file | Required |
182+
| `-windows` | Windows output filename | |
183+
| `-mac` | macOS output filename | |
184+
| `-sizes` | Icon sizes (comma-separated) | `256,128,64,48,32,16` |
185+
| `-example` | Generate example icon | `false` |
188186

189187
### `generate syso`
190188
Generates Windows .syso file.
@@ -194,13 +192,13 @@ wails3 generate syso [flags]
194192
```
195193

196194
#### Flags
197-
| Flag | Description | Default |
198-
|------|-------------|---------|
199-
| `-manifest` | Path to manifest file | Required |
200-
| `-icon` | Path to icon file | Required |
201-
| `-info` | Path to version info file | |
202-
| `-arch` | Target architecture | Current GOARCH |
203-
| `-out` | Output filename | `rsrc_windows_[arch].syso` |
195+
| Flag | Description | Default |
196+
|-------------|---------------------------|----------------------------|
197+
| `-manifest` | Path to manifest file | Required |
198+
| `-icon` | Path to icon file | Required |
199+
| `-info` | Path to version info file | |
200+
| `-arch` | Target architecture | Current GOARCH |
201+
| `-out` | Output filename | `rsrc_windows_[arch].syso` |
204202

205203
### `generate .desktop`
206204
Generates a Linux .desktop file.
@@ -210,20 +208,20 @@ wails3 generate .desktop [flags]
210208
```
211209

212210
#### Flags
213-
| Flag | Description | Default |
214-
|------|-------------|---------|
215-
| `-name` | Application name | Required |
216-
| `-exec` | Executable path | Required |
217-
| `-icon` | Icon path | |
218-
| `-categories` | Application categories | `Utility` |
219-
| `-comment` | Application comment | |
220-
| `-terminal` | Run in terminal | `false` |
221-
| `-keywords` | Search keywords | |
222-
| `-version` | Application version | |
223-
| `-genericname` | Generic name | |
224-
| `-startupnotify` | Show startup notification | `false` |
225-
| `-mimetype` | Supported MIME types | |
226-
| `-output` | Output filename | `[name].desktop` |
211+
| Flag | Description | Default |
212+
|------------------|---------------------------|------------------|
213+
| `-name` | Application name | Required |
214+
| `-exec` | Executable path | Required |
215+
| `-icon` | Icon path | |
216+
| `-categories` | Application categories | `Utility` |
217+
| `-comment` | Application comment | |
218+
| `-terminal` | Run in terminal | `false` |
219+
| `-keywords` | Search keywords | |
220+
| `-version` | Application version | |
221+
| `-genericname` | Generic name | |
222+
| `-startupnotify` | Show startup notification | `false` |
223+
| `-mimetype` | Supported MIME types | |
224+
| `-output` | Output filename | `[name].desktop` |
227225

228226
### `generate runtime`
229227
Generates the pre-built version of the runtime.
@@ -247,13 +245,13 @@ wails3 generate appimage [flags]
247245
```
248246

249247
#### Flags
250-
| Flag | Description | Default |
251-
|------|-------------|---------|
252-
| `-binary` | Path to binary | Required |
253-
| `-icon` | Path to icon file | Required |
254-
| `-desktop` | Path to .desktop file | Required |
255-
| `-builddir` | Build directory | Temp directory |
256-
| `-output` | Output directory | `.` |
248+
| Flag | Description | Default |
249+
|-------------|-----------------------|----------------|
250+
| `-binary` | Path to binary | Required |
251+
| `-icon` | Path to icon file | Required |
252+
| `-desktop` | Path to .desktop file | Required |
253+
| `-builddir` | Build directory | Temp directory |
254+
| `-output` | Output directory | `.` |
257255

258256
Base command: `wails3 service`
259257

@@ -269,18 +267,18 @@ wails3 service init [flags]
269267
```
270268

271269
#### Flags
272-
| Flag | Description | Default |
273-
|------|-------------|---------|
274-
| `-n` | Service name | `example_service` |
270+
| Flag | Description | Default |
271+
|------|---------------------|-------------------|
272+
| `-n` | Service name | `example_service` |
275273
| `-d` | Service description | `Example service` |
276-
| `-p` | Package name | |
277-
| `-o` | Output directory | `.` |
278-
| `-q` | Suppress output | `false` |
279-
| `-a` | Author name | |
280-
| `-v` | Version | |
281-
| `-w` | Website URL | |
282-
| `-r` | Repository URL | |
283-
| `-l` | License | |
274+
| `-p` | Package name | |
275+
| `-o` | Output directory | `.` |
276+
| `-q` | Suppress output | `false` |
277+
| `-a` | Author name | |
278+
| `-v` | Version | |
279+
| `-w` | Website URL | |
280+
| `-r` | Repository URL | |
281+
| `-l` | License | |
284282

285283
Base command: `wails3 tool`
286284

@@ -296,9 +294,9 @@ wails3 tool checkport [flags]
296294
```
297295

298296
#### Flags
299-
| Flag | Description | Default |
300-
|------|-------------|---------|
301-
| `-port` | Port to check | `9245` |
297+
| Flag | Description | Default |
298+
|---------|---------------|-------------|
299+
| `-port` | Port to check | `9245` |
302300
| `-host` | Host to check | `localhost` |
303301

304302
### `tool watcher`
@@ -309,11 +307,11 @@ wails3 tool watcher [flags]
309307
```
310308

311309
#### Flags
312-
| Flag | Description | Default |
313-
|------|-------------|---------|
314-
| `-config` | Config file path | `./build/config.yml` |
315-
| `-ignore` | Patterns to ignore | |
316-
| `-include` | Patterns to include | |
310+
| Flag | Description | Default |
311+
|------------|---------------------|----------------------|
312+
| `-config` | Config file path | `./build/config.yml` |
313+
| `-ignore` | Patterns to ignore | |
314+
| `-include` | Patterns to include | |
317315

318316
### `tool cp`
319317
Copies files.
@@ -337,20 +335,20 @@ wails3 tool package [flags]
337335
```
338336

339337
#### Flags
340-
| Flag | Description | Default |
341-
|------|-------------|---------|
342-
| `-format` | Package format (deb, rpm, archlinux) | `deb` |
343-
| `-name` | Executable name | Required |
344-
| `-config` | Config file path | Required |
345-
| `-out` | Output directory | `.` |
338+
| Flag | Description | Default |
339+
|-----------|--------------------------------------|----------|
340+
| `-format` | Package format (deb, rpm, archlinux) | `deb` |
341+
| `-name` | Executable name | Required |
342+
| `-config` | Config file path | Required |
343+
| `-out` | Output directory | `.` |
346344

347345
#### Flags
348-
| Flag | Description | Default |
349-
|------|-------------|---------|
350-
| `-format` | Package format (deb, rpm, archlinux) | `deb` |
351-
| `-name` | Executable name | `myapp` |
352-
| `-config` | Config file path | |
353-
| `-out` | Output directory | `.` |
346+
| Flag | Description | Default |
347+
|-----------|--------------------------------------|---------|
348+
| `-format` | Package format (deb, rpm, archlinux) | `deb` |
349+
| `-name` | Executable name | `myapp` |
350+
| `-config` | Config file path | |
351+
| `-out` | Output directory | `.` |
354352

355353
Base command: `wails3 update`
356354

@@ -366,18 +364,18 @@ wails3 update build-assets [flags]
366364
```
367365

368366
#### Flags
369-
| Flag | Description | Default |
370-
|------|-------------|---------|
371-
| `-config` | Config file path | |
372-
| `-dir` | Output directory | `build` |
373-
| `-silent` | Suppress output | `false` |
374-
| `-company` | Company name | |
375-
| `-productname` | Product name | |
376-
| `-description` | Product description | |
377-
| `-version` | Product version | |
378-
| `-identifier` | Product identifier | |
379-
| `-copyright` | Copyright notice | |
380-
| `-comments` | File comments | |
367+
| Flag | Description | Default |
368+
|----------------|---------------------|---------|
369+
| `-config` | Config file path | |
370+
| `-dir` | Output directory | `build` |
371+
| `-silent` | Suppress output | `false` |
372+
| `-company` | Company name | |
373+
| `-productname` | Product name | |
374+
| `-description` | Product description | |
375+
| `-version` | Product version | |
376+
| `-identifier` | Product identifier | |
377+
| `-copyright` | Copyright notice | |
378+
| `-comments` | File comments | |
381379

382380
Base command: `wails3`
383381

0 commit comments

Comments
 (0)