mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:52:29 +08:00
[mac] Ensure minimum osx version
This commit is contained in:
parent
32fa543164
commit
6e8cbb8e8f
@ -298,7 +298,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
if v != "" {
|
||||
v += " "
|
||||
}
|
||||
v += "-I" + buildBaseDir
|
||||
v += "-mmacosx-version-min=10.13"
|
||||
return v
|
||||
})
|
||||
// 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 {
|
||||
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 {
|
||||
|
@ -7,7 +7,8 @@ sidebar_position: 1
|
||||
## Supported Platforms
|
||||
|
||||
- Windows 10
|
||||
- MacOS x64 & arm64 (due October '21)
|
||||
- MacOS 10.13+ (amd64)
|
||||
- MacOS 11.0+ (arm64)
|
||||
- Linux (due December '21)
|
||||
|
||||
## Dependencies
|
||||
|
@ -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) |
|
||||
| -devserverurl "url" | Use 3rd party dev server url, EG Vite | "http://localhost:34115" |
|
||||
| -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
|
||||
`wails.json`, and become the defaults for subsequent invocations.
|
||||
|
Loading…
Reference in New Issue
Block a user