forked from joejulian/gio-cmd
gogio: add deeplink support
Add a new flag "-schemes" which links the URL schemes to the app. Signed-off-by: inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -202,10 +202,18 @@ func (b *windowsBuilder) buildProgram(buildInfo *buildInfo, name string, arch st
|
||||
dest = filepath.Join(filepath.Dir(b.DestDir), name+"_"+arch+".exe")
|
||||
}
|
||||
|
||||
ldflags := buildInfo.ldflags
|
||||
if buildInfo.schemes != nil {
|
||||
ldflags += ` -X "gioui.org/app.schemesURI=` + strings.Join(buildInfo.schemes, ",") + `" `
|
||||
}
|
||||
if buildInfo.appID != "" {
|
||||
ldflags += ` -X "gioui.org/app.ID=` + buildInfo.appID + `" `
|
||||
}
|
||||
|
||||
cmd := exec.Command(
|
||||
"go",
|
||||
"build",
|
||||
"-ldflags=-H=windowsgui "+buildInfo.ldflags,
|
||||
"-ldflags=-H=windowsgui "+ldflags,
|
||||
"-tags="+buildInfo.tags,
|
||||
"-o", dest,
|
||||
buildInfo.pkgPath,
|
||||
|
||||
Reference in New Issue
Block a user