Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,13 @@ jobs:
echo "$name: $(lipo -archs "$bundle/Contents/MacOS/$name")"
done
version=$(sed -n 's/.*"version" *: *"\([^"]*\)".*/\1/p' maxmsp/package-info.json | head -n 1)
( cd maxmsp/dist && ditto -c -k --sequesterRsrc --keepParent Zerr "zerr-max-${version}-macos-arm64.zip" )
( cd maxmsp/dist && ditto -c -k --norsrc --keepParent Zerr "zerr-max-${version}-macos-arm64.zip" )
find maxmsp/dist/Zerr -type f | sort
ls -l maxmsp/dist/*.zip
# Same flags as build.sh zip_dir(): no __MACOSX/._* tree, no Finder files.
if unzip -l maxmsp/dist/zerr-max-*.zip | grep -e '__MACOSX' -e '\.DS_Store'; then
echo "::error::the Max zip carries macOS metadata files"; exit 1
fi

- name: Upload Max package
uses: actions/upload-artifact@v4
Expand Down
14 changes: 9 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ package_puredata() {

local zip
zip="zerr-pd-$(pd_version)-$(host_os)-$(host_arch).zip"
rm -f "$dist"/zerr-pd-*.zip
rm -f "$dist"/*.zip # also zips from a previous version, architecture or naming
zip_dir "$dist" zerr "$zip"
echo "Pure Data package assembled: $dist/zerr"
echo "Pure Data package zipped: $dist/$zip"
Expand Down Expand Up @@ -412,7 +412,7 @@ package_maxmsp() {
# stays Zerr/, the Max package name.
local zip="zerr-max-$(max_version)-macos-${archs}.zip"

rm -f "$dist"/zerr-max-*.zip # also zips from a previous version or architecture
rm -f "$dist"/*.zip # also zips from a previous version, architecture or naming
zip_dir "$dist" Zerr "$zip"
echo "Max package assembled: $dist/Zerr"
echo "Max package zipped: $dist/$zip"
Expand Down Expand Up @@ -448,12 +448,16 @@ host_arch() {
}

# zip_dir <parent> <folder> <zip>: zips <parent>/<folder> as <parent>/<zip> with the
# folder as the top-level entry. ditto keeps the bundle metadata and permissions a
# plain zip of a .mxo can lose; elsewhere CMake's tar does the job.
# folder as the top-level entry. ditto keeps the bundle permissions a plain zip of a
# .mxo can lose; --norsrc leaves out resource forks and extended attributes, which
# --sequesterRsrc would write as a __MACOSX/._* tree that Windows and Linux users see
# as junk (a code signature lives in _CodeSignature/, not in an attribute). Finder's
# .DS_Store files are dropped first. Elsewhere CMake's tar does the job.
zip_dir() {
local parent="$1" folder="$2" zip="$3"
find "$parent/$folder" -name .DS_Store -delete
if command -v ditto &> /dev/null; then
( cd "$parent" && ditto -c -k --sequesterRsrc --keepParent "$folder" "$zip" )
( cd "$parent" && ditto -c -k --norsrc --keepParent "$folder" "$zip" )
else
( cd "$parent" && cmake -E tar cf "$zip" --format=zip "$folder" )
fi
Expand Down
1 change: 1 addition & 0 deletions docs/design/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Checks:
codesign --verify --deep --strict maxmsp/dist/Zerr/externals/*.mxo
lipo -archs 'maxmsp/dist/Zerr/externals/zerr.features~.mxo/Contents/MacOS/zerr.features~' # arm64
unzip -l maxmsp/dist/zerr-max-*.zip | head
unzip -l maxmsp/dist/zerr-max-*.zip | grep -c -e __MACOSX -e .DS_Store # 0: ditto --norsrc, no Finder files
```

CI (`maxmsp (macos)` job) performs the same assembly and uploads the zip as `zerr-max-macos-arm64`;
Expand Down
5 changes: 3 additions & 2 deletions maxmsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif()
# the ad-hoc signature max-posttarget.cmake applied; CI verifies it after install.
foreach (extern_name ${ZERR_MAX_EXTERNALS})
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/externals/${extern_name}.mxo"
DESTINATION externals USE_SOURCE_PERMISSIONS)
DESTINATION externals USE_SOURCE_PERMISSIONS PATTERN ".DS_Store" EXCLUDE)
endforeach ()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/help/" DESTINATION help
FILES_MATCHING PATTERN "*.maxhelp" PATTERN "*.mxo" EXCLUDE)
Expand All @@ -121,7 +121,8 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/" DESTINATION docs
FILES_MATCHING PATTERN "*.maxref.xml")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/examples/" DESTINATION examples
FILES_MATCHING PATTERN "*.maxpat" PATTERN "*.yaml" PATTERN "README.md")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/media/" DESTINATION media)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/media/" DESTINATION media
PATTERN ".DS_Store" EXCLUDE)
# Speaker layouts shipped with the package. Max adds a package's misc/ folder to
# the search path, so `zerr.envelopes~ trigger ring_8` resolves without a path.
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../configs/" DESTINATION misc
Expand Down
Loading