A template project for creating WPILib robot deployment code in IntelliJ.
- Download wpilib to your home directory.
- Clone this repository to a desired destination:
git clone https://github.com/Team334/frc-intellij.git
- Open the cloned repository (frc-intellij) in IntelliJ with
File > Open
. - To rename the project, right click on the folder and select
Refactor > Rename
. - Change the package name to match your team number. Again use
Refactor > Rename
.
org.us.first.frc.team334.robot → org.us.first.frc.team###.robot
- Hit the green play button to deploy.
— If the wpilib library isn't included in your project, you can manually add its jar files:
- Go to:
File > Project Structure > Project Settings > Libraries
. - Add the library by pressing the "+" button.
- Navigate to
wpilib/java/current/lib
. - Select the wpilib jar files you want and add them. Don't forget to Apply the changes.
Note: The WPIib.jar is necessary for all the other .jars you may want to add.
— If IntelliJ crashes while deploying, make sure you have the following files and folders in your project:
build.properties
build.xml
sysProps.xml
/out
If you don't, reinstall the project and follow the above instructions carefully. You can also create the out folder by simply running the project and then force quitting IntelliJ and restart it. The created out folder should then appear when reopened.
— If you can't run the project, you need to create a new Ant Target.
- Start by opening the Ant Build window
View > Tool Windows > Ant Build
. - Click the "+" and add the
build.xml
from this repo. "FRC Deployment" should appear in the Ant Build list. - Edit Configurations (button show in image below).
- Add a new Ant Target by clicking the "+".
- Give it a new name and browse for deploy in the Target name section.
- Apply, and hit the green play button to deploy.
*If you find any other errors, please open a new issue on this repo that clearly explains your problem.*