mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[mac] better output text on build
This commit is contained in:
@@ -117,21 +117,21 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
||||
}
|
||||
|
||||
// Tags
|
||||
//experimental := false
|
||||
experimental := false
|
||||
userTags := []string{}
|
||||
for _, tag := range strings.Split(tags, " ") {
|
||||
thisTag := strings.TrimSpace(tag)
|
||||
if thisTag != "" {
|
||||
userTags = append(userTags, thisTag)
|
||||
}
|
||||
//if thisTag == "exp" {
|
||||
// experimental = true
|
||||
//}
|
||||
if thisTag == "exp" {
|
||||
experimental = true
|
||||
}
|
||||
}
|
||||
|
||||
//if runtime.GOOS == "darwin" && !experimental {
|
||||
// return fmt.Errorf("MacOS version coming soon!")
|
||||
//}
|
||||
if runtime.GOOS == "linux" && !experimental {
|
||||
return fmt.Errorf("Linux version coming soon!")
|
||||
}
|
||||
|
||||
// Webview2 installer strategy (download by default)
|
||||
wv2rtstrategy := ""
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/fs"
|
||||
|
||||
@@ -209,6 +210,18 @@ func Build(options *Options) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return options.CompiledBinary, nil
|
||||
result := options.CompiledBinary
|
||||
|
||||
if options.Pack && options.Platform == "darwin" {
|
||||
sr := strings.Split(result, "/")
|
||||
for i := len(sr) - 1; i >= 0; i-- {
|
||||
if strings.Contains(sr[i], ".app") {
|
||||
result = strings.Join(sr[:i+1], "/")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user