Changeset 19009 for release-kits

Show
Ignore:
Timestamp:
16.04.2009 15:32:12 (11 years ago)
Author:
oranfry
Message:

going back to using the TMP dir for temp files so that installation from CD works

Files:
1 modified

Legend:

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

    r18246 r19009  
    290290    spoof_progress( SPOOF_TIME ); 
    291291     
    292     // Now we are generating temporary files in a folder inside the current directory,  
    293     // instead of creating this folder in the system Temp directory(referenced by TMP) 
    294     // And we make this folder hidden 
    295     char* tmp = NULL; //char* tmp = getenv( "TMP" ); 
    296     tmp = _getcwd(tmp, 1000); 
     292    //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    char* tmp = getenv( "TMP" ); 
    297297    char id[6]; for( int i=0; i<5; i++ ) id[i] = (char)((rand()%26) + 97); id[5] = '\0'; //id for this instance 
    298298    string tempdir = ""; tempdir.append( tmp ); tempdir.append( "\\Greenstone-" ); tempdir.append( id ); 
     
    304304        return -1; 
    305305    } 
    306     SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN); 
     306    //SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN); 
    307307    SetCurrentDirectory(tmpdir); 
    308308    delete tmp; //  deallocate memory