Skip to content

Add 'verbose' option to package command #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/fyne/internal/commands/package-mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
)

func (p *Packager) packageAndroid(arch string, tags []string) error {
return mobile.RunNewBuild(arch, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, "", "", tags)
return mobile.RunNewBuild(arch, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, "", "", tags, p.verbose)
}

func (p *Packager) packageIOS(target string, tags []string) error {
err := mobile.RunNewBuild(target, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, p.certificate, p.profile, tags)
err := mobile.RunNewBuild(target, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, p.certificate, p.profile, tags, p.verbose)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions cmd/fyne/internal/commands/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type Packager struct {
*appData
srcDir, dir, exe, os string
install, release, distribution bool
verbose bool
certificate, profile string // optional flags for releasing
tags, category string
tempDir string
Expand Down
1 change: 1 addition & 0 deletions cmd/fyne/internal/commands/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func Release() *cli.Command {
stringFlags["icon"](&r.icon),
boolFlags["use-raw-icon"](&r.rawIcon),
genericFlags["metadata"](&r.customMetadata),
boolFlags["verbose"](&r.Packager.verbose),
},
Action: r.releaseAction,
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/fyne/internal/mobile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,12 @@ var (
)

// RunNewBuild executes a new mobile build for the specified configuration
func RunNewBuild(target, appID, icon, name, version string, build int, release, distribution bool, cert, profile string, tags []string) error {
func RunNewBuild(target, appID, icon, name, version string, build int, release, distribution bool, cert, profile string, tags []string, verbose bool) error {
buildTarget = target
buildBundleID = appID
buildRelease = distribution
buildTags = tags
buildV = verbose
if release {
buildLdflags = "-w"
buildTrimpath = true
Expand Down
14 changes: 11 additions & 3 deletions cmd/fyne/internal/mobile/build_iosapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@ func goIOSBuild(pkg *packages.Package, bundleID string, archs []string,
}

// We are using lipo tool to build multiarchitecture binaries.
cmd := exec.Command(
"xcrun", "lipo",
args := []string{
"lipo",
"-o", filepath.Join(tmpdir, "main/main"),
"-create",
)
}
if buildV {
printcmd("xcrun %s", strings.Join(args, " "))
}
cmd := exec.Command("xcrun", args...)

var nmpkgs map[string]bool
for _, arch := range archs {
path := filepath.Join(tmpdir, arch)
Expand Down Expand Up @@ -124,6 +129,9 @@ func goIOSBuild(pkg *packages.Package, bundleID string, archs []string,
}

cmd = exec.Command("xcrun", cmdStrings...)
if buildV {
printcmd("xcrun %s", strings.Join(cmdStrings, " "))
}
if err := runCmd(cmd); err != nil {
return nil, err
}
Expand Down