ZealOS/src/StartOS.ZC

44 lines
1.1 KiB
HolyC
Raw Normal View History

2021-07-02 00:53:42 +01:00
//This is executed by the System task at boot.
//See $LK,"System Start-up",A="FF:::/Kernel/KMain.ZC,\"StartOS"$.
2020-02-15 20:01:48 +00:00
#help_index "Compiler/Directive"
public extern I8i Option(I64i num, I8i val);
Option(0,0); //(0,0)=EchoOff (0,1)=EchoOn
2020-02-15 20:01:48 +00:00
#include "/Kernel/KernelA.HH"
#include "/Compiler/CompilerA.HH"
#include "/Kernel/KernelB.HH"
#include "/Kernel/KernelC.HH"
#include "/Compiler/CompilerB.HH"
Option(OPTf_WARN_PAREN, ON);
Option(OPTf_WARN_DUP_TYPES, ON);
2021-07-02 00:53:42 +01:00
HashTablePurge(sys_task->hash_table);
2020-02-15 20:01:48 +00:00
2021-07-02 00:53:42 +01:00
#include "/System/MakeSystem"
2020-02-15 20:01:48 +00:00
2020-02-15 22:25:33 +00:00
//Debug("Type 'G;'");
2020-02-15 20:01:48 +00:00
DocTermNew;
WinVert(2, text.rows / 8);
2020-02-15 20:01:48 +00:00
sys_winmgr_task = Spawn(&WinMgrTask, NULL, "Window Manager");
Fs->win_inhibit = WIG_TASK_DEFAULT - WIF_SELF_BORDER - WIF_SELF_GRAB_SCROLL - WIF_SELF_CTRLS;
LBts(&Fs->display_flags, DISPLAYf_CHILDREN_NOT_ON_TOP);
LBts(&Fs->display_flags, DISPLAYf_SHOW);
2020-02-15 20:01:48 +00:00
RegInit;
LBts(&sys_run_level, RLf_REGISTRY);
2020-02-15 20:01:48 +00:00
WallPaperInit;
2020-02-15 22:53:02 +00:00
if (DriveIsWritable)
DirMake("/Tmp"); //Good to have a Tmp
2020-02-15 20:01:48 +00:00
Option(OPTf_WARN_PAREN, OFF);
Option(OPTf_WARN_DUP_TYPES, OFF);
LBts(&sys_run_level, RLf_HOME);
2020-02-15 20:01:48 +00:00
#help_index ""
#include "~/MakeHome"
2021-07-02 00:53:42 +01:00
//After this file, the System task enters $LK,"server mode",A="HI:Job"$.