Files
android_development/pdk

Building the pdk (platform development kit)

1) get a cupcake source tree with all the normal tools... and add doxygen 
(We currently support version 1.4.6)

  sudo apt-get install doxygen
  
Make sure that you are using the right version of java
  
  sudo update-java-alternatives -s java-1.5.0-sun

If that doesn't work, go through the instructions on

  http://source.android.com/download again.


2) from the root
  . build/envsetup.sh


4) mkdir dist
   mkdir logs
   
then build everything:

   time make -j4 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/`date +%y%m%d-%H%M%S`

so you can have a record of the build commands in the logs directory.


5) the pdk tar file is put in the dist directory.

6) the pdk-docs are in 

  out/target


The build target 'pdk' brings in the pdk/ndk make files into the build system.
  Then there are three targets:
    pdk_docs - which builds just the pdk documentation
    ndk - which builds the native development kit (native compiler, linker, etc.)
    pdk_all - which builds the above two targets

To chnage which version of doxygen runs you can pass in the variable:
  doxygen_version='<path/name_of_doxygen_executable>'
on the make line.

--------------------------------------------------------------------------------
# Testing
You must install google appengine.  See: http://code.google.com/appengine/downloads.html

Here's the command to run the pdk-docs server locally:
  python <path_to_appengine_installation>/dev_appserver.py --address 0.0.0.0 \
    <path_to_cupcake_code>/android/out/target/common/docs/online-pdk
    
To verify it is working you can access it with a browser loacally on port 8080:

http://localhost:8080/index.html
TODO: index.html needs correct links.
TODO: app.yaml not working for redirecting, getting extra '.' in html names...
 
 --------------------------------------------------------------------------------
# Deployment
To host the pdk docs on the interanl appengine run:
/home/build/static/projects/apphosting/devtools/appcfg.py update <path_to_cupcake_src>/out/common/docs
where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
all of which are tarred up by the Pdk.mk file when using the target pdk_docs. 

# Deployment
To host the pdk docs on the external appengine run:
/home/build/static/projects/apphosting/devtools/appcfg.py -s pdk-docs.appspot.com update <path_to_cupcake_src>/out/common/docs
where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
all of which are tarred up by the Pdk.mk file when using the target pdk_docs.