-
Notifications
You must be signed in to change notification settings - Fork 2
Linux development
Installing Eclipse on Linux is the easy part. Your distro's package manager will usually have a package called eclipse which will pull in everything you need.
But when you clone our 2017bot repository and import it into Eclipse, you will notice build errors for the entire edu.wpi.first.wpilibj namespace hierarchy. To fix this, you need to also install the WPILib Eclipse plugin. On Windows, there is an installer that takes care of this, but Linux users have no such luck!
Following either of the following strategies should make the build errors vanish. Note that Eclipse needs to restart in order to "see" the plugins.
It wasn't immediately obvious to me but as it turns out[1], there's an official Eclipse plugin repository for FRC. Downloading the plugins that way eliminates the need to build them locally.
- From Eclipse, navigate to Help → Install New Software → Add.
- Set Name to "FRC Plugins" and set Location to http://first.wpi.edu/FRC/roborio/release/eclipse/.
- Click Ok and wait for a few seconds.
- Eclipse will list the C++ and Java plugins available there. Select both and then accept the license agreement.
This was the approach I first took. It works fine, though it takes more effort.
- From a forum post[2], I learned where to find the source code for WPILib.
- Conveniently, one of the pinned Git repositories was EclipsePlugins, which I cloned to a local directory using:
git clone -v https://github.com/wpilibsuite/EclipsePlugins.git ~/FRC-Eclipse-Plugins
- The instructions in the repo's README file stated that building would require Java 8 (which I already had) and Maven (which I did not), so I installed my distro's maven package.
- Building was as simple as entering the FRC-Eclipse-Plugins directory and executing
./gradlew build
. The build involved a lot of Maven downloads into ~/.m2 so it took a while, but that only had to be done once. - As the README file states, after the build, the Eclipse plugins are copied to ~/FRC-Eclipse-Plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/. (Note the site.xml file in that location; it's important.)
- I was stuck for what to do next until a web search for wpilib install eclipse plugins<tt> turned up the "Intro to Eclipse Plugins" page on the (official?) WPILib Developer's Guide <ref>https://petermitrano.github.io/WPILib_Developers_Guide/tutorials/Eclipise%20Plugins/intro_to_eclipse_plugins.html, retrieved 2017-01-16.</ref>
- ^ http://wpilib.screenstepslive.com/s/4485/m/13810/l/145002-installing-eclipse-c-java, retrieved 2017-01-16.
- ^ https://www.chiefdelphi.com/forums/showthread.php?p=1387787#post1387787, retrieved 2017-01-15.