home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 10 / amigaformatcd10.iso / -screenplay- / utilities / f1gp-ed / install / install_f1gp-ed < prev   
Text File  |  1996-12-01  |  26KB  |  1,235 lines

  1. ; F1GP-Ed Install Script - Copyright © Oliver Roberts
  2. ;
  3. ; $VER: Install_F1GP-Ed 4.10 (1.12.96)
  4. ;
  5. ; - German translation by Dirk Kocherscheidt
  6.  
  7. ;****************************************************************************
  8. ; English strings
  9. ;
  10. (set #defhelp 0)
  11.  
  12. (set #str-installtype
  13.     "Choose installation:"
  14. )
  15.  
  16. (set #str-hd
  17.     "Hard disk installation"
  18. )
  19.  
  20. (set #str-floppy
  21.     "Floppy disk installation"
  22. )
  23.  
  24. (set #str-help-installtype (cat
  25.     "F1GP-Ed is best installed to a hard drive.  If you don't have "
  26.     "one, then select floppy disk and this installer will install "
  27.     "F1GP-Ed to floppy disk instead.")
  28. )
  29.  
  30. (set #str-hdconfirm (cat
  31.     "Make sure you have booted from your hard drive, before "
  32.     "continuing with this installation!\n\nDo you want to continue?")
  33. )
  34.  
  35. (set #str-floppyconfirm (cat
  36.     "Make sure you have a blank formatted disk ready.  Refer to "
  37.     "the Workbench manual if you are unsure how to format a disk.\n\n"
  38.     "Do you want to continue?")
  39. )
  40.  
  41. (set #str-diskwarn (cat
  42.     "IMPORTANT: If you are running this installer off a floppy disk, "
  43.     "please make sure the disk is write-protected before proceeding.\n\n"
  44.     "Please be aware that a full installation won't fit on a single DD "
  45.     "floppy disk, so it's best to only choose one language for the "
  46.     "documentation, and only the relevant locale catalog.")
  47. )
  48.  
  49. (set #str-diskinsertnew
  50.     "Please insert a blank formatted disk in drive DF0:\n(internal disk drive)"
  51. )
  52.  
  53. (set #str-diskremove
  54.     "You should now remove this disk and mark it as the %s disk."
  55. )
  56.  
  57. (set #str-diskrename1
  58.     "main F1GP-Ed"
  59. )
  60.  
  61. (set #str-diskanydrive (cat
  62.     "From now on you may insert this disk in any drive when requested "
  63.     "(i.e. not just the internal drive).")
  64. )
  65.  
  66. (set #str-diskinsert
  67.     "Please insert the %s disk in any drive"
  68. )
  69.  
  70. (set #str-copy
  71.     "Copying files to %s"
  72. )
  73.  
  74. (set #str-tmpcopy
  75.     "Copying files to temporary directory"
  76. )
  77.  
  78. (set #str-tmpclean
  79.     "Cleaning temporary directory"
  80. )
  81.  
  82. (set #str-hdwhere
  83.     "Select where F1GP-Ed should be installed (a drawer called \"F1GP-Ed\" will be created)"
  84. )
  85.  
  86. (set #str-fileexists (cat
  87.     "Could not create the \"F1GP-Ed\" drawer - make sure there are "
  88.     "no files called \"F1GP-Ed\" in the destination you selected.\n\n\n"
  89.     "Installation Failed!")
  90. )
  91.  
  92. (set #str-drawerexists (cat
  93.     "The F1GP-Ed drawer already exists.  It will be renamed "
  94.     "to \"F1GP-Ed_OLD\" if you want to keep any of the files "
  95.     "in it, otherwise all files will be deleted/replaced.")
  96. )
  97.  
  98. (set #str-replacedrawer
  99.     "Replace drawer"
  100. )
  101.  
  102. (set #str-renamedrawer
  103.     "Rename drawer"
  104. )
  105.  
  106. (set #str-extract
  107.     "Unpacking files - this may take a while..."
  108. )
  109.  
  110. (set #str-whichdocs
  111.     "Install documentation for which languages?"
  112. )
  113.  
  114. (set #str-helplanguage
  115.     "Which language should be used for on-line help?"
  116. )
  117.  
  118. (set #str-help-helplanguage (cat
  119.     "You should select your preferred language from the list so that "
  120.     "F1GP-Ed knows which version of the documentation to use for "
  121.     "the on-line help feature.  This is done by modifying the "
  122.     "HELPFILE tooltype in the F1GP-Ed program icon.")
  123. )
  124.  
  125. (set #str-whichcatalogs
  126.     "Install which catalogs? (english is built-in)"
  127. )
  128.  
  129. (set #str-help-whichcatalogs (cat
  130.     "If you have Workbench 2.1 or higher, F1GP-Ed will be able to "
  131.     "make use of locale catalogs.  This means that the strings in "
  132.     "F1GP-Ed itself can be in a different language.\n\n"
  133.     "Selected catalogs will be installed in the F1GP-Ed drawer.")
  134. )
  135.  
  136. (set #str-confirmoptional
  137.     "Please select which of these you'd like to install"
  138. )
  139.  
  140. (set #str-seasondata
  141.     "%ld season data"
  142. )
  143.  
  144. (set #str-soundfiles
  145.     "Replacement sound samples (%s drawer)"
  146. )
  147.  
  148. (set #str-gfxfiles
  149.     "Replacement cockpit designs (%s drawer)"
  150. )
  151.  
  152. (set #str-extrafiles
  153.     "Miscellaneous F1GP stuff (%s drawer)"
  154. )
  155.  
  156. (set #str-update
  157.     "Installing newer version of %s"
  158. )
  159.  
  160. (set #str-exe
  161.     "F1GP-Ed executable"
  162. )
  163.  
  164. (set #str-iconfix
  165.     "Setting icon tools and tooltypes"
  166. )
  167.  
  168. (set #str-floppyextras
  169.     "Copying extra files required for autobooting disk"
  170. )
  171.  
  172. (set #str-theend (cat
  173.     "\nEnjoy using F1GP-Ed ;-)\n\n"
  174.     "The latest version of F1GP-Ed is always available from the "
  175.     "F1GP-Ed Web Page - %s\n\n%s\n")
  176. )
  177.  
  178. (set #str-tmpstorage (cat
  179.     "Select an area to use as temporary storage.  A drawer called \"%s\" "
  180.     "will be created there, and will be deleted when installation has "
  181.     "been completed.  The default is usually sufficient.")
  182. )
  183.  
  184. (set #str-prepdisk
  185.     "Preparing floppy disk"
  186. )
  187.  
  188. (set #str-bootfloppyend (cat
  189.     "F1GP-Ed disk created.  You should now be able to boot directly "
  190.     "from the disk after this installer has exited.")
  191. )
  192.  
  193. ;****************************************************************************
  194. ; German strings
  195. ;
  196. (if (= @language "deutsch") (
  197.     (set #defhelp 1)
  198.     (set #str-installtype
  199.         "Wählen Sie die Art der Installation:"
  200.     )
  201.  
  202.     (set #str-hd
  203.         "Festplatten Installation"
  204.     )
  205.  
  206.     (set #str-floppy
  207.         "Floppy Disk Installation"
  208.     )
  209.  
  210.     (set #str-help-installtype (cat
  211.         "F1GP-Ed wird am besten auf die Festplatte installiert. Wenn "
  212.         "Sie keine haben, dann wählen Sie Floppy Disk und der Installer "
  213.         "wird F1GP-Ed statt dessen auf Diskette installieren.")
  214.     )
  215.  
  216.     (set #str-hdconfirm (cat
  217.         "Versichern Sie sich, daß Sie von Ihrer Festplatte gebootet haben, "
  218.         "bevor Sie mit dieser Installation fortfahren!\n\nMöchten Sie fortfahren?")
  219.     )
  220.  
  221.     (set #str-floppyconfirm (cat
  222.         "Denken Sie daran, eine formatierte Leerdiskette bereit zu haben. "
  223.         "Schlagen Sie in Ihrem Workbench Handbuch nach, wenn Sie nicht genau "
  224.         "wissen wie man eine Diskette formatiert.\n\n"
  225.         "Möchten Sie fortfahren?")
  226.     )
  227.  
  228.     (set #str-diskwarn (cat
  229.         "WICHTIG: Wenn Sie diesen Installer von Diskette laufen lassen, "
  230.         "dann überzeugen Sie sich, daß die Diskette schreibgeschützt ist, "
  231.         "bevor Sie fortfahren.\n\n Bitte denken Sie daran, daß die komplette "
  232.         "Installation nicht auf eine einzige DD Diskette paßt; es ist also am "
  233.         "besten, wenn Sie nur eine Sprache für die Dokumentation und nur den "
  234.         "für Sie relevanten Locale Catalog wählen.")
  235.     )
  236.  
  237.     (set #str-diskinsertnew (cat
  238.         "Bitte legen Sie eine formatierte Leerdiskette in Laufwerk DF0: ein\n"
  239.       "(internes Laufwerk)")
  240.     )
  241.  
  242.     (set #str-diskremove
  243.         "Sie sollten diese Diskette jetzt entfernen und als %s Diskette beschriften."
  244.     )
  245.  
  246.     (set #str-diskrename1
  247.         "F1GP-Ed Haupt -"
  248.     )
  249.  
  250.     (set #str-diskrename2
  251.         "F1GP-Ed Support -"
  252.     )
  253.  
  254.     (set #str-diskanydrive (cat
  255.         "Von jetzt an können Sie die Diskette in jedes beliebige Laufwerk "
  256.         "einlegen (d.h. nicht nur ins interne Laufwerk).")
  257.     )
  258.  
  259.     (set #str-diskinsert
  260.         "Bitte legen Sie die %s Diskette in ein beliebiges Laufwerk"
  261.     )
  262.  
  263.     (set #str-copy
  264.         "Kopiere Dateien nach %s"
  265.     )
  266.  
  267.     (set #str-tmpcopy
  268.         "Kopiere temporär benötigte Dateien in temporäres Verzeichnis"
  269.     )
  270.  
  271.     (set #str-tmpclean
  272.         "Säubere temporäres Verzeichnis"
  273.     )
  274.  
  275.     (set #str-hdwhere (cat
  276.         "Wählen Sie, wo F1GP-Ed installiert werden soll (ein Verzeichnis namens "
  277.         "\"F1GP-Ed\" wird dort angelegt)")
  278.     )
  279.  
  280.     (set #str-fileexists (cat
  281.         "Konnte das Verzeichnis \"F1GP-Ed\" nicht anlegen - überzeugen Sie sich, daß "
  282.         "keine Dateien namens \"F1GP-Ed\" in Ihrem gewählten Ziel sind.\n\n\n"
  283.         "Installation fehlgeschlagen!")
  284.     )
  285.  
  286.     (set #str-drawerexists (cat
  287.         "Das F1GP-Ed Verzeichnis existiert bereits. Es wird in \"F1GP-Ed_OLD\" "
  288.         "umbenannt, wenn Sie irgendwelche Dateien daraus behalten wollen, "
  289.         "anderenfalls werden alle Dateien gelöscht/ersetzt.")
  290.     )
  291.  
  292.     (set #str-replacedrawer
  293.         "Ersetze Verzeichnis"
  294.     )
  295.  
  296.     (set #str-renamedrawer
  297.         "Benenne Verzeichnis um"
  298.     )
  299.  
  300.     (set #str-extract
  301.         "Entpacke Dateien - das kann eine Weile dauern..."
  302.     )
  303.  
  304.     (set #str-whichdocs
  305.         "In welchen Sprachen soll die Dokumentation installiert werden?"
  306.     )
  307.  
  308.     (set #str-helplanguage
  309.         "Welche Sprache soll für die on-line Hilfe benutzt werden?"
  310.     )
  311.  
  312.     (set #str-help-helplanguage (cat
  313.         "Sie sollten aus dieser Liste Ihre bevorzugte Sprache auswählen, so daß "
  314.         "F1GP-Ed weiß, welche Version der Dokumentation für das on-line Hilfe "
  315.         "Feature benutzt werden soll. Dies wird gemacht, indem das HELPFILE "
  316.         "Tooltype im F1GP-Ed Programm Icon verändert wird.")
  317.     )
  318.  
  319.     (set #str-whichcatalogs
  320.         "Welche Cataloge sollen installiert werden? (Englisch ist schon eingebaut)"
  321.     )
  322.  
  323.     (set #str-help-whichcatalogs (cat
  324.         "Wenn Sie Workbench 2.1 oder höher haben, ist F1GP-Ed in der Lage "
  325.         "Locale Catalogs zu benutzen. Das bedeutet, daß die Texte in F1GP-Ed selbst, "
  326.         "in verschiedenen Sprachen sein können.\n\n"
  327.         "Ausgewählte Cataloge werden ins F1GP-Ed Verzeichnis installiert.")
  328.     )
  329.  
  330.     (set #str-confirmoptional
  331.         "Bitte wählen Sie, was Sie hiervon installieren möchten"
  332.     )
  333.  
  334.     (set #str-seasondata
  335.         "%lder Saison Daten"
  336.     )
  337.  
  338.     (set #str-soundfiles
  339.         "Ersatz Sound-Samples (%s Verzeichnis)"
  340.     )
  341.  
  342.     (set #str-gfxfiles
  343.         "Ersatz Cockpit-Designs (%s Verzeichnis)"
  344.     )
  345.  
  346.     (set #str-extrafiles
  347.         "Verschiedenes F1GP Zeug (%s Verzeichnis)"
  348.     )
  349.  
  350.     (set #str-update
  351.         "Installiere neue Version der %s"
  352.     )
  353.  
  354.     (set #str-exe
  355.         "ausführbaren F1GP-Ed Datei"
  356.     )
  357.  
  358.     (set #str-iconfix
  359.         "Setze Icon Tools und Tooltypes"
  360.     )
  361.  
  362.     (set #str-floppyextras
  363.         "Kopiere extra Dateien, die für selbst-bootende Diskette benötigt werden"
  364.     )
  365.  
  366.     (set #str-theend (cat
  367.         "\nViel Spaß beim Benutzen von F1GP-Ed ;-)\n\n"
  368.         "Die neueste Version von F1GP-Ed gibt es immer auf der F1GP-Ed Web Page "
  369.         "- %s\n\n%s\n")
  370.     )
  371.     
  372.     (set #str-tmpstorage (cat
  373.         "Wählen Sie ein Verzeichnis, das als temporäres Verzeichnis benutzt "
  374.         "werden soll. Ein Verzeichnis namens \"%s\" wird dort angelegt und "
  375.         "nach der Installation wieder gelöscht. Die Vorgabe ist normalerweise "
  376.         "ausreichend.")
  377.     )
  378.  
  379.     (set #str-prepdisk
  380.         "Bereite Diskette vor"
  381.     )
  382.  
  383.     (set #str-bootfloppyend (cat
  384.         "F1GP-Ed Diskette angelegt. Sie sollten nun direkt von der Diskette "
  385.         "booten können, nachdem der Installer beendet ist.")
  386.     )
  387. ))
  388.  
  389. ;****************************************************************************
  390. ; Initializations
  391. ;
  392. (set #fail 0)
  393. (set #file 1)
  394. (set #dir 2)
  395.  
  396. (set #OSVersion (/ (getversion) 65536))
  397.  
  398. (if (< #OSVersion 39)
  399.     (set #TextTool "AmigaGuide")
  400.     (set #TextTool "MultiView")
  401. )
  402.  
  403. (set #fromfloppy (exists "C/TestKS13"))
  404. (set #tmpdir "F1GP-Ed_tmp")
  405. (set #packed (exists "F1GP-Ed.lzx"))
  406. (set #floppyassign "F1GP-Ed_newfloppy")
  407.  
  408. (set #numhelplanguages 2)
  409. (set #numcatalogs 10)
  410.  
  411. (if (exists "ENV:Language")
  412.     (set #envlanguage (getenv "Language"))
  413.     (set #envlanguage @language)
  414. )
  415.  
  416. (set #n 0)
  417. (set #defcatalog 0)
  418. (while (< #n #numcatalogs)
  419.     (
  420.         (if (= #envlanguage (select #n "ÃeÓtina" "dansk" "deutsch" "español" "français" "italiano" "nederlands" "norsk" "suomi" "svenska"))
  421.             (set #defcatalog (shiftleft 1 #n))
  422.         )
  423.         (set #n (+ #n 1))
  424.     )
  425. )
  426.  
  427. (set #freemem (+ (database "total-mem")))
  428. (set #lowmem (< #freemem 1048576))
  429.  
  430. ;****************************************************************************
  431. ; Procedures
  432. ;
  433. (procedure P_SetTextTool
  434.     (if (exists #TextFile)
  435.         (tooltype
  436.             (prompt #str-iconfix)
  437.             (setdefaulttool #TextTool)
  438.             (dest #TextFile)
  439.         )
  440.     )
  441. )
  442.  
  443. (procedure P_CleanTmpDir
  444.     (if (exists #tmpdir)
  445.         (
  446.             (working #str-tmpclean)
  447.             (run ("\"%s\" \"%s\" ALL QUIET" #delete (tackon #tmpdir "files/#?")))
  448.         )
  449.     )
  450. )
  451.  
  452. (procedure P_CleanTmpDirAll
  453.     (if (exists #tmpdir)
  454.         (
  455.             (P_CleanTmpDir)
  456.             (delete (tackon #tmpdir "F1GP-Ed.lzx"))
  457.             (delete (tackon #tmpdir "UNLZX"))
  458.         )
  459.     )
  460. )
  461.  
  462. (procedure P_AskForMainDisk
  463.     (if #tofloppy
  464.         (askdisk
  465.             (prompt (#str-diskinsert #str-diskrename1))
  466.             (help @askdisk-help)
  467.             (dest "F1GP-Ed")
  468.         )
  469.     )
  470. )
  471.  
  472. (procedure P_AskForInstallDisk
  473.     (if (AND #tofloppy #fromfloppy)
  474.         (askdisk
  475.             (prompt (#str-diskinsert "F1GP-Ed_Install"))
  476.             (help @askdisk-help)
  477.             (dest "F1GP-Ed_Install")
  478.         )
  479.     )
  480. )
  481.  
  482. (procedure P_Extract
  483.     (if #packed
  484.         (
  485.             (if #lowmem
  486.                 (P_AskForInstallDisk)
  487.             )
  488.             (working #str-extract)
  489.             (run ("\"%s\" -m x \"%s\" %s \"%s\"" #lzx (tackon #srcdir "F1GP-Ed.lzx") #extract (tackon #tmpdir "files/")))
  490.             (if #lowmem
  491.                 (P_AskForMainDisk)
  492.             )
  493.         )
  494.     )
  495. )
  496.  
  497. (procedure P_CleanUp
  498.     (
  499.         (if (exists #tmpdir)
  500.             (
  501.                 (working #str-tmpclean)
  502.                 (run ("\"%s\" \"%s\" ALL QUIET" #delete (tackon #tmpdir "#?")))
  503.                 (delete #tmpdir)
  504.             )
  505.         )
  506.         (makeassign #floppyassign (safe))
  507.     )
  508. )
  509.  
  510. ;****************************************************************************
  511. ; Main body of installer (the mess ;)
  512. ;
  513.  
  514. (welcome "")
  515.  
  516. ; ask questions and prepare to install
  517.  
  518. (set #tofloppy
  519.     (askchoice
  520.         (prompt #str-installtype)
  521.         (default 0)
  522.         (choices #str-hd #str-floppy)
  523.         (help (cat #str-help-installtype "\n\n" @askchoice-help))
  524.     )
  525. )
  526.  
  527. (if (NOT
  528.     (askbool
  529.         (prompt (if #tofloppy #str-floppyconfirm #str-hdconfirm))
  530.         (default 0)
  531.         (help "")
  532.     ))
  533.     (exit (quiet))
  534. )
  535.  
  536. (onerror (P_CleanUp))
  537.  
  538. (if (OR #packed #tofloppy)
  539.     (
  540.         (set #tmpstorage
  541.             (if (= 2 @user-level)
  542.                 (askdir
  543.                     (prompt (#str-tmpstorage #tmpdir))
  544.                     (help @askdir-help)
  545.                     (disk)
  546.                     (default "RAM:")
  547.                 )
  548.                 "RAM:"
  549.             )
  550.         )
  551.         (set #tmpdir (tackon #tmpstorage #tmpdir))
  552.     )
  553. )
  554.  
  555. (if #tofloppy
  556.     (        
  557.         (copyfiles
  558.             (prompt #str-tmpcopy)
  559.             (help @copyfiles-help)
  560.             (source "C:Delete")
  561.             (dest #tmpdir)
  562.         )
  563.         (set #delete (tackon #tmpdir "Delete"))
  564.         (if #fromfloppy
  565.             (copyfiles
  566.                 (prompt #str-tmpcopy)
  567.                 (help @copyfiles-help)
  568.                 (source (if (< #OSVersion 36) "C:Install13" "C:Install"))
  569.                 (dest #tmpdir)
  570.                 (newname "Install")
  571.             )
  572.         )
  573.         (if (AND #fromfloppy (NOT @installer-version))
  574.             (copyfiles
  575.                 (prompt #str-tmpcopy)
  576.                 (help @copyfiles-help)
  577.                 (source "C:Relabel")
  578.                 (dest #tmpdir)
  579.             )
  580.         )
  581.         (message #str-diskwarn)
  582.         (message #str-diskinsertnew)
  583.         (working #str-prepdisk)
  584.         (set #oldname (getassign "df0" "d"))
  585.         ; old versions of installer didn't recoginize disk param!
  586.         (if @installer-version
  587.             (rename #oldname "F1GP-Ed" (disk))
  588.             (if #fromfloppy
  589.                 (
  590.                     (run ("\"%s\" \"%s\" F1GP-Ed" (tackon #tmpdir "Relabel") #oldname))
  591.                     (delete (tackon #tmpdir "Relabel"))
  592.                 )
  593.                 (run ("C:Relabel \"%s\" F1GP-Ed" #oldname))
  594.             )
  595.         )
  596.         (if #fromfloppy
  597.             (
  598.                 (run ("\"%s\" DF0:" (tackon #tmpdir "Install")))
  599.                 (delete (tackon #tmpdir "Install"))
  600.             )
  601.             (if (exists "C:Install")
  602.                 (run "C:Install DF0:")
  603.             )
  604.         )
  605.         (makeassign #floppyassign "DF0:" (safe))
  606.         (run ("\"%s\" %s:#? ALL QUIET" #delete #floppyassign))
  607.         (message (cat (#str-diskremove #str-diskrename1) "  " #str-diskanydrive))
  608.         (set #destdir ("%s:" #floppyassign))
  609.         (set @default-dest #destdir)
  610.     )
  611. ; else
  612.     (
  613.         (set #delete "C:Delete")
  614.         (set #destdir
  615.             (askdir
  616.                 (prompt #str-hdwhere)
  617.                 (help @askdir-help)
  618.                 (default @default-dest)
  619.             )
  620.         )
  621.  
  622.         (set @default-dest (tackon #destdir "F1GP-Ed"))
  623.  
  624.         (if (= #file (exists @default-dest))
  625.             (
  626.                 (message #str-fileexists)
  627.                 (exit (quiet))
  628.             )
  629.         )
  630.  
  631.         (if (exists @default-dest)
  632.             (
  633.                 (set #rename (askbool
  634.                     (prompt #str-drawerexists)
  635.                     (default 0)
  636.                     (help "")
  637.                     (choices #str-renamedrawer #str-replacedrawer)
  638.                 ))
  639.                 (if #rename
  640.                     (
  641.                         (rename @default-dest (cat @default-dest "_OLD"))
  642.                         (rename (cat @default-dest ".info") (cat @default-dest "_OLD.info"))
  643.                     )
  644.                 )
  645.             )
  646.         )
  647.  
  648.         (if (NOT (exists @default-dest))
  649.             (makedir @default-dest (infos))
  650.         )
  651.     )
  652. )
  653.  
  654. (set #whichdocs
  655.     (askoptions
  656.         (prompt #str-whichdocs)
  657.         (help @askoptions-help)
  658.         (choices "English" "Deutsch")
  659.         (default (shiftleft 1 #defhelp))
  660.     )
  661. )
  662.  
  663. (set #n 0)
  664. (set #count 0)
  665. (while (< #n #numhelplanguages)
  666.     (
  667.         (if (IN #whichdocs #n)
  668.             (
  669.                 (set #count (+ #count 1))
  670.                 (set #single #n)
  671.             )
  672.         )
  673.         (set #n (+ #n 1))
  674.     )
  675. )
  676.  
  677. (if (> #count 1)
  678.     (set #help-language
  679.         (askchoice
  680.             (prompt #str-helplanguage)
  681.             (help (cat #str-help-helplanguage "\n\n" @askchoice-help))
  682.             (choices "English" "Deutsch")
  683.             (default #defhelp)
  684.         )
  685.     )
  686. ;else
  687.     (set #help-language #single)
  688. )
  689.  
  690. (set #helpfile
  691.     ("Docs/F1GP-Ed_%s.guide" (select #help-language "english" "deutsch"))
  692. )
  693.  
  694. (if (>= #OSVersion 36)
  695.     (set #helpfile (cat "PROGDIR:" #helpfile))
  696. )
  697.  
  698. (if (>= #OSVersion 36)
  699.     (set #whichcatalogs
  700.         (askoptions
  701.             (prompt #str-whichcatalogs)
  702.             (help (cat #str-help-whichcatalogs "\n\n" @askoptions-help))
  703.             (choices "ÃeÓtina" "dansk" "deutsch" "español" "français"
  704.                  "italiano" "nederlands" "norsk" "suomi" "svenska")
  705.             (default #defcatalog)
  706.         )
  707.     )
  708.     (set #whichcatalogs 0)
  709. )
  710.  
  711. (set #opts
  712.     (askoptions
  713.         (prompt #str-confirmoptional)
  714.         (help @askoptions-help)
  715.         (choices (#str-seasondata 1997)
  716.              (#str-seasondata 1996)
  717.              (#str-seasondata 1995)
  718.              (#str-seasondata 1994)
  719.              (#str-soundfiles "Sound")
  720.              (#str-gfxfiles "Graphics")
  721.              (#str-extrafiles "Extras")
  722.         )
  723.         (default 127)
  724.     )
  725. )
  726.  
  727. (P_AskForInstallDisk)
  728.  
  729. (if #fromfloppy
  730.     (
  731.         (set #unpackdir (tackon #tmpdir "files"))
  732.         (set #srcdir (if (AND #tofloppy (NOT #lowmem)) #tmpdir ""))
  733.         (set #diskdir (if #tofloppy #unpackdir ""))
  734.     )
  735.     (
  736.         (set #srcdir "/")
  737.         (set #unpackdir #srcdir)
  738.         (set #diskdir #srcdir)
  739.     )
  740. )
  741.  
  742. (if (AND #fromfloppy #tofloppy)
  743.     (
  744.         (if (NOT #lowmem)
  745.             (copyfiles
  746.                 (prompt #str-tmpcopy)
  747.                 (help @copyfiles-help)
  748.                 (source "F1GP-Ed.lzx")
  749.                 (dest #tmpdir)
  750.             )
  751.         )
  752.         (copyfiles
  753.             (prompt #str-tmpcopy)
  754.             (help @copyfiles-help)
  755.             (source "C/UNLZX")
  756.             (dest #tmpdir)
  757.         )
  758.         (set #lzx (tackon #tmpdir "UNLZX"))
  759.     )
  760. ;else
  761.     (set #lzx "C/UNLZX")
  762. )
  763.  
  764. (complete 0)
  765.  
  766. ; install libs
  767.  
  768. (if #tofloppy
  769.     (set #libdir ("%s:Libs" #floppyassign))
  770.     (set #libdir "LIBS:")
  771. )
  772.  
  773. (if (< #OSVersion 36)
  774.     (set #extract "Libs/f1gp.l#? Libs/gad#? Libs/#?_ks13")
  775.     (set #extract "Libs/f1gp.library Libs/reqtools.library")
  776. )
  777. (P_Extract)
  778.  
  779. (P_AskForMainDisk)
  780.  
  781. (copylib
  782.     (prompt (#str-update "f1gp.library"))
  783.     (source (tackon #unpackdir "Libs/f1gp.library"))
  784.     (dest #libdir)
  785.     (help @copylib-help)
  786.     (confirm)
  787. )
  788.  
  789. (complete 3)
  790.  
  791. (if (< #OSVersion 36) 
  792.     (    (set #ReqToolsSource "Libs/reqtools.library_ks13")
  793.         (copylib
  794.             (prompt (#str-update "gadtools13.library"))
  795.             (source (tackon #unpackdir "Libs/gadtools13.library"))
  796.             (dest #libdir)
  797.             (help @copylib-help)
  798.             (confirm)
  799.         )
  800.     )
  801.     (    (set #ReqToolsSource "Libs/reqtools.library")
  802.         (set #asllib (tackon #libdir "asl.library"))
  803.         (if (exists #asllib)
  804.             (    (set #aslver (/ (getversion #asllib) 65536))
  805.                 (if (>= #aslver 38)
  806.                     (set #ReqToolsSource "")
  807.                 )
  808.             )
  809.         )
  810.     )
  811. )
  812.  
  813. (if #ReqToolsSource
  814.     (copylib
  815.         (prompt (#str-update "reqtools.library"))
  816.         (source (tackon #unpackdir #ReqToolsSource))
  817.         (dest #libdir)
  818.         (help @copylib-help)
  819.         (newname "reqtools.library")
  820.         (confirm)
  821.     )
  822. )
  823.  
  824. (P_CleanTmpDir)
  825.  
  826. (complete 10)
  827.  
  828. ; install F1GP-Ed drawer
  829.  
  830. (P_AskForMainDisk)
  831.  
  832. (set #extract "F1GP-Ed F1GP-Ed.info Docs.info")
  833. (P_Extract)
  834.  
  835. (copylib
  836.     (prompt (#str-update #str-exe))
  837.     (source (tackon #unpackdir "F1GP-Ed"))
  838.     (dest @default-dest)
  839.     (help @copylib-help)
  840.     (infos)
  841.     (confirm)
  842. )
  843.  
  844. (complete 25)
  845.  
  846. (copyfiles
  847.     (source (tackon #unpackdir "Docs.info"))
  848.     (dest @default-dest)
  849.     (help @copyfiles-help)
  850. )
  851.  
  852. (P_CleanTmpDir)
  853.  
  854. (set #n 0)
  855. (while (< #n #numhelplanguages)
  856.     (
  857.         (if (IN #whichdocs #n)
  858.             (
  859.                 (set #docfilename ("Docs/F1GP-Ed_%s.guide" (select #n "english" "deutsch")))
  860.                 (set #extract (cat #docfilename "#?"))
  861.                                 (P_Extract)
  862.                                 (copyfiles
  863.                     (source (tackon #unpackdir #docfilename))
  864.                     (dest (tackon @default-dest "Docs"))
  865.                     (help @copyfiles-help)
  866.                     (infos)
  867.                 )
  868.                 (P_CleanTmpDir)
  869.             )
  870.         )
  871.         (set #n (+ #n 1))
  872.     )
  873. )
  874.  
  875. (complete 40)
  876.  
  877. (set #extract "History.txt#? Reg_Form#?")
  878. (P_Extract)
  879.  
  880. (copyfiles
  881.     (prompt (#str-copy @default-dest))
  882.     (source #unpackdir)
  883.     (choices "History.txt" "Reg_Form")
  884.     (dest @default-dest)
  885.     (help @copyfiles-help)
  886.     (infos)
  887.     (confirm)
  888. )
  889. (P_CleanTmpDir)
  890.  
  891. (complete 50)
  892.  
  893. ; copy optional files
  894.  
  895. (if (OR (OR (IN #opts 0) (IN #opts 1)) (IN #opts 2))
  896.     (
  897.         (set #extract "199?.f1gp#?")
  898.         (P_Extract)
  899.     )
  900. )
  901.  
  902. (set #n 0)
  903. (while (< #n 3)
  904.     (
  905.         (if (IN #opts #n)
  906.             (
  907.                 (set #filename (select #n "1997.f1gp" "1996.f1gp" "1995.f1gp" "1994.f1gp"))
  908.                 (copyfiles
  909.                     (source (tackon #unpackdir #filename))
  910.                      (dest @default-dest)
  911.                     (help @copyfiles-help)
  912.                     (infos)
  913.                 )
  914.                 (set #filename (cat (tackon #unpackdir #filename) ".events"))
  915.                 (if (exists #filename)
  916.                     (copyfiles
  917.                         (source #filename)
  918.                          (dest @default-dest)
  919.                         (help @copyfiles-help)
  920.                     )
  921.                 )
  922.             )
  923.         )        
  924.         (set #n (+ #n 1))
  925.     )
  926. )
  927.  
  928. (P_CleanTmpDir)
  929.  
  930. (complete 60)
  931.  
  932. ; copy optional dirs
  933.  
  934. (set #n 3)
  935. (while (< #n 6)
  936.     (
  937.         (if (IN #opts #n)
  938.             (
  939.                 (set #filename (select (- #n 3) "Sound" "Graphics" "Extras"))
  940.                 (set #extract (cat #filename "/#? " #filename ".info"))
  941.                 (P_Extract)
  942.                 (copyfiles
  943.                     (source (tackon #unpackdir (cat #filename ".info")))
  944.                      (dest @default-dest)
  945.                     (help @copyfiles-help)
  946.                 )
  947.                 (copyfiles
  948.                     (source (tackon #unpackdir #filename))
  949.                      (dest (tackon @default-dest #filename))
  950.                     (help @copyfiles-help)
  951.                     (all)
  952.                     (infos)
  953.                 )
  954.                 (P_CleanTmpDir)
  955.             )
  956.         )        
  957.         (set #n (+ #n 1))
  958.     )
  959. )
  960.  
  961. (if (IN #opts 6)
  962.     (tooltype
  963.         (prompt #str-iconfix)
  964.         (setdefaulttool "Installer")
  965.         (dest (tackon @default-dest "Extras/Install_F1GP"))
  966.     )
  967. )
  968.  
  969. (complete 75)
  970.  
  971. (if (>= #OSVersion 36)
  972.     (
  973.         (set #newdir (tackon @default-dest "Catalogs"))
  974.         (if (NOT (exists #newdir))
  975.             (makedir #newdir)
  976.         )
  977.         (set #extract "Catalogs/#? Catalogs.info")
  978.         (P_Extract)
  979.  
  980.         (copyfiles
  981.             (source (tackon #unpackdir "Catalogs.info"))
  982.             (dest @default-dest)
  983.             (help @copyfiles-help)
  984.         )
  985.         (set #dest (tackon @default-dest "Catalogs"))
  986.         (copyfiles
  987.             (prompt (#str-copy #dest))
  988.             (source (tackon #unpackdir "Catalogs/NewCatalog.ct"))
  989.             (dest #dest)
  990.             (help @copyfiles-help)
  991.             (infos)
  992.             (confirm)
  993.         )
  994.     )
  995. )
  996.  
  997. (complete 77)
  998.  
  999. (set #n 0)
  1000. (while (< #n #numcatalogs)
  1001.     (
  1002.         (if (IN #whichcatalogs #n)
  1003.             (
  1004.                 (set #filename ("Catalogs/%s/F1GP-Ed.catalog" (select #n "ÃeÓtina" "dansk" "deutsch" "español" "français" "italiano" "nederlands" "norsk" "suomi" "svenska")))
  1005.                 (copyfiles
  1006.                     (source (tackon #unpackdir #filename))
  1007.                     (dest (tackon @default-dest (pathonly #filename)))
  1008.                     (help @copyfiles-help)
  1009.                 )
  1010.             )
  1011.         )
  1012.         (set #n (+ #n 1))
  1013.     )
  1014. )
  1015.  
  1016. (P_CleanTmpDir)
  1017.  
  1018. (complete 82)
  1019.  
  1020. (if (AND #fromfloppy #tofloppy)
  1021.     (
  1022.         (P_AskForInstallDisk)
  1023.         (if (exists "F1GP-Ed.key")
  1024.             (copyfiles
  1025.                 (prompt #str-tmpcopy)
  1026.                 (help @copyfiles-help)
  1027.                 (source "F1GP-Ed.key")
  1028.                 (dest #unpackdir)
  1029.             )
  1030.         )
  1031.         (if (exists "Registered.guide")
  1032.             (copyfiles
  1033.                 (prompt #str-tmpcopy)
  1034.                 (help @copyfiles-help)
  1035.                 (source "Registered.guide")
  1036.                 (dest #unpackdir)
  1037.                 (infos)
  1038.             )
  1039.         )
  1040.         (P_AskForMainDisk)
  1041.     )
  1042. )
  1043.  
  1044. (if (exists (tackon #diskdir "F1GP-Ed.key"))
  1045.     (copyfiles
  1046.         (prompt (#str-copy @default-dest))
  1047.         (source (tackon #diskdir "F1GP-Ed.key"))
  1048.         (dest @default-dest)
  1049.         (help @copyfiles-help)
  1050.         (confirm)
  1051.     )
  1052. )
  1053. (set #dest (tackon @default-dest "Docs"))
  1054. (if (exists (tackon #diskdir "Registered.guide"))
  1055.     (copyfiles
  1056.         (prompt (#str-copy #dest))
  1057.         (source (tackon #diskdir "Registered.guide"))
  1058.         (dest #dest)
  1059.         (help @copyfiles-help)
  1060.         (infos)
  1061.         (confirm)
  1062.     )
  1063. )
  1064.  
  1065. (if (AND #fromfloppy #tofloppy)
  1066.     (P_CleanTmpDir)
  1067. )
  1068.  
  1069. (complete 87)
  1070.  
  1071. (working #str-iconfix)
  1072.  
  1073. (tooltype
  1074.     (prompt #str-iconfix)
  1075.     (settooltype "HELPFILE" #helpfile)
  1076.     (dest (tackon @default-dest "F1GP-Ed"))
  1077. )
  1078.  
  1079. (if (AND #tofloppy #fromfloppy)
  1080.     (set #TextTool "F1GP-Ed:C/AmigaGuide")
  1081. )
  1082.  
  1083. (set n 0)
  1084.  
  1085. (while
  1086.     (set #TextFile
  1087.         (select n
  1088.             "Docs/F1GP-Ed_english.guide"
  1089.             "Docs/F1GP-Ed_deutsch.guide"
  1090.             "History.txt"
  1091.             "Reg_Form"
  1092.             "Docs/Registered.guide"
  1093.             "Extras/GP2"
  1094.             "Extras/Other_F1GP_Things"
  1095.             ""
  1096.         )
  1097.     )
  1098.     (
  1099.         (set #TextFile (tackon @default-dest #TextFile))
  1100.         (P_SetTextTool)
  1101.         (set n (+ n 1))
  1102.     )
  1103. )
  1104.  
  1105. (P_CleanTmpDirAll)
  1106.  
  1107. (complete 90)
  1108.  
  1109. ; install files for autoboot disk
  1110.  
  1111. (if (AND #tofloppy #fromfloppy)
  1112.     (
  1113.         (P_AskForInstallDisk)
  1114.         (copyfiles
  1115.             (prompt #str-tmpcopy)
  1116.             (help @copyfiles-help)
  1117.             (source "C")
  1118.             (dest (tackon #unpackdir "C"))
  1119.             (choices "AmigaGuide" "Copy" "GOWB" "PPLoadSeg" "Type")
  1120.         )
  1121.         (copyfiles
  1122.             (prompt #str-tmpcopy)
  1123.             (help @copyfiles-help)
  1124.             (source "Libs")
  1125.             (dest (tackon #unpackdir "Libs"))
  1126.             (choices "amigaguide.library.pp" "powerpacker.library" "iffparse.library.pp")
  1127.         )
  1128.         (copyfiles
  1129.             (prompt #str-tmpcopy)
  1130.             (help @copyfiles-help)
  1131.             (source "S/disk.startup-sequence")
  1132.             (dest (tackon #unpackdir "S"))
  1133.             (newname "Startup-Sequence")
  1134.         )
  1135.         (copyfiles
  1136.             (prompt #str-tmpcopy)
  1137.             (help @copyfiles-help)
  1138.             (source "S/disk.text")
  1139.             (dest (tackon #unpackdir "S"))
  1140.             (newname "text")
  1141.         )
  1142.         (copyfiles
  1143.             (prompt #str-tmpcopy)
  1144.             (help @copyfiles-help)
  1145.             (source "S/help.guide")
  1146.             (dest (tackon #unpackdir "S"))
  1147.         )
  1148.         (copyfiles
  1149.             (prompt #str-tmpcopy)
  1150.             (help @copyfiles-help)
  1151.             (source "system-configuration")
  1152.             (dest #unpackdir)
  1153.         )
  1154.         (copyfiles
  1155.             (prompt #str-tmpcopy)
  1156.             (help @copyfiles-help)
  1157.             (source "Icons/Disk.info")
  1158.             (dest #unpackdir)
  1159.         )
  1160.             
  1161.         (if (< #OSVersion 36)
  1162.             (
  1163.                 (copyfiles
  1164.                     (prompt #str-tmpcopy)
  1165.                     (help @copyfiles-help)
  1166.                     (source "C")
  1167.                     (dest (tackon #unpackdir "C"))
  1168.                     (choices "Echo" "Else" "EndIf"
  1169.                          "If" "Run")
  1170.                 )
  1171.                 (copyfiles
  1172.                     (prompt #str-tmpcopy)
  1173.                     (help @copyfiles-help)
  1174.                     (source "C/Assign13")
  1175.                     (dest (tackon #unpackdir "C"))
  1176.                     (newname "Assign")
  1177.                 )
  1178.                 (copyfiles
  1179.                     (prompt #str-tmpcopy)
  1180.                     (help @copyfiles-help)
  1181.                     (source "C/SetPatch13")
  1182.                     (dest (tackon #unpackdir "C"))
  1183.                     (newname "SetPatch")
  1184.                 )
  1185.                 (copyfiles
  1186.                     (prompt #str-tmpcopy)
  1187.                     (help @copyfiles-help)
  1188.                     (source "Libs")
  1189.                     (dest (tackon #unpackdir "Libs"))
  1190.                     (choices "icon.library.pp")
  1191.                 )
  1192.                 (copyfiles
  1193.                     (prompt #str-tmpcopy)
  1194.                     (help @copyfiles-help)
  1195.                     (source "L")
  1196.                     (dest (tackon #unpackdir "L"))
  1197.                     (all)
  1198.                 )
  1199.             )
  1200.             (
  1201.                 (copyfiles
  1202.                     (prompt #str-tmpcopy)
  1203.                     (help @copyfiles-help)
  1204.                     (source "C")
  1205.                     (dest (tackon #unpackdir "C"))
  1206.                     (choices "Assign" "SetPatch")
  1207.                 )
  1208.             )
  1209.         )
  1210.         (P_AskForMainDisk)
  1211.         (copyfiles
  1212.             (prompt #str-floppyextras)
  1213.             (help @copyfiles-help)
  1214.             (source #unpackdir)
  1215.             (dest @default-dest)
  1216.             (all)
  1217.         )
  1218.         (complete 99)
  1219.         (P_AskForInstallDisk)
  1220.         (P_CleanTmpDir)
  1221.     )
  1222. )
  1223.  
  1224. (P_CleanUp)
  1225.  
  1226. ; end
  1227.  
  1228. (complete 100)
  1229.  
  1230. (exit (cat (if (AND #fromfloppy #tofloppy) #str-bootfloppyend "")
  1231.     (#str-theend
  1232.     "http://www.nanunanu.org/~oliver/F1GP-Ed/"
  1233.     "Oliver Roberts (Oliver@POBoxes.com)"))
  1234. )
  1235.