The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | Building the pdk (platform development kit) |
| 2 | |
The Android Open Source Project | 6ffae01 | 2009-03-18 17:39:43 -0700 | [diff] [blame] | 3 | 1) 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 Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 7 | |
| 8 | Make sure that you are using the right version of java |
| 9 | |
| 10 | sudo update-java-alternatives -s java-1.5.0-sun |
| 11 | |
| 12 | If that doesn't work, go through the instructions on |
| 13 | |
Chris Peterson | b1e0c96 | 2010-06-25 17:32:07 -0700 | [diff] [blame] | 14 | http://source.android.com/source/download.html again. |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 15 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 16 | |
| 17 | 2) from the root |
| 18 | . build/envsetup.sh |
| 19 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 20 | |
| 21 | 4) mkdir dist |
| 22 | mkdir logs |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 23 | |
| 24 | then build everything: |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 25 | |
Mike Ritter | a06cdf1 | 2009-06-17 17:25:54 -0700 | [diff] [blame] | 26 | 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 Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 27 | |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 28 | so you can have a record of the build commands in the logs directory. |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 29 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 30 | |
Mike Ritter | 429fbd8 | 2009-05-19 11:28:10 -0700 | [diff] [blame] | 31 | 5) the pdk and pndk tar file is put in the dist directory. |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 32 | |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 33 | 6) the pdk-docs are in |
| 34 | |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 35 | out/target/common/docs/online-pdk |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 36 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 37 | |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 38 | -------------------------------------------------------------------------------- |
| 39 | # Build Notes |
| 40 | |
Mike Ritter | 429fbd8 | 2009-05-19 11:28:10 -0700 | [diff] [blame] | 41 | The build target 'pdk' brings in the pdk/pndk make files into the build system. |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 42 | Then there are three targets: |
| 43 | pdk_docs - which builds just the pdk documentation |
Mike Ritter | 429fbd8 | 2009-05-19 11:28:10 -0700 | [diff] [blame] | 44 | pndk - which builds the platform's native development kit (native compiler, linker, etc.) |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 45 | pdk_all - which builds the above two targets |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 46 | |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 47 | To change which version of doxygen runs you can pass in the variable: |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 48 | doxygen_version='<path/name_of_doxygen_executable>' |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 49 | on the make line. |
| 50 | |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 51 | |
The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 52 | -------------------------------------------------------------------------------- |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 53 | # Testing |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 54 | |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 55 | You must install google appengine. See: http://code.google.com/appengine/downloads.html |
| 56 | |
| 57 | Here'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 Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 59 | <path_to_cupcake_code>/android/out/target/common/docs |
Reena Lee | c8f0e67 | 2009-06-13 15:08:56 -0700 | [diff] [blame] | 60 | |
| 61 | To verify it is working, you can access it with a browser locally on port 8080: |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 62 | |
Reena Lee | d39413e | 2009-06-11 13:26:29 -0700 | [diff] [blame] | 63 | http://localhost:8080/online-pdk/guide/index.html |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 64 | |
| 65 | NOTE: If you are trying to get to the appengine local testing instance remotely |
| 66 | you will have to ssh tunnel into your linux box as appengine only serves the web |
| 67 | host locally. |
| 68 | |
| 69 | On a Windows machine to check your current port forwarding settings: |
| 70 | |
| 71 | 1. Start putty. |
| 72 | 2. Click on your session in the list and hit load (this loads the settings so you can edit them) |
| 73 | 3. Go to SSH -> tunnels and look at the Forwarded ports box |
| 74 | |
| 75 | L8080 localhost:8080 |
| 76 | |
| 77 | Means 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 | |
| 79 | To add port forwarding |
| 80 | |
| 81 | 1. Start putty. |
| 82 | 2. Click on your session in the list and hit load (this loads the settings so you can edit them) |
| 83 | 3. Go to SSH -> tunnels. |
| 84 | 4. Pick an unused port on your laptop (8080, 8888, something like that) and put it in the "source port box" |
| 85 | 5. In the destination box, put localhost:8888 (replace with the actual port number the service is running on) |
| 86 | 6. Hit add. |
Mike Ritter | a06cdf1 | 2009-06-17 17:25:54 -0700 | [diff] [blame] | 87 | 7. Go back to "Session" and save your new settings so this configuration will happen every time you login. |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 88 | |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 89 | |
| 90 | -------------------------------------------------------------------------------- |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 91 | # Deployment |
Mike Ritter | 0025ca4 | 2009-04-14 13:36:43 -0700 | [diff] [blame] | 92 | |
Mike Ritter | 429fbd8 | 2009-05-19 11:28:10 -0700 | [diff] [blame] | 93 | To 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 Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 95 | where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory, |
| 96 | all of which are tarred up by the Pdk.mk file when using the target pdk_docs. |
| 97 | |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 98 | To host the pdk docs on the external appengine run: |
Mike Ritter | 429fbd8 | 2009-05-19 11:28:10 -0700 | [diff] [blame] | 99 | /home/build/static/projects/apphosting/devtools/appcfg.py -s pdk-docs.appspot.com update <path_to_cupcake_src>/out/target/common/docs |
Mike Ritter | dfa5494 | 2009-04-01 17:30:12 -0700 | [diff] [blame] | 100 | where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory, |
| 101 | all of which are tarred up by the Pdk.mk file when using the target pdk_docs. |
| 102 | |
| 103 | |