home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / amiga / applications / database / bbase_060_pch.lha / BBase13a_060pch / Update_eng < prev    next >
Text File  |  1998-02-06  |  4KB  |  116 lines

  1. ;   ---------------------------------------------
  2. ;   Update BancaBase 1.3a to 060 enhanced version
  3. ;   ---------------------------------------------
  4. ;   Description:
  5. ;
  6. ;   Commodore Installer Script for patch
  7. ;   BancaBase V 1.3a 060 enhanced version
  8. ;   $VER: 1.00 (c) 1998 by Stefano Dardari
  9.  
  10. ; some useful variables
  11.     (set 
  12.         newline         "\n"
  13.         #prg            "BancaBase"
  14.         #prgnew         "BancaBase.new"
  15.         #prg060         "BancaBase060"
  16.         #prgicon        "BancaBase.info"
  17.         #prg060icon     "BancaBase060.info"
  18.         #bbpatchname     "BancaBase060.pch"
  19.         #bb3-path       "BancaBase/"
  20.         #bb3-dest       "SYS:"
  21.         #BB3size        351772
  22.     )
  23.  
  24. ; some strings
  25. (set #omp (cat "\nOne moment please..." newline))
  26.  
  27. (set #installtext (cat "Welcome to the BancaBase UPGRADE script.\n\nBancaBase3 V 1.3a (C) 1997/98 by Stefano Dardari\nAll rights reserved\n\n060 Enhanced UPDATE script V 1.0\n"))
  28. (set #BB3dest-prompt "Please select the directory where BancaBase V 1.3a program executable (68000) is installed.\n(See help for more details)")
  29. (set #BB3dest-help (cat "You must select the complete path where is currently installed version 1.3a REGISTERED of BancaBase program.\n\nINPORTANT: this upgrade can be applied on the 1.3a 68000 REGISTERED version only, correcly installed on Hard Disk."))
  30. (set #BB3end (cat "Update complete. Please look the readme file before start."))
  31. (set #msgpchfailed "WARNING !!!\n\nThis Patch was not applied succesfully because one error occurred.\n\nYou may be sure to apply this patch on the 1.3a (68000) REGISTERED version only of BancaBase, with any other relase this patch can't be applied.\nIf you have an 1.3a REGISTERED version of BancaBase and this patch don't work, then contact the author.")
  32.  
  33. (welcome #installtext)
  34.  
  35. (procedure set_dir
  36.    (set #bb3-dest
  37.       (askdir
  38.          (prompt #BB3dest-prompt)
  39.          (help #BB3dest-help)
  40.          (default #bb3-dest)
  41.          (newpath)
  42.       )
  43.    )
  44. )
  45.  
  46. (set_dir)
  47. (set #dest-path #bb3-dest)
  48. (set @default-dest #dest-path)
  49.  
  50.  
  51. (if (= 0 (exists #dest-path (noreq)))
  52.    (
  53.       (set #file-exist (cat "Sorry but the directory " #dest-path " does not exist.\n\nPlease, select the directory containing version 1.3a of BancaBase.\n"))
  54.       (message #file-exist)
  55.       (set_dir)
  56.       (set #dest-path #bb3-dest)
  57.       (set @default-dest #dest-path)
  58.    )
  59. )
  60.  
  61. (complete 10)
  62.  
  63. (set #dst-path #dest-path)
  64. (set #dst (tackon #dest-path #prg))
  65.  
  66. (if (exists #dst)
  67.     (
  68.     (set size (getsize #dst))
  69.     (if (= size #BB3size)
  70.        (message ("\n\nFound %s (%ld bytes)\n\nThis patch is applicable." #dst size))
  71.        )
  72.     )
  73. )
  74.  
  75.  
  76. (if (not(= size #BB3size))
  77.     (abort #msgpchfailed)
  78.     )
  79.  
  80.  
  81. ;(working #omp (cat "\n\nScompatto il file di patch ...\n" #dest-path))
  82.  
  83. ;(run ("lha -x x "#bbprogname" "#dest-path))
  84.  
  85. (complete 50)
  86.  
  87. (working #omp "\n\n\nNow executing program update ...\nplease wait ...")
  88.  
  89. (set #pchcommand (cat "spatch -o" (tackon #dest-path #prg060) " -p" #bbpatchname " " (tackon #dest-path #prg)))
  90.  
  91. (set a (run #pchcommand))
  92.  
  93. (if (not(= a 0))
  94.     (abort #msgpchfailed)
  95.     )
  96.  
  97. (complete 90)
  98.  
  99. (rename (tackon #dest-path #prgicon) (tackon #dest-path #prg060icon))
  100. (delete (tackon #dest-path #prg))
  101.  
  102. (complete 100)
  103.  
  104. ; The last message
  105. (set end_text (cat "\nCongratulations !!!\n\n"
  106.               "You've just powered your version of BancaBase with a new one optimized for 68060 processors, this mean that operations will be faster and better!!!\n"
  107.               "I hope that you'll enjoy BancaBase!\n"
  108.               "Don't hesitate to send me comments, bugreports and suggestions.\n\n"
  109.               "Registrations are also WELCOME !!!! :))"))
  110.  
  111. ; the end
  112. (set @default-dest #dest-path)
  113.     (exit end_text)
  114. ;EOF
  115.  
  116.