예제 #1
0
UnixEnvironment::UnixEnvironment()
{
    dtMountPoint = getEnvironmentVariable("DTMOUNTPOINT");
    if (dtMountPoint.isNull())
#if defined(sun) || defined(USL) || defined(__uxp__)
	dtMountPoint = "/net/";
#else
	dtMountPoint = "/nfs/";
#endif

    CString temp = getEnvironmentVariable("MANPATH");
    if (temp.isNull())
#if defined(sun) || defined(USL) || defined(__uxp__)
	manpath = "/usr/share/man";
#elif defined(_AIX)
	manpath = "/usr/share/man:/usr/lpp/info";
#elif defined(hpux)
	manpath = "/usr/man:/usr/contrib/man:/usr/local/man";
#elif defined(__osf__)
        manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man";
#elif defined(linux)
        manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man";
#elif defined(__OpenBSD__)
	manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man";
#elif defined(__FreeBSD__)
	manpath = "/usr/share/man:/usr/local/man";
#endif
    else
예제 #2
0
void TargetPage::setVisualStudioVersion()
{
  if (hasVisualStudioFolder(L"2019"))
    _visualStudioVersion=VS2019;
  else if (hasVisualStudioFolder(L"2017"))
    _visualStudioVersion=VS2017;
  else if (!getEnvironmentVariable(L"VS140COMNTOOLS").empty())
    _visualStudioVersion=VS2015;
  else if (!getEnvironmentVariable(L"VS120COMNTOOLS").empty())
    _visualStudioVersion=VS2013;
  else if (!getEnvironmentVariable(L"VS110COMNTOOLS").empty())
    _visualStudioVersion=VS2012;
  else if (!getEnvironmentVariable(L"VS100COMNTOOLS").empty())
    _visualStudioVersion=VS2010;
  else
    _visualStudioVersion=VS2002;
}
예제 #3
0
bool TargetPage::hasVisualStudioFolder(const wchar_t *name)
{
  wstring
    path;

  path=getEnvironmentVariable(L"ProgramFiles(x86)") + L"\\Microsoft Visual Studio\\" + name;
  return(PathFileExists(path.c_str()) ? true : false);
}
예제 #4
0
std::string
findConfigFile(const std::string& filename){
    if (std::fileexists(filename))
        return filename;

    std::string path_holders[] = {getEnvironmentVariable(ENV_PATH_NAME), HARDCORED_LOCATIONS};
    for (int i=0; i<2; i++){
        if (path_holders[i].empty()) continue;
        for (std::string path : std::split(path_holders[i], ":")){
            if (path.empty()) continue;
            std::string filepath(path+"/"+filename);
            if (std::fileexists(filepath))
                return filepath;
        }
    }

    return "";
}
    //---------------------------------------------------------------
    void DocumentExporter::exportAsset()
    {
        COLLADASW::Asset asset ( &mStreamWriter );

        // Add contributor information
        // Set the author
        String userName = getEnvironmentVariable ( "USERNAME" );

        if ( userName.empty() )
            userName = getEnvironmentVariable ( "USER" );

        if ( !userName.empty() )
            asset.getContributor().mAuthor = String ( userName );

		const COLLADASW::URI maxFileUri = mExportSceneGraph->getMaxFileUri();
		if ( !maxFileUri.getPathFile().empty() )
			asset.getContributor().mSourceData = maxFileUri.getURIString();

        asset.getContributor().mAuthoringTool = AUTHORING_TOOL;


        // set *system* unit information
        int systemUnitType;

        float systemUnitScale;

        GetMasterUnitInfo ( &systemUnitType, &systemUnitScale );

        switch ( systemUnitType )
        {

        case UNITS_INCHES:
            asset.setUnit ( "inch", systemUnitScale * 0.0254f );
            break;

        case UNITS_FEET:
            asset.setUnit ( "feet", systemUnitScale * 0.3048f );
            break;

        case UNITS_MILES:
            asset.setUnit ( "mile", systemUnitScale * 1609.344f );
            break;

        case UNITS_MILLIMETERS:
            asset.setUnit ( "millimeter", systemUnitScale * 0.001f );
            break;

        case UNITS_CENTIMETERS:
            asset.setUnit ( "centimeter", systemUnitScale * 0.01f );
            break;

        case UNITS_METERS:
            asset.setUnit ( "meter", systemUnitScale );
            break;

        case UNITS_KILOMETERS:
            asset.setUnit ( "kilometer", systemUnitScale * 1000.0f );
            break;

        default:
            break;
        }

        asset.setUpAxisType ( COLLADASW::Asset::Z_UP );

        asset.add();
    }
예제 #6
0
bool TargetPage::openCLIncludePathExists(const wchar_t *name)
{
  _openCLIncludePath=getEnvironmentVariable(name) + L"\\include";
  return(PathFileExists(_openCLIncludePath.c_str()) ? true : false);
}
예제 #7
0
	manpath = "/usr/share/man:/usr/lpp/info";
#elif defined(hpux)
	manpath = "/usr/man:/usr/contrib/man:/usr/local/man";
#elif defined(__osf__)
        manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man";
#elif defined(linux)
        manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man";
#elif defined(__OpenBSD__)
	manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man";
#elif defined(__FreeBSD__)
	manpath = "/usr/share/man:/usr/local/man";
#endif
    else
	manpath = temp;

    lang = getEnvironmentVariable("LANG");
    if (lang.isNull())
	lang = "C";

    localHost = "localhost";

    CString sh(getEnvironmentVariable("SHELL"));

    cshFormat = 0;
    if (isCsh(sh)) {
        shell_ = new CShell();
        cshFormat = 1;
    }
    else
        shell_ = new KShell();