Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Merge main into release/6.2 #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2327cdc
Implement Statistic with atomics so it's thread safe
jakepetroules May 2, 2025
7cd307d
Remove `compiler` build setting conditional (#481)
neonichu May 5, 2025
ef21a84
build: attempt to bundle files for the modules
compnerd Mar 3, 2025
de9a45a
Introduce a ByteCount abstraction for representing bytes
jakepetroules May 2, 2025
e39832f
Turn on the inclusive language soundness check
owenv May 5, 2025
f267224
Merge pull request #489 from swiftlang/owenv/language-check
owenv May 5, 2025
5f4041c
[Explicit Module Builds] Add support for Swift incremental dependency…
artemcm May 6, 2025
fce47fd
Continue bundling xcspec resources used by Swift Build
owenv May 5, 2025
bb91a15
Remove blocking_sync usages from TaskProducerContext
jakepetroules May 5, 2025
524037f
Remove more blocking_sync calls
jakepetroules May 5, 2025
6eed033
Improve validation of task action implementation tool identifier types
jakepetroules May 6, 2025
bed73bb
Merge pull request #492 from artemcm/IncrementalScanOptional
artemcm May 7, 2025
382fba5
[Swift] Add migrate mode to a few upcoming flags that currently suppo…
xedin May 7, 2025
4ade115
[Swift] NFC: Change display name for `NonisolatedNonsendingByDefault`…
xedin May 7, 2025
a4dc5bb
Merge pull request #496 from xedin/add-migrate-option-to-features-tha…
xedin May 8, 2025
579aa20
Add plugin to autogenerate windows installer content
owenv May 8, 2025
36e8b25
Merge pull request #497 from swiftlang/owenv/gen-windows-installer
owenv May 8, 2025
fe6f10f
Merge pull request #488 from swiftlang/owenv/bundling-continued
owenv May 8, 2025
edda59f
Fix xcbuildrules typo
owenv May 9, 2025
ed66ddc
Merge pull request #500 from swiftlang/owenv/resource-fixes
owenv May 9, 2025
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
Prev Previous commit
Next Next commit
Add plugin to autogenerate windows installer content
  • Loading branch information
owenv committed May 8, 2025
commit 579aa20c323f9cd2326fe9ac0ca7b5163c24b973
7 changes: 7 additions & 0 deletions 7 Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ let package = Package(
verb: "cmake-smoke-test",
description: "Build Swift Build using CMake for validation purposes"
))
),
.plugin(
name: "generate-windows-installer-component-groups",
capability: .command(intent: .custom(
verb: "generate-windows-installer-component-groups",
description: "Generate XML fragments for cli.wxs in swift-installer-scripts"
))
)
],
swiftLanguageModes: [.v5, .v6],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import PackagePlugin
import Foundation

@main
struct GenerateWindowsInstallerComponentGroups: CommandPlugin {
func performCommand(context: PluginContext, arguments: [String]) async throws {
var librariesComponent = #" <ComponentGroup Id="SwiftBuild" Directory="_usr_bin">\#n"#
var resourcesComponents = ""
var groupRefs = #" <ComponentGroupRef Id="SwiftBuild" />\#n"#
var directories = #" <Directory Id="_usr_share_pm" Name="pm">\#n"#
for target in context.package.targets.sorted(by: { $0.name < $1.name }).filter({ !["SWBTestSupport", "SwiftBuildTestSupport"].contains($0.name) }) {
guard let sourceModule = target.sourceModule, sourceModule.kind == .generic else {
continue
}
librariesComponent += #"""
<Component>
<File Source="$(ToolchainRoot)\usr\bin\\#(sourceModule.name).dll" />
</Component>

"""#

let resources = sourceModule.sourceFiles.filter { resource in resource.type == .resource && ["xcspec", "xcbuildrule"].contains(resource.url.pathExtension) }
if !resources.isEmpty {
groupRefs += #" <ComponentGroupRef Id="\#(sourceModule.name)Resources" />\#n"#
directories += #" <Directory Id="_usr_share_pm_\#(sourceModule.name)" Name="SwiftBuild_\#(sourceModule.name).resources" />\#n"#
resourcesComponents += #" <ComponentGroup Id="\#(sourceModule.name)Resources" Directory="_usr_share_pm_\#(sourceModule.name)">\#n"#
for resource in resources {
resourcesComponents += #"""
<Component>
<File Source="$(ToolchainRoot)\usr\share\pm\SwiftBuild_\#(sourceModule.name).resources\\#(resource.url.lastPathComponent)" />
</Component>

"""#
}
resourcesComponents += " </ComponentGroup>\n"
}
}
librariesComponent += " </ComponentGroup>\n"
directories += " </Directory>\n"

print("Component Groups")
print(String(repeating: "-", count: 80))
print(librariesComponent)
print(resourcesComponents)
print("Group Refs")
print(String(repeating: "-", count: 80))
print(groupRefs)
print("Directories")
print(String(repeating: "-", count: 80))
print(directories)
}
}
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.