Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ef16d96
WiX: make runtime shared-fragment opt-outs explicit
compnerd Jun 16, 2026
5503cf1
WiX: remove unused shared runtime SDKRoot define
compnerd Jun 11, 2026
58c8e65
WiX: align BlocksRuntime with the toolchain SxS layout
compnerd Jun 16, 2026
05e91a4
WiX: centralize runtime library metadata
compnerd Jun 13, 2026
968a152
WiX: name dynamic runtime MSMs by linkage
compnerd Jun 15, 2026
68decde
WiX: encode shared assembly mode in runtime MSM names
compnerd Jun 15, 2026
c0ce9c8
WiX: add private runtime MSMs
compnerd Jun 15, 2026
0870f5c
WiX: expose runtime MSM installation modes in bundle UI
compnerd Jun 15, 2026
e589e3c
WiX: default HelloMergeModule to private RTL MSM
compnerd Jun 16, 2026
dc2eb05
WiX: share Windows SDK discovery across tools
compnerd Jun 16, 2026
c8358ce
WiX: diagnose missing signtool
compnerd Jun 16, 2026
6176193
WiX: require Win32 assembly catalog tools
compnerd Jun 16, 2026
cf183d7
WiX: package shared RTL as cataloged Win32 assemblies
compnerd Jun 16, 2026
9220096
WiX: align Windows installer docs with authoring
compnerd Jun 16, 2026
e2a236d
WiX: correct embedded Python identity and filenames
compnerd Jun 16, 2026
1d668b5
WiX: apply SxS upgrade policy to Android platform
compnerd Jun 16, 2026
6bee1e4
WiX: correct Swift sidebar source asset extension
compnerd Jun 16, 2026
e8cdce2
WiX: share platform fragment imports
compnerd Jun 16, 2026
f696102
WiX: derive SDK tree option metadata
compnerd Jun 16, 2026
8e16b41
WiX: collapse platform SDK package properties
compnerd Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions platforms/Windows/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<AcceptEula>wix7</AcceptEula>
</PropertyGroup>

<Import Project="RuntimeLibraries.props" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />

<PropertyGroup>
<ProductArchitecture Condition=" '$(ProductArchitecture)' == '' ">amd64</ProductArchitecture>
<ProductVersion Condition=" '$(ProductVersion)' == '' ">0.0.0</ProductVersion>
Expand Down
23 changes: 19 additions & 4 deletions platforms/Windows/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<RuntimePackages>;rtllib;rtlmsm;rtl.static.msm;rtl.shared.lib;rtl.shared.msm;</RuntimePackages>
</PropertyGroup>
<ItemGroup>
<RuntimePackages Include="shared" />
<RuntimePackages Include="rtllib" />
<RuntimePackages Include="rtlmsm" />
<RuntimePackages Include="rtl.static.msm" />
<RuntimePackages Include="rtl.dynamic.lib" />
<RuntimePackages Include="rtl.dynamic.msm" />
<_SharedFragmentConsumer Include="$(MSBuildProjectName)" Exclude="@(RuntimePackages)" />
</ItemGroup>

<ItemGroup Condition=" ! $([System.String]::Copy('$(RuntimePackages)').Contains($(MSBuildProjectName))) ">
<ItemGroup Condition=" '@(_SharedFragmentConsumer)' != '' ">
<ProjectReference Include="$(MSBuildThisFileDirectory)shared\shared.wixproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(RuntimeLibraryInstallationMode)' != '' ">
<DefineConstants>
$(DefineConstants);
RuntimeLibraryInstallationMode=$(RuntimeLibraryInstallationMode);
</DefineConstants>
</PropertyGroup>

<Import Project="RuntimeLibraries.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />

<ItemGroup>
<PackageReference Include="WixToolset.Util.wixext" Version="7.0.0" />
</ItemGroup>
Expand Down
72 changes: 72 additions & 0 deletions platforms/Windows/RuntimeLibraries.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemDefinitionGroup>
<Module>
<Group>SDK</Group>
<Platforms>Android;Windows</Platforms>
<Shared>true</Shared>
<Static>true</Static>
</Module>
<Library>
<Group>SDK</Group>
<Platforms>Android;Windows</Platforms>
<Shared>true</Shared>
<Static>true</Static>
</Library>
</ItemDefinitionGroup>

