home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / RMH / install < prev    next >
Encoding:
Text File  |  2001-05-24  |  4.1 KB  |  145 lines

  1. ; $VER: RMH_Install 2.8 (18.2.01)
  2.  
  3. (procedure P_SetMessages
  4.  
  5.     (set #WhatInstallPromptMsg            "What do you want to install?")
  6.     (set #WhatInstallHelpMsg            "Choose what you want to install:\n\no Libraries - all the libraries needed by RexxMustHave to work\n\no Documentation - RexxMustHave documentation in AmigaGuide format\n\no Examples - RexxMustHave ARexx macros")
  7.  
  8.     (set #WhatInstallLibrariesMsg        "Libraries")
  9.     (set #WhatInstallDocumentationMsg    "Documentation")
  10.     (set #WhatInstallExamplesMsg        "Examples")
  11.  
  12.     (set #AskLibsDirPromptMsg            "Select the drawer where you want to install RexxMustHave libraries")
  13.     (set #AskLibsDirHelpMsg                "In the drawer you supply here, there will be installed rxsocket.library rxlibnet.library and rmh.library. This drawer MUST BE in your LIBS: assignment")
  14.  
  15.     (set #AskUtilitisDirPromptMsg        "Select the drawer where you want to install some RexxMustHave little utilities.")
  16.     (set #AskUtilitiesDirHelpMsg        "In the drawer you supply here, there will be installed some little utilities such as rxs, needed to launch macro from inetd and rxhelp, needed to obtain RexxMustHave functions inline help. The best drawer to place them is C: ; anyway, it should be in your PATH")
  17.  
  18.     (set #AskGuideDirPromptMsg            "Select the drawer where you want to install RexxMustHave documentation")
  19.     (set #AskGuideDirHelpMsg            "In the drawer you supply here, there will be installed the RexxMustHave documentation in AmigaGuide format")
  20.  
  21.     (set #AskExamplesDirPromptMsg        "Select the drawer where you want to install RexxMustHave examples macro")
  22.     (set #AskExamplesDirHelpMsg            "In the drawer you supply here, there will be installed some RexxMustHave examples ARexx macros")
  23.  
  24.     (set #CopyingLibsMsg                "Copying or Updating libraries")
  25.     (set #CopyingUtilitiesMsg            "Copying or Updating utilities")
  26.     (set #CopyingGuideMsg                "Copying documentation")
  27.     (set #CopyingExamplesMsg            "Copying examples")
  28. )
  29.  
  30. (procedure P_ChooseWhatIstall
  31.     (set #WhatInstall
  32.         (askoptions
  33.             (prompt #WhatInstallPromptMsg
  34.                 (help #WhatInstallHelpMsg)
  35.                 (choices #WhatInstallLibrariesMsg #WhatInstallDocumentationMsg    #WhatInstallExamplesMsg)
  36.                )
  37.           )
  38.      )
  39. )
  40.  
  41. (procedure P_AskLibsDir
  42.     (set #libsDir
  43.         (askdir
  44.                (prompt #AskLibsDirPromptMsg)
  45.                (help #AskLibsDirHelpMsg)
  46.                (default "LIBS:")
  47.           )
  48.      )
  49. )
  50.  
  51. (procedure P_AskUtiliesDir
  52.     (set #utilitiesDir
  53.         (askdir
  54.                (prompt #AskUtilitisDirPromptMsg)
  55.                (help #AskUtilitiesDirHelpMsg)
  56.                (default "C:")
  57.           )
  58.      )
  59. )
  60.  
  61. (procedure P_AskGuideDir
  62.     (set #guideDir
  63.         (askdir
  64.            (prompt #AskGuideDirPromptMsg)
  65.            (help #AskGuideDirHelpMsg)
  66.            (default "Ram Disk:")
  67.         )
  68.      )
  69. )
  70.  
  71. (procedure P_AskExamplesDir
  72.     (set #examplesDir
  73.         (askdir
  74.             (prompt #AskExamplesDirPromptMsg)
  75.                (help #AskExamplesDirHelpMsg)
  76.                (default "Ram Disk:")
  77.           )
  78.      )
  79. )
  80.  
  81. (procedure P_CopyLibs
  82.     (working #CopyingLibsMsg)
  83.     (set #localLibsDir (tackon #source-dir "LIBS/"))
  84.     (foreach #localLibsDir "#?"
  85.           (copylib
  86.                (source (tackon #localLibsDir @each-name))
  87.                (dest #libsDir)
  88.           )
  89.      )
  90. )
  91.  
  92. (procedure P_CopyUtilities
  93.     (working #CopyingUtilitiesMsg)
  94.     (set #localUtilitiesDir (tackon #source-dir "C/"))
  95.     (foreach #localUtilitiesDir "#?"
  96.           (copylib
  97.                (source (tackon #localUtilitiesDir @each-name))
  98.                (dest #UtilitiesDir)
  99.           )
  100.      )
  101. )
  102.  
  103. (procedure P_CopyDocs
  104.     (working #CopyingGuideMsg)
  105.     (copyfiles
  106.         (source (tackon #source-dir "DOCS/english/"))
  107.           (dest #guideDir)
  108.           (optional force askuser)
  109.           (all)
  110.      )
  111. )
  112.  
  113. (procedure P_CopyExamples
  114.     (working #CopyingExamplesMsg)
  115.     (copyfiles
  116.         (source (tackon #source-dir "EXAMPLES/"))
  117.           (dest #examplesDir)
  118.           (optional force askuser)
  119.           (all)
  120.      )
  121. )
  122.  
  123. (set @default-dest "")
  124. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon)) (expandpath @icon)))
  125.  
  126. (P_SetMessages)
  127.  
  128. (complete 0)
  129.  
  130. (P_ChooseWhatIstall)
  131.  
  132. (if (= 0 #WhatInstall) (exit))
  133. (if (BITAND #WhatInstall 1)  (P_AskLibsDir))
  134. (if (BITAND #WhatInstall 2)  (P_AskGuideDir))
  135. (if (BITAND #WhatInstall 4)  (P_AskExamplesDir))
  136.  
  137. (if (BITAND #WhatInstall 1)  (P_CopyLibs))
  138. (complete 30)
  139.  
  140. (if (BITAND #WhatInstall 2)  (P_CopyDocs))
  141. (complete 80)
  142.  
  143. (if (BITAND #WhatInstall 4)  (P_CopyExamples))
  144. (complete 100)
  145.