;$VER: Cinema4D 3.0 (18.12.96)
;Cinema4D  Installation script - Richard
;*catch any errors and pass dos errors to a message screen
;*if a dos problem occured

(MAKEASSIGN "CD-ROM" "CINEMA4D_CD-Edition:")

(SET DEFAULT-USER @user-level)
;*set version - true if greater than version 37
(SET WBVer (< 2424832 (getversion "exec.library" (resident))))

(user 2)

(set processor
(database "cpu")
)

(SET C4D_DEST
(askdir
(prompt "Select the location for the Cinema4D Drawer 10Mb disk space required.")
(help @askdir-help)
(default @default-dest))
)

(SET C4D_DEST (EXPANDPATH C4D_DEST))

(IF (OR (= (substr C4D_DEST (- (strlen C4D_DEST) 1) ) ":")
      (= (substr C4D_DEST (- (strlen C4D_DEST) 1) ) "/"))
(set C4D_DEST ("%sCinema4D" C4D_DEST))
(set C4D_DEST ("%s/Cinema4D" C4D_DEST))
)


(IF (<> (exists C4D_DEST) 2)
(MAKEDIR C4D_DEST (infos))
)

(MAKEASSIGN "C4DDEST" C4D_DEST)

(IF (= (Run "CD-ROM:C/CPU check 68881") 0)
;881
	(SET CPUTYPE 1)
	(SET CPUTYPE 0)
)

(set APP_VER
	(Askchoice
	(Help @askchoice-help)
	(Prompt "Select the version to install?\n\nIf you are not sure select proceed!")
	(Choices "20/030/040 Without an FPU" "FPU Version & Phase 5 060 boards" "Other 060 boards (Apollo, Draco)")
	(Default CPUTYPE))
)

(set VIDEO_LIB
	(Askchoice
	(Help @askchoice-help)
	(Prompt "If you have a video card, select,\nfrom the list,the library to install.")
	(Choices "No Video Card (Unexpanded Amiga)" "EGS" "Merlin" "Picasso" "Retina")
	(Default 0))
)

(copyfiles
(source "CD-ROM:libs/c4dpic.library")
(dest "libs:")
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMA/")
(dest "ENVARC:CINEMA")
(PATTERN "#?")
(optional "force")
)


(copyfiles 
(source "CD-ROM:CINEMA4D/")
(dest C4D_DEST)
(ALL)
(optional "force")
)


(if (= APP_VER 0)
(
(copyfiles 
(source "CD-ROM:ProgramFiles/NOFPU/")
(dest C4D_DEST)
(pattern "#?")
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAFont/CinemaFont020")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAWorld/CinemaWorld")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)

)
)

(if (= APP_VER 1)
(
(copyfiles 
(source "CD-ROM:ProgramFiles/FPU/")
(dest C4D_DEST)
(pattern "#?")
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAFont/CinemaFont.881")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAWorld/CinemaWorld.881")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)


)
)

(if (= APP_VER 2)
(
(copyfiles 
(source "CD-ROM:ProgramFiles/FPU2/")
(dest C4D_DEST)
(pattern "#?")
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAFont/CinemaFont.881")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)

(copyfiles 
(source "CD-ROM:CINEMAWorld/CinemaWorld.881")
(dest ("%s/Extensions/" C4D_DEST))
(optional "force")
)

)
)


(IF (= VIDEO_LIB 1)
(copyfiles
(source "CD-ROM:libs/EGS/c4d.library")
(dest "libs:")
(optional "force")
)
)
(IF (= VIDEO_LIB 2)
(

(copyfiles
(source "CD-ROM:libs/Merlin/c4d.library")
(dest "libs:")
(optional "force")
)

(copyfiles
(source "CD-ROM:libs/Merlin/cinemaausgabe.library")
(dest "libs:")
(optional "force")
)

)
)

(IF (= VIDEO_LIB 3)
(copyfiles
(source "CD-ROM:libs/Picasso/c4d.library")
(dest "libs:")
(optional "force")
)
)
(IF (= VIDEO_LIB 4)
(copyfiles
(source "CD-ROM:libs/Retina/c4d.library")
(dest "libs:")
(optional "force")
)
)

(startup "Cinema4D CD-Edition"
(Prompt "Place Cinema4D assigns in the user-startup?")
(help @startup-help)
(Command
("Assign C4D: %s\n" C4D_DEST)
"Assign TEX: C4D:Textures\n"
"Assign CINEMA4D_CD-Edition: exists >NIL:\n"
)
)

(USER 2)
(Message "Cinema4D Installation complete."
"\nTo obtain your 30 days free technical support and notification of"
" Cinema4D updates, please complete your registration card and return"
" it to:-\n\n"
;* text starts at * and ends at *                   *
"            North America          Rest of world    \n"
"           Oregon Research            HiSoft        \n"
"     16200 S.W. Pacific Highway   The Old School    \n"
"             Suite 162              Greenfield      \n"
"               Tigard               Bedford, UK     \n"
"              OR 97224               MK45 5DE       \n"
"Phone:    +1 503 620 4919         +44 525 718181    \n"
" FAX:     +1 503 624 2940         +44 525 713716    \n")

(Message "Please remember, UK technical support is\n between 2-3p.m."
" Mon-Fri\nIf you need technical support, please remember to have when you"
" phone, your:-\nSerial Number\nSoftware version number\nMachine"
" configuration (RAM,Processor,Hard disk etc.)\n\n Please also have a"
" clear and concise description of the problem you are having to ensure"
" that we can deal with your problem as quickly as possible.\n\n"
" Select Proceed to quit to Workbench")


(Exit (quiet))

