Changeset 2532


Ignore:
Timestamp:
2001-06-13T10:56:14+12:00 (23 years ago)
Author:
cs025
Message:

Added better reporting of installation.

Location:
trunk/gsinstaller
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsinstaller/unInstall.cpp

    r2288 r2532  
    2525
    2626    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;
    2832
    2933    if (this->modules["default"].begin()->command != "InstallRoot")
     
    6670    }
    6771
    68     // open the log file 
     72    // open the log file
    6973    this->logfile.open(this->logfileName.c_str(), ios::in);
    7074#ifndef __BORLANDC__
     
    7680        // Get the commands into this object from the existing log file
    7781        while ((command = this->readCommand(params)) != "")
    78         {   if (command[0] == '[' && command[command.length()-1] == ']')
     82        {  if (command[0] == '[' && command[command.length()-1] == ']')
    7983            { this->setModule(command.substr(1, command.length() - 2));
    8084            }
    8185            else
    8286            {   unInstallCommand action(command, params);
     87
    8388                this->storeCommand(action);
    8489            }
     
    104109
    105110bool installManager::storeCommand(unInstallCommand &command)
    106 { this->modules[this->currentModule].push_back(command);
     111{
     112    this->modules[this->currentModule].push_back(command);
     113
    107114    this->changed = true; // set the "changed" flag
    108115    return true;
     
    238245  return command;
    239246}
    240 
     247void installManager::abortLog()
     248{   this->changed = false;
     249}
    241250bool installManager::recordLog()
    242251{   // just return if there are no changes to record
  • trunk/gsinstaller/unInstall.h

    r2288 r2532  
    7676  bool readLog();
    7777  bool recordLog();
     78  void abortLog();
    7879  void setModule(string moduleName);
    7980  bool storeCommand(unInstallCommand &command);
Note: See TracChangeset for help on using the changeset viewer.