home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / patch / fw03int2.lha / Install FinalWriter-030 < prev    next >
Encoding:
Text File  |  1995-02-22  |  1.8 KB  |  83 lines

  1. ; $VER: FinalWriter-030_Install 1.4 (22.2.95)
  2.  
  3. (set version "3.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version "-030 International"
  9.     "\nCopyright 1995 Martin Berndt"
  10.     "\n\n\nThis Patch is SHAREWARE !"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select Language")
  26.         (help @askchoice-help)
  27.         (choices "US1  23-Nov-94 (American English)"
  28.              "US2  14-Dec-94 (American English)"
  29.              "US3   3-Jan-95 (American English)"
  30.              "GB   23-Nov-94 (British English)"
  31.              "GER1  7-Dec-94 (German)"
  32.              "GER2 14-Dec-94 (German)")
  33.     )
  34. )
  35.  
  36. (set backup
  37.     (askoptions
  38.         (prompt "Options")
  39.         (help @askoptions-help)
  40.         (choices "Create Backup Files")
  41.     )
  42. )
  43.  
  44. (set n 0)
  45. (set percent 0)
  46.  
  47. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  48.                "cachemap.library" "qfont.library" "")) (
  49.     (set n (+ n 1))
  50.     (complete percent)
  51.     (if (= n 1)
  52.         (set file name)
  53.         (set file (cat "FWLibs/" name))
  54.     )
  55.     (set newfile (tackon @default-dest file))
  56.     (set oldfile (cat newfile ".bak"))
  57.     (if (= (exists newfile) 0)
  58.         (abort name " not found!")
  59.     )
  60.     (rename newfile oldfile)
  61.     (if (< n 4) (
  62.         (if (= n 1)
  63.             (set name (cat name (select language "US1" "US2" "US3" "GB" "GER1" "GER2")))
  64.         )
  65.         (working "\n\n" newfile)
  66.         (if (<> (run (cat "spatch \"-o" newfile "\" -p" name ".pch \"" oldfile "\"")) 0) (
  67.             (rename oldfile newfile)
  68.             (abort "Wrong Version!")
  69.         ))
  70.         (set percent (+ percent 30))
  71.     ) (
  72.         (copyfiles
  73.             (prompt "Copying " name)
  74.             (help @copyfiles-help)
  75.             (source name)
  76.             (dest (tackon @default-dest "FWLibs"))
  77.             (optional "force" "askuser")
  78.         )
  79.         (set percent (+ percent 5))
  80.     ))
  81.     (if (= backup 0) (delete oldfile))
  82. ))
  83.