-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathINSTALL
70 lines (46 loc) · 2.74 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
================================================================================
# Copyright (c) 2011-2012 Emitrom, LLC
# All rights reserved.
================================================================================
Titanium4j Mobile 3.0 Installation
----------------------------------
For the latest set of step by step instructions, please visit us at:
http://www.emitrom.com/forum
While Titanium4j Mobile is distributed as a single Jar file, there is a little bit
more of leg work that you need to do in order to get going. This set of
instructions applies specifically to Eclipse. Instructions for other Java IDEs
will be remarkably similar, since most of the configuration takes place in the
IDE's GWT plugin.
Requirements:
- Eclipse
- Google Web Toolkit plugin for Eclipse
- Appcelerator Titanium Studio
Steps:
1. Create a new Web Application Project (GWT) project in Eclipse. Enter your
project's details as appropriate, and leave the 'Generate GWT project sample
code' checkbox checked.
2. Add the titanium4j-xxx.jar to the project's classpath.
3. Remove the server and shared directories from the newly created project, and
also the GreetingService.java and GreetingServiceAsync.java files from the
client directory.
4. Your project will show compile-time errors in your project's generated .java
file. Remove the contents of the onModuleLoad() method and replace them with
your own. This is your application's entry point.
5. Edit your project's .gwt.xml file and add the following lines:
<inherits name="com.emitrom.gwt4.ti.mobile.TiMobile" />
<set-property name="user.agent" value="timobile"/>
6. Create a new Titanium Mobile Project in Titanium Studio.
7. Make note of the path for the newly created project.
8. In Eclipse, use the path from the previous step as the output directory for
the GWT compiler. You do this by adding:
-war path.to.your.titanium.project/Resources/titanium4j
...in the additional compiler arguments for the GWT compiler.
9. In Titanium Studio, replace the contents of app.js with:
Ti.include("titanium4j/name.of.your.gwt.module/name.of.your.gwt.module.js");
You will find the name of your GWT module in the .gwt.xml file. For example,
if you module is called hello_world, the include statement will look like:
Ti.include("titanium4j/hello_world/hello_world.js");
That is it as far setup goes. All of your Java development will take place in
Eclipse. Write your app in Java, run the GWT compiler to generate the Titanium
code, and then test your app by running one of the various simulators in Titanium
Studio.