예제 #1
0
bool CompilerFactory::find_tool_type (const char* argv0,bool option,const std::string &appli_path,std::string &option_tool_name, bool &profile_inactive) 
{
  FUNCTION_TRACE;
  DEBUG4("find_tool_type (argv0=%s,option=%s,appli_path=%s)\n",argv0,(option?"true":"false"),appli_path.c_str());
  std::string exe_param=System::appendExecSuffix(argv0);
  if (name_check(exe_param,std::string(),!option))
  {
    std::string name;
    profile_inactive=false;
    if (option)
      name=exe_param;
    else
      extract_tool_name(exe_param,name,true,profile_inactive);
    option_tool_name=name;
    struct stat info;
    DEBUG2("option_tool_name=%s\n",option_tool_name.c_str());
    std::string pf=profile_name(option_tool_name,appli_path);
    DEBUG2("pf=%s\n",pf.c_str());
    if (stat(pf.c_str(),&info)!=0)
    {
      option_tool_name=findFileInPath(name);
      DEBUG2("option_tool_name=%s\n",option_tool_name.c_str());
      std::string pf=profile_name(option_tool_name,appli_path);
      DEBUG2("pf=%s\n",pf.c_str());
      if (pf.length()>0 && (stat(pf.c_str(),&info)!=0) )
      {
         DEBUG2("profile (%s) not found\n",option_tool_name.c_str());
         option_tool_name.clear();
      }
    }
    return true;
  }
  return false;
}
예제 #2
0
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::buildMediaManagerData( LLMediaManagerData* init_data )
{
//	std::string executable_dir = std::string( arg0 ).substr( 0, std::string( arg0 ).find_last_of("\\/") );
//	std::string component_dir = std::string( executable_dir ).substr( 0, std::string( executable_dir ).find_last_of("\\/") );
//	component_dir = std::string( component_dir ).substr( 0, std::string( component_dir ).find_last_of("\\/") );
//	component_dir = std::string( component_dir ).substr( 0, std::string( component_dir ).find_last_of("\\/") );
//	component_dir += "\\newview\\app_settings\\mozilla";


#if LL_DARWIN
	// For Mac OS, we store both the shared libraries and the runtime files (chrome/, plugins/, etc) in
	// Second Life.app/Contents/MacOS/.  This matches the way Firefox is distributed on the Mac.
	std::string component_dir(gDirUtilp->getExecutableDir());
#elif LL_WINDOWS
	std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
	component_dir += gDirUtilp->getDirDelimiter();
  #ifdef LL_DEBUG
	component_dir += "mozilla_debug";
  #else // LL_DEBUG
	component_dir += "mozilla";
  #endif // LL_DEBUG
#elif LL_LINUX
	std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
	component_dir += gDirUtilp->getDirDelimiter();
	component_dir += "mozilla-runtime-linux-i686";
#else
	std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
	component_dir += gDirUtilp->getDirDelimiter();
	component_dir += "mozilla";
#endif

	std::string application_dir = gDirUtilp->getExecutableDir();

	init_data->setBrowserApplicationDir( application_dir );
	std::string profile_dir = gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" );
	init_data->setBrowserProfileDir( profile_dir );
	init_data->setBrowserComponentDir( component_dir );
	std::string profile_name("Meerkat");
	init_data->setBrowserProfileName( profile_name );
	init_data->setBrowserParentWindow( gViewerWindow->getMediaWindow() );

	// Users can change skins while client is running, so make sure
	// we pick up on changes.
	gSavedSettings.getControl("SkinCurrent")->getSignal()->connect( 
		boost::bind( LLViewerMediaImpl::handleSkinCurrentChanged, _1 ) );

}