source: dev/trunk/ab5.0/abdev/ab_common/src/Environment.cpp@ 730

Last change on this file since 730 was 719, checked in by dai, 16 years ago
  • ab_breakpoint.tmpをテンポラリディレクトリに生成するようにした。
  • pgm.tmpをユーザ空間に生成するようにした。
  • GetUserAppDir/GetIdeUserAppDir/GetAbcUserAppDirの各メソッドを用意。用途別に呼び出し側の制御を分けた。
File size: 899 bytes
Line 
1#include "stdafx.h"
2
3std::string ActiveBasic::Common::Environment::rootPath;
4bool ActiveBasic::Common::Environment::isRemoveExternal = false;
5
6using namespace ActiveBasic::Common;
7
8void Environment::SetAbdevRootPath( const std::string &rootPath )
9{
10 Environment::rootPath = Jenga::Common::Path::MakeFullPath( rootPath, Jenga::Common::Environment::GetAppDir() );
11}
12const std::string Environment::GetAbdevRootPath()
13{
14 if( rootPath.empty() )
15 {
16 SetAbdevRootPath( "" );
17 }
18 return rootPath;
19}
20
21const std::string Environment::GetUserAppDir()
22{
23 return Jenga::Common::Environment::GetUserAppDir() + "\\ActiveBasic";
24}
25
26const std::string Environment::GetCompilerExePath( Platform::EnumType platform )
27{
28 switch( platform )
29 {
30 case Platform::X86:
31 return rootPath + "\\bin\\x86\\abc.exe";
32 case Platform::X64:
33 return rootPath + "\\bin\\x64\\abc.exe";
34 }
35 throw;
36}
Note: See TracBrowser for help on using the repository browser.