Installing Tools

From MoCa Development Wiki

Jump to: navigation, search

Contents

Eclipse

Development Environment
  1. Go to http://www.eclipse.org/downloads/
  2. Download “Eclipse IDE for Java Developers (92 MB)”
  3. Copy Eclipse folder into Program Files folder on computer
  4. Launch eclipse.exe
  5. Hit the icon that says “Go to workbench”
SVN plug-in
  1. Go to Help > Install New Software > Click “Add…” Button
  2. Name: http://subclipse.tigris.org/update_1.4.x
    Location: http://subclipse.tigris.org/update_1.4.x
    Click OK
    Click Next, I agree to terms and conditions, Finish

Adobe FlexBuilder

Unless you will be modifying the code for the Flash media viewer, I don’t recommend installing FlexBuilder. Most of the development of that feature is done, so I wouldn’t bother since this involves getting a license for FlexBuilder.

Development Environment
  1. Go to http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3
  2. Download the Trial
  3. I think you can get the license for unlimited use of FlexBuilder if you apply for an educational license and send them an email request with a scanned copy of your student ID
SVN plug-in
  1. Go to Help > Software Updates > Find and Install
  2. Click “Add New Remote Site”
    Name: Subclipse
    Location: http://subclipse.tigris.org/update_1.2.x
    Click Finish.
  3. Under Subclipse, there are two options. Only select Subclipse Plug-in (Un-check the Integrations Optional option because that requires a Buckminster plug-in)
  4. Next, I agree to terms and conditions, Finish

Ant

Install this if you will be working with, modifying, and compiling OpenMRS modules.

Java Development Kit (JDK)
  1. Install Java JDK on computer, version 1.5 or later strongly recommended
    (If only JRE runtime is present, many tasks will not work, make sure you download a JDK) http://java.sun.com/javase/downloads/index.jsp
    Follow directions (look online for help)
  2. Make sure you modify environment variables and others they may ask of you
    1. Go to Computer > Right Click > Properties > Advanced System Settings > System Properties > Environment Variables
    2. Under System Variables
      1. Add new variable “JAVA_HOME” with the value as the path to the folder (i.e. “C:\Program Files\java\jdk1.6.0_02”)
Ant
  1. Download ant .zip file
    http://ant.apache.org/bindownload.cgi
  2. Unzip folder somewhere on your computer (i.e. Documents or Program Files folder)
  3. Modify environment variables
    1. Go to Computer > Right Click > Properties > Advanced System Settings > System Properties > Environment Variables
    2. Under System Variables
      1. Add new variable “ANT_HOME” with the value as the path to the zip file (i.e. “C:\Program Files\apache-ant-1.7.1-bin\apache-ant-1.7.1”)
      2. Add to the “PATH” variable, add a semicolon after the last entry “;%ANT_HOME%\bin” and don’t add a semicolon afterwards. Don’t add any extra spaces.

References

Ant on Windows http://wiki.apache.org/ant/AntOnWindows

Java JDK Downloads http://java.sun.com/javase/downloads/index.jsp

Android Tools

Android Software Development Kit (SDK)
  1. 1 Download SDK from website. Unzip into a folder on computer.
    http://developer.android.com/sdk/index.html
  2. 1 Change the computer’s environment variables to point to the SDK. On a Windows machines, Go to My Computer > Right click > Properties > Advanced Settings > Environment Variables
    1. Under system variables, find “Path” > Edit > Add semicolon
    2. Find system path location of the android SDK TOOLS folder
    3. Copy this path into the Path variable
    4. If you have another operating system, see the Android SDK link in the references below.
ADT Plugin for Eclipse
  1. Install the Android ADT Plugin for Eclipse
  2. In Eclipse, Go to Help > Install New Software > Add… to add site
    1. Name: http://dl-ssl.google.com/android/eclipse/
    2. Location: http://dl-ssl.google.com/android/eclipse/
    3. Click OK
    4. Click Next, I agree to terms and conditions, Finish
    5. If it doesn’t work, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).
    6. If it still doesn’t work, you can download the ADT zip file from the Internet and manually install it.
      http://developer.android.com/sdk/eclipse-adt.html
      Then in Eclipse, go to Help > Install New Software > Add… to add site
      Name: http://dl-ssl.google.com/android/eclipse/
      Hit Archive and browse computer for the ADT zip file.
      Select Developer Tool and Hit “Next” and complete wizard.
