summaryrefslogtreecommitdiff
path: root/Source/Applications/PaperWork
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-25 10:17:25 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-25 10:17:25 +0100
commit6994f34953fac9462e899d0b2c7af64e21c92a1e (patch)
treed4b1d10a4af6f630d168791d56fef6993ed2cb22 /Source/Applications/PaperWork
parentc4cb32b8534610a92931d825efefd6892e8412af (diff)
downloadMelon-6994f34953fac9462e899d0b2c7af64e21c92a1e.tar.gz
Melon-6994f34953fac9462e899d0b2c7af64e21c92a1e.zip
More work
Diffstat (limited to 'Source/Applications/PaperWork')
-rw-r--r--Source/Applications/PaperWork/FloppyWelcome.txt3
-rw-r--r--Source/Applications/PaperWork/PaperWork.cpp11
2 files changed, 13 insertions, 1 deletions
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 <App/ShellApp.proto.h>
+#include <Binding/FSNode.class.h>
+#include <TextFile.class.h>
#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;