Changeset 2013 for trunk/gsinstaller
- Timestamp:
- 2001-02-20T00:11:32+13:00 (23 years ago)
- Location:
- trunk/gsinstaller
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsinstaller/gsManifest.cpp
r1764 r2013 305 305 if (actionName == "Manifest.CreateDir" || actionName == "CreateDir") 306 306 { 307 RemoveDirectory(params[0].c_str()); 307 if (!RemoveDirectory(params[0].c_str())) 308 { 309 MessageBox(0, "Remove failed", params[0].c_str(), MB_OK); 310 this->removeFailed.add(params[0]); 311 } 308 312 return true; 309 313 } … … 314 318 } 315 319 return false; 320 } 321 322 bool gsManifest::undoFailed(string path) 323 { 324 return this->removeFailed.includes(path); 316 325 } 317 326 -
trunk/gsinstaller/gsManifest.h
r1545 r2013 26 26 strArrayMap manifests; 27 27 pathStringArrayMap selected; 28 stringArray removeFailed; 28 29 29 30 bool getManifestLine(char *line, string ¯o); … … 36 37 void logAction(string actionName, string source, string dest); 37 38 bool undoAction(string actionName, stringArray ¶ms); 39 bool undoFailed(string path); 38 40 void expandGroupInstance(const string &parentgroup, string groupName); 39 41 void expandGroup(const string &group); -
trunk/gsinstaller/gsinstall.cpp
r1765 r2013 72 72 FilePath *collectionPath(); 73 73 FilePath *installPath(); 74 FilePath *installSourcePath() { return this->sourcePath; } 74 75 bool copyFiles(); 75 76 bool updateRegistry(); … … 78 79 bool updateSetupExe(); 79 80 bool installNetscape(); 81 bool removeFailed(string file) { return this->manifest->undoFailed(file); } 80 82 void setDestination(); 81 83 bool setUninstall(); … … 387 389 FilePath exeDest(tempPath, "gssetup.exe"); 388 390 FilePath logDest(tempPath, "install.log"); 389 391 390 392 CopyFile(exePath.cString(), exeDest.cString(), false); 391 393 CopyFile(logPath.cString(), logDest.cString(), false); … … 436 438 } 437 439 } 440 438 441 } 439 442 … … 510 513 511 514 512 if (this->platform.isWindows32s() == false) // NB: don't add this shortcut under 515 FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe"); 516 FilePath logPath(this->destinationPath->pathString(), "install.log"); 517 if (this->platform.isWindows32s() == false) // NB: don't add this shortcut under 513 518 // Windows32s as it causes a crash 514 519 // … … 516 521 // happy code 517 522 { 518 FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe");519 FilePath logPath(this->destinationPath->pathString(), "install.log");520 523 if (!this->progman->addIcon(groupName, "Uninstall", uninstallPath.pathString(), " -u " + logPath.pathString(), 521 524 "Remove this Greenstone collection")) 522 525 { 523 526 } 527 } 528 else 529 { MessageBox(0, uninstallPath.cString(), logPath.cString(), MB_OK); 524 530 } 525 531 // disconnect from program manager … … 749 755 750 756 case dirpath_OPTION: 751 ((dirSelector *) GetWindowLong(Dialog, GWL_USERDATA))->setOption(IsDlgButtonChecked(Dialog, dirpath_OPTION) );757 ((dirSelector *) GetWindowLong(Dialog, GWL_USERDATA))->setOption(IsDlgButtonChecked(Dialog, dirpath_OPTION) == BST_CHECKED); 752 758 if (HIWORD(wParam) == BN_CLICKED && false) 753 759 // don't do the enable/disable these days … … 958 964 string logPathString(at); 959 965 FilePath logPath(logPathString); 960 966 961 967 GSInstall install(true); 962 968 // if we're running in the temporary directory, do the uninstall … … 980 986 FilePath *logParent = logPath.parent(); 981 987 FilePath uninstallPath(*logParent, "gssetup.exe"); 982 988 983 989 // delete the gssetup executable 984 990 DeleteFile(uninstallPath.cString()); 985 991 992 MessageBox(0, logParent->cString(), "Removing", MB_OK); 993 if (install.removeFailed(logParent->pathString())) 994 { 995 RemoveDirectory(logParent->cString()); 996 } 997 986 998 // dispose of the parent directory information 987 999 delete logParent; 988 1000 } 1001 989 1002 // if not, then overwrite the original log with the modified one 990 1003 else … … 1011 1024 install.copyFiles(); // caused page fault; Windows 3.1 1012 1025 install.updateProgman(); // caused divide overflow; Windows 3.1 1013 1026 install.updateRegistry(); 1014 1027 install.updateProfiles(); 1015 1028 install.updateSetupExe(); // caused bomb-out of Windows; 3.1 -
trunk/gsinstaller/unInstall.cpp
r1673 r2013 245 245 if (!this->logfile.rdbuf()->is_open()) 246 246 #endif 247 { MessageBox(0, "Unable to open log file", "Test", MB_OK);247 { MessageBox(0, "Unable to open log file", this->logfileName.c_str(), MB_OK); 248 248 } 249 249
Note:
See TracChangeset
for help on using the changeset viewer.