| 3 | |
| 4 | == Prerequisites == |
| 5 | Download the Python and PyGame binaries from THPs WebOS hacks website. |
| 6 | |
| 7 | == Start script == |
| 8 | I've made a short startup script that makes it possible to just unpack the binaries to a random folder and use Python & PyGame without the need to install anything to system wide directories. |
| 9 | |
| 10 | {{{ |
| 11 | #!/bin/bash |
| 12 | |
| 13 | ## A setup and demonstration script for PyGame |
| 14 | ## on the HP Touchpad WebOS tablet |
| 15 | |
| 16 | ## path to the Python runtime |
| 17 | PY_PATH="/media/internal/pygame_test/python" |
| 18 | export PY_PATH |
| 19 | |
| 20 | ## path to the Pygame runtime/library |
| 21 | PYGAME_PATH="/media/internal/pygame_test/" |
| 22 | |
| 23 | ## add the Python runtime to the system path |
| 24 | PATH=${PY_PATH}/bin:$PATH |
| 25 | export PATH |
| 26 | |
| 27 | ## add the Python runtime to the system library path |
| 28 | LD_LIBRARY_PATH=${PY_PATH}/lib:$LD_LIBRARY_PATH |
| 29 | export LD_LIBRARY_PATH |
| 30 | |
| 31 | ## add Pygame to the Python path |
| 32 | PYTHONPATH=${PYGAME_PATH}:$PYTHONPATH |
| 33 | export PYTHONPATH |
| 34 | |
| 35 | ## |
| 36 | ## the environment should now be ready for running |
| 37 | ## Python applications using PyGame |
| 38 | ## |
| 39 | |
| 40 | ## start the example application |
| 41 | cd tts |
| 42 | python main.py |
| 43 | }}} |
| 44 | |
| 45 | Just dump this script to a file called for example ''start.sh'' (or download start.sh) and run it with: |
| 46 | {{{ |
| 47 | sh start.sh |
| 48 | }}} |