Skip to content

Commit

Permalink
Improve minimal tag build core/gui/widgets support
Browse files Browse the repository at this point in the history
  • Loading branch information
drswinghead committed Apr 6, 2019
1 parent 0cf6df1 commit 7194d9a
Show file tree
Hide file tree
Showing 1,049 changed files with 21,856 additions and 15,607 deletions.
78 changes: 47 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
# make V=0|1|2 P=n MIN=x

# GOPATH := $(PWD):$(GOPATH)
MINORVER := $(shell go version|awk '{print $$3}'|awk -F. '{print $$2}')
USEI=$(shell expr "${MINORVER}" ">=" "10")
ifeq ($(USEI), 1)
ARGI="-i"
ARGI=-i
# ARGI=-i -tags minimal
endif
ifeq ($(V), 1)
ARGV=-v
endif
ifeq ($(V), 2)
ARGV=-v -x
endif
ifneq ($(P), )
ARGP=-p $(P)
endif
ifneq ($(MIN), )
ARGMIN=-tags minimal
endif
ARGA=${ARGI} ${ARGV} ${ARGP} ${ARGMIN}

all:
@echo ${GOPATH}
@echo ${MINORVER}
@echo "dd ${ARGI} dd"
@echo "dd ${ARGA} dd"
@echo "${V} "
# CC=clang CXX=clang++ go install -v -x qt5
# go build -v -x core
# go build -v -x gui
Expand All @@ -19,49 +35,49 @@ realall: rts bases qmls extras webengines multimedias tools

rts: qtrt- mock-
qtrt-:
go install -v -x ${ARGI} ./qtqt
go install -v -x ${ARGI} ./qtrt
go install ${ARGA} ./qtqt
go install ${ARGA} ./qtrt
mock-:
go install -v -x ${ARGI} ./qtmock
go install ${ARGA} ./qtmock

bases: qtrt- core- gui- widgets-
core-:
go install -v -x ${ARGI} ./qtcore
go install ${ARGA} ./qtcore
gui-:
go install -v -x ${ARGI} ./qtgui
go install ${ARGA} ./qtgui
widgets-:
go install -v -x ${ARGI} ./qtwidgets
go install ${ARGA} ./qtwidgets

network-:
go install -v -x ${ARGI} ./qtnetwork
go install ${ARGA} ./qtnetwork

qmls: qml- quick- quickctrl- quickwgt-
qml-:
go install -v -x ${ARGI} ./qtqml
go install ${ARGA} ./qtqml
quick-:
go install -v -x ${ARGI} ./qtquick
go install ${ARGA} ./qtquick
quickctrl-:
go install -v -x ${ARGI} ./qtquicktemplates2
go install -v -x ${ARGI} ./qtquickcontrols2
go install ${ARGA} ./qtquicktemplates2
go install ${ARGA} ./qtquickcontrols2
quickwgt-:
go install -v -x ${ARGI} ./qtquickwidgets
go install ${ARGA} ./qtquickwidgets

extras:
go install -v -x ${ARGI} ./qtandroidextras
go install -v -x ${ARGI} ./qtmacextras
go install -v -x ${ARGI} ./qtwinextras
go install ${ARGA} ./qtandroidextras
go install ${ARGA} ./qtmacextras
go install ${ARGA} ./qtwinextras

webengines:
go install -v -x ${ARGI} ./qtpositioning
go install -v -x ${ARGI} ./qtprintsupport
go install -v -x ${ARGI} ./qtwebchannel
go install -v -x ${ARGI} ./qtwebenginecore
go install -v -x ${ARGI} ./qtwebengine
go install -v -x ${ARGI} ./qtwebenginewidgets
go install ${ARGA} ./qtpositioning
go install ${ARGA} ./qtprintsupport
go install ${ARGA} ./qtwebchannel
go install ${ARGA} ./qtwebenginecore
go install ${ARGA} ./qtwebengine
go install ${ARGA} ./qtwebenginewidgets

multimedias:
go install -v -x ${ARGI} ./qtsvg
go install -v -x ${ARGI} ./qtmultimedia
go install ${ARGA} ./qtsvg
go install ${ARGA} ./qtmultimedia

