Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db80aec

Browse files
committed
Fix installer Back button going to wrong page when modifying.
Also fix error when doing test builds without documentation file.
1 parent 8b62bbf commit db80aec

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,11 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
325325

326326
case ID_CUSTOM1_BACK_BUTTON:
327327
SavePageSettings();
328-
GoToPage(PAGE_INSTALL);
328+
if (_modifying) {
329+
GoToPage(PAGE_MODIFY);
330+
} else {
331+
GoToPage(PAGE_INSTALL);
332+
}
329333
break;
330334

331335
case ID_INSTALL_CUSTOM_BUTTON: __fallthrough;
@@ -412,6 +416,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
412416
_engine->SetVariableString(L"InstallAllUsersState", L"disable");
413417
_engine->SetVariableString(L"TargetDirState", L"disable");
414418
_engine->SetVariableString(L"CustomBrowseButtonState", L"disable");
419+
_modifying = TRUE;
415420
GoToPage(PAGE_CUSTOM1);
416421
break;
417422

@@ -2518,6 +2523,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
25182523

25192524
_suppressDowngradeFailure = FALSE;
25202525
_suppressRepair = FALSE;
2526+
_modifying = FALSE;
25212527

25222528
_overridableVariables = nullptr;
25232529
_taskbarList = nullptr;
@@ -2598,6 +2604,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
25982604

25992605
BOOL _suppressDowngradeFailure;
26002606
BOOL _suppressRepair;
2607+
BOOL _modifying;
26012608

26022609
STRINGDICT_HANDLE _overridableVariables;
26032610

Tools/msi/doc/doc.wxs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
1111
<ComponentGroupRef Id="doc" />
1212

13+
<?ifdef DocFilename ?>
1314
<Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
1415
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
1516
<RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" KeyPath="yes" />
@@ -20,6 +21,7 @@
2021
Description="!(loc.ShortcutDescription)" />
2122
<RemoveFolder Id="Remove_MenuDir" On="uninstall" />
2223
</Component>
24+
<?endif ?>
2325

2426
</Feature>
2527
</Product>

0 commit comments

Comments
 (0)