From 36b18097745a592bae79d3a946b072f7fc4c6628 Mon Sep 17 00:00:00 2001 From: HUMORCE Date: Tue, 24 Jan 2023 06:28:37 +0000 Subject: [PATCH] swift: Improvements (#4378) - Extact `icu.msi`, `runtime.msi` to `$dir\Swift` - Add `Swift\icu-69.1\usr\bin`, `Swift\runtime-development\usr\bin` to PATH - Update `bin` --- bucket/swift.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bucket/swift.json b/bucket/swift.json index 85876892b8..541d346609 100644 --- a/bucket/swift.json +++ b/bucket/swift.json @@ -19,15 +19,22 @@ }, "pre_install": [ "Expand-DarkArchive \"$dir\\swiftsetup.exe\" \"$dir\\extract_folder\" -Removal", - "Get-ChildItem \"$dir\\extract_folder\\AttachedContainer\\*.msi\" | ForEach-Object { Expand-MsiArchive $_ \"$dir\" }", + "Get-ChildItem \"$dir\\extract_folder\\AttachedContainer\\*.msi\" | ForEach-Object {", + " if ($_.Name -in @('icu.msi', 'runtime.msi')) { Expand-MsiArchive $_ \"$dir\\Swift\" }", + " else { Expand-MsiArchive $_ \"$dir\" }", + "}", "Remove-Item \"$dir\\extract_folder\" -Recurse | Out-Null" ], - "env_add_path": "Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin", + "env_add_path": [ + "Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin", + "Swift\\icu-69.1\\usr\\bin", + "Swift\\runtime-development\\usr\\bin" + ], "env_set": { "SDKROOT": "$dir\\Developer\\Platforms\\Windows.platform\\Developer\\SDKs\\Windows.sdk", "DEVELOPER_DIR": "$dir\\Developer" }, - "bin": "runtime-development\\usr\\bin\\plutil.exe", + "bin": "Swift\\runtime-development\\usr\\bin\\plutil.exe", "checkver": { "url": "https://github.com/apple/swift", "regex": "/swift-([\\d.]+)-RELEASE"