<ItemGroup>
<Module Include="Swift" LibraryName="swiftCore" StaticRuntimeDependencies="BlocksRuntime;dispatch" />

<Module Include="_Concurrency" />
<Module Include="SwiftOnoneSupport" />
<Library Include="RemoteMirror" LibraryName="swiftRemoteMirror" />

<Module Include="_Builtin_float" />

<Module Include="Cxx" Shared="false" SDKSharedLinkage="true" />
<Module Include="CxxStdlib" Shared="false" SDKSharedLinkage="true" />

<Module Include="Android" Platforms="Android" />
<Module Include="_math" Platforms="Android" />

<Module Include="CRT" Platforms="Windows" />
<Module Include="WinSDK" Platforms="Windows" />

<Library Include="dispatch" />
<Module Include="Dispatch" />

<Module Include="_FoundationCollections" Shared="false" SDKSharedLinkage="true" />
<Module Include="Foundation" LibraryName="Foundation" StaticDependencies="CoreFoundation;brotlicommon;brotlidec;curl;libxml2;zlib;_FoundationCShims;_FoundationInternationalizationData" />
<Module Include="FoundationEssentials" LibraryName="FoundationEssentials" />
<Module Include="FoundationInternationalization" LibraryName="FoundationInternationalization" />
<Module Include="FoundationNetworking" LibraryName="FoundationNetworking" />
<Module Include="FoundationXML" LibraryName="FoundationXML" />

<Module Include="_Differentiation" />
<Module Include="_RegexParser" />
<Module Include="_StringProcessing" />
<Module Include="_Volatile" />
<Module Include="Distributed" />
<Module Include="Observation" />
<Module Include="RegexBuilder" />
<Module Include="Synchronization" />

<Module Include="Runtime" Platforms="Windows" />

<Library Include="BlocksRuntime" />
<Library Include="_FoundationICU" ComponentGroup="_FoundationUnicode" />

<Library Include="CoreFoundation" Shared="false" />
<Library Include="brotlicommon" Shared="false" />
<Library Include="brotlidec" Shared="false" />
<Library Include="curl" Shared="false" />
<Library Include="libxml2" Shared="false" />
<Library Include="zlib" Shared="false" />
<Library Include="_FoundationCShims" Shared="false" />
<Library Include="_FoundationInternationalizationData" Shared="false" />

<Module Include="XCTest" Group="DeveloperTools" />
<Module Include="Testing" Group="DeveloperTools" />
</ItemGroup>
</Project>
116 changes: 116 additions & 0 deletions platforms/Windows/RuntimeLibraries.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project InitialTargets="_DefineRuntimeLibraryConstants">
<Target Name="_DefineRuntimeLibraryConstants" Condition="'$(MSBuildProjectExtension)' == '.wixproj'">
<PropertyGroup>
<_SDKPlatform Condition="'$(MSBuildProjectName)' == 'android'">Android</_SDKPlatform>
<_SDKPlatform Condition="'$(MSBuildProjectName)' == 'windows'">Windows</_SDKPlatform>
<_RuntimeLibraryPlatform Condition="'$(MSBuildProjectName)' == 'rtl.dynamic.lib'">Windows</_RuntimeLibraryPlatform>
</PropertyGroup>

<ItemGroup Condition="'$(_SDKPlatform)' != ''">
<_SDKSwiftModule
Include="@(Module)"
Condition="'%(Module.Group)' == 'SDK' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.SDKSwiftModule)' == ''" />
<_SDKSwiftModule
Include="%(Module.SDKSwiftModule)"
Condition="'%(Module.Group)' == 'SDK' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.SDKSwiftModule)' != ''" />

