home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / System / ScalosPrefs / Install < prev    next >
Text File  |  2000-08-23  |  7KB  |  111 lines

  1. ; $VER: preferences.library_install (31.07.2000)
  2. (set @default-dest "")
  3.  
  4.  
  5. ; Set strings depending on language - English is the default
  6. (set #welcome "Welcome to the preferences.library user and developer files installation utility. Please indicate how the installation should proceed (based on your knowledge of the Amiga computer). Choosing Novice will install only the library, choosing Average or Expert will allow you to install the developer files also.")
  7. (set #prompt_copy_lib "Copying preferences.library")
  8. (set #cpu_choice "Please select which library you would like to install, depending on what CPU you have")
  9. (set #prompt_what_install "Select which parts of this distribution you wish to install")
  10. (set #install_user "Library file")
  11. (set #install_dev "Additional developer files")
  12. (set #prompt_what_lang "Which parts of the developer package would you like to install?")
  13. (set #prompt_lib_dest "Select location to install library file. No drawer will be created.")
  14. (set #prompt_doc_dest "Select location to copy autodoc to. No drawer will be created.")
  15. (set #prompt_fd_dest "Select location to copy FD file to. No drawer will be created.")
  16. (set #prompt_asm_i_dest "Select location to copy ASM includes to. Subdrawers will be created as necessary (see include directory tree in this archive).")
  17. (set #prompt_asm_e_dest "Select location to copy ASM examples to. No drawer will be created.")
  18. (set #prompt_blitz_i_dest "Select location to copy Blitz includes to. Subdrawers will be created as necessary (see include directory tree in this archive).")
  19. (set #prompt_blitz_e_dest "Select location to copy Blitz examples to. No drawer will be created.")
  20. (set #prompt_c_i_dest "Select location to copy C includes to. Subdrawers will be created as necessary (see include directory tree in this archive).")
  21. (set #prompt_c_e_dest "Select location to copy C examples to. No drawer will be created.")
  22. (set #prompt_e_i_dest "Select location to copy E includes to. Subdrawers will be created as necessary (see include directory tree in this archive).")
  23. (set #prompt_e_e_dest "Select location to copy E examples to. No drawer will be created.")
  24. (set #prompt_copydoc "Copying autodoc")
  25. (set #prompt_copyfd "Copying FD file")
  26. (set #prompt_copyasm_i "Copying ASM includes")
  27. (set #prompt_copyasm_e "Copying ASM examples")
  28. (set #prompt_copyblitz_i "Copying Blitz includes")
  29. (set #prompt_copyblitz_e "Copying Blitz examples")
  30. (set #prompt_copyc_i "Copying C includes")
  31. (set #prompt_copyc_e "Copying C examples")
  32. (set #prompt_copye_i "Copying E includes")
  33. (set #prompt_copye_e "Copying E examples")
  34.  
  35. ; repeat for other languages here
  36. (if (= @language "deutsch")
  37.     ; German
  38. )
  39.  
  40. ; Get some configuration info about the system we are installing on
  41. ;(set #cpu (database "cpu"))
  42. ;(if (patmatch "680(0|1)0" #cpu) (set #cpu_num 0))
  43. ;(if (patmatch "680(2|3)0" #cpu) (set #cpu_num 1))
  44. ;(if (patmatch "680(4|6)0" #cpu) (set #cpu_num 2))
  45.  
  46. (set #cpu_num 0)
  47.  
  48.  
  49. ; Welcome message, and tell the user that choosing novice will only install the
  50. ; library, not the developer files
  51. (welcome #welcome)
  52.  
  53.  
  54. ; If the user is in Novice mode, we will simply install the library and exit.
  55. (if (= @user-level 0) (
  56.     (copylib (prompt #prompt_copy_lib) (help @copylib-help) (source "libs/preferences.library") (dest "libs:"))
  57.     (exit)
  58. ))
  59.  
  60.  
  61. ; Find out what the user wants to install:
  62. (set #to_install (askoptions (prompt #prompt_what_install) (choices #install_user #install_dev) (help @askoptions-help) (default 3)))
  63. ;(message ("%ld" #to_install))
  64. (if (IN #to_install 0)
  65. (
  66.     ; install user files
  67.     ;(message "ask for install directory here")
  68.     (set #lib_dest (askdir (prompt #prompt_lib_dest) (help @askdir-help) (default "LIBS:")))
  69.     ;(set #cpu_num (askchoice (prompt #cpu_choice) (choices "68000/68010" "68020/68030" "68040/68060") (help @askchoice-help) (default #cpu_num)))
  70. ;    (message ("%ld" #cpu_num))
  71. ))
  72.  
  73. (if (IN #to_install 1)
  74. (
  75.     ; ask all questions about installing developer archives here
  76.     (set #dev_lang (askoptions (prompt #prompt_what_lang) (choices "Autodoc" ".FD file" "ASM includes" "ASM examples" "Blitz2 includes" "Blitz2 examples" "C includes" "C examples" "E includes" "E examples") (help @askoptions-help) (default %11000011)))
  77.     (if (IN #dev_lang 0) (set #doc_dest (askdir (prompt #prompt_doc_dest) (help @askdir-help) (default "Autodoc:"))))
  78.     (if (IN #dev_lang 1) (set #fd_dest (askdir (prompt #prompt_fd_dest) (help @askdir-help) (default "FD:")) ))
  79.     (if (IN #dev_lang 2) (set #asm_i_dest (askdir (prompt #prompt_asm_i_dest) (help @askdir-help) (default "Include:")) ))
  80.     (if (IN #dev_lang 3) (set #asm_e_dest (askdir (prompt #prompt_asm_e_dest) (help @askdir-help) (default "src:") (disk)) ))
  81.     (if (IN #dev_lang 4) (set #blitz_i_dest (askdir (prompt #prompt_blitz_i_dest) (help @askdir-help) (default "Include:")) ))
  82.     (if (IN #dev_lang 5) (set #blitz_e_dest (askdir (prompt #prompt_blitz_e_dest) (help @askdir-help) (default "src:")) ))
  83.     (if (IN #dev_lang 6) (set #c_i_dest (askdir (prompt #prompt_c_i_dest) (help @askdir-help) (default "Include:")) ))
  84.     (if (IN #dev_lang 7) (set #c_e_dest (askdir (prompt #prompt_c_e_dest) (help @askdir-help) (default "src:")) ))
  85.     (if (IN #dev_lang 8) (set #e_i_dest (askdir (prompt #prompt_e_i_dest) (help @askdir-help) (default "Include:")) ))
  86.     (if (IN #dev_lang 9) (set #e_e_dest (askdir (prompt #prompt_e_e_dest) (help @askdir-help) (default "src:")) ))
  87. ))
  88.  
  89.  
  90. ; Now that all the questions have been asked, we can go about copying files and things
  91. (if (IN #to_install 0)
  92. (
  93.     (select #cpu_num
  94.         (copylib (prompt #prompt_copy_lib) (help @copylib-help) (source "libs/preferences.library") (dest #lib_dest) (confirm))
  95.         (copylib (prompt #prompt_copy_lib) (help @copylib-help) (source "libs/preferences020.library") (dest #lib_dest) (newname "preferences.library") (confirm))
  96.         (copylib (prompt #prompt_copy_lib) (help @copylib-help) (source "libs/preferences040.library") (dest #lib_dest) (newname "preferences.library") (confirm))
  97.     )
  98. ))
  99.  
  100. (if (IN #dev_lang 0) (copyfiles (prompt #prompt_copydoc) (help @copyfiles-help) (source "doc/preferences.doc") (dest #doc_dest)))
  101. (if (IN #dev_lang 1) (copyfiles (prompt #prompt_copyfd) (help @copyfiles-help) (source "fd/preferences_lib.fd") (dest #fd_dest)))
  102. (if (IN #dev_lang 2) (copyfiles (prompt #prompt_copyasm_i) (help @copyfiles-help) (source "include/ASM") (dest #asm_i_dest) (pattern "~(#?.info)")))
  103. (if (IN #dev_lang 3) (copyfiles (prompt #prompt_copyasm_e) (help @copyfiles-help) (source "examples/ASM") (dest #asm_e_dest) (pattern "~(#?.info)")))
  104. (if (IN #dev_lang 4) (copyfiles (prompt #prompt_copyblitz_i) (help @copyfiles-help) (source "include/Blitz") (dest #blitz_i_dest) (pattern "~(#?.info)")))
  105. (if (IN #dev_lang 5) (copyfiles (prompt #prompt_copyblitz_e) (help @copyfiles-help) (source "examples/Blitz") (dest #blitz_e_dest) (pattern "~(#?.info)")))
  106. (if (IN #dev_lang 6) (copyfiles (prompt #prompt_copyc_i) (help @copyfiles-help) (source "include/C") (dest #c_i_dest) (pattern "~(#?.info)")))
  107. (if (IN #dev_lang 7) (copyfiles (prompt #prompt_copyc_e) (help @copyfiles-help) (source "examples/C") (dest #c_e_dest) (pattern "~(#?.info)")))
  108. (if (IN #dev_lang 8) (copyfiles (prompt #prompt_copye_i) (help @copyfiles-help) (source "include/E") (dest #e_i_dest) (pattern "~(#?.info)")))
  109. (if (IN #dev_lang 9) (copyfiles (prompt #prompt_copye_e) (help @copyfiles-help) (source "examples/E") (dest #e_e_dest) (pattern "~(#?.info)")))
  110.  
  111.