Ignore:
Timestamp:
Aug 13, 2008, 11:01:29 PM (16 years ago)
Author:
dai
Message:
  • ab_breakpoint.tmpをテンポラリディレクトリに生成するようにした。
  • pgm.tmpをユーザ空間に生成するようにした。
  • GetUserAppDir/GetIdeUserAppDir/GetAbcUserAppDirの各メソッドを用意。用途別に呼び出し側の制御を分けた。
Location:
trunk/ab5.0/abdev/BasicCompiler_Common/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/BreakPoint.cpp

    r648 r719  
    119119    buffer=(char *)HeapAlloc(hHeap,0,65535);
    120120
    121     std::string filepath = ActiveBasic::Common::Environment::GetAbdevRootPath() + "\\ab_breakpoint.tmp";
     121    char temporary[MAX_PATH];
     122    GetTempPath(MAX_PATH,temporary);
     123    if(temporary[lstrlen(temporary)-1]!='\\') lstrcat(temporary,"\\");
     124    lstrcat(temporary,"ab_breakpoint.tmp");
     125
    122126    HANDLE hFile=CreateFile(
    123         filepath.c_str(),
     127        temporary,
    124128        GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    125129    if(hFile!=INVALID_HANDLE_VALUE)
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp

    r702 r719  
    481481
    482482            hFile=CreateFile(
    483                 ( ActiveBasic::Common::Environment::GetAbdevRootPath() + "\\pgm.tmp" ).c_str(),
     483                ( ActiveBasic::Common::Environment::GetUserAppDir() + "\\pgm.tmp" ).c_str(),
    484484                GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL);
    485485            WriteFile(hFile,FileName,lstrlen(FileName),&dw,NULL);
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp

    r717 r719  
    11#include "stdafx.h"
    22
    3 Jenga::Common::Logger Program::logger( Jenga::Common::Environment::GetAppDir() + "\\logger.log", true );
     3Jenga::Common::Logger Program::logger( Program::GetAbcUserAppDir() + "\\logger.log", true );
    44
    55Program program;
     
    139139}
    140140
    141 const std::string Program::GetUserAppDir()
     141const std::string Program::GetAbcUserAppDir()
    142142{
    143     return Jenga::Common::Environment::GetUserAppDir() + "\\ActiveBasic\\abc";
     143    return ActiveBasic::Common::Environment::GetUserAppDir() + "\\abc";
    144144}
    145145
Note: See TracChangeset for help on using the changeset viewer.