Changeset 17905 for release-kits


Ignore:
Timestamp:
11/21/08 17:57:46 (12 years ago)
Author:
max
Message:

Now extracts in the hidden folder in the current directory instead of the temp folder.

File:
1 edited

Legend:

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

    r17385 r17905  
    289289    set_splash_step( "TMP" );
    290290    spoof_progress( SPOOF_TIME );
    291     char* tmp = getenv( "TMP" );
     291   
     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);
    292297    char id[6]; for( int i=0; i<5; i++ ) id[i] = (char)((rand()%26) + 97); id[5] = '\0'; //id for this instance
    293298    string tempdir = ""; tempdir.append( tmp ); tempdir.append( "\\Greenstone-" ); tempdir.append( id );
    294     _mkdir( tempdir.c_str() );
    295     SetCurrentDirectory( tempdir.c_str() );
    296    
    297 
     299    const char* tmpdir = tempdir.c_str();
     300    _mkdir( tmpdir );
     301    SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN);
     302    SetCurrentDirectory(tmpdir);
     303    delete tmp; //  deallocate memory
     304   
    298305    //rip out java archive if it is bundled
    299306    set_splash_step( "XJAVA" );
Note: See TracChangeset for help on using the changeset viewer.