Skip to content

Commit 12e3337

Browse files
[windows] add Python 3.10.1 to the installer
1 parent 319625c commit 12e3337

File tree

9 files changed

+189
-2
lines changed

9 files changed

+189
-2
lines changed

platforms/Windows/SideBySideUpgradeStrategy.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<ExperimentalRTLUpgradeCode>{F9BA01C7-0C7C-4898-90BD-9D6BB308F0B3}</ExperimentalRTLUpgradeCode>
3030
<AndroidPlatformUpgradeCode>{313B9C1F-D5B5-4FED-B7E0-138F1EE6B26A}</AndroidPlatformUpgradeCode>
3131
<WindowsPlatformUpgradeCode>{01AFF1CF-A025-41B6-BCBC-728D794353FD}</WindowsPlatformUpgradeCode>
32+
<PythonUpgradeCode>{5FC42BA9-ABF5-4CCD-B93B-BDFED936BA37}</PythonUpgradeCode>
3233
</PropertyGroup>
3334

3435
<PropertyGroup Condition="'$(MajorMinorProductVersion)' == '0.0'">
@@ -71,6 +72,7 @@
7172
ExperimentalRTLUpgradeCode=$(ExperimentalRTLUpgradeCode);
7273
AndroidPlatformUpgradeCode=$(AndroidPlatformUpgradeCode);
7374
WindowsPlatformUpgradeCode=$(WindowsPlatformUpgradeCode);
75+
PythonUpgradeCode=$(PythonUpgradeCode);
7476
</DefineConstants>
7577
</PropertyGroup>
7678
</Project>

platforms/Windows/bundle/installer.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<ProjectReference Include="..\cli\asserts\cli.asserts.wixproj" BindName="cli.asserts" />
2222
<ProjectReference Include="..\dbg\asserts\dbg.asserts.wixproj" BindName="dbg.asserts" />
2323
<ProjectReference Include="..\ide\asserts\ide.asserts.wixproj" BindName="ide.asserts" />
24+
<ProjectReference Include="..\python\asserts\python.wixproj" BindName="python" />
2425
</ItemGroup>
2526

2627
<ItemGroup Condition=" $(ToolchainVariants.Contains('noasserts')) ">

platforms/Windows/bundle/installer.wxs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@
141141
</MsiPackage>
142142
<?endif?>
143143

144+
<MsiPackage
145+
SourceFile="!(bindpath.python)\python.msi"
146+
InstallCondition="OptionsInstallEmbeddedPython = 1"
147+
DownloadUrl="$(BaseReleaseDownloadUrl)/{2}">
148+
<MsiProperty Name="INSTALLROOT" Value="[InstallRoot]" />
149+
</MsiPackage>
150+
144151
<MsiPackage
145152
SourceFile="!(bindpath.ide.asserts)\ide.asserts.msi"
146153
InstallCondition="OptionsInstallIDE = 1 and OptionsInstallAssertsToolchain = 1"

