Se volete programmare per l’openmoko, ma non volete fare tutta la procedura con bitbaker, e non volete sfruttare gsm, bluetooth etc, ma sol ofare qualcosa di semplice allroa ho qualcosa che fa per voi.

ATTENZIONE – USARE A PROPRIO RISCHIO

Ho scritto questo scrip ora che sono le 5 di notte. Domani ci daró un occhiata piú attenta, ora l’ho solo fatto per semplificarmi un po la vita. Il programma l’ho scritto per la mia macchian, quindi non é detto che funzioni da voi. Va lanciato con sudo. Ubuntu 7.04.


#!/bin/sh

# run script as sudo. If not, it won't run un my machine
# No Arguments = just set up the x server
# -i = install everyting
# -c = run the calculator
# -i -c =install and run the calculator
# -i -s = start right away: install and setup x server
# -r foo = set up x server and start "foo"

case $# in
0)
#Here comes the startup of the "pseudomoko", and the setting of the correct X server
Xephyr :1 -ac -dpi 283 -screen 480x640+86+295 & matchbox-window-manager -display :1 -theme openmoko-standard-2 &
export DISPLAY=:1
export GTK2_RC_FILES=~/.themes/openmoko-standard-2/gtk-2.0/gtkrc;;
1)
case $1 in
-i)
#ok, install it.
apt-get install xserver-xephyr matchbox-window-manager gtk-doc-tools autoconf automake libtool gettext gcc libgtk2.0-dev subversion g++
cd ~
mkdir OM
mkdir .themes
cd OM
svn checkout http://svn.openmoko.org/trunk/src/target/OM-2007.2/
cd OM-2007.2 /libraries/libmokoui2/
sh autogen.sh
make all
rm /usr/share/themes/openmoko-standard-2
ln -s ../../artwork/themes/openmoko-standard-2 /usr/share/themes/openmoko-standard-2
#Here comes the calculator part
cd ../../applications/openmoko-calculator2/
sh autogen.sh
make;;
-c)
~/OM/OM-2007.2/libraries/libmokoui2/applications/openmoko-calculator2/src/openmoko-calculator;;
esac;;
2)
case $1 in
-r)
#Here comes the startup of the "pseudomoko", and the setting of the correct X server
Xephyr :1 -ac -dpi 283 -screen 480x640+86+295 & matchbox-window-manager -display :1 -theme openmoko-standard-2 &
export DISPLAY=:1
export GTK2_RC_FILES=~/.themes/openmoko-standard-2/gtk-2.0/gtkrc
$2;;
-i)
#ok, install it.#Here comes the calculator part
cd ../../applications/openmoko-calculator2/
sh autogen.sh
make
apt-get install xserver-xephyr matchbox-window-manager gtk-doc-tools autoconf automake libtool gettext gcc libgtk2.0-dev subversion g++
cd ~
mkdir OM
mkdir .themes
cd OM
svn checkout http://svn.openmoko.org/trunk/src/target/OM-2007.2/
cd OM-2007.2 /libraries/libmokoui2/
sh autogen.sh
make all
rm /usr/share/themes/openmoko-standard-2
ln -s ../../artwork/themes/openmoko-standard-2 /usr/share/themes/openmoko-standard-2
Xephyr :1 -ac -dpi 283 -screen 480x640+86+295 & matchbox-window-manager -display :1 -theme openmoko-standard-2 &
export DISPLAY=:1
export GTK2_RC_FILES=~/.themes/openmoko-standard-2/gtk-2.0/gtkrc
case $2 in
-c)
src/openmoko-calculator;;
esac;;
esac;;
esac

Eccovi lo scriptino bash. È tutto spiegato al linterno. Eseguitelo come root e divertitevi. Buona notte.