Index: /trunk/ab5.0/abdev/BasicCompiler32/BasicCompiler.vcproj
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler32/BasicCompiler.vcproj (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler32/BasicCompiler.vcproj (revision 477)
@@ -61,5 +61,5 @@
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="4"
+ DebugInformationFormat="3"
/>
+
+
Index: /trunk/ab5.0/abdev/BasicCompiler32/MakePeHdr.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler32/MakePeHdr.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler32/MakePeHdr.cpp (revision 477)
@@ -1106,5 +1106,5 @@
int DosStubSize;
hFile=CreateFile(
- ( Jenga::Common::Environment::GetAppDir() + "\\SubOperation\\dosstub.pgm" ).c_str(),
+ ( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dosstub.pgm" ).c_str(),
GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(hFile==INVALID_HANDLE_VALUE){
Index: /trunk/ab5.0/abdev/BasicCompiler32/stdafx.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler32/stdafx.h (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler32/stdafx.h (revision 477)
@@ -22,8 +22,11 @@
#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
+
+#include
#include "../BasicCompiler_Common/common.h"
@@ -31,4 +34,5 @@
#include
+#include
#include
#include
Index: /trunk/ab5.0/abdev/BasicCompiler64/BasicCompiler.vcproj
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler64/BasicCompiler.vcproj (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler64/BasicCompiler.vcproj (revision 477)
@@ -442,4 +442,8 @@
>
+
+
Index: /trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp (revision 477)
@@ -1105,5 +1105,5 @@
int DosStubSize;
hFile=CreateFile(
- ( Jenga::Common::Environment::GetAppDir() + "\\SubOperation\\dosstub.pgm" ).c_str(),
+ ( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dosstub.pgm" ).c_str(),
GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(hFile==INVALID_HANDLE_VALUE){
Index: /trunk/ab5.0/abdev/BasicCompiler64/stdafx.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler64/stdafx.h (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler64/stdafx.h (revision 477)
@@ -22,8 +22,11 @@
#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
+
+#include
#include "../BasicCompiler_Common/common.h"
@@ -31,4 +34,5 @@
#include
+#include
#include
#include
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp (revision 477)
@@ -93,4 +93,8 @@
void ts(const char *msg,const char *title){
MessageBox(0,FormatEscapeSequenceStringToDefaultString(msg).c_str(),title,0);
+}
+void ts(const std::string msg)
+{
+ ts(msg.c_str());
}
@@ -192,8 +196,14 @@
}
- i3=(int)baseDirPath.size();i4=0;
+ std::string tempBaseDirPath = baseDirPath;
+ if( tempBaseDirPath[tempBaseDirPath.size()-1] != '\\' )
+ {
+ tempBaseDirPath += "\\";
+ }
+
+ i3=(int)tempBaseDirPath.size();i4=0;
while(i4load();
+ program.Configurate();
+
if( !program.AnalysisCommandLines() )
{
@@ -664,10 +676,10 @@
if( program.GetIncludeDir().size() == 0 )
{
- program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( ".\\Include\\", baseDirPath ) );
+ program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( ".\\Include", ActiveBasic::Common::Environment::GetAbdevRootPath() ) );
}
else
{
// インクルードディレクトリを絶対パスに変更
- program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( program.GetIncludeDir(), baseDirPath ) );
+ program.SetIncludeDir( Jenga::Common::Path::MakeFullPath( program.GetIncludeDir(), ActiveBasic::Common::Environment::GetAbdevRootPath() ) );
}
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/common.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/common.h (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/common.h (revision 477)
@@ -216,4 +216,5 @@
void ts(const char *msg);
void ts(const char *msg,const char *title);
+void ts(const std::string msg);
void epi_check();
void GetRelationalPath(char *path,char *dir);
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/include/Configuration.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/include/Configuration.h (revision 477)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/include/Configuration.h (revision 477)
@@ -0,0 +1,29 @@
+#pragma once
+
+class Configuration
+ : public Jenga::Common::BoostSerializationSupport
+{
+ std::string abdevRootRelativePath;
+
+public:
+ Configuration()
+ {
+ }
+
+ const std::string &GetAbdevRootRelativePath() const
+ {
+ return abdevRootRelativePath;
+ }
+
+ // XMLシリアライズ用
+private:
+ virtual const char *RootTagName() const
+ {
+ return "configuration";
+ }
+ friend class boost::serialization::access;
+ template void serialize(Archive& ar, const unsigned int version)
+ {
+ ar & BOOST_SERIALIZATION_NVP( abdevRootRelativePath );
+ }
+};
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/include/Program.h (revision 477)
@@ -28,4 +28,6 @@
{
}
+
+ void Configurate();
bool AnalysisCommandLines();
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp (revision 477)
@@ -485,4 +485,6 @@
#include
+#include
template class Jenga::Common::BoostSerializationSupport;
+template class Jenga::Common::BoostSerializationSupport;
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp (revision 477)
@@ -163,5 +163,5 @@
destSource = "";
- SourceTemplate sourceTemplate( "\\SubOperation\\templates\\delegate_class.tab" );
+ SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" );
this->Iterator_Reset();
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/src/Program.cpp (revision 477)
@@ -10,4 +10,20 @@
Program program;
+
+void Program::Configurate()
+{
+ Configuration configuration;
+ const std::string filePath = Jenga::Common::Environment::GetAppDir() + "\\config.xml";
+ if( Jenga::Common::Path( filePath ).IsExistFile() )
+ {
+ configuration.ReadXml( filePath );
+ }
+ else
+ {
+ configuration.WriteXml( filePath );
+ }
+
+ ActiveBasic::Common::Environment::SetAbdevRootPath( configuration.GetAbdevRootRelativePath() );
+}
bool Program::AnalysisCommandLines()
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp (revision 476)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp (revision 477)
@@ -614,5 +614,5 @@
if(sw1){
- sprintf(temp2,"%s%s", program.GetIncludeDir().c_str(), temporary );
+ sprintf(temp2,"%s\\%s", program.GetIncludeDir().c_str(), temporary );
lstrcpy(temporary,temp2);
}
@@ -624,9 +624,9 @@
else if(memcmp(buffer+i+1,"prompt",6)==0){
i2=i+7;
- sprintf(temporary,"%sbasic\\prompt.sbp", program.GetIncludeDir().c_str() );
+ sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
}
else if(memcmp(buffer+i+1,"N88BASIC",8)==0){
i2=i+9;
- sprintf(temporary,"%sbasic\\prompt.sbp", program.GetIncludeDir().c_str() );
+ sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
}
else if(memcmp(buffer+i+1,"console",7)==0){
@@ -636,5 +636,5 @@
i2=i+8;
- sprintf(temporary,"%sbasic\\dos_console.sbp", program.GetIncludeDir().c_str() );
+ sprintf(temporary,"%s\\basic\\dos_console.sbp", program.GetIncludeDir().c_str() );
}
else continue;
Index: /trunk/ab5.0/abdev/ProjectEditor/Attach.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/Attach.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/Attach.cpp (revision 477)
@@ -91,5 +91,5 @@
/////////////////////////////////////////////////////
- std::string enumProcess64ExePath = Program::GetApplicationSystemDirPath() + "\\enum_process64\\enum_process64.exe";
+ std::string enumProcess64ExePath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\enum_process64\\enum_process64.exe";
STARTUPINFO si;
@@ -106,5 +106,5 @@
//////////////////////////////////
- std::string listPath = Program::GetApplicationSystemDirPath() + "\\enum_process64\\list.dat";
+ std::string listPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\enum_process64\\list.dat";
char *buffer;
Index: /trunk/ab5.0/abdev/ProjectEditor/ChildWndOnRebar.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/ChildWndOnRebar.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/ChildWndOnRebar.cpp (revision 477)
@@ -85,7 +85,13 @@
i=SendMessage(hwnd,CB_GETCURSEL,0,0);
- extern char *lpszCompilerName;
- if(i==0) lpszCompilerName=WIN32_COMPILER_NAME;
- if(i==1) lpszCompilerName=WIN64_COMPILER_NAME;
+ extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
+ if( i == 0 )
+ {
+ selectingPlatform = ActiveBasic::Common::Platform::X86;
+ }
+ else if( i == 1 )
+ {
+ selectingPlatform = ActiveBasic::Common::Platform::X64;
+ }
}
break;
Index: /trunk/ab5.0/abdev/ProjectEditor/Common.h
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/Common.h (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/Common.h (revision 477)
@@ -69,8 +69,4 @@
#endif
-
-
-#define WIN32_COMPILER_NAME "BasicCompiler32.exe"
-#define WIN64_COMPILER_NAME "BasicCompiler64.exe"
Index: /trunk/ab5.0/abdev/ProjectEditor/DesignTheme.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/DesignTheme.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/DesignTheme.cpp (revision 477)
@@ -39,5 +39,6 @@
}
CTheme::CTheme(){
- CTheme(0,THEMENAME_USER);
+ bActive=0;
+ lstrcpy(m_name,THEMENAME_USER);
}
CTheme::~CTheme(){
Index: /trunk/ab5.0/abdev/ProjectEditor/ProjectControl.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/ProjectControl.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/ProjectControl.cpp (revision 477)
@@ -898,5 +898,5 @@
}
else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX){
- const std::string mainExeDirectXAbpPath = Program::GetApplicationSystemDirPath() + "\\system\\dx\\main_exe_directx.abp";
+ const std::string mainExeDirectXAbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\main_exe_directx.abp";
pTemp = ReadBuffer( mainExeDirectXAbpPath );
@@ -969,9 +969,9 @@
if(NewProjectInfo.dwTypeID==IDC_EXE_WINDOWBASE)
{
- mainWndSbpPath = Program::GetApplicationSystemDirPath() + "\\MainWnd_exe_windowbase.sbp";
+ mainWndSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\MainWnd_exe_windowbase.sbp";
}
else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX)
{
- mainWndSbpPath = Program::GetApplicationSystemDirPath() + "\\MainWnd_exe_directx.sbp";
+ mainWndSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\MainWnd_exe_directx.sbp";
}
@@ -1017,5 +1017,5 @@
//dx_graphics.sbpをコピー
- const std::string dxGraphicsSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_graphics.sbp";
+ const std::string dxGraphicsSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_graphics.sbp";
pTemp = ReadBuffer( dxGraphicsSbpPath );
sprintf(temporary,"%sdx_graphics.sbp",dir,NewProjectInfo.name);
@@ -1024,5 +1024,5 @@
//dx_input.sbpをコピー
- const std::string dxInputSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_input.sbp";
+ const std::string dxInputSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_input.sbp";
pTemp = ReadBuffer( dxInputSbpPath );
sprintf(temporary,"%sdx_input.sbp",dir,NewProjectInfo.name);
@@ -1031,5 +1031,5 @@
//dx_music.sbpをコピー
- const std::string dxMusicSbpPath = Program::GetApplicationSystemDirPath() + "\\dx\\dx_music.sbp";
+ const std::string dxMusicSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dx\\dx_music.sbp";
pTemp = ReadBuffer( dxMusicSbpPath );
sprintf(temporary,"%sdx_music.sbp",dir,NewProjectInfo.name);
@@ -1097,5 +1097,5 @@
//マニフェストを作成
char temp2[MAX_PATH];
- const std::string manifestTempXmlPath = Program::GetApplicationSystemDirPath() + "\\manifest_temp.xml";
+ const std::string manifestTempXmlPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\manifest_temp.xml";
sprintf(temp2,"%s%s.manifest.xml",dir,NewProjectInfo.name);
CopyFile( manifestTempXmlPath.c_str(), temp2, 0 );
@@ -2372,5 +2372,4 @@
BOOL SetProjectToRun(void){
extern PROJECTINFO ProjectInfo;
- char temporary[MAX_PATH];
HANDLE hFind;
WIN32_FIND_DATA wfd;
@@ -2382,7 +2381,6 @@
}
- extern char *lpszCompilerName;
- sprintf(temporary,"%s%s",pj_editor_Dir,lpszCompilerName);
- hFind=FindFirstFile(temporary,&wfd);
+ extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
+ hFind=FindFirstFile( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ).c_str(), &wfd );
if(hFind==INVALID_HANDLE_VALUE){
//"BasicCompiler.exe が見つかりません"
Index: /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.cpp (revision 477)
@@ -89,5 +89,5 @@
-void CreateProcessWithStdHandle( const char *appPath, const char *cmdLine)
+void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine)
{
std::string argsStr = (std::string)"\"" + appPath + "\" " + cmdLine;
@@ -2082,7 +2082,5 @@
lstrcat(temporary,temp2);
- sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
-
- CreateProcessWithStdHandle( str, temporary );
+ CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
return 0;
@@ -2134,7 +2132,5 @@
lstrcat(temporary,temp2);
- sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
-
- CreateProcessWithStdHandle( str, temporary );
+ CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
return 0;
@@ -2167,10 +2163,19 @@
lstrcat(temporary,temp2);
+ ActiveBasic::Common::Platform::EnumType platform;
if(dwPlatform==IMAGE_FILE_MACHINE_I386)
- sprintf(str,"%s%s",pj_editor_Dir,WIN32_COMPILER_NAME);
+ {
+ platform = ActiveBasic::Common::Platform::X86;
+ }
else if(dwPlatform==IMAGE_FILE_MACHINE_AMD64)
- sprintf(str,"%s%s",pj_editor_Dir,WIN64_COMPILER_NAME);
-
- CreateProcessWithStdHandle( str, temporary );
+ {
+ platform = ActiveBasic::Common::Platform::X64;
+ }
+ else
+ {
+ throw;
+ }
+
+ CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary );
return 0;
@@ -2222,7 +2227,5 @@
lstrcat(temporary,temp2);
- sprintf(str,"%s%s",pj_editor_Dir,lpszCompilerName);
-
- CreateProcessWithStdHandle( str, temporary );
+ CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
return 0;
Index: /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.h
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.h (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.h (revision 477)
@@ -39,5 +39,5 @@
HBRUSH h3DFaceBackBrush;
DWORD dwRadClipboardID;
-char *lpszCompilerName;
+ActiveBasic::Common::Platform::EnumType selectingPlatform = ActiveBasic::Common::Platform::X86;
FWINLAYER pSetLayeredWindowAttributes;
Index: /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.vcproj
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.vcproj (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/ProjectEditor.vcproj (revision 477)
@@ -411,4 +411,12 @@
+
+
Index: /trunk/ab5.0/abdev/ProjectEditor/SubOperation.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/SubOperation.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/SubOperation.cpp (revision 477)
@@ -911,13 +911,13 @@
//リソース用DLLをマッピング
- const std::string resDllPath = Program::GetApplicationSystemDirPath() + "\\res.dll";
+ const std::string resDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\res.dll";
hResInst = LoadLibrary( resDllPath.c_str() );
//アイコンリソースDLLをマッピング
- const std::string iconResDllPath = Program::GetApplicationSystemDirPath() + "\\icon_res.dll";
+ const std::string iconResDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\icon_res.dll";
hIconResInst = LoadLibrary( iconResDllPath.c_str() );
//LuxCtrl.dllをマッピング
- const std::string luxCtrlDllPath = Program::GetApplicationSystemDirPath() + "\\LuxCtrl.dll";
+ const std::string luxCtrlDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\LuxCtrl.dll";
hLib_LuxCtrl = LoadLibrary( luxCtrlDllPath.c_str() );
if(!hLib_LuxCtrl){
@@ -949,8 +949,4 @@
ScreenX=GetSystemMetrics(SM_CXSCREEN);
ScreenY=GetSystemMetrics(SM_CYSCREEN);
-
- //コンパイラ名をセット(デフォルトはWin32)
- extern char *lpszCompilerName;
- lpszCompilerName=WIN32_COMPILER_NAME;
//不揮発性のデータを取得
@@ -1220,5 +1216,5 @@
HANDLE hFile;
DWORD dw;
- const std::string pltPath = Program::GetApplicationSystemDirPath() + "\\8bit.plt";
+ const std::string pltPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\8bit.plt";
hFile=CreateFile(pltPath.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(hFile==INVALID_HANDLE_VALUE){
@@ -1473,11 +1469,10 @@
extern LPSTR DefFileFilter;
int WndNum;
- char temporary[MAX_PATH],temp2[MAX_PATH];
+ char temp2[MAX_PATH];
HANDLE hFind;
WIN32_FIND_DATA wfd;
- extern char *lpszCompilerName;
- sprintf(temporary,"%s%s",pj_editor_Dir,lpszCompilerName);
- hFind=FindFirstFile(temporary,&wfd);
+ extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
+ hFind=FindFirstFile(ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ).c_str(),&wfd);
if(hFind==INVALID_HANDLE_VALUE){
//"BasicCompiler.exe が見つかりません"
Index: /trunk/ab5.0/abdev/ProjectEditor/WindowControl.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/WindowControl.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/WindowControl.cpp (revision 477)
@@ -2259,5 +2259,5 @@
//テンプレートを読み込む
- const std::string newWindowTemplateSbpPath = Program::GetApplicationSystemDirPath() + "\\new_window_template.sbp";
+ const std::string newWindowTemplateSbpPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\new_window_template.sbp";
pTemp = ReadBuffer( newWindowTemplateSbpPath );
Index: /trunk/ab5.0/abdev/ProjectEditor/common_msg_jpn.h
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/common_msg_jpn.h (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/common_msg_jpn.h (revision 477)
@@ -78,5 +78,5 @@
#define STRING_FILE_OVERWRIDE "\"%s\" ファイルは既に存在しています。上書きしますか?"
#define STRING_ERROR_MAXLENGTH "これ以上、テキストを入力することができません"
-#define STRING_ERROR_NOBASICCOMPILER "BasicCompiler が見つかりません"
+#define STRING_ERROR_NOBASICCOMPILER "対象プラットフォームのビルドモジュールが見つかりません"
#define STRING_ERROR_PROJECTTOPCHAR "プロジェクト名の先頭文字はアルファベット(A~Z、a~z)またはアンダーバー(_)でなければなりません。"
#define STRING_ERROR_PROJECTNAME "プロジェクト名に不正な文字コードが含まれています。"
Index: /trunk/ab5.0/abdev/ProjectEditor/include/Program.h
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/include/Program.h (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/include/Program.h (revision 477)
@@ -7,8 +7,4 @@
{
public:
- static const std::string GetApplicationSystemDirPath()
- {
- return Jenga::Common::Environment::GetAppDir() + "\\system";
- }
};
Index: /trunk/ab5.0/abdev/ProjectEditor/nkf_class.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/nkf_class.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/nkf_class.cpp (revision 477)
@@ -10,6 +10,10 @@
CNkf::CNkf()
{
- const std::string nkf32DllPath = Program::GetApplicationSystemDirPath() + "\\system\\nkf32.dll";
+ const std::string nkf32DllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\nkf32.dll";
hLib = LoadLibrary( nkf32DllPath.c_str() );
+ if( !hLib )
+ {
+ MessageBox( NULL, "nkf32.dll が見つかりません。", "エラー", MB_OK | MB_ICONEXCLAMATION );
+ }
pGetNkfVersion=(GetNkfVersion)GetProcAddress(hLib,"GetNkfVersion");
Index: /trunk/ab5.0/abdev/ProjectEditor/reg_exp.cpp
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/reg_exp.cpp (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/reg_exp.cpp (revision 477)
@@ -9,6 +9,10 @@
CRegExp::CRegExp()
{
- const std::string bregexpDllPath = Program::GetApplicationSystemDirPath() + "\\system\\BREGEXP.dll";
+ const std::string bregexpDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\BREGEXP.dll";
hLib = LoadLibrary( bregexpDllPath.c_str() );
+ if( !hLib )
+ {
+ MessageBox( NULL, "BREGEXP.dll �����Â���Ü��B", "Gñ��[", MB_OK | MB_ICONEXCLAMATION );
+ }
BMatch=(PFUNC_BMatch)GetProcAddress(hLib,"BMatch");
@@ -37,8 +41,8 @@
else sprintf(pTemp,"m/(%s)/",exp);
- //Shift-JISナ表
+ //Shift-JIS?
lstrcat(pTemp,"k");
- //蝠カE
+ //?E
if(!IsBigSmall) lstrcat(pTemp,"i");
@@ -81,8 +85,8 @@
else sprintf(pTemp,"s/%s/%s/",exp,szPermu);
- //Shift-JISナ表
+ //Shift-JIS?
lstrcat(pTemp,"k");
- //蝠カE
+ //?E
if(!IsBigSmall) lstrcat(pTemp,"i");
Index: /trunk/ab5.0/abdev/ProjectEditor/stdafx.h
===================================================================
--- /trunk/ab5.0/abdev/ProjectEditor/stdafx.h (revision 476)
+++ /trunk/ab5.0/abdev/ProjectEditor/stdafx.h (revision 477)
@@ -28,3 +28,5 @@
#include
+#include
+
#include
Index: /trunk/ab5.0/abdev/ab_common/Environment.cpp
===================================================================
--- /trunk/ab5.0/abdev/ab_common/Environment.cpp (revision 477)
+++ /trunk/ab5.0/abdev/ab_common/Environment.cpp (revision 477)
@@ -0,0 +1,21 @@
+#include "stdafx.h"
+
+std::string ActiveBasic::Common::Environment::rootPath = Jenga::Common::Environment::GetAppDir();
+
+using namespace ActiveBasic::Common;
+
+void Environment::SetAbdevRootPath( const std::string &rootPath )
+{
+ Environment::rootPath = Jenga::Common::Path::MakeFullPath( rootPath, Jenga::Common::Environment::GetAppDir() );
+}
+const std::string Environment::GetCompilerExePath( Platform::EnumType platform )
+{
+ switch( platform )
+ {
+ case Platform::X86:
+ return rootPath + "\\bin\\x86\\abc.exe";
+ case Platform::X64:
+ return rootPath + "\\bin\\x64\\abc.exe";
+ }
+ throw;
+}
Index: /trunk/ab5.0/abdev/ab_common/Environment.h
===================================================================
--- /trunk/ab5.0/abdev/ab_common/Environment.h (revision 476)
+++ /trunk/ab5.0/abdev/ab_common/Environment.h (revision 477)
@@ -4,10 +4,30 @@
+struct Platform
+{
+ enum EnumType
+ {
+ X86,
+ X64,
+ };
+};
+
class Environment
{
+ static std::string rootPath;
public:
- static const std::string GetAbdevRootPath();
- static const std::string GetX86CompilerExePath();
- static const std::string GetX64CompilerExePath();
+ static void SetAbdevRootPath( const std::string &rootPath );
+
+ static const std::string GetAbdevRootPath()
+ {
+ return rootPath;
+ }
+
+ static const std::string GetAbdevSystemDirPath()
+ {
+ return GetAbdevRootPath() + "\\system";
+ }
+
+ static const std::string GetCompilerExePath( Platform::EnumType platform );
};
Index: /trunk/ab5.0/abdev/ab_common/ab_common.vcproj
===================================================================
--- /trunk/ab5.0/abdev/ab_common/ab_common.vcproj (revision 476)
+++ /trunk/ab5.0/abdev/ab_common/ab_common.vcproj (revision 477)
@@ -150,4 +150,8 @@
>
+
+
@@ -190,8 +194,4 @@
>
-
-
Index: /trunk/ab5.0/abdev/ab_common/stdafx.h
===================================================================
--- /trunk/ab5.0/abdev/ab_common/stdafx.h (revision 476)
+++ /trunk/ab5.0/abdev/ab_common/stdafx.h (revision 477)
@@ -22,8 +22,9 @@
#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
#include "Environment.h"
Index: /trunk/ab5.0/jenga/include/common/Environment.h
===================================================================
--- /trunk/ab5.0/jenga/include/common/Environment.h (revision 476)
+++ /trunk/ab5.0/jenga/include/common/Environment.h (revision 477)
@@ -37,4 +37,34 @@
return appDir;
}
+
+ static const std::string &GetAppFileName()
+ {
+ static std::string appFileName;
+ if( appFileName.size() == 0 )
+ {
+ char temporary[MAX_PATH];
+ char temp2[MAX_PATH];
+ char temp3[MAX_PATH];
+ GetModuleFileName(GetModuleHandle(0),temporary,MAX_PATH);
+ _splitpath(temporary,NULL,NULL,temp2,temp3);
+ lstrcat(temp2,temp3);
+
+ appFileName = temp2;
+ }
+ return appFileName;
+ }
+
+ static const std::string &GetAppFilePath()
+ {
+ static std::string appFilePath;
+ if( appFilePath.size() == 0 )
+ {
+ char temporary[MAX_PATH];
+ GetModuleFileName(GetModuleHandle(0),temporary,MAX_PATH);
+
+ appFilePath = temporary;
+ }
+ return appFilePath;
+ }
};
Index: /trunk/ab5.0/jenga/src/common/Path.cpp
===================================================================
--- /trunk/ab5.0/jenga/src/common/Path.cpp (revision 476)
+++ /trunk/ab5.0/jenga/src/common/Path.cpp (revision 477)
@@ -50,8 +50,14 @@
}
- i3=(int)baseDirPath.size();i4=0;
+ std::string tempBaseDirPath = baseDirPath;
+ if( tempBaseDirPath[tempBaseDirPath.size()-1] != '\\' )
+ {
+ tempBaseDirPath += "\\";
+ }
+
+ i3=(int)tempBaseDirPath.size();i4=0;
while(i4