<_SDKSharedLinkageComponentGroup
Include="@(Module)"
Condition="'%(Module.Group)' == 'SDK' and ('%(Module.Shared)' == 'true' or '%(Module.SDKSharedLinkage)' == 'true') and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' == ''" />
<_SDKSharedLinkageComponentGroup
Include="%(Module.ComponentGroup)"
Condition="'%(Module.Group)' == 'SDK' and ('%(Module.Shared)' == 'true' or '%(Module.SDKSharedLinkage)' == 'true') and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' != ''" />
<_SDKSharedLinkageComponentGroup
Include="@(Library)"
Condition="'%(Library.Group)' == 'SDK' and ('%(Library.Shared)' == 'true' or '%(Library.SDKSharedLinkage)' == 'true') and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_SDKPlatform)')) and '%(Library.ComponentGroup)' == ''" />
<_SDKSharedLinkageComponentGroup
Include="%(Library.ComponentGroup)"
Condition="'%(Library.Group)' == 'SDK' and ('%(Library.Shared)' == 'true' or '%(Library.SDKSharedLinkage)' == 'true') and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_SDKPlatform)')) and '%(Library.ComponentGroup)' != ''" />

<_SDKStaticLinkageComponentGroup
Include="@(Module)"
Condition="'%(Module.Group)' == 'SDK' and '%(Module.Static)' == 'true' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' == ''" />
<_SDKStaticLinkageComponentGroup
Include="%(Module.ComponentGroup)"
Condition="'%(Module.Group)' == 'SDK' and '%(Module.Static)' == 'true' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' != ''" />
<_SDKStaticLinkageComponentGroup
Include="@(Library)"
Condition="'%(Library.Group)' == 'SDK' and '%(Library.Static)' == 'true' and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_SDKPlatform)')) and '%(Library.ComponentGroup)' == ''" />
<_SDKStaticLinkageComponentGroup
Include="%(Library.ComponentGroup)"
Condition="'%(Library.Group)' == 'SDK' and '%(Library.Static)' == 'true' and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_SDKPlatform)')) and '%(Library.ComponentGroup)' != ''" />

<_DeveloperToolsSharedLinkageComponentGroup
Include="@(Module)"
Condition="'%(Module.Group)' == 'DeveloperTools' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' == ''" />
<_DeveloperToolsSharedLinkageComponentGroup
Include="%(Module.ComponentGroup)"
Condition="'%(Module.Group)' == 'DeveloperTools' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_SDKPlatform)')) and '%(Module.ComponentGroup)' != ''" />
</ItemGroup>

<ItemGroup Condition="'$(_RuntimeLibraryPlatform)' != ''">
<_RuntimeLibrary
Include="swift%(Module.Identity)"
Condition="'%(Module.Group)' == 'SDK' and '%(Module.Shared)' == 'true' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_RuntimeLibraryPlatform)')) and '%(Module.LibraryName)' == ''" />
<_RuntimeLibrary
Include="%(Module.LibraryName)"
Condition="'%(Module.Group)' == 'SDK' and '%(Module.Shared)' == 'true' and $([System.String]::Copy('%(Module.Platforms)').Contains('$(_RuntimeLibraryPlatform)')) and '%(Module.LibraryName)' != ''" />
<_RuntimeLibrary
Include="%(Library.Identity)"
Condition="'%(Library.Group)' == 'SDK' and '%(Library.Shared)' == 'true' and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_RuntimeLibraryPlatform)')) and '%(Library.LibraryName)' == ''" />
<_RuntimeLibrary
Include="%(Library.LibraryName)"
Condition="'%(Library.Group)' == 'SDK' and '%(Library.Shared)' == 'true' and $([System.String]::Copy('%(Library.Platforms)').Contains('$(_RuntimeLibraryPlatform)')) and '%(Library.LibraryName)' != ''" />
<_RuntimeLibrary Remove="@(_RuntimeLibrary)"
Condition="'%(_RuntimeLibrary.Identity)' == ''" />
</ItemGroup>

<ItemGroup Condition="'$(MSBuildProjectName)' == 'rtl.static.msm'">
<_StaticRuntimeDependency
Include="%(Module.StaticRuntimeDependencies)"
Condition="'%(Module.StaticRuntimeDependencies)' != ''" />
<_StaticRuntimeDependency Remove="@(_StaticRuntimeDependency)"
Condition="'%(_StaticRuntimeDependency.Identity)' == ''" />
</ItemGroup>

