How to run Openmoko Apps on PC/ru

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Build using QMake (the mickeyl way))
(Build everything in one run using Qmake)
Line 39: Line 39:
 
{{Note|qmake is Mickey's preferred build tool, it probably doesn't work if you're not him. Please use autotools...}}
 
{{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=====
+
=====Собираем всё за раз с помощью Qmake=====
  
 
   cd <svn-checkout>/src/target/OM-2007
 
   cd <svn-checkout>/src/target/OM-2007
Line 46: Line 46:
 
   make
 
   make
  
Now the applications should be found in ./bin.
+
Теперь все приложения доступны в ./bin.
  
 
===Run the examples===
 
===Run the examples===

Revision as of 17:46, 30 March 2007

Contents

Необходимое для сборки

  • Используйте aptitude, apt-get, urpmi, или любой другой чтобы установить необходимое
  • Вам понадобиться
    • gtk-dev
    • pango-dev
    • atk-dev
    • qmake из Qt4 (libqt4-dev в Debian) - опционально и нужно если только если не используете auto-tools method
  • в ubuntu: apt-get install libgtk2.0-dev pulls in everything necessary

Сборка программ

Сборка с помощью GNU auto-tools

Настраиваем окружение
 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".

Собираем простые приложения
 cd $OPENMOKODIR/examples/...
 ./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 ...

Сборка с помощью 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...


Собираем всё за раз с помощью Qmake
 cd <svn-checkout>/src/target/OM-2007
 . ./makevars.sh
 qmake
 make

Теперь все приложения доступны в ./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

Personal tools

Необходимое для сборки

  • Используйте aptitude, apt-get, urpmi, или любой другой чтобы установить необходимое
  • Вам понадобиться
    • gtk-dev
    • pango-dev
    • atk-dev
    • qmake из Qt4 (libqt4-dev в Debian) - опционально и нужно если только если не используете auto-tools method
  • в ubuntu: apt-get install libgtk2.0-dev pulls in everything necessary

Сборка программ

Сборка с помощью GNU auto-tools

Настраиваем окружение
 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".

Собираем простые приложения
 cd $OPENMOKODIR/examples/...
 ./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 ...

Сборка с помощью 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