1 Building the pdk (platform development kit) 2 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 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 14 http://source.android.com/source/download.html again. 15 16 17 2) from the root 18 . build/envsetup.sh 19 20 21 4) mkdir dist 22 mkdir logs 23 24 then build everything: 25 26 time make -j8 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/`date +%y%m%d-%H%M%S` 27 28 so you can have a record of the build commands in the logs directory. 29 30 31 5) the pdk and pndk tar file is put in the dist directory. 32 33 6) the pdk-docs are in 34 35 out/target/common/docs/online-pdk 36 37 38 -------------------------------------------------------------------------------- 39 # Build Notes 40 41 The build target 'pdk' brings in the pdk/pndk make files into the build system. 42 Then there are three targets: 43 pdk_docs - which builds just the pdk documentation 44 pndk - which builds the platform's native development kit (native compiler, linker, etc.) 45 pdk_all - which builds the above two targets 46 47 To change which version of doxygen runs you can pass in the variable: 48 doxygen_version='<path/name_of_doxygen_executable>' 49 on the make line. 50 51 52 -------------------------------------------------------------------------------- 53 # Testing 54 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 \ 59 <path_to_cupcake_code>/android/out/target/common/docs 60 61 To verify it is working, you can access it with a browser locally on port 8080: 62 63 http://localhost:8080/online-pdk/guide/index.html 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. 87 7. Go back to "Session" and save your new settings so this configuration will happen every time you login. 88 89 90 -------------------------------------------------------------------------------- 91 # Deployment 92 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 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 98 To host the pdk docs on the external appengine run: 99 /home/build/static/projects/apphosting/devtools/appcfg.py -s pdk-docs.appspot.com update <path_to_cupcake_src>/out/target/common/docs 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 104