From a3d03ec6b1191c04fb4073e26069d3282c0b6e72 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 18 Jul 2015 09:27:52 -0700 Subject: Adds option to only install the launcher. --- Doc/using/windows.rst | 3 +++ Tools/msi/bundle/Default.thm | 2 +- Tools/msi/bundle/bundle.wxs | 2 ++ Tools/msi/bundle/packagegroups/core.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/crt.wxs | 4 ++-- Tools/msi/bundle/packagegroups/dev.wxs | 8 ++++---- Tools/msi/bundle/packagegroups/doc.wxs | 4 ++-- Tools/msi/bundle/packagegroups/exe.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/lib.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/postinstall.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/tcltk.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/test.wxs | 12 ++++++------ Tools/msi/bundle/packagegroups/tools.wxs | 4 ++-- 13 files changed, 52 insertions(+), 47 deletions(-) diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 213912f..53d5f3e 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -146,6 +146,9 @@ of available options is shown below. +---------------------------+--------------------------------------+--------------------------+ | Include_tools | Install utility scripts | 1 | +---------------------------+--------------------------------------+--------------------------+ +| LauncherOnly | Only installs the launcher. This | 0 | +| | will override most other options. | | ++---------------------------+--------------------------------------+--------------------------+ | SimpleInstall | Disable most install UI | 0 | +---------------------------+--------------------------------------+--------------------------+ | SimpleInstallDescription | A custom message to display when the | (empty) | diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm index 4ba8176..d919bea 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -12,7 +12,7 @@ #(loc.HelpHeader) - #(loc.HelpText) + #(loc.HelpText) diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs index 761384e..cc62c62 100644 --- a/Tools/msi/bundle/bundle.wxs +++ b/Tools/msi/bundle/bundle.wxs @@ -64,6 +64,8 @@ + + diff --git a/Tools/msi/bundle/packagegroups/core.wxs b/Tools/msi/bundle/packagegroups/core.wxs index a789585..eb3d0b7 100644 --- a/Tools/msi/bundle/packagegroups/core.wxs +++ b/Tools/msi/bundle/packagegroups/core.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)"> + InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly"> @@ -16,7 +16,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols"> + InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly"> @@ -25,7 +25,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug"> + InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly"> @@ -35,7 +35,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)"> + InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly"> @@ -44,7 +44,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols"> + InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly"> @@ -53,7 +53,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug"> + InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/crt.wxs b/Tools/msi/bundle/packagegroups/crt.wxs index 32b063f..dc40475 100644 --- a/Tools/msi/bundle/packagegroups/crt.wxs +++ b/Tools/msi/bundle/packagegroups/crt.wxs @@ -31,7 +31,7 @@ Description="!(loc.CRTDescription)" Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" - InstallCondition="not CRTInstalled and VersionNT = $(var.ver) and not VersionNT64 and (Include_core or Include_exe or Include_launcher or Include_pip)" /> + InstallCondition="not CRTInstalled and VersionNT = $(var.ver) and not VersionNT64 and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" /> + InstallCondition="not CRTInstalled and VersionNT64 = $(var.ver) and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" /> diff --git a/Tools/msi/bundle/packagegroups/dev.wxs b/Tools/msi/bundle/packagegroups/dev.wxs index f7f5025..4284dba 100644 --- a/Tools/msi/bundle/packagegroups/dev.wxs +++ b/Tools/msi/bundle/packagegroups/dev.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_dev"> + InstallCondition="InstallAllUsers and Include_dev and not LauncherOnly"> @@ -16,7 +16,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_dev and Include_debug"> + InstallCondition="InstallAllUsers and Include_dev and Include_debug and not LauncherOnly"> @@ -26,7 +26,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_dev"> + InstallCondition="not InstallAllUsers and Include_dev and not LauncherOnly"> @@ -35,7 +35,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_dev and Include_debug"> + InstallCondition="not InstallAllUsers and Include_dev and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/doc.wxs b/Tools/msi/bundle/packagegroups/doc.wxs index 2f11e27..6639ff5 100644 --- a/Tools/msi/bundle/packagegroups/doc.wxs +++ b/Tools/msi/bundle/packagegroups/doc.wxs @@ -8,7 +8,7 @@ DownloadUrl="$(var.DownloadUrl)" EnableFeatureSelection="yes" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_doc"> + InstallCondition="InstallAllUsers and Include_doc and not LauncherOnly"> @@ -19,7 +19,7 @@ DownloadUrl="$(var.DownloadUrl)" EnableFeatureSelection="yes" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_doc"> + InstallCondition="not InstallAllUsers and Include_doc and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/exe.wxs b/Tools/msi/bundle/packagegroups/exe.wxs index 03d6f62..79464c4 100644 --- a/Tools/msi/bundle/packagegroups/exe.wxs +++ b/Tools/msi/bundle/packagegroups/exe.wxs @@ -8,7 +8,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" EnableFeatureSelection="yes" - InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip)"> + InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly"> @@ -17,7 +17,7 @@ ForcePerMachine="yes" Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" - InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols"> + InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly"> @@ -26,7 +26,7 @@ ForcePerMachine="yes" Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" - InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug"> + InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly"> @@ -37,7 +37,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" EnableFeatureSelection="yes" - InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip)"> + InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly"> @@ -46,7 +46,7 @@ ForcePerMachine="no" Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" - InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols"> + InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly"> @@ -55,7 +55,7 @@ ForcePerMachine="no" Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" - InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug"> + InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/lib.wxs b/Tools/msi/bundle/packagegroups/lib.wxs index f7c57c8..0b3fbc0 100644 --- a/Tools/msi/bundle/packagegroups/lib.wxs +++ b/Tools/msi/bundle/packagegroups/lib.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_lib"> + InstallCondition="InstallAllUsers and Include_lib and not LauncherOnly"> @@ -16,7 +16,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_lib and Include_symbols"> + InstallCondition="InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly"> @@ -25,7 +25,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_lib and Include_debug"> + InstallCondition="InstallAllUsers and Include_lib and Include_debug and not LauncherOnly"> @@ -35,7 +35,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_lib"> + InstallCondition="not InstallAllUsers and Include_lib and not LauncherOnly"> @@ -44,7 +44,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_lib and Include_symbols"> + InstallCondition="not InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly"> @@ -53,7 +53,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_lib and Include_debug"> + InstallCondition="not InstallAllUsers and Include_lib and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/postinstall.wxs b/Tools/msi/bundle/packagegroups/postinstall.wxs index 4c50001..7b0f3fc 100644 --- a/Tools/msi/bundle/packagegroups/postinstall.wxs +++ b/Tools/msi/bundle/packagegroups/postinstall.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_pip"> + InstallCondition="InstallAllUsers and Include_pip and not LauncherOnly"> @@ -16,7 +16,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_pip"> + InstallCondition="not InstallAllUsers and Include_pip and not LauncherOnly"> @@ -26,7 +26,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and PrependPath"> + InstallCondition="InstallAllUsers and PrependPath and not LauncherOnly"> @@ -35,7 +35,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and PrependPath"> + InstallCondition="not InstallAllUsers and PrependPath and not LauncherOnly"> @@ -50,7 +50,7 @@ Permanent="yes" PerMachine="yes" Vital="no" - InstallCondition="InstallAllUsers and CompileAll" /> + InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" /> + InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" /> \ No newline at end of file diff --git a/Tools/msi/bundle/packagegroups/tcltk.wxs b/Tools/msi/bundle/packagegroups/tcltk.wxs index 92f41cb..0d029a9 100644 --- a/Tools/msi/bundle/packagegroups/tcltk.wxs +++ b/Tools/msi/bundle/packagegroups/tcltk.wxs @@ -8,7 +8,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" EnableFeatureSelection="yes" - InstallCondition="InstallAllUsers and Include_tcltk"> + InstallCondition="InstallAllUsers and Include_tcltk and not LauncherOnly"> @@ -18,7 +18,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" EnableFeatureSelection="yes" - InstallCondition="InstallAllUsers and Include_tcltk and Include_symbols"> + InstallCondition="InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly"> @@ -28,7 +28,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" EnableFeatureSelection="yes" - InstallCondition="InstallAllUsers and Include_tcltk and Include_debug"> + InstallCondition="InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly"> @@ -39,7 +39,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" EnableFeatureSelection="yes" - InstallCondition="not InstallAllUsers and Include_tcltk"> + InstallCondition="not InstallAllUsers and Include_tcltk and not LauncherOnly"> @@ -49,7 +49,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" EnableFeatureSelection="yes" - InstallCondition="not InstallAllUsers and Include_tcltk and Include_symbols"> + InstallCondition="not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly"> @@ -59,7 +59,7 @@ DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" EnableFeatureSelection="yes" - InstallCondition="not InstallAllUsers and Include_tcltk and Include_debug"> + InstallCondition="not InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/test.wxs b/Tools/msi/bundle/packagegroups/test.wxs index b3e0f3e..32acaef 100644 --- a/Tools/msi/bundle/packagegroups/test.wxs +++ b/Tools/msi/bundle/packagegroups/test.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_test"> + InstallCondition="InstallAllUsers and Include_test and not LauncherOnly"> @@ -16,7 +16,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_test and Include_symbols"> + InstallCondition="InstallAllUsers and Include_test and Include_symbols and not LauncherOnly"> @@ -25,7 +25,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_test and Include_debug"> + InstallCondition="InstallAllUsers and Include_test and Include_debug and not LauncherOnly"> @@ -35,7 +35,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_test"> + InstallCondition="not InstallAllUsers and Include_test and not LauncherOnly"> @@ -44,7 +44,7 @@ Compressed="$(var.CompressPDB)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_test and Include_symbols"> + InstallCondition="not InstallAllUsers and Include_test and Include_symbols and not LauncherOnly"> @@ -53,7 +53,7 @@ Compressed="$(var.CompressMSI_D)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_test and Include_debug"> + InstallCondition="not InstallAllUsers and Include_test and Include_debug and not LauncherOnly"> diff --git a/Tools/msi/bundle/packagegroups/tools.wxs b/Tools/msi/bundle/packagegroups/tools.wxs index c92f27b..1d9ab19 100644 --- a/Tools/msi/bundle/packagegroups/tools.wxs +++ b/Tools/msi/bundle/packagegroups/tools.wxs @@ -7,7 +7,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="yes" - InstallCondition="InstallAllUsers and Include_tools"> + InstallCondition="InstallAllUsers and Include_tools and not LauncherOnly"> @@ -17,7 +17,7 @@ Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" ForcePerMachine="no" - InstallCondition="not InstallAllUsers and Include_tools"> + InstallCondition="not InstallAllUsers and Include_tools and not LauncherOnly"> -- cgit v0.12 From 2434aa24e049e54fb6573d7e5126b410c4569037 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 18 Jul 2015 09:28:19 -0700 Subject: Adds support for an unattend.xml file to control the Windows installer options. --- Doc/using/windows.rst | 14 ++++ .../bootstrap/PythonBootstrapperApplication.cpp | 93 +++++++++++++++++++++- 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 53d5f3e..dad827d 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -171,6 +171,20 @@ display a simplified initial page and disallow customization:: recommended for per-user installs when there is also a system-wide installation that included the launcher.) +The options listed above can also be provided in a file named ``unattend.xml`` +alongside the executable. This file specifies a list of options and values. +When a value is provided as an attribute, it will be converted to a number if +possible. Values provided as element text are always left as strings. This +example file sets the same options and the previous example:: + + + + + .. _install-layout-option: Installing Without Downloading diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index 2d8f04d..416f2d5 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -1249,6 +1249,92 @@ private: return hr; } + // + // ParseVariablesFromUnattendXml - reads options from unattend.xml if it + // exists + // + HRESULT ParseVariablesFromUnattendXml() { + HRESULT hr = S_OK; + LPWSTR sczUnattendXmlPath = nullptr; + IXMLDOMDocument *pixdUnattend = nullptr; + IXMLDOMNodeList *pNodes = nullptr; + IXMLDOMNode *pNode = nullptr; + long cNodes; + DWORD dwAttr; + LPWSTR scz = nullptr; + BOOL bValue; + int iValue; + BOOL tryConvert; + BSTR bstrValue = nullptr; + + hr = BalFormatString(L"[WixBundleOriginalSourceFolder]unattend.xml", &sczUnattendXmlPath); + BalExitOnFailure(hr, "Failed to calculate path to unattend.xml"); + + if (!FileExistsEx(sczUnattendXmlPath, &dwAttr)) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Did not find %ls", sczUnattendXmlPath); + hr = S_FALSE; + goto LExit; + } + + hr = XmlLoadDocumentFromFile(sczUnattendXmlPath, &pixdUnattend); + BalExitOnFailure1(hr, "Failed to read %ls", sczUnattendXmlPath); + + // get the list of variables users have overridden + hr = XmlSelectNodes(pixdUnattend, L"/Options/Option", &pNodes); + if (S_FALSE == hr) { + ExitFunction1(hr = S_OK); + } + BalExitOnFailure(hr, "Failed to select option nodes."); + + hr = pNodes->get_length((long*)&cNodes); + BalExitOnFailure(hr, "Failed to get option node count."); + + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Reading settings from %ls", sczUnattendXmlPath); + + for (DWORD i = 0; i < cNodes; ++i) { + hr = XmlNextElement(pNodes, &pNode, nullptr); + BalExitOnFailure(hr, "Failed to get next node."); + + // @Name + hr = XmlGetAttributeEx(pNode, L"Name", &scz); + BalExitOnFailure(hr, "Failed to get @Name."); + + tryConvert = TRUE; + hr = XmlGetAttribute(pNode, L"Value", &bstrValue); + if (FAILED(hr) || !bstrValue || !*bstrValue) { + hr = XmlGetText(pNode, &bstrValue); + tryConvert = FALSE; + } + BalExitOnFailure(hr, "Failed to get @Value."); + + if (tryConvert && + CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"yes", -1)) { + _engine->SetVariableNumeric(scz, 1); + } else if (tryConvert && + CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"no", -1)) { + _engine->SetVariableNumeric(scz, 0); + } else if (tryConvert && ::StrToIntExW(bstrValue, STIF_DEFAULT, &iValue)) { + _engine->SetVariableNumeric(scz, iValue); + } else { + _engine->SetVariableString(scz, bstrValue); + } + + ReleaseNullBSTR(bstrValue); + ReleaseNullStr(scz); + ReleaseNullObject(pNode); + } + + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Finished reading from %ls", sczUnattendXmlPath); + + LExit: + ReleaseObject(pNode); + ReleaseObject(pNodes); + ReleaseObject(pixdUnattend); + ReleaseStr(sczUnattendXmlPath); + + return hr; + } + // // InitializeData - initializes all the package information. @@ -1264,6 +1350,9 @@ private: hr = ParseOverridableVariablesFromXml(pixdManifest); BalExitOnFailure(hr, "Failed to read overridable variables."); + hr = ParseVariablesFromUnattendXml(); + ExitOnFailure(hr, "Failed to read unattend.ini file."); + hr = ProcessCommandLine(&_language); ExitOnFailure(hr, "Unknown commandline parameters."); @@ -1323,7 +1412,9 @@ private: hr = StrAllocString(psczLanguage, &argv[i][0], 0); BalExitOnFailure(hr, "Failed to copy language."); - } + } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"simple", -1)) { + _engine->SetVariableNumeric(L"SimpleInstall", 1); + } } else if (_overridableVariables) { int value; const wchar_t* pwc = wcschr(argv[i], L'='); -- cgit v0.12 From 61ca207090b8276d35a828c030f54d983d55f23d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 18 Jul 2015 09:28:41 -0700 Subject: Issue #24642: Improves help text displayed in the Windows installer. --- Tools/msi/bundle/Default.wxl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl index c12fb65..7af907e 100644 --- a/Tools/msi/bundle/Default.wxl +++ b/Tools/msi/bundle/Default.wxl @@ -26,20 +26,19 @@ Continue? Are you sure you want to cancel? Previous version Setup Help - /uninstall - Uninstalls Python without prompting for confirmation. + Visit <a href="http://docs.python.org/[ShortVersion]/using/windows.html">docs.python.org/[ShortVersion]/using/windows.html</a> for the full list of options, including the ability to enable and disable specific features. -/layout [\[]directory[\]] - Downloads all components for offline installation. +"/passive" to display progress without requiring user interaction -/passive - Displays progress without requiring user interaction. +"/quiet" to install/uninstall without displaying any UI -/quiet - Performs the requested action without displaying any UI. +"/simple" to prevent user customization -/log [\[]filename[\]] - Logs to a specific file. By default, log files are created in %TEMP%. +"/uninstall" to remove Python (without confirmation) + +"/layout [\[]directory[\]]" to pre-download all components + +"/log [\[]filename[\]]" to specify log files location [WixBundleName] <a href="#">license terms</a>. I &agree to the license terms and conditions &Install Now -- cgit v0.12