summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-09-11 18:27:45 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-09-11 18:27:45 (GMT)
commit6695c2e356992d1e7c359c47cd243c65182996e8 (patch)
tree2ddb60ed62b629e00c1b1881326c47e8066b512c
parent1c30e7ef56ff6e42f5db4323f0a276d54d079596 (diff)
parent76b7133f58ebd47cb7eb20c6cb760141dc5bd0b2 (diff)
downloadcpython-6695c2e356992d1e7c359c47cd243c65182996e8.zip
cpython-6695c2e356992d1e7c359c47cd243c65182996e8.tar.gz
cpython-6695c2e356992d1e7c359c47cd243c65182996e8.tar.bz2
Merge from 3.5.0
-rw-r--r--Misc/NEWS5
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp30
2 files changed, 35 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index bc9a4b7..ee579ec 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -104,6 +104,11 @@ Windows
- Issue #25022: Removed very outdated PC/example_nt/ directory.
+Build
+-----
+
+- Issue #25071: Windows installer should not require TargetDir
+ parameter when installing quietly
What's New in Python 3.5.0 release candidate 4?
===============================================
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
index 416f2d5..35ed2fe 100644
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -723,6 +723,36 @@ public: // IBootstrapperApplication
hrStatus = EvaluateConditions();
}
+ if (SUCCEEDED(hrStatus)) {
+ // Ensure the default path has been set
+ LONGLONG installAll;
+ LPWSTR targetDir = nullptr;
+ LPWSTR defaultTargetDir = nullptr;
+
+ hrStatus = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (FAILED(hrStatus) || !targetDir || !targetDir[0]) {
+ ReleaseStr(targetDir);
+ targetDir = nullptr;
+
+ if (FAILED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
+ installAll = 0;
+ }
+
+ hrStatus = BalGetStringVariable(
+ installAll ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultTargetDir
+ );
+
+ if (SUCCEEDED(hrStatus) && defaultTargetDir) {
+ if (defaultTargetDir[0] && SUCCEEDED(BalFormatString(defaultTargetDir, &targetDir))) {
+ hrStatus = _engine->SetVariableString(L"TargetDir", targetDir);
+ ReleaseStr(targetDir);
+ }
+ ReleaseStr(defaultTargetDir);
+ }
+ }
+ }
+
SetState(PYBA_STATE_DETECTED, hrStatus);
// If we're not interacting with the user or we're doing a layout or we're just after a force restart