/
HOWTO.txt
131 lines (86 loc) · 4.72 KB
/
HOWTO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
=================================================================================================
Rather than fork the original ( http://github.com/jtoivola/phonegap ) this is a new repo, since
the differences were too great - largely because this one is Maemo-only.
=================================================================================================
Get set up with Maemo SDK @ http://wiki.maemo.org/Documentation/Maemo5_Final_Installation
$ cd /scratchbox/users/<you>/home/<you>
$ git clone git://github.com/DuncanCragg/phonegap-maemo-webgl.git
$ sudo apt-get install scons
* in Distribution.mk: PACKAGE_DIR = /scratchbox/users/<you>/home/<you>/phonegap-maemo-webgl/distribution
-------------------------------------------------------------------------------------------------
* Don't forget to run on reboot, as root:
$ /scratchbox/sbin/sbox_ctl start
-------------------------------------------------------------------------------------------------
$ /scratchbox/login
$ cd phonegap-maemo-webgl
$ fakeroot apt-get update
$ fakeroot apt-get dist-upgrade
$ fakeroot apt-get install libqt4-dev libqt4-phonon libqt4-opengl libqt4-sql-sqlite
-------------------------------------------------------------------------------------------------
$ /scratchbox/login
$ sb-conf se FREMANTLE_ARMEL
$ cd phonegap-maemo-webgl
$ fakeroot apt-get update
$ fakeroot apt-get dist-upgrade
$ fakeroot apt-get install libqt4-dev libqt4-phonon libqt4-opengl libqt4-sql-sqlite gawk sharutils
-------------------------------------------------------------------------------------------------
* Run Maemo SDK Desktop shortcut, or:
$ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb
$ export DISPLAY=:2 af-sb-init.sh start
=================================================================================================
Building X86 phonegap
$ /scratchbox/login
$ sb-conf se FREMANTLE_X86 # if not already
$ cd phonegap-maemo-webgl # if not already
$ make clean
$ qmake
$ make
$ cp -a www-example www # or however you want to make your www
$ run-standalone.sh ./phonegap
-------------------------------------------------------------------------------------------------
Recompile PhoneGap Javascript bundle when changed; run outside the SDK
$ cd /scratchbox/users/<you>/home/<you>/phonegap-maemo-webgl
$ ./mkjs.sh # also updates www-example/phonegap.js with compressed JS
=================================================================================================
Building ARM binaries and package
$ /scratchbox/login
$ sb-conf se FREMANTLE_ARMEL
$ cd phonegap-maemo-webgl
$ make clean
$ qmake
$ make
$ make -f Distribution.mk # Make sure ARCH is armel in Distribution.mk
$ dpkg-deb -c distribution/phonegapdemo_1.0.0_armel.deb # optional: see files
$ dpkg -i distribution/phonegapdemo_1.0.0_armel.deb # optional: try installing
-------------------------------------------------------------------------------------------------
Install on the device
$ sudo gainroot
$ apt-get install libqt4-webkit libqt4-xmlpatterns libqt4-maemo5-maemo5 (get 4.6 if not there; also libqt4-maemo5-gui?)
$ dpkg -i phonegapdemo_1.0.0_armel.deb
$ phonegapdemo # if you want to see debug output - alerts look wrong - otherwise get a shortcut
=================================================================================================
Building X86 binaries and package - to test packaging without changing to ARMEL
$ make clean
$ qmake
$ make
$ make -f Distribution.mk # Change ARCH from ARMEL to i386 in Distribution.mk
$ dpkg-deb -c distribution/phonegapdemo_1.0.0_i386.deb
$ dpkg -i distribution/phonegapdemo_1.0.0_i386.deb
$ run-standalone.sh /usr/bin/phonegapdemo
-------------------------------------------------------------------------------------------------
Building your own application distribution
* You've made your JS app in www
* Create a copy of Distribution.mk
* Edit headers as you see necessary for your application
* Create copy of phonegapdemo.desktop
* Edit main.cpp – change BINARY_NAME
-------------------------------------------------------------------------------------------------
Additional resources
* help http://wiki.forum.nokia.com/index.php/Maemo_5_SDK_installation_for_beginners#Nokia_binaries_for_ARM_.28ARMEL.29
* http://wiki.maemo.org/Packaging_a_Qt_application
* http://tldp.org/HOWTO/Debian-Binary-Package-Building-HOWTO/x60.html
-------------------------------------------------------------------------------------------------
Notes
* index.html is bootstrapped by main.cpp in QWebView
* DO NOT RUN sb-menu setup target – this will screw your scratchbox installation
=================================================================================================