<PropertyGroup Condition="'$(_SDKPlatform)' != ''">
<SDKSwiftModules>@(_SDKSwiftModule, ';')</SDKSwiftModules>
<SDKSharedLinkageComponentGroups>@(_SDKSharedLinkageComponentGroup, ';')</SDKSharedLinkageComponentGroups>
<SDKStaticLinkageComponentGroups>@(_SDKStaticLinkageComponentGroup, ';')</SDKStaticLinkageComponentGroups>
<DeveloperToolsSharedLinkageComponentGroups>@(_DeveloperToolsSharedLinkageComponentGroup, ';')</DeveloperToolsSharedLinkageComponentGroups>
</PropertyGroup>

<PropertyGroup Condition="'$(_RuntimeLibraryPlatform)' != ''">
<RuntimeLibraries>@(_RuntimeLibrary, ';')</RuntimeLibraries>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildProjectName)' == 'rtl.static.msm'">
<StaticRuntimeDependencies>@(_StaticRuntimeDependency, ';')</StaticRuntimeDependencies>
</PropertyGroup>

<PropertyGroup Condition="'$(_SDKPlatform)' != ''">
<DefineConstants>
$(DefineConstants);
DeveloperToolsSharedLinkageComponentGroups=$([MSBuild]::Escape($(DeveloperToolsSharedLinkageComponentGroups)));
SDKSwiftModules=$([MSBuild]::Escape($(SDKSwiftModules)));
SDKSharedLinkageComponentGroups=$([MSBuild]::Escape($(SDKSharedLinkageComponentGroups)));
SDKStaticLinkageComponentGroups=$([MSBuild]::Escape($(SDKStaticLinkageComponentGroups)));
</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(_RuntimeLibraryPlatform)' != ''">
<DefineConstants>
$(DefineConstants);
RuntimeLibraries=$([MSBuild]::Escape($(RuntimeLibraries)));
</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildProjectName)' == 'rtl.static.msm'">
<DefineConstants>
$(DefineConstants);
StaticRuntimeDependencies=$([MSBuild]::Escape($(StaticRuntimeDependencies)));
</DefineConstants>
</PropertyGroup>
</Target>
</Project>
99 changes: 99 additions & 0 deletions platforms/Windows/RuntimeWin32Assemblies.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project InitialTargets="_DefineRuntimeWin32AssemblyConstants">
<Target Name="_DefineRuntimeWin32AssemblyConstants"
DependsOnTargets="_DefineRuntimeLibraryConstants">
<PropertyGroup>
<RuntimeWin32AssemblyRoot Condition="'$(RuntimeWin32AssemblyRoot)' == ''">$(IntermediateOutputPath)RuntimeWin32Assemblies</RuntimeWin32AssemblyRoot>

<DefineConstants>
$(DefineConstants);
RuntimeWin32AssemblyRoot=$([MSBuild]::Escape($(RuntimeWin32AssemblyRoot)));
</DefineConstants>
</PropertyGroup>
</Target>

<Target Name="GenerateRuntimeWin32Assemblies"
DependsOnTargets="_DefineRuntimeWin32AssemblyConstants;FindWindowsSDKTools"
BeforeTargets="CoreCompile;Compile">
<PropertyGroup>
<_RuntimeRoot Condition="'$(ProductArchitecture)' == 'x86'">$(WindowsRuntimeX86)</_RuntimeRoot>
<_RuntimeRoot Condition="'$(ProductArchitecture)' == 'amd64' or '$(ProductArchitecture)' == 'x64'">$(WindowsRuntimeX64)</_RuntimeRoot>
<_RuntimeRoot Condition="'$(ProductArchitecture)' == 'arm64'">$(WindowsRuntimeARM64)</_RuntimeRoot>

