How-To: Download, Build, Debug a sample Clutter app
- Download the sample_apps tarball
- Download sample_apps.tar.gz
- Go to moblin.org > Downloads > Git Repositories
- Find and click on moblin2/sample_apps.git
- At the top of the log is the most updated source. To the right of the top entry, you'll find a link named 'snapshot'
- Click 'snapshot' to download the tarball
- Install and Run Image Creator
- Create a new project and target
- Copy sample_apps.tar.gz to the target
- Install Clutter libraries
- Build Clutter HelloWorld
- Create an image
- Launch the image
- Click Launch VM button
- Select helloworld.img
- Click OK. A qemu/KVM window will launch. If it does not, check the terminal where Image Creator was started for error information.
- Press Enter. The kernel will load and the image will boot in the virtual environment.
- Launch the Clutter Helloworld app
- Click inside the qemu/KVM window to give it focus.
- Hover your cursor to the left edge of the desktop and a menu will slide out
- Click the terminal icon.
- In the terminal in the qemu/KVM window start HelloWorld:
- To Debug:
or
Note: For the purposes of this tutorial, the tarball will be known as sample_apps.tar.gz
/documentation/installing-image-creator
/documentation/creating-projects-and-targets
Note: When you add a new project, you must select an empty folder.
Chose any name, desc, and path, and set the platform to netbook-lpia-moblin2
For this tutorial, I used the following values:
Project name: clutter_apps
Project desc: testing apps
Project path: ~/src/app_example
Platform: netbook-lpia-moblin2
Target name: helloworld
Functional sets: Select app-devel-environment. This automatically selects appframework, applications, x, x-dev, core, and core-dev.
The target file system is located under the project file system. On your workstation you can find the target file system in:
<path to project>/targets/fs/<name of target>/
$ sudo cp <download path>/sample_apps.tar.gz \
~/src/app_example/targets/helloworld/fs/root/ Open a terminal to the target file system. In Image Creator select your target and click the Terminal button. Image Creator will open a terminal chroot-ed to the target directory. Inside this terminal install the clutter development package:
# yum install clutter-devel.i386 In the target terminal:
# cd /root
# tar xvzf sample_apps.tar.gz
# cd moblin2/sample_apps.git/
# ./autogen.sh --prefix=/usr
# cd helloworld
# make installHelloWorld is now installed in the target. You will see this when you run the target in a virtual machine or on a mobile device.
/documentation/creating-image-target-device
For this tutorial, I created a live image and named it helloworld.img
Check to ensure that your CPU supports hardware virtualization.
(For me, virtualization was not enabled. I enabled it through the BIOS.)


$ cd moblin2/sample_apps.git/helloworld
$ ./helloworldNote: The helloworld app will pop up and start doing its thing. In order to exit the qemu/KVM window, press ctrl + alt. This will allow you to click the 'X' in the upper right hand corner.
With the helloworld target selected, click the terminal icon in Image Creator.
Note: Make sure you have gdb installed on your target.
# yum install gdb.i386
# cd ..
# cd home/user/moblin2/sample_apps.git/helloworld
# gdb ./helloworld
(gdb) b main //set break point at main
(gdb) r //start running the executable
(gdb) q //to quit- Printer-friendly version
- Login or register to post comments
Comments (1 total)
broken link
http://git.moblin.org/cgi-bin/gitweb/gitweb.cgi is broken...