Skip to content

Commit

Permalink
universal build
Browse files Browse the repository at this point in the history
  • Loading branch information
woelper committed Nov 12, 2023
1 parent 198bfa3 commit 434d2e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/check_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ilammy/setup-nasm@v1



# - name: Install osx deps
# run: brew install nasm
# if: matrix.os == 'macos-latest'

- name: cargo build
run: cargo build
# - name: cargo build
# run: cargo build

- name: Check without default features
run: cargo check --no-default-features

- name: Check without build features
run: cargo check --features heif

- name: Run buildscript
run: ./build_mac.sh
20 changes: 16 additions & 4 deletions build_mac.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
export MACOSX_DEPLOYMENT_TARGET=10.15
cargo bundle --release --features heif
# build universal binary
cargo bundle --release
rustup target add aarch64-apple-darwin
cargo universal2
rustup target add x86_64-apple-darwin
brew install nasm
# arch -x86_64 brew install nasm

cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
lipo -create -output target/release/bundle/osx/oculante.app/Contents/MacOS/oculante x86_64-apple-darwin/release/oculante aarch64-apple-darwin/release/oculante


# build universal binary
# cargo universal2
# copy universal binary into .app
cp target/universal2-apple-darwin/release/oculante target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
#cp res/info.plist target/debug/bundle/osx/oculante.app/Contents/Info.plist
cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist
cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist



0 comments on commit 434d2e3

Please sign in to comment.