Skip to content

goqmlsnowloadcount is an Ubuntu Desktop/Touch wizard-gui skeleton with next/previous/finish buttons that uses Ubuntu touch tab components. Work in progress.

Notifications You must be signed in to change notification settings

omac777/goqmlsnowloadcount

Repository files navigation

So here is the entire recipe from start to finish
to get a go-qml based skeleton application running on Google Nexus 4 with Ubuntu Touch.
In this example we will use the recipe to demonstrate
running goqmlsnowloadcount, an Ubuntu Touch wizard-gui
with next/previous/finish buttons
that uses Ubuntu touch tab components.
The golang backend in goqmlsnowloadcount is still a work in progress.

Step 1)(15-20 minutes)
Flash your Google Nexus 4 phone with the latest android firmware.
This is to get the radio firmware from the latest:
https://dl.google.com/dl/android/aosp/occam-kot49h-factory-02e344de.tgz
tar xvf occam-kot49h-factory-02e344de.tgz
Connect your phone to your computer.
cd occam-kot49h/
The following line puts your phone into recovery mode:
adb reboot-bootloader
Then this command flashes the latest android firmware:
./flash-all.sh

Step 2)(15-20 minutes)
Flash your Google Nexus 4 phone with the latest version of Ubuntu Touch devel-propose r301 version.
Make sure your phone is connected to the computer.
Make sure to put the phone in recovery mode:
adb reboot-bootloader
sudo apt-get install ubuntu-device-flash
ubuntu-device-flash --revision=301 --channel=devel-proposed --bootstrap

Step 3)(1 minute)
Start talking to your phone from your computer
On your computer, place this in a file called /home/youruser/.bash_aliases
alias sd='adb shell start ssh; <br> adb forward tcp:2222 tcp:22; <br> ssh-keygen -f /.ssh/known_hosts -R [localhost]:2222; <br> ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no <br>
Now open up a ssh session to your phone:
sd
It will return with the following prompt:
phablet@ubuntu-phablet:
/$

Step 3)(5 minutes)
From your ssh session, install the prerequisites for running go-qml infrastructure.
mkdir -p /home/phablet/goqmlstuff
export GOPATH=/home/phablet/goqmlstuff
sudo apt-get install git golang pkg-config golang-go.tools
sudo apt-get install qtbase5-private-dev
sudo apt-get install qtdeclarative5-private-dev
sudo apt-get install libqt5opengl5-dev
sudo apt-get install gccgo gccgo-go
Once you have install the packages, you don't need the .deb files taking up precious space
so we remove them to avoid getting "storage exceeded" errors.
sudo apt-get clean
sudo apt-get autoremove

These packages are huge so install them and then remove the .deb files.
sudo apt-get install g++ g++-multilib
sudo apt-get clean
sudo apt-get autoremove

Step 4)(2 minutes)
Install go-qml
go get gopkg.in/qml.v0
cd /home/phablet/goqmlstuff/src/gopkg.in/qml.v0/examples/customtype
go build
This should prove that you can build golang qml apps.

Step 5)(2 seconds)
Install goqmlsnowloadcount
cd /home/phablet/goqmlstuff
go get github.com/omac777/goqmlsnowloadcount
Step 6)(3 seconds)
Build goqmlsnowloadcount
cd /home/phablet/goqmlstuff/src/github.com/omac777/goqmlsnowloadcount
go build

Step 7)(2 seconds)
Run goqmlsnowloadcount
cd /home/phablet/goqmlstuff/src/github.com/omac777/goqmlsnowloadcount
cp /home/phablet/goqmlstuff/src/github.com/omac777/goqmlsnowloadcount/test.desktop /home/phablet/.local/share/applications/test.desktop
APP_ID=goqmlsnowloadcount ./goqmlsnowloadcount --desktop_file_hint=/home/phablet/.local/share/applications/test.desktop

Step 8)
Debugging the application directly on the Google Nexus 4
8.1)Start the GNU Debugger directly on the Google Nexus 4:
APP_ID=goqmlsnowloadcount gdb ./goqmlsnowloadcount
8.2)From within gdb, run the application using the required desktop_file_hint argument:
r --desktop_file_hint=/home/phablet/.local/share/applications/test.desktop

That's it.
Have fun coding/debugging your own stuff with golang and qml directly on your Google Nexus 4 :)

About

goqmlsnowloadcount is an Ubuntu Desktop/Touch wizard-gui skeleton with next/previous/finish buttons that uses Ubuntu touch tab components. Work in progress.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages