//get license
string CImageInfo::getLicenseText()
{
	string file = LICENSEDIR;
	file += g_settings.language;
	file += ".license";

	CComponentsText txt;
	string res = txt.getTextFromFile(file);

	return res;
}
Esempio n. 2
0
bool CBuildInfo::HasData()
{
	v_info.clear();

#ifdef USED_COMPILER
	build_info_t compiler = {BI_TYPE_ID_USED_COMPILER, LOCALE_BUILDINFO_COMPILED_WITH, USED_COMPILER};
	v_info.push_back(compiler);
#endif

#ifdef USED_CXXFLAGS
	string cxxflags = USED_CXXFLAGS;
	cxxflags = trim(cxxflags);
	// Remove double spaces
	size_t pos = cxxflags.find("  ");
	while (pos != string::npos) {
		cxxflags.erase(pos, 1);
		pos = cxxflags.find("  ", pos);
	}
	build_info_t flags = {BI_TYPE_ID_USED_CXXFLAGS, LOCALE_BUILDINFO_COMPILER_FLAGS, cxxflags};
	v_info.push_back(flags);
#endif

#ifdef USED_BUILD
	build_info_t build = {BI_TYPE_ID_USED_BUILD , LOCALE_BUILDINFO_COMPILED_ON, USED_BUILD};
	v_info.push_back(build);
#endif

	CComponentsText utext;
	build_info_t kernel = {BI_TYPE_ID_USED_KERNEL, LOCALE_BUILDINFO_KERNEL, utext.getTextFromFile("/proc/version")};
	v_info.push_back(kernel);

#if 0
	CConfigFile data ('\t');
	data.loadConfig("/.version");
	build_info_t creator	= {BI_TYPE_ID_CREATOR, LOCALE_BUILDINFO_CREATOR, data.getString("creator", "n/a")};
	v_info.push_back(creator);
#endif

	if (v_info.empty()){
		DisplayInfoMessage("No Informations available. Please report!");
		return false;
	}

	return true;
}