Changeset 719 in dev


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
Files:
13 edited

Legend:

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

    r625 r719  
    240240
    241241            hFile=CreateFile(
    242                 ( ActiveBasic::Common::Environment::GetAbdevRootPath() + "\\pgm.tmp" ).c_str(),
     242                ( ActiveBasic::Common::Environment::GetUserAppDir() + "\\pgm.tmp" ).c_str(),
    243243                GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL);
    244244            WriteFile(hFile,FileName,lstrlen(FileName),&dw,NULL);
     
    696696        DWORD dwAccessBytes;
    697697        hFile=CreateFile(
    698             ( ActiveBasic::Common::Environment::GetAbdevRootPath() + "\\pgm.tmp" ).c_str(),
     698            ( ActiveBasic::Common::Environment::GetUserAppDir() + "\\pgm.tmp" ).c_str(),
    699699            GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    700700        if(hFile!=INVALID_HANDLE_VALUE){
  • trunk/ab5.0/abdev/BasicCompiler_Common/NonVolatile.cpp

    r717 r719  
    105105
    106106    //開く
    107     buffer=ReadBuffer_NonErrMsg( Program::GetUserAppDir() + "\\compiler.ini" );
     107    buffer=ReadBuffer_NonErrMsg( Program::GetAbcUserAppDir() + "\\compiler.ini" );
    108108    if(!buffer){
    109109        //レジストリを読み込む
     
    248248
    249249    // ユーザ情報保存用のディレクトリを作成
    250     Jenga::Common::Directory dir( Program::GetUserAppDir(), true );
     250    Jenga::Common::Directory dir( Program::GetAbcUserAppDir(), true );
    251251
    252252
     
    276276    //保存
    277277    WriteBuffer(
    278         Program::GetUserAppDir() + "\\compiler.ini",
     278        Program::GetAbcUserAppDir() + "\\compiler.ini",
    279279        buffer,lstrlen(buffer));
    280280
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h

    r717 r719  
    3232
    3333    // ユーザデータ格納用のディレクトリを取得
    34     static const std::string GetUserAppDir();
     34    static const std::string GetAbcUserAppDir();
    3535
    3636    const std::string &GetSourceFilePath() const
  • 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
  • trunk/ab5.0/abdev/ab_common/include/Environment.h

    r637 r719  
    3333    static const std::string GetAbdevRootPath();
    3434
     35    static const std::string GetUserAppDir();
     36
    3537    static const std::string GetAbdevSystemDirPath()
    3638    {
  • trunk/ab5.0/abdev/ab_common/src/Environment.cpp

    r637 r719  
    1818    return rootPath;
    1919}
     20
     21const std::string Environment::GetUserAppDir()
     22{
     23    return Jenga::Common::Environment::GetUserAppDir() + "\\ActiveBasic";
     24}
     25
    2026const std::string Environment::GetCompilerExePath( Platform::EnumType platform )
    2127{
  • trunk/ab5.0/abdev/abdev/Debugger.cpp

    r705 r719  
    490490    lstrcat(temporary,"ab_breakpoint.tmp");
    491491
    492     //未完成
    493     sprintf(temporary,"%sab_breakpoint.tmp",pj_editor_Dir);
    494 
    495492    ATL::CHandle hFile(CreateFile(temporary,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL));
    496493    if(hFile==INVALID_HANDLE_VALUE){
  • trunk/ab5.0/abdev/abdev/NonVolatile.cpp

    r718 r719  
    235235    char temporary[MAX_PATH];
    236236
    237     std::string userAppDir = ActiveBasic::IDE::Program::GetUserAppDir();
     237    std::string userAppDir = ActiveBasic::IDE::Program::GetIdeUserAppDir();
    238238
    239239
     
    669669   
    670670    // ユーザ情報保存用のディレクトリを作成
    671     Jenga::Common::Directory dir( ActiveBasic::IDE::Program::GetUserAppDir(), true );
     671    Jenga::Common::Directory dir( ActiveBasic::IDE::Program::GetIdeUserAppDir(), true );
    672672
    673673
     
    806806
    807807
    808     std::string userAppDir = ActiveBasic::IDE::Program::GetUserAppDir();
     808    std::string userAppDir = ActiveBasic::IDE::Program::GetIdeUserAppDir();
    809809
    810810    //保存
  • trunk/ab5.0/abdev/abdev/include/Program.h

    r717 r719  
    1717
    1818    // ユーザデータ格納用のディレクトリを取得
    19     static const std::string GetUserAppDir();
     19    static const std::string GetIdeUserAppDir();
    2020
    2121    static void Main();
  • trunk/ab5.0/abdev/abdev/src/MainFrame.cpp

    r705 r719  
    550550    DWORD AccBytes;
    551551    {
    552         sprintf(temporary,"%spgm.tmp",pj_editor_Dir);
     552        sprintf(temporary,"%s\\pgm.tmp",ActiveBasic::Common::Environment::GetUserAppDir().c_str());
    553553        ATL::CHandle fh(CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL));
    554554        if(fh==INVALID_HANDLE_VALUE){
     
    11351135        //デバッグ用のコマンドライン及び実行可能ファイル(DLLのみ)
    11361136        sprintf(temporary,"%s\r\n%s",projectInfo.szExePath,projectInfo.szCmdLine);
    1137         sprintf(temp2,"%spgm.tmp",pj_editor_Dir);
     1137        sprintf(temp2,"%s\\pgm.tmp",ActiveBasic::Common::Environment::GetUserAppDir().c_str());
    11381138        {
    11391139            ATL::CHandle hFile(CreateFile(temp2,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL));
  • trunk/ab5.0/abdev/abdev/src/Program.cpp

    r717 r719  
    2727}
    2828
    29 const std::string Program::GetUserAppDir()
     29const std::string Program::GetIdeUserAppDir()
    3030{
    31     return Jenga::Common::Environment::GetUserAppDir() + "\\ActiveBasic\\ide";
     31    return ActiveBasic::Common::Environment::GetUserAppDir() + "\\ide";
    3232}
    3333
Note: See TracChangeset for help on using the changeset viewer.