Skip to content

Commit

Permalink
Allow to specify macos-min-version externally (#3756)
Browse files Browse the repository at this point in the history
* Allow to specify macos-min-version externally

* update changelog

* add note in documentation for macos version

* spelling fixes
  • Loading branch information
APshenkin authored Oct 20, 2024
1 parent f33e627 commit a964be1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 6 additions & 2 deletions v2/pkg/commands/build/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
if v != "" {
v += " "
}
v += "-mmacosx-version-min=10.13"
if !strings.Contains(v, "-mmacosx-version-min") {
v += "-mmacosx-version-min=10.13"
}
}
return v
})
Expand Down Expand Up @@ -344,7 +346,9 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
if addUTIFramework {
v += "-framework UniformTypeIdentifiers "
}
v += "-mmacosx-version-min=10.13"
if !strings.Contains(v, "-mmacosx-version-min") {
v += "-mmacosx-version-min=10.13"
}

return v
})
Expand Down
7 changes: 7 additions & 0 deletions website/docs/reference/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Ap

:::

:::info Set minimal version for MacOS

You can override default [minimal version](../gettingstarted/installation#supported-platforms) of macOS for your app by providing version via `CGO_CFLAGS` and `CGO_LDFLAGS` environment variables.
e.g. `CGO_CFLAGS=-mmacosx-version-min=10.15.0 CGO_LDFLAGS=-mmacosx-version-min=10.15.0 wails build`

:::

:::info UPX on Windows

Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437).
Expand Down
3 changes: 3 additions & 0 deletions website/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed cross compilation failed with CGO [PR](https://github.com/wailsapp/wails/pull/3795) by [@fcying](https://github.com/fcying)

### Changed
- Allow to specify macos-min-version externally. Implemented by @APshenkin in [PR](https://github.com/wailsapp/wails/pull/3756)

## v2.9.2 - 2024-09-18

### Fixed
Expand Down

0 comments on commit a964be1

Please sign in to comment.