]> granicus.if.org Git - python/commitdiff
Adds option to install launcher for all users even when installing Python just-for...
authorSteve Dower <steve.dower@microsoft.com>
Thu, 16 Jul 2015 23:33:55 +0000 (16:33 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 16 Jul 2015 23:33:55 +0000 (16:33 -0700)
Enables installer builds with the the text marker.
Allows simple installs to include a custom description.

13 files changed:
Doc/using/win_installer.png
Doc/using/windows.rst
Tools/msi/build.bat
Tools/msi/bundle/Default.thm
Tools/msi/bundle/Default.wxl
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Tools/msi/bundle/bundle.targets
Tools/msi/bundle/bundle.wxs
Tools/msi/bundle/packagegroups/launcher.wxs
Tools/msi/common.wxs
Tools/msi/launcher/launcher_files.wxs
Tools/msi/launcher/launcher_reg.wxs
Tools/msi/msi.props

index 8e258927c32ad46be2125cae89f90a770a8c34ba..e5d5e07a1433bc0b9c7ed8929cc8d95437249855 100644 (file)
Binary files a/Doc/using/win_installer.png and b/Doc/using/win_installer.png differ
index 8e3c1103dd33af3d00ea774fc1daca4d177d40c3..213912feb378a186873768e330d06362011cb956 100644 (file)
@@ -130,6 +130,9 @@ of available options is shown below.
 +---------------------------+--------------------------------------+--------------------------+
 | Include_launcher          | Install :ref:`launcher`.             | 1                        |
 +---------------------------+--------------------------------------+--------------------------+
+| InstallLauncherAllUsers   | Installs :ref:`launcher` for all     | 1                        |
+|                           | users.                               |                          |
++---------------------------+--------------------------------------+--------------------------+
 | Include_lib               | Install standard library and         | 1                        |
 |                           | extension modules                    |                          |
 +---------------------------+--------------------------------------+--------------------------+
@@ -145,6 +148,9 @@ of available options is shown below.
 +---------------------------+--------------------------------------+--------------------------+
 | SimpleInstall             | Disable most install UI              | 0                        |
 +---------------------------+--------------------------------------+--------------------------+
+| SimpleInstallDescription  | A custom message to display when the | (empty)                  |
+|                           | simplified install UI is used.       |                          |
++---------------------------+--------------------------------------+--------------------------+
 
 For example, to silently install a default, system-wide Python installation,
 you could use the following command (from an elevated command prompt)::
@@ -152,9 +158,11 @@ you could use the following command (from an elevated command prompt)::
     python-3.5.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
 
 To allow users to easily install a personal copy of Python without the test
-suite, you could provide a shortcut with the following command::
+suite, you could provide a shortcut with the following command. This will
+display a simplified initial page and disallow customization::
 
-    python-3.5.0.exe /passive InstallAllUsers=0 Include_launcher=0 Include_test=0 SimpleInstall=1
+    python-3.5.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
+        SimpleInstall=1 SimpleInstallDescription="Just for me, no test suite."
 
 (Note that omitting the launcher also omits file associations, and is only
 recommended for per-user installs when there is also a system-wide installation
index c135b63d218f06434e1985916a13becb5b571117..5ae512fbbe4b2f5b11209f7b17d4b06c82955ee3 100644 (file)
@@ -6,12 +6,14 @@ set PCBUILD=%D%..\..\PCBuild\
 set BUILDX86=\r
 set BUILDX64=\r
 set BUILDDOC=\r
+set BUILDPX=\r
 \r
 :CheckOpts\r
 if "%~1" EQU "-h" goto Help\r
 if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts\r
 if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts\r
 if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts\r
+if "%~1" EQU "--test-marker" (set BUILDPX=1) && shift && goto CheckOpts\r
 \r
 if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)\r
 \r
@@ -35,22 +37,28 @@ if defined BUILDDOC (
     if errorlevel 1 goto :eof\r
 )\r
 \r
+set BUILD_CMD="%D%bundle\snapshot.wixproj"\r
+if defined BUILDPX (\r
+    set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true\r
+)\r
+\r
 if defined BUILDX86 (\r
     "%PCBUILD%win32\python.exe" "%D%get_wix.py"\r
-    msbuild "%D%bundle\snapshot.wixproj"\r
+    msbuild %BUILD_CMD%\r
     if errorlevel 1 goto :eof\r
 )\r
 if defined BUILDX64 (\r
     "%PCBUILD%amd64\python.exe" "%D%get_wix.py"\r
-    msbuild "%D%bundle\snapshot.wixproj" /p:Platform=x64\r
+    msbuild /p:Platform=x64 %BUILD_CMD%\r
     if errorlevel 1 goto :eof\r
 )\r
 \r
 exit /B 0\r
 \r
 :Help\r
-echo build.bat [-x86] [-x64] [--doc] [-h]\r
+echo build.bat [-x86] [-x64] [--doc] [-h] [--test-marker]\r
 echo.\r
 echo    -x86                Build x86 installers\r
 echo    -x64                Build x64 installers\r
 echo    --doc               Build CHM documentation\r
+echo    --test-marker       Build installers with 'x' markers\r
index 0c79dd50c02952f95d866f7639267d42a2986800..4ba817642a1440216edc22b1e1d94527942e5789 100644 (file)
 
         <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
 
-        <Button Name="InstallButton" X="175" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallButton)</Button>
-        <Button Name="InstallCustomButton" X="175" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
+        <Button Name="InstallButton" X="175" Y="101" Width="-11" Height="109" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallButton)</Button>
+        <Button Name="InstallCustomButton" X="175" Y="221" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
 
         <Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="20" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
