-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
81 lines (53 loc) · 2.88 KB
/
INSTALL
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
================================================================================
# Copyright (c) 2011-2012 Emitrom, LLC
# All rights reserved.
================================================================================
Touch4j 4.0 Installation
------------------------
For any questions or details about Touch4j, please visit us in the forum:
http://www.emitrom.com/forum
Touch4j 4.0 is distributed as a single Jar file.
Requirements
------------
- Google Web Toolkit 2.4 or higher
- Sencha Touch 2.1
- Java Development Kit 1.6 or higher in your path
- Emitrom Pilot (if maps or native support is required)
Steps
-----
>> Option A: download the Touch4j Kitchen Sink (a GPLv3, Eclipse project) from svn and
import it into Eclipse. You will need to download the touch4j-xxx.jar file
and add it to the project's classpath.
http://svn.emitrom.com/gwt4touch2ks/trunk/kitchensink/
>> Option B: follow all the steps below.
1. Create a new Web Application Project (GWT) project in your IDE. Enter your
project's details as appropriate.
2. Add the touch4j-xxx.jar file to the project's classpath.
3. Edit your project's .gwt.xml file and leave only the following inherits statements:
<inherits name="com.emitrom.touch4j.Touch4j" />
In this same file, add the webkit user-agent to speed up compilation:
<set-property name="user.agent" value="safari" />
4. In your GWT .html page, include the following in the <head> section:
<!-- Fill the device's screen -->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" />
<!-- Sencha Touch CSS -->
<link type="text/css" rel="stylesheet" href="{your-project}/touch/resources/css/sencha-touch.css" />
5. If you'd like Google Maps support, make sure you download the Pilot API from Emitrom (http://emitrom.com/pilot/download),
add the pilot-xxx.jar file to your classpath, and inherit the maps module:
<inherits name="com.emitrom.pilot.maps.Maps" />
In your GWT .html page, include the following in the <head> section:
<!-- Google Maps support -->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
6. Create a folder called public of your GWT project, and underneath it create a directory
called 'touch'; copy the resources and the Sencha .js file into it. This will allow
the instructions in the previous step to work correctly.
7. Modify your GWT client .java file to extend TouchEntryPoint, instead of implementing
EntryPoint:
public class YourGWTProject extends TouchEntryPoint {
@Override
public void onLoad() {
MessageBox.alert("Emitrom","Hello Touch4j");
}
}
Enjoy!
The Emitrom Team