Commit graph

853 commits

Author SHA1 Message Date
therecipe
0506a9f95d re-gen and make the cgo-less version the default one
This commit replaces the default (cgo) binding with a cgo-less one, which was generated by setting "QT_GEN_GO=true" prior running qtsetup.

The cgo-less version is still experimental and also lacking integration with most of the advanced features provided by qtmoc and qtrcc, but it should already be sufficiently stable and cover a great part of the basic features.

The intention for these changes are to simplify and speedup onboarding of new users, speedup development circles of existing users, simplify the usage of this package in a go module context and also to have the portable therecipe/qt runtime (http://github.com/therecipe/box) tested more broadly.

Also since this version removes all dependencies on cgo, one is now able to "go get" an project that makes use of therecipe/qt like this: ("go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && $(go env GOPATH)/bin/widgets") without any additional requirements.
2020-08-17 19:25:49 +02:00
therecipe
494d2f8c1e cgo-less interop related changes 2020-08-17 18:37:48 +02:00
therecipe
550ceb9a59 minor go interop related changes 2020-08-16 14:45:35 +02:00
therecipe
589db8f837 fix CI 2020-08-15 02:55:52 +02:00
therecipe
5e6cd68adc initial support for the cgo-less version of the binding 2020-08-14 10:48:38 +02:00
therecipe
77936453f6 minor go interop related changes 2020-08-14 02:34:04 +02:00
therecipe
250d4bee0a minor go interop related changes 2020-08-13 19:51:20 +02:00
therecipe
80c87e74d4 minor go interop related changes 2020-08-12 22:10:58 +02:00
therecipe
b44a7874e0 fix qtmoc go object related issues + initial support for the go interop wrapper to allow cgo-less usage of therecipe/qt 2020-08-12 14:39:11 +02:00
therecipe
7f61353ee7 add support for haxe and swift + fix interop stack overflow issue
* fix unsafe pointer arithmetic issues
2020-07-01 22:05:31 +02:00
therecipe
66b61001d1 more CI fixes + fixes for msys2 + fixes for flutter deployments + minor example changes 2020-06-05 20:45:20 +02:00
therecipe
b563561326 fix the CI image builds again + some flutter deployment related changes 2020-06-04 23:13:48 +02:00
therecipe
26cdb75b6f fix the CI image builds again + some flutter deployment related changes 2020-06-04 01:16:48 +02:00
therecipe
c94e36745d fix the CI image builds again + some flutter deployment related changes 2020-06-03 17:14:12 +02:00
therecipe
1a4a588c0b fix the CI image builds again + some flutter deployment related changes 2020-06-02 15:54:36 +02:00
therecipe
4e7b8703b1 initial commit of the interop engine + new flutter module + fixes for minor issues
this commit introduces the new experimental `interop` module, which is used to allow the use of `therecipe/qt` from languages other than go or javascript.
as a start, there was support for the dart language added (currently only in combination with a custom flutter embedder engine, but plain dart support should follow soon).
the interop module makes great use of the qml/js interop functions and logic that were written to make `https://github.com/therecipe/entry` possible.
additional languages that are planned to be supported in the near future are: swift, kotlin and haxe (maybe with support for the c#, python and java targets, but if this isn't possible in some clean way then these languages will receive standalone bindings as well).
people using `therecipe/qt` from these new languages should then be able to use flutter (and dart) in combination with qt (and go/js) through this binding and also be able to easily communicate across the language barriers with the help of the interop functions.
the interop engine theoretically also makes a cgo-less `therecipe/qt` usage possible, which could be used to workaround the ever growing annoyances that are experienced when using cgo projects in combination with go modules.
the code for the custom flutter embedder that was created to make the flutter/dart binding work can be found in the `flutter` module. it currently only supports debug builds for the desktop targets, but if there is enough interest, then it shouldn't be too difficult to make release builds there, and on the mobile targets work as well (or even on "embedded" systems such as an raspberry pi for that matter).
an example repo how to use the new flutter/dart binding, will be published in the next few days.
2020-06-01 21:40:46 +02:00
therecipe
bb0c051b43 fix the CI image builds again 2020-06-01 03:50:29 +02:00
therecipe
5da0129c71 fix the CI image builds again 2020-05-31 14:51:06 +02:00
therecipe
315191547f fix the CI image builds again + more fixes for Go 1.14 module issues 2020-05-31 04:46:40 +02:00
therecipe
e1f2cf7157 fix the CI image builds again + fix for Go 1.14 module issue 2020-05-31 01:30:13 +02:00
therecipe
fbe09d927c fix the CI image builds + fix QT_STUB 2020-05-30 19:47:09 +02:00
therecipe
5074eb6d8c fix NewQVariant1 issue + fix go module related issue 2020-01-26 21:44:26 +01:00
therecipe
606d6c7798 fixes for android deployments + new example + fix go module related issue 2020-01-25 21:18:38 +01:00
therecipe
781163f259
Merge pull request #1043 from angiglesias/master
Fixed mismatching -D__ANDROID_API__ cgo flag thorough building steps
2020-01-25 20:45:13 +01:00
Ángel
9d559bd895
Fixed mismatching -D__ANDROID_API__ cgo flag thorough building steps
Signed-off-by: Ángel <angelo.fly1@gmail.com>
2020-01-09 08:48:50 +01:00
therecipe
2b818d9708 fix entry deployment 2020-01-03 05:10:36 +01:00
therecipe
f80c0f768c fix go module binary size issue 2020-01-03 00:36:43 +01:00
therecipe
1b040f91f3 fix docker images for azure + minor improvements 2019-12-29 19:21:18 +01:00
therecipe
4ee12d6ea9 fix static darwin docker deployments 2019-12-23 01:02:14 +01:00
therecipe
dc5ba07e92 fix static darwin docker deployments + minor example fix 2019-12-22 02:32:47 +01:00
therecipe
5e239f03fa fix windows_64_shared_msvc docker image 2019-12-21 23:14:30 +01:00
therecipe
2739948a6b fix static darwin build script again 2019-12-21 20:59:09 +01:00
therecipe
5553948cb5 fix static darwin build script 2019-12-21 19:43:02 +01:00
therecipe
aa8a227277 even more changes related to the js binding + fixes for Qt 5.14
* support for static darwin docker deployments
2019-12-21 17:42:05 +01:00
therecipe
0cc82d7b2f more changes related to the js binding 2019-12-12 20:47:54 +01:00
therecipe
3b69292fad fixes for js binding related issues
* option to generate TypeScript definitions with QT_GEN_TSD=true
2019-12-10 19:34:02 +01:00
therecipe
6dbef71d44 various changes related to the js binding 2019-12-10 17:08:50 +01:00
therecipe
47559b8cfa fixes for various potential memory leaks
* speedup js binding generation + minor js related fixes
* support for private quickcontrols2 classes with `QT_GEN_QUICK_EXTRAS=true`
* fix for static linux deployment issue
* minor example updates
* fix for minor qtmoc docker related issue
2019-11-28 18:42:54 +01:00
therecipe
0f56c6673a fix webkit module 2019-11-20 15:58:34 +01:00
therecipe
d5ef93df38 fix deployment size issue + new plugins examples 2019-11-20 15:18:39 +01:00
therecipe
93eff24f30 fix for older Qt versions + fixes for msys2 docker images 2019-11-18 22:07:58 +01:00
therecipe
a3b8ce73c7 more fixes for older Qt versions 2019-11-18 03:07:49 +01:00
therecipe
39d3d3f299 fixes for older Go and Qt versions 2019-11-17 22:12:35 +01:00
therecipe
3738bb9320 greatly extend the Go <-> Qml/JS interoperability
These changes introduce two new functions called (*qml.QJSEngine).NewGoType and (*qml.QJSEngine).ToGoType, that can be used (similiar to how core.NewQVariant1 and (*core.QVariant).ToGoType can be used) to convert Go objects and functions to *qml.QJSValues and vice versa.
This allows for a more natural communication between Go and Qml/JS and makes it possible to simply pass a Go structs to Qml/JS and then call Go methods on that object.
For this to work, the object passed to Qml/JS needs to implement the `Pointer() unsafe.Pointer` and `SetPointer(unsafe.Pointer)` functions atm.
Which means, since all Qt classes already implement these functions, that you can now use the whole binding from Qml/JS as well and theoretically create a full Qt application inside an QJSEngine as well. A few example applications almost entirely written in JS can be found here: https://github.com/therecipe/examples/tree/master/js/
Furthermore, the `widgets_playground` example (https://github.com/therecipe/widgets_playground) now fully works on desktop and mobile targets as well.

other changes:
* core.NewQVariant1 and (*core.QVariant).ToGoType now recognize json tags
* workaround for qtmoc issue related to named imports
* speed-up go module android docker deployments
* fix webengine related qtdeploy bug on macOS
* fix int overflow issue for arm docker images
* fix js docker images
2019-11-17 18:05:18 +01:00
therecipe
5875595329
Merge pull request #1011 from angiglesias/feature-configurable_android_api
Added suport for customizable Android API level
2019-11-10 20:02:33 +01:00
therecipe
20ac5c183d bump recursive guard version 2019-11-10 20:00:15 +01:00
therecipe
6e660afb3d fix go module related docker deployment issue + hide env patch fallback warning for non go module dev on macOS + fix docker images 2019-11-10 19:46:04 +01:00
therecipe
c9ba132582 fix various minor issues 2019-11-08 13:54:10 +01:00
Ángel
5782c449a3
Added suport for customizable Android API level
The Android API level can be customized changing the ANDROID_NDK_PLATFORM environment variable in
the host system. The value of this variable will be passed to QMake to generate the correct flags
required to build cgo using the Android NDK toolchain as backend.

Signed-off-by: Ángel <angelo.fly1@gmail.com>
2019-11-08 13:45:48 +01:00
therecipe
18864661ae fix qtminimal issue + azure pipelines windows go module ci job 2019-11-02 00:23:36 +01:00