+        <Checkbox Name="InstallLauncherAllUsers" X="185" Y="-33" Width="-100" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.ShortInstallLauncherAllUsersLabel)</Checkbox>
 
         <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
     </Page>
@@ -43,7 +44,7 @@
         <Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
         <Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
 
-        <Button Name="InstallSimpleButton" X="175" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
+        <Button Name="InstallSimpleButton" X="175" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
 
         <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
     </Page>
@@ -63,7 +64,8 @@
         <Checkbox Name="Include_test" X="185" Y="186" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_testLabel)</Checkbox>
         <Text X="205" Y="206" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_testHelpLabel)</Text>
 
-        <Checkbox Name="Include_launcher" X="185" Y="231" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_launcherLabel)</Checkbox>
+        <Checkbox Name="Include_launcher" X="185" Y="231" Width="100" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_launcherLabel)</Checkbox>
+        <Checkbox Name="CustomInstallLauncherAllUsers" X="285" Y="231" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLauncherAllUsersLabel)</Checkbox>
         <Text X="205" Y="251" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_launcherHelpLabel)</Text>
 
         <Button Name="Custom1BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
index 19ba7eb14b0a6b80079cef0ae3fa7b8321151148..c12fb65a2e15ee3eb5829bef3a260c28808a6534 100644 (file)
@@ -50,7 +50,9 @@ Creates shortcuts and file associations</String>
   <String Id="InstallCustomButton">C&amp;ustomize installation</String>
   <String Id="InstallCustomButtonNote">Choose location and features</String>
   <String Id="InstallSimpleButton">&amp;Install</String>
-  <String Id="InstallSimpleButtonNote">Uses setting preselected by your administrator</String>
+  <String Id="InstallSimpleButtonNote">Use settings preselected by your administrator
+
+[SimpleInstallDescription]</String>
   <String Id="InstallUpgradeButton">&amp;Upgrade Now</String>
   <String Id="InstallUpgradeButtonNote">[TargetDir]
 
@@ -81,7 +83,9 @@ Select Customize to review current options.</String>
   <String Id="ShortcutsLabel">Create shortcuts for installed applications</String>
   <String Id="PrependPathLabel">Add Python to &amp;environment variables</String>
   <String Id="ShortPrependPathLabel">Add &amp;Python [ShortVersion] to PATH</String>
