Changeset 477 in dev


Ignore:
Timestamp:
Apr 6, 2008, 8:07:40 PM (16 years ago)
Author:
dai_9181
Message:

構成管理を大幅に改良。

Location:
trunk/ab5.0
Files:
2 added
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler32/BasicCompiler.vcproj

    r475 r477  
    6161                WarningLevel="3"
    6262                SuppressStartupBanner="true"
    63                 DebugInformationFormat="4"
     63                DebugInformationFormat="3"
    6464            />
    6565            <Tool
     
    153153                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
    154154                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN"
    155                 StringPooling="true"
     155                StringPooling="false"
    156156                RuntimeLibrary="0"
    157                 EnableFunctionLevelLinking="true"
     157                EnableFunctionLevelLinking="false"
    158158                RuntimeTypeInfo="true"
    159159                UsePrecompiledHeader="2"
     
    166166                WarningLevel="3"
    167167                SuppressStartupBanner="true"
     168                DebugInformationFormat="3"
    168169            />
    169170            <Tool
     
    15881589                >
    15891590                <File
     1591                    RelativePath="..\BasicCompiler_Common\include\Configuration.h"
     1592                    >
     1593                </File>
     1594                <File
    15901595                    RelativePath="..\BasicCompiler_Common\include\Program.h"
    15911596                    >
  • trunk/ab5.0/abdev/BasicCompiler32/MakePeHdr.cpp

    r467 r477  
    11061106    int DosStubSize;
    11071107    hFile=CreateFile(
    1108         ( Jenga::Common::Environment::GetAppDir() + "\\SubOperation\\dosstub.pgm" ).c_str(),
     1108        ( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dosstub.pgm" ).c_str(),
    11091109        GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    11101110    if(hFile==INVALID_HANDLE_VALUE){
  • trunk/ab5.0/abdev/BasicCompiler32/stdafx.h

    r472 r477  
    2222#include <boost/foreach.hpp>
    2323
     24#include <jenga/include/common/CmdLine.h>
     25#include <jenga/include/common/Environment.h>
     26#include <jenga/include/common/File.h>
     27#include <jenga/include/common/Path.h>
    2428#include <jenga/include/common/String.h>
    25 #include <jenga/include/common/File.h>
    26 #include <jenga/include/common/CmdLine.h>
    27 #include <jenga/include/common/Path.h>
     29
     30#include <abdev/ab_common/Environment.h>
    2831
    2932#include "../BasicCompiler_Common/common.h"
     
    3134
    3235#include <Hashmap.h>
     36#include <Configuration.h>
    3337#include <Program.h>
    3438#include <Compiler.h>
  • trunk/ab5.0/abdev/BasicCompiler64/BasicCompiler.vcproj

    r475 r477  
    442442                >
    443443                <File
     444                    RelativePath="..\BasicCompiler_Common\include\Configuration.h"
     445                    >
     446                </File>
     447                <File
    444448                    RelativePath="..\BasicCompiler_Common\include\Program.h"
    445449                    >
  • trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp

    r468 r477  
    11051105    int DosStubSize;
    11061106    hFile=CreateFile(
    1107         ( Jenga::Common::Environment::GetAppDir() + "\\SubOperation\\dosstub.pgm" ).c_str(),
     1107        ( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dosstub.pgm" ).c_str(),
    11081108        GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    11091109    if(hFile==INVALID_HANDLE_VALUE){
  • trunk/ab5.0/abdev/BasicCompiler64/stdafx.h

    r472 r477  
    2222#include <boost/foreach.hpp>
    2323
     24#include <jenga/include/common/CmdLine.h>
     25#include <jenga/include/common/Environment.h>
     26#include <jenga/include/common/File.h>
     27#include <jenga/include/common/Path.h>
    2428#include <jenga/include/common/String.h>
    25 #include <jenga/include/common/File.h>
    26 #include <jenga/include/common/CmdLine.h>
    27 #include <jenga/include/common/Path.h>
     29
     30#include <abdev/ab_common/Environment.h>
    2831
    2932#include "../BasicCompiler_Common/common.h"
     
    3134
    3235#include <Hashmap.h>
     36#include <Configuration.h>
    3337#include <Program.h>
    3438#include <Compiler.h>
  • trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp

    r472 r477  
    9393void ts(const char *msg,const char *title){
    9494    MessageBox(0,FormatEscapeSequenceStringToDefaultString(msg).c_str(),title,0);
     95}
     96void ts(const std::string msg)
     97{
     98    ts(msg.c_str());
    9599}
    96100
     
    192196    }
    193197
    194     i3=(int)baseDirPath.size();i4=0;
     198    std::string tempBaseDirPath = baseDirPath;
     199    if( tempBaseDirPath[tempBaseDirPath.size()-1] != '\\' )
     200    {
     201        tempBaseDirPath += "\\";
     202    }
     203
     204    i3=(int)tempBaseDirPath.size();i4=0;
    195205    while(i4<i2){
    196206        for(i3--;;i3--){
    197             if(baseDirPath[i3-1]=='\\'){
     207            if(tempBaseDirPath[i3-1]=='\\'){
    198208                i4++;
    199209                break;
     
    201211        }
    202212    }
    203     memcpy(temporary,baseDirPath.c_str(),i3);
     213    memcpy(temporary,tempBaseDirPath.c_str(),i3);
    204214    temporary[i3]=0;
    205215    lstrcat(temporary,path+i);
     
    601611    pobj_nv->load();
    602612
     613    program.Configurate();
     614
    603615    if( !program.AnalysisCommandLines() )
    604616    {
     
    664676        if( program.GetIncludeDir().size() == 0 )
    665677        {
    666             program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( ".\\Include\\", baseDirPath ) );
     678            program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( ".\\Include", ActiveBasic::Common::Environment::GetAbdevRootPath() ) );
    667679        }
    668680        else
    669681        {
    670682            // インクルードディレクトリを絶対パスに変更
    671             program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( program.GetIncludeDir(), baseDirPath ) );
     683            program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( program.GetIncludeDir(), ActiveBasic::Common::Environment::GetAbdevRootPath() ) );
    672684        }
    673685
  • trunk/ab5.0/abdev/BasicCompiler_Common/common.h

    r467 r477  
    216216void ts(const char *msg);
    217217void ts(const char *msg,const char *title);
     218void ts(const std::string msg);
    218219void epi_check();
    219220void GetRelationalPath(char *path,char *dir);
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h

    r472 r477  
    2828    {
    2929    }
     30
     31    void Configurate();
    3032
    3133    bool AnalysisCommandLines();
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp

    r404 r477  
    485485
    486486#include <logger.h>
     487#include <Configuration.h>
    487488
    488489template class Jenga::Common::BoostSerializationSupport<LoggerSetting>;
     490template class Jenga::Common::BoostSerializationSupport<Configuration>;
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp

    r465 r477  
    163163    destSource = "";
    164164
    165     SourceTemplate sourceTemplate( "\\SubOperation\\templates\\delegate_class.tab" );
     165    SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" );
    166166
    167167    this->Iterator_Reset();
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp

    r472 r477  
    1010
    1111Program program;
     12
     13void Program::Configurate()
     14{
     15    Configuration configuration;
     16    const std::string filePath = Jenga::Common::Environment::GetAppDir() + "\\config.xml";
     17    if( Jenga::Common::Path( filePath ).IsExistFile() )
     18    {
     19        configuration.ReadXml( filePath );
     20    }
     21    else
     22    {
     23        configuration.WriteXml( filePath );
     24    }
     25
     26    ActiveBasic::Common::Environment::SetAbdevRootPath( configuration.GetAbdevRootRelativePath() );
     27}
    1228
    1329bool Program::AnalysisCommandLines()
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp

    r467 r477  
    614614
    615615                    if(sw1){
    616                         sprintf(temp2,"%s%s", program.GetIncludeDir().c_str(), temporary );
     616                        sprintf(temp2,"%s\\%s", program.GetIncludeDir().c_str(), temporary );
    617617                        lstrcpy(temporary,temp2);
    618618                    }
     
    624624            else if(memcmp(buffer+i+1,"prompt",6)==0){
    625625                i2=i+7;
    626                 sprintf(temporary,"%sbasic\\prompt.sbp", program.GetIncludeDir().c_str() );
     626                sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
    627627            }
    628628            else if(memcmp(buffer+i+1,"N88BASIC",8)==0){
    629629                i2=i+9;
    630                 sprintf(temporary,"%sbasic\\prompt.sbp", program.GetIncludeDir().c_str() );
     630                sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
    631631            }
    632632            else if(memcmp(buffer+i+1,"console",7)==0){
     
    636636
    637637                i2=i+8;
    638                 sprintf(temporary,"%sbasic\\dos_console.sbp", program.GetIncludeDir().c_str() );
     638                sprintf(temporary,"%s\\basic\\dos_console.sbp", program.GetIncludeDir().c_str() );
    639639            }
    640640            else continue;
  • trunk/ab5.0/abdev/ProjectEditor/Attach.cpp

    r475 r477  
    9191    /////////////////////////////////////////////////////
    9292
    93     std::string enumProcess64ExePath = Program::GetApplicationSystemDirPath() + "\\enum_process64\\enum_process64.exe";
     93    std::string enumProcess64ExePath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\enum_process64\\enum_process64.exe";
    9494
    9595    STARTUPINFO si;
     
    106106    //////////////////////////////////
    107107
    108     std::string listPath = Program::GetApplicationSystemDirPath() + "\\enum_process64\\list.dat";
     108    std::string listPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\enum_process64\\list.dat";
    109109
    110110    char *buffer;
  • trunk/ab5.0/abdev/ProjectEditor/ChildWndOnRebar.cpp

    r475 r477  
    8585                i=SendMessage(hwnd,CB_GETCURSEL,0,0);
    8686
    87                 extern char *lpszCompilerName;
    88                 if(i==0) lpszCompilerName=WIN32_COMPILER_NAME;
    89                 if(i==1) lpszCompilerName=WIN64_COMPILER_NAME;
     87                extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
     88                if( i == 0 )
     89                {
     90                    selectingPlatform = ActiveBasic::Common::Platform::X86;
     91                }
     92                else if( i == 1 )
     93                {
     94                    selectingPlatform = ActiveBasic::Common::Platform::X64;
     95                }
    9096            }
    9197            break;
  • trunk/ab5.0/abdev/ProjectEditor/Common.h

    r475 r477  
    6969#endif
    7070
    71 
    72 
    73 #define WIN32_COMPILER_NAME "BasicCompiler32.exe"
    74 #define WIN64_COMPILER_NAME "BasicCompiler64.exe"
    7571
    7672
  • trunk/ab5.0/abdev/ProjectEditor/DesignTheme.cpp

    r475 r477  
    3939}
    4040CTheme::CTheme(){
    41     CTheme(0,THEMENAME_USER);
     41    bActive=0;
     42    lstrcpy(m_name,THEMENAME_USER);
    4243}
    4344CTheme::~CTheme(){
  • trunk/ab5.0/abdev/ProjectEditor/ProjectControl.cpp

    r475 r477  
    898898    }
    899899    else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX){
    900         const std::string mainExeDirectXAbpPath = Program::GetApplicationSystemDirPath() + "\\system\\dx\\main_exe_directx.abp";
     900        const std::string mainExeDirectXAbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\main_exe_directx.abp";
    901901        pTemp = ReadBuffer( mainExeDirectXAbpPath );
    902902
     
    969969    if(NewProjectInfo.dwTypeID==IDC_EXE_WINDOWBASE)
    970970    {
    971         mainWndSbpPath = Program::GetApplicationSystemDirPath() + "\\MainWnd_exe_windowbase.sbp";
     971        mainWndSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\MainWnd_exe_windowbase.sbp";
    972972    }
    973973    else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX)
    974974    {
    975         mainWndSbpPath = Program::GetApplicationSystemDirPath() + "\\MainWnd_exe_directx.sbp";
     975        mainWndSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\MainWnd_exe_directx.sbp";
    976976    }
    977977
     
    10171017
    10181018        //dx_graphics.sbpをコピー
    1019         const std::string dxGraphicsSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_graphics.sbp";
     1019        const std::string dxGraphicsSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_graphics.sbp";
    10201020        pTemp = ReadBuffer( dxGraphicsSbpPath );
    10211021        sprintf(temporary,"%sdx_graphics.sbp",dir,NewProjectInfo.name);
     
    10241024
    10251025        //dx_input.sbpをコピー
    1026         const std::string dxInputSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_input.sbp";
     1026        const std::string dxInputSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_input.sbp";
    10271027        pTemp = ReadBuffer( dxInputSbpPath );
    10281028        sprintf(temporary,"%sdx_input.sbp",dir,NewProjectInfo.name);
     
    10311031
    10321032        //dx_music.sbpをコピー
    1033         const std::string dxMusicSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_music.sbp";
     1033        const std::string dxMusicSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_music.sbp";
    10341034        pTemp = ReadBuffer( dxMusicSbpPath );
    10351035        sprintf(temporary,"%sdx_music.sbp",dir,NewProjectInfo.name);
     
    10971097    //マニフェストを作成
    10981098    char temp2[MAX_PATH];
    1099     const std::string manifestTempXmlPath = Program::GetApplicationSystemDirPath() + "\\manifest_temp.xml";
     1099    const std::string manifestTempXmlPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\manifest_temp.xml";
    11001100    sprintf(temp2,"%s%s.manifest.xml",dir,NewProjectInfo.name);
    11011101    CopyFile( manifestTempXmlPath.c_str(), temp2, 0 );
     
    23722372BOOL SetProjectToRun(void){
    23732373    extern PROJECTINFO ProjectInfo;
    2374     char temporary[MAX_PATH];
    23752374    HANDLE hFind;
    23762375    WIN32_FIND_DATA wfd;
     
    23822381    }
    23832382
    2384     extern char *lpszCompilerName;
    2385     sprintf(temporary,"%s%s",pj_editor_Dir,lpszCompilerName);
    2386     hFind=FindFirstFile(temporary,&wfd);
     2383    extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
     2384    hFind=FindFirstFile( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ).c_str(), &wfd );
    23872385    if(hFind==INVALID_HANDLE_VALUE){
    23882386        //"BasicCompiler.exe が見つかりません"
  • trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.cpp

    r475 r477  
    8989
    9090
    91 void CreateProcessWithStdHandle( const char *appPath, const char *cmdLine)
     91void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine)
    9292{
    9393    std::string argsStr = (std::string)"\"" + appPath + "\" " + cmdLine;
     
    20822082                    lstrcat(temporary,temp2);
    20832083
    2084                     sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2085 
    2086                     CreateProcessWithStdHandle( str, temporary );
     2084                    CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
    20872085
    20882086                    return 0;
     
    21342132                    lstrcat(temporary,temp2);
    21352133
    2136                     sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2137 
    2138                     CreateProcessWithStdHandle( str, temporary );
     2134                    CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
    21392135
    21402136                    return 0;
     
    21672163                    lstrcat(temporary,temp2);
    21682164
     2165                    ActiveBasic::Common::Platform::EnumType platform;
    21692166                    if(dwPlatform==IMAGE_FILE_MACHINE_I386)
    2170                         sprintf(str,"%s%s",pj_editor_Dir,WIN32_COMPILER_NAME);
     2167                    {
     2168                        platform = ActiveBasic::Common::Platform::X86;
     2169                    }
    21712170                    else if(dwPlatform==IMAGE_FILE_MACHINE_AMD64)
    2172                         sprintf(str,"%s%s",pj_editor_Dir,WIN64_COMPILER_NAME);
    2173 
    2174                     CreateProcessWithStdHandle( str, temporary );
     2171                    {
     2172                        platform = ActiveBasic::Common::Platform::X64;
     2173                    }
     2174                    else
     2175                    {
     2176                        throw;
     2177                    }
     2178
     2179                    CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary );
    21752180
    21762181                    return 0;
     
    22222227                    lstrcat(temporary,temp2);
    22232228
    2224                     sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
    2225 
    2226                     CreateProcessWithStdHandle( str, temporary );
     2229                    CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
    22272230
    22282231                    return 0;
  • trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.h

    r83 r477  
    3939HBRUSH h3DFaceBackBrush;
    4040DWORD dwRadClipboardID;
    41 char *lpszCompilerName;
     41ActiveBasic::Common::Platform::EnumType selectingPlatform = ActiveBasic::Common::Platform::X86;
    4242
    4343FWINLAYER pSetLayeredWindowAttributes;
  • trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.vcproj

    r475 r477  
    411411    </Configurations>
    412412    <References>
     413        <ProjectReference
     414            ReferencedProjectIdentifier="{87835C33-64C9-4BA5-9B39-608BA5394387}"
     415            RelativePathToProject=".\ab_common\ab_common.vcproj"
     416        />
     417        <ProjectReference
     418            ReferencedProjectIdentifier="{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}"
     419            RelativePathToProject="..\jenga\projects\jenga\jenga.vcproj"
     420        />
    413421    </References>
    414422    <Files>
  • trunk/ab5.0/abdev/ProjectEditor/SubOperation.cpp

    r475 r477  
    911911
    912912    //リソース用DLLをマッピング
    913     const std::string resDllPath = Program::GetApplicationSystemDirPath() + "\\res.dll";
     913    const std::string resDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\res.dll";
    914914    hResInst = LoadLibrary( resDllPath.c_str() );
    915915
    916916    //アイコンリソースDLLをマッピング
    917     const std::string iconResDllPath = Program::GetApplicationSystemDirPath() + "\\icon_res.dll";
     917    const std::string iconResDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\icon_res.dll";
    918918    hIconResInst = LoadLibrary( iconResDllPath.c_str() );
    919919
    920920    //LuxCtrl.dllをマッピング
    921     const std::string luxCtrlDllPath = Program::GetApplicationSystemDirPath() + "\\LuxCtrl.dll";
     921    const std::string luxCtrlDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\LuxCtrl.dll";
    922922    hLib_LuxCtrl = LoadLibrary( luxCtrlDllPath.c_str() );
    923923    if(!hLib_LuxCtrl){
     
    949949    ScreenX=GetSystemMetrics(SM_CXSCREEN);
    950950    ScreenY=GetSystemMetrics(SM_CYSCREEN);
    951 
    952     //コンパイラ名をセット(デフォルトはWin32)
    953     extern char *lpszCompilerName;
    954     lpszCompilerName=WIN32_COMPILER_NAME;
    955951
    956952    //不揮発性のデータを取得
     
    12201216    HANDLE hFile;
    12211217    DWORD dw;
    1222     const std::string pltPath = Program::GetApplicationSystemDirPath() + "\\8bit.plt";
     1218    const std::string pltPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\8bit.plt";
    12231219    hFile=CreateFile(pltPath.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    12241220    if(hFile==INVALID_HANDLE_VALUE){
     
    14731469    extern LPSTR DefFileFilter;
    14741470    int WndNum;
    1475     char temporary[MAX_PATH],temp2[MAX_PATH];
     1471    char temp2[MAX_PATH];
    14761472    HANDLE hFind;
    14771473    WIN32_FIND_DATA wfd;
    14781474
    1479     extern char *lpszCompilerName;
    1480     sprintf(temporary,"%s%s",pj_editor_Dir,lpszCompilerName);
    1481     hFind=FindFirstFile(temporary,&wfd);
     1475    extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
     1476    hFind=FindFirstFile(ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ).c_str(),&wfd);
    14821477    if(hFind==INVALID_HANDLE_VALUE){
    14831478        //"BasicCompiler.exe が見つかりません"
  • trunk/ab5.0/abdev/ProjectEditor/WindowControl.cpp

    r475 r477  
    22592259
    22602260    //テンプレートを読み込む
    2261     const std::string newWindowTemplateSbpPath = Program::GetApplicationSystemDirPath() + "\\new_window_template.sbp";
     2261    const std::string newWindowTemplateSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\new_window_template.sbp";
    22622262    pTemp = ReadBuffer( newWindowTemplateSbpPath );
    22632263
  • trunk/ab5.0/abdev/ProjectEditor/common_msg_jpn.h

    r83 r477  
    7878#define STRING_FILE_OVERWRIDE           "\"%s\" ファイルは既に存在しています。上書きしますか?"
    7979#define STRING_ERROR_MAXLENGTH          "これ以上、テキストを入力することができません"
    80 #define STRING_ERROR_NOBASICCOMPILER    "BasicCompiler が見つかりません"
     80#define STRING_ERROR_NOBASICCOMPILER    "対象プラットフォームのビルドモジュールが見つかりません"
    8181#define STRING_ERROR_PROJECTTOPCHAR     "プロジェクト名の先頭文字はアルファベット(A~Z、a~z)またはアンダーバー(_)でなければなりません。"
    8282#define STRING_ERROR_PROJECTNAME        "プロジェクト名に不正な文字コードが含まれています。"
  • trunk/ab5.0/abdev/ProjectEditor/include/Program.h

    r475 r477  
    77{
    88public:
    9     static const std::string GetApplicationSystemDirPath()
    10     {
    11         return Jenga::Common::Environment::GetAppDir() + "\\system";
    12     }
    139};
    1410
  • trunk/ab5.0/abdev/ProjectEditor/nkf_class.cpp

    r475 r477  
    1010CNkf::CNkf()
    1111{
    12     const std::string nkf32DllPath = Program::GetApplicationSystemDirPath() + "\\system\\nkf32.dll";
     12    const std::string nkf32DllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\nkf32.dll";
    1313    hLib = LoadLibrary( nkf32DllPath.c_str() );
     14    if( !hLib )
     15    {
     16        MessageBox( NULL, "nkf32.dll が見つかりません。", "エラー", MB_OK | MB_ICONEXCLAMATION );
     17    }
    1418
    1519    pGetNkfVersion=(GetNkfVersion)GetProcAddress(hLib,"GetNkfVersion");
  • trunk/ab5.0/abdev/ProjectEditor/reg_exp.cpp

    r475 r477  
    99CRegExp::CRegExp()
    1010{
    11     const std::string bregexpDllPath = Program::GetApplicationSystemDirPath() + "\\system\\BREGEXP.dll";
     11    const std::string bregexpDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\BREGEXP.dll";
    1212    hLib = LoadLibrary( bregexpDllPath.c_str() );
     13    if( !hLib )
     14    {
     15        MessageBox( NULL, "BREGEXP.dll �����‚���܂��B", "Gñƒƒï¿½ï¿½[", MB_OK | MB_ICONEXCLAMATION );
     16    }
    1317
    1418    BMatch=(PFUNC_BMatch)GetProcAddress(hLib,"BMatch");
     
    3741    else sprintf(pTemp,"m/(%s)/",exp);
    3842
    39     //Shift-JISナ表
     43    //Shift-JIS?
    4044    lstrcat(pTemp,"k");
    4145
    42     //蝠カE
     46    //?E
    4347    if(!IsBigSmall) lstrcat(pTemp,"i");
    4448
     
    8185    else sprintf(pTemp,"s/%s/%s/",exp,szPermu);
    8286
    83     //Shift-JISナ表
     87    //Shift-JIS?
    8488    lstrcat(pTemp,"k");
    8589
    86     //蝠カE
     90    //?E
    8791    if(!IsBigSmall) lstrcat(pTemp,"i");
    8892
  • trunk/ab5.0/abdev/ProjectEditor/stdafx.h

    r475 r477  
    2828#include <jenga/include/common/String.h>
    2929
     30#include <abdev/ab_common/Environment.h>
     31
    3032#include <Program.h>
  • trunk/ab5.0/abdev/ab_common/Environment.h

    r475 r477  
    44
    55
     6struct Platform
     7{
     8    enum EnumType
     9    {
     10        X86,
     11        X64,
     12    };
     13};
     14
    615class Environment
    716{
     17    static std::string rootPath;
    818public:
    9     static const std::string GetAbdevRootPath();
    10     static const std::string GetX86CompilerExePath();
    11     static const std::string GetX64CompilerExePath();
     19    static void SetAbdevRootPath( const std::string &rootPath );
     20
     21    static const std::string GetAbdevRootPath()
     22    {
     23        return rootPath;
     24    }
     25
     26    static const std::string GetAbdevSystemDirPath()
     27    {
     28        return GetAbdevRootPath() + "\\system";
     29    }
     30
     31    static const std::string GetCompilerExePath( Platform::EnumType platform );
    1232};
    1333
  • trunk/ab5.0/abdev/ab_common/ab_common.vcproj

    r475 r477  
    150150            >
    151151            <File
     152                RelativePath=".\Environment.cpp"
     153                >
     154            </File>
     155            <File
    152156                RelativePath=".\stdafx.cpp"
    153157                >
     
    190194            >
    191195        </Filter>
    192         <File
    193             RelativePath=".\ReadMe.txt"
    194             >
    195         </File>
    196196    </Files>
    197197    <Globals>
  • trunk/ab5.0/abdev/ab_common/stdafx.h

    r475 r477  
    2222#include <boost/foreach.hpp>
    2323
     24#include <jenga/include/common/CmdLine.h>
     25#include <jenga/include/common/Environment.h>
     26#include <jenga/include/common/File.h>
     27#include <jenga/include/common/Path.h>
    2428#include <jenga/include/common/String.h>
    25 #include <jenga/include/common/File.h>
    26 #include <jenga/include/common/CmdLine.h>
    27 #include <jenga/include/common/Path.h>
    2829
    2930#include "Environment.h"
  • trunk/ab5.0/jenga/include/common/Environment.h

    r205 r477  
    3737        return appDir;
    3838    }
     39
     40    static const std::string &GetAppFileName()
     41    {
     42        static std::string appFileName;
     43        if( appFileName.size() == 0 )
     44        {
     45            char temporary[MAX_PATH];
     46            char temp2[MAX_PATH];
     47            char temp3[MAX_PATH];
     48            GetModuleFileName(GetModuleHandle(0),temporary,MAX_PATH);
     49            _splitpath(temporary,NULL,NULL,temp2,temp3);
     50            lstrcat(temp2,temp3);
     51
     52            appFileName = temp2;
     53        }
     54        return appFileName;
     55    }
     56
     57    static const std::string &GetAppFilePath()
     58    {
     59        static std::string appFilePath;
     60        if( appFilePath.size() == 0 )
     61        {
     62            char temporary[MAX_PATH];
     63            GetModuleFileName(GetModuleHandle(0),temporary,MAX_PATH);
     64
     65            appFilePath = temporary;
     66        }
     67        return appFilePath;
     68    }
    3969};
    4070
  • trunk/ab5.0/jenga/src/common/Path.cpp

    r467 r477  
    5050    }
    5151
    52     i3=(int)baseDirPath.size();i4=0;
     52    std::string tempBaseDirPath = baseDirPath;
     53    if( tempBaseDirPath[tempBaseDirPath.size()-1] != '\\' )
     54    {
     55        tempBaseDirPath += "\\";
     56    }
     57
     58    i3=(int)tempBaseDirPath.size();i4=0;
    5359    while(i4<i2){
    5460        for(i3--;;i3--){
    55             if(baseDirPath[i3-1]=='\\'){
     61            if(tempBaseDirPath[i3-1]=='\\'){
    5662                i4++;
    5763                break;
     
    5965        }
    6066    }
    61     memcpy(temporary,baseDirPath.c_str(),i3);
     67    memcpy(temporary,tempBaseDirPath.c_str(),i3);
    6268    temporary[i3]=0;
    6369    lstrcat(temporary,resultPath+i);
    6470    lstrcpy(resultPath,temporary);
    6571
     72    if( resultPath[lstrlen(resultPath)-1] == '\\' )
     73    {
     74        resultPath[lstrlen(resultPath)-1] = 0;
     75    }
     76
    6677    return resultPath;
    6778}
Note: See TracChangeset for help on using the changeset viewer.