JMRI: Building with XCode
Introduction
Recent versions of MacOS X come with Xcode, a software development system developed for the Macintosh by Apple Computer. Xcode can be used to work with JMRI.
The instructions below assume a fresh checkout of JMRI, along with a recent version of Xcode.
Procedure to setup JMRI on Xcode
Start Xcode, dismiss any window that appears, and uncheck return to this window, etc.
Select Window>Organizer. ( Note: Xcode now uses the Organizer window for Java, instead of the main Xcode window used in early versions of Xcode.)
At the bottom left of the organizer window, in the "+" popup select "Add Existing Folder..."
Navigate to the "java" folder in your checkout of JMRI, and click Open.
Select "java" in the Organizer window. Click the Clean icon at the top of the Organizer window. When that completes, hold down the Build icon, and select ant 'compile'. This will compile all the JMRI source.
Selecting Build>ant 'jar' will build a jmri.jar file. The jar file is placed in your checkout folder.
To view or edit an existing source module, open the java folder at the top left in Organizer window (click the triangle on the left), then open the src folder, then the apps or jmri folder, etc. to find the file you're interested in.
To create an ant 'panelpro' entry in the Build list:
Select "Edit Actions..." in the Build list.
Select ant 'compile' in the list at the left, and copy the command that shows in the box on the right.
In the + popup at the lower left, select "New Shell Script".
Change "Shell Script" to "ant 'panelpro' " in the list on the left.
Paste the text you copied in b into the right box, and change "compile" to "panelpro".
Click OK.
Note: Selecting ant 'panelpro' in the Build list, will compile, build, and run PanelPro, with error and warning messages displayed in an Xcode window.
You can follow 8 to set up to easily run any of the ant commands JMRI uses.