; $VER: XTR Stuff installer V1.25 by Barry Beukhof
;
; LZX has just been released as GIFTWARE !
; So I've decided to include a LZX option
; for even faster instalation.

assign >nil: xt: ""

setenv arch `requestchoice "Question ?" "Which Archiver *nDo you want to use*nto unarchive Files ?" "Lha" "Lzx"`

setenv dir `requestfile Drawer "Games:" Title "Select your XTR directory" noicons drawersonly`

cd $dir


if $arch eq 0
skip LZX
endif



;The LHA VERSION

if exists xt:backgrounds
cd backgrounds/
lha >nil: x xt:backgrounds.lha
endif

if exists xt:layouts.lha
cd /layouts/
lha >nil: x xt:layouts.lha 
endif

if exists xt:tracks.lha
cd /tracks/
lha >nil: x xt:tracks.lha  
endif

if exists xt:worlds.lha
cd /worlds/
lha >nil: x xt:worlds.lha  
endif

if exists xt:objects.lha
cd /objects/
lha >nil: x xt:objects.lha 
endif

skip QUIT



; THE LZX VERSION

lab LZX

if exists xt:layouts.lha
cd layouts/
lzx >nil: x xt:layouts.lha
endif

if exists xt:backgrounds.lha
cd /backgrounds/
lzx >nil: x xt:backgrounds.lha

if exists xt:tracks.lha
cd /tracks/
lzx >nil: x xt:tracks.lha
endif

if exists xt:worlds.lha
cd /worlds/
lzx >nil: x xt:worlds.lha  
endif

if exists xt:objects.lha
cd /objects/
lzx >nil: x xt:objects.lha 
endif



; THE END

lab QUIT

requestchoice >nil: "Barry Says" "Tracks have *nbeen installed" "Continue"

endcli