mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
32 Commits
v2.0.0-beta.38
...
exp
| Author | SHA1 | Date | |
|---|---|---|---|
| a11655c452 | |||
| 11cbfb68f1 | |||
| 7a63464997 | |||
| bf2d83d939 | |||
| 1cd31573a9 | |||
| 39cebffa87 | |||
| f4b4e4cdb8 | |||
| 73f5cc3b92 | |||
| c48ad9be67 | |||
| 4726b72708 | |||
| 4c312b155d | |||
| cd35536a79 | |||
| 91d6c23c71 | |||
| 59f84b8905 | |||
| a1a06a6198 | |||
| 5292721517 | |||
| 41d1bf3d10 | |||
| 3e42d2da05 | |||
| 7141c972fd | |||
| 7cc3652a39 | |||
| 95082336cd | |||
| 319d59296e | |||
| 368733b7cc | |||
| ee5ca1a84a | |||
| 1947a9a17a | |||
| 13fb5352d8 | |||
| 58b6e4c335 | |||
| ae0933c82a | |||
| c1d4aeb3cd | |||
| 1830c64c79 | |||
| ee50170374 | |||
| 3f82ceabba |
@@ -11,7 +11,9 @@ body:
|
||||
Before submitting this issue, please do the following:
|
||||
- Do a web search for your error. This usually leads to a much better understanding of the issue.
|
||||
- Prove that the error is indeed a Wails bug and not an application bug, with a specific set of steps to reproduce.
|
||||
- Search both the issue tracker (even closed issues) and discussion forums.
|
||||
- Search the issue tracker using [this link](https://github.com/wailsapp/wails/issues?q=is%3Aissue+).
|
||||
- Search the [discussion forums](https://github.com/wailsapp/wails/discussions?discussions_q=type+your+issue+here).
|
||||
- Read the [Troubleshooting Guide](https://wails.io/docs/next/guides/troubleshooting).
|
||||
- Try to fix it yourself. Keep a list of things you have done to fix the problem.
|
||||
|
||||
If after doing all the above, the problem remains, please continue with this ticket providing *all* the information requested.
|
||||
|
||||
@@ -32,3 +32,4 @@ v2/test/kitchensink/frontend/package.json.md5
|
||||
!v2/internal/ffenestri/windows/x64/WebView2Loader.dll
|
||||
.idea/
|
||||
v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
|
||||
v2/internal/frontend/desktop/darwin/test.xcodeproj
|
||||
@@ -197,6 +197,9 @@ This project is supported by these kind people / companies:
|
||||
<a href="https://github.com/Bironou" style="width:55px">
|
||||
<img src="https://github.com/Bironou.png?size=55" width="55"/>
|
||||
</a>
|
||||
<a href="https://github.com/Shackelford-Arden" style="width:55px">
|
||||
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
|
||||
</a>
|
||||
|
||||
<span id="nav-6"></span>
|
||||
|
||||
|
||||
@@ -207,6 +207,9 @@ Wails v2 已针对所有 3 个平台发布了 Beta 版。如果您有兴趣尝
|
||||
<a href="https://github.com/Bironou" style="width:55px">
|
||||
<img src="https://github.com/Bironou.png?size=55" width="55"/>
|
||||
</a>
|
||||
<a href="https://github.com/Shackelford-Arden" style="width:55px">
|
||||
<img src="https://github.com/Shackelford-Arden.png?size=55" width="55"/>
|
||||
</a>
|
||||
<span id="nav-6"></span>
|
||||
|
||||
## 安装
|
||||
|
||||
@@ -102,6 +102,9 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
||||
raceDetector := false
|
||||
command.BoolFlag("race", "Build with Go's race detector", &raceDetector)
|
||||
|
||||
windowsConsole := false
|
||||
command.BoolFlag("windowsconsole", "Keep the console when building for Windows", &windowsConsole)
|
||||
|
||||
command.Action(func() error {
|
||||
|
||||
quiet := verbosity == 0
|
||||
@@ -184,6 +187,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
||||
WebView2Strategy: wv2rtstrategy,
|
||||
TrimPath: trimpath,
|
||||
RaceDetector: raceDetector,
|
||||
WindowsConsole: windowsConsole,
|
||||
}
|
||||
|
||||
// Start a new tabwriter
|
||||
|
||||
@@ -2,6 +2,7 @@ package dev
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@@ -36,16 +37,25 @@ import (
|
||||
)
|
||||
|
||||
func LogGreen(message string, args ...interface{}) {
|
||||
if len(message) == 0 {
|
||||
return
|
||||
}
|
||||
text := fmt.Sprintf(message, args...)
|
||||
println(colour.Green(text))
|
||||
}
|
||||
|
||||
func LogRed(message string, args ...interface{}) {
|
||||
if len(message) == 0 {
|
||||
return
|
||||
}
|
||||
text := fmt.Sprintf(message, args...)
|
||||
println(colour.Red(text))
|
||||
}
|
||||
|
||||
func LogDarkYellow(message string, args ...interface{}) {
|
||||
if len(message) == 0 {
|
||||
return
|
||||
}
|
||||
text := fmt.Sprintf(message, args...)
|
||||
println(colour.DarkYellow(text))
|
||||
}
|
||||
@@ -103,7 +113,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
command.IntFlag("debounce", "The amount of time to wait to trigger a reload on change", &flags.debounceMS)
|
||||
command.StringFlag("devserver", "The address of the wails dev server", &flags.devServer)
|
||||
command.StringFlag("frontenddevserverurl", "The url of the external frontend dev server to use", &flags.frontendDevServerURL)
|
||||
command.StringFlag("appargs", "arguments to pass to the underlying app (quoted and space searated)", &flags.appargs)
|
||||
command.StringFlag("appargs", "arguments to pass to the underlying app (quoted and space separated)", &flags.appargs)
|
||||
command.BoolFlag("save", "Save given flags as defaults", &flags.saveConfig)
|
||||
command.BoolFlag("race", "Build with Go's race detector", &flags.raceDetector)
|
||||
|
||||
@@ -168,8 +178,6 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
buildOptions.Logger = logger
|
||||
buildOptions.UserTags = internal.ParseUserTags(flags.tags)
|
||||
|
||||
var debugBinaryProcess *process.Process = nil
|
||||
|
||||
// Setup signal handler
|
||||
quitChannel := make(chan os.Signal, 1)
|
||||
signal.Notify(quitChannel, os.Interrupt, os.Kill, syscall.SIGTERM)
|
||||
@@ -177,19 +185,23 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
// Do initial build
|
||||
logger.Println("Building application for development...")
|
||||
newProcess, appBinary, err := restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
|
||||
debugBinaryProcess, appBinary, err := restartApp(buildOptions, nil, flags, exitCodeChannel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if newProcess != nil {
|
||||
debugBinaryProcess = newProcess
|
||||
}
|
||||
defer func() {
|
||||
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
|
||||
LogDarkYellow("Unable to kill process and cleanup binary: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
// frontend:dev:watcher command.
|
||||
if command := projectConfig.DevWatcherCommand; command != "" {
|
||||
var devCommandWaitGroup sync.WaitGroup
|
||||
closer := runFrontendDevWatcherCommand(cwd, command, &devCommandWaitGroup)
|
||||
defer closer(&devCommandWaitGroup)
|
||||
closer, err := runFrontendDevWatcherCommand(cwd, command)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closer()
|
||||
}
|
||||
|
||||
// open browser
|
||||
@@ -221,22 +233,17 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
LogGreen("Using reload debounce setting of %d milliseconds", flags.debounceMS)
|
||||
|
||||
// Watch for changes and trigger restartApp()
|
||||
doWatcherLoop(buildOptions, debugBinaryProcess, flags, watcher, exitCodeChannel, quitChannel, devServerURL)
|
||||
debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, flags, watcher, exitCodeChannel, quitChannel, devServerURL)
|
||||
|
||||
// Kill the current program if running
|
||||
if debugBinaryProcess != nil {
|
||||
err := debugBinaryProcess.Kill()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Remove dev binary
|
||||
err = os.Remove(appBinary)
|
||||
if err != nil {
|
||||
// Kill the current program if running and remove dev binary
|
||||
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Reset the process and the binary so the defer knows about it and is a nop.
|
||||
debugBinaryProcess = nil
|
||||
appBinary = ""
|
||||
|
||||
LogGreen("Development mode exited")
|
||||
|
||||
return nil
|
||||
@@ -244,6 +251,22 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func killProcessAndCleanupBinary(process *process.Process, binary string) error {
|
||||
if process != nil && process.Running {
|
||||
if err := process.Kill(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if binary != "" {
|
||||
err := os.Remove(binary)
|
||||
if err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func syncGoModVersion(cwd string) error {
|
||||
gomodFilename := filepath.Join(cwd, "go.mod")
|
||||
gomodData, err := os.ReadFile(gomodFilename)
|
||||
@@ -388,35 +411,39 @@ func loadAndMergeProjectConfig(cwd string, flags *devFlags) (*project.Project, e
|
||||
}
|
||||
|
||||
// runFrontendDevWatcherCommand will run the `frontend:dev:watcher` command if it was given, ex- `npm run dev`
|
||||
func runFrontendDevWatcherCommand(cwd string, devCommand string, wg *sync.WaitGroup) func(group *sync.WaitGroup) {
|
||||
LogGreen("Running frontend dev watcher command: '%s'", devCommand)
|
||||
func runFrontendDevWatcherCommand(cwd string, devCommand string) (func(), error) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
dir := filepath.Join(cwd, "frontend")
|
||||
cmdSlice := strings.Split(devCommand, " ")
|
||||
wg.Add(1)
|
||||
cmd := exec.CommandContext(ctx, cmdSlice[0], cmdSlice[1:]...)
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Dir = dir
|
||||
|
||||
setParentGID(cmd)
|
||||
go func(ctx context.Context, devCommand string, cwd string, wg *sync.WaitGroup) {
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
if err := cmd.Start(); err != nil {
|
||||
cancel()
|
||||
return nil, fmt.Errorf("Unable to start frontend DevWatcher: %w", err)
|
||||
}
|
||||
|
||||
LogGreen("Running frontend DevWatcher command: '%s'", devCommand)
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
if err := cmd.Wait(); err != nil {
|
||||
if err.Error() != "exit status 1" {
|
||||
LogRed("Error from '%s': %s", devCommand, err.Error())
|
||||
LogRed("Error from DevWatcher '%s': %s", devCommand, err.Error())
|
||||
}
|
||||
}
|
||||
LogGreen("Dev command exited!")
|
||||
LogGreen("DevWatcher command exited!")
|
||||
wg.Done()
|
||||
}(ctx, devCommand, cwd, wg)
|
||||
}()
|
||||
|
||||
return func(wg *sync.WaitGroup) {
|
||||
return func() {
|
||||
killProc(cmd, devCommand)
|
||||
LogGreen("Dev command killed!")
|
||||
LogGreen("DevWatcher command killed!")
|
||||
cancel()
|
||||
wg.Wait()
|
||||
}
|
||||
}, nil
|
||||
}
|
||||
|
||||
// initialiseWatcher creates the project directory watcher that will trigger recompile
|
||||
@@ -463,8 +490,13 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
|
||||
appBinary, err := build.Build(buildOptions)
|
||||
println()
|
||||
if err != nil {
|
||||
LogRed("Build error - continuing to run current version")
|
||||
LogDarkYellow(err.Error())
|
||||
LogRed("Build error - " + err.Error())
|
||||
|
||||
msg := "Continuing to run current version"
|
||||
if debugBinaryProcess == nil {
|
||||
msg = "No version running, build will be retriggered as soon as changes have been detected"
|
||||
}
|
||||
LogDarkYellow(msg)
|
||||
return nil, "", nil
|
||||
}
|
||||
|
||||
@@ -510,12 +542,8 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
|
||||
}
|
||||
|
||||
// doWatcherLoop is the main watch loop that runs while dev is active
|
||||
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, flags devFlags, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL) {
|
||||
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, flags devFlags, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL) *process.Process {
|
||||
// Main Loop
|
||||
var (
|
||||
err error
|
||||
newBinaryProcess *process.Process
|
||||
)
|
||||
var extensionsThatTriggerARebuild = sliceToMap(strings.Split(flags.extensions, ","))
|
||||
var dirsThatTriggerAReload []string
|
||||
for _, dir := range strings.Split(flags.reloadDirs, ",") {
|
||||
@@ -541,7 +569,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
assetDirURL := joinPath(devServerURL, "/wails/assetdir")
|
||||
reloadURL := joinPath(devServerURL, "/wails/reload")
|
||||
for quit == false {
|
||||
//reload := false
|
||||
// reload := false
|
||||
select {
|
||||
case exitCode := <-exitCodeChannel:
|
||||
if exitCode == 0 {
|
||||
@@ -586,7 +614,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
if item.Op&fsnotify.Create == fsnotify.Create {
|
||||
// If this is a folder, add it to our watch list
|
||||
if fs.DirExists(item.Name) {
|
||||
//node_modules is BANNED!
|
||||
// node_modules is BANNED!
|
||||
if !strings.Contains(item.Name, "node_modules") {
|
||||
err := watcher.Add(item.Name)
|
||||
if err != nil {
|
||||
@@ -601,7 +629,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
rebuild = false
|
||||
LogGreen("[Rebuild triggered] files updated")
|
||||
// Try and build the app
|
||||
newBinaryProcess, _, err = restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
|
||||
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, flags, exitCodeChannel)
|
||||
if err != nil {
|
||||
LogRed("Error during build: %s", err.Error())
|
||||
continue
|
||||
@@ -647,7 +675,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
}
|
||||
if reload {
|
||||
reload = false
|
||||
_, err = http.Get(reloadURL)
|
||||
_, err := http.Get(reloadURL)
|
||||
if err != nil {
|
||||
LogRed("Error during refresh: %s", err.Error())
|
||||
}
|
||||
@@ -657,6 +685,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
quit = true
|
||||
}
|
||||
}
|
||||
return debugBinaryProcess
|
||||
}
|
||||
|
||||
func joinPath(url *url.URL, subPath string) string {
|
||||
|
||||
@@ -6,6 +6,8 @@ package dev
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func setParentGID(cmd *exec.Cmd) {
|
||||
@@ -15,6 +17,10 @@ func setParentGID(cmd *exec.Cmd) {
|
||||
}
|
||||
|
||||
func killProc(cmd *exec.Cmd, devCommand string) {
|
||||
if cmd == nil || cmd.Process == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Experiencing the same issue on macOS BigSur
|
||||
// I'm using Vite, but I would imagine this could be an issue with Node (npm) in general
|
||||
// Also, after several edit/rebuild cycles any abnormal shutdown (crash or CTRL-C) may still leave Node running
|
||||
@@ -22,7 +28,7 @@ func killProc(cmd *exec.Cmd, devCommand string) {
|
||||
// Not tested on *nix
|
||||
pgid, err := syscall.Getpgid(cmd.Process.Pid)
|
||||
if err == nil {
|
||||
err := syscall.Kill(-pgid, 15) // note the minus sign
|
||||
err := syscall.Kill(-pgid, unix.SIGTERM) // note the minus sign
|
||||
if err != nil {
|
||||
LogRed("Error from '%s' when attempting to kill the process: %s", devCommand, err.Error())
|
||||
}
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetRGBA(RGBA) {
|
||||
window.runtime.WindowSetRGBA(RGBA);
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
"mode": "exec",
|
||||
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
|
||||
"preLaunchTask": "build",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {}
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Wails: Debug {{.ProjectName}}",
|
||||
@@ -18,8 +17,16 @@
|
||||
"mode": "exec",
|
||||
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
|
||||
"preLaunchTask": "build debug",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {}
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Wails: Dev {{.ProjectName}}",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "exec",
|
||||
"program": "${workspaceFolder}/{{.PathToDesktopBinary}}",
|
||||
"preLaunchTask": "build dev",
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,7 +5,25 @@
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CGO_ENABLED": "1"
|
||||
}
|
||||
},
|
||||
"osx": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
|
||||
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
|
||||
}
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_ENABLED": "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"command": "go",
|
||||
"args": [
|
||||
@@ -22,7 +40,25 @@
|
||||
"label": "build debug",
|
||||
"type": "shell",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CGO_ENABLED": "1"
|
||||
}
|
||||
},
|
||||
"osx": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
|
||||
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
|
||||
}
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_ENABLED": "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"command": "go",
|
||||
"args": [
|
||||
@@ -34,6 +70,41 @@
|
||||
"-o",
|
||||
"{{.PathToDesktopBinary}}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "build dev",
|
||||
"type": "shell",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CGO_ENABLED": "1"
|
||||
}
|
||||
},
|
||||
"osx": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_CFLAGS": "-mmacosx-version-min=10.13",
|
||||
"CGO_LDFLAGS": "-framework UniformTypeIdentifiers -mmacosx-version-min=10.13"
|
||||
}
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
"options": {
|
||||
"env": {
|
||||
"CGO_ENABLED": "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"command": "go",
|
||||
"args": [
|
||||
"build",
|
||||
"-tags",
|
||||
"dev",
|
||||
"-gcflags",
|
||||
"all=-N -l",
|
||||
"-o",
|
||||
"{{.PathToDesktopBinary}}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetRGBA(RGBA) {
|
||||
window.runtime.WindowSetRGBA(RGBA);
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetRGBA(RGBA) {
|
||||
window.runtime.WindowSetRGBA(RGBA);
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetRGBA(RGBA) {
|
||||
window.runtime.WindowSetRGBA(RGBA);
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ export function WindowMinimise(): void;
|
||||
// Restores the window to the dimensions and position prior to minimising.
|
||||
export function WindowUnminimise(): void;
|
||||
|
||||
// [WindowSetRGBA](https://wails.io/docs/reference/runtime/window#windowsetrgba)
|
||||
// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)
|
||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||
export function WindowSetRGBA(R: number, G: number, B: number, A: number): void;
|
||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||
|
||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||
// Opens the given URL in the system browser.
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ export function WindowUnminimise() {
|
||||
window.runtime.WindowUnminimise();
|
||||
}
|
||||
|
||||
export function WindowSetRGBA(RGBA) {
|
||||
window.runtime.WindowSetRGBA(RGBA);
|
||||
export function WindowSetBackgroundColour(R, G, B, A) {
|
||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||
}
|
||||
|
||||
export function BrowserOpenURL(url) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user