Changeset 2013 for trunk/gsinstaller/gsinstall.cpp
- Timestamp:
- 2001-02-20T00:11:32+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.