; Icaros Desktop specific PATHs
PATH extras:C sys:system/a2ps ADD
PATH Extras:Misc/aminet Extras:Misc/aminet/C ADD
PATH extras:FileSystem/PoorARC extras:Development/Languages/nasm ADD
PATH extras:Development/Tools/AutoDocReader extras:Development/Languages/fpc/bin ADD
PATH extras:Development/Languages/Lua extras:Development/Languages/SDL_basic ADD
PATH extras:Development/Languages/lolcode extras:Development/Languages/PForth ADD
PATH Extras:MultiMedia/mplayer extras:Development/Languages/xamos ADD

; Icaros Desktop applications ASSIGNs (not handled by packages)
ASSIGN System: Sys:
ASSIGN TBImages: extras:icons/TBImages
ASSIGN MUIbase: Extras:Applications/MUIbase
ASSIGN antiword: Extras:Applications/Antiword
ASSIGN GCC: Development:
ASSIGN bin: Development:bin ADD
ASSIGN usr: Development: ADD
ASSIGN home: sys:system/a2ps
ASSIGN C: Extras:C ADD
ASSIGN timidity: extras:MultiMedia/timidity

; Icaros Desktop aliases
ALIAS mkdir "MakeDir"
ALIAS exit "EndCli"
ALIAS mp "mplayer -vo cgx_wpa -ao ahi_dev"
ALIAS playmidi "wildmidi -c timidity:timidity.cfg -m 120 -r 44100"

if exists sys:dvdmode
  execute s:dvd-startup
endif

; tasks that must or can be performed after installation ONLY
IF not exists sys:dvdmode

; add buffers to speedup disk operations
  if exists sys:s/buffer-add
    execute sys:s/buffer-add
  endif

; virtual device stuff
 if exists sys:DiskImages
  delete sys:DiskImages/Unit0 ALL FORCE >NIL:
  else
  makedir sys:DiskImages
 endif

ENDIF
; end of tasks performed on HDD/pendrive only


IF ${Icaros/1sttime} EQ "True"
 execute S:1sttime-setup
EndIF

IF ${Icaros/2ndtime} EQ "True"
 execute S:2ndtime-setup
 echo "false" >envarc:Icaros/2ndtime
EndIf

; launching Opaque
IF ${Icaros/opaque} EQ "True"
run >NIL: sys:Tools/Commodities/Opaque
EndIf

; prompt back to ram drive
cd ram:

IF ${AROSTCP/Autorun} EQ "True"
  IF ${Icaros/sharing} eq "True"
   execute s:yafs-startup
  EndIf
   
  if ${Icaros/liveupmode} eq "auto"
   cd sys:tools/LUPD
   execute lupd-startup
  endif
EndIf

; run FKey
IF ${Icaros/fkey} EQ "True"
 run sys:tools/commodities/FKey >NIL:
EndIf

; launch print spooler
; run >NIL: execute s:spooler-startup

; startup sound (but check for ahi.prefs first...)
IF exists envarc:sys/ahi.prefs
 IF exists envarc:icaros/startup_sound
 run >NIL: C:madahi ${icaros/startup_sound}
 EndIf
EndIF
 
; run amistart
IF ${Icaros/amistart} EQ "True"
 execute s:amistart-startup
EndIf

cd SYS:
