diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index 52f4039a..52264f61 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -46,6 +46,8 @@ jobs: - name: PyInstaller run: | poetry run pyinstaller ykman.spec + cp --remove-destination $(readlink "dist/ykman/_internal/Python") dist/ykman/_internal/Python + rm -rf dist/ykman/_internal/Python.framework dist/ykman/ykman --version [[ -z "$(dist/ykman/ykman --version | grep -E "not found|missing")" ]] diff --git a/resources/macos/make_pkg.sh b/resources/macos/make_pkg.sh index 1d12f294..6e12eacd 100755 --- a/resources/macos/make_pkg.sh +++ b/resources/macos/make_pkg.sh @@ -22,8 +22,13 @@ set -x cd $SCRIPT_DIR +# Ensure executable, since we may have unpacked from zip +chmod +x pkg_scripts/* + mkdir -p pkg/root/usr/local/bin pkg/comp -cp -r $SOURCE_DIR pkg/root/usr/local/ +cp -R $SOURCE_DIR pkg/root/usr/local/ + +# Create a symlink to the main binary that is on the PATH (cd pkg/root/usr/local/bin && ln -s ../ykman/ykman) pkgbuild --root="pkg/root" --scripts="pkg_scripts" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg" diff --git a/resources/macos/make_release.sh b/resources/macos/make_release.sh index 50dbd0ed..5e2739d3 100755 --- a/resources/macos/make_release.sh +++ b/resources/macos/make_release.sh @@ -19,9 +19,6 @@ SOURCE_DIR="$CWD/ykman" # Ensure executable, since we may have unpacked from zip chmod +x $SOURCE_DIR/ykman -# Remove Python framework directory as it isn't needed -rm -rf $SOURCE_DIR/_internal/Python.framework - RELEASE_VERSION=`$SOURCE_DIR/ykman --version | awk '{print $(NF)}'` PKG="yubikey-manager-$RELEASE_VERSION-mac.pkg"