5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-16 17:09:28 +08:00

Add darwin universal build and package (#3902)

* Added Support for darwin universal builds and packages

* Fix universal task

* Added the missing Taskfile.tmpl.yml file
This commit is contained in:
Anshuman 2024-11-23 17:45:10 +05:30 committed by GitHub
parent 76e7654242
commit abcc37f9a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 1 deletions

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added ### Added
- Added Support for darwin universal builds and packages by [ansxuman](https://github.com/ansxuman) in [#3902](https://github.com/wailsapp/wails/pull/3902)
- Events documentation to the mkdocs webite by [atterpac](https://github.com/atterpac) in [#3867](https://github.com/wailsapp/wails/pull/3867) - Events documentation to the mkdocs webite by [atterpac](https://github.com/atterpac) in [#3867](https://github.com/wailsapp/wails/pull/3867)
- Templates for sveltekit and sveltekit-ts that are set for non-SSR development by [atterpac](https://github.com/atterpac) in [#3829](https://github.com/wailsapp/wails/pull/3829) - Templates for sveltekit and sveltekit-ts that are set for non-SSR development by [atterpac](https://github.com/atterpac) in [#3829](https://github.com/wailsapp/wails/pull/3829)
- Update build assets using new `wails3 update build-assets` command by [leaanthony](https://github.com/leaanthony) - Update build assets using new `wails3 update build-assets` command by [leaanthony](https://github.com/leaanthony)
@ -42,7 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed amd64 appimage compile by @atterpac in [#3898](https://github.com/wailsapp/wails/pull/3898) - Fixed amd64 appimage compile by @atterpac in [#3898](https://github.com/wailsapp/wails/pull/3898)
- Fixed build assets update by @ansxuman in [#3900](https://github.com/wailsapp/wails/pull/3900) - Fixed build assets update by @ansxuman in [#3901](https://github.com/wailsapp/wails/pull/3901)
- Fixed Linux systray `OnClick` and `OnRightClick` implementation by @atterpac in [#3886](https://github.com/wailsapp/wails/pull/3886) - Fixed Linux systray `OnClick` and `OnRightClick` implementation by @atterpac in [#3886](https://github.com/wailsapp/wails/pull/3886)
- Fixed `AlwaysOnTop` not working on Mac by [leaanthony](https://github.com/leaanthony) in [#3841](https://github.com/wailsapp/wails/pull/3841) - Fixed `AlwaysOnTop` not working on Mac by [leaanthony](https://github.com/leaanthony) in [#3841](https://github.com/wailsapp/wails/pull/3841)
- [darwin] Fixed `application.NewEditMenu` including a duplicate `PasteAndMatchStyle` role in the edit menu on Darwin by [johnmccabe](https://github.com/johnmccabe) in [#3839](https://github.com/wailsapp/wails/pull/3839) - [darwin] Fixed `application.NewEditMenu` including a duplicate `PasteAndMatchStyle` role in the edit menu on Darwin by [johnmccabe](https://github.com/johnmccabe) in [#3839](https://github.com/wailsapp/wails/pull/3839)

View File

@ -31,3 +31,24 @@ tasks:
summary: Runs the application in development mode summary: Runs the application in development mode
cmds: cmds:
- wails3 dev -config ./build/config.yml -port {{.VITE_PORT}} - wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
darwin:build:universal:
summary: Builds darwin universal binary (arm64 + amd64)
cmds:
- task: darwin:build
vars:
ARCH: amd64
- mv {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}-amd64
- task: darwin:build
vars:
ARCH: arm64
- mv {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}-arm64
- lipo -create -output {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}-amd64 {{.BIN_DIR}}/{{.APP_NAME}}-arm64
- rm {{.BIN_DIR}}/{{.APP_NAME}}-amd64 {{.BIN_DIR}}/{{.APP_NAME}}-arm64
darwin:package:universal:
summary: Packages darwin universal binary (arm64 + amd64)
deps:
- darwin:build:universal
cmds:
- task: darwin:create:app:bundle

View File

@ -31,3 +31,24 @@ tasks:
summary: Runs the application in development mode summary: Runs the application in development mode
cmds: cmds:
- wails3 dev -config ./build/config.yml -port {{ "{{.VITE_PORT}}" }} - wails3 dev -config ./build/config.yml -port {{ "{{.VITE_PORT}}" }}
darwin:build:universal:
summary: Builds darwin universal binary (arm64 + amd64)
cmds:
- task: darwin:build
vars:
ARCH: amd64
- mv {{ "{{.BIN_DIR}}/{{.APP_NAME}}" }} {{ "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" }}
- task: darwin:build
vars:
ARCH: arm64
- mv {{ "{{.BIN_DIR}}/{{.APP_NAME}}" }} {{ "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" }}
- lipo -create -output {{ "{{.BIN_DIR}}/{{.APP_NAME}}" }} {{ "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" }} {{ "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" }}
- rm {{ "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" }} {{ "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" }}
darwin:package:universal:
summary: Packages darwin universal binary (arm64 + amd64)
deps:
- darwin:build:universal
cmds:
- task: darwin:create:app:bundle