Big merge

This commit is contained in:
Rafał Zawadzki 2023-01-23 15:12:32 +01:00
commit d7d974c3b9
495 changed files with 29203 additions and 1387 deletions

View file

@ -5,7 +5,7 @@ Introduction
[Go](https://en.wikipedia.org/wiki/Go_(programming_language)), also known as Golang, is a programming language designed at Google.
[therecipe/qt](https://github.com/therecipe/qt) allows you to write Qt applications entirely in Go, [JavaScript/TypeScript](https://github.com/therecipe/entry), [Dart/Flutter](https://github.com/therecipe/flutter), [Haxe](https://github.com/therecipe/haxe) and [Swift](https://github.com/therecipe/swift)
[therecipe/qt](https://github.com/bluszcz/cutego) allows you to write Qt applications entirely in Go or JavaScript.
Beside the language bindings provided, `therecipe/qt` also greatly simplifies the deployment of Qt applications to various software and hardware platforms.
@ -14,7 +14,7 @@ At the time of writing, almost all Qt functions and classes are accessible, and
Impressions
-----------
[Gallery](https://github.com/therecipe/qt/wiki/Gallery) of example applications.
[Gallery](https://github.com/bluszcz/cutego/wiki/Gallery) of example applications.
[JavaScript Demo](https://therecipe.github.io/entry) | *[source](https://github.com/therecipe/entry)*
@ -23,49 +23,33 @@ Installation
The following instructions assume that you already installed [Go](https://golang.org/dl/) and [Git](https://git-scm.com/downloads)
#### (Experimental) cgo-less version (try this first, if you are new and want to test the binding)
##### Windows
```powershell
go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && for /f %v in ('go env GOPATH') do %v\bin\widgets.exe
```
##### macOS/Linux
```bash
go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && $(go env GOPATH)/bin/widgets
```
#### Default version
##### Windows [(more info)](https://github.com/therecipe/qt/wiki/Installation-on-Windows)
##### Windows [(more info)](https://github.com/bluszcz/cutego/wiki/Installation-on-Windows)
```powershell
set GO111MODULE=off
go get -v github.com/therecipe/qt/cmd/... && for /f %v in ('go env GOPATH') do %v\bin\qtsetup test && %v\bin\qtsetup -test=false
go get -v github.com/bluszcz/qt/cmd/... && for /f %v in ('go env GOPATH') do %v\bin\qtsetup test && %v\bin\qtsetup -test=false
```
##### macOS [(more info)](https://github.com/therecipe/qt/wiki/Installation-on-macOS)
##### macOS [(more info)](https://github.com/bluszcz/cutego/wiki/Installation-on-macOS)
```bash
export GO111MODULE=off; xcode-select --install; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
export GO111MODULE=off; xcode-select --install; go get -v github.com/bluszcz/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
```
##### Linux [(more info)](https://github.com/therecipe/qt/wiki/Installation-on-Linux)
##### Linux [(more info)](https://github.com/bluszcz/cutego/wiki/Installation-on-Linux)
```bash
export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
export GO111MODULE=off; go get -v github.com/bluszcz/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
```
Resources
---------
- [Installation](https://github.com/therecipe/qt/wiki/Installation)
- [Getting Started](https://github.com/therecipe/qt/wiki/Getting-Started)
- [Wiki](https://github.com/therecipe/qt/wiki)
- [Installation](https://github.com/bluszcz/cutego/wiki/Installation)
- [Getting Started](https://github.com/bluszcz/cutego/wiki/Getting-Started)
- [Wiki](https://github.com/bluszcz/cutego/wiki)
- [Qt Documentation](https://doc.qt.io/qt-5/classes.html)
- [FAQ](https://github.com/therecipe/qt/wiki/FAQ)
- [FAQ](https://github.com/bluszcz/cutego/wiki/FAQ)
- [#qt-binding](https://gophers.slack.com/messages/qt-binding/details) Slack channel ([invite](https://invite.slack.golangbridge.org)\)
Deployment Targets

View file

@ -3,8 +3,8 @@
package androidextras
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"strings"
"unsafe"
)

View file

@ -9,8 +9,8 @@ package androidextras
import "C"
import (
"errors"
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"strings"
"unsafe"
)

View file

@ -5,7 +5,7 @@ import (
"strings"
"unsafe"
"github.com/therecipe/qt"
"github.com/bluszcz/cutego"
)
func assertion(key int, input ...interface{}) (unsafe.Pointer, func()) {

View file

@ -3,9 +3,11 @@
package bluetooth
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/network"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/network"
"reflect"
"strings"
"unsafe"
)

View file

@ -3,10 +3,11 @@
package charts
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/widgets"
"github.com/bluszcz/cute"
"github.com/bluszcz/cute/core"
"github.com/bluszcz/cute/gui"
"github.com/bluszcz/cute/widgets"
"strings"
"unsafe"
)

View file

@ -9,10 +9,10 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/deploy"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/deploy"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func main() {

View file

@ -8,10 +8,10 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/minimal"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/minimal"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func main() {

View file

@ -8,10 +8,10 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func main() {

View file

@ -8,10 +8,10 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/rcc"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/rcc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func main() {

View file

@ -7,10 +7,10 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/setup"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/setup"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func main() {

27770
core/core.cpp Normal file

File diff suppressed because it is too large Load diff

View file

@ -3,9 +3,7 @@
package core
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/interop/gow"
"github.com/bluszcz/cutego"
"math"
"reflect"
"runtime"

View file

@ -3,9 +3,10 @@
package datavisualization
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/internal"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/gui"
"strings"
"unsafe"
)

View file

@ -3,8 +3,9 @@
package dbus
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/internal"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"strings"
"unsafe"
)

View file

@ -3,10 +3,11 @@
package designer
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/widgets"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/gui"
"github.com/bluszcz/cutego/widgets"
"strings"
"unsafe"
)

View file

@ -8,9 +8,9 @@ package felgo
//#include "felgo.h"
import "C"
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/qml"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/qml"
"runtime"
"strings"
"unsafe"

View file

@ -48,7 +48,7 @@ import (
"time"
"unsafe"
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego/core"
)
func FlutterEngineRun() {

View file

@ -11,12 +11,12 @@ import (
"time"
"unsafe"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/widgets"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/gui"
"github.com/bluszcz/cutego/widgets"
"github.com/therecipe/qt/interop"
_ "github.com/therecipe/qt/interop/dart"
"github.com/bluszcz/cutego/interop"
_ "github.com/bluszcz/cutego/interop/dart"
)
var (

View file

@ -3,8 +3,9 @@
package gamepad
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/internal"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"strings"
"unsafe"
)

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/therecipe/qt
module github.com/bluszcz/cutego
require (
github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e

View file

@ -3,9 +3,10 @@
package gui
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/interop/gow"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
_ "github.com/bluszcz/cutego/internal/binding/runtime"
"strings"
"unsafe"
)

View file

@ -3,10 +3,11 @@
package help
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/internal"
"github.com/therecipe/qt/widgets"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/gui"
"github.com/bluszcz/cutego/widgets"
"strings"
"unsafe"
)

View file

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func CppInputParameters(function *parser.Function) string {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func GoInputParametersForC(function *parser.Function) string {

View file

@ -3,7 +3,7 @@ package converter
import (
"fmt"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func CppOutputParameters(function *parser.Function, name string) string {

View file

@ -1,6 +1,6 @@
package converter
import "github.com/therecipe/qt/internal/binding/parser"
import "github.com/bluszcz/cutego/internal/binding/parser"
func GoOutputParametersFromC(function *parser.Function, name string) string {
if function.Meta == parser.CONSTRUCTOR {

View file

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func EnumNeedsCppGlue(value string) bool {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func GoHeaderName(f *parser.Function) string {

View file

@ -9,8 +9,8 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func module(input interface{}) string {

View file

@ -6,7 +6,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func GoInput(name, value string, f *parser.Function, p string) string {

View file

@ -8,8 +8,8 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func GoOutput(name, value string, f *parser.Function, p string) string {

View file

@ -6,7 +6,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func GoType(f *parser.Function, value string, p string) string { return goType(f, value, p) }

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.10.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.10.0

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.11.1
module github.com/StarAurryon/qt/internal/binding/files/docs/5.11.1

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.12.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.12.0

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.13.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.13.0

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.6.3
module github.com/StarAurryon/qt/internal/binding/files/docs/5.6.3

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.7.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.7.0

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.7.1
module github.com/StarAurryon/qt/internal/binding/files/docs/5.7.1

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.8.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.8.0

View file

@ -1 +1 @@
module github.com/therecipe/qt/internal/binding/files/docs/5.9.0
module github.com/StarAurryon/qt/internal/binding/files/docs/5.9.0

View file

@ -1,6 +1,6 @@
package docs
import (
_ "github.com/therecipe/qt/internal/binding/files/docs/5.12.0"
_ "github.com/therecipe/qt/internal/binding/files/docs/5.13.0"
_ "github.com/bluszcz/cutego/internal/binding/files/docs/5.12.0"
_ "github.com/bluszcz/cutego/internal/binding/files/docs/5.13.0"
)

View file

@ -5,7 +5,7 @@ import (
"strings"
"unsafe"
"github.com/therecipe/qt"
"github.com/bluszcz/cutego"
)
func assertion(key int, input ...interface{}) (unsafe.Pointer, func()) {

View file

@ -10,8 +10,8 @@ import (
"sync"
"unsafe"
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego"
"github.com/bluszcz/cutego/core"
)
var (

View file

@ -1,8 +1,8 @@
package runtime
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/qml"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/qml"
)
func init() {

View file

@ -10,7 +10,7 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
type Class struct {

View file

@ -10,7 +10,7 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func (c *Class) fix() {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
type Function struct {

View file

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func (f *Function) fix() {

View file

@ -9,8 +9,8 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
const (

View file

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
type Module struct {

View file

@ -9,7 +9,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
var State = &struct {
@ -106,10 +106,10 @@ func LoadModule(m string) *Module {
var err error
switch {
case utils.QT_WEBKIT() && m == "WebKit":
err = xml.Unmarshal([]byte(utils.LoadOptional(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/5.8.0", "-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/bluszcz/cutego/internal/binding/files/docs/5.8.0", "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
case utils.QT_FELGO() && m == "Felgo":
err = xml.Unmarshal([]byte(utils.LoadOptional(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/5.12.0", "-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/bluszcz/cutego/internal/binding/files/docs/5.12.0", "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
case utils.QT_MXE(),
utils.QT_HOMEBREW(),
@ -118,22 +118,22 @@ func LoadModule(m string) *Module {
utils.QT_UBPORTS_VERSION() == "xenial",
utils.QT_SAILFISH(),
utils.QT_RPI():
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/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION()), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
case utils.QT_PKG_CONFIG():
if utils.QT_API("") != "" {
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/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION()), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
} else {
err = xml.Unmarshal([]byte(utils.LoadOptional(filepath.Join(utils.QT_DOC_DIR(), fmt.Sprintf("qt%v", strings.ToLower(m)), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &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("5.13.0"), "-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/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API("5.13.0"), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
}
}
default:
if utils.QT_API("") != "" {
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/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION()), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
} else {
path := filepath.Join(utils.QT_DIR(), "Docs", fmt.Sprintf("Qt-%v", utils.QT_VERSION_MAJOR()), fmt.Sprintf("qt%v", strings.ToLower(m)), fmt.Sprintf("qt%v.index", strings.ToLower(m)))
if !utils.ExistsDir(filepath.Join(utils.QT_DIR(), "Docs", fmt.Sprintf("Qt-%v", utils.QT_VERSION_MAJOR()))) {
@ -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/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION()), "-find", "get doc dir")), fmt.Sprintf("qt%v.index", strings.ToLower(m))))), &module)
}
}
}

View file

@ -1,8 +1,8 @@
package runtime
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/qml"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/qml"
)
func init() {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func cppEnum(e *parser.Enum, v *parser.Value) string {

View file

@ -5,9 +5,8 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func goEnum(e *parser.Enum, _ *parser.Value) string {

View file

@ -7,9 +7,9 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func cppFunctionCallback(function *parser.Function) string {

View file

@ -5,9 +5,9 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func goFunction(function *parser.Function) string {
@ -389,17 +389,27 @@ func goFunctionBody(function *parser.Function) string {
}
fmt.Fprint(bb, func() string {
if function.IsMocFunction && function.SignalMode == "" {
for i, p := range function.Parameters {
for _, p := range function.Parameters {
if p.PureGoType != "" && !(p.Value == "QMap<QString, QVariant>" || p.Value == "QList<QVariant>") && !parser.IsBlackListedPureGoType(p.PureGoType) {
if !parser.UseWasm() {
if parser.UseJs() { //TODO: this is potentially broken (mono time), does js still need this ?
fmt.Fprintf(bb, "%vTID := (time.Now().UnixNano()-((time.Now().UnixNano()/1e10)*1e10))+(time.Now().UnixNano()/1e10)+(%v*1e5)\n", parser.CleanName(p.Name, p.Value), i)
} else {
fmt.Fprintf(bb, "%[1]vTID := time.Now().UnixNano()+int64(uintptr(unsafe.Pointer(&%[1]v)))\n", parser.CleanName(p.Name, p.Value))
if !parser.UseWasm() { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprintf(bb, "%vTID := rand.New(rand.NewSource(time.Now().UnixNano())).Int63()\n", parser.CleanName(p.Name, p.Value))
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(%[2]vTID)), unsafe.Pointer(%[1]v%[2]v))\n",
func() string {
if !strings.HasPrefix(p.PureGoType, "*") {
return "&"
}
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(%[1]vTID)), unsafe.Pointer(&%[1]v))\n", parser.CleanName(p.Name, p.Value))
} else { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(&%[1]v), unsafe.Pointer(&%[1]v))\n", parser.CleanName(p.Name, p.Value))
return ""
}(),
parser.CleanName(p.Name, p.Value))
} else {
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(%[1]v%[2]v), unsafe.Pointer(%[1]v%[2]v))\n",
func() string {
if !strings.HasPrefix(p.PureGoType, "*") {
return "&"
}
return ""
}(),
parser.CleanName(p.Name, p.Value))
}
}
}
@ -586,7 +596,11 @@ func goFunctionBody(function *parser.Function) string {
if !strings.HasSuffix(function.Name, "Changed") { //TODO: check if property instead
fmt.Fprintf(bb, "qt.UnregisterTemp(unsafe.Pointer(uintptr(%v)))\n", parser.CleanName(p.Name, p.Value))
}
if strings.HasPrefix(p.PureGoType, "*") {
fmt.Fprintf(bb, "%[1]vD = (%v)(%[1]vI)\n", parser.CleanName(p.Name, p.Value), p.PureGoType)
} else {
fmt.Fprintf(bb, "%[1]vD = (*(*%v)(%[1]vI))\n", parser.CleanName(p.Name, p.Value), p.PureGoType)
}
fmt.Fprint(bb, "}\n")
}
}
@ -640,13 +654,15 @@ func goFunctionBody(function *parser.Function) string {
} else {
if function.IsMocFunction && function.PureGoOutput != "" && !(function.Output == "QMap<QString, QVariant>" || function.Output == "QList<QVariant>") && !parser.IsBlackListedPureGoType(function.PureGoOutput) {
fmt.Fprintf(bb, "oP := %v\n", fmt.Sprintf("(*(*%v)(signal))(%v)", converter.GoHeaderInputSignalFunction(function), converter.GoInputParametersForCallback(function)))
if !parser.UseWasm() {
if parser.UseJs() { //TODO: this is potentially broken (mono time), does js still need this ?
fmt.Fprint(bb, "rTID := (time.Now().UnixNano()-((time.Now().UnixNano()/1e10)*1e10))+((time.Now().UnixNano()/1e10))\n")
} else {
fmt.Fprint(bb, "rTID := time.Now().UnixNano()+int64(uintptr(unsafe.Pointer(&oP)))\n")
if !parser.UseWasm() { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprintf(bb, "rTID := rand.New(rand.NewSource(time.Now().UnixNano())).Int63()\n")
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(rTID)), unsafe.Pointer(%voP))\n",
func() string {
if !strings.HasPrefix(function.PureGoOutput, "*") {
return "&"
}
fmt.Fprint(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(rTID)), unsafe.Pointer(&oP))\n")
return ""
}())
fmt.Fprintf(bb, "return %v", converter.GoInput("rTID", function.Output, function, function.PureGoOutput))
} else { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprint(bb, "qt.RegisterTemp(unsafe.Pointer(&oP), unsafe.Pointer(&oP))\n")
@ -714,13 +730,15 @@ func goFunctionBody(function *parser.Function) string {
} else {
fmt.Fprintf(bb, "oP := %v\n", fmt.Sprintf("New%vFromPointer(ptr).%v%vDefault(%v)", strings.Title(class.Name), strings.TrimSuffix(strings.Replace(strings.Title(function.Name), parser.TILDE, "Destroy", -1), "z__"), function.OverloadNumber, converter.GoInputParametersForCallback(function)))
}
if !parser.UseWasm() {
if parser.UseJs() { //TODO: this is potentially broken (mono time), does js still need this ?
fmt.Fprint(bb, "rTID := (time.Now().UnixNano()-((time.Now().UnixNano()/1e10)*1e10))+((time.Now().UnixNano()/1e10))\n")
} else {
fmt.Fprint(bb, "rTID := time.Now().UnixNano()+int64(uintptr(unsafe.Pointer(&oP)))\n")
if !parser.UseWasm() { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprintf(bb, "rTID := rand.New(rand.NewSource(time.Now().UnixNano())).Int63()\n")
fmt.Fprintf(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(rTID)), unsafe.Pointer(%voP))\n",
func() string {
if !strings.HasPrefix(function.PureGoOutput, "*") {
return "&"
}
fmt.Fprint(bb, "qt.RegisterTemp(unsafe.Pointer(uintptr(rTID)), unsafe.Pointer(&oP))\n")
return ""
}())
fmt.Fprintf(bb, "return %v", converter.GoInput("rTID", function.Output, function, function.PureGoOutput))
} else { //TODO: does wasm need "unsafe" pointer arithmetic ?
fmt.Fprint(bb, "qt.RegisterTemp(unsafe.Pointer(&oP), unsafe.Pointer(&oP))\n")

View file

@ -3,8 +3,8 @@ package templater
import (
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func hasUnimplementedPureVirtualFunctions(className string) bool {

View file

@ -4,8 +4,8 @@ import (
"bytes"
"fmt"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func cTemplate(bb *bytes.Buffer, c *parser.Class, ef func(*parser.Enum, *parser.Value) string, ff func(*parser.Function) string, del string, isGo bool) {

View file

@ -7,8 +7,8 @@ import (
"path/filepath"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func cleanLibs(module string, mode int) []string {

View file

@ -10,9 +10,9 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
const (

View file

@ -12,9 +12,9 @@ import (
"strings"
"time"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
var exportedFunctions []string
@ -661,7 +661,7 @@ extern "C" int32_t __isPlatformVersionAtLeast(int32_t Platform, int32_t Major, i
#ifndef QT_CORE_LIB
#error ------------------------------------------------------------------
#error please run: '$(go env GOPATH)/bin/qtsetup'
#error more info here: https://github.com/therecipe/qt/wiki/Installation
#error more info here: https://github.com/bluszcz/cutego/wiki/Installation
#error ------------------------------------------------------------------
#endif`
}

View file

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func convertToDart(className string, l string, convertClassMethods bool) string {

View file

@ -7,18 +7,18 @@ import (
"path/filepath"
"strings"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
func GoTemplate(module string, stub bool, mode int, pkg, target, tags string) []byte {
if !utils.QT_GEN_GO_WRAPPER() && module == "AndroidExtras" {
utils.Save(utils.GoQtPkgPath(strings.ToLower(module), "utils-androidextras_android.go"), utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal", "-find", "get files dir")), "/binding/files/utils-androidextras_android.go")))
if module == "AndroidExtras" {
utils.Save(utils.GoQtPkgPath(strings.ToLower(module), "utils-androidextras_android.go"), utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal", "-find", "get files dir")), "/binding/files/utils-androidextras_android.go")))
} else if module == "Qml" {
cont := utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal", "-find", "get files dir")), "/binding/files/utils-qml.go"))
cont := utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal", "-find", "get files dir")), "/binding/files/utils-qml.go"))
if utils.QT_API_NUM(utils.QT_VERSION()) < 5060 {
cont = strings.Replace(cont, "Property2(", "Property3(", -1)
}
@ -1499,7 +1499,7 @@ import "C"
fmt.Fprintln(bb, "\"encoding/hex\"")
case "qt":
fmt.Fprintln(bb, "\"github.com/therecipe/qt\"")
fmt.Fprintln(bb, "\"github.com/bluszcz/cutego\"")
case "internal":
fmt.Fprintln(bb, "\"github.com/therecipe/qt/internal\"")
@ -1516,9 +1516,9 @@ import "C"
default:
if mode == MOC {
fmt.Fprintf(bb, "std_%[1]v \"github.com/therecipe/qt/%[1]v\"\n", mlow)
fmt.Fprintf(bb, "std_%[1]v \"github.com/bluszcz/cutego/%[1]v\"\n", mlow)
} else {
fmt.Fprintf(bb, "\"github.com/therecipe/qt/%v\"\n", mlow)
fmt.Fprintf(bb, "\"github.com/bluszcz/cutego/%v\"\n", mlow)
}
if utils.QT_GEN_TSD() {
@ -1589,9 +1589,9 @@ import "C"
if module == "gui" && utils.QT_API_NUM(utils.QT_VERSION()) >= 5050 && !utils.QT_GEN_GO_WRAPPER() {
if mode == NONE {
fmt.Fprintln(bb, "_ \"github.com/therecipe/qt/internal/binding/runtime\"")
fmt.Fprintln(bb, "_ \"github.com/bluszcz/cutego/internal/binding/runtime\"")
} else if mode == MINIMAL && (cmd.ImportsQmlOrQuick() || cmd.ImportsInterop()) {
fmt.Fprintln(bb, "_ \"github.com/therecipe/qt/internal/binding/runtime\"")
fmt.Fprintln(bb, "_ \"github.com/bluszcz/cutego/internal/binding/runtime\"")
}
}
}

View file

@ -5,8 +5,8 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func HTemplate(m string, mode int, tags string) []byte {

View file

@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func convertToHaxe(className string, l string, convertClassMethods bool) string {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
)
func convertToSwift(className string, l string, convertClassMethods bool) string {

View file

@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/utils"
)
func GenModule(m, target string, mode int) {

View file

@ -23,9 +23,9 @@ else
QT=qt-unified-mac-x64-3.0.5-online
if [ "$IOS" == "true" ] || [ "$IOS_SIMULATOR" == "true" ]
then
/Volumes/$QT/$QT.app/Contents/MacOS/$QT -v --script $GOPATH/src/github.com/therecipe/qt/internal/ci/iscript.qs IOS=true
/Volumes/$QT/$QT.app/Contents/MacOS/$QT -v --script $GOPATH/src/github.com/StarAurryon/qt/internal/ci/iscript.qs IOS=true
else
/Volumes/$QT/$QT.app/Contents/MacOS/$QT -v --script $GOPATH/src/github.com/therecipe/qt/internal/ci/iscript.qs DARWIN=true
/Volumes/$QT/$QT.app/Contents/MacOS/$QT -v --script $GOPATH/src/github.com/StarAurryon/qt/internal/ci/iscript.qs DARWIN=true
fi
diskutil unmountDisk disk1
rm -f /tmp/$QT.dmg

View file

@ -24,7 +24,7 @@ else
QT=qt-unified-linux-x64-online.run
curl -sL --retry 10 --retry-delay 10 -o /tmp/$QT https://download.qt.io/official_releases/online_installers/$QT
chmod +x /tmp/$QT
/tmp/$QT -v --script $GOPATH/src/github.com/therecipe/qt/internal/ci/iscript.qs LINUX=true
/tmp/$QT -v --script $GOPATH/src/github.com/StarAurryon/qt/internal/ci/iscript.qs LINUX=true
rm -f /tmp/$QT
fi

View file

@ -14,7 +14,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
var buildVersion = "no build version"
@ -51,13 +51,13 @@ func ParseFlags() bool {
_, err := exec.LookPath("go")
if api := utils.QT_API(""); api != "" && err == nil && !utils.QT_DOCKER() && !forDocker {
if utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/"+api, "-find", "get doc dir") == "" {
if utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal/binding/files/docs/"+api, "-find", "get doc dir") == "" {
utils.Log.Errorf("invalid api version provided: '%v'", api)
fmt.Println("valid api versions are:") //TODO: if only one api version is available, use it
if !utils.UseGOMOD("") {
if o := utils.GoListOptional("{{join .Imports \"|\"}}", "github.com/therecipe/qt/internal/binding/files/docs", "get doc dir"); o != "" {
if o := utils.GoListOptional("{{join .Imports \"|\"}}", "github.com/bluszcz/cutego/internal/binding/files/docs", "get doc dir"); o != "" {
for _, v := range strings.Split(o, "|") {
fmt.Println(strings.TrimPrefix(strings.TrimSpace(strings.Replace(v, "'", "", -1)), "github.com/therecipe/qt/internal/binding/files/docs/"))
fmt.Println(strings.TrimPrefix(strings.TrimSpace(strings.Replace(v, "'", "", -1)), "github.com/bluszcz/cutego/internal/binding/files/docs/"))
}
}
} else {
@ -67,7 +67,7 @@ func ParseFlags() bool {
wg.Add(1)
go func(mid, min int) {
v := fmt.Sprintf("5.%v.%v", mid, min)
if utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/binding/files/docs/"+v, "-find", "get doc dir") != "" {
if utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal/binding/files/docs/"+v, "-find", "get doc dir") != "" {
fmt.Println(v)
}
wg.Done()
@ -390,7 +390,7 @@ func virtual(arg []string, target, path string, writeCacheToHost bool, docker bo
gpath += pathseperator + gpfs
args = append(args, []string{"-e", "QT_STUB=true"}...) //TODO: won't work with wine images atm
} else {
if strings.Contains(path, "github.com/therecipe/qt/internal/examples") && !strings.Contains(path, "github.com/therecipe/qt/internal/examples/androidextras") {
if strings.Contains(path, "github.com/bluszcz/cutego/internal/examples") && !strings.Contains(path, "github.com/bluszcz/cutego/internal/examples/androidextras") {
gpath += pathseperator + gpfs
} else {
gpath = gpfs + pathseperator + gpath

View file

@ -10,8 +10,8 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/cmd/rcc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd/rcc"
"github.com/bluszcz/cutego/internal/utils"
)
//linux

View file

@ -5,5 +5,5 @@ package deploy
import "errors"
func sailfish_ssh(port, login string, cmd ...string) error {
return errors.New("please run \"go install -v -tags=sailfish github.com/therecipe/qt/cmd/...\" to enable sailfish deployments")
return errors.New("please run \"go install -v -tags=sailfish github.com/bluszcz/cutego/cmd/...\" to enable sailfish deployments")
}

View file

@ -10,7 +10,7 @@ import (
"golang.org/x/crypto/ssh"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func sailfish_ssh(port, login string, cmd ...string) error {

View file

@ -13,8 +13,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
func build(mode, target, path, ldFlagsCustom, tagsCustom, name, depPath string, fast, comply bool) {

View file

@ -9,7 +9,7 @@ import (
"strings"
"testing"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func Test_escapeFlags(t *testing.T) {

View file

@ -11,13 +11,13 @@ import (
"strings"
"time"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/therecipe/qt/internal/cmd/rcc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/cmd/rcc"
"github.com/bluszcz/cutego/internal/utils"
)
func bundle(mode, target, path, name, depPath string, tagsCustom string, fast bool) {
@ -943,7 +943,7 @@ func bundle(mode, target, path, name, depPath string, tagsCustom string, fast bo
}
for _, l := range strings.Split(strings.TrimSpace(utils.RunCmd(lcmd, "go list deps")), "|") {
for _, ml := range parser.GetLibs() {
if strings.HasSuffix(strings.ToLower(l), "github.com/therecipe/qt/"+strings.ToLower(ml)) {
if strings.HasSuffix(strings.ToLower(l), "github.com/bluszcz/cutego/"+strings.ToLower(ml)) {
cmd.Args = append(cmd.Args, utils.GoQtPkgPath(strings.ToLower(ml), strings.ToLower(ml)+"-minimal.cpp"))
break
}

View file

@ -7,14 +7,14 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/minimal"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/therecipe/qt/internal/cmd/rcc"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/minimal"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/cmd/rcc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func Deploy(mode, target, path string, docker bool, ldFlags, tags string, fast bool, device string, vagrant bool, vagrantsystem string, comply bool, useuic bool, quickcompiler bool) {
@ -51,7 +51,7 @@ func Deploy(mode, target, path string, docker bool, ldFlags, tags string, fast b
utils.RunCmd(cmd, "go mod vendor")
}
if utils.QT_DOCKER() {
cmd := exec.Command("go", "get", "-v", "-d", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd := exec.Command("go", "get", "-v", "-d", "github.com/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd.Dir = path
if !utils.QT_PKG_CONFIG() {
utils.RunCmdOptional(cmd, "go get docs") //TODO: this can fail if QT_PKG_CONFIG

View file

@ -13,7 +13,7 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func flutter(target string, path string) {

View file

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func run(target, name, depPath, device string) {

View file

@ -10,14 +10,14 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/binding/converter"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/converter"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func Minimal(path, target, tags string, skipSetup bool) {
@ -50,7 +50,7 @@ func Minimal(path, target, tags string, skipSetup bool) {
utils.RunCmd(cmd, "go mod vendor")
}
if utils.QT_DOCKER() {
cmd := exec.Command("go", "get", "-v", "-d", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd := exec.Command("go", "get", "-v", "-d", "github.com/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd.Dir = path
if !utils.QT_PKG_CONFIG() {
utils.RunCmdOptional(cmd, "go get docs") //TODO: this can fail if QT_PKG_CONFIG

View file

@ -18,11 +18,11 @@ import (
"golang.org/x/tools/imports"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
var (
@ -58,7 +58,7 @@ func Moc(path, target, tags string, fast, slow, deploying bool, skipSetup bool)
utils.RunCmd(cmd, "go mod vendor")
}
if utils.QT_DOCKER() {
cmd := exec.Command("go", "get", "-v", "-d", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd := exec.Command("go", "get", "-v", "-d", "github.com/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd.Dir = path
if !utils.QT_PKG_CONFIG() {
utils.RunCmdOptional(cmd, "go get docs") //TODO: this can fail if QT_PKG_CONFIG

View file

@ -1,3 +1,3 @@
package qtmoc
import _ "github.com/therecipe/qt/internal/cmd/moc/test/sub"
import _ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub"

View file

@ -9,15 +9,15 @@ import (
tps "time"
"unsafe"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/sql"
"github.com/therecipe/qt/widgets"
"github.com/therecipe/qt/xml"
"github.com/bluszcz/cutego/core"
"github.com/bluszcz/cutego/gui"
"github.com/bluszcz/cutego/sql"
"github.com/bluszcz/cutego/widgets"
"github.com/bluszcz/cutego/xml"
"github.com/therecipe/qt/internal/cmd/moc/test/sub"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
"github.com/therecipe/qt/internal/cmd/moc/test/sub/subsub" //subsubcustom
"github.com/bluszcz/cutego/internal/cmd/moc/test/sub"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
"github.com/bluszcz/cutego/internal/cmd/moc/test/sub/subsub" //subsubcustom
)
type Application struct {

View file

@ -1,9 +1,9 @@
package b
import (
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego/core"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
)
type StructSubGoB struct{}

View file

@ -1,5 +1,5 @@
package bgo
import _ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
import _ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
type StructSubGoBGo struct{}

View file

@ -1,9 +1,9 @@
package c
import (
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego/core"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
)
type StructSubGoC struct{}

View file

@ -1,5 +1,5 @@
package cgo
import _ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
import _ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
type StructSubGoCGo struct{}

View file

@ -1,9 +1,9 @@
package d
import (
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego/core"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
)
type StructSubGoD struct{}

View file

@ -1,5 +1,5 @@
package dgo
import _ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
import _ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
type StructSubGoDGo struct{}

View file

@ -1,17 +1,17 @@
package sub
import (
"github.com/therecipe/qt/internal/cmd/moc/test/sub/subsub"
"github.com/bluszcz/cutego/internal/cmd/moc/test/sub/subsub"
"github.com/therecipe/qt/internal/cmd/moc/test/sub/b"
abc "github.com/therecipe/qt/internal/cmd/moc/test/sub/c"
. "github.com/therecipe/qt/internal/cmd/moc/test/sub/d"
"github.com/bluszcz/cutego/internal/cmd/moc/test/sub/b"
abc "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/c"
. "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/d"
"github.com/therecipe/qt/internal/cmd/moc/test/sub/bgo"
abcgo "github.com/therecipe/qt/internal/cmd/moc/test/sub/cgo"
. "github.com/therecipe/qt/internal/cmd/moc/test/sub/dgo"
"github.com/bluszcz/cutego/internal/cmd/moc/test/sub/bgo"
abcgo "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/cgo"
. "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/dgo"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
)
//TODO: duplicate struct name issue

View file

@ -1,10 +1,10 @@
package sub
import (
"github.com/therecipe/qt/core"
"github.com/bluszcz/cutego/core"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/subsub"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/subsub"
)
var SomeType *someType

View file

@ -1,9 +1,9 @@
package subsubcustom
import (
"github.com/therecipe/qt/gui"
"github.com/bluszcz/cutego/gui"
_ "github.com/therecipe/qt/internal/cmd/moc/test/sub/conf"
_ "github.com/bluszcz/cutego/internal/cmd/moc/test/sub/conf"
)
var SubSubTestStructInstance *SubSubTestStruct

View file

@ -12,11 +12,11 @@ import (
"strings"
"sync"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
var (
@ -32,7 +32,7 @@ func Rcc(path, target, tagsCustom, output_dir string, useuic, quickcompiler, dep
utils.RunCmd(cmd, "go mod vendor")
}
if utils.QT_DOCKER() {
cmd := exec.Command("go", "get", "-v", "-d", "github.com/therecipe/qt/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd := exec.Command("go", "get", "-v", "-d", "github.com/bluszcz/cutego/internal/binding/files/docs/"+utils.QT_API(utils.QT_VERSION())+"@"+cmd.QtModVersion(filepath.Dir(utils.GOMOD(path)))) //TODO: needs to pull 5.8.0 if QT_WEBKIT
cmd.Dir = path
if !utils.QT_PKG_CONFIG() {
utils.RunCmdOptional(cmd, "go get docs") //TODO: this can fail if QT_PKG_CONFIG
@ -695,7 +695,7 @@ func rcc(path, target, tagsCustom, output_dir string, quickcompiler bool, useuic
if i == 0 {
fmt.Fprintln(bb, "\""+p+"\"")
} else {
fmt.Fprintln(bb, "\"github.com/therecipe/qt/"+p+"\"")
fmt.Fprintln(bb, "\"github.com/bluszcz/cutego/"+p+"\"")
}
}
fmt.Fprintln(bb, "\n)")

View file

@ -8,7 +8,7 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func Check(target string, docker, vagrant bool) {
@ -28,7 +28,7 @@ func Check(target string, docker, vagrant bool) {
hash := "please install git"
if utils.UseGOMOD("") {
hash = utils.GoListOptional("{{.Version}}", "github.com/therecipe/qt", "-m", "get qt hash")
hash = utils.GoListOptional("{{.Version}}", "github.com/bluszcz/cutego", "-m", "get qt hash")
} else {
if _, err := exec.LookPath("git"); err == nil {
cmd := exec.Command("git", "rev-parse", "--verify", "HEAD")

View file

@ -8,12 +8,12 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/utils"
)
func Generate(target string, docker, vagrant bool) {
@ -71,6 +71,6 @@ func Generate(target string, docker, vagrant bool) {
runtimePath := utils.GoQtPkgPath("internal/binding/runtime")
utils.RemoveAll(runtimePath)
utils.MkdirAll(runtimePath)
utils.Save(filepath.Join(runtimePath, "utils-runtime.go"), utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal", "-find", "get files dir")), "/binding/files/utils-runtime.go")))
utils.Save(filepath.Join(runtimePath, "utils-runtime.go"), utils.Load(filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal", "-find", "get files dir")), "/binding/files/utils-runtime.go")))
moc.Moc(runtimePath, target, "", true, false, false, true)
}

View file

@ -10,11 +10,11 @@ import (
"strconv"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
func Install(target string, docker, vagrant, failfast bool) {
@ -110,7 +110,7 @@ func Install(target string, docker, vagrant, failfast bool) {
cmd = exec.Command(filepath.Join(utils.GOBIN(), "gopherjs"), "install")
}
cmd.Args = append(cmd.Args, fmt.Sprintf("github.com/therecipe/qt/%v", strings.ToLower(module)))
cmd.Args = append(cmd.Args, fmt.Sprintf("github.com/bluszcz/cutego/%v", strings.ToLower(module)))
if target == "js" {
cmd.Args = append(cmd.Args, "-v")

View file

@ -6,8 +6,8 @@ import (
"path/filepath"
"runtime"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/utils"
)
func Prep(target string) {

View file

@ -8,16 +8,16 @@ import (
"runtime"
"strings"
"github.com/therecipe/qt/internal/binding/parser"
"github.com/therecipe/qt/internal/binding/templater"
"github.com/bluszcz/cutego/internal/binding/parser"
"github.com/bluszcz/cutego/internal/binding/templater"
"github.com/therecipe/qt/internal/cmd"
"github.com/therecipe/qt/internal/cmd/deploy"
"github.com/therecipe/qt/internal/cmd/minimal"
"github.com/therecipe/qt/internal/cmd/moc"
"github.com/therecipe/qt/internal/cmd/rcc"
"github.com/bluszcz/cutego/internal/cmd"
"github.com/bluszcz/cutego/internal/cmd/deploy"
"github.com/bluszcz/cutego/internal/cmd/minimal"
"github.com/bluszcz/cutego/internal/cmd/moc"
"github.com/bluszcz/cutego/internal/cmd/rcc"
"github.com/therecipe/qt/internal/utils"
"github.com/bluszcz/cutego/internal/utils"
)
func Test(target string, docker, vagrant bool, vagrantsystem string) {
@ -161,7 +161,7 @@ func Test(target string, docker, vagrant bool, vagrantsystem string) {
example := filepath.Join(cat, example)
path := filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/therecipe/qt/internal/examples", "-find", "get doc dir")), example)
path := filepath.Join(strings.TrimSpace(utils.GoListOptional("{{.Dir}}", "github.com/bluszcz/cutego/internal/examples", "-find", "get doc dir")), example)
utils.Log.Infof("testing %v", example)
deploy.Deploy(
mode,

Some files were not shown because too many files have changed in this diff Show more