From 63c9baa466ca0cf2dc6369be53c5bad72876a666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=95=A6b=E6=A2=A6?= <1715109585@qq.com> Date: Sat, 21 Oct 2023 17:29:29 +0800 Subject: [PATCH] Add tips to solve the problem that macos cannot be compiled. (#2925) * Add tips to solve the problem that macos cannot be compiled. * Add tips to solve the problem that macos cannot be compiled. --------- Co-authored-by: Lea Anthony --- .../current/guides/manual-builds.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx index 83de0fdf..72028ea6 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx @@ -80,6 +80,7 @@ Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项 #### 手动步骤 - 对于 dev 构建,最少的命令是:`go build -tags dev -gcflags "all=-N -l"` + - 在macos上需要加上环境变量 `export CGO_LDFLAGS="-framework UniformTypeIdentifiers" && go build -tags dev -gcflags "all=-N -l"` - 对于生产构建,最少的命令是:`go build -tags desktop,production -ldflags "-w -s -H windowsgui"` - 确保在与 `.syso` 文件相同的目录中进行编译