-  <String Id="InstallAllUsersLabel">Install as &amp;Administrator</String>
+  <String Id="InstallAllUsersLabel">Install for &amp;all users</String>
+  <String Id="InstallLauncherAllUsersLabel">for &amp;all users (requires elevation)</String>
+  <String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
   <String Id="PrecompileLabel">&amp;Precompile standard library</String>
   <String Id="Include_symbolsLabel">Install debugging &amp;symbols</String>
   <String Id="Include_debugLabel">Install debu&amp;g binaries (requires VS 2015 or later)</String>
index 21663041378d4a689db4dcee08777c3a4a37a172..2d8f04d9d59c5d89eb8f4740c31d2aeaae134f23 100644 (file)
@@ -87,11 +87,13 @@ enum CONTROL_ID {
     ID_INSTALL_UPGRADE_BUTTON,
     ID_INSTALL_UPGRADE_CUSTOM_BUTTON,
     ID_INSTALL_CANCEL_BUTTON,
-    
+    ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
+
     // Customize Page
     ID_TARGETDIR_EDITBOX,
     ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX,
     ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX,
+    ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
     ID_CUSTOM_COMPILE_ALL_CHECKBOX,
     ID_CUSTOM_BROWSE_BUTTON,
     ID_CUSTOM_BROWSE_BUTTON_LABEL,
@@ -150,10 +152,12 @@ static THEME_ASSIGN_CONTROL_ID CONTROL_ID_NAMES[] = {
     { ID_INSTALL_UPGRADE_BUTTON, L"InstallUpgradeButton" },
     { ID_INSTALL_UPGRADE_CUSTOM_BUTTON, L"InstallUpgradeCustomButton" },
     { ID_INSTALL_CANCEL_BUTTON, L"InstallCancelButton" },
+    { ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"InstallLauncherAllUsers" },
 
     { ID_TARGETDIR_EDITBOX, L"TargetDir" },
     { ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, L"AssociateFiles" },
     { ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX, L"InstallAllUsers" },
+    { ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"CustomInstallLauncherAllUsers" },
     { ID_CUSTOM_COMPILE_ALL_CHECKBOX, L"CompileAll" },
     { ID_CUSTOM_BROWSE_BUTTON, L"CustomBrowseButton" },
     { ID_CUSTOM_BROWSE_BUTTON_LABEL, L"CustomBrowseButtonLabel" },
@@ -261,10 +265,11 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
         LPWSTR defaultDir = nullptr;
         LPWSTR targetDir = nullptr;
         LONGLONG elevated, crtInstalled, installAllUsers;
-        BOOL checked;
+        BOOL checked, launcherChecked;
         WCHAR wzPath[MAX_PATH] = { };
         BROWSEINFOW browseInfo = { };
         PIDLIST_ABSOLUTE pidl = nullptr;
+        DWORD pageId;
         HRESULT hr = S_OK;
 
         switch(id) {
@@ -278,7 +283,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
         case ID_INSTALL_BUTTON:
             SavePageSettings();
 
-            if (!QueryElevateForCrtInstall()) {
+            if (!WillElevate() && !QueryElevateForCrtInstall()) {
                 break;
             }
 
@@ -344,18 +349,32 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
                 ReleaseStr(targetDir);
             }
 
-            checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
-            if (!checked && !QueryElevateForCrtInstall()) {
+            if (!WillElevate() && !QueryElevateForCrtInstall()) {
                 break;
             }
 
             OnPlan(_command.action);
             break;
 
+        case ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+            checked = ThemeIsControlChecked(_theme, ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+            _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+            ThemeControlElevates(_theme, ID_INSTALL_BUTTON, WillElevate());
+            break;
+
+        case ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+            checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+            _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
+            break;
+
         case ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX:
-            hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
             checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
-            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, checked && (FAILED(hr) || !elevated));
+            _engine->SetVariableNumeric(L"InstallAllUsers", checked);
+
+            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
             ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
             if (checked) {
                 _engine->SetVariableNumeric(L"CompileAll", 1);
@@ -416,6 +435,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
         case ID_MODIFY_BUTTON:
             // Some variables cannot be modified
             _engine->SetVariableString(L"InstallAllUsersState", L"disable");
+            _engine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
             _engine->SetVariableString(L"TargetDirState", L"disable");
             _engine->SetVariableString(L"CustomBrowseButtonState", L"disable");
             _modifying = TRUE;
@@ -437,35 +457,36 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
 
     void InstallPage_Show() {
         // Ensure the All Users install button has a UAC shield
-        LONGLONG elevated, installAll;
-
-        if (FAILED(BalGetNumericVariable(L"WixBundleElevated", &elevated))) {
-            elevated = 0;
-        }
+        BOOL elevated = WillElevate();
+        ThemeControlElevates(_theme, ID_INSTALL_BUTTON, elevated);
+        ThemeControlElevates(_theme, ID_INSTALL_SIMPLE_BUTTON, elevated);
+        ThemeControlElevates(_theme, ID_INSTALL_UPGRADE_BUTTON, elevated);
+    }
 
+    void Custom1Page_Show() {
+        LONGLONG installLauncherAllUsers;
 
-        if (SUCCEEDED(BalGetNumericVariable(L"InstallAllUsers", &installAll)) && installAll && !elevated) {
-            ThemeControlElevates(_theme, ID_INSTALL_BUTTON, TRUE);
-            ThemeControlElevates(_theme, ID_INSTALL_SIMPLE_BUTTON, TRUE);
-            ThemeControlElevates(_theme, ID_INSTALL_UPGRADE_BUTTON, TRUE);
+        if (FAILED(BalGetNumericVariable(L"InstallLauncherAllUsers", &installLauncherAllUsers))) {
+            installLauncherAllUsers = 0;
         }
-    }
 
-    void Custom1Page_Show() {
+        ThemeSendControlMessage(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, BM_SETCHECK,
+            installLauncherAllUsers ? BST_CHECKED : BST_UNCHECKED, 0);
     }
 
     void Custom2Page_Show() {
         HRESULT hr;
-        LONGLONG installAll, elevated, includeLauncher;
+        LONGLONG installAll, includeLauncher;
         
-        if (FAILED(BalGetNumericVariable(L"WixBundleElevated", &elevated))) {
-            elevated = 0;
+        if (FAILED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
+            installAll = 0;
         }
-        if (SUCCEEDED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
-            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, installAll && !elevated);
+
+        if (WillElevate()) {
+            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, TRUE);
             ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_HIDE);
         } else {
-            installAll = 0;
+            ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, FALSE);
             ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_SHOW);
         }
 
@@ -1839,8 +1860,8 @@ private:
             COLORREF fg = fnt->crForeground, bg = fnt->crBackground;
             *brush = fnt->hBackground;
             RemapColor(&fg, &bg, brush);
-            SetTextColor(hDC, fg);
-            SetBkColor(hDC, bg);
+            ::SetTextColor(hDC, fg);
+            ::SetBkColor(hDC, bg);
 
             return TRUE;
         }
@@ -2080,6 +2101,7 @@ private:
 
         for (DWORD i = 0; i < pPage->cControlIndices; ++i) {
             THEME_CONTROL* pControl = _theme->rgControls + pPage->rgdwControlIndices[i];
+            BOOL enableControl = TRUE;
 
             // If this is a named control, try to set its default state.
             if (pControl->sczName && *pControl->sczName) {
@@ -2091,7 +2113,7 @@ private:
 
                     // If the control value isn't set then disable it.
                     if (!SUCCEEDED(hr)) {
-                        ThemeControlEnable(_theme, pControl->wId, FALSE);
+                        enableControl = FALSE;
                     } else {
                         ThemeSendControlMessage(
                             _theme,
@@ -2110,13 +2132,25 @@ private:
                     LPWSTR controlState = nullptr;
                     hr = BalGetStringVariable(controlName, &controlState);
                     if (SUCCEEDED(hr) && controlState && *controlState) {
+                        if (controlState[0] == '[') {
+                            LPWSTR formatted = nullptr;
+                            if (SUCCEEDED(BalFormatString(controlState, &formatted))) {
+                                StrFree(controlState);
+                                controlState = formatted;
+                            }
+                        }
+
                         if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"disable", -1)) {
                             BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Disable control %ls", pControl->sczName);
-                            ThemeControlEnable(_theme, pControl->wId, FALSE);
+                            enableControl = FALSE;
                         } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"hide", -1)) {
                             BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Hide control %ls", pControl->sczName);
                             // TODO: This doesn't work
                             ThemeShowControl(_theme, pControl->wId, SW_HIDE);
+                        } else {
+                            // An explicit state can override the lack of a
+                            // backing variable.
+                            enableControl = TRUE;
                         }
                     }
                     StrFree(controlState);
@@ -2124,6 +2158,8 @@ private:
                 StrFree(controlName);
             }
 
+            ThemeControlEnable(_theme, pControl->wId, enableControl);
+
             // Format the text in each of the new page's controls
             if (pControl->sczText && *pControl->sczText) {
                 // If the wix developer is showing a hidden variable
@@ -2405,6 +2441,16 @@ private:
         }
     }
 
+    BOOL WillElevate() {
+        static BAL_CONDITION WILL_ELEVATE_CONDITION = {
+            L"not WixBundleElevated and (InstallAllUsers or (InstallLauncherAllUsers and Include_launcher))",
+            L""
+        };
+        BOOL result;
+
+        return SUCCEEDED(BalConditionEvaluate(&WILL_ELEVATE_CONDITION, _engine, &result, nullptr)) && result;
+    }
+
     BOOL IsCrtInstalled() {
         if (_crtInstalledToken > 0) {
             return TRUE;
index 1ff00015b95e80d9203ab829fdd02077d1512afb..b77646bec46ed1d7adf8f2235208b3ee63b3fbee 100644 (file)
@@ -88,7 +88,7 @@
     
     <Target Name="BuildLauncher" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
         <!-- Build the launcher MSI using Exec rather than MSBuild -->
-        <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease)'
+        <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=$(UseTestMarker)'
               ContinueOnError="false" />
     </Target>
     
index 678dac4e872f17df65931b42790b760964bbba5b..761384e7f288a3dc9d7f56b689b7714ad5675d26 100644 (file)
     <Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
 
     <Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
+    <Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
     <Variable Name="TargetDir" Value="" bal:Overridable="yes" />
     <?if $(var.Platform)~="x64" ?>
-    <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python [ShortVersion]" bal:Overridable="yes" />
+    <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" />
     <Variable Name="TargetPlatform" Value="x64" />
     <?else ?>
-    <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]Python [ShortVersion]" bal:Overridable="yes" />
+    <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" />
     <Variable Name="TargetPlatform" Value="x86" />
     <?endif ?>
-    <Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\Python\Python[ShortVersionNoDot]$(var.Suffix32)" bal:Overridable="yes" />
+    <Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\$(var.TestPrefix)Python\Python[ShortVersionNoDot]$(var.Suffix32)" bal:Overridable="yes" />
     <Variable Name="OptionalFeaturesRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstalledFeatures" />
     <Variable Name="TargetDirRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstallPath" />
     
@@ -45,6 +46,8 @@
     <Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
 
     <Variable Name="InstallAllUsersState" Value="enabled" />
+    <Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
+    <Variable Name="CustomInstallLauncherAllUsersState" Value="[InstallLauncherAllUsersState]" />
     <Variable Name="TargetDirState" Value="enabled" />
     <Variable Name="CustomBrowseButtonState" Value="enabled" />
 
@@ -67,6 +70,7 @@
     <Variable Name="CompileAll" Value="0" bal:Overridable="yes" />
     
     <Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
+    <Variable Name="SimpleInstallDescription" Value="" bal:Overridable="yes" />
     
     <Chain ParallelCache="yes">
       <PackageGroupRef Id="crt" />
index d09175f7dc2b65adefbbe767a4959d3c42fc35d7..77c6ac5dde82dce72391bdd190e52b30795f211e 100644 (file)
@@ -9,7 +9,7 @@
                         DownloadUrl="$(var.DownloadUrl)"
                         ForcePerMachine="yes"
                         EnableFeatureSelection="yes"
-                        InstallCondition="InstallAllUsers and Include_launcher" />
+                        InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher" />
 
             <MsiPackage Id="launcher_JustForMe"
                         SourceFile="launcher.msi"
@@ -17,7 +17,7 @@
                         DownloadUrl="$(var.DownloadUrl)"
                         ForcePerMachine="no"
                         EnableFeatureSelection="yes"
-                        InstallCondition="not InstallAllUsers and Include_launcher" />
+                        InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher" />
         </PackageGroup>
     </Fragment>
 </Wix>
\ No newline at end of file
index cc39540a2b06f412fc47092890348d0c2ae128a6..9f96bd3f4cdc525de7c29898d80a6ea27093fac9 100644 (file)
     <Fragment>
         <DirectoryRef Id="TARGETDIR">
             <Directory Id="ProgramMenuFolder">
-                <Directory Id="MenuDir" Name="!(loc.ProductName)" />
+                <Directory Id="MenuDir" Name="$(var.TestPrefix)!(loc.ProductName)" />
             </Directory>
         </DirectoryRef>
     </Fragment>
index 589dee5654716288a0bd97384f5482efcd2329cd..7148258a000b886d5cab68e0c9dde6b2560cc1b0 100644 (file)
@@ -3,22 +3,22 @@
     <Fragment>
         <ComponentGroup Id="launcher_exe">
             <Component Id="py.exe" Directory="LauncherInstallDirectory" Guid="{B5107402-6958-461B-8B0A-4037D3327160}">
-                <File Id="py.exe" Name="py.exe" Source="py.exe" KeyPath="yes" />
+                <File Id="py.exe" Name="py$(var.TestPrefix).exe" Source="py.exe" KeyPath="yes" />
                 <RegistryValue Root="HKMU" Key="Software\Python\PyLauncher" Value="[#py.exe]" Type="string" />
             </Component>
             <Component Id="pyw.exe" Directory="LauncherInstallDirectory" Guid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}">
