forked from wailsapp/wails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wailsapp:v3-alpha' into v3-alpha
- Loading branch information
Showing
41 changed files
with
2,484 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Runtime | ||
|
||
The Wails runtime is the standard library for Wails applications. It provides a number of features that may | ||
be used in your applications, including: | ||
|
||
- Window management | ||
- Dialogs | ||
- Browser integration | ||
- Clipboard | ||
- Frameless dragging | ||
- Tray icons | ||
- Menu management | ||
- System information | ||
- Events | ||
- Calling Go code | ||
- Context Menus | ||
- Screens | ||
- WML (Wails Markup Language) | ||
|
||
The runtime is required for integration between Go and the frontend. There are 2 ways to integrate the runtime: | ||
|
||
- Using the `@wailsio/runtime` package | ||
- Using a pre-built version of the runtime | ||
|
||
## Using the `@wailsio/runtime` package | ||
|
||
The `@wailsio/runtime` package is a JavaScript package that provides access to the Wails runtime. It is used in by all | ||
the standard templates and is the recommended way to integrate the runtime into your application. By using the package, | ||
you will only include the parts of the runtime that you use. | ||
|
||
The package is available on npm and can be installed using: | ||
|
||
```shell | ||
npm install --save @wailsio/runtime | ||
``` | ||
|
||
## Using a pre-built version of the runtime | ||
|
||
Some projects will not use a Javascript bundler and may prefer to use a pre-built version of the runtime. This is | ||
the default for the examples in `v3/examples`. The pre-built version of the runtime can be generated using the | ||
following command: | ||
|
||
```shell | ||
wails3 generate runtime | ||
``` | ||
|
||
This will generate a `runtime.js` (and `runtime.debug.js`) file in the current directory. | ||
This file can be used by your application by adding it to your assets directory (normally `frontend/dist`) and then including it in your HTML: | ||
|
||
```html | ||
<html> | ||
<head> | ||
<script src="/runtime.js"></script> | ||
</head> | ||
<!--- ... --> | ||
</> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
" ",Mac,Windows,Linux | ||
Standard Executable," "," "," " | ||
macOS Application Bundle," ",:material-cancel:,:material-cancel: | ||
NSIS," "," "," " | ||
macOS DMG," ",:material-cancel:,:material-cancel: | ||
Standard Executable,:material-check-bold:,:material-check-bold:,:material-check-bold: | ||
macOS Application Bundle,:material-check-bold:,:material-cancel:,:material-cancel: | ||
NSIS,:material-cancel:,:material-check-bold:,:material-cancel: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
padding: 20px; | ||
} | ||
</style> | ||
<script src="runtime.js"></script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.