@@ -11,9 +11,11 @@ use Graphical_shell::Shell_executable_type;
11
11
#[ test]
12
12
fn main ( ) {
13
13
use Drivers :: Native :: Window_screen ;
14
- use File_system :: Permissions_type ;
14
+ use File_system :: { Flags_type , Open_type , Permissions_type } ;
15
15
use Graphics :: { Get_minimal_buffer_size , Input_type_type , Point_type } ;
16
+ use Terminal :: Terminal_executable_type ;
16
17
use Users :: Group_identifier_type ;
18
+ use Virtual_file_system :: File_type ;
17
19
18
20
// - Initialize the task manager.
19
21
let Task_instance = Task :: Initialize ( ) . unwrap ( ) ;
@@ -55,27 +57,35 @@ fn main() {
55
57
56
58
let Task = Task_instance . Get_current_task_identifier ( ) . unwrap ( ) ;
57
59
58
- Virtual_file_system :: Get_instance ( )
59
- . Mount_static_device ( Task , & "/Shell" , Create_device ! ( Shell_executable_type ) )
60
+ Virtual_file_system :: Create_default_hierarchy ( Virtual_file_system :: Get_instance ( ) , Task )
60
61
. unwrap ( ) ;
62
+
61
63
Virtual_file_system :: Get_instance ( )
62
- . Set_permissions ( "/Shell" , Permissions_type :: All_full )
64
+ . Mount_static_device (
65
+ Task ,
66
+ & "/Binaries/Graphical_shell" ,
67
+ Create_device ! ( Shell_executable_type ) ,
68
+ )
63
69
. unwrap ( ) ;
64
70
65
71
Virtual_file_system :: Get_instance ( )
66
- . Create_directory ( & "/Devices" , Task )
72
+ . Mount_static_device (
73
+ Task ,
74
+ & "/Binaries/Command_line_shell" ,
75
+ Create_device ! ( Shell_executable_type ) ,
76
+ )
67
77
. unwrap ( ) ;
68
78
69
79
Virtual_file_system :: Get_instance ( )
70
- . Create_directory ( & "/Xila ", Task )
80
+ . Set_permissions ( "/Binaries/Command_line_shell ", Permissions_type :: Executable )
71
81
. unwrap ( ) ;
72
82
73
83
Virtual_file_system :: Get_instance ( )
74
- . Create_directory ( & "/Xila/Users " , Task )
84
+ . Create_directory ( & "/Configuration/Graphical_shell " , Task )
75
85
. unwrap ( ) ;
76
86
77
87
Virtual_file_system :: Get_instance ( )
78
- . Create_directory ( & "/Xila/Groups " , Task )
88
+ . Create_directory ( & "/Configuration/Graphical_shell/Shortcuts " , Task )
79
89
. unwrap ( ) ;
80
90
81
91
Drivers :: Native :: Console :: Mount_devices ( Task , Virtual_file_system :: Get_instance ( ) ) . unwrap ( ) ;
@@ -88,6 +98,36 @@ fn main() {
88
98
)
89
99
. unwrap ( ) ;
90
100
101
+ Virtual_file_system :: Get_instance ( )
102
+ . Mount_static_device (
103
+ Task ,
104
+ & "/Devices/Null" ,
105
+ Create_device ! ( Drivers :: Common :: Null_device_type ) ,
106
+ )
107
+ . unwrap ( ) ;
108
+
109
+ Virtual_file_system :: Get_instance ( )
110
+ . Mount_static_device (
111
+ Task ,
112
+ & "/Binaries/Terminal" ,
113
+ Create_device ! ( Terminal_executable_type ) ,
114
+ )
115
+ . unwrap ( ) ;
116
+
117
+ Virtual_file_system :: Get_instance ( )
118
+ . Set_permissions ( "/Binaries/Terminal" , Permissions_type :: Executable )
119
+ . unwrap ( ) ;
120
+
121
+ // Write terminal shortcut.
122
+ File_type :: Open (
123
+ Virtual_file_system :: Get_instance ( ) ,
124
+ "/Configuration/Graphical_shell/Shortcuts/Terminal" ,
125
+ Flags_type :: New ( Mode_type :: Write_only , Some ( Open_type :: Create ) , None ) ,
126
+ )
127
+ . unwrap ( )
128
+ . Write ( Terminal :: Shortcut . as_bytes ( ) )
129
+ . unwrap ( ) ;
130
+
91
131
let Group_identifier = Group_identifier_type :: New ( 1000 ) ;
92
132
93
133
Authentication :: Create_group (
@@ -138,7 +178,7 @@ fn main() {
138
178
. Set_environment_variable ( Task , "Host" , "xila" )
139
179
. unwrap ( ) ;
140
180
141
- let Result = Executable :: Execute ( "/Shell " , "" . to_string ( ) , Standard )
181
+ let Result = Executable :: Execute ( "/Binaries/Graphical_shell " , "" . to_string ( ) , Standard )
142
182
. unwrap ( )
143
183
. Join ( )
144
184
. unwrap ( ) ;
0 commit comments