wiki1122: HowToBuild

How to Build#

These instructions were tested on Ubuntu Linux 12.04 64-bit with Oracle Java JDK 1.7.0_40 64-bit.

  1. Download and install the JDK if you don't have it already
  2. Download and install Ant
  3. Download and Install Netbeans (7.3 worked for me)
  4. Install the latest FRC plugins for netbeans
    1. Add http://frcbuilder.wpi.edu:8190/job/Java-Netbeans-Plugin/lastSuccessfulBuild/artifact/dist/updates.xml as an 'Update Center' (Tools > Plugins > Settings)
    2. Install all 'FRC Java' plugins (Available Plugins tab)
    3. Restart Netbeans when prompted
  5. Install the 'Ruby and Rails' plugin
    1. Download the plugin from http://plugins.netbeans.org/plugin/38549
    2. Extract the archive somewhere
    3. Add the extracted 'updates.xml' as an 'Update Center' just like the FRC plugins before (do not use the 'Downloaded' tab; it will not work)
    4. Install 'Ruby and Rails' (Available Plugins tab)
    5. Restart Netbeans when prompted
  6. Download and install Git
  7. Check out source code
    1. Clone SmartDashboard2 projects sfx, sfxlib, and sfxmeta from this TeamForge project's Source Code page somewhere
  8. Open the three projects in Netbeans.
    • If you see a broken reference to the property 'Default_JavaFX_Platform', use the Netbeans new project wizard to create a new JavaFX application project. This will encourage Netbeans to fix itself.
    • If you see a broken reference to 'jfxrt.jar', this is the JavaFX runtime jar, now bundled with Java 1.7. I found it in /usr/lib/jvm/default-java/jre/lib.
    • If you see a broken reference to the property 'sunspot.home', set it to ~/sunspotfrcsdk (this should have been created when you installed the FRC plugins for Netbeans)
    • It may also help to open Right-Click > 'Project Properties' > Libraries > 'Manage Platforms' on the 'sfxmeta' project; this also encourages Netbeans to fix properties errors.
  9. Perform a build
    1. Open a shell; change to the 'sfx' directory
    2. Run 'ant'; internet access is required.
    3. Ideally, this will complete without error.
  10. Configure Netbeans to run SmartDashboard2
    1. Open the 'sfx' project 'Run' page (Right-Click > Properties > Run)
    2. Replace the 'Ruby Options' line with -I ../gems/jrubyfx/lib -I ../gems/jrubyfx-fxmlloader/lib -I ../../sfxlib/dist -I ../../sfxmeta/dist -X+C
    3. Click 'OK'
  11. Run the SmartDashboard2 within Netbeans
    1. Select the 'sfx' project
    2. Press the green play button ('Run Project') on the toolbar
    3. The dashboard should start.