eg-:
go build -v -x eg/coreapp.go
Expand All @@ -75,14 +91,14 @@ eg-:
go build -v -x -o bui bigui/*.go

tools:
go build -p 1 -v -i -o bin/go-uic ./cmd/go-uic
go build -p 1 -v -i -o bin/go-rcc ./cmd/go-rcc
go build -p 1 -v -i -o bin/cgo-rcc ./cmd/cgo-rcc
go build -p 1 -v -i -o bin/go-qmlviewer ./cmd/go-qmlviewer
go build -p 1 -v -i -o bin/go-dir2qrc ./cmd/dir2qrc
go build ${ARGA} -o bin/go-uic ./cmd/go-uic
go build ${ARGA} -o bin/go-rcc ./cmd/go-rcc
go build ${ARGA} -o bin/cgo-rcc ./cmd/cgo-rcc
go build ${ARGA} -o bin/go-qmlviewer ./cmd/go-qmlviewer
go build ${ARGA} -o bin/go-dir2qrc ./cmd/dir2qrc

tst:
go test -v -x tests/qstring_test.go
go test ${ARGA} tests/qstring_test.go

updoc:
curl -POST -d "path=github.com/kitech/qt.go/qtcore" "https://godoc.org/-/refresh"
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidactivityresultreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (this *QAndroidActivityResultReceiver) HandleActivityResult(receiverRequest

// keep block begin

func init() {
func init_unused_14905() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidbinder.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func QAndroidBinder_CallTypeItemName(val int) string {

// keep block begin

func init() {
func init_unused_14907() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func (this *QAndroidIntent) Handle() *QAndroidJniObject /*123*/ {

// keep block begin

func init() {
func init_unused_14909() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidjnienvironment.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (this *QAndroidJniEnvironment) FindClass(className string) unsafe.Pointer /

// keep block begin

func init() {
func init_unused_14911() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidjniexceptioncleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func QAndroidJniExceptionCleaner_OutputModeItemName(val int) string {

// keep block begin

func init() {
func init_unused_14913() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidjniobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (this *QAndroidJniObject) IsValid() bool {

// keep block begin

func init() {
func init_unused_14903() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidparcel.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (this *QAndroidParcel) Handle() *QAndroidJniObject /*123*/ {

// keep block begin

func init() {
func init_unused_14915() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (this *QAndroidService) OnBind(intent QAndroidIntent_ITF) *QAndroidBinder /

// keep block begin

func init() {
func init_unused_14917() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qandroidserviceconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (this *QAndroidServiceConnection) Handle() *QAndroidJniObject /*123*/ {

// keep block begin

func init() {
func init_unused_14919() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtandroidextras/qfunctions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "unsafe"
import "github.com/kitech/qt.go/qtrt"
import "github.com/kitech/qt.go/qtcore"

func init() {
func init_unused_10001() {
if false {
_ = unsafe.Pointer(uintptr(0))
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/abstractcomparatorfunction.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func DeleteAbstractComparatorFunction(this *AbstractComparatorFunction) {

// keep block begin

func init() {
func init_unused_10237() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/abstractconverterfunction.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func DeleteAbstractConverterFunction(this *AbstractConverterFunction) {

// keep block begin

func init() {
func init_unused_10239() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/abstractdebugstreamfunction.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func DeleteAbstractDebugStreamFunction(this *AbstractDebugStreamFunction) {

// keep block begin

func init() {
func init_unused_10235() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/externalrefcountdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func ExternalRefCountData_Operator_delete1(arg0 unsafe.Pointer /*666*/, arg1 uns

// keep block begin

func init() {
func init_unused_10335() {
if false {
reflect.TypeOf(123)
}
Expand Down
25 changes: 0 additions & 25 deletions qtcore/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,41 +152,16 @@ func (this *QModelIndexListx) SetCthis(cthis unsafe.Pointer) {
func NewQModelIndexListxFromPointer(cthis unsafe.Pointer) *QModelIndexListx {
return &QModelIndexListx{&qtrt.CObject{cthis}}
}
func NewQModelIndexListFromPointer(cthis unsafe.Pointer) *QModelIndexList {
return &QModelIndexList{&qtrt.CObject{cthis}}
}
func (*QModelIndexListx) NewFromPointer(cthis unsafe.Pointer) *QModelIndexListx {
return NewQModelIndexListxFromPointer(cthis)
}

func (this *QModelIndexListx) At(i int) *QModelIndex {
rv, err := qtrt.InvokeQtFunc6("C_QModelIndexList_at_0", qtrt.FFI_TYPE_POINTER, this.GetCthis(), i)
qtrt.ErrPrint(err, rv)
return NewQModelIndexFromPointer(unsafe.Pointer(uintptr(rv)))
}

func (this *QModelIndexListx) Count(that *QModelIndex) int {
rv, err := qtrt.InvokeQtFunc6("C_QModelIndexList_count_0", qtrt.FFI_TYPE_POINTER, this.GetCthis(), that.GetCthis())
qtrt.ErrPrint(err, rv)
return qtrt.Cretval2go("int", rv).(int)
}
func (this *QModelIndexListx) Count1() int {
rv, err := qtrt.InvokeQtFunc6("C_QModelIndexList_count_1", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
return qtrt.Cretval2go("int", rv).(int)
}

func (this *QModelIndexListx) ConvertToSlice() (lst []*QModelIndex) {
for i := 0; i < this.Count1(); i++ {
lst = append(lst, this.At(i))
}
return
}

func (*QModelIndexListx) ConvertFromSlice(lst []*QModelIndex) *QModelIndexListx {
return nil
}

/////
type QVariantListx struct {
*qtrt.CObject
Expand Down
36 changes: 36 additions & 0 deletions qtcore/mod.nomin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// +build !minimal

package qtcore

import (
"unsafe"

"github.com/kitech/qt.go/qtrt"
)

func NewQModelIndexListFromPointer(cthis unsafe.Pointer) *QModelIndexList {
return &QModelIndexList{&qtrt.CObject{cthis}}
}

func (this *QModelIndexListx) At(i int) *QModelIndex {
rv, err := qtrt.InvokeQtFunc6("C_QModelIndexList_at_0", qtrt.FFI_TYPE_POINTER, this.GetCthis(), i)
qtrt.ErrPrint(err, rv)
return NewQModelIndexFromPointer(unsafe.Pointer(uintptr(rv)))
}

func (this *QModelIndexListx) Count(that *QModelIndex) int {
rv, err := qtrt.InvokeQtFunc6("C_QModelIndexList_count_0", qtrt.FFI_TYPE_POINTER, this.GetCthis(), that.GetCthis())
qtrt.ErrPrint(err, rv)
return qtrt.Cretval2go("int", rv).(int)
}

func (this *QModelIndexListx) ConvertToSlice() (lst []*QModelIndex) {
for i := 0; i < this.Count1(); i++ {
lst = append(lst, this.At(i))
}
return
}

func (*QModelIndexListx) ConvertFromSlice(lst []*QModelIndex) *QModelIndexListx {
return nil
}
2 changes: 1 addition & 1 deletion qtcore/normaldeleter.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func DeleteNormalDeleter(this *NormalDeleter) {

// keep block begin

func init() {
func init_unused_10333() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstractanimation.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ func QAbstractAnimation_DeletionPolicyItemName(val int) string {

// keep block begin

func init() {
func init_unused_10257() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstractconcatenable.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func DeleteQAbstractConcatenable(this *QAbstractConcatenable) {

// keep block begin

func init() {
func init_unused_10557() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstracteventdispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (this *QAbstractEventDispatcher) Awake() {

// keep block begin

func init() {
func init_unused_10265() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstractitemmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,7 @@ func QAbstractItemModel_CheckIndexOptionItemName(val int) string {

// keep block begin

func init() {
func init_unused_10287() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstractlistmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (this *QAbstractListModel) Flags(index QModelIndex_ITF) int {

// keep block begin

func init() {
func init_unused_10291() {
if false {
reflect.TypeOf(123)
}
Expand Down
2 changes: 1 addition & 1 deletion qtcore/qabstractnativeeventfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (this *QAbstractNativeEventFilter) NativeEventFilter(eventType QByteArray_I

// keep block begin

func init() {
func init_unused_10293() {
if false {
reflect.TypeOf(123)
}
Expand Down
Loading

0 comments on commit 7194d9a

Please sign in to comment.