Changeset 1657
- Timestamp:
- 2000-11-07T15:12:08+13:00 (23 years ago)
- Location:
- trunk/gsinstaller
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsinstaller/gsProgman.cpp
r1580 r1657 233 233 string iconName, // name of the icon 234 234 string iconDestination, // destination file of the icon 235 string arguments, // any arguments to go along with iconDestination 235 236 string description) // the textual description 236 // of the icon (not usually displayed)237 // of the icon (not usually displayed) 237 238 { 238 239 bool reply = false; … … 288 289 // description. 289 290 psl->SetPath(iconDestination.c_str()); 290 291 psl->SetArguments(arguments.c_str()); 291 292 psl->SetDescription(description.c_str()); 292 293 -
trunk/gsinstaller/gsProgman.h
r1475 r1657 9 9 class gsProgramManager : public installAgent 10 10 { 11 private: 12 gsPlatform *platform; 13 DWORD instance; 14 bool connected; 11 private: 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); 18 protected: 19 public: 20 // constructor 21 gsProgramManager(installManager &manager); 15 22 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(); 22 26 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); 26 32 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 ¶ms); 33 bool undoAction(string actionName, stringArray ¶ms); 34 34 }; 35 35 #endif -
trunk/gsinstaller/gsinstall.cpp
r1639 r1657 274 274 { 275 275 // 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"); 277 277 FilePath *setupPath = new FilePath(this->destinationPath->pathString(), "gssetup.exe"); 278 278 FilePath *logPath = new FilePath(this->destinationPath->pathString(), "install.log"); … … 291 291 { 292 292 // get special app path key for windows 9x 293 exeKeyPath = this->gsRegister->exeKeyId(" library.exe");293 exeKeyPath = this->gsRegister->exeKeyId("server.exe"); 294 294 295 295 // ensure that the exe key exists … … 350 350 } 351 351 352 352 353 // set the log for writing 354 353 355 FilePath *logPath = new FilePath(this->destinationPath->pathString(), "install.log"); 356 354 357 this->setLogFile(logPath->pathString()); 358 355 359 this->readLog(); 360 356 361 delete logPath; 362 357 363 } 358 364 … … 395 401 // will in fact be the temporary directory as outlined above) 396 402 FilePath *logPath = new FilePath(this->sourcePath->pathString(), "install.log"); 403 397 404 this->setLogFile(logPath->pathString()); 398 405 this->readLog(); … … 456 463 { 457 464 string groupName; 465 string collectionName; 458 466 459 467 // if we managed to get a connection to the program manager (or explorer … … 469 477 return false; 470 478 } 479 collectionName = this->configFile->getString("CollectionName"); 480 if (collectionName == "") 481 { 482 // TODO: error handling 483 this->progman->disconnect(); 484 return false; 485 } 471 486 472 487 // add the group … … 478 493 479 494 // 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(), "", "")) 482 497 { 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 } 495 499 496 500 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(), "", "")) 498 502 { 499 503 } 500 504 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(), "", "")) 503 507 { 504 508 } … … 507 511 FilePath uninstallPath(this->destinationPath->pathString(), "gssetup.exe"); 508 512 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")) 510 515 { 511 516 } … … 641 646 "Greenstone Installer", false) < 0) 642 647 { 643 MessageBox(0, "Error", app_name, MB_OK);648 // MessageBox(0, "Error", app_name, MB_OK); 644 649 return false; 645 650 } -
trunk/gsinstaller/install.cfg
r1475 r1657 1 CompanyName: Demo1 CompanyName:New Zealand Digital Library 2 2 CollectionName:Demo Collection 3 3 CollectionDirName:demo 4 4 CollectionVersion:1.0 5 5 CollectionVolume:1 6 ProgramGroupName: Demo Collection6 ProgramGroupName:Greenstone -
trunk/gsinstaller/manifest.cfg
r1475 r1657 3 3 4 4 library: 5 gsdl.ini library.exe Net32 Net16 readme.txt5 gsdl.ini server.exe Net32 Net16 readme.txt Support.htm docs 6 6 7 7 database: … … 9 9 10 10 collection: 11 collect 11 collect etc images macros unicode
Note:
See TracChangeset
for help on using the changeset viewer.