home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / util / cli / adoc / installadoc < prev    next >
Encoding:
Text File  |  1994-04-24  |  3.4 KB  |  118 lines

  1. ;---------------------------------------------------------------
  2. ;
  3. ; Installer script for ADoc
  4. ; $VER: 36.0 (24.04.94)
  5. ; Written by Denis GOUNELLE
  6. ;
  7. ;---------------------------------------------------------------
  8. ;
  9. (complete 0)
  10. (set ProgVer  "3.13")
  11. (set ProgName "ADoc")
  12. (set KickVer  (/ (getversion) 65536))
  13. (set SCFlag   (if (AND (> KickVer 35) (exists "S:.SoftConfig")) 1 0))
  14. ;
  15. (set InstallOpt
  16.     (askoptions (prompt "Which part of the program whould you like to install ?")
  17.             (help @askoptions-help)
  18.             (choices "Program" "Locales" "ReqTools.library")
  19.     )
  20. )
  21. ;
  22. ;--------------------- Install the program --------------------
  23. ;
  24. (complete 20)
  25. (if (BITAND InstallOpt 1)
  26.     ((set ProgDir (askdir
  27.         (prompt "Select the directory where to install ADoc")
  28.         (help "The program will be copied in this directory. You may want to install ADoc in a directory which is in your default path.")
  29.         (default "SYS:Utilities/")
  30.         )
  31.      )
  32.      (copyfiles (prompt "Installing program")
  33.         (help @copyfiles-help)
  34.         (source ProgName)
  35.         (newname "ADoc")
  36.         (dest ProgDir)
  37.         (infos)
  38.      )
  39.      (if SCFlag (run (cat "SoftConfig ADD ADoc " (tackon ProgDir "ADoc") " FILE " ProgVer)))
  40.     )
  41. )
  42. ;
  43. ;--------------------- Install the locale --------------------
  44. ;
  45. (complete 40)
  46. (if (BITAND InstallOpt 2)
  47.     ((set Langage (askchoice (prompt "Which locale do you want to install ?")
  48.                 (help @askchoice-help)
  49.                 (choices "deutsch" "français" "none")))
  50.      (if (= Langage 0) (set LocaleName "deutsch"))
  51.      (if (= Langage 1) (set LocaleName "français"))
  52.      (if (NOT (= Langage 2))
  53.         ((set LocaleSrc (tackon "catalogs" LocaleName))
  54.          (set LocaleDst (tackon "LOCALE:" LocaleSrc))
  55.          (set LocaleName "ADoc.catalog")
  56.          (if (NOT (exists LocaleDst)) (makedir LocaleDst (prompt "Creating locale directory") (help @makedir-help)))
  57.          (copyfiles (prompt "Installing locale")
  58.             (help @copyfiles-help)
  59.             (source (tackon LocaleSrc LocaleName))
  60.             (dest LocaleDst)
  61.          )
  62.          (if SCFlag
  63.             ((run (cat "SoftConfig ADD " LocaleName " " (tackon LocaleDst LocaleName) " FILE " ProgVer))
  64.              (run (cat "SoftConfig ATTACH ADoc " LocaleName))
  65.             )
  66.         ))
  67.     ))
  68. )
  69. ;
  70. ;--------------------- Install ReqTools.library --------------------
  71. ;
  72. (complete 60)
  73. (if (BITAND InstallOpt 4)
  74.     ((if (> KickVer 35) (set LibExt "20") (set LibExt "13"))
  75.      (copylib (prompt "Installing reqtools.library")
  76.         (help @copylib-help)
  77.         (source (cat "/libs/reqtools.library" LibExt))
  78.         (dest "LIBS:")
  79.         (newname "reqtools.library")
  80.         (confirm)
  81.     ))
  82. )
  83. ;
  84. (if (exists "LIBS:reqtools.library")
  85.     ((set RTVer  (getversion "LIBS:reqtools.library"))
  86.      (set RTNVer (/ RTVer 65536))
  87.      (set RTSVer ("%ld.%ld" RTNVer (- RTVer (* RTNVer 65536))))
  88.      (if SCFlag
  89.         ((run (cat "SoftConfig ADD reqtools.library LIBS:reqtools.library FILE " RTSVer))
  90.          (run "SoftConfig ATTACH ADoc reqtools.library")
  91.         )
  92.     ))
  93. )
  94. ;
  95. ;--------------------- Install ADOC: --------------------
  96. ;
  97. (complete 80)
  98. (set ADocDir (askdir
  99.      (prompt "Which directory assign to ADOC: ?")
  100.      (help "Select the directory where are (or will be) installed the documentation files to use with ADoc")
  101.      (default (expandpath "ADOC:"))
  102.      (newpath))
  103. )
  104. (makeassign "ADOC" ADocDir)
  105. (if SCFlag
  106.     ((run (cat "SoftConfig ADD ADOC: " ADocDir " ASSIGN " ProgVer))
  107.      (run "SoftConfig ATTACH ADoc ADOC:")
  108.     )
  109.     (startup "ADoc" (prompt "Updating your S:User-Startup file")
  110.         (help "Adding the ADOC: assign to your startup sequence")
  111.         (command (cat "Assign ADOC: " ADocDir "\n"))
  112.     )
  113. )
  114. ;
  115. (complete 100)
  116. (set @default-dest ProgDir)
  117.  
  118.