-
Notifications
You must be signed in to change notification settings - Fork 7
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
Sync with fyne-io/fyne develop branch #22
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,8 +199,8 @@ func (b *Builder) build() error { | |
env := os.Environ() | ||
|
||
if goos == "darwin" { | ||
appendEnv(&env, "CGO_CFLAGS", "-mmacosx-version-min=10.13") | ||
appendEnv(&env, "CGO_LDFLAGS", "-mmacosx-version-min=10.13") | ||
appendEnv(&env, "CGO_CFLAGS", "-mmacosx-version-min=10.11") | ||
appendEnv(&env, "CGO_LDFLAGS", "-mmacosx-version-min=10.11") | ||
} | ||
|
||
ldFlags := extractLdflagsFromGoFlags() | ||
|
@@ -443,9 +443,5 @@ func normaliseVersion(str string) string { | |
if pos := strings.Index(str, "-0.20"); pos != -1 { | ||
str = str[:pos] + "-dev" | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This, and a couple of other things, have been added to the tools repo only and should not be reverted |
||
if pos := strings.Index(str, "-rc"); pos != -1 { | ||
str = str[:pos] + "-dev" | ||
} | ||
return version.Normalize(str) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ import ( | |
"flag" | ||
"fmt" | ||
"os" | ||
"os/exec" | ||
"path/filepath" | ||
"strings" | ||
|
||
"github.com/urfave/cli/v2" | ||
"golang.org/x/sys/execabs" | ||
|
||
//lint:ignore SA1019 The recommended replacement does not solve the use-case | ||
"golang.org/x/tools/go/vcs" | ||
|
@@ -35,6 +35,12 @@ func Get() *cli.Command { | |
Usage: "For darwin and Windows targets an appID in the form of a reversed domain name is required, for ios this must match a valid provisioning profile", | ||
Destination: &g.AppID, | ||
}, | ||
&cli.StringFlag{ | ||
Name: "installDir", | ||
Aliases: []string{"o"}, | ||
Usage: "A specific location to install to, rather than the OS default.", | ||
Destination: &g.installDir, | ||
}, | ||
}, | ||
Action: func(ctx *cli.Context) error { | ||
if ctx.Args().Len() != 1 { | ||
|
@@ -50,6 +56,7 @@ func Get() *cli.Command { | |
// Getter is the command that can handle downloading and installing Fyne apps to the current platform. | ||
type Getter struct { | ||
*appData | ||
installDir string | ||
} | ||
|
||
// NewGetter returns a command that can handle the download and install of GUI apps built using Fyne. | ||
|
@@ -81,7 +88,7 @@ func (g *Getter) Get(pkg string) error { | |
if repo.VCS.Name != "Git" { | ||
return errors.New("unsupported VCS: " + repo.VCS.Name) | ||
} | ||
cmd := exec.Command("git", "clone", repo.Repo, "--depth=1", path) | ||
cmd := execabs.Command("git", "clone", repo.Repo, "--depth=1", path) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The execabs is not needed any more I think, because Go 1.19 fixed the underlying issues. |
||
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr | ||
|
||
err = cmd.Run() | ||
|
@@ -98,7 +105,7 @@ func (g *Getter) Get(pkg string) error { | |
path = filepath.Join(path, dir) | ||
} | ||
|
||
install := &Installer{appData: g.appData, srcDir: path, release: true} | ||
install := &Installer{appData: g.appData, installDir: g.installDir, srcDir: path, release: true} | ||
if err := install.validate(); err != nil { | ||
return fmt.Errorf("failed to set up installer: %w", err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not go back versions - the new repo has a higher OS requirement and that is OK.