mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-10 02:20:28 +00:00
fix: mac universal binary build
This commit is contained in:
1 parent
7ba87e48fc
commit
9bd8befcb8
1 file changed
+6
-5
@@ -155,7 +155,7 @@ jobs:
|
|||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macos-arm64-lib
|
name: macos-arm64-lib
|
||||||
path: ui/flutter/libs
|
path: ui/flutter/lib-arm64
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ needs.get-release.outputs.tag_name }}
|
VERSION: ${{ needs.get-release.outputs.tag_name }}
|
||||||
@@ -163,11 +163,12 @@ jobs:
|
|||||||
PROJECT_DIR=$(pwd)
|
PROJECT_DIR=$(pwd)
|
||||||
|
|
||||||
# amd64 lib
|
# amd64 lib
|
||||||
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/libs/macos-amd64-lib github.com/GopeedLab/gopeed/bind/desktop
|
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/lib-amd64/macos-amd64-lib github.com/GopeedLab/gopeed/bind/desktop
|
||||||
# universal binary
|
# universal binary
|
||||||
cd ui/flutter/libs
|
cp ui/flutter/lib-amd64/macos-amd64-lib ui/flutter/macos/Frameworks/
|
||||||
lipo -create macos-amd64-lib macos-arm64-lib -output libgopeed.dylib
|
cp ui/flutter/lib-arm64/macos-arm64-lib ui/flutter/macos/Frameworks/
|
||||||
cp libgopeed.dylib ../macos/Frameworks
|
cd ui/flutter/macos/Frameworks
|
||||||
|
lipo -create -output libgopeed.dylib macos-amd64-lib macos-arm64-lib
|
||||||
|
|
||||||
cd $PROJECT_DIR/ui/flutter
|
cd $PROJECT_DIR/ui/flutter
|
||||||
flutter build macos
|
flutter build macos
|
||||||
|
|||||||
Reference in new issue
Block a user