;
; CIM's Installer Script.
; $VER: update.iscript 1.0.01 (28.07.2001) Written by Jan-Erik Tervo 1998-2001
; Installer version 42.12 or better recommended
;

(ONERROR
      (EXIT)
        )

(SET @default-dest "CIM:bin/")

(IF  (exists "CIM:" (noreq))
     (
     
     (SET cim_vernum (getversion "CIM:bin/cim"))
     (SET cim_ver (/ cim_vernum 65536))
     (SET cim_rev (- cim_vernum (* cim_ver 65536)))

     (SET e_cim_vernum (getversion "stuff/bin/cim.exe"))
     (SET e_cim_ver (/ e_cim_vernum 65536))
     (SET e_cim_rev (- e_cim_vernum (* e_cim_ver 65536)))
     
     
     
     
     
     
     
     (IF  (exists "CIM:DOCS/MANUAL/mversio" (noreq))
     
     (
     (SET cimm_vernum (getversion "CIM:DOCS/MANUAL/mversio"))
     (SET cimm_ver (/ cimm_vernum 65536))
     (SET cimm_rev (- cimm_vernum (* cimm_ver 65536)))
     
     )
     
     (
     
     (SET cimm_vernum (getversion "CIM:DOCS/MANUAL/mversion.html"))
     (SET cimm_ver (/ cimm_vernum 65536))
     (SET cimm_rev (- cimm_vernum (* cimm_ver 65536)))
     
     
     ))

     (SET ncimm_vernum (getversion "stuff2/manual/mversion.html"))
     (SET ncimm_ver (/ ncimm_vernum 65536))
     (SET ncimm_rev (- ncimm_vernum (* ncimm_ver 65536)))

     
     


     ; ENGLISH STRINGS

     (SET #alku_str
          (cat "\nThis script will only update the executable at CIM:bin/\n\nYou have currently CIM version " cim_ver "." cim_rev "\n\nYou are about to install version " e_cim_ver "." e_cim_rev)
          )

     (SET #str-installing-exe
          (cat "\n\nInstalling...")

     )

     
     
     (SET #str-alreadyi
          (cat "\n\nYou have CIM HTML Manual version: " cimm_ver '.' cimm_rev "\n\Version to be installed: " ncimm_ver '.' ncimm_rev )
     )

    

     (MESSAGE #alku_str)
     
     (MESSAGE #str-alreadyi)

     (COMPLETE 0)

     (SET CIMdirBin "CIM:bin/")
     (SET CIMdir "CIM:")
     (SET @default-dest CIMdir)

    
    
    
     (COMPLETE 50)
     
     (DELETE "CIM:bin/cim")
     (DELETE "CIM:bin/cim.asc")
     
     
     (COPYFILES
        (source "stuff/bin/")
        (pattern "#?")
        (dest CIMdirBin)
        (prompt #str-installing-exe)
        )

     (COMPLETE 75)
     
     (RENAME "CIM:bin/cim.exe" "CIM:bin/cim")


     (PROTECT "CIM:bin/#?" "rwed")

     
     
     
     
     
     
     
     (SET @default-dest "CIM:DOCS")

     (SET CIMmdir "CIM:DOCS")
     
     (COPYFILES
        (help "No help for this function")
        (source "stuff2/")
        (pattern "#?")
        (dest CIMmdir)
        (prompt #str-installingm)
        )
        
        
     
     
     
     


     )
     (MESSAGE "CIM is not installed correctly! (No CIM: assign.) Can't update.")
)
(COMPLETE 100)

; end of installation

(EXIT)

