.Key LANGID
.bra {
.ket }

If NOT EXISTS RAM:KaraCDBusy
  Echo > RAM:KaraCDBusy ";"
Else
  Echo "*N Configuration: The CD-ROM configuration task is already running.*N"
  Wait 10 SECS
  Skip END
EndIf

Failat 21

Version >NIL: icon.library 34
If WARN
  Echo "*N Warning: The Kara Collection requires at least Workbench 1.3.*N"
  Skip END
EndIf

If EXISTS RAM:T/KaraCD-IPT/UndoAssign
  RAM:T/KaraCD-IPT/Print >RAM:KaraCDRestoreAssign "Failat 21"
  RAM:T/KaraCD-IPT/Print >>RAM:KaraCDRestoreAssign -n "Assign >NIL: KARACDROOT: "
  RAM:T/KaraCD-IPT/ShowPath >>RAM:KaraCDRestoreAssign KARACDROOT:
  Assign >NIL: KARACDLOCAL: EXISTS
  If NOT WARN
    RAM:T/KaraCD-IPT/Print >>RAM:KaraCDRestoreAssign -n "Assign >NIL: KARACDLOCAL: "
    RAM:T/KaraCD-IPT/ShowPath >>RAM:KaraCDRestoreAssign KARACDLOCAL:
  EndIf
  Execute KARACDROOT:Utilities/H/2/Reset-CD SHARED
  If EXISTS RAM:KaraCDRestoreAssign
    Execute RAM:KaraCDRestoreAssign
    Delete >NIL: RAM:KaraCDRestoreAssign QUIET
  Else
    Assign >NIL: KARACDROOT: KaraCD:
    Assign >NIL: KARACDLOCAL: KARACDROOT:Utilities/H/7/{LANGID}
  EndIf
EndIf

If NOT EXISTS RAM:T
  MakeDir RAM:T
EndIf

Assign > NIL: T: EXISTS
If WARN
  Assign >NIL: T: RAM:T
EndIf

If NOT EXISTS RAM:T/KaraCD-IPT
  MakeDir RAM:T/KaraCD-IPT
EndIf

CD RAM:T/KaraCD-IPT

If EXISTS C:Copy
  Copy >NIL: C:Copy RAM:T/KaraCD-IPT CLONE
EndIf
If EXISTS C:Assign
  Copy >NIL: C:Assign RAM:T/KaraCD-IPT CLONE
EndIf
If EXISTS C:Execute
  Copy >NIL: C:Execute RAM:T/KaraCD-IPT CLONE
EndIf

Copy KARACDROOT:Utilities/H/2/Print RAM:T/KaraCD-IPT CLONE
Protect RAM:T/KaraCD-IPT/Print wd ADD
Copy KARACDROOT:Utilities/H/2/ShowPath RAM:T/KaraCD-IPT CLONE
Protect RAM:T/KaraCD-IPT/ShowPath wd ADD
Copy KARACDROOT:Utilities/H/2/AddLine RAM:T/KaraCD-IPT CLONE
Protect RAM:T/KaraCD-IPT/AddLine wd ADD
Copy KARACDROOT:Utilities/H/2/MakeAssign RAM:T/KaraCD-IPT CLONE
Protect RAM:T/KaraCD-IPT/MakeAssign wd ADD
Copy KARACDROOT:Utilities/H/2/CheckVideo RAM:T/KaraCD-IPT CLONE
Protect RAM:T/KaraCD-IPT/CheckVideo wd ADD

Print >RAM:T/KaraCD-IPT/InstallAssign -n "Execute KARACDROOT:Utilities/H/2/Assign-CD "
Print >>RAM:T/KaraCD-IPT/InstallAssign "{LANGID}"

Assign >NIL: KARACD:
Assign >NIL: KARACD: EXISTS
If WARN
  Execute MakeAssign KARACD: KARACDROOT:
EndIf

Assign >NIL: KARACDLOCAL: KARACDROOT:Utilities/H/7/{LANGID}

Which >NIL: MultiView
If WARN
  If EXISTS SYS:Utilities/MultiView
    Copy >NIL: SYS:Utilities/MultiView RAM: CLONE
  Else
    If EXISTS RAM:MultiView
      Copy >NIL: RAM:MultiView RAM:MultiView.old CLONE
    EndIf
    If EXISTS SYS:Utilities/AmigaGuide
      Copy >NIL: SYS:Utilities/AmigaGuide RAM:MultiView CLONE
    Else
      Copy >NIL: KARACDROOT:Utilities/H/2/AG34 RAM:MultiView CLONE
      Protect RAM:MultiView wd ADD
    EndIf
  EndIf
