fix android ptr issue + mxe win 64 docker issue + remove warnings for msys2 and pkg-config

This commit is contained in:
therecipe 2017-07-28 22:05:36 +02:00
parent 8ca9dc8f59
commit 4fbdae21b3
5 changed files with 26 additions and 17 deletions

View file

@ -2409,7 +2409,7 @@ func (ptr *QAndroidJniObject) SetStaticField3(clazz unsafe.Pointer, fieldName st
func (ptr *QAndroidJniObject) DestroyQAndroidJniObject() {
if ptr.Pointer() != nil {
qt.DisconnectAllSignals(ptr.ToString(), "")
qt.DisconnectAllSignals(ptr.Pointer(), "")
C.QAndroidJniObject_DestroyQAndroidJniObject(ptr.Pointer())
ptr.SetPointer(nil)
runtime.SetFinalizer(ptr, nil)

View file

@ -207,6 +207,7 @@ func ShouldBuildForTarget(module, target string) bool {
if strings.HasSuffix(module, "Extras") && module != "WinExtras" {
return false
}
case "android", "android-emulator":
switch module {
case "DBus", "WebEngine", "Designer", "PrintSupport": //TODO: PrintSupport
@ -215,6 +216,7 @@ func ShouldBuildForTarget(module, target string) bool {
if strings.HasSuffix(module, "Extras") && module != "AndroidExtras" {
return false
}
case "ios", "ios-simulator":
switch module {
case "DBus", "WebEngine", "SerialPort", "SerialBus", "Designer", "PrintSupport": //TODO: PrintSupport
@ -223,10 +225,12 @@ func ShouldBuildForTarget(module, target string) bool {
if strings.HasSuffix(module, "Extras") {
return false
}
case "sailfish", "sailfish-emulator", "asteroid":
if !IsWhiteListedSailfishLib(module) {
return false
}
case "rpi1", "rpi2", "rpi3":
switch module {
case "WebEngine", "Designer":
@ -243,14 +247,10 @@ func ShouldBuildForTarget(module, target string) bool {
func IsWhiteListedSailfishLib(name string) bool {
switch name {
case "Sailfish", "Core", "Quick", "Qml", "Network", "Gui", "Concurrent", "Multimedia", "Sql", "Svg", "XmlPatterns", "Xml", "DBus", "WebKit", "Sensors", "Positioning":
{
return true
}
return true
default:
{
return false
}
return false
}
}
@ -326,6 +326,9 @@ func GetLibs() []string {
case !utils.QT_WEBKIT() && libs[i] == "WebKit":
libs = append(libs[:i], libs[i+1:]...)
case (utils.QT_MSYS2() || utils.QT_PKG_CONFIG()) && libs[i] == "Purchasing":
libs = append(libs[:i], libs[i+1:]...)
}
}
return libs

View file

@ -79,7 +79,7 @@ func goFunctionBody(function *parser.Function) string {
if class.Name == "QAndroidJniObject" {
if strings.HasPrefix(function.Name, parser.TILDE) {
fmt.Fprint(bb, "qt.DisconnectAllSignals(ptr.ToString(), \"\")\n")
fmt.Fprint(bb, "qt.DisconnectAllSignals(ptr.Pointer(), \"\")\n")
}
for _, parameter := range function.Parameters {

View file

@ -67,18 +67,18 @@ func virtual(arg []string, target, path string, writeCacheToHost bool, docker bo
var image string
switch target {
case "windows":
if utils.QT_MXE_ARCH() == "386" || utils.QT_MSYS2_ARCH() == "386" {
if utils.QT_MXE_STATIC() || utils.QT_MSYS2_STATIC() {
image = "windows_32_static"
} else {
image = "windows_32_shared"
}
} else {
if utils.QT_MXE_ARCH() == "amd64" || utils.QT_MSYS2_ARCH() == "amd64" {
if utils.QT_MXE_STATIC() || utils.QT_MSYS2_STATIC() {
image = "windows_64_static"
} else {
image = "windows_64_shared"
}
} else {
if utils.QT_MXE_STATIC() || utils.QT_MSYS2_STATIC() {
image = "windows_32_static"
} else {
image = "windows_32_shared"
}
}
if !docker {
image = target
@ -232,6 +232,12 @@ func virtual(arg []string, target, path string, writeCacheToHost bool, docker bo
}
if docker {
for i := range args {
if strings.HasPrefix(args[i], "windows_") {
args[i] = "windows"
}
}
utils.RunCmd(exec.Command("docker", args...), fmt.Sprintf("deploy binary for %v on %v with docker", target, runtime.GOOS))
} else {
switch target {

4
qt.go
View file

@ -112,8 +112,8 @@ func DisconnectAllSignals(cPtr unsafe.Pointer, signal string) {
func DumpSignals() {
Debug("##############################\tSIGNALSTABLE_START\t##############################")
signalsMutex.Lock()
for entry := range signals {
Debug(entry)
for cPtr, entry := range signals {
Debug(cPtr, entry)
}
signalsMutex.Unlock()
Debug("##############################\tSIGNALSTABLE_END\t##############################")