home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 106 / af106a.adf / archives / serious.lzx / GlobalTrash / InstallGlobalTrash < prev   
Text File  |  1982-05-02  |  10KB  |  287 lines

  1. ;-----------------------------------------------------------------------------
  2. ; Script to install GlobalTrash
  3. ;
  4. ; $VER: InstallGlobalTrash 0.99 (16.11.97)
  5. ;
  6. ; © Oliver Blumert 1997
  7. ;-----------------------------------------------------------------------------
  8.  
  9. ;=============================================================================
  10. ; Configuration defaults
  11. ;=============================================================================
  12.  
  13. (set #MinSysVersion             39)
  14. (set #CPUVersion                -1)
  15. (set #MainprogPath              "SYS:WBStartup")
  16. (set #MainprogName              "GlobalTrash")
  17. (set #DocuName                  "GlobalTrash.guide")
  18. (set #RegisterName              "Register.txt")
  19. (set #MainDefaultPath           "SYS:")
  20. (set #LocaleSrc                 "catalogs")
  21. (set #LocaleDest                "LOCALE:catalogs")
  22.  
  23. (set #CatalogVersion            0)
  24. (set #PerformIconCopy           1)
  25.  
  26. ;=============================================================================
  27. ; English strings
  28. ;=============================================================================
  29.  
  30. (if (= @language "english")
  31.     (
  32.  
  33.     ; Documentation
  34.         (set #DocuPath "Help/english")
  35.  
  36.     ; Errors
  37.         (set #Err-Bad-Kick      "You need at least Kickstart 3.0 to run GlobalTrash !")
  38.         (set #Err-Bad-CPU       "You need a Motorola MC68k CPU (68000/010/020/030/040/060) to run GlobalTrash !")
  39.  
  40.     ; Message
  41.         (set #Message           "\n\nThank you very much for choosing\n\n>> GlobalTrash <<\n\nas your trashcan system.\n\n\nInstallscript © 1997 by Oliver Blumert\n\n")
  42.  
  43.     ; Main
  44.         (set #CPUVersionSel     "Install version for the CPU:")
  45.         (set #CPUVersionSelHelp "Chose a version for your CPU.")
  46.  
  47.         (set #SelectMainDir     "Where do you want to have the program installed ?")
  48.         (set #SelectMainDirHelp "Select the path for the programm.\n\n\n\nA drawer will NOT be created there !\n\nIf you choose 'SYS:WBStartup' then it will\nbe automatically started after booting")
  49.         (set #CopyMainProg      "Copy mainfile.")
  50.  
  51.         (set #AskIconCopy       "Should the neccesary default-iconfiles for the wb-appicon ('def_Trashcan' and 'def_TrashcanFull') be copied ?")
  52.         (set #AskIconCopyHelp   "This files are needed by GlobalTrash to create the appicon on the workbench. If they wouldn't be copied then the user is unable to delete any files over this appicon until the preferences are corrected.")
  53.         (set #CopyIcons         "Copy needed iconfiles.")
  54.  
  55.         (set #CatalogVersion    1)
  56.         (set #CatalogSel        "Which language should be installed ?\nGerman is 'build-in' - no need to install it.")
  57.         (set #CatalogSelHelp    "Choose one or more languages which can be used by the programm.\nA catalog for german ('deutsch') don't have to be installed (build-in language) !\n\nThe catalogfiles will be installed in 'LOCALE:catalogs/'.")
  58.         (set #CopyLocale        "Copy catalogfile")
  59.  
  60.         (set #SelectDocuDir     "Where do you want to have the documentation installed ?")
  61.         (set #SelectDocuDirHelp "Select the path for the documentation files.\n\nA drawer will NOT be created there !")
  62.         (set #CopyDocu          "Copy the documentation.")
  63.  
  64.     ; End of installation
  65.         (set #EndInstall        "\n\nThe installation is now finished.\n\n\nIf you have problems, feel free to contact the author.\n\nYou will find the address in the documentation or on his Webpages 'http://bolli.home.pages.de/'.")
  66.     )
  67. )
  68.  
  69. ;=============================================================================
  70. ; German strings
  71. ;=============================================================================
  72.  
  73. (if (= @language "deutsch")
  74.     (
  75.  
  76.     ; Documentation
  77.         (set #DocuPath          "Help/Deutsch")
  78.  
  79.     ; Errors
  80.         (set #Err-Bad-Kick      "GlobalTrash benötigt mindestens Kickstart 3.0 !")
  81.         (set #Err-Bad-CPU       "GlobalTrash benötigt eine Motorola MC68k (68000/010/020/030/040/060) CPU !")
  82.  
  83.  
  84.     ; Message
  85.         (set #Message           "\n\nVielen Dank, daß Sie \n\n>> GlobalTrash <<\n\nals Mülleimer-System gewählt haben.\n\n\nInstallscript ® 1997 von Oliver Blumert\n\n")
  86.  
  87.     ; Main
  88.         (set #CPUVersionSel     "Installiere Version für CPU:")
  89.         (set #CPUVersionSelHelp "Wählen Sie eine zu Ihrer CPU passende Programmversion.")
  90.  
  91.         (set #SelectMainDir     "Wo möchten Sie das Programm installieren ?")
  92.         (set #SelectMainDirHelp "Wählen Sie einen Pfad für das Hauptprogramm.\n\nEin Verzeichnis wird NICHT erstellt !\n\nWenn Sie 'SYS:WBStartup' auswählen, wird das Programm\nautomatisch nach jedem Bootvorgang gestartet !")
  93.         (set #CopyMainProg      "Kopiere Hauptprogramm.")
  94.  
  95.         (set #AskIconCopy       "Sollen die notwendigen Default-Piktogrammdateien für das WB-Appicon ('def_Trashcan' und 'def_TrashcanFull') kopiert werden ?")
  96.         (set #AskIconCopyHelp   "Diese Dateien benötigt GlobalTrash zur Einrichtung des Application-Piktogramms auf der Workbench. Wird es nicht kopiert, können so lange keine Dateien über GlobalTrash gelöscht werden, bis in dem Einsteller eine korrekte Einstellung getroffen wurde.")
  97.         (set #CopyIcons         "Kopiere notwendige Piktogrammdateien.")
  98.  
  99.         (set #CatalogSel        "Welche Sprache möchten Sie installieren ?\nDeutsch ist Standard und braucht nicht installiert zu werden !")
  100.         (set #CatalogSelHelp    "Wählen Sie eine Sprache aus, die das Programm nutzen soll.\nEin Katalog für 'deutsch' braucht nicht installiert zu werden (Standardsprache) !\n\nDie Katalogdateien werden in 'LOCALE:catalogs/' installiert.")
  101.         (set #CopyLocale        "Kopiere Katalogdatei.")
  102.  
  103.         (set #SelectDocuDir     "Wo soll die Dokumentation installiert werden ?")
  104.         (set #SelectDocuDirHelp "Wählen Sie einen Pfad für die Dokumentation.\n\nEin Verzeichnis wird NICHT erstellt !")
  105.         (set #CopyDocu          "Kopiere die Dokumentation.")
  106.  
  107.     ; End of installation
  108.         (set #EndInstall        "\n\nDie Installation ist nun abgeschlossen.\n\n\nSollten Sie wider Erwarten Probleme haben, kontaktieren Sie den Autor.\n\nDie Adresse finden Sie in der Dokumentation oder auf dessen Webseiten 'http://bolli.home.pages.de/'.")
  109.     )
  110. )
  111.  
  112. ;=============================================================================
  113. ; main installation routine
  114. ;=============================================================================
  115.  
  116.     (complete 0)
  117.     (message #Message (all))
  118.  
  119. ; Check OS-version
  120. ;==================
  121.  
  122.     (if (< (getversion) (* #MinSysVersion 65536))
  123.         (abort #Err-Bad-Kick)
  124.     )
  125.  
  126. ; Check CPU and remember
  127. ;========================
  128.  
  129.     (if (patmatch "680(00|10)" (database "cpu"))
  130.         (set #CPUVersion 0)
  131.     )
  132.     (if (patmatch "680(20|30|40|60)" (database "cpu"))
  133.         (set #CPUVersion 1)
  134.     )
  135.     (if (< #CPUVersion 0)
  136.         (abort #Err-Bad-CPU)
  137.     )
  138.  
  139.     (complete 5)
  140.  
  141.     (welcome)
  142.  
  143.     (if (> @user-level 1)
  144.         (set #CPUVersion
  145.             (askchoice
  146.                 (prompt #CPUVersionSel)
  147.                 (help   #CPUVersionSelHelp)
  148.                 (choices
  149.                     "68000/10"
  150.                     "68020/30/40/60"
  151.                 )
  152.                 (default #CPUVersion)
  153.             )
  154.         )
  155.     )
  156.  
  157.     (select #CPUVersion
  158.         (set #MainprogVersion #MainprogName)
  159.         (set #MainprogVersion (cat #MainprogName ".020"))
  160.     )
  161.  
  162.     (complete 10)
  163.  
  164. ; Copy the programfile
  165. ;======================
  166.  
  167.     (set #MainprogPath
  168.         (askdir
  169.             (prompt  #SelectMainDir)
  170.             (help    #SelectMainDirHelp)
  171.             (default #MainprogPath)
  172.         )
  173.     )
  174.  
  175.     (copyfiles
  176.         (prompt  #CopyMainProg)
  177.         (source  #MainprogVersion)
  178.         (dest    #MainprogPath)
  179.         (newname #MainprogName)
  180.     )
  181.  
  182.     (copyfiles
  183.         (prompt  #CopyMainProg)
  184.         (source  (cat #MainprogName ".info"))
  185.         (dest    #MainprogPath)
  186.     )
  187.  
  188.     (complete 40)
  189.  
  190. ; Copy the defaulticons
  191. ;=======================
  192.  
  193.     (if (> @user-level 1)
  194.         (
  195.             (set #PerformIconCopy (askbool
  196.                                       (prompt  #AskIconCopy)
  197.                                       (help    #AskIconCopyHelp)
  198.                                   )
  199.             )
  200.         )
  201.     )
  202.  
  203.     (if (= #PerformIconCopy 1)
  204.         (
  205.             (copyfiles
  206.                 (prompt  #CopyIcons)
  207.                 (source  "ENVARC/sys/")
  208.                 (dest    "ENV:sys")
  209.                 (all)
  210.             )
  211.  
  212.             (complete 50)
  213.  
  214.             (copyfiles
  215.                 (prompt  #CopyIcons)
  216.                 (source  "ENVARC/sys/")
  217.                 (dest    "ENVARC:sys")
  218.                 (all)
  219.             )
  220.         )
  221.     )
  222.  
  223.     (complete 60)
  224.  
  225. ; Copy the catalog
  226. ;=================
  227.  
  228.     (set #CatalogVersion
  229.         (askoptions
  230.             (prompt #CatalogSel)
  231.             (help   #CatalogSelHelp)
  232.             (choices
  233.                 "english"
  234.             )
  235.             (default #CatalogVersion)
  236.         )
  237.     )
  238.  
  239.     ; english (#CatalogVersion = 1)
  240.     (if (in #CatalogVersion 0)
  241.         (
  242.             (set #LocSrc  (tackon #LocaleSrc  "english/GlobalTrash.catalog"))
  243.             (set #LocDest (tackon #LocaleDest "english"))
  244.             (copyfiles
  245.                 (prompt  #CopyLocale)
  246.                 (source  #LocSrc)
  247.                 (dest    #LocDest)
  248.             )
  249.         )
  250.     )
  251.  
  252.     (complete 70)
  253.  
  254. ; Copy the documentation
  255. ;========================
  256.  
  257.     (set #MainDefaultPath
  258.         (askdir
  259.             (prompt  #SelectDocuDir)
  260.             (help    #SelectDocuDirHelp)
  261.             (default #MainDefaultPath)
  262.         )
  263.     )
  264.  
  265.     ; set application path to get install_log_file there
  266.     (set @default-dest #MainDefaultPath)
  267.  
  268.     (copyfiles
  269.         (prompt  #CopyDocu)
  270.         (source  #DocuPath)
  271.         (dest    #MainDefaultPath)
  272.         (choices
  273.             #DocuName
  274.             (cat #DocuName ".info")
  275.             #RegisterName
  276.             (cat #RegisterName ".info")
  277.         )
  278.     )
  279.  
  280.     (complete 100)
  281.  
  282. ; Finish
  283. ;========
  284.  
  285.     (exit #EndInstall)
  286.  
  287.