Go to the documentation of this file.
41 #include "tce_config.h"
85 #define INSTALLATION_DIR "/share/openasip/"
86 #define DS TCEString(FileSystem::DIRECTORY_SEPARATOR)
114 string(TCE_SRC_ROOT) +
127 if (traceEnv !=
"") {
155 string schemaPath =
pathTo(path);
180 string dataPath =
pathTo(path);
206 string bitmapsPath =
pathTo(path);
230 string iconPath =
pathTo(path);
254 string manPath =
pathTo(path);
295 return installedConf;
347 std::vector<std::string>
349 vector<string> includes;
350 const std::string ROOT = string(TCE_SRC_ROOT);
351 const std::string BASE = ROOT +
DS +
"src" +
DS +
"base";
352 const std::string APPLIBS = ROOT +
DS +
"src" +
DS +
"applibs";
353 const std::string BLD = string(TCE_BLD_ROOT);
356 includes.push_back(ROOT);
357 includes.push_back(ROOT +
DS +
"src" +
DS +
"tools");
358 includes.push_back(BASE +
DS +
"osal");
359 includes.push_back(BASE +
DS +
"memory");
360 includes.push_back(BASE +
DS +
"bem");
361 includes.push_back(BASE +
DS +
"Graph");
362 includes.push_back(BASE +
DS +
"idf");
363 includes.push_back(BASE +
DS +
"mach");
364 includes.push_back(BASE +
DS +
"program");
365 includes.push_back(BASE +
DS +
"tpef");
366 includes.push_back(BASE +
DS +
"umach");
367 includes.push_back(APPLIBS +
DS +
"Simulator");
368 includes.push_back(APPLIBS +
DS +
"mach");
369 includes.push_back(APPLIBS +
DS +
"FSA");
370 includes.push_back(TCE_BLD_ROOT);
385 string BASE = TCE_SRC_ROOT +
DS +
"src" +
DS +
"base";
387 vector<string> includePaths;
388 includePaths.push_back(BASE +
DS +
"osal ");
389 includePaths.push_back(BASE +
DS +
"tpef ");
390 includePaths.push_back(BASE +
DS +
"memory ");
391 includePaths.push_back(TCE_SRC_ROOT +
DS +
"src" +
DS +
"tools");
392 includePaths.push_back(TCE_SRC_ROOT);
408 char* varValue = getenv(variable.c_str());
409 if (varValue == NULL) {
447 for (
unsigned int i = 0; i <
pathsToUse_.size(); ++i) {
521 vector<string> paths;
528 string src = string(TCE_BLD_ROOT) +
DS +
"opset" +
DS +
"base";
573 vector<string> paths;
576 string path = string(TCE_SRC_ROOT) +
DS +
"compressors";
577 paths.push_back(path);
580 "codecompressors" +
DS +
"base";
582 "codecompressors" +
DS +
"custom";
584 "codecompressors" +
DS +
"custom";
586 paths.push_back(base);
587 paths.push_back(personal);
588 paths.push_back(custom);
591 if (!libraryPathsOnly) paths.push_back(cwd);
603 vector<string> paths;
606 "scheduler" +
DS +
"passes";
609 "scheduler" +
DS +
"passes";
611 string srcBase = string(TCE_SRC_ROOT) +
DS +
"scheduler" +
DS +
"passes";
618 paths.push_back(srcBase);
620 paths.push_back(base);
621 paths.push_back(personal);
623 paths.push_back(cwd);
637 vector<string> paths;
640 "icdecoder_plugins" +
DS +
"base";
642 "icdecoder_plugins" +
DS +
"custom";
646 string data = cwd +
DS +
"data";
650 string path = string(TCE_SRC_ROOT) +
DS +
"icdecoder_plugins";
651 paths.push_back(path);
653 paths.push_back(base);
654 paths.push_back(personal);
655 paths.push_back(custom);
657 if (!libraryPathsOnly) paths.push_back(cwd);
658 if (!libraryPathsOnly) paths.push_back(data);
668 std::vector<std::string>
670 vector<string> paths;
682 std::vector<std::string>
685 vector<string> paths;
687 string srcBase = string(TCE_SRC_ROOT) +
DS +
"hdb";
688 paths.push_back(srcBase);
692 paths.push_back(instBase);
694 if (!libraryPathsOnly) {
696 paths.push_back(cwd);
697 paths.push_back(cwd +
DS +
"data");
708 string sourceRoot = string(TCE_SRC_ROOT) +
DS;
714 int rootPathLength = sourceRoot.length();
715 shortPath =
"<source tree>" +
DS + hdbPath.substr(rootPathLength);
717 int installDirLength = installRoot.length();
718 shortPath =
"<install directory>" +
DS +
719 hdbPath.substr(installDirLength);
721 int cwdLength = cwd.length();
722 shortPath =
"." +
DS + hdbPath.substr(cwdLength);
732 string sourceRoot = string(
"<source tree>") +
DS;
733 string installRoot = string(
"<install directory>") +
DS;
734 string cwd = string(
".") +
DS;
738 int rootPathLength = sourceRoot.length();
739 longPath = string(TCE_SRC_ROOT) +
DS + hdbPath.substr(rootPathLength);
741 int installDirLength = installRoot.length();
743 hdbPath.substr(installDirLength);
745 int cwdLength = cwd.length();
747 hdbPath.substr(cwdLength);
759 std::vector<std::string>
762 vector<string> paths;
766 paths.push_back(hdbDir);
767 paths.push_back(hdbDir +
DS +
"vhdl");
770 string srcBase = string(TCE_SRC_ROOT) +
DS +
"hdb";
771 paths.push_back(srcBase);
772 paths.push_back(srcBase +
DS +
"vhdl");
776 paths.push_back(srcBase);
777 paths.push_back(srcBase +
DS +
"vhdl");
780 paths.push_back(cwd);
781 paths.push_back(cwd +
DS +
"data");
792 std::vector<std::string>
794 vector<string> paths;
795 if (!libraryPathsOnly) {
811 vector<string> paths;
814 string srcBase = string(TCE_SRC_ROOT) +
DS +
"explorer";
815 paths.push_back(srcBase);
818 "explorer" +
DS +
"base";
819 paths.push_back(base);
823 paths.push_back(personal);
827 paths.push_back(cwd);
830 paths.push_back(data);
844 vector<string> paths;
846 "cost_estimator_plugins";
848 "cost_estimator_plugins/rf";
850 "cost_estimator_plugins/fu";
852 "cost_estimator_plugins";
853 string custom = string(TCE_SRC_ROOT) +
DS +
"cost_estimator_plugins";
858 paths.push_back(custom);
860 paths.push_back(base);
861 paths.push_back(baseRF);
862 paths.push_back(baseFU);
864 paths.push_back(personal);
865 paths.push_back(cwd);
866 paths.push_back(data);
880 std::string srcPath =
885 "Installation broken, minimal.adf not found");
892 debugLog(
"Installation broken, manual not found");
904 std::string srcPath =
910 "Installation broken, minimal.adf not found");
918 "Installation broken, minimal.adf not found");
931 std::string srcPath =
932 string(TCE_SRC_ROOT) +
"/src/bintools/Compiler/oacc";
934 std::string llvmTceSrcPath =
935 string(TCE_SRC_ROOT) +
"/src/bintools/Compiler/llvm-tce/llvm-tce";
939 "Build broken, compiler paths not found.");
945 "Installation broken: oacc not found.");
960 std::string srcPath =
961 string(TCE_SRC_ROOT) +
"/scheduler/passes/default_scheduler.conf";
964 "Build broken, default_scheduler.conf not found.");
971 "Installation broken, default_scheduler.conf not found.");
990 std::string srcPath =
991 string(TCE_SRC_ROOT) +
"/scheduler/passes/old_gcc.conf";
994 "Build broken, old_gcc.conf not found.");
1001 "Installation broken, old_gcc.conf not found.");
1015 std::string file =
"DefaultICDecoderPlugin.so";
1022 "Installation broken, DefaultICDecoderPlugin.so not found.");
1038 if (editor.empty()) {
1040 vector<std::string> editors;
1041 editors.push_back(
"gedit");
1042 editors.push_back(
"leafpad");
1043 editors.push_back(
"mousepad");
1044 editors.push_back(
"kate");
1057 std::string testEditor =
"";
1058 vector<std::string> paths;
1060 for (
unsigned int i = 0; i < paths.size(); ++i) {
1061 testEditor = paths.at(i) +
DS + editor;
1110 vector<std::string> paths;
1112 for (
unsigned int i = 0; i < paths.size(); ++i) {
1113 for (
unsigned int j = 0; j < execs.size(); ++j) {
1114 std::string exec = paths.at(i) +
DS + execs.at(j);
1130 std::vector<std::string> paths;
1132 string path = string(TCE_SRC_ROOT) +
DS +
"data" +
DS +
"hdb";
1133 paths.push_back(path);
1136 "data" +
DS +
"hdb";
1137 paths.push_back(path);
static std::string simTraceDir_
Directory to store ttasim traces.
static std::string oldGccSchedulerConf()
static std::string newBitmapsFileDir_
Directory for new bitmaps file.
static const std::string CONF_DIR_NAME_
Name of the configuration directory.
static bool createDirectory(const std::string &path)
bool startsWith(const std::string &str) const
static std::string manDirPath(const std::string &prog)
static const std::string PDF_MANUAL_INSTALLED
Relative path to the installed TCE .pdf manual.
static void setNewDataFileDir(const std::string &path)
static bool developerMode_
Flag indicating whether TCE is executing in developer mode.
static std::vector< std::string > schemaPaths_
Schema directory search paths.
static std::string minimalADF()
static std::string newSchemaFileDir_
Directory for new schema file.
static std::vector< std::string > icDecoderPluginPaths(bool libraryPathsOnly=false)
static std::vector< std::string > schedulerPluginPaths()
static std::vector< std::string > iconPaths_
Toolbar icon search paths.
static std::vector< std::string > decompressorPaths(bool libraryPathsOnly=false)
static std::string absolutePathOf(const std::string &pathName)
static std::string pathTo(const std::string &name)
static const std::string PDF_MANUAL_SRC
Relative path to the TCE .pdf manual in source tree.
static std::string errorLogFilePath()
static std::vector< std::string > implementationTesterTemplatePaths()
static std::string newDataFileDir_
Directory for new data file.
static void setNewErrorLogFileDir(const std::string &path)
static std::string tceCompiler()
static std::string bitmapsDirPath(const std::string &prog)
static std::string defaultICDecoderPlugin()
static TCEString userConfPath(const std::string &fileName)
static std::vector< std::string > bitmapsPaths_
Bitmaps directory search paths.
static const std::string MAN_DIR_NAME_
Name of the manual directory.
static const std::string DATA_DIR_NAME_
Name of the data directory.
#define assert(condition)
static std::vector< std::string > codeCompressorPaths(bool libraryPathsOnly=false)
static std::string defaultTextEditorPath()
static void setNewManFileDir(const std::string &path)
static std::string homeDirectory()
#define abortWithError(message)
static std::vector< std::string > opsetIncludeDir()
static void setNewSchemaFileDir(const std::string &path)
static const std::string ERROR_LOG_FILE_NAME_
Name of the system error log file.
static std::vector< std::string > hdbPaths(bool libraryPathsOnly=false)
static std::vector< std::string > includeDirPaths()
static const std::string MINIMAL_ADF_INSTALLED
Relative path to the installed minimal.adf.
static TCEString shortHDBPath(const TCEString &hdbPath)
static std::vector< std::string > dataPaths_
Data directory search paths.
static std::string directoryOfPath(const std::string fileName)
static std::string defaultSchedulerConf()
static void parsePathEnvVariable(std::vector< std::string > &paths)
static std::string schemaDirPath(const std::string &prog)
static std::string newIconFileDir_
Directory for new icon file.
static std::string newManFileDir_
Directory for new manual file.
static std::string newErrorLogFileDir_
Directory for new error log file.
static bool createFile(const std::string &file)
static std::vector< std::string > osalPaths()
static const std::string MINIMAL_ADF_SRC
Relative path to the minimal.adf in source tree.
static std::vector< std::string > pathsToUse_
Paths used in a particular search.
static const std::string DIRECTORY_SEPARATOR
static TCEString longHDBPath(const TCEString &hdbPath)
static TCEString confPath(const std::string &fileName)
static std::vector< std::string > manPaths_
Man directory search paths.
static std::string iconDirPath()
static std::string simTraceDirPath()
static std::vector< std::string > vhdlPaths(const std::string &hdbPath)
static std::string llvmtceCachePath()
static bool fileExists(const std::string fileName)
static std::string findExecutableFromPATH(const std::vector< std::string > &file)
static std::string installationDir()
static void setNewBitmapsFileDir(const std::string &path)
static const std::string SCHEMA_DIR_NAME_
Name of the XML Schema directory.
static bool fileIsExecutable(const std::string fileName)
static std::vector< std::string > explorerPluginPaths()
static const std::string ICON_DIR_NAME_
Name of the toolbar icon directory.
static bool initialized_
Flag indicating whether class has been initialized.
static std::vector< std::string > hwModulePaths()
static std::string currentWorkingDir()
static std::string newConfFile_
Directory for new configure file.
static bool developerMode()
static std::string environmentVariable(const std::string &variable)
static std::vector< std::string > errorPaths_
Error file search paths.
static std::vector< std::string > estimatorPluginPaths()
static std::string findFileInSearchPaths(const std::vector< std::string > &searchPaths, const std::string &file)
static const std::string BITMAPS_DIR_NAME_
Name of the bitmaps directory.
static std::string pdfManual()
static std::string dataDirPath(const std::string &prog)