; CompressDisk installation program
; By Raffaele Dell'Aversana (12-Oct-92)
FailAt 21

Echo "*nCompressDisk.device installation script"
Echo "Version 37.36 (Release 1.9B) Registered*n"

Version >NIL: exec.library 37
If WARN
	Echo "You don't have AmigaDOS Release 2 (V37) or higher in ROM."
	Echo "Sorry, you cannot use CompressDisk.device."
	Quit
EndIf

Echo "This script will install CompressDisk for you."
Echo "You may select if and where to install the files.*n"

Set conv 0

If EXISTS DEVS:CompressDisk.device
	Echo "Version of CompressDisk.device already installed:"
	Version DEVS:CompressDisk.device 37 33
	If WARN
	    set conv 1
	EndIf
	Echo ""
EndIf

Ask "Install CompressDisk.device 37.36 ?*nThe file will be placed in DEVS:"

If WARN
	Copy CompressDisk.device DEVS:
	Echo "CompressDisk.device copied to your DEVS: directory"
EndIf

If EXISTS  SYS:Prefs/CDPrefs
	Echo "*nVersion of CDPrefs already installed:"
	Version SYS:Prefs/CDPrefs
	Echo ""
EndIf

Ask "Install CDPrefs 37.13?"

If WARN
	Copy CDPrefs SYS:Prefs

	If NOT EXISTS SYS:Prefs/CDPrefs.info
		Copy CDPrefs.info SYS:Prefs
	EndIf

	Echo "*nCDPrefs + icon copied to SYS:Prefs"
EndIf

If $conv GT 0
    Convert
EndIf

Echo "*nInstallation complete.*n"

If $conv GT 0
    Echo "*nWarning - track reorganization has been performed."
    Echo "Reset your Amiga as soon as possible"
    Echo "Do not access virtual partitions until next system reboot"
EndIf

