From 6d2596ed6fe1669abb4d06ec14341bdf39157cb0 Mon Sep 17 00:00:00 2001 From: therecipe Date: Fri, 4 Sep 2020 00:39:23 +0200 Subject: [PATCH] minor fixes --- internal/binding/parser/parser.go | 2 +- internal/cmd/deploy/bundle.go | 2 +- internal/examples/3rdparty/mpv/mpv.go | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/binding/parser/parser.go b/internal/binding/parser/parser.go index 91d0f2e81..4180f4583 100644 --- a/internal/binding/parser/parser.go +++ b/internal/binding/parser/parser.go @@ -142,7 +142,7 @@ func LoadModule(m string) *Module { err = xml.Unmarshal([]byte(utils.LoadOptional(path)), &module) if err != nil { utils.Log.WithFields(logFields).Debug("falling back to bundled *.index files") - err = xml.Unmarshal([]byte(utils.LoadOptional(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION()), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module) + err = xml.Unmarshal([]byte(utils.LoadOptional(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION_MAJOR()+".0"), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module) } } } diff --git a/internal/cmd/deploy/bundle.go b/internal/cmd/deploy/bundle.go index ef8ff8b5f..c13b84ec1 100644 --- a/internal/cmd/deploy/bundle.go +++ b/internal/cmd/deploy/bundle.go @@ -103,7 +103,7 @@ func bundle(mode, target, path, name, depPath string, tagsCustom string, fast bo utils.RunCmd(dep, fmt.Sprintf("deploy for %v on %v", target, runtime.GOOS)) //break the rpath - pPath := "/break_the_rpath/" + pPath := "/broken/" fn := filepath.Join(depPath, name+".app", "Contents", "MacOS", name) data, err := ioutil.ReadFile(fn) if err != nil { diff --git a/internal/examples/3rdparty/mpv/mpv.go b/internal/examples/3rdparty/mpv/mpv.go index c62951bd3..3ffd13969 100644 --- a/internal/examples/3rdparty/mpv/mpv.go +++ b/internal/examples/3rdparty/mpv/mpv.go @@ -1,5 +1,10 @@ package mpv +//it's also possible to directly place this file beside the files from mpv-examples/libmpv/qml +//to get this working, change init.go to just run `make mocables` +//and remove the cgo LDFLAGS line used to link against the static lib below +//more info: https://github.com/therecipe/qt/issues/1162 + /* #cgo pkg-config: mpv #cgo linux,amd64 LDFLAGS: -L ${SRCDIR}/mpv-examples/libmpv/qml -lmpvtest