OSDN Git Service

lejos_NXJ_win32_0_5_0beta.zip
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / bin / lejosfirmdl.bat
1 @REM Container to allow backward compatibility for old commands\r
2 @REM Feel free to delete lejosdl.bat, lejosjc.bat and lejosfirmdl.bat\r
3 \r
4 @echo off\r
5 \r
6 @if "%LEJOS_HOME%" == "" GoTo :UNDEFINED\r
7 @REM The following only works with Windows 2000 on up:\r
8 @if NOT %lejos_home:~-3% == nxj GoTo :DONE\r
9 \r
10 :CHANGE\r
11 SET NXJ_HOME=%LEJOS_HOME%\r
12 \r
13 @REM Check if LIBUSB is installed:\r
14 @if exist "%SystemRoot%\system32\libusb0.dll" GoTo :MAIN\r
15 \r
16 @REM Check operating system and skip Vista:\r
17 Ver | Find "Version 6" >NUL\r
18   If ErrorLevel 1 Goto :INSTALL\r
19   Echo Vista Detected. Please manually install libusb in XP compatibility mode, otherwise USB devices will be deactivated. http://libusb-win32.sourceforge.net/#downloads\r
20   Goto :DONE\r
21 \r
22 :INSTALL\r
23 echo LIBUSB not installed. Running setup program...\r
24 START "LIBUSB INSTALLER" /wait "%NXJ_HOME%\3rdparty\lib\libusb-win32-filter-bin-0.1.12.1.exe"\r
25 echo NOTE: If you encounter the error NXT Not Found, reboot your computer, make sure the brick is still in firmware upload mode, and try again.\r
26 \r
27 :MAIN\r
28 @nxjflash.exe %*\r
29 GoTo :Done\r
30 \r
31 :UNDEFINED\r
32 echo LEJOS_HOME not defined.\r
33 \r
34 :DONE