Qml-Phone-Alternitive

Setup

I have seen many many troubles when it comes to people using Ubuntu SDK kit. Weather it be That they want to use it on some other version of Ubuntu that is not just Ubuntu 12.10. Or they want to use the Designer and can not figure out how to get it going. Or are just plain wondering about alternative methods that are out there. At the time of writing this tutorial I am using Ubuntu 12.04 But this should work for All Ubuntu version's. But all the Screen shots are coming from Ubuntu 12.04.

Some Things To Note

Ubuntu Phone uses Qml or Qt-Quick to make apps. There are many many tutorials out there about Qt-Quick So I am not going to touch that in this tutorial/whatever. Sonmething's that I have learned about Qtcreator are as follows

  • Ubuntu Using the Designer often leads to headaches and there are much easier ways which we will cover later on.

    Ubuntu Qt-Quick Is Awesome and real easy to work with. One can get things done real fast.

    Ubuntu Qt and all its libs are big so if you are downloading from a bad ISP this might take a while. But hang in there it is all worth it.

    Ubuntu Qml(Qt-Quick) has a IRC channel on the freenode network at #qt-qml there is also the channel #qt and #ubuntu-phone where one can find some live help if they get hung up on any of this.

Getting set up

  • As the title says this is the alternative method to doing this. Good news is it is easy to do the steps backwards and Qt comes with a maintainers script that one can use to remove Qt5.

Installing QT5

Speaking of Qt5 that is one thing that you are going to need. So download a copy.

Qt5 for 64 Bit

Qt5 for 32 Bit

I saved the Download to my Desktop so that I could find it real easy.

Important

If you have downloaded and installed qt5 beta 1 with the qt-edgers ppa that is on the developers.ubuntu.com site then you are going to need to back that up for now. So that you can use it later if you choose. So

 cd /opt 

 sudo cp -r qt5 qt5-bak 

Now make sure that you have backed it up run

 ls 

You should see a qt5-bak If not repeat the steps above till you do see this. at any rate after you have it all backed up, Delete the original one that you just backed up.

cd /opt 
sudo rm -r qt5 

Once that is done and so is the download It is time to install the new qt5 that you just downloaded. Lucky for us Qt5 comes with a great startup script(the .run file you just downloaded). We have to make sure that the .run file is marked as exacudable.

For 64 bit

cd ~/Desktop 
chmod +x qt-linux-opensource-5.0.0-x86_64-offline.run 

For 32 Bit

cd ~/Desktop 
chmod +x qt-linux-opensource-5.0.0-x86-offline.run 

Great so after that it is now time to install qt5 We want to install this to opt(hense remove backing up and renaming the old one). So we are going to need to be superuser to so this. So we use sudo when running the For 64 Bit

cd ~/Desktop 
sudo ./qt-linux-opensource-5.0.0-x86_64-offline.run 

For 32 Bit

cd ~/Desktop 
sudo ./qt-linux-opensource-5.0.0-x86-offline.run 

https://lh5.googleusercontent.com/-hckJ1jgnedY/UPXwCEwjaMI/AAAAAAAAAWM/DEPpcPQcAPc/w273-h214-p-k/Screenshot+from+2013-01-15+18%3A00%3A32.png

We will be presented with a screen that asks us where we want to install all this. It is important that we tell it to install to /opt/qt5/

https://lh6.googleusercontent.com/-QPTaA-BYurQ/UPXwCESsiQI/AAAAAAAAAWQ/fn-HhQx3vwU/w273-h214-n-k/Screenshot+from+2013-01-15+18%3A01%3A15.png

Then Pick the Lgpl licence and Install this thing. Once this is intsalled you will get to a screen that says would you like to launch qtcreator and the README files ? You can do this if you like or you can not. This is up to you.

Installing Qml Exporter

Qml Exported is used to design something in Gimp or Photoshop. The python script then exports all this to qml elements. This is a very handy tool and cuts down time on overall development 2 fold I would say. At any rate open up a Text editor of your choice and copy this to it. Then Save that file under your Gimp plugins area. example  /usr/lib/gimp/2.0/plug-ins/qmlexporter.py  
or
~/.gimp-2.8/plug-ins/qmlexporter.py 
or
~/.gimp-2.6/plug-ins/qmlexporter.py 

Qt Exporter in YouTube Video

Ubuntu SDK

This part can be kinda ticky due to the fact that it was wrote for a older qt version that was set up way different. But off to the races. Download the Sdk source code. You can get that Here

I saved this to my desktop So that I could find it easy

Now here it the thing about this package it installs to the wrong place for the imports file(I am sure that this will change in the future). So I think that it is just best to build this from source. So un-tar the tar ball. This should make a folder on your desktop called trunk. If you see this then good if not go back some steps. Once you have that all done it is time to configure it and install it (to its wrong place).

 cd ~/Desktop/trunk/
 /opt/qt5/5.0.0/gcc/bin/qmake 
 sudo make install 

Now we need to fix the fact that It installed to the wrong place so

 cd /opt/qt5/imports 
 sudo cp -r Ubuntu/ ../5.0.0/gcc/qml/ 

And there you go you should know be all set up to rock this. I hope that this helps and feel free to leave comments below on how this could be better. Or if you get stuck

Have Fun !!!

Reviews and Issues

Qml-Phone-Alternitive (last edited 2013-01-17 14:52:39 by 173-86-136-105)