changeset: 98695:2316bc881eea branch: 3.5 parent: 98693:919b1dffa741 user: Steve Dower date: Sun Oct 11 16:40:41 2015 -0700 files: Misc/NEWS Tools/msi/bundle/Default.thm Tools/msi/bundle/Default.wxl Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp Tools/msi/bundle/bootstrap/pch.h description: Issue #25143: Improves installer error messages for unsupported platforms. diff -r 919b1dffa741 -r 2316bc881eea Misc/NEWS --- a/Misc/NEWS Sun Oct 11 15:37:22 2015 -0700 +++ b/Misc/NEWS Sun Oct 11 16:40:41 2015 -0700 @@ -308,6 +308,8 @@ Windows ------- +- Issue #25143: Improves installer error messages for unsupported platforms. + - Issue #25163: Display correct directory in installer when using non-default settings. diff -r 919b1dffa741 -r 2316bc881eea Tools/msi/bundle/Default.thm --- a/Tools/msi/bundle/Default.thm Sun Oct 11 15:37:22 2015 -0700 +++ b/Tools/msi/bundle/Default.thm Sun Oct 11 16:40:41 2015 -0700 @@ -128,7 +128,7 @@ #(loc.FailureHyperlinkLogText) - + #(loc.FailureRestartText) diff -r 919b1dffa741 -r 2316bc881eea Tools/msi/bundle/Default.wxl --- a/Tools/msi/bundle/Default.wxl Sun Oct 11 15:37:22 2015 -0700 +++ b/Tools/msi/bundle/Default.wxl Sun Oct 11 16:40:41 2015 -0700 @@ -120,4 +120,14 @@ You must restart your computer to complete the rollback of the software. &Restart Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName]. + + Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName]. + +Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201">update your machine</a> and then restart the installation. + Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName]. + +Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202">update your machine</a> and then restart the installation. + Windows Vista or later is required to install and use [WixBundleName]. + +Visit <a href="https://www.python.org/">python.org</a> to download Python 3.4. diff -r 919b1dffa741 -r 2316bc881eea Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp Sun Oct 11 15:37:22 2015 -0700 +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp Sun Oct 11 16:40:41 2015 -0700 @@ -1216,6 +1216,8 @@ hr = pThis->CreateMainWindow(); BalExitOnFailure(hr, "Failed to create main window."); + pThis->ValidateOperatingSystem(); + if (FAILED(pThis->_hrFinal)) { pThis->SetState(PYBA_STATE_FAILED, hr); ::PostMessageW(pThis->_hWnd, WM_PYBA_SHOW_FAILURE, 0, 0); @@ -2985,6 +2987,36 @@ return hr; } + void ValidateOperatingSystem() { + LOC_STRING *pLocString = nullptr; + + if (IsWindows7SP1OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows 7 SP1 or later"); + return; + } else if (IsWindows7OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM"); + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation"); + LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString); + } else if (IsWindowsVistaSP2OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2"); + return; + } else if (IsWindowsVistaOrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1"); + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation"); + LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString); + } else { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier"); + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation"); + LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString); + } + + if (pLocString && pLocString->wzText) { + BalFormatString(pLocString->wzText, &_failedMessage); + } + + _hrFinal = E_WIXSTDBA_CONDITION_FAILED; + } + public: // // Constructor - initialize member variables. diff -r 919b1dffa741 -r 2316bc881eea Tools/msi/bundle/bootstrap/pch.h --- a/Tools/msi/bundle/bootstrap/pch.h Sun Oct 11 15:37:22 2015 -0700 +++ b/Tools/msi/bundle/bootstrap/pch.h Sun Oct 11 16:40:41 2015 -0700 @@ -23,6 +23,7 @@ #include #include #include +#include #include "dutil.h" #include "memutil.h"