From 38c507a60593816647216e91d8ef72b685b444ab Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 15 Aug 2021 21:27:33 +1000 Subject: [PATCH] [windows-x] Add skip frontend build option --- v2/cmd/wails/internal/commands/build/build.go | 5 +++++ v2/internal/frontend/windows/frontend.go | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/v2/cmd/wails/internal/commands/build/build.go b/v2/cmd/wails/internal/commands/build/build.go index dc09b52e..0bd8f77c 100644 --- a/v2/cmd/wails/internal/commands/build/build.go +++ b/v2/cmd/wails/internal/commands/build/build.go @@ -80,6 +80,9 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) { runDelve := false command.BoolFlag("delve", "Runs the built binary in delve for debugging", &runDelve) + skipFrontend := false + command.BoolFlag("s", "Skips building the frontend", &skipFrontend) + command.Action(func() error { quiet := verbosity == 0 @@ -175,6 +178,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) { Compiler: compilerCommand, KeepAssets: keepAssets, Verbosity: verbosity, + IgnoreFrontend: skipFrontend, Compress: compress, CompressFlags: compressFlags, UserTags: userTags, @@ -209,6 +213,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) { fmt.Fprintf(w, "Platform: \t%s\n", buildOptions.Platform) fmt.Fprintf(w, "Arch: \t%s\n", buildOptions.Arch) fmt.Fprintf(w, "Compiler: \t%s\n", compilerPath) + fmt.Fprintf(w, "Skip Frontend: \t%t\n", skipFrontend) fmt.Fprintf(w, "Compress: \t%t\n", buildOptions.Compress) fmt.Fprintf(w, "Build Mode: \t%s\n", buildModeText) fmt.Fprintf(w, "Package: \t%t\n", buildOptions.Pack) diff --git a/v2/internal/frontend/windows/frontend.go b/v2/internal/frontend/windows/frontend.go index 4204864a..63ad6444 100644 --- a/v2/internal/frontend/windows/frontend.go +++ b/v2/internal/frontend/windows/frontend.go @@ -216,7 +216,6 @@ func (f *Frontend) processRequest(req *edge.ICoreWebView2WebResourceRequest, arg } func (f *Frontend) processMessage(message string) { - println("msg:", message) if message == "drag" { err := f.startDrag() if err != nil {