amlwwalker / got-qt

A framework for building cross platform GUI interfaces in Go and QML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarifying the install steps

omac777 opened this issue · comments

amlwwalker, you ROCK!!! Your approach will definitely help to save time in the development cycle.

First follow the steps as described for github.com/therecipe/qt for using docker.
Then follow the steps as implied by amlwwalker for got-qt:

go get github.com/radovskyb/watcher
go get github.com/amlwwalker/got-qt 
cp -r got-qt $PROJECTNAME
cd $PROJECTNAME
cd qt
qtdeploy -docker build desktop .
cd deploy/linux/
./qt.sh 

OOPS "make hotload" doesn't work for linux.
I tried modifying a qml file within pages/
and it didn't change update the gui to reflect the width height changes I made to the main app window.
I also attempted to change a menu name from "Dark Fruit" to "Dark Fruit Blah" within both loader and production loader qml files and neither updated the main app window.
These changes only came into effect after rebuilding everything, BUT the amount of time to build is the same as just github.com/therecipe/qt. If that's the case, where are the benefits of using got-qt?

Hello!
Right, yes, it doesn't work for linux because I am not on linux and have been building out the makefile based on requests (from people like yourself).
If you see this converation, you can see how the makefile came about: #4

So...
Firstly, if you have everything building manually then great, but I recommend using make createproject PROJECTNAME=testproject for making a new project off of this one, as described here: https://github.com/amlwwalker/got-qt/blob/master/MAKEFILE.md

Then, if you look inside the makefile, you will see that all make hotload is doing is

	cd ${GUI_DIR}; \
	/deploy/darwin/${GUI_DIR}.app/Contents/MacOS/${GUI_DIR}

I.e it is going inside the GUI directory (that is named qt) and then runs the deployed binary directly. These two steps are necessary because whether or not to hotload is defined in config.json and that needs to be at the current relative location from where the binary is run from.

However as I haven't built it for linux myself, I haven't seen the absolute path where it gets built. On a Mac, its inside the .app directory /deploy/darwin/${GUI_DIR}.app/Contents/MacOS/ and as you can see darwin and MacOS is in the path, and it definately won't be that for linux!

So, two things.

  1. I have actually made a few changes to the config.json build process but I haven't pushed it up here yet as I am still testing it. It will make it easier to use though
  2. In the mean time, what would be great is if you could edit your makefile so that the hardcoded path to the linux build replaces the MacOS one, then tell me what that path is, and I'll update the makefile so it hotloads on linux, and make it so it handles the OS automatically.
  • Yes build time won't be faster than therecipe/qt, the point here is the hotloading of the qml at runtime.
  • I am going to be making more changes to the code structure soon around the qml to make it easier to build this. As I say in the (admittedly overly wordy) readme, this is early stage, and I am actively using it to build cross platform Gui apps, and each time I run into an inconvenience I am updating this repo, but any help from people on other platforms is appreciated!

Let me know if that helps. If it doesnt perhaps some further debugging or I might be able to get access to a Linux VM later this week or next. I think however it should be reasonably straight forward for me to adjust the makefile to work for you

Just noticed you asked this a while ago. Sorry it's taken a bit to get back to you.

Just so you know I have made some changes that you probably want:

  • I have added a NotificationHandler which handles what to do on different devices, and allows you to show notifications.
  • I have updated the code so that config.json gets compiled into the app. You have to have installed packr and run packr inside the qt directory.
  • I have added an untested make lxhotload to the makefile, so hopefully I have got the path right, and you should now have hotloading working on linux. If it doesn't see the bottom of the Makefile for how I have attempted to do it, and you should be able to reverse engineer any path error I have there. You will have needed to build the app first (make build) before running make lxhotload.
  • I have added the necessary files to have icons for OSX and Android, however not for linux yet.

I have updated the Readme, please see the section "Quick Start!" and the section "Development" which I have updated with more information about packr.

Let me know if this helps, and how you are getting on. Should be closer now.