From: <man...@us...> - 2015-06-15 16:30:56
|
Revision: 5320 http://sourceforge.net/p/modplug/code/5320 Author: manxorist Date: 2015-06-15 16:30:50 +0000 (Mon, 15 Jun 2015) Log Message: ----------- [Imp] version: Indicate the floatingpoint instruction set used by the current build in the extended version string. [Ref] version: For debug and/or test builds, indicate the required Windows kernel and API versions (gathered/guessed from the compiler version and the _WIN32_WINNT macro). As this is only a rough estimation, it will not be displayed for release builds in order to not confuse anyone. Exact version requirements of course depend on the individual features that are actually used. [Imp] version: In release builds, if no SSE is required and the required Windows kernel and API versions are both below WindowsXP (this is and will be the case for current VS2008 builds as well as has been the case for all Win32 release builds up until now), append the string " for older Windows" to the extended version string. Modified Paths: -------------- trunk/OpenMPT/common/version.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2015-06-15 16:30:15 UTC (rev 5319) +++ trunk/OpenMPT/common/version.cpp 2015-06-15 16:30:50 UTC (rev 5320) @@ -349,7 +349,58 @@ retval += GetRevisionString(); } #ifdef MODPLUG_TRACKER - retval += mpt::String::Print(" %1 bit", sizeof(void*) * 8); + retval += MPT_FORMAT(" %1 bit", sizeof(void*) * 8); + int minimumSSEVersion = 0; + int minimumAVXVersion = 0; + #if MPT_COMPILER_MSVC + #if defined(_M_IX86_FP) + #if defined(__AVX2__) + retval += " AVX2"; + minimumSSEVersion = 2; + minimumAVXVersion = 2; + #elif defined(__AVX__) + retval += " AVX"; + minimumSSEVersion = 2; + minimumAVXVersion = 1; + #elif (_M_IX86_FP >= 2) + retval += " SSE2"; + minimumSSEVersion = 2; + #elif (_M_IX86_FP == 1) + retval += " SSE"; + minimumSSEVersion = 1; + #else + retval += " x87"; + #endif + #endif + #endif + uint16 minimumKernelVersion = 0; + #if MPT_COMPILER_MSVC + #if MPT_MSVC_AT_LEAST(2012, 0) + minimumKernelVersion = std::max<uint16>(minimumKernelVersion, mpt::Windows::Version::WinVista); + #elif MPT_MSVC_AT_LEAST(2010, 0) + minimumKernelVersion = std::max<uint16>(minimumKernelVersion, mpt::Windows::Version::Win2000); + #elif MPT_MSVC_AT_LEAST(2008, 0) + minimumKernelVersion = std::max<uint16>(minimumKernelVersion, mpt::Windows::Version::Win98); + #endif + #endif + uint16 minimumApiVersion = 0; + #if defined(_WIN32_WINNT) + minimumApiVersion = std::max<uint16>(minimumApiVersion, _WIN32_WINNT); + #endif + if((minimumSSEVersion <= 0) && (minimumAVXVersion <= 0) && (minimumKernelVersion < mpt::Windows::Version::WinXP) && (minimumApiVersion < mpt::Windows::Version::WinXP)) + { + if(IsDebugBuild() || IsTestBuild() || IsDirty() || HasMixedRevisions()) + { + retval += " OLD"; + } else + { + retval += " for older Windows"; + } + } + if(IsDebugBuild() || IsTestBuild() || IsDirty() || HasMixedRevisions()) + { + retval += MPT_FORMAT(" OS>=0x%1 API>=0x%2", mpt::fmt::hex0<4>(minimumKernelVersion), mpt::fmt::hex0<4>(minimumApiVersion)); + } #endif if(IsDebugBuild() || IsTestBuild() || IsDirty() || HasMixedRevisions()) { Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2015-06-15 16:30:15 UTC (rev 5319) +++ trunk/OpenMPT/mptrack/mptrack.rc 2015-06-15 16:30:50 UTC (rev 5320) @@ -588,8 +588,8 @@ CONTROL "",IDC_BITMAP1,"Static",SS_BLACKRECT | SS_NOTIFY | SS_CENTERIMAGE,47,3,173,81,WS_EX_CLIENTEDGE CTEXT "",IDC_CREDITS,5,116,256,72,0,WS_EX_STATICEDGE DEFPUSHBUTTON "OK",IDOK,5,192,256,14,WS_GROUP - EDITTEXT IDC_EDIT2,15,100,233,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - EDITTEXT IDC_EDIT3,26,87,212,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_EDIT2,6,100,252,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_EDIT3,6,87,252,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER END IDD_OPTIONS_PLAYER DIALOGEX 0, 0, 286, 281 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |