| Zap directory boot file
| (c) D.H.Symes and others 1991-1999

| Set up directory paths and load sprites
Set Zap$Dir <Obey$Dir>
Set ZapCode$Path <Zap$Dir>.Code.
Set ZapModules$Path <Zap$Dir>.Modules.
Set ZapTemplates$Path ZapUser:Templates.,<Zap$Dir>.Templates.
Iconsprites <Zap$Dir>.!Sprites

| Load ObeySupport
RMEnsure ObeySupport 0.02 RMLoad ZapCode:ObeySpt

| Boot ZapFonts and ZapUser if they're stored inside us and haven't already been booted
RMEnsure UtilityModule 3.50 If "<Alias$IfThere>"="" Then Set Alias$IfThere ZapCode:IfThere %%*0

If "<ZapFontsSource$Path>" = "" Then IfThere BootResources:!ZapFonts Then Obey BootResources:!ZapFonts.!Boot
If "<ZapFontsSource$Path>" = "" Then IfThere <Zap$Dir>.!ZapFonts Then Obey <Zap$Dir>.!ZapFonts.!Boot
Set Alias$ZapBootUser IfThere Choices:!ZapUser Then Obey Choices:!ZapUser.!Boot
IF "<Choices$Write>" = "" Then Set Alias$ZapBootUser ""
If "<ZapUser$Path>" = "" Then ZapBootUser
Unset Alias$ZapBootUser
If "<ZapUser$Path>" = "" Then IfThere <Zap$Dir>.!ZapUser Then Obey <Zap$Dir>.!ZapUser.!Boot

| Boot extension modules as appropriate
Obey ZapCode:SetZapGen
WimpSlot -min 32K
Run ZapCode:Config.ConfigScan -boot
If "<Zap$Temp>" = "1" Then WimpSlot -min 128K -max 128K
If "<Zap$Temp>" = "1" Then Run ZapCode:Config.CreateConf -script ZapCode:Config.BootScript
Obey ZapGenerated:!ZapBoot
