- Timestamp:
- Sep 15, 2008, 6:06:34 PM (16 years ago)
- Location:
- trunk/ab5.0
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/include/MainFrame.h
r697 r749 31 31 32 32 // Explorerでパスを開く 33 void OpenExplorer( const std::string & path );33 void OpenExplorer( const std::string &filepath ); 34 34 35 35 // 生成された -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r719 r749 7 7 void SetupWindow(HWND hwnd); 8 8 void ResetTextEditFont(HWND hwnd); 9 10 void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine, bool isShowWindow = true ) 11 { 12 std::string argsStr = "\"" + appPath + "\" " + cmdLine; 13 STARTUPINFO si; 14 PROCESS_INFORMATION pi; 15 memset(&si,0,sizeof(STARTUPINFO)); 16 si.cb=sizeof(STARTUPINFO); 17 si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; 18 si.wShowWindow = isShowWindow ? SW_SHOW : SW_HIDE; 19 si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); 20 si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); 21 si.hStdError = GetStdHandle(STD_ERROR_HANDLE); 22 23 char args[8192]; 24 lstrcpy( args, argsStr.c_str() ); 25 26 CreateProcess( NULL, args, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi ); 27 CloseHandle( pi.hProcess ); 28 CloseHandle( pi.hThread ); 29 } 9 30 10 31 void MainFrame::Resized() … … 166 187 } 167 188 168 void MainFrame::OpenExplorer( const std::string & path )169 { 170 ShellExecute(m_hWnd,"explore",path.c_str(),NULL,NULL,SW_SHOWNORMAL);189 void MainFrame::OpenExplorer( const std::string &filepath ) 190 { 191 CreateProcessWithStdHandle( "explorer", "/select,\"" + filepath + "\"" ); 171 192 } 172 193 … … 1098 1119 } 1099 1120 1100 void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine)1101 {1102 std::string argsStr = "\"" + appPath + "\" " + cmdLine;1103 STARTUPINFO si;1104 PROCESS_INFORMATION pi;1105 memset(&si,0,sizeof(STARTUPINFO));1106 si.cb=sizeof(STARTUPINFO);1107 si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;1108 si.wShowWindow = SW_HIDE;1109 si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);1110 si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);1111 si.hStdError = GetStdHandle(STD_ERROR_HANDLE);1112 1113 char args[8192];1114 lstrcpy( args, argsStr.c_str() );1115 1116 CreateProcess( NULL, args, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi );1117 CloseHandle( pi.hProcess );1118 CloseHandle( pi.hThread );1119 }1120 1121 1121 #ifndef THETEXT 1122 1122 void MainFrame::OnCmdDebug( UINT uNotifyCode, int nID, CWindow wndCtl ) … … 1213 1213 1214 1214 extern ActiveBasic::Common::Platform::EnumType selectingPlatform; 1215 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );1215 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false ); 1216 1216 } 1217 1217 … … 1281 1281 1282 1282 extern ActiveBasic::Common::Platform::EnumType selectingPlatform; 1283 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary ); 1284 1283 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false ); 1285 1284 } 1286 1285 … … 1333 1332 1334 1333 extern ActiveBasic::Common::Platform::EnumType selectingPlatform; 1335 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary );1334 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary, false ); 1336 1335 } 1337 1336 … … 1401 1400 1402 1401 extern ActiveBasic::Common::Platform::EnumType selectingPlatform; 1403 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );1402 CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false ); 1404 1403 } 1405 1404 … … 1642 1641 int WndNum=GetWndNum(hChild); 1643 1642 1644 char temporary[1024], temp2[1024]; 1645 _splitpath(MdiInfo[WndNum]->path.c_str(),temporary,temp2,NULL,NULL); 1646 lstrcat(temporary,temp2); 1647 1648 OpenExplorer( temporary ); 1643 OpenExplorer( MdiInfo[WndNum]->path ); 1649 1644 } 1650 1645 -
trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp
r744 r749 481 481 // 格納先ディレクトリを作る 482 482 Jenga::Common::Path path( program.GetOutputFilePath() ); 483 Jenga::Common::Directory dir( path.GetD riveName() + path.GetDirName(), true );483 Jenga::Common::Directory dir( path.GetDirPath(), true ); 484 484 485 485 // 書き込む -
trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp
r743 r749 511 511 // 格納先ディレクトリを作る 512 512 Jenga::Common::Path path( program.GetOutputFilePath() ); 513 Jenga::Common::Directory dir( path.GetD riveName() + path.GetDirName(), true );513 Jenga::Common::Directory dir( path.GetDirPath(), true ); 514 514 515 515 // 書き込む -
trunk/ab5.0/jenga/include/common/Path.h
r630 r749 39 39 return driveName; 40 40 } 41 const std::string &GetDirName() const41 const std::string GetDirPath() const 42 42 { 43 return d irName;43 return driveName + dirName; 44 44 } 45 45 const std::string &GetFileName() const … … 50 50 { 51 51 return ext; 52 } 53 const std::string GetFullFileName() const 54 { 55 return fileName + ext; 52 56 } 53 57 const std::string &GetFullPath() const -
trunk/ab5.0/jenga/src/common/FileSystem.cpp
r694 r749 11 11 12 12 Jenga::Common::Path path( tempFindStr ); 13 std::string dirPath = path.GetD riveName() + path.GetDirName();13 std::string dirPath = path.GetDirPath(); 14 14 if( !dirPath.empty() && dirPath[dirPath.size()-1] == '\\' ) 15 15 { -
trunk/ab5.0/jenga/src/common/Path.cpp
r623 r749 79 79 std::string Jenga::Common::Path::ExtractDirPath( const std::string &filepath ) 80 80 { 81 Path path( filepath ); 82 std::string result = path.GetDriveName() + path.GetDirName(); 83 return result; 81 return Path( filepath ).GetDirPath(); 84 82 }
Note:
See TracChangeset
for help on using the changeset viewer.