Ignore:
Timestamp:
Aug 24, 2008, 6:07:40 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

Unicodeライブラリに対応

File:
1 edited

Legend:

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

    r721 r733  
    2727
    2828void AddSourceCode(const char *buffer){
    29     char *temp;
    30     temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192);
     29    char *temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192);
    3130    lstrcpy(temp,buffer);
    3231
     
    3736
    3837    HeapDefaultFree(temp);
     38}
     39
     40namespace{
     41    const char *GetCoreLibName()
     42    {
     43        if( compiler.IsDebug() ){
     44            if( compiler.IsUnicode() ){
     45                return "coreud.lib";
     46            }
     47            else{
     48                return "cored.lib";
     49            }
     50        }
     51        else{
     52            if( compiler.IsUnicode() ){
     53                return "coreu.lib";
     54            }
     55            else{
     56                return "core.lib";
     57            }
     58        }
     59    }
    3960}
    4061
     
    5172
    5273    //プログレスバーの設定
    53     PostMessage(GetDlgItem(hMainDlg,IDC_PROGRESS),PBM_SETRANGE,0,MAKELPARAM(0,6));
    54     PostMessage(GetDlgItem(hMainDlg,IDC_PROGRESS),PBM_SETSTEP,1,0);
     74    HWND hwndProgress=GetDlgItem(hMainDlg,IDC_PROGRESS);
     75    PostMessage(hwndProgress,PBM_SETRANGE,0,MAKELPARAM(0,6));
     76    PostMessage(hwndProgress,PBM_SETSTEP,1,0);
    5577
    5678    //"中断"
     
    167189            extern BOOL bDebugCompile;
    168190
    169             const char *coreFileName = "core.lib";
    170             if( compiler.IsDebug() )
    171             {
    172                 coreFileName = "cored.lib";
    173             }
     191            const char *coreFileName = GetCoreLibName();
    174192
    175193            char coreFilePath[MAX_PATH];
    176 #ifdef _AMD64_
     194#if defined _AMD64_
    177195            sprintf( coreFilePath, "..\\lib\\x64\\%s", coreFileName );
    178196#else
     
    187205                if( compiler.staticLibraries.back()->Read( coreFilePath ) )
    188206                {
    189                     compiler.messenger.Output( ((std::string)"\"" + path.GetFullPath() + "\" を読み込みました。").c_str() );
     207                    compiler.messenger.Output( ('\"' + path.GetFullPath() + "\" を読み込みました。").c_str() );
    190208                }
    191209                else
     
    212230                if( compiler.staticLibraries.back()->Read( filePath ) )
    213231                {
    214                     compiler.messenger.Output( ((std::string)"\"" + path.GetFullPath() + "\" を読み込みました。").c_str() );
     232                    compiler.messenger.Output( ('\"' + path.GetFullPath() + "\" を読み込みました。").c_str() );
    215233                }
    216234                else
     
    250268EndCompile:
    251269    if(bStopCompile){
    252         PostMessage(GetDlgItem(hMainDlg,IDC_PROGRESS),PBM_SETPOS,0,0);
     270        PostMessage(hwndProgress,PBM_SETPOS,0,0);
    253271
    254272        //"コンパイルはユーザーにより中断されました。"
     
    295313#endif
    296314}
    297 void MainThread(void *)
     315unsigned __stdcall MainThread(void *)
    298316{
    299317    if( program.IsDebugRun() )
     
    315333        Build();
    316334    }
    317 }
     335    return 0;
     336}
Note: See TracChangeset for help on using the changeset viewer.