Ignore:
Timestamp:
Aug 13, 2008, 10:33:58 PM (16 years ago)
Author:
dai
Message:

#188への対応。UserSettingディレクトリを廃止し、正規のユーザ空間ディレクトリを取り入れた。

Location:
trunk/ab5.0/abdev/BasicCompiler_Common
Files:
3 edited

Legend:

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

    r523 r717  
    105105
    106106    //開く
    107     buffer=ReadBuffer_NonErrMsg( Jenga::Common::Environment::GetAppDir() + "\\UserSetting\\compiler.ini" );
     107    buffer=ReadBuffer_NonErrMsg( Program::GetUserAppDir() + "\\compiler.ini" );
    108108    if(!buffer){
    109109        //レジストリを読み込む
     
    247247    char temporary[MAX_PATH];
    248248
    249     const std::string userSettingDirPath = Jenga::Common::Environment::GetAppDir() + "\\UserSetting";
    250 
    251     HANDLE hFind;
    252     WIN32_FIND_DATA wfd;
    253     hFind=FindFirstFile( userSettingDirPath.c_str() ,&wfd);
    254     if(hFind==INVALID_HANDLE_VALUE){
    255         //UserSettingディレクトリを作成
    256         if(!CreateDirectory( userSettingDirPath.c_str() ,NULL)){
    257             extern HWND hOwnerEditor;
    258             MessageBox(hOwnerEditor,"UserSettingディレクトリの作成に失敗","ActiveBasic",MB_OK|MB_ICONEXCLAMATION);
    259             return;
    260         }
    261     }
     249    // ユーザ情報保存用のディレクトリを作成
     250    Jenga::Common::Directory dir( Program::GetUserAppDir(), true );
     251
    262252
    263253    extern HANDLE hHeap;
     
    286276    //保存
    287277    WriteBuffer(
    288         userSettingDirPath + "\\compiler.ini",
     278        Program::GetUserAppDir() + "\\compiler.ini",
    289279        buffer,lstrlen(buffer));
    290280
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h

    r636 r717  
    3030
    3131    bool AnalysisCommandLines();
     32
     33    // ユーザデータ格納用のディレクトリを取得
     34    static const std::string GetUserAppDir();
    3235
    3336    const std::string &GetSourceFilePath() const
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp

    r697 r717  
    139139}
    140140
     141const std::string Program::GetUserAppDir()
     142{
     143    return Jenga::Common::Environment::GetUserAppDir() + "\\ActiveBasic\\abc";
     144}
     145
    141146int Program::GetExitCode() const
    142147{
Note: See TracChangeset for help on using the changeset viewer.