Changeset 2288 for trunk/gsinstaller
- Timestamp:
- 2001-04-06T03:17:03+12:00 (23 years ago)
- Location:
- trunk/gsinstaller
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsinstaller/gsProfile.cpp
r1541 r2288 1 1 #include "gsProfile.h" 2 #include "FilePath.h" 2 3 3 4 #include <stdio.h> … … 5 6 gsProfile::gsProfile(installManager &manager, string fileName) 6 7 : installAgent(manager) 7 { this->fileName = fileName; 8 { FilePath path(fileName); 9 10 this->fileName = fileName; 11 if (path.exists() == false) 12 { this->logAction("ProfileCreate", "", "", ""); 13 } 8 14 } 9 15 … … 19 25 20 26 bool gsProfile::undoAction(string actionName, stringArray ¶ms) 21 { if (actionName == "ProfileAddListMember") 22 { this->removeListMember(params[0], params[1], params[2]); 27 { if (actionName == "ProfileCreate") 28 { if (this->fileName == params[0]) 29 { DeleteFile(params[0].c_str()); 30 } 31 } 32 else if (actionName == "ProfileAddListMember") 33 { this->removeListMember(params[0], params[1], params[2]); 34 return true; 35 } 36 else if (actionName == "ProfileSetItem") 37 { this->removeString(params[1], params[2]); 23 38 return true; 24 39 } … … 90 105 return false; 91 106 } 107 this->logAction("ProfileSetItem", sectionName, itemName, itemValue); 92 108 return true; 93 109 } 110 111 bool gsProfile::removeString(string sectionName, string itemName) 112 { if (!WritePrivateProfileString( sectionName.c_str(), itemName.c_str(), 113 NULL, this->fileName.c_str())) 114 { MessageBox(0, "Failed", itemName.c_str(), MB_OK); 115 return false; 116 } 117 return true; 118 } -
trunk/gsinstaller/gsProfile.h
r1539 r2288 30 30 bool addListMember(string sectionName, string listName, string listMember); 31 31 bool writeString(string sectionName, string itemName, string itemValue); 32 bool removeString(string sectionName, string itemName); 32 33 bool undoAction(string actionName, stringArray ¶ms); 33 34 }; -
trunk/gsinstaller/gsinstall.cpp
r2073 r2288 425 425 this->manifest = new gsManifest(*this); // get a manifest manager 426 426 427 iniPath = new FilePath(this-> collectPath->pathString(), "gsdlsite.cfg");427 iniPath = new FilePath(this->installRoot(), "gsdlsite.cfg"); 428 428 gsProfile gsdlProfile(*this, iniPath->pathString()); 429 429 -
trunk/gsinstaller/unInstall.cpp
r2013 r2288 24 24 { HANDLE fHandle; 25 25 26 unInstallCommand command("InstallRoot"); 27 command.addParameter(this->logfileName); 28 29 if (this->modules["default"].begin()->command != "InstallRoot") 30 { this->modules["default"].insert(this->modules["default"].begin(), command); 31 } 26 32 fHandle = CreateFile(this->logfileName.c_str(), GENERIC_READ | GENERIC_WRITE, 27 33 FILE_SHARE_WRITE, NULL, CREATE_NEW, … … 33 39 } 34 40 return false; 41 } 42 else 43 { if (this->modules["default"].begin()->command == "InstallRoot") 44 { this->logfileName = this->modules["default"].begin()->parameters[0]; 45 } 35 46 } 36 47 return true; … … 288 299 } 289 300 301 string installManager::installRoot() 302 { if (this->modules["default"].begin()->command != "InstallRoot") 303 return ""; 304 return this->modules["default"].begin()->parameters[0]; 305 } 306 290 307 installManager::~installManager() 291 308 { this->recordLog(); -
trunk/gsinstaller/unInstall.h
r1673 r2288 80 80 string popCommand(stringArray ¶ms); 81 81 bool isEmpty(); 82 string installRoot(); 82 83 ~installManager(); 83 84 };
Note:
See TracChangeset
for help on using the changeset viewer.