HERE : Develop MeeGo Touch Application inside MeeGo Touch OS

HERE : Develop MeeGo Touch Application inside MeeGo Touch OS

MeeGo is Fun. My target is to bring as much new software developer as possible, once they feel the experience, they'll love it.

I love MeeGo. Thanks all for the hard work supporting MeeGo.

 

Many newcomers need a clear start point about how and where to start touch-screen application development. Here is step by step, from scratch tutorial.

I want to share the way I do to develop MeeGo applications on MeeGo 1.2 Tablet without having to develop from another OS or to run virtual target device to deploy and test the result.

Just follow this easy 21 steps.

I really hope that MeeGo itself can be listed as full development host along with Ubuntu 10.04, 10.10; Fedora 13, 14; Windows XP and Windows 7. Please consider to make this the default package in the next Release, it will accelerate the growth of MeeGo, since no other tablet OS provide this.

 

I have Lenovo S10-3t, I installed Meego Touch UX, and play with it. If anyone succeed doing similar thing on another MeeGo Environment, please update here, so that we can make a better guide.

I think MeeGo 1.2 Netbook edition is a better environment, I have not test that on the netbook edition, but I believe that it will work too, at least, with only minor changes.

I really appreciate any suggestion regarding this, any simpler way, any correction, to give contribution for MeeGo.

Please share your suggestion or idea or correction here, so that anyone who just start learning can have complete knowledge.

 

For anyone who new to MeeGo and want to learn about application development, please follow the detail.

Any question is welcome, I believe that many people with deeper knowledge will be pleased to help, right guys..?

 

Note : for your convenience if you need to repeat all the setup at later time, I also include in the instruction for saving the resources on another media,

this is very usefull to save time because some of the files are quite large.

 

Note : This guidance is made in accordance with existing sources, however, updates happened, if you can not find the link/s, please trace up the url and check for a higher version.

 

Here is a clean setup :

Right after a fresh installation of MeeGo 1.2 Tablet OS ( you can get it here and follow the instruction here ), then do this :

 

01. Make sure you establish the internet connection.

 

02. Open a terminal, switch to root, the default password is "meego".

      Type : su - root (return)

 

03. Refresh the software repository cache.

      Type : zypper refresh (return)

 

04. Install disk manager application (you don't need this if the OS, maybe netbook edition already included this tool)

      This tool let you manage your external disk easier, ie, USB disk.

      Type : zypper install gnome-disk-utility (return)

 

05. Open the internet browser, set the url to : http://download.meego.com/live/Tools:/SDK:/Host:/1.2/MeeGo_1.2/i586/

       Save the following package files, when finished, you can find them in /home/meego/Downloads directory

               meego-sdk-libqtdesigner4-4.7.2-3.5.i586.rpm

               meego-sdk-libqthelp4-4.7.2-3.5.i586.rpm

               meego-sdk-libphonon4-4.7.2-3.5.i586.rpm

               meego-sdk-libqtwebkit4-4.7.2-3.5.i586.rpm

               meego-sdk-libattica0-0.2.80-1.5.i586.rpm

               meego-sdk-libqtsql4-sqlite-4.7.2-3.5.i586.rpm

               meego-sdk-qt-qmake-4.7.2-3.5.i586.rpm

               meego-sdk-qt-creator-2.1.0-3.5.i586.rpm

               meego-sdk-libmeegotouch-0.20.89-1.1.i586.rpm

               utfs-server-1.959-3.1.i586.rpm

               madde-0.7.63-1.1.i586.rpm

               madde-config-common-0.7.59-3.1.i586.rpm

               madde-config-ia32-0.7.59-3.1.i586.rpm

               meego-1.2-sdk-ia32-toolchain-1.0-6.1.i586.rpm

               qt-tools-4.7.2-2.5.i586.rpm

 

06. Change your url to http://repo.meego.com/MeeGo/builds/stable/1.2.0.90/1.2.0.90.0.20110517.1/images/meego-tablet-ia32-madde-sysroot/

      Download : meego-tablet-ia32-madde-sysroot-1.2.0.90.0.20110517.1-fs.tar.bz2

 

07. Change your url to http://repo.meego.com/MeeGo/builds/stable/1.2.0.90/1.2.0.90.0.20110517.1/images/meego-tablet-ia32-qemu/

      Download : meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-raw.tar.bz2

 

08. Go back to terminal, install all the rpm files according to the listed order in step 5 to avoid dependencies problem.

      Type as root : rpm -ivh rpm_filename_in_downloads_directory (return)

 

09. Copy two files downloaded in step 6 and 7 to /usr/lib/madde/linux-i686/cache

 

10. Create a file, name it : meego-tablet-ia32-1.2.0.90.0.20110517.1.conf

      Put the following text as the content of the file :

---> start after this line :

require meego-core-ia32-trunk

 

target meego-tablet-ia32-1.2.0.90.0.20110517.1

                 sysroot meego-tablet-ia32-madde-sysroot-1.2.0.90.0.20110517.1-fs.tar.bz2

                 toolchain meego-1.2-sdk-ia32-toolchain

                 runtine meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-runtime

                 ccxopts -m32 -march=core2 -mssse3 -mtune=atom -mfpmath=sse

                 qttools qt-tools-4.7.2

                 arch i586

                 os Linux

end

 

runtime meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-runtime

                 image meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-raw.tar.bz2

                 qemu qemu-meego-1.2

                 args qemugl-args-1.2

                 args-common -hda meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-sda.raw -skin ../../tools/qemu-meego/skin/1280x800/skin/skin.xml -L ../../tools/qemu-meego/skin/1280x800 -usbdevice tablet

end

 

file meego-tablet-ia32-madde-sysroot-1.2.0.90.0.20110517.1-fs.tar.bz2

                 url http://repo.meego.com/MeeGo/builds/stable/1.2.0.90/1.2.0.90.0.20110517.1/images/meego-tablet-ia32-madde-sysroot/meego-tablet-ia32-madde-sysroot-1.2.0.90.0.20110517.1-fs.tar.bz2

end

 

file meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-raw.tar.bz2

                 url http://repo.meego.com/MeeGo/builds/stable/1.2.0.90/1.2.0.90.0.20110517.1/images/meego-tablet-ia32-qemu/meego-tablet-ia32-qemu-1.2.0.90.0.20110517.1-raw.tar.bz2

end

---> stop before this line, yes, this line you are reading

 

11. Copy the file created in step 10 to /usr/lib/madde/linux-i686/cache/madde.conf.d/

 

12. To check whether the .conf file loaded correctly, type : mad-admin list (return)

      You should see : meego-tablet........." on the list

 

13. Here, we setup the sysroot image for madde.

      Type : mad-admin create -f meego-tablet-ia32-1.2.0.90.0.20110517.1 (return)

 

14. After the above steps, we will do some setting in QT Creator IDE to fulfill the requirement of creating MeeGo Touch applications.

      From the terminal (as user "meego" or root, whatever you like) type : meego-sdk-qtcreator (return)

      The Qt Creator IDE will appear.

 

15. Select the "Tools" menu, and then "Options..."

      Select "Qt4" on the left menu

      Select "Manual"

      Tap/click on "+" button on the upper right side

      Fill in the "Version name:" with ie, "MeeGo Touch"

      Fill in the "qmake location:" with "/usr/lib/madde/linux-i686/targets/meego-tablet-ia32-1.2.0.90.0.20110517.1/bin/qmake

      Tap/click the "Rebuild" button

      it should shows a green tick near the "Debugging helpers:"

      note : on a 600pixel y resolution display, the "OK", "Cancel" and "Apply" button is hidden outside the screen area.

      To keep the setting you made, tap on "Filter" on the upper left, and then press "Tab" key on your keyboard twice,

      and then press "Return" key. Congratulation... you just blindly hit the "OK" button :)

 