Android Emulator Devices
  1. In Eclipse with ADT installed, Click Windows > Preferences > Android > Browse for the Android SDK location (select the folder that has the tools folder located inside it)
  2. Now click Windows > Android SDK and AVD Manager
  3. In the left hand column, select “Available Packages”
  4. Check the box and select the devices you want (Android 1.1, 1.5, 1.6, 2.0), you can just install all of them
  5. Hit “Install Selected”
  6. After everything is installed, click “Virtual Devices” in the left hand column
    1. Click “New”
    2. Select a name like “Android 1.5”
    3. Under Target, select “Android 1.5 – API Level 3”
    4. Repeat for all the devices Android 1.1, Android 1.6, etc.. that you downloaded from above
  7. Warning: The emulator works best on a Mac.
    If you have Windows Vista + Eclipse and the app doesn’t load, turn off User Access Control to make it work (Control Panel > User Accounts > Turn User Access control on or off). It may take 5-10 minutes to load the Moca app.
    1. If you get errors like “Alarm clock does not work” or “Messaging does not work”, just hit Wait.
    2. Alternatively, you can also use adb and create .apk files to load onto the emulator. Read the section on "Installing Applications on the Emulator” http://developer.android.com/guide/developing/tools/emulator.html
Android Phone Device Debugging with Computer
  1. On the Phone, turn on “USB Debugging”
    1. Home > Menu > Applications > Development > Enable USB Debugging
  2. Plug Android phone via USB cord into the computer
  3. Click “No not this time” for Windows Auto Installer / Found New Hardware Wizard.
  4. Select “Locate and install drive software” instead of searching online
  5. Select “Browse my computer for driver software”
  6. Point it to the Android folder directory “usb_driver” that you downloaded. Leave “Include subfolder” checked.
  7. If it doesn’t autodetect, you may need to just upgrade the existing driver
    1. Go to Windows Explore, Right Click on Computer > Manage
    2. Select “Device Manager” in the left column
    3. Find “HTC Android Phone USB Device” under “Disk Drives”
    4. Right-Click it and do “Update Driver Software”
    5. Browse computer for the right “usb_driver” folder (see above directions)
Updating Firmware Version on Phone
  1. Make sure your phone is on Version 1.6
  2. On phone, go to Settings > About phone > “Firmware Version” should say 1.6
  3. Otherwise, get cellular connectivity and wait for a message that asks if you want to install a system update.
    1. Click “Install Now”
    2. Will install and restart phone, should be ready afterwards
  4. Or you can make manually install the correct version of Android onto the phone http://developer.htc.com/adp.html
Install Barcode Scanner App on Phone for Moca

Moca has been integrated with an Android Barcode scanner application in order to allow healthcare workers to scan barcode patient ID cards to reduce error in typing in their medical numbers.

  1. On phone, go to Android Market (Make sure there is cellular connectivity)
  2. Click Search icon in the top right corner, search for “Zxing”
  3. Select “Barcode Scanner” by the ZXing Team for FREE.
  4. Click Install.
  5. Will show up as downloading on your icon bar on the top of your phone. When it is done, pull down that bar. Click on “Barcode Scanner downloaded.”
  6. It will install on your phone. Then there will be another notification in your menu bar on “barcode scanner successfully installed”. Click on that and read about how to use it.
  7. Hit “Done”

References

Installing the Android SDK http://developer.android.com/sdk/installing.html

Installing and Updating the ADT http://developer.android.com/sdk/eclipse-adt.html

Adding AVD Devices http://developer.android.com/sdk/adding-components.html

Developing on a Device (USB Drivers for Windows, Mac, Linux) http://developer.android.com/guide/developing/device.html

Personal tools