blob: 0acb1eb7475458f0e2f61ed0fb2f1684db120976 [file] [log] [blame]
The Android Open Source Project52d4c302009-03-03 19:29:09 -08001Building the pdk (platform development kit)
2
The Android Open Source Project6ffae012009-03-18 17:39:43 -070031) get a cupcake source tree with all the normal tools... and add doxygen
4(We currently support version 1.4.6)
5
6 sudo apt-get install doxygen
Mike Ritterdfa54942009-04-01 17:30:12 -07007
8Make sure that you are using the right version of java
9
10 sudo update-java-alternatives -s java-1.5.0-sun
11
12If that doesn't work, go through the instructions on
13
Chris Petersonb1e0c962010-06-25 17:32:07 -070014 http://source.android.com/source/download.html again.
Mike Ritterdfa54942009-04-01 17:30:12 -070015
The Android Open Source Project52d4c302009-03-03 19:29:09 -080016
172) from the root
18 . build/envsetup.sh
19
The Android Open Source Project52d4c302009-03-03 19:29:09 -080020
214) mkdir dist
22 mkdir logs
Mike Ritterdfa54942009-04-01 17:30:12 -070023
24then build everything:
The Android Open Source Project52d4c302009-03-03 19:29:09 -080025
Mike Rittera06cdf12009-06-17 17:25:54 -070026 time make -j8 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/`date +%y%m%d-%H%M%S`
The Android Open Source Project52d4c302009-03-03 19:29:09 -080027
Mike Ritterdfa54942009-04-01 17:30:12 -070028so you can have a record of the build commands in the logs directory.
The Android Open Source Project52d4c302009-03-03 19:29:09 -080029
The Android Open Source Project52d4c302009-03-03 19:29:09 -080030
Mike Ritter429fbd82009-05-19 11:28:10 -0700315) the pdk and pndk tar file is put in the dist directory.
The Android Open Source Project52d4c302009-03-03 19:29:09 -080032
Mike Ritterdfa54942009-04-01 17:30:12 -0700336) the pdk-docs are in
34
Mike Ritter0025ca42009-04-14 13:36:43 -070035 out/target/common/docs/online-pdk
Mike Ritterdfa54942009-04-01 17:30:12 -070036
The Android Open Source Project52d4c302009-03-03 19:29:09 -080037
Mike Ritter0025ca42009-04-14 13:36:43 -070038--------------------------------------------------------------------------------
39# Build Notes
40
Mike Ritter429fbd82009-05-19 11:28:10 -070041The build target 'pdk' brings in the pdk/pndk make files into the build system.
Mike Ritterdfa54942009-04-01 17:30:12 -070042 Then there are three targets:
43 pdk_docs - which builds just the pdk documentation
Mike Ritter429fbd82009-05-19 11:28:10 -070044 pndk - which builds the platform's native development kit (native compiler, linker, etc.)
Mike Ritterdfa54942009-04-01 17:30:12 -070045 pdk_all - which builds the above two targets
The Android Open Source Project52d4c302009-03-03 19:29:09 -080046
Mike Ritter0025ca42009-04-14 13:36:43 -070047To change which version of doxygen runs you can pass in the variable:
Mike Ritterdfa54942009-04-01 17:30:12 -070048 doxygen_version='<path/name_of_doxygen_executable>'
The Android Open Source Project52d4c302009-03-03 19:29:09 -080049on the make line.
50
Mike Ritter0025ca42009-04-14 13:36:43 -070051
The Android Open Source Project52d4c302009-03-03 19:29:09 -080052--------------------------------------------------------------------------------
Mike Ritterdfa54942009-04-01 17:30:12 -070053# Testing
Mike Ritter0025ca42009-04-14 13:36:43 -070054
Mike Ritterdfa54942009-04-01 17:30:12 -070055You must install google appengine. See: http://code.google.com/appengine/downloads.html
56
57Here's the command to run the pdk-docs server locally:
58 python <path_to_appengine_installation>/dev_appserver.py --address 0.0.0.0 \
Mike Ritter0025ca42009-04-14 13:36:43 -070059 <path_to_cupcake_code>/android/out/target/common/docs
Reena Leec8f0e672009-06-13 15:08:56 -070060
61To verify it is working, you can access it with a browser locally on port 8080:
Mike Ritterdfa54942009-04-01 17:30:12 -070062
Reena Leed39413e2009-06-11 13:26:29 -070063http://localhost:8080/online-pdk/guide/index.html
Mike Ritter0025ca42009-04-14 13:36:43 -070064
65NOTE: If you are trying to get to the appengine local testing instance remotely
66you will have to ssh tunnel into your linux box as appengine only serves the web
67host locally.
68
69On a Windows machine to check your current port forwarding settings:
70
711. Start putty.
722. Click on your session in the list and hit load (this loads the settings so you can edit them)
733. Go to SSH -> tunnels and look at the Forwarded ports box
74
75L8080 localhost:8080
76
77Means that you can point your webbrowser on your laptop to http://localhost:8080/ and it will show you the same thing as on your workstation for http://localhost:8080/
78
79To add port forwarding
80
811. Start putty.
822. Click on your session in the list and hit load (this loads the settings so you can edit them)
833. Go to SSH -> tunnels.
844. Pick an unused port on your laptop (8080, 8888, something like that) and put it in the "source port box"
855. In the destination box, put localhost:8888 (replace with the actual port number the service is running on)
866. Hit add.
Mike Rittera06cdf12009-06-17 17:25:54 -0700877. Go back to "Session" and save your new settings so this configuration will happen every time you login.
Mike Ritterdfa54942009-04-01 17:30:12 -070088
Mike Ritter0025ca42009-04-14 13:36:43 -070089
90--------------------------------------------------------------------------------
Mike Ritterdfa54942009-04-01 17:30:12 -070091# Deployment
Mike Ritter0025ca42009-04-14 13:36:43 -070092
Mike Ritter429fbd82009-05-19 11:28:10 -070093To host the pdk docs on the internal appengine run:
94/home/build/static/projects/apphosting/devtools/appcfg.py update <path_to_cupcake_src>/out/target/common/docs
Mike Ritterdfa54942009-04-01 17:30:12 -070095where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
96all of which are tarred up by the Pdk.mk file when using the target pdk_docs.
97
Mike Ritterdfa54942009-04-01 17:30:12 -070098To host the pdk docs on the external appengine run:
Mike Ritter429fbd82009-05-19 11:28:10 -070099/home/build/static/projects/apphosting/devtools/appcfg.py -s pdk-docs.appspot.com update <path_to_cupcake_src>/out/target/common/docs
Mike Ritterdfa54942009-04-01 17:30:12 -0700100where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
101all of which are tarred up by the Pdk.mk file when using the target pdk_docs.
102
103