home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0994.lha / ToolType / Install_ToolType next >
Text File  |  1994-04-05  |  6KB  |  252 lines

  1. ; Installation script for ToolType
  2.  
  3. (set @user-level 2)
  4.  
  5. (transcript "Installing ToolType...")
  6.  
  7. ( if (= (exists "LIBS:reqtools.library" (noreq)) 0)
  8.     (message "\n\nCan't find reqtools.library in libs:\n"
  9.              "You'll need to copy reqtools.library to LIBS:\n"
  10.              "in order to use ToolType.\n")
  11. )
  12.  
  13. ( if (= (exists "ENV:EDITOR" (noreq)) 0)
  14.     (set defed "C:ED %s")
  15.     (set defed (getenv "EDITOR"))
  16. )
  17.  
  18. (set editor
  19.         (askstring
  20.                 (prompt "What editor do you want?")
  21.                 (help @askstring-help)
  22.                 (default defed)
  23.         )
  24. )
  25.  
  26. (set env
  27.         (askbool
  28.                 (prompt "Do you want to also save the Editor config\n"
  29.                         "in an environment variable 'ToolType'?")
  30.                 (help "It's up to YOU.")
  31.                 (choices "Yes" "No")
  32.                 (default 0)              ; 0 = no
  33.         )
  34. )
  35.  
  36. (set detach
  37.         (askbool
  38.                 (prompt "Does your editor detach from the CLI?")
  39.                 (help "It's up to YOU.")
  40.                 (choices "Yes" "No")
  41.                 (default 0)              ; 0 = no
  42.         )
  43. )
  44.  
  45. (set appicon
  46.         (askbool
  47.                 (prompt "Do you want ToolType to be started\n"
  48.                         "as an App Icon?")
  49.                 (help "It's up to YOU.")
  50.                 (choices "Yes" "No")
  51.                 (default 0)              ; 0 = no
  52.         )
  53. )
  54.  
  55. (if (= appicon 1)                           ; conditional test
  56.     (
  57.         (set def_dir "SYS:WBStartup")
  58.         (set iconx
  59.                 (asknumber
  60.                         (prompt "X coordinate of AppIcon\n"
  61.                                 "'0' = float")
  62.                         (help @asknumber-help)
  63.                         (default 0)
  64.                 )
  65.         )
  66.         (set icony
  67.                 (asknumber
  68.                         (prompt "Y coordinate of AppIcon\n"
  69.                                 "'0' = float")
  70.                         (help @asknumber-help)
  71.                         (default 0)
  72.                 )
  73.         )
  74.         (set iconname
  75.                 (askstring
  76.                         (prompt "What do you want to call the AppIcon?")
  77.                         (help @askstring-help)
  78.                         (default "ToolType")
  79.                 )
  80.         )
  81.     )
  82.     (
  83.         (set def_dir "SYS:Utilities")
  84.     )
  85. )
  86.  
  87. (set sort
  88.         (askchoice
  89.                 (prompt "How do you want to handle sorting?")
  90.                 (help @askchoice-help)
  91.                 (choices "Never Sort" "Ask me every time" "Always Sort" )
  92.                 (default 1)
  93.         )
  94. )
  95.  
  96. (set comt
  97.         (askbool
  98.                 (prompt "Do you want the commented tooltypes placed\n"
  99.                         "before the non commented when sorting?")
  100.                 (help "It's up to YOU.")
  101.                 (choices "Yes" "No")
  102.                 (default 0)              ; 0 = no
  103.         )
  104. )
  105.  
  106. (set conf
  107.         (askbool
  108.                 (prompt "Do you want the confirm changes requester?")
  109.                 (help "It's up to YOU.")
  110.                 (choices "Yes" "No")
  111.                 (default 0)              ; 0 = no
  112.         )
  113. )
  114.  
  115. (tooltype
  116.         (dest "ToolType")
  117.         (settooltype "EDITOR" editor)
  118. )
  119.  
  120.  
  121. (if (= conf 1)                           ; conditional test
  122.     (tooltype
  123.             (dest "ToolType")
  124.             (settooltype "CONFIRM" "")
  125.     )
  126.     (tooltype
  127.             (dest "ToolType")
  128.             (settooltype "(CONFIRM)" "")
  129.     )
  130. )
  131.  
  132. (if (= appicon 1)
  133.     (
  134.         (tooltype
  135.                 (dest "ToolType")
  136.                 (settooltype "APPICON" "")
  137.         )
  138.         (tooltype
  139.                 (dest "ToolType")
  140.                 (settooltype "ICONX" (cat iconx))
  141.         )
  142.         (tooltype
  143.                 (dest "ToolType")
  144.                 (settooltype "ICONY" (cat icony))
  145.         )
  146.         (tooltype
  147.                 (dest "ToolType")
  148.                 (settooltype "ICONNAME" iconname)
  149.         )
  150.     )
  151.     (
  152.         (tooltype
  153.                 (dest "ToolType")
  154.                 (settooltype "(APPICON)" "")
  155.         )
  156.         (tooltype
  157.                 (dest "ToolType")
  158.                 (settooltype "(ICONX)" "")
  159.         )
  160.         (tooltype
  161.                 (dest "ToolType")
  162.                 (settooltype "(ICONY)" "")
  163.         )
  164.         (tooltype
  165.                 (dest "ToolType")
  166.                 (settooltype "(ICONNAME)" "")
  167.         )
  168.     )
  169. )
  170.  
  171. (if (= comt 1)                           ; conditional test
  172.     (tooltype
  173.             (dest "ToolType")
  174.             (settooltype "COMMENT" "")
  175.     )
  176.     (tooltype
  177.             (dest "ToolType")
  178.             (settooltype "(COMMENT)" "")
  179.     )
  180. )
  181.  
  182. (if (= env 1)                           ; conditional test
  183.    (
  184.         (textfile
  185.                 (dest "ENV:ToolType")
  186.                 (append editor)
  187.         )
  188.         (textfile
  189.                 (dest "ENVARC:ToolType")
  190.                 (append editor)
  191.         )
  192.     )
  193. )
  194.  
  195.  
  196. (if (= detach 1)                           ; conditional test
  197.     (tooltype
  198.             (dest "ToolType")
  199.             (settooltype "WAIT" "")
  200.     )
  201.     (tooltype
  202.             (dest "ToolType")
  203.             (settooltype "(WAIT)" "")
  204.     )
  205. )
  206.  
  207. (if (= sort 0)                           ; conditional test
  208.     (tooltype
  209.             (dest "ToolType")
  210.             (settooltype "SORT" "FALSE")
  211.     )
  212.     (if (= sort 2)
  213.         (tooltype
  214.                 (dest "ToolType")
  215.                 (settooltype "SORT" "TRUE")
  216.         )
  217.         (tooltype
  218.                 (dest "ToolType")
  219.                 (settooltype "SORT" "ASK")
  220.         )
  221.     )
  222. )
  223.  
  224. (tooltype
  225.         (dest "ToolType")
  226.         (settooltype "(QUIET)" "")
  227. )
  228.  
  229.  
  230. (set destdir
  231.         (askdir
  232.                 (prompt "Install ToolType where?")
  233.                 (help @askdir-help)
  234.                 (default def_dir)
  235.         )
  236. )
  237.  
  238. (copyfiles
  239.         (source "ToolType")
  240.         (infos)
  241.         (dest destdir)
  242. )
  243.  
  244. (set @default-dest destdir)
  245.  
  246. (message "\n\nIf you want to stop the copyright requester from\n"
  247.          "appearing when starting from WorkBench,\n"
  248.          " you need to uncomment the tooltype \"QUIET\"")
  249.  
  250. (exit)
  251.  
  252.