20 #define __STDCPP_WANT_MATH_SPEC_FUNCS__ 0 29 int main(
int argc,
char *argv[])
31 setlocale(LC_ALL,
"");
32 bindtextdomain(
"tour",
"/system/locale");
33 bind_textdomain_codeset(
"tour",
"UTF-8");
40 init_dialog(stdin, stdout);
41 dialog_vars.colors = TRUE;
42 dialog_vars.ok_label = gettext(
"OK");
43 dialog_vars.nocancel = 1;
46 gettext(
"Welcome to Pedigree!"),
48 "This tour is designed to help you understand how Pedigree " 49 "differs from other UNIX-like systems. It's interactive, so you " 50 "can practice along the way."),
56 gettext(
"Pedigree Tour"),
57 gettext(
"Let's run the `ls' command for you:"),
"ls root»/", 20, 52, 1);
62 gettext(
"Pedigree Tour"),
63 gettext(
"As you can see, the typical /bin, /lib, /var (and so on) are " 64 "not present. Instead, you find /applications, /libraries, " 65 "/system, /config, and so on. This is designed to be intuitive " 66 "but it can cause problems with some software."),
72 gettext(
"Pedigree Tour"),
73 gettext(
"After the tour completes, you can navigate around the " 74 "filesystem to to get a closer look at what each directory " 81 gettext(
"Pedigree Tour"),
82 gettext(
"Another significant difference in Pedigree is the path " 83 "structure. In Pedigree, paths follow the format " 84 "[mount]»/path/to/file."),
90 gettext(
"Pedigree Tour"),
92 "We've switched directory to root»/ if you were elsewhere. " 93 "The root mount always exists; Pedigree will not start without it." 94 " Your applications and configuration exist under root»/."),
100 gettext(
"Pedigree Tour"),
102 "Paths that begin with a '/' will always operate in your " 103 "current mount. Because the current working directory is root»/, " 104 "we can simply run `/applications/ls' to run " 105 "`root»/applications/ls'."),
114 gettext(
"Pedigree Tour"),
116 "Before we dig into what other mounts may exist, it's " 117 "important to know how to type these paths. You can type the " 118 "'»' character in Pedigree by using 'RIGHTALT-.' - try it " 119 "now. If you want to finish the tour, just type 'quit'."),
122 if (!strcmp(dialog_vars.input_result,
"quit"))
127 else if (!strcmp(dialog_vars.input_result,
"»"))
136 gettext(
"Pedigree Tour"),
138 "Now that you know how to type the paths, here are a " 139 "selection of standard Pedigree mounts." 141 "* dev» provides device access (ala /dev).\n" 142 "* raw» provides access to raw disks and partitions.\n" 143 "* scratch» is an entirely in-memory filesystem.\n" 144 "* runtime» is an in-memory filesystem for runfiles (like /run).\n" 145 " Files here can only be modified by their owning process.\n" 146 "* unix» provides a location for named UNIX sockets."),
152 gettext(
"Pedigree Tour"),
154 "Note that there is a significant caveat with respect to the " 155 "$PATH variable with this scheme. If your $PATH does not contain " 156 "absolute paths, you may find that switching working directory to " 158 "different mount point can cause you to be unable to run any " 165 gettext(
"Pedigree Tour"),
166 gettext(
"This image has been configured such that the default PATH " 167 "does this correctly. There may still be weirdness, and if you " 169 "things are not quite working correctly, you can always run " 170 "`cd root»/` to return to the root mount."),
176 gettext(
"Pedigree Tour"),
178 "If something goes wrong, you may find yourself in the " 179 "Pedigree kernel debugger. This can also be accessed on-demand by " 180 "pressing F12 at any time."),
186 gettext(
"Pedigree Tour"),
187 gettext(
"In the debugger, you can read the kernel log, view " 188 "backtraces, and do various other inspections to identify what " 190 "wrong or inspect kernel state."),
196 gettext(
"Pedigree Tour"),
197 gettext(
"You can use the `help` command to see what is available in " 198 "the debugger. If you run into an issue that triggers the " 200 "please try and add a serial port log if you report it to us. " 207 gettext(
"Pedigree Tour"),
208 gettext(
"The tour is now complete, and you are now better-equipped to " 210 "Join us in #pedigree on Freenode IRC, and raise any issues " 212 "at https://pedigree-project.org.\n\n" 213 "Thank you for trying out Pedigree!"),