platforms/Windows/bundle/theme.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<Checkbox Name="OptionsInstallToolchain" X="192" Y="417" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="0">#(loc.Toolchain_ProductName)</Checkbox>
7777
<Checkbox Name="OptionsInstallAssertsToolchain" X="210" Y="435" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsIncludeNoAsserts and OptionsInstallNoAssertsToolchain">#(loc.Asserts_Toolchain_ProductName)</Checkbox>
7878
<Checkbox Name="OptionsInstallNoAssertsToolchain" X="210" Y="453" Width="-11" Height="17" TabStop="yes" FontId="3" EnableCondition="OptionsIncludeNoAsserts and OptionsInstallAssertsToolchain">#(loc.NoAsserts_Toolchain_ProductName)</Checkbox>
79-
79+
<Checkbox Name="OptionsInstallEmbeddedPython" X="192" Y="471" Width="-11" Height="17" TabStop="yes" FontId="3">#(loc.EmbeddedPython_ProductName)</Checkbox>
8080
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
8181
<Text>#(loc.OptionsOkButton)</Text>
8282
<ChangePageAction Page="Install" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="WixToolset.Sdk/4.0.5">
2+
<PropertyGroup>
3+
<OutputName>python</OutputName>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2+
<?define VariantName = asserts ?>
3+
<?define VariantUpgradeCode = $(PythonUpgradeCode)?>
4+
<?define VariantProductName = !(loc.EmbeddedPython_ProductName)?>
5+
<?define VariantCabinetName = python.asserts.cab?>
6+
<?define ToolchainVersionedVariantDirectory = ToolchainVersionedAsserts ?>
7+
<?define VariantEnvironmentComponentGUID = 30629e0c-b376-47bc-bedf-fefb7d4ca61d?>
8+
<?define PythonRoot = "$(ImageRoot)\Python"?>
9+
10+
<?include ../python.wxi ?>
11+
</Wix>
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
3+
4+
<Package
5+
Language="1033"
6+
Manufacturer="!(loc.ManufacturerName)"
7+
Name="$(VariantProductName)"
8+
UpgradeCode="$(VariantUpgradeCode)"
9+
Version="$(NonSemVerProductVersion)"
10+
Scope="$(PackageScope)">
11+
12+
<Media Id="1" Cabinet="$(VariantCabinetName)" EmbedCab="$(ArePackageCabsEmbedded)" />
13+
14+
<WixVariable Id="SideBySidePackageUpgradeCode" Value="$(VariantUpgradeCode)" />
15+
<FeatureGroupRef Id="SideBySideUpgradeStrategy" />
16+
17+
<ComponentGroup Id="EmbeddedPython">
18+
<Component Directory="toolchain_$(VariantName)_usr_bin">
19+
<File Source="$(PythonRoot)\libcrypto-1_1-arm64.dll" />
20+
</Component>
21+
22+
<Component Directory="toolchain_$(VariantName)_usr_bin">
23+
<File Source="$(PythonRoot)\libffi-7.dll" />
24+
</Component>
25+
26+
<Component Directory="toolchain_$(VariantName)_usr_bin">
27+
<File Source="$(PythonRoot)\libssl-1_1-arm64.dll" />
28+
</Component>
29+
30+
<Component Directory="toolchain_$(VariantName)_usr_bin">
31+
<File Source="$(PythonRoot)\LICENSE.txt" />
32+
</Component>
33+
34+
<Component Directory="toolchain_$(VariantName)_usr_bin">
35+
<File Source="$(PythonRoot)\pyexpat.pyd" />
36+
</Component>
37+
38+
<Component Directory="toolchain_$(VariantName)_usr_bin">
39+
<File Source="$(PythonRoot)\python.cat" />
40+
</Component>
41+
42+
<Component Directory="toolchain_$(VariantName)_usr_bin">
43+
<File Source="$(PythonRoot)\python.exe" />
44+
</Component>
45+
46+
<Component Directory="toolchain_$(VariantName)_usr_bin">
47+
<File Source="$(PythonRoot)\python3.dll" />
48+
</Component>
49+
50+
<Component Directory="toolchain_$(VariantName)_usr_bin">
51+
<File Source="$(PythonRoot)\python310.dll" />
52+
</Component>
53+
54+
<Component Directory="toolchain_$(VariantName)_usr_bin">
55+
<File Source="$(PythonRoot)\python310.zip" />
56+
</Component>
57+
58+
<Component Directory="toolchain_$(VariantName)_usr_bin">
59+
<File Source="$(PythonRoot)\python310._pth" />
60+
</Component>
61+
62+
<Component Directory="toolchain_$(VariantName)_usr_bin">
63+
<File Source="$(PythonRoot)\pythonw.exe" />
64+
</Component>
65+
66+
<Component Directory="toolchain_$(VariantName)_usr_bin">
67+
<File Source="$(PythonRoot)\select.pyd" />
68+
</Component>
69+
70+
<Component Directory="toolchain_$(VariantName)_usr_bin">
71+
<File Source="$(PythonRoot)\sqlite3.dll" />
72+
</Component>
73+
74+
<Component Directory="toolchain_$(VariantName)_usr_bin">
75+
<File Source="$(PythonRoot)\unicodedata.pyd" />
76+
</Component>
77+
78+
<Component Directory="toolchain_$(VariantName)_usr_bin">
79+
<File Source="$(PythonRoot)\vcruntime140.dll" />
80+
</Component>
81+
82+
<Component Directory="toolchain_$(VariantName)_usr_bin">
83+
<File Source="$(PythonRoot)\vcruntime140_1.dll" />
84+
</Component>
85+
86+
<Component Directory="toolchain_$(VariantName)_usr_bin">
87+
<File Source="$(PythonRoot)\winsound.pyd" />
88+
</Component>
89+
90+
<Component Directory="toolchain_$(VariantName)_usr_bin">
91+
<File Source="$(PythonRoot)\_asyncio.pyd" />
92+
</Component>
93+
94+
<Component Directory="toolchain_$(VariantName)_usr_bin">
95+
<File Source="$(PythonRoot)\_bz2.pyd" />
96+
</Component>
97+
98+
<Component Directory="toolchain_$(VariantName)_usr_bin">
99+
<File Source="$(PythonRoot)\_ctypes.pyd" />
100+
</Component>
101+
102+
<Component Directory="toolchain_$(VariantName)_usr_bin">
103+
<File Source="$(PythonRoot)\_decimal.pyd" />
104+
</Component>
105+
106+
<Component Directory="toolchain_$(VariantName)_usr_bin">
107+
<File Source="$(PythonRoot)\_elementtree.pyd" />
108+
</Component>
109+
110+
<Component Directory="toolchain_$(VariantName)_usr_bin">
111+
<File Source="$(PythonRoot)\_hashlib.pyd" />
112+
</Component>
113+
114+
<Component Directory="toolchain_$(VariantName)_usr_bin">
115+
<File Source="$(PythonRoot)\_lzma.pyd" />
116+
</Component>
117+
118+
<Component Directory="toolchain_$(VariantName)_usr_bin">
119+
<File Source="$(PythonRoot)\_msi.pyd" />
120+
</Component>
121+
122+
<Component Directory="toolchain_$(VariantName)_usr_bin">
123+
<File Source="$(PythonRoot)\_multiprocessing.pyd" />
124+
</Component>
125+
126+
<Component Directory="toolchain_$(VariantName)_usr_bin">
127+
<File Source="$(PythonRoot)\_overlapped.pyd" />
128+
</Component>
129+
130+
<Component Directory="toolchain_$(VariantName)_usr_bin">
131+
<File Source="$(PythonRoot)\_queue.pyd" />
132+
</Component>
133+
134+
<Component Directory="toolchain_$(VariantName)_usr_bin">
135+
<File Source="$(PythonRoot)\_socket.pyd" />
136+
</Component>
137+
138+
<Component Directory="toolchain_$(VariantName)_usr_bin">
139+
<File Source="$(PythonRoot)\_sqlite3.pyd" />
140+
</Component>
141+
142+
<Component Directory="toolchain_$(VariantName)_usr_bin">
143+
<File Source="$(PythonRoot)\_ssl.pyd" />
144+
</Component>
145+
146+
<Component Directory="toolchain_$(VariantName)_usr_bin">
147+
<File Source="$(PythonRoot)\_uuid.pyd" />
148+
</Component>
149+
150+
<Component Directory="toolchain_$(VariantName)_usr_bin">
151+
<File Source="$(PythonRoot)\_zoneinfo.pyd" />
152+
</Component>
153+
</ComponentGroup>
154+
155+
<Feature Id="EmbeddedPython" AllowAbsent="yes" Title="$(VariantProductName)">
156+
<ComponentGroupRef Id="EmbeddedPython" />
157+
</Feature>
158+
</Package>
159+
</Include>

