从 Swift 运行 Wine
let folder: URL = "/path/to/wine/bin"
let bottle: URL = "/path/to/bottle"
let wine = Wine(folder: folder, bottle: bottle)
查询注册表条目
try await wine.registry.query(
keyPath: String,
name: String,
type: RegistryType
)
向注册表添加条目
try await wine.registry.add(
keyPath: String,
name: String,
value: String,
type: RegistryType
)
从注册表中删除条目
try await wine.registry.delete(
keyPath: String,
name: String
)
打开注册表编辑器
try await wine.commands.registryEditor()
打开 Wine 的 GUI 配置工具
try await wine.commands.configurationGUI()
打开 Wine 控制面板
try await wine.commands.controlPanel()
打开 Wine 任务管理器
try await wine.commands.taskManager()
解析 Windows 文件
更多信息请参见 Microsoft Learn 上的 PE 格式。
let url: URL = "/path/to/peFile"
let peFile = PortableExecutable(url: url)
更多信息请参见 Microsoft Learn 上的 Shell 链接。
let url: URL = "/path/to/shellLink"
let shellLink = ShellLink(url: url)
请参阅 LICENSE