From 1e49a124f7789b682b6e4c97d0c3e01160943f0e Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Tue, 28 Sep 2021 11:03:20 +0900 Subject: [PATCH] tutorial: Add a page about the live CD --- apps/file-browser.c | 8 ++++++-- apps/tutorial.c | 34 +++++++++++++++++++++++---------- base/usr/share/icons/48/cd.png | Bin 0 -> 3253 bytes 3 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 base/usr/share/icons/48/cd.png diff --git a/apps/file-browser.c b/apps/file-browser.c index 267169f8..8cc2d288 100644 --- a/apps/file-browser.c +++ b/apps/file-browser.c @@ -599,8 +599,12 @@ static void load_directory(const char * path, int modifies_history) { f->selected = 0; if (S_ISDIR(statbuf.st_mode)) { - /* Directory */ - sprintf(f->icon, "folder"); + /* Is this /cdrom? */ + if (!strcmp(tmp,"//cdrom")) { + sprintf(f->icon, "cd"); + } else { + sprintf(f->icon, "folder"); + } sprintf(f->filetype, "Directory"); f->type = 1; } else { diff --git a/apps/tutorial.c b/apps/tutorial.c index 261f3475..d09cf004 100644 --- a/apps/tutorial.c +++ b/apps/tutorial.c @@ -41,6 +41,7 @@ static sprite_t folder; static sprite_t package; static sprite_t logo; static sprite_t mouse_drag; +static sprite_t cdicon; static struct TT_Font * _tt_font_thin = NULL; static struct TT_Font * _tt_font_bold = NULL; @@ -179,7 +180,7 @@ static void load_page(int page) { body_text[i++] = "were written by the ToaruOS development team over the course of"; body_text[i++] = "many years, but that development team is very small. Some features"; body_text[i++] = "may be missing, incomplete, or unstable. Contributions in the form"; - body_text[i++] = "of bug-fixes and new software are welcome. You can join our community"; + body_text[i++] = "of bug reports and new ports are welcome. You can join our community"; body_text[i++] = "through IRC by joining the #toaruos channel on Libera.chat."; body_text[i++] = ""; body_text[i++] = "You can help support ToaruOS by donating:"; @@ -187,6 +188,17 @@ static void load_page(int page) { body_text[i++] = NULL; break; case 2: + icon = &cdicon; + body_text[i++] = "This is a \"live CD\". You can make changes to the file system, including"; + body_text[i++] = "installing applications, but those changes will not persist between reboots."; + body_text[i++] = ""; + body_text[i++] = "If you need to enter a password, such as for the \"sudo\" utility or when"; + body_text[i++] = "using the package manager, the default user account is \"local\" with the"; + body_text[i++] = "password \"local\". There is also a \"guest\" account available with limited"; + body_text[i++] = "privileges (password \"guest\"), and a \"root\" account (password \"toor\")."; + body_text[i++] = NULL; + break; + case 3: icon = &folder; circle(70, 90, 60); body_text[i++] = "You can explore the file system using the File Browser."; @@ -195,7 +207,7 @@ static void load_page(int page) { body_text[i++] = "the Applications menu in the upper left."; body_text[i++] = NULL; break; - case 3: + case 4: icon = &terminal; circle(70, 170, 60); body_text[i++] = "ToaruOS aims to provide a Unix-like environment. You can find"; @@ -205,29 +217,30 @@ static void load_page(int page) { body_text[i++] = "and a featureful text editor (bim)."; body_text[i++] = NULL; break; - case 4: + case 5: icon = &package; circle(70, 250, 60); body_text[i++] = "Many third-party software packages have been ported to ToaruOS"; body_text[i++] = "and are available from our package repositories. You can use the"; body_text[i++] = "Package Manager to install GCC, Python, Bochs, Quake, and more."; body_text[i++] = ""; - body_text[i++] = "The Package Manager will prompt you to authenticate. The default"; - body_text[i++] = "user is 'local' with the password 'local'. There is also a 'root'"; - body_text[i++] = "user with the password 'toor'."; + body_text[i++] = "(Beta users: Not all packages may be available yet. I'm still working"; + body_text[i++] = "on rebuilding the Python port with a newer release, and haven't gotten"; + body_text[i++] = "around to rebuilding the Bochs package yet.)"; body_text[i++] = NULL; break; - case 5: + case 6: icon = &mouse_drag; body_text[i++] = "With ToaruOS's window manager, you can drag most windows by"; body_text[i++] = "holding Alt, or by using the title bar. You can also resize"; body_text[i++] = "windows by dragging from their edges or using Alt + Middle Click."; body_text[i++] = ""; - body_text[i++] = "If you are running ToaruOS in VirtualBox, be sure to select a Host"; - body_text[i++] = "key configuration that does not conflict with these key bindings."; + body_text[i++] = "Note that if you are running ToaruOS in a virtual machine, your"; + body_text[i++] = "host operating system configuration may conflict with modifier"; + body_text[i++] = "keys in ToaruOS."; body_text[i++] = NULL; break; - case 6: + case 7: icon = NULL; _next_button.title = "Exit"; body_text[i++] = "#That's it!"; @@ -348,6 +361,7 @@ int main(int argc, char * argv[]) { load_sprite(&folder, "/usr/share/icons/48/folder.png"); load_sprite(&package, "/usr/share/icons/48/package.png"); load_sprite(&mouse_drag, "/usr/share/cursor/drag.png"); + load_sprite(&cdicon, "/usr/share/icons/48/cd.png"); load_page(0); diff --git a/base/usr/share/icons/48/cd.png b/base/usr/share/icons/48/cd.png new file mode 100644 index 0000000000000000000000000000000000000000..4e1e0d6d547618180c308538c2479a139fa11bcc GIT binary patch literal 3253 zcmV;m3`+BfP)%YONU2g}i9sTy zD~S>pPU08|>>@}JXy-Plw*g|i-ZZTi*~SH&MSv8}A}*S`b?Svk4UwWyeh^8f6p^eI zksAJJIHE`n=ZBp4cTX4Z&2Tsp|3uZR9N^&HdH22ZzVDuM?mhPo@Mrn697yPS82RLr zPXfBGe+9sK0H*--1Lyz{0l)yt0I~o+18|#}$86jF&C4&pY##L62O^M8rw5t&4QBq9 zBE(!I7|h0-n`Oi>jDTSnY9OG42#({JrfC)ng~G<#+8Py$#lup{B!GV-qW6b}hHieY z1V%3DY$5v$M0S%gf7W0gMYF zesJN!h4KGa0@tr!53R4SUjgv#&O^;Nj^ULC2SSLq&YwSDdF}*8M@NqV_}5TK&!6Z^L^V>vZ~(Xf96+#ODTF`zss~=vb|p|1 z$8kz`?%b)ErWun`zBW8Od~YxBiM>3OPN%;N;MW};O%G3>>Pl$35(WWK;0*x*QpyA6 zld7tbGiT1Ub#!#h2_b%c?b@|3?d82)38d5MFEjJUM|#_CAMR;MvGCs#K6rr|5di?q z&&~osPft%Ol}gC@<;a1DHofM`%Ogprg7BGKO7emIdx z+z>*1I5svG+&6)8x%^LBP+M#1Zb@wc55V!SweV4~8Ag(;y$6<5DwPTbg9X=h|8ZXg zMn*H18b)i(B3wTb;yDukCo(ux`>vTGOdd~!i=ts?o);|ye zQDOxwl^TJnx&T}PSOC!Ac|irF;}E+pfhECl4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