Skip to content

Commit fbc8b58

Browse files
committed
Install Swift Build resource bundles in /usr/share/pm
1 parent 1523ce0 commit fbc8b58

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Utilities/bootstrap

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,26 @@ def install_swiftpm(prefix, args):
518518
dest = os.path.join(prefix, "lib", "swift", "pm", "PluginAPI")
519519
install_dylib(args, "PackagePlugin", dest, ["PackagePlugin"])
520520

521+
# Install required resource bundles
522+
resource_bundles = [
523+
"SwiftBuild_SWBAndroidPlatform",
524+
"SwiftBuild_SWBApplePlatform",
525+
"SwiftBuild_SWBCore",
526+
"SwiftBuild_SWBGenericUnixPlatform",
527+
"SwiftBuild_SWBQNXPlatform",
528+
"SwiftBuild_SWBUniversalPlatform",
529+
"SwiftBuild_SWBWebAssemblyPlatform",
530+
"SwiftBuild_SWBWindowsPlatform"
531+
]
532+
533+
if '-apple-' in args.build_target:
534+
resource_bundle_extension = 'bundle'
535+
else:
536+
resource_bundle_extension = 'resources'
537+
538+
for bundle in resource_bundles:
539+
install_binary(args, bundle + '.' + resource_bundle_extension, os.path.join(os.path.join(prefix, "share"), "pm"))
540+
521541

522542
# Helper function that installs a dynamic library and a set of modules to a particular directory.
523543
def install_dylib(args, library_name, install_dir, module_names):

0 commit comments

Comments
 (0)