Changeset 2532
- Timestamp:
- 2001-06-13T10:56:14+12:00 (23 years ago)
- Location:
- trunk/gsinstaller
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsinstaller/unInstall.cpp
r2288 r2532 25 25 26 26 unInstallCommand command("InstallRoot"); 27 command.addParameter(this->logfileName); 27 // Get the parent directory of the log file, and store it as the root 28 FilePath p(this->logfileName); 29 FilePath *parent = p.parent(); 30 command.addParameter(parent->pathString()); 31 delete parent; 28 32 29 33 if (this->modules["default"].begin()->command != "InstallRoot") … … 66 70 } 67 71 68 // open the log file 72 // open the log file 69 73 this->logfile.open(this->logfileName.c_str(), ios::in); 70 74 #ifndef __BORLANDC__ … … 76 80 // Get the commands into this object from the existing log file 77 81 while ((command = this->readCommand(params)) != "") 78 { 82 { if (command[0] == '[' && command[command.length()-1] == ']') 79 83 { this->setModule(command.substr(1, command.length() - 2)); 80 84 } 81 85 else 82 86 { unInstallCommand action(command, params); 87 83 88 this->storeCommand(action); 84 89 } … … 104 109 105 110 bool installManager::storeCommand(unInstallCommand &command) 106 { this->modules[this->currentModule].push_back(command); 111 { 112 this->modules[this->currentModule].push_back(command); 113 107 114 this->changed = true; // set the "changed" flag 108 115 return true; … … 238 245 return command; 239 246 } 240 247 void installManager::abortLog() 248 { this->changed = false; 249 } 241 250 bool installManager::recordLog() 242 251 { // just return if there are no changes to record -
trunk/gsinstaller/unInstall.h
r2288 r2532 76 76 bool readLog(); 77 77 bool recordLog(); 78 void abortLog(); 78 79 void setModule(string moduleName); 79 80 bool storeCommand(unInstallCommand &command);
Note:
See TracChangeset
for help on using the changeset viewer.