.key DUMMY
.bra {
.ket }

; $VER: +AFCD_Setup+ 2.2 (20.11.97)
; by Oliver Roberts
; edited by Errol 9.2.98
; further edited by Ben Vost 02.03.98
; even more editing by Errol 03.03.98
;;
; Amiga Format CD Setup Script

;***********
; CD number
;
Set cdnum 26

;*************************
; Useful global variables
;
Set reqtitle "*"Amiga Format CD$cdnum*""

;******
; Init
;
FailAt 21
Resident >NIL: :C/RequestChoice FORCE

;*************************
; Check if booted from CD
;
If exists env:Choices_Run
   RequestChoice >NIL: $reqtitle "You don't need to run this script if you have*nbooted from the CD" OK
   Skip END
EndIf

;***************************************************************************
; Check to see if this script has already been run and remove assigns if so
;
If exists ENV:AFCD_Assigns
   Set choice `RequestChoice $reqtitle "Removing the assigns to Amiga Format CD$cdnum" OK Cancel`
   If $choice EQ 1
      Delete >NIL: ENV:AFCD_Assigns
      Assign C:       CD:C remove
      Assign S:       CD:S remove
      Assign Libs:    CD:Libs remove
      Assign Fonts:   CD:Fonts remove
      Path CD:C remove
      Assign CD: AFCD$cdnum: remove
   EndIf
   Skip END
Endif

;*************************
; Setup assigns and paths
;

; Echo "Now setting up assigns for the Amiga Format CD$cdnum..."

SetENV AFCD_Assigns Yes!
Assign CD: AFCD$cdnum: add

CD:c/AFCDView CD:s/disclaimer.iff >nil:

Assign C:       CD:C add
Assign S:       CD:S add
Assign Libs:    CD:Libs add
Assign Fonts:   CD:Fonts add
Path CD:C add

; Check AFCDPrefs settings and startup chosen programs
Resident >NIL: CD:C/CheckAFCDPrefs PURE

CheckAFCDPrefs
If ERROR
   Set choice `RequestChoice $reqtitle "Would you like to run the AFCD preferences program?*n*nThis will allow you to preset your choices for this*nscript and your preferred file viewers." Yes No`
   If $choice EQ 1
      CD:+System+/Prefs/AFCDPrefs
   EndIf
EndIf

Set choice `RequestChoice $reqtitle "Would you like our font prefs run?*n*nThis will ensure that snapshotted icons look right*nand won't affect your permanent Workbench settings." Yes No`
If $choice EQ 1
   sys:prefs/Font use CD:+System+/Prefs/FontPrefs
EndIf

Resident >NIL: CheckAFCDPrefs REMOVE

EndIf

;******
; Exit
;
lab END

Resident >NIL: RequestChoice REMOVE
