home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Gry / IdentifyUsr.lha / Identify / Install-E < prev    next >
Text File  |  1998-01-16  |  7KB  |  270 lines

  1. ;**********************************************************
  2. ;*                                                        *
  3. ;*           Identify Installer Script                    *
  4. ;*                                                        *
  5. ;**********************************************************
  6. ;*
  7. ;*      $VER: Install-Identify 2.0 (27.12.97)
  8. ;*      (C) 1997 Richard Körber -- All Rights Reserved
  9. ;*
  10. ;**********************************************************
  11.  
  12.  
  13. ;********* MESSAGES ***************************************
  14.  
  15. (set MStartup
  16.   (cat  "\nWelcome to the\n\n"
  17.         "Identify installation\n\n\n"
  18.         "Please read the manual BEFORE you use the software!"
  19.   )
  20. )
  21.  
  22. (set POptions "What do you want to install?")
  23. (set HOptions
  24.   (cat  "Please choose the parts of the packet that should be installed.\n\n"
  25.         "Libraries: All identify libraries (this is the main part).\n\n"
  26.         "Tools: Small but useful tools.\n\n"
  27.         "Documentation: The user documentation.\n\n"
  28.         "Catalogs: Language catalogs (English is the built-in language)\n\n"
  29.         "If you are not sure what to install, I suggest you to use the default. "
  30.         "You can add further parts later, without problems."
  31.   )
  32. )
  33. (set SLibs    "Libraries")
  34. (set STools   "Tools")
  35. (set SDoc     "Documentation")
  36. (set SCatalog "Catalogs")
  37.  
  38. (set PLibDestDir "Where do you want to install the libraries?")
  39. (set HLibDestDir
  40.   (cat  "Choose the drawer for the system libraries. "
  41.         "Usually, this is \"LIBS:\"."
  42.   )
  43. )
  44.  
  45. (set P68k   "What version do you want to install?")
  46. (set H68k
  47.   (cat  "Please choose the processor version to be installed. "
  48.         "The 68020 version does not work on a 68000 and 68010. The 68000 "
  49.         "version runs on any processor, but requires more memory. "
  50.         "If you are in doubt, choose the default."
  51.   )
  52. )
  53.  
  54. (set C68000 "68000, 68010")
  55. (set C68020 "68020 and above")
  56.  
  57. (set PToolDestDir "Where do you want to install the tools?")
  58. (set HToolDestDir
  59.   (cat  "Choose a drawer that is within the shell path. "
  60.         "Usually, this is \"C:\"."
  61.   )
  62. )
  63.  
  64. (set PDocDestDir "Where do you want to install the docs?\nA drawer will not be created.")
  65. (set HDocDestDir
  66.   (cat  "Choose a drawer where you put documentations into. You can also use "
  67.         "HELP:, if available."
  68.   )
  69. )
  70.  
  71. (set PCatDestDir "Where do you want to install the catalogs?")
  72. (set HCatDestDir
  73.   (cat  "Choose the drawer where you put all locale catalog files. "
  74.         "Usually, this is \"LOCALE:Catalogs/\"."
  75.   )
  76. )
  77.  
  78. (set PCopyLib     "Copying the identify.library")
  79. (set PCopyRexxLib "Copying the rexxidentify.library")
  80. (set PCopyTool    "Copying the tools")
  81. (set PCopyDoc     "Copying the documentations")
  82. (set PCopyCat     "Copying the catalogs")
  83.  
  84. (set HCopyTool
  85.   (cat  "What tools should be installed?\n\n"
  86.         "ListExp: Describes your system, the expansion boards and commodities. "
  87.         "Very useful for bug reports or as ShowConfig replacement.\n\n"
  88.         "Guru: Translates a Guru code in human readable form.\n\n"
  89.         "Function: Returns the function name of a library at the provided offset."
  90.         "InstallIfy: Is an utility for installer scripts."
  91.   )
  92. )
  93.  
  94. ;********* FILES ******************************************
  95.  
  96. (set FIfyLibName "identify.library")
  97. (set FIfyLib     "libs/identify.library")
  98. (set FIfy000Lib  "libs/identify.library_000")
  99. (set FRexxLib    "libs/rexxidentify.library")
  100. (set FListExp    "ListExp")
  101. (set FGuru       "Guru")
  102. (set FFunction   "Function")
  103. (set FInstallIfy "InstallIfy")
  104. (set FTool       "c/")
  105. (set FDocs       "docs/")
  106. (set FCat        "catalogs/")
  107.  
  108.  
  109.  
  110. ;********* INSTALLER SCRIPT *******************************
  111.  
  112. (set @default-dest "")          ; currently no specific dir
  113.  
  114. ;------ Greetings to the user -----------------------------
  115. (message MStartup)
  116.  
  117. ;------ What should be installed --------------------------
  118. (set InstOpts                   ; ask what to install
  119.   (askoptions
  120.     (prompt  POptions)
  121.     (help    HOptions)
  122.     (choices SLibs STools SDoc SCatalog)
  123.     (default -1)
  124.   )
  125. )
  126.  
  127. (if (< (database "cpu") 68020)
  128.   (set FCopyIfyLib FIfy000Lib)
  129.   (set FCopyIfyLib FIfyLib)
  130. )
  131.  
  132. ;------ Ask for destinations ------------------------------
  133. (if (IN InstOpts 0)             ; Libs
  134.   (
  135.     (set LibDestDir "LIBS:")    ; Destination for the library
  136.     (if (= @user-level 2)
  137.       (
  138.         (set LibDestDir
  139.           (askdir
  140.             (prompt PLibDestDir)
  141.             (help   HLibDestDir)
  142.             (default LibDestDir)
  143.           )
  144.         )
  145.         (if (< (database "cpu") 68020)
  146.           (set cpuchoice 0)
  147.           (set cpuchoice 1)
  148.         )
  149.         (if (= 0 (askchoice (prompt P68k) (help H68k) (choices C68000 C68020) (default cpuchoice)))
  150.           (set FCopyIfyLib FIfy000Lib)
  151.           (set FCopyIfyLib FIfyLib)
  152.         )
  153.       )
  154.     )
  155.   )
  156. )
  157.  
  158. (if (IN InstOpts 1)             ; Tools
  159.   (
  160.     (set ToolDestDir "C:")
  161.     (if (= @user-level 2)
  162.       (set ToolDestDir
  163.         (askdir
  164.           (prompt PToolDestDir)
  165.           (help   HToolDestDir)
  166.           (default ToolDestDir)
  167.         )
  168.       )
  169.     )
  170.   )
  171. )
  172.  
  173. (if (IN InstOpts 2)             ; Docs
  174.   (
  175.     (set DocDestDir
  176.       (askdir
  177.         (prompt  PDocDestDir)
  178.         (help    HDocDestDir)
  179.         (default "Work:")
  180.       )
  181.     )
  182.   )
  183. )
  184.  
  185. (if (IN InstOpts 3)             ; Catalogs
  186.   (
  187.     (set CatDestDir "Locale:Catalogs/")
  188.     (if (= @user-level 2)
  189.       (set CatDestDir
  190.         (askdir
  191.           (prompt PCatDestDir)
  192.           (help   HCatDestDir)
  193.           (default CatDestDir)
  194.         )
  195.       )
  196.     )
  197.   )
  198. )
  199.  
  200.  
  201. ;------ Copy all files ------------------------------------
  202. (if (IN InstOpts 0)             ; Libraries
  203.   (
  204.     (copylib
  205.       (prompt  PCopyLib)
  206.       (help    @copylib-help)
  207.       (confirm)
  208.       (source  FCopyIfyLib)
  209.       (dest    LibDestDir)
  210.       (newname FIfyLibName)
  211.     )
  212.     (copylib
  213.       (prompt PCopyRexxLib)
  214.       (help   @copylib-help)
  215.       (confirm)
  216.       (source FRexxLib)
  217.       (dest   LibDestDir)
  218.     )
  219.   )
  220. )
  221.  
  222. (if (IN InstOpts 1)             ; Tools
  223.   (
  224.     (copyfiles
  225.       (prompt PCopyTool)
  226.       (help   HCopyTool)
  227.       (confirm)
  228.       (choices FListExp FGuru FFunction FInstallIfy)
  229.       (source FTool)
  230.       (dest   ToolDestDir)
  231.     )
  232.   )
  233. )
  234.  
  235. (if (IN InstOpts 2)             ; Docs
  236.   (
  237.     (copyfiles
  238.       (prompt PCopyDocs)
  239.       (help   @copyfiles-help)
  240.       (confirm)
  241.       (source FDocs)
  242.       (dest   DocDestDir)
  243.       (all)
  244.       (infos)
  245.       (noposition)
  246.     )
  247.   )
  248. )
  249.  
  250. (if (IN InstOpts 3)             ; Catalogs
  251.   (
  252.     (copyfiles
  253.       (prompt PCopyCat)
  254.       (help   @copyfiles-help)
  255.       (confirm)
  256.       (source FCat)
  257.       (dest   CatDestDir)
  258.       (all)
  259.       (infos)
  260.       (noposition)
  261.     )
  262.   )
  263. )
  264.  
  265.  
  266. (exit)
  267.  
  268. ;********* DONE *******************************************
  269.  
  270.