[darwin] Inspector tools should also be included into a debug build (#2162)

This commit is contained in:
stffabi
2022-12-01 09:20:18 +01:00
committed by GitHub
parent bd66451dd9
commit 5cc012d763
4 changed files with 13 additions and 5 deletions
@@ -1,4 +1,4 @@
//go:build darwin && !dev
//go:build darwin && !(dev || debug)
package darwin
@@ -1,8 +1,8 @@
//go:build darwin && dev
//go:build darwin && (dev || debug)
package darwin
// We are using private APIs here, make sure this is only included in a dev build and not in a production build.
// We are using private APIs here, make sure this is only included in a dev/debug build and not in a production build.
// Otherwise the binary might get rejected by the AppReview-Team when pushing it to the AppStore.
/*
+4 -1
View File
@@ -3,7 +3,6 @@ package build
import (
"bytes"
"fmt"
"github.com/pterm/pterm"
"os"
"os/exec"
"path/filepath"
@@ -11,6 +10,8 @@ import (
"strconv"
"strings"
"github.com/pterm/pterm"
"github.com/wailsapp/wails/v2/internal/system"
"github.com/leaanthony/gosod"
@@ -560,6 +561,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
if installCommand == "" {
// No - don't install
printBulletPoint("No Install command. Skipping.")
pterm.Println("")
} else {
// Do install if needed
printBulletPoint("Installing frontend dependencies: ")
@@ -580,6 +582,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
}
if buildCommand == "" {
printBulletPoint("No Build command. Skipping.")
pterm.Println("")
// No - ignore
return nil
}
+6 -1
View File
@@ -2,12 +2,13 @@ package build
import (
"fmt"
"github.com/pterm/pterm"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/pterm/pterm"
"github.com/samber/lo"
"github.com/wailsapp/wails/v2/internal/staticanalysis"
"github.com/wailsapp/wails/v2/pkg/commands/bindings"
@@ -345,6 +346,10 @@ func execBuildApplication(builder Builder, options *Options) (string, error) {
pterm.Info.Println(message)
}
if options.Platform == "darwin" && options.Mode == Debug {
pterm.Warning.Println("A darwin debug build contains private APIs, please don't distribute this build. Please use it only as a test build for testing and debug purposes.")
}
return options.CompiledBinary, nil
}