|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Project Build Inquiries
Hi whoever is still active.
Recently I've been digging around the nitty gritty files of FRC projects, so here's some questions I have after doing some exploring (concerning mainly build.xml) WARNING: it gets rambly. Code:
${user.home}/wpilib/wpilib.properties
Inside wpilib.properties, there's this line: Code:
#Don't add new properties, they will be deleted by the eclipse plugin. version=current team-number=3925 In build.properties Code:
robot.class=${package}.Robot
userLibs=${user.home}/navx-mxp/java/lib/navx_frc.jar
Back in build.xml Code:
<property file="${user.home}/wpilib/java/${version}/ant/build.properties"/>
In ...ant/build.properties Code:
username=lvuser
password=
deploy.dir=/home/lvuser
deploy.kill.command=. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r
debug.flag.dir=/tmp/
debug.flag.command=chown lvuser:ni ${debug.flag.dir}frcdebug
command.dir=/home/lvuser/
version=current
roboRIOJRE.dir=/usr/local/frc/JRE
Anyway, if anyone can answer any of those questions, I'd appreciate it. If you have any other questions about the nitty gritty of FRC Java projects, here's the thread to post 'em. Thanks! |
|
#2
|
||||
|
||||
|
Re: Project Build Inquiries
build.xml and *.properties are part of the Apache ant build system.. This is like a scripting language for building binaries and deploying them. WPILib uses Ant for deploying code to the robot, primarily.
build.properties is where the variables for the script are stored. build.xml contains the actual script. The reason to separate out variables is so that they can conveniently be in one place, and easily configurable. In theory, you shouldn't touch things in <user profile>\wpilib (such as wpilib.properties) because the WPILib eclipse plugin overwrites them when you start eclipse (or, I assume, when you change WPILib plugin settings). The ${} notation is special Ant notation that inserts the specified variable from build.properties into the attribute. |
|
#3
|
|||
|
|||
|
Re: Project Build Inquiries
Quote:
navx_frc.jar is from a third party (Kauai Labs) and isn't included directly in the WPI Library, which is why its necessary to modify your project's "Project Build properties" (build.properties) file. The WPI Library has added a variable named userLibs to allow a third party to add libraries to the list of libraries used by your robot application. The ${userLibs} notation is what allows your "Project Build properties" to access that variable. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|