Esempio n. 1
0
//取得所有的文件版本信息,各信息间以\n分隔 
CString HFileVersion::GetFullVersion() 
{ 
	CString strRet; 
	/* 
	szRet = "文件版本: " + GetFileVersion() + "\n"; 
	szRet += "说明: " + GetFileDescription() +"\n"; 
	szRet += "版权: " + GetLegalCopyright() +"\n"; 
	szRet += "备注: " + GetComments() + "\n"; 
	szRet += "产品版本: " + GetProductVersion() +"\n"; 
	szRet += "产品名称: " + GetProductName() +"\n"; 
	szRet += "个人用内部版本说明: " + GetPrivateBuild() +"\n"; 
	szRet += "公司名称: " + GetCompanyName() +"\n"; 
	szRet += "合法商标: " + GetLegalTrademarks() +"\n"; 
	szRet += "内部名称: " + GetInternalName() +"\n"; 
	szRet += "特殊内部版本说明: " + GetSpecialBuild() +"\n"; 
	szRet += "源文件名: " + GetOriginalFilename() +"\n"; 
	*/ 
	strRet = "FileVersion: " + GetFileVersion() + "\n"; 
	strRet += "FileDescription: " + GetFileDescription() +"\n"; 
	strRet += "CopyRight: " + GetLegalCopyright() +"\n"; 
	strRet += "Comments: " + GetComments() + "\n"; 
	strRet += "ProductVersion: " + GetProductVersion() +"\n"; 
	strRet += "ProductName: " + GetProductName() +"\n"; 
	strRet += "PrivateBuild: " + GetPrivateBuild() +"\n"; 
	strRet += "CompanyName: " + GetCompanyName() +"\n"; 
	strRet += "TradeMarks: " + GetLegalTrademarks() +"\n"; 
	strRet += "InternalName: " + GetInternalName() +"\n"; 
	strRet += "SpecialBuild: " + GetSpecialBuild() +"\n"; 
	strRet += "OriginalFileName: " + GetOriginalFilename() +"\n"; 
	return strRet; 
} 
Esempio n. 2
0
UnicodeString TConfiguration::GetProductVersionStr() const
{
  UnicodeString Result;
#ifndef __linux__
  TGuard Guard(FCriticalSection);
  try
  {
    TVSFixedFileInfo * Info = GetFixedApplicationInfo();
    /*return FMTLOAD(VERSION,
      HIWORD(Info->dwFileVersionMS),
      LOWORD(Info->dwFileVersionMS),
      HIWORD(Info->dwFileVersionLS),
      LOWORD(Info->dwFileVersionLS));*/
    UnicodeString BuildStr;
    if (!GetIsUnofficial())
    {
      BuildStr = LoadStr(VERSION_BUILD);
    }
    else
    {
      #ifdef _DEBUG
      BuildStr = LoadStr(VERSION_DEBUG_BUILD);
      #else
      BuildStr = LoadStr(VERSION_DEV_BUILD);
      #endif
    }

    int Build = LOWORD(Info->dwFileVersionLS);
    if (Build > 0)
    {
      BuildStr += L" " + ::IntToStr(Build);
    }

#if 0
    #ifndef BUILD_OFFICIAL
    UnicodeString BuildDate = __DATE__;
    UnicodeString MonthStr = CutToChar(BuildDate, L' ', true);
    int Month = ParseShortEngMonthName(MonthStr);
    int Day = StrToInt64(CutToChar(BuildDate, L' ', true));
    int Year = StrToInt64(Trim(BuildDate));
    UnicodeString DateStr = FORMAT("%d-%2.2d-%2.2d", Year, Month, Day);
    AddToList(BuildStr, DateStr, L" ");
    #endif
#endif

    UnicodeString FullVersion = GetProductVersion();

    UnicodeString AReleaseType = GetReleaseType();
    if (DebugAlwaysTrue(!AReleaseType.IsEmpty()) &&
        !SameText(AReleaseType, L"stable") &&
        !SameText(AReleaseType, L"development"))
    {
      FullVersion += L" " + AReleaseType;
    }

    Result = FMTLOAD(VERSION2, GetProductVersion().c_str(), Build);

#if 0
    #ifndef BUILD_OFFICIAL
    Result += L" " + LoadStr(VERSION_DONT_DISTRIBUTE);
    #endif
#endif
  }
  catch (Exception & E)
  {
    throw ExtException(&E, "Can't get application version");
  }
#endif
  return Result;
}
Esempio n. 3
0
//
/// Retrieves the version of the product.
/// String version. [VH 2005-04-03]
//
tstring TModuleVersionInfo::GetProductVersion(uint lang)
  {LPCTSTR v = _T(""); E = GetProductVersion(v, lang); return v;}