File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Tools/msi/bundle/bootstrap Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ What's New in Python 3.5.0 final?
77
88Release date: 2015-09-13
99
10+ Build
11+ -----
12+
13+ - Issue #25071: Windows installer should not require TargetDir
14+ parameter when installing quietly
1015
1116What's New in Python 3.5.0 release candidate 4?
1217===============================================
Original file line number Diff line number Diff line change @@ -723,6 +723,36 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
723723 hrStatus = EvaluateConditions ();
724724 }
725725
726+ if (SUCCEEDED (hrStatus)) {
727+ // Ensure the default path has been set
728+ LONGLONG installAll;
729+ LPWSTR targetDir = nullptr ;
730+ LPWSTR defaultTargetDir = nullptr ;
731+
732+ hrStatus = BalGetStringVariable (L" TargetDir" , &targetDir);
733+ if (FAILED (hrStatus) || !targetDir || !targetDir[0 ]) {
734+ ReleaseStr (targetDir);
735+ targetDir = nullptr ;
736+
737+ if (FAILED (BalGetNumericVariable (L" InstallAllUsers" , &installAll))) {
738+ installAll = 0 ;
739+ }
740+
741+ hrStatus = BalGetStringVariable (
742+ installAll ? L" DefaultAllUsersTargetDir" : L" DefaultJustForMeTargetDir" ,
743+ &defaultTargetDir
744+ );
745+
746+ if (SUCCEEDED (hrStatus) && defaultTargetDir) {
747+ if (defaultTargetDir[0 ] && SUCCEEDED (BalFormatString (defaultTargetDir, &targetDir))) {
748+ hrStatus = _engine->SetVariableString (L" TargetDir" , targetDir);
749+ ReleaseStr (targetDir);
750+ }
751+ ReleaseStr (defaultTargetDir);
752+ }
753+ }
754+ }
755+
726756 SetState (PYBA_STATE_DETECTED, hrStatus);
727757
728758 // If we're not interacting with the user or we're doing a layout or we're just after a force restart
You can’t perform that action at this time.
0 commit comments