Ubuntu Development Guide
This page shows how to set up an environment to work on Enchanting from within Ubuntu 10.10.Most of the commands are issued in a terminal window. (Sorry about the horizontal scrolling.)
Instructions tested on 2011-03-15 with a pristine install of Ubuntu; the trunk revision of Enchanting is 98, and leJOS is included with Enchanting.
Note: It may be possible to run Enchanting On Linux without all this work. Also note that Building Enchanting has been simplified dramatically since this was written, so running 'rebuild' and then going to 'ThirdParty/lejos_nxj/build' and running 'ant' may be enough. The instructions pertaining to udev and flashing the firmware likely continue to hold true.)
sudo apt-get install bzr libusb-0.1-4 libusb-dev libbluetooth-dev openjdk-6-jdk ant cd ~ mkdir -p development/enchanting cd development/enchanting/ bzr branch lp:enchanting enchanting-trunk cd enchanting-trunk/FrontEnd/ cp {Base,}Enchanting.image cp {Base,}Enchanting.changes ./enchanting_squeak_vm -plugins Plugins -vm-sound-pulse Enchanting.image
Now that the front-end is running, do the following, where shift+File means, "hold down the shift button and click on the File menu"):
shift+File -> Import from Version Control
shift+File -> Apply all updates to the environment (No, don't save the current Enchanting file)
shift+File -> Save Image in User Mode (yes, close all windows)
cd ../ThirdParty/lejos_nxj/build/ ant cd ../../../BackEnd/ build sudo -s # Enter password to become root # blacklisting note courtesy of http://ubuntuforums.org/showthread.php?t=1123633 echo "" >> /etc/modprobe.d/blacklist.conf echo "blacklist cdc_adm" >> /etc/modprobe.d/blacklist.conf echo -e '# LEGO Mindstorms NXT\nBUS=="usb", SYSFS{idVendor}=="03eb", GROUP="plugdev", MODE="0660"\nBUS=="usb", SYSFS{idVendor}=="0694", GROUP="plugdev", MODE="0660"' > /etc/udev/rules.d/mindstorms-nxt.rules exit cd ..
If you need to flash your firmware (which doesn't work inside the program in revision 98 of the trunk):
source BackEnd/set_env.sh nxjflashg
And finally, run Enchanting
./verbose_enchanting.linux.sh
One last note. If you run 'bzr status', it will say:
modified:
ThirdParty/lejos_nxj/bin/StartUpText.bin*
ThirdParty/lejos_nxj/bin/lejos_nxt_rom.bin*
ThirdParty/lejos_nxj/bin/libjfantom.jnilib*
unknown:
ThirdParty/lejos_nxj/src/jbluez/history.xml
ThirdParty/lejos_nxj/src/libnxt/history.xml
I'd prefer not to check in the modified files in at this time, although they'd be hard to ignore. If you check them in, give us a head's up.