home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2004 April / VPR0404.ISO / KNOPPIX / knoblind.bat < prev    next >
DOS Batch File  |  2003-11-26  |  6KB  |  189 lines

  1. set cmdline=
  2.  
  3. @echo off
  4.  
  5. REM KNOBLIND - by Osvaldo La Rossa - http://www.brlspeak.net -
  6. REM A BLINdfriendly KNOppix bootDisk builder for the KNOPPIX GNU/LINUX
  7. REM distribution - 
  8. REM First release: 04-12-2002 - Public 
  9. REM Updated 07-01-2003: post-rawrite bug correction + keyboard parameter added
  10. REM Updated 29-01-2003: knoblind.bat autolocation (runned from CD / from HD)
  11. REM                     + W9x versus NT/W2K/XP or DOS autodiagnose
  12. REM                     + some not relevant lay-out details
  13. REM Updated 27-09-2003: upgrade of brltty's tbl selection in the append line
  14.  
  15. cls
  16. echo This script is FREE software.
  17. echo It may be copied and redistributed under the conditions of the GNU 
  18. echo GENERAL PUBLIC LICENSE Version 2, see http://www.gnu.org/ 
  19. pause > nul:
  20.  
  21. cls
  22. echo KNOBLIND - by Osvaldo La Rossa - http://www.brlspeak.net/
  23. echo A BLINdfriendly KNOppix bootDisk builder for the KNOPPIX GNU/LINUX
  24. echo distribution - http://www.knopper.net/knoppix
  25. echo -------------------------------------------------------------------------------
  26. echo.
  27. echo This preconfiger was especially realized to automize the boot sequence,
  28. echo providing it with the apropriate braille support for blind users.
  29. echo To do this, we will use both the CD + a special (knoblind) bootdisk:
  30. echo by running this BATch, you will be able to build a disk with the right
  31. echo Braille support for your specific display.
  32. echo After that, you no longer need to enter any parameters at the "boot:" prompt:
  33. echo just keep both the CD + bootdisk in their devices,
  34. echo and press ENTER, or wait until the system boots-up.
  35. echo.
  36. echo The default KNOBLIND config will now be set to no-scroll mode (required for
  37. echo hardware braille displays), it will also be set to normal VGA, lang fr,
  38. echo keyboard be-latin1, and BrlTty support for ALVA, at serial port 1, with
  39. echo German (de) table.
  40. echo You may modify this by hand before rebooting (see the APPEND line in the
  41. echo a:\syslinux.cfg file).
  42. echo.
  43. echo If your configuration is correct, then just wait ... until you see the
  44. echo "root@tty1[/]#" prompt.
  45. pause > nul:
  46.  
  47. :bagain
  48. cls
  49. if not exist c:\windows\command\choice.com goto isitdos
  50. goto menu
  51. :isitdos
  52. if not exist c:\dos\choice.com goto nt2kxp
  53. :menu
  54. choice /c:CEQ "C)reate a bootdisk  E)edit current a:\syslinux.cfg  Q)uit:  "/n
  55. if errorlevel 3 goto quit
  56. if errorlevel 2 goto current
  57. if errorlevel 1 goto new
  58.  
  59. :new
  60. cls
  61. if exist \knoppix\knoblind.bat goto cdrun
  62. choice /c:DEFGHQ "Where is your KNOPPIX CD?  D  E  F  G  H  q)uit:  "/n
  63. if errorlevel 6 goto quit
  64. if errorlevel 5 goto dh
  65. if errorlevel 4 goto dg
  66. if errorlevel 3 goto df
  67. if errorlevel 2 goto de
  68. if errorlevel 1 goto dd
  69.  
  70. :cdrun
  71. echo.
  72. echo Place a blank disk in drive A:, then press a key to proceed ...
  73. pause
  74. call mkfloppy
  75. set cmdline=
  76. goto ok
  77.  
  78. :nt2kxp
  79. echo Warning: you are probably running a different system than Win9x ...
  80. echo Please insert a blank diskette in drive A:, then press a key:
  81. echo the boot image will be directly written to A: without prompting for
  82. echo a CHOICE-menu, since choice.com no longer exist on NT/W2K/XP ...
  83. echo You're also supposed running this BATch from the CD, not from HD; if not,
  84. echo do CTRL+C, else press a key to proceed ...
  85. pause
  86. cls
  87. call mkfloppy
  88. set cmdline=
  89. goto ok
  90.  
  91. :dd
  92. cls
  93. d:
  94. cd \knoppix
  95. call mkfloppy
  96. goto ok
  97. :de
  98. cls
  99. e:
  100. cd \knoppix
  101. call mkfloppy
  102. goto ok
  103. :df
  104. cls
  105. f:
  106. cd \knoppix
  107. call mkfloppy
  108. goto ok
  109. :dg
  110. cls
  111. g:
  112. cd \knoppix
  113. call mkfloppy
  114. goto ok
  115. :dh
  116. cls
  117. h:
  118. cd \knoppix
  119. call mkfloppy
  120. goto ok
  121.  
  122. :ok
  123. set cmdline=
  124. echo.
  125. echo Purifying disk ...
  126. ren a:\logo.* *.txt
  127. echo Graphical logo renamed to *.txt ...
  128. echo.
  129. ren a:\syslinux.* *.ori
  130. echo syslinux.cfg renamed to *.ori ...
  131. echo.
  132. echo Building new syslinux.cfg with integrated braille support ...
  133. echo DEFAULT vmlinuz >a:\syslinux.cfg
  134. echo APPEND no-scroll lang=fr keyboard=be-latin1 ramdisk_size=100000 init=/etc/init noapic apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi vga=normal initrd=miniroot.gz quiet BOOT_IMAGE=knoppix brltty=al,/dev/ttyS0,text.de.tbl >>a:\syslinux.cfg
  135. echo TIMEOUT 30 >>a:\syslinux.cfg
  136. echo. >>a:\syslinux.cfg
  137. echo PROMPT 1 >>a:\syslinux.cfg
  138. echo DISPLAY boot.msg >>a:\syslinux.cfg
  139. echo F1 boot.msg >>a:\syslinux.cfg
  140. echo F2 f2 >>a:\syslinux.cfg
  141. echo Edit now a:\syslinux.cfg for your personal display:
  142. echo see brltty=al,/dev/ttyS0,text.german.tbl at the end of the APPEND line ...
  143. pause
  144. if exist c:\dos\edit.* goto current
  145. if not exist c:\windows\command\choice.com goto noedsyslx
  146. :current
  147. set cmdline=
  148. edit a:\syslinux.cfg
  149. goto noxp
  150. :noedsyslx
  151. echo (If you are running this BATch under NT/W2K/XP's pseudo-DOS box, you must
  152. echo edit a:\syslinux.cfg by hand to select the appropriate BrlTty driver for
  153. echo your specific config ...)
  154. echo.
  155. :noxp
  156. if exist a:\logo.txt goto ready
  157. cls
  158. echo WARNING! disk error: can't locate a:\logo.txt:
  159. echo this file is used to control the bootdisk integrity, please try to build
  160. echo the KnoBlind disk again ...
  161. echo KNOWN BUG / KNOWN SOLUTION:
  162. echo if the problem occurs once again, try to reboot the pc under DOS/DOSbox,
  163. echo then run immediately the knoblind BATch.
  164. echo.
  165. echo Press a key to try again, or use CTRL+C to abort now ...
  166. pause
  167. goto bagain
  168. :ready
  169. echo Done!
  170. echo.
  171. echo ThanX for using KNOBLIND! You may now restart the machine ...
  172. echo Report problems to: info@brlspeak.net with Subject: KnoBlind Disk
  173. echo Don't hesitate to E-mail if you'd like to contribute, any help is
  174. echo really appreciated!
  175. goto done
  176.  
  177. :quit
  178. cls
  179. echo This script is FREE software.
  180. echo It may be copied and redistributed under the conditions of the GNU 
  181. echo GENERAL PUBLIC LICENSE Version 2, see http://www.gnu.org/ 
  182. echo.
  183. echo Report problems to: info@brlspeak.net with Subject: KnoBlind Disk
  184. echo Also use this address to contact us for contrib.
  185. set cmdline=
  186.  
  187. :done
  188. set cmdline=
  189.