Ignore:
Timestamp:
2010-06-03T10:04:19+12:00 (14 years ago)
Author:
sjm84
Message:

Implemented the extract option for web installer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/shared/linux/wrapper.cpp

    r21630 r22225  
    2020        << "OPTIONS: " << endl
    2121        << " -h, -help          Display this usage message" << endl
    22         << " -text              Do a non-graphical command line installation" << endl;
     22        << " -text (Depricated) Do a non-graphical command line installation" << endl;
    2323    #ifdef CDROM
    2424    cerr << " -wd PATH          Look for the CD-ROM at PATH" << endl;
     
    5050            usage( argv[0], 0 );
    5151        } else if ( a.compare("-text") == 0 || a.compare("text") == 0 ) {
     52            cerr << "-text is depricated, please use -extract and then run \"java -jar greenstone.jar text\"" << endl;
    5253            text_mode = true;
     54        } else if ( a.compare("-extract") == 0 || a.compare("--extract") || a.compare("-x")) {
     55            cout << "------------------------------" << endl;
     56            cout << "Extracting java installer...\n" << endl;
     57            cout << "------------------------------" << endl;
     58            bool result = extract_bundled_file( greenstonejar, sizeof(greenstonejar), (char*)jarfile.c_str(), false);
     59            if(result){
     60                cout << "\nExtraction Complete" << endl;
     61                cout << "You can now run \"java -jar greenstone.jar text\" to run the installer from the command line\n"
     62                return 0;
     63            }
     64            else{
     65                cerr << "There was an error while extracting the java installer" << endl;
     66                return 1;
     67            }
    5368        } else {
    5469            cerr << "Unrecognised option '" << a << "'" << endl;
Note: See TracChangeset for help on using the changeset viewer.