-                <File Id="pyw.exe" Name="pyw.exe" Source="pyw.exe" KeyPath="yes" />
+                <File Id="pyw.exe" Name="pyw$(var.TestPrefix).exe" Source="pyw.exe" KeyPath="yes" />
             </Component>
 
             <Component Id="launcher_path_cu" Directory="LauncherInstallDirectory" Guid="{95AEB930-367C-475C-A17E-A89BFCD4C670}">
                 <Condition>NOT ALLUSERS=1</Condition>
                 
-                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\$(var.TestPrefix)Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
                 <Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[LauncherInstallDirectory]" />
             </Component>
             <Component Id="launcher_path_lm" Directory="LauncherInstallDirectory" Guid="{4A41C365-4E27-4D38-A6D1-4A01B4A6500C}">
                 <Condition>ALLUSERS=1</Condition>
-                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\$(var.TestPrefix)Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
             </Component>
         </ComponentGroup>
     </Fragment>
index eef71c8d392c708a4112d53d916f6ff12138a7f3..d00f442fd08365699352cc2fe345cfa0af212345 100644 (file)
@@ -3,7 +3,7 @@
     <Fragment>
         <ComponentGroup Id="launcher_reg">
             <Component Id="file_association" Directory="LauncherInstallDirectory" Guid="{5AF84D9A-D820-456B-B230-6E0105A50276}">
-                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
+                <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\$(var.TestPrefix)Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
                 
                 <ProgId Id="$(var.TestPrefix)Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
                     <Extension Id="$(var.FileExtension)" ContentType="text/plain">
index 2d13aef698776d77b5f05ff38f3a194549e71377..29be12932801fc432bab38c82e89c96713fb2bde 100644 (file)
         <DefineConstants Condition="'$(CRTRedist)' != ''">
             $(DefineConstants);CRTRedist=$(CRTRedist);
         </DefineConstants>
-        <DefineConstants Condition="$(Configuration) != 'Debug'">
+        <DefineConstants Condition="$(UseTestMarker) != 'true'">
             $(DefineConstants);TestPrefix=;FileExtension=py;
         </DefineConstants>
-        <DefineConstants Condition="$(Configuration) == 'Debug'">
+        <DefineConstants Condition="$(UseTestMarker) == 'true'">
             $(DefineConstants);TestPrefix=x;FileExtension=px;
         </DefineConstants>
         <DefineConstants Condition="$(Platform) != 'x64'">