Changeset 1657


Ignore:
Timestamp:
2000-11-07T15:12:08+13:00 (23 years ago)
Author:
sjboddie
Message:

Fixed a couple of bugs that surfaced on windows 2000

Location:
trunk/gsinstaller
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsinstaller/gsProgman.cpp

    r1580 r1657  
    233233                   string iconName, // name of the icon
    234234                   string iconDestination, // destination file of the icon
     235                   string arguments, // any arguments to go along with iconDestination
    235236                   string description) // the textual description
    236   // of the icon (not usually displayed)
     237                                                   // of the icon (not usually displayed)
    237238{   
    238239  bool reply = false;
     
    288289      // description.
    289290      psl->SetPath(iconDestination.c_str());
    290 
     291      psl->SetArguments(arguments.c_str());
    291292      psl->SetDescription(description.c_str());
    292293     
  • trunk/gsinstaller/gsProgman.h

    r1475 r1657  
    99class gsProgramManager : public installAgent
    1010{
    11     private:
    12     gsPlatform *platform;
    13     DWORD               instance;
    14     bool                connected;
     11private:
     12  gsPlatform *platform;
     13  DWORD instance;
     14  bool connected;
     15 
     16  void logAction(string actionName, string group);
     17  void logAction(string actionName, string group, string item, string parameter);
     18protected:
     19public:
     20  // constructor
     21  gsProgramManager(installManager &manager);
    1522
    16     void logAction(string actionName, string group);
    17     void logAction(string actionName, string group, string item, string parameter);
    18   protected:
    19   public:
    20     // constructor
    21     gsProgramManager(installManager &manager);
     23  // connect/disconnect activity
     24  bool connect();
     25  bool disconnect();
    2226
    23     // connect/disconnect activity
    24     bool connect();
    25     bool disconnect();
     27  bool addProgramGroup(string name);
     28  bool removeProgramGroup(string name);
     29  bool addIcon(string groupName, string iconName, string iconDestination,
     30           string arguments, string description);
     31  bool removeIcon(string groupName, string iconName);
    2632
    27     bool addProgramGroup(string name);
    28     bool removeProgramGroup(string name);
    29     bool addIcon(   string groupName, string iconName, string iconDestination,
    30                                 string description);
    31     bool removeIcon(    string groupName, string iconName);
    32 
    33     bool undoAction(string actionName, stringArray &params);
     33  bool undoAction(string actionName, stringArray &params);
    3434};
    3535#endif
  • trunk/gsinstaller/gsinstall.cpp

    r1639 r1657  
    274274    {
    275275      //      FilePath *serverPath = new FilePath(this->destinationPath->pathString(), "server.exe");
    276       FilePath *serverPath = new FilePath(this->destinationPath->pathString(), "library.exe");
     276      FilePath *serverPath = new FilePath(this->destinationPath->pathString(), "server.exe");
    277277      FilePath *setupPath = new FilePath(this->destinationPath->pathString(), "gssetup.exe");
    278278      FilePath *logPath = new FilePath(this->destinationPath->pathString(), "install.log");
     
    291291    {
    292292      // get special app path key for windows 9x
    293       exeKeyPath = this->gsRegister->exeKeyId("library.exe");
     293      exeKeyPath = this->gsRegister->exeKeyId("server.exe");
    294294
    295295      // ensure that the exe key exists
     
    350350    }
    351351
     352
    352353  // set the log for writing
     354
    353355  FilePath *logPath = new FilePath(this->destinationPath->pathString(), "install.log");
     356
    354357  this->setLogFile(logPath->pathString());
     358
    355359  this->readLog();
     360
    356361  delete logPath;
     362
    357363}
    358364
     
    395401  // will in fact be the temporary directory as outlined above)
    396402  FilePath *logPath = new FilePath(this->sourcePath->pathString(), "install.log");
     403
    397404  this->setLogFile(logPath->pathString());
    398405  this->readLog();
     
    456463{
    457464  string groupName;
     465  string collectionName;
    458466
    459467  // if we managed to get a connection to the program manager (or explorer
     
    469477      return false;
    470478    }
     479      collectionName = this->configFile->getString("CollectionName");
     480      if (collectionName == "")
     481    {
     482      // TODO: error handling
     483      this->progman->disconnect();
     484      return false;
     485    }
    471486
    472487      // add the group
     
    478493
    479494      // add a "server" icon
    480       FilePath libraryPath(this->destinationPath->pathString(), "library.exe");
    481       if (!this->progman->addIcon(groupName, "Library", libraryPath.pathString(), ""))
     495      FilePath libraryPath(this->destinationPath->pathString(), "server.exe");
     496      if (!this->progman->addIcon(groupName, collectionName, libraryPath.pathString(), "", ""))
    482497    {
    483       // assume that it may be there already
    484     }
    485 
    486       // check for server existence
    487       //      FilePath serverPath(this->destinationPath->pathString(), "server.exe");
    488       //      if (serverPath.exists())
    489       //    {
    490       //      if (!this->progman->addIcon(groupName, "Server", serverPath.pathString(), ""))
    491       //        {
    492           // assume that it may be there already
    493       //        }
    494       //    }
     498    }
    495499
    496500      FilePath readMePath(this->destinationPath->pathString(), "readme.txt");
    497       if (!this->progman->addIcon(groupName, "ReadMe", readMePath.pathString(), ""))
     501      if (!this->progman->addIcon(groupName, "ReadMe", readMePath.pathString(), "", ""))
    498502    {
    499503    }
    500504
    501       FilePath supportPath(this->destinationPath->pathString(), "support.html");
    502       if (!this->progman->addIcon(groupName, "Technical Support", supportPath.pathString(), ""))
     505      FilePath supportPath(this->destinationPath->pathString(), "Support.htm");
     506      if (!this->progman->addIcon(groupName, "Technical Support", supportPath.pathString(), "", ""))
    503507    {
    504508    }
     
    507511      FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe");
    508512      FilePath logPath(this->destinationPath->pathString(), "install.log");
    509       if (!this->progman->addIcon(groupName, "Uninstall", uninstallPath.pathString() + " -u " + logPath.pathString(), ""))
     513      if (!this->progman->addIcon(groupName, "Uninstall", uninstallPath.pathString(), " -u " + logPath.pathString(),
     514                  "Remove this Greenstone collection"))
    510515      {
    511516      }
     
    641646             "Greenstone Installer", false) < 0)
    642647    {
    643       MessageBox(0, "Error", app_name, MB_OK);
     648      //      MessageBox(0, "Error", app_name, MB_OK);
    644649      return false;
    645650    }
  • trunk/gsinstaller/install.cfg

    r1475 r1657  
    1 CompanyName:Demo
     1CompanyName:New Zealand Digital Library
    22CollectionName:Demo Collection
    33CollectionDirName:demo
    44CollectionVersion:1.0
    55CollectionVolume:1
    6 ProgramGroupName:Demo Collection
     6ProgramGroupName:Greenstone
  • trunk/gsinstaller/manifest.cfg

    r1475 r1657  
    33
    44library:
    5   gsdl.ini library.exe Net32 Net16 readme.txt
     5  gsdl.ini server.exe Net32 Net16 readme.txt Support.htm docs
    66
    77database:
     
    99
    1010collection:
    11   collect
     11  collect etc images macros unicode
Note: See TracChangeset for help on using the changeset viewer.