Changeset 2557 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/22/03 21:14:14 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/rootlogon.C
r2491 r2557 42 42 } 43 43 44 voidload(TString &dir)44 bool load(TString &dir) 45 45 { 46 46 if (isloaded()) 47 47 return; 48 48 49 cout << " Loading 'libmars.so'..." << flush;49 cout << "\033[33m\033[1m" << "Loading '" << dir << "libmars.so'... " << "\033[31m" << flush; 50 50 51 if (gSystem->Load(dir.IsNull() ? "libmars.so" : dir+"libmars.so")!=0) 52 cout << "error." << endl; 51 if (dir.IsNull()) 52 dir = "./"; 53 54 if (gSystem->Load(dir+"libmars.so")!=0) 55 { 56 cout << "\033[33m\033[1m" << "error." << endl; 57 cout << "\033[0m" << endl; 58 return false; 59 } 53 60 else 54 61 { 55 62 MParContainer::Class()->IgnoreTObjectStreamer(); 56 63 MArray::Class()->IgnoreTObjectStreamer(); 57 cout << "done." << endl; 64 cout << "\033[33m\033[1m" << "done." << endl; 65 cout << "\033[0m" << endl; 66 return true; 58 67 } 59 60 cout << endl;61 68 } 62 69 /* … … 79 86 80 87 TString dir = gSystem->Getenv("MARSSYS"); 81 82 88 if (!dir.IsNull()) 83 89 { 84 cout << " Mars found in " << dir << " (MARSSYS)" << endl << endl;90 cout << "\033[34m\033[1m" << "Searching Mars in " << dir << " (MARSSYS)" << "\033[0m" << endl << endl; 85 91 86 92 if (!dir.EndsWith("/")) … … 88 94 } 89 95 90 load(dir); 96 if (!load(dir)) 97 return; 91 98 92 99 gInterpreter->AddIncludePath(dir+"macros"); … … 119 126 } 120 127 121 cout << "Welcome to the Mars Root environment." << endl; 122 128 cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl; 123 129 cout << endl; 124 130 }
Note:
See TracChangeset
for help on using the changeset viewer.