EndIf

Which >NIL: MultiView
If WARN
  Path >NIL: RAM: ADD
EndIf

Assign > NIL: ENV: EXISTS
If WARN
  If NOT EXISTS RAM:ENV
    MakeDir RAM:ENV
  EndIf
  Assign >NIL: ENV: RAM:ENV
EndIf

SetEnv KaraCDLanguage {LANGID}

If NOT EXISTS ENV:PPaint
  MakeDir ENV:PPaint
Else
  If EXISTS ENV:PPaint/Startup_A.set
    Copy >NIL: ENV:PPaint/Startup_A.set ENV:PPaint/Startup_A.set.old CLONE
  EndIf
EndIf
Print > ENV:PPaint/Startup_A.set "PPAINT SETTINGS*N"
Print >>ENV:PPaint/Startup_A.set "LANG = {LANGID}"
If EXISTS RAM:T/KaraCD-IPT/UndoAssign
  Print >>RAM:T/KaraCD-IPT/UndoAssign "Delete >NIL: ENV:PPaint/Startup_A.set QUIET*NIf EXISTS ENV:PPaint/Startup_A.set.old*N  Rename ENV:PPaint/Startup_A.set.old ENV:PPaint/Startup_A.set*NEndIf"
Else
  Print >RAM:T/KaraCD-IPT/UndoAssign "Delete >NIL: ENV:PPaint/Startup_A.set QUIET*NIf EXISTS ENV:PPaint/Startup_A.set.old*N  Rename ENV:PPaint/Startup_A.set.old ENV:PPaint/Startup_A.set*NEndIf"
EndIf

If EXISTS KARACDROOT:PPaint
  Assign >NIL: PPAINT: EXISTS
  If WARN
    Execute MakeAssign PPAINT: KARACDROOT:PPaint
  Else
    Assign >NIL: PCDPPAINT: EXISTS
    If WARN
      Execute MakeAssign PCDPPAINT: PPAINT:
    EndIf
    If NOT EXISTS PPAINT:AnimBrushes
      Execute MakeAssign PPAINT: KARACDROOT:PPaint
    EndIf
  EndIf
EndIf

If NOT EXISTS ENV:ColorType
  MakeDir ENV:ColorType
Else
  If EXISTS ENV:ColorType/Startup_A.set
    Copy >NIL: ENV:ColorType/Startup_A.set ENV:ColorType/Startup_A.set.old CLONE
  EndIf
EndIf
Print > ENV:ColorType/Startup_A.set "COLORTYPE SETTINGS*N"
Print >>ENV:ColorType/Startup_A.set "LANG = {LANGID}"
Print >>RAM:T/KaraCD-IPT/UndoAssign "Delete >NIL: ENV:ColorType/Startup_A.set QUIET*NIf EXISTS ENV:ColorType/Startup_A.set.old*N  Rename ENV:ColorType/Startup_A.set.old ENV:ColorType/Startup_A.set*NEndIf"

If EXISTS KARACDROOT:ColorType
  Execute MakeAssign COLORTYPE: KARACDROOT:ColorType
EndIf

If EXISTS KARACDROOT:PFM
  If {LANGID} EQ 1
    Execute MakeAssign PFM: KARACDROOT:PFM/DEU
  Else
    Execute MakeAssign PFM: KARACDROOT:PFM/ENG
  EndIf
EndIf

If EXISTS KARACDROOT:ColorFonts/Fonts
  Version >NIL: icon.library 37
  If NOT WARN
    Assign FONTS: KARACDROOT:ColorFonts/Fonts ADD

    Print >RAM:T/KaraCD-IPT/TempLine -n "Assign >NIL: FONTS: "
    ShowPath >>RAM:T/KaraCD-IPT/TempLine -n KARACDROOT:ColorFonts/Fonts
    Print >>RAM:T/KaraCD-IPT/TempLine " REMOVE"

    Execute AddLine
  EndIf
EndIf

Print >RAM:T/KaraCD-IPT/TempLine "Failat 21"
Execute AddLine

Delete >NIL: RAM:KaraCDBusy QUIET

Lab END


; Cloanto ® CD-ROM Configuration Scripts
; Copyright © 1995, 1996 Cloanto Italia srl - All Rights Reserved
; Cloanto is a registered trademark of Cloanto Italia srl
