5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:39:30 +08:00

[mac] Ensure minimum osx version

This commit is contained in:
Lea Anthony 2021-11-04 20:45:22 +11:00
parent 32fa543164
commit 6e8cbb8e8f
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
3 changed files with 15 additions and 2 deletions

View File

@ -298,7 +298,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
if v != "" { if v != "" {
v += " " v += " "
} }
v += "-I" + buildBaseDir v += "-mmacosx-version-min=10.13"
return v return v
}) })
// Use upsertEnv so we don't overwrite user's CGO_CXXFLAGS // Use upsertEnv so we don't overwrite user's CGO_CXXFLAGS
@ -313,6 +313,17 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
cmd.Env = upsertEnv(cmd.Env, "CGO_ENABLED", func(v string) string { cmd.Env = upsertEnv(cmd.Env, "CGO_ENABLED", func(v string) string {
return "1" return "1"
}) })
if runtime.GOOS == "darwin" {
// Set the minimum Mac SDK to 10.13
cmd.Env = upsertEnv(cmd.Env, "CGO_LDFLAGS", func(v string) string {
if v != "" {
v += " "
}
v += "-mmacosx-version-min=10.13"
return v
})
}
} }
cmd.Env = upsertEnv(cmd.Env, "GOOS", func(v string) string { cmd.Env = upsertEnv(cmd.Env, "GOOS", func(v string) string {

View File

@ -7,7 +7,8 @@ sidebar_position: 1
## Supported Platforms ## Supported Platforms
- Windows 10 - Windows 10
- MacOS x64 & arm64 (due October '21) - MacOS 10.13+ (amd64)
- MacOS 11.0+ (arm64)
- Linux (due December '21) - Linux (due December '21)
## Dependencies ## Dependencies

View File

@ -141,6 +141,7 @@ Your system is ready for Wails development!
| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | | -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) |
| -devserverurl "url" | Use 3rd party dev server url, EG Vite | "http://localhost:34115" | | -devserverurl "url" | Use 3rd party dev server url, EG Vite | "http://localhost:34115" |
| -appargs "args" | Arguments passed to the application in shell style | | | -appargs "args" | Arguments passed to the application in shell style | |
| -platform "platform" | Platform/Arch to target | `runtime.GOOS` |
If the `assetdir`, `wailsjsdir`, `debounce` or `devserverurl` flags are provided on the command line, they are saved in If the `assetdir`, `wailsjsdir`, `debounce` or `devserverurl` flags are provided on the command line, they are saved in
`wails.json`, and become the defaults for subsequent invocations. `wails.json`, and become the defaults for subsequent invocations.