<_RuntimeWin32AssemblyLibraries Condition="'$(RuntimeWin32AssemblyLibrarySource)' == 'RuntimeLibraries'">$(RuntimeLibraries)</_RuntimeWin32AssemblyLibraries>
<_RuntimeWin32AssemblyLibraries Condition="'$(RuntimeWin32AssemblyLibrarySource)' == 'StaticRuntimeDependencies'">$(StaticRuntimeDependencies)</_RuntimeWin32AssemblyLibraries>
</PropertyGroup>

<Error Condition="'$(RuntimeWin32AssemblyLibrarySource)' != 'RuntimeLibraries' and '$(RuntimeWin32AssemblyLibrarySource)' != 'StaticRuntimeDependencies'"
Text="RuntimeWin32AssemblyLibrarySource must be RuntimeLibraries or StaticRuntimeDependencies." />
<Error Condition="'$(_RuntimeRoot)' == ''"
Text="Unable to determine the Windows runtime root for ProductArchitecture=$(ProductArchitecture)." />
<Error Condition="'$(_RuntimeWin32AssemblyLibraries)' == ''"
Text="No runtime libraries were selected for shared Win32 assembly generation." />

<ItemGroup>
<_RuntimeWin32Assembly Include="$(_RuntimeWin32AssemblyLibraries)" />
<_RuntimeWin32Assembly Remove="@(_RuntimeWin32Assembly)"
Condition="'%(_RuntimeWin32Assembly.Identity)' == ''" />
<_RuntimeWin32Assembly Update="@(_RuntimeWin32Assembly)">
<AssemblyDirectory>$(RuntimeWin32AssemblyRoot)\%(Identity)</AssemblyDirectory>
<SourceDll>$(_RuntimeRoot)\usr\bin\%(Identity).dll</SourceDll>
<Dll>$(RuntimeWin32AssemblyRoot)\%(Identity)\%(Identity).dll</Dll>
<Manifest>$(RuntimeWin32AssemblyRoot)\%(Identity)\%(Identity).manifest</Manifest>
<Catalog>$(RuntimeWin32AssemblyRoot)\%(Identity)\%(Identity).cat</Catalog>
<CatalogDefinition>$(RuntimeWin32AssemblyRoot)\%(Identity)\%(Identity).cdf</CatalogDefinition>
</_RuntimeWin32Assembly>
</ItemGroup>

<Error Condition="!Exists('%(_RuntimeWin32Assembly.SourceDll)')"
Text="Runtime library '%(_RuntimeWin32Assembly.SourceDll)' does not exist." />

<MakeDir Directories="@(_RuntimeWin32Assembly->'%(AssemblyDirectory)')" />
<Copy SourceFiles="@(_RuntimeWin32Assembly->'%(SourceDll)')"
DestinationFiles="@(_RuntimeWin32Assembly->'%(Dll)')" />

<Exec
Command="&quot;$(ManifestToolPath)mt.exe&quot; -nologo -inputresource:&quot;%(_RuntimeWin32Assembly.Dll);#1&quot; -out:&quot;%(_RuntimeWin32Assembly.Manifest)&quot;" />

<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="[CatalogHeader]"
Overwrite="true"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="Name=%(_RuntimeWin32Assembly.Identity).cat"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="ResultDir=."
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="PublicVersion=0x00000001"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="EncodingType=0x00010001"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="[CatalogFiles]"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="%(_RuntimeWin32Assembly.Identity).dll=%(_RuntimeWin32Assembly.Identity).dll"
Encoding="ASCII" />
<WriteLinesToFile
File="%(_RuntimeWin32Assembly.CatalogDefinition)"
Lines="%(_RuntimeWin32Assembly.Identity).manifest=%(_RuntimeWin32Assembly.Identity).manifest"
Encoding="ASCII" />

<Exec
WorkingDirectory="%(_RuntimeWin32Assembly.AssemblyDirectory)"
Command="&quot;$(MakeCatToolPath)makecat.exe&quot; -v &quot;%(_RuntimeWin32Assembly.CatalogDefinition)&quot;" />

<Exec Condition="'$(SignOutput)' == 'true'"
Command="$(SignTool) &quot;%(_RuntimeWin32Assembly.Catalog)&quot;" />
</Target>
</Project>
Loading