From 6994f34953fac9462e899d0b2c7af64e21c92a1e Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Fri, 25 Dec 2009 10:17:25 +0100 Subject: More work --- Source/Applications/PaperWork/FloppyWelcome.txt | 3 +++ Source/Applications/PaperWork/PaperWork.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Source/Applications/PaperWork/FloppyWelcome.txt (limited to 'Source/Applications/PaperWork') diff --git a/Source/Applications/PaperWork/FloppyWelcome.txt b/Source/Applications/PaperWork/FloppyWelcome.txt new file mode 100644 index 0000000..6676719 --- /dev/null +++ b/Source/Applications/PaperWork/FloppyWelcome.txt @@ -0,0 +1,3 @@ +Welcome to this Melon floppy ! +As loading binaries from the floppy doesn't work very well, the shell has been placed on the initrd : you have to run /Sandbox/Shell.app instead of /Applications/Shell/Shell.app + diff --git a/Source/Applications/PaperWork/PaperWork.cpp b/Source/Applications/PaperWork/PaperWork.cpp index 15497e4..89cb00b 100644 --- a/Source/Applications/PaperWork/PaperWork.cpp +++ b/Source/Applications/PaperWork/PaperWork.cpp @@ -1,4 +1,6 @@ #include +#include +#include #define DEFAULT_SHELL "/Applications/Shell/Shell.app" #define PAPERWORK_PATH "/System/Applications/PaperWork.app" @@ -33,7 +35,13 @@ int PaperWork::run() { } } } else if (act == "login") { - outvt << "Logging in to Melon\n"; + FSNode welcome = FS::find("/System/Configuration/Welcome"); + if (welcome.valid() && welcome.type() == NT_FILE) { + TextFile f("/System/Configuration/Welcome"); + while (!f.eof()) outvt << f.readLine() << ENDL; + } else { + outvt << "Logging in to Melon\n"; + } String user, pw; while (1) { outvt << "Username: " << FLUSH; @@ -55,6 +63,7 @@ int PaperWork::run() { p.wait(); outvt << "\n\n"; } else { + outvt << "Could not run application : " << sh << ENDL; return 1; } return 0; -- cgit v1.2.3