7.4.1 swift sdk install
2 分钟阅读
原文链接: https://docs.swift.org/latest/documentation/packagemanagerdocs/sdkinstall/
7.4.1 swift sdk install
把给定的 Swift SDK bundle 安装到 SwiftPM 能够发现的位置。
如果产物 bundle 位于远程位置,会先把它下载到本地文件系统。
sdk install [--package-path=<package-path>]
[--cache-path=<cache-path>] [--config-path=<config-path>]
[--security-path=<security-path>]
[--scratch-path=<scratch-path>]
[--swift-sdks-path=<swift-sdks-path>]
[--toolset=<toolset>...]
[--pkg-config-path=<pkg-config-path>...]
<bundle-path-or-url> [--checksum=<checksum>]
[--color-diagnostics] [--no-color-diagnostics] [--version]
[--help]
- –package-path=<package-path>:
指定要操作的包路径(默认为当前目录)。这会先切换工作目录,然后再执行其他任何操作。
- –cache-path=<cache-path>:
指定共享缓存目录的路径。
- –config-path=<config-path>:
指定共享配置目录的路径。
- –security-path=<security-path>:
指定共享安全目录的路径。
- –scratch-path=<scratch-path>:
指定自定义的临时构建目录路径。(默认 .build)
- –swift-sdks-path=<swift-sdks-path>:
包含已安装 Swift SDK 的目录路径。
- –toolset=<toolset>:
指定为目标平台构建时使用的工具集 JSON 文件。可以多次使用该选项来指定多个工具集。各个工具集会按指定顺序合并为当前构建的单个最终工具集。
- –pkg-config-path=<pkg-config-path>:
指定搜索 pkg-config .pc 文件的替代路径。可以多次使用该选项来指定多个路径。
- bundle-path-or-url:
要安装的 Swift SDK bundle 的本地文件系统路径或 URL。
- –checksum=<checksum>:
用 swift package compute-checksum 生成的 bundle 校验和。
- –color-diagnostics|no-color-diagnostics:
在向 TTY 输出时启用或禁用彩色诊断信息。默认情况下,连接到 TTY 时启用彩色诊断,否则禁用。
- –version:
显示版本。
- –help:
显示帮助信息。