amlwwalker / got-qt

A framework for building cross platform GUI interfaces in Go and QML
MIT License
300 stars 14 forks source link

Mobiles #4

Open ghost opened 6 years ago

ghost commented 6 years ago

Great idea for the hot loading. Have you tried this on a mobile emulator as a way to develop faster. If I understand this you run the golang code and the qt process separately ?

amlwwalker commented 6 years ago

Hi, (I will comment on mobile in a moment) So my build process tends to go:

  1. Build a console app and build out all the functionality of the app (see _cuiinterface folder). It doesn't need to be the greatest user experience, just enough so that you can test all the apps features, get everything working, and have 95% of the functional code in place. I do this, because console app compilation is very fast.
  2. Once I have built out what i think the functionality needs to be, I start work on the qml front end using the hotloader. While designing the front end, I can work out what interaction I need between the front end and the back end, and can start putting the needed signals and slots in place (but not recompile yet). Once the front end is able to do everything the console app can do (visually/functionally), I wire the signals/slots up to the backend functions (this should be very easy as it should be identical to how the console app works).
  3. Recompile everything and test the front end is doing what the console app did.

Rinse and repeat until the app is complete. Its quite a nice discipline as you build out the functionality in a way totally decoupled to the front ends (and minimal compiles).

So... to your question. I did try on an Android emulator, however, having my android phone wired to computer, and using adb install -r deploy/android/build-debug.apk I could test the app very quickly (and frankly the compile/build is the slowest part by a long way). So I didn't find it necessary to configure the emulator, although it should be straight forward with the android-emulator docker container

Iphone haven't tried - would love someone to work out this process. The issue is I installed built Qt with brew, but for iphone need proper Qt installation and I haven't got space on laptop at the moment

The golang/qt process is the same process always (I don't bother with Qt creator or anything). However they run on different Go routines.

ghost commented 6 years ago

thats makes sense.

I do exactly the same methodology with Flutter and golang.

  1. Console app first in golang with golang backend
  2. Then flutter app
  3. then wire up flutter to golang.

I used therecipe stuff for a while but the licensing thing scared me off :)

If you could get your code a bit more filled out with examples and makefile, i reckon its very possible that we can make a library with work for Flutter and QML. That would be a pretty cool thing.

On Wed, 11 Apr 2018 at 12:13 Alex Walker notifications@github.com wrote:

Hi, (I will comment on mobile in a moment) So my build process tends to go:

  1. Build a console app and build out all the functionality of the app (see _cuiinterface folder). It doesn't need to be the greatest user experience, just enough so that you can test all the apps features, get everything working, and have 95% of the functional code in place. I do this, because console app compilation is very fast.
  2. Once I have built out what i think the functionality needs to be, I start work on the qml front end using the hotloader. While designing the front end, I can work out what interaction I need between the front end and the back end, and can start putting the needed signals and slots in place (but not recompile yet). Once the front end is able to do everything the console app can do (visually/functionally), I wire the signals/slots up to the backend functions (this should be very easy as it should be identical to how the console app works).
  3. Recompile everything and test the front end is doing what the console app did.

Rinse and repeat until the app is complete. Its quite a nice discipline as you build out the functionality in a way totally decoupled to the front ends (and minimal compiles).

So... to your question. I did try on an Android emulator, but there was something about the emulated chip that caused it to crash. I'm sure if I had spent a bit of time I could have got it working, however, having my android phone wired to computer, and using adb install -r deploy/android/build-debug.apk I could test the app very quickly (and frankly the compile/build is the slowest part by a long way). So I didn't find it necessary to configure the emulator.

Iphone haven't tried - would love someone to work out this process.

The golang/qt process is the same process always (I don't bother with Qt creator or anything). However they run on different Go routines.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amlwwalker/got-qt/issues/4#issuecomment-380401185, or mute the thread https://github.com/notifications/unsubscribe-auth/ATuCwsQk1S6Q_A2Aen6aDerpMgY-BmvZks5tndddgaJpZM4TPLQl .

amlwwalker commented 6 years ago

Can you suggest some examples that would give you more/enough? I'll try and produce some. Currently working on a project using this repo as a basis, so am slowly moving things I need into this repo.

ghost commented 6 years ago

I think a good first step is to make a Makefile.. Then its very easy for a newbiew like me to see the stesp involved to get things working together. I find Makefiles with single line for each Task to be way way better than reams of documentation etc.

That will allow me and others to try out your current code easily and understand the steps.

i woudl even include in the Makefile the calls you need to make to get therecipe code installed and the QT code insatlled on MacOS. Forget other OS's for now.

Is that cool ?

amlwwalker commented 6 years ago

Ok, lets see how this goes. Ive created a branch (makefile) where I have added a make file and instructions on using it: https://github.com/amlwwalker/got-qt/blob/makefile/MAKEFILE.md

So the only thing you will need to do differently is to make sure you checkout the makefile branch before following instructions. It hopefully will run you through all the setup to have a project running. Let me know if you get stuck. Heading out but back on this tomorrow A

P.S make install will try and clone this repo, i thought it might be useful if the makefile could be used standalone. If you have already cloned the repo, then it will gracefully just continue

ghost commented 6 years ago

Awesome stuff. I have been concentrating on getting golang and flutter smoothed out with each other. Will pull your code and play around to find the convergence points so we can do QT and flutter.

Flutter on desktop is getting pretty stable now btw.

On Fri, Apr 13, 2018, 7:53 PM Alex Walker notifications@github.com wrote:

Ok, lets see how this goes. Ive created a branch (makefile) where I have added a make file and instructions on using it: https://github.com/amlwwalker/got-qt/blob/makefile/MAKEFILE.md

So the only thing you will need to do differently is to make sure you checkout the makefile branch before following instructions. It hopefully will run you through all the setup to have a project running. Let me know if you get stuck. Heading out but back on this tomorrow

A

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amlwwalker/got-qt/issues/4#issuecomment-381213653, or mute the thread https://github.com/notifications/unsubscribe-auth/ATuCwo4yDQxH6-pSLV9pjUitDoqgSt20ks5toOYVgaJpZM4TPLQl .

amlwwalker commented 6 years ago

screw it, I've merged this in as I have run it multiple times on my machine. It's tricky to know if the setup/install works as I already have all that configured, but I figure if its in master more people will come across it and more likely to discover a bug....

So its now in master - the makefile I mean

ghost commented 6 years ago

i know what you mean. Wil give it a whirl :)

On Sat, 14 Apr 2018 at 12:58 Alex Walker notifications@github.com wrote:

screw it, I've merged this in as I have run it multiple times on my machine. It's tricky to know if the setup/install works as I already have all that configured, but I figure if its in master more people will come across it and more likely to discover a bug....

So its now in master - the makefile I mean

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amlwwalker/got-qt/issues/4#issuecomment-381321079, or mute the thread https://github.com/notifications/unsubscribe-auth/ATuCwpxOZv4L70af9K1bl1iD3nPgVMcGks5todZFgaJpZM4TPLQl .