From efc17c8e5bbee57a9340ce9c8587d9898e842901 Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 12:32:48 +0100 Subject: [PATCH 1/8] adding universal binary support --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d34fe9e..939ab4f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,6 +53,9 @@ jobs: - name: Bundle macOS Release if: ${{ runner.os == 'macOS' }} run: | + rustup target add aarch64-apple-darwin + cargo build --release --target aarch64-apple-darwin + lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/psst-gui cargo install cargo-bundle cargo bundle --release working-directory: psst-gui From 1abcbdd04b14210a280cf2628602546c7474e4a7 Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 12:34:55 +0100 Subject: [PATCH 2/8] Update build.yml From 2587f61716d61421821210f49b3a6230af4ab35e Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 12:52:58 +0100 Subject: [PATCH 3/8] seperate aarch64 build from bundling process --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 939ab4f1..e53a5907 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,12 +49,16 @@ jobs: - name: Build Release run: cargo build --release - - - name: Bundle macOS Release + + - name: Build aarch64 for MacOS if: ${{ runner.os == 'macOS' }} run: | rustup target add aarch64-apple-darwin cargo build --release --target aarch64-apple-darwin + + - name: Bundle macOS Release + if: ${{ runner.os == 'macOS' }} + run: | lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/psst-gui cargo install cargo-bundle cargo bundle --release From b1377e7be4105fa1e8063ee47c5045faa223cb3e Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 13:01:22 +0100 Subject: [PATCH 4/8] seperate further --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e53a5907..8ee37e2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,10 +56,13 @@ jobs: rustup target add aarch64-apple-darwin cargo build --release --target aarch64-apple-darwin + - name: Building universal Binay + if: ${{ runner.os == 'macOS' }} + run: lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/psst-gui + - name: Bundle macOS Release if: ${{ runner.os == 'macOS' }} run: | - lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/psst-gui cargo install cargo-bundle cargo bundle --release working-directory: psst-gui From 40f82e62ce8aa0d0adfa34057379999ee451eb57 Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 15:03:12 +0100 Subject: [PATCH 5/8] Little hacky fix for cargo bundle not building both (aarch64 and x86) --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ee37e2d..40eee138 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,17 +55,17 @@ jobs: run: | rustup target add aarch64-apple-darwin cargo build --release --target aarch64-apple-darwin - - - name: Building universal Binay - if: ${{ runner.os == 'macOS' }} - run: lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/psst-gui - + - name: Bundle macOS Release if: ${{ runner.os == 'macOS' }} run: | cargo install cargo-bundle cargo bundle --release working-directory: psst-gui + + - name: replacing binary with universal binary + if: ${{ runner.os == 'macOS' }} + run: lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/bundle/osx/Psst.app/Contents/MacOS/psst-gui - name: Create macOS Disk Image if: ${{ runner.os == 'macOS' }} From 70cf99c26e5b8a5eac991496709a7db70531e8a1 Mon Sep 17 00:00:00 2001 From: Jurek Date: Mon, 22 Jan 2024 21:53:34 +0100 Subject: [PATCH 6/8] Changing name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40eee138..a457a474 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: cargo bundle --release working-directory: psst-gui - - name: replacing binary with universal binary + - name: Create macOS universal binary if: ${{ runner.os == 'macOS' }} run: lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/bundle/osx/Psst.app/Contents/MacOS/psst-gui From af5584147b56639c72723cd1a2754ee4ae652403 Mon Sep 17 00:00:00 2001 From: Jackson Goode Date: Mon, 22 Jan 2024 15:53:33 -0800 Subject: [PATCH 7/8] Change name --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a457a474..68a69b19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: if: ${{ runner.os == 'macOS' }} run: | hdiutil create Psst-uncompressed.dmg -volname "Psst" -srcfolder target/release/bundle/osx - hdiutil convert Psst-uncompressed.dmg -format UDZO -o Psst-x64.dmg + hdiutil convert Psst-uncompressed.dmg -format UDZO -o Psst.dmg - name: Make Linux Binary Executable if: ${{ runner.os == 'Linux' }} @@ -88,8 +88,8 @@ jobs: uses: actions/upload-artifact@v3 if: ${{ runner.os == 'macOS' }} with: - name: Psst-x64.dmg - path: ./Psst-x64.dmg + name: Psst.dmg + path: ./Psst.dmg - name: Upload Windows Executable uses: actions/upload-artifact@v3 From defe3da49fe2e02c885060ff3db8513823ccf320 Mon Sep 17 00:00:00 2001 From: Jackson Goode Date: Mon, 22 Jan 2024 16:02:34 -0800 Subject: [PATCH 8/8] Change README link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e42f12ea..c4480393 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can download the prebuilt binaries for x86_64 Windows, Linux (Ubuntu), and m | [Windows](https://nightly.link/jpochyla/psst/workflows/build/master/Psst.exe.zip) | | [Linux (Ubuntu)](https://nightly.link/jpochyla/psst/workflows/build/master/psst-gui.zip) | | [Debian Package](https://nightly.link/jpochyla/psst/workflows/build/master/psst-deb.zip) | -| [MacOS](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x64.dmg.zip) | +| [MacOS](https://nightly.link/jpochyla/psst/workflows/build/master/Psst.dmg.zip) | Unofficial builds of Psst are also available through the [AUR](https://aur.archlinux.org/packages/psst-git) and [Homebrew](https://formulae.brew.sh/cask/psst).