From 1d4880db3d48bbb52226a7ea1bfeb6f6c8c81f64 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sun, 3 May 2015 14:54:32 -0700 Subject: [PATCH] Enables shortcuts to be deselected when installing on Windows. --- Doc/using/windows.rst | 3 + Tools/msi/bundle/Default.thm | 17 +++--- Tools/msi/bundle/Default.wxl | 4 +- .../PythonBootstrapperApplication.cpp | 4 +- Tools/msi/bundle/bundle.wxs | 1 + Tools/msi/bundle/packagegroups/doc.wxs | 2 + Tools/msi/bundle/packagegroups/exe.wxs | 2 + Tools/msi/doc/doc.wxs | 7 ++- Tools/msi/doc/doc_files.wxs | 3 + Tools/msi/exe/exe.wxs | 8 ++- Tools/msi/exe/exe_files.wxs | 4 ++ Tools/msi/tcltk/tcltk.wixproj | 1 + Tools/msi/tcltk/tcltk.wxs | 58 ++++--------------- Tools/msi/tcltk/tcltk_reg.wxs | 48 +++++++++++++++ 14 files changed, 99 insertions(+), 63 deletions(-) create mode 100644 Tools/msi/tcltk/tcltk_reg.wxs diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 47d6fd0afe2..999ec1fc443 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -115,6 +115,9 @@ of available options is shown below. | | tho :envvar:`PATH` and ``.PY`` to | | | | :envvar:`PATHEXT` | | +---------------------------+--------------------------------------+--------------------------+ +| Shortcuts | Create shortcuts for the interpreter,| 1 | +| | documentation and IDLE if installed. | | ++---------------------------+--------------------------------------+--------------------------+ | Include_doc | Install Python manual | 1 | +---------------------------+--------------------------------------+--------------------------+ | Include_debug | Install debug binaries | 0 | diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm index 2d84872593d..a081850a257 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -65,15 +65,16 @@ #(loc.InstallAllUsersLabel) #(loc.AssociateFilesLabel) - #(loc.PrependPathLabel) - #(loc.PrecompileLabel) - #(loc.Include_symbolsLabel) - #(loc.Include_debugLabel) + #(loc.ShortcutsLabel) + #(loc.PrependPathLabel) + #(loc.PrecompileLabel) + #(loc.Include_symbolsLabel) + #(loc.Include_debugLabel) - #(loc.CustomLocationLabel) - - - #(loc.CustomLocationHelpLabel) + #(loc.CustomLocationLabel) + + + #(loc.CustomLocationHelpLabel) diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl index d578c347e17..ba67fc7f8cf 100644 --- a/Tools/msi/bundle/Default.wxl +++ b/Tools/msi/bundle/Default.wxl @@ -42,7 +42,8 @@ Continue? I &agree to the license terms and conditions &Install Now [DefaultJustForMeTargetDir] -Includes IDLE and pip + +Includes IDLE, pip and documentation Creates shortcuts and file associations C&ustomize installation Choose location and features @@ -68,6 +69,7 @@ Creates shortcuts and file associations Installs the global 'py' launcher to make it easier to start Python. Associate &files with Python (requires the py launcher) + Create shortcuts for installed applications Add Python to &environment variables Add &Python [ShortVersion] to PATH Install as &Administrator diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index ac92b2ff9e4..435cde3e0c6 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -746,8 +746,8 @@ public: // IBootstrapperApplication ) { LONGLONG install; - if (wcscmp(wzFeatureId, L"AssociateFiles") == 0) { - if (SUCCEEDED(_engine->GetVariableNumeric(L"AssociateFiles", &install)) && install) { + if (wcscmp(wzFeatureId, L"AssociateFiles") == 0 || wcscmp(wzFeatureId, L"Shortcuts") == 0) { + if (SUCCEEDED(_engine->GetVariableNumeric(wzFeatureId, &install)) && install) { *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL; } else { *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_ABSENT; diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs index 57bb4b24b1a..c8a7f5c9d54 100644 --- a/Tools/msi/bundle/bundle.wxs +++ b/Tools/msi/bundle/bundle.wxs @@ -58,6 +58,7 @@ + diff --git a/Tools/msi/bundle/packagegroups/doc.wxs b/Tools/msi/bundle/packagegroups/doc.wxs index 24b9ff18837..7843f44263a 100644 --- a/Tools/msi/bundle/packagegroups/doc.wxs +++ b/Tools/msi/bundle/packagegroups/doc.wxs @@ -6,6 +6,7 @@ SourceFile="doc.msi" Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" + EnableFeatureSelection="yes" ForcePerMachine="yes" InstallCondition="InstallAllUsers and Include_doc"> @@ -15,6 +16,7 @@ SourceFile="doc.msi" Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" + EnableFeatureSelection="yes" ForcePerMachine="no" InstallCondition="not InstallAllUsers and Include_doc"> diff --git a/Tools/msi/bundle/packagegroups/exe.wxs b/Tools/msi/bundle/packagegroups/exe.wxs index 046b90ec2c6..50346d94a16 100644 --- a/Tools/msi/bundle/packagegroups/exe.wxs +++ b/Tools/msi/bundle/packagegroups/exe.wxs @@ -7,6 +7,7 @@ ForcePerMachine="yes" Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" + EnableFeatureSelection="yes" InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip)"> @@ -32,6 +33,7 @@ ForcePerMachine="no" Compressed="$(var.CompressMSI)" DownloadUrl="$(var.DownloadUrl)" + EnableFeatureSelection="yes" InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip)"> diff --git a/Tools/msi/doc/doc.wxs b/Tools/msi/doc/doc.wxs index ddab83b5ea5..22b02139324 100644 --- a/Tools/msi/doc/doc.wxs +++ b/Tools/msi/doc/doc.wxs @@ -8,13 +8,14 @@ + + + - - - + + + + diff --git a/Tools/msi/exe/exe.wxs b/Tools/msi/exe/exe.wxs index 9696c899410..d8b05e0f584 100644 --- a/Tools/msi/exe/exe.wxs +++ b/Tools/msi/exe/exe.wxs @@ -8,10 +8,13 @@ - + + + + - - + diff --git a/Tools/msi/exe/exe_files.wxs b/Tools/msi/exe/exe_files.wxs index 40913982973..642237299f3 100644 --- a/Tools/msi/exe/exe_files.wxs +++ b/Tools/msi/exe/exe_files.wxs @@ -20,6 +20,10 @@ + + + + diff --git a/Tools/msi/tcltk/tcltk.wixproj b/Tools/msi/tcltk/tcltk.wixproj index 4d1d74c99e8..f66fc149884 100644 --- a/Tools/msi/tcltk/tcltk.wixproj +++ b/Tools/msi/tcltk/tcltk.wixproj @@ -14,6 +14,7 @@ + diff --git a/Tools/msi/tcltk/tcltk.wxs b/Tools/msi/tcltk/tcltk.wxs index 4a0d80f9ebe..5def5ed4db7 100644 --- a/Tools/msi/tcltk/tcltk.wxs +++ b/Tools/msi/tcltk/tcltk.wxs @@ -27,8 +27,19 @@ - + + + + + + + + + + + + - - - - - - VersionNT > 600 - - - - - VersionNT > 600 - - - - - - VersionNT > 600 - - - - - - - VersionNT > 600 - - - - - - - - VersionNT = 600 - - - - - - - VersionNT = 600 - - - - - - diff --git a/Tools/msi/tcltk/tcltk_reg.wxs b/Tools/msi/tcltk/tcltk_reg.wxs new file mode 100644 index 00000000000..e09892747ec --- /dev/null +++ b/Tools/msi/tcltk/tcltk_reg.wxs @@ -0,0 +1,48 @@ + + + + + + + VersionNT > 600 + + + + + VersionNT > 600 + + + + + + VersionNT > 600 + + + + + + + VersionNT > 600 + + + + + + + + VersionNT = 600 + + + + + + + VersionNT = 600 + + + + + + + +