16. Now we need to add deployment target setting.

      Select the "Tools" menu, and then "Options..."

      Select "Project" on the left menu

      Tap/click the "Add" button on the upper right

      Select "Remote Device" and "Password" on the radio buttons

      Type "localhost" for the "Host name:"

      Type "root" for the "Username:"

      Type "meego" for the "Password:"

      Once again :

      To keep the setting you made, tap on "Filter" on the upper left, and then press "Tab" key on your keyboard twice,

      and then press "Return" key. Congratulation... you just blindly hit the "OK" button again :)

 

17. After above steps, all basic setting are done. Now let's create our "Hello Touch World" application :

      Tap on the "Create Project..." button on the IDE's screen.

      Select "Qt C++ Project" on the left side, and "Qt Console Application" on the right.

      Tap/click on the "Choose..." button

      Name your application, ie, "TouchMe", select your desired directory as the target directory, and then press the "Next >" button

      Just press "Finish" and "Finish" again on the next screen.

      Now it will bring you to code editor screen.

 

18. Replace the code in "TouchMe.pro" with :

---> start after this line

QT       += core gui

 

TARGET = TouchMe

CONFIG += meegotouch

TEMPLATE = app

target.path=/usr/local/bin

INSTALLS=target

 

 

SOURCES += main.cpp

--->stop before this line, yes, this line you are reading, you know what I mean....

 

19. Replace all codes in "main.cpp" with :

---> start after this line

#include <MApplication>

#include <MApplicationWindow>

#include <MApplicationPage>

#include <MLabel>

#include <MButton>

#include <MLayout>

#include <MGridLayoutPolicy>

#include <MTheme>

#include <MSceneManager>

#include <QObject>

 

int main(int argc, char *argv[])

{

    unsigned char i;

    MApplication a(argc, argv);

    MApplicationWindow w;

    MApplicationPage p;

    p.setTitle("Hello Touch World");

 

    MLayout *myLayout = new MLayout(p.centralWidget());

    MGridLayoutPolicy *myGridPolicy = new MGridLayoutPolicy(myLayout);

 

    for (i = 0; i < 21; i++) {

        MLabel *myLabel = new MLabel(QString("Label %1").arg(i + 1));

        myGridPolicy->addItem(myLabel, i/7, i%7);

    }

    for (i = 21; i < 49; i++) {

        MButton *myButton = new MButton(QString("Button %1").arg(i + 1));

        myGridPolicy->addItem(myButton, i/7, i%7);

    }

 

    p.appear(&w);

    w.show();

 

    return a.exec();

}

--->stop before this line, yes, now you get it....

 

20. Press "Ctrl" + "R" or from the menu "Build" then "Run". You can build, Run and deploy the application.

     Save your code files when asked, or you can save after step 19.

     On deploy, when it said :Installing package failed.", don't worry, just exit from the IDE, open a terminal,

     switch to root, and you should see the "touchme....something.rpm"

     install the .rpm file : rpm -ivh the_touchme_rpm_file

     When finished, type : TouchMe (return) in the terminal, and, we have a new touch screen application of our own.

     Feel the touch and move on.

 

21. Now.... Go and develop as much good application as you can.

     You can take a look at http://apidocs.meego.com/git-tip/mtf-old/mtf/mainclasses.html

     a very good reference.

 

Happy MeeGo.....

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

I fixed my posting format, please try the latest version.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya