How to run Openmoko Apps on PC

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (-Guides, removed very old screenshots)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
[[Image:Screenshot.png|thumb|500px|''Running Openmoko Stylus Demo on Ubuntu compared with Openmoko on qemu'']]
 
 
===Install dependencies===
 
===Install dependencies===
  
Line 98: Line 97:
 
{{Languages|How to run Openmoko Apps on PC}}
 
{{Languages|How to run Openmoko Apps on PC}}
  
[[Category:Emulation|  ]]
+
[[Category:Emulation]]
[[Category:Guides]]
+

Latest revision as of 21:47, 12 September 2008

Contents

[edit] Install dependencies

  • use aptitude, apt-get, urpmi, or whatever your distro supports
  • you will probably need
    • gtk-dev
    • pango-dev
    • atk-dev
    • qmake from Qt4 (libqt4-dev on Debian) -- this is optional and required only if you do not use Autotools method
  • Under Ubuntu for using GNU Autotools:
 sudo apt-get install libgtk2.0-dev libecal1.2-dev automake1.10 libxosd-dev
  • Under Debian for using GNU Autotools:
 sudo apt-get install libgtk2.0-dev libecal1.2-dev automake libxosd-dev

[edit] Build the binaries

[edit] Build using GNU Autotools

[edit] Build libgsmd

You need to have libtool installed

 sudo apt-get install libtool
 cd <svn-checkout>/src/target/gsm
 ./autogen.sh
 make
 sudo make install

This will build and install libgsmd required by the next step.

[edit] Set up the environment
 export OPENMOKODIR=<svn-checkout>/src/target/OM-2007
 cd $OPENMOKODIR/openmoko-libs
 ./autogen.sh
 make
 sudo make install

This will install the libraries in /usr/local/lib. If you prefer a non-system location, edit autogen.sh (and remember that an SVN update may undo that) to add a "--prefix=MYDIR" option for where you want to put the compiled stuff. You can the run "make install" without sudo. One approach is to put stuff at the source root, by appending the option: "--prefix=$OPENMOKODIR".

[edit] Compiling sample apps
 cd $OPENMOKODIR/examples/<sample app>
 ./autogen.sh
 make
 sudo make install

If you used --prefix in the previous step to place the libraries elsewhere, make sure you edit autogen.sh to reflect that. I guess the proper way to do this is to set the PKG_CONFIG_PATH variable. You can of course drop the sudo then.

 ...
 export PKG_CONFIG_PATH=$OPENMOKODIR/lib/pkgconfig
 ./configure ...


[edit] Build using QMake (the mickeyl way)

NOTE: qmake is Mickey's preferred build tool, it probably doesn't work if you're not him. Please use autotools...


[edit] Build everything in one run using Qmake
 cd <svn-checkout>/src/target/OM-2007
 . ./makevars.sh
 qmake
 make

Now the applications should be found in ./bin.

[edit] Run the examples

[edit] Set your theme to Openmoko

Set the GTK2_RC_FILES variable before running Openmoko applications:

 export GTK2_RC_FILES=$OPENMOKODIR/artwork/themes/openmoko-standard/gtk-2.0/gtkrc

Or edit $HOME/.gtkrc-2.0 to something like this:

 include "<PATH-to-svn-checkout>/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkrc"

However, this will make all Gtk2 apps run with the Openmoko theme.

[edit] Naked execution

 bin/openmoko-stylus-demo
 bin/openmoko-finger-demo
 bin/openmoko-chordmaster

[edit] Execution within Xoo

Adjust svn://src/target/OM-2007/devel/scripts/launch-xoo to your needs (you may need to build some dependencies forehand) Then set DISPLAY=:1 and run the examples

Also, see Getting Openmoko working on host with Xoo.

Personal tools
Running Openmoko Stylus Demo on Ubuntu compared with Openmoko on qemu

Install dependencies

  • use aptitude, apt-get, urpmi, or whatever your distro supports
  • you will probably need
    • gtk-dev
    • pango-dev
    • atk-dev
    • qmake from Qt4 (libqt4-dev on Debian) -- this is optional and required only if you do not use Autotools method
  • Under Ubuntu for using GNU Autotools:
 sudo apt-get install libgtk2.0-dev libecal1.2-dev automake1.10 libxosd-dev
  • Under Debian for using GNU Autotools:
 sudo apt-get install libgtk2.0-dev libecal1.2-dev automake libxosd-dev

Build the binaries

Build using GNU Autotools

Build libgsmd

You need to have libtool installed

 sudo apt-get install libtool
 cd <svn-checkout>/src/target/gsm
 ./autogen.sh
 make
 sudo make install

This will build and install libgsmd required by the next step.

Set up the environment
 export OPENMOKODIR=<svn-checkout>/src/target/OM-2007
 cd $OPENMOKODIR/openmoko-libs
 ./autogen.sh
 make
 sudo make install

This will install the libraries in /usr/local/lib. If you prefer a non-system location, edit autogen.sh (and remember that an SVN update may undo that) to add a "--prefix=MYDIR" option for where you want to put the compiled stuff. You can the run "make install" without sudo. One approach is to put stuff at the source root, by appending the option: "--prefix=$OPENMOKODIR".

Compiling sample apps
 cd $OPENMOKODIR/examples/<sample app>
 ./autogen.sh
 make
 sudo make install

If you used --prefix in the previous step to place the libraries elsewhere, make sure you edit autogen.sh to reflect that. I guess the proper way to do this is to set the PKG_CONFIG_PATH variable. You can of course drop the sudo then.

 ...
 export PKG_CONFIG_PATH=$OPENMOKODIR/lib/pkgconfig
 ./configure ...


Build using QMake (the mickeyl way)

NOTE: qmake is Mickey's preferred build tool, it probably doesn't work if you're not him. Please use autotools...


Build everything in one run using Qmake
 cd <svn-checkout>/src/target/OM-2007
 . ./makevars.sh
 qmake
 make

Now the applications should be found in ./bin.

Run the examples

Set your theme to Openmoko

Set the GTK2_RC_FILES variable before running Openmoko applications:

 export GTK2_RC_FILES=$OPENMOKODIR/artwork/themes/openmoko-standard/gtk-2.0/gtkrc

Or edit $HOME/.gtkrc-2.0 to something like this:

 include "<PATH-to-svn-checkout>/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkrc"

However, this will make all Gtk2 apps run with the Openmoko theme.

Naked execution

 bin/openmoko-stylus-demo
 bin/openmoko-finger-demo
 bin/openmoko-chordmaster

Execution within Xoo

Adjust svn://src/target/OM-2007/devel/scripts/launch-xoo to your needs (you may need to build some dependencies forehand) Then set DISPLAY=:1 and run the examples

Also, see Getting Openmoko working on host with Xoo.