mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
@@ -29,7 +29,7 @@ Example:
|
||||
This will generate a a project called "test" in the "mytestproject" directory, initialise git,
|
||||
generate vscode project files and do so silently.
|
||||
|
||||
More information on using IDEs with Wails can be found [here](/docs/guides/ides).
|
||||
More information on using IDEs with Wails can be found [here](../guides/ides.mdx).
|
||||
|
||||
### Remote Templates
|
||||
|
||||
@@ -38,7 +38,7 @@ Remote templates (hosted on GitHub) are supported and can be installed by using
|
||||
Example:
|
||||
`wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]`
|
||||
|
||||
A list of community maintained templates can be found [here](/docs/community/templates)
|
||||
A list of community maintained templates can be found [here](../community/templates.mdx)
|
||||
|
||||
:::warning Attention
|
||||
|
||||
@@ -54,7 +54,7 @@ A list of community maintained templates can be found [here](/docs/community/tem
|
||||
|
||||
| Flag | Description | Default |
|
||||
| :------------------- | :-------------------------------------- | :------------------------- |
|
||||
| -platform | Build for the given (comma delimited) [platforms](/docs/reference/cli#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | runtime.GOOS/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. | runtime.GOOS/runtime.GOARCH |
|
||||
| -clean | Cleans the `build/bin` directory | |
|
||||
| -compiler "compiler"| Use a different go compiler to build, eg go1.15beta1 | go |
|
||||
| -ldflags "flags" | Additional ldflags to pass to the compiler | |
|
||||
@@ -70,9 +70,9 @@ A list of community maintained templates can be found [here](/docs/community/tem
|
||||
| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | |
|
||||
| -debug | Retains debug information in the application | false |
|
||||
|
||||
For a detailed description of the `webview2` flag, please refer to the [Windows](/docs/guides/windows) Guide.
|
||||
For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide.
|
||||
|
||||
If you prefer to build using standard Go tooling, please consult the [Manual Builds](/docs/guides/manual-builds)
|
||||
If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx)
|
||||
guide.
|
||||
|
||||
Example:
|
||||
@@ -182,12 +182,12 @@ Example:
|
||||
|
||||
This command will do the following:
|
||||
|
||||
- Build the application and run it (more details [here](/docs/guides/manual-builds)
|
||||
- Build the application and run it (more details [here](../guides/manual-builds.mdx)
|
||||
- Generate the Wails JS modules in `./frontend/src`
|
||||
- Watch for updates to files in `./frontend/dist` and reload on any change
|
||||
- Open a browser and connect to the application
|
||||
|
||||
There is more information on using this feature with existing framework scripts [here](/docs/guides/application-development#live-reloading).
|
||||
There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading).
|
||||
|
||||
## generate
|
||||
|
||||
@@ -201,7 +201,7 @@ it may be used for generating projects.
|
||||
| -name | The template name (Mandatory) |
|
||||
| -frontend "path" | Path to frontend project to use in template |
|
||||
|
||||
For more details on creating templates, consult the [Templates guide](/docs/guides/templates).
|
||||
For more details on creating templates, consult the [Templates guide](../guides/templates.mdx).
|
||||
|
||||
## update
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ sidebar_position: 4
|
||||
# Menus
|
||||
|
||||
It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and
|
||||
setting the [`Menu`](/docs/reference/options#menu) option, or by calling the runtime method [MenuSetApplicationMenu](/docs/reference/runtime/menu#menusetapplicationmenu).
|
||||
setting the [`Menu`](../reference/options.mdx#menu) option, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu).
|
||||
|
||||
It is also possible to dynamically update the menu, by updating the menu struct and calling
|
||||
[MenuUpdateApplicationMenu](/docs/reference/runtime/menu#menuupdateapplicationmenu).
|
||||
[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu).
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ Name: Frameless
|
||||
Type: bool
|
||||
|
||||
When set to `true`, the window will have no borders or title bar.
|
||||
Also see [Frameless Windows](/docs/guides/frameless).
|
||||
Also see [Frameless Windows](../guides/frameless.mdx).
|
||||
|
||||
### MinWidth
|
||||
|
||||
@@ -181,7 +181,7 @@ Name: StartHidden
|
||||
|
||||
Type: bool
|
||||
|
||||
When set to `true`, the application will be hidden until [WindowShow](/docs/reference/runtime/window#WindowShow)
|
||||
When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow)
|
||||
is called.
|
||||
|
||||
### HideWindowOnClose
|
||||
@@ -225,7 +225,7 @@ Name: Menu
|
||||
|
||||
Type: \*menu.Menu
|
||||
|
||||
The menu to be used by the application. More details about Menus in the [Menu Reference](/docs/reference/runtime/menu).
|
||||
The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx).
|
||||
|
||||
NOTE: On Mac, if no menu is specified, a default menu will be created.
|
||||
|
||||
@@ -237,7 +237,7 @@ Type: logger.Logger
|
||||
|
||||
Default: Logger to Stdout
|
||||
|
||||
The logger to be used by the application. More details about logging in the [Log Reference](/docs/reference/runtime/log).
|
||||
The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx).
|
||||
|
||||
### LogLevel
|
||||
|
||||
@@ -247,7 +247,7 @@ Type: logger.LogLevel
|
||||
|
||||
Default: `Info` in dev mode, `Error` in production mode
|
||||
|
||||
The default log level. More details about logging in the [Log Reference](/docs/reference/runtime/log).
|
||||
The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx).
|
||||
|
||||
### OnStartup
|
||||
|
||||
|
||||
@@ -8,15 +8,15 @@ The runtime is a library that provides utility methods for your application. The
|
||||
and the aim is to try and keep them at parity where possible.
|
||||
|
||||
The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package
|
||||
take a context as the first parameter. This context should be obtained from the [OnStartup](/docs/reference/options#onstartup)
|
||||
or [OnDomReady](/docs/reference/options#ondomready) hooks.
|
||||
take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup)
|
||||
or [OnDomReady](../options.mdx#ondomready) hooks.
|
||||
|
||||
:::info Note
|
||||
|
||||
Whilst the context will be provided to the
|
||||
[OnStartup](/docs/reference/options#onstartup) method, there's no guarantee the runtime will work in this method as
|
||||
[OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as
|
||||
the window is initialising in a different thread. If
|
||||
you wish to call runtime methods at startup, use [OnDomReady](/docs/reference/options#ondomready).
|
||||
you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready).
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ Sets the log level. In Javascript, the number relates to the following log level
|
||||
|
||||
## Using a Custom Logger
|
||||
|
||||
A custom logger may be used by providing it using the [Logger](/docs/reference/options#logger)
|
||||
A custom logger may be used by providing it using the [Logger](../options.mdx#logger)
|
||||
application option. The only requirement is that the logger implements the `logger.Logger` interface
|
||||
defined in `github.com/wailsapp/wails/v2/pkg/logger`:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ These methods are related to the application menu.
|
||||
### MenuSetApplicationMenu
|
||||
Go Signature: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)`
|
||||
|
||||
Sets the application menu to the given [menu](/docs/reference/menus) .
|
||||
Sets the application menu to the given [menu](../menus.mdx) .
|
||||
|
||||
### MenuUpdateApplicationMenu
|
||||
Go Signature: `MenuUpdateApplicationMenu(ctx context.Context)`
|
||||
|
||||
Reference in New Issue
Block a user