Changeset 19587

Show
Ignore:
Timestamp:
25.05.2009 14:35:31 (10 years ago)
Author:
oranfry
Message:

keep track of original directory installer was run from

Files:
1 modified

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