home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / szachy / gnu / amyboard-3.2.pl2 / install < prev    next >
Text File  |  1995-05-23  |  34KB  |  1,137 lines

  1. ;;; -*- Lisp-Interaction -*-      ;;;  Version: 26-Mar-95                ;;;
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;;
  4. ;;;  AmyBoard Installation script
  5. ;;;  Copyright (C)  1995,   Jochen Wiedmann
  6. ;;;
  7. ;;;  This program is free software; you can redistribute it and/or modify
  8. ;;;  it under the terms of the GNU General Public License as published by
  9. ;;;  the Free Software Foundation; either version 2 of the License, or
  10. ;;;  (at your option) any later version.
  11. ;;;
  12. ;;;  This program is distributed in the hope that it will be useful,
  13. ;;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ;;;  GNU General Public License for more details.
  16. ;;;
  17. ;;;  You should have received a copy of the GNU General Public License
  18. ;;;  along with this program; if not, write to the Free Software
  19. ;;;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ;;;
  21. ;;;
  22. ;;;  Author:   Jochen Wiedmann
  23. ;;;            Am Eisteich 9
  24. ;;;            72555 Metzingen
  25. ;;;            Germany
  26. ;;;
  27. ;;;            Phone: (0049) +7123 / 14881
  28. ;;;            Internet: jochen.wiedmann@zdv.uni-tuebingen.de
  29. ;;;
  30. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  31.  
  32.  
  33. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  34. ;;;
  35. ;;;  Variable settings
  36. ;;;
  37. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  38. (set installVersion "3.2.pl2")
  39. (set installName "AmyBoard")
  40. ;(set installProgram (cat installName "-" installVersion))
  41. (set installProgram installName)
  42. (set minOsVersion 37)
  43. (set minMuiVersion 8)
  44.  
  45.  
  46. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  47. ;;;
  48. ;;;  SelectInstallDir procedure
  49. ;;;
  50. ;;;  Allows the user to select an installation directory (full path),
  51. ;;;  which will be stored in the installDir variable.
  52. ;;;
  53. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  54. (procedure SelectInstallDir
  55.     (set installDir-Parent (expandpath (askdir
  56.     (prompt "Please select the installation directory. "
  57.         "A drawer " installProgram " will be created."
  58.     )
  59.     (help installName " is installed in a separate directory. "
  60.           "A typical place is something like `Work:" installProgram
  61.           "' or something similar. In this example you should select "
  62.           "the directory `Work:'.\n\n"
  63.           @askdir-help)
  64.     (default @default-dest)
  65.     (newpath)
  66.     )))
  67.  
  68.     (set installDir (tackon installDir-Parent installProgram))
  69.     (set @default-dest installDir)
  70.     (message "Installing in " installDir)
  71. )
  72.  
  73.  
  74. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  75. ;;;
  76. ;;;  CheckOsVersion procedure
  77. ;;;
  78. ;;;  Aborts, if OS version is lower than the variable minOsVersion.
  79. ;;;  Sets osVersion variable.
  80. ;;;
  81. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  82. (procedure CheckOsVersion
  83.     (set osVersion (/ (getversion "exec.library" (resident)) 65536))
  84.     (if (< osVersion minOsVersion)
  85.     (   (abort "Sorry, " installName
  86.            " needs Kickstart/Workbench 2.04 or higher.")
  87.     ))
  88. )
  89.  
  90.  
  91. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  92. ;;;
  93. ;;;  CheckMuiVersion procedure
  94. ;;;
  95. ;;;  Aborts, if MUI isn't installed or the version is lower than
  96. ;;;  minMuiVersion.
  97. ;;;  Sets muiVersion variable.
  98. ;;;
  99. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  100. (procedure CheckMuiVersion
  101.     (set muiVersion (/ (getversion "libs:muimaster.library") 65536))
  102.     (if (< muiVersion minMuiVersion)
  103.     (   (abort "Sorry, you don't seem to have installed MUI version "
  104.            " 2.0 or higher.")
  105.     ))
  106. )
  107.  
  108.  
  109. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  110. ;;;
  111. ;;;  ShowCopyrightMessage procedure
  112. ;;;
  113. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  114. (procedure ShowCopyrightMessage
  115.     (message installName ": GNU Chess and ICS frontend\n\n"
  116.     "V" installVersion " © 1995  Jochen Wiedmann\n\n"
  117.     "This program is FREE SOFTWARE; you can redistribute it and/or "
  118.     "modify it under the terms of the GNU General Public License as "
  119.     "published by the Free Software Foundation; either version 2 "
  120.     "or any later version.\n\n"
  121.     "This program is distributed in the hope that it will be useful, "
  122.     "but WITHOUT ANY WARRANTY! See the GNU General Public License "
  123.     "(in the file COPYING) for details."
  124.     )
  125. )
  126.  
  127.  
  128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  129. ;;;
  130. ;;;  CreateDrawer procedure
  131. ;;;
  132. ;;;  Creates a new drawer.
  133. ;;;
  134. ;;;  Uses: drawerName    drawer's name
  135. ;;;
  136. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  137. (procedure CreateDrawer
  138.  
  139.     (if (<> (exists drawerName) 2)
  140.     (   (makedir drawerName
  141.         (prompt ("Creating drawer %s " drawerName))
  142.         (infos)
  143.     )
  144.     ))
  145. )
  146.  
  147.  
  148. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  149. ;;;
  150. ;;;  CheckObsoleteDir procedure
  151. ;;;
  152. ;;;  Asks the user if he wants an "obsolete" directory and creates it,
  153. ;;;  if this is the case. The name will be stored in installObsoleteDir
  154. ;;;  in that case, otherwise this variable will receive the value "".
  155. ;;;
  156. ;;;  Uses: installDir   name of installation directory
  157. ;;;
  158. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  159. (set installObsoleteDirChecked 0)
  160. (procedure CheckObsoleteDir
  161.  
  162.     (if (NOT installObsoleteDirChecked)
  163.     (   (set installObsoleteDir (tackon installDir "obsolete"))
  164.     (if (<> (exists installObsoleteDir) 2)
  165.     (   (makedir installObsoleteDir
  166.         (prompt "Creating a directory " installObsoleteDir " to keep "
  167.             "old prefs files and icons."
  168.         )
  169.         (help "Old prefs files and icons may be prevented from "
  170.               "deletion by copying them to " installObsoleteDir
  171.               ". You may skip this part, if you don't want this.\n\n"
  172.               @makedir-help
  173.         )
  174.         (confirm)
  175.         (infos)
  176.         )
  177.         (if (<> (exists installObsoleteDir) 2)
  178.         (   (set installObsoleteDir "")
  179.         ))
  180.     ))
  181.     (set installObsoleteDirChecked 1)
  182.     ))
  183. )
  184.  
  185.  
  186. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  187. ;;;
  188. ;;;  CheckObsoletefile procedure
  189. ;;;
  190. ;;;  Uses: checkObsoleteFileName    name of file to be copyied into the
  191. ;;;                                 obsolete directory (relative to
  192. ;;;                                 installDir)
  193. ;;;        installObsoleteDir       name of the "obsolete" directory
  194. ;;;        installDir               name of the installation directory
  195. ;;;
  196. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  197. (procedure CheckObsoleteFile
  198.  
  199.     (if (exists checkObsoleteFileName)
  200.     (   (CheckObsoleteDir)
  201.  
  202.     (if installObsoleteDir
  203.     (   (copyfiles
  204.         (prompt ("Preserving old file %s ..." checkObsoleteFileName))
  205.         (help "The old icon " checkObsoleteFileName " may be preserved "
  206.               "by copying it to " installObsoleteDir ". You may skip "
  207.               "this part, if you don't want this.\n\n"
  208.               @rename-help
  209.         )
  210.         (source checkObsoleteFileName)
  211.         (confirm)
  212.         (dest installObsoleteDir)
  213.         (infos)
  214.         (optional "oknodelete" "force" "askuser")
  215.         )
  216.     ))
  217.     ))
  218. )
  219.  
  220.  
  221. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  222. ;;;
  223. ;;;  CreateIcon procedure
  224. ;;;
  225. ;;;  Creates an icon
  226. ;;;
  227. ;;;  Uses: iconName     path of icon to create (".info" removed)
  228. ;;;        iconSource   path of icon to use
  229. ;;;        iconSave     1, if CheckObsoleteFile should be called
  230. ;;;                     to save the icon, 0 otherwise
  231. ;;;
  232. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  233. (procedure CreateIcon
  234.  
  235.     (set iconFullName (cat iconName ".info"))
  236.     (if iconSave
  237.     (   (set checkObsoleteFileName iconFullName)
  238.     (CheckObsoleteFile)
  239.     ))
  240.  
  241.     (if (NOT (exists iconFullName))
  242.     (   (if (exists iconSource)
  243.     (   (transcript "Creating icon " iconFullName)
  244.         (copyfiles
  245.         (prompt "Copying " (fileonly iconName) " icon ...")
  246.         (source iconSource)
  247.         (dest (pathonly iconName))
  248.         (newname (fileonly iconFullName))
  249.         (optional "oknodelete" "askuser")
  250.         )
  251.     )
  252.     (   (transcript iconSource " not found, cannot create "
  253.             iconFullName
  254.         )
  255.     ))
  256.     )
  257.     (   (transcript "Using existing icon " iconFullName)
  258.     ))
  259. )
  260.  
  261.  
  262. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  263. ;;;
  264. ;;;  CreateICSIcon procedure
  265. ;;;
  266. ;;;  Uses: icsHost              name of ICS host, example chess.lm.com
  267. ;;;        icsPort              port number of ICS host, example 5000
  268. ;;;        icsHostName          name of icon to be created
  269. ;;;        icsWindow            window specification for the ICS window
  270. ;;;        telnetProgram        path of the telnet binary
  271. ;;;        installDir           name of installation directory
  272. ;;;
  273. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  274. (procedure CreateICSIcon
  275.  
  276.     (set iconName (tackon installDir icsHostName))
  277.     (set iconSource "AmyBoard.info")
  278.     (set iconSave 1)
  279.     (CreateIcon)
  280.  
  281.     (tooltype
  282.     (prompt (cat "Changing tooltypes of " iconHostName "icon."))
  283.     (dest iconName)
  284.     (setstack 20000)
  285.     (setdefaulttool (tackon installDir "AmyBoard"))
  286.     (settooltype "ICSHOST" icsHost)
  287.     (settooltype "ICSPORT" (cat icsPort))
  288.     (settooltype "TELNETPROGRAM" telnetProgram)
  289.     (settooltype "NOCHESSPROGRAM" "FALSE")
  290.     (settooltype "ICS" "TRUE")
  291.     (settooltype "ICSWINDOW" (icsWindow icsHost))
  292.     (noposition)
  293.     )
  294. )
  295.  
  296.  
  297. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  298. ;;;;
  299. ;;;;  CreateGNUChessIcon procedure
  300. ;;;;
  301. ;;;;  Creates a GNU Chess icon.
  302. ;;;;
  303. ;;;;  Uses:  installDir   path of installation directory
  304. ;;;;
  305. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  306. (procedure CreateGNUChessIcon
  307.  
  308.     (if (<> gnuChessPath "")
  309.     (   (set iconName (tackon installDir "GNU Chess"))
  310.     (set iconSource "AmyBoard.info")
  311.     (set iconSave 1)
  312.     (CreateIcon)
  313.  
  314.     (tooltype
  315.         (prompt "Changing tooltypes of " iconName ...)
  316.         (dest iconName)
  317.         (setdefaulttool (tackon installDir "AmyBoard"))
  318.         (settooltype "NOCHESSPROGRAM" "FALSE")
  319.         (settooltype "ICS" "FALSE")
  320.         (noposition)
  321.     )
  322.     ))
  323. )
  324.  
  325.  
  326. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  327. ;;;;
  328. ;;;;  CreateDocIcon procedure
  329. ;;;;
  330. ;;;;  Creates a docfile's icon.
  331. ;;;;
  332. ;;;;  Uses:  installDir   path of installation directory
  333. ;;;;         docFile      docfile's name
  334. ;;;;
  335. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  336. (procedure CreateDocIcon
  337.  
  338.     (set iconName docFile)
  339.     (set iconSource "doc/ReadMe.mui.info")
  340.     (set iconSave 0)
  341.     (CreateIcon)
  342.  
  343.     (if (< osVersion 39)
  344.     (   (tooltype
  345.         (prompt "Changing tooltype of " iconName ...)
  346.         (dest docFile)
  347.         (setdefaulttool "Sys:Utilities/More")
  348.         (noposition)
  349.     )
  350.     )
  351.     (   (tooltype
  352.         (prompt "Changing tooltype of " iconName ...)
  353.         (dest docFile)
  354.         (setdefaulttool "Sys:Utilities/MultiView")
  355.         (settooltype "FILETYPE" "TEXT|ASCII")
  356.         (noposition)
  357.     )
  358.     ))
  359. )
  360.  
  361.  
  362. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  363. ;;;;
  364. ;;;;  CreateGuideIcon procedure
  365. ;;;;
  366. ;;;;  Creates an AmigaGuide file's icon.
  367. ;;;;
  368. ;;;;  Uses:  installDir   path of installation directory
  369. ;;;;         guideFile    guidefile's name
  370. ;;;;
  371. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  372. (procedure CreateGuideIcon
  373.  
  374.     (set iconName guideFile)
  375.     (set iconSource "doc/AmyBoard.guide.info")
  376.     (set iconSave 0)
  377.     (CreateIcon)
  378.  
  379.     (if (< osVersion 39)
  380.     (   (tooltype
  381.         (prompt "Changing tooltype of " iconName ...)
  382.         (dest guideFile)
  383.         (setdefaulttool "Sys:Utilities/AmigaGuide")
  384.         (noposition)
  385.     )
  386.     )
  387.     (   (tooltype
  388.         (prompt "Changing tooltype of " iconName ...)
  389.         (dest guideFile)
  390.         (setdefaulttool "Sys:Utilities/MultiView")
  391.         (settooltype "FILETYPE" "TEXT|ASCII|AMIGAGUIDE")
  392.         (noposition)
  393.     )
  394.     ))
  395. )  
  396.  
  397.  
  398. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  399. ;;;
  400. ;;;  GetGNUChessSettings procedure
  401. ;;;
  402. ;;;  Asks the user for the variable gnuChessPath
  403. ;;;
  404. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  405. (procedure GetGNUChessSettings
  406.  
  407.     (set gnuChessPath "")
  408.     (set defaultGnuChessPath
  409.      (tackon (fileonly installDir) "gnuchess-4.0.pl74/gnuchessx"))
  410.     (if (askbool
  411.     (prompt "Do you have GNU Chess installed?")
  412.     (help "AmyBoard needs to know the complete path of GNU Chess, "
  413.           "if you want to play against it. Answer \"yes\" in that "
  414.           "case, \"no\" otherwise."
  415.           @askbool-help
  416.     )
  417.     (default 1))
  418.     (   (while (= gnuChessPath "")
  419.     (   (set gnuChessPath (expandpath (askfile
  420.         (prompt "Please select the gnuchessx binary.\n\n")
  421.         (help "To play against GNU Chess you must tell AmyBoard, "
  422.               "where the gnuchessx binary is found. (Be sure, that "
  423.               "you select gnuchessx and not gnuchess, gnuchessr or "
  424.               "anything else.)\n\n"
  425.               @askfile-help
  426.         )
  427.         (default defaultGnuChessPath)
  428. ;               (newpath)
  429.         )))
  430.         (set defaultGnuChessPath gnuChessPath)
  431.  
  432.         (if (<> (fileonly gnuChessPath) "gnuchessx")
  433.         (   (if (NOT (askbool
  434.             (prompt "You have selected a binary called "
  435.                 (fileonly gnuChessPath) " and not gnuchessx.\n\n"
  436.                 "Are you sure?"
  437.             )
  438.             (help "There are different versions of GNU Chess, "
  439.               "for example gnuchess nad gnuchessr using a "
  440.               "curses display. Only gnuchessx may be used by "
  441.               "AmyBoard.\n\n"
  442.               "Select \"yes\", if you are sure, \"no\" "
  443.               "otherwise.\n\n"
  444.               @askbool-help
  445.             )
  446.             (default 0)))
  447.         (   (set gnuChessPath "")
  448.         ))
  449.         ))
  450.     ))
  451.  
  452.     (select (askchoice
  453.         (prompt "Please select the memory reauirements of GNU Chess.")
  454.         (help "GNU Chess may use a variable amount of memory. More memory "
  455.           "enhances it's strength.\n\n"
  456.           @askchoice-help
  457.         )
  458.         (choices "about 1 MByte   (-C 1001 -T 4001)"
  459.              "about 2 MByte   (-C 3001 -T 20001)"
  460.              "about 2.5 MByte (-C 4001 -T 30001)"
  461.              "about 3 MByte   (-C 6001 -T 40001)"
  462.              "different       (you'll be asked)"
  463.         ))
  464.     (   (set gnuChessMemory "-C 1001 -T 4001")
  465.     )
  466.     (   (set gnuChessMemory "-C 3001 -T 20001")
  467.     )
  468.     (   (set gnuChessMemory "-C 4001 -T 30001")
  469.     )
  470.     (   (set gnuChessMemory "-C 6001 -T 40001")
  471.     )
  472.     (   (set gnuChessMemory (askstring
  473.         (prompt "Please enter the GNU Chess option string.")
  474.         (help "GNU Chess's memory requirements are controlled by "
  475.               "a set of options. Please read the GNU Chess docs "
  476.               "for detailed information and enter the appropriate "
  477.               "option string.\n\n"
  478.               @askstring-help
  479.         )
  480.         (default "-C 6001 -T 40001")
  481.         ))
  482.     ))
  483.  
  484.     (set gnuChessPath ("\"%s\" %s" gnuChessPath gnuChessMemory))
  485.     ))
  486. )
  487.  
  488.  
  489. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  490. ;;;
  491. ;;;  CreateIPDialTextFiles procedure
  492. ;;;
  493. ;;;  Creates files to connect to ICS using IPDial.
  494. ;;;
  495. ;;;  Uses: installLibDir    name of "lib" directory
  496. ;;;        telnetProgram    path of the IPDial binary
  497. ;;;        phoneNumber      remote hosts phone number
  498. ;;;
  499. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  500. (procedure CreateIPDialTextFiles
  501.  
  502.     (set icsSerialName (tackon installLibDir "ICSSerial"))
  503.     (set ipDialLoginName (tackon installLibDir "IcsLogin.IPDial"))
  504.  
  505.     (set checkObsoleteFileName icsSerialName)
  506.     (CheckObsoleteFile)
  507.     (textfile
  508.     (prompt "Creating shell script " icsSerialName "...")
  509.     (help icsSerialName " is a shell script used as a fake terminal "
  510.           "program which calls IPDial.\n\n"
  511.           @textfile-help
  512.     )
  513.     (dest icsSerialName)
  514.     (append ".key HOST/A,PORT/A\n"
  515.         ".bra <\n"
  516.         ".ket >\n"
  517.         "set ICSHOST \"<HOST>\"\n"
  518.         "set ICSPORT \"<PORT>\"\n"
  519.         "\"" telnetProgram "\" \"" ipDialLoginName "\"\n"
  520.     )
  521.     )
  522.     (protect icsSerialName "+s +e")
  523.     (set docFile icsSerialName)
  524.     (CreateDocIcon)
  525.  
  526.     (set checkObsoleteFileName ipDialLoginName)
  527.     (CheckObsoleteFile)
  528.     (textfile
  529.     (prompt "Creating IPDial script " ipDialLoginName "...")
  530.     (help ipDialLoginName " is a script executed by IPDial to "
  531.           "connect to the remote host which can connect to the "
  532.           "ICS server.\n\n"
  533.           @textfile-help
  534.     )
  535.     (dest ipDialLoginName)
  536.     (append
  537.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  538.         ";\n"
  539.         ";   Login script to the Internet chess server; to be used by\n"
  540.         ";   IPDial (Aminet, comm/tcp).\n"
  541.         ";\n"
  542.         ";   Version 1.3,    09.03.1995\n"
  543.         ";\n"
  544.         ";   This is a template; you need to edit this according to\n"
  545.         ";   your needs so that it can dial into your remote host.\n"
  546.         ";\n"
  547.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  548.         ";\n"
  549.         ";   The line below *must* be present and *must* be the first command\n"
  550.         ";   line in the script. It specifies the device and the protocol to\n"
  551.         ";   use. (Possible protocols are RTSCTS, XONXOFF or NONE.)\n"
  552.         "\n"
  553.         "    DEVICE serial.device UNIT 0 7WIRE\n"
  554.         "\n"
  555.         "\n"
  556.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  557.         ";\n"
  558.         ";   Certain settings (Note, that these override the respective settings\n"
  559.         ";   of the serial.prefs.)\n"
  560.         ";\n"
  561.         ";   Possible settings are:\n"
  562.         ";       BAUD            Baudrate, integer\n"
  563.         ";       DATABITS        number of data bits, integer\n"
  564.         ";       STOPBITS        number of stop bits, integer\n"
  565.         ";       BUFSIZE         Read buffer size, integer\n"
  566.         ";       PARITY          one of NONE, ODD or EVEN\n"
  567.         ";\n"
  568.         ";   These are scanned with ReadArgs(), thus you can either use the syntax\n"
  569.         ";       set BAUD=38400\n"
  570.         ";   or, if you prefer, this version\n"
  571.         ";       set BAUD 38400\n"
  572.         ";   In the first case, however, it is important, that you omit blanks.\n"
  573.         ";\n"
  574.         "\n"
  575.         "    set BAUD=38400 DATABITS=8 STOPBITS=1 BUFSIZE=4096\n"
  576.         "\n"
  577.         ";   Possible settings in the following line are:\n"
  578.         ";       NONE EVEN ODD\n"
  579.         "\n"
  580.         "    set PARITY=NONE\n"
  581.         "\n"
  582.         "\n"
  583.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  584.         ";\n"
  585.         ";   Show the new settings\n"
  586.         "\n"
  587.         ";   SHOWPARMS\n"
  588.         "\n"
  589.         "\n"
  590.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  591.         ";\n"
  592.         ";   Send initialization command\n"
  593.         "\n"
  594.         "    SEND \"ATZ\\r\"\n"
  595.         "\n"
  596.         "\n"
  597.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  598.         ";\n"
  599.         ";   Wait for the modems ok; break, if timeout\n"
  600.         "    WAIT TIMEOUT=10 \"NO CARRIER\" \"OK\"\n"
  601.         "    ON STATUS GOTO TIMEOUT NoCarrier\n"
  602.         "\n"
  603.         "\n"
  604.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  605.         ";\n"
  606.         ";   Dialing ...\n"
  607.         "\n"
  608.         "Dial:\n"
  609.         "    SEND \"" phoneNumber "\\r\"\n"
  610.         "\n"
  611.         "    WAIT TIMEOUT=60 \"Username: \" \"BUSY\" \"DELAYED\"\n"
  612.         "    ON STATUS GOTO TIMEOUT Login\n"
  613.         "\n"
  614.         "\n"
  615.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  616.         ";\n"
  617.         ";   The usual case: Our Remote is busy. :-(\n"
  618.         ";   We do a delay of 30 secs (thanks, telecom :-) and dial again.\n"
  619.         "\n"
  620.         "    Echo \"Remote busy, delaying ...\\n\"\n"
  621.         "    DELAY 30\n"
  622.         "    Echo \"Trying again.\\n\"\n"
  623.         "    GOTO Dial\n"
  624.         "\n"
  625.         "\n"
  626.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  627.         ";\n"
  628.         ";   The following is *not* needed.\n"
  629.         ";\n"
  630.         ";   You could well do a\n"
  631.         ";\n"
  632.         ";Login:\n"
  633.         ";   TERMINAL\n"
  634.         ";   EXIT 0\n"
  635.         ";\n"
  636.         ";   at this point and login into your remote host manually.\n"
  637.         ";\n"
  638.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  639.         "\n"
  640.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  641.         ";\n"
  642.         ";   Okay, we are connected. Login into the host.\n"
  643.         "\n"
  644.         "Login:\n"
  645.         "    SEND \"<MyLoginName>\\r\"\n"
  646.         "    WAIT TIMEOUT=60 \"Password: \"\n"
  647.         "    ON STATUS GOTO TIMEOUT\n"
  648.         "    SEND \"<MyPassword>\\r\"\n"
  649.         "    WAIT TIMEOUT=60 \"TS2>\"\n"
  650.         "    ON STATUS GOTO TIMEOUT\n"
  651.         "\n"
  652.         "\n"
  653.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  654.         ";\n"
  655.         ";   If we came so far, everything is fine. Tell the remote host to\n"
  656.         ";   connect to the ICS and go into terminal mode, so that the user\n"
  657.         ";   may enter commands.\n"
  658.         ";\n"
  659.         ";   Note, that $ICSHOST and $ICSPORT are replaced by the respective\n"
  660.         ";   environment variables. TerminalICS must set them before starting\n"
  661.         ";   IPDial.\n"
  662.         "\n"
  663.         "    SEND \"telnet $ICSHOST $ICSPORT\\r\"\n"
  664.         "    TERMINAL\n"
  665.         "    EXIT 0\n"
  666.         "\n"
  667.         "\n"
  668.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  669.         ";\n"
  670.         ";   Error message: Timeout\n"
  671.         "\n"
  672.         "TIMEOUT:\n"
  673.         "    ECHO \"\\nTimeout\\n\"\n"
  674.         "    EXIT 10\n"
  675.         "\n"
  676.         ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n"
  677.         ";\n"
  678.         ";   Error message: NO CARRIER\n"
  679.         "\n"
  680.         "NoCarrier:\n"
  681.         "    ECHO \"\\nNO CARRIER\\n\"\n"
  682.         "    EXIT 10\n"
  683.         "\n"
  684.     )
  685.     )
  686.     (set docFile ipDialLoginName)
  687.     (CreateDocIcon)
  688.  
  689.     (message "I have created a script file " ipDialLoginName " which will "
  690.          "be executed by IPDial to connect to the ICS.\n\n"
  691.          "This file is just a template and not usable yet. "
  692.          "You must edit it manually with your favourite text "
  693.          "editor.\n\n"
  694.     )
  695. )
  696.  
  697.  
  698. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  699. ;;;
  700. ;;;  SelectTelnetProgram procedure
  701. ;;;
  702. ;;;  Creates the telnetProgram variable.
  703. ;;;
  704. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  705. (procedure SelectTelnetProgram
  706.  
  707.     (select (askchoice
  708.     (prompt "How do you want to connect to ICS?")
  709.     (help "AmyBoard allows to connect to the ICS (Internet Chess Server). "
  710.           "Of course this possibility requires Internet Access in any "
  711.           "way.\n\n"
  712.           "You must not use Napsaterm or a similar program that opens its "
  713.           "own window: Instead it must read from stdin and write to stdout. "
  714.           "(You may, however, select the specifications of your ICS "
  715.           "window.\n\n"
  716.           @askchoice-help
  717.     )
  718.     (choices "AmiTCP:bin/telnet"
  719.          "IPDial (serial line terminalprogram)"
  720.          "Other telnet or terminal program"
  721.          "none"
  722.     )
  723.     )
  724.     (   (set telnetProgram "AmiTCP:bin/telnet")
  725.     )
  726.     (   (set telnetProgram (expandpath (askfile
  727.         (prompt "Please select the IPDial binary.")
  728.         (help "AmyBoard needs to know the path of your terminal "
  729.           "program, IPDial in that case, which you must have "
  730.           "installed first. (You find this on Aminet, "
  731.           "comm/tcp directory.)\n\n"
  732.           @askfile-help
  733.         )
  734.         (default "IPDial")
  735. ;           (newpath)
  736.     )))
  737.     (set phoneNumber (askstring
  738.         (prompt "Enter your modem's dial string.")
  739.         (help "IPDial needs a command to send to the modem "
  740.           "so that it can dial into your remote hosts.\n\n"
  741.           @askstring-help
  742.         )
  743.         (default "ATDP07071927920")
  744.     ))
  745.     (CreateIPDialTextFiles)
  746.     (set telnetProgram (tackon installLibDir "IcsSerial"))
  747.     )
  748.     (   (set telnetProgram (expandpath (askfile
  749.         (prompt "Please select your telnet or terminal program.")
  750.         (help "AmyBoard needs to know the path of the telnet or "
  751.           "terminal program. Please select it.\n\n"
  752.           @askfile-help
  753.         )
  754. ;           (newpath)
  755.         (default "IPDial")
  756.     )))
  757.     (set telnetOptions (askstring
  758.         (prompt "Please enter options to put the telnet or "
  759.             "terminal program into stdin/stdout mode.\n\n"
  760.         )
  761.         (help "Your terminal program must not open a separate window. "
  762.           "Instead it has to read from stdin and write to stdout. "
  763.           "If you need to specify certain options for this mode, "
  764.           "you may specify them here.\n\n"
  765.           @akstring-help
  766.         )
  767.     ))
  768.     (set telnetProgram ("\"%s\" %s" telnetProgram telnetOptions))
  769.     )
  770.     (   (set telnetProgram "")
  771.     ))
  772. )
  773.  
  774.  
  775. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  776. ;;;
  777. ;;;  CopyAmyBoard procedure
  778. ;;;
  779. ;;;  Copies required files to the installation directory.
  780. ;;;
  781. ;;;  Uses: installDir   installation directory
  782. ;;;
  783. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  784. (procedure CopyAmyBoard
  785.  
  786.     (if (<> installDir (expandPath ""))
  787.     (   (set n 0)
  788.     (while (set drawerName (select n installDir
  789.                      installDocDir
  790.                      installLibDir
  791.                      ""
  792.            ))
  793.     (   (CreateDrawer)
  794.         (set n (+ n 1))
  795.     ))
  796.  
  797.     (copylib
  798.         (prompt "Copying the AmyBoard binary ...")
  799.         (source "AmyBoard")
  800.         (dest installDir)
  801.         (infos)
  802.         (optional "force" "askuser")
  803.     )
  804.     (copyfiles
  805.         (prompt "Copying docs ...")
  806.         (source "doc")
  807.         (dest installDocDir)
  808.         (optional "oknodelete" "askuser")
  809.         (all)
  810.         (infos)
  811.     )
  812.     (copyfiles
  813.         (prompt "Copying docs ...")
  814.         (source "doc/AmyBoard.guide")
  815.         (dest installDir)
  816.         (infos)
  817.         (optional "oknodelete" "askuser")
  818.     )
  819.  
  820.     (set n 0)
  821.     (while (set docFile (select n "doc/ChangeLog"
  822.                       "doc/ChangeLog.2"
  823.                       "doc/COPYING"
  824.                       "doc/COPYRIGHT"
  825.                       "doc/FAQ"
  826.                       "doc/ReadMe.mui"
  827.                       "doc/READ_ME"
  828.                       "doc/ToDo"
  829.                       ""
  830.            ))
  831.     (   (set docFile (tackon installDir docFile))
  832.         (CreateDocIcon)
  833.         (set n (+ n 1))
  834.     ))
  835.     (set guideFile (tackon installDir "doc/AmyBoard.guide"))
  836.     (CreateGuideIcon)
  837.     ))
  838. )
  839.  
  840.  
  841. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  842. ;;;
  843. ;;;  SelectICSServers procedure
  844. ;;;
  845. ;;;  Allows the user to create ICS Icons.
  846. ;;;
  847. ;;;  Uses: installDir       installation directory path
  848. ;;;        telnetProgram    telnet binary path
  849. ;;;
  850. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  851. (procedure SelectICSServers
  852.  
  853.     (if (<> telnetProgram "")
  854.     (
  855.     (set icsHostChoice (askoptions
  856.         (prompt "For which ICS servers shall I create icons?")
  857.         (help "I may create icons so that you can connect to an ICS "
  858.           "server by just double-clicking the respective icon. "
  859.           "Please select the servers you are interested in.\n\n"
  860.           @askoptions-help
  861.         )
  862.         (choices "ICC    (chess.lm.com, commercial)"
  863.              "FICS   (ics.onenet.net)"
  864.              "EICS   (anemone.daimi.aau.dk)"
  865.              "NLICS  (dds.hacktic.nl)"
  866.              "AUICS  (lux.lactrobe.edu.au)"
  867.              "Others"
  868.         )
  869.         (default 7)
  870.     ))
  871.  
  872.     (set n 0)
  873.     (set hostBit 1)
  874.     (while (set icsHost (select n "chess.lm.com"
  875.                       "ics.onenet.net"
  876.                       "anemone.daimi.aau.dk"
  877.                       "dds.hacktic.nl"
  878.                       "lux.lactrobe.au"
  879.                       ""
  880.            ))
  881.     (   (set icsPort (select n 5000
  882.                    5000
  883.                    5000
  884.                    5000
  885.                    5000
  886.         ))
  887.         (set icsHostName (select n "ICC"
  888.                        "FICS"
  889.                        "EICS"
  890.                        "NLICS"
  891.                        "AUICS"
  892.         ))
  893.         (if (BITAND hostBit icsHostChoice)
  894.         (   (CreateICSIcon)
  895.         ))
  896.  
  897.         (set n (+ n 1))
  898.         (set hostBit (shiftleft hostBit 1))
  899.     ))
  900.  
  901.     (if (BITAND hostBit icsHostChoice)
  902.     (   (set icsHost "")
  903.         (set icsHostName "")
  904.         (set icsPort 5000)
  905.         (while (set icsHost (askstring
  906.         (prompt "Enter next ICS servers hostname or IP number.\n\n"
  907.             "(Empty string if done.)"
  908.         )
  909.         (help "ICS servers are given by their hostname or IP "
  910.               "number. Enter the next servers name or an "
  911.               "empty string, if you don't want to create another "
  912.               "ICS icon.\n\n"
  913.               @askstring-help
  914.         )
  915.         (default icsHost)))
  916.         (   (set icsPort (asknumber
  917.             (prompt ("Enter the port number of %s." icsHost))
  918.             (help "The telnet program needs a so-called port "
  919.               "number to connect to the ICS host. Usually "
  920.               "the number 5000 is fine.\n\n"
  921.               @asknumber-help
  922.             )
  923.             (default icsPort)
  924.             (range 0 999999)
  925.         ))
  926.         (set icsHostName (askstring
  927.             (prompt ("Enter the icon name of %s." icsHost))
  928.             (help "Enter a unique name for the icon to be "
  929.               "created.\n\n"
  930.               @askstring-help
  931.             )
  932.             (default icsHostName)
  933.         ))
  934.         (if (askbool
  935.             (prompt "About to create an ICS icon\n\n"
  936.                 ("Name: %s\n" icsHostName)
  937.                 ("Host: %s\n" icsHost)
  938.                 (cat "Port: " icsPort "\n")
  939.                 "\n\nIs this correct?"
  940.             )
  941.             (help "Select \"yes\", if you want me to create "
  942.               "an icon called " icsHostName " to connect to "
  943.               "the ICS host " icsHost
  944.               (" with port %d.\n\n" icsPort)
  945.               "Select \"no\", if you want to change these "
  946.               "settings.\n\n"
  947.               @askbool-help
  948.             )
  949.             (default 1))
  950.         (   (CreateICSIcon)
  951.             (set icsHost "")
  952.             (set icsHostName "")
  953.             (set icsPort 5000)
  954.         ))
  955.         ))
  956.     ))
  957.     ))
  958. )
  959.  
  960.  
  961. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  962. ;;;
  963. ;;;  GetWindowSettings procedure
  964. ;;;
  965. ;;;  Allows the user to enter a window specification.
  966. ;;;
  967. ;;;  Uses: telnetProgram    telnet binary path
  968. ;;;
  969. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  970. (procedure GetWindowSettings
  971.  
  972.     (if (<> telnetProgram "")
  973.     (   (set icsWindow (askstring
  974.         (prompt "Enter a window specification for the ICS window.\n\n")
  975.         (help "You must enter a valid window specificattion as "
  976.           "accepted by AmigaDOS. You may, for example, replace "
  977.           "con: with kcon: to get a scrollbar.\n\n"
  978.           "A %s may be used to include the servers name into "
  979.           "the window title.\n\n"
  980.           @askstring-help
  981.         )
  982.         (default "CON://640/256/ICS %s")
  983.     ))
  984.     ))
  985. )
  986.  
  987.  
  988. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  989. ;;;
  990. ;;;  CreatePrefsFile procedure
  991. ;;;
  992. ;;;  Creates lib/AmyBoard.prefs, according to the settings entered so far.
  993. ;;;
  994. ;;;  Uses: installLibDir    "lib" directory path
  995. ;;;        gnuChessPath     gnuchessx binary path
  996. ;;;
  997. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  998. (procedure CreatePrefsFile
  999.  
  1000.     (set amyBoardPrefsName (tackon installLibDir "AmyBoard.prefs"))
  1001.     (set checkObsoleteFileName amyBoardPrefsName)
  1002.     (CheckObsoleteFile)
  1003.  
  1004.     (textfile
  1005.     (prompt "Creating prefs script " textFileName "...")
  1006.     (help textFileName " is a textfile containing with your default "
  1007.           "settings. I will enter your choices so far, but you might "
  1008.           "edit it manually later.\n\n"
  1009.           @textfile-help
  1010.     )
  1011.     (dest amyBoardPrefsName)
  1012.     (append
  1013.         ";\n"
  1014.         ";   AmyBoard preferences\n"
  1015.         ";\n"
  1016.         ";   Note the following:\n"
  1017.         ";       - Lines beginning with a ; are comments\n"
  1018.         ";       - Variables defining numbers may be followed by comments\n"
  1019.         ";         after the number; this is *not* the case for variables\n"
  1020.         ";         defining strings (obvious reason)\n"
  1021.         ";       - All these variables may be overwritten in the same manner\n"
  1022.         ";         by either CLI arguments or Icon tooltypes\n"
  1023.         ";\n"
  1024.         "\n"
  1025.         "\n"
  1026.         ";\n"
  1027.         ";   Color settings, -1 indicates default\n"
  1028.         ";\n"
  1029.         ";   Better use the MUI prefs to select colors; change the\n"
  1030.         ";   settings below only, if you don't have a registered MUI\n"
  1031.         ";   version\n"
  1032.         "whitePiecePen=-1    ; use default (MUI's SHINEPEN)\n"
  1033.         "blackPiecePen=-1    ; use default (MUI's SHADOWPEN)\n"
  1034.         "lightSquarePen=-1   ; use default (MUI's HALFSHINEPEN)\n"
  1035.         "darkSquarePen=-1    ; use default (MUI's HALFSHADOWPEN)\n"
  1036.         "\n"
  1037.         "\n"
  1038.         ";\n"
  1039.         ";   GNU Chess settings\n"
  1040.         ";\n"
  1041.         "noChessProgram=FALSE\n"
  1042.         ";   Memory settings:\n"
  1043.         ";       -C 1001 -T 4001     about 1 MByte\n"
  1044.         ";       -C 3001 -T 20001    about 2 MByte\n"
  1045.         ";       -C 4001 -T 30001    about 2.5 MByte\n"
  1046.         ";       -C 6001 -T 40001    about 3 MByte\n"
  1047.         "firstChessProgram=" gnuChessPath "\n"
  1048.         "secondChessProgram=" gnuChessPath "\n"
  1049.         "\n"
  1050.         "; Number of moves until flag falls\n"
  1051.         "movesPerSession=60\n"
  1052.         "; Number of minutes[:seconds] until flag falls\n"
  1053.         "timeControl=10\n"
  1054.         "showThinking=TRUE\n"
  1055.         "\n"
  1056.         "; child process settings, used both for GNU Chess and telnetProgram\n"
  1057.         "childPriority=0\n"
  1058.         "childStack=100000\n"
  1059.         "\n"
  1060.         "\n"
  1061.         ";\n"
  1062.         ";   ICS settings\n"
  1063.         "ics=FALSE\n"
  1064.         "icsHost=chess.lm.com\n"
  1065.         ";icsHost=ics.onenet.net\n"
  1066.         ";icsHost=anemone.daimi.aau.dk\n"
  1067.         ";icsHost=dds.hacktic.nl\n"
  1068.         ";icsHost=lux.latrobe.edu.au\n"
  1069.         "icsPort=5000\n"
  1070.         "icsLogon=PROGDIR:lib/.icsrc\n"
  1071.         "telnetProgram=" telnetProgram "\n"
  1072.         "alwaysQueen=FALSE\n"
  1073.         ";\n"
  1074.         ";   Defining icsWindow in the prefs will make AmyBoard to open the window,\n"
  1075.         ";   even when running from the shell, which is probably not what you\n"
  1076.         ";   want, especially because the program doesn't detach. (Which can,\n"
  1077.         ";   however, be forced with \"run <nil: >nil:\".) Thus you better define\n"
  1078.         ";   icsWindow in the icon tooltypes.\n"
  1079.         ";\n"
  1080.         ";icsWindow=" icsWindow "\n"
  1081.         "\n"
  1082.         ";\n"
  1083.         ";   Miscellaneous settings\n"
  1084.         "autoSaveGames=FALSE\n"
  1085.         "boardSize=big\n"
  1086.         ";boardSize=medium\n"
  1087.         ";boardSize=small\n"
  1088.         "ringBellAfterMoves=TRUE\n"
  1089.         "showCoords=FALSE\n"
  1090.     )
  1091.     )
  1092.     (set docFile amyBoardPrefsName)
  1093.     (CreateDocIcon)
  1094.  
  1095.     (message "I have created a prefs file " checkObsoleteFileName
  1096.          " for you. This should be assumed to be a template (though "
  1097.          "perfectly usable), you might wish to edit it manually "
  1098.          "with your favourite text editor."
  1099.     )
  1100. )
  1101.  
  1102.  
  1103. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1104. ;;;
  1105. ;;;  main program
  1106. ;;;
  1107. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1108.  
  1109. (transcript "Installing " installName ", Version " installVersion ".")
  1110. (CheckOsVersion)
  1111. (CheckMuiVersion)
  1112. (ShowCopyrightMessage)
  1113.  
  1114. (SelectInstallDir)
  1115. (set installLibDir (tackon installDir "lib"))
  1116. (set installDocDir (tackon installDir "doc"))
  1117. (complete 10)
  1118.  
  1119. (CopyAmyBoard)
  1120. (complete 50)
  1121.  
  1122. (GetGNUChessSettings)
  1123. (CreateGNUChessIcon)
  1124. (complete 60)
  1125.  
  1126. (SelectTelnetProgram)
  1127. (complete 70)
  1128.  
  1129. (GetWindowSettings)
  1130. (complete 80)
  1131.  
  1132. (SelectICSServers)
  1133. (complete 90)
  1134.  
  1135. (CreatePrefsFile)
  1136. (complete 100)
  1137.