SDK Install Guide
From BUGwiki
Contents |
Overview
The Dragonfly software development kit (SDK) is an Eclipse-based development environment that enables you to develop BUG applications in Java to run on BUG.
BUG Development Tools
The BUG SDK provides a comprehensive environment for coding, running and testing BUG apps. When creating new apps, the SDK helps you select the hardware modules and services to use and it generates the base code you will start from. This provides a framework for interacting with the OSGi services that represent the pluggable BUG hardware modules.
BUG Simulator
The built-in BUG Simulator is an emulator that allows you to quickly test-drive your applications in a controlled environment without BUG hardware. You can deploy your apps to BUG Simulator and debug them within Eclipse.
BUGnet Community
The SDK also provides access to the BUGnet community, where you can browse, download and share BUG apps. BUGnet provides a rich repository of BUG apps and code that you can try out and re-use in your BUG apps. When you have a BUG app to share, you can upload it to BUGnet and share it with the BUG community.
Dragonfly Perspectives
In Eclipse, a perspective is an organized view of the tabs and windows for a specific development task. For BUG programming, there is a Dragonfly perspective that presents the views that often need in BUG development.
Opening the Dragonfly Perspective
- In Eclipse, go to Window > Open Perspective > Other...
- In the Open Perspective window, click on Dragonfly to select it.
- The recently-used perspectives in Eclipse are listed in the upper-right corner. If you switched to the Dragonfly perspective recently, you should see Dragonfly and its icon listed there. Click on it to quickly switch to Dragonfly.
Installation
To use the Dragonfly SDK, you need to download and install Eclipse, then give Eclipse a simple setting to download and turn on the Dragonfly SDK. Bug Labs has (and will again) provide one click installers for Eclipse & Dragonfly SDK, but for the moment we are using a two step install system.
Prerequisites
If you have these prerequisites, skip ahead to 'Installing Dragonfly SDK'
- Dragonfly is compatible with Eclipse version 3.6 (Helios) or greater.
- Java 1.6 -- this can be tricky in Linux. See the troubleshooting section if you are unsure.
- On Linux, you may need to install xulrunner for the browser view to work inside Eclipse.
- If you are running on a 64-bit CPU, make sure your JDK and Eclipse versions are also 64-bit
Installing Eclipse
Hopefully, you have Eclipse already installed. If not, visit www.eclipse.org and look for the latest Eclipse Classic or Eclipse for Java Developers downloads. The latest version is currently 3.6 Helios. Download and install it, using these instructions if needed.
Install the Dragonfly SDK Plugin in Eclipse
These instructions assume you already have Eclipse version 3.6.
- In Eclipse, go to Help > Install New Software.
- On the right side, select the Add... button to open the Add Site dialog.
- Enter the Dragonfly Update Site url into the Location box (in this case, it's the production release. For more information, see http://buglabs.net/sdk):
- Click OK.
- An item will appear in the Available Software listing the "Dragonfly SDK".
- Select the checkbox to the left of Dragonfly SDK.
- Click the Next > button on the bottom of the dialog.
- A progress bar should appear.
- After a few seconds, the Install Details dialog will appear. One item, Dragonfly SDK, should be listed.
- Click Next
- The licenses associated with the SDK are displayed for review.
- Once you have reviewed them to your satisfaction select the I accept the terms of the license agreements radio button.
- Click Finish.
- Eclipse will detect and install a dependency called the Graphical Editing Framework (GEF) if you don't already have it.
- If you need to install GEF manually, you can search for "gef" in the Helios update site: http://download.eclipse.org/releases/helios
- A progress bar will appear as Eclipse downloads and installs the plugins.
- You will then receive a security warning Warning: You are installing software that contains unsigned content...
- Pretend you're running Vista and just click OK. We thank you for your donation from your bank accounts
- OK, that last bit isn't true, you can click the <<Details button and verify that everything is a com.buglabs... jar file, then click OK.
- When installation is complete, Eclipse will ask if you would like to restart.
Troubleshooting
If you are using Linux and the Dragonfly perspective is not available after a seemingly successful installation, it is possible that Eclipse is not using the correct version of Java. Determining the version of Java Eclipse is using can be frustrating.
One user fixed this problem by editing the eclipse.ini file in the root directory of his Eclipse installation to force the use of Java 1.6. The information at http://wiki.eclipse.org/Eclipse.ini explains how to do this.
SDK Version
When popping into IRC or filing a defect on redmine.buglabs.net, please attach information about the version of Dragonfly (and Eclipse that you're using) Installation Information dialog:
Next Step
Check out the Getting Started Tutorial to write your first program using the Dragonfly SDK