platforms/Windows/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The bundle authoring (in `installer.wxs`) drives optional install directory and
3434
| InstallRoot | A formatted string variable that specifies the installation root directory. The default value specified in `installer.wxs` should match the equivalent `INSTALLROOT` authoring in `shared.wxs`. The bundle variable is passed to each `MsiPackage` so overwrites the default directory authored in the MSI packages -- but keeping them in sync avoids the confusion if the default directory should change. |
3535
| OptionsInstallCLI | Controls whether command-line tools will be installed. |
3636
| OptionsInstallDBG | Controls whether debugging tools will be installed. |
37+
| OptionsInstallEmbeddedPython | Controls whether embeddable Python will be installed. |
3738
| OptionsInstallIDE | Controls whether IDE integration tools will be installed. |
3839
| OptionsInstallUtilties | Controls whether additional utilities will be installed. |
3940
| OptionsInstallAndroidPlatform | Controls whether the Android platform will be installed. |
@@ -245,7 +246,7 @@ Note that these GUIDs are substituted at bind time so they skip the normal valid
245246

246247
| Property | Description |
247248
| -------- | ----------- |
248-
| BldAssertsUpgradeCode, BldNoAssertsUpgradeCode, CliAssertsUpgradeCode, CliNoAssertsUpgradeCode, DbgAssertsUpgradeCode, DbgNoAssertsUpgradeCode, IdeUpgradeCode, IdeNoUpgradeCode, RtlUpgradeCode, WindowsSDKUpgradeCode, AndroidSDKUpgradeCode | Upgrade codes for individual packages. Packages keep the same upgrade codes "forever" because MSI lets you specify version ranges for upgrades, which you can find in `shared/shared.wxs`. |
249+
| BldAssertsUpgradeCode, BldNoAssertsUpgradeCode, CliAssertsUpgradeCode, CliNoAssertsUpgradeCode, DbgAssertsUpgradeCode, DbgNoAssertsUpgradeCode, IdeUpgradeCode, IdeNoUpgradeCode, RtlUpgradeCode, WindowsSDKUpgradeCode, AndroidSDKUpgradeCode, PythonUpgradeCode | Upgrade codes for individual packages. Packages keep the same upgrade codes "forever" because MSI lets you specify version ranges for upgrades, which you can find in `shared/shared.wxs`. |
249250
| BundleUpgradeCode | Upgrade codes for the bundle. Bundles don't support upgrade version ranges, so the bundle upgrade code must change for every minor version _and_ stay the same for the entire lifetime of that minor version (e.g., v5.10.0 through v5.10.9999). You can keep the history of upgrade codes using a condition like `Condition="'$(MajorMinorProductVersion)' == '5.10'` or just replace BundleUpgradeCode when forking to a new minor version. |
250251

251252

platforms/Windows/shared/swift.en-us.wxl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<String Id="Dbg_ProductName" Value="Swift Debugging Tools" />
1212
<String Id="DbgAsserts_ProductName" Value="Swift Debugging Tools (Asserts)" />
1313
<String Id="DbgNoAsserts_ProductName" Value="Swift Debugging Tools (NoAsserts)" />
14+
<String Id="EmbeddedPython_ProductName" Value="Embedded Python 3.10.1" />
1415
<String Id="Ide_ProductName" Value="Swift IDE Integration Tools" />
1516
<String Id="IdeAsserts_ProductName" Value="Swift IDE Integration Tools (Asserts)" />
1617
<String Id="IdeNoAsserts_ProductName" Value="Swift IDE Integration Tools (NoAsserts)" />

0 commit comments

Comments
 (0)