Changeset 19587


Ignore:
Timestamp:
2009-05-25T14:35:31+12:00 (15 years ago)
Author:
oranfry
Message:

keep track of original directory installer was run from

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/windows/wrapper/wrapper.cpp

    r19174 r19587  
    290290    spoof_progress( SPOOF_TIME );
    291291   
     292    //get the original working directory
     293    char* owd = _getcwd(NULL, 1024);
     294   
    292295    //using the users TMP directory for temp files rather than the current directory so
    293     //installation from cd works
    294     //char* tmp = NULL;
    295     //tmp = _getcwd(tmp, 1000);
     296    //installation from cdrom works
    296297    char* tmp = getenv( "TMP" );
    297298    char id[6]; for( int i=0; i<5; i++ ) id[i] = (char)((rand()%26) + 97); id[5] = '\0'; //id for this instance
     
    360361        string cmd = "\"";
    361362        cmd.append( foundJvm.getWinExecutable() );
     363        cmd.append( "\" \"-Dorig.dir=" );
     364        cmd.append( owd );
    362365        cmd.append( "\" -jar greenstone.jar" );
     366       
    363367       
    364368        //hide splash screen
     
    385389    _rmdir( tempdir.c_str() );
    386390
     391    delete owd;
     392   
    387393    return 0;
    388394   
Note: See TracChangeset for help on using the changeset viewer.