Changeset 315
- Timestamp:
- May 3, 2009, 5:07:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Installer/trunk/source/subs.cpp
r314 r315 46 46 { 47 47 // SetConsoleTitle("AE Installer"); windows junk, convert to SDL 48 // system("color 0A"); 49 48 #ifdef WIN32 49 system("color 0A"); 50 #endif 50 51 cout << "\nWelcome to the AE installer!\n"; 51 52 cout << "\nWhat would you like to do?\n"; … … 59 60 bool exit = false; 60 61 int err = 0; 61 62 62 do 63 63 { 64 cout << "\n1. Globalize data\n"; 65 cout << "2. Install new packages\n"; 66 cout << "3. Uninstall packages\n"; 67 cout << "4. See what is installed\n"; 68 cout << "5. About AE\n"; 69 cout << "6. Quit\n\n"; 70 71 choice = cin.get(); 72 cin.ignore(128, '\n'); 73 switch(choice) 74 { 64 if( exists( "../GameDataFolder" ) ) { 65 cout << "\n1. Install new packages\n"; 66 cout << "2. Uninstall packages\n"; 67 cout << "3. See what is installed\n"; 68 cout << "4. Globalize data\n"; 69 cout << "5. About AE\n"; 70 cout << "6. Quit\n\n"; 71 72 choice = cin.get(); 73 cin.ignore(128, '\n'); 74 switch(choice) 75 { 76 case '1': 77 err = installPackages(); 78 break; 79 case '2': 80 err = uninstallPackages(); 81 break; 82 case '3': 83 err = listInstalledPackages(); 84 break; 85 case '4': 86 err = globalizeData(); 87 break; 88 case '5': 89 err = printInstallerInfo(); 90 break; 91 case '6': 92 exit = true; 93 break; 94 default: 95 cout << "Please choose one of the above numbers, and press Enter.\n\n"; 96 } 97 if (err) // if something fatal happened 98 exit = true; 99 } 100 else { 101 cout << "\n1. Globalize data\n"; 102 cout << "2. About AE\n"; 103 cout << "3. Quit\n\n"; 104 105 choice = cin.get(); 106 cin.ignore(128, '\n'); 107 switch(choice) 108 { 75 109 case '1': 76 110 err = globalizeData(); 77 111 break; 78 112 case '2': 79 err = installPackages();113 err = printInstallerInfo(); 80 114 break; 81 115 case '3': 82 err = uninstallPackages();83 break;84 case '4':85 err = listInstalledPackages();86 break;87 case '5':88 err = printInstallerInfo();89 break;90 case '6':91 116 exit = true; 92 117 break; 93 118 default: 94 119 cout << "Please choose one of the above numbers, and press Enter.\n\n"; 95 } 96 if (err) // if something fatal happened 97 exit = true; 120 } 121 if (err) // if something fatal happened 122 exit = true; 123 } 98 124 } while(!exit); 99 100 125 126 return err; 101 127 } 102 128 … … 305 331 system(strClsCmd); 306 332 cout << (*package_iter).name << "\n"; 307 for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << char(196); //does extended ASCII work in UNIX?333 for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << '-'; 308 334 cout << "\n" 309 335 << (*package_iter).readme << "\n\n"
Note:
See TracChangeset
for help on using the changeset viewer.