]> granicus.if.org Git - python/commitdiff
Fix installer Back button going to wrong page when modifying.
authorSteve Dower <steve.dower@microsoft.com>
Thu, 12 Feb 2015 01:49:01 +0000 (17:49 -0800)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 12 Feb 2015 01:49:01 +0000 (17:49 -0800)
Also fix error when doing test builds without documentation file.

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Tools/msi/doc/doc.wxs

index ebe4da32e97ce241c59b560572f14e9c6cb7e0d3..5eda3f75caf533fb8bb5f0a69b4087fbb5027c2f 100644 (file)
@@ -325,7 +325,11 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
 
         case ID_CUSTOM1_BACK_BUTTON:
             SavePageSettings();
-            GoToPage(PAGE_INSTALL);
+            if (_modifying) {
+                GoToPage(PAGE_MODIFY);
+            } else {
+                GoToPage(PAGE_INSTALL);
+            }
             break;
 
         case ID_INSTALL_CUSTOM_BUTTON: __fallthrough;
@@ -412,6 +416,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
             _engine->SetVariableString(L"InstallAllUsersState", L"disable");
             _engine->SetVariableString(L"TargetDirState", L"disable");
             _engine->SetVariableString(L"CustomBrowseButtonState", L"disable");
+            _modifying = TRUE;
             GoToPage(PAGE_CUSTOM1);
             break;
 
@@ -2518,6 +2523,7 @@ public:
 
         _suppressDowngradeFailure = FALSE;
         _suppressRepair = FALSE;
+        _modifying = FALSE;
 
         _overridableVariables = nullptr;
         _taskbarList = nullptr;
@@ -2598,6 +2604,7 @@ private:
 
     BOOL _suppressDowngradeFailure;
     BOOL _suppressRepair;
+    BOOL _modifying;
 
     STRINGDICT_HANDLE _overridableVariables;
 
index 6becaf6cd1296b73768ea23a4064776c57e142be..ddab83b5ea5ad400fd2a673e3e0e0a691e58d2b8 100644 (file)
@@ -10,6 +10,7 @@
         <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
             <ComponentGroupRef Id="doc" />
             
+            <?ifdef DocFilename ?>
             <Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
                 <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
                     <RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" KeyPath="yes" />
@@ -20,6 +21,7 @@
                           Description="!(loc.ShortcutDescription)" />
                 <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
             </Component>
+            <?endif ?>
 
         </Feature>
     </Product>